home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / zsus / progpack / asciimp2.lbr / ASCIIMP2.Z80 < prev   
Encoding:
Text File  |  1992-05-13  |  3.4 KB  |  104 lines

  1. ; PROGRAM: ASCIIMP2.Z80
  2. ; AUTHOR:  Fred Haines
  3. ; DATE:    March 12, 1988
  4. ; PURPOSE: Prints ASCII chart to console screen.
  5. ;
  6. ; HISTORY: March 26, 1988 - Al Heynneman
  7. ;       added ORG to 100h
  8. ;       removed external print call
  9. ;       added BDOS print calls
  10. ;       added extra ctrl char info in header
  11. ;       removed extra LF at end
  12. ;       restructured file
  13. ;       added appropriate labels
  14. ;
  15. ;-------------------------------
  16. ; equates
  17. ;-------------------------------
  18. CR    EQU    0DH
  19. LF    EQU    0AH
  20. ESC    EQU    1BH
  21. BDOS    EQU    05H
  22.  
  23. ;-------------------------------
  24. ; start
  25. ;-------------------------------
  26.     ORG    100H
  27. ;
  28.     LD    C,09H        ; DOS print string function
  29.     LD    DE,CLS        ; load clear screen string address
  30.     CALL    BDOS
  31.  
  32. ;-------------------------------
  33. ; print screen
  34. ;-------------------------------
  35.     LD    C,09H
  36.     LD    DE,TBL1
  37.     CALL    BDOS
  38. ;
  39.     LD    C,02H
  40.     LD    E,24H
  41.     CALL    BDOS
  42. ;
  43.     LD    C,09H
  44.     LD    DE,TBL2
  45.     CALL    BDOS
  46. ;
  47.     RET
  48.  
  49. ;-------------------------------
  50. ; clear screen string 
  51. ;-------------------------------
  52. CLS:
  53.     DB    ESC,'*$'    ; two bytes, terminated with $ 
  54.  
  55. ;-------------------------------
  56. ; ascii table
  57. ;-------------------------------
  58. TBL1:
  59.     DB    '+------------+---------------------------------------------------------------+',CR,LF
  60.     DB    '| binary     |    0       1      2       3   '
  61.     DB    '    4(0)    5(1)    6       7   |',CR,LF
  62.     DB    '+------+-----+---------------------------------------------------------------+',CR,LF
  63.     DB    '| 0000 |  0  |   NUL     DLE     SP      0   '
  64.     DB    '    @       P       `       p   |',CR,LF
  65.     DB    '| 0001 |  1  |   SOH     DC1     !       1   '
  66.     DB    '    A       Q       a       q   |',CR,LF
  67.     DB    '| 0010 |  2  |   STX     DC2     "       2   '
  68.     DB    '    B       R       b       r   |',CR,LF
  69.     DB    '| 0011 |  3  |   ETX     DC3     #       3   '
  70.     DB    '    C       S       c       s   |',CR,LF
  71.     DB    '| 0100 |  4  |   EOT     DC4     $'
  72. TBL2:
  73.     DB    '       4   '
  74.     DB    '    D       T       d       t   |',CR,LF
  75.     DB    '| 0101 |  5  |   ENQ     NAK     %       5   '
  76.     DB    '    E       U       e       u   |',CR,LF
  77.     DB    '| 0110 |  6  |   ACK     SYN     &       6   '
  78.     DB    '    F       V       f       v   |',CR,LF
  79.     DB    '| 0111 |  7  |   BEL     ETB     ''       7    '
  80.     DB    '   G       W       g       w   |',CR,LF
  81.     DB    '| 1000 |  8  |   BS      CAN     (       8   '
  82.     DB    '    H       X       h       x   |',CR,LF
  83.     DB    '| 1001 |  9  |   HT      EM      )       9   '
  84.     DB    '    I       Y       i       y   |',CR,LF
  85.     DB    '| 1010 |  A  |   LF      SUB     *       :   '
  86.     DB    '    J       Z       j       z   |',CR,LF
  87.     DB    '| 1011 |  B  |   VT      ESC     +       ;   '
  88.     DB    '    K       [       k       {   |',CR,LF
  89.     DB    '| 1100 |  C  |   FF      FS      ,       <   '
  90.     DB    '    L       \       l       |   |',CR,LF
  91.     DB    '| 1101 |  D  |   CR      GS      -       =   '
  92.     DB    '    M       ]       m       }   |',CR,LF
  93.     DB    '| 1110 |  E  |   SO      RS      .       >   '
  94.     DB    '    N       ^       n       ~   |',CR,LF
  95.     DB    '| 1111 |  F  |   SI      US      /       ?   '
  96.     DB    '    O       -       o      DEL  |',CR,LF
  97.     DB    '+------+-----+---------------------------------------------------------------+',CR,LF
  98.     DB    '  Hex code equals column/row position.  Control'
  99.     DB    ' characters - change column 4',CR,LF
  100.     DB    '  codes to 0, column 5 codes to 1.  Combine 2'
  101.     DB    ' binary nybbles to make a byte.',CR
  102.     DB    '$'
  103. ;
  104.     END