home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / assemblr / library / nor_asm / cursor17.asm < prev    next >
Assembly Source File  |  1989-05-16  |  2KB  |  70 lines

  1. CR    EQU    13            ;Carriage return
  2. LF    EQU    10            ;Line feed
  3.  
  4. .MODEL    SMALL
  5. .CODE
  6.  
  7.     PUBLIC    CLEAR_SCREEN
  8. ;-----------------------------------------------------------------------;
  9. ; This procedure clears the entire screen.                ;
  10. ;-----------------------------------------------------------------------;
  11. CLEAR_SCREEN    PROC
  12.     PUSH    AX
  13.     PUSH    BX
  14.     PUSH    CX
  15.     PUSH    DX
  16.     XOR    AL,AL            ;Blank entire window
  17.     XOR    CX,CX            ;Upper left corner is at (0,0)
  18.     MOV    DH,24            ;Bottom line of screen is line 24
  19.     MOV    DL,79            ;Right side is at column 79
  20.     MOV    BH,7            ;Use normal attribute for blanks
  21.     MOV    AH,6            ;Call for SCROLL-UP function
  22.     INT    10h            ;Clear the window
  23.     POP    DX
  24.     POP    CX
  25.     POP    BX
  26.     POP    AX
  27.     RET
  28. CLEAR_SCREEN    ENDP
  29.  
  30.  
  31.     PUBLIC    GOTO_XY
  32. ;-----------------------------------------------------------------------;
  33. ; This procedure moves the cursor                    ;
  34. ;                                    ;
  35. ; On entry:    DH    Row (Y)                        ;
  36. ;        DL    Column (X)                    ;
  37. ;-----------------------------------------------------------------------;
  38. GOTO_XY        PROC
  39.     PUSH    AX
  40.     PUSH    BX
  41.     MOV    BH,0            ;Display page 0
  42.     MOV    AH,2            ;Call for SET CURSOR POSITION
  43.     INT    10h
  44.     POP    BX
  45.     POP    AX
  46.     RET
  47. GOTO_XY        ENDP
  48.  
  49.     PUBLIC    SEND_CRLF
  50. ;-----------------------------------------------------------------------;
  51. ; This routine just sends a carriage return-line feed pair to the    ;
  52. ; display, using the DOS routines so that scrolling will be handled    ;
  53. ; correctly.                                ;
  54. ;-----------------------------------------------------------------------;
  55. SEND_CRLF    PROC
  56.     PUSH    AX
  57.     PUSH    DX
  58.     MOV    AH,2
  59.     MOV    DL,CR
  60.     INT    21h
  61.     MOV    DL,LF
  62.     INT    21h
  63.     POP    DX
  64.     POP    AX
  65.     RET
  66. SEND_CRLF    ENDP
  67.  
  68.  
  69.     END
  70.