home *** CD-ROM | disk | FTP | other *** search
- ; PROGRAM: ASCIIMP2.Z80
- ; AUTHOR: Fred Haines
- ; DATE: March 12, 1988
- ; PURPOSE: Prints ASCII chart to console screen.
- ;
- ; HISTORY: March 26, 1988 - Al Heynneman
- ; added ORG to 100h
- ; removed external print call
- ; added BDOS print calls
- ; added extra ctrl char info in header
- ; removed extra LF at end
- ; restructured file
- ; added appropriate labels
- ;
- ;-------------------------------
- ; equates
- ;-------------------------------
- CR EQU 0DH
- LF EQU 0AH
- ESC EQU 1BH
- BDOS EQU 05H
-
- ;-------------------------------
- ; start
- ;-------------------------------
- ORG 100H
- ;
- LD C,09H ; DOS print string function
- LD DE,CLS ; load clear screen string address
- CALL BDOS
-
- ;-------------------------------
- ; print screen
- ;-------------------------------
- LD C,09H
- LD DE,TBL1
- CALL BDOS
- ;
- LD C,02H
- LD E,24H
- CALL BDOS
- ;
- LD C,09H
- LD DE,TBL2
- CALL BDOS
- ;
- RET
-
- ;-------------------------------
- ; clear screen string
- ;-------------------------------
- CLS:
- DB ESC,'*$' ; two bytes, terminated with $
-
- ;-------------------------------
- ; ascii table
- ;-------------------------------
- TBL1:
- DB '+------------+---------------------------------------------------------------+',CR,LF
- DB '| binary | 0 1 2 3 '
- DB ' 4(0) 5(1) 6 7 |',CR,LF
- DB '+------+-----+---------------------------------------------------------------+',CR,LF
- DB '| 0000 | 0 | NUL DLE SP 0 '
- DB ' @ P ` p |',CR,LF
- DB '| 0001 | 1 | SOH DC1 ! 1 '
- DB ' A Q a q |',CR,LF
- DB '| 0010 | 2 | STX DC2 " 2 '
- DB ' B R b r |',CR,LF
- DB '| 0011 | 3 | ETX DC3 # 3 '
- DB ' C S c s |',CR,LF
- DB '| 0100 | 4 | EOT DC4 $'
- TBL2:
- DB ' 4 '
- DB ' D T d t |',CR,LF
- DB '| 0101 | 5 | ENQ NAK % 5 '
- DB ' E U e u |',CR,LF
- DB '| 0110 | 6 | ACK SYN & 6 '
- DB ' F V f v |',CR,LF
- DB '| 0111 | 7 | BEL ETB '' 7 '
- DB ' G W g w |',CR,LF
- DB '| 1000 | 8 | BS CAN ( 8 '
- DB ' H X h x |',CR,LF
- DB '| 1001 | 9 | HT EM ) 9 '
- DB ' I Y i y |',CR,LF
- DB '| 1010 | A | LF SUB * : '
- DB ' J Z j z |',CR,LF
- DB '| 1011 | B | VT ESC + ; '
- DB ' K [ k { |',CR,LF
- DB '| 1100 | C | FF FS , < '
- DB ' L \ l | |',CR,LF
- DB '| 1101 | D | CR GS - = '
- DB ' M ] m } |',CR,LF
- DB '| 1110 | E | SO RS . > '
- DB ' N ^ n ~ |',CR,LF
- DB '| 1111 | F | SI US / ? '
- DB ' O - o DEL |',CR,LF
- DB '+------+-----+---------------------------------------------------------------+',CR,LF
- DB ' Hex code equals column/row position. Control'
- DB ' characters - change column 4',CR,LF
- DB ' codes to 0, column 5 codes to 1. Combine 2'
- DB ' binary nybbles to make a byte.',CR
- DB '$'
- ;
- END