[syslinux] isolinux.asm - improving spec_query_failed routine...
Lagerweij B
b.lagerweij at cts-bv.nl
Tue Sep 3 07:38:00 PDT 2002
Hi Peter,
I noticed in your isolinux.asm code,
when loading spec packet fails you are trying to wing it, in other word,
loop the drive numbers from 0xff through 0x80 until the booted drive number
is found...
I write software that also "wings it".
Recently I had to create some "wird" workarounds because of bad bios in some
Dell and Compaq PC's.
Below is my function for finding (wing it) the booted eltorito drive number,
this methode works on the worst and badly coded bioses out there...
Maybe it can help you with development of future version of isolinux.asm
You provide isolinux for the world, for free, so improving your code is the
least I can do back...
Best regards and good luck,
Bart "nu2" Lagerweij.
---
Bart Lagerweij - http://www.nu2.nu
To contact me go here: http://www.nu2.nu/contact/bart
---
;------------------------------------------------------------
; Get first emulated drive number
; returns:
; CF=1 - not in emulation mode
; CF=0 - in emulation mode
; DL - drive number for emulation
get_emul_drive:
push ax
push si
; mov [spec_packet], 13h
mov dl, 0ffh ; drive number
get_emul_drive1:
mov ax, 4b01h ; get status
mov [spec_packet], 0
call int13
; Bogus Dell PC's do not return carry flag correctly - ignoring it
; jnc get_emul_drive_ok
; some bogus bioses (Dell Inspiron 2500) returns packet size 0xff when
failed
; Dell Dimension XPsT returns packet size 0x14 when OK
cmp [spec_packet], 13h ; anything between 13h and 20h
should be OK
jb get_emul_trynext
cmp [spec_packet], 20h
ja get_emul_trynext
jmp short get_emul_drive_ok
get_emul_trynext:
dec dl
cmp dl, 80h
jb get_emul_drive_nok
jmp get_emul_drive1
; cmp [spec_packet], 0
; je get_emul_trynext
; jmp get_emul_drive_ok
get_emul_drive_nok:
xor dl, dl
stc
jmp short get_emul_drive_exit
get_emul_drive_ok:
mov dl, [spec_packet+2]
clc
get_emul_drive_exit:
pop si
pop ax
ret
;------------------------------------------------------------
int13:
mov si, offset spec_packet
int 13h
ret
;------------------------------------------------------------
More information about the Syslinux
mailing list