Re: boot sector
- From: "Benjamin David Lunt" <zfysz@xxxxxxxxxxxxxxx>
- Date: Fri, 24 Nov 2006 06:37:43 GMT
<bob@xxxxxxxxxxxxxx> wrote in message
news:1164347053.438418.219100@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
popa
60 pusha
6A00 push byte +0x0-----------64-bit LBA of sector to read
6A00 push byte +0x0 -------/
FF760A push word [bp+0xa]---/
FF7608 push word [bp+0x8]--/
6A00 push byte +0x0 --------- dword buffer
68007C push word 0x7c00 ------/
6A01 push byte +0x1 word at offset 02h = 1 (1 block)
6A10 push byte +0x10 byte 0 = 0x10 byte 1 = 0x00
B442 mov ah,0x42
8BF4 mov si,sp
CD13 int 0x13
61 popa
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
08h QWORD starting absolute block number
Thanks, Benjamin.
It actually does two popa's in a row, but I only put in the first one.
Also, just to confirm, is the code reading 1 block? (a.k.a. 512 bytes)
Yes. See above.
The first popa is a space saving instruction to "restore" the stack
in a single byte instead of a multiple byte instruction. popa pops
16 bytes off the stack.
Ben
.
- References:
- boot sector
- From: bob
- Re: boot sector
- From: Benjamin David Lunt
- Re: boot sector
- From: bob
- boot sector
- Prev by Date: Re: boot sector
- Next by Date: Re: raghu protected mode
- Previous by thread: Re: boot sector
- Next by thread: Re: boot sector
- Index(es):