JG>Hello All!
JG>This is the second posting of this program, and it works fine now, until
t
JG>starts to ring. It locks the computer up...
That doesn't surprise me. Your three biggest problems are still there:
1. You're assuming DS will stay the same, which is NOT necessarily true,
especially in a timer interrupt.
2. You're not saving any of the registers you use... a timer interrupt is
often called from the middle of a program, which expects the registers to
tay
the same... only interrupts which are never caused by the hardware can skip
saving the registers.
3. You're using int 10h calls for single characters, which is too slow for
se
in the timer interrupt... see my previous message re using REP MOVSW
JG> MOV DX, OFFSET ENDOFPROG+1
JG> int 27h ; terminate stay resident
My "PC Interrupts" book (by Ralf Brown & Jim Kyle) lists this as an obsolete
call... it suggests using int 21h function 31h instead (DX is the number of
16-byte paragraphs to keep, so you can just do a SHR DX, 4 (if smart code
generation is turned on, it'll automatically assemble as 4 SHR DX, 1
instructions in 8086 mode)
* OLX 2.2 * Bureaucracy: That place always in need of a laxative.
--- PCBoard (R) v15.3/M 10
---------------
* Origin: Next time, Dial The Wrong Number! (209) 943-1880 (1:208/205)
|