home *** CD-ROM | disk | FTP | other *** search
- 0 print"[147]"tab(13)"line locator"
- 1 rem ==================================
- 2 rem commodares problem #46-3 :
- 3 rem line locator
- 4 rem solution by
- 5 rem craig ewert
- 6 rem ====== c-64 only =================
- 10 ad=2049 : input"line sought";l : if l<0 then end
- 20 lp=peek(ad)+256*peek(ad+1) : ln=peek(ad+2)+256*peek(ad+3)
- 25 rem print ad,lp,ln
- 30 if l<ln or lp=0 then print"line"l"does not exist":goto 10
- 40 if l=ln then print"line"l"starts at"ad:goto 10
- 60 ad=lp : goto 20
-