home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1989 November
/
1989-11.d64
/
proofreader
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
1KB
|
32 lines
10 vec=peek(772)+256*peek(773):lo=43:hi=44
20 print"[147]automatic proofreader for ";:if vec=42364 then print "c-64"
30 if vec=50556 then print "vic-20"
40 if vec=35158 then (NULL) clr:print "plus/4 & 16"
50 if vec=17165 then lo=45:hi=46:(NULL) clr:print"128"
60 sa=(peek(lo)+256*peek(hi))+6:adr=sa
70 for j=0 to 166:read byt:poke adr,byt:adr=adr+1:chk=chk+byt:next
80 if chk<>20570 then print "*error* check typing in data statements":end
90 for j=1 to 5:read rf,lf,hf:rs=sa+rf:hb=int(rs/256):lb=rs-(256*hb)
100 chk=chk+rf+lf+hf:poke sa+lf,lb:poke sa+hf,hb:next
110 if chk<>22054 then print "*error* reload program and check final line":end
120 poke sa+149,peek(772):poke sa+150,peek(773)
130 if vec=17165 then poke sa+14,22:poke sa+18,23:pokesa+29,224:pokesa+139,224
140 print chr$(147);chr$(17);"proofreader active":sys sa
150 poke hi,peek(hi)+1:poke (peek(lo)+256*peek(hi))-1,0:new
160 data 120,169,73,141,4,3,169,3,141,5,3
170 data 88,96,165,20,133,167,165,21,133,168,169
180 data 0,141,0,255,162,31,181,199,157,227,3
190 data 202,16,248,169,19,32,210,255,169,18,32
200 data 210,255,160,0,132,180,132,176,136,230,180
210 data 200,185,0,2,240,46,201,34,208,8,72
220 data 165,176,73,255,133,176,104,72,201,32,208
230 data 7,165,176,208,3,104,208,226,104,166,180
240 data 24,165,167,121,0,2,133,167,165,168,105
250 data 0,133,168,202,208,239,240,202,165,167,69
260 data 168,72,41,15,168,185,211,3,32,210,255
270 data 104,74,74,74,74,168,185,211,3,32,210
280 data 255,162,31,189,227,3,149,199,202,16,248
290 data 169,146,32,210,255,76,86,137,65,66,67
300 data 68,69,70,71,72,74,75,77,80,81,82,83,88
310 data 13,2,7,167,31,32,151,116,117,151,128,129,167,136,137