You are not logged in.
Hi, I thought that I would let you know that I'm still working hard on the OS, and yesterday I loaded the first
module/driver or whatever to call it. It just printed some status about itself on the screen from it's init function, like current CS, DS etc..
I'm going to debug my add_interrupt function now, to see if it can add it's own interrupt with some test functions.
I'm going to post a nice screenshot of my testdriver in a day or two.
When it all works ok, I can start porting bit's of the OS to this driver interface and continue on the VFS/FAT12 part so i don't need to include all drivers as binarys directly after the kernel..
/ Christoffer
Offline
Great to hear your making progress, look forward to the shots .
For Dex4u driver/module i am thinking about a using a something like "djca" made
http://dex.7.forumer.com/viewtopic.php? … mp;start=0
Keep us informed.
Offline
Excellent, here's my code, should be similar:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; AddISRToIDT - Adds an ISR to the IDT, then reloads the IDT. ;; ;; Assumptions: User has already turned off interrupts. ;; ;; Input: ESI = Address of ISR ;; EAX = The number of the IRQ to load ;; ;; Output: EDI = Address of previous ISR (not functioning yet) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; AddISRToIDT: mov ebx,eax ; Copy EAX into EBX mov eax,8 ; Place 8 into EAX mul ebx ; Multiply EAX by EBX to get offset of IRQ in IDT mov ebx,eax ; Copy EAX into EBX mov eax,IDTISRStart ; Load address of starting IRQ in IDT add eax,ebx ; Add offset of IRQ into EAX mov ecx,esi ; Place address of ISR into ECX mov [ds:eax],cx ; Copy lower 16 bits into IDT entry shr ecx,16 ; Move upper 16 bits into CX mov [ds:eax + 6],cx ; Copy upper 16 bits into IDT entry ret ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; AddExceptionToIDT - Adds an exception ISR to the IDT, then reloads the IDT. ;; ;; Assumptions: User has already turned off interrupts. ;; ;; Input: ESI = Address of ISR ;; EAX = The number of the Exception to load ;; ;; Output: EDI = Address of previous ISR (not functioning yet) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; AddExceptionToIDT: mov ebx,eax ; Copy EAX into EBX mov eax,8 ; Place 8 into EAX mul ebx ; Multiply EAX by EBX to get offset of IRQ in IDT mov ebx,eax ; Copy EAX into EBX mov eax,IDT ; Load address of starting IRQ in IDT add eax,ebx ; Add offset of IRQ into EAX mov ecx,esi ; Place address of ISR into ECX mov [ds:eax],cx ; Copy lower 16 bits into IDT entry shr ecx,16 ; Move upper 16 bits into CX mov [ds:eax + 6],cx ; Copy upper 16 bits into IDT entry ret
Hopefully this will give you some ideas, if you aren't already using something similar.
Good job, I can't wait to see what is happening with your OS.
I'm running at a turtle's pace since I'm moving. I'll keep looking at the sites so I can comment and such on the fly.
Keep us posted!
Offline
Yeah, my code is similar, but I also have the selector part as input, since BOS is more or less segmented..
Offline
bubach wrote:
Yeah, my code is similar, but I also have the selector part as input, since BOS is more or less segmented..
The selector is probably a good idea, it removes the assumption. I'll consider that myself.
Dex4u wrote:
Nice code smiddy and well commentated .
Thanks, I've been relooking at everything in my rebuild and commenting where it needs it, for clarity.
Offline
Pages: 1