home *** CD-ROM | disk | FTP | other *** search
- 500 poke52,112:poke56,112:clr:poke650,128:cr$=chr$(13):zz$=str$(999)
- 502 dima$(92):x=160:y=100:pn=28673:pokepn,112:poke(pn+1),3
- 504 print" tinkertools cad"
- 506 print" by james chandler jr"
- 508 print" copyright 1984"
- 510 gosub766:D 2,1:D 1,2,7:f=0:b=1
- 512 gosub568:DI:D 0:goto652
- 514 iff>15thenf=0
- 518 ifb>15thenb=0
- 520 poke53280,b:onegosub696,694
- 522 pm=2:s=1
- 524 getz$:ifz$=""thengosub578:gosub578:i=1:goto524
- 526 ifz$=chr$(17)theny=y+i:i=i+1:goto576
- 528 ifz$=chr$(145)theny=y-i:i=i+1:goto576
- 530 ifz$=chr$(29)thenx=x+i:i=i+1:goto576
- 532 ifz$=chr$(157)thenx=x-i:i=i+1:goto576
- 534 d=asc(z$)-132:ifd<0then538
- 536 ondgoto552,556,564,560,554,558,566,562
- 538 d=asc(z$)-33:ifd>(-1)andd<62thena=d:goto524
- 540 d=asc(z$)-131:ifd>61andd<91thena=d:goto524
- 542 ifz$=chr$(95)then gosub614:goto576
- 544 ifz$=chr$(191)thenb=b+1:goto514
- 546 ifz$=chr$(187)thenf=f+1:goto514
- 548 ifz$=chr$(172)thengoto616
- 550 ifz$=chr$(167)thengosub692:goto652
- 552 a=a+1:goto576
- 554 a=a-1:goto576
- 556 rt=rt+1:goto576
- 558 rt=rt-1:goto576
- 560 pm=1:gosub578:pm=2:goto576
- 562 pm=0:gosub578:pm=2:goto576
- 564 s=s+1:goto576
- 566 s=s-1:goto576
- 568 getz$:ifz$=""then568
- 570 return
- 572 pokepn,(int(w/256)):poke(pn+1),(w-(peek(pn)*256)):return
- 574 ford=0to300:nextd:return
- 576 gosub578:gosub578:goto524
- 578 ifa>90thena=90
- 580 ifa<0thena=0
- 582 ify>200theny=200
- 584 ify<1theny=1
- 586 ifx>318thenx=318
- 588 ifx<1thenx=1
- 590 ifrt>7thenrt=0
- 592 ifrt<0thenrt=7
- 594 ifs<1thens=1
- 596 gosub762:gosub764
- 598 ifpm=2then612
- 600 w=(256*peek(pn))+peek(pn+1)
- 602 pokew,rt:poke(w+1),s:poke(w+2),a
- 604 poke(w+3),(int(x/256)):poke(w+4),(x-(peek(w+3)*256))
- 606 poke(w+5),y:poke(w+6),pm
- 608 w=w+7:gosub572
- 610 ifw>(pn+4088)then650
- 612 return
- 614 DW:return
- 616 onegosub696,694
- 618 px=(peek(pn)*256)+peek(pn+1)-1
- 620 forw=(pn+2)topxstep7
- 622 rt=peek(w):s=peek(w+1)
- 624 ifrt<0orrt>7then640
- 626 gosub762
- 628 a=peek(w+2):ifa<0ora>90then640
- 630 x=(256*peek(w+3))+peek(w+4):ifx<0orx>318then640
- 632 y=peek(w+5):ify<0ory>200then640
- 634 pm=peek(w+6):ifpm<0orpm>2then640
- 636 gosub764
- 638 nextw:pm=2:goto524
- 640 gosub692:print"bad drawing data encountered"
- 642 w=int((w-pn+2)/7)
- 644 print"last good data at drawing pointer "w
- 646 print"press (commodore) m to continue"
- 648 w=px:goto638
- 650 gosub692:print"drawing memory is full":gosub766:gosub568
- 652 print" tinkertools menu"
- 654 print"0. load drawing"
- 656 print"1. go to blank hires screen"
- 658 print"2. go to previous hires screen"
- 660 print"3. save drawing"
- 662 print"4. view directory"
- 664 print"5. reset drawing pointer"
- 666 print"6. find drawing pointer"
- 668 print"7. load figures"
- 670 print"8. create figures"
- 672 print"9. save figures"
- 674 gosub568:z=asc(z$):ifz<48orz>57then674
- 675 z=val(z$)+1:onzgoto678,680,682,684,688,698,706,788,710,778
- 676 goto674
- 678 gosub768:poke780,0:sys65493:gosub766:gosub568:goto652
- 680 e=1:goto514
- 682 e=2:goto514
- 684 gosub768:poke251,1:poke252,112:poke780,251
- 686 poke781,peek(pn+1):poke782,peek(pn):sys65496:gosub766:gosub568:goto652
- 688 Dj "$
-
- 690 gosub766:gosub568:goto652
- 692 DP 0:return
- 694 DP 2:return
- 696 D f,b:return
- 698 print"set drawing pointer to what value? (999 to abort)"
- 700 inputw:ifw=999then706
- 702 ifw<0orw>584thenprint"out of range value":goto706
- 704 w=(w*7)+pn+2:gosub572
- 706 w=(256*peek(pn))+peek(pn+1):w=(w-pn+2)/7:w=int(w)
- 708 print"current drawing pointer is "w:gosub766:gosub568:goto652
- 710 a=91:az=0:a$(a)="":pm=1
- 712 gosub696:gosub762
- 714 gosub568
- 716 ifz$="e"then744
- 718 ifz$="x"then748
- 720 ifz$="s"then746
- 722 ifz$=chr$(19)then712
- 724 ifz$=chr$(147)then710
- 726 ifz$=chr$(29)thenv=0:goto736
- 728 ifz$=chr$(157)thenv=3:goto736
- 730 ifz$=chr$(145)thenv=1:goto736
- 732 ifz$=chr$(17)thenv=2:goto736
- 734 goto714
- 736 gosub568:ifz$=chr$(136)orz$=chr$(140)thenv=v+5:goto740
- 738 ifz$<>chr$(135)andz$<>chr$(139)then736
- 740 a$(a)=a$(a)+right$(str$(v),1):iflen(a$(a))>254then748
- 742 gosub764:goto714
- 744 az$=a$(a):goto710
- 746 az=az+1:a$(a)=a$(a)+mid$(az$,az,1):goto742
- 748 gosub692:print""
- 750 print"hit key which represents figure":print"(f8 to abort)":gosub568
- 752 ifz$=chr$(140)then652
- 754 d=asc(z$)-33:ifd>(-1)andd<62thena=d:goto760
- 756 d=asc(z$)-131:ifd>61andd<91thena=d:goto760
- 758 print"invalid key":goto750
- 760 a$(a)=a$(91):goto652
- 762 D rt,s:return
- 764 D
- a$(a),x,y,pm:return
- 766 print:print" *** any key to continue ***":return
- 768 print"drawing name (x to abort)":inputf$:ifright$(f$,1)="x"then652
- 770 l=len(f$):ifl>15thenprint"name too long":goto768
- 772 forx=1tol:poke819+x,asc(mid$(f$,x,1)):nextx
- 774 poke780,4:poke781,8:poke782,1:sys65466
- 776 poke780,l:poke782,3:poke781,52:sys65469:return
- 778 gosub800:open8,8,8,"0:"+f$+",s,w"
- 780 fora=0to90:l=len(a$(a)):ifl=0then786
- 782 lx$=str$(int((l/51)+.99)):ax$=str$(a):print#8,lx$cr$ax$cr$;
- 784 fori=1tolstep51:z$=mid$(a$(a),i,51):print#8,z$cr$;:nexti
- 786 nexta:print#8,zz$:close8:gosub766:gosub568:goto652
- 788 gosub800:open8,8,8,"0:"+f$+",s,r"
- 790 input#8,lx$:input#8,ax$
- 792 l=val(lx$):ifl>5then798
- 794 a=val(ax$):a$(a)=""
- 796 fori=1tol:input#8,z$:a$(a)=a$(a)+z$:next:goto790
- 798 close8:gosub766:gosub568:goto652
- 800 print"name of figure set (x to abort)"
- 802 inputf$:ifright$(f$,1)="x"then652
- 804 iflen(f$)>15thenprint"name too long":goto800
- 806 return
-