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 / EPSON / MXSET12.MAC < prev    next >
Text File  |  2000-06-30  |  4KB  |  186 lines

  1. .COMMENT \
  2.  
  3. MXSET Rev. 1.2 by Simon J. Ewins, Toronto, Ontario, Canada.
  4. ***********************************************************
  5.  
  6. This program will set/reset all of the major functions of the Epson MX-80
  7. printer. The program uses Z80 Zilog mnemonics and calls are made to Richard
  8. Conn's excellent SYSLIB.REL file. Microsoft's M80 macro assembler is needed
  9. for assembly of this file as well as the SYSLIB file.
  10.  
  11. June 28, 1983.   Toronto, Ontario.
  12.  
  13. ******************************************************************************
  14. \
  15.     .Z80
  16.     CSEG
  17. START:    CALL    PRINT##
  18.     DB    13,10,10,10,10,10
  19.     DB    'MXSET Rev. 1.2',13,10
  20.     DB    'by Simon J. Ewins -- 06/28/83',13,10,10
  21.     DB    'OPTIONS:',13,10,10
  22.     DB    'A: Set printer to defaults',13,10
  23.     DB    'B: Home printhead',13,10
  24.     DB    'C: Turn ON underline mode -- use A: to turn OFF',13,10
  25.     DB    'D: Turn ON unidirectional mode -- use A: to turn OFF',13,10
  26.     DB    'E: Set column length',13,10
  27.     DB    'F: Turn ON perforation skipover',13,10
  28.     DB    'G: Turn OFF perforation skipover',13,10
  29.     DB    'H: Turn ON paper-end detector',13,10
  30.     DB    'I: Turn OFF paper-end detector',13,10
  31.     DB    'J: Select character fonts',13,10
  32.     DB    'K: Print test',13,10
  33.     DB    '^C=Quit to CP/M',13,10,10
  34.     DB    'Enter your choice: ',0
  35.     LD    A,1
  36.     CALL    BBLINE##
  37.     LD    A,(HL)
  38. LA:    CP    'A'        ;Set printer to defaults
  39.     JR    NZ,LB
  40.     CALL    ESC
  41.     CALL    LPRINT##
  42.     DB    64,13,10,0
  43.     JP    START
  44. LB:    CP    'B'        ;Home printhead
  45.     JR    NZ,LC
  46.     CALL    ESC
  47.     CALL    LPRINT##
  48.     DB    60,13,10,0
  49.     JP    START
  50. LC:    CP    'C'        ;Turn on underline mode
  51.     JR    NZ,LD
  52.     CALL    ESC
  53.     CALL    LPRINT##
  54.     DB    45,1,13,10,0
  55.     JP    START
  56. LD:    CP    'D'        ;Turn on unidirectional
  57.     JR    NZ,LE
  58.     CALL    ESC
  59.     CALL    LPRINT##
  60.     DB    85,13,10,0
  61.     JP    START
  62. LE:    CP    'E'        ;Set column length
  63.     JP    NZ,LF
  64. LE1:    CALL    PRINT##
  65.     DB    13,10,10,'Enter column length: ',13,10
  66.     DB    'Up to <80> when in normal or emphasized mode.',13,10
  67.     DB    '     <132> when in condensed mode.',13,10
  68.     DB    '      <40> when in enlarged mode.',13,10
  69.     DB    '      <60> when in enlarged-condensed mode',13,10
  70.     DB    '---> ? ',0
  71.     LD    A,0
  72.     CALL    BBLINE##
  73.     CALL    EVAL10##
  74.     PUSH    AF
  75.     LD    HL,132
  76.     CALL    COMPHD##
  77.     JP    C,LE1
  78.     POP    AF
  79.     CP    0
  80.     JP    Z,START
  81.     LD    (LE2),A
  82.     CALL    ESC
  83.     CALL    LPRINT##
  84.     DB    81
  85. LE2:    DS    1
  86.     DB    13,10,0
  87.     JP    START
  88. LF:    CP    'F'        ;Turn on perf. skip-over
  89.     JR    NZ,LG
  90.     CALL    ESC
  91.     CALL    LPRINT##
  92.     DB    78,13,10,0
  93.     JP    START
  94. LG:    CP    'G'        ;Turn off perf. skip-over
  95.     JR    NZ,LH
  96.     CALL    ESC
  97.     CALL    LPRINT##
  98.     DB    79,13,10,0
  99.     JP    START
  100. LH:    CP    'H'        ;Turn on paper-end detector
  101.     JR    NZ,LI
  102.     CALL    ESC
  103.     CALL    LPRINT##
  104.     DB    57,13,10,0
  105.     JP    START
  106. LI:    CP    'I'        ;Turn off paper-end detector
  107.     JR    NZ,LJ
  108.     CALL    ESC
  109.     CALL    LPRINT##
  110.     DB    56,13,10,0
  111.     JP    START
  112. LJ:    CP    'J'        ;Choose alternate fonts
  113.     JP    NZ,LK
  114.     CALL    PRINT##
  115.     DB    13,10,10
  116.     DB    '1:  Set italics ON',13,10
  117.     DB    '2:  Set italics OFF',13,10
  118.     DB    '3:  Set emphasized ON',13,10
  119.     DB    '4:  Set emphasized OFF',13,10
  120.     DB    '5:  Set double print ON',13,10
  121.     DB    '6:  Set double print OFF',13,10
  122.     DB    '7:  Set condensed ON',13,10
  123.     DB    '8:  Set condensed OFF',13,10
  124.     DB    '9:  Set enlarged ON (ignores linefeeds) -- '
  125.     DB    'use option A: to turn OFF',13,10,10
  126.     DB    'Enter your choice: ',0
  127.     LD    A,0
  128.     CALL    BBLINE##
  129.     CALL    EVAL10##
  130.     PUSH    AF
  131.     LD    HL,9
  132.     CALL    COMPHD##
  133.     JP    C,LJ
  134.     POP    AF
  135.     CP    0
  136.     JP    Z,START
  137.     CP    9
  138.     JR    NZ,LJ1
  139.     CALL    ESC
  140.     LD    A,87
  141.     CALL    LOUT##
  142.     LD    A,1
  143.     CALL    LOUT##
  144.     CALL    LPRINT##
  145.     DB    13,10,0
  146.     JP    START
  147. DATA:    DB    52,53,69,70,71,72,15,18
  148. LJ1:    DEC    A
  149.     LD    (LJ2),A        ;store A for index
  150.     LD    IX,DATA        ;set indexed pointer
  151.     DB    11011101B    ;1st byte of LD A,(IX+d)
  152.     DB    01111110B    ;2nd byte of LD A,(IX+d)
  153. LJ2:    DS    1        ;storage for index
  154.     LD    (LJ3),A
  155.     PUSH    AF
  156.     CALL    ESC
  157.     POP    AF
  158.     CP    15
  159.     JR    NZ,LJ2A
  160.     CALL    LOUT##
  161.     LD    A,13
  162.     LD    (LJ3),A
  163.     JR    LJ2C
  164. LJ2A:    CP    18
  165.     JR    NZ,LJ2C
  166.     CALL    LOUT##
  167.     LD    A,13
  168.     LD    (LJ3),A
  169. LJ2C:    CALL    LPRINT##
  170. LJ3:    DS    1
  171.     DB    13,10,0
  172.     JP    START
  173. LK:    CP    'K'        ;Print test
  174.     JP    NZ,START
  175.     CALL    LPRINT##
  176.     DB    13,10,10
  177.     DB    'ABCDEFGHIJKLMNOPQRSTUVWXYZ  abcdefghijklmnopqrstuvwxyz',13,10
  178.     DB    "1234567890-=['\;,./",'!@#$%^&*()_+]"|:<>?',13,10,10,0
  179.     JP    START
  180. ESC:    PUSH    AF
  181.     LD    A,27
  182.     CALL    LOUT##
  183.     POP    AF
  184.     RET
  185.     END
  186.