Home » CEEFAX disks » telesoftware5.adl » 04-03-88/B\OSB16

04-03-88/B\OSB16

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 » telesoftware5.adl
Filename: 04-03-88/B\OSB16
Read OK:
File size: 13AD bytes
Load address: 0800
Exec address: 8023
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10REM  OSbits Module B/osb16
   20REM  Write Character Vector Test
   30REM  Version 3.1 8.3.87
   40REM  This routine only works in I/O processor (No user vector in 2nd Proc)
   50REM  Takes what passes down WRCHV and sends to a printer
   60REM  Prints out character and its value in hex
   70REM  *CODE 1 switches on printer dump : *CODE <0> switches it off
   80 
   90*KEY1MO.3|M|NL.|M
  100 
  110code% = &A00
  120 
  130 IF PAGE<&E00 THEN PRINT "I think you have a second processor"'"please switch it off and start again.":STOP
  140 
  150REM Set OS Call Addresses
  160userv = &200
  170wrchv = &20E
  180nvoswrch = &FFCB
  190osbyte = &FFF4
  200 
  210FOR pass% = 0 TO 2 STEP 2
  220P%=code%
  230[OPT pass%
  240 
  250SEI                        \ Disable interrupts when changing vectors
  260LDA #user DIV &100
  270CMP userv+1                \ Has the vector already been changed?
  280BEQ dont_change            \ If so don't change it again
  290LDA userv
  300STA old_userv              \ Store old vector contents ready for JMP
  310LDA userv+1
  320STA old_userv+1
  330LDA #user MOD &100
  340STA userv
  350LDA #user DIV &100
  360STA userv+1                \ Put new code address into userv
  370 
  380.dont_change
  390 
  400CLI                        \ Re-enable interrupts
  410RTS
  420 
  430.user                      \ *CODE 0 switches off *CODE 1 switches on
  440 
  450BNE over_entry
  460CPX #2
  470BCC into_code              \ Branches if X is 0 or 1
  480 
  490.over_entry
  500 
  510JMP (old_userv)
  520 
  530.into_code                 \ Here is X=0 or X=1
  540 
  550TXA
  560BEQ switch_off             \ If X=0 go to switch off
  570LDA intercept_flag
  580BEQ set_wrchv_intercept    \ If X=1 and intercept_flag=0 go to switch on
  590RTS                        \ Else return
  600 
  610.switch_off
  620 
  630LDA #1
  640CMP intercept_flag
  650BEQ clear_wrchv_intercept  \ If X=0 and intercept_flag=1 then clear
  660RTS                        \ Else return
  670 
  680.set_wrchv_intercept
  690 
  700INC intercept_flag
  710SEI                        \ Disable interrupts
  720LDA wrchv
  730STA old_wrchv
  740LDA wrchv+1
  750STA old_wrchv+1            \ Store old vector contents ready for JMP
  760LDA #intercept MOD &100
  770STA wrchv
  780LDA #intercept DIV &100
  790STA wrchv+1                \ Put new code address into wrchv
  800CLI                        \ Re-enable interrupts
  810RTS
  820 
  830.clear_wrchv_intercept
  840 
  850DEC intercept_flag
  860SEI
  870LDA old_wrchv
  880STA wrchv
  890LDA old_wrchv+1
  900STA wrchv+1
  910CLI
  920RTS
  930 
  940.intercept
  950 
  960PHP
  970STA accustore              \ Save A
  980TXA
  990PHA
 1000TYA
 1010PHA
 1020LDA #3
 1030LDX #10
 1040JSR osbyte                 \ Send characters to printer only
 1050TXA
 1060PHA                        \ Put old value of X onto stack
 1070 
 1080JSR vdu_queue              \ Puts Q size into A
 1090BNE not_first
 1100LDA #13
 1110JSR nvoswrch
 1120LDA #10
 1130JSR nvoswrch               \ New line before 1st in queue
 1140 
 1150LDA accustore              \ Check to see if character is printable
 1160CMP #127
 1170BCS unprintable
 1180CMP #32
 1190BCC unprintable
 1200JSR nvoswrch               \ Print character if Q=0 and printable
 1210JMP not_first
 1220 
 1230.unprintable
 1240 
 1250LDA #32
 1260JSR nvoswrch               \ Print space in lieu of character
 1270 
 1280 .not_first
 1290 
 1300LDA #32
 1310JSR nvoswrch               \ Print space to separate bytes
 1320LDA accustore
 1330JSR print_hex              \ Prints A out in HEX
 1340PLA                        \ Pull old value of X from stack
 1350TAX
 1360LDA #3
 1370JSR osbyte                 \ Reset output stream
 1380PLA
 1390TAY
 1400PLA
 1410TAX
 1420LDA accustore
 1430PLP
 1440JMP (old_wrchv)
 1450 
 1460.print_hex
 1470 
 1480PHA
 1490LDA #ASC "["
 1500JSR nvoswrch
 1510LDA #ASC"&"
 1520JSR nvoswrch
 1530PLA
 1540PHA
 1550LSR A
 1560LSR A
 1570LSR A
 1580LSR A                      \ A now contains higher nybble
 1590JSR print_nybble           \ Sends the HEX value of the nybble
 1600PLA
 1610AND #&F                    \ A now contains lower nybble
 1620JSR print_nybble           \ Sends the HEX value of the nybble
 1630LDA #ASC "]"
 1640JSR nvoswrch
 1650RTS
 1660 
 1670.print_nybble
 1680 
 1690ORA #&30                   \ Setting bits 4 & 5 'adds' 48
 1700CMP #ASC"9"+1
 1710BCC dont_add
 1720ADC #6                     \ Carry is set so we really add 7
 1730 
 1740.dont_add
 1750 
 1760JSR nvoswrch
 1770RTS
 1780 
 1790.vdu_queue
 1800 
 1810\  This routine returns the size of the VDU queue in A
 1820\  All registers are destroyed
 1830 
 1840LDA #218
 1850LDX #0
 1860LDY #&FF
 1870JSR osbyte                 \ How many characters in VDU queue?
 1880 
 1890TXA                        \ Number returned in X
 1900EOR #&FF                   \ Complement of A
 1910CLC
 1920ADC #1                     \ 2s complement of A
 1930RTS
 1940 
 1950.old_userv       OPT  FNEQUW(0)
 1960.old_wrchv       OPT  FNEQUW(0)
 1970.accustore       OPT  FNEQUB(0)
 1980.intercept_flag  OPT  FNEQUB(0)
 1990 
 2000]
 2010NEXT
 2020PRINT" *SAVE wcint ";STR$~(&FFFF0000+code%);" +";STR$~(P%-code%)
 2030END
 2040 
 2050**** EQUate a Byte ****
 2060DEF FNEQUB(N%)
 2070?P%=N% MOD 256
 2080IF (pass% AND 3) = 3 THEN PRINT ~?P%
 2090P%=P%+1
 2100=pass%
 2110 
 2120**** EQUate a Word (2 bytes) ****
 2130DEF FNEQUW(N%)
 2140?P%=N% MOD 256
 2150P%?1=N% DIV 256
 2160IF (pass% AND 3) = 3 THEN PRINT ~?P%,~?(P%+1)
 2170P%=P%+2
 2180=pass%

