Hello everyone,
What function of INT 13h should i use to read my kernel from CD?
INT 13h
- BOTOKILLER
- Member
- Posts: 28
- Joined: Tue Jan 04, 2011 10:25 am
- Location: Ukraine
Re: INT 13h
will it read cd??
Re: INT 13h
Look for Int 13h Extensions in Ralf Brown's Interrupt List. You'll find your answer there.BOTOKILLER wrote:will it read cd??
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
- BOTOKILLER
- Member
- Posts: 28
- Joined: Tue Jan 04, 2011 10:25 am
- Location: Ukraine
Re: INT 13h
http://www.ctyme.com/intr/rb-0717.htm
i found this interrupt in that copy of table, I've got a few questions
what is CD-ROM controller number? Is 'Logical Block Address of disk image to emulate' - LBA of the sector, I need to read. what is '0Ch WORD load segment for initial boot image'?.
i found this interrupt in that copy of table, I've got a few questions
what is CD-ROM controller number? Is 'Logical Block Address of disk image to emulate' - LBA of the sector, I need to read. what is '0Ch WORD load segment for initial boot image'?.
Re: INT 13h
Do you want to initiate disk emulation?
I mean, do you want your CD device to behave as a floppy or hard disk?
If no, that is not for you.
If yes, you can use third party softwares (MagicISO etc.) to do that job for you.
Anyway, here's what you need.
It is always wise to check the availability of Int13h Extensions before you continue.
AFAIK, Bochs, Qemu and Virtual PC don't report the availability of Int13h Extensions. In that case, you need to manually start disk emulation (in which case, the link you posted, comes handy). I think Linux does something similar as I can run my Linux Distribution Live CD under Emulators.
I mean, do you want your CD device to behave as a floppy or hard disk?
If no, that is not for you.
If yes, you can use third party softwares (MagicISO etc.) to do that job for you.
Anyway, here's what you need.
Code: Select all
INT 13 - IBM/MS INT 13 Extensions - EXTENDED READ
AH = 42h
DL = drive number ; Let BIOS fill this value
DS:SI -> disk address packet (see #00272)
Return: CF clear if successful
AH = 00h
CF set on error
AH = error code (see #00234)
disk address packet's block count field set to number of blocks
successfully transferred
SeeAlso: AH=02h,AH=41h"INT 13 Ext",AH=43h"INT 13 Ext"
Format of disk address packet:
Offset Size Description (Table 00272)
00h BYTE size of packet (10h or 18h)
01h BYTE reserved (0)
02h WORD number of blocks to transfer (max 007Fh for Phoenix EDD)
04h DWORD -> transfer buffer ; Destination address
08h QWORD starting absolute block number
(for non-LBA devices, compute as
(Cylinder*NumHeads + SelectedHead) * SectorPerTrack +
SelectedSector - 1
10h QWORD (EDD-3.0, optional) 64-bit flat address of transfer buffer;
used if DWORD at 04h is FFFFh:FFFFh
AFAIK, Bochs, Qemu and Virtual PC don't report the availability of Int13h Extensions. In that case, you need to manually start disk emulation (in which case, the link you posted, comes handy). I think Linux does something similar as I can run my Linux Distribution Live CD under Emulators.
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
- BOTOKILLER
- Member
- Posts: 28
- Joined: Tue Jan 04, 2011 10:25 am
- Location: Ukraine
Re: INT 13h
all right guys, Ill try all this stuff....
- BOTOKILLER
- Member
- Posts: 28
- Joined: Tue Jan 04, 2011 10:25 am
- Location: Ukraine
Re: INT 13h
will that one work http://www.ctyme.com/intr/rb-0708.htm ??????????
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: INT 13h
How about you go try for your self? And here's a tip - adding extra question marks does not make people more likely to help you, in fact, it makes you a big target for the banhammer.
Learning about forum etiquette before posting is always a nice thing.
Learning about forum etiquette before posting is always a nice thing.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc