nkeck720 / nos

A command-line based OS written in FASM syntax for i386 and above.
GNU General Public License v2.0
9 stars 5 forks source link

FASM board issue 19 #20

Closed nkeck720 closed 8 years ago

nkeck720 commented 8 years ago

In order to process a second driver you preserve the ES and CX registers. ES is fine but CX has a known value of 0 at this point and more importantly you don't need it to remain. But you do need the SI register to be preserved and incremented because it still points at the "*" asterisk character. For correct counting you also need to reset the BH counter.

Code:

push es                 ;So we can recover later 
push si 
... 
;; If we get here, we are successfully loaded. 
pop  si 
pop  es 
inc  si                 ;Skip asterisk 
mov  bh, 0              ;Reset counter 
jmp  get_dem_filenames 
nkeck720 commented 8 years ago

This will be implemented at a later point in time, for now I am primarily focused on getting a buildable kernel out that works in terms of basic structure.