home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / pub / trs80model4 / m4show.asm < prev    next >
Assembly Source File  |  2020-01-01  |  13KB  |  530 lines

  1. ;    m4show/asm
  2. ;
  3. ;THIS IS THE SHOW COMMAND.
  4. ;
  5. SHOW    LD    A,SHLEN        ;GET THE OFFSET TO OVERWRITE WITH
  6.     LD    (SETTAB),A    ;FIX SET TABLE FOR SHOW
  7.     LD    (SETTAB+1),A
  8.     LD    A,CMKEY        ;Parse a keyword
  9.     LD    DE,SHOTAB    ;From this table
  10.     CALL    COMND        ;Go do it
  11.     JP    KERMT2        ;Say ambiguous if nothing matches
  12.     IFA    KYLEN,NOCFM    ;If keyword is KEY, then special case
  13.     IFA    FILLEN,NOCFM    ;If keyword is FILE, then special case
  14.     LD    (TEMP1),A    ;SAVE THE JUMP OFFSET
  15.     LD    A,CMCFM        ;Get a confirm
  16.     CALL    COMND
  17.     JP    KERMT3        ;SAY NOT CONFIRMED ON AN ERROR
  18.     CALL    NEWLIN        ;Get a new line to print on
  19.     LD    A,(TEMP1)    ;Get the keyword value
  20. NOCFM    LD    HL,SHOJTB    ;Get the start of the jump table
  21.     LD    C,A        ;Make BC a 16-bit copy of A
  22.     LD    B,0
  23.     ADD    HL,BC        ;HL IS WHERE WE GO
  24.     LD    BC,KERMIT    ;Put a return address on the
  25.     PUSH    BC        ;stack to simulate a call
  26.     JP    (HL)        ;GO DO THE ROUTINE
  27. ;
  28. ;    Show command jump table.  The 2 equates embedded in this table
  29. ;    indicate functions which need furthur parsing.  These are checked
  30. ;    above, and then handled special.
  31. ;
  32. SHOJTB    JP    ESCSTAT        ;SHOW ESCAPE
  33.     JP    ECHSTAT        ;SHOW LOCAL ECHO
  34.     JP    EIGSTAT        ;Eight bit quoting status
  35. FILLEN    EQU    $-SHOJTB
  36.     JP    FILESTAT    ;Show the file parameters
  37.     JP    CHKSTAT        ;SHOW BLOCK-CHECK-TYPE
  38.     JP    EMULSTAT    ;SHOW emulation status
  39.     JP    PRTSTAT        ;SHOW PRINTER
  40.     JP    DEBSTAT        ;SHOW DEBUGGING
  41.     JP    DSKSTAT        ;SHOW DEFAULT DISK
  42.     JP    BELLSTAT    ;BELL STATUS
  43.     JP    RCVSTAT        ;SHOW RECEIVE
  44.     JP    SENDSTAT    ;SHOW SEND
  45. KYLEN    EQU    $-SHOJTB    ;THESE 2 LINES MUST BE TOGETHER
  46.     JP    KYSTAT        ;SHOW A KEY TRANSLATION
  47.     JP    FLOWSTAT    ;SHOW FLOW CONTROL
  48.     JP    SHOINP        ;SHOW INPUT PARAMETERS
  49.     JP    SHOOUT        ;SHOW OUTPUT PARAMETERS
  50.     JP    TAKESTAT    ;SHOW STATUS OF TAKE DISPLAY
  51.     JP    SHOALL        ;SHOW ALL
  52. ;
  53. ;    Show the status of several values.  This is the STATUS command
  54. ;
  55. STATUS    LD    A,CMCFM        ;GET A CONFIRM
  56.     CALL    COMND
  57.     JP    KERMT3        ;QUIT ON AN ERROR
  58.     STROUT    SPACSTR
  59.     LD    HL,DEFTABLE+DEFTLEN-1    ;Get the end of table
  60.     LD    BC,(TOPADDR)        ;Get the current top
  61.     OR    A            ;Reset carry
  62.     SBC    HL,BC            ;Compute difference
  63.     CALL    NOUT            ;Print the number
  64.     CALL    NEWLIN
  65.     CALL    SHOTRANS
  66.     JP    KERMIT
  67. ;
  68. ;    Show the values of all setable values other than keystrokes.
  69. ;    There is a lot of code here to perform the 2 column output.
  70. ;
  71. SHOALL    EQU    $
  72.     STROUT    SENDRECV    ;Send  Receive   header
  73.     FORMAT    BELSTR,SHSTRLEN    ;Print setting of BELL
  74.     FOFFON    BELFLG
  75.     FORMAT    EOLST,SRSTRLEN    ;Print send/recv EOL values
  76.     LD    HL,SEOL
  77.     CALL    SRSTATS
  78.     FORMAT    PNTSTR,SHSTRLEN    ;Print status of printer
  79.     FOFFON    PRTFLG
  80.     FORMAT    RETST,SRSTRLEN    ;Print send/recv turn around values
  81.     LD    HL,STURN
  82.     CALL    SRSTATS
  83.     FORMAT    BUGST,SHSTRLEN    ;Print setting of debug flag
  84.     FOFFON    DBFLG
  85.     FORMAT    PCHST,SRSTRLEN    ;Print send/recv padding characters
  86.     LD    HL,SPADCH
  87.     CALL    SRSTATS
  88.     FORMAT    TYPEST,SHSTRLEN    ;Print file-type (ASCII or BINARY)
  89.     LD    A,(FILTYPE)
  90.     LD    DE,ASCIIST
  91.     IFZ    SHOA_1
  92.     LD    DE,BINST
  93. SHOA_1    CALL    PRTSTR
  94.     CALL    NEWLIN
  95.     FORMAT    QTEST,SRSTRLEN    ;Print send/recv eighth bit quotes
  96.     LD    HL,SQUOTE
  97.     CALL    SRSTATS
  98.     FORMAT    LOCST,SHSTRLEN    ;Print local echo setting
  99.     FOFFON    ECOFLG
  100.     FORMAT    TOST,SRSTRLEN    ;Print send/recv time out values
  101.     LD    HL,STIME
  102.     CALL    SRSTATS
  103.     FORMAT    ESCST,SHSTRLEN    ;Print escape character
  104.     CALL    STDOUT
  105.     CALL    ESCPR
  106.     CALL    STDEND
  107.     CALL    NEWLIN
  108.     FORMAT    PADST,SRSTRLEN    ;Print send/recv padding amounts
  109.     LD    HL,SPAD
  110.     CALL    SRSTATS
  111.     FORMAT    FILST,SHSTRLEN    ;Print file warning setting
  112.     FOFFON    FLWFLG
  113.     FORMAT    SOPST,SRSTRLEN    ;Print send/recv SOP characters
  114.     LD    HL,SSOHCH
  115.     CALL    SRSTATS
  116.     FORMAT    FLOWST,SHSTRLEN    ;Print flow control setting
  117.     LD    A,(FLOFLG)
  118.     LD    DE,XONSTR
  119.     IFNZ    SHOA_2
  120.     LD    DE,NONSTR
  121. SHOA_2    CALL    PRTSTR
  122.     CALL    NEWLIN
  123.     STROUT    INPUTSTR    ;Print Input settings message
  124.     FORMAT    DSKDEF,SHSTRLEN    ;Print the default disk drive
  125.     CALL    STDOUT
  126.     LD    A,(DEFDSK)
  127.     CALL    CONOUT
  128.     CALL    STDEND
  129.     CALL    NEWLIN
  130.     FORMAT    IDSPST,SRSTRLEN    ;Print INPUT DISPLAY setting
  131.     LD    A,(INDSP)
  132.     CALL    JUSONOFF
  133.     LD    BC,0620H    ;Display 6 spaces (B is count, C is char)
  134.     CALL    MULDIS
  135.     CALL    DISSEP
  136.     FORMAT    EMSTR,SHSTRLEN    ;Print setting for emulation
  137.     LD    A,(EMULFLAG)
  138.     LD    DE,NOESTR
  139.     IFZ    SHOA_3
  140.     LD    DE,DMESTR
  141. SHOA_3    CALL    PRTSTR
  142.     CALL    NEWLIN
  143.     FORMAT    CSEST,SRSTRLEN    ;Print INPUT CASE-IGNORE setting
  144.     LD    A,(CSEFLG)
  145.     CALL    JUSONOFF
  146.     LD    BC,0620H
  147.     CALL    MULDIS
  148.     CALL    DISSEP
  149.     FORMAT    DISPST,SHSTRLEN    ;Print file dispostion
  150.     CALL    STDOUT
  151.     LD    A,(DISCARD)
  152.     LD    DE,DSCRDST
  153.     IFNZ    SHOA_4
  154.     LD    DE,KEEPST
  155. SHOA_4    CALL    PRTSTR
  156.     CALL    STDEND
  157.     CALL    NEWLIN
  158.     STROUT    OUTPUTSTR    ;Print Output settings message
  159.     FORMAT    BCKST,SHSTRLEN    ;Print block check type
  160.     CALL    STDOUT
  161.     LD    A,(CHKTYP)
  162.     CALL    CONOUT
  163.     STROUT    BCKST1
  164.     CALL    STDEND
  165.     CALL    NEWLIN
  166.     FORMAT    ODSPST,SRSTRLEN    ;Print OUTPUT DISPLAY setting
  167.     LD    A,(OTDSP)
  168.     CALL    JUSONOFF
  169.     LD    BC,0620H
  170.     CALL    MULDIS
  171.     CALL    DISSEP
  172.     FORMAT    TAKST,SHSTRLEN    ;Print take file display setting
  173.     FOFFON    TAKLOG
  174.     FORMAT    HSTEST,SRSTRLEN    ;Print OUTPUT HOST-ECHO setting
  175.     LD    A,(ECHFLG)
  176.     CALL    JUSONOFF
  177.     LD    BC,0620H
  178.     CALL    MULDIS
  179.     CALL    DISSEP
  180.     FORMAT    EIGHTSTR,SHSTRLEN ;Print eight bit quoting status
  181.     FOFFON    EBQFLG
  182.     CALL    NEWLIN
  183.     JP    KERMIT        ;Get a new command
  184. ;
  185. ;    Print status of take file display
  186. ;
  187. TAKESTAT    STROUT    TAKST
  188.     SHOFFON    TAKLOG
  189. ;
  190. ;    Print status of eighth bit quoting
  191. ;
  192. EIGSTAT    STROUT    EIGHTSTR
  193.     SHOFFON    EBQFLG
  194. ;
  195. ;    Print file disposition
  196. ;
  197. DISPSTAT    STROUT    DISPST
  198.     CALL    STDOUT
  199.     LD    A,(DISCARD)
  200.     LD    DE,DSCRDST
  201.     IFNZ    DISP_4
  202.     LD    DE,KEEPST
  203. DISP_4    CALL    PRTSTR
  204.     CALL    STDEND
  205.     JP    NEWLIN
  206. ;
  207. ;    Show the SET INPUT parameters
  208. ;
  209. SHOINP    CALL    NEWLIN        ;GET A NEW LINE
  210.     STROUT    CSEST
  211.     LD    A,(CSEFLG)
  212.     CALL    COFFON
  213.     CALL    NEWLIN
  214.     STROUT    IDSPST
  215.     SHOFFON    INDSP
  216. ;
  217. ;    Print the SET OUTPUT parameters
  218. ;
  219. SHOOUT    CALL    NEWLIN
  220.     STROUT    HSTEST
  221.     LD    A,(ECHFLG)
  222.     CALL    COFFON
  223.     CALL    NEWLIN
  224.     STROUT    ODSPST
  225.     LD    A,(OTDSP)
  226.     CALL    COFFON
  227.     JP    NEWLIN
  228. ;
  229. ;    Flow control setting
  230. ;
  231. FLOWSTAT    STROUT    FLOWST
  232.     LD    DE,XONSTR
  233.     LD    A,(FLOFLG)
  234.     OR    A
  235.     JP    NZ,PRTSTR
  236.     LD    DE,NONSTR
  237.     JP    PRTSTR
  238. ;
  239. ;    Show status of all send parameters
  240. ;
  241. SENDSTAT    LD    A,CMCFM
  242.     CALL    COMND
  243.     JP    KERMT3
  244.     CALL    NEWLIN
  245.     SHSSTAT    EOLST,SEOL
  246.     SHSSTAT    RETST,STURN
  247.     SHSSTAT    PCHST,SPADCH
  248.     SHSSTAT    QTEST,SQUOTE
  249.     SHSSTAT    TOST,STIME
  250.     SHSSTAT    PADST,SPAD
  251.     SHSSTAT    SOPST,SSOHCH
  252.     RET
  253. ;
  254. ;    Show status of all receive parameters
  255. ;
  256. RCVSTAT    LD    A,CMCFM
  257.     CALL    COMND
  258.     JP    KERMT3
  259.     CALL    NEWLIN
  260.     SHRSTAT    EOLST,REOL
  261.     SHRSTAT    RETST,RTURN
  262.     SHRSTAT    PCHST,RPADCH
  263.     SHRSTAT    QTEST,RQUOTE
  264.     SHRSTAT    TOST,RTIME
  265.     SHRSTAT    PADST,RPAD
  266.     SHRSTAT    SOPST,RSOHCH
  267.     RET
  268. ;
  269. ;    Show status of bell for KERMIT messages
  270. ;
  271. BELLSTAT    STROUT    BELSTR
  272.     SHOFFON    BELFLG        ;Print the bell status
  273. ;
  274. ;    Show status of local echo
  275. ;
  276. ECHSTAT    STROUT    LOCST        ;Local echo is ...
  277.     SHOFFON    ECOFLG        ;Print local echo status
  278. ;
  279. ;    Show the type of emulation
  280. ;
  281. EMULSTAT    STROUT    EMSTR    ;Emulation is ...
  282.     LD    A,(EMULFLAG)
  283.     OR    A
  284.     LD    DE,NOESTR
  285.     JP    Z,PRTSTR
  286.     LD    DE,DMESTR
  287.     JP    PRTSTR
  288. ;
  289. ;    Show file parameters
  290. ;
  291. FILESTAT    LD    DE,FILETAB    ;Get the options
  292.     LD    A,CMKEY        ;Get a keyword
  293.     CALL    COMND        ;Parse it
  294.     JP    KERMT2        ;Say ambiguous if error
  295.     CALL    NEWLIN
  296.     LD    (TEMP1),A    ;Save the value
  297.     LD    A,CMCFM        ;Get a confirm
  298.     CALL    COMND
  299.     JP    KERMT3        ;Say not confirmed if it is not
  300.     LD    A,(TEMP1)    ;Get the value back
  301.     LD    C,A        ;Put it into BC as 16 bits
  302.     LD    B,0
  303.     LD    HL,SHFLJTAB    ;Get the jump table
  304.     ADD    HL,BC        ;Get the destination
  305.     JP    (HL)        ;Jump into the table
  306. ;
  307. SHFLJTAB    EQU    $
  308.     JP    DISPSTAT    ;SHOW FILE DISPOSITION
  309.     JP    TYPESTAT    ;SHOW FILE TYPE
  310.     JP    WARNSTAT    ;SHOW FILE WARNING
  311. ;
  312. ;    Show file-type, ASCII or BINARY
  313. ;
  314. TYPESTAT    STROUT    TYPEST    ;File type is ...
  315.     LD    DE,ASCIIST    ;Get ASCII type
  316.     LD    A,(FILTYPE)    ;Check the type
  317.     OR    A        ;Set the flags
  318.     JP    Z,PRTSTR    ;Jump if ASCII
  319.     LD    DE,BINST    ;Get binary type
  320.     JP    PRTSTR        ;Print the string in rev video
  321. ;
  322. ;    Show the default disk-drive
  323. ;
  324. DSKSTAT    STROUT    DSKDEF        ;Default disk is ...
  325.     CALL    STDOUT        ;REVERSE VIDEO ON
  326.     LD    A,(DEFDSK)    ;GET THE CHARACTER 0-9
  327.     CALL    CONOUT
  328.     JP    STDEND        ;REVERSE VIDEO OFF
  329. ;
  330. ;    Show status of file warning
  331. ;
  332. WARNSTAT    STROUT    FILST    ;File warning is ...
  333.     SHOFFON    FLWFLG        ;Show the file warning status
  334. ;
  335. ;    Show status of debug setting
  336. ;
  337. DEBSTAT    STROUT BUGST        ;Debugging is ...
  338.     SHOFFON    DBFLG        ;Show the debugging
  339. ;
  340. ;    Show status of logging to the printer.
  341. ;
  342. PRTSTAT    STROUT    PNTSTR        ;Printer is ...
  343.     SHOFFON    PRTFLG        ;Show printer status
  344. ;
  345. ;    Show block check type
  346. ;
  347. CHKSTAT    STROUT    BCKST        ;Block check type is ...
  348.     CALL    STDOUT        ;REVERSE VIDEO ON
  349.     LD    A,(CHKTYP)    ;GET THE TYPE (CHARACTER 1, 2, OR 3)
  350.     CALL    CONOUT
  351.     CALL    STDEND        ;REVERSE VIDEO OFF
  352.     LD    DE,BCKST1    ;GET REST OF TEXT ("-CHARACTER")
  353.     JP    PRTSTR        ;. . .
  354. ;
  355. ;    Show the escape character
  356. ;
  357. ESCSTAT    STROUT    ESCST        ;Escape character is ...
  358.     CALL    STDOUT        ;REVERSE VIDEO ON
  359.     CALL    ESCPR        ;PRINT THE ESCAPE CHAR.
  360.     JP    STDEND        ;REVERSE VIDEO OFF
  361. ;
  362. ;    Pick a character up from (HL+BC)
  363. ;
  364. GETTRN    EQU    $
  365.     LD    C,A
  366.     ADD    HL,BC
  367.     LD    A,(HL)
  368.     RET
  369. ;
  370. ;    Put a characcter at (HL+BC)
  371. ;
  372. PUTTRN    EQU    $
  373.     ADD    HL,BC
  374.     LD    (HL),A
  375.     RET
  376. ;
  377. ;    Show the mapping of a keystroke
  378. ;
  379. KYSTAT    LD    A,CMNUM        ;GET WHICH KEY
  380.     CALL    COMND        ;GET IT
  381.     JP    KERMT3        ;SAY NOT CONFIRMED
  382.     IFZ    KYST_4        ;Say ambiguous if no number given
  383.     LD    A,D        ;CHECK FOR OVERFLOW
  384.     IFNZ    KYST_3        ;Jump if > 255
  385.     CALL    NEWLIN
  386.     LD    A,E        ;Get the key number
  387. KYST_0    EQU    $
  388.     CALL    KEYTRANS    ;Do the translation
  389.     OR    H        ;Check if there is one
  390.     JR    Z,KYST_2    ;Jump if not
  391.     CALL    NEWLIN        ;Print a new line
  392. KYST_1    EQU    $
  393.     LD    A,(HL)        ;Get a character
  394.     OR    A        ;Is it a null
  395.     RET    Z        ;Return if end of string
  396.     CALL    VERPRT        ;Print verbose description
  397.     INC    HL        ;Point to next
  398.     JR    KYST_1        ;Loop until done
  399. KYST_2    EQU    $
  400.     LD    DE,NODEF    ;Print undefined message
  401.     JP    PRTSTR
  402. KYST_3    STROUT    OUTRNG        ;Print bad value message
  403.     JP    KERMIT
  404. KYST_4    STROUT    KEYHELP        ;Ask them to press a key
  405. KYST_5    CALL    CONIN        ;Get the keystroke
  406.     IFZ    KYST_5        ;If none pressed, then loop
  407.     PUSH    AF        ;Save the key
  408.     CALL    VERPRT        ;Print it out
  409.     POP    AF        ;Restore key
  410.     JR    KYST_0        ;Go process the key
  411. ;
  412. ;    Print verbose string of A.  Control characters appear as
  413. ;    ^M for <CR>, etc...
  414. ;
  415. VERPRT    IFAGE    ' ',VER_2    ;Jump if character not a control char
  416. VER_1    PUSH    AF        ;Save the character
  417.     LD    A,'^'        ;Print a carrat first
  418.     CALL    CONOUT        ;Output it
  419.     POP    AF        ;Get the character back
  420.     ADD    A,64        ;Uncontrolify it
  421.     AND    127        ;Remove eighth bit for <DEL>
  422.     JP    CONOUT        ;Output and return
  423. VER_2    IFA    127,VER_1    ;If <DEL> then process as control char
  424.     JP    C,CONOUT    ;If less that 127 then print it
  425. ;
  426. ;    Characters greater than 127 are printed as \nnn, where
  427. ;    nnn is the 3 digit octal number representing the value
  428. ;    of the character
  429. ;
  430.     LD    C,A        ;Save the character
  431.     LD    A,'\'        ;Get a leading \
  432.     CALL    CONOUT        ;Output it
  433.     LD    A,C        ;Get a copy of the character
  434.     AND    0C0H        ;Save only 2 higher order bits
  435.     RLC    A        ;Move the 2 bits into the lower
  436.     RLC    A        ;order bits of A
  437.     AND    3        ;Make sure nothing else is there
  438.     ADD    A,'0'        ;Make it a printable value
  439.     CALL    CONOUT        ;Output it
  440.     LD    A,C        ;Get another copy
  441.     AND    38H        ;Save bits 5-3
  442.     SRL    A        ;Align in lower order bits of
  443.     SRL    A        ;the accumulator
  444.     SRL    A
  445.     AND    07H        ;Truncate to 3 bits only
  446.     ADD    A,'0'        ;Make it printable
  447.     CALL    CONOUT        ;Output it
  448.     LD    A,C        ;Get the character again
  449.     AND    07H        ;Save lower 3 bits, 2-0
  450.     ADD    A,'0'        ;Make it printable
  451.     JP    CONOUT        ;Output it, and return
  452. ;
  453. ;    Right justify the string in DE, within a field as wide as
  454. ;    HL specifies.
  455. ;
  456. LEFTPAD    PUSH    DE        ;Save the strings address for printing
  457.     CALL    STRLEN        ;Get the length in BC
  458.     OR    A        ;Reset the carry
  459.     SBC    HL,BC        ;Compute the difference to pad
  460.     LD    B,L        ;Make B the count
  461.     LD    A,L        ;Check for no padding
  462.     IFZ    LEFTP_2        ;Jump if none needed
  463. LEFTP_1    LD    A,' '        ;Get the pad character
  464.     CALL    CONOUT        ;output one
  465.     DJNZ    LEFTP_1        ;Loop until done
  466. LEFTP_2    POP    DE        ;Restore the strings address
  467.     JP    PRTSTR        ;Print it, and return
  468. ;
  469. ;
  470. DISSEP    LD    DE,SEPAR
  471.     JP    PRTSTR
  472. ;
  473. ;    Display SEND and RECEIVE status as indicated by values at
  474. ;    the address pointed to be HL, and HL+1.
  475. ;
  476. SRSTATS    EQU    $
  477.     LD    A,(HL)        ;Get the value
  478.     PUSH    HL        ;Save the address
  479.     CALL    DISNUM        ;Display the value
  480.     LD    A,' '        ;Put in an extra blank
  481.     CALL    CONOUT
  482.     POP    HL        ;Get the address back
  483.     INC    HL        ;Point to receive value
  484.     LD    A,(HL)        ;Get the value
  485.     CALL    DISNUM        ;Display the value
  486.     CALL    DISSEP        ;Put in the separator
  487.     RET
  488. ;
  489. ;    Display value in A, in a 5 character field
  490. ;
  491. DISNUM    EQU    $
  492.     LD    DE,DECBUF    ;Get the buffer
  493.     LD    L,A        ;Put the value into HL
  494.     LD    H,0
  495.     CALL    XHEXDEC        ;Convert to printable
  496.     EX    DE,HL        ;Put ending address into HL
  497.     LD    (HL),EOS    ;Put in a terminator
  498.     STROUT    DECBUF        ;Output the string
  499.     RET
  500. ;
  501. ;    Display the character in C, B times on the screen
  502. ;
  503. MULDIS    PUSH    AF        ;Save AF, don't destroy it
  504. MULDIS1    LD    A,C        ;Get the character to print
  505.     CALL    CONOUT        ;Output one
  506.     DJNZ    MULDIS1        ;Loop until all done
  507.     POP    AF        ;Restore AF
  508.     RET            ;Return
  509. ;
  510. ;    Print the ON string, or the OFF string, based on the value in
  511. ;    A.
  512. ;
  513. JUSONOFF    EQU    $
  514.     LD    DE,OFFSTR    ;Get the default before test
  515.     IFZ    JUSON_1        ;Jump if OFF is right
  516.     LD    DE,ONSTR    ;Get ON, since A is non-zero
  517. JUSON_1    LD    HL,7        ;Make the field 7 characters wide
  518.     JP    LEFTPAD        ;Go pad it, and return from there
  519. ;
  520. ;    Print ON or OFF based on the status of A.  This is different
  521. ;    from JUSONOFF because here, we do not right justify in a
  522. ;    fixed length field.
  523. ;
  524. COFFON    LD    DE,OFFSTR    ;START WITH OFF AS DEFAULT
  525.     OR    A        ;SET THE FLAGS
  526.     JP    Z,PRTSTR    ;GO PRINT OFF IF A ZERO
  527.     LD    DE,ONSTR
  528.     JP    PRTSTR
  529. ; end of file
  530.