Beiträge anzeigen

Diese Sektion erlaubt es dir alle Beiträge dieses Mitglieds zu sehen. Beachte, dass du nur solche Beiträge sehen kannst, zu denen du auch Zugriffsrechte hast.


Themen - urx_

Seiten: [1]
1
Lowlevel-Coding / der tastatur-int geht nicht
« am: 27. April 2005, 18:40 »
hallo,
ich habe mal wieder ein problem mit meinem OS. und zwar wird der keyboard interrupt (0x21) nicht ausgelöst. die idt selbst ist denke ich nicht fehlerhaft, weil die exceptions aufgerufen werden.
hier einmal ein paar ausschnitte aus dem source (bitte nicht an den kommentaren stören lassen):

meine IDT

macro idtEntry func ; <- Tight
{
 dw (func and 0xFFFF)        
 dw codesel
 db 0
 db 0x8E
 dw (func shr 16)      
}


idt_pointer:
 dw idt_end - idt_start - 1
 dd idt_start


idt_start:
 idtEntry u_isr ; 00. Interrupt (exception)
 idtEntry u_isr ; 01. Interrupt (exception)
 idtEntry u_isr ; 02. Interrupt (exception)
 idtEntry u_isr ; 03. Interrupt (exception)
 idtEntry u_isr ; 04. Interrupt (exception)
 idtEntry u_isr ; 05. Interrupt (exception)
 idtEntry u_isr ; 06. Interrupt (exception)
 idtEntry u_isr ; 07. Interrupt (exception)
 idtEntry u_isr ; 08. Interrupt (exception)
 idtEntry u_isr ; 09. Interrupt (exception)
 idtEntry u_isr ; 0A. Interrupt (exception)
   idtEntry u_isr ; 0B. Interrupt (exception)
 idtEntry u_isr ; 0C. Interrupt (exception)
 idtEntry u_isr ; 0D. Interrupt (exception)
 idtEntry u_isr ; 0E. Interrupt (exception)
 idtEntry u_isr      ; 0F. Interrupt (exception)
 idtEntry u_isr ; 10. Interrupt (exception)
 idtEntry u_isr ; 11. Interrupt (exception)
 idtEntry u_isr ; 12. Interrupt (exception)
 idtEntry u_isr ; 13. Interrupt (exception)
   idtEntry u_isr ; 14. Interrupt (exception)
 idtEntry u_isr ; 15. Interrupt (exception)
 idtEntry u_isr ; 16. Interrupt (exception)
 idtEntry u_isr ; 17. Interrupt (exception)
 idtEntry u_isr ; 18. Interrupt (exception)
 idtEntry u_isr ; 19. Interrupt (exception)
 idtEntry u_isr ; 1A. Interrupt (no good)
 idtEntry u_isr ; 1B. Interrupt (no good)
 idtEntry u_isr ; 1C. Interrupt (no good)
 idtEntry u_isr ; 1D. Interrupt (no good)
 idtEntry u_isr ; 1E. Interrupt (no good)
 idtEntry u_isr ; 1F. Interrupt (no good)
 idtEntry isr20 ; 20. Interrupt (timer)
 idtEntry isr21 ; 21. Interrupt (keyboard)
 idtEntry donothing ; 22. stupid shit
 idtEntry donothing            ; 23. "
 idtEntry donothing            ; 24. "
 idtEntry donothing ; 25. "
 idtEntry donothing ; 26. "
 idtEntry donothing ; 27. "
 idtEntry donothing ; 28. "
 idtEntry donothing ; 29. "
 idtEntry donothing ; 2A. "
 idtEntry donothing ; 2B. "
 idtEntry donothing ; 2C. "
 idtEntry donothing ; 2D. "
 idtEntry donothing ; 2E. "
 idtEntry donothing ; 2F. "
 idtEntry donothing ; 30. "
 idtEntry donothing ; 31. "
 idtEntry isr32 ; 32. Interrupt (my own (roflrofl))
idt_end:


die keyboard-isr:

isr21:
 push    esi
 push    eax
 push  gs
 push  fs
 push  ds
 push  es
 
 xor     al, al
 div     al
 xor     eax, eax
 in      al, 0x60
 mov     esi, kit ; I love blood
 mov     al, 0x07 ; in grey
 call    print_text ; kill
 mov     al, 0x20
 out     0x20, al
 
 pop  es
 pop  ds
 pop  fs
 pop  gs
 pop     eax
 pop     esi
 iret


das remappen von den pics:

remap_pics:
 push    eax
 push    ebx
 push    ecx
 
 ; ICW 1
 mov     al, 0x11
 out     0x20, al
 out     0xA0, al
 
 ; ICW 2
 mov     al, 0x20 ; Pic1, isr0 - isr7  TO int0x20 - int0x27
 out     0x21, al    
 
 mov     al, 0x28 ; Pic2, isr8 - isr15 TO int0x28 - int0x30
 out     0xA1, al
 
 ; ICW 3
 mov     al, 0x04
 out     0x21, al
 
 mov     al, 0x02
 out     0xA1, al
 
 ; ICW 4
 mov     al, 0x01
 out     0x21, al
 out     0xA1, al
 
 
 pop     ecx
 pop     ebx
 pop     eax
 ret


edit:
hab doch glatt vergessen, das an-/ausschalten von den irqs mit zu senden
hier:

; Disable all Irqs
disable_irqs:
 push    eax
 
 mov     al, 0xFF
 out     0x21, al
 out     0xA1, al
 
 pop     eax
 ret

; Enable all Irqs
enable_irqs:
 push    eax
 
 mov     al, 0x00
 out     0x21, al
 out     0xA1, al
 
 pop     eax
 ret


so, das wars schon, ich hoffe ihr könnt mir helfen
mfg
2
Lowlevel-Coding / IDT und fehler
« am: 31. March 2005, 19:34 »
hallo,
ich habe ein mehr oder weniger kleines problem mit meinem OS.
ich erstelle die IDT zr laufzeit (in c), damit ich sie nicht im kernel rumschleppen muss. wenn ich nach dem laden die interrupts wieder aktivieren will, startet sich der pc neu und bochs sagt mir
exception(): 3rd (14) exception with no resolution, shutdown status is 00h, resetting
jetzt weiss ich nicht woher das kommt und wie ich es beheben kann und
hoffe, dass ihr mir helfen könnt

mfg
Seiten: [1]

Einloggen