home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / screen / cursblok.arc / CURSOR.ASM < prev    next >
Encoding:
Assembly Source File  |  1987-12-26  |  2.6 KB  |  63 lines

  1. ; *-------------------------------------------------------------------
  2. ; [                        CURSOR.ASM
  3. ; [ Changes the cursor to a blinking block from a blinking underscore.
  4. ; *-------------------------------------------------------------------
  5. ; [ Copyright (c) 1986, Kurt Arthur,  All rights reserved.
  6. ; [                     Arthur Computer Associates
  7. ; [                     9256 Leith
  8. ; [                     St. Louis, MO 63134
  9. ; [                     (314) 427-8173
  10. ; [
  11. ; [ Note:  This code has been released for free public distribution.
  12. ; [        No charge may be assessed for this code.
  13. ; *-------------------------------------------------------------------
  14. ; [ Written by: Kurt Arthur            Date: January, 1986
  15. ; [
  16. ; [ Compiler:   Microsoft MASM, Version 4.0,  No options.
  17. ; [ Linker:     Microsoft LINK, Version 3.05, No options.
  18. ; [ Exe2bin:    Microsoft EXE2BIN, Vers 2.11, No options.
  19. ; *-------------------------------------------------------------------
  20. cseg segment
  21.          assume  cs:cseg,ds:cseg        ; required by MASM
  22.          org     100H                   ; all .COM files start here
  23.  
  24. start:
  25.          jmp     initialize             ; jump to the code that ends,
  26.                                         ; leaving the rest resident.
  27.  
  28. old_vector       dw 2 dup (?)           ; define a space for old cmd.
  29.  
  30. block_cursor     proc far               ; cursor change code
  31.          assume  cs:cseg,ds:cseg
  32.          sti
  33.          mov     cl,7                   ; cursor end   scan line.
  34.          mov     ch,0                   ; cursor start scan line.
  35.          mov     ah,1                   ; change the cursor.
  36.          int     10H                    ; invoke video interrupt
  37.          iret
  38. block_cursor     endp
  39.  
  40. initialize:                             ; memory residence code
  41.          mov     bx,cs
  42.          mov     ds,bx
  43.          mov     al,28H                 ; timer click interrupt
  44.          mov     ah,35H                 ; get vector function
  45.          int     21H                    ; function request
  46.          mov     old_vector,bx          ; save old vector in variable.
  47.          mov     old_vector[2],es
  48.  
  49.          mov     bx,cs
  50.          mov     ds,bx
  51.          mov     dx,offset block_cursor
  52.          mov     al,28H                 ; timer click interrupt
  53.          mov     ah,25H                 ; set vector function
  54.          int     21H                    ; function request
  55.  
  56.          mov     bx,cs
  57.          mov     ds,bx
  58.          mov     dx,offset initialize
  59.          int     27H                    ; terminate, remain resident
  60.  
  61. cseg     ends
  62.          end start
  63.