ramyadhadidi
Junior Member level 1
Programming hardware interrupts
I'm wirting a program that needs UART chip on PC. I want to service UART in ISR.
I run my program in VMware on DOS. And my program can read serial data using polling method(COM1). So data is comming. But My program dont jump to ISR.
I put my code here,
thanks for your help
I also check IRQ addresses with MSD.exe. All of them is changed to my program ISR.
I think no Interrupt is enabled.
please help
I'm wirting a program that needs UART chip on PC. I want to service UART in ISR.
I run my program in VMware on DOS. And my program can read serial data using polling method(COM1). So data is comming. But My program dont jump to ISR.
I put my code here,
thanks for your help
Code:
INI_UART_COM1 MACRO
;intialization of uart COM1
;maped to 3F8H and IRQ4 (I.V.T add=C)
;set dlab=1
MOV DX,3FBH
MOV AL,10000000B
OUT DX,AL
;set devisors (64)(10800 buad rate)
MOV DX,3F8H
MOV AL,40H
OUT DX,AL
MOV DX,3F9H
MOV AL,00H
OUT DX,AL
;clr dlab-no parity-1stop-8bit data
MOV DX,3FBH
MOV AL,00000011B
OUT DX,AL
;set interupt for reci. data
MOV DX,3F9H
MOV AL,0000_0001B
OUT DX,AL
ENDM
INI_UART_COM2 MACRO
;intialization of uart COM2
;maped to 3F8H and IRQ3 (I.V.T add=B)
;set dlab=1
MOV DX,2FBH
MOV AL,10000000B
OUT DX,AL
;set devisors (64)(10800 buad rate)
MOV DX,2F8H
MOV AL,40H
OUT DX,AL
MOV DX,2F9H
MOV AL,00H
OUT DX,AL
;clr dlab-no parity-1stop-8bit data
MOV DX,2FBH
MOV AL,00000011B
OUT DX,AL
;set interupt for reci. data
MOV DX,2F9H
MOV AL,01H
OUT DX,AL
ENDM
;;my code without begining!!
IN AL,21H
AND AL,1110_0111B
OUT 21H,AL
INI_UART_COM1
INI_UART_COM2
;SET IVT TABLE
MOV AX,0000H
MOV ES,AX
MOV WORD PTR ES:[0030H],OFFSET COM1_INT
MOV WORD PTR ES:[0032H],SEG COM1_INT
MOV WORD PTR ES:[002CH],OFFSET COM2_INT
MOV WORD PTR ES:[002EH],SEG COM2_INT
MOV AH,02H
MOV DL,CR
INT 21H
STI
MOO: NOP
JMP MOO
COM1_INT PROC FAR
MOV AH,02H
MOV DL,'r'
INT 21H
MOV DX,3F8H
IN AL,DX
MOV AH,02H
MOV DL,AL
INT 21H
MOV AL,20H
OUT 20H,AL
JMP COM1_INT
COM1_NO_INT: STI
IRET
COM1_INT ENDP
I also check IRQ addresses with MSD.exe. All of them is changed to my program ISR.
I think no Interrupt is enabled.
please help
Last edited: