Home » Personal collection » Acorn tapes » Own_Work » box02_tape04b_c15_acorn_print_utils_2.wav » B.Driver2

B.Driver2

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 » Personal collection » Acorn tapes » Own_Work » box02_tape04b_c15_acorn_print_utils_2.wav
Filename: B.Driver2
Read OK:
File size: 05E8 bytes
Load address: FFFF0E00
Exec address: FFFF8023
Duplicates

There are 3 duplicate copies of this file in the archive:

File contents
   10a$="Printer Driver II"
   20REM By Julie Boswell
   30REM (c) Electron User
   40MODE 6
   50ESC=27
   60PRINT''''a$
   70INPUT'"Input pad character:"pad$
   80areg=&90:yreg=&91
   90FOR pass=4 TO 6 STEP 2
  100P%=&400:O%=&C00
  110[OPT pass
  120JMP print_char
  130JMP printer_on
  140JMP printer_off
  150JMP exit
  160JMP exit
  170 
  180.on EQUB 0
  190 
  200.print
  210PHA
  220LDA #1:JSR &FFEE
  230PLA
  240AND #&7F:JMP &FFEE
  250 
  260.printer_off
  270LDA #0:STA on
  280LDA #3:JMP &FFEE
  290 
  300.printer_on
  310LDA on:BNE exit
  320INC on
  330LDA #2:JSR &FFEE
  340LDA #ESC:JSR print
  350LDA #ASC"@":JSR print
  360.exit
  370RTS
  380 
  390.print_char
  395 STY yreg
  430CMP #128:BPL highlight
  435 LDY highno:BNE high
  436 LDY yreg
  440JMP &FFE3
  450.highlight
  460CMP #144:BCS exit
  461 LDY highno:BEQ change:CMP highchar:BNE high:.change STA highchar:INC highno:LDY yreg:JMP exit:.high
  470STA areg
  475 TYA:CLC:ADC#127:LDY#0:STYhighno
  480AND #&7F:ASL A:ASL A:TAY
  490LDA table+1,Y:EOR #&80:STA table+1,Y
  500AND #&80:BNE here
  510INY:INY
  520.here
  530LDA table,Y:AND #&80:BEQ no_esc
  540LDA #27:JSR print
  550.no_esc
  560LDA table,Y:JSR print
  570LDA table+1,Y:JSR print
  580LDA areg:LDY yreg
  585 CMP#128:BPL highlight
  590 JMP &FFE3
  600 .highno EQUB0
  605 .highchar EQUB0
  610.table
  620]
  630NEXT
  640i=128
  650PRINT'"Enter highlight ";i;"(Y/N)?";
  660IF INSTR("Nn",GET$) OSCLI"SAVE Driver2 C00 D00":END
  670INPUT LINE'" On:"a$
  680INPUT LINE "Off:"b$
  690!O%=FNcode(a$)+&10000*FNcode(b$)
  700O%=O%+4:i=i+1
  710GOTO 650
  720 
  730DEF FNcode(a$)
  740C%=0
  750I%=INSTR(a$,",")
  760C%=C% OR EVAL(a$)
  770IF I%=0 THEN =C%
  780a$=MID$(a$,I%+1)
  790IF C%<>27 THEN =C%+&100*EVAL(a$)
  800C%=&80:GOTO 750

a$="Printer Driver II"
� By Julie Boswell
� (c) Electron User
(� 6
2
ESC=27
<�''''a$
F �'"Input pad character:"pad$
Pareg=&90:yreg=&91
Z� pass=4 � 6 � 2
dP%=&400:O%=&C00
n
[OPT pass
xJMP print_char
�JMP printer_on
�JMP printer_off
�JMP exit
�JMP exit
� 
�.on EQUB 0
� 
�
.print
�PHA
�LDA #1:JSR &FFEE
�PLA
�� #&7F:JMP &FFEE
� 
.printer_off
LDA #0:STA on
LDA #3:JMP &FFEE
" 
,.printer_on
6LDA on:BNE exit
@
INC on
JLDA #2:JSR &FFEE
TLDA #ESC:JSR print
^LDA #�"@":JSR print
h	.exit
rRTS
| 
�.print_char
�
 STY yreg
�CMP #128:BPL highlight
� LDY highno:BNE high
�
 LDY yreg
�
JMP &FFE3
�.highlight
�CMP #144:BCS exit
�h LDY highno:BEQ change:CMP highchar:BNE high:.change STA highchar:INC highno:LDY yreg:JMP exit:.high
�STA areg
�$ TYA:CLC:ADC#127:LDY#0:STYhighno
�� #&7F:ASL A:ASL A:TAY
�&LDA table+1,Y:� #&80:STA table+1,Y
�� #&80:BNE here
�INY:INY
	.here
!LDA table,Y:� #&80:BEQ no_esc
LDA #27:JSR print
&.no_esc
0LDA table,Y:JSR print
:LDA table+1,Y:JSR print
DLDA areg:LDY yreg
I CMP#128:BPL highlight
N JMP &FFE3
X .highno EQUB0
] .highchar EQUB0
b
.table
l]
v�
�	i=128
�$�'"Enter highlight ";i;"(Y/N)?";
�(� �"Nn",�) �"SAVE Driver2 C00 D00":�
�� �'" On:"a$
�� � "Off:"b$
�"!O%=�code(a$)+&10000*�code(b$)
�O%=O%+4:i=i+1
�
� �tJB
� 
�� �code(a$)
�C%=0
�I%=�a$,",")
�C%=C% � �(a$)
� I%=0 � =C%
a$=�a$,I%+1)
� C%<>27 � =C%+&100*�(a$)
 C%=&80:� �dnB
