Home » CEEFAX disks » telesoftware1.adl » Utils/NLQ\ASS

Utils/NLQ\ASS

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » CEEFAX disks » telesoftware1.adl
Filename: Utils/NLQ\ASS
Read OK:
File size: 0DC6 bytes
Load address: 1A00
Exec address: 801F
File contents
   10REM ********************
   20REM NLQ printout routine
   30REM  Assembly  language
   40REM  (c) P.A.Crook 1986
   50REM ********************
   60 
   70MC%=&8ED
   80MODE7
   90PRINT'" Paul Crook's"'CHR$132+CHR$157+CHR$134+CHR$141+"Near Letter Quality Printout."'CHR$132+CHR$157+CHR$134+CHR$141+"Near Letter Quality Printout."
  100DIM O% 32
  110fptr=&70
  120FORI%=0TO2STEP2
  130P%=MC%
  140[OPT I%
  150.start LDA#code MOD256:STA&200
  160LDA#code DIV256:STA&201
  170RTS
  180 
  190.code CMP#0:BNEnocode
  200CPX#0:BEQreset
  210STYctrlcode3
  220LDA#print MOD256:STA&20E:LDA#print DIV256:STA&20F
  230LDA#2:JSR ?&20E+?&20F*256:LDA#1:JSR ?&20E+?&20F*256:LDA#13:JSR ?&20E+?&20F*256:LDA#3:JSR ?&20E+?&20F*256:RTS
  240.reset JSRclosedown
  250LDYptr:LDA#13:STAbuffer,Y
  260JSRsendline:RTS
  270.nocode JMP?&200+?&201*256
  280 
  290.closedown LDA#?&20E:STA&20E:LDA#?&20F:STA&20F:RTS
  300 
  310.print PHP
  320PHA
  330TXA
  340PHA
  350TYA
  360PHA
  370TSX:INX:INX:INX:LDA&100,X
  380LDYptr:STAbuffer,Y
  390CMP#&0A:BCCcmp:CMP#&0E:BCScmp:JSRsendline:JMPexit
  400.cmp INY:STYptr:CPY#80:BNEexit:JSRsendline
  410.exit PLA:TAY:PLA:TAX:PLA
  420PLP:JMP?&20E+?&20F*256
  430 
  440.sendline LDA#2:JSR ?&20E+?&20F*256
  450LDAptr:BNEnotzero:JMPout2
  460.notzero LDA#ASC"1":STAfilename+3:LDX#3
  470.ctrl1 LDA#1:JSR ?&20E+?&20F*256:LDActrlcode1-1,X:JSR ?&20E+?&20F*256:DEX:BNEctrl1
  480.nextfile LDY#filename DIV256:LDX#filename MOD256:LDA#&40:JSR&FFCE
  490CMP#0:BNEfileok
  500LDA#3:JSR ?&20E+?&20F*256:LDAfilename+3:STAerror+8:JSRclosedown:BRK:]
  510E%=FNequb(255):error=FNequs("File NLQX not found."+CHR$0)
  520[OPTI%
  530.fileok STAhandle:LDY#0:STYptr2
  540.getchrs LDAbuffer,Y:AND#&7F:CMP#33:BCCnotnlq:CMP#127:BNEnlq
  550.notnlq TAX:LDA#1:JSR ?&20E+?&20F*256:TXA:JSR ?&20E+?&20F*256:JMPnextchrs
  560.nlq PHA:LDX#4
  570.ctrl2 LDA#1:JSR ?&20E+?&20F*256:LDActrlcode2-1,X:JSR ?&20E+?&20F*256:DEX:BNEctrl2
  580LDA#&F4:STAfptr:LDA#&FF:STAfptr+1:LDA#0:STAfptr+2:LDA#0:STAfptr+3
  590PLA:SEC:SBC#32:TAX
  600.add12 LDAfptr:CLC:ADC#12:STAfptr:LDAfptr+1:ADC#0:STAfptr+1:DEX:BNEadd12
  610LDX#fptr:LDY handle:LDA#1:JSR&FFDA:LDX#12
  620.nextbyte LDA#1:JSR ?&20E+?&20F*256:JSR&FFD7:JSR ?&20E+?&20F*256:DEX:BNEnextbyte
  630.nextchrs LDYptr2:INY:STYptr2:CPYptr:BNEgetchrs
  640LDYhandle:LDA#0:JSR&FFCE
  650INCfilename+3:LDAfilename+3:CMP#ASC"4":BEQout:LDA#1:JSR ?&20E+?&20F*256:LDA#13:JSR ?&20E+?&20F*256:JMPnextfile
  660.out LDX#3
  670.ctrl3 LDA#1:JSR ?&20E+?&20F*256:LDActrlcode3-1,X:JSR ?&20E+?&20F*256:DEX:BNEctrl3
  680.out2 LDA#&F6:LDX#0:LDY#&FF:JSR&FFF4:LDYptr:TXA:CMPbuffer,Y:BEQnlastchr:LDA#1:JSR ?&20E+?&20F*256:LDAbuffer,Y:JSR ?&20E+?&20F*256:.nlastchr
  690LDA#0:STAptr
  700LDA#3:JSR ?&20E+?&20F*256
  710RTS:]
  720filename=FNequs("NLQ3"+CHR$&0D)
  730handle=FNequb(0)
  740ptr=FNequb(0)
  750ptr2=FNequb(0)
  760buffer=FNequs((STRING$(80," "))+CHR$13)
  770ctrlcode1=FNequw(&3301):E%=FNequb(&1B)
  780ctrlcode2=FNequd(&1B4C0C00)
  790ctrlcode3=FNequw(&410C):E%=FNequb(&1B)
  800NEXT
  810PROCoscli("SA. NLQ "+STR$~start+" "+STR$~P%)
  820PRINT'CHR$133+"Machine code file ""NLQ"" saved to disc."''CHR$129+CHR$157+CHR$131+STRING$(30," ")+CHR$156'CHR$129+CHR$157+CHR$131+"Type *NLQ to load and setup.  "+CHR$156'CHR$129+CHR$157+CHR$131+STRING$(30," ")+CHR$156
  830PRINTCHR$129+CHR$157+CHR$131+"*CODE 1,Y to start printout.  "+CHR$156'CHR$129+CHR$157+CHR$131+"(Y is the line feed pitch in  "+CHR$156'CHR$129+CHR$157+CHR$131+"1/72 of an inch.)             "+CHR$156
  840PRINTCHR$129+CHR$157+CHR$131+STRING$(30," ")+CHR$156'CHR$129+CHR$157+CHR$131+"*CODE 0 to halt printout.     "+CHR$156'CHR$129+CHR$157+CHR$131+STRING$(30," ")+CHR$156
  850PRINT
  860END
  870 
  880DEFPROCoscli(O$)
  890$O%=O$
  900X%=O%MOD256:Y%=O%DIV256
  910CALL&FFF7
  920ENDPROC
  930 
  940DEFFNequb(B%)
  950?P%=B%:P%=P%+1
  960=P%-1
  970 
  980DEFFNequw(B%)
  990?P%=B%MOD256:P%?1=B%DIV256
 1000P%=P%+2
 1010=P%-2
 1020 
 1030DEFFNequd(B%)
 1040!P%=B%:P%=P%+4
 1050=P%-4
 1060 
 1070DEFFNequs(O$)
 1080$P%=O$:P%=P%+LENO$
 1090=P%-LENO$

� ********************
� NLQ printout routine
�  Assembly  language
(�  (c) P.A.Crook 1986
2� ********************
< 
FMC%=&8ED
P�7
Z}�'" Paul Crook's"'�132+�157+�134+�141+"Near Letter Quality Printout."'�132+�157+�134+�141+"Near Letter Quality Printout."
d� O% 32
nfptr=&70
x
�I%=0�2�2
�
P%=MC%
�[OPT I%
� .start LDA#code �256:STA&200
�LDA#code �256:STA&201
�RTS
� 
�.code CMP#0:BNEnocode
�CPX#0:BEQreset
�STYctrlcode3
�1LDA#print �256:STA&20E:LDA#print �256:STA&20F
�pLDA#2:JSR ?&20E+?&20F*256:LDA#1:JSR ?&20E+?&20F*256:LDA#13:JSR ?&20E+?&20F*256:LDA#3:JSR ?&20E+?&20F*256:RTS
�.reset JSRclosedown
�LDYptr:LDA#13:STAbuffer,Y
JSRsendline:RTS
.nocode JMP?&200+?&201*256
 
"6.closedown LDA#?&20E:STA&20E:LDA#?&20F:STA&20F:RTS
, 
6.print PHP
@PHA
JTXA
TPHA
^TYA
hPHA
rTSX:INX:INX:INX:LDA&100,X
|LDYptr:STAbuffer,Y
�5CMP#&0A:BCCcmp:CMP#&0E:BCScmp:JSRsendline:JMPexit
�..cmp INY:STYptr:CPY#80:BNEexit:JSRsendline
�.exit PLA:TAY:PLA:TAX:PLA
�PLP:JMP?&20E+?&20F*256
� 
�'.sendline LDA#2:JSR ?&20E+?&20F*256
�LDAptr:BNEnotzero:JMPout2
�).notzero LDA#�"1":STAfilename+3:LDX#3
�V.ctrl1 LDA#1:JSR ?&20E+?&20F*256:LDActrlcode1-1,X:JSR ?&20E+?&20F*256:DEX:BNEctrl1
�B.nextfile LDY#filename �256:LDX#filename �256:LDA#&40:JSR&FFCE
�CMP#0:BNEfileok
�ILDA#3:JSR ?&20E+?&20F*256:LDAfilename+3:STAerror+8:JSRclosedown:BRK:]
�8E%=�equb(255):error=�equs("File NLQX not found."+�0)

[OPTI%
#.fileok STAhandle:LDY#0:STYptr2
>.getchrs LDAbuffer,Y:�#&7F:CMP#33:BCCnotnlq:CMP#127:BNEnlq
&M.notnlq TAX:LDA#1:JSR ?&20E+?&20F*256:TXA:JSR ?&20E+?&20F*256:JMPnextchrs
0.nlq PHA:LDX#4
:V.ctrl2 LDA#1:JSR ?&20E+?&20F*256:LDActrlcode2-1,X:JSR ?&20E+?&20F*256:DEX:BNEctrl2
DELDA#&F4:STAfptr:LDA#&FF:STAfptr+1:LDA#0:STAfptr+2:LDA#0:STAfptr+3
NPLA:SEC:SBC#32:TAX
XL.add12 LDAfptr:CLC:ADC#12:STAfptr:LDAfptr+1:ADC#0:STAfptr+1:DEX:BNEadd12
b-LDX#fptr:LDY handle:LDA#1:JSR&FFDA:LDX#12
lT.nextbyte LDA#1:JSR ?&20E+?&20F*256:JSR&FFD7:JSR ?&20E+?&20F*256:DEX:BNEnextbyte
v3.nextchrs LDYptr2:INY:STYptr2:CPYptr:BNEgetchrs
�LDYhandle:LDA#0:JSR&FFCE
�pINCfilename+3:LDAfilename+3:CMP#�"4":BEQout:LDA#1:JSR ?&20E+?&20F*256:LDA#13:JSR ?&20E+?&20F*256:JMPnextfile
�.out LDX#3
�V.ctrl3 LDA#1:JSR ?&20E+?&20F*256:LDActrlcode3-1,X:JSR ?&20E+?&20F*256:DEX:BNEctrl3
��.out2 LDA#&F6:LDX#0:LDY#&FF:JSR&FFF4:LDYptr:TXA:CMPbuffer,Y:BEQnlastchr:LDA#1:JSR ?&20E+?&20F*256:LDAbuffer,Y:JSR ?&20E+?&20F*256:.nlastchr
�LDA#0:STAptr
�LDA#3:JSR ?&20E+?&20F*256
�	RTS:]
�filename=�equs("NLQ3"+�&0D)
�handle=�equb(0)
�ptr=�equb(0)
�ptr2=�equb(0)
� buffer=�equs((�80," "))+�13)
(ctrlcode1=�equw(&3301):E%=�equb(&1B)
ctrlcode2=�equd(&1B4C0C00)
(ctrlcode3=�equw(&410C):E%=�equb(&1B)
 �
*'�oscli("SA. NLQ "+�~start+" "+�~P%)
4��'�133+"Machine code file ""NLQ"" saved to disc."''�129+�157+�131+�30," ")+�156'�129+�157+�131+"Type *NLQ to load and setup.  "+�156'�129+�157+�131+�30," ")+�156
>��129+�157+�131+"*CODE 1,Y to start printout.  "+�156'�129+�157+�131+"(Y is the line feed pitch in  "+�156'�129+�157+�131+"1/72 of an inch.)             "+�156
Hs�129+�157+�131+�30," ")+�156'�129+�157+�131+"*CODE 0 to halt printout.     "+�156'�129+�157+�131+�30," ")+�156
R�
\�
f 
p��oscli(O$)
z
$O%=O$
�X%=O%�256:Y%=O%�256
�
�&FFF7
��
� 
�ݤequb(B%)
�?P%=B%:P%=P%+1
�	=P%-1
� 
�ݤequw(B%)
�?P%=B%�256:P%?1=B%�256
�P%=P%+2
�	=P%-2
� 
ݤequd(B%)
!P%=B%:P%=P%+4
	=P%-4
$ 
.ݤequs(O$)
8$P%=O$:P%=P%+�O$
B=P%-�O$
�
00000000  0d 00 0a 1a f4 20 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |..... **********|
00000010  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 0d 00 14 1a f4 20  |**********..... |
00000020  4e 4c 51 20 70 72 69 6e  74 6f 75 74 20 72 6f 75  |NLQ printout rou|
00000030  74 69 6e 65 0d 00 1e 19  f4 20 20 41 73 73 65 6d  |tine.....  Assem|
00000040  62 6c 79 20 20 6c 61 6e  67 75 61 67 65 0d 00 28  |bly  language..(|
00000050  19 f4 20 20 28 63 29 20  50 2e 41 2e 43 72 6f 6f  |..  (c) P.A.Croo|
00000060  6b 20 31 39 38 36 0d 00  32 1a f4 20 2a 2a 2a 2a  |k 1986..2.. ****|
00000070  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00000080  0d 00 3c 05 20 0d 00 46  0c 4d 43 25 3d 26 38 45  |..<. ..F.MC%=&8E|
00000090  44 0d 00 50 06 eb 37 0d  00 5a 7d f1 27 22 20 50  |D..P..7..Z}.'" P|
000000a0  61 75 6c 20 43 72 6f 6f  6b 27 73 22 27 bd 31 33  |aul Crook's"'.13|
000000b0  32 2b bd 31 35 37 2b bd  31 33 34 2b bd 31 34 31  |2+.157+.134+.141|
000000c0  2b 22 4e 65 61 72 20 4c  65 74 74 65 72 20 51 75  |+"Near Letter Qu|
000000d0  61 6c 69 74 79 20 50 72  69 6e 74 6f 75 74 2e 22  |ality Printout."|
000000e0  27 bd 31 33 32 2b bd 31  35 37 2b bd 31 33 34 2b  |'.132+.157+.134+|
000000f0  bd 31 34 31 2b 22 4e 65  61 72 20 4c 65 74 74 65  |.141+"Near Lette|
00000100  72 20 51 75 61 6c 69 74  79 20 50 72 69 6e 74 6f  |r Quality Printo|
00000110  75 74 2e 22 0d 00 64 0b  de 20 4f 25 20 33 32 0d  |ut."..d.. O% 32.|
00000120  00 6e 0c 66 70 74 72 3d  26 37 30 0d 00 78 0d e3  |.n.fptr=&70..x..|
00000130  49 25 3d 30 b8 32 88 32  0d 00 82 0a 50 25 3d 4d  |I%=0.2.2....P%=M|
00000140  43 25 0d 00 8c 0b 5b 4f  50 54 20 49 25 0d 00 96  |C%....[OPT I%...|
00000150  20 2e 73 74 61 72 74 20  4c 44 41 23 63 6f 64 65  | .start LDA#code|
00000160  20 83 32 35 36 3a 53 54  41 26 32 30 30 0d 00 a0  | .256:STA&200...|
00000170  19 4c 44 41 23 63 6f 64  65 20 81 32 35 36 3a 53  |.LDA#code .256:S|
00000180  54 41 26 32 30 31 0d 00  aa 07 52 54 53 0d 00 b4  |TA&201....RTS...|
00000190  05 20 0d 00 be 19 2e 63  6f 64 65 20 43 4d 50 23  |. .....code CMP#|
000001a0  30 3a 42 4e 45 6e 6f 63  6f 64 65 0d 00 c8 12 43  |0:BNEnocode....C|
000001b0  50 58 23 30 3a 42 45 51  72 65 73 65 74 0d 00 d2  |PX#0:BEQreset...|
000001c0  10 53 54 59 63 74 72 6c  63 6f 64 65 33 0d 00 dc  |.STYctrlcode3...|
000001d0  31 4c 44 41 23 70 72 69  6e 74 20 83 32 35 36 3a  |1LDA#print .256:|
000001e0  53 54 41 26 32 30 45 3a  4c 44 41 23 70 72 69 6e  |STA&20E:LDA#prin|
000001f0  74 20 81 32 35 36 3a 53  54 41 26 32 30 46 0d 00  |t .256:STA&20F..|
00000200  e6 70 4c 44 41 23 32 3a  4a 53 52 20 3f 26 32 30  |.pLDA#2:JSR ?&20|
00000210  45 2b 3f 26 32 30 46 2a  32 35 36 3a 4c 44 41 23  |E+?&20F*256:LDA#|
00000220  31 3a 4a 53 52 20 3f 26  32 30 45 2b 3f 26 32 30  |1:JSR ?&20E+?&20|
00000230  46 2a 32 35 36 3a 4c 44  41 23 31 33 3a 4a 53 52  |F*256:LDA#13:JSR|
00000240  20 3f 26 32 30 45 2b 3f  26 32 30 46 2a 32 35 36  | ?&20E+?&20F*256|
00000250  3a 4c 44 41 23 33 3a 4a  53 52 20 3f 26 32 30 45  |:LDA#3:JSR ?&20E|
00000260  2b 3f 26 32 30 46 2a 32  35 36 3a 52 54 53 0d 00  |+?&20F*256:RTS..|
00000270  f0 17 2e 72 65 73 65 74  20 4a 53 52 63 6c 6f 73  |...reset JSRclos|
00000280  65 64 6f 77 6e 0d 00 fa  1d 4c 44 59 70 74 72 3a  |edown....LDYptr:|
00000290  4c 44 41 23 31 33 3a 53  54 41 62 75 66 66 65 72  |LDA#13:STAbuffer|
000002a0  2c 59 0d 01 04 13 4a 53  52 73 65 6e 64 6c 69 6e  |,Y....JSRsendlin|
000002b0  65 3a 52 54 53 0d 01 0e  1e 2e 6e 6f 63 6f 64 65  |e:RTS.....nocode|
000002c0  20 4a 4d 50 3f 26 32 30  30 2b 3f 26 32 30 31 2a  | JMP?&200+?&201*|
000002d0  32 35 36 0d 01 18 05 20  0d 01 22 36 2e 63 6c 6f  |256.... .."6.clo|
000002e0  73 65 64 6f 77 6e 20 4c  44 41 23 3f 26 32 30 45  |sedown LDA#?&20E|
000002f0  3a 53 54 41 26 32 30 45  3a 4c 44 41 23 3f 26 32  |:STA&20E:LDA#?&2|
00000300  30 46 3a 53 54 41 26 32  30 46 3a 52 54 53 0d 01  |0F:STA&20F:RTS..|
00000310  2c 05 20 0d 01 36 0e 2e  70 72 69 6e 74 20 50 48  |,. ..6..print PH|
00000320  50 0d 01 40 07 50 48 41  0d 01 4a 07 54 58 41 0d  |P..@.PHA..J.TXA.|
00000330  01 54 07 50 48 41 0d 01  5e 07 54 59 41 0d 01 68  |.T.PHA..^.TYA..h|
00000340  07 50 48 41 0d 01 72 1d  54 53 58 3a 49 4e 58 3a  |.PHA..r.TSX:INX:|
00000350  49 4e 58 3a 49 4e 58 3a  4c 44 41 26 31 30 30 2c  |INX:INX:LDA&100,|
00000360  58 0d 01 7c 16 4c 44 59  70 74 72 3a 53 54 41 62  |X..|.LDYptr:STAb|
00000370  75 66 66 65 72 2c 59 0d  01 86 35 43 4d 50 23 26  |uffer,Y...5CMP#&|
00000380  30 41 3a 42 43 43 63 6d  70 3a 43 4d 50 23 26 30  |0A:BCCcmp:CMP#&0|
00000390  45 3a 42 43 53 63 6d 70  3a 4a 53 52 73 65 6e 64  |E:BCScmp:JSRsend|
000003a0  6c 69 6e 65 3a 4a 4d 50  65 78 69 74 0d 01 90 2e  |line:JMPexit....|
000003b0  2e 63 6d 70 20 49 4e 59  3a 53 54 59 70 74 72 3a  |.cmp INY:STYptr:|
000003c0  43 50 59 23 38 30 3a 42  4e 45 65 78 69 74 3a 4a  |CPY#80:BNEexit:J|
000003d0  53 52 73 65 6e 64 6c 69  6e 65 0d 01 9a 1d 2e 65  |SRsendline.....e|
000003e0  78 69 74 20 50 4c 41 3a  54 41 59 3a 50 4c 41 3a  |xit PLA:TAY:PLA:|
000003f0  54 41 58 3a 50 4c 41 0d  01 a4 1a 50 4c 50 3a 4a  |TAX:PLA....PLP:J|
00000400  4d 50 3f 26 32 30 45 2b  3f 26 32 30 46 2a 32 35  |MP?&20E+?&20F*25|
00000410  36 0d 01 ae 05 20 0d 01  b8 27 2e 73 65 6e 64 6c  |6.... ...'.sendl|
00000420  69 6e 65 20 4c 44 41 23  32 3a 4a 53 52 20 3f 26  |ine LDA#2:JSR ?&|
00000430  32 30 45 2b 3f 26 32 30  46 2a 32 35 36 0d 01 c2  |20E+?&20F*256...|
00000440  1d 4c 44 41 70 74 72 3a  42 4e 45 6e 6f 74 7a 65  |.LDAptr:BNEnotze|
00000450  72 6f 3a 4a 4d 50 6f 75  74 32 0d 01 cc 29 2e 6e  |ro:JMPout2...).n|
00000460  6f 74 7a 65 72 6f 20 4c  44 41 23 97 22 31 22 3a  |otzero LDA#."1":|
00000470  53 54 41 66 69 6c 65 6e  61 6d 65 2b 33 3a 4c 44  |STAfilename+3:LD|
00000480  58 23 33 0d 01 d6 56 2e  63 74 72 6c 31 20 4c 44  |X#3...V.ctrl1 LD|
00000490  41 23 31 3a 4a 53 52 20  3f 26 32 30 45 2b 3f 26  |A#1:JSR ?&20E+?&|
000004a0  32 30 46 2a 32 35 36 3a  4c 44 41 63 74 72 6c 63  |20F*256:LDActrlc|
000004b0  6f 64 65 31 2d 31 2c 58  3a 4a 53 52 20 3f 26 32  |ode1-1,X:JSR ?&2|
000004c0  30 45 2b 3f 26 32 30 46  2a 32 35 36 3a 44 45 58  |0E+?&20F*256:DEX|
000004d0  3a 42 4e 45 63 74 72 6c  31 0d 01 e0 42 2e 6e 65  |:BNEctrl1...B.ne|
000004e0  78 74 66 69 6c 65 20 4c  44 59 23 66 69 6c 65 6e  |xtfile LDY#filen|
000004f0  61 6d 65 20 81 32 35 36  3a 4c 44 58 23 66 69 6c  |ame .256:LDX#fil|
00000500  65 6e 61 6d 65 20 83 32  35 36 3a 4c 44 41 23 26  |ename .256:LDA#&|
00000510  34 30 3a 4a 53 52 26 46  46 43 45 0d 01 ea 13 43  |40:JSR&FFCE....C|
00000520  4d 50 23 30 3a 42 4e 45  66 69 6c 65 6f 6b 0d 01  |MP#0:BNEfileok..|
00000530  f4 49 4c 44 41 23 33 3a  4a 53 52 20 3f 26 32 30  |.ILDA#3:JSR ?&20|
00000540  45 2b 3f 26 32 30 46 2a  32 35 36 3a 4c 44 41 66  |E+?&20F*256:LDAf|
00000550  69 6c 65 6e 61 6d 65 2b  33 3a 53 54 41 65 72 72  |ilename+3:STAerr|
00000560  6f 72 2b 38 3a 4a 53 52  63 6c 6f 73 65 64 6f 77  |or+8:JSRclosedow|
00000570  6e 3a 42 52 4b 3a 5d 0d  01 fe 38 45 25 3d a4 65  |n:BRK:]...8E%=.e|
00000580  71 75 62 28 32 35 35 29  3a 65 72 72 6f 72 3d a4  |qub(255):error=.|
00000590  65 71 75 73 28 22 46 69  6c 65 20 4e 4c 51 58 20  |equs("File NLQX |
000005a0  6e 6f 74 20 66 6f 75 6e  64 2e 22 2b bd 30 29 0d  |not found."+.0).|
000005b0  02 08 0a 5b 4f 50 54 49  25 0d 02 12 23 2e 66 69  |...[OPTI%...#.fi|
000005c0  6c 65 6f 6b 20 53 54 41  68 61 6e 64 6c 65 3a 4c  |leok STAhandle:L|
000005d0  44 59 23 30 3a 53 54 59  70 74 72 32 0d 02 1c 3e  |DY#0:STYptr2...>|
000005e0  2e 67 65 74 63 68 72 73  20 4c 44 41 62 75 66 66  |.getchrs LDAbuff|
000005f0  65 72 2c 59 3a 80 23 26  37 46 3a 43 4d 50 23 33  |er,Y:.#&7F:CMP#3|
00000600  33 3a 42 43 43 6e 6f 74  6e 6c 71 3a 43 4d 50 23  |3:BCCnotnlq:CMP#|
00000610  31 32 37 3a 42 4e 45 6e  6c 71 0d 02 26 4d 2e 6e  |127:BNEnlq..&M.n|
00000620  6f 74 6e 6c 71 20 54 41  58 3a 4c 44 41 23 31 3a  |otnlq TAX:LDA#1:|
00000630  4a 53 52 20 3f 26 32 30  45 2b 3f 26 32 30 46 2a  |JSR ?&20E+?&20F*|
00000640  32 35 36 3a 54 58 41 3a  4a 53 52 20 3f 26 32 30  |256:TXA:JSR ?&20|
00000650  45 2b 3f 26 32 30 46 2a  32 35 36 3a 4a 4d 50 6e  |E+?&20F*256:JMPn|
00000660  65 78 74 63 68 72 73 0d  02 30 12 2e 6e 6c 71 20  |extchrs..0..nlq |
00000670  50 48 41 3a 4c 44 58 23  34 0d 02 3a 56 2e 63 74  |PHA:LDX#4..:V.ct|
00000680  72 6c 32 20 4c 44 41 23  31 3a 4a 53 52 20 3f 26  |rl2 LDA#1:JSR ?&|
00000690  32 30 45 2b 3f 26 32 30  46 2a 32 35 36 3a 4c 44  |20E+?&20F*256:LD|
000006a0  41 63 74 72 6c 63 6f 64  65 32 2d 31 2c 58 3a 4a  |Actrlcode2-1,X:J|
000006b0  53 52 20 3f 26 32 30 45  2b 3f 26 32 30 46 2a 32  |SR ?&20E+?&20F*2|
000006c0  35 36 3a 44 45 58 3a 42  4e 45 63 74 72 6c 32 0d  |56:DEX:BNEctrl2.|
000006d0  02 44 45 4c 44 41 23 26  46 34 3a 53 54 41 66 70  |.DELDA#&F4:STAfp|
000006e0  74 72 3a 4c 44 41 23 26  46 46 3a 53 54 41 66 70  |tr:LDA#&FF:STAfp|
000006f0  74 72 2b 31 3a 4c 44 41  23 30 3a 53 54 41 66 70  |tr+1:LDA#0:STAfp|
00000700  74 72 2b 32 3a 4c 44 41  23 30 3a 53 54 41 66 70  |tr+2:LDA#0:STAfp|
00000710  74 72 2b 33 0d 02 4e 16  50 4c 41 3a 53 45 43 3a  |tr+3..N.PLA:SEC:|
00000720  53 42 43 23 33 32 3a 54  41 58 0d 02 58 4c 2e 61  |SBC#32:TAX..XL.a|
00000730  64 64 31 32 20 4c 44 41  66 70 74 72 3a 43 4c 43  |dd12 LDAfptr:CLC|
00000740  3a 41 44 43 23 31 32 3a  53 54 41 66 70 74 72 3a  |:ADC#12:STAfptr:|
00000750  4c 44 41 66 70 74 72 2b  31 3a 41 44 43 23 30 3a  |LDAfptr+1:ADC#0:|
00000760  53 54 41 66 70 74 72 2b  31 3a 44 45 58 3a 42 4e  |STAfptr+1:DEX:BN|
00000770  45 61 64 64 31 32 0d 02  62 2d 4c 44 58 23 66 70  |Eadd12..b-LDX#fp|
00000780  74 72 3a 4c 44 59 20 68  61 6e 64 6c 65 3a 4c 44  |tr:LDY handle:LD|
00000790  41 23 31 3a 4a 53 52 26  46 46 44 41 3a 4c 44 58  |A#1:JSR&FFDA:LDX|
000007a0  23 31 32 0d 02 6c 54 2e  6e 65 78 74 62 79 74 65  |#12..lT.nextbyte|
000007b0  20 4c 44 41 23 31 3a 4a  53 52 20 3f 26 32 30 45  | LDA#1:JSR ?&20E|
000007c0  2b 3f 26 32 30 46 2a 32  35 36 3a 4a 53 52 26 46  |+?&20F*256:JSR&F|
000007d0  46 44 37 3a 4a 53 52 20  3f 26 32 30 45 2b 3f 26  |FD7:JSR ?&20E+?&|
000007e0  32 30 46 2a 32 35 36 3a  44 45 58 3a 42 4e 45 6e  |20F*256:DEX:BNEn|
000007f0  65 78 74 62 79 74 65 0d  02 76 33 2e 6e 65 78 74  |extbyte..v3.next|
00000800  63 68 72 73 20 4c 44 59  70 74 72 32 3a 49 4e 59  |chrs LDYptr2:INY|
00000810  3a 53 54 59 70 74 72 32  3a 43 50 59 70 74 72 3a  |:STYptr2:CPYptr:|
00000820  42 4e 45 67 65 74 63 68  72 73 0d 02 80 1c 4c 44  |BNEgetchrs....LD|
00000830  59 68 61 6e 64 6c 65 3a  4c 44 41 23 30 3a 4a 53  |Yhandle:LDA#0:JS|
00000840  52 26 46 46 43 45 0d 02  8a 70 49 4e 43 66 69 6c  |R&FFCE...pINCfil|
00000850  65 6e 61 6d 65 2b 33 3a  4c 44 41 66 69 6c 65 6e  |ename+3:LDAfilen|
00000860  61 6d 65 2b 33 3a 43 4d  50 23 97 22 34 22 3a 42  |ame+3:CMP#."4":B|
00000870  45 51 6f 75 74 3a 4c 44  41 23 31 3a 4a 53 52 20  |EQout:LDA#1:JSR |
00000880  3f 26 32 30 45 2b 3f 26  32 30 46 2a 32 35 36 3a  |?&20E+?&20F*256:|
00000890  4c 44 41 23 31 33 3a 4a  53 52 20 3f 26 32 30 45  |LDA#13:JSR ?&20E|
000008a0  2b 3f 26 32 30 46 2a 32  35 36 3a 4a 4d 50 6e 65  |+?&20F*256:JMPne|
000008b0  78 74 66 69 6c 65 0d 02  94 0e 2e 6f 75 74 20 4c  |xtfile.....out L|
000008c0  44 58 23 33 0d 02 9e 56  2e 63 74 72 6c 33 20 4c  |DX#3...V.ctrl3 L|
000008d0  44 41 23 31 3a 4a 53 52  20 3f 26 32 30 45 2b 3f  |DA#1:JSR ?&20E+?|
000008e0  26 32 30 46 2a 32 35 36  3a 4c 44 41 63 74 72 6c  |&20F*256:LDActrl|
000008f0  63 6f 64 65 33 2d 31 2c  58 3a 4a 53 52 20 3f 26  |code3-1,X:JSR ?&|
00000900  32 30 45 2b 3f 26 32 30  46 2a 32 35 36 3a 44 45  |20E+?&20F*256:DE|
00000910  58 3a 42 4e 45 63 74 72  6c 33 0d 02 a8 8f 2e 6f  |X:BNEctrl3.....o|
00000920  75 74 32 20 4c 44 41 23  26 46 36 3a 4c 44 58 23  |ut2 LDA#&F6:LDX#|
00000930  30 3a 4c 44 59 23 26 46  46 3a 4a 53 52 26 46 46  |0:LDY#&FF:JSR&FF|
00000940  46 34 3a 4c 44 59 70 74  72 3a 54 58 41 3a 43 4d  |F4:LDYptr:TXA:CM|
00000950  50 62 75 66 66 65 72 2c  59 3a 42 45 51 6e 6c 61  |Pbuffer,Y:BEQnla|
00000960  73 74 63 68 72 3a 4c 44  41 23 31 3a 4a 53 52 20  |stchr:LDA#1:JSR |
00000970  3f 26 32 30 45 2b 3f 26  32 30 46 2a 32 35 36 3a  |?&20E+?&20F*256:|
00000980  4c 44 41 62 75 66 66 65  72 2c 59 3a 4a 53 52 20  |LDAbuffer,Y:JSR |
00000990  3f 26 32 30 45 2b 3f 26  32 30 46 2a 32 35 36 3a  |?&20E+?&20F*256:|
000009a0  2e 6e 6c 61 73 74 63 68  72 0d 02 b2 10 4c 44 41  |.nlastchr....LDA|
000009b0  23 30 3a 53 54 41 70 74  72 0d 02 bc 1d 4c 44 41  |#0:STAptr....LDA|
000009c0  23 33 3a 4a 53 52 20 3f  26 32 30 45 2b 3f 26 32  |#3:JSR ?&20E+?&2|
000009d0  30 46 2a 32 35 36 0d 02  c6 09 52 54 53 3a 5d 0d  |0F*256....RTS:].|
000009e0  02 d0 1f 66 69 6c 65 6e  61 6d 65 3d a4 65 71 75  |...filename=.equ|
000009f0  73 28 22 4e 4c 51 33 22  2b bd 26 30 44 29 0d 02  |s("NLQ3"+.&0D)..|
00000a00  da 13 68 61 6e 64 6c 65  3d a4 65 71 75 62 28 30  |..handle=.equb(0|
00000a10  29 0d 02 e4 10 70 74 72  3d a4 65 71 75 62 28 30  |)....ptr=.equb(0|
00000a20  29 0d 02 ee 11 70 74 72  32 3d a4 65 71 75 62 28  |)....ptr2=.equb(|
00000a30  30 29 0d 02 f8 20 62 75  66 66 65 72 3d a4 65 71  |0)... buffer=.eq|
00000a40  75 73 28 28 c4 38 30 2c  22 20 22 29 29 2b bd 31  |us((.80," "))+.1|
00000a50  33 29 0d 03 02 28 63 74  72 6c 63 6f 64 65 31 3d  |3)...(ctrlcode1=|
00000a60  a4 65 71 75 77 28 26 33  33 30 31 29 3a 45 25 3d  |.equw(&3301):E%=|
00000a70  a4 65 71 75 62 28 26 31  42 29 0d 03 0c 1e 63 74  |.equb(&1B)....ct|
00000a80  72 6c 63 6f 64 65 32 3d  a4 65 71 75 64 28 26 31  |rlcode2=.equd(&1|
00000a90  42 34 43 30 43 30 30 29  0d 03 16 28 63 74 72 6c  |B4C0C00)...(ctrl|
00000aa0  63 6f 64 65 33 3d a4 65  71 75 77 28 26 34 31 30  |code3=.equw(&410|
00000ab0  43 29 3a 45 25 3d a4 65  71 75 62 28 26 31 42 29  |C):E%=.equb(&1B)|
00000ac0  0d 03 20 05 ed 0d 03 2a  27 f2 6f 73 63 6c 69 28  |.. ....*'.oscli(|
00000ad0  22 53 41 2e 20 4e 4c 51  20 22 2b c3 7e 73 74 61  |"SA. NLQ "+.~sta|
00000ae0  72 74 2b 22 20 22 2b c3  7e 50 25 29 0d 03 34 a5  |rt+" "+.~P%)..4.|
00000af0  f1 27 bd 31 33 33 2b 22  4d 61 63 68 69 6e 65 20  |.'.133+"Machine |
00000b00  63 6f 64 65 20 66 69 6c  65 20 22 22 4e 4c 51 22  |code file ""NLQ"|
00000b10  22 20 73 61 76 65 64 20  74 6f 20 64 69 73 63 2e  |" saved to disc.|
00000b20  22 27 27 bd 31 32 39 2b  bd 31 35 37 2b bd 31 33  |"''.129+.157+.13|
00000b30  31 2b c4 33 30 2c 22 20  22 29 2b bd 31 35 36 27  |1+.30," ")+.156'|
00000b40  bd 31 32 39 2b bd 31 35  37 2b bd 31 33 31 2b 22  |.129+.157+.131+"|
00000b50  54 79 70 65 20 2a 4e 4c  51 20 74 6f 20 6c 6f 61  |Type *NLQ to loa|
00000b60  64 20 61 6e 64 20 73 65  74 75 70 2e 20 20 22 2b  |d and setup.  "+|
00000b70  bd 31 35 36 27 bd 31 32  39 2b bd 31 35 37 2b bd  |.156'.129+.157+.|
00000b80  31 33 31 2b c4 33 30 2c  22 20 22 29 2b bd 31 35  |131+.30," ")+.15|
00000b90  36 0d 03 3e a3 f1 bd 31  32 39 2b bd 31 35 37 2b  |6..>...129+.157+|
00000ba0  bd 31 33 31 2b 22 2a 43  4f 44 45 20 31 2c 59 20  |.131+"*CODE 1,Y |
00000bb0  74 6f 20 73 74 61 72 74  20 70 72 69 6e 74 6f 75  |to start printou|
00000bc0  74 2e 20 20 22 2b bd 31  35 36 27 bd 31 32 39 2b  |t.  "+.156'.129+|
00000bd0  bd 31 35 37 2b bd 31 33  31 2b 22 28 59 20 69 73  |.157+.131+"(Y is|
00000be0  20 74 68 65 20 6c 69 6e  65 20 66 65 65 64 20 70  | the line feed p|
00000bf0  69 74 63 68 20 69 6e 20  20 22 2b bd 31 35 36 27  |itch in  "+.156'|
00000c00  bd 31 32 39 2b bd 31 35  37 2b bd 31 33 31 2b 22  |.129+.157+.131+"|
00000c10  31 2f 37 32 20 6f 66 20  61 6e 20 69 6e 63 68 2e  |1/72 of an inch.|
00000c20  29 20 20 20 20 20 20 20  20 20 20 20 20 20 22 2b  |)             "+|
00000c30  bd 31 35 36 0d 03 48 73  f1 bd 31 32 39 2b bd 31  |.156..Hs..129+.1|
00000c40  35 37 2b bd 31 33 31 2b  c4 33 30 2c 22 20 22 29  |57+.131+.30," ")|
00000c50  2b bd 31 35 36 27 bd 31  32 39 2b bd 31 35 37 2b  |+.156'.129+.157+|
00000c60  bd 31 33 31 2b 22 2a 43  4f 44 45 20 30 20 74 6f  |.131+"*CODE 0 to|
00000c70  20 68 61 6c 74 20 70 72  69 6e 74 6f 75 74 2e 20  | halt printout. |
00000c80  20 20 20 20 22 2b bd 31  35 36 27 bd 31 32 39 2b  |    "+.156'.129+|
00000c90  bd 31 35 37 2b bd 31 33  31 2b c4 33 30 2c 22 20  |.157+.131+.30," |
00000ca0  22 29 2b bd 31 35 36 0d  03 52 05 f1 0d 03 5c 05  |")+.156..R....\.|
00000cb0  e0 0d 03 66 05 20 0d 03  70 0f dd f2 6f 73 63 6c  |...f. ..p...oscl|
00000cc0  69 28 4f 24 29 0d 03 7a  0a 24 4f 25 3d 4f 24 0d  |i(O$)..z.$O%=O$.|
00000cd0  03 84 17 58 25 3d 4f 25  83 32 35 36 3a 59 25 3d  |...X%=O%.256:Y%=|
00000ce0  4f 25 81 32 35 36 0d 03  8e 0a d6 26 46 46 46 37  |O%.256.....&FFF7|
00000cf0  0d 03 98 05 e1 0d 03 a2  05 20 0d 03 ac 0e dd a4  |......... ......|
00000d00  65 71 75 62 28 42 25 29  0d 03 b6 12 3f 50 25 3d  |equb(B%)....?P%=|
00000d10  42 25 3a 50 25 3d 50 25  2b 31 0d 03 c0 09 3d 50  |B%:P%=P%+1....=P|
00000d20  25 2d 31 0d 03 ca 05 20  0d 03 d4 0e dd a4 65 71  |%-1.... ......eq|
00000d30  75 77 28 42 25 29 0d 03  de 1a 3f 50 25 3d 42 25  |uw(B%)....?P%=B%|
00000d40  83 32 35 36 3a 50 25 3f  31 3d 42 25 81 32 35 36  |.256:P%?1=B%.256|
00000d50  0d 03 e8 0b 50 25 3d 50  25 2b 32 0d 03 f2 09 3d  |....P%=P%+2....=|
00000d60  50 25 2d 32 0d 03 fc 05  20 0d 04 06 0e dd a4 65  |P%-2.... ......e|
00000d70  71 75 64 28 42 25 29 0d  04 10 12 21 50 25 3d 42  |qud(B%)....!P%=B|
00000d80  25 3a 50 25 3d 50 25 2b  34 0d 04 1a 09 3d 50 25  |%:P%=P%+4....=P%|
00000d90  2d 34 0d 04 24 05 20 0d  04 2e 0e dd a4 65 71 75  |-4..$. ......equ|
00000da0  73 28 4f 24 29 0d 04 38  14 24 50 25 3d 4f 24 3a  |s(O$)..8.$P%=O$:|
00000db0  50 25 3d 50 25 2b a9 4f  24 0d 04 42 0b 3d 50 25  |P%=P%+.O$..B.=P%|
00000dc0  2d a9 4f 24 0d ff                                 |-.O$..|
00000dc6
Utils/NLQ\ASS.m0
Utils/NLQ\ASS.m1
Utils/NLQ\ASS.m2
Utils/NLQ\ASS.m4
Utils/NLQ\ASS.m5