Guest_imported
New member
- Jan 1, 1970
- 0
Hi there,
For the past one week or so, I have been stumped, really stumped! I am working on a very simple comport file transfer program using assembly. The program uses a circular buffer. Part of the program loads the data from the harddisk using DOS INT 21H, while the serial port ISR transfers the data from the circular buffer to the UART FIFO. The receiver side does similar things, except in reverse order.
So, my program loops this way (simplified form):
L1:
MOV AH, 3FH ;function to read file.
MOV BX, FILEHANDLE
MOV CX, Number_of_bytes_to_read
INT 21H
; Does other things here.
JMP L1
I find that the serial port interrupts usually stop after sometime, although file still not transmitted fully and I didn't disable interrupts. The program is not hanged as I still can exit. So what is the problem?
I figure that the DOS software interrupt use to load data from harddisk may somehow cause problem (but exactly what I dunno). So I disable the INT 21H, (nevermind if the program is just sending nonsense) and the serial port interrupts proceeded forth successfully enough.
I really hope to hear from anybody.
Thanks.
For the past one week or so, I have been stumped, really stumped! I am working on a very simple comport file transfer program using assembly. The program uses a circular buffer. Part of the program loads the data from the harddisk using DOS INT 21H, while the serial port ISR transfers the data from the circular buffer to the UART FIFO. The receiver side does similar things, except in reverse order.
So, my program loops this way (simplified form):
L1:
MOV AH, 3FH ;function to read file.
MOV BX, FILEHANDLE
MOV CX, Number_of_bytes_to_read
INT 21H
; Does other things here.
JMP L1
I find that the serial port interrupts usually stop after sometime, although file still not transmitted fully and I didn't disable interrupts. The program is not hanged as I still can exit. So what is the problem?
I figure that the DOS software interrupt use to load data from harddisk may somehow cause problem (but exactly what I dunno). So I disable the INT 21H, (nevermind if the program is just sending nonsense) and the serial port interrupts proceeded forth successfully enough.
I really hope to hear from anybody.
Thanks.