�
00000000  0d 00 0a 1a 61 24 3d 22  50 72 69 6e 74 65 72 20  |....a$="Printer |
00000010  44 72 69 76 65 72 20 49  49 22 0d 00 14 16 f4 20  |Driver II"..... |
00000020  42 79 20 4a 75 6c 69 65  20 42 6f 73 77 65 6c 6c  |By Julie Boswell|
00000030  0d 00 1e 17 f4 20 28 63  29 20 45 6c 65 63 74 72  |..... (c) Electr|
00000040  6f 6e 20 55 73 65 72 0d  00 28 07 eb 20 36 0d 00  |on User..(.. 6..|
00000050  32 0a 45 53 43 3d 32 37  0d 00 3c 0b f1 27 27 27  |2.ESC=27..<..'''|
00000060  27 61 24 0d 00 46 20 e8  27 22 49 6e 70 75 74 20  |'a$..F .'"Input |
00000070  70 61 64 20 63 68 61 72  61 63 74 65 72 3a 22 70  |pad character:"p|
00000080  61 64 24 0d 00 50 15 61  72 65 67 3d 26 39 30 3a  |ad$..P.areg=&90:|
00000090  79 72 65 67 3d 26 39 31  0d 00 5a 14 e3 20 70 61  |yreg=&91..Z.. pa|
000000a0  73 73 3d 34 20 b8 20 36  20 88 20 32 0d 00 64 13  |ss=4 . 6 . 2..d.|
000000b0  50 25 3d 26 34 30 30 3a  4f 25 3d 26 43 30 30 0d  |P%=&400:O%=&C00.|
000000c0  00 6e 0d 5b 4f 50 54 20  70 61 73 73 0d 00 78 12  |.n.[OPT pass..x.|
000000d0  4a 4d 50 20 70 72 69 6e  74 5f 63 68 61 72 0d 00  |JMP print_char..|
000000e0  82 12 4a 4d 50 20 70 72  69 6e 74 65 72 5f 6f 6e  |..JMP printer_on|
000000f0  0d 00 8c 13 4a 4d 50 20  70 72 69 6e 74 65 72 5f  |....JMP printer_|
00000100  6f 66 66 0d 00 96 0c 4a  4d 50 20 65 78 69 74 0d  |off....JMP exit.|
00000110  00 a0 0c 4a 4d 50 20 65  78 69 74 0d 00 aa 05 20  |...JMP exit.... |
00000120  0d 00 b4 0e 2e 6f 6e 20  45 51 55 42 20 30 0d 00  |.....on EQUB 0..|
00000130  be 05 20 0d 00 c8 0a 2e  70 72 69 6e 74 0d 00 d2  |.. .....print...|
00000140  07 50 48 41 0d 00 dc 14  4c 44 41 20 23 31 3a 4a  |.PHA....LDA #1:J|
00000150  53 52 20 26 46 46 45 45  0d 00 e6 07 50 4c 41 0d  |SR &FFEE....PLA.|
00000160  00 f0 14 80 20 23 26 37  46 3a 4a 4d 50 20 26 46  |.... #&7F:JMP &F|
00000170  46 45 45 0d 00 fa 05 20  0d 01 04 10 2e 70 72 69  |FEE.... .....pri|
00000180  6e 74 65 72 5f 6f 66 66  0d 01 0e 11 4c 44 41 20  |nter_off....LDA |
00000190  23 30 3a 53 54 41 20 6f  6e 0d 01 18 14 4c 44 41  |#0:STA on....LDA|
000001a0  20 23 33 3a 4a 4d 50 20  26 46 46 45 45 0d 01 22  | #3:JMP &FFEE.."|
000001b0  05 20 0d 01 2c 0f 2e 70  72 69 6e 74 65 72 5f 6f  |. ..,..printer_o|
000001c0  6e 0d 01 36 13 4c 44 41  20 6f 6e 3a 42 4e 45 20  |n..6.LDA on:BNE |
000001d0  65 78 69 74 0d 01 40 0a  49 4e 43 20 6f 6e 0d 01  |exit..@.INC on..|
000001e0  4a 14 4c 44 41 20 23 32  3a 4a 53 52 20 26 46 46  |J.LDA #2:JSR &FF|
000001f0  45 45 0d 01 54 16 4c 44  41 20 23 45 53 43 3a 4a  |EE..T.LDA #ESC:J|
00000200  53 52 20 70 72 69 6e 74  0d 01 5e 17 4c 44 41 20  |SR print..^.LDA |
00000210  23 97 22 40 22 3a 4a 53  52 20 70 72 69 6e 74 0d  |#."@":JSR print.|
00000220  01 68 09 2e 65 78 69 74  0d 01 72 07 52 54 53 0d  |.h..exit..r.RTS.|
00000230  01 7c 05 20 0d 01 86 0f  2e 70 72 69 6e 74 5f 63  |.|. .....print_c|
00000240  68 61 72 0d 01 8b 0d 20  53 54 59 20 79 72 65 67  |har.... STY yreg|
00000250  0d 01 ae 1a 43 4d 50 20  23 31 32 38 3a 42 50 4c  |....CMP #128:BPL|
00000260  20 68 69 67 68 6c 69 67  68 74 0d 01 b3 18 20 4c  | highlight.... L|
00000270  44 59 20 68 69 67 68 6e  6f 3a 42 4e 45 20 68 69  |DY highno:BNE hi|
00000280  67 68 0d 01 b4 0d 20 4c  44 59 20 79 72 65 67 0d  |gh.... LDY yreg.|
00000290  01 b8 0d 4a 4d 50 20 26  46 46 45 33 0d 01 c2 0e  |...JMP &FFE3....|
000002a0  2e 68 69 67 68 6c 69 67  68 74 0d 01 cc 15 43 4d  |.highlight....CM|
000002b0  50 20 23 31 34 34 3a 42  43 53 20 65 78 69 74 0d  |P #144:BCS exit.|
000002c0  01 cd 68 20 4c 44 59 20  68 69 67 68 6e 6f 3a 42  |..h LDY highno:B|
000002d0  45 51 20 63 68 61 6e 67  65 3a 43 4d 50 20 68 69  |EQ change:CMP hi|
000002e0  67 68 63 68 61 72 3a 42  4e 45 20 68 69 67 68 3a  |ghchar:BNE high:|
000002f0  2e 63 68 61 6e 67 65 20  53 54 41 20 68 69 67 68  |.change STA high|
00000300  63 68 61 72 3a 49 4e 43  20 68 69 67 68 6e 6f 3a  |char:INC highno:|
00000310  4c 44 59 20 79 72 65 67  3a 4a 4d 50 20 65 78 69  |LDY yreg:JMP exi|
00000320  74 3a 2e 68 69 67 68 0d  01 d6 0c 53 54 41 20 61  |t:.high....STA a|
00000330  72 65 67 0d 01 db 24 20  54 59 41 3a 43 4c 43 3a  |reg...$ TYA:CLC:|
00000340  41 44 43 23 31 32 37 3a  4c 44 59 23 30 3a 53 54  |ADC#127:LDY#0:ST|
00000350  59 68 69 67 68 6e 6f 0d  01 e0 1a 80 20 23 26 37  |Yhighno..... #&7|
00000360  46 3a 41 53 4c 20 41 3a  41 53 4c 20 41 3a 54 41  |F:ASL A:ASL A:TA|
00000370  59 0d 01 ea 26 4c 44 41  20 74 61 62 6c 65 2b 31  |Y...&LDA table+1|
00000380  2c 59 3a 82 20 23 26 38  30 3a 53 54 41 20 74 61  |,Y:. #&80:STA ta|
00000390  62 6c 65 2b 31 2c 59 0d  01 f4 13 80 20 23 26 38  |ble+1,Y..... #&8|
000003a0  30 3a 42 4e 45 20 68 65  72 65 0d 01 fe 0b 49 4e  |0:BNE here....IN|
000003b0  59 3a 49 4e 59 0d 02 08  09 2e 68 65 72 65 0d 02  |Y:INY.....here..|
000003c0  12 21 4c 44 41 20 74 61  62 6c 65 2c 59 3a 80 20  |.!LDA table,Y:. |
000003d0  23 26 38 30 3a 42 45 51  20 6e 6f 5f 65 73 63 0d  |#&80:BEQ no_esc.|
000003e0  02 1c 15 4c 44 41 20 23  32 37 3a 4a 53 52 20 70  |...LDA #27:JSR p|
000003f0  72 69 6e 74 0d 02 26 0b  2e 6e 6f 5f 65 73 63 0d  |rint..&..no_esc.|
00000400  02 30 19 4c 44 41 20 74  61 62 6c 65 2c 59 3a 4a  |.0.LDA table,Y:J|
00000410  53 52 20 70 72 69 6e 74  0d 02 3a 1b 4c 44 41 20  |SR print..:.LDA |
00000420  74 61 62 6c 65 2b 31 2c  59 3a 4a 53 52 20 70 72  |table+1,Y:JSR pr|
00000430  69 6e 74 0d 02 44 15 4c  44 41 20 61 72 65 67 3a  |int..D.LDA areg:|
00000440  4c 44 59 20 79 72 65 67  0d 02 49 1a 20 43 4d 50  |LDY yreg..I. CMP|
00000450  23 31 32 38 3a 42 50 4c  20 68 69 67 68 6c 69 67  |#128:BPL highlig|
00000460  68 74 0d 02 4e 0e 20 4a  4d 50 20 26 46 46 45 33  |ht..N. JMP &FFE3|
00000470  0d 02 58 12 20 2e 68 69  67 68 6e 6f 20 45 51 55  |..X. .highno EQU|
00000480  42 30 0d 02 5d 14 20 2e  68 69 67 68 63 68 61 72  |B0..]. .highchar|
00000490  20 45 51 55 42 30 0d 02  62 0a 2e 74 61 62 6c 65  | EQUB0..b..table|
000004a0  0d 02 6c 05 5d 0d 02 76  05 ed 0d 02 80 09 69 3d  |..l.]..v......i=|
000004b0  31 32 38 0d 02 8a 24 f1  27 22 45 6e 74 65 72 20  |128...$.'"Enter |
000004c0  68 69 67 68 6c 69 67 68  74 20 22 3b 69 3b 22 28  |highlight ";i;"(|
000004d0  59 2f 4e 29 3f 22 3b 0d  02 94 28 e7 20 a7 22 4e  |Y/N)?";...(. ."N|
000004e0  6e 22 2c be 29 20 ff 22  53 41 56 45 20 44 72 69  |n",.) ."SAVE Dri|
000004f0  76 65 72 32 20 43 30 30  20 44 30 30 22 3a e0 0d  |ver2 C00 D00":..|
00000500  02 9e 10 e8 20 86 27 22  20 4f 6e 3a 22 61 24 0d  |.... .'" On:"a$.|
00000510  02 a8 10 e8 20 86 20 22  4f 66 66 3a 22 62 24 0d  |.... . "Off:"b$.|
00000520  02 b2 22 21 4f 25 3d a4  63 6f 64 65 28 61 24 29  |.."!O%=.code(a$)|
00000530  2b 26 31 30 30 30 30 2a  a4 63 6f 64 65 28 62 24  |+&10000*.code(b$|
00000540  29 0d 02 bc 11 4f 25 3d  4f 25 2b 34 3a 69 3d 69  |)....O%=O%+4:i=i|
00000550  2b 31 0d 02 c6 0a e5 20  8d 74 4a 42 0d 02 d0 05  |+1..... .tJB....|
00000560  20 0d 02 da 0f dd 20 a4  63 6f 64 65 28 61 24 29  | ..... .code(a$)|
00000570  0d 02 e4 08 43 25 3d 30  0d 02 ee 0f 49 25 3d a7  |....C%=0....I%=.|
00000580  61 24 2c 22 2c 22 29 0d  02 f8 11 43 25 3d 43 25  |a$,",")....C%=C%|
00000590  20 84 20 a0 28 61 24 29  0d 03 02 10 e7 20 49 25  | . .(a$)..... I%|
000005a0  3d 30 20 8c 20 3d 43 25  0d 03 0c 10 61 24 3d c1  |=0 . =C%....a$=.|
000005b0  61 24 2c 49 25 2b 31 29  0d 03 16 1d e7 20 43 25  |a$,I%+1)..... C%|
000005c0  3c 3e 32 37 20 8c 20 3d  43 25 2b 26 31 30 30 2a  |<>27 . =C%+&100*|
000005d0  a0 28 61 24 29 0d 03 20  11 43 25 3d 26 38 30 3a  |.(a$).. .C%=&80:|
000005e0  e5 20 8d 64 6e 42 0d ff                           |. .dnB..|
000005e8
B.Driver2.m0
B.Driver2.m1
B.Driver2.m2
B.Driver2.m4
B.Driver2.m5