Page 1 of 1
Yet another bootloader
Posted: Thu Jun 13, 2002 5:05 pm
by Curufir
[attachment deleted by admin]
Re:Yet another bootloader
Posted: Thu Jun 13, 2002 5:52 pm
by Peter_Vigren
First of all I must say that I'm a little impressed that you pushed the adress and then used a RetF to go there... :-) I myself have used a similar way but I haven't seen it implemented anywhere...
Second I suggest that you change BIOS_Print to the following:
BIOS_Print:
Push Ax ; Saving the registers that are changed can be useful
Push Bx
Mov Bx, 0x0007 ; These are only needed once
Mov Ah, 0x0E
BIOS_Printing:
Lodsb
Or Al, Al
Jz BIOS_Print_Done
Int 0x10
Jmp Short BIOS_Printing
BIOS_Print_Done:
Push Bx
Push Ax
RetN
I can have done some errors in the code since I'm a bit tired...
The rest seems fine to me... I haven't tested it though... and if I should be completely honest I have always used Cmp Ah,0 instead of Or Al,Al... Your way save one byte... Nice... :-)
Re:Yet another bootloader
Posted: Thu Jun 13, 2002 6:13 pm
by Peter_Vigren
Peter_Vigren wrote:
Cmp Ah,0 instead of Or Al,Al... Your way save one byte... Nice...
Consulting "HelpPC" again I'm seeing that the above isn't true if the register is Ax and if the value compared with is lower than or equal to 8 bits... (If I'm interpreting the information right...) But anyway else it would be true
I really should go to sleep now before I write something very odd...