home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1998 Special
/
special1988a.d64
/
hrprintrelo
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
806b
|
37 lines
100 rem this program relocates the
110 rem 'hrprint' ml routine and writes
120 rem the relocated code to disk
130 if a=0 then a=1:load "hrprint",8,1
140 input "new location for hrprint";n
150 input "new filename for hrprint";f$
160 a=int(n/256):b=n-256*a
170 print "working..."
180 close 15:open 15,8,15,"i0"
190 gosub 410
200 open 2, 8, 2, f$ + ",p,w"
210 gosub 410
220 print#2, chr$(b);chr$(a);
230 gosub 410
240 for j=49152 to 49675
250 p=peek(j)
260 if p<>76 and p<>108 and p<>32 then print#2,chr$(p);:next j
270 z=peek(j+2)
280 if z<192 or z>194 then print#2,chr$(p);:next j
290 x=49152-n
300 y=peek(j+1)
310 a=y+z*256-x
320 z=int(a/256)
330 y=a-256*z
340 print#2, chr$(p);chr$(y);chr$(z);
350 j=j+2
360 next j
370 print "new sys value for 'in':";n
380 print "new sys value for 'pr':";n+55
390 close 2:close 15:end
400 rem check disk drive error status
410 input#15,ex,ex$,tr,se
420 if ex=0 then return
430 print chr$(18) "disk error"
440 print ex;ex$;tr;se
450 goto 390