mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-25 23:04:57 +02:00
add comment about location that may be modified by sys (and some whitespace changes due to editor)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1493 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
38abeed649
commit
66c9f421ac
@ -398,9 +398,11 @@ read_next:
|
|||||||
|
|
||||||
; check for LBA support
|
; check for LBA support
|
||||||
|
|
||||||
mov ah,041h ;
|
mov ah,041h ;
|
||||||
mov bx,055aah ;
|
mov bx,055aah ;
|
||||||
mov dl, [drive]
|
mov dl, [drive]
|
||||||
|
|
||||||
|
; NOTE: sys must be updated if location changes!!!
|
||||||
test dl,dl ; don't use LBA addressing on A:
|
test dl,dl ; don't use LBA addressing on A:
|
||||||
jz read_normal_BIOS ; might be a (buggy)
|
jz read_normal_BIOS ; might be a (buggy)
|
||||||
; CDROM-BOOT floppy emulation
|
; CDROM-BOOT floppy emulation
|
||||||
@ -419,7 +421,7 @@ read_next:
|
|||||||
lea si,[LBA_PACKET]
|
lea si,[LBA_PACKET]
|
||||||
|
|
||||||
; setup LBA disk block
|
; setup LBA disk block
|
||||||
mov LBA_SECTOR_32,bx ; bx is 0 if extended 13h mode supported
|
mov LBA_SECTOR_32,bx ; bx is 0 if extended 13h mode supported
|
||||||
mov LBA_SECTOR_48,bx
|
mov LBA_SECTOR_48,bx
|
||||||
|
|
||||||
mov ah,042h
|
mov ah,042h
|
||||||
@ -514,25 +516,26 @@ PrintLowNibble: ; Prints low nibble of AL, AX is destroyed
|
|||||||
and AL, 0Fh ; ignore upper nibble
|
and AL, 0Fh ; ignore upper nibble
|
||||||
cmp AL, 09h ; if greater than 9, then don't base on '0', base on 'A'
|
cmp AL, 09h ; if greater than 9, then don't base on '0', base on 'A'
|
||||||
jbe .printme
|
jbe .printme
|
||||||
add AL, 7 ; convert to character A-F
|
add AL, 7 ; convert to character A-F
|
||||||
.printme:
|
.printme:
|
||||||
add AL, '0' ; convert to character 0-9
|
add AL, '0' ; convert to character 0-9
|
||||||
mov AH,0x0E ; show character
|
mov AH,0x0E ; show character
|
||||||
int 0x10 ; via "TTY" mode
|
int 0x10 ; via "TTY" mode
|
||||||
retn
|
retn
|
||||||
PrintAL: ; Prints AL, AX is preserved
|
PrintAL: ; Prints AL, AX is preserved
|
||||||
push AX ; store value so we can process a nibble at a time
|
push AX ; store value so we can process a nibble at a time
|
||||||
shr AL, 4 ; move upper nibble into lower nibble
|
shr AL, 4 ; move upper nibble into lower nibble
|
||||||
call PrintLowNibble
|
call PrintLowNibble
|
||||||
pop AX ; restore for other nibble
|
pop AX ; restore for other nibble
|
||||||
push AX ; but save so we can restore original AX
|
push AX ; but save so we can restore original AX
|
||||||
call PrintLowNibble
|
call PrintLowNibble
|
||||||
pop AX ; restore for other nibble
|
pop AX ; restore for other nibble
|
||||||
retn
|
retn
|
||||||
PrintNumber: ; Prints (in Hex) value in AX, AX is preserved
|
PrintNumber: ; Prints (in Hex) value in AX, AX is preserved
|
||||||
xchg AH, AL ; high byte 1st
|
xchg AH, AL ; high byte 1st
|
||||||
call PrintAL
|
call PrintAL
|
||||||
xchg AH, AL ; now low byte
|
xchg AH, AL ; now low byte
|
||||||
call PrintAL
|
call PrintAL
|
||||||
retn
|
retn
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user