>>> Continued from previous message
;[LOADSCREEN]--------------------------------------------------------------
; Restores the current text screen from the previously saved buffer.
LoadScreen PROC
mov SI,offset buffer ;SI = offset of source buffer
xor DI,DI ;zero out destination index
mov CX,2048 ;CX = 4096 / 2 WORDS data to copy
rep movsw ;copy BUFFER back to RAM
ret
LoadScreen ENDP
;[SNIP]--------------------------------------------------------------------
; ALL code and data upto this point is kept resident in memory.
SNIP:
;[MAIN]--------------------------------------------------------------------
; Starting point of program after jump from initial entry above.
main PROC
mov AH,34h ;DOS - Get INDOS Address
int DOS ;DOS - call interrupt to get pointer
mov word ptr [InDOS][2],ES ;save segment (ES) in memory
mov word ptr [InDOS][0],BX ;save segment (BX) in memory
inc AH ;DOS - Get Interrupt Vector
mov AL,15h ;AL = interrupt vector to get
int DOS ;DOS - call interrupt to get vector
mov word ptr [OldCas][2],ES ;save segment (ES) in memory
mov word ptr [OldCas][0],BX ;save segment (BX) in memory
sub AH,10h ;DOS - Set Interrupt Vector
mov DX,offset NewCas ;DS:DX -> new interrupt handler
int DOS ;DOS - call interrupt to set vector
mov DX,offset SNIP ;ALL code/data upto SNIP is kept
mov CL,04h ;shift count of 4 to convert
shr DX,CL ;into paragraphs (DX/16)
inc DX ;plus one more to round up
mov AX,3100h ;DOS - TSR Program With Code (0)
int DOS ;DOS - call interrupt to leave
esident
main ENDP
PRG ENDS
END START
* OLX 2.1 TD * Unable to locate Coffee -- Operator Halted!
--- Maximus/2 3.01
---------------
* Origin: Frog Hollow Port Moody BC 604-469-0264/0284 (1:153/290)
|