home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / ZCPR2 / VFSC.AQM / VFSC.ASM
Assembly Source File  |  2000-06-30  |  2KB  |  80 lines

  1. ;  MODULE:  VFILERSC
  2. ;  AUTHOR:  RICHARD CONN
  3. ;  VERSION:  1.0
  4. ;  DATE:  18 July 83
  5. ;  PREVIOUS VERSIONS:  None
  6. ;  NOTE:  This is the patch file for VFILER.  It allows the user to install
  7. ;    his terminal-specific function routines.  This file is to be assembled
  8. ;    by the user and integrated into VFILER.COM via DDT.  Once complete,
  9. ;    VFILER must be installed further via GENINS.
  10. ;
  11.  
  12. ;
  13. ;  An entry point to send the character in A to the screen is provided at
  14. ;  location 300H in VFILER.  No registers are affected by calling the
  15. ;  routine at this address.
  16. ;
  17. TYPE    EQU    300H
  18.  
  19. ;
  20. ;  Special ASCII Characters Used
  21. ;
  22. ESC    EQU    1BH
  23. CTRLZ    EQU    'Z'-'@'
  24. UP    EQU    'K'-'@'        ; user-defined cursor up
  25. DOWN    EQU    'V'-'@'        ; user-defined cursor down
  26. RIGHT    EQU    'L'-'@'        ; user-defined cursor right
  27. LEFT    EQU    'H'-'@'        ; user-defined cursor left
  28. SCR$FOR    EQU    'F'-'@'        ; user-defined screen forward
  29. SCR$BAC    EQU    'A'-'@'        ; user-defined screen backward
  30.  
  31. ;
  32. ;  The following JUMP Table MUST be located at 200H in VFILER.  This accesses
  33. ;  the required routines.
  34. ;
  35.     ORG    200H        ; base page for screen routines
  36.     JMP    CLS        ; clear screen on CRT
  37.     JMP    GOTOXY        ; position cursor at row/col
  38.     JMP    EREOL        ; erase to end of line
  39.  
  40. ;
  41. ;  The following table is copied by VFILER on startup to define the special
  42. ;  characters generated by arrow keys on the user's terminal for cursor
  43. ;  movement.  This table is for the TVI 950.  If you do not wish to set
  44. ;  additional definitions, set all of these values to '@'.
  45. ;
  46.     DB    UP,DOWN,RIGHT,LEFT    ;cursor up, down, right, left
  47.     DB    SCR$FOR,SCR$BAC        ;screen forward, backward
  48.  
  49. ;
  50. ; Screen Routines (for TVI 950)
  51. ;   The following are sample routines implemented for the TVI 950.
  52. ;
  53.  
  54. ;  clear screen
  55. CLS:
  56.     MVI    A,CTRLZ        ;clear screen
  57.     JMP    TYPE
  58.  
  59. ;  position cursor (H=row, L=col) where 1,1=upper left
  60. GOTOXY:
  61.     MVI    A,ESC        ;ESCape
  62.     CALL    TYPE
  63.     MVI    A,'='
  64.     CALL    TYPE
  65.     MOV    A,H        ;row
  66.     ADI    ' '
  67.     CALL    TYPE
  68.     MOV    A,L        ;column
  69.     ADI    ' '
  70.     JMP    TYPE
  71.  
  72. ;  erase to end of line (output 50 spaces if you don't have this function)
  73. EREOL:
  74.     MVI    A,ESC        ;ESCape
  75.     CALL    TYPE
  76.     MVI    A,'T'
  77.     JMP    TYPE
  78.  
  79.     END
  80.