With sti, prints garbage?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

With sti, prints garbage?

Post 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 :)
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Post 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 :)
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

Happens all the time. View my recent posts, see the 'Edit:' multiple times :D
Post Reply