when i do int 0x20
it do the following:
0xc00014e0 push 0
0xc00014e2 push 0x20
0xc00014e4 jmp stub
but when cpu ( i assume pic as i remapped to ) fire the interrupt it start from the following
0xc00014e2 push 0x20
0xc00014e4 jmp stub
it dont even push user ss, user esp on the stack in both case.
what is the problem.?
i am using bochs.
int 0x20 problem
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: int 0x20 problem
The processor only pushes SS/ESP on the stack when a privilege change occurs.
Re: int 0x20 problem
thanks combuster. but i dont understand when cpu do the interrupt, why it start from the second line
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: int 0x20 problem
I would assume that you have the base address in your IDT incorrect somehow
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: int 0x20 problem
I did hear some things about bochs and semi-broken breakpoints, and I see many more newbies use dated versions of that program. If you are using it, you can do a print-stack to see what's on it (and see if there's that push 0 has been performed inbetween). Similarly, you can verify thepowersgang's notion by asking bochs' debugger for "info idt".
In any case, the CPU will be doing what it was told to. Therefore, don't ask the CPU why, but yourself
In any case, the CPU will be doing what it was told to. Therefore, don't ask the CPU why, but yourself
Re: int 0x20 problem
strange behavior of bochs.
it is working now.
to combuster,
i had checked print-stack before i post it here.
i removed the code of masking the interrupts. then it is working. but i dont think that is the problem.
it is working now.
to combuster,
i had checked print-stack before i post it here.
i removed the code of masking the interrupts. then it is working. but i dont think that is the problem.