Code: Select all
;; Header
0x10 0x00
;; Sectors
0x0001
;; Where?
0x0200
0x0100
;; Which?
0x00000000 00000001
The code used to generate the structure is as follows:
Code: Select all
loadSector:
;; Save a couple of important registers
push bp
push si
;; Set the stack frame
mov bp, sp
;; Align the stack to a dword boundary (I chose to 16 bytes)
and sp, 0xFFF0
;; Put the structure on the stack
push dword ebx
push dword eax
push es
push di
push cx
push 16
;; Get the location of the structure
mov si, sp
;; Save some more registers
push dx
push ds
;; Copy SS to DS for the int
;; because the structure is on the stack
push ss
pop ds
;; Which subfunction
mov ax, 0x42
;; One last register
push bp
;; Do it!
int 13h
;; At this point, I can find nothing that I expect despite no errors reported
;; Restore the various registers
pop bp
pop ds
pop dx
;; Remove the structure & alignment padding from the stack
mov sp, bp
;; Restore the pointers
pop si
pop bp
ret