Home » Personal collection » Acorn ADFS disks » Greaseweazled » dfs_box04_disk02b_eug_scripts.adf » CAD/CADNew/CAD2

CAD/CADNew/CAD2

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn ADFS disks » Greaseweazled » dfs_box04_disk02b_eug_scripts.adf
Filename: CAD/CADNew/CAD2
Read OK:
File size: 1D31 bytes
Load address: FFFF0E00
Exec address: FFFF802B
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
   10REM AdvCAD - Main program
   20REM (C) Dominic Ford 1998
   30HIMEM=&4000:PROCinit:stop=FALSE:joy=(?&5210=1):mouse=(?&5211=1)
   40ONERRORIFERR=17THEN50ELSEMODE7:OSCLI"FX15,1":PRINT"Fatal Error":END
   50PROCdrawscr:REPEAT?!&5212=&EA:PROCcursor:PROCcompsel:IFFNfire THENPROCmenu
   60IFNOTmouse THEN90ELSEA%=64:X%=&80:Y%=0:CALL&FFF1:!&70=x:!&72=y:CALLwhatover
   70IF?&86=&A0 AND?&77<>0THENPROCmove:PROCdrawscr
   80IF?&86=&60 AND?&77=0THENPROCput:PROCdrawscr
   90UNTILstop:MODE7:OSCLI"FX15,1":END
  100DEFFNfire:IFINKEY(-74)THEN=1ELSEIFjoy THENA%=&80:X%=0:IF(USR(&FFF4)AND(512+256))<>0THEN=1
  110IFmouse THENA%=64:X%=&80:Y%=0:CALL&FFF1:IF?&86=&C0THEN=1
  120=0
  130DEFPROCinit
  140drawcomps=&5200:whatover=&5203:delete=&5206:getlink=&5209:pinbase=&520C:x=640:y=512:DIMmenu$(10),t%(15,1):!&47FC=0:?&4800=0:$&4801="  <Untitled>   ":st$="":READc%:DIMcnam$(c%+1):FORc=1TOc%:READcnam$(c)
  150cnam$(c)=cnam$(c)+STRING$(15-LEN(cnam$(c))," "):NEXT:cnam$(0)=STRING$(15," "):cnam$(c%+1)=STRING$(15," "):cp%=1:ENDPROC
  160DEFPROCdrawscr:CLS:PRINT" Advanced CAD V1.0 by Dominic Ford 1998"
  170GCOL0,1:MOVE0,992:DRAW1280,992:MOVE0,892:DRAW1280,892:MOVE0,884:DRAW1280,884
  180GCOL0,1:CALLdrawcomps:PROCdcu:VDU23,1,0;0;0;0;
  190PRINTTAB(0,1)cnam$(cp%-1):COLOUR129:COLOUR0:PRINTcnam$(cp%):COLOUR128:COLOUR1:PRINTcnam$(cp%+1);
  200T=TIME:REPEATUNTIL(TIME>T+25)OR(NOT(INKEY(-58)ORINKEY(-42)))
  210PRINTTAB(16,1)"Status: Ready       ":PRINTTAB(16,3);:FORr=0TO14:PRINTCHR$?(&4801+r);:NEXT
  220ENDPROC
  230DEFPROCcompsel
  240co%=cp%:IFINKEY(-58)ANDcp%<>1THENcp%=cp%-1
  250IFINKEY(-42)ANDcp%<>c%THENcp%=cp%+1
  260IFcp%<>co%THEN190
  270ENDPROC
  280DEFPROCput
  290IF?&4800=128THENVDU7:ENDPROC
  300?&4800=?&4800+1:c=&4800+16*?&4800:IFcp%=8THEN?(c+5)=FNpins
  310?c=cp%-1:!(c+1)=x+65536*y:FORr=c+8TOc+15:?r=32:NEXT:PROCdcu
  320REPEATUNTILNOTINKEY(-74)
  330ENDPROC
  340DEFFNpins
  350xm=xm+32*(w%+1):IFxm>(1248-32*w%)THENxm=xm-64*(w%+1)
  360n%=10:IFym>(n%+3)*32THENym=ym-32ELSEym=(n%+2)*32
  370w%=3:menu$(0)="Pin":menu$(1)="  6":menu$(2)="  8":menu$(3)=" 14":menu$(4)=" 16":menu$(5)=" 18":menu$(6)=" 20":menu$(7)=" 24":menu$(8)=" 28":menu$(9)=" 32":menu$(10)=" 40":PROCdomenu
  380=?(!pinbase+mo%)
  390DEFPROCmenu
  400PROCdcu:!&70=x:!&72=y:CALLwhatover
  410n%=6:w%=6:IFx<1248-32*w%THENxm=(x AND &FFE0)ELSExm=1248-32*w%
  420IFy>32*(n%+2)THENym=(y AND &FFE0)ELSEym=32*(n%+2)
  430IF?&77=0THENPROCcadmenu:GOTO500
  440menu$(0)="Object":menu$(1)="File "+CHR$255:menu$(2)="Move  ":menu$(3)="Delete":menu$(4)="Label"+CHR$255:menu$(5)="Link "+CHR$255:menu$(6)="Cancel":PROCdomenu
  450IFmo%=0THENPROCfile:GOTO500
  460IFmo%=1THENPROCmove:GOTO500
  470IFmo%=2THENIFFNsure("Delete Object")THENCALLdelete:GOTO500
  480IFmo%=3THENPROClabel:GOTO500
  490IFmo%=4THENPROClink
  500PROCdrawscr
  510ENDPROC
  520DEFPROCcadmenu
  530n%=3:menu$(0)="AdvCAD":menu$(1)="File "+CHR$255:menu$(2)="Add   ":menu$(3)="Cancel":PROCdomenu
  540IFmo%=0THENPROCfile:GOTO560
  550IFmo%=1THENPROCput
  560ENDPROC
  570DEFPROCfile
  580xm=xm+32*(w%+1):IFxm>(1248-32*w%)THENxm=xm-64*(w%+1)
  590n%=9:IFym>(n%+3)*32THENym=ym-32ELSEym=(n%+2)*32
  600menu$(0)=" File ":menu$(1)="New   ":menu$(2)="Open  ":menu$(3)="Save  ":menu$(4)="SaveAs":menu$(5)="Export":menu$(6)="Name "+CHR$255:menu$(7)="MOS(*)":menu$(8)="Exit  ":menu$(9)="Cancel":PROCdomenu
  610IFmo%=0THENIFFNsure("Clear Circuit")THEN!&47FC=0:?&4800=0:$&4801="  <Untitled>   ":st$="":ENDPROC
  620IFmo%=1THENPROCopen:ENDPROC
  630IFmo%=2THENPROCsave(0):ENDPROC
  640IFmo%=3THENPROCsave(1):ENDPROC
  650IFmo%=4THENPROCexport:ENDPROC
  660IFmo%=5THENPROCname:ENDPROC
  670IFmo%=6THENPROCmos:ENDPROC
  680IFmo%=7THENIFFNsure("Exit CAD")THENstop=TRUE:ENDPROC
  690ENDPROC
  700DEFPROCopen
  710w%=7:n%=0:ym=ym-64:xm=768:FORrx=0TO6:t%(rx,0)=32:NEXT:PROCtextbox
  720st$="":FORrx=0TO6:st$=st$+CHR$t%(rx,0):NEXT:OSCLI"LOAD "+st$
  730ENDPROC
  740DEFPROCsave(st)
  750IFst=1ORst$=""THENw%=7:n%=0:ym=ym-64:xm=768:FORrx=0TO6:t%(rx,0)=32:NEXT:PROCtextbox:st$="":FORrx=0TO6:st$=st$+CHR$t%(rx,0):NEXT
  760min=&47FC-4*!&47FC:max=&4810+16*?&4800:OSCLI"SAVE "+st$+" "+STR$~min+" "+STR$~max
  770ENDPROC
  780DEFPROCexport
  790w%=7:n%=0:ym=ym-64:xm=768:FORrx=0TO6:t%(rx,0)=32:NEXT:PROCtextbox
  800st$="":FORrx=0TO6:st$=st$+CHR$t%(rx,0):NEXT:CLS:CALLdrawcomps:OSCLI"SAVE "+st$+" 5800 8000"
  810ENDPROC
  820DEFPROCdomenu
  830xc=xm DIV32:yc=32-(ym DIV32):FORr=0TOn%:PRINTTAB(xc,yc+r)menu$(r);:NEXT
  840GCOL0,1:MOVExm-4,ym+4:DRAWxm+32*w%+4,ym+4:DRAWxm+32*w%+4,ym-32*n%-36:DRAWxm-4,ym-32*n%-36:DRAWxm-4,ym+4:MOVExm-12,ym+12:DRAWxm+32*w%+12,ym+12:DRAWxm+32*w%+12,ym-32*n%-44:DRAWxm-12,ym-32*n%-44:DRAWxm-12,ym+12
  850MOVExm-4,ym-32:DRAWxm+32*w%+4,ym-32
  860ad=&5800+&140*yc+8*xc:FORr=ad TOad+8*w%-1:?r=?r EOR255:NEXT:IFmouse THENA%=64:X%=&80:Y%=0:CALL&FFF1:B%=(!&82)AND&FFFF:C%=B%
  870GCOL3,1:mi%=0:REPEAT ad=&5940+&140*(yc+mi%)+8*xc:FORr=ad TOad+8*w%-1:?r=?r EOR255:NEXT:mo%=mi%
  880REPEATUNTILNOT(INKEY(-58)ORINKEY(-42)ORINKEY(-73)ORINKEY(-105))
  890IFjoy THENREPEATUNTILADVAL(2)<40000ANDADVAL(2)>24000
  900REPEAT IFINKEY(-58)ORINKEY(-73)OR(joy ANDADVAL(2)>40000)THENmi%=mi%-1
  910IFINKEY(-42)ORINKEY(-105)OR(joy ANDADVAL(2)<24000)THENmi%=mi%+1
  920IFFNfire THENmi%=-5
  930IFNOTmouse THEN960ELSEA%=64:X%=&80:Y%=0:CALL&FFF1:C%=(!&82)AND&FFFF
  940IFC%<(B%-31)THENmi%=mo%+1:B%=C%
  950IFC%>(B%+31)THENmi%=mo%-1:B%=C%
  960UNTILmi%<>mo%:IFmi%<>-5THENmi%=(mi%+n%)MODn%
  970IFmi%<>-5THENFORr=ad TOad+8*w%-1:?r=?r EOR255:NEXT
  980UNTILmi%=-5
  990ENDPROC
 1000DEFFNsure(s$)
 1010FORr=0TO3:PRINTTAB(14,14+r)SPC(13):NEXT:PRINTTAB(20-INT(0.5*LEN(s$)),14)s$;TAB(14,16)"Are you sure?";TAB(14,17)"(Y)es or (N)o":FORr=&69F0TO&6A57:?r=?r EOR255:NEXT
 1020GCOL0,1:MOVE448,448:DRAW864,448:DRAW864,576:DRAW448,576:DRAW448,448:MOVE440,440:DRAW872,440:DRAW872,584:DRAW440,584:DRAW440,440
 1030r=-5:REPEAT IFINKEY(-69)THENr=TRUE
 1040IFINKEY(-86)THENr=FALSE
 1050UNTILr<>-5:=r
 1060DEFPROCmos
 1070CLS:PRINT"MOS Command Prompt"''"Enter blank line to return to CAD"':ONERRORREPORT:PRINT:GOTO1080
 1080OSCLI"FX15,1":REPEAT PRINT:INPUT"*"s$:OSCLIs$
 1090UNTILs$="":ONERRORIFERR=17THEN50ELSEMODE7:OSCLI"FX15,1":PRINT"Fatal Error":END
 1100*FX125
 1110DEFPROCname
 1120w%=15:n%=0:ym=ym-256:xm=768:FORrx=0TO15:t%(rx,0)=?(&4801+rx):NEXT:PROCtextbox
 1130FORrx=0TO15:?(&4801+rx)=t%(rx,0):NEXT
 1140ENDPROC
 1150DEFPROClabel
 1160xm=xm+32*(w%+1):IFxm>(1248-32*w%)THENxm=xm-64*(w%+1)
 1170n%=1:ym=ym-128:w%=4:FORrx=0TOw%-1:FORry=0TOn%:t%(rx,ry)=?(&4808+16*?&77+rx+4*ry):NEXT,:PROCtextbox
 1180FORrx=0TO3:FORry=0TO1:?(&4808+16*?&77+rx+4*ry)=t%(rx,ry):NEXT,
 1190ENDPROC
 1200DEFPROCtextbox
 1210xc=xm DIV32:yc=32-(ym DIV32):mx=0:my=0:GCOL0,1:MOVExm-4,ym+4:DRAWxm+32*w%+4,ym+4:DRAWxm+32*w%+4,ym-32*n%-36:DRAWxm-4,ym-32*n%-36:DRAWxm-4,ym+4
 1220MOVExm-12,ym+12:DRAWxm+32*w%+12,ym+12:DRAWxm+32*w%+12,ym-32*n%-44:DRAWxm-12,ym-32*n%-44:DRAWxm-12,ym+12
 1230REPEAT FORry=0TOn%:PRINTTAB(xc,yc+ry);:FORrx=0TOw%-1:PRINTCHR$t%(rx,ry);:NEXT,:ad=&5800+8*(xc+mx)+&140*(yc+my):FORr=ad TOad+7:?r=?r EOR255:NEXT
 1240st=0:REPEATUNTILINKEY(0)=-1:REPEAT IFINKEY(-58)ANDmy<>0THENmy=my-1:st=1
 1250IFINKEY(-42)ANDmy<>n%THENmy=my+1:st=1
 1260IFINKEY(-26)ANDmx<>0THENmx=mx-1:st=1
 1270IFINKEY(-122)ANDmx<>(w%-1)THENmx=mx+1:st=1
 1280IFINKEY(-74)THENst=2
 1290IFst=0THENr=INKEY(0):IFr>31ANDr<127THENt%(mx,my)=r:st=1:IFmx<>(w%-1)THENmx=mx+1
 1300UNTILst<>0:UNTILst=2
 1310ENDPROC
 1320DEFPROClink
 1330co1%=?&77:xm=xm+32*(w%+1):ym=ym-160:PROCprelinks:IFmo%=n%-1THENENDPROC
 1340cp1%=mo%:PROCdrawscr:PRINTTAB(16,1)"Status: Linking     ":REPEATUNTILNOTFNfire
 1350REPEAT PROCcursor:UNTILFNfire:CALLwhatover:IF?&77=0THENVDU7:REPEATUNTILNOTFNfire:GOTO1350
 1360co2%=?&77:xm=(x AND &FFE0):ym=(y AND &FFE0):PROCprelinks
 1370IFmo%=n%-1THENENDPROC
 1380!&47FC=!&47FC+1:ad=&47FC-4*!&47FC:?ad=co1%:?(ad+1)=cp1%:?(ad+2)=co2%:?(ad+3)=mo%
 1390ENDPROC
 1400DEFPROCprelinks
 1410?&70=?(&4800+16*?&77):CALLgetlink:n%=-1:w%=7:IFxm>(1248-32*w%)THENxm=xm-64*(w%+1)
 1420IF?&73=10AND?&72=160THENPROCleads:GOTO1460
 1430ad=?&72+256*?&73:REPEAT n%=n%+1:menu$(n%)="":FORr=ad TOad+6:menu$(n%)=menu$(n%)+CHR$?r:NEXT:ad=ad+8:UNTIL?(ad-1)=0:n%=n%+1:menu$(n%)="Cancel "
 1440IFym<(n%+2)*32THENym=(n%+2)*32
 1450PROCdomenu
 1460ENDPROC
 1470DEFPROCleads
 1480ml%=?(&4805+16*?&77)*2:n%=(ml%DIV5)+2:menu$(0)="Lead No":menu$(1)="1 - 4  ":FORr=2TOn%-1
 1490IF(5*(r-1))=ml%THENmenu$(r)=STR$(5*(r-1)):GOTO1510
 1500IF(5*(r-1)+4)>=ml%THENmenu$(r)=STR$(5*(r-1))+" - "+STR$(ml%)ELSEmenu$(r)=STR$(5*(r-1))+" - "+STR$(5*r-1)
 1510IFLEN(menu$(r))<7THENmenu$(r)=menu$(r)+STRING$(7-LEN(menu$(r))," ")
 1520NEXT:menu$(n%)="Cancel ":IFym<(n%+2)*32THENym=(n%+2)*32
 1530PROCdomenu:IFmo%=n%-1THENENDPROC
 1540IF(mo%=n%-1)AND(ml%MOD5)=0THENmo%=ml%-1:n%=999:ENDPROC
 1550min=VAL(menu$(mo%+1)):max=VAL(MID$(menu$(mo%+1),5,3)):FORr=min TOmax:menu$(1+r-min)=STRING$(7-LEN(STR$r)," ")+STR$r:NEXT:n%=max-min+2:menu$(n%)="Cancel ":IFym<(n%+2)*32THENym=(n%+2)*32
 1560xm=xm+32*(w%+1):IFxm>(1248-32*w%)THENxm=xm-96*(w%+1)
 1570PROCdomenu:IFmo%=n%-1THENENDPROC
 1580mo%=mo%+min:n%=999:ENDPROC
 1590DEFPROCmove
 1600PROCdrawscr:PROCdcu:PRINTTAB(16,1)"Status: Moving      ":REPEATUNTILNOTFNfire
 1610?!&5212=&60:!&70=x:!&72=y:CALLwhatover:ad=&4801+16*?&77:x=?ad+256*?(ad+1):y=?(ad+2)+256*?(ad+3):!&70=x:!&72=y:CALL&5006
 1620REPEAT CALL&5009:x=(!&70)AND&FFFF:y=!&72:UNTILFNfire:!ad=x+65536*y:ENDPROC
 1630DEFPROCcursor:GCOL3,1:!&70=x:!&72=y:CALL&5000:x=(!&70)AND&FFFF:y=!&72:ENDPROC
 1640DEFPROCdcu:GCOL3,1:!&74=x:!&76=y:CALL&5003:ENDPROC
 1650DATA20,"Capacitor","Capacitor(E)","Cell","Battery","Diode","Diode(Zener)","Ground","IC","Inductor","Logic AND","Logic NOT","Logic OR","Node","OpAmp","Resistor","Resistor(Var)"
 1660DATA"Switch","Transistor(NPN)","Transistor(PNP)","Transistor(FET)"

� AdvCAD - Main program
� (C) Dominic Ford 1998
8�=&4000:�init:stop=�:joy=(?&5210=1):mouse=(?&5211=1)
(.��=17��Tr@��7:�"FX15,1":�"Fatal Error":�
28�drawscr:�?!&5212=&EA:�cursor:�compsel:�fire ��menu
<B�mouse ��DZ@�A%=64:X%=&80:Y%=0:�&FFF1:!&70=x:!&72=y:�whatover
F%�?&86=&A0 �?&77<>0��move:�drawscr
P#�?&86=&60 �?&77=0��put:�drawscr
Z�stop:�7:�"FX15,1":�
dCݤfire:�(-74)�=1��joy �A%=&80:X%=0:�(�(&FFF4)�(512+256))<>0�=1
n1�mouse �A%=64:X%=&80:Y%=0:�&FFF1:�?&86=&C0�=1
x=0
�
��init
��drawcomps=&5200:whatover=&5203:delete=&5206:getlink=&5209:pinbase=&520C:x=640:y=512:�menu$(10),t%(15,1):!&47FC=0:?&4800=0:$&4801="  <Untitled>   ":st$="":�c%:�cnam$(c%+1):�c=1�c%:�cnam$(c)
�[cnam$(c)=cnam$(c)+�15-�(cnam$(c))," "):�:cnam$(0)=�15," "):cnam$(c%+1)=�15," "):cp%=1:�
�:��drawscr:�:�" Advanced CAD V1.0 by Dominic Ford 1998"
�;�0,1:�0,992:�1280,992:�0,892:�1280,892:�0,884:�1280,884
�'�0,1:�drawcomps:�dcu:�23,1,0;0;0;0;
�A�0,1)cnam$(cp%-1):�129:�0:�cnam$(cp%):�128:�1:�cnam$(cp%+1);
�%T=�:��(�>T+25)�(�(�(-58)��(-42)))
�B�16,1)"Status: Ready       ":�16,3);:�r=0�14:�?(&4801+r);:�
��
�
��compsel
�$co%=cp%:�(-58)�cp%<>1�cp%=cp%-1
��(-42)�cp%<>c%�cp%=cp%+1
�cp%<>co%��t~@
�
	��put
"�?&4800=128��7:�
,9?&4800=?&4800+1:c=&4800+16*?&4800:�cp%=8�?(c+5)=�pins
66?c=cp%-1:!(c+1)=x+65536*y:�r=c+8�c+15:?r=32:�:�dcu
@
����(-74)
J�
T
ݤpins
^4xm=xm+32*(w%+1):�xm>(1248-32*w%)�xm=xm-64*(w%+1)
h-n%=10:�ym>(n%+3)*32�ym=ym-32�ym=(n%+2)*32
r�w%=3:menu$(0)="Pin":menu$(1)="  6":menu$(2)="  8":menu$(3)=" 14":menu$(4)=" 16":menu$(5)=" 18":menu$(6)=" 20":menu$(7)=" 24":menu$(8)=" 28":menu$(9)=" 32":menu$(10)=" 40":�domenu
|=?(!pinbase+mo%)
�
��menu
� �dcu:!&70=x:!&72=y:�whatover
�8n%=6:w%=6:�x<1248-32*w%�xm=(x � &FFE0)�xm=1248-32*w%
�,�y>32*(n%+2)�ym=(y � &FFE0)�ym=32*(n%+2)
��?&77=0��cadmenu:�dtA
��menu$(0)="Object":menu$(1)="File "+�255:menu$(2)="Move  ":menu$(3)="Delete":menu$(4)="Label"+�255:menu$(5)="Link "+�255:menu$(6)="Cancel":�domenu
��mo%=0��file:�dtA
��mo%=1��move:�dtA
�0�mo%=2��sure("Delete Object")��delete:�dtA
��mo%=3��label:�dtA
��mo%=4��link
��drawscr
��

��cadmenu
\n%=3:menu$(0)="AdvCAD":menu$(1)="File "+�255:menu$(2)="Add   ":menu$(3)="Cancel":�domenu
�mo%=0��file:�TpB
&�mo%=1��put
0�
:
��file
D4xm=xm+32*(w%+1):�xm>(1248-32*w%)�xm=xm-64*(w%+1)
N,n%=9:�ym>(n%+3)*32�ym=ym-32�ym=(n%+2)*32
X�menu$(0)=" File ":menu$(1)="New   ":menu$(2)="Open  ":menu$(3)="Save  ":menu$(4)="SaveAs":menu$(5)="Export":menu$(6)="Name "+�255:menu$(7)="MOS(*)":menu$(8)="Exit  ":menu$(9)="Cancel":�domenu
bV�mo%=0��sure("Clear Circuit")�!&47FC=0:?&4800=0:$&4801="  <Untitled>   ":st$="":�
l�mo%=1��open:�
v�mo%=2��save(0):�
��mo%=3��save(1):�
��mo%=4��export:�
��mo%=5��name:�
��mo%=6��mos:�
�&�mo%=7��sure("Exit CAD")�stop=�:�
��
�
��open
�<w%=7:n%=0:ym=ym-64:xm=768:�rx=0�6:t%(rx,0)=32:�:�textbox
�3st$="":�rx=0�6:st$=st$+�t%(rx,0):�:�"LOAD "+st$
��
���save(st)
�l�st=1�st$=""�w%=7:n%=0:ym=ym-64:xm=768:�rx=0�6:t%(rx,0)=32:�:�textbox:st$="":�rx=0�6:st$=st$+�t%(rx,0):�
�Kmin=&47FC-4*!&47FC:max=&4810+16*?&4800:�"SAVE "+st$+" "+�~min+" "+�~max
�
��export
<w%=7:n%=0:ym=ym-64:xm=768:�rx=0�6:t%(rx,0)=32:�:�textbox
 Mst$="":�rx=0�6:st$=st$+�t%(rx,0):�:�:�drawcomps:�"SAVE "+st$+" 5800 8000"
*�
4��domenu
>:xc=xm �32:yc=32-(ym �32):�r=0�n%:�xc,yc+r)menu$(r);:�
H��0,1:�xm-4,ym+4:�xm+32*w%+4,ym+4:�xm+32*w%+4,ym-32*n%-36:�xm-4,ym-32*n%-36:�xm-4,ym+4:�xm-12,ym+12:�xm+32*w%+12,ym+12:�xm+32*w%+12,ym-32*n%-44:�xm-12,ym-32*n%-44:�xm-12,ym+12
R!�xm-4,ym-32:�xm+32*w%+4,ym-32
\nad=&5800+&140*yc+8*xc:�r=ad �ad+8*w%-1:?r=?r �255:�:�mouse �A%=64:X%=&80:Y%=0:�&FFF1:B%=(!&82)�&FFFF:C%=B%
fR�3,1:mi%=0:� ad=&5940+&140*(yc+mi%)+8*xc:�r=ad �ad+8*w%-1:?r=?r �255:�:mo%=mi%
p%���(�(-58)��(-42)��(-73)��(-105))
z!�joy ����(2)<40000��(2)>24000
�0� �(-58)��(-73)�(joy ��(2)>40000)�mi%=mi%-1
�/�(-42)��(-105)�(joy ��(2)<24000)�mi%=mi%+1
��fire �mi%=-5
�:�mouse ��d@C�A%=64:X%=&80:Y%=0:�&FFF1:C%=(!&82)�&FFFF
��C%<(B%-31)�mi%=mo%+1:B%=C%
��C%>(B%+31)�mi%=mo%-1:B%=C%
�&�mi%<>mo%:�mi%<>-5�mi%=(mi%+n%)�n%
�*�mi%<>-5��r=ad �ad+8*w%-1:?r=?r �255:�
��mi%=-5
��
�ݤsure(s$)
�~�r=0�3:�14,14+r)�(13):�:�20-�(0.5*�(s$)),14)s$;�14,16)"Are you sure?";�14,17)"(Y)es or (N)o":�r=&69F0�&6A57:?r=?r �255:�
�b�0,1:�448,448:�864,448:�864,576:�448,576:�448,448:�440,440:�872,440:�872,584:�440,584:�440,440
r=-5:� �(-69)�r=�
�(-86)�r=�

�r<>-5:=r
$	��mos
.M�:�"MOS Command Prompt"''"Enter blank line to return to CAD"':�:�:�TxD
8�"FX15,1":� �:�"*"s$:�s$
B5�s$="":��=17��Tr@��7:�"FX15,1":�"Fatal Error":�
L
*FX125
V
��name
`Hw%=15:n%=0:ym=ym-256:xm=768:�rx=0�15:t%(rx,0)=?(&4801+rx):�:�textbox
j#�rx=0�15:?(&4801+rx)=t%(rx,0):�
t�
~��label
�4xm=xm+32*(w%+1):�xm>(1248-32*w%)�xm=xm-64*(w%+1)
�Zn%=1:ym=ym-128:w%=4:�rx=0�w%-1:�ry=0�n%:t%(rx,ry)=?(&4808+16*?&77+rx+4*ry):�,:�textbox
�9�rx=0�3:�ry=0�1:?(&4808+16*?&77+rx+4*ry)=t%(rx,ry):�,
��
�
��textbox
�|xc=xm �32:yc=32-(ym �32):mx=0:my=0:�0,1:�xm-4,ym+4:�xm+32*w%+4,ym+4:�xm+32*w%+4,ym-32*n%-36:�xm-4,ym-32*n%-36:�xm-4,ym+4
�\�xm-12,ym+12:�xm+32*w%+12,ym+12:�xm+32*w%+12,ym-32*n%-44:�xm-12,ym-32*n%-44:�xm-12,ym+12
�o� �ry=0�n%:�xc,yc+ry);:�rx=0�w%-1:�t%(rx,ry);:�,:ad=&5800+8*(xc+mx)+&140*(yc+my):�r=ad �ad+7:?r=?r �255:�
�/st=0:���(0)=-1:� �(-58)�my<>0�my=my-1:st=1
��(-42)�my<>n%�my=my+1:st=1
��(-26)�mx<>0�mx=mx-1:st=1
�$�(-122)�mx<>(w%-1)�mx=mx+1:st=1
�(-74)�st=2

A�st=0�r=�(0):�r>31�r<127�t%(mx,my)=r:st=1:�mx<>(w%-1)�mx=mx+1
�st<>0:�st=2
�
(
��link
2=co1%=?&77:xm=xm+32*(w%+1):ym=ym-160:�prelinks:�mo%=n%-1��
<<cp1%=mo%:�drawscr:�16,1)"Status: Linking     ":����fire
F8� �cursor:��fire:�whatover:�?&77=0��7:����fire:�DFE
P5co2%=?&77:xm=(x � &FFE0):ym=(y � &FFE0):�prelinks
Z�mo%=n%-1��
dT!&47FC=!&47FC+1:ad=&47FC-4*!&47FC:?ad=co1%:?(ad+1)=cp1%:?(ad+2)=co2%:?(ad+3)=mo%
n�
x��prelinks
�N?&70=?(&4800+16*?&77):�getlink:n%=-1:w%=7:�xm>(1248-32*w%)�xm=xm-64*(w%+1)
�"�?&73=10�?&72=160��leads:�ttE
��ad=?&72+256*?&73:� n%=n%+1:menu$(n%)="":�r=ad �ad+6:menu$(n%)=menu$(n%)+�?r:�:ad=ad+8:�?(ad-1)=0:n%=n%+1:menu$(n%)="Cancel "
��ym<(n%+2)*32�ym=(n%+2)*32
��domenu
��
���leads
�Wml%=?(&4805+16*?&77)*2:n%=(ml%�5)+2:menu$(0)="Lead No":menu$(1)="1 - 4  ":�r=2�n%-1
�,�(5*(r-1))=ml%�menu$(r)=�(5*(r-1)):�dfE
�Y�(5*(r-1)+4)>=ml%�menu$(r)=�(5*(r-1))+" - "+�(ml%)�menu$(r)=�(5*(r-1))+" - "+�(5*r-1)
�8�(menu$(r))<7�menu$(r)=menu$(r)+�7-�(menu$(r))," ")
�4�:menu$(n%)="Cancel ":�ym<(n%+2)*32�ym=(n%+2)*32
��domenu:�mo%=n%-1��
,�(mo%=n%-1)�(ml%�5)=0�mo%=ml%-1:n%=999:�
�min=�(menu$(mo%+1)):max=�(�menu$(mo%+1),5,3)):�r=min �max:menu$(1+r-min)=�7-�(�r)," ")+�r:�:n%=max-min+2:menu$(n%)="Cancel ":�ym<(n%+2)*32�ym=(n%+2)*32
4xm=xm+32*(w%+1):�xm>(1248-32*w%)�xm=xm-96*(w%+1)
"�domenu:�mo%=n%-1��
,mo%=mo%+min:n%=999:�
6
��move
@8�drawscr:�dcu:�16,1)"Status: Moving      ":����fire
Ju?!&5212=&60:!&70=x:!&72=y:�whatover:ad=&4801+16*?&77:x=?ad+256*?(ad+1):y=?(ad+2)+256*?(ad+3):!&70=x:!&72=y:�&5006
T9� �&5009:x=(!&70)�&FFFF:y=!&72:��fire:!ad=x+65536*y:�
^>��cursor:�3,1:!&70=x:!&72=y:�&5000:x=(!&70)�&FFFF:y=!&72:�
h%��dcu:�3,1:!&74=x:!&76=y:�&5003:�
r��20,"Capacitor","Capacitor(E)","Cell","Battery","Diode","Diode(Zener)","Ground","IC","Inductor","Logic AND","Logic NOT","Logic OR","Node","OpAmp","Resistor","Resistor(Var)"
|C�"Switch","Transistor(NPN)","Transistor(PNP)","Transistor(FET)"
�
00000000  0d 00 0a 1b f4 20 41 64  76 43 41 44 20 2d 20 4d  |..... AdvCAD - M|
00000010  61 69 6e 20 70 72 6f 67  72 61 6d 0d 00 14 1b f4  |ain program.....|
00000020  20 28 43 29 20 44 6f 6d  69 6e 69 63 20 46 6f 72  | (C) Dominic For|
00000030  64 20 31 39 39 38 0d 00  1e 38 d3 3d 26 34 30 30  |d 1998...8.=&400|
00000040  30 3a f2 69 6e 69 74 3a  73 74 6f 70 3d a3 3a 6a  |0:.init:stop=.:j|
00000050  6f 79 3d 28 3f 26 35 32  31 30 3d 31 29 3a 6d 6f  |oy=(?&5210=1):mo|
00000060  75 73 65 3d 28 3f 26 35  32 31 31 3d 31 29 0d 00  |use=(?&5211=1)..|
00000070  28 2e ee 85 e7 9f 3d 31  37 8c 8d 54 72 40 8b eb  |(.....=17..Tr@..|
00000080  37 3a ff 22 46 58 31 35  2c 31 22 3a f1 22 46 61  |7:."FX15,1":."Fa|
00000090  74 61 6c 20 45 72 72 6f  72 22 3a e0 0d 00 32 38  |tal Error":...28|
000000a0  f2 64 72 61 77 73 63 72  3a f5 3f 21 26 35 32 31  |.drawscr:.?!&521|
000000b0  32 3d 26 45 41 3a f2 63  75 72 73 6f 72 3a f2 63  |2=&EA:.cursor:.c|
000000c0  6f 6d 70 73 65 6c 3a e7  a4 66 69 72 65 20 8c f2  |ompsel:..fire ..|
000000d0  6d 65 6e 75 0d 00 3c 42  e7 ac 6d 6f 75 73 65 20  |menu..<B..mouse |
000000e0  8c 8d 44 5a 40 8b 41 25  3d 36 34 3a 58 25 3d 26  |..DZ@.A%=64:X%=&|
000000f0  38 30 3a 59 25 3d 30 3a  d6 26 46 46 46 31 3a 21  |80:Y%=0:.&FFF1:!|
00000100  26 37 30 3d 78 3a 21 26  37 32 3d 79 3a d6 77 68  |&70=x:!&72=y:.wh|
00000110  61 74 6f 76 65 72 0d 00  46 25 e7 3f 26 38 36 3d  |atover..F%.?&86=|
00000120  26 41 30 20 80 3f 26 37  37 3c 3e 30 8c f2 6d 6f  |&A0 .?&77<>0..mo|
00000130  76 65 3a f2 64 72 61 77  73 63 72 0d 00 50 23 e7  |ve:.drawscr..P#.|
00000140  3f 26 38 36 3d 26 36 30  20 80 3f 26 37 37 3d 30  |?&86=&60 .?&77=0|
00000150  8c f2 70 75 74 3a f2 64  72 61 77 73 63 72 0d 00  |..put:.drawscr..|
00000160  5a 18 fd 73 74 6f 70 3a  eb 37 3a ff 22 46 58 31  |Z..stop:.7:."FX1|
00000170  35 2c 31 22 3a e0 0d 00  64 43 dd a4 66 69 72 65  |5,1":...dC..fire|
00000180  3a e7 a6 28 2d 37 34 29  8c 3d 31 8b e7 6a 6f 79  |:..(-74).=1..joy|
00000190  20 8c 41 25 3d 26 38 30  3a 58 25 3d 30 3a e7 28  | .A%=&80:X%=0:.(|
000001a0  ba 28 26 46 46 46 34 29  80 28 35 31 32 2b 32 35  |.(&FFF4).(512+25|
000001b0  36 29 29 3c 3e 30 8c 3d  31 0d 00 6e 31 e7 6d 6f  |6))<>0.=1..n1.mo|
000001c0  75 73 65 20 8c 41 25 3d  36 34 3a 58 25 3d 26 38  |use .A%=64:X%=&8|
000001d0  30 3a 59 25 3d 30 3a d6  26 46 46 46 31 3a e7 3f  |0:Y%=0:.&FFF1:.?|
000001e0  26 38 36 3d 26 43 30 8c  3d 31 0d 00 78 06 3d 30  |&86=&C0.=1..x.=0|
000001f0  0d 00 82 0a dd f2 69 6e  69 74 0d 00 8c c0 64 72  |......init....dr|
00000200  61 77 63 6f 6d 70 73 3d  26 35 32 30 30 3a 77 68  |awcomps=&5200:wh|
00000210  61 74 6f 76 65 72 3d 26  35 32 30 33 3a 64 65 6c  |atover=&5203:del|
00000220  65 74 65 3d 26 35 32 30  36 3a 67 65 74 6c 69 6e  |ete=&5206:getlin|
00000230  6b 3d 26 35 32 30 39 3a  70 69 6e 62 61 73 65 3d  |k=&5209:pinbase=|
00000240  26 35 32 30 43 3a 78 3d  36 34 30 3a 79 3d 35 31  |&520C:x=640:y=51|
00000250  32 3a de 6d 65 6e 75 24  28 31 30 29 2c 74 25 28  |2:.menu$(10),t%(|
00000260  31 35 2c 31 29 3a 21 26  34 37 46 43 3d 30 3a 3f  |15,1):!&47FC=0:?|
00000270  26 34 38 30 30 3d 30 3a  24 26 34 38 30 31 3d 22  |&4800=0:$&4801="|
00000280  20 20 3c 55 6e 74 69 74  6c 65 64 3e 20 20 20 22  |  <Untitled>   "|
00000290  3a 73 74 24 3d 22 22 3a  f3 63 25 3a de 63 6e 61  |:st$="":.c%:.cna|
000002a0  6d 24 28 63 25 2b 31 29  3a e3 63 3d 31 b8 63 25  |m$(c%+1):.c=1.c%|
000002b0  3a f3 63 6e 61 6d 24 28  63 29 0d 00 96 5b 63 6e  |:.cnam$(c)...[cn|
000002c0  61 6d 24 28 63 29 3d 63  6e 61 6d 24 28 63 29 2b  |am$(c)=cnam$(c)+|
000002d0  c4 31 35 2d a9 28 63 6e  61 6d 24 28 63 29 29 2c  |.15-.(cnam$(c)),|
000002e0  22 20 22 29 3a ed 3a 63  6e 61 6d 24 28 30 29 3d  |" "):.:cnam$(0)=|
000002f0  c4 31 35 2c 22 20 22 29  3a 63 6e 61 6d 24 28 63  |.15," "):cnam$(c|
00000300  25 2b 31 29 3d c4 31 35  2c 22 20 22 29 3a 63 70  |%+1)=.15," "):cp|
00000310  25 3d 31 3a e1 0d 00 a0  3a dd f2 64 72 61 77 73  |%=1:....:..draws|
00000320  63 72 3a db 3a f1 22 20  41 64 76 61 6e 63 65 64  |cr:.:." Advanced|
00000330  20 43 41 44 20 56 31 2e  30 20 62 79 20 44 6f 6d  | CAD V1.0 by Dom|
00000340  69 6e 69 63 20 46 6f 72  64 20 31 39 39 38 22 0d  |inic Ford 1998".|
00000350  00 aa 3b e6 30 2c 31 3a  ec 30 2c 39 39 32 3a df  |..;.0,1:.0,992:.|
00000360  31 32 38 30 2c 39 39 32  3a ec 30 2c 38 39 32 3a  |1280,992:.0,892:|
00000370  df 31 32 38 30 2c 38 39  32 3a ec 30 2c 38 38 34  |.1280,892:.0,884|
00000380  3a df 31 32 38 30 2c 38  38 34 0d 00 b4 27 e6 30  |:.1280,884...'.0|
00000390  2c 31 3a d6 64 72 61 77  63 6f 6d 70 73 3a f2 64  |,1:.drawcomps:.d|
000003a0  63 75 3a ef 32 33 2c 31  2c 30 3b 30 3b 30 3b 30  |cu:.23,1,0;0;0;0|
000003b0  3b 0d 00 be 41 f1 8a 30  2c 31 29 63 6e 61 6d 24  |;...A..0,1)cnam$|
000003c0  28 63 70 25 2d 31 29 3a  fb 31 32 39 3a fb 30 3a  |(cp%-1):.129:.0:|
000003d0  f1 63 6e 61 6d 24 28 63  70 25 29 3a fb 31 32 38  |.cnam$(cp%):.128|
000003e0  3a fb 31 3a f1 63 6e 61  6d 24 28 63 70 25 2b 31  |:.1:.cnam$(cp%+1|
000003f0  29 3b 0d 00 c8 25 54 3d  91 3a f5 fd 28 91 3e 54  |);...%T=.:..(.>T|
00000400  2b 32 35 29 84 28 ac 28  a6 28 2d 35 38 29 84 a6  |+25).(.(.(-58)..|
00000410  28 2d 34 32 29 29 29 0d  00 d2 42 f1 8a 31 36 2c  |(-42)))...B..16,|
00000420  31 29 22 53 74 61 74 75  73 3a 20 52 65 61 64 79  |1)"Status: Ready|
00000430  20 20 20 20 20 20 20 22  3a f1 8a 31 36 2c 33 29  |       ":..16,3)|
00000440  3b 3a e3 72 3d 30 b8 31  34 3a f1 bd 3f 28 26 34  |;:.r=0.14:..?(&4|
00000450  38 30 31 2b 72 29 3b 3a  ed 0d 00 dc 05 e1 0d 00  |801+r);:........|
00000460  e6 0d dd f2 63 6f 6d 70  73 65 6c 0d 00 f0 24 63  |....compsel...$c|
00000470  6f 25 3d 63 70 25 3a e7  a6 28 2d 35 38 29 80 63  |o%=cp%:..(-58).c|
00000480  70 25 3c 3e 31 8c 63 70  25 3d 63 70 25 2d 31 0d  |p%<>1.cp%=cp%-1.|
00000490  00 fa 1d e7 a6 28 2d 34  32 29 80 63 70 25 3c 3e  |.....(-42).cp%<>|
000004a0  63 25 8c 63 70 25 3d 63  70 25 2b 31 0d 01 04 12  |c%.cp%=cp%+1....|
000004b0  e7 63 70 25 3c 3e 63 6f  25 8c 8d 74 7e 40 0d 01  |.cp%<>co%..t~@..|
000004c0  0e 05 e1 0d 01 18 09 dd  f2 70 75 74 0d 01 22 14  |.........put..".|
000004d0  e7 3f 26 34 38 30 30 3d  31 32 38 8c ef 37 3a e1  |.?&4800=128..7:.|
000004e0  0d 01 2c 39 3f 26 34 38  30 30 3d 3f 26 34 38 30  |..,9?&4800=?&480|
000004f0  30 2b 31 3a 63 3d 26 34  38 30 30 2b 31 36 2a 3f  |0+1:c=&4800+16*?|
00000500  26 34 38 30 30 3a e7 63  70 25 3d 38 8c 3f 28 63  |&4800:.cp%=8.?(c|
00000510  2b 35 29 3d a4 70 69 6e  73 0d 01 36 36 3f 63 3d  |+5)=.pins..66?c=|
00000520  63 70 25 2d 31 3a 21 28  63 2b 31 29 3d 78 2b 36  |cp%-1:!(c+1)=x+6|
00000530  35 35 33 36 2a 79 3a e3  72 3d 63 2b 38 b8 63 2b  |5536*y:.r=c+8.c+|
00000540  31 35 3a 3f 72 3d 33 32  3a ed 3a f2 64 63 75 0d  |15:?r=32:.:.dcu.|
00000550  01 40 0d f5 fd ac a6 28  2d 37 34 29 0d 01 4a 05  |.@.....(-74)..J.|
00000560  e1 0d 01 54 0a dd a4 70  69 6e 73 0d 01 5e 34 78  |...T...pins..^4x|
00000570  6d 3d 78 6d 2b 33 32 2a  28 77 25 2b 31 29 3a e7  |m=xm+32*(w%+1):.|
00000580  78 6d 3e 28 31 32 34 38  2d 33 32 2a 77 25 29 8c  |xm>(1248-32*w%).|
00000590  78 6d 3d 78 6d 2d 36 34  2a 28 77 25 2b 31 29 0d  |xm=xm-64*(w%+1).|
000005a0  01 68 2d 6e 25 3d 31 30  3a e7 79 6d 3e 28 6e 25  |.h-n%=10:.ym>(n%|
000005b0  2b 33 29 2a 33 32 8c 79  6d 3d 79 6d 2d 33 32 8b  |+3)*32.ym=ym-32.|
000005c0  79 6d 3d 28 6e 25 2b 32  29 2a 33 32 0d 01 72 b6  |ym=(n%+2)*32..r.|
000005d0  77 25 3d 33 3a 6d 65 6e  75 24 28 30 29 3d 22 50  |w%=3:menu$(0)="P|
000005e0  69 6e 22 3a 6d 65 6e 75  24 28 31 29 3d 22 20 20  |in":menu$(1)="  |
000005f0  36 22 3a 6d 65 6e 75 24  28 32 29 3d 22 20 20 38  |6":menu$(2)="  8|
00000600  22 3a 6d 65 6e 75 24 28  33 29 3d 22 20 31 34 22  |":menu$(3)=" 14"|
00000610  3a 6d 65 6e 75 24 28 34  29 3d 22 20 31 36 22 3a  |:menu$(4)=" 16":|
00000620  6d 65 6e 75 24 28 35 29  3d 22 20 31 38 22 3a 6d  |menu$(5)=" 18":m|
00000630  65 6e 75 24 28 36 29 3d  22 20 32 30 22 3a 6d 65  |enu$(6)=" 20":me|
00000640  6e 75 24 28 37 29 3d 22  20 32 34 22 3a 6d 65 6e  |nu$(7)=" 24":men|
00000650  75 24 28 38 29 3d 22 20  32 38 22 3a 6d 65 6e 75  |u$(8)=" 28":menu|
00000660  24 28 39 29 3d 22 20 33  32 22 3a 6d 65 6e 75 24  |$(9)=" 32":menu$|
00000670  28 31 30 29 3d 22 20 34  30 22 3a f2 64 6f 6d 65  |(10)=" 40":.dome|
00000680  6e 75 0d 01 7c 14 3d 3f  28 21 70 69 6e 62 61 73  |nu..|.=?(!pinbas|
00000690  65 2b 6d 6f 25 29 0d 01  86 0a dd f2 6d 65 6e 75  |e+mo%)......menu|
000006a0  0d 01 90 20 f2 64 63 75  3a 21 26 37 30 3d 78 3a  |... .dcu:!&70=x:|
000006b0  21 26 37 32 3d 79 3a d6  77 68 61 74 6f 76 65 72  |!&72=y:.whatover|
000006c0  0d 01 9a 38 6e 25 3d 36  3a 77 25 3d 36 3a e7 78  |...8n%=6:w%=6:.x|
000006d0  3c 31 32 34 38 2d 33 32  2a 77 25 8c 78 6d 3d 28  |<1248-32*w%.xm=(|
000006e0  78 20 80 20 26 46 46 45  30 29 8b 78 6d 3d 31 32  |x . &FFE0).xm=12|
000006f0  34 38 2d 33 32 2a 77 25  0d 01 a4 2c e7 79 3e 33  |48-32*w%...,.y>3|
00000700  32 2a 28 6e 25 2b 32 29  8c 79 6d 3d 28 79 20 80  |2*(n%+2).ym=(y .|
00000710  20 26 46 46 45 30 29 8b  79 6d 3d 33 32 2a 28 6e  | &FFE0).ym=32*(n|
00000720  25 2b 32 29 0d 01 ae 1a  e7 3f 26 37 37 3d 30 8c  |%+2).....?&77=0.|
00000730  f2 63 61 64 6d 65 6e 75  3a e5 8d 64 74 41 0d 01  |.cadmenu:..dtA..|
00000740  b8 95 6d 65 6e 75 24 28  30 29 3d 22 4f 62 6a 65  |..menu$(0)="Obje|
00000750  63 74 22 3a 6d 65 6e 75  24 28 31 29 3d 22 46 69  |ct":menu$(1)="Fi|
00000760  6c 65 20 22 2b bd 32 35  35 3a 6d 65 6e 75 24 28  |le "+.255:menu$(|
00000770  32 29 3d 22 4d 6f 76 65  20 20 22 3a 6d 65 6e 75  |2)="Move  ":menu|
00000780  24 28 33 29 3d 22 44 65  6c 65 74 65 22 3a 6d 65  |$(3)="Delete":me|
00000790  6e 75 24 28 34 29 3d 22  4c 61 62 65 6c 22 2b bd  |nu$(4)="Label"+.|
000007a0  32 35 35 3a 6d 65 6e 75  24 28 35 29 3d 22 4c 69  |255:menu$(5)="Li|
000007b0  6e 6b 20 22 2b bd 32 35  35 3a 6d 65 6e 75 24 28  |nk "+.255:menu$(|
000007c0  36 29 3d 22 43 61 6e 63  65 6c 22 3a f2 64 6f 6d  |6)="Cancel":.dom|
000007d0  65 6e 75 0d 01 c2 16 e7  6d 6f 25 3d 30 8c f2 66  |enu.....mo%=0..f|
000007e0  69 6c 65 3a e5 8d 64 74  41 0d 01 cc 16 e7 6d 6f  |ile:..dtA.....mo|
000007f0  25 3d 31 8c f2 6d 6f 76  65 3a e5 8d 64 74 41 0d  |%=1..move:..dtA.|
00000800  01 d6 30 e7 6d 6f 25 3d  32 8c e7 a4 73 75 72 65  |..0.mo%=2...sure|
00000810  28 22 44 65 6c 65 74 65  20 4f 62 6a 65 63 74 22  |("Delete Object"|
00000820  29 8c d6 64 65 6c 65 74  65 3a e5 8d 64 74 41 0d  |)..delete:..dtA.|
00000830  01 e0 17 e7 6d 6f 25 3d  33 8c f2 6c 61 62 65 6c  |....mo%=3..label|
00000840  3a e5 8d 64 74 41 0d 01  ea 10 e7 6d 6f 25 3d 34  |:..dtA.....mo%=4|
00000850  8c f2 6c 69 6e 6b 0d 01  f4 0c f2 64 72 61 77 73  |..link.....draws|
00000860  63 72 0d 01 fe 05 e1 0d  02 08 0d dd f2 63 61 64  |cr...........cad|
00000870  6d 65 6e 75 0d 02 12 5c  6e 25 3d 33 3a 6d 65 6e  |menu...\n%=3:men|
00000880  75 24 28 30 29 3d 22 41  64 76 43 41 44 22 3a 6d  |u$(0)="AdvCAD":m|
00000890  65 6e 75 24 28 31 29 3d  22 46 69 6c 65 20 22 2b  |enu$(1)="File "+|
000008a0  bd 32 35 35 3a 6d 65 6e  75 24 28 32 29 3d 22 41  |.255:menu$(2)="A|
000008b0  64 64 20 20 20 22 3a 6d  65 6e 75 24 28 33 29 3d  |dd   ":menu$(3)=|
000008c0  22 43 61 6e 63 65 6c 22  3a f2 64 6f 6d 65 6e 75  |"Cancel":.domenu|
000008d0  0d 02 1c 16 e7 6d 6f 25  3d 30 8c f2 66 69 6c 65  |.....mo%=0..file|
000008e0  3a e5 8d 54 70 42 0d 02  26 0f e7 6d 6f 25 3d 31  |:..TpB..&..mo%=1|
000008f0  8c f2 70 75 74 0d 02 30  05 e1 0d 02 3a 0a dd f2  |..put..0....:...|
00000900  66 69 6c 65 0d 02 44 34  78 6d 3d 78 6d 2b 33 32  |file..D4xm=xm+32|
00000910  2a 28 77 25 2b 31 29 3a  e7 78 6d 3e 28 31 32 34  |*(w%+1):.xm>(124|
00000920  38 2d 33 32 2a 77 25 29  8c 78 6d 3d 78 6d 2d 36  |8-32*w%).xm=xm-6|
00000930  34 2a 28 77 25 2b 31 29  0d 02 4e 2c 6e 25 3d 39  |4*(w%+1)..N,n%=9|
00000940  3a e7 79 6d 3e 28 6e 25  2b 33 29 2a 33 32 8c 79  |:.ym>(n%+3)*32.y|
00000950  6d 3d 79 6d 2d 33 32 8b  79 6d 3d 28 6e 25 2b 32  |m=ym-32.ym=(n%+2|
00000960  29 2a 33 32 0d 02 58 c3  6d 65 6e 75 24 28 30 29  |)*32..X.menu$(0)|
00000970  3d 22 20 46 69 6c 65 20  22 3a 6d 65 6e 75 24 28  |=" File ":menu$(|
00000980  31 29 3d 22 4e 65 77 20  20 20 22 3a 6d 65 6e 75  |1)="New   ":menu|
00000990  24 28 32 29 3d 22 4f 70  65 6e 20 20 22 3a 6d 65  |$(2)="Open  ":me|
000009a0  6e 75 24 28 33 29 3d 22  53 61 76 65 20 20 22 3a  |nu$(3)="Save  ":|
000009b0  6d 65 6e 75 24 28 34 29  3d 22 53 61 76 65 41 73  |menu$(4)="SaveAs|
000009c0  22 3a 6d 65 6e 75 24 28  35 29 3d 22 45 78 70 6f  |":menu$(5)="Expo|
000009d0  72 74 22 3a 6d 65 6e 75  24 28 36 29 3d 22 4e 61  |rt":menu$(6)="Na|
000009e0  6d 65 20 22 2b bd 32 35  35 3a 6d 65 6e 75 24 28  |me "+.255:menu$(|
000009f0  37 29 3d 22 4d 4f 53 28  2a 29 22 3a 6d 65 6e 75  |7)="MOS(*)":menu|
00000a00  24 28 38 29 3d 22 45 78  69 74 20 20 22 3a 6d 65  |$(8)="Exit  ":me|
00000a10  6e 75 24 28 39 29 3d 22  43 61 6e 63 65 6c 22 3a  |nu$(9)="Cancel":|
00000a20  f2 64 6f 6d 65 6e 75 0d  02 62 56 e7 6d 6f 25 3d  |.domenu..bV.mo%=|
00000a30  30 8c e7 a4 73 75 72 65  28 22 43 6c 65 61 72 20  |0...sure("Clear |
00000a40  43 69 72 63 75 69 74 22  29 8c 21 26 34 37 46 43  |Circuit").!&47FC|
00000a50  3d 30 3a 3f 26 34 38 30  30 3d 30 3a 24 26 34 38  |=0:?&4800=0:$&48|
00000a60  30 31 3d 22 20 20 3c 55  6e 74 69 74 6c 65 64 3e  |01="  <Untitled>|
00000a70  20 20 20 22 3a 73 74 24  3d 22 22 3a e1 0d 02 6c  |   ":st$="":...l|
00000a80  12 e7 6d 6f 25 3d 31 8c  f2 6f 70 65 6e 3a e1 0d  |..mo%=1..open:..|
00000a90  02 76 15 e7 6d 6f 25 3d  32 8c f2 73 61 76 65 28  |.v..mo%=2..save(|
00000aa0  30 29 3a e1 0d 02 80 15  e7 6d 6f 25 3d 33 8c f2  |0):......mo%=3..|
00000ab0  73 61 76 65 28 31 29 3a  e1 0d 02 8a 14 e7 6d 6f  |save(1):......mo|
00000ac0  25 3d 34 8c f2 65 78 70  6f 72 74 3a e1 0d 02 94  |%=4..export:....|
00000ad0  12 e7 6d 6f 25 3d 35 8c  f2 6e 61 6d 65 3a e1 0d  |..mo%=5..name:..|
00000ae0  02 9e 11 e7 6d 6f 25 3d  36 8c f2 6d 6f 73 3a e1  |....mo%=6..mos:.|
00000af0  0d 02 a8 26 e7 6d 6f 25  3d 37 8c e7 a4 73 75 72  |...&.mo%=7...sur|
00000b00  65 28 22 45 78 69 74 20  43 41 44 22 29 8c 73 74  |e("Exit CAD").st|
00000b10  6f 70 3d b9 3a e1 0d 02  b2 05 e1 0d 02 bc 0a dd  |op=.:...........|
00000b20  f2 6f 70 65 6e 0d 02 c6  3c 77 25 3d 37 3a 6e 25  |.open...<w%=7:n%|
00000b30  3d 30 3a 79 6d 3d 79 6d  2d 36 34 3a 78 6d 3d 37  |=0:ym=ym-64:xm=7|
00000b40  36 38 3a e3 72 78 3d 30  b8 36 3a 74 25 28 72 78  |68:.rx=0.6:t%(rx|
00000b50  2c 30 29 3d 33 32 3a ed  3a f2 74 65 78 74 62 6f  |,0)=32:.:.textbo|
00000b60  78 0d 02 d0 33 73 74 24  3d 22 22 3a e3 72 78 3d  |x...3st$="":.rx=|
00000b70  30 b8 36 3a 73 74 24 3d  73 74 24 2b bd 74 25 28  |0.6:st$=st$+.t%(|
00000b80  72 78 2c 30 29 3a ed 3a  ff 22 4c 4f 41 44 20 22  |rx,0):.:."LOAD "|
00000b90  2b 73 74 24 0d 02 da 05  e1 0d 02 e4 0e dd f2 73  |+st$...........s|
00000ba0  61 76 65 28 73 74 29 0d  02 ee 6c e7 73 74 3d 31  |ave(st)...l.st=1|
00000bb0  84 73 74 24 3d 22 22 8c  77 25 3d 37 3a 6e 25 3d  |.st$="".w%=7:n%=|
00000bc0  30 3a 79 6d 3d 79 6d 2d  36 34 3a 78 6d 3d 37 36  |0:ym=ym-64:xm=76|
00000bd0  38 3a e3 72 78 3d 30 b8  36 3a 74 25 28 72 78 2c  |8:.rx=0.6:t%(rx,|
00000be0  30 29 3d 33 32 3a ed 3a  f2 74 65 78 74 62 6f 78  |0)=32:.:.textbox|
00000bf0  3a 73 74 24 3d 22 22 3a  e3 72 78 3d 30 b8 36 3a  |:st$="":.rx=0.6:|
00000c00  73 74 24 3d 73 74 24 2b  bd 74 25 28 72 78 2c 30  |st$=st$+.t%(rx,0|
00000c10  29 3a ed 0d 02 f8 4b 6d  69 6e 3d 26 34 37 46 43  |):....Kmin=&47FC|
00000c20  2d 34 2a 21 26 34 37 46  43 3a 6d 61 78 3d 26 34  |-4*!&47FC:max=&4|
00000c30  38 31 30 2b 31 36 2a 3f  26 34 38 30 30 3a ff 22  |810+16*?&4800:."|
00000c40  53 41 56 45 20 22 2b 73  74 24 2b 22 20 22 2b c3  |SAVE "+st$+" "+.|
00000c50  7e 6d 69 6e 2b 22 20 22  2b c3 7e 6d 61 78 0d 03  |~min+" "+.~max..|
00000c60  02 05 e1 0d 03 0c 0c dd  f2 65 78 70 6f 72 74 0d  |.........export.|
00000c70  03 16 3c 77 25 3d 37 3a  6e 25 3d 30 3a 79 6d 3d  |..<w%=7:n%=0:ym=|
00000c80  79 6d 2d 36 34 3a 78 6d  3d 37 36 38 3a e3 72 78  |ym-64:xm=768:.rx|
00000c90  3d 30 b8 36 3a 74 25 28  72 78 2c 30 29 3d 33 32  |=0.6:t%(rx,0)=32|
00000ca0  3a ed 3a f2 74 65 78 74  62 6f 78 0d 03 20 4d 73  |:.:.textbox.. Ms|
00000cb0  74 24 3d 22 22 3a e3 72  78 3d 30 b8 36 3a 73 74  |t$="":.rx=0.6:st|
00000cc0  24 3d 73 74 24 2b bd 74  25 28 72 78 2c 30 29 3a  |$=st$+.t%(rx,0):|
00000cd0  ed 3a db 3a d6 64 72 61  77 63 6f 6d 70 73 3a ff  |.:.:.drawcomps:.|
00000ce0  22 53 41 56 45 20 22 2b  73 74 24 2b 22 20 35 38  |"SAVE "+st$+" 58|
00000cf0  30 30 20 38 30 30 30 22  0d 03 2a 05 e1 0d 03 34  |00 8000"..*....4|
00000d00  0c dd f2 64 6f 6d 65 6e  75 0d 03 3e 3a 78 63 3d  |...domenu..>:xc=|
00000d10  78 6d 20 81 33 32 3a 79  63 3d 33 32 2d 28 79 6d  |xm .32:yc=32-(ym|
00000d20  20 81 33 32 29 3a e3 72  3d 30 b8 6e 25 3a f1 8a  | .32):.r=0.n%:..|
00000d30  78 63 2c 79 63 2b 72 29  6d 65 6e 75 24 28 72 29  |xc,yc+r)menu$(r)|
00000d40  3b 3a ed 0d 03 48 b2 e6  30 2c 31 3a ec 78 6d 2d  |;:...H..0,1:.xm-|
00000d50  34 2c 79 6d 2b 34 3a df  78 6d 2b 33 32 2a 77 25  |4,ym+4:.xm+32*w%|
00000d60  2b 34 2c 79 6d 2b 34 3a  df 78 6d 2b 33 32 2a 77  |+4,ym+4:.xm+32*w|
00000d70  25 2b 34 2c 79 6d 2d 33  32 2a 6e 25 2d 33 36 3a  |%+4,ym-32*n%-36:|
00000d80  df 78 6d 2d 34 2c 79 6d  2d 33 32 2a 6e 25 2d 33  |.xm-4,ym-32*n%-3|
00000d90  36 3a df 78 6d 2d 34 2c  79 6d 2b 34 3a ec 78 6d  |6:.xm-4,ym+4:.xm|
00000da0  2d 31 32 2c 79 6d 2b 31  32 3a df 78 6d 2b 33 32  |-12,ym+12:.xm+32|
00000db0  2a 77 25 2b 31 32 2c 79  6d 2b 31 32 3a df 78 6d  |*w%+12,ym+12:.xm|
00000dc0  2b 33 32 2a 77 25 2b 31  32 2c 79 6d 2d 33 32 2a  |+32*w%+12,ym-32*|
00000dd0  6e 25 2d 34 34 3a df 78  6d 2d 31 32 2c 79 6d 2d  |n%-44:.xm-12,ym-|
00000de0  33 32 2a 6e 25 2d 34 34  3a df 78 6d 2d 31 32 2c  |32*n%-44:.xm-12,|
00000df0  79 6d 2b 31 32 0d 03 52  21 ec 78 6d 2d 34 2c 79  |ym+12..R!.xm-4,y|
00000e00  6d 2d 33 32 3a df 78 6d  2b 33 32 2a 77 25 2b 34  |m-32:.xm+32*w%+4|
00000e10  2c 79 6d 2d 33 32 0d 03  5c 6e 61 64 3d 26 35 38  |,ym-32..\nad=&58|
00000e20  30 30 2b 26 31 34 30 2a  79 63 2b 38 2a 78 63 3a  |00+&140*yc+8*xc:|
00000e30  e3 72 3d 61 64 20 b8 61  64 2b 38 2a 77 25 2d 31  |.r=ad .ad+8*w%-1|
00000e40  3a 3f 72 3d 3f 72 20 82  32 35 35 3a ed 3a e7 6d  |:?r=?r .255:.:.m|
00000e50  6f 75 73 65 20 8c 41 25  3d 36 34 3a 58 25 3d 26  |ouse .A%=64:X%=&|
00000e60  38 30 3a 59 25 3d 30 3a  d6 26 46 46 46 31 3a 42  |80:Y%=0:.&FFF1:B|
00000e70  25 3d 28 21 26 38 32 29  80 26 46 46 46 46 3a 43  |%=(!&82).&FFFF:C|
00000e80  25 3d 42 25 0d 03 66 52  e6 33 2c 31 3a 6d 69 25  |%=B%..fR.3,1:mi%|
00000e90  3d 30 3a f5 20 61 64 3d  26 35 39 34 30 2b 26 31  |=0:. ad=&5940+&1|
00000ea0  34 30 2a 28 79 63 2b 6d  69 25 29 2b 38 2a 78 63  |40*(yc+mi%)+8*xc|
00000eb0  3a e3 72 3d 61 64 20 b8  61 64 2b 38 2a 77 25 2d  |:.r=ad .ad+8*w%-|
00000ec0  31 3a 3f 72 3d 3f 72 20  82 32 35 35 3a ed 3a 6d  |1:?r=?r .255:.:m|
00000ed0  6f 25 3d 6d 69 25 0d 03  70 25 f5 fd ac 28 a6 28  |o%=mi%..p%...(.(|
00000ee0  2d 35 38 29 84 a6 28 2d  34 32 29 84 a6 28 2d 37  |-58)..(-42)..(-7|
00000ef0  33 29 84 a6 28 2d 31 30  35 29 29 0d 03 7a 21 e7  |3)..(-105))..z!.|
00000f00  6a 6f 79 20 8c f5 fd 96  28 32 29 3c 34 30 30 30  |joy ....(2)<4000|
00000f10  30 80 96 28 32 29 3e 32  34 30 30 30 0d 03 84 30  |0..(2)>24000...0|
00000f20  f5 20 e7 a6 28 2d 35 38  29 84 a6 28 2d 37 33 29  |. ..(-58)..(-73)|
00000f30  84 28 6a 6f 79 20 80 96  28 32 29 3e 34 30 30 30  |.(joy ..(2)>4000|
00000f40  30 29 8c 6d 69 25 3d 6d  69 25 2d 31 0d 03 8e 2f  |0).mi%=mi%-1.../|
00000f50  e7 a6 28 2d 34 32 29 84  a6 28 2d 31 30 35 29 84  |..(-42)..(-105).|
00000f60  28 6a 6f 79 20 80 96 28  32 29 3c 32 34 30 30 30  |(joy ..(2)<24000|
00000f70  29 8c 6d 69 25 3d 6d 69  25 2b 31 0d 03 98 12 e7  |).mi%=mi%+1.....|
00000f80  a4 66 69 72 65 20 8c 6d  69 25 3d 2d 35 0d 03 a2  |.fire .mi%=-5...|
00000f90  3a e7 ac 6d 6f 75 73 65  20 8c 8d 64 40 43 8b 41  |:..mouse ..d@C.A|
00000fa0  25 3d 36 34 3a 58 25 3d  26 38 30 3a 59 25 3d 30  |%=64:X%=&80:Y%=0|
00000fb0  3a d6 26 46 46 46 31 3a  43 25 3d 28 21 26 38 32  |:.&FFF1:C%=(!&82|
00000fc0  29 80 26 46 46 46 46 0d  03 ac 1f e7 43 25 3c 28  |).&FFFF.....C%<(|
00000fd0  42 25 2d 33 31 29 8c 6d  69 25 3d 6d 6f 25 2b 31  |B%-31).mi%=mo%+1|
00000fe0  3a 42 25 3d 43 25 0d 03  b6 1f e7 43 25 3e 28 42  |:B%=C%.....C%>(B|
00000ff0  25 2b 33 31 29 8c 6d 69  25 3d 6d 6f 25 2d 31 3a  |%+31).mi%=mo%-1:|
00001000  42 25 3d 43 25 0d 03 c0  26 fd 6d 69 25 3c 3e 6d  |B%=C%...&.mi%<>m|
00001010  6f 25 3a e7 6d 69 25 3c  3e 2d 35 8c 6d 69 25 3d  |o%:.mi%<>-5.mi%=|
00001020  28 6d 69 25 2b 6e 25 29  83 6e 25 0d 03 ca 2a e7  |(mi%+n%).n%...*.|
00001030  6d 69 25 3c 3e 2d 35 8c  e3 72 3d 61 64 20 b8 61  |mi%<>-5..r=ad .a|
00001040  64 2b 38 2a 77 25 2d 31  3a 3f 72 3d 3f 72 20 82  |d+8*w%-1:?r=?r .|
00001050  32 35 35 3a ed 0d 03 d4  0b fd 6d 69 25 3d 2d 35  |255:......mi%=-5|
00001060  0d 03 de 05 e1 0d 03 e8  0e dd a4 73 75 72 65 28  |...........sure(|
00001070  73 24 29 0d 03 f2 7e e3  72 3d 30 b8 33 3a f1 8a  |s$)...~.r=0.3:..|
00001080  31 34 2c 31 34 2b 72 29  89 28 31 33 29 3a ed 3a  |14,14+r).(13):.:|
00001090  f1 8a 32 30 2d a8 28 30  2e 35 2a a9 28 73 24 29  |..20-.(0.5*.(s$)|
000010a0  29 2c 31 34 29 73 24 3b  8a 31 34 2c 31 36 29 22  |),14)s$;.14,16)"|
000010b0  41 72 65 20 79 6f 75 20  73 75 72 65 3f 22 3b 8a  |Are you sure?";.|
000010c0  31 34 2c 31 37 29 22 28  59 29 65 73 20 6f 72 20  |14,17)"(Y)es or |
000010d0  28 4e 29 6f 22 3a e3 72  3d 26 36 39 46 30 b8 26  |(N)o":.r=&69F0.&|
000010e0  36 41 35 37 3a 3f 72 3d  3f 72 20 82 32 35 35 3a  |6A57:?r=?r .255:|
000010f0  ed 0d 03 fc 62 e6 30 2c  31 3a ec 34 34 38 2c 34  |....b.0,1:.448,4|
00001100  34 38 3a df 38 36 34 2c  34 34 38 3a df 38 36 34  |48:.864,448:.864|
00001110  2c 35 37 36 3a df 34 34  38 2c 35 37 36 3a df 34  |,576:.448,576:.4|
00001120  34 38 2c 34 34 38 3a ec  34 34 30 2c 34 34 30 3a  |48,448:.440,440:|
00001130  df 38 37 32 2c 34 34 30  3a df 38 37 32 2c 35 38  |.872,440:.872,58|
00001140  34 3a df 34 34 30 2c 35  38 34 3a df 34 34 30 2c  |4:.440,584:.440,|
00001150  34 34 30 0d 04 06 16 72  3d 2d 35 3a f5 20 e7 a6  |440....r=-5:. ..|
00001160  28 2d 36 39 29 8c 72 3d  b9 0d 04 10 0f e7 a6 28  |(-69).r=.......(|
00001170  2d 38 36 29 8c 72 3d a3  0d 04 1a 0d fd 72 3c 3e  |-86).r=......r<>|
00001180  2d 35 3a 3d 72 0d 04 24  09 dd f2 6d 6f 73 0d 04  |-5:=r..$...mos..|
00001190  2e 4d db 3a f1 22 4d 4f  53 20 43 6f 6d 6d 61 6e  |.M.:."MOS Comman|
000011a0  64 20 50 72 6f 6d 70 74  22 27 27 22 45 6e 74 65  |d Prompt"''"Ente|
000011b0  72 20 62 6c 61 6e 6b 20  6c 69 6e 65 20 74 6f 20  |r blank line to |
000011c0  72 65 74 75 72 6e 20 74  6f 20 43 41 44 22 27 3a  |return to CAD"':|
000011d0  ee 85 f6 3a f1 3a e5 8d  54 78 44 0d 04 38 1c ff  |...:.:..TxD..8..|
000011e0  22 46 58 31 35 2c 31 22  3a f5 20 f1 3a e8 22 2a  |"FX15,1":. .:."*|
000011f0  22 73 24 3a ff 73 24 0d  04 42 35 fd 73 24 3d 22  |"s$:.s$..B5.s$="|
00001200  22 3a ee 85 e7 9f 3d 31  37 8c 8d 54 72 40 8b eb  |":....=17..Tr@..|
00001210  37 3a ff 22 46 58 31 35  2c 31 22 3a f1 22 46 61  |7:."FX15,1":."Fa|
00001220  74 61 6c 20 45 72 72 6f  72 22 3a e0 0d 04 4c 0a  |tal Error":...L.|
00001230  2a 46 58 31 32 35 0d 04  56 0a dd f2 6e 61 6d 65  |*FX125..V...name|
00001240  0d 04 60 48 77 25 3d 31  35 3a 6e 25 3d 30 3a 79  |..`Hw%=15:n%=0:y|
00001250  6d 3d 79 6d 2d 32 35 36  3a 78 6d 3d 37 36 38 3a  |m=ym-256:xm=768:|
00001260  e3 72 78 3d 30 b8 31 35  3a 74 25 28 72 78 2c 30  |.rx=0.15:t%(rx,0|
00001270  29 3d 3f 28 26 34 38 30  31 2b 72 78 29 3a ed 3a  |)=?(&4801+rx):.:|
00001280  f2 74 65 78 74 62 6f 78  0d 04 6a 23 e3 72 78 3d  |.textbox..j#.rx=|
00001290  30 b8 31 35 3a 3f 28 26  34 38 30 31 2b 72 78 29  |0.15:?(&4801+rx)|
000012a0  3d 74 25 28 72 78 2c 30  29 3a ed 0d 04 74 05 e1  |=t%(rx,0):...t..|
000012b0  0d 04 7e 0b dd f2 6c 61  62 65 6c 0d 04 88 34 78  |..~...label...4x|
000012c0  6d 3d 78 6d 2b 33 32 2a  28 77 25 2b 31 29 3a e7  |m=xm+32*(w%+1):.|
000012d0  78 6d 3e 28 31 32 34 38  2d 33 32 2a 77 25 29 8c  |xm>(1248-32*w%).|
000012e0  78 6d 3d 78 6d 2d 36 34  2a 28 77 25 2b 31 29 0d  |xm=xm-64*(w%+1).|
000012f0  04 92 5a 6e 25 3d 31 3a  79 6d 3d 79 6d 2d 31 32  |..Zn%=1:ym=ym-12|
00001300  38 3a 77 25 3d 34 3a e3  72 78 3d 30 b8 77 25 2d  |8:w%=4:.rx=0.w%-|
00001310  31 3a e3 72 79 3d 30 b8  6e 25 3a 74 25 28 72 78  |1:.ry=0.n%:t%(rx|
00001320  2c 72 79 29 3d 3f 28 26  34 38 30 38 2b 31 36 2a  |,ry)=?(&4808+16*|
00001330  3f 26 37 37 2b 72 78 2b  34 2a 72 79 29 3a ed 2c  |?&77+rx+4*ry):.,|
00001340  3a f2 74 65 78 74 62 6f  78 0d 04 9c 39 e3 72 78  |:.textbox...9.rx|
00001350  3d 30 b8 33 3a e3 72 79  3d 30 b8 31 3a 3f 28 26  |=0.3:.ry=0.1:?(&|
00001360  34 38 30 38 2b 31 36 2a  3f 26 37 37 2b 72 78 2b  |4808+16*?&77+rx+|
00001370  34 2a 72 79 29 3d 74 25  28 72 78 2c 72 79 29 3a  |4*ry)=t%(rx,ry):|
00001380  ed 2c 0d 04 a6 05 e1 0d  04 b0 0d dd f2 74 65 78  |.,...........tex|
00001390  74 62 6f 78 0d 04 ba 7c  78 63 3d 78 6d 20 81 33  |tbox...|xc=xm .3|
000013a0  32 3a 79 63 3d 33 32 2d  28 79 6d 20 81 33 32 29  |2:yc=32-(ym .32)|
000013b0  3a 6d 78 3d 30 3a 6d 79  3d 30 3a e6 30 2c 31 3a  |:mx=0:my=0:.0,1:|
000013c0  ec 78 6d 2d 34 2c 79 6d  2b 34 3a df 78 6d 2b 33  |.xm-4,ym+4:.xm+3|
000013d0  32 2a 77 25 2b 34 2c 79  6d 2b 34 3a df 78 6d 2b  |2*w%+4,ym+4:.xm+|
000013e0  33 32 2a 77 25 2b 34 2c  79 6d 2d 33 32 2a 6e 25  |32*w%+4,ym-32*n%|
000013f0  2d 33 36 3a df 78 6d 2d  34 2c 79 6d 2d 33 32 2a  |-36:.xm-4,ym-32*|
00001400  6e 25 2d 33 36 3a df 78  6d 2d 34 2c 79 6d 2b 34  |n%-36:.xm-4,ym+4|
00001410  0d 04 c4 5c ec 78 6d 2d  31 32 2c 79 6d 2b 31 32  |...\.xm-12,ym+12|
00001420  3a df 78 6d 2b 33 32 2a  77 25 2b 31 32 2c 79 6d  |:.xm+32*w%+12,ym|
00001430  2b 31 32 3a df 78 6d 2b  33 32 2a 77 25 2b 31 32  |+12:.xm+32*w%+12|
00001440  2c 79 6d 2d 33 32 2a 6e  25 2d 34 34 3a df 78 6d  |,ym-32*n%-44:.xm|
00001450  2d 31 32 2c 79 6d 2d 33  32 2a 6e 25 2d 34 34 3a  |-12,ym-32*n%-44:|
00001460  df 78 6d 2d 31 32 2c 79  6d 2b 31 32 0d 04 ce 6f  |.xm-12,ym+12...o|
00001470  f5 20 e3 72 79 3d 30 b8  6e 25 3a f1 8a 78 63 2c  |. .ry=0.n%:..xc,|
00001480  79 63 2b 72 79 29 3b 3a  e3 72 78 3d 30 b8 77 25  |yc+ry);:.rx=0.w%|
00001490  2d 31 3a f1 bd 74 25 28  72 78 2c 72 79 29 3b 3a  |-1:..t%(rx,ry);:|
000014a0  ed 2c 3a 61 64 3d 26 35  38 30 30 2b 38 2a 28 78  |.,:ad=&5800+8*(x|
000014b0  63 2b 6d 78 29 2b 26 31  34 30 2a 28 79 63 2b 6d  |c+mx)+&140*(yc+m|
000014c0  79 29 3a e3 72 3d 61 64  20 b8 61 64 2b 37 3a 3f  |y):.r=ad .ad+7:?|
000014d0  72 3d 3f 72 20 82 32 35  35 3a ed 0d 04 d8 2f 73  |r=?r .255:..../s|
000014e0  74 3d 30 3a f5 fd a6 28  30 29 3d 2d 31 3a f5 20  |t=0:...(0)=-1:. |
000014f0  e7 a6 28 2d 35 38 29 80  6d 79 3c 3e 30 8c 6d 79  |..(-58).my<>0.my|
00001500  3d 6d 79 2d 31 3a 73 74  3d 31 0d 04 e2 1f e7 a6  |=my-1:st=1......|
00001510  28 2d 34 32 29 80 6d 79  3c 3e 6e 25 8c 6d 79 3d  |(-42).my<>n%.my=|
00001520  6d 79 2b 31 3a 73 74 3d  31 0d 04 ec 1e e7 a6 28  |my+1:st=1......(|
00001530  2d 32 36 29 80 6d 78 3c  3e 30 8c 6d 78 3d 6d 78  |-26).mx<>0.mx=mx|
00001540  2d 31 3a 73 74 3d 31 0d  04 f6 24 e7 a6 28 2d 31  |-1:st=1...$..(-1|
00001550  32 32 29 80 6d 78 3c 3e  28 77 25 2d 31 29 8c 6d  |22).mx<>(w%-1).m|
00001560  78 3d 6d 78 2b 31 3a 73  74 3d 31 0d 05 00 10 e7  |x=mx+1:st=1.....|
00001570  a6 28 2d 37 34 29 8c 73  74 3d 32 0d 05 0a 41 e7  |.(-74).st=2...A.|
00001580  73 74 3d 30 8c 72 3d a6  28 30 29 3a e7 72 3e 33  |st=0.r=.(0):.r>3|
00001590  31 80 72 3c 31 32 37 8c  74 25 28 6d 78 2c 6d 79  |1.r<127.t%(mx,my|
000015a0  29 3d 72 3a 73 74 3d 31  3a e7 6d 78 3c 3e 28 77  |)=r:st=1:.mx<>(w|
000015b0  25 2d 31 29 8c 6d 78 3d  6d 78 2b 31 0d 05 14 10  |%-1).mx=mx+1....|
000015c0  fd 73 74 3c 3e 30 3a fd  73 74 3d 32 0d 05 1e 05  |.st<>0:.st=2....|
000015d0  e1 0d 05 28 0a dd f2 6c  69 6e 6b 0d 05 32 3d 63  |...(...link..2=c|
000015e0  6f 31 25 3d 3f 26 37 37  3a 78 6d 3d 78 6d 2b 33  |o1%=?&77:xm=xm+3|
000015f0  32 2a 28 77 25 2b 31 29  3a 79 6d 3d 79 6d 2d 31  |2*(w%+1):ym=ym-1|
00001600  36 30 3a f2 70 72 65 6c  69 6e 6b 73 3a e7 6d 6f  |60:.prelinks:.mo|
00001610  25 3d 6e 25 2d 31 8c e1  0d 05 3c 3c 63 70 31 25  |%=n%-1....<<cp1%|
00001620  3d 6d 6f 25 3a f2 64 72  61 77 73 63 72 3a f1 8a  |=mo%:.drawscr:..|
00001630  31 36 2c 31 29 22 53 74  61 74 75 73 3a 20 4c 69  |16,1)"Status: Li|
00001640  6e 6b 69 6e 67 20 20 20  20 20 22 3a f5 fd ac a4  |nking     ":....|
00001650  66 69 72 65 0d 05 46 38  f5 20 f2 63 75 72 73 6f  |fire..F8. .curso|
00001660  72 3a fd a4 66 69 72 65  3a d6 77 68 61 74 6f 76  |r:..fire:.whatov|
00001670  65 72 3a e7 3f 26 37 37  3d 30 8c ef 37 3a f5 fd  |er:.?&77=0..7:..|
00001680  ac a4 66 69 72 65 3a e5  8d 44 46 45 0d 05 50 35  |..fire:..DFE..P5|
00001690  63 6f 32 25 3d 3f 26 37  37 3a 78 6d 3d 28 78 20  |co2%=?&77:xm=(x |
000016a0  80 20 26 46 46 45 30 29  3a 79 6d 3d 28 79 20 80  |. &FFE0):ym=(y .|
000016b0  20 26 46 46 45 30 29 3a  f2 70 72 65 6c 69 6e 6b  | &FFE0):.prelink|
000016c0  73 0d 05 5a 0f e7 6d 6f  25 3d 6e 25 2d 31 8c e1  |s..Z..mo%=n%-1..|
000016d0  0d 05 64 54 21 26 34 37  46 43 3d 21 26 34 37 46  |..dT!&47FC=!&47F|
000016e0  43 2b 31 3a 61 64 3d 26  34 37 46 43 2d 34 2a 21  |C+1:ad=&47FC-4*!|
000016f0  26 34 37 46 43 3a 3f 61  64 3d 63 6f 31 25 3a 3f  |&47FC:?ad=co1%:?|
00001700  28 61 64 2b 31 29 3d 63  70 31 25 3a 3f 28 61 64  |(ad+1)=cp1%:?(ad|
00001710  2b 32 29 3d 63 6f 32 25  3a 3f 28 61 64 2b 33 29  |+2)=co2%:?(ad+3)|
00001720  3d 6d 6f 25 0d 05 6e 05  e1 0d 05 78 0e dd f2 70  |=mo%..n....x...p|
00001730  72 65 6c 69 6e 6b 73 0d  05 82 4e 3f 26 37 30 3d  |relinks...N?&70=|
00001740  3f 28 26 34 38 30 30 2b  31 36 2a 3f 26 37 37 29  |?(&4800+16*?&77)|
00001750  3a d6 67 65 74 6c 69 6e  6b 3a 6e 25 3d 2d 31 3a  |:.getlink:n%=-1:|
00001760  77 25 3d 37 3a e7 78 6d  3e 28 31 32 34 38 2d 33  |w%=7:.xm>(1248-3|
00001770  32 2a 77 25 29 8c 78 6d  3d 78 6d 2d 36 34 2a 28  |2*w%).xm=xm-64*(|
00001780  77 25 2b 31 29 0d 05 8c  22 e7 3f 26 37 33 3d 31  |w%+1)...".?&73=1|
00001790  30 80 3f 26 37 32 3d 31  36 30 8c f2 6c 65 61 64  |0.?&72=160..lead|
000017a0  73 3a e5 8d 74 74 45 0d  05 96 80 61 64 3d 3f 26  |s:..ttE....ad=?&|
000017b0  37 32 2b 32 35 36 2a 3f  26 37 33 3a f5 20 6e 25  |72+256*?&73:. n%|
000017c0  3d 6e 25 2b 31 3a 6d 65  6e 75 24 28 6e 25 29 3d  |=n%+1:menu$(n%)=|
000017d0  22 22 3a e3 72 3d 61 64  20 b8 61 64 2b 36 3a 6d  |"":.r=ad .ad+6:m|
000017e0  65 6e 75 24 28 6e 25 29  3d 6d 65 6e 75 24 28 6e  |enu$(n%)=menu$(n|
000017f0  25 29 2b bd 3f 72 3a ed  3a 61 64 3d 61 64 2b 38  |%)+.?r:.:ad=ad+8|
00001800  3a fd 3f 28 61 64 2d 31  29 3d 30 3a 6e 25 3d 6e  |:.?(ad-1)=0:n%=n|
00001810  25 2b 31 3a 6d 65 6e 75  24 28 6e 25 29 3d 22 43  |%+1:menu$(n%)="C|
00001820  61 6e 63 65 6c 20 22 0d  05 a0 1e e7 79 6d 3c 28  |ancel ".....ym<(|
00001830  6e 25 2b 32 29 2a 33 32  8c 79 6d 3d 28 6e 25 2b  |n%+2)*32.ym=(n%+|
00001840  32 29 2a 33 32 0d 05 aa  0b f2 64 6f 6d 65 6e 75  |2)*32.....domenu|
00001850  0d 05 b4 05 e1 0d 05 be  0b dd f2 6c 65 61 64 73  |...........leads|
00001860  0d 05 c8 57 6d 6c 25 3d  3f 28 26 34 38 30 35 2b  |...Wml%=?(&4805+|
00001870  31 36 2a 3f 26 37 37 29  2a 32 3a 6e 25 3d 28 6d  |16*?&77)*2:n%=(m|
00001880  6c 25 81 35 29 2b 32 3a  6d 65 6e 75 24 28 30 29  |l%.5)+2:menu$(0)|
00001890  3d 22 4c 65 61 64 20 4e  6f 22 3a 6d 65 6e 75 24  |="Lead No":menu$|
000018a0  28 31 29 3d 22 31 20 2d  20 34 20 20 22 3a e3 72  |(1)="1 - 4  ":.r|
000018b0  3d 32 b8 6e 25 2d 31 0d  05 d2 2c e7 28 35 2a 28  |=2.n%-1...,.(5*(|
000018c0  72 2d 31 29 29 3d 6d 6c  25 8c 6d 65 6e 75 24 28  |r-1))=ml%.menu$(|
000018d0  72 29 3d c3 28 35 2a 28  72 2d 31 29 29 3a e5 8d  |r)=.(5*(r-1)):..|
000018e0  64 66 45 0d 05 dc 59 e7  28 35 2a 28 72 2d 31 29  |dfE...Y.(5*(r-1)|
000018f0  2b 34 29 3e 3d 6d 6c 25  8c 6d 65 6e 75 24 28 72  |+4)>=ml%.menu$(r|
00001900  29 3d c3 28 35 2a 28 72  2d 31 29 29 2b 22 20 2d  |)=.(5*(r-1))+" -|
00001910  20 22 2b c3 28 6d 6c 25  29 8b 6d 65 6e 75 24 28  | "+.(ml%).menu$(|
00001920  72 29 3d c3 28 35 2a 28  72 2d 31 29 29 2b 22 20  |r)=.(5*(r-1))+" |
00001930  2d 20 22 2b c3 28 35 2a  72 2d 31 29 0d 05 e6 38  |- "+.(5*r-1)...8|
00001940  e7 a9 28 6d 65 6e 75 24  28 72 29 29 3c 37 8c 6d  |..(menu$(r))<7.m|
00001950  65 6e 75 24 28 72 29 3d  6d 65 6e 75 24 28 72 29  |enu$(r)=menu$(r)|
00001960  2b c4 37 2d a9 28 6d 65  6e 75 24 28 72 29 29 2c  |+.7-.(menu$(r)),|
00001970  22 20 22 29 0d 05 f0 34  ed 3a 6d 65 6e 75 24 28  |" ")...4.:menu$(|
00001980  6e 25 29 3d 22 43 61 6e  63 65 6c 20 22 3a e7 79  |n%)="Cancel ":.y|
00001990  6d 3c 28 6e 25 2b 32 29  2a 33 32 8c 79 6d 3d 28  |m<(n%+2)*32.ym=(|
000019a0  6e 25 2b 32 29 2a 33 32  0d 05 fa 17 f2 64 6f 6d  |n%+2)*32.....dom|
000019b0  65 6e 75 3a e7 6d 6f 25  3d 6e 25 2d 31 8c e1 0d  |enu:.mo%=n%-1...|
000019c0  06 04 2c e7 28 6d 6f 25  3d 6e 25 2d 31 29 80 28  |..,.(mo%=n%-1).(|
000019d0  6d 6c 25 83 35 29 3d 30  8c 6d 6f 25 3d 6d 6c 25  |ml%.5)=0.mo%=ml%|
000019e0  2d 31 3a 6e 25 3d 39 39  39 3a e1 0d 06 0e 9b 6d  |-1:n%=999:.....m|
000019f0  69 6e 3d bb 28 6d 65 6e  75 24 28 6d 6f 25 2b 31  |in=.(menu$(mo%+1|
00001a00  29 29 3a 6d 61 78 3d bb  28 c1 6d 65 6e 75 24 28  |)):max=.(.menu$(|
00001a10  6d 6f 25 2b 31 29 2c 35  2c 33 29 29 3a e3 72 3d  |mo%+1),5,3)):.r=|
00001a20  6d 69 6e 20 b8 6d 61 78  3a 6d 65 6e 75 24 28 31  |min .max:menu$(1|
00001a30  2b 72 2d 6d 69 6e 29 3d  c4 37 2d a9 28 c3 72 29  |+r-min)=.7-.(.r)|
00001a40  2c 22 20 22 29 2b c3 72  3a ed 3a 6e 25 3d 6d 61  |," ")+.r:.:n%=ma|
00001a50  78 2d 6d 69 6e 2b 32 3a  6d 65 6e 75 24 28 6e 25  |x-min+2:menu$(n%|
00001a60  29 3d 22 43 61 6e 63 65  6c 20 22 3a e7 79 6d 3c  |)="Cancel ":.ym<|
00001a70  28 6e 25 2b 32 29 2a 33  32 8c 79 6d 3d 28 6e 25  |(n%+2)*32.ym=(n%|
00001a80  2b 32 29 2a 33 32 0d 06  18 34 78 6d 3d 78 6d 2b  |+2)*32...4xm=xm+|
00001a90  33 32 2a 28 77 25 2b 31  29 3a e7 78 6d 3e 28 31  |32*(w%+1):.xm>(1|
00001aa0  32 34 38 2d 33 32 2a 77  25 29 8c 78 6d 3d 78 6d  |248-32*w%).xm=xm|
00001ab0  2d 39 36 2a 28 77 25 2b  31 29 0d 06 22 17 f2 64  |-96*(w%+1).."..d|
00001ac0  6f 6d 65 6e 75 3a e7 6d  6f 25 3d 6e 25 2d 31 8c  |omenu:.mo%=n%-1.|
00001ad0  e1 0d 06 2c 18 6d 6f 25  3d 6d 6f 25 2b 6d 69 6e  |...,.mo%=mo%+min|
00001ae0  3a 6e 25 3d 39 39 39 3a  e1 0d 06 36 0a dd f2 6d  |:n%=999:...6...m|
00001af0  6f 76 65 0d 06 40 38 f2  64 72 61 77 73 63 72 3a  |ove..@8.drawscr:|
00001b00  f2 64 63 75 3a f1 8a 31  36 2c 31 29 22 53 74 61  |.dcu:..16,1)"Sta|
00001b10  74 75 73 3a 20 4d 6f 76  69 6e 67 20 20 20 20 20  |tus: Moving     |
00001b20  20 22 3a f5 fd ac a4 66  69 72 65 0d 06 4a 75 3f  | ":....fire..Ju?|
00001b30  21 26 35 32 31 32 3d 26  36 30 3a 21 26 37 30 3d  |!&5212=&60:!&70=|
00001b40  78 3a 21 26 37 32 3d 79  3a d6 77 68 61 74 6f 76  |x:!&72=y:.whatov|
00001b50  65 72 3a 61 64 3d 26 34  38 30 31 2b 31 36 2a 3f  |er:ad=&4801+16*?|
00001b60  26 37 37 3a 78 3d 3f 61  64 2b 32 35 36 2a 3f 28  |&77:x=?ad+256*?(|
00001b70  61 64 2b 31 29 3a 79 3d  3f 28 61 64 2b 32 29 2b  |ad+1):y=?(ad+2)+|
00001b80  32 35 36 2a 3f 28 61 64  2b 33 29 3a 21 26 37 30  |256*?(ad+3):!&70|
00001b90  3d 78 3a 21 26 37 32 3d  79 3a d6 26 35 30 30 36  |=x:!&72=y:.&5006|
00001ba0  0d 06 54 39 f5 20 d6 26  35 30 30 39 3a 78 3d 28  |..T9. .&5009:x=(|
00001bb0  21 26 37 30 29 80 26 46  46 46 46 3a 79 3d 21 26  |!&70).&FFFF:y=!&|
00001bc0  37 32 3a fd a4 66 69 72  65 3a 21 61 64 3d 78 2b  |72:..fire:!ad=x+|
00001bd0  36 35 35 33 36 2a 79 3a  e1 0d 06 5e 3e dd f2 63  |65536*y:...^>..c|
00001be0  75 72 73 6f 72 3a e6 33  2c 31 3a 21 26 37 30 3d  |ursor:.3,1:!&70=|
00001bf0  78 3a 21 26 37 32 3d 79  3a d6 26 35 30 30 30 3a  |x:!&72=y:.&5000:|
00001c00  78 3d 28 21 26 37 30 29  80 26 46 46 46 46 3a 79  |x=(!&70).&FFFF:y|
00001c10  3d 21 26 37 32 3a e1 0d  06 68 25 dd f2 64 63 75  |=!&72:...h%..dcu|
00001c20  3a e6 33 2c 31 3a 21 26  37 34 3d 78 3a 21 26 37  |:.3,1:!&74=x:!&7|
00001c30  36 3d 79 3a d6 26 35 30  30 33 3a e1 0d 06 72 b0  |6=y:.&5003:...r.|
00001c40  dc 32 30 2c 22 43 61 70  61 63 69 74 6f 72 22 2c  |.20,"Capacitor",|
00001c50  22 43 61 70 61 63 69 74  6f 72 28 45 29 22 2c 22  |"Capacitor(E)","|
00001c60  43 65 6c 6c 22 2c 22 42  61 74 74 65 72 79 22 2c  |Cell","Battery",|
00001c70  22 44 69 6f 64 65 22 2c  22 44 69 6f 64 65 28 5a  |"Diode","Diode(Z|
00001c80  65 6e 65 72 29 22 2c 22  47 72 6f 75 6e 64 22 2c  |ener)","Ground",|
00001c90  22 49 43 22 2c 22 49 6e  64 75 63 74 6f 72 22 2c  |"IC","Inductor",|
00001ca0  22 4c 6f 67 69 63 20 41  4e 44 22 2c 22 4c 6f 67  |"Logic AND","Log|
00001cb0  69 63 20 4e 4f 54 22 2c  22 4c 6f 67 69 63 20 4f  |ic NOT","Logic O|
00001cc0  52 22 2c 22 4e 6f 64 65  22 2c 22 4f 70 41 6d 70  |R","Node","OpAmp|
00001cd0  22 2c 22 52 65 73 69 73  74 6f 72 22 2c 22 52 65  |","Resistor","Re|
00001ce0  73 69 73 74 6f 72 28 56  61 72 29 22 0d 06 7c 43  |sistor(Var)"..|C|
00001cf0  dc 22 53 77 69 74 63 68  22 2c 22 54 72 61 6e 73  |."Switch","Trans|
00001d00  69 73 74 6f 72 28 4e 50  4e 29 22 2c 22 54 72 61  |istor(NPN)","Tra|
00001d10  6e 73 69 73 74 6f 72 28  50 4e 50 29 22 2c 22 54  |nsistor(PNP)","T|
00001d20  72 61 6e 73 69 73 74 6f  72 28 46 45 54 29 22 0d  |ransistor(FET)".|
00001d30  ff                                                |.|
00001d31
CAD/CADNew/CAD2.m0
CAD/CADNew/CAD2.m1
CAD/CADNew/CAD2.m2
CAD/CADNew/CAD2.m4
CAD/CADNew/CAD2.m5