Autor Thema: Interrupts funktionieren nicht:(  (Gelesen 2565 mal)

jeb

  • Beiträge: 341
    • Profil anzeigen
    • http://www.jebdev.net
Gespeichert
« am: 03. April 2005, 14:10 »
Hab schon etliche Fehler korrigiert aber meine Interrupts funzen immer noch nicht:(

mov ax,1000h
mov ds,ax
mov es,ax

start:
mov si,msg
mov al,0x01
int 0x21
mov si,msg_clear
mov al,0x01
int 21h
mov si,msg_os1
mov al,0x01
int 21h
mov si,msg_os2
mov al,0x01
int 21h
mov si,msg_os3
call putstr
mov si,msg_os4
call putstr
mov si,msg_os5
call putstr
mov si,msg_os6
call putstr
mov si,msg_os7
call putstr
mov si,msg_os8
call putstr
mov si,msg_os9
call putstr
mov si,msg_os0
call putstr
mov si,msg_clear
call putstr
mov si,msg_boot
call putstr
call getkey
jmp reboot

msg db "                           Jeremia B",132,"r pr",132,"sentiert:",13,10,0
msg_boot db "                    Diskette entnehmen und Taste dr",129,"cken....",13,10,0
msg_clear db 13,10,0
msg_os1 db "                11111                       1       111   11111",13,10,0
msg_os2 db "                1                           1      11 11  1    ",13,10,0
msg_os3 db "                1                           1      1   1  1    ",13,10,0
msg_os4 db "                1                           1   1  1   1  1    ",13,10,0
msg_os5 db "                1111                        1  11  1   1  1    ",13,10,0
msg_os6 db "                1      1 111  11111  1111   1 11   1   1  11111",13,10,0
msg_os7 db "                1      111 1  1   1  1  11  111    1   1      1",13,10,0
msg_os8 db "                1      1      11111  1   1  1 11   1   1      1",13,10,0
msg_os9 db "                1      1      1      1 111  1  11  11 11      1",13,10,0
msg_os0 db "                1      1      11111  111 1  1   1   111   11111",13,10,0

;Interrupts anmelden

push dx
push es
xor ax,ax
mov es,ax
cli
mov word [es:0x21*4],_int0x21
mov [es:0x21*4+2],cs
sti
pop es
pop dx

;Die Interrupts

_int0x21:

_int0x21_ser0x01:
cmp al,0x01
jne _int0x21_end
_int0x21_ser0x01_start:
lodsb
or al,al
jz _int0x21_ser0x01_end
mov ah,0x0e
mov bx,0x0007
int 0x10
jmp _int0x21_ser0x01_start
_int0x21_ser0x01_end:
jmp _int0x21_end

_int0x21_end:
iret

putstr:
lodsb
or al,al
jz short putstrd
mov ah,0x0e
mov bx,0x0007
int 0x10
jmp putstr
putstrd:
retn

getkey:
mov ah,0
int 016h
ret

reboot:
db 0eah
dw 0000h
dw 0ffffh

mfg
jeb

joachim_neu

  • Beiträge: 1 228
    • Profil anzeigen
    • http://www.joachim-neu.de
Gespeichert
« Antwort #1 am: 03. April 2005, 14:13 »
du musst den anmeldecode wohin machen, wo er auch ausgeführt wird, also noch vor dieses call getkey.
http://www.joachim-neu.de | http://www.orbitalpirates.de | http://www.middleageworld.de

System: 256 RAM, GeForce 2 MX 400, AMD Athlon XP 1600+, Windows XP, 1x Diskette, 1x DVD-ROM, 1x CD-R(W) Brenner,...

jeb

  • Beiträge: 341
    • Profil anzeigen
    • http://www.jebdev.net
Gespeichert
« Antwort #2 am: 03. April 2005, 14:22 »
au ja, super.
jetzt hab ich noch in einem thread gelesen, dass man im pm keine bios interrupts mehr ausführen kann. Macht man das dort dann mit diesem VideoMem im C-Kernel?

joachim_neu

  • Beiträge: 1 228
    • Profil anzeigen
    • http://www.joachim-neu.de
Gespeichert
« Antwort #3 am: 03. April 2005, 14:23 »
ja, da muss man direkt in den videospeicher schreiben
http://www.joachim-neu.de | http://www.orbitalpirates.de | http://www.middleageworld.de

System: 256 RAM, GeForce 2 MX 400, AMD Athlon XP 1600+, Windows XP, 1x Diskette, 1x DVD-ROM, 1x CD-R(W) Brenner,...

 

Einloggen