�  OSbits Module B/osb16
"�  Write Character Vector Test
�  Version 3.1 8.3.87
(L�  This routine only works in I/O processor (No user vector in 2nd Proc)
2:�  Takes what passes down WRCHV and sends to a printer
<0�  Prints out character and its value in hex
FC�  *CODE 1 switches on printer dump : *CODE <0> switches it off
P 
Z*KEY1MO.3|M|NL.|M
d 
ncode% = &A00
x 
�a � �<&E00 � � "I think you have a second processor"'"please switch it off and start again.":�
� 
�� Set OS Call Addresses
�userv = &200
�wrchv = &20E
�nvoswrch = &FFCB
�osbyte = &FFF4
� 
�� pass% = 0 � 2 � 2
�P%=code%
�[OPT pass%
� 
�ISEI                        \ Disable interrupts when changing vectors
LDA #user � &100
ECMP userv+1                \ Has the vector already been changed?
<BEQ dont_change            \ If so don't change it again
"
LDA userv
,HSTA old_userv              \ Store old vector contents ready for JMP
6LDA userv+1
@STA old_userv+1
JLDA #user � &100
T
STA userv
^LDA #user � &100
h@STA userv+1                \ Put new code address into userv
r 
|.dont_change
� 
�5CLI                        \ Re-enable interrupts
�RTS
� 
�I.user                      \ *CODE 0 switches off *CODE 1 switches on
� 
�BNE over_entry
�
CPX #2
�8BCC into_code              \ Branches if X is 0 or 1
� 
�.over_entry
� 
�JMP (old_userv)
 
3.into_code                 \ Here is X=0 or X=1
 
&TXA
08BEQ switch_off             \ If X=0 go to switch off
:LDA intercept_flag
DLBEQ set_wrchv_intercept    \ If X=1 and intercept_flag=0 go to switch on
N,RTS                        \ Else return
X 
b.switch_off
l 
v
LDA #1
�CMP intercept_flag
�GBEQ clear_wrchv_intercept  \ If X=0 and intercept_flag=1 then clear
�,RTS                        \ Else return
� 
�.set_wrchv_intercept
� 
�INC intercept_flag
�3SEI                        \ Disable interrupts
�
LDA wrchv
�STA old_wrchv
�LDA wrchv+1
�HSTA old_wrchv+1            \ Store old vector contents ready for JMP
�LDA #intercept � &100

STA wrchv
LDA #intercept � &100
@STA wrchv+1                \ Put new code address into wrchv
 5CLI                        \ Re-enable interrupts
*RTS
4 
>.clear_wrchv_intercept
H 
RDEC intercept_flag
\SEI
fLDA old_wrchv
p
STA wrchv
zLDA old_wrchv+1
�STA wrchv+1
�CLI
�RTS
� 
�.intercept
� 
�PHP
�'STA accustore              \ Save A
�TXA
�PHA
�TYA
�PHA
�
LDA #3
LDX #10
@JSR osbyte                 \ Send characters to printer only
TXA
$>PHA                        \ Put old value of X onto stack
. 
83JSR vdu_queue              \ Puts Q size into A
BBNE not_first
LLDA #13
VJSR nvoswrch
`LDA #10
j=JSR nvoswrch               \ New line before 1st in queue
t 
~GLDA accustore              \ Check to see if character is printable
�CMP #127
�BCS unprintable
�CMP #32
�BCC unprintable
�EJSR nvoswrch               \ Print character if Q=0 and printable
�JMP not_first
� 
�.unprintable
� 
�LDA #32
�AJSR nvoswrch               \ Print space in lieu of character
� 
 .not_first

 
LDA #32
>JSR nvoswrch               \ Print space to separate bytes
(LDA accustore
24JSR print_hex              \ Prints A out in HEX
<?PLA                        \ Pull old value of X from stack
FTAX
P
LDA #3
Z4JSR osbyte                 \ Reset output stream
dPLA
nTAY
xPLA
�TAX
�LDA accustore
�PLP
�JMP (old_wrchv)
� 
�.print_hex
� 
�PHA
�LDA #� "["
�JSR nvoswrch
�
LDA #�"&"
�JSR nvoswrch
�PLA
PHA
	LSR A
	LSR A
"	LSR A
,=LSR A                      \ A now contains higher nybble
6BJSR print_nybble           \ Sends the HEX value of the nybble
@PLA
J:� #&F                    \ A now contains lower nybble
TBJSR print_nybble           \ Sends the HEX value of the nybble
^LDA #� "]"
hJSR nvoswrch
rRTS
| 
�.print_nybble
� 
�<�A #&30                   \ Setting bits 4 & 5 'adds' 48
�CMP #�"9"+1
�BCC dont_add
�@ADC #6                     \ Carry is set so we really add 7
� 
�
.dont_add
� 
�JSR nvoswrch
�RTS
� 
�.vdu_queue
 
8\  This routine returns the size of the � queue in A
"\  All registers are destroyed
& 
0LDA #218
:
LDX #0
DLDY #&FF
N@JSR osbyte                 \ How many characters in � queue?
X 
b5TXA                        \ Number returned in X
l.� #&FF                   \ Complement of A
vCLC
�3ADC #1                     \ 2s complement of A
�RTS
� 
�".old_userv       OPT  �EQUW(0)
�".old_wrchv       OPT  �EQUW(0)
�".accustore       OPT  �EQUB(0)
�".intercept_flag  OPT  �EQUB(0)
� 
�]
��
�:�" *SAVE wcint ";�~(&FFFF0000+code%);" +";�~(P%-code%)
��
� 
**** EQUate a Byte ****
� �EQUB(N%)
?P%=N% � 256
 � (pass% � 3) = 3 � � ~?P%
*P%=P%+1
4
=pass%
> 
H%**** EQUate a Word (2 bytes) ****
R� �EQUW(N%)
\?P%=N% � 256
fP%?1=N% � 256
p'� (pass% � 3) = 3 � � ~?P%,~?(P%+1)
zP%=P%+2
�
=pass%
�
00000000  0d 00 0a 1c f4 20 20 4f  53 62 69 74 73 20 4d 6f  |.....  OSbits Mo|
00000010  64 75 6c 65 20 42 2f 6f  73 62 31 36 0d 00 14 22  |dule B/osb16..."|
00000020  f4 20 20 57 72 69 74 65  20 43 68 61 72 61 63 74  |.  Write Charact|
00000030  65 72 20 56 65 63 74 6f  72 20 54 65 73 74 0d 00  |er Vector Test..|
00000040  1e 19 f4 20 20 56 65 72  73 69 6f 6e 20 33 2e 31  |...  Version 3.1|
00000050  20 38 2e 33 2e 38 37 0d  00 28 4c f4 20 20 54 68  | 8.3.87..(L.  Th|
00000060  69 73 20 72 6f 75 74 69  6e 65 20 6f 6e 6c 79 20  |is routine only |
00000070  77 6f 72 6b 73 20 69 6e  20 49 2f 4f 20 70 72 6f  |works in I/O pro|
00000080  63 65 73 73 6f 72 20 28  4e 6f 20 75 73 65 72 20  |cessor (No user |
00000090  76 65 63 74 6f 72 20 69  6e 20 32 6e 64 20 50 72  |vector in 2nd Pr|
000000a0  6f 63 29 0d 00 32 3a f4  20 20 54 61 6b 65 73 20  |oc)..2:.  Takes |
000000b0  77 68 61 74 20 70 61 73  73 65 73 20 64 6f 77 6e  |what passes down|
000000c0  20 57 52 43 48 56 20 61  6e 64 20 73 65 6e 64 73  | WRCHV and sends|
000000d0  20 74 6f 20 61 20 70 72  69 6e 74 65 72 0d 00 3c  | to a printer..<|
000000e0  30 f4 20 20 50 72 69 6e  74 73 20 6f 75 74 20 63  |0.  Prints out c|
000000f0  68 61 72 61 63 74 65 72  20 61 6e 64 20 69 74 73  |haracter and its|
00000100  20 76 61 6c 75 65 20 69  6e 20 68 65 78 0d 00 46  | value in hex..F|
00000110  43 f4 20 20 2a 43 4f 44  45 20 31 20 73 77 69 74  |C.  *CODE 1 swit|
00000120  63 68 65 73 20 6f 6e 20  70 72 69 6e 74 65 72 20  |ches on printer |
00000130  64 75 6d 70 20 3a 20 2a  43 4f 44 45 20 3c 30 3e  |dump : *CODE <0>|
00000140  20 73 77 69 74 63 68 65  73 20 69 74 20 6f 66 66  | switches it off|
00000150  0d 00 50 05 20 0d 00 5a  15 2a 4b 45 59 31 4d 4f  |..P. ..Z.*KEY1MO|
00000160  2e 33 7c 4d 7c 4e 4c 2e  7c 4d 0d 00 64 05 20 0d  |.3|M|NL.|M..d. .|
00000170  00 6e 10 63 6f 64 65 25  20 3d 20 26 41 30 30 0d  |.n.code% = &A00.|
00000180  00 78 05 20 0d 00 82 61  20 e7 20 90 3c 26 45 30  |.x. ...a . .<&E0|
00000190  30 20 8c 20 f1 20 22 49  20 74 68 69 6e 6b 20 79  |0 . . "I think y|
000001a0  6f 75 20 68 61 76 65 20  61 20 73 65 63 6f 6e 64  |ou have a second|
000001b0  20 70 72 6f 63 65 73 73  6f 72 22 27 22 70 6c 65  | processor"'"ple|
000001c0  61 73 65 20 73 77 69 74  63 68 20 69 74 20 6f 66  |ase switch it of|
000001d0  66 20 61 6e 64 20 73 74  61 72 74 20 61 67 61 69  |f and start agai|
000001e0  6e 2e 22 3a fa 0d 00 8c  05 20 0d 00 96 1b f4 20  |n.":..... ..... |
000001f0  53 65 74 20 4f 53 20 43  61 6c 6c 20 41 64 64 72  |Set OS Call Addr|
00000200  65 73 73 65 73 0d 00 a0  10 75 73 65 72 76 20 3d  |esses....userv =|
00000210  20 26 32 30 30 0d 00 aa  10 77 72 63 68 76 20 3d  | &200....wrchv =|
00000220  20 26 32 30 45 0d 00 b4  14 6e 76 6f 73 77 72 63  | &20E....nvoswrc|
00000230  68 20 3d 20 26 46 46 43  42 0d 00 be 12 6f 73 62  |h = &FFCB....osb|
00000240  79 74 65 20 3d 20 26 46  46 46 34 0d 00 c8 05 20  |yte = &FFF4.... |
00000250  0d 00 d2 17 e3 20 70 61  73 73 25 20 3d 20 30 20  |..... pass% = 0 |
00000260  b8 20 32 20 88 20 32 0d  00 dc 0c 50 25 3d 63 6f  |. 2 . 2....P%=co|
00000270  64 65 25 0d 00 e6 0e 5b  4f 50 54 20 70 61 73 73  |de%....[OPT pass|
00000280  25 0d 00 f0 05 20 0d 00  fa 49 53 45 49 20 20 20  |%.... ...ISEI   |
00000290  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000002a0  20 20 20 20 20 5c 20 44  69 73 61 62 6c 65 20 69  |     \ Disable i|
000002b0  6e 74 65 72 72 75 70 74  73 20 77 68 65 6e 20 63  |nterrupts when c|
000002c0  68 61 6e 67 69 6e 67 20  76 65 63 74 6f 72 73 0d  |hanging vectors.|
000002d0  01 04 14 4c 44 41 20 23  75 73 65 72 20 81 20 26  |...LDA #user . &|
000002e0  31 30 30 0d 01 0e 45 43  4d 50 20 75 73 65 72 76  |100...ECMP userv|
000002f0  2b 31 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |+1              |
00000300  20 20 5c 20 48 61 73 20  74 68 65 20 76 65 63 74  |  \ Has the vect|
00000310  6f 72 20 61 6c 72 65 61  64 79 20 62 65 65 6e 20  |or already been |
00000320  63 68 61 6e 67 65 64 3f  0d 01 18 3c 42 45 51 20  |changed?...<BEQ |
00000330  64 6f 6e 74 5f 63 68 61  6e 67 65 20 20 20 20 20  |dont_change     |
00000340  20 20 20 20 20 20 20 5c  20 49 66 20 73 6f 20 64  |       \ If so d|
00000350  6f 6e 27 74 20 63 68 61  6e 67 65 20 69 74 20 61  |on't change it a|
00000360  67 61 69 6e 0d 01 22 0d  4c 44 41 20 75 73 65 72  |gain..".LDA user|
00000370  76 0d 01 2c 48 53 54 41  20 6f 6c 64 5f 75 73 65  |v..,HSTA old_use|
00000380  72 76 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |rv              |
00000390  5c 20 53 74 6f 72 65 20  6f 6c 64 20 76 65 63 74  |\ Store old vect|
000003a0  6f 72 20 63 6f 6e 74 65  6e 74 73 20 72 65 61 64  |or contents read|
000003b0  79 20 66 6f 72 20 4a 4d  50 0d 01 36 0f 4c 44 41  |y for JMP..6.LDA|
000003c0  20 75 73 65 72 76 2b 31  0d 01 40 13 53 54 41 20  | userv+1..@.STA |
000003d0  6f 6c 64 5f 75 73 65 72  76 2b 31 0d 01 4a 14 4c  |old_userv+1..J.L|
000003e0  44 41 20 23 75 73 65 72  20 83 20 26 31 30 30 0d  |DA #user . &100.|
000003f0  01 54 0d 53 54 41 20 75  73 65 72 76 0d 01 5e 14  |.T.STA userv..^.|
00000400  4c 44 41 20 23 75 73 65  72 20 81 20 26 31 30 30  |LDA #user . &100|
00000410  0d 01 68 40 53 54 41 20  75 73 65 72 76 2b 31 20  |..h@STA userv+1 |
00000420  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 5c  |               \|
00000430  20 50 75 74 20 6e 65 77  20 63 6f 64 65 20 61 64  | Put new code ad|
00000440  64 72 65 73 73 20 69 6e  74 6f 20 75 73 65 72 76  |dress into userv|
00000450  0d 01 72 05 20 0d 01 7c  10 2e 64 6f 6e 74 5f 63  |..r. ..|..dont_c|
00000460  68 61 6e 67 65 0d 01 86  05 20 0d 01 90 35 43 4c  |hange.... ...5CL|
00000470  49 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |I               |
00000480  20 20 20 20 20 20 20 20  20 5c 20 52 65 2d 65 6e  |         \ Re-en|
00000490  61 62 6c 65 20 69 6e 74  65 72 72 75 70 74 73 0d  |able interrupts.|
000004a0  01 9a 07 52 54 53 0d 01  a4 05 20 0d 01 ae 49 2e  |...RTS.... ...I.|
000004b0  75 73 65 72 20 20 20 20  20 20 20 20 20 20 20 20  |user            |
000004c0  20 20 20 20 20 20 20 20  20 20 5c 20 2a 43 4f 44  |          \ *COD|
000004d0  45 20 30 20 73 77 69 74  63 68 65 73 20 6f 66 66  |E 0 switches off|
000004e0  20 2a 43 4f 44 45 20 31  20 73 77 69 74 63 68 65  | *CODE 1 switche|
000004f0  73 20 6f 6e 0d 01 b8 05  20 0d 01 c2 12 42 4e 45  |s on.... ....BNE|
00000500  20 6f 76 65 72 5f 65 6e  74 72 79 0d 01 cc 0a 43  | over_entry....C|
00000510  50 58 20 23 32 0d 01 d6  38 42 43 43 20 69 6e 74  |PX #2...8BCC int|
00000520  6f 5f 63 6f 64 65 20 20  20 20 20 20 20 20 20 20  |o_code          |
00000530  20 20 20 20 5c 20 42 72  61 6e 63 68 65 73 20 69  |    \ Branches i|
00000540  66 20 58 20 69 73 20 30  20 6f 72 20 31 0d 01 e0  |f X is 0 or 1...|
00000550  05 20 0d 01 ea 0f 2e 6f  76 65 72 5f 65 6e 74 72  |. .....over_entr|
00000560  79 0d 01 f4 05 20 0d 01  fe 13 4a 4d 50 20 28 6f  |y.... ....JMP (o|
00000570  6c 64 5f 75 73 65 72 76  29 0d 02 08 05 20 0d 02  |ld_userv).... ..|
00000580  12 33 2e 69 6e 74 6f 5f  63 6f 64 65 20 20 20 20  |.3.into_code    |
00000590  20 20 20 20 20 20 20 20  20 20 20 20 20 5c 20 48  |             \ H|
000005a0  65 72 65 20 69 73 20 58  3d 30 20 6f 72 20 58 3d  |ere is X=0 or X=|
000005b0  31 0d 02 1c 05 20 0d 02  26 07 54 58 41 0d 02 30  |1.... ..&.TXA..0|
000005c0  38 42 45 51 20 73 77 69  74 63 68 5f 6f 66 66 20  |8BEQ switch_off |
000005d0  20 20 20 20 20 20 20 20  20 20 20 20 5c 20 49 66  |            \ If|
000005e0  20 58 3d 30 20 67 6f 20  74 6f 20 73 77 69 74 63  | X=0 go to switc|
000005f0  68 20 6f 66 66 0d 02 3a  16 4c 44 41 20 69 6e 74  |h off..:.LDA int|
00000600  65 72 63 65 70 74 5f 66  6c 61 67 0d 02 44 4c 42  |ercept_flag..DLB|
00000610  45 51 20 73 65 74 5f 77  72 63 68 76 5f 69 6e 74  |EQ set_wrchv_int|
00000620  65 72 63 65 70 74 20 20  20 20 5c 20 49 66 20 58  |ercept    \ If X|
00000630  3d 31 20 61 6e 64 20 69  6e 74 65 72 63 65 70 74  |=1 and intercept|
00000640  5f 66 6c 61 67 3d 30 20  67 6f 20 74 6f 20 73 77  |_flag=0 go to sw|
00000650  69 74 63 68 20 6f 6e 0d  02 4e 2c 52 54 53 20 20  |itch on..N,RTS  |
00000660  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000670  20 20 20 20 20 20 5c 20  45 6c 73 65 20 72 65 74  |      \ Else ret|
00000680  75 72 6e 0d 02 58 05 20  0d 02 62 0f 2e 73 77 69  |urn..X. ..b..swi|
00000690  74 63 68 5f 6f 66 66 0d  02 6c 05 20 0d 02 76 0a  |tch_off..l. ..v.|
000006a0  4c 44 41 20 23 31 0d 02  80 16 43 4d 50 20 69 6e  |LDA #1....CMP in|
000006b0  74 65 72 63 65 70 74 5f  66 6c 61 67 0d 02 8a 47  |tercept_flag...G|
000006c0  42 45 51 20 63 6c 65 61  72 5f 77 72 63 68 76 5f  |BEQ clear_wrchv_|
000006d0  69 6e 74 65 72 63 65 70  74 20 20 5c 20 49 66 20  |intercept  \ If |
000006e0  58 3d 30 20 61 6e 64 20  69 6e 74 65 72 63 65 70  |X=0 and intercep|
000006f0  74 5f 66 6c 61 67 3d 31  20 74 68 65 6e 20 63 6c  |t_flag=1 then cl|
00000700  65 61 72 0d 02 94 2c 52  54 53 20 20 20 20 20 20  |ear...,RTS      |
00000710  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000720  20 20 5c 20 45 6c 73 65  20 72 65 74 75 72 6e 0d  |  \ Else return.|
00000730  02 9e 05 20 0d 02 a8 18  2e 73 65 74 5f 77 72 63  |... .....set_wrc|
00000740  68 76 5f 69 6e 74 65 72  63 65 70 74 0d 02 b2 05  |hv_intercept....|
00000750  20 0d 02 bc 16 49 4e 43  20 69 6e 74 65 72 63 65  | ....INC interce|
00000760  70 74 5f 66 6c 61 67 0d  02 c6 33 53 45 49 20 20  |pt_flag...3SEI  |
00000770  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000780  20 20 20 20 20 20 5c 20  44 69 73 61 62 6c 65 20  |      \ Disable |
00000790  69 6e 74 65 72 72 75 70  74 73 0d 02 d0 0d 4c 44  |interrupts....LD|
000007a0  41 20 77 72 63 68 76 0d  02 da 11 53 54 41 20 6f  |A wrchv....STA o|
000007b0  6c 64 5f 77 72 63 68 76  0d 02 e4 0f 4c 44 41 20  |ld_wrchv....LDA |
000007c0  77 72 63 68 76 2b 31 0d  02 ee 48 53 54 41 20 6f  |wrchv+1...HSTA o|
000007d0  6c 64 5f 77 72 63 68 76  2b 31 20 20 20 20 20 20  |ld_wrchv+1      |
000007e0  20 20 20 20 20 20 5c 20  53 74 6f 72 65 20 6f 6c  |      \ Store ol|
000007f0  64 20 76 65 63 74 6f 72  20 63 6f 6e 74 65 6e 74  |d vector content|
00000800  73 20 72 65 61 64 79 20  66 6f 72 20 4a 4d 50 0d  |s ready for JMP.|
00000810  02 f8 19 4c 44 41 20 23  69 6e 74 65 72 63 65 70  |...LDA #intercep|
00000820  74 20 83 20 26 31 30 30  0d 03 02 0d 53 54 41 20  |t . &100....STA |
00000830  77 72 63 68 76 0d 03 0c  19 4c 44 41 20 23 69 6e  |wrchv....LDA #in|
00000840  74 65 72 63 65 70 74 20  81 20 26 31 30 30 0d 03  |tercept . &100..|
00000850  16 40 53 54 41 20 77 72  63 68 76 2b 31 20 20 20  |.@STA wrchv+1   |
00000860  20 20 20 20 20 20 20 20  20 20 20 20 20 5c 20 50  |             \ P|
00000870  75 74 20 6e 65 77 20 63  6f 64 65 20 61 64 64 72  |ut new code addr|
00000880  65 73 73 20 69 6e 74 6f  20 77 72 63 68 76 0d 03  |ess into wrchv..|
00000890  20 35 43 4c 49 20 20 20  20 20 20 20 20 20 20 20  | 5CLI           |
000008a0  20 20 20 20 20 20 20 20  20 20 20 20 20 5c 20 52  |             \ R|
000008b0  65 2d 65 6e 61 62 6c 65  20 69 6e 74 65 72 72 75  |e-enable interru|
000008c0  70 74 73 0d 03 2a 07 52  54 53 0d 03 34 05 20 0d  |pts..*.RTS..4. .|
000008d0  03 3e 1a 2e 63 6c 65 61  72 5f 77 72 63 68 76 5f  |.>..clear_wrchv_|
000008e0  69 6e 74 65 72 63 65 70  74 0d 03 48 05 20 0d 03  |intercept..H. ..|
000008f0  52 16 44 45 43 20 69 6e  74 65 72 63 65 70 74 5f  |R.DEC intercept_|
00000900  66 6c 61 67 0d 03 5c 07  53 45 49 0d 03 66 11 4c  |flag..\.SEI..f.L|
00000910  44 41 20 6f 6c 64 5f 77  72 63 68 76 0d 03 70 0d  |DA old_wrchv..p.|
00000920  53 54 41 20 77 72 63 68  76 0d 03 7a 13 4c 44 41  |STA wrchv..z.LDA|
00000930  20 6f 6c 64 5f 77 72 63  68 76 2b 31 0d 03 84 0f  | old_wrchv+1....|
00000940  53 54 41 20 77 72 63 68  76 2b 31 0d 03 8e 07 43  |STA wrchv+1....C|
00000950  4c 49 0d 03 98 07 52 54  53 0d 03 a2 05 20 0d 03  |LI....RTS.... ..|
00000960  ac 0e 2e 69 6e 74 65 72  63 65 70 74 0d 03 b6 05  |...intercept....|
00000970  20 0d 03 c0 07 50 48 50  0d 03 ca 27 53 54 41 20  | ....PHP...'STA |
00000980  61 63 63 75 73 74 6f 72  65 20 20 20 20 20 20 20  |accustore       |
00000990  20 20 20 20 20 20 20 5c  20 53 61 76 65 20 41 0d  |       \ Save A.|
000009a0  03 d4 07 54 58 41 0d 03  de 07 50 48 41 0d 03 e8  |...TXA....PHA...|
000009b0  07 54 59 41 0d 03 f2 07  50 48 41 0d 03 fc 0a 4c  |.TYA....PHA....L|
000009c0  44 41 20 23 33 0d 04 06  0b 4c 44 58 20 23 31 30  |DA #3....LDX #10|
000009d0  0d 04 10 40 4a 53 52 20  6f 73 62 79 74 65 20 20  |...@JSR osbyte  |
000009e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 5c  |               \|
000009f0  20 53 65 6e 64 20 63 68  61 72 61 63 74 65 72 73  | Send characters|
00000a00  20 74 6f 20 70 72 69 6e  74 65 72 20 6f 6e 6c 79  | to printer only|
00000a10  0d 04 1a 07 54 58 41 0d  04 24 3e 50 48 41 20 20  |....TXA..$>PHA  |
00000a20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000a30  20 20 20 20 20 20 5c 20  50 75 74 20 6f 6c 64 20  |      \ Put old |
00000a40  76 61 6c 75 65 20 6f 66  20 58 20 6f 6e 74 6f 20  |value of X onto |
00000a50  73 74 61 63 6b 0d 04 2e  05 20 0d 04 38 33 4a 53  |stack.... ..83JS|
00000a60  52 20 76 64 75 5f 71 75  65 75 65 20 20 20 20 20  |R vdu_queue     |
00000a70  20 20 20 20 20 20 20 20  20 5c 20 50 75 74 73 20  |         \ Puts |
00000a80  51 20 73 69 7a 65 20 69  6e 74 6f 20 41 0d 04 42  |Q size into A..B|
00000a90  11 42 4e 45 20 6e 6f 74  5f 66 69 72 73 74 0d 04  |.BNE not_first..|
00000aa0  4c 0b 4c 44 41 20 23 31  33 0d 04 56 10 4a 53 52  |L.LDA #13..V.JSR|
00000ab0  20 6e 76 6f 73 77 72 63  68 0d 04 60 0b 4c 44 41  | nvoswrch..`.LDA|
00000ac0  20 23 31 30 0d 04 6a 3d  4a 53 52 20 6e 76 6f 73  | #10..j=JSR nvos|
00000ad0  77 72 63 68 20 20 20 20  20 20 20 20 20 20 20 20  |wrch            |
00000ae0  20 20 20 5c 20 4e 65 77  20 6c 69 6e 65 20 62 65  |   \ New line be|
00000af0  66 6f 72 65 20 31 73 74  20 69 6e 20 71 75 65 75  |fore 1st in queu|
00000b00  65 0d 04 74 05 20 0d 04  7e 47 4c 44 41 20 61 63  |e..t. ..~GLDA ac|
00000b10  63 75 73 74 6f 72 65 20  20 20 20 20 20 20 20 20  |custore         |
00000b20  20 20 20 20 20 5c 20 43  68 65 63 6b 20 74 6f 20  |     \ Check to |
00000b30  73 65 65 20 69 66 20 63  68 61 72 61 63 74 65 72  |see if character|
00000b40  20 69 73 20 70 72 69 6e  74 61 62 6c 65 0d 04 88  | is printable...|
00000b50  0c 43 4d 50 20 23 31 32  37 0d 04 92 13 42 43 53  |.CMP #127....BCS|
00000b60  20 75 6e 70 72 69 6e 74  61 62 6c 65 0d 04 9c 0b  | unprintable....|
00000b70  43 4d 50 20 23 33 32 0d  04 a6 13 42 43 43 20 75  |CMP #32....BCC u|
00000b80  6e 70 72 69 6e 74 61 62  6c 65 0d 04 b0 45 4a 53  |nprintable...EJS|
00000b90  52 20 6e 76 6f 73 77 72  63 68 20 20 20 20 20 20  |R nvoswrch      |
00000ba0  20 20 20 20 20 20 20 20  20 5c 20 50 72 69 6e 74  |         \ Print|
00000bb0  20 63 68 61 72 61 63 74  65 72 20 69 66 20 51 3d  | character if Q=|
00000bc0  30 20 61 6e 64 20 70 72  69 6e 74 61 62 6c 65 0d  |0 and printable.|
00000bd0  04 ba 11 4a 4d 50 20 6e  6f 74 5f 66 69 72 73 74  |...JMP not_first|
00000be0  0d 04 c4 05 20 0d 04 ce  10 2e 75 6e 70 72 69 6e  |.... .....unprin|
00000bf0  74 61 62 6c 65 0d 04 d8  05 20 0d 04 e2 0b 4c 44  |table.... ....LD|
00000c00  41 20 23 33 32 0d 04 ec  41 4a 53 52 20 6e 76 6f  |A #32...AJSR nvo|
00000c10  73 77 72 63 68 20 20 20  20 20 20 20 20 20 20 20  |swrch           |
00000c20  20 20 20 20 5c 20 50 72  69 6e 74 20 73 70 61 63  |    \ Print spac|
00000c30  65 20 69 6e 20 6c 69 65  75 20 6f 66 20 63 68 61  |e in lieu of cha|
00000c40  72 61 63 74 65 72 0d 04  f6 05 20 0d 05 00 0f 20  |racter.... .... |
00000c50  2e 6e 6f 74 5f 66 69 72  73 74 0d 05 0a 05 20 0d  |.not_first.... .|
00000c60  05 14 0b 4c 44 41 20 23  33 32 0d 05 1e 3e 4a 53  |...LDA #32...>JS|
00000c70  52 20 6e 76 6f 73 77 72  63 68 20 20 20 20 20 20  |R nvoswrch      |
00000c80  20 20 20 20 20 20 20 20  20 5c 20 50 72 69 6e 74  |         \ Print|
00000c90  20 73 70 61 63 65 20 74  6f 20 73 65 70 61 72 61  | space to separa|
00000ca0  74 65 20 62 79 74 65 73  0d 05 28 11 4c 44 41 20  |te bytes..(.LDA |
00000cb0  61 63 63 75 73 74 6f 72  65 0d 05 32 34 4a 53 52  |accustore..24JSR|
00000cc0  20 70 72 69 6e 74 5f 68  65 78 20 20 20 20 20 20  | print_hex      |
00000cd0  20 20 20 20 20 20 20 20  5c 20 50 72 69 6e 74 73  |        \ Prints|
00000ce0  20 41 20 6f 75 74 20 69  6e 20 48 45 58 0d 05 3c  | A out in HEX..<|
00000cf0  3f 50 4c 41 20 20 20 20  20 20 20 20 20 20 20 20  |?PLA            |
00000d00  20 20 20 20 20 20 20 20  20 20 20 20 5c 20 50 75  |            \ Pu|
00000d10  6c 6c 20 6f 6c 64 20 76  61 6c 75 65 20 6f 66 20  |ll old value of |
00000d20  58 20 66 72 6f 6d 20 73  74 61 63 6b 0d 05 46 07  |X from stack..F.|
00000d30  54 41 58 0d 05 50 0a 4c  44 41 20 23 33 0d 05 5a  |TAX..P.LDA #3..Z|
00000d40  34 4a 53 52 20 6f 73 62  79 74 65 20 20 20 20 20  |4JSR osbyte     |
00000d50  20 20 20 20 20 20 20 20  20 20 20 20 5c 20 52 65  |            \ Re|
00000d60  73 65 74 20 6f 75 74 70  75 74 20 73 74 72 65 61  |set output strea|
00000d70  6d 0d 05 64 07 50 4c 41  0d 05 6e 07 54 41 59 0d  |m..d.PLA..n.TAY.|
00000d80  05 78 07 50 4c 41 0d 05  82 07 54 41 58 0d 05 8c  |.x.PLA....TAX...|
00000d90  11 4c 44 41 20 61 63 63  75 73 74 6f 72 65 0d 05  |.LDA accustore..|
00000da0  96 07 50 4c 50 0d 05 a0  13 4a 4d 50 20 28 6f 6c  |..PLP....JMP (ol|
00000db0  64 5f 77 72 63 68 76 29  0d 05 aa 05 20 0d 05 b4  |d_wrchv).... ...|
00000dc0  0e 2e 70 72 69 6e 74 5f  68 65 78 0d 05 be 05 20  |..print_hex.... |
00000dd0  0d 05 c8 07 50 48 41 0d  05 d2 0e 4c 44 41 20 23  |....PHA....LDA #|
00000de0  97 20 22 5b 22 0d 05 dc  10 4a 53 52 20 6e 76 6f  |. "["....JSR nvo|
00000df0  73 77 72 63 68 0d 05 e6  0d 4c 44 41 20 23 97 22  |swrch....LDA #."|
00000e00  26 22 0d 05 f0 10 4a 53  52 20 6e 76 6f 73 77 72  |&"....JSR nvoswr|
00000e10  63 68 0d 05 fa 07 50 4c  41 0d 06 04 07 50 48 41  |ch....PLA....PHA|
00000e20  0d 06 0e 09 4c 53 52 20  41 0d 06 18 09 4c 53 52  |....LSR A....LSR|
00000e30  20 41 0d 06 22 09 4c 53  52 20 41 0d 06 2c 3d 4c  | A..".LSR A..,=L|
00000e40  53 52 20 41 20 20 20 20  20 20 20 20 20 20 20 20  |SR A            |
00000e50  20 20 20 20 20 20 20 20  20 20 5c 20 41 20 6e 6f  |          \ A no|
00000e60  77 20 63 6f 6e 74 61 69  6e 73 20 68 69 67 68 65  |w contains highe|
00000e70  72 20 6e 79 62 62 6c 65  0d 06 36 42 4a 53 52 20  |r nybble..6BJSR |
00000e80  70 72 69 6e 74 5f 6e 79  62 62 6c 65 20 20 20 20  |print_nybble    |
00000e90  20 20 20 20 20 20 20 5c  20 53 65 6e 64 73 20 74  |       \ Sends t|
00000ea0  68 65 20 48 45 58 20 76  61 6c 75 65 20 6f 66 20  |he HEX value of |
00000eb0  74 68 65 20 6e 79 62 62  6c 65 0d 06 40 07 50 4c  |the nybble..@.PL|
00000ec0  41 0d 06 4a 3a 80 20 23  26 46 20 20 20 20 20 20  |A..J:. #&F      |
00000ed0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 5c 20  |              \ |
00000ee0  41 20 6e 6f 77 20 63 6f  6e 74 61 69 6e 73 20 6c  |A now contains l|
00000ef0  6f 77 65 72 20 6e 79 62  62 6c 65 0d 06 54 42 4a  |ower nybble..TBJ|
00000f00  53 52 20 70 72 69 6e 74  5f 6e 79 62 62 6c 65 20  |SR print_nybble |
00000f10  20 20 20 20 20 20 20 20  20 20 5c 20 53 65 6e 64  |          \ Send|
00000f20  73 20 74 68 65 20 48 45  58 20 76 61 6c 75 65 20  |s the HEX value |
00000f30  6f 66 20 74 68 65 20 6e  79 62 62 6c 65 0d 06 5e  |of the nybble..^|
00000f40  0e 4c 44 41 20 23 97 20  22 5d 22 0d 06 68 10 4a  |.LDA #. "]"..h.J|
00000f50  53 52 20 6e 76 6f 73 77  72 63 68 0d 06 72 07 52  |SR nvoswrch..r.R|
00000f60  54 53 0d 06 7c 05 20 0d  06 86 11 2e 70 72 69 6e  |TS..|. .....prin|
00000f70  74 5f 6e 79 62 62 6c 65  0d 06 90 05 20 0d 06 9a  |t_nybble.... ...|
00000f80  3c 84 41 20 23 26 33 30  20 20 20 20 20 20 20 20  |<.A #&30        |
00000f90  20 20 20 20 20 20 20 20  20 20 20 5c 20 53 65 74  |           \ Set|
00000fa0  74 69 6e 67 20 62 69 74  73 20 34 20 26 20 35 20  |ting bits 4 & 5 |
00000fb0  27 61 64 64 73 27 20 34  38 0d 06 a4 0f 43 4d 50  |'adds' 48....CMP|
00000fc0  20 23 97 22 39 22 2b 31  0d 06 ae 10 42 43 43 20  | #."9"+1....BCC |
00000fd0  64 6f 6e 74 5f 61 64 64  0d 06 b8 40 41 44 43 20  |dont_add...@ADC |
00000fe0  23 36 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |#6              |
00000ff0  20 20 20 20 20 20 20 5c  20 43 61 72 72 79 20 69  |       \ Carry i|
00001000  73 20 73 65 74 20 73 6f  20 77 65 20 72 65 61 6c  |s set so we real|
00001010  6c 79 20 61 64 64 20 37  0d 06 c2 05 20 0d 06 cc  |ly add 7.... ...|
00001020  0d 2e 64 6f 6e 74 5f 61  64 64 0d 06 d6 05 20 0d  |..dont_add.... .|
00001030  06 e0 10 4a 53 52 20 6e  76 6f 73 77 72 63 68 0d  |...JSR nvoswrch.|
00001040  06 ea 07 52 54 53 0d 06  f4 05 20 0d 06 fe 0e 2e  |...RTS.... .....|
00001050  76 64 75 5f 71 75 65 75  65 0d 07 08 05 20 0d 07  |vdu_queue.... ..|
00001060  12 38 5c 20 20 54 68 69  73 20 72 6f 75 74 69 6e  |.8\  This routin|
00001070  65 20 72 65 74 75 72 6e  73 20 74 68 65 20 73 69  |e returns the si|
00001080  7a 65 20 6f 66 20 74 68  65 20 ef 20 71 75 65 75  |ze of the . queu|
00001090  65 20 69 6e 20 41 0d 07  1c 22 5c 20 20 41 6c 6c  |e in A..."\  All|
000010a0  20 72 65 67 69 73 74 65  72 73 20 61 72 65 20 64  | registers are d|
000010b0  65 73 74 72 6f 79 65 64  0d 07 26 05 20 0d 07 30  |estroyed..&. ..0|
000010c0  0c 4c 44 41 20 23 32 31  38 0d 07 3a 0a 4c 44 58  |.LDA #218..:.LDX|
000010d0  20 23 30 0d 07 44 0c 4c  44 59 20 23 26 46 46 0d  | #0..D.LDY #&FF.|
000010e0  07 4e 40 4a 53 52 20 6f  73 62 79 74 65 20 20 20  |.N@JSR osbyte   |
000010f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 5c 20  |              \ |
00001100  48 6f 77 20 6d 61 6e 79  20 63 68 61 72 61 63 74  |How many charact|
00001110  65 72 73 20 69 6e 20 ef  20 71 75 65 75 65 3f 0d  |ers in . queue?.|
00001120  07 58 05 20 0d 07 62 35  54 58 41 20 20 20 20 20  |.X. ..b5TXA     |
00001130  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001140  20 20 20 5c 20 4e 75 6d  62 65 72 20 72 65 74 75  |   \ Number retu|
00001150  72 6e 65 64 20 69 6e 20  58 0d 07 6c 2e 82 20 23  |rned in X..l.. #|
00001160  26 46 46 20 20 20 20 20  20 20 20 20 20 20 20 20  |&FF             |
00001170  20 20 20 20 20 20 5c 20  43 6f 6d 70 6c 65 6d 65  |      \ Compleme|
00001180  6e 74 20 6f 66 20 41 0d  07 76 07 43 4c 43 0d 07  |nt of A..v.CLC..|
00001190  80 33 41 44 43 20 23 31  20 20 20 20 20 20 20 20  |.3ADC #1        |
000011a0  20 20 20 20 20 20 20 20  20 20 20 20 20 5c 20 32  |             \ 2|
000011b0  73 20 63 6f 6d 70 6c 65  6d 65 6e 74 20 6f 66 20  |s complement of |
000011c0  41 0d 07 8a 07 52 54 53  0d 07 94 05 20 0d 07 9e  |A....RTS.... ...|
000011d0  22 2e 6f 6c 64 5f 75 73  65 72 76 20 20 20 20 20  |".old_userv     |
000011e0  20 20 4f 50 54 20 20 a4  45 51 55 57 28 30 29 0d  |  OPT  .EQUW(0).|
000011f0  07 a8 22 2e 6f 6c 64 5f  77 72 63 68 76 20 20 20  |..".old_wrchv   |
00001200  20 20 20 20 4f 50 54 20  20 a4 45 51 55 57 28 30  |    OPT  .EQUW(0|
00001210  29 0d 07 b2 22 2e 61 63  63 75 73 74 6f 72 65 20  |)...".accustore |
00001220  20 20 20 20 20 20 4f 50  54 20 20 a4 45 51 55 42  |      OPT  .EQUB|
00001230  28 30 29 0d 07 bc 22 2e  69 6e 74 65 72 63 65 70  |(0)...".intercep|
00001240  74 5f 66 6c 61 67 20 20  4f 50 54 20 20 a4 45 51  |t_flag  OPT  .EQ|
00001250  55 42 28 30 29 0d 07 c6  05 20 0d 07 d0 05 5d 0d  |UB(0).... ....].|
00001260  07 da 05 ed 0d 07 e4 3a  f1 22 20 2a 53 41 56 45  |.......:." *SAVE|
00001270  20 77 63 69 6e 74 20 22  3b c3 7e 28 26 46 46 46  | wcint ";.~(&FFF|
00001280  46 30 30 30 30 2b 63 6f  64 65 25 29 3b 22 20 2b  |F0000+code%);" +|
00001290  22 3b c3 7e 28 50 25 2d  63 6f 64 65 25 29 0d 07  |";.~(P%-code%)..|
000012a0  ee 05 e0 0d 07 f8 05 20  0d 08 02 1b 2a 2a 2a 2a  |....... ....****|
000012b0  20 45 51 55 61 74 65 20  61 20 42 79 74 65 20 2a  | EQUate a Byte *|
000012c0  2a 2a 2a 0d 08 0c 0f dd  20 a4 45 51 55 42 28 4e  |***..... .EQUB(N|
000012d0  25 29 0d 08 16 10 3f 50  25 3d 4e 25 20 83 20 32  |%)....?P%=N% . 2|
000012e0  35 36 0d 08 20 1e e7 20  28 70 61 73 73 25 20 80  |56.. .. (pass% .|
000012f0  20 33 29 20 3d 20 33 20  8c 20 f1 20 7e 3f 50 25  | 3) = 3 . . ~?P%|
00001300  0d 08 2a 0b 50 25 3d 50  25 2b 31 0d 08 34 0a 3d  |..*.P%=P%+1..4.=|
00001310  70 61 73 73 25 0d 08 3e  05 20 0d 08 48 25 2a 2a  |pass%..>. ..H%**|
00001320  2a 2a 20 45 51 55 61 74  65 20 61 20 57 6f 72 64  |** EQUate a Word|
00001330  20 28 32 20 62 79 74 65  73 29 20 2a 2a 2a 2a 0d  | (2 bytes) ****.|
00001340  08 52 0f dd 20 a4 45 51  55 57 28 4e 25 29 0d 08  |.R.. .EQUW(N%)..|
00001350  5c 10 3f 50 25 3d 4e 25  20 83 20 32 35 36 0d 08  |\.?P%=N% . 256..|
00001360  66 11 50 25 3f 31 3d 4e  25 20 81 20 32 35 36 0d  |f.P%?1=N% . 256.|
00001370  08 70 27 e7 20 28 70 61  73 73 25 20 80 20 33 29  |.p'. (pass% . 3)|
00001380  20 3d 20 33 20 8c 20 f1  20 7e 3f 50 25 2c 7e 3f  | = 3 . . ~?P%,~?|
00001390  28 50 25 2b 31 29 0d 08  7a 0b 50 25 3d 50 25 2b  |(P%+1)..z.P%=P%+|
000013a0  32 0d 08 84 0a 3d 70 61  73 73 25 0d ff           |2....=pass%..|
000013ad
04-03-88/B\OSB16.m0
04-03-88/B\OSB16.m1
04-03-88/B\OSB16.m2
04-03-88/B\OSB16.m4
04-03-88/B\OSB16.m5