home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / xbase / library / clipper / rettig / source / cursor.asm < prev    next >
Assembly Source File  |  1990-10-21  |  2KB  |  92 lines

  1. ; CURSOR.ASM
  2. ;
  3. ; by Ralph Davis
  4. ; modified by Leonard Zerman
  5. ;
  6. ; Placed in the public domain by Tom Rettig Associates, 10/22/1990.
  7. ;
  8.  
  9.             PUBLIC    CURSOR
  10.  
  11.             PAGE      66,132
  12. ;************************************************
  13. CURSOR_TEXT SEGMENT BYTE PUBLIC 'CODE'
  14.          ASSUME   CS:CURSOR_TEXT,DS:CURSOR_TEXT
  15. ;------------------------------------------------
  16. CURSOR      PROC      FAR
  17.             PUSH      BP
  18.             MOV       BP,SP
  19.             JMP       CONTINUE
  20. ;          
  21. MESSAGE1    DB        'ON',0
  22. MESSAGE2    DB        'OFF',0
  23. ;
  24. CONTINUE:   PUSH      AX
  25.             PUSH      BX
  26.             PUSH      CX
  27.             PUSH      DX
  28.             PUSH      DS
  29.             PUSH      ES
  30.             PUSH      SI
  31.             PUSH      DI
  32.             LDS       SI,[BP+6]
  33.             PUSH      SI
  34.             MOV       CX,3
  35. CNVTUPPER:
  36.             CMP       BYTE PTR [SI],0
  37.             JE        CHECK_PARM
  38.             CMP       BYTE PTR [SI],'a'
  39.             JL        LOOP_BACK
  40.             CMP       BYTE PTR [SI],'z'
  41.             JG        LOOP_BACK
  42.             AND       BYTE PTR [SI],0DFH
  43. LOOP_BACK:  INC       SI
  44.             LOOP      CNVTUPPER
  45. CHECK_PARM:
  46.             POP       SI
  47.             PUSH      CS
  48.             POP       ES
  49.             PUSH      SI
  50.             PUSH      DI
  51.             MOV       CX,3
  52.             MOV       DI,OFFSET CS:MESSAGE1
  53. REPE        CMPSB
  54.             POP       DI
  55.             POP       SI
  56.             JCXZ      TURN_ON
  57.             PUSH      SI
  58.             PUSH      DI
  59.             MOV       CX,4
  60.             MOV       DI, OFFSET CS:MESSAGE2
  61. REPE        CMPSB
  62.             POP       DI
  63.             POP       SI
  64.             JCXZ      TURN_OFF
  65.             JMP       EXIT
  66. ;
  67. TURN_ON:    INT       11H
  68.             MOV       CX,0B0CH
  69.             TEST      AL,10H
  70.             JNZ       CALL_ROM
  71.             MOV       CX,0607H
  72.             JMP       CALL_ROM
  73. TURN_OFF:   MOV       CX,3000H
  74. CALL_ROM:   MOV       AH,1
  75.             INT       10H
  76. EXIT:       POP       DI
  77.             POP       SI
  78.             POP       ES
  79.             POP       DS
  80.             POP       DX
  81.             POP       CX
  82.             POP       BX
  83.             POP       AX
  84.             POP       BP
  85.             RET
  86. CURSOR      ENDP
  87. ;------------------------------------------
  88. CURSOR_TEXT       ENDS
  89. ;******************************************
  90.             END
  91.  
  92.