home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol161 / mxset12.mac < prev    next >
Encoding:
Text File  |  1985-03-23  |  4.1 KB  |  184 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è    JR    NZ,LE
  57.     CALL    ESC
  58.     CALL    LPRINT##
  59.     DB    85,13,10,0
  60.     JP    START
  61. LE:    CP    'E'        ;Set column length
  62.     JP    NZ,LF
  63. LE1:    CALL    PRINT##
  64.     DB    13,10,10,'Enter column length: ',13,10
  65.     DB    'Up to <80> when in normal or emphasized mode.',13,10
  66.     DB    '     <132> when in condensed mode.',13,10
  67.     DB    '      <40> when in enlarged mode.',13,10
  68.     DB    '      <60> when in enlarged-condensed mode',13,10
  69.     DB    '---> ? ',0
  70.     LD    A,0
  71.     CALL    BBLINE##
  72.     CALL    EVAL10##
  73.     PUSH    AF
  74.     LD    HL,132
  75.     CALL    COMPHD##
  76.     JP    C,LE1
  77.     POP    AF
  78.     CP    0
  79.     JP    Z,START
  80.     LD    (LE2),A
  81.     CALL    ESC
  82.     CALL    LPRINT##
  83.     DB    81
  84. LE2:    DS    1
  85.     DB    13,10,0
  86.     JP    START
  87. LF:    CP    'F'        ;Turn on perf. skip-over
  88.     JR    NZ,LG
  89.     CALL    ESC
  90.     CALL    LPRINT##
  91.     DB    78,13,10,0
  92.     JP    START
  93. LG:    CP    'G'        ;Turn off perf. skip-over
  94.     JR    NZ,LH
  95.     CALL    ESC
  96.     CALL    LPRINT##
  97.     DB    79,13,10,0
  98.     JP    START
  99. LH:    CP    'H'        ;Turn on paper-end detector
  100.     JR    NZ,LI
  101.     CALL    ESC
  102.     CALL    LPRINT##
  103.     DB    57,13,10,0
  104.     JP    START
  105. LI:    CP    'I'        ;Turn off paper-end detector
  106.     JR    NZ,LJ
  107.     CALL    ESC
  108.     CALL    LPRINT##
  109.     DB    56,13,10,0
  110.     JP    START
  111. LJ:    CP    'J'        ;Choose alternate fonts
  112.     JP    NZ,LK
  113.     CALL    PRINT##
  114.     DB    13,10,10
  115.     DB    '1:  Set italics ON',13,10
  116.     DB    '2:  Set italics OFF',13,10
  117.     DB    '3:  Set emphasized ON',13,10
  118.     DB    '4:  Set emphasized OFF',13,10
  119.     DB    '5:  Set double print ON',13,10è    DB    '6:  Set double print OFF',13,10
  120.     DB    '7:  Set condensed ON',13,10
  121.     DB    '8:  Set condensed OFF',13,10
  122.     DB    '9:  Set enlarged ON (ignores linefeeds) -- '
  123.     DB    'use option A: to turn OFF',13,10,10
  124.     DB    'Enter your choice: ',0
  125.     LD    A,0
  126.     CALL    BBLINE##
  127.     CALL    EVAL10##
  128.     PUSH    AF
  129.     LD    HL,9
  130.     CALL    COMPHD##
  131.     JP    C,LJ
  132.     POP    AF
  133.     CP    0
  134.     JP    Z,START
  135.     CP    9
  136.     JR    NZ,LJ1
  137.     CALL    ESC
  138.     LD    A,87
  139.     CALL    LOUT##
  140.     LD    A,1
  141.     CALL    LOUT##
  142.     CALL    LPRINT##
  143.     DB    13,10,0
  144.     JP    START
  145. DATA:    DB    52,53,69,70,71,72,15,18
  146. LJ1:    DEC    A
  147.     LD    (LJ2),A        ;store A for index
  148.     LD    IX,DATA        ;set indexed pointer
  149.     DB    11011101B    ;1st byte of LD A,(IX+d)
  150.     DB    01111110B    ;2nd byte of LD A,(IX+d)
  151. LJ2:    DS    1        ;storage for index
  152.     LD    (LJ3),A
  153.     PUSH    AF
  154.     CALL    ESC
  155.     POP    AF
  156.     CP    15
  157.     JR    NZ,LJ2A
  158.     CALL    LOUT##
  159.     LD    A,13
  160.     LD    (LJ3),A
  161.     JR    LJ2C
  162. LJ2A:    CP    18
  163.     JR    NZ,LJ2C
  164.     CALL    LOUT##
  165.     LD    A,13
  166.     LD    (LJ3),A
  167. LJ2C:    CALL    LPRINT##
  168. LJ3:    DS    1
  169.     DB    13,10,0
  170.     JP    START
  171. LK:    CP    'K'        ;Print test
  172.     JP    NZ,START
  173.     CALL    LPRINT##
  174.     DB    13,10,10
  175.     DB    'ABCDEFGHIJKLMNOPQRSTUVWXYZ  abcdefghijklmnopqrstuvwxyz',13,10
  176.     DB    "1234567890-=['\;,./",'!@#$%^&*()_+]"|:<>?',13,10,10,0
  177.     JP    START
  178. ESC:    PUSH    AF
  179.     LD    A,27
  180.     CALL    LOUT##
  181.     POP    AF
  182.     RET
  183.     END
  184.