I followed Bran's kernel development tutorial from http://www.osdever.net/bkerndev/Docs/whatsleft.htm. I changed file "start.asm" in nasm to my own loader in gas. I also made other changes.
The problem is that the kernel can only print out a hello message. The interrupt and exception handlers are not working. Normally, the "timer_handler" should be called in every second and print out messages.
Don't know how to debug this problem. Have been spending a long time on it. Can you please help with this problem? I included my source code in a tar file.
Thanks!!!
Need help with my kernel
Need help with my kernel
- Attachments
-
- mini-kernel.tar.gz
- (11.07 KiB) Downloaded 57 times
yep, or you could do pushw.fei wrote:When I convert nasm to gas, one problem is that I cannot convert "push byte 0" in nasm to "pushb $0" in gas. The as compiler always complains. So, I had to change "pushb $0" to "push $0". Is this right??
Author of COBOS
-
- 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:
I converted Bran's tutorial to GAS syntax. PM me if you want some help ![Very Happy :D](./images/smilies/icon_biggrin.gif)
The ISR/IRQ stubs are like so:
Good luck ![Very Happy :D](./images/smilies/icon_biggrin.gif)
![Very Happy :D](./images/smilies/icon_biggrin.gif)
The ISR/IRQ stubs are like so:
Code: Select all
# 0: Divide By Zero Exception
isr0:
cli
pushl $0
pushl $0
jmp isr_common_stub
![Very Happy :D](./images/smilies/icon_biggrin.gif)