OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 8:03 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 26 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re:X-OS 0.3.2
PostPosted: Thu May 13, 2004 6:58 am 
Simply, the fault is up to both ;)
(seriously, you SHOULD push and pop eax)


Top
  
 
 Post subject: Re:X-OS 0.3.2
PostPosted: Fri May 14, 2004 2:18 am 
i tried to push/pop eax, and there is no change
i also tried to push/pop all regs and it doesn't work :-\


Top
  
 
 Post subject: Re:X-OS 0.3.2
PostPosted: Fri May 14, 2004 8:18 am 
Quote:
Code:
k_int0:
    cli
    call idt_int0
    mov al,0x20
    out 0x20,al
    sti
    iret

This should be:
Code:
k_int0:
    push eax
    cli
    call idt_int0
    mov al,0x20
    out 0x20,al
    pop  eax
    sti
    iret

Does this work, or did you already give it a try ? ::)


Top
  
 
 Post subject: Re:X-OS 0.3.2
PostPosted: Fri May 14, 2004 8:57 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
cli and sti are bug-prone and useless in this situation. Drop them. The cpu does save/restore IF for you.

this is the correct stub for "IRQ0"
Code:
k_int0:
    pushad
    push ds
    push es
   mov ax,DEFAULT_DATA_SELECTOR
    mov ds, ax
    mov es,ax   
    call idt_int0
    mov al,0x20
    out 0x20,al
    pop es
    pop ds
    popad
    iret


this is the correct stub for "division by zero exception"
Code:
k_int0:
    pushad
    push ds
    push es
   mov ax,DEFAULT_DATA_SELECTOR
    mov ds, ax
    mov es,ax   
    call idt_int0
    pop es
    pop ds
    popad
    iret

_________________
Image May the source be with you.


Top
 Profile  
 
 Post subject: Re:X-OS 0.3.2
PostPosted: Fri May 14, 2004 9:20 am 
I think the problem comes from IRQ0 (timer), coze, when I push/pop eax there, the console scrolls correctly, but floppy driver can't fire IRQ6..
so i'll try youre code, hoping it fix my problem...

thank you for help
;)


Top
  
 
 Post subject: Re:X-OS 0.3.2
PostPosted: Fri May 14, 2004 12:06 pm 
Pype.Clicker wrote:
cli and sti are bug-prone and useless in this situation. Drop them. The cpu does save/restore IF for you.


Also, the PICs are blocking any IRQ signal too, but using cli/sti doesn't matter.
And it isn't causing a bug.


Top
  
 
 Post subject: Re:X-OS 0.3.2
PostPosted: Sat May 15, 2004 11:25 am 
it seems that your code works well, but i have the same problem as when i used a simple push/pop eax, my floppy driver can't get IRQ6, the only way to get it is to change eax value returned by IRQ0, is this normal ??

when i use this code
Code:
k_int0:
    pushad
    push ds
    push es
  mov ax,DEFAULT_DATA_SELECTOR
    mov ds, ax
    mov es,ax   
    call idt_int0
    mov al,0x20
    out 0x20,al
    pop es
    pop ds
    popad
    iret

I can't get IRQ6

but when I use this one
Code:
k_int0:
    pushad
    push ds
    push es
  mov ax,DEFAULT_DATA_SELECTOR
    mov ds, ax
    mov es,ax   
    call idt_int0
    mov al,0x20
    out 0x20,al
    pop es
    pop ds
    popad
    or eax, 0x8000 
    iret

it works well ???


Top
  
 
 Post subject: Re:X-OS 0.3.2
PostPosted: Tue Jun 29, 2004 10:03 am 
hmm the first time I tested it, I got a triple fault in vmware - right after the x-os splash/boot screen.

the second time it hangs, still showing the splash/boot screen. pressing the any key doesn't help, I just get some beeps.

the third try gives an triple fault again..

btw the splash screen "scroll up effect" takes a bit long, doesn't it?..


Top
  
 
 Post subject: Re:X-OS 0.3.2
PostPosted: Tue Jun 29, 2004 1:52 pm 
have u tested it on bochs qemu or, a real machine?
how mutch memory have you give it on vmware ?

Quote:
btw the splash screen "scroll up effect" takes a bit long, doesn't it?.

it's not a scroll up effect, it's because of emulated bios calls under vmware (or any other virtual machine).
it works faster on a real PC.
u can disable splash screen by editing boot/setup.asm and comment the call to splash screen function .

thank u 4 testing :)


Top
  
 
 Post subject: Re:X-OS 0.3.2
PostPosted: Tue Jun 29, 2004 4:45 pm 
I ran it under vmware with 32megs of ram.
/* was too lazy to fire up bochs and press the buttons through the textmode config menu ;) */

I'll get virtualpc soon, as it's in the msdnaa for free =)
/* I could have installed it long time ago, but I also was too lazy ;) */


Top
  
 
 Post subject: Re:X-OS 0.3.2
PostPosted: Fri Jul 02, 2004 1:29 pm 
Quote:
/* was too lazy to fire up bochs and press the buttons through the textmode config menu */

u can use bochs -q instead ;)


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 59 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