home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 11
/
011.d81
/
trace.example
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
2KB
|
57 lines
5 if a=1 then 200
6 ifa=>2then63000
7 gosub60000
10 rem basic trace utility example
20 print "[147]"
30 print " **** basic trace utility ****"
40 print
50 print "[212]he basic trace utility is a machine"
60 print "language routine that will show you"
70 print "the line number of each basic statement"
80 print "as it executes."
90 print
100 print "[198]irst, load the utility:"
110 print "load "chr$(34)"trace.ojb"chr$(34)",8,1"
120 if a=0 then a=1:load "trace.obj",8,1
200 print
210 print "[212]ype:":print"sys 49152"
220 print "to turn the trace on and off."
230 print "(note that the sys can be used in"
240 print "in a program also!)"
250 print "press any key for an example"
260 getk$:if k$="" then 260
300 print "[147]"
310 print "counting to 10 without trace:"
320 gosub 1000
330 print "counting with trace on:"
340 sys49152:gosub 1000:sys49152
350 print:print:print
999 goto62000
1000 for x=1to 10
1010 print x;
1020 next x
1030 print
1040 return
60000 t$=" ":c=0:c$="":print"[147]":poke53281,0
60030 printspc(7)""t$:printspc(7)" [212]race [197]xample [146]"
60051 printspc(7)""t$:print:printtab(18)"by"
60060 print:printspc(12)"[208]aul [202]atkowski"
60070 print:printspc(12)"[195]opyright 1985"
60080 print:print:print:print" [204][207][193][196][211][212][193][210] is not public domain."
60090 print:print" [208]lease respect the author's rights."
60100 print:print" [208]ress space bar to continue."
60110 forcc=1to48:getk$:ifk$=" "then60130
60120 ifcc=1thenprintmid$(c$,c+2,1)"[145][145]";:c=not(c)
60125 next:goto60100
60130 printc$:return
62000 print"[215]ould you like to see it again?"
62010 poke198,0:wait198,1:geta$:ifa$="y"thenrun
62020 ifa$="n"then63000
62030 poke53280,rnd(1)*15:goto62010
62050 :
63000 rem connect back to ls
63010 ifa=1thena=2:load"routines v4",8,1
63020 ifa=2thena=3:load"sidirq v3",8,1
63030 print"[147]load"chr$(34)"payload"chr$(34)",8":print"run"
63040 poke631,13:poke632,13:poke198,2:end