Page 1 of 1

With sti, prints garbage?

Posted: Sat Jun 02, 2007 10:01 pm
by neon
Hey everyone!

Im rewriting my bootloader for better support of FAT12,
allowing me to create a relocatable kernel for my OS.

Yet, this ones got me stumped. I know / hope its something
simple.

Here is a code snipplet:

Code: Select all

;**** with sti, prints alot of garbage; without sti prints nothing??

            sti                         ; enable interrupts 

            push ds 
            mov dl,[bsBootDrv]          ; reset controller 
            xor ax,ax 
            int 0x13 
            pop ds 
            
             hlt	; halt for testing
I dont know what the problem could be. The above code simply
resets the floppy controller. I cleared the interrupts, and have to
be able to re enable the interrupts in order to use int 13h.

> Im in 16bit real mode, so int 13h should be okay.

> bsBootDrv is set to DL at the start of the code to store the
current drive number.

> Nothing here should print anything, yet it does--garbage.

What can possibly cause something like this?

(btw, I switched to using VFD and PARTCOPY--they are great!)

Any suggestions of any kind are very much appreciated.

Thanks :)

Posted: Sat Jun 02, 2007 10:18 pm
by neon
Argh...

Dont you love posting after about 2/3 hours trying to fix
a problem, only to fix the problem seconds after posting?

Code: Select all

            sti                         ; enable interrupts 
            push ds 
       ;     mov dl,[bsBootDrv]          << the error
            xor ax,ax 
            int 0x13 
            pop ds 
            
             hlt   ; halt for testing 
Its working now though;

Thanks for anyone who read this :)

Posted: Sat Jun 02, 2007 10:41 pm
by pcmattman
Happens all the time. View my recent posts, see the 'Edit:' multiple times :D