OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Apr 29, 2024 2:22 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Yet another bootloader
PostPosted: Thu Jun 13, 2002 5:05 pm 
[attachment deleted by admin]


Top
  
 
 Post subject: Re:Yet another bootloader
PostPosted: Thu Jun 13, 2002 5:52 pm 
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... :-)


Top
  
 
 Post subject: Re:Yet another bootloader
PostPosted: Thu Jun 13, 2002 6:13 pm 
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... :-)


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: DotBot [Bot], Google [Bot], Majestic-12 [Bot] and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group