>>> Continued from previous message
JG>SAVECHAR:
JG> MOV AH, 02h
JG> MOV BX, 00h
JG> MOV DH, 00h
JG> INT 10h
JG> MOV AH, 08h
JG> MOV BH, 00h
JG> INT 10h
JG> RET
JG>WRITECHAR:
JG> MOV BH, 00h
JG> MOV BL, 0F7h
JG> INT 10h
JG> RET
These two are very slow, and use the stack... not only do you have near CALLs
to slow it down, you have multiple calls to int 10h... My suggestion to
peed
this up is to use some REP MOVSWs, and eliminate most of the near CALLs...
also when you call the old Int 1C, you'll have to do a PUSHF before, since
he
IRET at the end of the previous interrupt routine will try to pop flags off
the stack after it pops CS & IP. Another trick you might try is this:
when you want to go back to the old Int 1C, do this:
PUSH CS:[OldInt1COffset]
PUSH CS:[OldInt1CSegment]
RETF
Then you'd let it do the IRET part, and it would think it was called directly
from the program, rather than from your interrupt.
OldInt1CPtr:
JG>OldInt1COffset DW ?
JG>OldInt1CSegment DW ?
JG>Char1 DW ?
JG>Char2 DW ?
JG>Char3 DW ?
JG>Char4 DW ?
JG>CursPos DW ?
RingStr: DB "RING"
JG>THEENDOFPROG DB ?
JG>END START
* OLX 2.2 * OXYMORON - Ferringi Research Vessel
--- PCBoard (R) v15.3/M 10
---------------
* Origin: Next time, Dial The Wrong Number! (209) 943-1880 (1:208/205)
|