home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
xbase
/
library
/
clipper
/
rettig
/
source
/
cursor.asm
< prev
next >
Wrap
Assembly Source File
|
1990-10-21
|
2KB
|
92 lines
; CURSOR.ASM
;
; by Ralph Davis
; modified by Leonard Zerman
;
; Placed in the public domain by Tom Rettig Associates, 10/22/1990.
;
PUBLIC CURSOR
PAGE 66,132
;************************************************
CURSOR_TEXT SEGMENT BYTE PUBLIC 'CODE'
ASSUME CS:CURSOR_TEXT,DS:CURSOR_TEXT
;------------------------------------------------
CURSOR PROC FAR
PUSH BP
MOV BP,SP
JMP CONTINUE
;
MESSAGE1 DB 'ON',0
MESSAGE2 DB 'OFF',0
;
CONTINUE: PUSH AX
PUSH BX
PUSH CX
PUSH DX
PUSH DS
PUSH ES
PUSH SI
PUSH DI
LDS SI,[BP+6]
PUSH SI
MOV CX,3
CNVTUPPER:
CMP BYTE PTR [SI],0
JE CHECK_PARM
CMP BYTE PTR [SI],'a'
JL LOOP_BACK
CMP BYTE PTR [SI],'z'
JG LOOP_BACK
AND BYTE PTR [SI],0DFH
LOOP_BACK: INC SI
LOOP CNVTUPPER
CHECK_PARM:
POP SI
PUSH CS
POP ES
PUSH SI
PUSH DI
MOV CX,3
MOV DI,OFFSET CS:MESSAGE1
REPE CMPSB
POP DI
POP SI
JCXZ TURN_ON
PUSH SI
PUSH DI
MOV CX,4
MOV DI, OFFSET CS:MESSAGE2
REPE CMPSB
POP DI
POP SI
JCXZ TURN_OFF
JMP EXIT
;
TURN_ON: INT 11H
MOV CX,0B0CH
TEST AL,10H
JNZ CALL_ROM
MOV CX,0607H
JMP CALL_ROM
TURN_OFF: MOV CX,3000H
CALL_ROM: MOV AH,1
INT 10H
EXIT: POP DI
POP SI
POP ES
POP DS
POP DX
POP CX
POP BX
POP AX
POP BP
RET
CURSOR ENDP
;------------------------------------------
CURSOR_TEXT ENDS
;******************************************
END