Improve register hygiene
This commit is contained in:
parent
d1dab01633
commit
6e7a6563d5
@ -1,16 +1,31 @@
|
|||||||
; IN DL drive number
|
; IN DL drive number
|
||||||
; BP ptr to bpb_size'd buffer
|
; BP ptr to bpb_size'd buffer
|
||||||
bpb_load:
|
bpb_load:
|
||||||
|
push ax
|
||||||
|
push dx
|
||||||
|
|
||||||
mov [bp+(bpb_size-1)], dl
|
mov [bp+(bpb_size-1)], dl
|
||||||
|
|
||||||
|
; load first sector
|
||||||
xor dx, dx
|
xor dx, dx
|
||||||
xor ax, ax
|
xor ax, ax
|
||||||
call drive_read
|
call drive_read
|
||||||
|
|
||||||
|
push cx
|
||||||
|
push si
|
||||||
|
push di
|
||||||
|
|
||||||
|
; copy BPB to BP
|
||||||
mov si, (diskbuf+0x0B)
|
mov si, (diskbuf+0x0B)
|
||||||
mov di, bp
|
mov di, bp
|
||||||
mov cx, (bpb_size-1)
|
mov cx, (bpb_size-1)
|
||||||
rep movsb
|
rep movsb
|
||||||
|
|
||||||
|
pop di
|
||||||
|
pop si
|
||||||
|
pop cx
|
||||||
|
|
||||||
|
pop dx
|
||||||
|
pop ax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user