Home » Personal collection » Acorn ADFS disks » Archimedes » ALPS.ADF » !ALPS/!RunImage

!ALPS/!RunImage

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 » Archimedes » ALPS.ADF
Filename: !ALPS/!RunImage
Read OK:
File size: 1D244 bytes
Load address: FFFFFB42
Exec address: C7ABC11
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10REM >$.!ALPS.!RunImage
   20REM Copyright Alpine Software/Philip Hawthorne 1989
   30REM With modifications by Keith McAlpine
   40version$="5.08C, 22-Nov-1989"
   50
   60DIM block &200,mistake 300,quitblk 100
   70
   80ON ERROR MODE 0:PRINT REPORT$:PRINT ":";ERL:SYS"Wimp_CloseDown":END
   90
  100@%=&10:ctr%=0
  110mode%=MODE
  120testing=FALSE
  130resources_ok=FNOS_Var("Alps$Resources") AND FNOS_Var("Alps$Data")
  140
  150SYS "OS_GetEnv" TO Env$
  160I%=INSTR(Env$,CHR$34,INSTR(Env$,CHR$34)+1)
  170ef$=MID$(Env$,I%+1)
  180WHILE LEFT$(ef$,1)=" "
  190ef$=MID$(ef$,2)
  200ENDWHILE
  210
  220theLastMenu = 0 : tick$=""
  230
  240type$="CF8"
  250
  260DIM tempBlk 4
  270$tempBlk = "TASK"
  280SYS "Wimp_Initialise",200,!tempBlk,"ALPS" TO ,task%
  290
  300IF NOT resources_ok THEN ERROR 1,"The ALPS resources are not available. Open up the directory viewer with !ALPS in it.":SYS "Wimp_CloseDown",task%,!tempBlk:END
  310PROCinstall_texted
  320PROCinit2
  330ON ERROR dialog=FNerrorbox(REPORT$,ERR,1,-99):GOTO 500
  340PROCnew
  350PROCassemble(armcode%)
  360PROCfill(text_block%,text_blocksize%,dummy_spc)
  370PROCfill(verb_type,2*(maxvbn+1),0)
  380PROCfill(nref+4,nref_size-4,0)
  390PROCfill(aref+4,aref_size-4,0)
  400PROCclear
  410claimpoll$="":claimmenu$="":quit%=FALSE
  420
  430path$=ef$
  440IF ef$<>"" THEN
  450$filename%=FNleafname(ef$)
  460PROCload_all(ef$)
  470PROCopen(ALPSmain,400,800,600,600)
  480ENDIF
  490
  500REPEAT
  510SYS Poll,,block TO reason
  520CASE reason OF
  530 WHEN 1: PROCredraw(!block)
  540 WHEN 2: SYS OpenW,,block
  550 WHEN 3: PROCclose(!block)
  560 WHEN 6: PROCcheckmouse(!block,block!4,block!8,block!12,block!16,block!20)
  570 WHEN 7: PROCsave:REM User has dragged 'Alps' file icon to another window
  580 WHEN 8: PROCuserkeypressed(!block,block!4,block!24)
  590 WHEN 9: PROCmenuselect(!block,block!4)
  600 WHEN 17,18: PROCreceive(block)
  610 ENDCASE
  620UNTIL quit%
  630SYS "Wimp_CloseDown",task%,!tempBlk:IF testing THEN OSCLI("FX4"):REPORT:PRINT" at line ";ERL:END
  640END
  650
  660DEF PROCinit2
  670PROCgetmodeinfo:oldsize=scrnsize
  680data_saved=TRUE:loaded$=""
  690DIM a_list$(10)
  700small_areasize%=30
  710DIM small_area% small_areasize%
  720
  730DIM D%(3),shade%(15),scale 15,pixtr 15
  740REM ---------------------------------
  750REM Manifest constants for the system
  760
  770maxrms=1000:maxobs=255:maxsw%=10:maxtokens=128
  780
  790listoption=2:REM Default LISTO
  800
  810DIM pos$(3)
  820FOR I%=0 TO 3:READ pos$(I%):NEXT
  830DATA T,B,L,R
  840
  850DIM oldpars 73
  860FOR I%=0 TO 72
  870READ B%:oldpars?I%=B% AND &F
  880NEXT
  890
  900DATA 0,0,0,0,0,1,161,193
  910DATA 161,193,2,1,0,128,128,0
  920DATA 128,0,0,128,0,1,1,1
  930DATA 1,65,1,0,0,0,65,0
  940DATA 130,194,130,194,193,193,129,129
  950DATA 193,193,131,195,1,130,128,128
  960DATA 2,2,66,0,1,66,3,67
  970DATA 0,1,1,65,65,65,3,0
  980DATA 1,1,130,130,130,2,130,2
  990DATA 2
 1000
 1010maxlen=10:REM Maximum word length in vocabulary
 1020
 1030REM Room and object data block lengths (in bytes)
 1040r_len=74:o_len=16
 1050
 1060num_vars=60:REM Number of ALPS variables
 1070var_size=num_vars*2:REM 2 bytes per variable
 1080
 1090maxmsg=65535:maxobn=255:maxvbn=255:maxconst=65535
 1100maxadj=255:maxprep=50:maxconj=10:maxspec=30:maxnoise=50:maxpix=50
 1110
 1120noun_size=3000
 1130verb_size=3000
 1140adjc_size=2000
 1150prep_size=400:REM Size of prepositions list
 1160conj_size=50:REM size of conjunctions list
 1170spec_size=100:REM size of 'specials' list (IT, THEM, ALL)
 1180noise_size=200:REM size of 'noise' list (THE,A,AN)
 1190aref_size=2000:REM size of adjective object reference table
 1200nref_size=2000:REM size of nouns object reference table
 1210pix_size=1000:REM size of pix filename list
 1220
 1230DIM nouns noun_size,verbs verb_size,adjects adjc_size,preps prep_size,conjs conj_size,specs spec_size,noise noise_size,pixs pix_size
 1240
 1250DIM aref aref_size,nref nref_size,verb_type 2*(maxvbn+1)
 1260
 1270noun_end=nouns+noun_size:verb_end=verbs+verb_size
 1280adjc_end=adjects+adjc_size:prep_end=preps+prep_size:conj_end=conjs+conj_size:spec_end=specs+spec_size:noise_end=noise+noise_size
 1290aref_end=aref+aref_size:nref_end=nref+nref_size:pix_end=pixs+pix_size
 1300
 1310REM Printer codes etc
 1320condensed=15:reset=64
 1330pline$=STRING$(132,"-")
 1340pline2$=STRING$(79,"-")
 1350
 1360REM ------- Set up data areas for rooms and objects and clear them ------
 1370DIM rdata% (maxrms+1)*r_len,odata% (maxobs+1)*o_len,controom% 12
 1380
 1390REM Set up the save buffers
 1400initareasize=7*(maxobs+1)+22*(maxrms+1)
 1410DIM initsave initareasize,ramsave initareasize+var_size+128
 1420$controom%="0":cont_room=0:container=FALSE
 1430
 1440rptr=1:optr=1:last_room=1:last_object=1
 1450
 1460REM areas to store flag descriptions
 1470maxd%=13
 1480DIM o_flags% maxd%*8,r_flags% maxd%*8
 1490
 1500REM Set the flag descriptions
 1510FOR I%=7 TO 0 STEP-1
 1520READ flag$
 1530$(o_flags%+I%*maxd%)=LEFT$(flag$,maxd%-1)
 1540NEXT
 1550
 1560FOR I%=7 TO 0 STEP-1
 1570READ flag$
 1580$(r_flags%+I%*maxd%)=LEFT$(flag$,maxd%-1)
 1590NEXT
 1600
 1610REM Object Flag descriptions
 1620DATA "","",Being worn,Wearable,Scenery,Invisible,Takeable,Light source
 1630
 1640REM Room flag descriptions
 1650DATA "","","","","","",Visited,Light
 1660
 1670REM Room Exit flag descriptions
 1680DATA Invisible,Closed door,Open door,Locked door,Unl'ked door,Blocked,Reserved,Reserved
 1690
 1700DIM exit_flag$(7)
 1710FOR flag=7 TO 0 STEP-1:READ exit_flag$(flag):NEXT
 1720
 1730DIM proc% 12,exit% 12,def% 12
 1740$proc%="":$def%="":$exit%=""
 1750
 1760REM prg_sel% = Section of program selected for editing
 1770REM            2=Main, 3=Proc, 4=Define, 5=Exit
 1780REM progval$ = STR$ value of proc or exit number or name of selected verb
 1790
 1800prg_sel%=2:progval$=""
 1810
 1820REM voc_sect% = Section of vocabulary selected for editing
 1830REM             1=Nouns, 2=Verbs
 1840voc_sect%=1
 1850
 1860pbsize=(scrnsize DIV 2)+400:REM size of picture buffer
 1870
 1880DIM picbuf pbsize
 1890
 1900prgbsize=&1000
 1910DIM prgbuf% prgbsize
 1920
 1930REM ------- Some constants for the character designer -------
 1940
 1950cur_chr%=ASC"A":max_chr%=125
 1960DIM charnum 12
 1970$charnum=""
 1980
 1990REM ------- Dimension the other arrays needed -------
 2000ucsize=500
 2010SYS "OS_File",5,"<ALPS$Resources>.ASIobjcode" TO ftype,,,,codesize
 2020pbyte_size=148
 2030DIM armcode% 1000,pbytes pbyte_size,work% &1100,asicode% codesize+10
 2040DIM usercode% ucsize
 2050run=asicode%:printmsg=asicode%+4:search=asicode%+12:findcode=asicode%+16
 2060setup=asicode%+20
 2070OSCLI("LOAD <ALPS$Resources>.ASIobjcode "+STR$~asicode%)
 2080DIM pal%(2)
 2090DIM q% &2000,erroraddr%(4)
 2100DIM indexdata% 32*24+20
 2110maxbuf%=&3000
 2120DIM buffer% maxbuf%:curbuff%=buffer%
 2130nh%=32:ni%=11
 2140DIM handle%(nh%+1),wident$(nh%),wptr%(nh%)
 2150FOR I%=0TOnh%:handle%(I%)=I%-1:wident$(I%)="":NEXT:handleSP%=nh%
 2160DIM icon%(ni%+1),iconbar$(ni%)
 2170FOR I%=0 TO ni%:icon%(I%)=-1:READ iconbar$(I%):NEXT
 2180icon%(ni%+1)=-1
 2190oldicon%=0:oldrmicon%=0
 2200
 2210REM ------ Names of icons (sprites) on icon bar ------
 2220DATA disk35,arclogo,door,key,quill,info,listing,chardes,vocab,swap,eye,face
 2230
 2240diskicon=0:texticon=4:progicon=6:staricon=99
 2250vocabicon=8:faceicon=99:arcicon=1:swapicon=9
 2260alpsicon=5:helpicon=13:eyeicon=10
 2270THEkeyicon=3:THEdooricon=2:texticon=4:THEcharicon=7
 2280
 2290DIM menufree% &1800:menuend%=menufree%+&1800
 2300DIM menulist% &100
 2310DIM qBlk% 256
 2320dx%=2:lsY%=40:ypixel%=4:chX%=16:chY%=32
 2330currentwindow%=-1:currenticon%=-1
 2340spritef$=""
 2350DIM mb_wident% 12,filename% 64,filename2% 64,import% 64
 2360IF testing $filename%="demo" ELSE $filename%="starter"
 2370$filename2%="charset":$import%=""
 2380DIM start(20),sys_b2% &300,os_block 50
 2390
 2400PROCKeyWordRead
 2410PROCErrorMsgRead
 2420
 2430REM ----- Define the "Wimp" and "OS" SYS numbers ------
 2440Wimp=&400C0
 2450CreateW=Wimp+1
 2460CreateI=Wimp+2
 2470DeleteW=Wimp+3
 2480DeleteI=Wimp+4
 2490OpenW=Wimp+5
 2500CloseW=Wimp+6
 2510Poll=Wimp+7
 2520RedrawW=Wimp+8
 2530UpdateW=Wimp+9
 2540GetW=Wimp+11
 2550GetWI=Wimp+&C
 2560SetCaret=Wimp+&12
 2570GetCaret=Wimp+&13
 2580GetR=Wimp+&A
 2590SetI=Wimp+&D
 2600GetI=Wimp+&E
 2610GetP=Wimp+&F
 2620Drag=Wimp+&10
 2630ForceR=Wimp+&11
 2640CreateM=Wimp+&14
 2650SetP=Wimp+&18
 2660ReadPal=&2F
 2670
 2680REM ------ Set up our own sprite area and read the sprites in ------
 2690SYS "OS_File",5,"<ALPS$Resources>.AlpsSprite" TO ,,,,spritesize
 2700spritesize+=4
 2710DIM spritearea% spritesize
 2720!spritearea%=spritesize
 2730SYS "OS_SpriteOp",266,spritearea%,"<Alps$Resources>.AlpsSprite"
 2740DIM fontcounts% 255,mb_wident% 24
 2750
 2760REM ------ Set up the wimps and their handles ------
 2770
 2780DIMrgb(19,3)
 2790PROCloadtemplates("<Alps$Resources>.ALPS")
 2800
 2810REM ------ Name the window handles ------
 2820objhandle=handle%(FNmatchident("objected"))
 2830roomhandle=handle%(FNmatchident("roomedit"))
 2840texthandle=handle%(FNmatchident("texted"))
 2850design=handle%(FNmatchident("chrdesign"))
 2860infohandle=handle%(FNmatchident("info"))
 2870savehandle=handle%(FNmatchident("saveas"))
 2880ALPSmain=handle%(FNmatchident("iconbar")):dialogue%=0
 2890setuph=handle%(FNmatchident("Setup"))
 2900desticon=47:exitprogicon=48
 2910
 2920iconbar% = -2
 2930windowindex%=nh%+1
 2940
 2950PROCchangeicon(infohandle,7,version$,dummy)
 2960
 2970firstIconBarIcon% = FNiconbar(spritearea%, "face",31,19)
 2980THEmiscicon=firstIconBarIcon%
 2990
 3000
 3010REM ------ Define the colours ------
 3020barfgcol=11:barbgcol=3
 3030`wbcol=0:`tbcol=2:`sco=&3:`mbcol=&B
 3040`wfcol=7:`tfcol=7:`sci=&D:`tbcol2=&C
 3050
 3060cur_pal%=7:phys_col%=16
 3070
 3080first_token=&30:REM Lowest keyword token value
 3090PROCfind_token(keyword$(),"INC",var_token,dummy):REM Tokens from here up allow variables
 3100PROCfind_token(keyword$(),"DEFINE",def_token,dummy)
 3110PROCfind_token(keyword$(),"STOP",stop_token,dummy)
 3120PROCfind_token(keyword$(),"END",end_token,dummy)
 3130PROCfind_token(keyword$(),"EXIT",exit_token,dummy)
 3140PROCfind_token(keyword$(),"DEFPROC",proc_token,dummy)
 3150PROCfind_token(keyword$(),"PREP",prep_token,dummy)
 3160PROCfind_token(keyword$(),"NOTPREP",notprep_token,dummy)
 3170
 3180REM ------ Set up the dictionary ------
 3190dict_size=1000
 3200DIM dict% dict_size,tok$(maxtokens)
 3210!dict%=3:dict%?2=&80
 3220
 3230REM ------ Find the available memory ------
 3240memfree=(HIMEM-END)-50000
 3250IF memfree<0 THEN null=FNerrorbox("Not enough memory available in 'Next' slot",0,1,-99):SYS "Wimp_CloseDown":END
 3260maxtext%=0.83*memfree
 3270code_size%=0.17*memfree
 3280
 3290REM ------ Areas for storing messages, switch info etc; ------
 3300DIM text% maxtext%,swdata% 12*maxsw%,switch_vals(maxsw%),m_msg% 12
 3310DIM switch_buf% 2*maxsw%+1
 3320$swdata%=STRING$(12*maxsw%,CHR$13):$m_msg%=""
 3330
 3340REM ------ Initialise the text area ------
 3350!text%=1:text%!2=&B:text%!6=0:text%!10=0
 3360DIM st_msg% 12,end_msg% 12
 3370$st_msg%="1":$end_msg%="1"
 3380mptr=1:REM The current message number
 3390text_owner$="":REM The current owner of any text in the text editor
 3400
 3410datavalid=TRUE
 3420
 3430REM ------ Set up the program area ------
 3440DIM program% code_size%
 3450!program%=0
 3460program%!4=0
 3470errflag=FALSE
 3480
 3490REM ------ Set up the menu structure ------
 3500m_controom%=FNcrmenu
 3510DATA "#Number,$controom%(5)"
 3520m_contain=FNcrmenu
 3530DATA "Container,Use room>m_controom%"
 3540m_chardes%=FNcrmenu
 3550DATA "#CHANGE TO?,$charnum(2)"
 3560char_fname%=FNcrmenu
 3570DATA "#Filename:,$filename2%(11)"
 3580menu_fname%=FNcrmenu
 3590DATA "#Filename:,$filename%(11)"
 3600m_gotomsg%=FNcrmenu
 3610DATA "$m_msg%(12)"
 3620m_proc%=FNcrmenu
 3630DATA "#Number:,$proc%(4)"
 3640m_def%=FNcrmenu
 3650DATA "#Verb:,$def%(12)"
 3660m_exit%=FNcrmenu
 3670DATA "#Number:,$exit%(4)"
 3680m_listopts=FNcrmenu
 3690DATA "#Display:,Vocabulary as numbers,Vocabulary as strings"
 3700m_import%=FNcrmenu
 3710DATA "#Filename:,$import%(11)"
 3720sw1=FNcrmenu:nxtsw=swdata%+12
 3730DATA "#Value:,$swdata%(12)"
 3740sw2=FNcrmenu:nxtsw=nxtsw+12
 3750DATA "#Value:,$nxtsw"
 3760sw3=FNcrmenu:nxtsw=nxtsw+12
 3770DATA "#Value:,$nxtsw"
 3780sw4=FNcrmenu:nxtsw=nxtsw+12
 3790DATA "#Value:,$nxtsw"
 3800sw5=FNcrmenu:nxtsw=nxtsw+12
 3810DATA "#Value:,$nxtsw"
 3820sw6=FNcrmenu:nxtsw=nxtsw+12
 3830DATA "#Value:,$nxtsw"
 3840sw7=FNcrmenu:nxtsw=nxtsw+12
 3850DATA "#Value:,$nxtsw"
 3860sw8=FNcrmenu:nxtsw=nxtsw+12
 3870DATA "#Value:,$nxtsw"
 3880sw9=FNcrmenu:nxtsw=nxtsw+12
 3890DATA "#Value:,$nxtsw"
 3900sw10=FNcrmenu:nxtsw=nxtsw+12
 3910DATA "#Value:,$nxtsw"
 3920m_switch%=FNcrmenu
 3930DATA "#Switch,No switches,1>sw1,2>sw2,3>sw3,4>sw4,5>sw5,6>sw6,7>sw7,8>sw8,9>sw9,10>sw10"
 3940m_text%=FNcrmenu
 3950DATA "#MSG: nnnnn,Insert,Overtype#,Cut,Copy,Paste#,Next,Previous,First,Last,Goto msg#>m_gotomsg%,Edit switch#>m_switch%,Print this"
 3960m_prog%=FNcrmenu
 3970DATA "#Program Editor,Insert,Overtype#,Cut,Copy,Paste#,Main,Procedure>m_proc%,Define>m_def%,Exit routine#>m_exit%,Print this,List options>m_listopts"
 3980m_vocab%=FNcrmenu
 3990DATA "#Vocabulary,Insert,Overtype#,Cut,Copy,Paste#,Nouns,Verbs,Adjectives,Prepositions,Conjunctions,Specials,Noise#,Print this"
 4000pixmenu=FNcrmenu
 4010DATA "#Pictures,Print"
 4020progmenu=FNcrmenu
 4030DATA "#Program,Print,Import#>m_import%,Run"
 4040charmenu=FNcrmenu
 4050DATA "#CharSet,Save>char_fname%,Load>char_fname%"
 4060vocabmenu=FNcrmenu
 4070DATA "#Vocabulary,Print"
 4080diskmenu=FNcrmenu
 4090DATA "#Files,Save all>savehandle,Setup disk"
 4100facemenu=FNcrmenu
 4110DATA "#Actors,Print"
 4120miscmenu=FNcrmenu
 4130DATA "#ALPS,Info>infohandle,Quit"
 4140msg2%=FNcrmenu
 4150DATA "$st_msg%(6)"
 4160msg3%=FNcrmenu
 4170DATA "$end_msg%(6)"
 4180msg1%=FNcrmenu
 4190DATA "#From/To?,Start msg>msg2%,End msg>msg3%"
 4200textmenu=FNcrmenu
 4210DATA "#Text,Print>msg1%,Import>m_import%"
 4220objmenu=FNcrmenu
 4230DATA "#Objects,Print,Import>m_import%"
 4240mo_user5=FNcrmenu:ofl%=o_flags%+maxd%*3
 4250DATA "#Description:,$o_flags%(13)"
 4260mo_user4=FNcrmenu:ofl%=ofl%+maxd%
 4270DATA "#Description:,$ofl%(13)"
 4280mo_user3=FNcrmenu:ofl%=ofl%+maxd%
 4290DATA "#Description:,$ofl%(13)"
 4300mo_user2=FNcrmenu:ofl%=ofl%+maxd%
 4310DATA "#Description:,$ofl%(13)"
 4320mo_user1=FNcrmenu:ofl%=ofl%+maxd%
 4330DATA "#Description:,$ofl%(13)"
 4340mo_user0=FNcrmenu:ofl%=ofl%+maxd%
 4350DATA "#Description:,$ofl%(13)"
 4360m_objflag=FNcrmenu
 4370DATA "#Flags,7 Light source,6 Takeable,5 Invisible,4 Scenery,3 Wearable,2 Being worn,1 User flag>mo_user1,0 User flag>mo_user0"
 4380roommenu=FNcrmenu
 4390DATA "#Rooms,Print,Import>m_import%"
 4400mr_user6=FNcrmenu:rfl%=r_flags%+maxd%*2
 4410DATA "#Description:,$r_flags%(13)"
 4420mr_user5=FNcrmenu:rfl%=rfl%+maxd%
 4430DATA "#Description:,$rfl%(13)"
 4440mr_user4=FNcrmenu:rfl%=rfl%+maxd%
 4450DATA "#Description:,$rfl%(13)"
 4460mr_user3=FNcrmenu:rfl%=rfl%+maxd%
 4470DATA "#Description:,$rfl%(13)"
 4480mr_user2=FNcrmenu:rfl%=rfl%+maxd%
 4490DATA "#Description:,$rfl%(13)"
 4500mr_user1=FNcrmenu:rfl%=rfl%+maxd%
 4510DATA "#Description:,$rfl%(13)"
 4520mr_user0=FNcrmenu:rfl%=rfl%+maxd%
 4530DATA "#Description:,$rfl%(13)"
 4540m_rmflag=FNcrmenu
 4550DATA "#Flags,7 Light,6 Visited,5 User (Trans)>mr_user5,4 User (Open)>mr_user4,3 User flag>mr_user3,2 User flag>mr_user2,1 User flag>mr_user1,0 User flag>mr_user0"
 4560m_exitf=FNcrmenu
 4570DATA "#Flags,7 Invisible exit,6 Closed door,5 Open door,4 Locked door,3 Unlocked door,2 Blocked exit,1 Reserved,0 Reserved"
 4580
 4590ENDPROC
 4600
 4610REM ------ Now we have the Procedures and Functions!! ------
 4620
 4630DEF PROCgetmodeinfo
 4640LOCAL x,y,xeig,yeig,cols
 4650mode=MODE
 4660
 4670SYS "OS_ReadModeVariable",mode,1 TO ,,textcols%
 4680SYS "OS_ReadModeVariable",mode,2 TO ,,textrows%
 4690text_maxllen%=textcols%-2
 4700SYS "OS_ReadModeVariable",mode,3 TO ,,cols
 4710SYS "OS_ReadModeVariable",mode,4 TO ,,xeig
 4720SYS "OS_ReadModeVariable",mode,5 TO ,,yeig
 4730SYS "OS_ReadModeVariable",mode,7 TO ,,scrnsize
 4740SYS "OS_ReadModeVariable",mode,11 TO ,,x
 4750SYS "OS_ReadModeVariable",mode,12 TO ,,y
 4760scrw=((x+1)<<xeig)-1:scrh=((y+1)<<yeig)-1
 4770ENDPROC
 4780
 4790DEF PROCclear
 4800PROCfill(odata%,(maxobs+1)*o_len,0)
 4810PROCfill(rdata%,(maxrms+1)*r_len,0)
 4820PROCfill(program%+4,code_size%-20,0)
 4830REM PROCfill(initsave,initareasize,0)
 4840ENDPROC
 4850
 4860
 4870DEF PROCreturn(x%,y%)
 4880PROCcol(128+12):PROCcol(7)
 4890PROCcentre(" Hit any key/button to return to the editor ",y%)
 4900REPEAT
 4910MOUSE X%,Y%,B%
 4920UNTIL B%=0
 4930
 4940REPEAT
 4950any=INKEY(0)
 4960MOUSE X%,Y%,B%
 4970UNTIL any>0 OR B%>0
 4980ENDPROC
 4990
 5000DEF PROCcentre(t$,r)
 5010PRINTTAB((textcols%-LEN t$+1) DIV 2,r);t$;
 5020ENDPROC
 5030
 5040REM ------ General window handling routines ------
 5050
 5060DEF PROCdeletewindow(I%)
 5070!q%=handle%(I%)
 5080handle%(I%)=handleSP%:handleSP%=I%
 5090SYS DeleteW,,q%
 5100wident$(I%)=""
 5110ENDPROC
 5120
 5130DEF PROCloadtemplates(tfile$)
 5140tmp%=0
 5150SYS "Wimp_OpenTemplate",,tfile$
 5160tf_index%=0:REPEAT
 5170$mb_wident%="*"
 5180SYS "Wimp_LoadTemplate",,q%+4,curbuff%,buffer%+maxbuf%,fontcounts%,mb_wident%,tf_index% TO ,,curbuff%,,,,tf_index%
 5190IF tf_index%<>0 THEN PROCloadtemp($mb_wident%)
 5200UNTIL tf_index%=0
 5210SYS "Wimp_CloseTemplate"
 5220ENDPROC
 5230
 5240DEF PROCloadtemp(wident$)
 5250I%=FNmatchident(wident$):IF I%<>-1 THEN PROCdeletewindow(I%)
 5260q%!68=spritearea%    : REM user sprite area
 5270PROCcrwindow(q%+4,wident$)
 5280ENDPROC
 5290
 5300DEF PROChighlight(I%)
 5310ENDPROC
 5320SYS SetCaret,handle%(I%),-1,0,0,&2000000,0
 5330ENDPROC
 5340
 5350DEF PROCretitle(handle%,newtitle$,RETURN handle%)
 5360index%=windowindex%
 5370REPEAT
 5380  index%-=1: IFindex%<0 ERROR 255,"Invalid window"
 5390UNTIL handle%(index%)=handle%
 5400!q%=handle%
 5410SYS GetWI,,q%
 5420SYS DeleteW,,q%
 5430$(q%+76)=LEFT$(newtitle$,11)
 5440SYS CreateW,,q%+4 TO handle%
 5450handle%(index%)=handle%
 5460ENDPROC
 5470
 5480DEF PROCcrwindow(q%,wident$)
 5490SYS CreateW,,q% TO handle%
 5500m%=handleSP%:handleSP%=handle%(handleSP%):handle%(m%)=handle%
 5510!q%=handle%
 5520SYS GetW,,q%
 5530currentwindow%=m%:wident$(m%)=wident$
 5540currenticon%=-1
 5550PROChighlight(m%)
 5560ENDPROC
 5570
 5580DEF PROCclose(wind)
 5590i%=ni%+1
 5600CASE wind OF
 5610 WHEN objhandle:i%=THEkeyicon:IF icon%(i%)<>-1 PROCstore_obj(optr)
 5620 WHEN roomhandle: i%=THEdooricon:IF icon%(i%)<>-1 PROCstore_room(rptr)
 5630 WHEN texthandle
 5640   i%=texticon
 5650   PROCremove_markers
 5660   CASE text_owner$ OF
 5670     WHEN "texted" : PROCstore_msg
 5680     WHEN "program" : IF NOT text_ok THEN PROCstore_prog
 5690     WHEN "vocab" : IF NOT text_ok THEN PROCstore_vocab
 5700     WHEN "pix" : PROCstore_pix
 5710   ENDCASE
 5720   IF NOT errflag THEN
 5730     text_owner$="":REM release Text Editor window
 5740     PROCfill(text_block%,text_blocksize%,dummy_spc)
 5750   ENDIF
 5760 WHEN design: i%=THEcharicon
 5770ENDCASE
 5780IF (text_owner$="program" AND errflag AND wind=texthandle) OR (text_owner$="vocab" AND errflag AND wind=texthandle) OR (text_owner$="pix" AND errflag AND wind=texthandle) OR (text_owner$="texted" AND errflag AND wind=texthandle) THEN
 5790ELSE
 5800  icon%(i%)=-1
 5810  !block=wind
 5820  SYS CloseW,,block
 5830ENDIF
 5840ENDPROC
 5850
 5860DEF PROCopen(handle,x,y,w,d)
 5870!block=handle
 5880block!4=x:block!8=y-d
 5890block!12=x+w:block!16=y
 5900block!20=0:block!24=0
 5910block!28=-1
 5920SYS OpenW,,block
 5930ENDPROC
 5940
 5950DEF PROCredraw(handle)
 5960block!0=handle
 5970SYS RedrawW,0,block TO more%
 5980PROCinfo(block+4)
 5990IF handle=texthandle THEN dummy=FNredraw_text(TRUE)
 6000ENDPROC
 6010
 6020DEF PROCforceR(handle)
 6030REM Force the given window ONLY to be redrawn
 6040PROCgetw(handle)
 6050SYS ForceR,handle,scx%,scy%-(y1%-y0%),scx%+(x1%-x0%),scy%
 6060ENDPROC
 6070
 6080DEF FNmatchident(A$)
 6090IF A$="" THEN =-1
 6100LOCAL I%
 6110I%=nh%+1:REPEATI%=I%-1:UNTILA$=wident$(I%)ORI%=0
 6120IFA$=wident$(I%)THEN=I%ELSE=-1
 6130
 6140DEF PROCgetw(handle%)
 6150IF handle%=iconbar%  ENDPROC
 6160!block=handle%:SYSGetW,0,block
 6170PROCinfo(block+4):bhandle%=block!28:flags%=block!32
 6180ontop=flags% AND &20000
 6190ENDPROC
 6200
 6210DEF PROCinfo(b)
 6220x0%=!b:y0%=b!4:x1%=b!8:y1%=b!12:scx%=b!16:scy%=b!20
 6230bx%=x0%-scx%:by%=y1%-scy%
 6240gwxl%=b!24:gwyb%=b!28:gwxr%=b!32:gwyt%=b!36
 6250ENDPROC
 6260
 6270DEF PROCgetpointer
 6280SYSGetP,0,block
 6290mousex%=!block:mousey%=block!4:b%=block!8:handle%=block!12:icon%=block!16:ob%=block!20
 6300ENDPROC
 6310
 6320DEF PROCsys_claiminputfocus(window%,icon%,xofst%,yofst%,height%,index%)
 6330SYSSetCaret, window%,icon%,xofst%,yofst%,height%,index%
 6340ENDPROC
 6350
 6360DEF PROCsys_getcaretposition(RETURN window%,RETURN icon%,RETURN xofst%,RETURN yofst%,RETURN height%,RETURN indx%)
 6370SYSGetCaret,0,b
 6380window%=!block: icon%=block!4: xofst%=block!8: yofst%=block!12: height%=block!16: indx%=block!20
 6390ENDPROC
 6400
 6410DEF PROCcursor(x%,y%)
 6420PROCsys_claiminputfocus(texthandle,-1,(x%-1)*chX%,-y%*lsY%-9*ypixel%,&1000000 OR10*ypixel%,-1)
 6430ENDPROC
 6440
 6450DEF PROCtext_menubox
 6460CASE text_owner$ OF
 6470WHEN "texted"
 6480  tick$="message"
 6490  null = FNtick_message
 6500  SYS CreateM,0,m_text%,mousex%-64,mousey%:claimmenu$="message"
 6510  theLastMenu = m_text%
 6520
 6530WHEN "program"
 6540  tick$="program"
 6550  null = FNtick_program
 6560  SYS CreateM,0,m_prog%,mousex%-64,mousey%:claimmenu$="program"
 6570  theLastMenu = m_prog%
 6580
 6590WHEN "vocab"
 6600  tick$="vocab"
 6610  null = FNtick_vocab
 6620  SYS CreateM,0,m_vocab%,mousex%-64,mousey%:claimmenu$="vocab"
 6630  theLastMenu = m_vocab%
 6640
 6650ENDCASE
 6660
 6670ENDPROC
 6680
 6690DEF PROCcheckmouse(mousex%,mousey%,button%,handle%,icon%,ob%)
 6700IFhandle%=-1 THEN ENDPROC
 6710PROCgetw(handle%)
 6720IFhandle%=ALPSmain THEN
 6730  IFicon%<>-1 THEN
 6740REM    icon% -= firstIconBarIcon%
 6750    CASETRUE OF
 6760      WHEN(button%AND1)=1 : REM adjust does nothing
 6770      WHEN(button%AND2)=2 : void=EVAL("FNmenu_"+iconbar$(icon%))
 6780      WHEN(button%AND4)=4 : PROCopenup(icon%)
 6790    ENDCASE
 6800  ENDIF
 6810ELSE
 6820  IF handle%=iconbar% THEN
 6830  REM The RISC OS icon bar
 6840  CASE TRUE OF
 6850    WHEN (button%AND2)=2 : void=FNmenu_misc
 6860    WHEN (button%AND4)=4
 6870    IF icon%=firstIconBarIcon% THEN PROCopen(ALPSmain,400,800,600,600)
 6880  ENDCASE
 6890   ELSE
 6900    index%=windowindex%
 6910     REPEAT
 6920      index%-=1: IFindex%<0 ERROR 255,"Invalid window"
 6930     UNTIL handle%(index%)=handle%
 6940    void=EVAL("FNbutton_"+wident$(index%))
 6950  ENDIF
 6960ENDIF
 6970ENDPROC
 6980
 6990DEF PROCuserkeypressed(handle%,icon%,key%)
 7000PROCgetw(handle%)
 7010LOCALindex%
 7020index%=windowindex%
 7030REPEAT
 7040index%-=1: IFindex%<0 THEN ENDPROC
 7050UNTILhandle%(index%)=handle%
 7060void=EVAL("FNkeypress_"+wident$(index%))
 7070ENDPROC
 7080
 7090DEF PROCmenuselect(item0%,item1%)
 7100SYS "Wimp_GetPointerInfo",,block
 7110buTTon = block!8
 7120void=EVAL("FNmenuselect_"+claimmenu$)
 7130IF buTTon=1 THEN
 7140   REM *** ADJUST pressed so keep the menu structure ***
 7150   null = EVAL("FNtick_"+tick$)
 7160   SYS CreateM,0,theLastMenu,0,0
 7170ELSE
 7180   claimmenu$=""
 7190ENDIF
 7200ENDPROC
 7210
 7220DEF PROCupdate(handle%,ux0%,uy0%,ux1%,uy1%)
 7230!block=handle%:block!4=ux0%:block!8=uy0%:block!12=ux1%:block!16=uy1%
 7240SYS UpdateW,0,block TO more%:PROCinfo(block+4)
 7250ENDPROC
 7260
 7270DEF PROCopenup(icon%)
 7280IF icon%(icon%)=-1 THEN
 7290  IF icon%<>diskicon AND icon%<>texticon AND icon%<>arcicon AND icon%<>swapicon AND icon%<>progicon AND icon%<>vocabicon AND icon%<>eyeicon THEN icon%(icon%)=icon%
 7300   CASE icon% OF
 7310     WHEN diskicon:
 7320          SYS CreateM,0,diskmenu,mousex%-64,mousey%
 7330          IF loaded$<>"" THEN f$=path$ ELSE f$="AlpsFile"
 7340          PROCchangeicon(savehandle,2,f$,void)
 7350          claimmenu$="disk35":theLastMenu=diskmenu:tick$=""
 7360     REM WHEN THEmiscicon:
 7370          REM *********** do nothing for this icon *******
 7380     WHEN texticon:
 7390          IF text_owner$="" THEN
 7400            PROCretitle(texthandle,"MESSAGES",texthandle)
 7410            PROCopen(texthandle,0,1000,scrw,400)
 7420            text_owner$="texted":text_ok=TRUE
 7430            PROCshow_msg(mptr)
 7440          ELSE
 7450            VDU 7
 7460          ENDIF
 7470     WHEN THEdooricon:
 7480          PROCopen(handle%(FNmatchident("roomedit")),0,720,1280,1040)
 7490          PROCrestore_room(rptr)
 7500     WHEN THEkeyicon:
 7510          PROCopen(handle%(FNmatchident("objected")),850,560,800,680)
 7520          PROCrestore_obj(optr)
 7530     WHEN progicon:
 7540          IF text_owner$="" THEN
 7550            PROCretitle(texthandle,"PROGRAM",texthandle)
 7560            PROCopen(texthandle,0,1000,scrw,400)
 7570            text_owner$="program":text_ok=TRUE
 7580            PROClist(prg_sel%,progval$)
 7590          ELSE
 7600            VDU 7
 7610          ENDIF
 7620     WHEN THEcharicon:
 7630          PROCopen(handle%(FNmatchident("chrdesign")),0,560,1280,860)
 7640          PROCdisplay_chr(cur_chr%)
 7650          PROCchangeicon(design,64,CHR$(cur_chr%),dummy)
 7660     WHEN vocabicon:
 7670          IF text_owner$="" THEN
 7680            PROCretitle(texthandle,"VOCABULARY",texthandle)
 7690            PROCopen(texthandle,0,1000,scrw,400)
 7700            text_owner$="vocab":text_ok=TRUE
 7710            PROClist_vocab(voc_sect%)
 7720          ELSE
 7730            VDU 7
 7740          ENDIF
 7750     WHEN helpicon:
 7760          PROCopen(handle%(FNmatchident("HELP")),0,500,960,400)
 7770     WHEN eyeicon:
 7780          IF text_owner$="" THEN
 7790            PROCretitle(texthandle,"PICTURES",texthandle)
 7800            PROCopen(texthandle,0,1000,scrw,400)
 7810            text_owner$="pix":text_ok=TRUE
 7820            PROClist_pix
 7830          ELSE
 7840            VDU 7
 7850          ENDIF
 7860     WHEN arcicon:dummy=FNkeypress_status
 7870     WHEN swapicon
 7880     datavalid=NOT datavalid:VDU 7:PROCswap_data
 7890     IF datavalid THEN
 7900      PROCchangeicon(ALPSmain,swapicon,"swap",swapicon)
 7910     ELSE
 7920      PROCchangeicon(ALPSmain,swapicon,"swap_x",swapicon)
 7930     ENDIF
 7940     PROCforceR(ALPSmain)
 7950     ENDCASE
 7960ENDIF
 7970ENDPROC
 7980
 7990
 8000REM  ------ `button` routines to deal with clicks in given window ------
 8010
 8020DEF FNbutton_texted
 8030LOCALmx%,my%
 8040IF button%<>2 THEN
 8050PROCgetpointer
 8060mx%=(mousex%-bx%+chX%DIV4) AND(NOT(chX%-1))
 8070my%=(mousey%-by%) - ((mousey%-by%) MODlsY%)
 8080text_col%=1+mx% DIVchX%
 8090text_row%=-((mousey%-by%) DIVlsY%)
 8100IF text_row%>last_row% text_row%=last_row%
 8110IF text_col%>text_rowlen%(text_row%) text_col%=text_rowlen%(text_row%)+1
 8120IF text_col%<1 text_col%=1
 8130ENDIF
 8140
 8150CASE button% OF
 8160WHEN 2
 8170PROCtext_menubox
 8180WHEN 4
 8190PROClocate_ptr
 8200PROCcursor(text_col%,text_row%)
 8210WHEN 1
 8220IF text_owner$<>"pix" THEN
 8230PROClocate_ptr
 8240IF mrk<2 THEN
 8250mark(mrk)=text_ptr%
 8260col(mrk)=text_col%:row(mrk)=text_row%
 8270asc(mrk)=?text_ptr%
 8280IF asc(mrk)=13 THEN VDU23,dummy_cr ELSE VDU23,chr(mrk)
 8290?os_block=asc(mrk)
 8300SYS "OS_Word",&A,os_block
 8310FOR R%=1 TO 8
 8320row_value=R%?os_block
 8330VDU row_value EOR &FF
 8340NEXT
 8350IF asc(mrk)=13 THEN ?text_ptr%=dummy_cr ELSE ?text_ptr%=chr(mrk)
 8360PROCupdate(texthandle,chX%*(text_col%-1),-(text_row%+1)*lsY%,chX%*(text_col%-1)+chX%,-(text_row%)*lsY%)
 8370dummy=FNredraw_text(TRUE)
 8380mrk+=1
 8390PROCcursor(text_col%,text_row%)
 8400ENDIF
 8410ENDIF
 8420ENDCASE
 8430=0
 8440
 8450DEF PROClocate_ptr
 8460text_ptr%=text_block%
 8470IF text_row%>0 THEN
 8480  FOR R%=0 TO text_row%-1
 8490    text_ptr%+=text_rowlen%(R%)
 8500    IF text_rowlen%(R%)<text_maxllen% THEN text_ptr%+=1
 8510  NEXT
 8520ENDIF
 8530text_ptr%+=text_col%-1
 8540IF text_ptr%>text_end% THEN text_ptr%=text_end%
 8550ENDPROC
 8560
 8570DEF FNbutton_objected
 8580CASE icon% OF
 8590WHEN 0:
 8600
 8610REM First set the 'tick' bits for each menu item
 8620null = FNtick_objected
 8630SYS CreateM,0,m_objflag,mousex%-64,mousey%:claimmenu$="objected"
 8640tick$="objected"
 8650theLastMenu = m_objflag
 8660
 8670WHEN 5:PROCfirst_obj
 8680WHEN 6:PROClast_obj
 8690WHEN 27:PROCnext_obj
 8700WHEN 16:PROCprev_obj
 8710WHEN 20:PROCfwd_obj(10)
 8720WHEN 21:PROCrewind_obj(10)
 8730WHEN 17
 8740PROCstore_obj(optr)
 8750optr=VAL(FNgeticondata(objhandle,7))
 8760IF optr<1 THEN optr=1
 8770IF optr>maxobs THEN optr=maxobs
 8780PROCrestore_obj(optr)
 8790WHEN 22:last_object=optr
 8800WHEN 26:
 8810SYS CreateM,0,m_contain,mousex%-64,mousey%:claimmenu$="container"
 8820tick$=""
 8830theLastMenu = m_contain
 8840OTHERWISE
 8850ENDCASE
 8860IF optr>last_object last_object=optr:data_saved=FALSE
 8870=0
 8880
 8890DEF FNbutton_roomedit
 8900CASE icon% OF
 8910WHEN 1:
 8920tick$="roomedit"
 8930null = FNtick_roomedit
 8940SYS CreateM,0,m_rmflag,mousex%-64,mousey%:claimmenu$="roomedit"
 8950theLastMenu = m_rmflag
 8960
 8970WHEN 5:PROCfirst_room
 8980WHEN 6:PROClast_room
 8990WHEN 7:PROCnext_room
 9000WHEN 8:PROCprev_room
 9010WHEN 9:PROCfwd_room(10)
 9020WHEN 10:PROCrewind_room(10)
 9030WHEN 11
 9040PROCstore_room(rptr)
 9050rptr=VAL(FNgeticondata(roomhandle,33))
 9060IF rptr<1 THEN rptr=1
 9070IF rptr>maxrms THEN rptr=maxrms
 9080PROCrestore_room(rptr)
 9090
 9100WHEN 12:last_room=rptr
 9110ENDCASE
 9120IF rptr>last_room last_room=rptr:data_saved=FALSE
 9130
 9140REM Now check for clicking menu on selected EXITR icon
 9150
 9160CASE TRUE OF
 9170
 9180WHEN icon%>53 AND icon%<70
 9190
 9200oldrmicon%=icon%
 9210null = FNtick_exitedit
 9220tick$="exitedit"
 9230SYS CreateM,0,m_exitf,mousex%-64,mousey%:claimmenu$="exitedit"
 9240theLastMenu = m_exitf
 9250OTHERWISE
 9260ENDCASE
 9270=0
 9280
 9290DEF FNbutton_chrdesign
 9300CASE TRUE OF
 9310WHEN icon%>=0 AND icon%<64
 9320  PROCset_icon(design,icon%,&50000000,0)
 9330  PROCwrite_chr(cur_chr%)
 9340  PROCset_icon(design,64,0,0)
 9350WHEN icon%=66
 9360  cur_chr%+=1
 9370  IF cur_chr%>max_chr% cur_chr%=max_chr%
 9380  PROCchangeicon(design,64,CHR$(cur_chr%),icon%)
 9390  PROCdisplay_chr(cur_chr%)
 9400WHEN icon%=67
 9410  cur_chr%-=1
 9420  IF cur_chr%<32 cur_chr%=32
 9430  PROCchangeicon(design,64,CHR$(cur_chr%),icon%)
 9440  PROCdisplay_chr(cur_chr%)
 9450WHEN icon%=68
 9460  SYS CreateM,0,m_chardes%,mousex%-64,mousey%:claimmenu$="chrdef"
 9470  theLastMenu = m_chardes%:tick$=""
 9480ENDCASE
 9490=0
 9500
 9510
 9520DEF FNbutton_info
 9530IF icon%=5 THEN
 9540PROCclose(infohandle)
 9550ENDIF
 9560=0
 9570
 9580DEF FNbutton_saveas
 9590CASE icon% OF
 9600WHEN 0 : PROCsave_all(FNgeticondata(savehandle,2))
 9610WHEN 1 : PROCgetw(savehandle)
 9620         dummy$=FNgeticondata(savehandle,1)
 9630         block!4=5:block!8=block!8+bx%
 9640         block!12=block!12+by%
 9650         block!16=block!16+bx%
 9660         block!20=block!20+by%
 9670         block!24=0:block!28=0:block!32=scrw+1:block!36=scrh+1
 9680         SYS "Wimp_DragBox",,block
 9690ENDCASE
 9700=0
 9710
 9720DEF FNbutton_Setup
 9730CASE icon% OF
 9740WHEN 0
 9750WHEN 1:PROCcreate_dirs(FNgeticondata(setuph,2),FNgeticondata(setuph,5))
 9760ENDCASE
 9770PROCclose(setuph)
 9780MOUSE RECTANGLE 0,0,scrw,scrh
 9790=0
 9800
 9810REM  ------ `keypress` routines deal with pressing key `key%` in a window
 9820
 9830DEF FNkeypress_texted
 9840CASE TRUE OF
 9850WHEN key%=13:PROCnewline:data_saved=FALSE:text_ok=FALSE
 9860WHEN key%=&18F:PROCup
 9870WHEN key%=&18E:PROCdown
 9880WHEN key%=&18D:PROCright
 9890WHEN key%=&18A:FOR I%=1 TO tab_set:PROCright:NEXT
 9900WHEN key%=&19A:FOR I%=1 TO tab_set:PROCleft:NEXT
 9910WHEN key%=&18C:PROCleft
 9920WHEN key%=&1AB:PROCdelete_line:data_saved=FALSE:text_ok=FALSE
 9930WHEN key%=&1ED:PROCinsert_line:data_saved=FALSE:text_ok=FALSE
 9940WHEN key%=&1AC:PROCleft_end
 9950WHEN key%=&1AD:PROCright_end
 9960WHEN key%=&18B:PROCright:PROCdelete_char:data_saved=FALSE:text_ok=FALSE
 9970WHEN key%=&1CD:overwrite=NOT overwrite
 9980WHEN key%=127:PROCdelete_char:data_saved=FALSE:text_ok=FALSE
 9990WHEN (key%>31) AND (key%<126)
10000IF overwrite THEN PROCoverwrite_char(key%) ELSE PROCinsert_char(key%)
10010data_saved=FALSE:text_ok=FALSE
10020OTHERWISE SYS "Wimp_ProcessKey",key%
10030ENDCASE
10040
10050PROCcursor(text_col%,text_row%)
10060=0
10070
10080DEF FNkeypress_saveas
10090IF key%=13 THEN PROCsave_all(FNgeticondata(savehandle,2)) ELSE SYS "Wimp_ProcessKey",key%
10110=0
10120
10130DEF FNkeypress_objected
10140IF key%=13 AND icon%=7 THEN
10150  PROCstore_obj(optr)
10160  optr=VAL(FNgeticondata(objhandle,icon%))
10170  IF optr<1 THEN optr=1
10180  IF optr>maxobs THEN optr=maxobs
10190  PROCrestore_obj(optr)
10200ENDIF
10210
10220CASE key% OF
10230WHEN 13,&18E:REM Return or down arrow
10240IF icon%<15 THEN
10250  icon%+=1
10260ELSE
10270  icon%=7
10280ENDIF
10290WHEN &18F:REM Up arrow
10300IF icon%>7 THEN
10310  icon%-=1
10320ELSE
10330  icon%=15
10340ENDIF
10350OTHERWISE SYS "Wimp_ProcessKey",key%
10360ENDCASE
10370PROCsys_claiminputfocus(objhandle,icon%,0,0,-1,LEN(FNgeticondata(objhandle,icon%)))
10380=0
10390
10400DEF FNkeypress_roomedit
10410CASE key% OF
10420WHEN 13,&18E,&18F
10430
10440IF key%=13 AND icon%=33 THEN
10450  PROCstore_room(rptr)
10460  rptr=VAL(FNgeticondata(roomhandle,icon%))
10470  IF rptr<1 THEN rptr=1
10480  IF rptr>maxrms THEN rptr=maxrms
10490  PROCrestore_room(rptr)
10500ENDIF
10510
10520IF key%=13 OR key%=&18E THEN
10530CASE TRUE OF
10540WHEN icon%=37:newicon%=71
10550WHEN icon%=71:newicon%=38
10560WHEN icon%=69:newicon%=33
10570WHEN icon%<37:newicon%=icon%+1
10580WHEN (icon%>37 AND icon%<54):newicon%=icon%+16
10590WHEN (icon%>53 AND icon%<69):newicon%=icon%-15
10600ENDCASE
10610ENDIF
10620
10630IF key%=&18F THEN
10640CASE TRUE OF
10650WHEN icon%=71:newicon%=37
10660WHEN icon%=38:newicon%=71
10670WHEN icon%=33:newicon%=69
10680WHEN icon%>33:newicon%=icon%-1
10690WHEN (icon%>37 AND icon%<54):newicon%=icon%-16
10700WHEN (icon%>53 AND icon%<69):newicon%=icon%+15
10710ENDCASE
10720ENDIF
10730
10740OTHERWISE SYS "Wimp_ProcessKey",key%
10741ENDCASE
10750PROCsys_claiminputfocus(roomhandle,newicon%,0,0,-1,LEN(FNgeticondata(roomhandle,newicon%)))
10760=0
10770
10780DEF FNkeypress_status
10790PROCcol(128+2)
10800VDU 26,4,12
10810PROCcol(9):PROCcol(128+7)
10820PROCcentre(STRING$(27," ")+"System Status Information"+STRING$(28," "),0)
10830PROCcol(128+2):PROCcol(7)
10840PROCstatus
10850PROCcol(128+7):PROCcol(9)
10860PROCcentre(STRING$(31," ")+"Integer Variables"+STRING$(32," "),10)
10870PROCcol(128+2):PROCcol(7)
10880PROClvar
10890OFF:PROCreturn(18,31):ON
10900VDU 26,5
10910SYS ForceR,-1,0,0,scrw+1,scrh+1
10920=0
10930
10940DEF FNkeypress_chrdef
10950IF key%=13 AND icon%=64 THEN
10960cur_chr%=ASC(FNgeticondata(design,icon%))
10970PROCdisplay_chr(cur_chr%)
10980PROCchangeicon(design,64,CHR$(cur_chr%),icon%)
10981ELSE
10982IF key%<>13 THEN SYS "Wimp_ProcessKey",key%
10983ENDIF
10990=0
11000
11010DEF FNkeypress_Setup
11020IF key%=&18E OR key%=13 AND icon%=2 THEN newicon%=5
11030IF key%=13 AND icon%=5 THEN icon%=1:void=FNbutton_Setup:=0
11040IF key%=&18E AND icon%=5 THEN newicon%=2
11050IF key%=&18F AND icon%=5 THEN newicon%=2
11060IF key%=&18F AND icon%=2 THEN newicon%=5
11061IF key%<>13 AND key%<>&18E AND key%<>&18F THEN SYS "Wimp_ProcessKey",key%
11070PROCsys_claiminputfocus(setuph,newicon%,0,0,-1,LEN(FNgeticondata(setuph,newicon%)))
11080=0
11090
11100REM ------ The `menu` routines to open the selected menu ------
11110
11120DEF FNmenu_
11130=0
11140
11150DEF FNmenu_swap
11160=0
11170
11180DEF FNmenu_arclogo
11190=0
11200
11210DEF FNmenu_info
11220=0
11230
11240
11250DEF FNmenu_disk35
11260SYS CreateM,0,diskmenu,mousex%-64,mousey%
11270IF loaded$<>"" THEN f$=path$ ELSE f$="AlpsFile"
11280PROCchangeicon(savehandle,2,f$,void)
11290theLastMenu= diskmenu
11300claimmenu$="disk35":tick$=""
11310=0
11320
11330
11340DEF FNmenu_key
11350SYS CreateM,0,objmenu,mousex%-64,mousey%
11360theLastMenu = objmenu
11370claimmenu$="key":tick$=""
11380=0
11390
11400DEF FNmenu_door
11410SYS CreateM,0,roommenu,mousex%-64,mousey%
11420theLastMenu = roommenu
11430claimmenu$="door":tick$=""
11440=0
11450
11460DEF FNmenu_quill
11470$end_msg%=STR$(FNmaxmsg)
11480SYS CreateM,0,textmenu,mousex%-64,mousey%
11490theLastMenu = textmenu
11500claimmenu$="quill":tick$=""
11510=0
11520
11530
11540DEF FNmenu_listing
11550SYS CreateM,0,progmenu,mousex%-64,mousey%
11560theLastMenu = progmenu
11570claimmenu$="listing":tick$=""
11580=0
11590
11600
11610DEF FNmenu_chardes
11620=0
11630SYS CreateM,0,charmenu,mousex%-64,mousey%
11640theLastMenu = charmenu
11650claimmenu$="chardes":tick$=""
11660=0
11670
11680DEF FNmenu_vocab
11690SYS CreateM,0,vocabmenu,mousex%-64,mousey%
11700theLastMenu = vocabmenu
11710claimmenu$="vocabulary":tick$=""
11720=0
11730
11740DEF FNmenu_face
11750SYS CreateM,0,facemenu,mousex%-64,mousey%
11760theLastMenu = facemenu
11770claimmenu$="actors":tick$=""
11780=0
11790
11800DEF FNmenu_misc
11810null = FNtick_misc
11820SYS CreateM,0,miscmenu,mousex%-64,FNmenuHeight(miscmenu,1)
11830theLastMenu = miscmenu
11840claimmenu$="misc":tick$="misc"
11850=0
11860
11870DEF FNmenu_help
11880=0
11890
11900
11910DEF FNmenu_eye
11920SYS CreateM,0,pixmenu,mousex%-64,mousey%
11930theLastMenu = pixmenu
11940claimmenu$="eye":tick$=""
11950=0
11960
11970
11980REM `menuselect` functions - called when a selection is made from a menu
11990REM `item0%` is the number of selection from first menu (0,1,2...)
12000REM `item1%` is the number of selection from second menu (0,1,2...)
12010
12020DEF FNmenuselect_
12030=0
12040
12050
12060DEF FNmenuselect_message
12070LOCAL changed_msg
12080
12090CASE item0% OF
12100  WHEN -1
12110  WHEN 0,1:overwrite=NOT overwrite
12120  WHEN 2:PROCcut(mark(0),mark(1),picbuf)
12130  WHEN 3:PROCcopy(mark(0),mark(1),picbuf)
12140  WHEN 4:PROCpaste(text_ptr%,picbuf)
12150  WHEN 5:PROCnext_msg
12160  WHEN 6:PROCprev_msg
12170  WHEN 7:PROCfirst_msg
12180  WHEN 8:PROClast_msg
12190  WHEN 9:PROCgoto_msg(VAL($m_msg%))
12200  WHEN 10
12210  IF item1%>-1 THEN
12220    IF item1%=0 THEN
12230      FOR I%=0 TO maxsw%
12240        switch_vals(I%)=0
12250      NEXT I%
12260    ENDIF
12270    switch_vals(item1%)=VAL($(swdata%+12*(item1%-1)))
12280    IF item1%>switch_vals(0) THEN switch_vals(0)=item1%
12290    REM switch_vals(0) stores the number of switches
12300  ENDIF
12310  WHEN 11
12320  *FX3,10
12330  PROCprint_msg(mptr)
12340  *FX3,0
12350ENDCASE
12360PROCforceR(texthandle)
12370IF changed_msg THEN
12380text_row%=0:text_col%=1
12390PROCcursor(1,0)
12400ENDIF
12410REM claimmenu$=""
12420=0
12430
12440DEF PROCcut(start,end,buf)
12450IF mrk<2 THEN ERROR 1,error$(29)
12460IF end<start THEN SWAP start,end:SWAP col(0),col(1):SWAP row(0),row(1):SWAP asc(0),asc(1)
12470cliplen=end-start+1
12480PROCmove(start,buf,cliplen)
12490REM SYS"Wimp_CloseDown":MODE 12:STOP
12500PROCmove(end+1,start,text_end%-end):REM was +1 until 16.6.89
12510?buf=asc(0):buf?(cliplen-1)=asc(1)
12520text_end%=text_end%-cliplen
12530IF asc(1)=0 THEN text_end%+=1
12540REM Restore end marker if it has been cut
12550IF text_end%<text_block% THEN text_end%=text_block%
12560?text_end%=0
12570last_row%=FNfind_lastrow
12580FOR I%=0 TO last_row%
12590text_rowlen%(I%)=LENFNrow(I%)
12600NEXT
12610mrk=0:mark()=+0
12620IF text_row%>last_row% THEN text_row%=last_row%
12630IF text_col%>text_rowlen%(text_row%) THEN text_col%=text_rowlen%(text_row%)+1
12640PROClocate_ptr:PROCcursor(text_col%,text_row%)
12650data_saved=FALSE:text_ok=FALSE
12660ENDPROC
12670
12680DEF PROCcopy(start,end,buf)
12690IF mrk<2 THEN ERROR 1,error$(29)
12700IF end<start THEN SWAP start,end:SWAP col(0),col(1):SWAP row(0),row(1):SWAP asc(0),asc(1)
12710cliplen=end+1-start
12720PROCmove(start,buf,cliplen)
12730?buf=asc(0):buf?(cliplen-1)=asc(1)
12740?start=asc(0):?end=asc(1):mrk=0:mark()=+0
12750ENDPROC
12760
12770DEF PROCpaste(to,from)
12780IF cliplen=0 THEN ERROR 1,error$(30)
12790PROCmove(to,to+cliplen,text_end%-to+1)
12800PROCmove(from,to,cliplen)
12810text_end%+=cliplen
12820last_row%=FNfind_lastrow
12830FOR I%=0 TO last_row%
12840text_rowlen%(I%)=LENFNrow(I%)
12850NEXT
12860PROClocate_ptr:PROCcursor(text_col%,text_row%)
12870data_saved=FALSE:text_ok=FALSE
12880ENDPROC
12890
12900DEF FNmenuselect_program
12910errflag=FALSE
12920IF item0%>4 AND item0%<9 THEN
12930PROCremove_markers
12940IF NOT text_ok THEN PROCstore_prog
12950prg_sel%=item0%-3
12960text_row%=0:text_col%=1
12970PROCcursor(1,0)
12980ENDIF
12990
13000CASE item0% OF
13010WHEN 0,1:overwrite=NOT overwrite
13020WHEN 2:PROCcut(mark(0),mark(1),picbuf)
13030WHEN 3:PROCcopy(mark(0),mark(1),picbuf)
13040WHEN 4:PROCpaste(text_ptr%,picbuf)
13050WHEN 5:progval$=""
13060WHEN 6:progval$=$proc%
13070WHEN 7:progval$=$def%
13080WHEN 8:progval$=$exit%
13090WHEN 9:PROCprint_prog_seg
13100WHEN 10:PROClisto
13110ENDCASE
13120
13130IF (item0%>4 AND item0%<9) THEN
13140 IF NOT errflag THEN
13150  PROClist(item0%-3,progval$)
13160  PROCforceR(texthandle)
13170 ENDIF
13180ENDIF
13190IF (item0%>1 AND item0%<5) THEN
13200PROCforceR(texthandle)
13210ENDIF
13220IF item0%=10 THEN
13230IF NOT text_ok THEN PROCstore_prog
13240IF NOT errflag THEN
13250text_row%=0:text_col%=1
13260PROCcursor(1,0)
13270PROClist(prg_sel%,progval$)
13280PROCforceR(texthandle)
13290ENDIF
13300ENDIF
13310=0
13320
13330DEF FNmenuselect_vocab
13340REM Make a selection from the vocabulary editor menu
13350CASE item0% OF
13360WHEN 0,1:overwrite=NOT overwrite
13370WHEN 2:PROCcut(mark(0),mark(1),picbuf)
13380WHEN 3:PROCcopy(mark(0),mark(1),picbuf)
13390WHEN 4:PROCpaste(text_ptr%,picbuf)
13400WHEN 5,6,7,8,9,10,11
13410PROCremove_markers:REM Added 23.08.89
13420IF NOT text_ok THEN PROCstore_vocab
13430IF NOT errflag THEN
13440voc_sect%=item0%-4
13450PROClist_vocab(voc_sect%)
13460text_row%=0:text_col%=1
13470PROCcursor(1,0)
13480ENDIF
13490WHEN 12:PROCprint_prog_seg
13500ENDCASE
13510CASE item0% OF
13520WHEN 2,3,4,5,6,7,8,9,10,11
13530PROCforceR(texthandle)
13540ENDCASE
13550REM claimmenu$=""
13560=0
13570
13580DEF FNmenuselect_exitedit
13590xerr%=FALSE
13600IF oldrmicon%<>0 THEN
13610  ptr%=(rdata%+rptr*r_len+oldrmicon%)
13620  flags%=?ptr%
13630  cl_door%=flags% AND &40
13640  op_door%=flags% AND &20
13650  lk_door%=flags% AND &10
13660  unlk_door%=flags% AND &8
13670  IF cl_door% AND item0%=2 THEN xerr%=TRUE
13680  IF op_door% AND item0%=1 THEN xerr%=TRUE
13690  IF op_door% AND item0%=3 THEN xerr%=TRUE
13700  IF unlk_door% AND item0%=3 THEN xerr%=TRUE
13710  IF lk_door% AND item0%=4 THEN xerr%=TRUE
13720  IF lk_door% AND item0%=2 THEN xerr%=TRUE
13730  IF xerr% THEN
13740    VDU 7
13750  ELSE
13760  ?ptr%=?ptr% EOR (&80 >> item0%)
13770  IF NOT lk_door% AND item0%=3 THEN
13780    ?ptr%=?ptr% AND %11011111 OR %01000000
13790  ENDIF
13800  IF lk_door% AND item0%=1 THEN
13810    ?ptr%=?ptr% AND %11101111
13820  ENDIF
13830  ENDIF
13840  data_saved=FALSE
13850ENDIF
13860REM claimmenu$=""
13870=0
13880
13890DEF FNmenuselect_disk35
13900CASE item0% OF
13910  WHEN 0
13920    path$=FNgeticondata(savehandle,2)
13930    SYS "OS_File",5,path$ TO ftype
13940    IF ftype=0 THEN PROCsave_all(path$) ELSE PROCensure(item0%,"This file exists. Do you want to replace it?")
13950  WHEN 1
13960    PROCload_bits(FNgeticondata(setuph,2))
13970    PROCsetup_disk(item0%)
13980ENDCASE
13990icon%(diskicon)=-1:REM claimmenu$=""
14000=0
14010
14020
14030
14040DEF FNmenuselect_objected
14050old_flags%=VAL(FNgeticondata(objhandle,8))
14060new_flags%=old_flags% EOR (&80 >> item0%)
14070PROCchangeicon(objhandle,8,STR$(new_flags%),dummy)
14080REM claimmenu$=""
14090=0
14100
14110DEF FNmenuselect_container
14120CASE item0% OF
14130WHEN 0
14140container=NOT container
14150IF container THEN
14160PROCchangeicon(objhandle,26,"SIZE <C>",dummy)
14170ELSE
14180PROCchangeicon(objhandle,26,"SIZE",dummy)
14190ENDIF
14200WHEN 1
14210cont_room=VAL($controom%)
14220ENDCASE
14230REM data_saved=FALSE
14240REM claimmenu$=""
14250=0
14260
14270DEF FNmenuselect_roomedit
14280old_flags%=VAL(FNgeticondata(roomhandle,34))
14290new_flags%=old_flags% EOR (&80 >> item0%)
14300PROCchangeicon(roomhandle,34,STR$(new_flags%),dummy)
14310REM claimmenu$=""
14320=0
14330
14340DEF FNmenuselect_key
14350CASE item0% OF
14360  WHEN 0:PROCprint_objs
14370  WHEN 1:PROCimport_obj("O."+$import%)
14380ENDCASE
14390REM claimmenu$=""
14400=0
14410
14420DEF FNmenuselect_door
14430CASE item0% OF
14440  WHEN 0:PROCprint_rooms
14450  WHEN 1:PROCimport_rooms("R."+$import%)
14460ENDCASE
14470REM claimmenu$=""
14480=0
14490
14500DEF FNmenuselect_quill
14510CASE item0% OF
14520  WHEN 0:PROCprint_text
14530  WHEN 1:PROCimport_text("T."+$import%)
14540         PROCload_dict("D."+$import%)
14550ENDCASE
14560REM claimmenu$=""
14570=0
14580
14590DEF FNmenuselect_listing
14600CASE item0% OF
14610  WHEN 0:PROCprint_program
14620  WHEN 1:PROCconvert($import%)
14630  WHEN 2:PROCrun
14640ENDCASE
14650REM claimmenu$=""
14660=0
14670
14680DEF FNmenuselect_chardes
14690REM When `menu` is clicked on the `chardes` icon
14700CASE item0% OF
14710WHEN 0:PROCsave_chars("<Users$Resources>."+$filename2%)
14720WHEN 1
14730OSCLI("PRINT <Alps$Resources>."+$filename2%)
14740PROCdisplay_chr(cur_chr%)
14750SYS ForceR,-1,0,0,scrw+1,scrh+1
14760ENDCASE
14770REM claimmenu$=""
14780=0
14790
14800DEF FNmenuselect_chrdef
14810REM When button is clicked on the `SELECT` icon in the char design window
14820chr%=ASC($charnum)
14830IF chr%>31 AND chr%<=max_chr% THEN
14840  cur_chr%=chr%
14850  PROCchangeicon(design,64,CHR$(cur_chr%),icon%)
14860  PROCdisplay_chr(cur_chr%)
14870ENDIF
14880REM claimmenu$=""
14890=0
14900
14910DEF FNmenuselect_vocabulary
14920REM When SELECT pressed in small vocab menu
14930CASE item0% OF
14940WHEN 0:PROCprint_vocab
14950ENDCASE
14960REM claimmenu$=""
14970=0
14980
14990DEF FNmenuselect_actors
15000REM SELECT pressed in small 'face' menu (Actors)
15010CASE item0% OF
15020WHEN 0:PROCprint_actors
15030ENDCASE
15040REM claimmenu$=""
15050=0
15060
15070DEF FNmenuselect_eye
15080REM SELECT pressed in small 'eye' menu (Pictures)
15090CASE item0% OF
15100WHEN 0:PROCprint_pix
15110ENDCASE
15120REM claimmenu$=""
15130=0
15140
15150DEF FNmenuselect_misc
15160CASE item0% OF
15170 WHEN 1: REM quit
15180  PROCquit(4)
15190 ENDCASE
15200icon%(THEmiscicon)=-1
15210=0
15220
15230
15240REM ------ Utility procedures and functions for each editor ------
15250
15260REM ------ Character designer utilities ------
15270
15280DEF PROCwrite_chr(C%)
15290VDU 23,C%
15300FOR row%=0 TO 7
15310row_value=0
15320FOR col%=0 TO 7
15330dummy=VAL(FNgeticondata(design,row%*8+col%))
15340bit=flags% >>> 28
15350IF bit=7 THEN row_value=row_value+2^(7-col%)
15360NEXT col%
15370VDU row_value
15380NEXT row%
15390ENDPROC
15400
15410DEF PROCdisplay_chr(C%)
15420?os_block=C%
15430SYS "OS_Word",&A,os_block
15440FOR R%=1 TO 8
15450row_value=R%?os_block
15460FOR C%=0 TO 7
15470bit=row_value DIV 2^(7-C%)
15480row_value=row_value MOD 2^(7-C%)
15490IF bit>0 PROCset_icon(design,(R%-1)*8+C%,&70000000,&F0000000) ELSE PROCset_icon(design,(R%-1)*8+C%,&20000000,&F0000000)
15500NEXT C%
15510NEXT R%
15520ENDPROC
15530
15540DEF PROCsave_chars(f$)
15550f%=OPENOUT(f$)
15560FOR ch%=32 TO max_chr%
15570BPUT#f%,23:BPUT#f%,ch%
15580?os_block=ch%
15590SYS "OS_Word",&A,os_block
15600FOR I%=1 TO 8
15610BPUT#f%,I%?os_block
15620NEXT I%
15630NEXT ch%
15640CLOSE#f%
15650OSCLI("SETTYPE "+f$+" BBC Font")
15660ENDPROC
15670
15680DEF PROCsave_pal(f$)
15690LOCAL ch%,col1,rgb
15700PROCreadPalette
15710ch%=OPENOUT f$
15720FOR col=0 TO 19
15730FOR rgb=1 TO 3
15740BPUT#ch%,rgb(col,rgb)
15750NEXT rgb
15760NEXT col
15770CLOSE#ch%
15780OSCLI "SETTYPE "+f$+" FED"
15790ENDPROC
15800
15810
15820
15830REM ------ Text editor utilities ------
15840
15850DEF PROCleft
15860IF text_col%<>1 THEN
15870  text_ptr%-=1
15880  text_col%-=1
15890ELSE
15900  IF text_row%<>0 THEN
15910    text_row%-=1
15920    text_col%=text_rowlen%(text_row%)+1
15930    IF text_rowlen%(text_row%)<text_maxllen% THEN text_ptr%-=1
15940  ELSE
15950    VDU 7
15960  ENDIF
15970ENDIF
15980ENDPROC
15990
16000DEF PROCleft_end
16010text_ptr%-=(text_col%-1)
16020text_col%=1
16030ENDPROC
16040
16050DEF PROCright
16060IF text_row%=last_row% AND text_col%=text_rowlen%(text_row%)+1 THEN
16070  VDU 7
16080ELSE
16090  REM This '<' was changed to '<=' on 23.08.89
16100  IF text_col%<=text_maxllen% THEN text_ptr%+=1
16110  text_col%+=1
16120  IF text_col%>text_rowlen%(text_row%)+1 AND text_row%<>last_row% THEN
16130    text_col%=1:text_row%+=1
16140  ENDIF
16150ENDIF
16160ENDPROC
16170
16180DEF PROCright_end
16190text_ptr%+=(text_rowlen%(text_row%)-text_col%)+1
16200text_col%=text_rowlen%(text_row%)+1
16210REM IF text_col%>text_maxllen% text_col%=text_maxllen%
16220ENDPROC
16230
16240DEF PROCdown
16250IF text_row%=text_maxrows% OR text_row%=last_row% THEN
16260  VDU 7
16270ELSE
16280  text_row%+=1
16290  old_col%=text_col%
16300  IF text_rowlen%(text_row%)<text_col% THEN
16310    text_col%=text_rowlen%(text_row%)+1
16320  ENDIF
16330  text_ptr%+=(text_rowlen%(text_row%-1)-old_col%+text_col%)
16340  IF text_rowlen%(text_row%-1)<text_maxllen% text_ptr%+=1
16350ENDIF
16360ENDPROC
16370
16380DEF PROCup
16390IF text_row%<>0 THEN
16400  text_row%-=1
16410  old_col%=text_col%
16420  IF text_rowlen%(text_row%)<text_col% THEN
16430    text_col%=text_rowlen%(text_row%)+1
16440  ENDIF
16450  text_ptr%-=(old_col%+(text_rowlen%(text_row%)-text_col%))
16460  IF text_rowlen%(text_row%)<text_maxllen% text_ptr%-=1
16470ELSE
16480  VDU 7
16490ENDIF
16500ENDPROC
16510
16520DEF PROCnewline
16530old_col%=text_col%
16540PROCinsert_char(13)
16550text_row%+=1
16560text_col%=1
16570PROCupdate(texthandle,scx%,scy%-(y1%-y0%),scx%+(x1%-x0%)+chX%,scy%)
16580dummy=FNredraw_text(TRUE)
16590ENDPROC
16600
16610DEF PROCinsert_char(chr%)
16620IF text_ptr%>text_end% THEN FOR I%=text_end% TO text_ptr%:?I%=32:NEXT:text_end%=text_ptr%
16630IF text_ptr%=text_end% OR text_rowlen%(text_row%)<text_maxllen%-1 THEN
16640  redraw_all%=FALSE
16650ELSE
16660  redraw_all%=TRUE
16670ENDIF
16680
16690PROCmove(text_ptr%,text_ptr%+1,text_end%-text_ptr%)
16700IF text_ptr%<mark(0) THEN mark(0)+=1
16710IF text_ptr%<mark(1) THEN mark(1)+=1
16720?text_ptr%=chr%:text_ptr%+=1:text_end%+=1:?text_end%=0
16730
16740IF text_rowlen%(text_row%)<text_maxllen%-1 AND chr%<>13 THEN
16750REM The '-1' above added 29.08.89 to fix bug 8a.
16760text_rowlen%(text_row%)+=1
16770ELSE
16780last_row%=FNfind_lastrow
16790FOR R%=text_row% TO last_row%
16800  text_rowlen%(R%)=LEN FNrow(R%)
16810NEXT
16820ENDIF
16830
16840IF redraw_all% THEN
16850PROCupdate(texthandle,0,-(last_row%+1)*lsY%,scx%+(x1%-x0%)+chX%,-(text_row%)*lsY%)
16860ELSE
16870IF text_col%>text_maxllen% THEN
16880PROCupdate(texthandle,0,-(text_row%)*lsY%,scx%+(x1%-x0%)+chX%,-(text_row%-1)*lsY%)
16890ELSE
16900PROCupdate(texthandle,chX%*(text_col%-1),-(text_row%+1)*lsY%,scx%+(x1%-x0%)+chX%,-(text_row%)*lsY%)
16910ENDIF
16920ENDIF
16930
16940IF text_col%>text_maxllen% THEN
16950text_col%=2:text_row%+=1
16960IF text_row%>last_row% last_row%=text_row%
16970ELSE
16980text_col%+=1
16990IF text_col%>text_maxllen% THEN
17000  text_col%=1:text_row%+=1
17010  IF text_row%>last_row% last_row%=text_row%
17020ENDIF
17030ENDIF
17040
17050dummy=FNredraw_text(redraw_all%)
17060ENDPROC
17070
17080DEF PROCoverwrite_char(chr%)
17090IF text_col%>text_rowlen%(text_row%) THEN PROCinsert_char(chr%):ENDPROC
17100IF text_ptr%=mark(0) THEN SWAP mark(0),mark(1):SWAP asc(0),asc(1):SWAP chr(0),chr(1):mrk-=1:mark(1)=0 ELSE IF text_ptr%=mark(1) THEN mrk-=1:mark(1)=0
17110?text_ptr%=chr%
17120text_ptr%+=1
17130IF text_ptr%>text_end% text_end%=text_ptr%
17140?text_end%=0
17150PROCupdate(texthandle,chX%*(text_col%-1),-(text_row%+1)*lsY%,scx%+(x1%-x0%)+chX%,-(text_row%)*lsY%)
17160dummy=FNredraw_text(TRUE)
17170text_col%+=1
17180IF text_col%>text_maxllen% THEN text_col%=1:text_row%+=1
17190
17200last_row%=FNfind_lastrow
17210
17220FOR R%=text_row% TO last_row%
17230  text_rowlen%(R%)=LEN FNrow(R%)
17240NEXT
17250ENDPROC
17260
17270DEF PROCdelete_char
17280IF text_col%=1 AND text_row%=0 VDU 7:ENDPROC
17290IF text_ptr%<mark(0) THEN mark(0)-=1
17300IF text_ptr%<mark(1) THEN mark(1)-=1
17310text_ptr%-=1:text_end%-=1
17320IF text_ptr%=mark(0) THEN SWAP mark(0),mark(1):SWAP asc(0),asc(1):SWAP chr(0),chr(1):mrk-=1:mark(1)=0 ELSE IF text_ptr%=mark(1) THEN mrk-=1:mark(1)=0
17330text_col%-=1:this_row%=text_row%:REM text_rowlen%(text_row%)-=1
17340cr%=FALSE
17350IF text_col%<1 THEN
17360  cr%=TRUE
17370  text_col%=text_rowlen%(text_row%-1)
17380  IF ?text_ptr%=13 text_col%+=1
17390  text_row%-=1
17400ENDIF
17410PROCmove(text_ptr%+1,text_ptr%,text_end%-text_ptr%+1)
17420
17430IF text_rowlen%(this_row%)<text_maxllen% AND NOT cr% THEN
17440text_rowlen%(this_row%)-=1
17450ELSE
17460last_row%=FNfind_lastrow
17470FOR R%=text_row% TO last_row%
17480  text_rowlen%(R%)=LEN FNrow(R%)
17490NEXT
17500ENDIF
17510PROCgetw(texthandle)
17520IF (text_ptr%=text_end% OR text_rowlen%(text_row%)<text_maxllen%-1)  AND NOT cr% THEN
17530PROCupdate(texthandle,chX%*(text_col%-1),-(text_row%+1)*lsY%,scx%+(x1%-x0%)+chX%,-(text_row%)*lsY%)
17540  C%=text_col%
17550ELSE
17560PROCupdate(texthandle,0,-(last_row%+2)*lsY%,scx%+(x1%-x0%)+chX%,-(text_row%)*lsY%)
17570REM  PROCupdate(texthandle,scx%,scy%-(y1%-y0%),scx%+(x1%-x0%)+chX%,scy%)
17580ENDIF
17590
17600dummy=FNredraw_text(TRUE)
17610ENDPROC
17620
17630DEF PROCinsert_line
17640IF last_row%=text_maxrows% THEN VDU7:ENDPROC
17650from%=text_ptr%-text_col%+1
17660IF from%<mark(0) THEN mark(0)+=1
17670IF from%<mark(1) THEN mark(1)+=1
17680PROCmove(from%,from%+1,text_end%-from%+1)
17690?from%=13
17700FOR R%=last_row%+1 TO text_row%+1 STEP -1
17710text_rowlen%(R%)=text_rowlen%(R%-1)
17720NEXT
17730text_rowlen%(text_row%)=0
17740text_end%+=1:last_row%+=1
17750text_ptr%-=text_col%-1
17760text_col%=1
17770PROCupdate(texthandle,scx%,scy%-(y1%-y0%),scx%+(x1%-x0%)+chX%,scy%-(text_row%)*lsY%)
17780dummy=FNredraw_text(TRUE)
17790ENDPROC
17800
17810DEF PROCdelete_line
17820LOCAL cr%,to%
17830PROCremove_markers
17840next_line%=text_ptr%+text_rowlen%(text_row%)-text_col%+1
17850text_ptr%-=(text_col%-1):to%=text_ptr%
17860IF ?(text_ptr%+text_rowlen%(text_row%))=13 next_line%+=1:cr%=TRUE
17870PROCmove(next_line%,to%,text_end%-next_line%)
17880text_end%-=text_rowlen%(text_row%)
17890IF cr% text_end%-=1
17900IF text_end%<text_block% text_end%=text_block%
17910?text_end%=0
17920text_col%=1
17930last_row%=FNfind_lastrow
17940
17950FOR R%=text_row% TO last_row%
17960  text_rowlen%(R%)=LEN FNrow(R%)
17970NEXT
17980
17990REM PROCupdate(texthandle,scx%,scy%-(y1%-y0%),scx%+(x1%-x0%)+chX%,scy%-(text_row%)*lsY%)
18000PROCupdate(texthandle,scx%,scy%-(y1%-y0%),scx%+(x1%-x0%)+chX%,scy%)
18010dummy=FNredraw_text(TRUE)
18020ENDPROC
18030
18040DEF PROCinstall_texted
18050text_maxrows%=500
18060text_blocksize%=20000
18070text_original%=TRUE
18080DIM text_rowlen%(text_maxrows%)
18090DIM default_text_block% text_blocksize%+300
18100text_block%=default_text_block%
18110dummy_spc=27:dummy_cr=253
18120VDU23,dummy_spc,0,0,0,0,0,0,0,0
18130VDU23,dummy_cr,0,0,0,0,0,0,0,0
18140text_row%=0
18150text_col%=1
18160last_row%=0
18170text_cur%=TRUE
18180overwrite=FALSE
18190tab_set=5
18200text_ptr%=text_block%
18210text_end%=text_block%
18220?text_block%=0
18230mrk=0:DIM mark(1),row(1),col(1),chr(1),asc(1):chr(0)=254:chr(1)=255:cliplen=0
18240ENDPROC
18250
18260DEF PROCremove_markers
18270LOCAL I%
18280IF mrk>0 THEN
18290mrk-=1
18300FOR I%=0 TO mrk
18310?mark(I%)=asc(I%):mark(I%)=0
18320NEXT
18330mrk=0
18340ENDIF
18350ENDPROC
18360
18370DEF FNfind_lastrow
18380LOCAL A%,B%
18390A%=text_block%:B%=text_end%
18400CALL lastrow
18410=!rowcount
18420
18430DEF FNrow(row%)
18440LOCAL A%,B%
18450A%=text_block%:B%=row%
18460CALL row
18470=$linebuffer
18480
18490
18500REM ------ Object editor utilities ------
18510
18520DEF PROCfirst_obj
18530PROCstore_obj(optr)
18540optr=1
18550PROCrestore_obj(1)
18560ENDPROC
18570
18580DEF PROClast_obj
18590PROCstore_obj(optr)
18600optr=last_object
18610PROCrestore_obj(optr)
18620ENDPROC
18630
18640DEF PROCnext_obj
18650PROCstore_obj(optr)
18660optr+=1
18670IF optr>maxobs optr=maxobs
18680PROCrestore_obj(optr)
18690ENDPROC
18700
18710DEF PROCprev_obj
18720PROCstore_obj(optr)
18730optr-=1
18740IF optr<1 optr=1
18750PROCrestore_obj(optr)
18760ENDPROC
18770
18780DEF PROCfwd_obj(times%)
18790PROCstore_obj(optr)
18800optr+=times%:IF optr>maxobs THEN optr=maxobs
18810PROCrestore_obj(optr)
18820ENDPROC
18830
18840DEF PROCrewind_obj(times%)
18850PROCstore_obj(optr)
18860optr-=times%:IF optr<1 THEN optr=1
18870PROCrestore_obj(optr)
18880ENDPROC
18890
18900DEF PROCstore_obj(o%)
18910REM This reads the object data from the writeable icons in the window
18920REM and stores it in the object data area (odata%...)
18930LOCAL olddata
18940ptr=o%*o_len
18950
18960FOR I%=8 TO 15
18970  icondata=VAL(FNgeticondata(objhandle,I%))
18980  CASE I% OF
18990    WHEN 10,11,12,13
19000    REM The double-byte values
19010    olddata=?(odata%+ptr)+?(odata%+ptr+1)*256
19020    IF icondata<>olddata THEN data_saved=FALSE
19030    ?(odata%+ptr)=icondata MOD 256
19040    ?(odata%+ptr+1)=icondata DIV 256
19050    ptr+=2
19060    WHEN 8,9,14,15
19070    REM The single-byte values
19080    olddata=?(odata%+ptr)
19090    IF olddata<>icondata MOD 256 THEN data_saved=FALSE
19100    ?(odata%+ptr)=icondata MOD 256:ptr+=1
19110  ENDCASE
19120NEXT
19130IF container THEN
19140?(odata%+ptr)=?(odata%+ptr) OR %10000000:ptr+=1:?(odata%+ptr)=cont_room
19150ELSE
19160?(odata%+ptr)=?(odata%+ptr) AND %01111111:ptr+=1:?(odata%+ptr)=0
19170ENDIF
19180ENDPROC
19190
19200DEF PROCrestore_obj(o%)
19210REM This reads the data for object o% from memory and updates the icon
19220REM contents, ensuring the window reflects the new values
19230
19240ptr=o%*o_len
19250PROCchangeicon(objhandle,7,STR$(o%),icon%)
19260FOR I%=8 TO 15
19270  CASE I% OF
19280    WHEN 10,11,12,13:data$=STR$(?(odata%+ptr)+256*?(odata%+ptr+1)):ptr+=2
19290    WHEN 8,9,14,15:data$=STR$(?(odata%+ptr)):ptr+=1
19300  ENDCASE
19310  IF data$="" THEN data$="0"
19320  PROCchangeicon(objhandle,I%,data$,newicon%)
19330NEXT I%
19340
19350store=small_area%:col%=1:row%=0
19360PROCfill(small_area%,small_areasize%,13)
19370print=FALSE
19380PROCpvok(FNfindnoun(o%,void),1,FALSE)
19390PROCchangeicon(objhandle,19,$small_area%,newicon%)
19400IF ((?(odata%+ptr) AND %10000000) DIV 128)>0 THEN container=TRUE ELSE container=FALSE
19410ptr+=1
19420cont_room=?(odata%+ptr):$controom%=STR$(cont_room)
19430IF container PROCchangeicon(objhandle,26,"SIZE <C>",newicon%) ELSE PROCchangeicon(objhandle,26,"SIZE",newicon%)
19440ENDPROC
19450
19460
19470REM ------ Room editor utilities ------
19480
19490DEF PROCfirst_room
19500PROCstore_room(rptr)
19510rptr=1
19520PROCrestore_room(1)
19530ENDPROC
19540
19550DEF PROClast_room
19560PROCstore_room(rptr)
19570rptr=last_room
19580PROCrestore_room(rptr)
19590ENDPROC
19600
19610DEF PROCnext_room
19620PROCstore_room(rptr)
19630rptr+=1
19640IF rptr>maxrms rptr=maxrms
19650PROCrestore_room(rptr)
19660ENDPROC
19670
19680DEF PROCprev_room
19690PROCstore_room(rptr)
19700rptr-=1
19710IF rptr<1 rptr=1
19720PROCrestore_room(rptr)
19730ENDPROC
19740
19750DEF PROCfwd_room(times%)
19760PROCstore_room(rptr)
19770rptr+=times%:IF rptr>maxrms THEN rptr=maxrms
19780PROCrestore_room(rptr)
19790ENDPROC
19800
19810DEF PROCrewind_room(times%)
19820PROCstore_room(rptr)
19830rptr-=times%:IF rptr<1 THEN rptr=1
19840PROCrestore_room(rptr)
19850ENDPROC
19860
19870DEF PROCstore_room(r%)
19880ptr=r%*r_len
19890FOR I%=34 TO 69
19900  icondata=VAL(FNgeticondata(roomhandle,I%))
19910  CASE TRUE OF
19920    WHEN I%>35 AND I%<54
19930    olddata=?(rdata%+ptr)+?(rdata%+ptr+1)*256
19940    IF icondata<>olddata THEN data_saved=FALSE
19950    ?(rdata%+ptr)=icondata MOD 256
19960    ?(rdata%+ptr+1)=icondata DIV 256
19970    ptr+=2
19980    WHEN I%<36 OR I%>53
19990    olddata=?(rdata%+ptr)
20000    IF olddata<>icondata MOD 256 THEN data_saved=FALSE
20010    ?(rdata%+ptr)=icondata MOD 256
20020    ptr+=1
20030  ENDCASE
20040NEXT I%
20050icondata=VAL(FNgeticondata(roomhandle,71))
20060?(rdata%+ptr+16)=icondata MOD 256
20070?(rdata%+ptr+17)=icondata DIV 256
20080ENDPROC
20090
20100DEF PROCrestore_room(r%)
20110ptr=r%*r_len
20120PROCchangeicon(roomhandle,33,STR$(r%),icon%)
20130FOR I%=34 TO 69
20140  CASE TRUE OF
20150    WHEN I%>35 AND I%<54
20160    data$=STR$(?(rdata%+ptr)+256*?(rdata%+ptr+1)):ptr+=2
20170    WHEN I%<36 OR I%>53
20180    data$=STR$(?(rdata%+ptr)):ptr+=1
20190  ENDCASE
20200  IF data$="" THEN data$="0"
20210  PROCchangeicon(roomhandle,I%,data$,newicon%)
20220NEXT I%
20230data$=STR$(?(rdata%+ptr+16)+256*?(rdata%+ptr+17))
20240IF data$="" THEN data$="0"
20250PROCchangeicon(roomhandle,71,data$,newicon%)
20260ENDPROC
20270
20280
20290REM ------ Message editor utilities ------
20300
20310DEF PROCstore_msg
20320errflag=FALSE:PROCremove_markers
20330newlen=text_end%-text_block%
20340diff=newlen-oldlen
20350IF diff+text%!2>maxtext% THEN
20360  PROCerror(13,error$(36))
20370  errflag=TRUE
20380ELSE
20390  to=mstart+newlen-1
20400  from=mend-1
20410  text_end%=text_block%:text_ptr%=text_block%
20420  bytes_to_move=FNtext_end-mend+1
20430  PROCmove(from,to,bytes_to_move)
20440  PROCmove(text_block%,mstart,newlen)
20450  PROCincmsglen(diff)
20460  ns%=switch_vals(0)
20470  IF ns%>0 THEN
20480    ?switch_buf%=ns%:ptr%=1
20490    FOR I%=1 TO ns%
20500      switch_buf%?ptr%=switch_vals(I%)
20510      switch_buf%?(ptr%+1)=switch_vals(I%) DIV 256
20520      ptr%+=2
20530    NEXT
20540  ELSE
20550    PROCfill(switch_buf%,maxsw%*2+1,0)
20560  ENDIF
20570  PROCmove(mstart,swloc+2*ns%+1,FNtext_end-mstart)
20580  PROCmove(switch_buf%,swloc,2*ns%+1)
20590  PROCincmsglen(2*ns%-2*oldsw)
20600ENDIF
20610ENDPROC
20620
20630DEF PROCincmsglen(bytes_to_add)
20640text%!2=text%!2+bytes_to_add
20650ENDPROC
20660
20670DEF FNtext_end
20680=text%+text%!2
20690
20700DEF FNmaxmsg
20710=?text%+256*text%?1
20720
20730DEF PROCincmaxmsg
20740?text%+=1:IF ?text%=0 ?(text%+1)+=1
20750ENDPROC
20760
20770DEF PROCshow_msg(ms%)
20780IF ms%>FNmaxmsg THEN ERROR 4,error$(31)
20790IF ms%<1 ENDPROC
20800PROCfill(text_block%,text_blocksize%,dummy_spc)
20810text_rowlen%()=+0:switch_vals()=+0
20820changed_msg=TRUE
20830A%=ms%:C%=text%+7:ptr%=USR findmsg
20840chr%=?ptr%:ptr%+=1
20850switch_vals(0)=chr%:oldsw=chr%:swloc=ptr%-1
20860IF chr%>0 THEN
20870  FOR I%=1 TO chr%
20880    switch_vals(I%)=?ptr%+256*ptr%?1
20890    ptr%+=2
20900  NEXT
20910ENDIF
20920mstart=ptr%
20930chr%=?ptr%
20940row%=0:text_ptr%=text_block%
20950WHILE chr%>0
20960  col%=1:line$=""
20970  WHILE chr%<>13 AND chr%<>0 AND col%<=text_maxllen%
20980  IF chr%>&7F THEN
20990  tokptr=chr%-&7F
21000  line$+=tok$(tokptr):L%=LEN tok$(tokptr)
21010  FOR I%=1 TO L%
21020  ?(text_ptr%+I%-1)=ASC(MID$(tok$(tokptr),I%,1))
21030  NEXT
21040  text_ptr%+=(L%-1)
21050  ELSE
21060    ?text_ptr%=chr%:line$+=CHR$ chr%
21070  ENDIF
21080    ptr%+=1:text_ptr%+=1:chr%=?ptr%:col%+=1
21090  ENDWHILE
21100  text_rowlen%(row%)=LEN line$
21110  IF col%>text_maxllen% OR chr%=13 row%+=1:col%=1
21120  IF chr%=13 ?text_ptr%=13:text_ptr%+=1:ptr%+=1
21130  chr%=?ptr%:REM ptr%+=1
21140ENDWHILE
21150mend=ptr%:?text_ptr%=chr%
21160text_end%=text_ptr%
21170oldlen=mend-mstart
21180IF oldlen<0 oldlen=0
21190text_ptr%=text_block%
21200last_row%=FNfind_lastrow
21210FOR I%=0 TO last_row%:text_rowlen%(I%)=LEN FNrow(I%):NEXT
21220ENDPROC
21230
21240DEF PROCnext_msg
21250mptr+=1
21260PROCstore_msg:REM save this one first
21270IF mptr>FNmaxmsg THEN ptr=FNtext_end:ptr?0=0:ptr?1=0:PROCincmaxmsg:PROCincmsglen(2)
21280PROCshow_msg(mptr):REM Now load the next one into `texted`
21290ENDPROC
21300
21310DEF PROCprev_msg
21320IF mptr>1 THEN
21330mptr-=1
21340PROCstore_msg
21350PROCshow_msg(mptr)
21360ENDIF
21370ENDPROC
21380
21390DEF PROCgoto_msg(ms%)
21400IF ms%>FNmaxmsg ms%=FNmaxmsg:VDU 7
21410IF ms%<1 ms%=1:VDU 7
21420PROCstore_msg
21430PROCshow_msg(ms%)
21440mptr=ms%
21450ENDPROC
21460
21470DEF PROClast_msg
21480PROCstore_msg
21490mptr=FNmaxmsg
21500PROCshow_msg(mptr)
21510ENDPROC
21520
21530DEF PROCfirst_msg
21540PROCstore_msg
21550mptr=1
21560PROCshow_msg(mptr)
21570ENDPROC
21580
21590
21600REM ------ Program Editor utilities ------
21610
21620DEF PROCstore_prog
21630LOCAL sp_ptr%,line$,chr%
21640REM Use `hourglass` pointer
21650SYS "Hourglass_On"
21660errflag=FALSE:PROCremove_markers
21670sp_ptr%=text_block%
21680chr%=?sp_ptr%
21690prgptr=prgbuf%
21700WHILE sp_ptr%<text_end% AND NOT errflag
21710  line$=""
21720  WHILE (chr%<>13) AND (chr%<>0) AND (chr%<>dummy_spc)
21730    chr%=?sp_ptr%
21740    sp_ptr%+=1
21750    line$+=CHR$(chr%)
21760  ENDWHILE
21770  PROCscan
21780  chr%=?sp_ptr%
21790  WHILE (chr%=13 OR chr%=dummy_spc OR chr%=0) AND (sp_ptr%<text_end%)
21800    sp_ptr%+=1:chr%=?sp_ptr%
21810  ENDWHILE
21820ENDWHILE
21830IF NOT errflag THEN
21840  oldlen%=prgend-pstart:IF oldlen%<>0 oldlen%+=1
21850  bytes_to_move=FNprglen-oldlen%
21860  PROCincprglen(-oldlen%)
21870  newlen%=prgptr-prgbuf%
21880  REM This check for 'No room' was added 2.6.89
21890  IF FNprglen+newlen%>code_size%-4 THEN
21900    PROCincprglen(oldlen%)
21910    PROCerror(13,error$(35))
21920  ELSE
21930    PROCmove(prgend+1,pstart+newlen%,bytes_to_move)
21940    PROCmove(prgbuf%,pstart,newlen%)
21950    PROCincprglen(newlen%)
21960    ?(program%+4+FNprglen)=0:REM restore end of program marker (9/4/89)
21970    text_ok=TRUE
21980  ENDIF
21990ENDIF
22000SYS "Hourglass_Off"
22010ENDPROC
22020
22030DEF FNprglen
22040=!program%
22050
22060DEF PROCincprglen(bytes)
22070!program%=!program%+bytes
22080ENDPROC
22090
22100
22110REM ------ Window `redraw` functions ------
22120
22130
22140DEF FNredraw_text(flag%)
22150REM flag%=TRUE -> redraw WHOLE text window
22160REM else only redraw from the cursor line
22170
22180WHILE more%
22190BR%=(by%-block!32-ypixel%) DIV lsY%
22200IF BR%>last_row% BR%=last_row%
22210TR%=(by%-block!40-ypixel%) DIV lsY%
22220IF TR%>last_row% TR%=last_row%
22230ptr_end%=BR%*text_maxllen%+text_block%
22240CLG
22250FOR I%=TR% TO BR%
22260  MOVE bx%,by%-lsY%*I%-ypixel%
22270  PRINT FNrow(I%);
22280NEXT
22290SYSGetR,0,block TO more%
22300ENDWHILE
22310=0
22320
22330
22340REM ------ General icon handling routines ------
22350
22360DEF PROCht(handle%,icon%,fl$,fc%,bc%)
22370LOCALmask%
22380IFfl$="*"THENfl%=0:mask%=&FF000000 ELSEfl%=EVALfl$:mask%=-1
22390!block=handle%:block!4=icon%:block!8=fl%:block?11=fc%+(bc%<<4):block!12=mask%:SYS SetI,0,block
22400ENDPROC
22410
22420DEF FNgeticondata(handle%,icon%)
22430!block=handle%:block!4=icon%
22440SYS GetI,0,block
22450flags%=block!24
22460IF (flags% AND 256)<>0 THEN data$=$(!(block+28)) ELSE data$=$(block+28)
22470=data$
22480
22490DEF PROCchangeicon(handle%,icon%,new$,RETURN icon%)
22500LOCAL J%
22510dummy$=FNgeticondata(handle%,icon%)
22520IF (flags% AND 256)<>0 THEN $(!(block+28))=new$ ELSE $(block+28)=new$
22530SYS DeleteI,0,block
22540FOR J%=4 TO 28 STEP 4
22550  block!J%=block!(J%+4)
22560NEXT J%
22570!block=handle%:SYS CreateI,0,block TO icon%
22580PROCset_icon(handle%,icon%,0,0):REM ensure it appears updated on screen
22590ENDPROC
22600
22610DEF PROCset_icon(handle%,icon%,eor%,mask%)
22620!block=handle%:block!4=icon%:block!8=eor%:block!12=mask%
22630SYS SetI,0,block
22640ENDPROC
22650
22660
22670REM ------ Menu creation procedures ------
22680
22690REM **** onIconBar = 1 if yes, otherwise 0 **********
22700DEF FNmenuHeight(theMenu%, onIconBar%)
22710= ((96 * onIconBar%) + (theMenu%?30 * 44) + (theMenu%?31 * 24))
22720
22730
22740DEF FNcrmenu
22750IF menufree%+28 > menuend% THEN ERROR 1,error$(32)
22760LOCAL m%,menu$:READ menu$
22770
22780
22790REM ************** the bodge to store the menu height ****************
22800LOCAL menuHiAddr%
22810menuHiAddr% = menufree% + 28 + 2 :REM 2nd last byte in 1st menuitem flags
22820menuItemNum% = 0
22830dashItemNum% = 0
22840
22850
22860IF LEFT$(menu$,1)="=" THEN menu$=EVALMID$(menu$,2)
22870menuptr%=menufree%
22880i%=0:ctr%=0
22890IF LEFT$(menu$,1)="#" THEN i%=1:menutitle$=FNpar(",") ELSE menutitle$=""
22900I%=INSTR(menutitle$,">")
22910IF I%>0 THEN
22920     menuptr%!20=EVAL(MID$(menutitle$,I%+1))
22930     menutitle$=LEFT$(menutitle$,I%-1)
22940ELSE menuptr%!20=44
22950ENDIF
22960$menuptr%=menutitle$
22970menuptr%?12=`tfcol:menuptr%?13=`tbcol:menuptr%?14=`wfcol:menuptr%?15=`wbcol
22980menuptr%!16=196-24:menuptr%!24=0
22990menuptr%+=28:maxx%=LENmenutitle$-3
23000WHILE RIGHT$(menu$,1)="~"
23010  menu$=LEFT$(menu$,LENmenu$-1)
23020  REPEAT item$=FNpar(","):PROCmenuitem(item$):UNTIL item$=""
23030  READ menu$
23040ENDWHILE
23050REPEAT item$=FNpar(","):PROCmenuitem(item$):UNTIL item$=""
23060menuptr%!-24=(menuptr%!-24)OR&80
23070m%=menufree%:m%!16=(maxx%*8+6)*dx%
23080menufree%=menuptr%
23090?menuHiAddr% = menuItemNum%      : REM the number of items
23100?(menuHiAddr% +1) = dashItemNum% : REM the number of dashes
23110=m%
23120
23130DEF PROCmenuitem(text$)
23140IF text$="" THEN ENDPROC
23150IF menuptr%+24 > menuend% THEN ERROR 1,error$(32)
23160IF text$="&" THEN
23170  SYS "Font_ListFonts",,q%,ctr% TO ,,ctr%
23180  IF ctr%>=0 THEN text$=$q%+">m_fsize%":i%-=2 ELSE ENDPROC
23190ENDIF
23200LOCALi%,flg%
23210
23220menuItemNum% += 1
23230
23240flg%=&00
23250i%=INSTR(text$,">")
23260IFi%>0THENsubptr%=EVALMID$(text$,i%+1):text$=LEFT$(text$,i%-1)ELSEsubptr%=-1
23270IF RIGHT$(text$,1)="#" THEN text$=LEFT$(text$,LENtext$-1):flg%+=&02:dashItemNum% += 1
23280menuptr%!0=flg%
23290menuptr%!4=subptr%
23300menuptr%!8=&07000021
23310IF LEFT$(text$,1)="?" THEN
23320  menuptr%!8=&0700011A
23330  I%=FNworkspace(LENtext$):$I%=MID$(text$,2)
23340  menuptr%!12=I%:menuptr%!16=systemsprites%:menuptr%!20=LENtext$
23350ELSE
23360  IF LEFT$(text$,1)="$" THEN
23370    !menuptr%+=&04
23380    menuptr%!8+=&100
23390    i%=INSTR(text$,"(")
23400    IFi%>0THENL%=VALMID$(text$,i%+1):text$=LEFT$(text$,i%-1)ELSEL%=12
23410    menuptr%!12=EVAL(MID$(text$,2)):menuptr%!16=-1:menuptr%!20=L%
23420    text$=STRING$(L%," ")
23430  ELSE
23440    IFLENtext$<=12THEN
23450         $(menuptr%+12)=text$
23460    ELSE I%=FNworkspace(LENtext$+1):$I%=text$
23470         menuptr%!12=I%:menuptr%!16=-1:menuptr%!20=LENtext$+1
23480         menuptr%!8=menuptr%!8 OR &100
23490    ENDIF
23500  ENDIF
23510  IFLENtext$>maxx%THENmaxx%=LENtext$
23520ENDIF
23530menuptr%+=24
23540ENDPROC
23550 
23560DEF FNpar(sep$)
23570i1%=i%+1:i%=INSTR(menu$+sep$,sep$,i1%)
23580=MID$(menu$,i1%,i%-i1%)
23590
23600DEF FNworkspace(L%)
23610IF curbuff%+L%>buffer%+maxbuf% THEN ERROR 1,error$(33)
23620curbuff%+=L%:=curbuff%-L%
23630
23640
23650REM ------ Procedures to interface with ARM code ------
23660
23670DEF PROCmove(from,to,bytes_to_move)
23680IF bytes_to_move=0 THEN ENDPROC
23690A%=from:B%=to:C%=bytes_to_move
23700CALL move
23710ENDPROC
23720
23730DEF PROCfill(start,bytes,filler)
23740A%=start:B%=bytes:C%=filler
23750CALLfill
23760ENDPROC
23770
23780
23790REM ------ ARM source code ------
23800
23810DEF PROCassemble(addr%)
23820LOCAL pass
23830sp=13:link=14
23840FOR pass=0 TO 2 STEP 2
23850P%=addr%
23860[OPT pass
23870.fill     b fill2
23880.move     b blockmove
23890
23900.fill2
23910\ r0=start address r1=number of bytes r2=value to fill with
23920\ all registers are preserved
23930stmfd (sp)!,{r0-r3,link}
23940mov r3,r0
23950add r3,r3,r1
23960.fillloop
23970strb r2,[r0],#1
23980cmp r0,r3
23990blt fillloop
24000ldmfd (sp)!,{r0-r3,PC}
24010
24020\ General purpose block move routine (up or down and overlapping)
24030\ r0 = `from` address, r1 = `to` address, r2 = number of bytes to move
24040.blockmove
24050cmp r0,r1
24060blt moveup
24070bal movedown
24080
24090.movedown
24100\ Move memory block down
24110\ r0 = `from` address, r1= `to` address, r2 = number of bytes to move
24120stmfd (sp)!,{r0-r3,link}
24130
24140.movdloop
24150ldrb r3,[r0],#1
24160strb r3,[r1],#1
24170subs r2,r2,#1
24180bne movdloop
24190
24200ldmfd (sp)!,{r0-r3,PC}
24210
24220.moveup
24230\ Move memory block up
24240\ r0 = `from` address, r1= `to` address, r2 = number of bytes to move
24250
24260stmfd (sp)!,{r0-r3,link}
24270sub r2,r2,#1
24280add r0,r0,r2
24290add r1,r1,r2
24300\ Call here if r2 = end address
24310.moveuploop
24320ldrb r3,[r0],#-1
24330strb r3,[r1],#-1
24340subs r2,r2,#1
24350bpl moveuploop
24360ldmfd (sp)!,{r0-r3,PC}
24370
24380.lastrow
24390\ Find last row of text
24400\ Entry - r0 = start address of text (text_block%)
24410\         r1 = end address of text (text_end%)
24420\ Exit  - number of last row is in 'rowcount' (rows numbered 0,1,2...)
24430stmfd (sp)!,{r0-r4,link}
24440mov r2,#0
24450mov r3,#0
24460mov r4,#0
24470
24480.while
24490cmp r0,r1
24500beq endwhile
24510ldrb r3,[r0],#1
24520add r4,r4,#1
24530cmp r4,#text_maxllen%
24540addeq r2,r2,#1
24550moveq r4,#0
24560beq while
24570cmp r3,#13
24580addeq r2,r2,#1
24590moveq r4,#0
24600cmp r3,#dummy_cr
24610addeq r2,r2,#1
24620moveq r4,#0
24630bal while
24640
24650.endwhile
24660str r2,rowcount
24670ldmfd (sp)!,{r0-r4,PC}
24680
24690.rowcount EQUD 0
24700
24710.row
24720\ Returns the string of text in the specified row of the text block
24730\ Entry - r0 = start address of text (text_block%)
24740\         r1 = row wanted (0,1,2...)
24750\ Exit  - the string is returned in 'linebuffer', terminated by <cr>
24760\ r2 is the current row
24770\ r3 is the current character
24780\ r4 is the length of the current row
24790
24800stmfd (sp)!,{r0-r4,link}
24810mov r2,#0
24820mov r4,#0
24830
24840.while2
24850cmp r2,r1
24860beq endwhile2
24870ldrb r3,[r0],#1
24880add r4,r4,#1
24890cmp r4,#text_maxllen%
24900moveq r4,#0
24910addeq r2,r2,#1
24920beq while2
24930cmp r3,#13
24940moveq r4,#0
24950addeq r2,r2,#1
24960cmp r3,#dummy_cr
24970moveq r4,#0
24980addeq r2,r2,#1
24990bal while2
25000
25010.endwhile2
25020adr r1,linebuffer
25030mov r4,#0
25040
25050.strloop
25060ldrb r3,[r0],#1
25070add r4,r4,#1
25080cmp r3,#0
25090beq lineend
25100cmp r3,#dummy_spc
25110beq lineend
25120cmp r3,#13
25130beq lineend
25140cmp r3,#dummy_cr
25150streqb r3,[r1],#1
25160beq lineend
25170strb r3,[r1],#1
25180cmp r4,#text_maxllen%
25190bne strloop
25200
25210.lineend
25220cmp r3,#0
25230moveq r3,#13
25240cmp r3,#dummy_spc
25250moveq r3,#13
25260cmp r3,#dummy_cr
25270moveq r3,#13
25280cmp r4,#text_maxllen%
25290moveq r3,#13
25300strb r3,[r1],#1
25310ldmfd (sp)!,{r0-r4,PC}
25320
25330.linebuffer EQUS STRING$(text_maxllen%+1,CHR$ dummy_spc)
25340 align
25350
25360.findmsg
25370\Finds start of specified message
25380\Entry - r0 = message number
25390\      - r2 = text start address (MSG#0)
25400\Exit  - r0 = start address of message (switches)
25410stmfd (sp)!,{r1-r3,link}
25420cmp r0,#0
25430beq startm
25440
25450.nxtmsg
25460ldrb r1,[r2],#1
25470add r2,r2,r1, lsl #1 \ r2 = r2 + r1*2
25480
25490.readch
25500ldrb r1,[r2],#1
25510cmp r1,#0
25520bne readch
25530subs r0,r0,#1
25540bne nxtmsg
25550
25560.startm
25570mov r0,r2
25580ldmfd (sp)!,{r1-r3,pc}
25590
25600.pvok
25610;Print Verb, Object or Keyword (returns the word string)
25620;Entry - r0 = Number of word to print
25630;        r1 = address of required word table
25640;Exit  - word is in 'atext' terminated by <cr>
25650stmfd (sp)!,{r0-r5,link}
25660mov r3,r0      \Word number is now in r3
25670mov r4,r2      \r4 is 'all' flag
25680mov r5,#0      \r5 is 'ctr'
25690
25700.LLL1
25710adr r2,atext   \r2 points to 'atext'
25720
25730.LLL2
25740ldrb r0,[r1]   \Get character from list
25750\orr r0,r0,#32  \Convert to lower case
25760strb r0,[r2]   \Put it in 'text'
25770tst r0,#&80    \Is bit 7 set (end of the word)
25780bne endofw     \Yes
25790add r2,r2,#1
25800add r1,r1,#1
25810b LLL2
25820
25830.endofw
25840cmp r0,#&FF
25850adreq r2,pvokflag
25860streqb r0,[r2]
25870beq endtbl
25880and r0,r0,#%01111111 ;Clear bit 7
25890strb r0,[r2],#1
25900mov r0,#13
25910strb r0,[r2]
25920add r1,r1,#1
25930ldrb r0,[r1] ;Get the verb/object number from table
25940add r1,r1,#1 ;Skip the number
25950cmp r0,r3    ;Is it the one we want?
25960bne LLL1     ;No - try the next one
25970
25980.endtbl
25990adr r2,address
26000str r1,[r2]
26010ldmfd (sp)!,{r0-r5,pc}
26020
26030.atext EQUS STRING$(80,"*")
26040align
26050.address equd 0
26060.pvokflag equb 0
26070align
26080]
26090NEXT pass
26100ENDPROC
26110
26120
26130REM ------ Some general utility routines ------
26140
26150DEF PROCErrorMsgRead
26160in%=OPENIN("<Alps$Resources>.Errormsgs")
26170INPUT#in%,errors
26180DIM error$(errors)
26190FOR error=0 TO errors-1
26200  INPUT#in%,error$(error)
26210NEXT error
26220CLOSE#in%
26230ENDPROC
26240
26250DEF PROCKeyWordRead
26260REM Reads file of keywords/info bytes
26270REM Keywords are in alphabetical order
26280LOCAL CHN%,I%,J%
26290first_token=&60
26300maxmsg=65535:maxobn=255:maxvbn=255:maxconst=65535
26310chn%=OPENIN "<Alps$Resources>.keywrdlist"
26320INPUT#chn%,keywords
26330DIM keyword$(keywords),info%(keywords,5)
26340
26350REM Set up keyword tables
26360REM keyword$ | token | type/No. params | Max values param 1,2,3 |
26370REM type/No. params gives number of parameters and bit 7 is set if its
26380REM a function, bit 6 set for object keywords, bit 5 for verb keywords
26390
26400FOR I%=1 TO keywords
26410INPUT#chn%,keyword$(I%)
26420FOR J%=0 TO 5
26430INPUT#chn%,info%(I%,J%)
26440NEXT J%
26450NEXT I%
26460CLOSE#chn%
26470
26480FOR I%=1 TO keywords
26490params=info%(info%(I%,2),1) AND %00011111
26500bytes=0
26510IF params>0 THEN
26520FOR K%=3 TO 5
26530maxval=info%(info%(I%,2),K%)
26540IF maxval<256 AND maxval>0 THEN bytes+=1
26550IF maxval>255 AND maxval<65536 THEN bytes+=2
26560IF maxval>65535 THEN bytes+=3
26570NEXT K%
26580ENDIF
26590parambyte=info%(info%(I%,2),1) AND %10000000
26600pbytes?(I%-1)=bytes OR parambyte
26610NEXT
26620ENDPROC
26630
26640
26650REM ------ Printing procedures ------
26660
26670DEF PROCprint_prog_seg
26680LOCAL R%
26690LOCAL ERROR
26700ON ERROR LOCAL:OSCLI("FX3,0"):SYS "Hourglass_Off":ENDPROC
26710*FX3,10
26720FOR R%=0 TO last_row%
26730  PRINT FNrow(R%)
26740NEXT R%
26750*FX3,0
26760ENDPROC
26770
26780DEF PROCprint_program
26790LOCAL ERROR
26800ON ERROR LOCAL:OSCLI("FX3,0"):SYS "Hourglass_Off":ENDPROC
26810PROClist(1,"")
26820ENDPROC
26830
26840DEF PROCprint_text
26850LOCAL st%,end%,M%
26860LOCAL ERROR
26870ON ERROR LOCAL:OSCLI("FX3,0"):SYS "Hourglass_Off":ENDPROC
26880PROCclose(texthandle)
26890*FX3,10
26900st%=VAL $st_msg%
26910end%=VAL $end_msg%
26920IF end%>FNmaxmsg end%=FNmaxmsg
26930FOR M%=st% TO end%
26940  PROCshow_msg(M%)
26950  PROCprint_msg(M%)
26960NEXT M%
26970*FX3,0
26980ENDPROC
26990
27000DEF PROCprint_msg(M%)
27010LOCAL S%,R%
27020PRINT"Message: ";M%;" Switches: ";
27030IF switch_vals(0)=0 THEN
27040  PRINT"None";
27050ELSE
27060  FOR S%=1 TO switch_vals(0)
27070    PRINT"<";switch_vals(S%);">";
27080  NEXT
27090ENDIF
27100PRINT
27110FOR R%=0 TO last_row%
27120  PRINT FNrow(R%)
27130NEXT R%
27140PRINT STRING$(text_maxllen%,"-")
27150ENDPROC
27160
27170DEF PROCprint_objs
27180LOCAL O%,F%,I%,ptr%
27190*FX3,10
27200VDU condensed
27210PRINTpline$
27220PROCprint_flags(o_flags%)
27230PRINTpline$
27240PRINT"Obj Noun       Flags 7 6 5 4 3 2 1 0 State Start Describe Short Examine Weight Size Cont. 'Store' Trans. Open"
27250PRINTpline$
27260FOR O%=1 TO last_object
27270PRINT;O%;
27280store=small_area%:col%=1:row%=0
27290PROCfill(small_area%,small_areasize%,13)
27300print=FALSE
27310PROCpvok(FNfindnoun(O%,void),1,FALSE):PRINTTAB(4)$small_area%;TAB(21);
27320ptr%=odata%+O%*o_len
27330FOR F%=7 TO 0 STEP-1
27340IF ?ptr% AND (2^F%) THEN PRINT"* "; ELSE PRINT". ";
27350NEXT
27360PRINTTAB(39);ptr%?1;TAB(43);ptr%?2+256*ptr%?3;TAB(50)ptr%?4+256*ptr%?5;TAB(58);ptr%?6+256*ptr%?7;TAB(65);ptr%?8+256*ptr%?9;TAB(73);ptr%?10;TAB(80);ptr%?11;
27370IF (ptr%?12 AND &80)<>0 THEN PRINTTAB(85)"<C>";TAB(92);ptr%?13;
27380IF (ptr%?12 AND &80)<>0 THEN
27390store_room=ptr%?13
27400rmflags=?(rdata%+store_room*r_len)
27410tr_flag=(rmflags AND %100000)>0
27420op_flag=(rmflags AND %10000)>0
27430IF tr_flag PRINTTAB(100);"Y"; ELSE PRINTTAB(100);"N";
27440IF op_flag PRINTTAB(106);"Y" ELSE PRINTTAB(106);"N"
27450ELSE
27460PRINT
27470ENDIF
27480NEXT
27490PRINTpline$
27500VDU 27,reset
27510*FX3,0
27520ENDPROC
27530
27540DEF PROCprint_rooms
27550LOCAL R%,F%,I%,ptr%
27560*FX3,10
27570VDU condensed
27580PRINTpline$
27590PROCprint_flags(r_flags%)
27600PRINTpline$:PRINTTAB(70);" * DESTINATIONS *"
27610PRINT"Room Flags 76543210 State Desc. Short Pict. N    S    E    W    NE   NW   SE   SW   Up   Down In   Out  Back Left Righ Jump"
27620PRINTpline$
27630FOR R%=1 TO last_room
27640PRINT;R%;TAB(11);
27650ptr%=rdata%+R%*r_len
27660FOR F%=7 TO 0 STEP-1
27670IF ?ptr% AND (2^F%) THEN PRINT"*"; ELSE PRINT".";
27680NEXT
27690PRINTTAB(20);ptr%?1;TAB(26);ptr%?2+256*ptr%?3;TAB(32);ptr%?4+256*ptr%?5;TAB(38);ptr%?70+256*ptr%?71;
27700FOR I%=6 TO 36 STEP 2
27710PRINTTAB(5*(I% DIV 2-3)+44);ptr%?I%+256*ptr%?(I%+1);
27720NEXT I%
27730PRINT
27740NEXT R%
27750
27760PRINTpline$:PRINTTAB(30);" * EXIT ROUTINES *"
27770PRINT"Room  N    S    E    W    NE   NW   SE   SW   Up   Down In   Out  Back Left Righ Jump"
27780PRINTpline$
27790FOR R%=1 TO last_room
27800PRINT;R%;
27810ptr%=rdata%+R%*r_len
27820FOR I%=38 TO 53
27830PRINTTAB(5*(I%-38)+6);ptr%?I%;
27840NEXT I%
27850PRINT
27860NEXT R%
27870PRINTpline$
27880PRINTTAB(59)"* EXIT FLAGS *"
27890PRINTpline$
27900PRINT"Exit Flag: ";
27910FOR flag=7 TO 0 STEP-1
27920PRINTTAB(11+(7-flag)*15);"|"TAB(20+(7-flag)*15);flag;
27930NEXT
27940PRINTTAB(11+8*15);"|"
27950PRINT"Descript'n";
27960FOR flag=7 TO 0 STEP-1
27970PRINTTAB(10+(7-flag)*15);" | ";exit_flag$(flag);
27980NEXT
27990PRINTTAB(10+8*15);" |"
28000PRINTpline$
28010PRINTTAB(4);" North   South    East    West   No'east No'west So'east So'west   Up     Down     In     Out     Back    Left    Right   Jump  "
28020FOR R%=1 TO last_room
28030IF R%=1 OR R% MOD 10=0 THEN PRINTTAB(4)STRING$(16,"|-------")
28040PRINT;R%;
28050ptr%=rdata%+R%*r_len
28060PRINTTAB(4);
28070FOR I%=54 TO 69
28080FOR F%=7 TO 0 STEP-1
28090IF ?(ptr%+I%) AND (2^F%) THEN PRINT"*"; ELSE PRINT".";
28100NEXT F%
28110NEXT I%
28120PRINT
28130NEXT R%
28140PRINTpline$
28150VDU 27,reset
28160*FX3,0
28170ENDPROC
28180
28190DEF PROCprint_flags(mem%)
28200PRINT"Flag:      ";
28210FOR flag=7 TO 0 STEP-1
28220PRINTTAB(11+(7-flag)*15);"|"TAB(20+(7-flag)*15);flag;
28230NEXT
28240PRINTTAB(11+8*15);"|"
28250PRINT"Descript'n";
28260FOR flag=7 TO 0 STEP-1
28270PRINTTAB(10+(7-flag)*(maxd%-1+3));" | ";$mem%;
28280mem%+=maxd%
28290NEXT
28300PRINTTAB(10+8*(maxd%-1+3));" |"
28310ENDPROC
28320
28330DEF PROCprint_vocab
28340print=TRUE
28350PROCput(pline2$+CHR$13)
28360PROCput(STRING$(37," ")+"Nouns:"+CHR$13):PROClistnouns
28370PROCput(pline2$+CHR$13)
28380PROCput(STRING$(37," ")+"Verbs:"+CHR$13):PROClistverbs
28390PROCput(pline2$+CHR$13)
28400PROCput(STRING$(34," ")+"Adjectives:"+CHR$13):PROClistadjs
28410PROCput(pline2$+CHR$13)
28420PROCput(STRING$(33," ")+"Conjunctions:"+CHR$13):PROClistconjs
28430PROCput(pline2$+CHR$13)
28440PROCput(STRING$(33," ")+"Prepositions:"+CHR$13):PROClistpreps
28450PROCput(pline2$+CHR$13)
28460PROCput(STRING$(35," ")+"Specials:"+CHR$13):PROClistspecs
28470PROCput(pline2$+CHR$13)
28480PROCput(STRING$(37," ")+"Noise:"+CHR$13):PROClistnoise
28490PROCput(pline2$+CHR$13)
28500print=FALSE
28510ENDPROC
28520
28530DEF PROCprint_pix
28540LOCAL mptr
28550print=TRUE:SYS "Hourglass_On"
28560
28570IF pxn>1 THEN
28580mptr=pixs+3
28590FOR I%=1 TO pxn-1
28600  PROCput(STR$(I%)+"= ")
28610  PROCput($mptr)
28620  mptr+=LEN$mptr+1
28630  PROCput(",<"+pos$(?mptr)+">"+CHR$13)
28640  mptr+=5
28650NEXT
28660ENDIF
28670
28680print=FALSE:SYS "Hourglass_Off"
28690ENDPROC
28700
28710DEF PROCscan
28720oldptr=prgptr:numflag=0
28730ptr=1:len=LEN line$:IF len=0 THEN GOTO 29140
28740REPEAT
28750temp$=""
28760WHILE MID$(line$,ptr,1)<"A" AND ptr<len
28770ptr+=1
28780ENDWHILE
28790vptr=ptr
28800WHILE MID$(line$,ptr,1)>"@" AND ptr<len
28810temp$=temp$+MID$(line$,ptr,1):ptr+=1
28820ENDWHILE
28830IF temp$<>"" THEN
28840PROClookup(temp$,token,info_ptr)
28850IF token=0 PROCerror(0,": "+MID$(line$,vptr,30)):prgptr=oldptr:GOTO 29120
28860IF token=def_token THEN PROCdodefn:GOTO29120
28870?prgptr=token:tokptr=prgptr:prgptr+=1
28880p_info=info%(info%(token-first_token+1,2),1):params=p_info AND %1111
28890ptr+=1
28900IF params <>0 THEN
28910FOR I%=1 TO params
28920 WHILE INSTR(", ",MID$(line$,ptr,1))<>0 AND ptr<len
28930  ptr+=1
28940 ENDWHILE
28950  IF token>=var_token AND I%=1 THEN PROCget_var(ptr,ptr,paramvalue,vptr)
28960  IF token>=var_token AND I%>1 THEN PROCget_num_or_var(ptr,ptr,paramvalue,varflag):IF varflag THEN ?tokptr=?tokptr+&10
28970  IF token<var_token THEN
28980  IF MID$(line$,ptr,1)=CHR$34 PROCdecode_string(line$,ptr,ptr,paramvalue,FNfntype(p_info)) ELSE PROCdecode_parameter(line$,ptr,ptr,paramvalue,vptr)
28990  ENDIF
29000  IF errflag THEN 29120
29010  IF paramvalue>info%(info_ptr,I%+2) PROCerror(2,STR$(info%(info_ptr,I%+2))+" ("+temp$+")"):GOTO29120
29020  IF info%(info_ptr,I%+2)<256 THEN bytes=1
29030  IF info%(info_ptr,I%+2)>255 AND info%(info_ptr,I%+2)<65536 THEN bytes=2
29040  IF info%(info_ptr,I%+2)>65535 THEN bytes=3
29050  FOR J%=0 TO bytes-1
29060    J%?prgptr=paramvalue DIV 256^J%
29070  NEXT J%
29080  prgptr+=bytes
29090NEXT I%
29100ENDIF
29110ENDIF
29120UNTIL ptr>=(len-1) OR token=0 OR errflag
29130IF token=0 OR errflag THEN PROCrestore_end:GOTO29150
29140?prgptr=13:prgptr+=1
29150ENDPROC
29160
29170DEF PROCrestore_end
29180prgptr=oldptr:?prgptr=0
29190ENDPROC
29200
29210DEF PROCerror(err_num,err$)
29220errflag=TRUE
29230null =FNerrorbox(error$(err_num)+" "+err$,err_num,1,-99)
29240ENDPROC
29250
29260DEF PROCfind_token(A$(),search$,RETURN token,RETURN mid)
29270LOCAL first,last,stop_search,found,len
29280len=LEN search$
29290first=1
29300last=DIM(A$(),1)
29310stop_search=FALSE:found=FALSE
29320REPEAT
29330PROCchop
29340UNTIL stop_search
29350IF found THEN token=info%(mid,0) ELSE token=0
29360ENDPROC
29370
29380DEF PROCchop
29390mid=(first+last) DIV 2
29400A$=A$(mid)
29410IF A$=search$ THEN stop_search=TRUE:found=TRUE:ENDPROC
29420IF A$>search$ THEN
29430last=mid-1
29440ELSE
29450first=mid+1
29460ENDIF
29470IF first>last THEN stop_search=TRUE
29480ENDPROC
29490
29500DEF PROClookup(search$,RETURN token,RETURN index)
29510LOCAL I%,found
29520token=0
29530IF search$="" THEN ENDPROC
29540PROCfind_token(keyword$(),search$,token,index)
29550ENDPROC
29560
29570I%=1
29580REPEAT
29590IF INSTR(LEFT$(keyword$(I%),LEN(search$)),search$)<>0 THEN token=info%(I%,0):found=TRUE:index=I%
29600I%+=1
29610UNTIL found OR I%=keywords+1
29620ENDPROC
29630
29640DEF PROCdecode_parameter(line$,place,RETURN place,RETURN value,vptr)
29650LOCAL temp1$
29660WHILE INSTR(" (,",MID$(line$,place,1))<>0 place+=1
29670ENDWHILE
29680WHILE INSTR("0123456789",MID$(line$,place,1))<>0 AND place<=LEN(line$) temp1$=temp1$+MID$(line$,place,1):place+=1
29690ENDWHILE
29700IF INSTR(") ,"+CHR$13,MID$(line$,place,1))=0 THEN
29710PROCerror(1,": "+MID$(line$,vptr,30)):errflag=TRUE
29720ELSE
29730value=VAL(temp1$)
29740ENDIF
29750ENDPROC
29760
29770DEF PROCdecode_string(line$,place,RETURN place,RETURN value,type)
29780LOCAL temp1$,dummy$,vptr
29790vptr=place-1
29800place+=1
29810temp1$=""
29820WHILE (INSTR(CHR$34,MID$(line$,place,1))=0 AND place<LENline$)
29830temp1$+=MID$(line$,place,1)
29840place+=1
29850ENDWHILE
29860IF INSTR(CHR$34,MID$(line$,place,1))<>0 THEN place+=1:REM added 31.5.89
29870IF temp1$="" THEN
29880value=0
29890ELSE
29900CASE type OF
29910WHEN 1
29920PROCgetobn(temp1$,value,dummy$):REM Find the noun number
29930IF value=0 THEN
29940temp1$=": "+temp1$
29950ERROR 1,"Badly formed/Non-existent noun: "+MID$(line$,vptr-LENtemp$,20)
29960ELSE
29970PROCwhich_obj(value,val$,refs):REM Find which object/s it references
29980IF refs=1 THEN value=VAL(val$) ELSE PROCerror(27,temp1$+error$(37))
29990ENDIF
30000WHEN 2:PROCgetvbn(temp1$,value,dummy$)
30010WHEN 3:PROCgetprn(temp1$,value,dummy$)
30020ENDCASE
30030ENDIF
30040ENDPROC
30050
30060DEF PROCget_var(place,RETURN place,RETURN value,vptr)
30070WHILE INSTR(" (,",MID$(line$,place,1))<>0 place+=1
30080ENDWHILE
30090chr$=MID$(line$,place,1)
30100IF chr$<"A" OR chr$>"|" THEN PROCerror(3,": "+MID$(line$,vptr,30)):ENDPROC
30110value=ASC chr$ - ASC"A"
30120place+=1:IF MID$(line$,place,1)<>"%" THEN PROCerror(3,": "+MID$(line$,vptr,30)) ELSE place+=1
30130ENDPROC
30140
30150DEF PROCget_num_or_var(place,RETURN place,RETURN value,RETURN flag)
30160WHILE INSTR(" (,",MID$(line$,place,1))<>0 place+=1
30170ENDWHILE
30180chr$=MID$(line$,place,1)
30190IF INSTR("0123456789",chr$) THEN flag=FALSE:PROCdecode_parameter(line$,place,place,value,vptr):ENDPROC
30200PROCget_var(place,place,value,vptr):flag=TRUE
30210ENDPROC
30220
30230DEF PROCrun
30240LOCAL ERROR
30250SYS "OS_Byte",229,0,0 TO ,oldstate%
30260err_col=11:PROCcol(130):PROCcol(7):SYS "Wimp_SetColour",128+2
30270ON ERROR LOCAL:PROCcol(err_col):IF ERR<>17 PRINT'"Interpreter reports a run-time error: "REPORT$:GOTO 30610 ELSE PRINT'REPORT$:GOTO 30610
30280PROCclose(texthandle):PROCclose(objhandle):PROCclose(roomhandle)
30290!work%=rdata%
30300work%!4=verbs+3
30310work%!8=nouns+3
30320work%!12=program%+4
30330work%!16=text%+7
30340work%!20=dict%+3
30350work%!24=odata%
30360work%!28=adjects+3
30370work%!32=preps+3
30380work%!36=conjs+3
30390work%!40=specs+3
30400work%!44=noise+3
30410work%!48=pixs+3
30420REM  work%!52 is reserved
30430work%!56=initsave
30440work%!60=last_room
30450work%!64=last_object+1
30460VDU26,4,12
30470PROCcentre("PLEASE WAIT",0):OFF
30480IF datavalid THEN PROCcopy_from_editor ELSE PROCcopy_to_editor
30490!picbuf=pbsize
30500OSCLI("LOAD <Users$Resources>.Buttons "+STR$~(picbuf+4))
30510REM Read the scale factors and pixel translation table
30520SYS "Wimp_ReadPixTrans",&200,picbuf,picbuf+16,0,0,0,scale,pixtr
30530REM Now PutSpriteScaled
30540SYS "OS_SpriteOp",&234,picbuf,picbuf+16,0,0,8,scale,pixtr
30550VDU 28,0,textrows%-5,textcols%,0,24,0;148;scrw;scrh;
30560PROCcentre(STRING$(11," "),0):PRINT:ON
30570A%=verb_type:B%=nref:C%=aref:D%=ramsave
30580E%=pbytes:F%=work%:G%=picbuf:H%=pbsize
30590cliplen=0
30600CALL run
30610VDU 26:PROCcentre("PLEASE WAIT",26):OFF:PROCswap_data:datavalid=TRUE:PROCcentre(STRING$(11," "),26):PROCreturn(18,0):ON
30620PROCchangeicon(ALPSmain,swapicon,"swap",swapicon)
30630REM The copy/swap routines as used above ensure the data in the editor is
30640REM ALWAYS valid after running a game, even if it wasn't before running it
30650VDU 5
30660SYS ForceR,-1,0,0,scrw+1,scrh+1
30670RESTORE ERROR
30680SYS "OS_Byte",229,oldstate%,0
30690SYS "OS_Byte",124
30700ENDPROC
30710
30720DEF PROCcol(color)
30730SYS "Wimp_TextColour",color
30740ENDPROC
30750
30760DEF PROCfind_section(code%,value%,RETURN found)
30770REM Searches program for a match with code%,value%
30780REM eg DEFPROC(3) --> &86,&03
30790REM Sets `listptr` to the address of the `code%` byte, if found
30800ptr=listptr
30810LOCAL byte1,byte2
30820found=FALSE
30830E%=pbytes:F%=work%:CALL setup:G%=ptr
30840REPEAT
30850A%=code%:ptr=USR findcode
30860IF ?ptr=value% THEN found=TRUE ELSE G%=ptr+1
30870UNTIL found OR ptr=0
30880IF found THEN listptr=ptr-1 ELSE listptr=program%+4+FNprglen+1
30890ENDPROC
30900
30910DEF PROClist(prg_part%,val$)
30920LOCAL col%,row%
30930PROCfill(text_block%,text_blocksize%,dummy_spc)
30940text_rowlen%()=+0
30950SYS "Hourglass_On"
30960listptr=program%+4:line=1:last=65535:first=1
30970col%=1:row%=0
30980store=text_block%
30990existing_verb=FALSE
31000print=FALSE
31010errflag=FALSE
31020
31030CASE prg_part% OF
31040WHEN 1:found=TRUE:end1%=0:end2%=0:print=TRUE:REM Print whole program
31050WHEN 2:found=TRUE:end1%=stop_token:end2%=def_token
31060WHEN 3,4,5:end1%=end_token:end2%=0
31070ENDCASE
31080
31090CASE prg_part% OF
31100WHEN 3
31110PROCfind_section(proc_token,VAL val$,found)
31120token=proc_token
31130WHEN 4
31140existing_verb=TRUE
31150PROCgetvbn(val$,verb,dummy$)
31160PROCfind_section(def_token,verb,found)
31170token=def_token
31180WHEN 5
31190PROCfind_section(exit_token,VAL val$,found)
31200token=exit_token
31210ENDCASE
31220
31230IF NOT found THEN
31240  PROCerror(10,""+FNtoken_to_keyword(token)+"("+val$+")")
31250  listptr-=1:REM Point to end of program
31260  IF token=def_token THEN existing_verb=FALSE
31270ENDIF
31280
31290pstart=listptr:REM Start address of program section
31300byte1=?listptr:found_end=FALSE
31310WHILE byte1<>0 AND NOT found_end
31320eol%=FALSE
31330  WHILE byte1=13
31340    listptr+=1:PROCput(CHR$13):eol%=TRUE
31350    row%+=1
31360    byte1=?listptr
31370  ENDWHILE
31380  IF byte1=0 THEN PROCput(CHR$(0)):GOTO31770
31390  IF (byte1=end1% AND eol%) OR byte1=end2% THEN found_end=TRUE
31400  IF byte1>&BF THEN byte2=byte1-&10 ELSE byte2=byte1
31410  token=byte2:listptr+=1
31420  word$=FNtoken_to_keyword(token)
31430  PROCput(word$)
31440  IF byte2=def_token THEN PROCprtdef:listptr+=1:GOTO31770
31450  p_info=info%(info%(token-first_token+1,2),1):params=p_info AND %1111
31460  IF params=0 AND ?listptr<>13 PROCput(" ")
31470  IF params<>0 THEN
31480    PROCput("(")
31490    FOR I%=1 TO params
31500      maxvalue=info%(info%(token-first_token+1,2),I%+2)
31510      IF maxvalue<256 THEN bytes=1
31520      IF maxvalue>255 AND maxvalue<65536 THEN bytes=2
31530      IF maxvalue>65535 THEN bytes=3
31540      value=0
31550      FOR J%=0 TO bytes-1
31560        value=value+(J%?listptr)*256^J%
31570      NEXT J%
31580      doneit=FALSE
31590      IF I%=1 AND (listoption AND %10)<>0 AND FNfntype(p_info)=1 THEN
31600        PROCprntobj
31610      ELSE
31620        IF I%=1 AND (listoption AND %10)<>0 AND FNfntype(p_info)=2 THEN
31630          PROCprntvrb
31640        ENDIF
31650      ENDIF
31660      IF I%=1 AND (word$="PREP" OR word$="NOTPREP") AND (listoption AND %10)<>0 THEN PROCprintprep
31670      IF I%=2 AND (word$="PUTIN" OR word$="TAKEOUT") AND (listoption AND %10)<>0 THEN PROCprntobj
31680      IF NOT doneit THEN
31690        IF byte1<var_token OR (I%>1 AND byte1<&C0) PROCput(STR$(value)) ELSE PROCput(CHR$(value+ASC"A")+"%")
31700      ENDIF
31710      listptr+=bytes
31720      IF I%<>params THEN PROCput(",")
31730    NEXT I%
31740    PROCput(")")
31750    IF ?listptr<>13 PROCput(" ")
31760  ENDIF
31770    byte1=?listptr
31780ENDWHILE
31790IF found_end PROCput(CHR$13+CHR$0)
31800text_end%=store-1:text_ptr%=text_block%
31810IF text_end%<text_block% text_end%=text_block%
31820prgend=listptr:REM End address of program section
31830last_row%=FNfind_lastrow
31840
31850FOR R%=0 TO last_row%
31860text_rowlen%(R%)=LEN FNrow(R%)
31870NEXT
31880
31890SYS "Hourglass_Off"
31900ENDPROC
31910
31920DEF PROCput(text$)
31930LOCAL I%
31940IF NOT print THEN
31950IF text$<>"" THEN
31960$store=text$
31970store+=LEN text$
31980ENDIF
31990ELSE
32000*FX3,10
32010PRINTtext$;
32020*FX3,0
32030ENDIF
32040ENDPROC
32050
32060DEF PROClist_vocab(voc%)
32070SYS "Hourglass_On"
32080print=FALSE:store=text_block%
32090PROCfill(text_block%,text_blocksize%,dummy_spc)
32100col%=1:row%=0
32110
32120CASE voc% OF
32130WHEN 1: PROClistnouns
32140WHEN 2: PROClistverbs
32150WHEN 3: PROClistadjs
32160WHEN 4: PROClistpreps
32170WHEN 5: PROClistconjs
32180WHEN 6: PROClistspecs
32190WHEN 7: PROClistnoise
32200ENDCASE
32210
32220text_end%=store-1:text_ptr%=text_block%
32230IF text_end%<text_block% text_end%=text_block%
32240last_row%=FNfind_lastrow
32250FOR R%=0 TO last_row%
32260  text_rowlen%(R%)=LEN FNrow(R%)
32270NEXT
32280SYS "Hourglass_Off"
32290ENDPROC
32300
32310DEF PROClist_pix
32320LOCAL mptr
32330SYS "Hourglass_On"
32340print=FALSE:store=text_block%
32350PROCfill(text_block%,text_blocksize%,dummy_spc)
32360col%=1:row%=0
32370
32380IF pxn>1 THEN
32390mptr=pixs+3
32400FOR I%=1 TO pxn-1
32410  PROCput(STR$(I%)+"= ")
32420  PROCput($mptr)
32430  mptr+=LEN$mptr+1
32440  PROCput(",<"+pos$(?mptr)+">"+CHR$13)
32450  mptr+=5
32460NEXT
32470PROCput(CHR$0)
32480ENDIF
32490
32500text_end%=store-1:text_ptr%=text_block%
32510IF text_end%<text_block% text_end%=text_block%
32520last_row%=FNfind_lastrow
32530
32540FOR R%=0 TO last_row%
32550text_rowlen%(R%)=LEN FNrow(R%)
32560NEXT
32570
32580SYS "Hourglass_Off"
32590ENDPROC
32600
32610DEF FNtoken_to_keyword(token)
32620=keyword$(info%(token-first_token+1,2))
32630
32640DEF PROCnew
32650obn=1:vbn=1:adn=1:prn=1:cjn=1:spn=1:nsn=1:pxn=1
32660nxtobj=nouns:?nxtobj=obn:nxtobj?1=3:nxtobj?2=0:nxtobj+=3:?nxtobj=&FF
32670nxtvrb=verbs:?nxtvrb=vbn:nxtvrb?1=3:nxtvrb?2=0:nxtvrb+=3:?nxtvrb=&FF
32680nxtadj=adjects:?nxtadj=adn:nxtadj?1=3:nxtadj?2=0:nxtadj+=3:?nxtadj=&FF
32690nxtprp=preps:?nxtprp=prn:nxtprp?1=3:nxtprp?2=0:nxtprp+=3:?nxtprp=&FF
32700nxtcjn=conjs:?nxtcjn=cjn:nxtcjn?1=3:nxtcjn?2=0:nxtcjn+=3:?nxtcjn=&FF
32710nxtspn=specs:?nxtspn=spn:nxtspn?1=3:nxtspn?2=0:nxtspn+=3:?nxtspn=&FF
32720nxtnsn=noise:?nxtnsn=nsn:nxtnsn?1=3:nxtnsn?2=0:nxtnsn+=3:?nxtnsn=&FF
32730nxtpxn=pixs:?nxtpxn=pxn:nxtpxn?1=3:nxtpxn?2=0:nxtpxn+=3:?nxtpxn=&FF
32740!aref=4:aref?4=0:!nref=4:nref?4=0
32750prev_file$=""
32760ENDPROC
32770
32780DEF PROClvar
32790vars=work%+&88
32800FOR I%=1 TO 2*num_vars STEP 8
32810PRINTTAB(8)CHR$(I% DIV 2 +ASC"A");"% = ";vars?(I%-1)+vars?I%*256;
32820PRINTTAB(24)CHR$(I% DIV 2 +ASC"B");"% = ";vars?(I%+1)+vars?(I%+2)*256;
32830PRINTTAB(40)CHR$(I% DIV 2 +ASC"C");"% = ";vars?(I%+3)+vars?(I%+4)*256;
32840PRINTTAB(56)CHR$(I% DIV 2 +ASC"D");"% = ";vars?(I%+5)+vars?(I%+6)*256
32850NEXT
32860ENDPROC
32870
32880DEF PROClisto
32890LOCAL bitmask$,op$
32900CASE item1% OF
32910WHEN 0: bitmask$="%11111101":op$=" AND "
32920WHEN 1: bitmask$="%00000010":op$=" OR "
32930WHEN 2: bitmask$="%11111011":op$=" AND "
32940WHEN 3: bitmask$="%00000100":op$=" OR "
32950ENDCASE
32960listoption=EVAL(STR$listoption+op$+bitmask$)
32970ENDPROC
32980
32990DEF PROCstatus
33000PRINTTAB(1);"User code address = &";~usercode%;" (";usercode%;" decimal)"
33010PRINTTAB(1);"Program bytes: ";TAB(21);FNprglen;TAB(28);code_size%-FNprglen;" bytes free."
33020PRINTTAB(1)"Messages defined: "TAB(21);FNmaxmsg;TAB(28);(FNtext_end-text%);" characters used. ";maxtext%-(FNtext_end-text%);" characters free."
33030PRINTTAB(1)"Verbs defined: "TAB(21);vbn-1;TAB(28);verb_size-(nxtvrb-verbs);" characters free."
33040PRINTTAB(1)"Nouns defined: "TAB(21);obn-1;TAB(28);noun_size-(nxtobj-nouns);" characters free."
33050PRINTTAB(1)"Adjectives defined: "TAB(21);adn-1;TAB(28);adjc_size-(nxtadj-adjects);" characters free."
33060PRINTTAB(1)"Objects defined: "TAB(21);last_object;TAB(28);maxobs-last_object" object(s) remaining."
33070PRINTTAB(1)"Rooms defined: "TAB(21);last_room;TAB(28);maxrms-last_room" room(s) remaining."
33080PRINTTAB(1)"Screen mode: ";mode%;", File: "CHR$34+loaded$+CHR$34", Data: ";:PROCcol(11):IF data_saved PRINT"Saved" ELSE PRINT"NOT Saved"
33090ENDPROC
33100
33110
33120REM ------ Various Disk Operations ------
33130
33140DEF PROCcreate_dirs(app$,root$)
33150LOCAL t$,l$,r$,I%,rd$,out%
33160SYS "Hourglass_On"
33170IF RIGHT$(root$,1)<>"." THEN root$+="."
33180t$=root$:l$="":I%=0
33190 WHILE INSTR(t$,".")<>0
33200  r$=LEFT$(t$,INSTR(t$,".")-1)
33210  IF I%>0 l$=l$+"."+r$ ELSE l$=r$
33220  I%+=1
33230  OSCLI("CDIR "+l$)
33240  t$=MID$(t$,INSTR(t$,".")+1)
33250 ENDWHILE
33260  IF LEFT$(app$,1)<>"!" THEN app$="!"+app$
33270  app$=LEFT$(app$,10)
33280  ra$=root$+app$:REM path to users 'Alps' file
33290  OSCLI("CDIR "+ra$)
33300  OSCLI("CDIR "+ra$+".ALPS")
33310  OSCLI("CDIR "+ra$+".PICTURES")
33320  OSCLI("CDIR "+ra$+".Resources")
33330  rd$=ra$+".Resources.":REM Resources dir path
33340  OSCLI "SAVE "+rd$+"pbytes "+STR$~pbytes+"+"+STR$~pbyte_size
33350  OSCLI("SAVE "+rd$+"ASIobjcode "+STR$~asicode%+"+"+STR$~codesize)
33360  OSCLI "SAVE "+rd$+"buttons "+STR$~picbuf+"+"+STR$~butlen
33370  OSCLI "SETTYPE "+rd$+"buttons Sprite"
33380  OSCLI "SETTYPE "+rd$+"pbytes Data"
33390  OSCLI "SETTYPE "+rd$+"ASIobjcode Absolute"
33400  OSCLI "SAVE "+ra$+".!RunImage "+STR$~(picbuf+butlen)+"+"+STR$~ldlen
33410  OSCLI "SETTYPE "+ra$+".!RunImage BASIC"
33420  SYS "OS_SpriteOp",256+26,sprld,"!alpsgames",app$:REM Rename Sprite
33430  SYS "OS_SpriteOp",256+12,sprld,ra$+".!Sprites":REM Save it
33440  out%=OPENOUT(ra$+".!Run")
33450  out2%=OPENOUT(ra$+".!Boot")
33460  BPUT#out%,"| !Run file for ALPS games"
33470  BPUT#out2%,"| !Boot file for ALPS games"
33480  BPUT#out%,"|"
33490  BPUT#out%,"SET Alps$NoMouseInput 0"
33500  BPUT#out%,"|"
33510  BPUT#out%,"SET Alps$ShowAddress 0"
33520  BPUT#out%,"|"
33530  BPUT#out2%,"|"
33540  BPUT#out%,"IconSprites <Obey$Dir>.!Sprites"
33550  BPUT#out2%,"IconSprites <Obey$Dir>.!Sprites"
33560  BPUT#out%,"SET AlpsGame$Resources "+rd$
33570  BPUT#out%,"SET AlpsGame$Data "+ra$+".Alps"
33580  BPUT#out%,"SET Alps$Pictures "+ra$+".Pictures."
33590  BPUT#out2%,"SET AlpsGame$Resources "+rd$
33600  BPUT#out2%,"SET AlpsGame$Data "+ra$+".Alps"
33610  BPUT#out2%,"SET Alps$Pictures "+ra$+".Pictures."
33620  BPUT#out%,"Run <Obey$Dir>.!RunImage"
33630  CLOSE#out%:CLOSE#out2%
33640  OSCLI "*SETTYPE "+ra$+".!Run Obey"
33650  OSCLI "*SETTYPE "+ra$+".!Boot Obey"
33660SYS "Hourglass_Off"
33670ENDPROC
33680
33690DEF PROCload_bits(app$)
33700REM Loads 'buttons' sprite and 'Loader' program into picture buffer
33710REM They will then be saved to the user's data disk by PROCcreate_dirs
33720IF LEFT$(app$,1)<>"!" THEN app$="!"+app$
33730bit$="<Alps$Resources>.buttons"
33740SYS "OS_File",5,bit$ TO ftype,,,,butlen
33750OSCLI "LOAD "+bit$+" "+STR$~picbuf
33760SYS "OS_File",5,"<Alps$Resources>.!Runimage" TO ftype,,,,ldlen
33770OSCLI "LOAD <Alps$Resources>.!Runimage "+STR$~(picbuf+butlen)
33780SYS "OS_File",5,"<Alps$Resources>.!Sprites" TO ftype,,,,sprlen
33790DIM sprld sprlen+4:!sprld=sprlen+4
33800sprld!4=0:sprld!8=16:sprld!12=16
33810SYS "OS_SpriteOp",266,sprld,"<Alps$Resources>.!Sprites"
33820cliplen=0
33830ENDPROC
33840
33850DEF PROCconvert(import$)
33860LOCAL in%,I%,V%,ptr,T%
33870SYS "Hourglass_On"
33880!program%=0
33890program%!4=0
33900PROCfill(nref+4,nref_size-4,0)
33910in%=OPENIN import$
33920
33930FOR I%=0 TO &57F
33940 V%=BGET#in%
33950 verbs?I%=V%
33960NEXT I%
33970vbn=?verbs
33980nxtvrb=verbs+(verbs?1+256*(verbs?2))
33990
34000FOR I%=0 TO &57F
34010 V%=BGET#in%
34020 nouns?I%=V%
34030NEXT I%
34040obn=?nouns
34050nxtobj=nouns+(nouns?1+256*(nouns?2))
34060
34070V%=BGET#in%
34080V%=BGET#in%
34090ptr=program%+4
34100
34110REPEAT
34120 T%=BGET#in%
34130 ?ptr=T%:ptr+=1
34140 IF T%>=&C0 THEN T%-=&10
34150 IF T%>=&70 THEN
34160 pb=oldpars?(T%-&70)
34170 IF pb>0 THEN
34180  FOR I%=1 TO pb
34190   V%=BGET#in%
34200   ?ptr=V%:ptr+=1
34210   CASE T% OF
34220    WHEN &A4,&A1,&92,&90,&96,&97,&A6,&9A,&AA,&87,&88,&7B
34230     IF I%=1 THEN ?ptr=0:ptr+=1
34240    WHEN &7A,&A5,&B2,&B3,&B4,&B5,&B6,&B7,&B8
34250     IF I%=2 THEN ?ptr=0:ptr+=1
34260   ENDCASE
34270  NEXT I%
34280 ENDIF
34290ENDIF
34300UNTIL EOF#in%
34310CLOSE#in%
34320PROCincprglen(ptr-5-program%)
34330SYS "Hourglass_Off"
34340ENDPROC
34350
34360DEF PROCimport_text(import$)
34370IF import$="" THEN
34380PROCerror(16,"")
34390ELSE
34400OSCLI "LOAD "+import$+" "+STR$~(text%+2)
34410mptr=1
34420?text%=text%?2:text%?1=text%?3
34430text%!2=(text%?4+256*text%?5)+2
34440text%!6=text%?6
34450ENDIF
34460ENDPROC
34470
34480DEF PROCimport_obj(import$)
34490LOCAL in%,O%,M%,J%,flags,state,room,mlo,mhi
34500M%=odata%
34510in%=OPENIN(import$)
34520IF in%=0 PROCerror(10,""):ENDPROC
34530O%=BGET#in%
34540PTR#in%=0
34550FOR I%=0 TO O%
34560flags=BGET#in%:state=BGET#in%:room=BGET#in%
34570mlo=BGET#in%:mhi=BGET#in%
34580M%?0=flags:M%?1=state
34590M%?2=room:M%?3=0
34600M%?4=mlo:M%?5=mhi
34610FOR J%=6 TO o_len-1
34620M%?J%=0
34630NEXT J%
34640M%+=o_len
34650NEXT I%
34660last_object=O%
34670CLOSE#in%
34680ENDPROC
34690
34700DEF PROCimport_rooms(import$)
34710LOCAL in%,R%,M%,J%
34720M%=rdata%
34730in%=OPENIN(import$)
34740IF in%=0 PROCerror(10,""):ENDPROC
34750R%=BGET#in%
34760PTR#in%=0
34770FOR I%=0 TO R%
34780FOR J%=0 TO 3
34790M%?J%=BGET#in%
34800NEXT J%
34810M%?4=0:M%?5=0
34820FOR J%=6 TO 13 STEP2
34830M%?J%=BGET#in%:M%?(J%+1)=0
34840NEXT J%
34850FOR J%=14 TO 37
34860M%?J%=0
34870NEXT J%
34880M%?22=BGET#in%
34890M%?24=BGET#in%
34900FOR J%=38 TO 73
34910IF (J%<42 OR J%=46 OR J%=47) THEN M%?J%=BGET#in% ELSE M%?J%=0
34920NEXT J%
34930M%+=r_len
34940NEXT I%
34950last_room=R%
34960ENDPROC
34970
34980DEF PROCsave_all(f$)
34990REM f$=full path name
35000IF INSTR(f$,".")=0 THEN ERROR 1,"To save, drag the file icon to a directory viewer in which there is an ALPS directory.":ENDPROC
35010SYS "Hourglass_On"
35020PROCclose(texthandle):PROCclose(objhandle):PROCclose(roomhandle)
35030p$=f$:f$=FNleafname(p$)
35040p$=LEFT$(p$,LEN(p$)-LEN(f$))
35050d$=p$+"Alps."
35060OSCLI("SET Alps$Data "+d$)
35070PROCsave_objs("<Alps$Data>Objects")
35080PROCsave_rooms("<Alps$Data>Rooms")
35090PROCsave_flags("<Alps$Data>Flags")
35100PROCsave_pix("<Alps$Data>Pictures")
35110PROCsave_vocab(f$)
35120PROCsave_program("<Alps$Data>Program")
35130PROCsave_text("<Alps$Data>Text")
35140PROCsave_dict("<Alps$Data>Dict")
35150PROCsave_pal("<Alps$Data>!Palette")
35160PROCsave_chars("<Alps$Data>charset")
35170OSCLI("CREATE "+p$+f$+" 100")
35180OSCLI("SETTYPE "+p$+f$+" "+type$)
35190OSCLI("CREATE <Alps$Data>GameData 100")
35200out%=OPENUP("<Alps$Data>GameData")
35210BPUT#out%,mode%
35220CLOSE#out%
35230data_saved=TRUE:loaded$=f$:$filename%=f$
35240SYS CreateM,,-1
35250SYS "Hourglass_Off"
35260ENDPROC
35270
35280DEF PROCsave_vocab(fi$)
35290IF fi$="" THEN
35300PROCerror(16,"")
35310ELSE
35320PROCsave_nouns("<Alps$Data>Nouns")
35330PROCsave_verbs("<Alps$Data>Verbs")
35340PROCsave_adjects("<Alps$Data>Adjectives")
35350PROCsave_preps("<Alps$Data>Prepos")
35360PROCsave_conj("<Alps$Data>Conjunc")
35370PROCsave_spec("<Alps$Data>Specials")
35380PROCsave_noise("<Alps$Data>Noise")
35390PROCsave_nrefs("<Alps$Data>Nref")
35400PROCsave_arefs("<Alps$Data>Aref")
35410PROCsave_vtypes("<Alps$Data>VerbType")
35420ENDIF
35430ENDPROC
35440
35450DEF PROCsave_nouns(fi$)
35460IF fi$="" THEN
35470PROCerror(16,"")
35480ELSE
35490OSCLI "SAVE "+fi$+" "+STR$~nouns+" "+STR$~(nxtobj+1)
35500OSCLI "SETTYPE "+fi$+" Data"
35510ENDIF
35520ENDPROC
35530
35540DEF PROCsave_verbs(fi$)
35550IF fi$="" THEN
35560PROCerror(16,"")
35570ELSE
35580OSCLI "SAVE "+fi$+" "+STR$~verbs+" "+STR$~(nxtvrb+1)
35590OSCLI "SETTYPE "+fi$+" Data"
35600ENDIF
35610ENDPROC
35620
35630DEF PROCsave_adjects(fi$)
35640IF fi$="" THEN
35650PROCerror(16,"")
35660ELSE
35670OSCLI "SAVE "+fi$+" "+STR$~adjects+" "+STR$~(nxtadj+1)
35680OSCLI "SETTYPE "+fi$+" Data"
35690ENDIF
35700ENDPROC
35710
35720DEF PROCsave_preps(fi$)
35730IF fi$="" THEN
35740PROCerror(16,"")
35750ELSE
35760OSCLI "SAVE "+fi$+" "+STR$~preps+" "+STR$~(nxtprp+1)
35770OSCLI "SETTYPE "+fi$+" Data"
35780ENDIF
35790ENDPROC
35800
35810DEF PROCsave_conj(fi$)
35820IF fi$="" THEN
35830PROCerror(16,"")
35840ELSE
35850OSCLI "SAVE "+fi$+" "+STR$~conjs+" "+STR$~(nxtcjn+1)
35860OSCLI "SETTYPE "+fi$+" Data"
35870ENDIF
35880ENDPROC
35890
35900DEF PROCsave_spec(fi$)
35910IF fi$="" THEN
35920PROCerror(16,"")
35930ELSE
35940OSCLI "SAVE "+fi$+" "+STR$~specs+" "+STR$~(nxtspn+1)
35950OSCLI "SETTYPE "+fi$+" Data"
35960ENDIF
35970ENDPROC
35980
35990DEF PROCsave_noise(fi$)
36000IF fi$="" THEN
36010PROCerror(16,"")
36020ELSE
36030OSCLI "SAVE "+fi$+" "+STR$~noise+" "+STR$~(nxtnsn+1)
36040OSCLI "SETTYPE "+fi$+" Data"
36050ENDIF
36060ENDPROC
36070
36080DEF PROCsave_vtypes(fi$)
36090IF fi$="" THEN
36100PROCerror(16,"")
36110ELSE
36120OSCLI "SAVE "+fi$+" "+STR$~verb_type+"+"+STR$~(2*(maxvbn+1))
36130OSCLI "SETTYPE "+fi$+" Data"
36140ENDIF
36150ENDPROC
36160
36170DEF PROCsave_arefs(fi$)
36180IF fi$="" THEN
36190PROCerror(16,"")
36200ELSE
36210OSCLI "SAVE "+fi$+" "+STR$~aref+"+"+STR$~(!aref+1)
36220OSCLI "SETTYPE "+fi$+" Data"
36230ENDIF
36240ENDPROC
36250
36260DEF PROCsave_nrefs(fi$)
36270IF fi$="" THEN
36280PROCerror(16,"")
36290ELSE
36300OSCLI "SAVE "+fi$+" "+STR$~nref+"+"+STR$~(!nref+1)
36310OSCLI "SETTYPE "+fi$+" Data"
36320ENDIF
36330ENDPROC
36340
36350DEF PROCsave_objs(fi$)
36360IF fi$="" THEN
36370PROCerror(16,"")
36380ELSE
36390IF NOT datavalid PROCswap_data:datavalid=TRUE
36400odata%?14=optr:odata%?15=last_object
36410OSCLI "SAVE "+fi$+" "+STR$~odata%+"+"+STR$~(o_len*(last_object+1))
36420OSCLI "SETTYPE "+fi$+" Data"
36430ENDIF
36440ENDPROC
36450
36460DEF PROCsave_rooms(fi$)
36470IF fi$="" THEN
36480PROCerror(16,"")
36490ELSE
36500IF NOT datavalid PROCswap_data:datavalid=TRUE
36510!rdata%=rptr+(last_room<<16)
36520OSCLI "SAVE "+fi$+" "+STR$~rdata%+"+"+STR$~(r_len*(last_room+1))
36530OSCLI "SETTYPE "+fi$+" Data"
36540ENDIF
36550ENDPROC
36560
36570DEF PROCsave_flags(fi$)
36580IF fi$="" THEN
36590PROCerror(16,"")
36600ELSE
36610chn%=OPENOUT fi$
36620FOR f%=0 TO 7
36630flag$=$(o_flags%+f%*maxd%)
36640PRINT#chn%,flag$
36650NEXT
36660FOR f%=0 TO 7
36670flag$=$(r_flags%+f%*maxd%)
36680PRINT#chn%,flag$
36690NEXT
36700CLOSE#chn%
36710ENDIF
36720ENDPROC
36730
36740DEF PROCsave_pix(fi$)
36750IF fi$="" THEN
36760PROCerror(16,"")
36770ELSE
36780OSCLI "SAVE "+fi$+" "+STR$~pixs+" "+STR$~(nxtpxn+1)
36790OSCLI "SETTYPE "+fi$+" Data"
36800ENDIF
36810ENDPROC
36820
36830DEF PROCsave_program(fi$)
36840IF fi$="" THEN
36850PROCerror(16,"")
36860ELSE
36870OSCLI "SAVE "+fi$+" "+STR$~program%+"+"+STR$~(FNprglen+4+1)
36880OSCLI "SETTYPE "+fi$+" Data"
36890ENDIF
36900ENDPROC
36910
36920DEF PROCsave_text(fi$)
36930IF fi$="" THEN
36940PROCerror(16,"")
36950ELSE
36960OSCLI "SAVE "+fi$+" "+STR$~text%+" "+STR$~FNtext_end
36970OSCLI "SETTYPE "+fi$+" Data"
36980ENDIF
36990ENDPROC
37000
37010DEF PROCsave_dict(fi$)
37020IF fi$="" THEN
37030PROCerror(16,"")
37040ELSE
37050OSCLI "SAVE "+fi$+" "+STR$~dict%+" "+STR$~(dict%+?dict%+256*dict%?1)
37060OSCLI "SETTYPE "+fi$+" Data"
37070ENDIF
37080ENDPROC
37090
37100DEF PROCload_all(f$)
37110REM f$ is the full pathname
37120SYS "Hourglass_On"
37130PROCclose(texthandle):PROCclose(objhandle):PROCclose(roomhandle)
37140p$=f$:f$=FNleafname(p$)
37150p$=LEFT$(p$,LEN(p$)-LEN(f$))
37160d$=p$+"Alps."
37170r$=p$+"Resources"
37180OSCLI("SET Users$Resources "+r$)
37190OSCLI("SET Alps$Pictures "+p$+"Pictures.")
37200OSCLI("SET Alps$Data "+d$)
37210PROCload_objs("<Alps$Data>Objects")
37220PROCload_rooms("<Alps$Data>Rooms")
37230PROCload_flags("<Alps$Data>Flags")
37240PROCload_pix("<Alps$Data>Pictures")
37250PROCload_vocab(f$)
37260PROCload_program("<Alps$Data>Program")
37270PROCload_text("<Alps$Data>Text")
37280PROCload_dict("<Alps$Data>Dict")
37290OSCLI("PRINT <Alps$Data>charset")
37300data_saved=TRUE:loaded$=f$:$filename%=f$
37310SYS "Hourglass_Off"
37320ENDPROC
37330
37340DEF PROCload_vocab(f$)
37350IF f$="" THEN
37360PROCerror(16,"")
37370ELSE
37380PROCload_nouns("<Alps$Data>Nouns")
37390PROCload_verbs("<Alps$Data>Verbs")
37400PROCload_adjects("<Alps$Data>Adjectives")
37410PROCload_preps("<Alps$Data>Prepos")
37420PROCload_conj("<Alps$Data>Conjunc")
37430PROCload_spec("<Alps$Data>Specials")
37440PROCload_noise("<Alps$Data>Noise")
37450PROCload_vtypes("<Alps$Data>VerbType")
37460PROCload_nrefs("<Alps$Data>Nref")
37470PROCload_arefs("<Alps$Data>Aref")
37480ENDIF
37490ENDPROC
37500
37510DEF PROCload_nouns(fi$)
37520IF fi$="" THEN
37530PROCerror(16,"")
37540ELSE
37550OSCLI "LOAD "+fi$+" "+STR$~nouns
37560obn=?nouns
37570nxtobj=nouns+(nouns?1+256*(nouns?2))
37580ENDIF
37590ENDPROC
37600
37610DEF PROCload_verbs(fi$)
37620IF fi$="" THEN
37630PROCerror(16,"")
37640ELSE
37650OSCLI "LOAD "+fi$+" "+STR$~verbs
37660vbn=?verbs
37670nxtvrb=verbs+(verbs?1+256*(verbs?2))
37680ENDIF
37690ENDPROC
37700
37710DEF PROCload_adjects(fi$)
37720IF fi$="" THEN
37730PROCerror(16,"")
37740ELSE
37750OSCLI "LOAD "+fi$+" "+STR$~adjects
37760adn=?adjects
37770nxtadj=adjects+(adjects?1+256*(adjects?2))
37780ENDIF
37790ENDPROC
37800
37810DEF PROCload_preps(fi$)
37820IF fi$="" THEN
37830PROCerror(16,"")
37840ELSE
37850OSCLI "LOAD "+fi$+" "+STR$~preps
37860prn=?preps
37870nxtprp=preps+(preps?1+256*(preps?2))
37880ENDIF
37890ENDPROC
37900
37910DEF PROCload_conj(fi$)
37920IF fi$="" THEN
37930PROCerror(16,"")
37940ELSE
37950OSCLI "LOAD "+fi$+" "+STR$~conjs
37960cjn=?conjs
37970nxtcjn=conjs+(conjs?1+256*(conjs?2))
37980ENDIF
37990ENDPROC
38000
38010DEF PROCload_spec(fi$)
38020IF fi$="" THEN
38030PROCerror(16,"")
38040ELSE
38050OSCLI "LOAD "+fi$+" "+STR$~specs
38060spn=?specs
38070nxtspn=specs+(specs?1+256*(specs?2))
38080ENDIF
38090ENDPROC
38100
38110DEF PROCload_noise(fi$)
38120IF fi$="" THEN
38130PROCerror(16,"")
38140ELSE
38150OSCLI "LOAD "+fi$+" "+STR$~noise
38160nsn=?noise
38170nxtnsn=noise+(noise?1+256*(noise?2))
38180ENDIF
38190ENDPROC
38200
38210DEF PROCload_vtypes(fi$)
38220IF fi$="" THEN
38230PROCerror(16,"")
38240ELSE
38250OSCLI "LOAD "+fi$+" "+STR$~verb_type
38260ENDIF
38270ENDPROC
38280
38290DEF PROCload_arefs(fi$)
38300IF fi$="" THEN
38310PROCerror(16,"")
38320ELSE
38330OSCLI "LOAD "+fi$+" "+STR$~aref
38340ENDIF
38350ENDPROC
38360
38370DEF PROCload_nrefs(fi$)
38380IF fi$="" THEN
38390PROCerror(16,"")
38400ELSE
38410OSCLI "LOAD "+fi$+" "+STR$~nref
38420ENDIF
38430ENDPROC
38440
38450DEF PROCload_objs(fi$)
38460IF fi$="" THEN
38470PROCerror(16,"")
38480ELSE
38490OSCLI "LOAD "+fi$+" "+STR$~odata%
38500optr=odata%?14
38510last_object=odata%?15
38520ENDIF
38530ENDPROC
38540
38550DEF PROCload_rooms(fi$)
38560IF fi$="" THEN
38570PROCerror(16,"")
38580ELSE
38590OSCLI "LOAD "+fi$+" "+STR$~rdata%
38600rptr=!rdata% AND &FFFF
38610last_room=(!rdata% AND &FFFF0000)>>16
38620ENDIF
38630ENDPROC
38640
38650DEF PROCload_flags(fi$)
38660IF fi$="" THEN
38670PROCerror(16,"")
38680ELSE
38690chn%=OPENIN fi$
38700FOR f%=0 TO 7
38710INPUT#chn%,flag$
38720$(o_flags%+f%*maxd%)=flag$
38730NEXT
38740
38750FOR f%=0 TO 7
38760INPUT#chn%,flag$
38770$(r_flags%+f%*maxd%)=flag$
38780NEXT
38790CLOSE#chn%
38800ENDIF
38810ENDPROC
38820
38830DEF PROCload_pix(fi$)
38840IF fi$="" THEN
38850PROCerror(16,"")
38860ELSE
38870OSCLI "LOAD "+fi$+" "+STR$~pixs
38880pxn=?pixs
38890nxtpxn=pixs+(pixs?1+256*(pixs?2))
38900ENDIF
38910ENDPROC
38920
38930DEF PROCload_program(fi$)
38940IF fi$="" THEN
38950PROCerror(16,"")
38960ELSE
38970OSCLI "LOAD "+fi$+" "+STR$~program%
38980ENDIF
38990ENDPROC
39000
39010DEF PROCload_text(fi$)
39020IF fi$="" THEN
39030PROCerror(16,"")
39040ELSE
39050OSCLI "LOAD "+fi$+" "+STR$~text%
39060mptr=1
39070ENDIF
39080ENDPROC
39090
39100DEF PROCload_dict(fi$)
39110LOCAL I%,L%
39120IF fi$="" THEN
39130PROCerror(16,"")
39140ELSE
39150OSCLI "LOAD "+fi$+" "+STR$~dict%
39160tok%=dict%?2:L%=0
39170IF tok%=0 tok%=128 ELSE tok%-=128
39180FOR I%=1 TO tok%
39190tok$(I%)=$(dict%+3+L%)
39200L%+=LENtok$(I%)+1
39210NEXT
39220ENDIF
39230ENDPROC
39240
39250DEF PROCsetup_disk(S%)
39260PROCgetw(setuph):PROCgetpointer
39270PROCopen(setuph,mousex%-64,mousey%,x1%-x0%,y1%-y0%)
39280PROCsys_claiminputfocus(setuph,2,0,0,-1,LEN(FNgeticondata(setuph,2)))
39290PROCgetw(setuph)
39300MOUSE RECTANGLE x0%,y0%,x1%-x0%,y1%-y0%
39310dialogue%=S%
39320ENDPROC
39330
39340DEF PROCquit(S%)
39350IF NOT data_saved THEN
39360ans = FNerrorbox("There is unsaved data in the memory. Do you really want to quit?",0,3,S%)
39370ELSE
39380quit%=TRUE
39390ENDIF
39400ENDPROC
39410
39420DEF PROCensure(S%,T$)
39430dialogue%=FNerrorbox(T$,0,3,S%)
39440ENDPROC
39450
39460
39470REM ------ Vocabulary routines ------
39480
39490DEF PROCgetobn(text$,RETURN num,RETURN found$)
39500sptr=nouns+3:PROCsearch(sptr,text$,num,found$)
39510ENDPROC
39520
39530DEF PROCgetvbn(text$,RETURN num,RETURN found$)
39540sptr=verbs+3:PROCsearch(sptr,text$,num,found$)
39550ENDPROC
39560
39570DEF PROCgetadn(text$,RETURN num,RETURN found$)
39580sptr=adjects+3:PROCsearch(sptr,text$,num,found$)
39590ENDPROC
39600
39610DEF PROCgetprn(text$,RETURN num,RETURN found$)
39620sptr=preps+3:PROCsearch(sptr,text$,num,found$)
39630ENDPROC
39640
39650DEF PROCgetcjn(text$,RETURN num,RETURN found$)
39660sptr=conjs+3:PROCsearch(sptr,text$,num,found$)
39670ENDPROC
39680
39690DEF PROCgetspn(text$,RETURN num,RETURN found$)
39700sptr=specs+3:PROCsearch(sptr,text$,num,found$)
39710ENDPROC
39720
39730DEF PROCgetnsn(text$,RETURN num,RETURN found$)
39740sptr=noise+3:PROCsearch(sptr,text$,num,found$)
39750ENDPROC
39760
39770DEF PROCsearch(sptr,search$,RETURN number,RETURN temp$)
39780LOCAL temp$,found
39790number=0
39800F%=work%:B%=sptr:$(work%+&128)=search$:REM put search string in 'text'
39810CALL search
39820number=!(work%+&148)
39830ENDPROC
39840
39850DEF PROCword(type,line$)
39860REM Add words to the vocabulary or picture list
39870REM word types are - nouns = 1, verbs = 2, adjectives = 3
39880REM                  prepositions = 4, conjunctions = 5, specials = 6
39890REM                  picture names = 10
39900LOCAL index,ptr,I%,len,len2,temp$
39910
39920IF line$="" THEN ENDPROC
39930
39940WHILE INSTR("0123456789=",LEFT$(line$,1))<>0
39950line$=MID$(line$,2)
39960ENDWHILE
39970
39980WHILE LEFT$(line$,1)=" "
39990line$=MID$(line$,2)
40000ENDWHILE
40010
40020IF type<4 OR type=10 THEN
40030end=INSTR(line$,"<"):IF end=0 THEN PROCerror(22,""):errflag=TRUE:ENDPROC
40040number$=MID$(line$,end+1):line$=LEFT$(line$,end-1)
40050IF RIGHT$(number$,1)=">" THEN number$=LEFT$(number$,LENnumber$-1)
40060ELSE
40070number$=""
40080ENDIF
40090
40100IF number$="" THEN
40110CASE type OF
40120WHEN 1,3
40130number$=STR$(obn)
40140WHEN 2
40150number$="0":REM Default verb type is zero
40160OTHERWISE
40170number$=""
40180ENDCASE
40190ENDIF
40200
40210index=0
40220ptr=INSTR(line$,",")
40230IF ptr=0 THEN
40240a_list$(index)=LEFT$(line$,maxlen)
40250ELSE
40260WHILE ptr<>0 AND index<11
40270temp$=LEFT$(line$,ptr-1)
40280len=LEN(line$)
40290line$=RIGHT$(line$,len-ptr)
40300a_list$(index)=LEFT$(temp$,maxlen)
40310index+=1
40320ptr=INSTR(line$,",")
40330ENDWHILE
40340a_list$(index)=LEFT$(line$,maxlen)
40350ENDIF
40360
40370CASE type OF
40380
40390WHEN 1
40400IF obn=maxobn THEN
40410PROCerror(17,"at "+a_list$(0)):errflag=TRUE
40420ELSE
40430FOR I%=0 TO index
40440  len2=LEN a_list$(I%)
40450  IF len2>0 THEN
40460  PROCgetobn(a_list$(I%),num,fnd$)
40470  IF num<>0 PROCerror(5,a_list$(I%)):errflag=TRUE
40480  IF nxtobj+len2>noun_end-2 PROCerror(13,error$(38)):errflag=TRUE
40490  IF NOT errflag THEN
40500    $nxtobj=a_list$(I%):?(nxtobj+len2-1)=?(nxtobj+len2-1) OR 128
40510    nxtobj+=len2:?nxtobj=obn:nxtobj+=1:?nxtobj=&FF
40520  ENDIF
40530  ENDIF
40540NEXT I%
40550  IF NOT errflag THEN
40560    obn+=1
40570    ?nouns=obn:nouns?1=(nxtobj-nouns) MOD 256:nouns?2=(nxtobj-nouns) DIV 256
40580    ptr=1:memptr=nref+!nref:svmptr=memptr:refs=0:memptr+=1
40590    REPEAT
40600    PROCdecode_parameter(number$,ptr,ptr,val,0)
40610    IF NOT errflag THEN ?memptr=val:memptr+=1:refs+=1
40620    UNTIL ptr>LENnumber$ OR errflag
40630    ?memptr=0:!nref=!nref+refs+1
40640    ?svmptr=refs
40650  ENDIF
40660ENDIF
40670WHEN 2
40680IF vbn=maxvbn THEN
40690PROCerror(18,"at "+a_list$(0)):errflag=TRUE
40700ELSE
40710FOR I%=0 TO index
40720  len2=LEN a_list$(I%)
40730  IF len2>0 THEN
40740  PROCgetvbn(a_list$(I%),num,fnd$)
40750  IF num<>0 PROCerror(8,a_list$(I%)):errflag=TRUE
40760  IF nxtvrb+len2>verb_end-2 PROCerror(13,error$(39)):errflag=TRUE
40770  IF NOT errflag THEN
40780    $nxtvrb=a_list$(I%):?(nxtvrb+len2-1)=?(nxtvrb+len2-1) OR 128
40790    nxtvrb+=len2:?nxtvrb=vbn:nxtvrb+=1:?nxtvrb=&FF
40800  ENDIF
40810  ENDIF
40820NEXT I%
40830IF NOT errflag THEN
40840ptr=1
40850PROCdecode_parameter(number$,ptr,ptr,val,0)
40860IF NOT errflag THEN
40870verb_type?(2*vbn)=val
40880oloc$=MID$(number$,ptr+1):olocflg=0
40890IF INSTR(oloc$,"C")<>0 THEN olocflg=1
40900IF INSTR(oloc$,"P")<>0 THEN olocflg=olocflg OR 2
40910verb_type?(2*vbn+1)=olocflg
40920vbn+=1
40930?verbs=vbn:verbs?1=(nxtvrb-verbs) MOD 256:verbs?2=(nxtvrb-verbs) DIV 256
40940ENDIF
40950ENDIF
40960ENDIF
40970WHEN 3
40980IF adn=maxadj THEN
40990PROCerror(19,"at "+a_list$(0)):errflag=TRUE
41000ELSE
41010FOR I%=0 TO index
41020  len2=LEN a_list$(I%)
41030  IF len2>0 THEN
41040  PROCgetadn(a_list$(I%),num,fnd$)
41050  IF num<>0 PROCerror(8,a_list$(I%)):errflag=TRUE
41060  IF nxtadj+len2>adjc_end-2 PROCerror(13,error$(40)):errflag=TRUE
41070  IF NOT errflag THEN
41080    $nxtadj=a_list$(I%):?(nxtadj+len2-1)=?(nxtadj+len2-1) OR 128
41090    nxtadj+=len2:?nxtadj=adn:nxtadj+=1:?nxtadj=&FF
41100  ENDIF
41110  ENDIF
41120NEXT I%
41130  IF NOT errflag THEN
41140adn+=1
41150?adjects=adn:adjects?1=(nxtadj-adjects) MOD 256:adjects?2=(nxtadj-adjects) DIV 256
41160    ptr=1:memptr=aref+!aref:svmptr=memptr:refs=0:memptr+=1
41170    REPEAT
41180    PROCdecode_parameter(number$,ptr,ptr,val,0)
41190    IF NOT errflag THEN ?memptr=val:memptr+=1:refs+=1
41200    UNTIL ptr>LENnumber$ OR errflag
41210    ?memptr=0:!aref=!aref+refs+1
41220    ?svmptr=refs
41230  ENDIF
41240ENDIF
41250WHEN 4
41260IF prn=maxprep THEN
41270PROCerror(20,"at "+a_list$(0)):errflag=TRUE
41280ELSE
41290FOR I%=0 TO index
41300  len2=LEN a_list$(I%)
41310  IF len2>0 THEN
41320  PROCgetprn(a_list$(I%),num,fnd$)
41330  IF num<>0 PROCerror(8,a_list$(I%)):errflag=TRUE
41340  IF nxtprp+len2>prep_end-2 PROCerror(13,error$(41)):errflag=TRUE
41350  IF NOT errflag THEN
41360    $nxtprp=a_list$(I%):?(nxtprp+len2-1)=?(nxtprp+len2-1) OR 128
41370    nxtprp+=len2:?nxtprp=prn:nxtprp+=1:?nxtprp=&FF
41380  ENDIF
41390  ENDIF
41400NEXT I%
41410  IF NOT errflag THEN
41420    prn+=1
41430    ?preps=prn:preps?1=(nxtprp-preps) MOD 256:preps?2=(nxtprp-preps) DIV 256
41440  ENDIF
41450ENDIF
41460WHEN 5
41470IF cjn=maxconj THEN
41480PROCerror(21,"at "+a_list$(0)):errflag=TRUE
41490ELSE
41500FOR I%=0 TO index
41510  len2=LEN a_list$(I%)
41520  IF len2>0 THEN
41530  PROCgetcjn(a_list$(I%),num,fnd$)
41540  IF num<>0 PROCerror(8,a_list$(I%)):errflag=TRUE
41550  IF nxtcjn+len2>conj_end-2 PROCerror(13,error$(42)):errflag=TRUE
41560  IF NOT errflag THEN
41570    $nxtcjn=a_list$(I%):?(nxtcjn+len2-1)=?(nxtcjn+len2-1) OR 128
41580    nxtcjn+=len2:?nxtcjn=cjn:nxtcjn+=1:?nxtcjn=&FF
41590  ENDIF
41600  ENDIF
41610NEXT I%
41620  IF NOT errflag THEN
41630    cjn+=1
41640    ?conjs=cjn:conjs?1=(nxtcjn-conjs) MOD 256:conjs?2=(nxtcjn-conjs) DIV 256
41650  ENDIF
41660ENDIF
41670WHEN 6
41680IF spn=maxspec THEN
41690PROCerror(24,"at "+a_list$(0)):errflag=TRUE
41700ELSE
41710FOR I%=0 TO index
41720  len2=LEN a_list$(I%)
41730  IF len2>0 THEN
41740  PROCgetspn(a_list$(I%),num,fnd$)
41750  IF num<>0 PROCerror(8,a_list$(I%)):errflag=TRUE
41760  IF nxtspn+len2>spec_end-2 PROCerror(13,error$(43)):errflag=TRUE
41770  IF NOT errflag THEN
41780    $nxtspn=a_list$(I%):?(nxtspn+len2-1)=?(nxtspn+len2-1) OR 128
41790    nxtspn+=len2:?nxtspn=spn:nxtspn+=1:?nxtspn=&FF
41800  ENDIF
41810  ENDIF
41820NEXT I%
41830  IF NOT errflag THEN
41840    spn+=1
41850    ?specs=spn:specs?1=(nxtspn-specs) MOD 256:specs?2=(nxtspn-specs) DIV 256
41860  ENDIF
41870ENDIF
41880WHEN 7
41890IF nsn=maxnoise THEN
41900PROCerror(25,"at "+a_list$(0)):errflag=TRUE
41910ELSE
41920FOR I%=0 TO index
41930  len2=LEN a_list$(I%)
41940  IF len2>0 THEN
41950  PROCgetnsn(a_list$(I%),num,fnd$)
41960  IF num<>0 PROCerror(8,a_list$(I%)):errflag=TRUE
41970  IF nxtnsn+len2>noise_end-2 PROCerror(13,error$(44)):errflag=TRUE
41980  IF NOT errflag THEN
41990    $nxtnsn=a_list$(I%):?(nxtnsn+len2-1)=?(nxtnsn+len2-1) OR 128
42000    nxtnsn+=len2:?nxtnsn=nsn:nxtnsn+=1:?nxtnsn=&FF
42010  ENDIF
42020  ENDIF
42030NEXT I%
42040  IF NOT errflag THEN
42050    nsn+=1
42060    ?noise=nsn:noise?1=(nxtnsn-noise) MOD 256:noise?2=(nxtnsn-noise) DIV 256
42070  ENDIF
42080ENDIF
42090WHEN 10
42100IF pxn=maxpix THEN
42110PROCerror(26,"at "+a_list$(0)):errflag=TRUE
42120ELSE
42130FOR I%=0 TO index
42140  len2=LEN a_list$(I%)
42150  IF len2>0 THEN
42160  IF nxtpxn+len2>pix_end-2 PROCerror(13,error$(45)):errflag=TRUE
42170  IF NOT errflag THEN
42180    $nxtpxn=a_list$(I%):REM ?(nxtpxn+len2-1)=?(nxtpxn+len2-1) OR 128
42190    nxtpxn+=len2+1
42200  ENDIF
42210  ENDIF
42220NEXT I%
42230  IF NOT errflag THEN
42240    loc$=MID$(number$,1)
42250    IF loc$<>"" THEN
42260      IF INSTR("TBLR",loc$)<>0 THEN val=INSTR("TBLR",loc$)-1 ELSE val=0
42270    ELSE val=0
42280    ENDIF
42290    ?nxtpxn=val:nxtpxn+=5:?nxtpxn=&FF
42300    pxn+=1
42310    ?pixs=pxn:pixs?1=(nxtpxn-pixs) MOD 256:pixs?2=(nxtpxn-pixs) DIV 256
42320  ENDIF
42330ENDIF
42340ENDCASE
42350ENDPROC
42360
42370DEF PROCgetstr(test$,place,RETURN place,RETURN result$)
42380chr$=MID$(test$,place,1)
42390IF chr$=CHR$13 THEN result$="":ENDPROC
42400WHILE chr$=" " OR chr$="," place+=1
42410chr$=MID$(test$,place,1)
42420ENDWHILE
42430
42440IF chr$<>CHR$ 34 PROCerror(6," : "+line$):result$="":ENDPROC
42450place+=1
42460place2=INSTR(line$,CHR$34,place):IF place2<place PROCerror(6," : "+line$):result$="":ENDPROC
42470
42480result$=MID$(line$,place,place2-place)
42490place=place2+1
42500ENDPROC
42510
42520DEF PROClistnouns
42530LOCAL mptr,I%,J%,refs
42540IF obn=1 THEN ENDPROC
42550mptr=nref+4
42560FOR I%=1 TO obn-1
42570PROCput(STR$(I%)+"= ")
42580PROCpvok(I%,1,TRUE):PROCput(",<")
42590refs=?mptr
42600IF refs>0 THEN
42610FOR J%=1 TO refs
42620PROCput(STR$(J%?mptr))
42630IF J%<refs PROCput(",")
42640NEXT
42650ENDIF
42660mptr+=refs+1
42670PROCput(">"+CHR$13)
42680NEXT
42690PROCput(CHR$0)
42700ENDPROC
42710
42720DEF PROClistverbs
42730IF vbn=1 THEN ENDPROC
42740FOR I%=1 TO vbn-1
42750PROCput(STR$(I%)+"= ")
42760vtype=verb_type?(2*I%)
42770PROCpvok(I%,0,TRUE):PROCput(",<"+STR$(vtype))
42780olflg=verb_type?(2*I%+1):oloc$=""
42790IF vtype>0 THEN
42800IF (olflg AND 1)<>0 THEN oloc$+="C"
42810IF (olflg AND 2)<>0 THEN oloc$+="P"
42820PROCput(",")
42830ENDIF
42840PROCput(oloc$+">"+CHR$13)
42850NEXT
42860PROCput(CHR$0)
42870ENDPROC
42880
42890DEF PROClistadjs
42900LOCAL mptr,I%,J%,refs
42910IF adn=1 THEN ENDPROC
42920mptr=aref+4
42930FOR I%=1 TO adn-1
42940PROCput(STR$(I%)+"= ")
42950PROCpvok(I%,2,TRUE):PROCput(",<")
42960refs=?mptr
42970IF refs>0 THEN
42980FOR J%=1 TO refs
42990PROCput(STR$(J%?mptr))
43000IF J%<refs PROCput(",")
43010NEXT
43020ENDIF
43030mptr+=refs+1
43040PROCput(">"+CHR$13)
43050NEXT
43060PROCput(CHR$0)
43070ENDPROC
43080
43090DEF PROClistpreps
43100LOCAL I%,J%
43110IF prn=1 THEN ENDPROC
43120FOR I%=1 TO prn-1
43130PROCput(STR$(I%)+"= ")
43140PROCpvok(I%,3,TRUE):PROCput(CHR$13)
43150NEXT
43160PROCput(CHR$0)
43170ENDPROC
43180
43190DEF PROClistconjs
43200LOCAL I%,J%
43210IF cjn=1 THEN ENDPROC
43220FOR I%=1 TO cjn-1
43230PROCput(STR$(I%)+"= ")
43240PROCpvok(I%,4,TRUE):PROCput(CHR$13)
43250NEXT
43260PROCput(CHR$0)
43270ENDPROC
43280
43290DEF PROClistspecs
43300LOCAL I%,J%
43310IF spn=1 THEN ENDPROC
43320FOR I%=1 TO spn-1
43330PROCput(STR$(I%)+"= ")
43340PROCpvok(I%,5,TRUE):PROCput(CHR$13)
43350NEXT
43360PROCput(CHR$0)
43370ENDPROC
43380
43390DEF PROClistnoise
43400LOCAL I%,J%
43410IF nsn=1 THEN ENDPROC
43420FOR I%=1 TO nsn-1
43430PROCput(STR$(I%)+"= ")
43440PROCpvok(I%,6,TRUE):PROCput(CHR$13)
43450NEXT
43460PROCput(CHR$0)
43470ENDPROC
43480
43490DEF PROCstore_pix
43500SYS "Hourglass_On"
43510errflag=FALSE
43520pxn=1
43530nxtpxn=pixs:?nxtpxn=pxn:nxtpxn?1=3:nxtpxn?2=0:nxtpxn+=3:?nxtpxn=&FF
43540last%=FNfind_lastrow
43550FOR I%=0 TO last%
43560IF NOT errflag PROCword(10,FNrow(I%))
43570NEXT
43580SYS "Hourglass_Off"
43590
43600ENDPROC
43610
43620DEF PROCstore_vocab
43630SYS "Hourglass_On"
43640errflag=FALSE:PROCremove_markers
43650
43660CASE voc_sect% OF
43670WHEN 1
43680obn=1
43690nxtobj=nouns:?nxtobj=obn:nxtobj?1=3:nxtobj?2=0:nxtobj+=3:?nxtobj=&FF
43700!nref=4
43710WHEN 2
43720vbn=1
43730nxtvrb=verbs:?nxtvrb=vbn:nxtvrb?1=3:nxtvrb?2=0:nxtvrb+=3:?nxtvrb=&FF
43740WHEN 3
43750adn=1
43760nxtadj=adjects:?nxtadj=adn:nxtadj?1=3:nxtadj?2=0:nxtadj+=3:?nxtadj=&FF
43770!aref=4
43780WHEN 4
43790prn=1
43800nxtprp=preps:?nxtprp=prn:nxtprp?1=3:nxtprp?2=0:nxtprp+=3:?nxtprp=&FF
43810WHEN 5
43820cjn=1
43830nxtcjn=conjs:?nxtcjn=cjn:nxtcjn?1=3:nxtcjn?2=0:nxtcjn+=3:?nxtcjn=&FF
43840WHEN 6
43850spn=1
43860nxtspn=specs:?nxtspn=spn:nxtspn?1=3:nxtspn?2=0:nxtspn+=3:?nxtspn=&FF
43870WHEN 7
43880nsn=1
43890nxtnsn=noise:?nxtnsn=nsn:nxtnsn?1=3:nxtnsn?2=0:nxtnsn+=3:?nxtnsn=&FF
43900ENDCASE
43910last%=FNfind_lastrow
43920
43930FOR I%=0 TO last%
43940 IF NOT errflag PROCword(voc_sect%,FNrow(I%))
43950NEXT
43960IF NOT errflag text_ok=TRUE
43970SYS "Hourglass_Off"
43980ENDPROC
43990
44000DEF FNfindnoun(obj,RETURN J%)
44010REM Finds the number of the noun referring to a specified object
44020LOCAL M%,I%,N%,found
44030M%=nref+4
44040WHILE N%<last_object AND NOT found
44050J%=?M%
44060IF J%>0 THEN
44070FOR I%=1 TO J%
44080IF M%?I%=obj THEN found=TRUE
44090NEXT
44100ENDIF
44110M%+=J%+1
44120N%+=1
44130ENDWHILE
44140IF found THEN=N% ELSE=0
44150
44160
44170DEF PROCwhich_obj(N%,RETURN V$,RETURN R%)
44180REM Returns a string containing the objects referenced by noun N%
44190REM R%=number of objects referenced
44200LOCAL M%,found,I%,J%,K%
44210
44220M%=nref+4
44230IF N%>1 THEN
44240FOR K%=1 TO N%-1
44250 J%=?M%
44260 M%+=J%+1
44270NEXT
44280ENDIF
44290J%=?M%
44300R%=J%:V$=""
44310IF J%>0 THEN
44320FOR I%=1 TO J%
44330 V$+=STR$(I%?M%)+","
44340NEXT
44350ENDIF
44360ENDPROC
44370
44380DEF PROCpvok(num,type,all)
44390LOCAL temp$,found,ctr
44400IF num=0 THEN ENDPROC
44410
44420CASE type OF
44430WHEN 0: sptr=verbs+3
44440WHEN 1: sptr=nouns+3
44450WHEN 2: sptr=adjects+3
44460WHEN 3: sptr=preps+3
44470WHEN 4: sptr=conjs+3
44480WHEN 5: sptr=specs+3
44490WHEN 6: sptr=noise+3
44500WHEN 10: sptr=pixs+3
44510ENDCASE
44520
44530A%=num:B%=sptr
44540IF NOT all THEN
44550CALL pvok:temp$=$atext:IF temp$<>"" PROCput(temp$)
44560ELSE
44570?pvokflag=0
44580REPEAT
44590CALL pvok
44600IF ?pvokflag=0 THEN
44610IF ctr>0 THEN PROCput(",")
44620temp$=$atext:IF temp$<>"" PROCput(temp$)
44630ctr+=1:B%=!address
44640ENDIF
44650UNTIL ?pvokflag>0
44660ENDIF
44670ENDPROC
44680
44690DEF PROCnonspc(str$,place,RETURN place,RETURN chr$)
44700WHILE MID$(str$,place,1)=" "
44710  place+=1
44720ENDWHILE
44730chr$=MID$(str$,place,1)
44740ENDPROC
44750
44760DEF PROCdodefn
44770IF vbn=maxvbn PROCerror(11,": "+STR$(maxvbn)+" "+error$(46)):ENDPROC
44780?prgptr=def_token:prgptr+=1
44790
44800PROCgetstr(line$,ptr,ptr,vrb$):index=0
44810IF errflag THEN ENDPROC
44820REM WHILE vrb$<>"" AND index<11
44830a_list$(index)=vrb$:index+=1
44840REM PROCgetstr(line$,ptr,ptr,vrb$)
44850REM ENDWHILE
44860
44870IF vrb$="" PROCerror(1,error$(47)):ENDPROC
44880
44890IF errflag THEN ENDPROC
44900
44910flag=FALSE:index-=1
44920FOR I%=0 TO index
44930  PROCgetvbn(a_list$(I%),num,fnd$)
44940  IF num<>0 AND NOT existing_verb PROCerror(8,a_list$(I%)):flag=TRUE
44950  oldvbn=num
44960NEXT I%
44970
44980IF NOT flag AND NOT existing_verb THEN
44990  FOR I%=0 TO index
45000    len2=LEN a_list$(I%)
45010    $nxtvrb=a_list$(I%):?(nxtvrb+len2-1)=?(nxtvrb+len2-1) OR 128
45020    nxtvrb+=len2:?nxtvrb=vbn:nxtvrb+=1
45030  NEXT I%
45040  ?prgptr=vbn:prgptr+=1:?nxtvrb=&FF:vbn+=1
45050  ?verbs=vbn:verbs?1=(nxtvrb-verbs) MOD 256:verbs?2=(nxtvrb-verbs) DIV 256
45060
45070ELSE
45080IF existing_verb THEN ?prgptr=oldvbn:prgptr+=1
45090ENDIF
45100
45110existing_verb=TRUE
45120ENDPROC
45130
45140DEF PROCprtdef
45150vrbnum=?listptr
45160PROCput(CHR$32+CHR$34):PROCpvok(vrbnum,0,FALSE):PROCput(CHR$34)
45170ENDPROC
45180
45190DEF FNfntype(parm)
45200LOCAL temp
45210IF token=prep_token OR token=notprep_token THEN =3
45220temp=parm AND %01000000:REM check if `object` function
45230IF temp<>0 THEN=1
45240temp=parm AND %00100000:REM check if `verb` function
45250IF temp<>0 THEN=2 ELSE =0
45260
45270DEF PROCprntobj
45280LOCAL num
45290objnum=?listptr
45300IF objnum>last_object THEN ENDPROC
45310num=FNfindnoun(objnum,refs)
45320IF refs=1 THEN
45330PROCput(CHR$34):PROCpvok(num,1,FALSE):PROCput(CHR$34)
45340doneit=TRUE
45350ENDIF
45360ENDPROC
45370
45380DEF PROCprntvrb
45390vrbnum=?listptr
45400IF vrbnum>=vbn THEN ENDPROC
45410PROCput(CHR$34):PROCpvok(vrbnum,0,FALSE):PROCput(CHR$34)
45420doneit=TRUE
45430ENDPROC
45440
45450DEF PROCprintprep
45460LOCAL num
45470num=?listptr
45480IF num>=prn THEN ENDPROC
45490PROCput(CHR$34):PROCpvok(num,3,FALSE):PROCput(CHR$34)
45500doneit=TRUE
45510ENDPROC
45520
45530DEF PROCcopy_from_editor
45540LOCAL ldptr,svptr,O%,I%,R%
45550svptr=initsave
45560FOR O%=last_object TO 0 STEP-1
45570ldptr=odata%+O%*o_len
45580!svptr=!ldptr:svptr+=4
45590?svptr=ldptr?12:svptr+=1
45600?svptr=ldptr?14:svptr+=1
45610?svptr=ldptr?15:svptr+=1
45620NEXT
45630FOR R%=last_room TO 0 STEP-1
45640ldptr=rdata%+R%*r_len
45650?svptr=?ldptr:svptr?1=ldptr?1:svptr+=2
45660FOR I%=54 TO 73 STEP4
45670!svptr=I%!ldptr:svptr+=4
45680NEXT
45690NEXT
45700ENDPROC
45710
45720DEF PROCcopy_to_editor
45730LOCAL ldptr,svptr,O%,I%,R%
45740ldptr=initsave
45750FOR O%=last_object TO 0 STEP-1
45760svptr=odata%+O%*o_len
45770!svptr=!ldptr:ldptr+=4
45780svptr?12=?ldptr:ldptr+=1
45790svptr?14=?ldptr:ldptr+=1
45800svptr?15=?ldptr:ldptr+=1
45810NEXT
45820FOR R%=last_room TO 0 STEP-1
45830svptr=rdata%+R%*r_len
45840?svptr=?ldptr:svptr?1=ldptr?1:ldptr+=2
45850FOR I%=54 TO 73 STEP4
45860I%!svptr=!ldptr:ldptr+=4
45870NEXT
45880NEXT
45890ENDPROC
45900
45910DEF PROCswap_data
45920LOCAL ldptr,svptr,O%,I%,R%,T%
45930ldptr=initsave
45940FOR O%=last_object TO 0 STEP-1
45950svptr=odata%+O%*o_len
45960T%=!svptr
45970!svptr=!ldptr:!ldptr=T%:ldptr+=4
45980T%=svptr?12
45990svptr?12=?ldptr:?ldptr=T%:ldptr+=1
46000T%=svptr?14
46010svptr?14=?ldptr:?ldptr=T%:ldptr+=1
46020T%=svptr?15
46030svptr?15=?ldptr:?ldptr=T%:ldptr+=1
46040NEXT
46050FOR R%=last_room TO 0 STEP-1
46060svptr=rdata%+R%*r_len
46070T%=?svptr:?svptr=?ldptr:?ldptr=T%:T%=svptr?1:svptr?1=ldptr?1:ldptr?1=T%:ldptr+=2
46080FOR I%=54 TO 73 STEP4
46090T%=I%!svptr
46100I%!svptr=!ldptr:!ldptr=T%:ldptr+=4
46110NEXT
46120NEXT
46130ENDPROC
46140
46150DEF FNerrorbox(err$,err%,Errorflags,fromPlace%)
46160SYS CreateM,,-1
46170SYS Poll,,block
46180!mistake = err%
46190IF NOT testing AND err%=29 THEN
46200   err$="Sorry - not implemented in this version": Errorflags=1
46210ENDIF
46220IF testing err$+=" (Error code: "+STR$(ERL)+")"
46230IF (err% AND &FF)=&C7 err$="Disk not formatted. Shall I format it now?":Errorflags=3
46240$(mistake+4) = err$+CHR$(0)
46250IF fromPlace%<>-99 THEN Errorflags=Errorflags OR 16:t$="Message from ALPS" ELSE t$="ALPS"
46260SYS "Wimp_ReportError",mistake,Errorflags,t$ TO ,dialogue%
46270ok = (dialogue%=1)
46280
46290IF (err% AND &FF)=&C7 AND ok THEN
46300   *FORMAT 0 E Y
46310   PROCcreate_dirs(FNgeticondata(setuph,2),FNgeticondata(setuph,5))
46320ENDIF
46330
46340CASE fromPlace% OF
46350WHEN -99: REM *** a proper error ***
46360WHEN 0:IF ok THEN PROCsave_all(path$)
46370WHEN 1:IF ok THEN PROCload_all(path$):PROCopen(ALPSmain,400,800,600,600)
46380WHEN 2:IF ok THEN PROCcreate_dirs
46390WHEN 3:IF ok THEN
46400quit%=TRUE
46410SYS "Wimp_GetCaretPosition",,quitblk+20 :REM Fill up first 5 words
46420quitblk!44=&1FC                         :REM CTRL-SHIFT-f12
46430!quitblk=48                             :REM Size of message block
46440quitblk!12=0
46450quitblk!16=8                            :REM Send Key_Pressed message
46460SYS "Wimp_SendMessage",17,quitblk,prequittask%
46470ENDIF
46480WHEN 4:IF ok THEN quit%=TRUE
46490ENDCASE
46500=dialogue%
46510
46520
46530DEF FNOS_Var(V$)
46540SYS "XOS_ReadVarVal",V$,0,-1 TO ,,exists
46550=exists
46560
46570DEF FNReadVarVal(V$)
46580DIM vblk 32
46590SYS "XOS_ReadVarVal",V$,vblk,32,,0,3 TO ,,N%
46600vblk?N%=13
46610=$vblk
46620 
46630DEF FNiconbar(sprBlk, spname$, xx,yy)
46640!qBlk%=-1
46650qBlk%!4=0:qBlk%!8=0:qBlk%!12=xx*2:qBlk%!16=yy*4
46660qBlk%!20=&2102
46670DIM qBlk%!24 (LENspname$+1):$(qBlk%!24)=spname$
46680qBlk%!28=sprBlk
46690qBlk%!32=LENspname$+1
46700SYS "Wimp_CreateIcon",,qBlk% TO theIc%
46710=theIc%
46720 
46730 
46740DEF PROCreceive(block)
46750ref%=block!8
46760CASE block!16 OF
46770  WHEN 0   :quit%=TRUE
46780  WHEN 2   :REM SaveAck from Filer/another app.
46790            path$=FNname(block+44)
46800            PROCsave_all(path$)
46810            !block=64:block!12=block!8:block!16=3
46820            SYS "Wimp_SendMessage",17,block,block!20,block!24
46830  WHEN 3,5 :PROCload(block)
46840  WHEN 8   :REM PreQuit
46850    IF NOT data_saved THEN
46860    prequittask%=block!4
46870    bytes=!block
46880    FOR I%=0 TO bytes
46890    quitblk!I%=block!I%
46900    NEXT
46910    quitblk!12=quitblk!8
46920    block!12=block!8
46930    SYS "Wimp_SendMessage",19,block
46940    ans = FNerrorbox("There is unsaved data in the memory. Do you really want to quit?",0,3,3)
46950    ENDIF
46960  WHEN &502:PROChelp(block!32,block!36,block)
46970  WHEN &400C1:REM mode change
46980   mode%=MODE
46990   PROCgetmodeinfo
47000   PROCassemble(armcode%):REM Need to allow for different screen size
47010   IF scrnsize>oldsize THEN null=FNerrorbox("Warning! It may not be possible to display pictures in this mode due to memory restrictions. To display pictures quit ALPS and restart in this mode.",0,1,5)
47020ENDCASE
47030ENDPROC
47040
47050DEF PROCload(b)
47060ourtype=EVAL("&"+type$)
47070IF b!40 = ourtype THEN
47080  path$=FNname(b+44)
47090  IF NOT data_saved THEN
47100    PROCLoadAck
47110    PROCensure(1,"Unsaved data in memory. Please confirm that you want to load this file.")
47120    ELSE
47130    PROCload_all(path$)
47140    PROCLoadAck
47150    PROCopen(ALPSmain,400,800,600,600)
47160  ENDIF
47170ENDIF
47180ENDPROC
47190
47200DEF PROCLoadAck
47210block!12=block!8:block!16=4:!block=64
47220SYS "Wimp_SendMessage",17,block,block!4
47230ENDPROC
47240
47250DEF PROCsave
47260path$=FNgeticondata(savehandle,2)
47270PROCgetpointer
47280block!20=64:block!32=0:block!36=1:REM DataSave MSG
47290block!40=handle%:block!44=icon%:block!48=mousex%:block!52=mousey%
47300block!56=10000:REM Estimated size of data???
47310block!60=EVAL("&"+type$):REM File type
47320$(block+64)=FNleafname(path$)+CHR$0
47330SYS "Wimp_SendMessage",17,block+20,handle%,icon%
47340ENDPROC
47350
47360DEF FNname(indx)
47370LOCAL f$,g$,p,i
47380
47390WHILE ?indx<>0
47400f$+=CHR$(?indx):indx+=1
47410ENDWHILE
47420=f$
47430
47440DEF FNleafname(f$)
47450p=1
47460REPEAT
47470i=INSTR(f$,"."):IF i<>0 p=i+1:MID$(f$,i,1)="#"
47480UNTIL i=0
47490f$=MID$(f$,p)
47500=f$
47510
47520DEF FNtick_objected
47530flags%=VAL(FNgeticondata(objhandle,8))
47540FOR fl%=7 TO 0 STEP -1
47550  flag%=flags% DIV 2^fl%
47560  flags%=flags% MOD 2^fl%
47570  ptr=(m_objflag+28+(7-fl%)*24)
47580  IF flag%=1 THEN
47590    ?ptr=?ptr OR 1
47600  ELSE ?ptr=?ptr AND %11111110
47610  ENDIF
47620NEXT fl%
47630=0
47640
47650DEF FNtick_message
47660  ptr=0
47670  FOR I%=1 TO maxsw%
47680    $(swdata%+ptr)=STR$(switch_vals(I%))
47690    ptr+=12
47700    IF I%>switch_vals(0) THEN
47710      ?(m_switch%+28+24*I%)=(?(m_switch%+28+24*I%) AND &FE)
47720    ELSE
47730      ?(m_switch%+28+24*I%)=(?(m_switch%+28+24*I%) OR 1)
47740    ENDIF
47750  NEXT
47760  $(m_text%+5)=STR$(mptr)
47770  IF switch_vals(0)<>0 THEN ?(m_switch%+28)=(?(m_switch%+28) AND &FE) ELSE ?(m_switch%+28)=(?(m_switch%+28) OR 1)
47780  IF overwrite THEN
47790    ?(m_text%+28+24)=?(m_text%+28+24) OR 1
47800    ?(m_text%+28)=?(m_text%+28) AND &FE
47810  ELSE
47820    ?(m_text%+28+24)=?(m_text%+28+24) AND &FE
47830    ?(m_text%+28)=?(m_text%+28) OR 1
47840  ENDIF
47850=0
47860
47870DEF FNtick_program
47880  IF overwrite THEN
47890    ?(m_prog%+28+24)=?(m_prog%+28+24) OR 1
47900    ?(m_prog%+28)=?(m_prog%+28) AND &FE
47910  ELSE
47920    ?(m_prog%+28+24)=?(m_prog%+28+24) AND &FE
47930    ?(m_prog%+28)=?(m_prog%+28) OR 1
47940  ENDIF
47950  IF (listoption AND %10)<>0 THEN
47960    ?(m_listopts+28+24)=?(m_listopts+28+24) OR 1
47970    ?(m_listopts+28)=?(m_listopts+28) AND &FE
47980  ELSE
47990    ?(m_listopts+28+24)=?(m_listopts+28+24) AND &FE
48000    ?(m_listopts+28)=?(m_listopts+28) OR 1
48010  ENDIF
48020=0
48030
48040DEF FNtick_vocab
48050  IF overwrite THEN
48060    ?(m_vocab%+28+24)=?(m_vocab%+28+24) OR 1
48070    ?(m_vocab%+28)=?(m_vocab%+28) AND &FE
48080  ELSE
48090    ?(m_vocab%+28+24)=?(m_vocab%+28+24) AND &FE
48100    ?(m_vocab%+28)=?(m_vocab%+28) OR 1
48110  ENDIF
48120  FOR I%=1 TO 7
48130    IF I%=voc_sect% THEN
48140      ?(m_vocab%+28+24*(I%+4))=?(m_vocab%+28+24*(I%+4)) OR 1
48150    ELSE
48160      ?(m_vocab%+28+24*(I%+4))=?(m_vocab%+28+24*(I%+4)) AND &FE
48170    ENDIF
48180  NEXT I%
48190=0
48200
48210
48220DEF FNtick_
48230=0
48240
48250
48260DEF FNtick_roomedit
48270REM First set the 'tick' bits for each menu item
48280flags%=VAL(FNgeticondata(roomhandle,34))
48290FOR fl%=7 TO 0 STEP -1
48300  flag%=flags% DIV 2^fl%
48310  flags%=flags% MOD 2^fl%
48320  ptr=(m_rmflag+28+(7-fl%)*24)
48330  IF flag%=1 THEN
48340    ?ptr=?ptr OR 1
48350  ELSE ?ptr=?ptr AND %11111110
48360  ENDIF
48370NEXT fl%
48380=0
48390
48400
48410DEF FNtick_exitedit
48420REM First set the 'tick' bits for each menu item
48430flags%=?(rdata%+rptr*r_len+oldrmicon%)
48440FOR fl%=7 TO 0 STEP -1
48450  flag%=flags% DIV 2^fl%
48460  flags%=flags% MOD 2^fl%
48470  ptr=(m_exitf+28+(7-fl%)*24)
48480  IF flag%=1 THEN
48490    ?ptr=?ptr OR 1
48500  ELSE ?ptr=?ptr AND %11111110
48510  ENDIF
48520NEXT fl%
48530=0
48540
48550
48560DEF FNbutton_misc
48570icon%(THEmiscicon)=-1
48580=0
48590
48600
48610DEF FNtick_misc
48620   ptr=(miscmenu+28+48)
48630   IF datavalid THEN
48640      ?ptr = ?ptr OR 1
48650   ELSE
48660      ?ptr = ?ptr AND %11111110
48670   ENDIF
48680=0
48690
48700
48710DEF PROChelp(w,h,b)
48720LOCAL help$
48730CASE w OF
48740WHEN -2:help$="This is the ALPS icon.|MClick SELECT to choose an editor.|MClick MENU to quit.|MDrag an 'Alps' file icon to the ALPS icon to load it."
48750WHEN ALPSmain
48760help$="Click SELECT to open the "
48770CASE h OF
48780WHEN 0:help$="Click SELECT to Save files or Set up a disk for use with ALPS."
48790WHEN 1:help$="Click SELECT to display the ALPS variables and status."
48800WHEN 2:help$+="Room Editor and enter your map details.|MClick MENU Print the room data or Import BBC room data."
48810WHEN 3:help$+="Object Editor and enter your object details.|MClick MENU to Print the objects data or Import BBC objects data."
48820WHEN 4:help$+="Message Editor.|MClick MENU to Print the messages or Import BBC messages."
48830WHEN 5:help$="This is the Alpine Software logo. It has no effect."
48840WHEN 6:help$+="Program Editor and enter the game's logic.|MClick MENU to Print the program, Import a BBC program or Run the game."
48850WHEN 7:help$+="Character Designer.|MDouble-click a 'BBC font' file to Load a character set.|MCurrent character set is saved with your game."
48860WHEN 8:help$+="Vocabulary Editor and enter nouns, verbs, adjectives etc.|MClick MENU to Print the vocabulary."
48870WHEN 9:help$="Click SELECT to swap the original data in the editors with the data values obtained during a run of the game.|MA "+CHR$128+" indicates data is original. An X indicates post-run data."
48880WHEN 10:help$+="Picture Editor and edit the picture filenames.|MClick MENU to Print the Picture list."
48890OTHERWISE help$="Click SELECT to choose an editor.|MTo load an 'Alps' file, drag its icon to this window."
48900ENDCASE
48910WHEN roomhandle
48920help$="Click SELECT to "
48930CASE h OF
48940 WHEN 1:help$+="edit the room's flags."
48950 WHEN 5:help$+="display the first room's data."
48960 WHEN 6:help$+="display the last room's data."
48970 WHEN 7:help$+="display the next room's data."
48980 WHEN 8:help$+="display the previous room's data."
48990 WHEN 9:help$+="move forward 10 rooms."
49000 WHEN 10:help$+="move back 10 rooms."
49010 WHEN 11:help$+="enter the displayed data."
49020 WHEN 12:help$+="make this the last room."
49030 WHEN 54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69:help$="Click MENU to edit the exit flags."
49040 OTHERWISE help$=""
49050ENDCASE
49060WHEN objhandle
49070 help$="Click SELECT to "
49080 CASE h OF
49090  WHEN 0:help$+="edit the object's flags."
49100  WHEN 5:help$+="display the first object's data."
49110  WHEN 6:help$+="display the last object's data."
49120  WHEN 27:help$+="display the next object's data."
49130  WHEN 16:help$+="display the previous object's data."
49140  WHEN 20:help$+="move forward 10 objects."
49150  WHEN 21:help$+="move back 10 objects."
49160  WHEN 17:help$+="enter the displayed data."
49170  WHEN 22:help$+="make this the last object."
49180  WHEN 26:help$+="create a container."
49190  OTHERWISE help$=""
49200 ENDCASE
49210WHEN texthandle
49220help$="Click SELECT to position the caret.|MClick MENU to pop up a menu.|MClick ADJUST to insert a marker."
49230WHEN design
49240help$="Click SELECT to "
49250CASE TRUE OF
49260 WHEN h=66:help$+="display next character."
49270 WHEN h=67:help$+="display previous character."
49280 WHEN h=68:help$+="choose a different character."
49290 WHEN h=64:help$="This shows the character actual size."
49300 WHEN (h>=0 AND h<64):help$+="toggle this block."
49310 OTHERWISE help$="This is the Character Designer."
49320ENDCASE
49330ENDCASE
49340b!16=&503:REM Send a message
49350b!12=ref%
49360$(b+20)=help$
49370b!0=(((20+LEN(help$)+1)DIV4)*4)+4
49380$(b+21+LEN(help$))=CHR$(0)
49390SYS "Wimp_SendMessage",17,b
49400ENDPROC
49410
49420DEF PROCreadPalette
49430FOR col=0 TO 15
49440PROCreadpal(col,16)
49450rgb(col,1)=r%:rgb(col,2)=g%:rgb(col,3)=b%
49460NEXT
49470PROCreadpal(16,24)
49480rgb(16,1)=r%:rgb(16,2)=g%:rgb(16,3)=b%
49490FOR col=17 TO 19
49500PROCreadpal(col-16,25)
49510rgb(col,1)=r%:rgb(col,2)=g%:rgb(col,3)=b%
49520NEXT
49530ENDPROC
49540
49550DEF PROCreadpal(l%,p%)
49560REM Read the rgb values for logical/physical colour l%,p%
49570SYS ReadPal,l%,p% TO R0,R1,palette%
49580r%=(palette%>> 8)AND&FF
49590g%=(palette%>>16)AND&FF
49600b%=(palette%>>24)AND&FF
49610ENDPROC

� >$.!ALPS.!RunImage
5� Copyright Alpine Software/Philip Hawthorne 1989
*� With modifications by Keith McAlpine
(!version$="5.08C, 22-Nov-1989"
2
<(� block &200,mistake 300,quitblk 100
F
P-� � � 0:� �$:� ":";�:ș"Wimp_CloseDown":�
Z
d@%=&10:ctr%=0
nmode%=�
x
testing=�
�Aresources_ok=�OS_Var("Alps$Resources") � �OS_Var("Alps$Data")
�
�ș "OS_GetEnv" � Env$
�I%=�Env$,�34,�Env$,�34)+1)
�ef$=�Env$,I%+1)
�ȕ �ef$,1)=" "
�ef$=�ef$,2)
��
�
�theLastMenu = 0 : tick$=""
�
�type$="CF8"
�
� tempBlk 4
$tempBlk = "TASK"
5ș "Wimp_Initialise",200,!tempBlk,"ALPS" � ,task%
"
,�� � resources_ok � � 1,"The ALPS resources are not available. Open up the directory viewer with !ALPS in it.":ș "Wimp_CloseDown",task%,!tempBlk:�
6�install_texted
@
�init2
J+� � dialog=�errorbox(�$,�,1,-99):� �dtA
T�new
^�assemble(armcode%)
h0�fill(text_block%,text_blocksize%,dummy_spc)
r#�fill(verb_type,2*(maxvbn+1),0)
|�fill(nref+4,nref_size-4,0)
��fill(aref+4,aref_size-4,0)
�
�clear
�'claimpoll$="":claimmenu$="":quit%=�
�
�
path$=ef$
�� ef$<>"" �
�$filename%=�leafname(ef$)
��load_all(ef$)
�#�open(ALPSmain,400,800,600,600)
��
�
��
�ș Poll,,block � reason
Ȏ reason �
 � 1: �redraw(!block)
 � 2: ș OpenW,,block
& � 3: �close(!block)
0H � 6: �checkmouse(!block,block!4,block!8,block!12,block!16,block!20)
:E � 7: �save:� User has dragged 'Alps' file icon to another window
D2 � 8: �userkeypressed(!block,block!4,block!24)
N% � 9: �menuselect(!block,block!4)
X � 17,18: �receive(block)
b �
l� quit%
vNș "Wimp_CloseDown",task%,!tempBlk:� testing � �("FX4"):�:�" at line ";�:�
��
�
�� �init2
�!�getmodeinfo:oldsize=scrnsize
�data_saved=�:loaded$=""
�� a_list$(10)
�small_areasize%=30
�!� small_area% small_areasize%
�
�(� D%(3),shade%(15),scale 15,pixtr 15
�'� ---------------------------------
�'� Manifest constants for the system
�
2maxrms=1000:maxobs=255:maxsw%=10:maxtokens=128

 listoption=2:� Default LISTO
 
*
� pos$(3)
4� I%=0 � 3:� pos$(I%):�
>
� T,B,L,R
H
R� oldpars 73
\� I%=0 � 72
f� B%:oldpars?I%=B% � &F
p�
z
�� 0,0,0,0,0,1,161,193
�� 161,193,2,1,0,128,128,0
�� 128,0,0,128,0,1,1,1
�� 1,65,1,0,0,0,65,0
�%� 130,194,130,194,193,193,129,129
�#� 193,193,131,195,1,130,128,128
�� 2,2,66,0,1,66,3,67
�� 0,1,1,65,65,65,3,0
�� 1,1,130,130,130,2,130,2
�� 2
�
�1maxlen=10:� Maximum word length in vocabulary
�
3� Room and object data block lengths (in bytes)
r_len=74:o_len=16

$*num_vars=60:� Number of ALPS variables
..var_size=num_vars*2:� 2 bytes per variable
8
B5maxmsg=65535:maxobn=255:maxvbn=255:maxconst=65535
LEmaxadj=255:maxprep=50:maxconj=10:maxspec=30:maxnoise=50:maxpix=50
V
`noun_size=3000
jverb_size=3000
tadjc_size=2000
~-prep_size=400:� Size of prepositions list
�,conj_size=50:� size of conjunctions list
�;spec_size=100:� size of 'specials' list (IT, THEM, ALL)
�4noise_size=200:� size of 'noise' list (THE,A,AN)
�=aref_size=2000:� size of adjective object reference table
�9nref_size=2000:� size of nouns object reference table
�-pix_size=1000:� size of pix filename list
�
Ά� nouns noun_size,verbs verb_size,adjects adjc_size,preps prep_size,conjs conj_size,specs spec_size,noise noise_size,pixs pix_size
�
�:� aref aref_size,nref nref_size,verb_type 2*(maxvbn+1)
�
�5noun_end=nouns+noun_size:verb_end=verbs+verb_size
�adjc_end=adjects+adjc_size:prep_end=preps+prep_size:conj_end=conjs+conj_size:spec_end=specs+spec_size:noise_end=noise+noise_size

Iaref_end=aref+aref_size:nref_end=nref+nref_size:pix_end=pixs+pix_size

� Printer codes etc
(condensed=15:reset=64
2pline$=�132,"-")
<pline2$=�79,"-")
F
PK� ------- Set up data areas for rooms and objects and clear them ------
ZB� rdata% (maxrms+1)*r_len,odata% (maxobs+1)*o_len,controom% 12
d
n� Set up the save buffers
x+initareasize=7*(maxobs+1)+22*(maxrms+1)
�=� initsave initareasize,ramsave initareasize+var_size+128
�*$controom%="0":cont_room=0:container=�
�
�+rptr=1:optr=1:last_room=1:last_object=1
�
�&� areas to store flag descriptions
�maxd%=13
�'� o_flags% maxd%*8,r_flags% maxd%*8
�
�� Set the flag descriptions
�� I%=7 � 0 �-1
�� flag$
�($(o_flags%+I%*maxd%)=�flag$,maxd%-1)
�

� I%=7 � 0 �-1
"� flag$
,($(r_flags%+I%*maxd%)=�flag$,maxd%-1)
6�
@
J� Object Flag descriptions
TG� "","",Being worn,Wearable,Scenery,Invisible,Takeable,Light source
^
h� Room flag descriptions
r%� "","","","","","",Visited,Light
|
�!� Room Exit flag descriptions
�X� Invisible,Closed door,Open door,Locked door,Unl'ked door,Blocked,Reserved,Reserved
�
�� exit_flag$(7)
�)� flag=7 � 0 �-1:� exit_flag$(flag):�
�
�� proc% 12,exit% 12,def% 12
� $proc%="":$def%="":$exit%=""
�
�8� prg_sel% = Section of program selected for editing
�1�            2=Main, 3=Proc, 4=Define, 5=Exit
�K� progval$ = STR$ value of proc or exit number or name of selected verb
�
prg_sel%=2:progval$=""

<� voc_sect% = Section of vocabulary selected for editing
&"�             1=Nouns, 2=Verbs
0voc_sect%=1
:
D6pbsize=(scrnsize � 2)+400:� size of picture buffer
N
X� picbuf pbsize
b
lprgbsize=&1000
v� prgbuf% prgbsize
�
�?� ------- Some constants for the character designer -------
�
�cur_chr%=�"A":max_chr%=125
�� charnum 12
�$charnum=""
�
�7� ------- Dimension the other arrays needed -------
�ucsize=500
�Dș "OS_File",5,"<ALPS$Resources>.ASIobjcode" � ftype,,,,codesize
�pbyte_size=148
�F� armcode% 1000,pbytes pbyte_size,work% &1100,asicode% codesize+10
�� usercode% ucsize
Lrun=asicode%:printmsg=asicode%+4:search=asicode%+12:findcode=asicode%+16
setup=asicode%+20
5�("LOAD <ALPS$Resources>.ASIobjcode "+�~asicode%)
 
� pal%(2)
*� q% &2000,erroraddr%(4)
4� indexdata% 32*24+20
>maxbuf%=&3000
H&� buffer% maxbuf%:curbuff%=buffer%
Rnh%=32:ni%=11
\,� handle%(nh%+1),wident$(nh%),wptr%(nh%)
f>� I%=0�nh%:handle%(I%)=I%-1:wident$(I%)="":�:handleSP%=nh%
p � icon%(ni%+1),iconbar$(ni%)
z.� I%=0 � ni%:icon%(I%)=-1:� iconbar$(I%):�
�icon%(ni%+1)=-1
�oldicon%=0:oldrmicon%=0
�
�8� ------ Names of icons (sprites) on icon bar ------
�L� disk35,arclogo,door,key,quill,info,listing,chardes,vocab,swap,eye,face
�
�0diskicon=0:texticon=4:progicon=6:staricon=99
�0vocabicon=8:faceicon=99:arcicon=1:swapicon=9
�%alpsicon=5:helpicon=13:eyeicon=10
�7THEkeyicon=3:THEdooricon=2:texticon=4:THEcharicon=7
�
�.� menufree% &1800:menuend%=menufree%+&1800
�� menulist% &100
	� qBlk% 256
	+dx%=2:lsY%=40:ypixel%=4:chX%=16:chY%=32
	%currentwindow%=-1:currenticon%=-1
	$spritef$=""
	.9� mb_wident% 12,filename% 64,filename2% 64,import% 64
	86� testing $filename%="demo" � $filename%="starter"
	B%$filename2%="charset":$import%=""
	L(� start(20),sys_b2% &300,os_block 50
	V
	`�KeyWordRead
	j�ErrorMsgRead
	t
	~9� ----- Define the "Wimp" and "OS" SYS numbers ------
	�Wimp=&400C0
	�CreateW=Wimp+1
	�CreateI=Wimp+2
	�DeleteW=Wimp+3
	�DeleteI=Wimp+4
	�OpenW=Wimp+5
	�CloseW=Wimp+6
	�Poll=Wimp+7
	�RedrawW=Wimp+8
	�UpdateW=Wimp+9
	�GetW=Wimp+11
	�GetWI=Wimp+&C
SetCaret=Wimp+&12

GetCaret=Wimp+&13
GetR=Wimp+&A
SetI=Wimp+&D
(GetI=Wimp+&E
2GetP=Wimp+&F
<Drag=Wimp+&10
FForceR=Wimp+&11
PCreateM=Wimp+&14
ZSetP=Wimp+&18
dReadPal=&2F
n
xF� ------ Set up our own sprite area and read the sprites in ------
�Aș "OS_File",5,"<ALPS$Resources>.AlpsSprite" � ,,,,spritesize
�spritesize+=4
�� spritearea% spritesize
�!spritearea%=spritesize
�Bș "OS_SpriteOp",266,spritearea%,"<Alps$Resources>.AlpsSprite"
�#� fontcounts% 255,mb_wident% 24
�
�6� ------ Set up the wimps and their handles ------
�
��rgb(19,3)
�+�loadtemplates("<Alps$Resources>.ALPS")
�
�+� ------ Name the window handles ------
.objhandle=handle%(�matchident("objected"))
/roomhandle=handle%(�matchident("roomedit"))
-texthandle=handle%(�matchident("texted"))
",design=handle%(�matchident("chrdesign"))
,+infohandle=handle%(�matchident("info"))
6-savehandle=handle%(�matchident("saveas"))
@8ALPSmain=handle%(�matchident("iconbar")):dialogue%=0
J(setuph=handle%(�matchident("Setup"))
Tdesticon=47:exitprogicon=48
^
hiconbar% = -2
rwindowindex%=nh%+1
|
�,�changeicon(infohandle,7,version$,dummy)
�
�;firstIconBarIcon% = �iconbar(spritearea%, "face",31,19)
�!THEmiscicon=firstIconBarIcon%
�
�
�&� ------ Define the colours ------
�barfgcol=11:barbgcol=3
�'`wbcol=0:`tbcol=2:`sco=&3:`mbcol=&B
�(`wfcol=7:`tfcol=7:`sci=&D:`tbcol2=&C
�
�cur_pal%=7:phys_col%=16
�
0first_token=&30:� Lowest keyword token value
W�find_token(keyword$(),"INC",var_token,dummy):� Tokens from here up allow variables
4�find_token(keyword$(),"DEFINE",def_token,dummy)
&3�find_token(keyword$(),"STOP",stop_token,dummy)
01�find_token(keyword$(),"END",end_token,dummy)
:3�find_token(keyword$(),"EXIT",exit_token,dummy)
D6�find_token(keyword$(),"DEFPROC",proc_token,dummy)
N3�find_token(keyword$(),"PREP",prep_token,dummy)
X9�find_token(keyword$(),"NOTPREP",notprep_token,dummy)
b
l)� ------ Set up the dictionary ------
vdict_size=1000
�%� dict% dict_size,tok$(maxtokens)
�!dict%=3:dict%?2=&80
�
�-� ------ Find the available memory ------
�memfree=(�-�)-50000
�l� memfree<0 � null=�errorbox("Not enough memory available in 'Next' slot",0,1,-99):ș "Wimp_CloseDown":�
�maxtext%=0.83*memfree
�code_size%=0.17*memfree
�
�@� ------ Areas for storing messages, switch info etc; ------
�D� text% maxtext%,swdata% 12*maxsw%,switch_vals(maxsw%),m_msg% 12
�� switch_buf% 2*maxsw%+1
�'$swdata%=�12*maxsw%,�13):$m_msg%=""



,� ------ Initialise the text area ------

,!text%=1:text%!2=&B:text%!6=0:text%!10=0

 � st_msg% 12,end_msg% 12

*$st_msg%="1":$end_msg%="1"

4'mptr=1:� The current message number

>Etext_owner$="":� The current owner of any text in the text editor

H

Rdatavalid=�

\

f+� ------ Set up the program area ------

p� program% code_size%

z!program%=0

�program%!4=0

�
errflag=�

�

�-� ------ Set up the menu structure ------

�m_controom%=�crmenu

�� "#Number,$controom%(5)"

�m_contain=�crmenu

�&� "Container,Use room>m_controom%"

�m_chardes%=�crmenu

�� "#CHANGE TO?,$charnum(2)"

�char_fname%=�crmenu

�"� "#Filename:,$filename2%(11)"

�menu_fname%=�crmenu
!� "#Filename:,$filename%(11)"
m_gotomsg%=�crmenu
� "$m_msg%(12)"
$m_proc%=�crmenu
.� "#Number:,$proc%(4)"
8m_def%=�crmenu
B� "#Verb:,$def%(12)"
Lm_exit%=�crmenu
V� "#Number:,$exit%(4)"
`m_listopts=�crmenu
j=� "#Display:,Vocabulary as numbers,Vocabulary as strings"
tm_import%=�crmenu
~� "#Filename:,$import%(11)"
� sw1=�crmenu:nxtsw=swdata%+12
�� "#Value:,$swdata%(12)"
�sw2=�crmenu:nxtsw=nxtsw+12
�� "#Value:,$nxtsw"
�sw3=�crmenu:nxtsw=nxtsw+12
�� "#Value:,$nxtsw"
�sw4=�crmenu:nxtsw=nxtsw+12
�� "#Value:,$nxtsw"
�sw5=�crmenu:nxtsw=nxtsw+12
�� "#Value:,$nxtsw"
�sw6=�crmenu:nxtsw=nxtsw+12
�� "#Value:,$nxtsw"
sw7=�crmenu:nxtsw=nxtsw+12

� "#Value:,$nxtsw"
sw8=�crmenu:nxtsw=nxtsw+12
� "#Value:,$nxtsw"
(sw9=�crmenu:nxtsw=nxtsw+12
2� "#Value:,$nxtsw"
<sw10=�crmenu:nxtsw=nxtsw+12
F� "#Value:,$nxtsw"
Pm_switch%=�crmenu
ZY� "#Switch,No switches,1>sw1,2>sw2,3>sw3,4>sw4,5>sw5,6>sw6,7>sw7,8>sw8,9>sw9,10>sw10"
dm_text%=�crmenu
n�� "#MSG: nnnnn,Insert,Overtype#,Cut,Copy,Paste#,Next,Previous,First,Last,Goto msg#>m_gotomsg%,Edit switch#>m_switch%,Print this"
xm_prog%=�crmenu
��� "#Program Editor,Insert,Overtype#,Cut,Copy,Paste#,Main,Procedure>m_proc%,Define>m_def%,Exit routine#>m_exit%,Print this,List options>m_listopts"
�m_vocab%=�crmenu
��� "#Vocabulary,Insert,Overtype#,Cut,Copy,Paste#,Nouns,Verbs,Adjectives,Prepositions,Conjunctions,Specials,Noise#,Print this"
�pixmenu=�crmenu
�� "#Pictures,Print"
�progmenu=�crmenu
�,� "#Program,Print,Import#>m_import%,Run"
�charmenu=�crmenu
�2� "#CharSet,Save>char_fname%,Load>char_fname%"
�vocabmenu=�crmenu
�� "#Vocabulary,Print"
�diskmenu=�crmenu
�-� "#Files,Save all>savehandle,Setup disk"
facemenu=�crmenu
� "#Actors,Print"
miscmenu=�crmenu
""� "#ALPS,Info>infohandle,Quit"
,msg2%=�crmenu
6� "$st_msg%(6)"
@msg3%=�crmenu
J� "$end_msg%(6)"
Tmsg1%=�crmenu
^/� "#From/To?,Start msg>msg2%,End msg>msg3%"
htextmenu=�crmenu
r*� "#Text,Print>msg1%,Import>m_import%"
|objmenu=�crmenu
�'� "#Objects,Print,Import>m_import%"
�*mo_user5=�crmenu:ofl%=o_flags%+maxd%*3
�#� "#Description:,$o_flags%(13)"
�$mo_user4=�crmenu:ofl%=ofl%+maxd%
�� "#Description:,$ofl%(13)"
�$mo_user3=�crmenu:ofl%=ofl%+maxd%
�� "#Description:,$ofl%(13)"
�$mo_user2=�crmenu:ofl%=ofl%+maxd%
�� "#Description:,$ofl%(13)"
�$mo_user1=�crmenu:ofl%=ofl%+maxd%
�� "#Description:,$ofl%(13)"
�$mo_user0=�crmenu:ofl%=ofl%+maxd%
�� "#Description:,$ofl%(13)"
m_objflag=�crmenu
�� "#Flags,7 Light source,6 Takeable,5 Invisible,4 Scenery,3 Wearable,2 Being worn,1 User flag>mo_user1,0 User flag>mo_user0"
roommenu=�crmenu
&%� "#Rooms,Print,Import>m_import%"
0*mr_user6=�crmenu:rfl%=r_flags%+maxd%*2
:#� "#Description:,$r_flags%(13)"
D$mr_user5=�crmenu:rfl%=rfl%+maxd%
N� "#Description:,$rfl%(13)"
X$mr_user4=�crmenu:rfl%=rfl%+maxd%
b� "#Description:,$rfl%(13)"
l$mr_user3=�crmenu:rfl%=rfl%+maxd%
v� "#Description:,$rfl%(13)"
�$mr_user2=�crmenu:rfl%=rfl%+maxd%
�� "#Description:,$rfl%(13)"
�$mr_user1=�crmenu:rfl%=rfl%+maxd%
�� "#Description:,$rfl%(13)"
�$mr_user0=�crmenu:rfl%=rfl%+maxd%
�� "#Description:,$rfl%(13)"
�m_rmflag=�crmenu
ƣ� "#Flags,7 Light,6 Visited,5 User (Trans)>mr_user5,4 User (Open)>mr_user4,3 User flag>mr_user3,2 User flag>mr_user2,1 User flag>mr_user1,0 User flag>mr_user0"
�m_exitf=�crmenu
�|� "#Flags,7 Invisible exit,6 Closed door,5 Open door,4 Locked door,3 Unlocked door,2 Blocked exit,1 Reserved,0 Reserved"
�
��
�
>� ------ Now we have the Procedures and Functions!! ------

� �getmodeinfo
 � x,y,xeig,yeig,cols
*
mode=�
4
>1ș "OS_ReadModeVariable",mode,1 � ,,textcols%
H1ș "OS_ReadModeVariable",mode,2 � ,,textrows%
Rtext_maxllen%=textcols%-2
\,ș "OS_ReadModeVariable",mode,3 � ,,cols
f,ș "OS_ReadModeVariable",mode,4 � ,,xeig
p,ș "OS_ReadModeVariable",mode,5 � ,,yeig
z0ș "OS_ReadModeVariable",mode,7 � ,,scrnsize
�*ș "OS_ReadModeVariable",mode,11 � ,,x
�*ș "OS_ReadModeVariable",mode,12 � ,,y
�-scrw=((x+1)<<xeig)-1:scrh=((y+1)<<yeig)-1
��
�
�� �clear
�$�fill(odata%,(maxobs+1)*o_len,0)
�$�fill(rdata%,(maxrms+1)*r_len,0)
�%�fill(program%+4,code_size%-20,0)
�'� PROCfill(initsave,initareasize,0)
��
�
�
� �return(x%,y%)
�col(128+12):�col(7)
>�centre(" Hit any key/button to return to the editor ",y%)
$�
.ȗ X%,Y%,B%
8
� B%=0
B
L�
Vany=�(0)
`ȗ X%,Y%,B%
j� any>0 � B%>0
t�
~
�� �centre(t$,r)
�#�(textcols%-� t$+1) � 2,r);t$;
��
�
�4� ------ General window handling routines ------
�
�� �deletewindow(I%)
�!q%=handle%(I%)
�&handle%(I%)=handleSP%:handleSP%=I%
�ș DeleteW,,q%
�wident$(I%)=""
��


� �loadtemplates(tfile$)

tmp%=0
"ș "Wimp_OpenTemplate",,tfile$
(tf_index%=0:�
2$mb_wident%="*"
<tș "Wimp_LoadTemplate",,q%+4,curbuff%,buffer%+maxbuf%,fontcounts%,mb_wident%,tf_index% � ,,curbuff%,,,,tf_index%
F+� tf_index%<>0 � �loadtemp($mb_wident%)
P� tf_index%=0
Zș "Wimp_CloseTemplate"
d�
n
x� �loadtemp(wident$)
�8I%=�matchident(wident$):� I%<>-1 � �deletewindow(I%)
�-q%!68=spritearea%    : � user sprite area
��crwindow(q%+4,wident$)
��
�
�� �highlight(I%)
��
�-ș SetCaret,handle%(I%),-1,0,0,&2000000,0
��
�
�+� �retitle(handle%,newtitle$,� handle%)
�index%=windowindex%
��
1  index%-=1: �index%<0 � 255,"Invalid window"
� handle%(index%)=handle%
!q%=handle%
"ș GetWI,,q%
,ș DeleteW,,q%
6$(q%+76)=�newtitle$,11)
@ș CreateW,,q%+4 � handle%
Jhandle%(index%)=handle%
T�
^
h� �crwindow(q%,wident$)
rș CreateW,,q% � handle%
|Am%=handleSP%:handleSP%=handle%(handleSP%):handle%(m%)=handle%
�!q%=handle%
�ș GetW,,q%
�)currentwindow%=m%:wident$(m%)=wident$
�currenticon%=-1
��highlight(m%)
��
�
�� �close(wind)
�i%=ni%+1
�
Ȏ wind �
�? � objhandle:i%=THEkeyicon:� icon%(i%)<>-1 �store_obj(optr)
�C � roomhandle: i%=THEdooricon:� icon%(i%)<>-1 �store_room(rptr)
� � texthandle
   i%=texticon
   �remove_markers
   Ȏ text_owner$ �
&      � "texted" : �store_msg
00     � "program" : � � text_ok � �store_prog
:/     � "vocab" : � � text_ok � �store_vocab
D     � "pix" : �store_pix
N   �
X   � � errflag �
b4     text_owner$="":� release Text Editor window
l5     �fill(text_block%,text_blocksize%,dummy_spc)
v   �
� � design: i%=THEcharicon
��
��� (text_owner$="program" � errflag � wind=texthandle) � (text_owner$="vocab" � errflag � wind=texthandle) � (text_owner$="pix" � errflag � wind=texthandle) � (text_owner$="texted" � errflag � wind=texthandle) �
��
�  icon%(i%)=-1
�  !block=wind
�  ș CloseW,,block
��
��
�
�� �open(handle,x,y,w,d)
�!block=handle
�block!4=x:block!8=y-d
block!12=x+w:block!16=y
block!20=0:block!24=0
block!28=-1
 ș OpenW,,block
*�
4
>� �redraw(handle)
Hblock!0=handle
Rș RedrawW,0,block � more%
\�info(block+4)
f/� handle=texthandle � dummy=�redraw_text(�)
p�
z
�� �forceR(handle)
�/� Force the given window ONLY to be redrawn
��getw(handle)
�<ș ForceR,handle,scx%,scy%-(y1%-y0%),scx%+(x1%-x0%),scy%
��
�
�� �matchident(A$)
�� A$="" � =-1
�� I%
�*I%=nh%+1:�I%=I%-1:�A$=wident$(I%)�I%=0
��A$=wident$(I%)�=I%�=-1
�
�� �getw(handle%)
� handle%=iconbar%  �
!!block=handle%:șGetW,0,block
4�info(block+4):bhandle%=block!28:flags%=block!32
$ontop=flags% � &20000
.�
8
B� �info(b)
L7x0%=!b:y0%=b!4:x1%=b!8:y1%=b!12:scx%=b!16:scy%=b!20
Vbx%=x0%-scx%:by%=y1%-scy%
`/gwxl%=b!24:gwyb%=b!28:gwxr%=b!32:gwyt%=b!36
j�
t
~� �getpointer
�șGetP,0,block
�Zmousex%=!block:mousey%=block!4:b%=block!8:handle%=block!12:icon%=block!16:ob%=block!20
��
�
�F� �sys_claiminputfocus(window%,icon%,xofst%,yofst%,height%,index%)
�:șSetCaret, window%,icon%,xofst%,yofst%,height%,index%
��
�
�R� �sys_getcaretposition(� window%,� icon%,� xofst%,� yofst%,� height%,� indx%)
�șGetCaret,0,b
�dwindow%=!block: icon%=block!4: xofst%=block!8: yofst%=block!12: height%=block!16: indx%=block!20
��


� �cursor(x%,y%)
^�sys_claiminputfocus(texthandle,-1,(x%-1)*chX%,-y%*lsY%-9*ypixel%,&1000000 �10*ypixel%,-1)
�
(
2� �text_menubox
<Ȏ text_owner$ �
F� "texted"
P  tick$="message"
Z  null = �tick_message
dB  ș CreateM,0,m_text%,mousex%-64,mousey%:claimmenu$="message"
n  theLastMenu = m_text%
x
�� "program"
�  tick$="program"
�  null = �tick_program
�B  ș CreateM,0,m_prog%,mousex%-64,mousey%:claimmenu$="program"
�  theLastMenu = m_prog%
�
�
� "vocab"
�  tick$="vocab"
�  null = �tick_vocab
�A  ș CreateM,0,m_vocab%,mousex%-64,mousey%:claimmenu$="vocab"
�  theLastMenu = m_vocab%
�
��

�

"<� �checkmouse(mousex%,mousey%,button%,handle%,icon%,ob%)
,�handle%=-1 � �
6�getw(handle%)
@�handle%=ALPSmain �
J  �icon%<>-1 �
T#�    icon% -= firstIconBarIcon%
^
    Ȏ� �
h0      �(button%�1)=1 : � adjust does nothing
r<      �(button%�2)=2 : void=�("FNmenu_"+iconbar$(icon%))
|)      �(button%�4)=4 : �openup(icon%)
�	    �
�  �
��
�  � handle%=iconbar% �
�  � The RISC OS icon bar
�  Ȏ � �
�)    � (button%�2)=2 : void=�menu_misc
�    � (button%�4)=4
�C    � icon%=firstIconBarIcon% � �open(ALPSmain,400,800,600,600)
�  �
�   �
�    index%=windowindex%
�
     �
5      index%-=1: �index%<0 � 255,"Invalid window"
"     � handle%(index%)=handle%
+    void=�("FNbutton_"+wident$(index%))
&  �
0�
:�
D
N)� �userkeypressed(handle%,icon%,key%)
X�getw(handle%)
b�index%
lindex%=windowindex%
v�
�index%-=1: �index%<0 � �
��handle%(index%)=handle%
�)void=�("FNkeypress_"+wident$(index%))
��
�
� � �menuselect(item0%,item1%)
�#ș "Wimp_GetPointerInfo",,block
�buTTon = block!8
�&void=�("FNmenuselect_"+claimmenu$)
�� buTTon=1 �
�:   � *** ADJUST pressed so keep the menu structure ***
�    null = �("FNtick_"+tick$)
�#   ș CreateM,0,theLastMenu,0,0
�
   claimmenu$=""
�
 �
*
4*� �update(handle%,ux0%,uy0%,ux1%,uy1%)
>H!block=handle%:block!4=ux0%:block!8=uy0%:block!12=ux1%:block!16=uy1%
H-ș UpdateW,0,block � more%:�info(block+4)
R�
\
f� �openup(icon%)
p� icon%(icon%)=-1 �
z�  � icon%<>diskicon � icon%<>texticon � icon%<>arcicon � icon%<>swapicon � icon%<>progicon � icon%<>vocabicon � icon%<>eyeicon � icon%(icon%)=icon%
�   Ȏ icon% �
�     � diskicon:
�6          ș CreateM,0,diskmenu,mousex%-64,mousey%
�6          � loaded$<>"" � f$=path$ � f$="AlpsFile"
�/          �changeicon(savehandle,2,f$,void)
�?          claimmenu$="disk35":theLastMenu=diskmenu:tick$=""
�     � WHEN THEmiscicon:
�<          � *********** do nothing for this icon *******
�     � texticon:
�           � text_owner$="" �
�:            �retitle(texthandle,"MESSAGES",texthandle)
�1            �open(texthandle,0,1000,scrw,400)
�.            text_owner$="texted":text_ok=�
            �show_msg(mptr)
          �
            � 7
$          �
.     � THEdooricon:
8E          �open(handle%(�matchident("roomedit")),0,720,1280,1040)
B!          �restore_room(rptr)
L     � THEkeyicon:
VE          �open(handle%(�matchident("objected")),850,560,800,680)
`           �restore_obj(optr)
j     � progicon:
t           � text_owner$="" �
~9            �retitle(texthandle,"PROGRAM",texthandle)
�1            �open(texthandle,0,1000,scrw,400)
�/            text_owner$="program":text_ok=�
�(            �list(prg_sel%,progval$)
�          �
�            � 7
�          �
�     � THEcharicon:
�E          �open(handle%(�matchident("chrdesign")),0,560,1280,860)
�$          �display_chr(cur_chr%)
�6          �changeicon(design,64,�(cur_chr%),dummy)
�     � vocabicon:
�           � text_owner$="" �
<            �retitle(texthandle,"VOCABULARY",texthandle)

1            �open(texthandle,0,1000,scrw,400)
-            text_owner$="vocab":text_ok=�
&            �list_vocab(voc_sect%)
(          �
2            � 7
<          �
F     � helpicon:
P?          �open(handle%(�matchident("HELP")),0,500,960,400)
Z     � eyeicon:
d           � text_owner$="" �
n:            �retitle(texthandle,"PICTURES",texthandle)
x1            �open(texthandle,0,1000,scrw,400)
�+            text_owner$="pix":text_ok=�
�            �list_pix
�          �
�            � 7
�          �
�)     � arcicon:dummy=�keypress_status
�     � swapicon
�-     datavalid=� datavalid:� 7:�swap_data
�     � datavalid �
�8      �changeicon(ALPSmain,swapicon,"swap",swapicon)
�
     �
�:      �changeicon(ALPSmain,swapicon,"swap_x",swapicon)
�
     �
     �forceR(ALPSmain)

     �
�
"�
,
6
@J�  ------ `button` routines to deal with clicks in given window ------
J
T� �button_texted
^�mx%,my%
h� button%<>2 �
r�getpointer
|)mx%=(mousex%-bx%+chX%�4) �(�(chX%-1))
�-my%=(mousey%-by%) - ((mousey%-by%) �lsY%)
�text_col%=1+mx% �chX%
�$text_row%=-((mousey%-by%) �lsY%)
�-� text_row%>last_row% text_row%=last_row%
�K� text_col%>text_rowlen%(text_row%) text_col%=text_rowlen%(text_row%)+1
�� text_col%<1 text_col%=1
��
�
�Ȏ button% �
�� 2
��text_menubox
�� 4
��locate_ptr
  �cursor(text_col%,text_row%)
 � 1
 � text_owner$<>"pix" �
 &�locate_ptr
 0
� mrk<2 �
 :mark(mrk)=text_ptr%
 D)col(mrk)=text_col%:row(mrk)=text_row%
 Nasc(mrk)=?text_ptr%
 X/� asc(mrk)=13 � �23,dummy_cr � �23,chr(mrk)
 b?os_block=asc(mrk)
 lș "OS_Word",&A,os_block
 v� R%=1 � 8
 �row_value=R%?os_block
 �� row_value � &FF
 ��
 �=� asc(mrk)=13 � ?text_ptr%=dummy_cr � ?text_ptr%=chr(mrk)
 �h�update(texthandle,chX%*(text_col%-1),-(text_row%+1)*lsY%,chX%*(text_col%-1)+chX%,-(text_row%)*lsY%)
 �dummy=�redraw_text(�)
 �
mrk+=1
 � �cursor(text_col%,text_row%)
 ��
 ��
 ��
 �=0
 �
!� �locate_ptr
!text_ptr%=text_block%
!� text_row%>0 �
!   � R%=0 � text_row%-1
!*#    text_ptr%+=text_rowlen%(R%)
!47    � text_rowlen%(R%)<text_maxllen% � text_ptr%+=1
!>  �
!H�
!Rtext_ptr%+=text_col%-1
!\/� text_ptr%>text_end% � text_ptr%=text_end%
!f�
!p
!z� �button_objected
!�Ȏ icon% �
!�� 0:
!�
!�2� First set the 'tick' bits for each menu item
!�null = �tick_objected
!�Cș CreateM,0,m_objflag,mousex%-64,mousey%:claimmenu$="objected"
!�tick$="objected"
!�theLastMenu = m_objflag
!�
!�� 5:�first_obj
!�� 6:�last_obj
!�� 27:�next_obj
!�� 16:�prev_obj
"� 20:�fwd_obj(10)
"� 21:�rewind_obj(10)
"� 17
"$�store_obj(optr)
".%optr=�(�geticondata(objhandle,7))
"8� optr<1 � optr=1
"B� optr>maxobs � optr=maxobs
"L�restore_obj(optr)
"V� 22:last_object=optr
"`	� 26:
"jDș CreateM,0,m_contain,mousex%-64,mousey%:claimmenu$="container"
"ttick$=""
"~theLastMenu = m_contain
"�
"��
"�4� optr>last_object last_object=optr:data_saved=�
"�=0
"�
"�� �button_roomedit
"�Ȏ icon% �
"�� 1:
"�tick$="roomedit"
"�null = �tick_roomedit
"�Bș CreateM,0,m_rmflag,mousex%-64,mousey%:claimmenu$="roomedit"
"�theLastMenu = m_rmflag
#
#
� 5:�first_room
#� 6:�last_room
#� 7:�next_room
#(� 8:�prev_room
#2� 9:�fwd_room(10)
#<� 10:�rewind_room(10)
#F� 11
#P�store_room(rptr)
#Z'rptr=�(�geticondata(roomhandle,33))
#d� rptr<1 � rptr=1
#n� rptr>maxrms � rptr=maxrms
#x�restore_room(rptr)
#�
#�� 12:last_room=rptr
#��
#�0� rptr>last_room last_room=rptr:data_saved=�
#�
#�8� Now check for clicking menu on selected EXITR icon
#�
#�
Ȏ � �
#�
#�� icon%>53 � icon%<70
#�
#�oldrmicon%=icon%
#�null = �tick_exitedit
$tick$="exitedit"
$Aș CreateM,0,m_exitf,mousex%-64,mousey%:claimmenu$="exitedit"
$theLastMenu = m_exitf
$"
$,�
$6=0
$@
$J� �button_chrdesign
$T
Ȏ � �
$^� icon%>=0 � icon%<64
$h)  �set_icon(design,icon%,&50000000,0)
$r  �write_chr(cur_chr%)
$|  �set_icon(design,64,0,0)
$�� icon%=66
$�  cur_chr%+=1
$�+  � cur_chr%>max_chr% cur_chr%=max_chr%
$�.  �changeicon(design,64,�(cur_chr%),icon%)
$�  �display_chr(cur_chr%)
$�� icon%=67
$�  cur_chr%-=1
$�  � cur_chr%<32 cur_chr%=32
$�.  �changeicon(design,64,�(cur_chr%),icon%)
$�  �display_chr(cur_chr%)
$�� icon%=68
$�D  ș CreateM,0,m_chardes%,mousex%-64,mousey%:claimmenu$="chrdef"
$�'  theLastMenu = m_chardes%:tick$=""
%�
%=0
%
%&
%0� �button_info
%:� icon%=5 �
%D�close(infohandle)
%N�
%X=0
%b
%l� �button_saveas
%vȎ icon% �
%�/� 0 : �save_all(�geticondata(savehandle,2))
%�� 1 : �getw(savehandle)
%�.         dummy$=�geticondata(savehandle,1)
%�*         block!4=5:block!8=block!8+bx%
%�"         block!12=block!12+by%
%�"         block!16=block!16+bx%
%�"         block!20=block!20+by%
%�B         block!24=0:block!28=0:block!32=scrw+1:block!36=scrh+1
%�%         ș "Wimp_DragBox",,block
%��
%�=0
%�
%�� �button_Setup
&Ȏ icon% �
&� 0
&C� 1:�create_dirs(�geticondata(setuph,2),�geticondata(setuph,5))
& �
&*�close(setuph)
&4ȗ ȓ 0,0,scrw,scrh
&>=0
&H
&RK�  ------ `keypress` routines deal with pressing key `key%` in a window
&\
&f� �keypress_texted
&p
Ȏ � �
&z-� key%=13:�newline:data_saved=�:text_ok=�
&�� key%=&18F:�up
&�� key%=&18E:�down
&�� key%=&18D:�right
&�)� key%=&18A:� I%=1 � tab_set:�right:�
&�(� key%=&19A:� I%=1 � tab_set:�left:�
&�� key%=&18C:�left
&�3� key%=&1AB:�delete_line:data_saved=�:text_ok=�
&�3� key%=&1ED:�insert_line:data_saved=�:text_ok=�
&�� key%=&1AC:�left_end
&�� key%=&1AD:�right_end
&�:� key%=&18B:�right:�delete_char:data_saved=�:text_ok=�
&�%� key%=&1CD:overwrite=� overwrite
&�2� key%=127:�delete_char:data_saved=�:text_ok=�
'� (key%>31) � (key%<126)
'<� overwrite � �overwrite_char(key%) � �insert_char(key%)
'data_saved=�:text_ok=�
'$ ș "Wimp_ProcessKey",key%
'.�
'8
'B �cursor(text_col%,text_row%)
'L=0
'V
'`� �keypress_saveas
'jQ� key%=13 � �save_all(�geticondata(savehandle,2)) � ș "Wimp_ProcessKey",key%
'~=0
'�
'�� �keypress_objected
'�� key%=13 � icon%=7 �
'�  �store_obj(optr)
'�+  optr=�(�geticondata(objhandle,icon%))
'�  � optr<1 � optr=1
'�!  � optr>maxobs � optr=maxobs
'�  �restore_obj(optr)
'��
'�
'�
Ȏ key% �
'�$� 13,&18E:� Return or down arrow
(� icon%<15 �
(
  icon%+=1
(�
(
  icon%=7
((�
(2� &18F:� Up arrow
(<� icon%>7 �
(F  icon%-=1
(P�
(Z  icon%=15
(d�
(n ș "Wimp_ProcessKey",key%
(x�
(�Q�sys_claiminputfocus(objhandle,icon%,0,0,-1,�(�geticondata(objhandle,icon%)))
(�=0
(�
(�� �keypress_roomedit
(�
Ȏ key% �
(�� 13,&18E,&18F
(�
(�� key%=13 � icon%=33 �
(�  �store_room(rptr)
(�,  rptr=�(�geticondata(roomhandle,icon%))
(�  � rptr<1 � rptr=1
(�!  � rptr>maxrms � rptr=maxrms
(�  �restore_room(rptr)
)�
)
)� key%=13 � key%=&18E �
)"
Ȏ � �
),� icon%=37:newicon%=71
)6� icon%=71:newicon%=38
)@� icon%=69:newicon%=33
)J� icon%<37:newicon%=icon%+1
)T-� (icon%>37 � icon%<54):newicon%=icon%+16
)^-� (icon%>53 � icon%<69):newicon%=icon%-15
)h�
)r�
)|
)�� key%=&18F �
)�
Ȏ � �
)�� icon%=71:newicon%=37
)�� icon%=38:newicon%=71
)�� icon%=33:newicon%=69
)�� icon%>33:newicon%=icon%-1
)�-� (icon%>37 � icon%<54):newicon%=icon%-16
)�-� (icon%>53 � icon%<69):newicon%=icon%+15
)��
)��
)�
)� ș "Wimp_ProcessKey",key%
)��
)�Y�sys_claiminputfocus(roomhandle,newicon%,0,0,-1,�(�geticondata(roomhandle,newicon%)))
*=0
*
*� �keypress_status
*&�col(128+2)
*0
� 26,4,12
*:�col(9):�col(128+7)
*D<�centre(�27," ")+"System Status Information"+�28," "),0)
*N�col(128+2):�col(7)
*X�status
*b�col(128+7):�col(9)
*l5�centre(�31," ")+"Integer Variables"+�32," "),10)
*v�col(128+2):�col(7)
*�	�lvar
*��:�return(18,31):�
*�
� 26,5
*�"ș ForceR,-1,0,0,scrw+1,scrh+1
*�=0
*�
*�� �keypress_chrdef
*�� key%=13 � icon%=64 �
*�*cur_chr%=�(�geticondata(design,icon%))
*��display_chr(cur_chr%)
*�,�changeicon(design,64,�(cur_chr%),icon%)
*��
*�*� key%<>13 � ș "Wimp_ProcessKey",key%
*��
*�=0
*�
+� �keypress_Setup
+0� key%=&18E � key%=13 � icon%=2 � newicon%=5
+7� key%=13 � icon%=5 � icon%=1:void=�button_Setup:=0
+ &� key%=&18E � icon%=5 � newicon%=2
+*&� key%=&18F � icon%=5 � newicon%=2
+4&� key%=&18F � icon%=2 � newicon%=5
+5D� key%<>13 � key%<>&18E � key%<>&18F � ș "Wimp_ProcessKey",key%
+>Q�sys_claiminputfocus(setuph,newicon%,0,0,-1,�(�geticondata(setuph,newicon%)))
+H=0
+R
+\A� ------ The `menu` routines to open the selected menu ------
+f
+p� �menu_
+z=0
+�
+�� �menu_swap
+�=0
+�
+�� �menu_arclogo
+�=0
+�
+�� �menu_info
+�=0
+�
+�
+�� �menu_disk35
+�,ș CreateM,0,diskmenu,mousex%-64,mousey%
,,� loaded$<>"" � f$=path$ � f$="AlpsFile"
,%�changeicon(savehandle,2,f$,void)
,theLastMenu= diskmenu
,$ claimmenu$="disk35":tick$=""
,.=0
,8
,B
,L� �menu_key
,V+ș CreateM,0,objmenu,mousex%-64,mousey%
,`theLastMenu = objmenu
,jclaimmenu$="key":tick$=""
,t=0
,~
,�� �menu_door
,�,ș CreateM,0,roommenu,mousex%-64,mousey%
,�theLastMenu = roommenu
,�claimmenu$="door":tick$=""
,�=0
,�
,�� �menu_quill
,�$end_msg%=�(�maxmsg)
,�,ș CreateM,0,textmenu,mousex%-64,mousey%
,�theLastMenu = textmenu
,�claimmenu$="quill":tick$=""
,�=0
-
-

-� �menu_listing
-,ș CreateM,0,progmenu,mousex%-64,mousey%
-(theLastMenu = progmenu
-2!claimmenu$="listing":tick$=""
-<=0
-F
-P
-Z� �menu_chardes
-d=0
-n,ș CreateM,0,charmenu,mousex%-64,mousey%
-xtheLastMenu = charmenu
-�!claimmenu$="chardes":tick$=""
-�=0
-�
-�� �menu_vocab
-�-ș CreateM,0,vocabmenu,mousex%-64,mousey%
-�theLastMenu = vocabmenu
-�$claimmenu$="vocabulary":tick$=""
-�=0
-�
-�� �menu_face
-�,ș CreateM,0,facemenu,mousex%-64,mousey%
-�theLastMenu = facemenu
-� claimmenu$="actors":tick$=""
.=0
.
.� �menu_misc
."null = �tick_misc
.,<ș CreateM,0,miscmenu,mousex%-64,�menuHeight(miscmenu,1)
.6theLastMenu = miscmenu
.@"claimmenu$="misc":tick$="misc"
.J=0
.T
.^� �menu_help
.h=0
.r
.|
.�� �menu_eye
.�+ș CreateM,0,pixmenu,mousex%-64,mousey%
.�theLastMenu = pixmenu
.�claimmenu$="eye":tick$=""
.�=0
.�
.�
.�J� `menuselect` functions - called when a selection is made from a menu
.�D� `item0%` is the number of selection from first menu (0,1,2...)
.�E� `item1%` is the number of selection from second menu (0,1,2...)
.�
.�� �menuselect_
.�=0
/
/
/� �menuselect_message
/&� changed_msg
/0
/:Ȏ item0% �
/D
  � -1
/N!  � 0,1:overwrite=� overwrite
/X&  � 2:�cut(mark(0),mark(1),picbuf)
/b'  � 3:�copy(mark(0),mark(1),picbuf)
/l"  � 4:�paste(text_ptr%,picbuf)
/v  � 5:�next_msg
/�  � 6:�prev_msg
/�  � 7:�first_msg
/�  � 8:�last_msg
/�  � 9:�goto_msg(�($m_msg%))
/�
  � 10
/�  � item1%>-1 �
/�    � item1%=0 �
/�      � I%=0 � maxsw%
/�        switch_vals(I%)=0
/�      � I%
/�	    �
/�7    switch_vals(item1%)=�($(swdata%+12*(item1%-1)))
/�7    � item1%>switch_vals(0) � switch_vals(0)=item1%
06    � switch_vals(0) stores the number of switches
0  �
0
  � 11
0 
  *FX3,10
0*  �print_msg(mptr)
04  *FX3,0
0>�
0H�forceR(texthandle)
0R� changed_msg �
0\text_row%=0:text_col%=1
0f�cursor(1,0)
0p�
0z� claimmenu$=""
0�=0
0�
0�� �cut(start,end,buf)
0�� mrk<2 � � 1,error$(29)
0�Q� end<start � Ȕ start,end:Ȕ col(0),col(1):Ȕ row(0),row(1):Ȕ asc(0),asc(1)
0�cliplen=end-start+1
0��move(start,buf,cliplen)
0�&� SYS"Wimp_CloseDown":MODE 12:STOP
0�;�move(end+1,start,text_end%-end):� was +1 until 16.6.89
0�&?buf=asc(0):buf?(cliplen-1)=asc(1)
0�text_end%=text_end%-cliplen
0�� asc(1)=0 � text_end%+=1
0�+� Restore end marker if it has been cut
13� text_end%<text_block% � text_end%=text_block%
1?text_end%=0
1last_row%=�find_lastrow
1$� I%=0 � last_row%
1.text_rowlen%(I%)=��row(I%)
18�
1Bmrk=0:mark()=+0
1L/� text_row%>last_row% � text_row%=last_row%
1VM� text_col%>text_rowlen%(text_row%) � text_col%=text_rowlen%(text_row%)+1
1`,�locate_ptr:�cursor(text_col%,text_row%)
1jdata_saved=�:text_ok=�
1t�
1~
1�� �copy(start,end,buf)
1�� mrk<2 � � 1,error$(29)
1�Q� end<start � Ȕ start,end:Ȕ col(0),col(1):Ȕ row(0),row(1):Ȕ asc(0),asc(1)
1�cliplen=end+1-start
1��move(start,buf,cliplen)
1�&?buf=asc(0):buf?(cliplen-1)=asc(1)
1�-?start=asc(0):?end=asc(1):mrk=0:mark()=+0
1��
1�
1�� �paste(to,from)
1� � cliplen=0 � � 1,error$(30)
1�'�move(to,to+cliplen,text_end%-to+1)
2�move(from,to,cliplen)
2
text_end%+=cliplen
2last_row%=�find_lastrow
2� I%=0 � last_row%
2(text_rowlen%(I%)=��row(I%)
22�
2<,�locate_ptr:�cursor(text_col%,text_row%)
2Fdata_saved=�:text_ok=�
2P�
2Z
2d� �menuselect_program
2n
errflag=�
2x� item0%>4 � item0%<9 �
2��remove_markers
2�� � text_ok � �store_prog
2�prg_sel%=item0%-3
2�text_row%=0:text_col%=1
2��cursor(1,0)
2��
2�
2�Ȏ item0% �
2�� 0,1:overwrite=� overwrite
2�$� 2:�cut(mark(0),mark(1),picbuf)
2�%� 3:�copy(mark(0),mark(1),picbuf)
2� � 4:�paste(text_ptr%,picbuf)
2�� 5:progval$=""
3� 6:progval$=$proc%
3� 7:progval$=$def%
3� 8:progval$=$exit%
3"� 9:�print_prog_seg
3,� 10:�listo
36�
3@
3J� (item0%>4 � item0%<9) �
3T � � errflag �
3^  �list(item0%-3,progval$)
3h  �forceR(texthandle)
3r �
3|�
3�� (item0%>1 � item0%<5) �
3��forceR(texthandle)
3��
3�� item0%=10 �
3�� � text_ok � �store_prog
3�� � errflag �
3�text_row%=0:text_col%=1
3��cursor(1,0)
3��list(prg_sel%,progval$)
3��forceR(texthandle)
3��
3��
3�=0
4
4� �menuselect_vocab
46� Make a selection from the vocabulary editor menu
4&Ȏ item0% �
40� 0,1:overwrite=� overwrite
4:$� 2:�cut(mark(0),mark(1),picbuf)
4D%� 3:�copy(mark(0),mark(1),picbuf)
4N � 4:�paste(text_ptr%,picbuf)
4X� 5,6,7,8,9,10,11
4b$�remove_markers:� Added 23.08.89
4l� � text_ok � �store_vocab
4v� � errflag �
4�voc_sect%=item0%-4
4��list_vocab(voc_sect%)
4�text_row%=0:text_col%=1
4��cursor(1,0)
4��
4�� 12:�print_prog_seg
4��
4�Ȏ item0% �
4�� 2,3,4,5,6,7,8,9,10,11
4��forceR(texthandle)
4��
4�� claimmenu$=""
4�=0
5
5� �menuselect_exitedit
5xerr%=�
5 � oldrmicon%<>0 �
5*)  ptr%=(rdata%+rptr*r_len+oldrmicon%)
54  flags%=?ptr%
5>  cl_door%=flags% � &40
5H  op_door%=flags% � &20
5R  lk_door%=flags% � &10
5\  unlk_door%=flags% � &8
5f%  � cl_door% � item0%=2 � xerr%=�
5p%  � op_door% � item0%=1 � xerr%=�
5z%  � op_door% � item0%=3 � xerr%=�
5�'  � unlk_door% � item0%=3 � xerr%=�
5�%  � lk_door% � item0%=4 � xerr%=�
5�%  � lk_door% � item0%=2 � xerr%=�
5�  � xerr% �
5�    � 7
5�  �
5�#  ?ptr%=?ptr% � (&80 >> item0%)
5�  � � lk_door% � item0%=3 �
5�+    ?ptr%=?ptr% � %11011111 � %01000000
5�  �
5�  � lk_door% � item0%=1 �
5�    ?ptr%=?ptr% � %11101111
5�  �
6  �
6  data_saved=�
6�
6$� claimmenu$=""
6.=0
68
6B� �menuselect_disk35
6LȎ item0% �
6V	  � 0
6`(    path$=�geticondata(savehandle,2)
6j$    ș "OS_File",5,path$ � ftype
6te    � ftype=0 � �save_all(path$) � �ensure(item0%,"This file exists. Do you want to replace it?")
6~	  � 1
6�*    �load_bits(�geticondata(setuph,2))
6�    �setup_disk(item0%)
6��
6�&icon%(diskicon)=-1:� claimmenu$=""
6�=0
6�
6�
6�
6�� �menuselect_objected
6�+old_flags%=�(�geticondata(objhandle,8))
6�+new_flags%=old_flags% � (&80 >> item0%)
6�0�changeicon(objhandle,8,�(new_flags%),dummy)
7� claimmenu$=""
7
=0
7
7� �menuselect_container
7(Ȏ item0% �
72� 0
7<container=� container
7F� container �
7P.�changeicon(objhandle,26,"SIZE <C>",dummy)
7Z�
7d*�changeicon(objhandle,26,"SIZE",dummy)
7n�
7x� 1
7�cont_room=�($controom%)
7��
7�� data_saved=FALSE
7�� claimmenu$=""
7�=0
7�
7�� �menuselect_roomedit
7�-old_flags%=�(�geticondata(roomhandle,34))
7�+new_flags%=old_flags% � (&80 >> item0%)
7�2�changeicon(roomhandle,34,�(new_flags%),dummy)
7�� claimmenu$=""
7�=0
7�
8� �menuselect_key
8Ȏ item0% �
8  � 0:�print_objs
8"$  � 1:�import_obj("O."+$import%)
8,�
86� claimmenu$=""
8@=0
8J
8T� �menuselect_door
8^Ȏ item0% �
8h  � 0:�print_rooms
8r&  � 1:�import_rooms("R."+$import%)
8|�
8�� claimmenu$=""
8�=0
8�
8�� �menuselect_quill
8�Ȏ item0% �
8�  � 0:�print_text
8�%  � 1:�import_text("T."+$import%)
8�&         �load_dict("D."+$import%)
8��
8�� claimmenu$=""
8�=0
8�
8�� �menuselect_listing
9Ȏ item0% �
9  � 0:�print_program
9  � 1:�convert($import%)
9&  � 2:�run
90�
9:� claimmenu$=""
9D=0
9N
9X� �menuselect_chardes
9b2� When `menu` is clicked on the `chardes` icon
9lȎ item0% �
9v5� 0:�save_chars("<Users$Resources>."+$filename2%)
9�� 1
9�,�("PRINT <Alps$Resources>."+$filename2%)
9��display_chr(cur_chr%)
9�"ș ForceR,-1,0,0,scrw+1,scrh+1
9��
9�� claimmenu$=""
9�=0
9�
9�� �menuselect_chrdef
9�K� When button is clicked on the `SELECT` icon in the char design window
9�chr%=�($charnum)
9� � chr%>31 � chr%<=max_chr% �
9�  cur_chr%=chr%
:.  �changeicon(design,64,�(cur_chr%),icon%)
:  �display_chr(cur_chr%)
:�
: � claimmenu$=""
:*=0
:4
:>� �menuselect_vocabulary
:H-� When SELECT pressed in small vocab menu
:RȎ item0% �
:\� 0:�print_vocab
:f�
:p� claimmenu$=""
:z=0
:�
:�� �menuselect_actors
:�2� SELECT pressed in small 'face' menu (Actors)
:�Ȏ item0% �
:�� 0:�print_actors
:��
:�� claimmenu$=""
:�=0
:�
:�� �menuselect_eye
:�3� SELECT pressed in small 'eye' menu (Pictures)
:�Ȏ item0% �
:�� 0:�print_pix
;�
;� claimmenu$=""
;=0
;$
;.� �menuselect_misc
;8Ȏ item0% �
;B � 1: � quit
;L  �quit(4)
;V �
;`icon%(THEmiscicon)=-1
;j=0
;t
;~
;�D� ------ Utility procedures and functions for each editor ------
;�
;�0� ------ Character designer utilities ------
;�
;�� �write_chr(C%)
;�� 23,C%
;�� row%=0 � 7
;�row_value=0
;�� col%=0 � 7
;�-dummy=�(�geticondata(design,row%*8+col%))
;�bit=flags% >>> 28
;�,� bit=7 � row_value=row_value+2^(7-col%)
<
� col%
<
� row_value
<
� row%
<�
<(
<2� �display_chr(C%)
<<?os_block=C%
<Fș "OS_Word",&A,os_block
<P� R%=1 � 8
<Zrow_value=R%?os_block
<d� C%=0 � 7
<nbit=row_value � 2^(7-C%)
<x"row_value=row_value � 2^(7-C%)
<�q� bit>0 �set_icon(design,(R%-1)*8+C%,&70000000,&F0000000) � �set_icon(design,(R%-1)*8+C%,&20000000,&F0000000)
<�� C%
<�� R%
<��
<�
<�� �save_chars(f$)
<�f%=�(f$)
<�� ch%=32 � max_chr%
<��#f%,23:�#f%,ch%
<�?os_block=ch%
<�ș "OS_Word",&A,os_block
<�� I%=1 � 8
<��#f%,I%?os_block
=� I%
=	� ch%
=�#f%
=" �("SETTYPE "+f$+" BBC Font")
=,�
=6
=@� �save_pal(f$)
=J� ch%,col1,rgb
=T�readPalette
=^ch%=� f$
=h� col=0 � 19
=r� rgb=1 � 3
=|�#ch%,rgb(col,rgb)
=�	� rgb
=�	� col
=�	�#ch%
=�� "SETTYPE "+f$+" FED"
=��
=�
=�
=�
=�)� ------ Text editor utilities ------
=�
=�� �left
=�� text_col%<>1 �
=�  text_ptr%-=1
>  text_col%-=1
>�
>  � text_row%<>0 �
>&    text_row%-=1
>0+    text_col%=text_rowlen%(text_row%)+1
>:>    � text_rowlen%(text_row%)<text_maxllen% � text_ptr%-=1
>D  �
>N    � 7
>X  �
>b�
>l�
>v
>�� �left_end
>�text_ptr%-=(text_col%-1)
>�text_col%=1
>��
>�
>�� �right
>�A� text_row%=last_row% � text_col%=text_rowlen%(text_row%)+1 �
>�	  � 7
>��
>�0  � This '<' was changed to '<=' on 23.08.89
>�/  � text_col%<=text_maxllen% � text_ptr%+=1
>�  text_col%+=1
>�D  � text_col%>text_rowlen%(text_row%)+1 � text_row%<>last_row% �
?     text_col%=1:text_row%+=1
?  �
?�
? �
?*
?4� �right_end
?>4text_ptr%+=(text_rowlen%(text_row%)-text_col%)+1
?H'text_col%=text_rowlen%(text_row%)+1
?R8� IF text_col%>text_maxllen% text_col%=text_maxllen%
?\�
?f
?p� �down
?z5� text_row%=text_maxrows% � text_row%=last_row% �
?�	  � 7
?��
?�  text_row%+=1
?�  old_col%=text_col%
?�+  � text_rowlen%(text_row%)<text_col% �
?�+    text_col%=text_rowlen%(text_row%)+1
?�  �
?�?  text_ptr%+=(text_rowlen%(text_row%-1)-old_col%+text_col%)
?�<  � text_rowlen%(text_row%-1)<text_maxllen% text_ptr%+=1
?��
?��
?�
?�	� �up
@� text_row%<>0 �
@  text_row%-=1
@  old_col%=text_col%
@$+  � text_rowlen%(text_row%)<text_col% �
@.+    text_col%=text_rowlen%(text_row%)+1
@8  �
@B?  text_ptr%-=(old_col%+(text_rowlen%(text_row%)-text_col%))
@L:  � text_rowlen%(text_row%)<text_maxllen% text_ptr%-=1
@V�
@`	  � 7
@j�
@t�
@~
@�� �newline
@�old_col%=text_col%
@��insert_char(13)
@�text_row%+=1
@�text_col%=1
@�D�update(texthandle,scx%,scy%-(y1%-y0%),scx%+(x1%-x0%)+chX%,scy%)
@�dummy=�redraw_text(�)
@��
@�
@�� �insert_char(chr%)
@�S� text_ptr%>text_end% � � I%=text_end% � text_ptr%:?I%=32:�:text_end%=text_ptr%
@�E� text_ptr%=text_end% � text_rowlen%(text_row%)<text_maxllen%-1 �
A  redraw_all%=�
A
�
A  redraw_all%=�
A�
A(
A24�move(text_ptr%,text_ptr%+1,text_end%-text_ptr%)
A<$� text_ptr%<mark(0) � mark(0)+=1
AF$� text_ptr%<mark(1) � mark(1)+=1
AP:?text_ptr%=chr%:text_ptr%+=1:text_end%+=1:?text_end%=0
AZ
Ad:� text_rowlen%(text_row%)<text_maxllen%-1 � chr%<>13 �
An2� The '-1' above added 29.08.89 to fix bug 8a.
Axtext_rowlen%(text_row%)+=1
A��
A�last_row%=�find_lastrow
A�� R%=text_row% � last_row%
A�!  text_rowlen%(R%)=� �row(R%)
A��
A��
A�
A�� redraw_all% �
A�S�update(texthandle,0,-(last_row%+1)*lsY%,scx%+(x1%-x0%)+chX%,-(text_row%)*lsY%)
A��
A�� text_col%>text_maxllen% �
A�S�update(texthandle,0,-(text_row%)*lsY%,scx%+(x1%-x0%)+chX%,-(text_row%-1)*lsY%)
A��
Bd�update(texthandle,chX%*(text_col%-1),-(text_row%+1)*lsY%,scx%+(x1%-x0%)+chX%,-(text_row%)*lsY%)
B�
B�
B"
B,� text_col%>text_maxllen% �
B6text_col%=2:text_row%+=1
B@-� text_row%>last_row% last_row%=text_row%
BJ�
BTtext_col%+=1
B^� text_col%>text_maxllen% �
Bh  text_col%=1:text_row%+=1
Br/  � text_row%>last_row% last_row%=text_row%
B|�
B��
B�
B�#dummy=�redraw_text(redraw_all%)
B��
B�
B�� �overwrite_char(chr%)
B�>� text_col%>text_rowlen%(text_row%) � �insert_char(chr%):�
B̈� text_ptr%=mark(0) � Ȕ mark(0),mark(1):Ȕ asc(0),asc(1):Ȕ chr(0),chr(1):mrk-=1:mark(1)=0 � � text_ptr%=mark(1) � mrk-=1:mark(1)=0
B�?text_ptr%=chr%
B�text_ptr%+=1
B�-� text_ptr%>text_end% text_end%=text_ptr%
B�?text_end%=0
B�d�update(texthandle,chX%*(text_col%-1),-(text_row%+1)*lsY%,scx%+(x1%-x0%)+chX%,-(text_row%)*lsY%)
Cdummy=�redraw_text(�)
Ctext_col%+=1
C8� text_col%>text_maxllen% � text_col%=1:text_row%+=1
C&
C0last_row%=�find_lastrow
C:
CD� R%=text_row% � last_row%
CN!  text_rowlen%(R%)=� �row(R%)
CX�
Cb�
Cl
Cv� �delete_char
C�%� text_col%=1 � text_row%=0 � 7:�
C�$� text_ptr%<mark(0) � mark(0)-=1
C�$� text_ptr%<mark(1) � mark(1)-=1
C�text_ptr%-=1:text_end%-=1
C��� text_ptr%=mark(0) � Ȕ mark(0),mark(1):Ȕ asc(0),asc(1):Ȕ chr(0),chr(1):mrk-=1:mark(1)=0 � � text_ptr%=mark(1) � mrk-=1:mark(1)=0
C�Atext_col%-=1:this_row%=text_row%:� text_rowlen%(text_row%)-=1
C�	cr%=�
C�� text_col%<1 �
C�  cr%=�
C�)  text_col%=text_rowlen%(text_row%-1)
C�"  � ?text_ptr%=13 text_col%+=1
C�  text_row%-=1
C��
D6�move(text_ptr%+1,text_ptr%,text_end%-text_ptr%+1)
D
D5� text_rowlen%(this_row%)<text_maxllen% � � cr% �
D text_rowlen%(this_row%)-=1
D*�
D4last_row%=�find_lastrow
D>� R%=text_row% � last_row%
DH!  text_rowlen%(R%)=� �row(R%)
DR�
D\�
Df�getw(texthandle)
DpP� (text_ptr%=text_end% � text_rowlen%(text_row%)<text_maxllen%-1)  � � cr% �
Dzd�update(texthandle,chX%*(text_col%-1),-(text_row%+1)*lsY%,scx%+(x1%-x0%)+chX%,-(text_row%)*lsY%)
D�  C%=text_col%
D��
D�S�update(texthandle,0,-(last_row%+2)*lsY%,scx%+(x1%-x0%)+chX%,-(text_row%)*lsY%)
D�J�  PROCupdate(texthandle,scx%,scy%-(y1%-y0%),scx%+(x1%-x0%)+chX%,scy%)
D��
D�
D�dummy=�redraw_text(�)
D��
D�
D�� �insert_line
D�$� last_row%=text_maxrows% � �7:�
D�from%=text_ptr%-text_col%+1
D� � from%<mark(0) � mark(0)+=1
E � from%<mark(1) � mark(1)+=1
E*�move(from%,from%+1,text_end%-from%+1)
E
?from%=13
E$'� R%=last_row%+1 � text_row%+1 � -1
E.'text_rowlen%(R%)=text_rowlen%(R%-1)
E8�
EBtext_rowlen%(text_row%)=0
ELtext_end%+=1:last_row%+=1
EVtext_ptr%-=text_col%-1
E`text_col%=1
EjU�update(texthandle,scx%,scy%-(y1%-y0%),scx%+(x1%-x0%)+chX%,scy%-(text_row%)*lsY%)
Etdummy=�redraw_text(�)
E~�
E�
E�� �delete_line
E�
� cr%,to%
E��remove_markers
E�<next_line%=text_ptr%+text_rowlen%(text_row%)-text_col%+1
E�*text_ptr%-=(text_col%-1):to%=text_ptr%
E�A� ?(text_ptr%+text_rowlen%(text_row%))=13 next_line%+=1:cr%=�
E�.�move(next_line%,to%,text_end%-next_line%)
E�&text_end%-=text_rowlen%(text_row%)
E�� cr% text_end%-=1
E�1� text_end%<text_block% text_end%=text_block%
E�?text_end%=0
Ftext_col%=1
F
last_row%=�find_lastrow
F
F� R%=text_row% � last_row%
F(!  text_rowlen%(R%)=� �row(R%)
F2�
F<
FFZ� PROCupdate(texthandle,scx%,scy%-(y1%-y0%),scx%+(x1%-x0%)+chX%,scy%-(text_row%)*lsY%)
FPD�update(texthandle,scx%,scy%-(y1%-y0%),scx%+(x1%-x0%)+chX%,scy%)
FZdummy=�redraw_text(�)
Fd�
Fn
Fx� �install_texted
F�text_maxrows%=500
F�text_blocksize%=20000
F�text_original%=�
F�!� text_rowlen%(text_maxrows%)
F�-� default_text_block% text_blocksize%+300
F�#text_block%=default_text_block%
F�dummy_spc=27:dummy_cr=253
F�!�23,dummy_spc,0,0,0,0,0,0,0,0
F� �23,dummy_cr,0,0,0,0,0,0,0,0
F�text_row%=0
F�text_col%=1
F�last_row%=0
F�text_cur%=�
Goverwrite=�
G
tab_set=5
Gtext_ptr%=text_block%
G"text_end%=text_block%
G,?text_block%=0
G6Omrk=0:� mark(1),row(1),col(1),chr(1),asc(1):chr(0)=254:chr(1)=255:cliplen=0
G@�
GJ
GT� �remove_markers
G^� I%
Gh
� mrk>0 �
Gr
mrk-=1
G|� I%=0 � mrk
G� ?mark(I%)=asc(I%):mark(I%)=0
G��
G�	mrk=0
G��
G��
G�
G�� �find_lastrow
G�� A%,B%
G�A%=text_block%:B%=text_end%
G�
� lastrow
G�=!rowcount
G�
G�� �row(row%)
H� A%,B%
HA%=text_block%:B%=row%
H	� row
H&=$linebuffer
H0
H:
HD+� ------ Object editor utilities ------
HN
HX� �first_obj
Hb�store_obj(optr)
Hl
optr=1
Hv�restore_obj(1)
H��
H�
H�� �last_obj
H��store_obj(optr)
H�optr=last_object
H��restore_obj(optr)
H��
H�
H�� �next_obj
H��store_obj(optr)
H�optr+=1
H�� optr>maxobs optr=maxobs
H��restore_obj(optr)
I�
I
I� �prev_obj
I �store_obj(optr)
I*optr-=1
I4� optr<1 optr=1
I>�restore_obj(optr)
IH�
IR
I\� �fwd_obj(times%)
If�store_obj(optr)
Ip,optr+=times%:� optr>maxobs � optr=maxobs
Iz�restore_obj(optr)
I��
I�
I�� �rewind_obj(times%)
I��store_obj(optr)
I�"optr-=times%:� optr<1 � optr=1
I��restore_obj(optr)
I��
I�
I�� �store_obj(o%)
I�G� This reads the object data from the writeable icons in the window
I�7� and stores it in the object data area (odata%...)
I�
� olddata
I�ptr=o%*o_len
J
J� I%=8 � 15
J,  icondata=�(�geticondata(objhandle,I%))
J$
  Ȏ I% �
J.    � 10,11,12,13
J8     � The double-byte values
JB1    olddata=?(odata%+ptr)+?(odata%+ptr+1)*256
JL*    � icondata<>olddata � data_saved=�
JV$    ?(odata%+ptr)=icondata � 256
J`&    ?(odata%+ptr+1)=icondata � 256
Jj    ptr+=2
Jt    � 8,9,14,15
J~     � The single-byte values
J�    olddata=?(odata%+ptr)
J�0    � olddata<>icondata � 256 � data_saved=�
J�+    ?(odata%+ptr)=icondata � 256:ptr+=1
J�  �
J��
J�� container �
J�J?(odata%+ptr)=?(odata%+ptr) � %10000000:ptr+=1:?(odata%+ptr)=cont_room
J��
J�B?(odata%+ptr)=?(odata%+ptr) � %01111111:ptr+=1:?(odata%+ptr)=0
J��
J��
J�
K� �restore_obj(o%)
K
H� This reads the data for object o% from memory and updates the icon
K;� contents, ensuring the window reflects the new values
K
K(ptr=o%*o_len
K2(�changeicon(objhandle,7,�(o%),icon%)
K<� I%=8 � 15
KF
  Ȏ I% �
KPG    � 10,11,12,13:data$=�(?(odata%+ptr)+256*?(odata%+ptr+1)):ptr+=2
KZ1    � 8,9,14,15:data$=�(?(odata%+ptr)):ptr+=1
Kd  �
Kn  � data$="" � data$="0"
Kx.  �changeicon(objhandle,I%,data$,newicon%)
K�� I%
K�
K�#store=small_area%:col%=1:row%=0
K�)�fill(small_area%,small_areasize%,13)
K�print=�
K�!�pvok(�findnoun(o%,void),1,�)
K�3�changeicon(objhandle,19,$small_area%,newicon%)
K�G� ((?(odata%+ptr) � %10000000) � 128)>0 � container=� � container=�
K�
ptr+=1
K�3cont_room=?(odata%+ptr):$controom%=�(cont_room)
K�i� container �changeicon(objhandle,26,"SIZE <C>",newicon%) � �changeicon(objhandle,26,"SIZE",newicon%)
K��
K�
L
L)� ------ Room editor utilities ------
L
L"� �first_room
L,�store_room(rptr)
L6
rptr=1
L@�restore_room(1)
LJ�
LT
L^� �last_room
Lh�store_room(rptr)
Lrrptr=last_room
L|�restore_room(rptr)
L��
L�
L�� �next_room
L��store_room(rptr)
L�rptr+=1
L�� rptr>maxrms rptr=maxrms
L��restore_room(rptr)
L��
L�
L�� �prev_room
L��store_room(rptr)
L�rptr-=1
L�� rptr<1 rptr=1
M�restore_room(rptr)
M�
M
M&� �fwd_room(times%)
M0�store_room(rptr)
M:,rptr+=times%:� rptr>maxrms � rptr=maxrms
MD�restore_room(rptr)
MN�
MX
Mb� �rewind_room(times%)
Ml�store_room(rptr)
Mv"rptr-=times%:� rptr<1 � rptr=1
M��restore_room(rptr)
M��
M�
M�� �store_room(r%)
M�ptr=r%*r_len
M�� I%=34 � 69
M�-  icondata=�(�geticondata(roomhandle,I%))
M�  Ȏ � �
M�    � I%>35 � I%<54
M�1    olddata=?(rdata%+ptr)+?(rdata%+ptr+1)*256
M�*    � icondata<>olddata � data_saved=�
M�$    ?(rdata%+ptr)=icondata � 256
M�&    ?(rdata%+ptr+1)=icondata � 256
N    ptr+=2
N    � I%<36 � I%>53
N    olddata=?(rdata%+ptr)
N 0    � olddata<>icondata � 256 � data_saved=�
N*$    ?(rdata%+ptr)=icondata � 256
N4    ptr+=1
N>  �
NH� I%
NR+icondata=�(�geticondata(roomhandle,71))
N\#?(rdata%+ptr+16)=icondata � 256
Nf#?(rdata%+ptr+17)=icondata � 256
Np�
Nz
N�� �restore_room(r%)
N�ptr=r%*r_len
N�*�changeicon(roomhandle,33,�(r%),icon%)
N�� I%=34 � 69
N�  Ȏ � �
N�    � I%>35 � I%<54
N�9    data$=�(?(rdata%+ptr)+256*?(rdata%+ptr+1)):ptr+=2
N�    � I%<36 � I%>53
N�%    data$=�(?(rdata%+ptr)):ptr+=1
N�  �
N�  � data$="" � data$="0"
N�/  �changeicon(roomhandle,I%,data$,newicon%)
N�� I%
O2data$=�(?(rdata%+ptr+16)+256*?(rdata%+ptr+17))
O� data$="" � data$="0"
O-�changeicon(roomhandle,71,data$,newicon%)
O$�
O.
O8
OB,� ------ Message editor utilities ------
OL
OV� �store_msg
O`errflag=�:�remove_markers
Oj newlen=text_end%-text_block%
Otdiff=newlen-oldlen
O~� diff+text%!2>maxtext% �
O�  �error(13,error$(36))
O�  errflag=�
O��
O�  to=mstart+newlen-1
O�  from=mend-1
O�1  text_end%=text_block%:text_ptr%=text_block%
O�$  bytes_to_move=�text_end-mend+1
O�"  �move(from,to,bytes_to_move)
O�&  �move(text_block%,mstart,newlen)
O�  �incmsglen(diff)
O�  ns%=switch_vals(0)
O�  � ns%>0 �
P    ?switch_buf%=ns%:ptr%=1
P
    � I%=1 � ns%
P*      switch_buf%?ptr%=switch_vals(I%)
P4      switch_buf%?(ptr%+1)=switch_vals(I%) � 256
P(      ptr%+=2
P2	    �
P<  �
PF'    �fill(switch_buf%,maxsw%*2+1,0)
PP  �
PZ2  �move(mstart,swloc+2*ns%+1,�text_end-mstart)
Pd&  �move(switch_buf%,swloc,2*ns%+1)
Pn  �incmsglen(2*ns%-2*oldsw)
Px�
P��
P�
P�� �incmsglen(bytes_to_add)
P� text%!2=text%!2+bytes_to_add
P��
P�
P�� �text_end
P�=text%+text%!2
P�
P�
� �maxmsg
P�=?text%+256*text%?1
P�
P�� �incmaxmsg
Q&?text%+=1:� ?text%=0 ?(text%+1)+=1
Q�
Q
Q"� �show_msg(ms%)
Q,"� ms%>�maxmsg � � 4,error$(31)
Q6
� ms%<1 �
Q@0�fill(text_block%,text_blocksize%,dummy_spc)
QJ&text_rowlen%()=+0:switch_vals()=+0
QTchanged_msg=�
Q^$A%=ms%:C%=text%+7:ptr%=� findmsg
Qhchr%=?ptr%:ptr%+=1
Qr/switch_vals(0)=chr%:oldsw=chr%:swloc=ptr%-1
Q|� chr%>0 �
Q�  � I%=1 � chr%
Q�(    switch_vals(I%)=?ptr%+256*ptr%?1
Q�    ptr%+=2
Q�  �
Q��
Q�mstart=ptr%
Q�chr%=?ptr%
Q� row%=0:text_ptr%=text_block%
Q�
ȕ chr%>0
Q�  col%=1:line$=""
Q�1  ȕ chr%<>13 � chr%<>0 � col%<=text_maxllen%
Q�  � chr%>&7F �
Q�  tokptr=chr%-&7F
R+  line$+=tok$(tokptr):L%=� tok$(tokptr)
R  � I%=1 � L%
R.  ?(text_ptr%+I%-1)=�(�tok$(tokptr),I%,1))
R&  �
R0  text_ptr%+=(L%-1)
R:  �
RD%    ?text_ptr%=chr%:line$+=� chr%
RN  �
RX/    ptr%+=1:text_ptr%+=1:chr%=?ptr%:col%+=1
Rb  �
Rl   text_rowlen%(row%)=� line$
Rv3  � col%>text_maxllen% � chr%=13 row%+=1:col%=1
R�2  � chr%=13 ?text_ptr%=13:text_ptr%+=1:ptr%+=1
R�  chr%=?ptr%:� ptr%+=1
R��
R�mend=ptr%:?text_ptr%=chr%
R�text_end%=text_ptr%
R�oldlen=mend-mstart
R�� oldlen<0 oldlen=0
R�text_ptr%=text_block%
R�last_row%=�find_lastrow
R�4� I%=0 � last_row%:text_rowlen%(I%)=� �row(I%):�
R��
R�
R�� �next_msg
Smptr+=1
S$�store_msg:� save this one first
SK� mptr>�maxmsg � ptr=�text_end:ptr?0=0:ptr?1=0:�incmaxmsg:�incmsglen(2)
S 9�show_msg(mptr):� Now load the next one into `texted`
S*�
S4
S>� �prev_msg
SH� mptr>1 �
SRmptr-=1
S\�store_msg
Sf�show_msg(mptr)
Sp�
Sz�
S�
S�� �goto_msg(ms%)
S�!� ms%>�maxmsg ms%=�maxmsg:� 7
S�� ms%<1 ms%=1:� 7
S��store_msg
S��show_msg(ms%)
S�mptr=ms%
S��
S�
S�� �last_msg
S��store_msg
S�mptr=�maxmsg
S��show_msg(mptr)
T�
T
T� �first_msg
T$�store_msg
T.
mptr=1
T8�show_msg(mptr)
TB�
TL
TV
T`,� ------ Program Editor utilities ------
Tj
Tt� �store_prog
T~� sp_ptr%,line$,chr%
T�� Use `hourglass` pointer
T�ș "Hourglass_On"
T�errflag=�:�remove_markers
T�sp_ptr%=text_block%
T�chr%=?sp_ptr%
T�prgptr=prgbuf%
T�$ȕ sp_ptr%<text_end% � � errflag
T�  line$=""
T�3  ȕ (chr%<>13) � (chr%<>0) � (chr%<>dummy_spc)
T�    chr%=?sp_ptr%
T�    sp_ptr%+=1
T�    line$+=�(chr%)
U  �
U
  �scan
U  chr%=?sp_ptr%
UB  ȕ (chr%=13 � chr%=dummy_spc � chr%=0) � (sp_ptr%<text_end%)
U(     sp_ptr%+=1:chr%=?sp_ptr%
U2  �
U<�
UF� � errflag �
UP3  oldlen%=prgend-pstart:� oldlen%<>0 oldlen%+=1
UZ#  bytes_to_move=�prglen-oldlen%
Ud  �incprglen(-oldlen%)
Un  newlen%=prgptr-prgbuf%
Ux1  � This check for 'No room' was added 2.6.89
U�&  � �prglen+newlen%>code_size%-4 �
U�    �incprglen(oldlen%)
U�    �error(13,error$(35))
U�  �
U�4    �move(prgend+1,pstart+newlen%,bytes_to_move)
U�%    �move(prgbuf%,pstart,newlen%)
U�    �incprglen(newlen%)
U�H    ?(program%+4+�prglen)=0:� restore end of program marker (9/4/89)
U�    text_ok=�
U�  �
U��
U�ș "Hourglass_Off"
U��
V
V
� �prglen
V=!program%
V"
V,� �incprglen(bytes)
V6!program%=!program%+bytes
V@�
VJ
VT
V^-� ------ Window `redraw` functions ------
Vh
Vr
V|� �redraw_text(flag%)
V�,� flag%=TRUE -> redraw WHOLE text window
V�+� else only redraw from the cursor line
V�
V�ȕ more%
V�%BR%=(by%-block!32-ypixel%) � lsY%
V�!� BR%>last_row% BR%=last_row%
V�%TR%=(by%-block!40-ypixel%) � lsY%
V�!� TR%>last_row% TR%=last_row%
V�*ptr_end%=BR%*text_maxllen%+text_block%
V��
V�� I%=TR% � BR%
V�  � bx%,by%-lsY%*I%-ypixel%
V�  � �row(I%);
W�
WșGetR,0,block � more%
W�
W&=0
W0
W:
WD2� ------ General icon handling routines ------
WN
WX$� �ht(handle%,icon%,fl$,fc%,bc%)
Wb
�mask%
Wl5�fl$="*"�fl%=0:mask%=&FF000000 �fl%=�fl$:mask%=-1
Wva!block=handle%:block!4=icon%:block!8=fl%:block?11=fc%+(bc%<<4):block!12=mask%:ș SetI,0,block
W��
W�
W�!� �geticondata(handle%,icon%)
W� !block=handle%:block!4=icon%
W�ș GetI,0,block
W�flags%=block!24
W�B� (flags% � 256)<>0 � data$=$(!(block+28)) � data$=$(block+28)
W�
=data$
W�
W�-� �changeicon(handle%,icon%,new$,� icon%)
W�� J%
W�&dummy$=�geticondata(handle%,icon%)
W�@� (flags% � 256)<>0 � $(!(block+28))=new$ � $(block+28)=new$
Xș DeleteI,0,block
X� J%=4 � 28 � 4
X  block!J%=block!(J%+4)
X � J%
X*-!block=handle%:ș CreateI,0,block � icon%
X4F�set_icon(handle%,icon%,0,0):� ensure it appears updated on screen
X>�
XH
XR)� �set_icon(handle%,icon%,eor%,mask%)
X\<!block=handle%:block!4=icon%:block!8=eor%:block!12=mask%
Xfș SetI,0,block
Xp�
Xz
X�
X�,� ------ Menu creation procedures ------
X�
X�7� **** onIconBar = 1 if yes, otherwise 0 **********
X�'� �menuHeight(theMenu%, onIconBar%)
X�C= ((96 * onIconBar%) + (theMenu%?30 * 44) + (theMenu%?31 * 24))
X�
X�
X�
� �crmenu
X�.� menufree%+28 > menuend% � � 1,error$(32)
X�� m%,menu$:� menu$
X�
X�
YH� ************** the bodge to store the menu height ****************
Y� menuHiAddr%
YKmenuHiAddr% = menufree% + 28 + 2 :� 2nd last byte in 1st menuitem flags
Y$menuItemNum% = 0
Y.dashItemNum% = 0
Y8
YB
YL&� �menu$,1)="=" � menu$=��menu$,2)
YVmenuptr%=menufree%
Y`i%=0:ctr%=0
Yj?� �menu$,1)="#" � i%=1:menutitle$=�par(",") � menutitle$=""
YtI%=�menutitle$,">")
Y~� I%>0 �
Y�)     menuptr%!20=�(�menutitle$,I%+1))
Y�%     menutitle$=�menutitle$,I%-1)
Y�� menuptr%!20=44
Y��
Y�$menuptr%=menutitle$
Y�Omenuptr%?12=`tfcol:menuptr%?13=`tbcol:menuptr%?14=`wfcol:menuptr%?15=`wbcol
Y�$menuptr%!16=196-24:menuptr%!24=0
Y�$menuptr%+=28:maxx%=�menutitle$-3
Y�ȕ �menu$,1)="~"
Y�  menu$=�menu$,�menu$-1)
Y�3  � item$=�par(","):�menuitem(item$):� item$=""
Y�
  � menu$
Z�
Z
1� item$=�par(","):�menuitem(item$):� item$=""
Z#menuptr%!-24=(menuptr%!-24)�&80
Z&m%=menufree%:m%!16=(maxx%*8+6)*dx%
Z(menufree%=menuptr%
Z2<?menuHiAddr% = menuItemNum%      : � the number of items
Z<=?(menuHiAddr% +1) = dashItemNum% : � the number of dashes
ZF=m%
ZP
ZZ� �menuitem(text$)
Zd� text$="" � �
Zn-� menuptr%+24 > menuend% � � 1,error$(32)
Zx� text$="&" �
Z�+  ș "Font_ListFonts",,q%,ctr% � ,,ctr%
Z�1  � ctr%>=0 � text$=$q%+">m_fsize%":i%-=2 � �
Z��
Z��i%,flg%
Z�
Z�menuItemNum% += 1
Z�
Z�flg%=&00
Z�i%=�text$,">")
Z�=�i%>0�subptr%=��text$,i%+1):text$=�text$,i%-1)�subptr%=-1
Z�H� �text$,1)="#" � text$=�text$,�text$-1):flg%+=&02:dashItemNum% += 1
Z�menuptr%!0=flg%
Z�menuptr%!4=subptr%
[menuptr%!8=&07000021
[� �text$,1)="?" �
[  menuptr%!8=&0700011A
[")  I%=�workspace(�text$):$I%=�text$,2)
[,B  menuptr%!12=I%:menuptr%!16=systemsprites%:menuptr%!20=�text$
[6�
[@  � �text$,1)="$" �
[J    !menuptr%+=&04
[T    menuptr%!8+=&100
[^    i%=�text$,"(")
[h7    �i%>0�L%=��text$,i%+1):text$=�text$,i%-1)�L%=12
[r>    menuptr%!12=�(�text$,2)):menuptr%!16=-1:menuptr%!20=L%
[|    text$=�L%," ")
[�  �
[�    �text$<=12�
[�!         $(menuptr%+12)=text$
[�+    � I%=�workspace(�text$+1):$I%=text$
[�?         menuptr%!12=I%:menuptr%!16=-1:menuptr%!20=�text$+1
[�)         menuptr%!8=menuptr%!8 � &100
[�	    �
[�  �
[�   �text$>maxx%�maxx%=�text$
[��
[�menuptr%+=24
[��
[� 
\� �par(sep$)
\%i1%=i%+1:i%=�menu$+sep$,sep$,i1%)
\=�menu$,i1%,i%-i1%)
\&
\0� �workspace(L%)
\:2� curbuff%+L%>buffer%+maxbuf% � � 1,error$(33)
\Dcurbuff%+=L%:=curbuff%-L%
\N
\X
\b9� ------ Procedures to interface with ARM code ------
\l
\v"� �move(from,to,bytes_to_move)
\�� bytes_to_move=0 � �
\�"A%=from:B%=to:C%=bytes_to_move
\�
� move
\��
\�
\�� �fill(start,bytes,filler)
\�A%=start:B%=bytes:C%=filler
\�	�fill
\��
\�
\�
\�#� ------ ARM source code ------
\�
]� �assemble(addr%)
]
� pass
]sp=13:link=14
] � pass=0 � 2 � 2
]*P%=addr%
]4
[OPT pass
]>.fill     b fill2
]H.move     b blockmove
]R
]\
.fill2
]f?\ r0=start address r1=number of bytes r2=value to fill with
]p!\ all registers are preserved
]zstmfd (sp)!,{r0-r3,link}
]�
mov r3,r0
]�add r3,r3,r1
]�
.fillloop
]�strb r2,[r0],#1
]�
cmp r0,r3
]�blt fillloop
]�ldmfd (sp)!,{r0-r3,PC}
]�
]�E\ General purpose block move routine (up or down and overlapping)
]�J\ r0 = `from` address, r1 = `to` address, r2 = number of bytes to move
]�.blockmove
]�
cmp r0,r1
]�blt moveup
^bal movedown
^
^
.movedown
^$\ Move memory block down
^.I\ r0 = `from` address, r1= `to` address, r2 = number of bytes to move
^8stmfd (sp)!,{r0-r3,link}
^B
^L
.movdloop
^Vldrb r3,[r0],#1
^`strb r3,[r1],#1
^jsubs r2,r2,#1
^tbne movdloop
^~
^�ldmfd (sp)!,{r0-r3,PC}
^�
^�.moveup
^�\ Move memory block up
^�I\ r0 = `from` address, r1= `to` address, r2 = number of bytes to move
^�
^�stmfd (sp)!,{r0-r3,link}
^�sub r2,r2,#1
^�add r0,r0,r2
^�add r1,r1,r2
^�#\ Call here if r2 = end address
^�.moveuploop
_ldrb r3,[r0],#-1
_
strb r3,[r1],#-1
_subs r2,r2,#1
_bpl moveuploop
_(ldmfd (sp)!,{r0-r3,PC}
_2
_<.lastrow
_F\ Find last row of text
_P6\ Entry - r0 = start address of text (text_block%)
_Z2\         r1 = end address of text (text_end%)
_dJ\ Exit  - number of last row is in 'rowcount' (rows numbered 0,1,2...)
_nstmfd (sp)!,{r0-r4,link}
_x
mov r2,#0
_�
mov r3,#0
_�
mov r4,#0
_�
_�
.while
_�
cmp r0,r1
_�beq endwhile
_�ldrb r3,[r0],#1
_�add r4,r4,#1
_�cmp r4,#text_maxllen%
_�addeq r2,r2,#1
_�moveq r4,#0
_�
beq while
_�cmp r3,#13
`addeq r2,r2,#1
`moveq r4,#0
`cmp r3,#dummy_cr
`"addeq r2,r2,#1
`,moveq r4,#0
`6
bal while
`@
`J
.endwhile
`Tstr r2,rowcount
`^ldmfd (sp)!,{r0-r4,PC}
`h
`r.rowcount EQUD 0
`|
`�.row
`�G\ Returns the string of text in the specified row of the text block
`�6\ Entry - r0 = start address of text (text_block%)
`�(\         r1 = row wanted (0,1,2...)
`�H\ Exit  - the string is returned in 'linebuffer', terminated by <cr>
`�\ r2 is the current row
`�!\ r3 is the current character
`�)\ r4 is the length of the current row
`�
`�stmfd (sp)!,{r0-r4,link}
`�
mov r2,#0
`�
mov r4,#0
`�
a.while2
a
cmp r2,r1
abeq endwhile2
a&ldrb r3,[r0],#1
a0add r4,r4,#1
a:cmp r4,#text_maxllen%
aDmoveq r4,#0
aNaddeq r2,r2,#1
aXbeq while2
abcmp r3,#13
almoveq r4,#0
avaddeq r2,r2,#1
a�cmp r3,#dummy_cr
a�moveq r4,#0
a�addeq r2,r2,#1
a�bal while2
a�
a�.endwhile2
a�adr r1,linebuffer
a�
mov r4,#0
a�
a�.strloop
a�ldrb r3,[r0],#1
a�add r4,r4,#1
a�
cmp r3,#0
bbeq lineend
bcmp r3,#dummy_spc
bbeq lineend
b cmp r3,#13
b*beq lineend
b4cmp r3,#dummy_cr
b>streqb r3,[r1],#1
bHbeq lineend
bRstrb r3,[r1],#1
b\cmp r4,#text_maxllen%
bfbne strloop
bp
bz.lineend
b�
cmp r3,#0
b�moveq r3,#13
b�cmp r3,#dummy_spc
b�moveq r3,#13
b�cmp r3,#dummy_cr
b�moveq r3,#13
b�cmp r4,#text_maxllen%
b�moveq r3,#13
b�strb r3,[r1],#1
b�ldmfd (sp)!,{r0-r4,PC}
b�
b�2.linebuffer EQUS �text_maxllen%+1,� dummy_spc)
b�
 align
c
c.findmsg
c%\Finds start of specified message
c$ \Entry - r0 = message number
c.,\      - r2 = text start address (MSG#0)
c85\Exit  - r0 = start address of message (switches)
cBstmfd (sp)!,{r1-r3,link}
cL
cmp r0,#0
cVbeq startm
c`
cj.nxtmsg
ctldrb r1,[r2],#1
c~)add r2,r2,r1, lsl #1 \ r2 = r2 + r1*2
c�
c�.readch
c�ldrb r1,[r2],#1
c�
cmp r1,#0
c�bne readch
c�subs r0,r0,#1
c�bne nxtmsg
c�
c�.startm
c�
mov r0,r2
c�ldmfd (sp)!,{r1-r3,pc}
c�
d	.pvok
d
<;Print Verb, Object or Keyword (returns the word string)
d);Entry - r0 = Number of word to print
d0;        r1 = address of required word table
d(2;Exit  - word is in 'atext' terminated by <cr>
d2stmfd (sp)!,{r0-r5,link}
d<,mov r3,r0      \Word number is now in r3
dF$mov r4,r2      \r4 is 'all' flag
dPmov r5,#0      \r5 is 'ctr'
dZ
dd	.LLL1
dn(adr r2,atext   \r2 points to 'atext'
dx
d�	.LLL2
d�+ldrb r0,[r1]   \Get character from list
d�*\orr r0,r0,#32  \Convert to lower case
d�$strb r0,[r2]   \Put it in 'text'
d�2tst r0,#&80    \Is bit 7 set (end of the word)
d�bne endofw     \Yes
d�add r2,r2,#1
d�add r1,r1,#1
d�
b LLL2
d�
d�.endofw
d�cmp r0,#&FF
d�adreq r2,pvokflag
estreqb r0,[r2]
ebeq endtbl
e%and r0,r0,#%01111111 ;Clear bit 7
e"strb r0,[r2],#1
e,mov r0,#13
e6strb r0,[r2]
e@add r1,r1,#1
eJ7ldrb r0,[r1] ;Get the verb/object number from table
eT!add r1,r1,#1 ;Skip the number
e^(cmp r0,r3    ;Is it the one we want?
eh'bne LLL1     ;No - try the next one
er
e|.endtbl
e�adr r2,address
e�str r1,[r2]
e�ldmfd (sp)!,{r0-r5,pc}
e�
e�.atext EQUS �80,"*")
e�	align
e�.address equd 0
e�.pvokflag equb 0
e�	align
e�]
e�
� pass
e��
e�
f
f1� ------ Some general utility routines ------
f
f&� �ErrorMsgRead
f0'in%=�("<Alps$Resources>.Errormsgs")
f:�#in%,errors
fD� error$(errors)
fN� error=0 � errors-1
fX  �#in%,error$(error)
fb� error
fl	�#in%
fv�
f�
f�� �KeyWordRead
f�'� Reads file of keywords/info bytes
f�(� Keywords are in alphabetical order
f�� CHN%,I%,J%
f�first_token=&60
f�5maxmsg=65535:maxobn=255:maxvbn=255:maxconst=65535
f�(chn%=� "<Alps$Resources>.keywrdlist"
f��#chn%,keywords
f�*� keyword$(keywords),info%(keywords,5)
f�
f�� Set up keyword tables
f�C� keyword$ | token | type/No. params | Max values param 1,2,3 |
gH� type/No. params gives number of parameters and bit 7 is set if its
gH� a function, bit 6 set for object keywords, bit 5 for verb keywords
g
g � I%=1 � keywords
g*�#chn%,keyword$(I%)
g4� J%=0 � 5
g>�#chn%,info%(I%,J%)
gH� J%
gR� I%
g\
�#chn%
gf
gp� I%=1 � keywords
gz+params=info%(info%(I%,2),1) � %00011111
g�bytes=0
g�� params>0 �
g�� K%=3 � 5
g� maxval=info%(info%(I%,2),K%)
g�&� maxval<256 � maxval>0 � bytes+=1
g�*� maxval>255 � maxval<65536 � bytes+=2
g�� maxval>65535 � bytes+=3
g�� K%
g��
g�.parambyte=info%(info%(I%,2),1) � %10000000
g�#pbytes?(I%-1)=bytes � parambyte
g��
g��
h
h
h'� ------ Printing procedures ------
h$
h.� �print_prog_seg
h8� R%
hB� �
hL)� � �:�("FX3,0"):ș "Hourglass_Off":�
hV*FX3,10
h`� R%=0 � last_row%
hj  � �row(R%)
ht� R%
h~
*FX3,0
h��
h�
h�� �print_program
h�� �
h�)� � �:�("FX3,0"):ș "Hourglass_Off":�
h��list(1,"")
h��
h�
h�� �print_text
h�� st%,end%,M%
h�� �
h�)� � �:�("FX3,0"):ș "Hourglass_Off":�
i�close(texthandle)
i
*FX3,10
ist%=� $st_msg%
iend%=� $end_msg%
i(� end%>�maxmsg end%=�maxmsg
i2� M%=st% � end%
i<  �show_msg(M%)
iF  �print_msg(M%)
iP� M%
iZ
*FX3,0
id�
in
ix� �print_msg(M%)
i�� S%,R%
i�"�"Message: ";M%;" Switches: ";
i�� switch_vals(0)=0 �
i�  �"None";
i��
i�  � S%=1 � switch_vals(0)
i�!    �"<";switch_vals(S%);">";
i�  �
i��
i��
i�� R%=0 � last_row%
i�  � �row(R%)
i�� R%
j� �text_maxllen%,"-")
j�
j
j"� �print_objs
j,� O%,F%,I%,ptr%
j6*FX3,10
j@� condensed
jJ�pline$
jT�print_flags(o_flags%)
j^�pline$
jht�"Obj Noun       Flags 7 6 5 4 3 2 1 0 State Start Describe Short Examine Weight Size Cont. 'Store' Trans. Open"
jr�pline$
j|� O%=1 � last_object
j�	�;O%;
j�#store=small_area%:col%=1:row%=0
j�)�fill(small_area%,small_areasize%,13)
j�print=�
j�8�pvok(�findnoun(O%,void),1,�):�4)$small_area%;�21);
j�ptr%=odata%+O%*o_len
j�� F%=7 � 0 �-1
j�&� ?ptr% � (2^F%) � �"* "; � �". ";
j��
j��39);ptr%?1;�43);ptr%?2+256*ptr%?3;�50)ptr%?4+256*ptr%?5;�58);ptr%?6+256*ptr%?7;�65);ptr%?8+256*ptr%?9;�73);ptr%?10;�80);ptr%?11;
j�3� (ptr%?12 � &80)<>0 � �85)"<C>";�92);ptr%?13;
j�� (ptr%?12 � &80)<>0 �
j�store_room=ptr%?13
k&rmflags=?(rdata%+store_room*r_len)
k!tr_flag=(rmflags � %100000)>0
k op_flag=(rmflags � %10000)>0
k&'� tr_flag �100);"Y"; � �100);"N";
k0%� op_flag �106);"Y" � �106);"N"
k:�
kD�
kN�
kX�
kb�pline$
kl� 27,reset
kv
*FX3,0
k��
k�
k�� �print_rooms
k�� R%,F%,I%,ptr%
k�*FX3,10
k�� condensed
k��pline$
k��print_flags(r_flags%)
k�%�pline$:�70);" * DESTINATIONS *"
kڂ�"Room Flags 76543210 State Desc. Short Pict. N    S    E    W    NE   NW   SE   SW   Up   Down In   Out  Back Left Righ Jump"
k��pline$
k�� R%=1 � last_room
k��;R%;�11);
lptr%=rdata%+R%*r_len
l� F%=7 � 0 �-1
l$� ?ptr% � (2^F%) � �"*"; � �".";
l �
l*X�20);ptr%?1;�26);ptr%?2+256*ptr%?3;�32);ptr%?4+256*ptr%?5;�38);ptr%?70+256*ptr%?71;
l4� I%=6 � 36 � 2
l>/�5*(I% � 2-3)+44);ptr%?I%+256*ptr%?(I%+1);
lH� I%
lR�
l\� R%
lf
lp&�pline$:�30);" * EXIT ROUTINES *"
lz\�"Room  N    S    E    W    NE   NW   SE   SW   Up   Down In   Out  Back Left Righ Jump"
l��pline$
l�� R%=1 � last_room
l�	�;R%;
l�ptr%=rdata%+R%*r_len
l�� I%=38 � 53
l��5*(I%-38)+6);ptr%?I%;
l�� I%
l��
l�� R%
l��pline$
l��59)"* EXIT FLAGS *"
l��pline$
l��"Exit Flag: ";
m� flag=7 � 0 �-1
m/�11+(7-flag)*15);"|"�20+(7-flag)*15);flag;
m�
m$�11+8*15);"|"
m.�"Descript'n";
m8� flag=7 � 0 �-1
mB-�10+(7-flag)*15);" | ";exit_flag$(flag);
mL�
mV�10+8*15);" |"
m`�pline$
mj��4);" North   South    East    West   No'east No'west So'east So'west   Up     Down     In     Out     Back    Left    Right   Jump  "
mt� R%=1 � last_room
m~,� R%=1 � R% � 10=0 � �4)�16,"|-------")
m�	�;R%;
m�ptr%=rdata%+R%*r_len
m�	�4);
m�� I%=54 � 69
m�� F%=7 � 0 �-1
m�)� ?(ptr%+I%) � (2^F%) � �"*"; � �".";
m�� F%
m�� I%
m��
m�� R%
m��pline$
m�� 27,reset
n
*FX3,0
n
�
n
n� �print_flags(mem%)
n(�"Flag:      ";
n2� flag=7 � 0 �-1
n</�11+(7-flag)*15);"|"�20+(7-flag)*15);flag;
nF�
nP�11+8*15);"|"
nZ�"Descript'n";
nd� flag=7 � 0 �-1
nn+�10+(7-flag)*(maxd%-1+3));" | ";$mem%;
nxmem%+=maxd%
n��
n��10+8*(maxd%-1+3));" |"
n��
n�
n�� �print_vocab
n�print=�
n��put(pline2$+�13)
n�*�put(�37," ")+"Nouns:"+�13):�listnouns
n��put(pline2$+�13)
n�*�put(�37," ")+"Verbs:"+�13):�listverbs
n��put(pline2$+�13)
n�.�put(�34," ")+"Adjectives:"+�13):�listadjs
n��put(pline2$+�13)
o1�put(�33," ")+"Conjunctions:"+�13):�listconjs
o�put(pline2$+�13)
o1�put(�33," ")+"Prepositions:"+�13):�listpreps
o"�put(pline2$+�13)
o,-�put(�35," ")+"Specials:"+�13):�listspecs
o6�put(pline2$+�13)
o@*�put(�37," ")+"Noise:"+�13):�listnoise
oJ�put(pline2$+�13)
oTprint=�
o^�
oh
or� �print_pix
o|
� mptr
o�print=�:ș "Hourglass_On"
o�
o�
� pxn>1 �
o�mptr=pixs+3
o�� I%=1 � pxn-1
o�  �put(�(I%)+"= ")
o�  �put($mptr)
o�  mptr+=�$mptr+1
o�$  �put(",<"+pos$(?mptr)+">"+�13)
o�
  mptr+=5
o��
o��
o�
pprint=�:ș "Hourglass_Off"
p�
p
p&� �scan
p0oldptr=prgptr:numflag=0
p:&ptr=1:len=� line$:� len=0 � � �`Tq
pD�
pNtemp$=""
pX"ȕ �line$,ptr,1)<"A" � ptr<len
pb
ptr+=1
pl�
pvvptr=ptr
p�"ȕ �line$,ptr,1)>"@" � ptr<len
p�$temp$=temp$+�line$,ptr,1):ptr+=1
p��
p�� temp$<>"" �
p�!�lookup(temp$,token,info_ptr)
p�A� token=0 �error(0,": "+�line$,vptr,30)):prgptr=oldptr:� �`@q
p�%� token=def_token � �dodefn:�`@q
p�)?prgptr=token:tokptr=prgptr:prgptr+=1
p�Fp_info=info%(info%(token-first_token+1,2),1):params=p_info � %1111
p�
ptr+=1
p�� params <>0 �
p�� I%=1 � params
p�) ȕ �", ",�line$,ptr,1))<>0 � ptr<len
q  ptr+=1
q �
qC  � token>=var_token � I%=1 � �get_var(ptr,ptr,paramvalue,vptr)
q m  � token>=var_token � I%>1 � �get_num_or_var(ptr,ptr,paramvalue,varflag):� varflag � ?tokptr=?tokptr+&10
q*  � token<var_token �
q4�  � �line$,ptr,1)=�34 �decode_string(line$,ptr,ptr,paramvalue,�fntype(p_info)) � �decode_parameter(line$,ptr,ptr,paramvalue,vptr)
q>  �
qH  � errflag � �`@q
qR^  � paramvalue>info%(info_ptr,I%+2) �error(2,�(info%(info_ptr,I%+2))+" ("+temp$+")"):�`@q
q\*  � info%(info_ptr,I%+2)<256 � bytes=1
qfG  � info%(info_ptr,I%+2)>255 � info%(info_ptr,I%+2)<65536 � bytes=2
qp,  � info%(info_ptr,I%+2)>65535 � bytes=3
qz  � J%=0 � bytes-1
q�%    J%?prgptr=paramvalue � 256^J%
q�
  � J%
q�  prgptr+=bytes
q�� I%
q��
q��
q�&� ptr>=(len-1) � token=0 � errflag
q�,� token=0 � errflag � �restore_end:�`^q
q�?prgptr=13:prgptr+=1
q��
q�
q�� �restore_end
q�prgptr=oldptr:?prgptr=0
r�
r
r� �error(err_num,err$)
r$
errflag=�
r.;null =�errorbox(error$(err_num)+" "+err$,err_num,1,-99)
r8�
rB
rL-� �find_token(A$(),search$,� token,� mid)
rV&� first,last,stop_search,found,len
r`len=� search$
rjfirst=1
rtlast=�(A$(),1)
r~stop_search=�:found=�
r��
r�	�chop
r�� stop_search
r�*� found � token=info%(mid,0) � token=0
r��
r�
r�� �chop
r�mid=(first+last) � 2
r�A$=A$(mid)
r�*� A$=search$ � stop_search=�:found=�:�
r�� A$>search$ �
r�last=mid-1
s�
s
first=mid+1
s�
s � first>last � stop_search=�
s(�
s2
s<&� �lookup(search$,� token,� index)
sF� I%,found
sPtoken=0
sZ� search$="" � �
sd/�find_token(keyword$(),search$,token,index)
sn�
sx
s�I%=1
s��
s�Q� ��keyword$(I%),�(search$)),search$)<>0 � token=info%(I%,0):found=�:index=I%
s�	I%+=1
s�� found � I%=keywords+1
s��
s�
s�9� �decode_parameter(line$,place,� place,� value,vptr)
s�� temp1$
s�*ȕ �" (,",�line$,place,1))<>0 place+=1
s��
s�aȕ �"0123456789",�line$,place,1))<>0 � place<=�(line$) temp1$=temp1$+�line$,place,1):place+=1
s��
t%� �") ,"+�13,�line$,place,1))=0 �
t,�error(1,": "+�line$,vptr,30)):errflag=�
t�
t"value=�(temp1$)
t,�
t6�
t@
tJ6� �decode_string(line$,place,� place,� value,type)
tT� temp1$,dummy$,vptr
t^vptr=place-1
thplace+=1
tr
temp1$=""
t|/ȕ (��34,�line$,place,1))=0 � place<�line$)
t�temp1$+=�line$,place,1)
t�place+=1
t��
t�9� ��34,�line$,place,1))<>0 � place+=1:� added 31.5.89
t�� temp1$="" �
t�value=0
t��
t�
Ȏ type �
t�� 1
t�7�getobn(temp1$,value,dummy$):� Find the noun number
t�� value=0 �
t�temp1$=": "+temp1$
t�A� 1,"Badly formed/Non-existent noun: "+�line$,vptr-�temp$,20)
u�
uC�which_obj(value,val$,refs):� Find which object/s it references
u;� refs=1 � value=�(val$) � �error(27,temp1$+error$(37))
u&�
u0$� 2:�getvbn(temp1$,value,dummy$)
u:$� 3:�getprn(temp1$,value,dummy$)
uD�
uN�
uX�
ub
ul*� �get_var(place,� place,� value,vptr)
uv*ȕ �" (,",�line$,place,1))<>0 place+=1
u��
u�chr$=�line$,place,1)
u�<� chr$<"A" � chr$>"|" � �error(3,": "+�line$,vptr,30)):�
u�value=� chr$ - �"A"
u�Oplace+=1:� �line$,place,1)<>"%" � �error(3,": "+�line$,vptr,30)) � place+=1
u��
u�
u�3� �get_num_or_var(place,� place,� value,� flag)
u�*ȕ �" (,",�line$,place,1))<>0 place+=1
u��
u�chr$=�line$,place,1)
u�T� �"0123456789",chr$) � flag=�:�decode_parameter(line$,place,place,value,vptr):�
u�+�get_var(place,place,value,vptr):flag=�
v�
v
v
� �run
v � �
v*%ș "OS_Byte",229,0,0 � ,oldstate%
v4:err_col=11:�col(130):�col(7):ș "Wimp_SetColour",128+2
v>a� � �:�col(err_col):� �<>17 �'"Interpreter reports a run-time error: "�$:� �pRw � �'�$:� �pRw
vH;�close(texthandle):�close(objhandle):�close(roomhandle)
vR!work%=rdata%
v\work%!4=verbs+3
vfwork%!8=nouns+3
vpwork%!12=program%+4
vzwork%!16=text%+7
v�work%!20=dict%+3
v�work%!24=odata%
v�work%!28=adjects+3
v�work%!32=preps+3
v�work%!36=conjs+3
v�work%!40=specs+3
v�work%!44=noise+3
v�work%!48=pixs+3
v��  work%!52 is reserved
v�work%!56=initsave
v�work%!60=last_room
v�work%!64=last_object+1
v��26,4,12
w�centre("PLEASE WAIT",0):�
w5� datavalid � �copy_from_editor � �copy_to_editor
w!picbuf=pbsize
w$5�("LOAD <Users$Resources>.Buttons "+�~(picbuf+4))
w.8� Read the scale factors and pixel translation table
w8Bș "Wimp_ReadPixTrans",&200,picbuf,picbuf+16,0,0,0,scale,pixtr
wB� Now PutSpriteScaled
wL<ș "OS_SpriteOp",&234,picbuf,picbuf+16,0,0,8,scale,pixtr
wV6� 28,0,textrows%-5,textcols%,0,24,0;148;scrw;scrh;
w`�centre(�11," "),0):�:�
wj+A%=verb_type:B%=nref:C%=aref:D%=ramsave
wt*E%=pbytes:F%=work%:G%=picbuf:H%=pbsize
w~
cliplen=0
w�	� run
w�`� 26:�centre("PLEASE WAIT",26):�:�swap_data:datavalid=�:�centre(�11," "),26):�return(18,0):�
w�2�changeicon(ALPSmain,swapicon,"swap",swapicon)
w�K� The copy/swap routines as used above ensure the data in the editor is
w�L� ALWAYS valid after running a game, even if it wasn't before running it
w�� 5
w�"ș ForceR,-1,0,0,scrw+1,scrh+1
w�� �
w� ș "OS_Byte",229,oldstate%,0
w�ș "OS_Byte",124
w��
w�
x� �col(color)
x
ș "Wimp_TextColour",color
x�
x
x()� �find_section(code%,value%,� found)
x24� Searches program for a match with code%,value%
x<� eg DEFPROC(3) --> &86,&03
xFA� Sets `listptr` to the address of the `code%` byte, if found
xPptr=listptr
xZ� byte1,byte2
xdfound=�
xn%E%=pbytes:F%=work%:� setup:G%=ptr
xx�
x�A%=code%:ptr=� findcode
x�&� ?ptr=value% � found=� � G%=ptr+1
x�� found � ptr=0
x�:� found � listptr=ptr-1 � listptr=program%+4+�prglen+1
x��
x�
x�� �list(prg_part%,val$)
x�� col%,row%
x�0�fill(text_block%,text_blocksize%,dummy_spc)
x�text_rowlen%()=+0
x�ș "Hourglass_On"
x�0listptr=program%+4:line=1:last=65535:first=1
x�col%=1:row%=0
ystore=text_block%
yexisting_verb=�
yprint=�
y"
errflag=�
y,
y6Ȏ prg_part% �
y@=� 1:found=�:end1%=0:end2%=0:print=�:� Print whole program
yJ0� 2:found=�:end1%=stop_token:end2%=def_token
yT#� 3,4,5:end1%=end_token:end2%=0
y^�
yh
yrȎ prg_part% �
y|� 3
y�*�find_section(proc_token,� val$,found)
y�token=proc_token
y�� 4
y�existing_verb=�
y��getvbn(val$,verb,dummy$)
y�'�find_section(def_token,verb,found)
y�token=def_token
y�� 5
y�*�find_section(exit_token,� val$,found)
y�token=exit_token
y��
y�
y�� � found �
z9  �error(10,""+�token_to_keyword(token)+"("+val$+")")
z*  listptr-=1:� Point to end of program
z)  � token=def_token � existing_verb=�
z&�
z0
z:5pstart=listptr:� Start address of program section
zDbyte1=?listptr:found_end=�
zNȕ byte1<>0 � � found_end
zX
eol%=�
zb  ȕ byte1=13
zl#    listptr+=1:�put(�13):eol%=�
zv    row%+=1
z�    byte1=?listptr
z�  �
z�"  � byte1=0 � �put(�(0)):�PZ|
z�8  � (byte1=end1% � eol%) � byte1=end2% � found_end=�
z�1  � byte1>&BF � byte2=byte1-&10 � byte2=byte1
z�  token=byte2:listptr+=1
z�$  word$=�token_to_keyword(token)
z�  �put(word$)
z�2  � byte2=def_token � �prtdef:listptr+=1:�PZ|
z�H  p_info=info%(info%(token-first_token+1,2),1):params=p_info � %1111
z�)  � params=0 � ?listptr<>13 �put(" ")
z�  � params<>0 �
z�    �put("(")
{    � I%=1 � params
{;      maxvalue=info%(info%(token-first_token+1,2),I%+2)
{"      � maxvalue<256 � bytes=1
{ 3      � maxvalue>255 � maxvalue<65536 � bytes=2
{*$      � maxvalue>65535 � bytes=3
{4      value=0
{>      � J%=0 � bytes-1
{H+        value=value+(J%?listptr)*256^J%
{R      � J%
{\      doneit=�
{f>      � I%=1 � (listoption � %10)<>0 � �fntype(p_info)=1 �
{p        �prntobj
{z      �
{�@        � I%=1 � (listoption � %10)<>0 � �fntype(p_info)=2 �
{�          �prntvrb
{�
        �
{�      �
{�X      � I%=1 � (word$="PREP" � word$="NOTPREP") � (listoption � %10)<>0 � �printprep
{�W      � I%=2 � (word$="PUTIN" � word$="TAKEOUT") � (listoption � %10)<>0 � �prntobj
{�      � � doneit �
{�[        � byte1<var_token � (I%>1 � byte1<&C0) �put(�(value)) � �put(�(value+�"A")+"%")
{�      �
{�      listptr+=bytes
{�"      � I%<>params � �put(",")
{�    � I%
{�    �put(")")
|     � ?listptr<>13 �put(" ")
|  �
|    byte1=?listptr
|$�
|.� found_end �put(�13+�0)
|8+text_end%=store-1:text_ptr%=text_block%
|B1� text_end%<text_block% text_end%=text_block%
|L3prgend=listptr:� End address of program section
|Vlast_row%=�find_lastrow
|`
|j� R%=0 � last_row%
|ttext_rowlen%(R%)=� �row(R%)
|~�
|�
|�ș "Hourglass_Off"
|��
|�
|�� �put(text$)
|�� I%
|�� � print �
|�� text$<>"" �
|�$store=text$
|�store+=� text$
|��
|��
}*FX3,10
}
�text$;
}
*FX3,0
}�
}(�
}2
}<� �list_vocab(voc%)
}Fș "Hourglass_On"
}Pprint=�:store=text_block%
}Z0�fill(text_block%,text_blocksize%,dummy_spc)
}dcol%=1:row%=0
}n
}x
Ȏ voc% �
}�� 1: �listnouns
}�� 2: �listverbs
}�� 3: �listadjs
}�� 4: �listpreps
}�� 5: �listconjs
}�� 6: �listspecs
}�� 7: �listnoise
}��
}�
}�+text_end%=store-1:text_ptr%=text_block%
}�1� text_end%<text_block% text_end%=text_block%
}�last_row%=�find_lastrow
}�� R%=0 � last_row%
~!  text_rowlen%(R%)=� �row(R%)
~�
~ș "Hourglass_Off"
~"�
~,
~6� �list_pix
~@
� mptr
~Jș "Hourglass_On"
~Tprint=�:store=text_block%
~^0�fill(text_block%,text_blocksize%,dummy_spc)
~hcol%=1:row%=0
~r
~|
� pxn>1 �
~�mptr=pixs+3
~�� I%=1 � pxn-1
~�  �put(�(I%)+"= ")
~�  �put($mptr)
~�  mptr+=�$mptr+1
~�$  �put(",<"+pos$(?mptr)+">"+�13)
~�
  mptr+=5
~��
~��put(�0)
~��
~�
~�+text_end%=store-1:text_ptr%=text_block%
~�1� text_end%<text_block% text_end%=text_block%
last_row%=�find_lastrow

� R%=0 � last_row%
&text_rowlen%(R%)=� �row(R%)
0�
:
Dș "Hourglass_Off"
N�
X
b� �token_to_keyword(token)
l+=keyword$(info%(token-first_token+1,2))
v
�
� �new
�3obn=1:vbn=1:adn=1:prn=1:cjn=1:spn=1:nsn=1:pxn=1
�Hnxtobj=nouns:?nxtobj=obn:nxtobj?1=3:nxtobj?2=0:nxtobj+=3:?nxtobj=&FF
�Hnxtvrb=verbs:?nxtvrb=vbn:nxtvrb?1=3:nxtvrb?2=0:nxtvrb+=3:?nxtvrb=&FF
�Jnxtadj=adjects:?nxtadj=adn:nxtadj?1=3:nxtadj?2=0:nxtadj+=3:?nxtadj=&FF
�Hnxtprp=preps:?nxtprp=prn:nxtprp?1=3:nxtprp?2=0:nxtprp+=3:?nxtprp=&FF
�Hnxtcjn=conjs:?nxtcjn=cjn:nxtcjn?1=3:nxtcjn?2=0:nxtcjn+=3:?nxtcjn=&FF
�Hnxtspn=specs:?nxtspn=spn:nxtspn?1=3:nxtspn?2=0:nxtspn+=3:?nxtspn=&FF
�Hnxtnsn=noise:?nxtnsn=nsn:nxtnsn?1=3:nxtnsn?2=0:nxtnsn+=3:?nxtnsn=&FF
�Gnxtpxn=pixs:?nxtpxn=pxn:nxtpxn?1=3:nxtpxn?2=0:nxtpxn+=3:?nxtpxn=&FF
�%!aref=4:aref?4=0:!nref=4:nref?4=0
�prev_file$=""
��
�
�� �lvar
�vars=work%+&88
� � I%=1 � 2*num_vars � 8
�*7�8)�(I% � 2 +�"A");"% = ";vars?(I%-1)+vars?I%*256;
�4<�24)�(I% � 2 +�"B");"% = ";vars?(I%+1)+vars?(I%+2)*256;
�><�40)�(I% � 2 +�"C");"% = ";vars?(I%+3)+vars?(I%+4)*256;
�H;�56)�(I% � 2 +�"D");"% = ";vars?(I%+5)+vars?(I%+6)*256
�R�
�\�
�f
�p� �listo
�z� bitmask$,op$
��Ȏ item1% �
��)� 0: bitmask$="%11111101":op$=" AND "
��(� 1: bitmask$="%00000010":op$=" OR "
��)� 2: bitmask$="%11111011":op$=" AND "
��(� 3: bitmask$="%00000100":op$=" OR "
���
��*listoption=�(�listoption+op$+bitmask$)
���
��
��
� �status
��F�1);"User code address = &";~usercode%;" (";usercode%;" decimal)"
��N�1);"Program bytes: ";�21);�prglen;�28);code_size%-�prglen;" bytes free."
����1)"Messages defined: "�21);�maxmsg;�28);(�text_end-text%);" characters used. ";maxtext%-(�text_end-text%);" characters free."
�U�1)"Verbs defined: "�21);vbn-1;�28);verb_size-(nxtvrb-verbs);" characters free."
�U�1)"Nouns defined: "�21);obn-1;�28);noun_size-(nxtobj-nouns);" characters free."
�\�1)"Adjectives defined: "�21);adn-1;�28);adjc_size-(nxtadj-adjects);" characters free."
�$Z�1)"Objects defined: "�21);last_object;�28);maxobs-last_object" object(s) remaining."
�.R�1)"Rooms defined: "�21);last_room;�28);maxrms-last_room" room(s) remaining."
�8p�1)"Screen mode: ";mode%;", File: "�34+loaded$+�34", Data: ";:�col(11):� data_saved �"Saved" � �"NOT Saved"
�B�
�L
�V
�`+� ------ Various Disk Operations ------
�j
�t� �create_dirs(app$,root$)
�~� t$,l$,r$,I%,rd$,out%
��ș "Hourglass_On"
��!� �root$,1)<>"." � root$+="."
��t$=root$:l$="":I%=0
�� ȕ �t$,".")<>0
��  r$=�t$,�t$,".")-1)
��!  � I%>0 l$=l$+"."+r$ � l$=r$
��  I%+=1
��  �("CDIR "+l$)
��  t$=�t$,�t$,".")+1)
�� �
��%  � �app$,1)<>"!" � app$="!"+app$
��  app$=�app$,10)
�0  ra$=root$+app$:� path to users 'Alps' file
�
  �("CDIR "+ra$)
�  �("CDIR "+ra$+".ALPS")
�   �("CDIR "+ra$+".PICTURES")
�(!  �("CDIR "+ra$+".Resources")
�20  rd$=ra$+".Resources.":� Resources dir path
�<7  � "SAVE "+rd$+"pbytes "+�~pbytes+"+"+�~pbyte_size
�F<  �("SAVE "+rd$+"ASIobjcode "+�~asicode%+"+"+�~codesize)
�P4  � "SAVE "+rd$+"buttons "+�~picbuf+"+"+�~butlen
�Z'  � "SETTYPE "+rd$+"buttons Sprite"
�d$  � "SETTYPE "+rd$+"pbytes Data"
�n,  � "SETTYPE "+rd$+"ASIobjcode Absolute"
�x?  � "SAVE "+ra$+".!RunImage "+�~(picbuf+butlen)+"+"+�~ldlen
��)  � "SETTYPE "+ra$+".!RunImage BASIC"
��E  ș "OS_SpriteOp",256+26,sprld,"!alpsgames",app$:� Rename Sprite
��=  ș "OS_SpriteOp",256+12,sprld,ra$+".!Sprites":� Save it
��  out%=�(ra$+".!Run")
��  out2%=�(ra$+".!Boot")
��)  �#out%,"| !Run file for ALPS games"
��+  �#out2%,"| !Boot file for ALPS games"
��  �#out%,"|"
��&  �#out%,"SET Alps$NoMouseInput 0"
��  �#out%,"|"
��%  �#out%,"SET Alps$ShowAddress 0"
��  �#out%,"|"
��  �#out2%,"|"
�.  �#out%,"IconSprites <Obey$Dir>.!Sprites"
�/  �#out2%,"IconSprites <Obey$Dir>.!Sprites"
�*  �#out%,"SET AlpsGame$Resources "+rd$
�"-  �#out%,"SET AlpsGame$Data "+ra$+".Alps"
�,2  �#out%,"SET Alps$Pictures "+ra$+".Pictures."
�6+  �#out2%,"SET AlpsGame$Resources "+rd$
�@.  �#out2%,"SET AlpsGame$Data "+ra$+".Alps"
�J3  �#out2%,"SET Alps$Pictures "+ra$+".Pictures."
�T'  �#out%,"Run <Obey$Dir>.!RunImage"
�^  �#out%:�#out2%
�h$  � "*SETTYPE "+ra$+".!Run Obey"
�r%  � "*SETTYPE "+ra$+".!Boot Obey"
�|ș "Hourglass_Off"
���
��
��� �load_bits(app$)
��E� Loads 'buttons' sprite and 'Loader' program into picture buffer
��H� They will then be saved to the user's data disk by PROCcreate_dirs
��#� �app$,1)<>"!" � app$="!"+app$
��#bit$="<Alps$Resources>.buttons"
��)ș "OS_File",5,bit$ � ftype,,,,butlen
��� "LOAD "+bit$+" "+�~picbuf
��@ș "OS_File",5,"<Alps$Resources>.!Runimage" � ftype,,,,ldlen
��:� "LOAD <Alps$Resources>.!Runimage "+�~(picbuf+butlen)
��@ș "OS_File",5,"<Alps$Resources>.!Sprites" � ftype,,,,sprlen
��$� sprld sprlen+4:!sprld=sprlen+4
�$sprld!4=0:sprld!8=16:sprld!12=16
�:ș "OS_SpriteOp",266,sprld,"<Alps$Resources>.!Sprites"
�
cliplen=0
�&�
�0
�:� �convert(import$)
�D� in%,I%,V%,ptr,T%
�Nș "Hourglass_On"
�X!program%=0
�bprogram%!4=0
�l�fill(nref+4,nref_size-4,0)
�vin%=� import$
��
��� I%=0 � &57F
��
 V%=�#in%
�� verbs?I%=V%
��� I%
��vbn=?verbs
��(nxtvrb=verbs+(verbs?1+256*(verbs?2))
��
��� I%=0 � &57F
��
 V%=�#in%
�� nouns?I%=V%
��� I%
��obn=?nouns
�(nxtobj=nouns+(nouns?1+256*(nouns?2))
�
�V%=�#in%
� V%=�#in%
�*ptr=program%+4
�4
�>�
�H
 T%=�#in%
�R ?ptr=T%:ptr+=1
�\ � T%>=&C0 � T%-=&10
�f � T%>=&70 �
�p pb=oldpars?(T%-&70)
�z
 � pb>0 �
��  � I%=1 � pb
��   V%=�#in%
��   ?ptr=V%:ptr+=1
��   Ȏ T% �
��9    � &A4,&A1,&92,&90,&96,&97,&A6,&9A,&AA,&87,&88,&7B
��     � I%=1 � ?ptr=0:ptr+=1
��-    � &7A,&A5,&B2,&B3,&B4,&B5,&B6,&B7,&B8
��     � I%=2 � ?ptr=0:ptr+=1
��   �
��
  � I%
�� �
���
��� �#in%
�	�#in%
��incprglen(ptr-5-program%)
�ș "Hourglass_Off"
�$�
�.
�8� �import_text(import$)
�B� import$="" �
�L�error(16,"")
�V�
�`%� "LOAD "+import$+" "+�~(text%+2)
�j
mptr=1
�t"?text%=text%?2:text%?1=text%?3
�~#text%!2=(text%?4+256*text%?5)+2
��text%!6=text%?6
���
���
��
��� �import_obj(import$)
��+� in%,O%,M%,J%,flags,state,room,mlo,mhi
��
M%=odata%
��in%=�(import$)
��� in%=0 �error(10,""):�
��O%=�#in%
���#in%=0
��� I%=0 � O%
�&flags=�#in%:state=�#in%:room=�#in%
�
mlo=�#in%:mhi=�#in%
�M%?0=flags:M%?1=state
�M%?2=room:M%?3=0
�(M%?4=mlo:M%?5=mhi
�2� J%=6 � o_len-1
�<M%?J%=0
�F� J%
�P
M%+=o_len
�Z� I%
�dlast_object=O%
�n	�#in%
�x�
��
��� �import_rooms(import$)
��� in%,R%,M%,J%
��
M%=rdata%
��in%=�(import$)
��� in%=0 �error(10,""):�
��R%=�#in%
���#in%=0
��� I%=0 � R%
��� J%=0 � 3
��M%?J%=�#in%
��� J%
��M%?4=0:M%?5=0
�� J%=6 � 13 �2
�M%?J%=�#in%:M%?(J%+1)=0
�� J%
�"� J%=14 � 37
�,M%?J%=0
�6� J%
�@M%?22=�#in%
�JM%?24=�#in%
�T� J%=38 � 73
�^5� (J%<42 � J%=46 � J%=47) � M%?J%=�#in% � M%?J%=0
�h� J%
�r
M%+=r_len
�|� I%
��last_room=R%
���
��
��� �save_all(f$)
��� f$=full path name
��q� �f$,".")=0 � � 1,"To save, drag the file icon to a directory viewer in which there is an ALPS directory.":�
��ș "Hourglass_On"
��;�close(texthandle):�close(objhandle):�close(roomhandle)
��p$=f$:f$=�leafname(p$)
��p$=�p$,�(p$)-�(f$))
��d$=p$+"Alps."
���("SET Alps$Data "+d$)
��$�save_objs("<Alps$Data>Objects")
�#�save_rooms("<Alps$Data>Rooms")
�#�save_flags("<Alps$Data>Flags")
�$�save_pix("<Alps$Data>Pictures")
�&�save_vocab(f$)
�0'�save_program("<Alps$Data>Program")
�:!�save_text("<Alps$Data>Text")
�D!�save_dict("<Alps$Data>Dict")
�N$�save_pal("<Alps$Data>!Palette")
�X%�save_chars("<Alps$Data>charset")
�b�("CREATE "+p$+f$+" 100")
�l!�("SETTYPE "+p$+f$+" "+type$)
�v'�("CREATE <Alps$Data>GameData 100")
��!out%=�("<Alps$Data>GameData")
���#out%,mode%
��
�#out%
��)data_saved=�:loaded$=f$:$filename%=f$
��ș CreateM,,-1
��ș "Hourglass_Off"
���
��
��� �save_vocab(fi$)
��� fi$="" �
���error(16,"")
���
��#�save_nouns("<Alps$Data>Nouns")
�#�save_verbs("<Alps$Data>Verbs")
�*�save_adjects("<Alps$Data>Adjectives")
�$�save_preps("<Alps$Data>Prepos")
� $�save_conj("<Alps$Data>Conjunc")
�*%�save_spec("<Alps$Data>Specials")
�4#�save_noise("<Alps$Data>Noise")
�>"�save_nrefs("<Alps$Data>Nref")
�H"�save_arefs("<Alps$Data>Aref")
�R'�save_vtypes("<Alps$Data>VerbType")
�\�
�f�
�p
�z� �save_nouns(fi$)
��� fi$="" �
���error(16,"")
���
��.� "SAVE "+fi$+" "+�~nouns+" "+�~(nxtobj+1)
��� "SETTYPE "+fi$+" Data"
���
���
��
��� �save_verbs(fi$)
��� fi$="" �
���error(16,"")
���
��.� "SAVE "+fi$+" "+�~verbs+" "+�~(nxtvrb+1)
�� "SETTYPE "+fi$+" Data"
��
��
�$
�.� �save_adjects(fi$)
�8� fi$="" �
�B�error(16,"")
�L�
�V0� "SAVE "+fi$+" "+�~adjects+" "+�~(nxtadj+1)
�`� "SETTYPE "+fi$+" Data"
�j�
�t�
�~
��� �save_preps(fi$)
��� fi$="" �
���error(16,"")
���
��.� "SAVE "+fi$+" "+�~preps+" "+�~(nxtprp+1)
��� "SETTYPE "+fi$+" Data"
���
���
��
��� �save_conj(fi$)
��� fi$="" �
���error(16,"")
��
�
.� "SAVE "+fi$+" "+�~conjs+" "+�~(nxtcjn+1)
�� "SETTYPE "+fi$+" Data"
��
�(�
�2
�<� �save_spec(fi$)
�F� fi$="" �
�P�error(16,"")
�Z�
�d.� "SAVE "+fi$+" "+�~specs+" "+�~(nxtspn+1)
�n� "SETTYPE "+fi$+" Data"
�x�
���
��
��� �save_noise(fi$)
��� fi$="" �
���error(16,"")
���
��.� "SAVE "+fi$+" "+�~noise+" "+�~(nxtnsn+1)
��� "SETTYPE "+fi$+" Data"
���
���
��
��� �save_vtypes(fi$)
��� fi$="" �
��error(16,"")
��
�6� "SAVE "+fi$+" "+�~verb_type+"+"+�~(2*(maxvbn+1))
�"� "SETTYPE "+fi$+" Data"
�,�
�6�
�@
�J� �save_arefs(fi$)
�T� fi$="" �
�^�error(16,"")
�h�
�r,� "SAVE "+fi$+" "+�~aref+"+"+�~(!aref+1)
�|� "SETTYPE "+fi$+" Data"
���
���
��
��� �save_nrefs(fi$)
��� fi$="" �
���error(16,"")
���
��,� "SAVE "+fi$+" "+�~nref+"+"+�~(!nref+1)
��� "SETTYPE "+fi$+" Data"
���
���
��
��� �save_objs(fi$)
�� fi$="" �
��error(16,"")
��
�&(� � datavalid �swap_data:datavalid=�
�0(odata%?14=optr:odata%?15=last_object
�:<� "SAVE "+fi$+" "+�~odata%+"+"+�~(o_len*(last_object+1))
�D� "SETTYPE "+fi$+" Data"
�N�
�X�
�b
�l� �save_rooms(fi$)
�v� fi$="" �
���error(16,"")
���
��(� � datavalid �swap_data:datavalid=�
�� !rdata%=rptr+(last_room<<16)
��:� "SAVE "+fi$+" "+�~rdata%+"+"+�~(r_len*(last_room+1))
��� "SETTYPE "+fi$+" Data"
���
���
��
��� �save_flags(fi$)
��� fi$="" �
���error(16,"")
���
�chn%=� fi$
�� f%=0 � 7
�flag$=$(o_flags%+f%*maxd%)
� �#chn%,flag$
�*�
�4� f%=0 � 7
�>flag$=$(r_flags%+f%*maxd%)
�H�#chn%,flag$
�R�
�\
�#chn%
�f�
�p�
�z
��� �save_pix(fi$)
��� fi$="" �
���error(16,"")
���
��-� "SAVE "+fi$+" "+�~pixs+" "+�~(nxtpxn+1)
��� "SETTYPE "+fi$+" Data"
���
���
��
��� �save_program(fi$)
��� fi$="" �
���error(16,"")
���
�4� "SAVE "+fi$+" "+�~program%+"+"+�~(�prglen+4+1)
�� "SETTYPE "+fi$+" Data"
��
�$�
�.
�8� �save_text(fi$)
�B� fi$="" �
�L�error(16,"")
�V�
�`-� "SAVE "+fi$+" "+�~text%+" "+�~�text_end
�j� "SETTYPE "+fi$+" Data"
�t�
�~�
��
��� �save_dict(fi$)
��� fi$="" �
���error(16,"")
���
��>� "SAVE "+fi$+" "+�~dict%+" "+�~(dict%+?dict%+256*dict%?1)
��� "SETTYPE "+fi$+" Data"
���
���
��
��� �load_all(f$)
��� f$ is the full pathname
�ș "Hourglass_On"
�
;�close(texthandle):�close(objhandle):�close(roomhandle)
�p$=f$:f$=�leafname(p$)
�p$=�p$,�(p$)-�(f$))
�(d$=p$+"Alps."
�2r$=p$+"Resources"
�< �("SET Users$Resources "+r$)
�F*�("SET Alps$Pictures "+p$+"Pictures.")
�P�("SET Alps$Data "+d$)
�Z$�load_objs("<Alps$Data>Objects")
�d#�load_rooms("<Alps$Data>Rooms")
�n#�load_flags("<Alps$Data>Flags")
�x$�load_pix("<Alps$Data>Pictures")
���load_vocab(f$)
��'�load_program("<Alps$Data>Program")
��!�load_text("<Alps$Data>Text")
��!�load_dict("<Alps$Data>Dict")
��!�("PRINT <Alps$Data>charset")
��)data_saved=�:loaded$=f$:$filename%=f$
��ș "Hourglass_Off"
���
��
��� �load_vocab(f$)
��
� f$="" �
���error(16,"")
���
�#�load_nouns("<Alps$Data>Nouns")
�#�load_verbs("<Alps$Data>Verbs")
�*�load_adjects("<Alps$Data>Adjectives")
�"$�load_preps("<Alps$Data>Prepos")
�,$�load_conj("<Alps$Data>Conjunc")
�6%�load_spec("<Alps$Data>Specials")
�@#�load_noise("<Alps$Data>Noise")
�J'�load_vtypes("<Alps$Data>VerbType")
�T"�load_nrefs("<Alps$Data>Nref")
�^"�load_arefs("<Alps$Data>Aref")
�h�
�r�
�|
��� �load_nouns(fi$)
��� fi$="" �
���error(16,"")
���
��� "LOAD "+fi$+" "+�~nouns
��obn=?nouns
��(nxtobj=nouns+(nouns?1+256*(nouns?2))
���
���
��
��� �load_verbs(fi$)
��� fi$="" �
���error(16,"")
��
�� "LOAD "+fi$+" "+�~verbs
�vbn=?verbs
�&(nxtvrb=verbs+(verbs?1+256*(verbs?2))
�0�
�:�
�D
�N� �load_adjects(fi$)
�X� fi$="" �
�b�error(16,"")
�l�
�v� "LOAD "+fi$+" "+�~adjects
��adn=?adjects
��.nxtadj=adjects+(adjects?1+256*(adjects?2))
���
���
��
��� �load_preps(fi$)
��� fi$="" �
���error(16,"")
���
��� "LOAD "+fi$+" "+�~preps
��prn=?preps
��(nxtprp=preps+(preps?1+256*(preps?2))
���
��
�
�� �load_conj(fi$)
� � fi$="" �
�*�error(16,"")
�4�
�>� "LOAD "+fi$+" "+�~conjs
�Hcjn=?conjs
�R(nxtcjn=conjs+(conjs?1+256*(conjs?2))
�\�
�f�
�p
�z� �load_spec(fi$)
��� fi$="" �
���error(16,"")
���
��� "LOAD "+fi$+" "+�~specs
��spn=?specs
��(nxtspn=specs+(specs?1+256*(specs?2))
���
���
��
��� �load_noise(fi$)
��� fi$="" �
���error(16,"")
���
�� "LOAD "+fi$+" "+�~noise
�nsn=?noise
�(nxtnsn=noise+(noise?1+256*(noise?2))
�$�
�.�
�8
�B� �load_vtypes(fi$)
�L� fi$="" �
�V�error(16,"")
�`�
�j!� "LOAD "+fi$+" "+�~verb_type
�t�
�~�
��
��� �load_arefs(fi$)
��� fi$="" �
���error(16,"")
���
��� "LOAD "+fi$+" "+�~aref
���
���
��
��� �load_nrefs(fi$)
��� fi$="" �
���error(16,"")
��
�
� "LOAD "+fi$+" "+�~nref
��
��
�(
�2� �load_objs(fi$)
�<� fi$="" �
�F�error(16,"")
�P�
�Z� "LOAD "+fi$+" "+�~odata%
�doptr=odata%?14
�nlast_object=odata%?15
�x�
���
��
��� �load_rooms(fi$)
��� fi$="" �
���error(16,"")
���
��� "LOAD "+fi$+" "+�~rdata%
��rptr=!rdata% � &FFFF
��'last_room=(!rdata% � &FFFF0000)>>16
���
���
��
��� �load_flags(fi$)
�� fi$="" �
��error(16,"")
��
�"chn%=� fi$
�,� f%=0 � 7
�6�#chn%,flag$
�@$(o_flags%+f%*maxd%)=flag$
�J�
�T
�^� f%=0 � 7
�h�#chn%,flag$
�r$(r_flags%+f%*maxd%)=flag$
�|�
��
�#chn%
���
���
��
��� �load_pix(fi$)
��� fi$="" �
���error(16,"")
���
��� "LOAD "+fi$+" "+�~pixs
��
pxn=?pixs
��%nxtpxn=pixs+(pixs?1+256*(pixs?2))
���
���
�
�� �load_program(fi$)
�� fi$="" �
�&�error(16,"")
�0�
�: � "LOAD "+fi$+" "+�~program%
�D�
�N�
�X
�b� �load_text(fi$)
�l� fi$="" �
�v�error(16,"")
���
��� "LOAD "+fi$+" "+�~text%
��
mptr=1
���
���
��
��� �load_dict(fi$)
��� I%,L%
��� fi$="" �
���error(16,"")
���
��� "LOAD "+fi$+" "+�~dict%
��tok%=dict%?2:L%=0
�!� tok%=0 tok%=128 � tok%-=128
�� I%=1 � tok%
�tok$(I%)=$(dict%+3+L%)
� L%+=�tok$(I%)+1
�*�
�4�
�>�
�H
�R� �setup_disk(S%)
�\�getw(setuph):�getpointer
�f4�open(setuph,mousex%-64,mousey%,x1%-x0%,y1%-y0%)
�pC�sys_claiminputfocus(setuph,2,0,0,-1,�(�geticondata(setuph,2)))
�z�getw(setuph)
��!ȗ ȓ x0%,y0%,x1%-x0%,y1%-y0%
��dialogue%=S%
���
��
��� �quit(S%)
��� � data_saved �
��^ans = �errorbox("There is unsaved data in the memory. Do you really want to quit?",0,3,S%)
���
��quit%=�
���
���
��
��� �ensure(S%,T$)
�"dialogue%=�errorbox(T$,0,3,S%)
��
�
�$
�.'� ------ Vocabulary routines ------
�8
�B#� �getobn(text$,� num,� found$)
�L/sptr=nouns+3:�search(sptr,text$,num,found$)
�V�
�`
�j#� �getvbn(text$,� num,� found$)
�t/sptr=verbs+3:�search(sptr,text$,num,found$)
�~�
��
��#� �getadn(text$,� num,� found$)
��1sptr=adjects+3:�search(sptr,text$,num,found$)
���
��
��#� �getprn(text$,� num,� found$)
��/sptr=preps+3:�search(sptr,text$,num,found$)
���
��
��#� �getcjn(text$,� num,� found$)
��/sptr=conjs+3:�search(sptr,text$,num,found$)
���
�
�
#� �getspn(text$,� num,� found$)
�/sptr=specs+3:�search(sptr,text$,num,found$)
��
�(
�2#� �getnsn(text$,� num,� found$)
�</sptr=noise+3:�search(sptr,text$,num,found$)
�F�
�P
�Z,� �search(sptr,search$,� number,� temp$)
�d� temp$,found
�nnumber=0
�xHF%=work%:B%=sptr:$(work%+&128)=search$:� put search string in 'text'
��� search
��number=!(work%+&148)
���
��
��� �word(type,line$)
��1� Add words to the vocabulary or picture list
��;� word types are - nouns = 1, verbs = 2, adjectives = 3
��G�                  prepositions = 4, conjunctions = 5, specials = 6
��)�                  picture names = 10
��!� index,ptr,I%,len,len2,temp$
��
��� line$="" � �
��
�#ȕ �"0123456789=",�line$,1))<>0
�line$=�line$,2)
��
�"
�,ȕ �line$,1)=" "
�6line$=�line$,2)
�@�
�J
�T� type<4 � type=10 �
�^7end=�line$,"<"):� end=0 � �error(22,""):errflag=�:�
�h-number$=�line$,end+1):line$=�line$,end-1)
�r4� �number$,1)=">" � number$=�number$,�number$-1)
�|�
��number$=""
���
��
��� number$="" �
��
Ȏ type �
��	� 1,3
��number$=�(obn)
��� 2
��+number$="0":� Default verb type is zero
��
��number$=""
���
���
�
�index=0
�ptr=�line$,",")
�&
� ptr=0 �
�0!a_list$(index)=�line$,maxlen)
�:�
�Dȕ ptr<>0 � index<11
�Ntemp$=�line$,ptr-1)
�Xlen=�(line$)
�bline$=�line$,len-ptr)
�l!a_list$(index)=�temp$,maxlen)
�vindex+=1
��ptr=�line$,",")
���
��!a_list$(index)=�line$,maxlen)
���
��
��
Ȏ type �
��
��� 1
��� obn=maxobn �
��)�error(17,"at "+a_list$(0)):errflag=�
���
��� I%=0 � index
��  len2=� a_list$(I%)
�  � len2>0 �
�#  �getobn(a_list$(I%),num,fnd$)
�.  � num<>0 �error(5,a_list$(I%)):errflag=�
� >  � nxtobj+len2>noun_end-2 �error(13,error$(38)):errflag=�
�*  � � errflag �
�4C    $nxtobj=a_list$(I%):?(nxtobj+len2-1)=?(nxtobj+len2-1) � 128
�>6    nxtobj+=len2:?nxtobj=obn:nxtobj+=1:?nxtobj=&FF
�H  �
�R  �
�\� I%
�f  � � errflag �
�p    obn+=1
�zL    ?nouns=obn:nouns?1=(nxtobj-nouns) � 256:nouns?2=(nxtobj-nouns) � 256
��>    ptr=1:memptr=nref+!nref:svmptr=memptr:refs=0:memptr+=1
��	    �
��0    �decode_parameter(number$,ptr,ptr,val,0)
��3    � � errflag � ?memptr=val:memptr+=1:refs+=1
��     � ptr>�number$ � errflag
��$    ?memptr=0:!nref=!nref+refs+1
��    ?svmptr=refs
��  �
���
��� 2
��� vbn=maxvbn �
��)�error(18,"at "+a_list$(0)):errflag=�
���
�� I%=0 � index
�  len2=� a_list$(I%)
�  � len2>0 �
�$#  �getvbn(a_list$(I%),num,fnd$)
�..  � num<>0 �error(8,a_list$(I%)):errflag=�
�8>  � nxtvrb+len2>verb_end-2 �error(13,error$(39)):errflag=�
�B  � � errflag �
�LC    $nxtvrb=a_list$(I%):?(nxtvrb+len2-1)=?(nxtvrb+len2-1) � 128
�V6    nxtvrb+=len2:?nxtvrb=vbn:nxtvrb+=1:?nxtvrb=&FF
�`  �
�j  �
�t� I%
�~� � errflag �
��	ptr=1
��,�decode_parameter(number$,ptr,ptr,val,0)
��� � errflag �
��verb_type?(2*vbn)=val
��#oloc$=�number$,ptr+1):olocflg=0
�� � �oloc$,"C")<>0 � olocflg=1
��*� �oloc$,"P")<>0 � olocflg=olocflg � 2
��verb_type?(2*vbn+1)=olocflg
��
vbn+=1
��H?verbs=vbn:verbs?1=(nxtvrb-verbs) � 256:verbs?2=(nxtvrb-verbs) � 256
���
���
��
�
� 3
�� adn=maxadj �
�)�error(19,"at "+a_list$(0)):errflag=�
�(�
�2� I%=0 � index
�<  len2=� a_list$(I%)
�F  � len2>0 �
�P#  �getadn(a_list$(I%),num,fnd$)
�Z.  � num<>0 �error(8,a_list$(I%)):errflag=�
�d>  � nxtadj+len2>adjc_end-2 �error(13,error$(40)):errflag=�
�n  � � errflag �
�xC    $nxtadj=a_list$(I%):?(nxtadj+len2-1)=?(nxtadj+len2-1) � 128
��6    nxtadj+=len2:?nxtadj=adn:nxtadj+=1:?nxtadj=&FF
��  �
��  �
��� I%
��  � � errflag �
��
adn+=1
��R?adjects=adn:adjects?1=(nxtadj-adjects) � 256:adjects?2=(nxtadj-adjects) � 256
��>    ptr=1:memptr=aref+!aref:svmptr=memptr:refs=0:memptr+=1
��	    �
��0    �decode_parameter(number$,ptr,ptr,val,0)
��3    � � errflag � ?memptr=val:memptr+=1:refs+=1
��     � ptr>�number$ � errflag
��$    ?memptr=0:!aref=!aref+refs+1
�    ?svmptr=refs
�  �
��
�"� 4
�,� prn=maxprep �
�6)�error(20,"at "+a_list$(0)):errflag=�
�@�
�J� I%=0 � index
�T  len2=� a_list$(I%)
�^  � len2>0 �
�h#  �getprn(a_list$(I%),num,fnd$)
�r.  � num<>0 �error(8,a_list$(I%)):errflag=�
�|>  � nxtprp+len2>prep_end-2 �error(13,error$(41)):errflag=�
��  � � errflag �
��C    $nxtprp=a_list$(I%):?(nxtprp+len2-1)=?(nxtprp+len2-1) � 128
��6    nxtprp+=len2:?nxtprp=prn:nxtprp+=1:?nxtprp=&FF
��  �
��  �
��� I%
��  � � errflag �
��    prn+=1
��L    ?preps=prn:preps?1=(nxtprp-preps) � 256:preps?2=(nxtprp-preps) � 256
��  �
���
��� 5
��� cjn=maxconj �
�)�error(21,"at "+a_list$(0)):errflag=�
��
�� I%=0 � index
�&  len2=� a_list$(I%)
�0  � len2>0 �
�:#  �getcjn(a_list$(I%),num,fnd$)
�D.  � num<>0 �error(8,a_list$(I%)):errflag=�
�N>  � nxtcjn+len2>conj_end-2 �error(13,error$(42)):errflag=�
�X  � � errflag �
�bC    $nxtcjn=a_list$(I%):?(nxtcjn+len2-1)=?(nxtcjn+len2-1) � 128
�l6    nxtcjn+=len2:?nxtcjn=cjn:nxtcjn+=1:?nxtcjn=&FF
�v  �
��  �
��� I%
��  � � errflag �
��    cjn+=1
��L    ?conjs=cjn:conjs?1=(nxtcjn-conjs) � 256:conjs?2=(nxtcjn-conjs) � 256
��  �
���
��� 6
��� spn=maxspec �
��)�error(24,"at "+a_list$(0)):errflag=�
���
��� I%=0 � index
��  len2=� a_list$(I%)
�  � len2>0 �
�#  �getspn(a_list$(I%),num,fnd$)
�.  � num<>0 �error(8,a_list$(I%)):errflag=�
� >  � nxtspn+len2>spec_end-2 �error(13,error$(43)):errflag=�
�*  � � errflag �
�4C    $nxtspn=a_list$(I%):?(nxtspn+len2-1)=?(nxtspn+len2-1) � 128
�>6    nxtspn+=len2:?nxtspn=spn:nxtspn+=1:?nxtspn=&FF
�H  �
�R  �
�\� I%
�f  � � errflag �
�p    spn+=1
�zL    ?specs=spn:specs?1=(nxtspn-specs) � 256:specs?2=(nxtspn-specs) � 256
��  �
���
��� 7
��� nsn=maxnoise �
��)�error(25,"at "+a_list$(0)):errflag=�
���
��� I%=0 � index
��  len2=� a_list$(I%)
��  � len2>0 �
��#  �getnsn(a_list$(I%),num,fnd$)
��.  � num<>0 �error(8,a_list$(I%)):errflag=�
��?  � nxtnsn+len2>noise_end-2 �error(13,error$(44)):errflag=�
��  � � errflag �
�C    $nxtnsn=a_list$(I%):?(nxtnsn+len2-1)=?(nxtnsn+len2-1) � 128
�6    nxtnsn+=len2:?nxtnsn=nsn:nxtnsn+=1:?nxtnsn=&FF
�  �
�$  �
�.� I%
�8  � � errflag �
�B    nsn+=1
�LL    ?noise=nsn:noise?1=(nxtnsn-noise) � 256:noise?2=(nxtnsn-noise) � 256
�V  �
�`�
�j� 10
�t� pxn=maxpix �
�~)�error(26,"at "+a_list$(0)):errflag=�
���
��� I%=0 � index
��  len2=� a_list$(I%)
��  � len2>0 �
��=  � nxtpxn+len2>pix_end-2 �error(13,error$(45)):errflag=�
��  � � errflag �
��F    $nxtpxn=a_list$(I%):� ?(nxtpxn+len2-1)=?(nxtpxn+len2-1) OR 128
��    nxtpxn+=len2+1
��  �
��  �
��� I%
��  � � errflag �
�    loc$=�number$,1)
�
    � loc$<>"" �
�:      � �"TBLR",loc$)<>0 � val=�"TBLR",loc$)-1 � val=0
�    � val=0
�(	    �
�2)    ?nxtpxn=val:nxtpxn+=5:?nxtpxn=&FF
�<    pxn+=1
�FG    ?pixs=pxn:pixs?1=(nxtpxn-pixs) � 256:pixs?2=(nxtpxn-pixs) � 256
�P  �
�Z�
�d�
�n�
�x
��,� �getstr(test$,place,� place,� result$)
��chr$=�test$,place,1)
��� chr$=�13 � result$="":�
��#ȕ chr$=" " � chr$="," place+=1
��chr$=�test$,place,1)
���
��
��3� chr$<>� 34 �error(6," : "+line$):result$="":�
��place+=1
��Nplace2=�line$,�34,place):� place2<place �error(6," : "+line$):result$="":�
��
��&result$=�line$,place,place2-place)
��place=place2+1
��
�
�� �listnouns
�"� mptr,I%,J%,refs
�,� obn=1 � �
�6mptr=nref+4
�@� I%=1 � obn-1
�J�put(�(I%)+"= ")
�T�pvok(I%,1,�):�put(",<")
�^refs=?mptr
�h� refs>0 �
�r� J%=1 � refs
�|�put(�(J%?mptr))
��� J%<refs �put(",")
���
���
��mptr+=refs+1
���put(">"+�13)
���
���put(�0)
���
��
��� �listverbs
��� vbn=1 � �
��� I%=1 � vbn-1
���put(�(I%)+"= ")
�vtype=verb_type?(2*I%)
�%�pvok(I%,0,�):�put(",<"+�(vtype))
�%olflg=verb_type?(2*I%+1):oloc$=""
�&� vtype>0 �
�0!� (olflg � 1)<>0 � oloc$+="C"
�:!� (olflg � 2)<>0 � oloc$+="P"
�D
�put(",")
�N�
�X�put(oloc$+">"+�13)
�b�
�l�put(�0)
�v�
��
��� �listadjs
��� mptr,I%,J%,refs
��� adn=1 � �
��mptr=aref+4
��� I%=1 � adn-1
���put(�(I%)+"= ")
���pvok(I%,2,�):�put(",<")
��refs=?mptr
��� refs>0 �
��� J%=1 � refs
���put(�(J%?mptr))
��� J%<refs �put(",")
��
��
�mptr+=refs+1
� �put(">"+�13)
�*�
�4�put(�0)
�>�
�H
�R� �listpreps
�\� I%,J%
�f� prn=1 � �
�p� I%=1 � prn-1
�z�put(�(I%)+"= ")
���pvok(I%,3,�):�put(�13)
���
���put(�0)
���
��
��� �listconjs
��� I%,J%
��� cjn=1 � �
��� I%=1 � cjn-1
���put(�(I%)+"= ")
���pvok(I%,4,�):�put(�13)
���
���put(�0)
��
�
�� �listspecs
�$� I%,J%
�.� spn=1 � �
�8� I%=1 � spn-1
�B�put(�(I%)+"= ")
�L�pvok(I%,5,�):�put(�13)
�V�
�`�put(�0)
�j�
�t
�~� �listnoise
��� I%,J%
��� nsn=1 � �
��� I%=1 � nsn-1
���put(�(I%)+"= ")
���pvok(I%,6,�):�put(�13)
���
���put(�0)
���
��
��� �store_pix
��ș "Hourglass_On"
��
errflag=�
�	pxn=1
�
Gnxtpxn=pixs:?nxtpxn=pxn:nxtpxn?1=3:nxtpxn?2=0:nxtpxn+=3:?nxtpxn=&FF
�last%=�find_lastrow
�� I%=0 � last%
�("� � errflag �word(10,�row(I%))
�2�
�<ș "Hourglass_Off"
�F
�P�
�Z
�d� �store_vocab
�nș "Hourglass_On"
�xerrflag=�:�remove_markers
��
��Ȏ voc_sect% �
��� 1
��	obn=1
��Hnxtobj=nouns:?nxtobj=obn:nxtobj?1=3:nxtobj?2=0:nxtobj+=3:?nxtobj=&FF
��!nref=4
��� 2
��	vbn=1
��Hnxtvrb=verbs:?nxtvrb=vbn:nxtvrb?1=3:nxtvrb?2=0:nxtvrb+=3:?nxtvrb=&FF
��� 3
��	adn=1
��Jnxtadj=adjects:?nxtadj=adn:nxtadj?1=3:nxtadj?2=0:nxtadj+=3:?nxtadj=&FF
��!aref=4
�� 4
�	prn=1
�Hnxtprp=preps:?nxtprp=prn:nxtprp?1=3:nxtprp?2=0:nxtprp+=3:?nxtprp=&FF
�"� 5
�,	cjn=1
�6Hnxtcjn=conjs:?nxtcjn=cjn:nxtcjn?1=3:nxtcjn?2=0:nxtcjn+=3:?nxtcjn=&FF
�@� 6
�J	spn=1
�THnxtspn=specs:?nxtspn=spn:nxtspn?1=3:nxtspn?2=0:nxtspn+=3:?nxtspn=&FF
�^� 7
�h	nsn=1
�rHnxtnsn=noise:?nxtnsn=nsn:nxtnsn?1=3:nxtnsn?2=0:nxtnsn+=3:?nxtnsn=&FF
�|�
��last%=�find_lastrow
��
��� I%=0 � last%
��* � � errflag �word(voc_sect%,�row(I%))
���
��� � errflag text_ok=�
��ș "Hourglass_Off"
���
��
��� �findnoun(obj,� J%)
��B� Finds the number of the noun referring to a specified object
��� M%,I%,N%,found
��
M%=nref+4
�ȕ N%<last_object � � found
�
J%=?M%
�� J%>0 �
�&� I%=1 � J%
�0� M%?I%=obj � found=�
�:�
�D�
�NM%+=J%+1
�X	N%+=1
�b�
�l� found �=N% �=0
�v
��
��� �which_obj(N%,� V$,� R%)
��C� Returns a string containing the objects referenced by noun N%
��%� R%=number of objects referenced
��� M%,found,I%,J%,K%
��
��
M%=nref+4
��� N%>1 �
��� K%=1 � N%-1
�� J%=?M%
��
 M%+=J%+1
���
���
�
J%=?M%
�R%=J%:V$=""
�� J%>0 �
� � I%=1 � J%
�* V$+=�(I%?M%)+","
�4�
�>�
�H�
�R
�\� �pvok(num,type,all)
�f� temp$,found,ctr
�p� num=0 � �
�z
��
Ȏ type �
��� 0: sptr=verbs+3
��� 1: sptr=nouns+3
��� 2: sptr=adjects+3
��� 3: sptr=preps+3
��� 4: sptr=conjs+3
��� 5: sptr=specs+3
��� 6: sptr=noise+3
��� 10: sptr=pixs+3
���
��
��A%=num:B%=sptr
��
� � all �
�/� pvok:temp$=$atext:� temp$<>"" �put(temp$)
��
�?pvokflag=0
�$�
�.
� pvok
�8� ?pvokflag=0 �
�B� ctr>0 � �put(",")
�L(temp$=$atext:� temp$<>"" �put(temp$)
�Vctr+=1:B%=!address
�`�
�j� ?pvokflag>0
�t�
�~�
��
��(� �nonspc(str$,place,� place,� chr$)
��ȕ �str$,place,1)=" "
��  place+=1
���
��chr$=�str$,place,1)
���
��
��
� �dodefn
��;� vbn=maxvbn �error(11,": "+�(maxvbn)+" "+error$(46)):�
��?prgptr=def_token:prgptr+=1
��
�'�getstr(line$,ptr,ptr,vrb$):index=0
�
� errflag � �
�!� WHILE vrb$<>"" AND index<11
� a_list$(index)=vrb$:index+=1
�($� PROCgetstr(line$,ptr,ptr,vrb$)
�2� ENDWHILE
�<
�F$� vrb$="" �error(1,error$(47)):�
�P
�Z� errflag � �
�d
�nflag=�:index-=1
�x� I%=0 � index
��#  �getvbn(a_list$(I%),num,fnd$)
��=  � num<>0 � � existing_verb �error(8,a_list$(I%)):flag=�
��  oldvbn=num
��� I%
��
�� � � flag � � existing_verb �
��  � I%=0 � index
��    len2=� a_list$(I%)
��C    $nxtvrb=a_list$(I%):?(nxtvrb+len2-1)=?(nxtvrb+len2-1) � 128
��*    nxtvrb+=len2:?nxtvrb=vbn:nxtvrb+=1
��
  � I%
��.  ?prgptr=vbn:prgptr+=1:?nxtvrb=&FF:vbn+=1
��J  ?verbs=vbn:verbs?1=(nxtvrb-verbs) � 256:verbs?2=(nxtvrb-verbs) � 256
�
��
�.� existing_verb � ?prgptr=oldvbn:prgptr+=1
�"�
�,
�6existing_verb=�
�@�
�J
�T
� �prtdef
�^vrbnum=?listptr
�h-�put(�32+�34):�pvok(vrbnum,0,�):�put(�34)
�r�
�|
��� �fntype(parm)
��
� temp
��1� token=prep_token � token=notprep_token � =3
��6temp=parm � %01000000:� check if `object` function
��� temp<>0 �=1
��4temp=parm � %00100000:� check if `verb` function
��� temp<>0 �=2 � =0
��
��� �prntobj
��	� num
��objnum=?listptr
��� objnum>last_object � �
��num=�findnoun(objnum,refs)
�� refs=1 �
�&�put(�34):�pvok(num,1,�):�put(�34)
�doneit=�
�&�
�0�
�:
�D� �prntvrb
�Nvrbnum=?listptr
�X� vrbnum>=vbn � �
�b)�put(�34):�pvok(vrbnum,0,�):�put(�34)
�ldoneit=�
�v�
��
��� �printprep
��	� num
��num=?listptr
��� num>=prn � �
��&�put(�34):�pvok(num,3,�):�put(�34)
��doneit=�
���
��
��� �copy_from_editor
��� ldptr,svptr,O%,I%,R%
��svptr=initsave
��� O%=last_object � 0 �-1
�ldptr=odata%+O%*o_len
�!svptr=!ldptr:svptr+=4
�?svptr=ldptr?12:svptr+=1
� ?svptr=ldptr?14:svptr+=1
�*?svptr=ldptr?15:svptr+=1
�4�
�>� R%=last_room � 0 �-1
�Hldptr=rdata%+R%*r_len
�R*?svptr=?ldptr:svptr?1=ldptr?1:svptr+=2
�\� I%=54 � 73 �4
�f!svptr=I%!ldptr:svptr+=4
�p�
�z�
���
��
��� �copy_to_editor
��� ldptr,svptr,O%,I%,R%
��ldptr=initsave
��� O%=last_object � 0 �-1
��svptr=odata%+O%*o_len
��!svptr=!ldptr:ldptr+=4
��svptr?12=?ldptr:ldptr+=1
��svptr?14=?ldptr:ldptr+=1
��svptr?15=?ldptr:ldptr+=1
���
��� R%=last_room � 0 �-1
�svptr=rdata%+R%*r_len
�*?svptr=?ldptr:svptr?1=ldptr?1:ldptr+=2
�� I%=54 � 73 �4
�$I%!svptr=!ldptr:ldptr+=4
�.�
�8�
�B�
�L
�V� �swap_data
�`� ldptr,svptr,O%,I%,R%,T%
�jldptr=initsave
�t� O%=last_object � 0 �-1
�~svptr=odata%+O%*o_len
��
T%=!svptr
��$!svptr=!ldptr:!ldptr=T%:ldptr+=4
��T%=svptr?12
��&svptr?12=?ldptr:?ldptr=T%:ldptr+=1
��T%=svptr?14
��&svptr?14=?ldptr:?ldptr=T%:ldptr+=1
��T%=svptr?15
��&svptr?15=?ldptr:?ldptr=T%:ldptr+=1
���
��� R%=last_room � 0 �-1
��svptr=rdata%+R%*r_len
��TT%=?svptr:?svptr=?ldptr:?ldptr=T%:T%=svptr?1:svptr?1=ldptr?1:ldptr?1=T%:ldptr+=2
�� I%=54 � 73 �4
�
T%=I%!svptr
�&I%!svptr=!ldptr:!ldptr=T%:ldptr+=4
��
�(�
�2�
�<
�F0� �errorbox(err$,err%,Errorflags,fromPlace%)
�Pș CreateM,,-1
�Zș Poll,,block
�d!mistake = err%
�n� � testing � err%=29 �
�xC   err$="Sorry - not implemented in this version": Errorflags=1
���
��-� testing err$+=" (Error code: "+�(�)+")"
��U� (err% � &FF)=&C7 err$="Disk not formatted. Shall I format it now?":Errorflags=3
��$(mistake+4) = err$+�(0)
��U� fromPlace%<>-99 � Errorflags=Errorflags � 16:t$="Message from ALPS" � t$="ALPS"
��<ș "Wimp_ReportError",mistake,Errorflags,t$ � ,dialogue%
��ok = (dialogue%=1)
��
��� (err% � &FF)=&C7 � ok �
��   *FORMAT 0 E Y
��B   �create_dirs(�geticondata(setuph,2),�geticondata(setuph,5))
���
��
�Ȏ fromPlace% �
�#� -99: � *** a proper error ***
�� 0:� ok � �save_all(path$)
�"?� 1:� ok � �load_all(path$):�open(ALPSmain,400,800,600,600)
�,� 2:� ok � �create_dirs
�6� 3:� ok �
�@quit%=�
�JCș "Wimp_GetCaretPosition",,quitblk+20 :� Fill up first 5 words
�T=quitblk!44=&1FC                         :� CTRL-SHIFT-f12
�^D!quitblk=48                             :� Size of message block
�hquitblk!12=0
�rGquitblk!16=8                            :� Send Key_Pressed message
�|1ș "Wimp_SendMessage",17,quitblk,prequittask%
���
��� 4:� ok � quit%=�
���
��=dialogue%
��
��
��� �OS_Var(V$)
��*ș "XOS_ReadVarVal",V$,0,-1 � ,,exists
��=exists
��
��� �ReadVarVal(V$)
��
� vblk 32
��.ș "XOS_ReadVarVal",V$,vblk,32,,0,3 � ,,N%
�vblk?N%=13
�
=$vblk
� 
�&&� �iconbar(sprBlk, spname$, xx,yy)
�0
!qBlk%=-1
�:3qBlk%!4=0:qBlk%!8=0:qBlk%!12=xx*2:qBlk%!16=yy*4
�DqBlk%!20=&2102
�N/� qBlk%!24 (�spname$+1):$(qBlk%!24)=spname$
�XqBlk%!28=sprBlk
�bqBlk%!32=�spname$+1
�l(ș "Wimp_CreateIcon",,qBlk% � theIc%
�v=theIc%
�� 
�� 
��� �receive(block)
��ref%=block!8
��Ȏ block!16 �
��  � 0   :quit%=�
��.  � 2   :� SaveAck from Filer/another app.
��%            path$=�name(block+44)
��             �save_all(path$)
��5            !block=64:block!12=block!8:block!16=3
��@            ș "Wimp_SendMessage",17,block,block!20,block!24
��  � 3,5 :�load(block)
��  � 8   :� PreQuit
�    � � data_saved �
�    prequittask%=block!4
�    bytes=!block
�     � I%=0 � bytes
�*    quitblk!I%=block!I%
�4	    �
�>    quitblk!12=quitblk!8
�H    block!12=block!8
�R&    ș "Wimp_SendMessage",19,block
�\a    ans = �errorbox("There is unsaved data in the memory. Do you really want to quit?",0,3,3)
�f	    �
�p+  � &502:�help(block!32,block!36,block)
�z  � &400C1:� mode change
��   mode%=�
��   �getmodeinfo
��D   �assemble(armcode%):� Need to allow for different screen size
���   � scrnsize>oldsize � null=�errorbox("Warning! It may not be possible to display pictures in this mode due to memory restrictions. To display pictures quit ALPS and restart in this mode.",0,1,5)
���
���
��
��� �load(b)
��ourtype=�("&"+type$)
��� b!40 = ourtype �
��  path$=�name(b+44)
��  � � data_saved �
��    �LoadAck
�\    �ensure(1,"Unsaved data in memory. Please confirm that you want to load this file.")
�	    �
�    �load_all(path$)
�$    �LoadAck
�.'    �open(ALPSmain,400,800,600,600)
�8  �
�B�
�L�
�V
�`� �LoadAck
�j)block!12=block!8:block!16=4:!block=64
�t*ș "Wimp_SendMessage",17,block,block!4
�~�
��
��� �save
��$path$=�geticondata(savehandle,2)
���getpointer
��4block!20=64:block!32=0:block!36=1:� DataSave MSG
��Eblock!40=handle%:block!44=icon%:block!48=mousex%:block!52=mousey%
��.block!56=10000:� Estimated size of data???
��%block!60=�("&"+type$):� File type
��#$(block+64)=�leafname(path$)+�0
��3ș "Wimp_SendMessage",17,block+20,handle%,icon%
���
��
�� �name(indx)
�
� f$,g$,p,i
�
�ȕ ?indx<>0
�(f$+=�(?indx):indx+=1
�2�
�<=f$
�F
�P� �leafname(f$)
�Zp=1
�d�
�n(i=�f$,"."):� i<>0 p=i+1:�f$,i,1)="#"
�x	� i=0
��
f$=�f$,p)
��=f$
��
��� �tick_objected
��'flags%=�(�geticondata(objhandle,8))
��� fl%=7 � 0 � -1
��  flag%=flags% � 2^fl%
��  flags%=flags% � 2^fl%
��#  ptr=(m_objflag+28+(7-fl%)*24)
��  � flag%=1 �
��    ?ptr=?ptr � 1
��  � ?ptr=?ptr � %11111110
��  �
�	� fl%
�=0
�
�"� �tick_message
�,  ptr=0
�6  � I%=1 � maxsw%
�@)    $(swdata%+ptr)=�(switch_vals(I%))
�J    ptr+=12
�T    � I%>switch_vals(0) �
�^=      ?(m_switch%+28+24*I%)=(?(m_switch%+28+24*I%) � &FE)
�h	    �
�r;      ?(m_switch%+28+24*I%)=(?(m_switch%+28+24*I%) � 1)
�|	    �
��  �
��  $(m_text%+5)=�(mptr)
��k  � switch_vals(0)<>0 � ?(m_switch%+28)=(?(m_switch%+28) � &FE) � ?(m_switch%+28)=(?(m_switch%+28) � 1)
��  � overwrite �
��-    ?(m_text%+28+24)=?(m_text%+28+24) � 1
��)    ?(m_text%+28)=?(m_text%+28) � &FE
��  �
��/    ?(m_text%+28+24)=?(m_text%+28+24) � &FE
��'    ?(m_text%+28)=?(m_text%+28) � 1
��  �
��=0
��
��� �tick_program
�  � overwrite �
�-    ?(m_prog%+28+24)=?(m_prog%+28+24) � 1
�)    ?(m_prog%+28)=?(m_prog%+28) � &FE
�&  �
�0/    ?(m_prog%+28+24)=?(m_prog%+28+24) � &FE
�:'    ?(m_prog%+28)=?(m_prog%+28) � 1
�D  �
�N  � (listoption � %10)<>0 �
�X3    ?(m_listopts+28+24)=?(m_listopts+28+24) � 1
�b/    ?(m_listopts+28)=?(m_listopts+28) � &FE
�l  �
�v5    ?(m_listopts+28+24)=?(m_listopts+28+24) � &FE
��-    ?(m_listopts+28)=?(m_listopts+28) � 1
��  �
��=0
��
��� �tick_vocab
��  � overwrite �
��/    ?(m_vocab%+28+24)=?(m_vocab%+28+24) � 1
��+    ?(m_vocab%+28)=?(m_vocab%+28) � &FE
��  �
��1    ?(m_vocab%+28+24)=?(m_vocab%+28+24) � &FE
��)    ?(m_vocab%+28)=?(m_vocab%+28) � 1
��  �
��  � I%=1 � 7
�    � I%=voc_sect% �
�?      ?(m_vocab%+28+24*(I%+4))=?(m_vocab%+28+24*(I%+4)) � 1
�	    �
� A      ?(m_vocab%+28+24*(I%+4))=?(m_vocab%+28+24*(I%+4)) � &FE
�*	    �
�4
  � I%
�>=0
�H
�R
�\� �tick_
�f=0
�p
�z
��� �tick_roomedit
��2� First set the 'tick' bits for each menu item
��)flags%=�(�geticondata(roomhandle,34))
��� fl%=7 � 0 � -1
��  flag%=flags% � 2^fl%
��  flags%=flags% � 2^fl%
��"  ptr=(m_rmflag+28+(7-fl%)*24)
��  � flag%=1 �
��    ?ptr=?ptr � 1
��  � ?ptr=?ptr � %11111110
��  �
��	� fl%
��=0
�
�
�� �tick_exitedit
�$2� First set the 'tick' bits for each menu item
�.*flags%=?(rdata%+rptr*r_len+oldrmicon%)
�8� fl%=7 � 0 � -1
�B  flag%=flags% � 2^fl%
�L  flags%=flags% � 2^fl%
�V!  ptr=(m_exitf+28+(7-fl%)*24)
�`  � flag%=1 �
�j    ?ptr=?ptr � 1
�t  � ?ptr=?ptr � %11111110
�~  �
��	� fl%
��=0
��
��
��� �button_misc
��icon%(THEmiscicon)=-1
��=0
��
��
��� �tick_misc
��   ptr=(miscmenu+28+48)
��   � datavalid �
�      ?ptr = ?ptr � 1
�
   �
�!      ?ptr = ?ptr � %11111110
�   �
�(=0
�2
�<
�F� �help(w,h,b)
�P� help$
�Z
Ȏ w �
�d�� -2:help$="This is the ALPS icon.|MClick SELECT to choose an editor.|MClick MENU to quit.|MDrag an 'Alps' file icon to the ALPS icon to load it."
�n� ALPSmain
�x%help$="Click SELECT to open the "
��
Ȏ h �
��N� 0:help$="Click SELECT to Save files or Set up a disk for use with ALPS."
��F� 1:help$="Click SELECT to display the ALPS variables and status."
��q� 2:help$+="Room Editor and enter your map details.|MClick MENU Print the room data or Import BBC room data."
��� 3:help$+="Object Editor and enter your object details.|MClick MENU to Print the objects data or Import BBC objects data."
��Z� 4:help$+="Message Editor.|MClick MENU to Print the messages or Import BBC messages."
��C� 5:help$="This is the Alpine Software logo. It has no effect."
�ȃ� 6:help$+="Program Editor and enter the game's logic.|MClick MENU to Print the program, Import a BBC program or Run the game."
�ҍ� 7:help$+="Character Designer.|MDouble-click a 'BBC font' file to Load a character set.|MCurrent character set is saved with your game."
��o� 8:help$+="Vocabulary Editor and enter nouns, verbs, adjectives etc.|MClick MENU to Print the vocabulary."
���� 9:help$="Click SELECT to swap the original data in the editors with the data values obtained during a run of the game.|MA "+�128+" indicates data is original. An X indicates post-run data."
��g� 10:help$+="Picture Editor and edit the picture filenames.|MClick MENU to Print the Picture list."
��f help$="Click SELECT to choose an editor.|MTo load an 'Alps' file, drag its icon to this window."
��
�� roomhandle
�help$="Click SELECT to "
�"
Ȏ h �
�,( � 1:help$+="edit the room's flags."
�60 � 5:help$+="display the first room's data."
�@/ � 6:help$+="display the last room's data."
�J/ � 7:help$+="display the next room's data."
�T3 � 8:help$+="display the previous room's data."
�^( � 9:help$+="move forward 10 rooms."
�h& � 10:help$+="move back 10 rooms."
�r, � 11:help$+="enter the displayed data."
�|+ � 12:help$+="make this the last room."
��a � 54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69:help$="Click MENU to edit the exit flags."
��  help$=""
���
��� objhandle
�� help$="Click SELECT to "
�� Ȏ h �
��+  � 0:help$+="edit the object's flags."
��3  � 5:help$+="display the first object's data."
��2  � 6:help$+="display the last object's data."
��3  � 27:help$+="display the next object's data."
��7  � 16:help$+="display the previous object's data."
��,  � 20:help$+="move forward 10 objects."
��)  � 21:help$+="move back 10 objects."
�-  � 17:help$+="enter the displayed data."
�.  � 22:help$+="make this the last object."
�'  � 26:help$+="create a container."
�&   help$=""
�0 �
�:� texthandle
�Dohelp$="Click SELECT to position the caret.|MClick MENU to pop up a menu.|MClick ADJUST to insert a marker."
�N� design
�Xhelp$="Click SELECT to "
�b
Ȏ � �
�l, � h=66:help$+="display next character."
�v0 � h=67:help$+="display previous character."
��2 � h=68:help$+="choose a different character."
��9 � h=64:help$="This shows the character actual size."
��0 � (h>=0 � h<64):help$+="toggle this block."
��.  help$="This is the Character Designer."
���
���
��b!16=&503:� Send a message
��
b!12=ref%
��$(b+20)=help$
��!b!0=(((20+�(help$)+1)�4)*4)+4
��$(b+21+�(help$))=�(0)
��ș "Wimp_SendMessage",17,b
���
�
�� �readPalette
�� col=0 � 15
� �readpal(col,16)
�*-rgb(col,1)=r%:rgb(col,2)=g%:rgb(col,3)=b%
�4�
�>�readpal(16,24)
�H*rgb(16,1)=r%:rgb(16,2)=g%:rgb(16,3)=b%
�R� col=17 � 19
�\�readpal(col-16,25)
�f-rgb(col,1)=r%:rgb(col,2)=g%:rgb(col,3)=b%
�p�
�z�
��
��� �readpal(l%,p%)
��;� Read the rgb values for logical/physical colour l%,p%
��%ș ReadPal,l%,p% � R0,R1,palette%
��r%=(palette%>> 8)�&FF
��g%=(palette%>>16)�&FF
��b%=(palette%>>24)�&FF
���
�
00000000  0d 00 0a 18 f4 20 3e 24  2e 21 41 4c 50 53 2e 21  |..... >$.!ALPS.!|
00000010  52 75 6e 49 6d 61 67 65  0d 00 14 35 f4 20 43 6f  |RunImage...5. Co|
00000020  70 79 72 69 67 68 74 20  41 6c 70 69 6e 65 20 53  |pyright Alpine S|
00000030  6f 66 74 77 61 72 65 2f  50 68 69 6c 69 70 20 48  |oftware/Philip H|
00000040  61 77 74 68 6f 72 6e 65  20 31 39 38 39 0d 00 1e  |awthorne 1989...|
00000050  2a f4 20 57 69 74 68 20  6d 6f 64 69 66 69 63 61  |*. With modifica|
00000060  74 69 6f 6e 73 20 62 79  20 4b 65 69 74 68 20 4d  |tions by Keith M|
00000070  63 41 6c 70 69 6e 65 0d  00 28 21 76 65 72 73 69  |cAlpine..(!versi|
00000080  6f 6e 24 3d 22 35 2e 30  38 43 2c 20 32 32 2d 4e  |on$="5.08C, 22-N|
00000090  6f 76 2d 31 39 38 39 22  0d 00 32 04 0d 00 3c 28  |ov-1989"..2...<(|
000000a0  de 20 62 6c 6f 63 6b 20  26 32 30 30 2c 6d 69 73  |. block &200,mis|
000000b0  74 61 6b 65 20 33 30 30  2c 71 75 69 74 62 6c 6b  |take 300,quitblk|
000000c0  20 31 30 30 0d 00 46 04  0d 00 50 2d ee 20 85 20  | 100..F...P-. . |
000000d0  eb 20 30 3a f1 20 f6 24  3a f1 20 22 3a 22 3b 9e  |. 0:. .$:. ":";.|
000000e0  3a c8 99 22 57 69 6d 70  5f 43 6c 6f 73 65 44 6f  |:.."Wimp_CloseDo|
000000f0  77 6e 22 3a e0 0d 00 5a  04 0d 00 64 11 40 25 3d  |wn":...Z...d.@%=|
00000100  26 31 30 3a 63 74 72 25  3d 30 0d 00 6e 0b 6d 6f  |&10:ctr%=0..n.mo|
00000110  64 65 25 3d eb 0d 00 78  0d 74 65 73 74 69 6e 67  |de%=...x.testing|
00000120  3d a3 0d 00 82 41 72 65  73 6f 75 72 63 65 73 5f  |=....Aresources_|
00000130  6f 6b 3d a4 4f 53 5f 56  61 72 28 22 41 6c 70 73  |ok=.OS_Var("Alps|
00000140  24 52 65 73 6f 75 72 63  65 73 22 29 20 80 20 a4  |$Resources") . .|
00000150  4f 53 5f 56 61 72 28 22  41 6c 70 73 24 44 61 74  |OS_Var("Alps$Dat|
00000160  61 22 29 0d 00 8c 04 0d  00 96 19 c8 99 20 22 4f  |a").......... "O|
00000170  53 5f 47 65 74 45 6e 76  22 20 b8 20 45 6e 76 24  |S_GetEnv" . Env$|
00000180  0d 00 a0 1e 49 25 3d a7  45 6e 76 24 2c bd 33 34  |....I%=.Env$,.34|
00000190  2c a7 45 6e 76 24 2c bd  33 34 29 2b 31 29 0d 00  |,.Env$,.34)+1)..|
000001a0  aa 13 65 66 24 3d c1 45  6e 76 24 2c 49 25 2b 31  |..ef$=.Env$,I%+1|
000001b0  29 0d 00 b4 12 c8 95 20  c0 65 66 24 2c 31 29 3d  |)...... .ef$,1)=|
000001c0  22 20 22 0d 00 be 0f 65  66 24 3d c1 65 66 24 2c  |" "....ef$=.ef$,|
000001d0  32 29 0d 00 c8 05 ce 0d  00 d2 04 0d 00 dc 1e 74  |2).............t|
000001e0  68 65 4c 61 73 74 4d 65  6e 75 20 3d 20 30 20 3a  |heLastMenu = 0 :|
000001f0  20 74 69 63 6b 24 3d 22  22 0d 00 e6 04 0d 00 f0  | tick$="".......|
00000200  0f 74 79 70 65 24 3d 22  43 46 38 22 0d 00 fa 04  |.type$="CF8"....|
00000210  0d 01 04 0f de 20 74 65  6d 70 42 6c 6b 20 34 0d  |..... tempBlk 4.|
00000220  01 0e 15 24 74 65 6d 70  42 6c 6b 20 3d 20 22 54  |...$tempBlk = "T|
00000230  41 53 4b 22 0d 01 18 35  c8 99 20 22 57 69 6d 70  |ASK"...5.. "Wimp|
00000240  5f 49 6e 69 74 69 61 6c  69 73 65 22 2c 32 30 30  |_Initialise",200|
00000250  2c 21 74 65 6d 70 42 6c  6b 2c 22 41 4c 50 53 22  |,!tempBlk,"ALPS"|
00000260  20 b8 20 2c 74 61 73 6b  25 0d 01 22 04 0d 01 2c  | . ,task%.."...,|
00000270  96 e7 20 ac 20 72 65 73  6f 75 72 63 65 73 5f 6f  |.. . resources_o|
00000280  6b 20 8c 20 85 20 31 2c  22 54 68 65 20 41 4c 50  |k . . 1,"The ALP|
00000290  53 20 72 65 73 6f 75 72  63 65 73 20 61 72 65 20  |S resources are |
000002a0  6e 6f 74 20 61 76 61 69  6c 61 62 6c 65 2e 20 4f  |not available. O|
000002b0  70 65 6e 20 75 70 20 74  68 65 20 64 69 72 65 63  |pen up the direc|
000002c0  74 6f 72 79 20 76 69 65  77 65 72 20 77 69 74 68  |tory viewer with|
000002d0  20 21 41 4c 50 53 20 69  6e 20 69 74 2e 22 3a c8  | !ALPS in it.":.|
000002e0  99 20 22 57 69 6d 70 5f  43 6c 6f 73 65 44 6f 77  |. "Wimp_CloseDow|
000002f0  6e 22 2c 74 61 73 6b 25  2c 21 74 65 6d 70 42 6c  |n",task%,!tempBl|
00000300  6b 3a e0 0d 01 36 13 f2  69 6e 73 74 61 6c 6c 5f  |k:...6..install_|
00000310  74 65 78 74 65 64 0d 01  40 0a f2 69 6e 69 74 32  |texted..@..init2|
00000320  0d 01 4a 2b ee 20 85 20  64 69 61 6c 6f 67 3d a4  |..J+. . dialog=.|
00000330  65 72 72 6f 72 62 6f 78  28 f6 24 2c 9f 2c 31 2c  |errorbox(.$,.,1,|
00000340  2d 39 39 29 3a e5 20 8d  64 74 41 0d 01 54 08 f2  |-99):. .dtA..T..|
00000350  6e 65 77 0d 01 5e 17 f2  61 73 73 65 6d 62 6c 65  |new..^..assemble|
00000360  28 61 72 6d 63 6f 64 65  25 29 0d 01 68 30 f2 66  |(armcode%)..h0.f|
00000370  69 6c 6c 28 74 65 78 74  5f 62 6c 6f 63 6b 25 2c  |ill(text_block%,|
00000380  74 65 78 74 5f 62 6c 6f  63 6b 73 69 7a 65 25 2c  |text_blocksize%,|
00000390  64 75 6d 6d 79 5f 73 70  63 29 0d 01 72 23 f2 66  |dummy_spc)..r#.f|
000003a0  69 6c 6c 28 76 65 72 62  5f 74 79 70 65 2c 32 2a  |ill(verb_type,2*|
000003b0  28 6d 61 78 76 62 6e 2b  31 29 2c 30 29 0d 01 7c  |(maxvbn+1),0)..||
000003c0  1f f2 66 69 6c 6c 28 6e  72 65 66 2b 34 2c 6e 72  |..fill(nref+4,nr|
000003d0  65 66 5f 73 69 7a 65 2d  34 2c 30 29 0d 01 86 1f  |ef_size-4,0)....|
000003e0  f2 66 69 6c 6c 28 61 72  65 66 2b 34 2c 61 72 65  |.fill(aref+4,are|
000003f0  66 5f 73 69 7a 65 2d 34  2c 30 29 0d 01 90 0a f2  |f_size-4,0).....|
00000400  63 6c 65 61 72 0d 01 9a  27 63 6c 61 69 6d 70 6f  |clear...'claimpo|
00000410  6c 6c 24 3d 22 22 3a 63  6c 61 69 6d 6d 65 6e 75  |ll$="":claimmenu|
00000420  24 3d 22 22 3a 71 75 69  74 25 3d a3 0d 01 a4 04  |$="":quit%=.....|
00000430  0d 01 ae 0d 70 61 74 68  24 3d 65 66 24 0d 01 b8  |....path$=ef$...|
00000440  0f e7 20 65 66 24 3c 3e  22 22 20 8c 0d 01 c2 1d  |.. ef$<>"" .....|
00000450  24 66 69 6c 65 6e 61 6d  65 25 3d a4 6c 65 61 66  |$filename%=.leaf|
00000460  6e 61 6d 65 28 65 66 24  29 0d 01 cc 12 f2 6c 6f  |name(ef$).....lo|
00000470  61 64 5f 61 6c 6c 28 65  66 24 29 0d 01 d6 23 f2  |ad_all(ef$)...#.|
00000480  6f 70 65 6e 28 41 4c 50  53 6d 61 69 6e 2c 34 30  |open(ALPSmain,40|
00000490  30 2c 38 30 30 2c 36 30  30 2c 36 30 30 29 0d 01  |0,800,600,600)..|
000004a0  e0 05 cd 0d 01 ea 04 0d  01 f4 05 f5 0d 01 fe 1b  |................|
000004b0  c8 99 20 50 6f 6c 6c 2c  2c 62 6c 6f 63 6b 20 b8  |.. Poll,,block .|
000004c0  20 72 65 61 73 6f 6e 0d  02 08 0f c8 8e 20 72 65  | reason...... re|
000004d0  61 73 6f 6e 20 ca 0d 02  12 19 20 c9 20 31 3a 20  |ason ..... . 1: |
000004e0  f2 72 65 64 72 61 77 28  21 62 6c 6f 63 6b 29 0d  |.redraw(!block).|
000004f0  02 1c 19 20 c9 20 32 3a  20 c8 99 20 4f 70 65 6e  |... . 2: .. Open|
00000500  57 2c 2c 62 6c 6f 63 6b  0d 02 26 18 20 c9 20 33  |W,,block..&. . 3|
00000510  3a 20 f2 63 6c 6f 73 65  28 21 62 6c 6f 63 6b 29  |: .close(!block)|
00000520  0d 02 30 48 20 c9 20 36  3a 20 f2 63 68 65 63 6b  |..0H . 6: .check|
00000530  6d 6f 75 73 65 28 21 62  6c 6f 63 6b 2c 62 6c 6f  |mouse(!block,blo|
00000540  63 6b 21 34 2c 62 6c 6f  63 6b 21 38 2c 62 6c 6f  |ck!4,block!8,blo|
00000550  63 6b 21 31 32 2c 62 6c  6f 63 6b 21 31 36 2c 62  |ck!12,block!16,b|
00000560  6c 6f 63 6b 21 32 30 29  0d 02 3a 45 20 c9 20 37  |lock!20)..:E . 7|
00000570  3a 20 f2 73 61 76 65 3a  f4 20 55 73 65 72 20 68  |: .save:. User h|
00000580  61 73 20 64 72 61 67 67  65 64 20 27 41 6c 70 73  |as dragged 'Alps|
00000590  27 20 66 69 6c 65 20 69  63 6f 6e 20 74 6f 20 61  |' file icon to a|
000005a0  6e 6f 74 68 65 72 20 77  69 6e 64 6f 77 0d 02 44  |nother window..D|
000005b0  32 20 c9 20 38 3a 20 f2  75 73 65 72 6b 65 79 70  |2 . 8: .userkeyp|
000005c0  72 65 73 73 65 64 28 21  62 6c 6f 63 6b 2c 62 6c  |ressed(!block,bl|
000005d0  6f 63 6b 21 34 2c 62 6c  6f 63 6b 21 32 34 29 0d  |ock!4,block!24).|
000005e0  02 4e 25 20 c9 20 39 3a  20 f2 6d 65 6e 75 73 65  |.N% . 9: .menuse|
000005f0  6c 65 63 74 28 21 62 6c  6f 63 6b 2c 62 6c 6f 63  |lect(!block,bloc|
00000600  6b 21 34 29 0d 02 58 1d  20 c9 20 31 37 2c 31 38  |k!4)..X. . 17,18|
00000610  3a 20 f2 72 65 63 65 69  76 65 28 62 6c 6f 63 6b  |: .receive(block|
00000620  29 0d 02 62 06 20 cb 0d  02 6c 0b fd 20 71 75 69  |)..b. ...l.. qui|
00000630  74 25 0d 02 76 4e c8 99  20 22 57 69 6d 70 5f 43  |t%..vN.. "Wimp_C|
00000640  6c 6f 73 65 44 6f 77 6e  22 2c 74 61 73 6b 25 2c  |loseDown",task%,|
00000650  21 74 65 6d 70 42 6c 6b  3a e7 20 74 65 73 74 69  |!tempBlk:. testi|
00000660  6e 67 20 8c 20 ff 28 22  46 58 34 22 29 3a f6 3a  |ng . .("FX4"):.:|
00000670  f1 22 20 61 74 20 6c 69  6e 65 20 22 3b 9e 3a e0  |." at line ";.:.|
00000680  0d 02 80 05 e0 0d 02 8a  04 0d 02 94 0c dd 20 f2  |.............. .|
00000690  69 6e 69 74 32 0d 02 9e  21 f2 67 65 74 6d 6f 64  |init2...!.getmod|
000006a0  65 69 6e 66 6f 3a 6f 6c  64 73 69 7a 65 3d 73 63  |einfo:oldsize=sc|
000006b0  72 6e 73 69 7a 65 0d 02  a8 1b 64 61 74 61 5f 73  |rnsize....data_s|
000006c0  61 76 65 64 3d b9 3a 6c  6f 61 64 65 64 24 3d 22  |aved=.:loaded$="|
000006d0  22 0d 02 b2 11 de 20 61  5f 6c 69 73 74 24 28 31  |"..... a_list$(1|
000006e0  30 29 0d 02 bc 16 73 6d  61 6c 6c 5f 61 72 65 61  |0)....small_area|
000006f0  73 69 7a 65 25 3d 33 30  0d 02 c6 21 de 20 73 6d  |size%=30...!. sm|
00000700  61 6c 6c 5f 61 72 65 61  25 20 73 6d 61 6c 6c 5f  |all_area% small_|
00000710  61 72 65 61 73 69 7a 65  25 0d 02 d0 04 0d 02 da  |areasize%.......|
00000720  28 de 20 44 25 28 33 29  2c 73 68 61 64 65 25 28  |(. D%(3),shade%(|
00000730  31 35 29 2c 73 63 61 6c  65 20 31 35 2c 70 69 78  |15),scale 15,pix|
00000740  74 72 20 31 35 0d 02 e4  27 f4 20 2d 2d 2d 2d 2d  |tr 15...'. -----|
00000750  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000760  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 0d 02 ee 27  |------------...'|
00000770  f4 20 4d 61 6e 69 66 65  73 74 20 63 6f 6e 73 74  |. Manifest const|
00000780  61 6e 74 73 20 66 6f 72  20 74 68 65 20 73 79 73  |ants for the sys|
00000790  74 65 6d 0d 02 f8 04 0d  03 02 32 6d 61 78 72 6d  |tem.......2maxrm|
000007a0  73 3d 31 30 30 30 3a 6d  61 78 6f 62 73 3d 32 35  |s=1000:maxobs=25|
000007b0  35 3a 6d 61 78 73 77 25  3d 31 30 3a 6d 61 78 74  |5:maxsw%=10:maxt|
000007c0  6f 6b 65 6e 73 3d 31 32  38 0d 03 0c 04 0d 03 16  |okens=128.......|
000007d0  20 6c 69 73 74 6f 70 74  69 6f 6e 3d 32 3a f4 20  | listoption=2:. |
000007e0  44 65 66 61 75 6c 74 20  4c 49 53 54 4f 0d 03 20  |Default LISTO.. |
000007f0  04 0d 03 2a 0d de 20 70  6f 73 24 28 33 29 0d 03  |...*.. pos$(3)..|
00000800  34 1b e3 20 49 25 3d 30  20 b8 20 33 3a f3 20 70  |4.. I%=0 . 3:. p|
00000810  6f 73 24 28 49 25 29 3a  ed 0d 03 3e 0d dc 20 54  |os$(I%):...>.. T|
00000820  2c 42 2c 4c 2c 52 0d 03  48 04 0d 03 52 10 de 20  |,B,L,R..H...R.. |
00000830  6f 6c 64 70 61 72 73 20  37 33 0d 03 5c 0f e3 20  |oldpars 73..\.. |
00000840  49 25 3d 30 20 b8 20 37  32 0d 03 66 1b f3 20 42  |I%=0 . 72..f.. B|
00000850  25 3a 6f 6c 64 70 61 72  73 3f 49 25 3d 42 25 20  |%:oldpars?I%=B% |
00000860  80 20 26 46 0d 03 70 05  ed 0d 03 7a 04 0d 03 84  |. &F..p....z....|
00000870  19 dc 20 30 2c 30 2c 30  2c 30 2c 30 2c 31 2c 31  |.. 0,0,0,0,0,1,1|
00000880  36 31 2c 31 39 33 0d 03  8e 1d dc 20 31 36 31 2c  |61,193..... 161,|
00000890  31 39 33 2c 32 2c 31 2c  30 2c 31 32 38 2c 31 32  |193,2,1,0,128,12|
000008a0  38 2c 30 0d 03 98 19 dc  20 31 32 38 2c 30 2c 30  |8,0..... 128,0,0|
000008b0  2c 31 32 38 2c 30 2c 31  2c 31 2c 31 0d 03 a2 17  |,128,0,1,1,1....|
000008c0  dc 20 31 2c 36 35 2c 31  2c 30 2c 30 2c 30 2c 36  |. 1,65,1,0,0,0,6|
000008d0  35 2c 30 0d 03 ac 25 dc  20 31 33 30 2c 31 39 34  |5,0...%. 130,194|
000008e0  2c 31 33 30 2c 31 39 34  2c 31 39 33 2c 31 39 33  |,130,194,193,193|
000008f0  2c 31 32 39 2c 31 32 39  0d 03 b6 23 dc 20 31 39  |,129,129...#. 19|
00000900  33 2c 31 39 33 2c 31 33  31 2c 31 39 35 2c 31 2c  |3,193,131,195,1,|
00000910  31 33 30 2c 31 32 38 2c  31 32 38 0d 03 c0 18 dc  |130,128,128.....|
00000920  20 32 2c 32 2c 36 36 2c  30 2c 31 2c 36 36 2c 33  | 2,2,66,0,1,66,3|
00000930  2c 36 37 0d 03 ca 18 dc  20 30 2c 31 2c 31 2c 36  |,67..... 0,1,1,6|
00000940  35 2c 36 35 2c 36 35 2c  33 2c 30 0d 03 d4 1d dc  |5,65,65,3,0.....|
00000950  20 31 2c 31 2c 31 33 30  2c 31 33 30 2c 31 33 30  | 1,1,130,130,130|
00000960  2c 32 2c 31 33 30 2c 32  0d 03 de 07 dc 20 32 0d  |,2,130,2..... 2.|
00000970  03 e8 04 0d 03 f2 31 6d  61 78 6c 65 6e 3d 31 30  |......1maxlen=10|
00000980  3a f4 20 4d 61 78 69 6d  75 6d 20 77 6f 72 64 20  |:. Maximum word |
00000990  6c 65 6e 67 74 68 20 69  6e 20 76 6f 63 61 62 75  |length in vocabu|
000009a0  6c 61 72 79 0d 03 fc 04  0d 04 06 33 f4 20 52 6f  |lary.......3. Ro|
000009b0  6f 6d 20 61 6e 64 20 6f  62 6a 65 63 74 20 64 61  |om and object da|
000009c0  74 61 20 62 6c 6f 63 6b  20 6c 65 6e 67 74 68 73  |ta block lengths|
000009d0  20 28 69 6e 20 62 79 74  65 73 29 0d 04 10 15 72  | (in bytes)....r|
000009e0  5f 6c 65 6e 3d 37 34 3a  6f 5f 6c 65 6e 3d 31 36  |_len=74:o_len=16|
000009f0  0d 04 1a 04 0d 04 24 2a  6e 75 6d 5f 76 61 72 73  |......$*num_vars|
00000a00  3d 36 30 3a f4 20 4e 75  6d 62 65 72 20 6f 66 20  |=60:. Number of |
00000a10  41 4c 50 53 20 76 61 72  69 61 62 6c 65 73 0d 04  |ALPS variables..|
00000a20  2e 2e 76 61 72 5f 73 69  7a 65 3d 6e 75 6d 5f 76  |..var_size=num_v|
00000a30  61 72 73 2a 32 3a f4 20  32 20 62 79 74 65 73 20  |ars*2:. 2 bytes |
00000a40  70 65 72 20 76 61 72 69  61 62 6c 65 0d 04 38 04  |per variable..8.|
00000a50  0d 04 42 35 6d 61 78 6d  73 67 3d 36 35 35 33 35  |..B5maxmsg=65535|
00000a60  3a 6d 61 78 6f 62 6e 3d  32 35 35 3a 6d 61 78 76  |:maxobn=255:maxv|
00000a70  62 6e 3d 32 35 35 3a 6d  61 78 63 6f 6e 73 74 3d  |bn=255:maxconst=|
00000a80  36 35 35 33 35 0d 04 4c  45 6d 61 78 61 64 6a 3d  |65535..LEmaxadj=|
00000a90  32 35 35 3a 6d 61 78 70  72 65 70 3d 35 30 3a 6d  |255:maxprep=50:m|
00000aa0  61 78 63 6f 6e 6a 3d 31  30 3a 6d 61 78 73 70 65  |axconj=10:maxspe|
00000ab0  63 3d 33 30 3a 6d 61 78  6e 6f 69 73 65 3d 35 30  |c=30:maxnoise=50|
00000ac0  3a 6d 61 78 70 69 78 3d  35 30 0d 04 56 04 0d 04  |:maxpix=50..V...|
00000ad0  60 12 6e 6f 75 6e 5f 73  69 7a 65 3d 33 30 30 30  |`.noun_size=3000|
00000ae0  0d 04 6a 12 76 65 72 62  5f 73 69 7a 65 3d 33 30  |..j.verb_size=30|
00000af0  30 30 0d 04 74 12 61 64  6a 63 5f 73 69 7a 65 3d  |00..t.adjc_size=|
00000b00  32 30 30 30 0d 04 7e 2d  70 72 65 70 5f 73 69 7a  |2000..~-prep_siz|
00000b10  65 3d 34 30 30 3a f4 20  53 69 7a 65 20 6f 66 20  |e=400:. Size of |
00000b20  70 72 65 70 6f 73 69 74  69 6f 6e 73 20 6c 69 73  |prepositions lis|
00000b30  74 0d 04 88 2c 63 6f 6e  6a 5f 73 69 7a 65 3d 35  |t...,conj_size=5|
00000b40  30 3a f4 20 73 69 7a 65  20 6f 66 20 63 6f 6e 6a  |0:. size of conj|
00000b50  75 6e 63 74 69 6f 6e 73  20 6c 69 73 74 0d 04 92  |unctions list...|
00000b60  3b 73 70 65 63 5f 73 69  7a 65 3d 31 30 30 3a f4  |;spec_size=100:.|
00000b70  20 73 69 7a 65 20 6f 66  20 27 73 70 65 63 69 61  | size of 'specia|
00000b80  6c 73 27 20 6c 69 73 74  20 28 49 54 2c 20 54 48  |ls' list (IT, TH|
00000b90  45 4d 2c 20 41 4c 4c 29  0d 04 9c 34 6e 6f 69 73  |EM, ALL)...4nois|
00000ba0  65 5f 73 69 7a 65 3d 32  30 30 3a f4 20 73 69 7a  |e_size=200:. siz|
00000bb0  65 20 6f 66 20 27 6e 6f  69 73 65 27 20 6c 69 73  |e of 'noise' lis|
00000bc0  74 20 28 54 48 45 2c 41  2c 41 4e 29 0d 04 a6 3d  |t (THE,A,AN)...=|
00000bd0  61 72 65 66 5f 73 69 7a  65 3d 32 30 30 30 3a f4  |aref_size=2000:.|
00000be0  20 73 69 7a 65 20 6f 66  20 61 64 6a 65 63 74 69  | size of adjecti|
00000bf0  76 65 20 6f 62 6a 65 63  74 20 72 65 66 65 72 65  |ve object refere|
00000c00  6e 63 65 20 74 61 62 6c  65 0d 04 b0 39 6e 72 65  |nce table...9nre|
00000c10  66 5f 73 69 7a 65 3d 32  30 30 30 3a f4 20 73 69  |f_size=2000:. si|
00000c20  7a 65 20 6f 66 20 6e 6f  75 6e 73 20 6f 62 6a 65  |ze of nouns obje|
00000c30  63 74 20 72 65 66 65 72  65 6e 63 65 20 74 61 62  |ct reference tab|
00000c40  6c 65 0d 04 ba 2d 70 69  78 5f 73 69 7a 65 3d 31  |le...-pix_size=1|
00000c50  30 30 30 3a f4 20 73 69  7a 65 20 6f 66 20 70 69  |000:. size of pi|
00000c60  78 20 66 69 6c 65 6e 61  6d 65 20 6c 69 73 74 0d  |x filename list.|
00000c70  04 c4 04 0d 04 ce 86 de  20 6e 6f 75 6e 73 20 6e  |........ nouns n|
00000c80  6f 75 6e 5f 73 69 7a 65  2c 76 65 72 62 73 20 76  |oun_size,verbs v|
00000c90  65 72 62 5f 73 69 7a 65  2c 61 64 6a 65 63 74 73  |erb_size,adjects|
00000ca0  20 61 64 6a 63 5f 73 69  7a 65 2c 70 72 65 70 73  | adjc_size,preps|
00000cb0  20 70 72 65 70 5f 73 69  7a 65 2c 63 6f 6e 6a 73  | prep_size,conjs|
00000cc0  20 63 6f 6e 6a 5f 73 69  7a 65 2c 73 70 65 63 73  | conj_size,specs|
00000cd0  20 73 70 65 63 5f 73 69  7a 65 2c 6e 6f 69 73 65  | spec_size,noise|
00000ce0  20 6e 6f 69 73 65 5f 73  69 7a 65 2c 70 69 78 73  | noise_size,pixs|
00000cf0  20 70 69 78 5f 73 69 7a  65 0d 04 d8 04 0d 04 e2  | pix_size.......|
00000d00  3a de 20 61 72 65 66 20  61 72 65 66 5f 73 69 7a  |:. aref aref_siz|
00000d10  65 2c 6e 72 65 66 20 6e  72 65 66 5f 73 69 7a 65  |e,nref nref_size|
00000d20  2c 76 65 72 62 5f 74 79  70 65 20 32 2a 28 6d 61  |,verb_type 2*(ma|
00000d30  78 76 62 6e 2b 31 29 0d  04 ec 04 0d 04 f6 35 6e  |xvbn+1).......5n|
00000d40  6f 75 6e 5f 65 6e 64 3d  6e 6f 75 6e 73 2b 6e 6f  |oun_end=nouns+no|
00000d50  75 6e 5f 73 69 7a 65 3a  76 65 72 62 5f 65 6e 64  |un_size:verb_end|
00000d60  3d 76 65 72 62 73 2b 76  65 72 62 5f 73 69 7a 65  |=verbs+verb_size|
00000d70  0d 05 00 84 61 64 6a 63  5f 65 6e 64 3d 61 64 6a  |....adjc_end=adj|
00000d80  65 63 74 73 2b 61 64 6a  63 5f 73 69 7a 65 3a 70  |ects+adjc_size:p|
00000d90  72 65 70 5f 65 6e 64 3d  70 72 65 70 73 2b 70 72  |rep_end=preps+pr|
00000da0  65 70 5f 73 69 7a 65 3a  63 6f 6e 6a 5f 65 6e 64  |ep_size:conj_end|
00000db0  3d 63 6f 6e 6a 73 2b 63  6f 6e 6a 5f 73 69 7a 65  |=conjs+conj_size|
00000dc0  3a 73 70 65 63 5f 65 6e  64 3d 73 70 65 63 73 2b  |:spec_end=specs+|
00000dd0  73 70 65 63 5f 73 69 7a  65 3a 6e 6f 69 73 65 5f  |spec_size:noise_|
00000de0  65 6e 64 3d 6e 6f 69 73  65 2b 6e 6f 69 73 65 5f  |end=noise+noise_|
00000df0  73 69 7a 65 0d 05 0a 49  61 72 65 66 5f 65 6e 64  |size...Iaref_end|
00000e00  3d 61 72 65 66 2b 61 72  65 66 5f 73 69 7a 65 3a  |=aref+aref_size:|
00000e10  6e 72 65 66 5f 65 6e 64  3d 6e 72 65 66 2b 6e 72  |nref_end=nref+nr|
00000e20  65 66 5f 73 69 7a 65 3a  70 69 78 5f 65 6e 64 3d  |ef_size:pix_end=|
00000e30  70 69 78 73 2b 70 69 78  5f 73 69 7a 65 0d 05 14  |pixs+pix_size...|
00000e40  04 0d 05 1e 17 f4 20 50  72 69 6e 74 65 72 20 63  |...... Printer c|
00000e50  6f 64 65 73 20 65 74 63  0d 05 28 19 63 6f 6e 64  |odes etc..(.cond|
00000e60  65 6e 73 65 64 3d 31 35  3a 72 65 73 65 74 3d 36  |ensed=15:reset=6|
00000e70  34 0d 05 32 14 70 6c 69  6e 65 24 3d c4 31 33 32  |4..2.pline$=.132|
00000e80  2c 22 2d 22 29 0d 05 3c  14 70 6c 69 6e 65 32 24  |,"-")..<.pline2$|
00000e90  3d c4 37 39 2c 22 2d 22  29 0d 05 46 04 0d 05 50  |=.79,"-")..F...P|
00000ea0  4b f4 20 2d 2d 2d 2d 2d  2d 2d 20 53 65 74 20 75  |K. ------- Set u|
00000eb0  70 20 64 61 74 61 20 61  72 65 61 73 20 66 6f 72  |p data areas for|
00000ec0  20 72 6f 6f 6d 73 20 61  6e 64 20 6f 62 6a 65 63  | rooms and objec|
00000ed0  74 73 20 61 6e 64 20 63  6c 65 61 72 20 74 68 65  |ts and clear the|
00000ee0  6d 20 2d 2d 2d 2d 2d 2d  0d 05 5a 42 de 20 72 64  |m ------..ZB. rd|
00000ef0  61 74 61 25 20 28 6d 61  78 72 6d 73 2b 31 29 2a  |ata% (maxrms+1)*|
00000f00  72 5f 6c 65 6e 2c 6f 64  61 74 61 25 20 28 6d 61  |r_len,odata% (ma|
00000f10  78 6f 62 73 2b 31 29 2a  6f 5f 6c 65 6e 2c 63 6f  |xobs+1)*o_len,co|
00000f20  6e 74 72 6f 6f 6d 25 20  31 32 0d 05 64 04 0d 05  |ntroom% 12..d...|
00000f30  6e 1d f4 20 53 65 74 20  75 70 20 74 68 65 20 73  |n.. Set up the s|
00000f40  61 76 65 20 62 75 66 66  65 72 73 0d 05 78 2b 69  |ave buffers..x+i|
00000f50  6e 69 74 61 72 65 61 73  69 7a 65 3d 37 2a 28 6d  |nitareasize=7*(m|
00000f60  61 78 6f 62 73 2b 31 29  2b 32 32 2a 28 6d 61 78  |axobs+1)+22*(max|
00000f70  72 6d 73 2b 31 29 0d 05  82 3d de 20 69 6e 69 74  |rms+1)...=. init|
00000f80  73 61 76 65 20 69 6e 69  74 61 72 65 61 73 69 7a  |save initareasiz|
00000f90  65 2c 72 61 6d 73 61 76  65 20 69 6e 69 74 61 72  |e,ramsave initar|
00000fa0  65 61 73 69 7a 65 2b 76  61 72 5f 73 69 7a 65 2b  |easize+var_size+|
00000fb0  31 32 38 0d 05 8c 2a 24  63 6f 6e 74 72 6f 6f 6d  |128...*$controom|
00000fc0  25 3d 22 30 22 3a 63 6f  6e 74 5f 72 6f 6f 6d 3d  |%="0":cont_room=|
00000fd0  30 3a 63 6f 6e 74 61 69  6e 65 72 3d a3 0d 05 96  |0:container=....|
00000fe0  04 0d 05 a0 2b 72 70 74  72 3d 31 3a 6f 70 74 72  |....+rptr=1:optr|
00000ff0  3d 31 3a 6c 61 73 74 5f  72 6f 6f 6d 3d 31 3a 6c  |=1:last_room=1:l|
00001000  61 73 74 5f 6f 62 6a 65  63 74 3d 31 0d 05 aa 04  |ast_object=1....|
00001010  0d 05 b4 26 f4 20 61 72  65 61 73 20 74 6f 20 73  |...&. areas to s|
00001020  74 6f 72 65 20 66 6c 61  67 20 64 65 73 63 72 69  |tore flag descri|
00001030  70 74 69 6f 6e 73 0d 05  be 0c 6d 61 78 64 25 3d  |ptions....maxd%=|
00001040  31 33 0d 05 c8 27 de 20  6f 5f 66 6c 61 67 73 25  |13...'. o_flags%|
00001050  20 6d 61 78 64 25 2a 38  2c 72 5f 66 6c 61 67 73  | maxd%*8,r_flags|
00001060  25 20 6d 61 78 64 25 2a  38 0d 05 d2 04 0d 05 dc  |% maxd%*8.......|
00001070  1f f4 20 53 65 74 20 74  68 65 20 66 6c 61 67 20  |.. Set the flag |
00001080  64 65 73 63 72 69 70 74  69 6f 6e 73 0d 05 e6 12  |descriptions....|
00001090  e3 20 49 25 3d 37 20 b8  20 30 20 88 2d 31 0d 05  |. I%=7 . 0 .-1..|
000010a0  f0 0b f3 20 66 6c 61 67  24 0d 05 fa 28 24 28 6f  |... flag$...($(o|
000010b0  5f 66 6c 61 67 73 25 2b  49 25 2a 6d 61 78 64 25  |_flags%+I%*maxd%|
000010c0  29 3d c0 66 6c 61 67 24  2c 6d 61 78 64 25 2d 31  |)=.flag$,maxd%-1|
000010d0  29 0d 06 04 05 ed 0d 06  0e 04 0d 06 18 12 e3 20  |).............. |
000010e0  49 25 3d 37 20 b8 20 30  20 88 2d 31 0d 06 22 0b  |I%=7 . 0 .-1..".|
000010f0  f3 20 66 6c 61 67 24 0d  06 2c 28 24 28 72 5f 66  |. flag$..,($(r_f|
00001100  6c 61 67 73 25 2b 49 25  2a 6d 61 78 64 25 29 3d  |lags%+I%*maxd%)=|
00001110  c0 66 6c 61 67 24 2c 6d  61 78 64 25 2d 31 29 0d  |.flag$,maxd%-1).|
00001120  06 36 05 ed 0d 06 40 04  0d 06 4a 1e f4 20 4f 62  |.6....@...J.. Ob|
00001130  6a 65 63 74 20 46 6c 61  67 20 64 65 73 63 72 69  |ject Flag descri|
00001140  70 74 69 6f 6e 73 0d 06  54 47 dc 20 22 22 2c 22  |ptions..TG. "","|
00001150  22 2c 42 65 69 6e 67 20  77 6f 72 6e 2c 57 65 61  |",Being worn,Wea|
00001160  72 61 62 6c 65 2c 53 63  65 6e 65 72 79 2c 49 6e  |rable,Scenery,In|
00001170  76 69 73 69 62 6c 65 2c  54 61 6b 65 61 62 6c 65  |visible,Takeable|
00001180  2c 4c 69 67 68 74 20 73  6f 75 72 63 65 0d 06 5e  |,Light source..^|
00001190  04 0d 06 68 1c f4 20 52  6f 6f 6d 20 66 6c 61 67  |...h.. Room flag|
000011a0  20 64 65 73 63 72 69 70  74 69 6f 6e 73 0d 06 72  | descriptions..r|
000011b0  25 dc 20 22 22 2c 22 22  2c 22 22 2c 22 22 2c 22  |%. "","","","","|
000011c0  22 2c 22 22 2c 56 69 73  69 74 65 64 2c 4c 69 67  |","",Visited,Lig|
000011d0  68 74 0d 06 7c 04 0d 06  86 21 f4 20 52 6f 6f 6d  |ht..|....!. Room|
000011e0  20 45 78 69 74 20 66 6c  61 67 20 64 65 73 63 72  | Exit flag descr|
000011f0  69 70 74 69 6f 6e 73 0d  06 90 58 dc 20 49 6e 76  |iptions...X. Inv|
00001200  69 73 69 62 6c 65 2c 43  6c 6f 73 65 64 20 64 6f  |isible,Closed do|
00001210  6f 72 2c 4f 70 65 6e 20  64 6f 6f 72 2c 4c 6f 63  |or,Open door,Loc|
00001220  6b 65 64 20 64 6f 6f 72  2c 55 6e 6c 27 6b 65 64  |ked door,Unl'ked|
00001230  20 64 6f 6f 72 2c 42 6c  6f 63 6b 65 64 2c 52 65  | door,Blocked,Re|
00001240  73 65 72 76 65 64 2c 52  65 73 65 72 76 65 64 0d  |served,Reserved.|
00001250  06 9a 04 0d 06 a4 13 de  20 65 78 69 74 5f 66 6c  |........ exit_fl|
00001260  61 67 24 28 37 29 0d 06  ae 29 e3 20 66 6c 61 67  |ag$(7)...). flag|
00001270  3d 37 20 b8 20 30 20 88  2d 31 3a f3 20 65 78 69  |=7 . 0 .-1:. exi|
00001280  74 5f 66 6c 61 67 24 28  66 6c 61 67 29 3a ed 0d  |t_flag$(flag):..|
00001290  06 b8 04 0d 06 c2 1f de  20 70 72 6f 63 25 20 31  |........ proc% 1|
000012a0  32 2c 65 78 69 74 25 20  31 32 2c 64 65 66 25 20  |2,exit% 12,def% |
000012b0  31 32 0d 06 cc 20 24 70  72 6f 63 25 3d 22 22 3a  |12... $proc%="":|
000012c0  24 64 65 66 25 3d 22 22  3a 24 65 78 69 74 25 3d  |$def%="":$exit%=|
000012d0  22 22 0d 06 d6 04 0d 06  e0 38 f4 20 70 72 67 5f  |"".......8. prg_|
000012e0  73 65 6c 25 20 3d 20 53  65 63 74 69 6f 6e 20 6f  |sel% = Section o|
000012f0  66 20 70 72 6f 67 72 61  6d 20 73 65 6c 65 63 74  |f program select|
00001300  65 64 20 66 6f 72 20 65  64 69 74 69 6e 67 0d 06  |ed for editing..|
00001310  ea 31 f4 20 20 20 20 20  20 20 20 20 20 20 20 32  |.1.            2|
00001320  3d 4d 61 69 6e 2c 20 33  3d 50 72 6f 63 2c 20 34  |=Main, 3=Proc, 4|
00001330  3d 44 65 66 69 6e 65 2c  20 35 3d 45 78 69 74 0d  |=Define, 5=Exit.|
00001340  06 f4 4b f4 20 70 72 6f  67 76 61 6c 24 20 3d 20  |..K. progval$ = |
00001350  53 54 52 24 20 76 61 6c  75 65 20 6f 66 20 70 72  |STR$ value of pr|
00001360  6f 63 20 6f 72 20 65 78  69 74 20 6e 75 6d 62 65  |oc or exit numbe|
00001370  72 20 6f 72 20 6e 61 6d  65 20 6f 66 20 73 65 6c  |r or name of sel|
00001380  65 63 74 65 64 20 76 65  72 62 0d 06 fe 04 0d 07  |ected verb......|
00001390  08 1a 70 72 67 5f 73 65  6c 25 3d 32 3a 70 72 6f  |..prg_sel%=2:pro|
000013a0  67 76 61 6c 24 3d 22 22  0d 07 12 04 0d 07 1c 3c  |gval$="".......<|
000013b0  f4 20 76 6f 63 5f 73 65  63 74 25 20 3d 20 53 65  |. voc_sect% = Se|
000013c0  63 74 69 6f 6e 20 6f 66  20 76 6f 63 61 62 75 6c  |ction of vocabul|
000013d0  61 72 79 20 73 65 6c 65  63 74 65 64 20 66 6f 72  |ary selected for|
000013e0  20 65 64 69 74 69 6e 67  0d 07 26 22 f4 20 20 20  | editing..&".   |
000013f0  20 20 20 20 20 20 20 20  20 20 31 3d 4e 6f 75 6e  |          1=Noun|
00001400  73 2c 20 32 3d 56 65 72  62 73 0d 07 30 0f 76 6f  |s, 2=Verbs..0.vo|
00001410  63 5f 73 65 63 74 25 3d  31 0d 07 3a 04 0d 07 44  |c_sect%=1..:...D|
00001420  36 70 62 73 69 7a 65 3d  28 73 63 72 6e 73 69 7a  |6pbsize=(scrnsiz|
00001430  65 20 81 20 32 29 2b 34  30 30 3a f4 20 73 69 7a  |e . 2)+400:. siz|
00001440  65 20 6f 66 20 70 69 63  74 75 72 65 20 62 75 66  |e of picture buf|
00001450  66 65 72 0d 07 4e 04 0d  07 58 13 de 20 70 69 63  |fer..N...X.. pic|
00001460  62 75 66 20 70 62 73 69  7a 65 0d 07 62 04 0d 07  |buf pbsize..b...|
00001470  6c 12 70 72 67 62 73 69  7a 65 3d 26 31 30 30 30  |l.prgbsize=&1000|
00001480  0d 07 76 16 de 20 70 72  67 62 75 66 25 20 70 72  |..v.. prgbuf% pr|
00001490  67 62 73 69 7a 65 0d 07  80 04 0d 07 8a 3f f4 20  |gbsize.......?. |
000014a0  2d 2d 2d 2d 2d 2d 2d 20  53 6f 6d 65 20 63 6f 6e  |------- Some con|
000014b0  73 74 61 6e 74 73 20 66  6f 72 20 74 68 65 20 63  |stants for the c|
000014c0  68 61 72 61 63 74 65 72  20 64 65 73 69 67 6e 65  |haracter designe|
000014d0  72 20 2d 2d 2d 2d 2d 2d  2d 0d 07 94 04 0d 07 9e  |r -------.......|
000014e0  1e 63 75 72 5f 63 68 72  25 3d 97 22 41 22 3a 6d  |.cur_chr%=."A":m|
000014f0  61 78 5f 63 68 72 25 3d  31 32 35 0d 07 a8 10 de  |ax_chr%=125.....|
00001500  20 63 68 61 72 6e 75 6d  20 31 32 0d 07 b2 0f 24  | charnum 12....$|
00001510  63 68 61 72 6e 75 6d 3d  22 22 0d 07 bc 04 0d 07  |charnum=""......|
00001520  c6 37 f4 20 2d 2d 2d 2d  2d 2d 2d 20 44 69 6d 65  |.7. ------- Dime|
00001530  6e 73 69 6f 6e 20 74 68  65 20 6f 74 68 65 72 20  |nsion the other |
00001540  61 72 72 61 79 73 20 6e  65 65 64 65 64 20 2d 2d  |arrays needed --|
00001550  2d 2d 2d 2d 2d 0d 07 d0  0e 75 63 73 69 7a 65 3d  |-----....ucsize=|
00001560  35 30 30 0d 07 da 44 c8  99 20 22 4f 53 5f 46 69  |500...D.. "OS_Fi|
00001570  6c 65 22 2c 35 2c 22 3c  41 4c 50 53 24 52 65 73  |le",5,"<ALPS$Res|
00001580  6f 75 72 63 65 73 3e 2e  41 53 49 6f 62 6a 63 6f  |ources>.ASIobjco|
00001590  64 65 22 20 b8 20 66 74  79 70 65 2c 2c 2c 2c 63  |de" . ftype,,,,c|
000015a0  6f 64 65 73 69 7a 65 0d  07 e4 12 70 62 79 74 65  |odesize....pbyte|
000015b0  5f 73 69 7a 65 3d 31 34  38 0d 07 ee 46 de 20 61  |_size=148...F. a|
000015c0  72 6d 63 6f 64 65 25 20  31 30 30 30 2c 70 62 79  |rmcode% 1000,pby|
000015d0  74 65 73 20 70 62 79 74  65 5f 73 69 7a 65 2c 77  |tes pbyte_size,w|
000015e0  6f 72 6b 25 20 26 31 31  30 30 2c 61 73 69 63 6f  |ork% &1100,asico|
000015f0  64 65 25 20 63 6f 64 65  73 69 7a 65 2b 31 30 0d  |de% codesize+10.|
00001600  07 f8 16 de 20 75 73 65  72 63 6f 64 65 25 20 75  |.... usercode% u|
00001610  63 73 69 7a 65 0d 08 02  4c 72 75 6e 3d 61 73 69  |csize...Lrun=asi|
00001620  63 6f 64 65 25 3a 70 72  69 6e 74 6d 73 67 3d 61  |code%:printmsg=a|
00001630  73 69 63 6f 64 65 25 2b  34 3a 73 65 61 72 63 68  |sicode%+4:search|
00001640  3d 61 73 69 63 6f 64 65  25 2b 31 32 3a 66 69 6e  |=asicode%+12:fin|
00001650  64 63 6f 64 65 3d 61 73  69 63 6f 64 65 25 2b 31  |dcode=asicode%+1|
00001660  36 0d 08 0c 15 73 65 74  75 70 3d 61 73 69 63 6f  |6....setup=asico|
00001670  64 65 25 2b 32 30 0d 08  16 35 ff 28 22 4c 4f 41  |de%+20...5.("LOA|
00001680  44 20 3c 41 4c 50 53 24  52 65 73 6f 75 72 63 65  |D <ALPS$Resource|
00001690  73 3e 2e 41 53 49 6f 62  6a 63 6f 64 65 20 22 2b  |s>.ASIobjcode "+|
000016a0  c3 7e 61 73 69 63 6f 64  65 25 29 0d 08 20 0d de  |.~asicode%).. ..|
000016b0  20 70 61 6c 25 28 32 29  0d 08 2a 1c de 20 71 25  | pal%(2)..*.. q%|
000016c0  20 26 32 30 30 30 2c 65  72 72 6f 72 61 64 64 72  | &2000,erroraddr|
000016d0  25 28 34 29 0d 08 34 19  de 20 69 6e 64 65 78 64  |%(4)..4.. indexd|
000016e0  61 74 61 25 20 33 32 2a  32 34 2b 32 30 0d 08 3e  |ata% 32*24+20..>|
000016f0  11 6d 61 78 62 75 66 25  3d 26 33 30 30 30 0d 08  |.maxbuf%=&3000..|
00001700  48 26 de 20 62 75 66 66  65 72 25 20 6d 61 78 62  |H&. buffer% maxb|
00001710  75 66 25 3a 63 75 72 62  75 66 66 25 3d 62 75 66  |uf%:curbuff%=buf|
00001720  66 65 72 25 0d 08 52 11  6e 68 25 3d 33 32 3a 6e  |fer%..R.nh%=32:n|
00001730  69 25 3d 31 31 0d 08 5c  2c de 20 68 61 6e 64 6c  |i%=11..\,. handl|
00001740  65 25 28 6e 68 25 2b 31  29 2c 77 69 64 65 6e 74  |e%(nh%+1),wident|
00001750  24 28 6e 68 25 29 2c 77  70 74 72 25 28 6e 68 25  |$(nh%),wptr%(nh%|
00001760  29 0d 08 66 3e e3 20 49  25 3d 30 b8 6e 68 25 3a  |)..f>. I%=0.nh%:|
00001770  68 61 6e 64 6c 65 25 28  49 25 29 3d 49 25 2d 31  |handle%(I%)=I%-1|
00001780  3a 77 69 64 65 6e 74 24  28 49 25 29 3d 22 22 3a  |:wident$(I%)="":|
00001790  ed 3a 68 61 6e 64 6c 65  53 50 25 3d 6e 68 25 0d  |.:handleSP%=nh%.|
000017a0  08 70 20 de 20 69 63 6f  6e 25 28 6e 69 25 2b 31  |.p . icon%(ni%+1|
000017b0  29 2c 69 63 6f 6e 62 61  72 24 28 6e 69 25 29 0d  |),iconbar$(ni%).|
000017c0  08 7a 2e e3 20 49 25 3d  30 20 b8 20 6e 69 25 3a  |.z.. I%=0 . ni%:|
000017d0  69 63 6f 6e 25 28 49 25  29 3d 2d 31 3a f3 20 69  |icon%(I%)=-1:. i|
000017e0  63 6f 6e 62 61 72 24 28  49 25 29 3a ed 0d 08 84  |conbar$(I%):....|
000017f0  13 69 63 6f 6e 25 28 6e  69 25 2b 31 29 3d 2d 31  |.icon%(ni%+1)=-1|
00001800  0d 08 8e 1b 6f 6c 64 69  63 6f 6e 25 3d 30 3a 6f  |....oldicon%=0:o|
00001810  6c 64 72 6d 69 63 6f 6e  25 3d 30 0d 08 98 04 0d  |ldrmicon%=0.....|
00001820  08 a2 38 f4 20 2d 2d 2d  2d 2d 2d 20 4e 61 6d 65  |..8. ------ Name|
00001830  73 20 6f 66 20 69 63 6f  6e 73 20 28 73 70 72 69  |s of icons (spri|
00001840  74 65 73 29 20 6f 6e 20  69 63 6f 6e 20 62 61 72  |tes) on icon bar|
00001850  20 2d 2d 2d 2d 2d 2d 0d  08 ac 4c dc 20 64 69 73  | ------...L. dis|
00001860  6b 33 35 2c 61 72 63 6c  6f 67 6f 2c 64 6f 6f 72  |k35,arclogo,door|
00001870  2c 6b 65 79 2c 71 75 69  6c 6c 2c 69 6e 66 6f 2c  |,key,quill,info,|
00001880  6c 69 73 74 69 6e 67 2c  63 68 61 72 64 65 73 2c  |listing,chardes,|
00001890  76 6f 63 61 62 2c 73 77  61 70 2c 65 79 65 2c 66  |vocab,swap,eye,f|
000018a0  61 63 65 0d 08 b6 04 0d  08 c0 30 64 69 73 6b 69  |ace.......0diski|
000018b0  63 6f 6e 3d 30 3a 74 65  78 74 69 63 6f 6e 3d 34  |con=0:texticon=4|
000018c0  3a 70 72 6f 67 69 63 6f  6e 3d 36 3a 73 74 61 72  |:progicon=6:star|
000018d0  69 63 6f 6e 3d 39 39 0d  08 ca 30 76 6f 63 61 62  |icon=99...0vocab|
000018e0  69 63 6f 6e 3d 38 3a 66  61 63 65 69 63 6f 6e 3d  |icon=8:faceicon=|
000018f0  39 39 3a 61 72 63 69 63  6f 6e 3d 31 3a 73 77 61  |99:arcicon=1:swa|
00001900  70 69 63 6f 6e 3d 39 0d  08 d4 25 61 6c 70 73 69  |picon=9...%alpsi|
00001910  63 6f 6e 3d 35 3a 68 65  6c 70 69 63 6f 6e 3d 31  |con=5:helpicon=1|
00001920  33 3a 65 79 65 69 63 6f  6e 3d 31 30 0d 08 de 37  |3:eyeicon=10...7|
00001930  54 48 45 6b 65 79 69 63  6f 6e 3d 33 3a 54 48 45  |THEkeyicon=3:THE|
00001940  64 6f 6f 72 69 63 6f 6e  3d 32 3a 74 65 78 74 69  |dooricon=2:texti|
00001950  63 6f 6e 3d 34 3a 54 48  45 63 68 61 72 69 63 6f  |con=4:THEcharico|
00001960  6e 3d 37 0d 08 e8 04 0d  08 f2 2e de 20 6d 65 6e  |n=7......... men|
00001970  75 66 72 65 65 25 20 26  31 38 30 30 3a 6d 65 6e  |ufree% &1800:men|
00001980  75 65 6e 64 25 3d 6d 65  6e 75 66 72 65 65 25 2b  |uend%=menufree%+|
00001990  26 31 38 30 30 0d 08 fc  14 de 20 6d 65 6e 75 6c  |&1800..... menul|
000019a0  69 73 74 25 20 26 31 30  30 0d 09 06 0f de 20 71  |ist% &100..... q|
000019b0  42 6c 6b 25 20 32 35 36  0d 09 10 2b 64 78 25 3d  |Blk% 256...+dx%=|
000019c0  32 3a 6c 73 59 25 3d 34  30 3a 79 70 69 78 65 6c  |2:lsY%=40:ypixel|
000019d0  25 3d 34 3a 63 68 58 25  3d 31 36 3a 63 68 59 25  |%=4:chX%=16:chY%|
000019e0  3d 33 32 0d 09 1a 25 63  75 72 72 65 6e 74 77 69  |=32...%currentwi|
000019f0  6e 64 6f 77 25 3d 2d 31  3a 63 75 72 72 65 6e 74  |ndow%=-1:current|
00001a00  69 63 6f 6e 25 3d 2d 31  0d 09 24 0f 73 70 72 69  |icon%=-1..$.spri|
00001a10  74 65 66 24 3d 22 22 0d  09 2e 39 de 20 6d 62 5f  |tef$=""...9. mb_|
00001a20  77 69 64 65 6e 74 25 20  31 32 2c 66 69 6c 65 6e  |wident% 12,filen|
00001a30  61 6d 65 25 20 36 34 2c  66 69 6c 65 6e 61 6d 65  |ame% 64,filename|
00001a40  32 25 20 36 34 2c 69 6d  70 6f 72 74 25 20 36 34  |2% 64,import% 64|
00001a50  0d 09 38 36 e7 20 74 65  73 74 69 6e 67 20 24 66  |..86. testing $f|
00001a60  69 6c 65 6e 61 6d 65 25  3d 22 64 65 6d 6f 22 20  |ilename%="demo" |
00001a70  8b 20 24 66 69 6c 65 6e  61 6d 65 25 3d 22 73 74  |. $filename%="st|
00001a80  61 72 74 65 72 22 0d 09  42 25 24 66 69 6c 65 6e  |arter"..B%$filen|
00001a90  61 6d 65 32 25 3d 22 63  68 61 72 73 65 74 22 3a  |ame2%="charset":|
00001aa0  24 69 6d 70 6f 72 74 25  3d 22 22 0d 09 4c 28 de  |$import%=""..L(.|
00001ab0  20 73 74 61 72 74 28 32  30 29 2c 73 79 73 5f 62  | start(20),sys_b|
00001ac0  32 25 20 26 33 30 30 2c  6f 73 5f 62 6c 6f 63 6b  |2% &300,os_block|
00001ad0  20 35 30 0d 09 56 04 0d  09 60 10 f2 4b 65 79 57  | 50..V...`..KeyW|
00001ae0  6f 72 64 52 65 61 64 0d  09 6a 11 f2 45 72 72 6f  |ordRead..j..Erro|
00001af0  72 4d 73 67 52 65 61 64  0d 09 74 04 0d 09 7e 39  |rMsgRead..t...~9|
00001b00  f4 20 2d 2d 2d 2d 2d 20  44 65 66 69 6e 65 20 74  |. ----- Define t|
00001b10  68 65 20 22 57 69 6d 70  22 20 61 6e 64 20 22 4f  |he "Wimp" and "O|
00001b20  53 22 20 53 59 53 20 6e  75 6d 62 65 72 73 20 2d  |S" SYS numbers -|
00001b30  2d 2d 2d 2d 2d 0d 09 88  0f 57 69 6d 70 3d 26 34  |-----....Wimp=&4|
00001b40  30 30 43 30 0d 09 92 12  43 72 65 61 74 65 57 3d  |00C0....CreateW=|
00001b50  57 69 6d 70 2b 31 0d 09  9c 12 43 72 65 61 74 65  |Wimp+1....Create|
00001b60  49 3d 57 69 6d 70 2b 32  0d 09 a6 12 44 65 6c 65  |I=Wimp+2....Dele|
00001b70  74 65 57 3d 57 69 6d 70  2b 33 0d 09 b0 12 44 65  |teW=Wimp+3....De|
00001b80  6c 65 74 65 49 3d 57 69  6d 70 2b 34 0d 09 ba 10  |leteI=Wimp+4....|
00001b90  4f 70 65 6e 57 3d 57 69  6d 70 2b 35 0d 09 c4 11  |OpenW=Wimp+5....|
00001ba0  43 6c 6f 73 65 57 3d 57  69 6d 70 2b 36 0d 09 ce  |CloseW=Wimp+6...|
00001bb0  0f 50 6f 6c 6c 3d 57 69  6d 70 2b 37 0d 09 d8 12  |.Poll=Wimp+7....|
00001bc0  52 65 64 72 61 77 57 3d  57 69 6d 70 2b 38 0d 09  |RedrawW=Wimp+8..|
00001bd0  e2 12 55 70 64 61 74 65  57 3d 57 69 6d 70 2b 39  |..UpdateW=Wimp+9|
00001be0  0d 09 ec 10 47 65 74 57  3d 57 69 6d 70 2b 31 31  |....GetW=Wimp+11|
00001bf0  0d 09 f6 11 47 65 74 57  49 3d 57 69 6d 70 2b 26  |....GetWI=Wimp+&|
00001c00  43 0d 0a 00 15 53 65 74  43 61 72 65 74 3d 57 69  |C....SetCaret=Wi|
00001c10  6d 70 2b 26 31 32 0d 0a  0a 15 47 65 74 43 61 72  |mp+&12....GetCar|
00001c20  65 74 3d 57 69 6d 70 2b  26 31 33 0d 0a 14 10 47  |et=Wimp+&13....G|
00001c30  65 74 52 3d 57 69 6d 70  2b 26 41 0d 0a 1e 10 53  |etR=Wimp+&A....S|
00001c40  65 74 49 3d 57 69 6d 70  2b 26 44 0d 0a 28 10 47  |etI=Wimp+&D..(.G|
00001c50  65 74 49 3d 57 69 6d 70  2b 26 45 0d 0a 32 10 47  |etI=Wimp+&E..2.G|
00001c60  65 74 50 3d 57 69 6d 70  2b 26 46 0d 0a 3c 11 44  |etP=Wimp+&F..<.D|
00001c70  72 61 67 3d 57 69 6d 70  2b 26 31 30 0d 0a 46 13  |rag=Wimp+&10..F.|
00001c80  46 6f 72 63 65 52 3d 57  69 6d 70 2b 26 31 31 0d  |ForceR=Wimp+&11.|
00001c90  0a 50 14 43 72 65 61 74  65 4d 3d 57 69 6d 70 2b  |.P.CreateM=Wimp+|
00001ca0  26 31 34 0d 0a 5a 11 53  65 74 50 3d 57 69 6d 70  |&14..Z.SetP=Wimp|
00001cb0  2b 26 31 38 0d 0a 64 0f  52 65 61 64 50 61 6c 3d  |+&18..d.ReadPal=|
00001cc0  26 32 46 0d 0a 6e 04 0d  0a 78 46 f4 20 2d 2d 2d  |&2F..n...xF. ---|
00001cd0  2d 2d 2d 20 53 65 74 20  75 70 20 6f 75 72 20 6f  |--- Set up our o|
00001ce0  77 6e 20 73 70 72 69 74  65 20 61 72 65 61 20 61  |wn sprite area a|
00001cf0  6e 64 20 72 65 61 64 20  74 68 65 20 73 70 72 69  |nd read the spri|
00001d00  74 65 73 20 69 6e 20 2d  2d 2d 2d 2d 2d 0d 0a 82  |tes in ------...|
00001d10  41 c8 99 20 22 4f 53 5f  46 69 6c 65 22 2c 35 2c  |A.. "OS_File",5,|
00001d20  22 3c 41 4c 50 53 24 52  65 73 6f 75 72 63 65 73  |"<ALPS$Resources|
00001d30  3e 2e 41 6c 70 73 53 70  72 69 74 65 22 20 b8 20  |>.AlpsSprite" . |
00001d40  2c 2c 2c 2c 73 70 72 69  74 65 73 69 7a 65 0d 0a  |,,,,spritesize..|
00001d50  8c 11 73 70 72 69 74 65  73 69 7a 65 2b 3d 34 0d  |..spritesize+=4.|
00001d60  0a 96 1c de 20 73 70 72  69 74 65 61 72 65 61 25  |.... spritearea%|
00001d70  20 73 70 72 69 74 65 73  69 7a 65 0d 0a a0 1b 21  | spritesize....!|
00001d80  73 70 72 69 74 65 61 72  65 61 25 3d 73 70 72 69  |spritearea%=spri|
00001d90  74 65 73 69 7a 65 0d 0a  aa 42 c8 99 20 22 4f 53  |tesize...B.. "OS|
00001da0  5f 53 70 72 69 74 65 4f  70 22 2c 32 36 36 2c 73  |_SpriteOp",266,s|
00001db0  70 72 69 74 65 61 72 65  61 25 2c 22 3c 41 6c 70  |pritearea%,"<Alp|
00001dc0  73 24 52 65 73 6f 75 72  63 65 73 3e 2e 41 6c 70  |s$Resources>.Alp|
00001dd0  73 53 70 72 69 74 65 22  0d 0a b4 23 de 20 66 6f  |sSprite"...#. fo|
00001de0  6e 74 63 6f 75 6e 74 73  25 20 32 35 35 2c 6d 62  |ntcounts% 255,mb|
00001df0  5f 77 69 64 65 6e 74 25  20 32 34 0d 0a be 04 0d  |_wident% 24.....|
00001e00  0a c8 36 f4 20 2d 2d 2d  2d 2d 2d 20 53 65 74 20  |..6. ------ Set |
00001e10  75 70 20 74 68 65 20 77  69 6d 70 73 20 61 6e 64  |up the wimps and|
00001e20  20 74 68 65 69 72 20 68  61 6e 64 6c 65 73 20 2d  | their handles -|
00001e30  2d 2d 2d 2d 2d 0d 0a d2  04 0d 0a dc 0e de 72 67  |-----.........rg|
00001e40  62 28 31 39 2c 33 29 0d  0a e6 2b f2 6c 6f 61 64  |b(19,3)...+.load|
00001e50  74 65 6d 70 6c 61 74 65  73 28 22 3c 41 6c 70 73  |templates("<Alps|
00001e60  24 52 65 73 6f 75 72 63  65 73 3e 2e 41 4c 50 53  |$Resources>.ALPS|
00001e70  22 29 0d 0a f0 04 0d 0a  fa 2b f4 20 2d 2d 2d 2d  |").......+. ----|
00001e80  2d 2d 20 4e 61 6d 65 20  74 68 65 20 77 69 6e 64  |-- Name the wind|
00001e90  6f 77 20 68 61 6e 64 6c  65 73 20 2d 2d 2d 2d 2d  |ow handles -----|
00001ea0  2d 0d 0b 04 2e 6f 62 6a  68 61 6e 64 6c 65 3d 68  |-....objhandle=h|
00001eb0  61 6e 64 6c 65 25 28 a4  6d 61 74 63 68 69 64 65  |andle%(.matchide|
00001ec0  6e 74 28 22 6f 62 6a 65  63 74 65 64 22 29 29 0d  |nt("objected")).|
00001ed0  0b 0e 2f 72 6f 6f 6d 68  61 6e 64 6c 65 3d 68 61  |../roomhandle=ha|
00001ee0  6e 64 6c 65 25 28 a4 6d  61 74 63 68 69 64 65 6e  |ndle%(.matchiden|
00001ef0  74 28 22 72 6f 6f 6d 65  64 69 74 22 29 29 0d 0b  |t("roomedit"))..|
00001f00  18 2d 74 65 78 74 68 61  6e 64 6c 65 3d 68 61 6e  |.-texthandle=han|
00001f10  64 6c 65 25 28 a4 6d 61  74 63 68 69 64 65 6e 74  |dle%(.matchident|
00001f20  28 22 74 65 78 74 65 64  22 29 29 0d 0b 22 2c 64  |("texted"))..",d|
00001f30  65 73 69 67 6e 3d 68 61  6e 64 6c 65 25 28 a4 6d  |esign=handle%(.m|
00001f40  61 74 63 68 69 64 65 6e  74 28 22 63 68 72 64 65  |atchident("chrde|
00001f50  73 69 67 6e 22 29 29 0d  0b 2c 2b 69 6e 66 6f 68  |sign"))..,+infoh|
00001f60  61 6e 64 6c 65 3d 68 61  6e 64 6c 65 25 28 a4 6d  |andle=handle%(.m|
00001f70  61 74 63 68 69 64 65 6e  74 28 22 69 6e 66 6f 22  |atchident("info"|
00001f80  29 29 0d 0b 36 2d 73 61  76 65 68 61 6e 64 6c 65  |))..6-savehandle|
00001f90  3d 68 61 6e 64 6c 65 25  28 a4 6d 61 74 63 68 69  |=handle%(.matchi|
00001fa0  64 65 6e 74 28 22 73 61  76 65 61 73 22 29 29 0d  |dent("saveas")).|
00001fb0  0b 40 38 41 4c 50 53 6d  61 69 6e 3d 68 61 6e 64  |.@8ALPSmain=hand|
00001fc0  6c 65 25 28 a4 6d 61 74  63 68 69 64 65 6e 74 28  |le%(.matchident(|
00001fd0  22 69 63 6f 6e 62 61 72  22 29 29 3a 64 69 61 6c  |"iconbar")):dial|
00001fe0  6f 67 75 65 25 3d 30 0d  0b 4a 28 73 65 74 75 70  |ogue%=0..J(setup|
00001ff0  68 3d 68 61 6e 64 6c 65  25 28 a4 6d 61 74 63 68  |h=handle%(.match|
00002000  69 64 65 6e 74 28 22 53  65 74 75 70 22 29 29 0d  |ident("Setup")).|
00002010  0b 54 1f 64 65 73 74 69  63 6f 6e 3d 34 37 3a 65  |.T.desticon=47:e|
00002020  78 69 74 70 72 6f 67 69  63 6f 6e 3d 34 38 0d 0b  |xitprogicon=48..|
00002030  5e 04 0d 0b 68 11 69 63  6f 6e 62 61 72 25 20 3d  |^...h.iconbar% =|
00002040  20 2d 32 0d 0b 72 16 77  69 6e 64 6f 77 69 6e 64  | -2..r.windowind|
00002050  65 78 25 3d 6e 68 25 2b  31 0d 0b 7c 04 0d 0b 86  |ex%=nh%+1..|....|
00002060  2c f2 63 68 61 6e 67 65  69 63 6f 6e 28 69 6e 66  |,.changeicon(inf|
00002070  6f 68 61 6e 64 6c 65 2c  37 2c 76 65 72 73 69 6f  |ohandle,7,versio|
00002080  6e 24 2c 64 75 6d 6d 79  29 0d 0b 90 04 0d 0b 9a  |n$,dummy).......|
00002090  3b 66 69 72 73 74 49 63  6f 6e 42 61 72 49 63 6f  |;firstIconBarIco|
000020a0  6e 25 20 3d 20 a4 69 63  6f 6e 62 61 72 28 73 70  |n% = .iconbar(sp|
000020b0  72 69 74 65 61 72 65 61  25 2c 20 22 66 61 63 65  |ritearea%, "face|
000020c0  22 2c 33 31 2c 31 39 29  0d 0b a4 21 54 48 45 6d  |",31,19)...!THEm|
000020d0  69 73 63 69 63 6f 6e 3d  66 69 72 73 74 49 63 6f  |iscicon=firstIco|
000020e0  6e 42 61 72 49 63 6f 6e  25 0d 0b ae 04 0d 0b b8  |nBarIcon%.......|
000020f0  04 0d 0b c2 26 f4 20 2d  2d 2d 2d 2d 2d 20 44 65  |....&. ------ De|
00002100  66 69 6e 65 20 74 68 65  20 63 6f 6c 6f 75 72 73  |fine the colours|
00002110  20 2d 2d 2d 2d 2d 2d 0d  0b cc 1a 62 61 72 66 67  | ------....barfg|
00002120  63 6f 6c 3d 31 31 3a 62  61 72 62 67 63 6f 6c 3d  |col=11:barbgcol=|
00002130  33 0d 0b d6 27 60 77 62  63 6f 6c 3d 30 3a 60 74  |3...'`wbcol=0:`t|
00002140  62 63 6f 6c 3d 32 3a 60  73 63 6f 3d 26 33 3a 60  |bcol=2:`sco=&3:`|
00002150  6d 62 63 6f 6c 3d 26 42  0d 0b e0 28 60 77 66 63  |mbcol=&B...(`wfc|
00002160  6f 6c 3d 37 3a 60 74 66  63 6f 6c 3d 37 3a 60 73  |ol=7:`tfcol=7:`s|
00002170  63 69 3d 26 44 3a 60 74  62 63 6f 6c 32 3d 26 43  |ci=&D:`tbcol2=&C|
00002180  0d 0b ea 04 0d 0b f4 1b  63 75 72 5f 70 61 6c 25  |........cur_pal%|
00002190  3d 37 3a 70 68 79 73 5f  63 6f 6c 25 3d 31 36 0d  |=7:phys_col%=16.|
000021a0  0b fe 04 0d 0c 08 30 66  69 72 73 74 5f 74 6f 6b  |......0first_tok|
000021b0  65 6e 3d 26 33 30 3a f4  20 4c 6f 77 65 73 74 20  |en=&30:. Lowest |
000021c0  6b 65 79 77 6f 72 64 20  74 6f 6b 65 6e 20 76 61  |keyword token va|
000021d0  6c 75 65 0d 0c 12 57 f2  66 69 6e 64 5f 74 6f 6b  |lue...W.find_tok|
000021e0  65 6e 28 6b 65 79 77 6f  72 64 24 28 29 2c 22 49  |en(keyword$(),"I|
000021f0  4e 43 22 2c 76 61 72 5f  74 6f 6b 65 6e 2c 64 75  |NC",var_token,du|
00002200  6d 6d 79 29 3a f4 20 54  6f 6b 65 6e 73 20 66 72  |mmy):. Tokens fr|
00002210  6f 6d 20 68 65 72 65 20  75 70 20 61 6c 6c 6f 77  |om here up allow|
00002220  20 76 61 72 69 61 62 6c  65 73 0d 0c 1c 34 f2 66  | variables...4.f|
00002230  69 6e 64 5f 74 6f 6b 65  6e 28 6b 65 79 77 6f 72  |ind_token(keywor|
00002240  64 24 28 29 2c 22 44 45  46 49 4e 45 22 2c 64 65  |d$(),"DEFINE",de|
00002250  66 5f 74 6f 6b 65 6e 2c  64 75 6d 6d 79 29 0d 0c  |f_token,dummy)..|
00002260  26 33 f2 66 69 6e 64 5f  74 6f 6b 65 6e 28 6b 65  |&3.find_token(ke|
00002270  79 77 6f 72 64 24 28 29  2c 22 53 54 4f 50 22 2c  |yword$(),"STOP",|
00002280  73 74 6f 70 5f 74 6f 6b  65 6e 2c 64 75 6d 6d 79  |stop_token,dummy|
00002290  29 0d 0c 30 31 f2 66 69  6e 64 5f 74 6f 6b 65 6e  |)..01.find_token|
000022a0  28 6b 65 79 77 6f 72 64  24 28 29 2c 22 45 4e 44  |(keyword$(),"END|
000022b0  22 2c 65 6e 64 5f 74 6f  6b 65 6e 2c 64 75 6d 6d  |",end_token,dumm|
000022c0  79 29 0d 0c 3a 33 f2 66  69 6e 64 5f 74 6f 6b 65  |y)..:3.find_toke|
000022d0  6e 28 6b 65 79 77 6f 72  64 24 28 29 2c 22 45 58  |n(keyword$(),"EX|
000022e0  49 54 22 2c 65 78 69 74  5f 74 6f 6b 65 6e 2c 64  |IT",exit_token,d|
000022f0  75 6d 6d 79 29 0d 0c 44  36 f2 66 69 6e 64 5f 74  |ummy)..D6.find_t|
00002300  6f 6b 65 6e 28 6b 65 79  77 6f 72 64 24 28 29 2c  |oken(keyword$(),|
00002310  22 44 45 46 50 52 4f 43  22 2c 70 72 6f 63 5f 74  |"DEFPROC",proc_t|
00002320  6f 6b 65 6e 2c 64 75 6d  6d 79 29 0d 0c 4e 33 f2  |oken,dummy)..N3.|
00002330  66 69 6e 64 5f 74 6f 6b  65 6e 28 6b 65 79 77 6f  |find_token(keywo|
00002340  72 64 24 28 29 2c 22 50  52 45 50 22 2c 70 72 65  |rd$(),"PREP",pre|
00002350  70 5f 74 6f 6b 65 6e 2c  64 75 6d 6d 79 29 0d 0c  |p_token,dummy)..|
00002360  58 39 f2 66 69 6e 64 5f  74 6f 6b 65 6e 28 6b 65  |X9.find_token(ke|
00002370  79 77 6f 72 64 24 28 29  2c 22 4e 4f 54 50 52 45  |yword$(),"NOTPRE|
00002380  50 22 2c 6e 6f 74 70 72  65 70 5f 74 6f 6b 65 6e  |P",notprep_token|
00002390  2c 64 75 6d 6d 79 29 0d  0c 62 04 0d 0c 6c 29 f4  |,dummy)..b...l).|
000023a0  20 2d 2d 2d 2d 2d 2d 20  53 65 74 20 75 70 20 74  | ------ Set up t|
000023b0  68 65 20 64 69 63 74 69  6f 6e 61 72 79 20 2d 2d  |he dictionary --|
000023c0  2d 2d 2d 2d 0d 0c 76 12  64 69 63 74 5f 73 69 7a  |----..v.dict_siz|
000023d0  65 3d 31 30 30 30 0d 0c  80 25 de 20 64 69 63 74  |e=1000...%. dict|
000023e0  25 20 64 69 63 74 5f 73  69 7a 65 2c 74 6f 6b 24  |% dict_size,tok$|
000023f0  28 6d 61 78 74 6f 6b 65  6e 73 29 0d 0c 8a 18 21  |(maxtokens)....!|
00002400  64 69 63 74 25 3d 33 3a  64 69 63 74 25 3f 32 3d  |dict%=3:dict%?2=|
00002410  26 38 30 0d 0c 94 04 0d  0c 9e 2d f4 20 2d 2d 2d  |&80.......-. ---|
00002420  2d 2d 2d 20 46 69 6e 64  20 74 68 65 20 61 76 61  |--- Find the ava|
00002430  69 6c 61 62 6c 65 20 6d  65 6d 6f 72 79 20 2d 2d  |ilable memory --|
00002440  2d 2d 2d 2d 0d 0c a8 17  6d 65 6d 66 72 65 65 3d  |----....memfree=|
00002450  28 93 2d e0 29 2d 35 30  30 30 30 0d 0c b2 6c e7  |(.-.)-50000...l.|
00002460  20 6d 65 6d 66 72 65 65  3c 30 20 8c 20 6e 75 6c  | memfree<0 . nul|
00002470  6c 3d a4 65 72 72 6f 72  62 6f 78 28 22 4e 6f 74  |l=.errorbox("Not|
00002480  20 65 6e 6f 75 67 68 20  6d 65 6d 6f 72 79 20 61  | enough memory a|
00002490  76 61 69 6c 61 62 6c 65  20 69 6e 20 27 4e 65 78  |vailable in 'Nex|
000024a0  74 27 20 73 6c 6f 74 22  2c 30 2c 31 2c 2d 39 39  |t' slot",0,1,-99|
000024b0  29 3a c8 99 20 22 57 69  6d 70 5f 43 6c 6f 73 65  |):.. "Wimp_Close|
000024c0  44 6f 77 6e 22 3a e0 0d  0c bc 19 6d 61 78 74 65  |Down":.....maxte|
000024d0  78 74 25 3d 30 2e 38 33  2a 6d 65 6d 66 72 65 65  |xt%=0.83*memfree|
000024e0  0d 0c c6 1b 63 6f 64 65  5f 73 69 7a 65 25 3d 30  |....code_size%=0|
000024f0  2e 31 37 2a 6d 65 6d 66  72 65 65 0d 0c d0 04 0d  |.17*memfree.....|
00002500  0c da 40 f4 20 2d 2d 2d  2d 2d 2d 20 41 72 65 61  |..@. ------ Area|
00002510  73 20 66 6f 72 20 73 74  6f 72 69 6e 67 20 6d 65  |s for storing me|
00002520  73 73 61 67 65 73 2c 20  73 77 69 74 63 68 20 69  |ssages, switch i|
00002530  6e 66 6f 20 65 74 63 3b  20 2d 2d 2d 2d 2d 2d 0d  |nfo etc; ------.|
00002540  0c e4 44 de 20 74 65 78  74 25 20 6d 61 78 74 65  |..D. text% maxte|
00002550  78 74 25 2c 73 77 64 61  74 61 25 20 31 32 2a 6d  |xt%,swdata% 12*m|
00002560  61 78 73 77 25 2c 73 77  69 74 63 68 5f 76 61 6c  |axsw%,switch_val|
00002570  73 28 6d 61 78 73 77 25  29 2c 6d 5f 6d 73 67 25  |s(maxsw%),m_msg%|
00002580  20 31 32 0d 0c ee 1c de  20 73 77 69 74 63 68 5f  | 12..... switch_|
00002590  62 75 66 25 20 32 2a 6d  61 78 73 77 25 2b 31 0d  |buf% 2*maxsw%+1.|
000025a0  0c f8 27 24 73 77 64 61  74 61 25 3d c4 31 32 2a  |..'$swdata%=.12*|
000025b0  6d 61 78 73 77 25 2c bd  31 33 29 3a 24 6d 5f 6d  |maxsw%,.13):$m_m|
000025c0  73 67 25 3d 22 22 0d 0d  02 04 0d 0d 0c 2c f4 20  |sg%="".......,. |
000025d0  2d 2d 2d 2d 2d 2d 20 49  6e 69 74 69 61 6c 69 73  |------ Initialis|
000025e0  65 20 74 68 65 20 74 65  78 74 20 61 72 65 61 20  |e the text area |
000025f0  2d 2d 2d 2d 2d 2d 0d 0d  16 2c 21 74 65 78 74 25  |------...,!text%|
00002600  3d 31 3a 74 65 78 74 25  21 32 3d 26 42 3a 74 65  |=1:text%!2=&B:te|
00002610  78 74 25 21 36 3d 30 3a  74 65 78 74 25 21 31 30  |xt%!6=0:text%!10|
00002620  3d 30 0d 0d 20 1c de 20  73 74 5f 6d 73 67 25 20  |=0.. .. st_msg% |
00002630  31 32 2c 65 6e 64 5f 6d  73 67 25 20 31 32 0d 0d  |12,end_msg% 12..|
00002640  2a 1e 24 73 74 5f 6d 73  67 25 3d 22 31 22 3a 24  |*.$st_msg%="1":$|
00002650  65 6e 64 5f 6d 73 67 25  3d 22 31 22 0d 0d 34 27  |end_msg%="1"..4'|
00002660  6d 70 74 72 3d 31 3a f4  20 54 68 65 20 63 75 72  |mptr=1:. The cur|
00002670  72 65 6e 74 20 6d 65 73  73 61 67 65 20 6e 75 6d  |rent message num|
00002680  62 65 72 0d 0d 3e 45 74  65 78 74 5f 6f 77 6e 65  |ber..>Etext_owne|
00002690  72 24 3d 22 22 3a f4 20  54 68 65 20 63 75 72 72  |r$="":. The curr|
000026a0  65 6e 74 20 6f 77 6e 65  72 20 6f 66 20 61 6e 79  |ent owner of any|
000026b0  20 74 65 78 74 20 69 6e  20 74 68 65 20 74 65 78  | text in the tex|
000026c0  74 20 65 64 69 74 6f 72  0d 0d 48 04 0d 0d 52 0f  |t editor..H...R.|
000026d0  64 61 74 61 76 61 6c 69  64 3d b9 0d 0d 5c 04 0d  |datavalid=...\..|
000026e0  0d 66 2b f4 20 2d 2d 2d  2d 2d 2d 20 53 65 74 20  |.f+. ------ Set |
000026f0  75 70 20 74 68 65 20 70  72 6f 67 72 61 6d 20 61  |up the program a|
00002700  72 65 61 20 2d 2d 2d 2d  2d 2d 0d 0d 70 19 de 20  |rea ------..p.. |
00002710  70 72 6f 67 72 61 6d 25  20 63 6f 64 65 5f 73 69  |program% code_si|
00002720  7a 65 25 0d 0d 7a 0f 21  70 72 6f 67 72 61 6d 25  |ze%..z.!program%|
00002730  3d 30 0d 0d 84 10 70 72  6f 67 72 61 6d 25 21 34  |=0....program%!4|
00002740  3d 30 0d 0d 8e 0d 65 72  72 66 6c 61 67 3d a3 0d  |=0....errflag=..|
00002750  0d 98 04 0d 0d a2 2d f4  20 2d 2d 2d 2d 2d 2d 20  |......-. ------ |
00002760  53 65 74 20 75 70 20 74  68 65 20 6d 65 6e 75 20  |Set up the menu |
00002770  73 74 72 75 63 74 75 72  65 20 2d 2d 2d 2d 2d 2d  |structure ------|
00002780  0d 0d ac 17 6d 5f 63 6f  6e 74 72 6f 6f 6d 25 3d  |....m_controom%=|
00002790  a4 63 72 6d 65 6e 75 0d  0d b6 1d dc 20 22 23 4e  |.crmenu..... "#N|
000027a0  75 6d 62 65 72 2c 24 63  6f 6e 74 72 6f 6f 6d 25  |umber,$controom%|
000027b0  28 35 29 22 0d 0d c0 15  6d 5f 63 6f 6e 74 61 69  |(5)"....m_contai|
000027c0  6e 3d a4 63 72 6d 65 6e  75 0d 0d ca 26 dc 20 22  |n=.crmenu...&. "|
000027d0  43 6f 6e 74 61 69 6e 65  72 2c 55 73 65 20 72 6f  |Container,Use ro|
000027e0  6f 6d 3e 6d 5f 63 6f 6e  74 72 6f 6f 6d 25 22 0d  |om>m_controom%".|
000027f0  0d d4 16 6d 5f 63 68 61  72 64 65 73 25 3d a4 63  |...m_chardes%=.c|
00002800  72 6d 65 6e 75 0d 0d de  1f dc 20 22 23 43 48 41  |rmenu..... "#CHA|
00002810  4e 47 45 20 54 4f 3f 2c  24 63 68 61 72 6e 75 6d  |NGE TO?,$charnum|
00002820  28 32 29 22 0d 0d e8 17  63 68 61 72 5f 66 6e 61  |(2)"....char_fna|
00002830  6d 65 25 3d a4 63 72 6d  65 6e 75 0d 0d f2 22 dc  |me%=.crmenu...".|
00002840  20 22 23 46 69 6c 65 6e  61 6d 65 3a 2c 24 66 69  | "#Filename:,$fi|
00002850  6c 65 6e 61 6d 65 32 25  28 31 31 29 22 0d 0d fc  |lename2%(11)"...|
00002860  17 6d 65 6e 75 5f 66 6e  61 6d 65 25 3d a4 63 72  |.menu_fname%=.cr|
00002870  6d 65 6e 75 0d 0e 06 21  dc 20 22 23 46 69 6c 65  |menu...!. "#File|
00002880  6e 61 6d 65 3a 2c 24 66  69 6c 65 6e 61 6d 65 25  |name:,$filename%|
00002890  28 31 31 29 22 0d 0e 10  16 6d 5f 67 6f 74 6f 6d  |(11)"....m_gotom|
000028a0  73 67 25 3d a4 63 72 6d  65 6e 75 0d 0e 1a 13 dc  |sg%=.crmenu.....|
000028b0  20 22 24 6d 5f 6d 73 67  25 28 31 32 29 22 0d 0e  | "$m_msg%(12)"..|
000028c0  24 13 6d 5f 70 72 6f 63  25 3d a4 63 72 6d 65 6e  |$.m_proc%=.crmen|
000028d0  75 0d 0e 2e 1a dc 20 22  23 4e 75 6d 62 65 72 3a  |u..... "#Number:|
000028e0  2c 24 70 72 6f 63 25 28  34 29 22 0d 0e 38 12 6d  |,$proc%(4)"..8.m|
000028f0  5f 64 65 66 25 3d a4 63  72 6d 65 6e 75 0d 0e 42  |_def%=.crmenu..B|
00002900  18 dc 20 22 23 56 65 72  62 3a 2c 24 64 65 66 25  |.. "#Verb:,$def%|
00002910  28 31 32 29 22 0d 0e 4c  13 6d 5f 65 78 69 74 25  |(12)"..L.m_exit%|
00002920  3d a4 63 72 6d 65 6e 75  0d 0e 56 1a dc 20 22 23  |=.crmenu..V.. "#|
00002930  4e 75 6d 62 65 72 3a 2c  24 65 78 69 74 25 28 34  |Number:,$exit%(4|
00002940  29 22 0d 0e 60 16 6d 5f  6c 69 73 74 6f 70 74 73  |)"..`.m_listopts|
00002950  3d a4 63 72 6d 65 6e 75  0d 0e 6a 3d dc 20 22 23  |=.crmenu..j=. "#|
00002960  44 69 73 70 6c 61 79 3a  2c 56 6f 63 61 62 75 6c  |Display:,Vocabul|
00002970  61 72 79 20 61 73 20 6e  75 6d 62 65 72 73 2c 56  |ary as numbers,V|
00002980  6f 63 61 62 75 6c 61 72  79 20 61 73 20 73 74 72  |ocabulary as str|
00002990  69 6e 67 73 22 0d 0e 74  15 6d 5f 69 6d 70 6f 72  |ings"..t.m_impor|
000029a0  74 25 3d a4 63 72 6d 65  6e 75 0d 0e 7e 1f dc 20  |t%=.crmenu..~.. |
000029b0  22 23 46 69 6c 65 6e 61  6d 65 3a 2c 24 69 6d 70  |"#Filename:,$imp|
000029c0  6f 72 74 25 28 31 31 29  22 0d 0e 88 20 73 77 31  |ort%(11)"... sw1|
000029d0  3d a4 63 72 6d 65 6e 75  3a 6e 78 74 73 77 3d 73  |=.crmenu:nxtsw=s|
000029e0  77 64 61 74 61 25 2b 31  32 0d 0e 92 1c dc 20 22  |wdata%+12..... "|
000029f0  23 56 61 6c 75 65 3a 2c  24 73 77 64 61 74 61 25  |#Value:,$swdata%|
00002a00  28 31 32 29 22 0d 0e 9c  1e 73 77 32 3d a4 63 72  |(12)"....sw2=.cr|
00002a10  6d 65 6e 75 3a 6e 78 74  73 77 3d 6e 78 74 73 77  |menu:nxtsw=nxtsw|
00002a20  2b 31 32 0d 0e a6 16 dc  20 22 23 56 61 6c 75 65  |+12..... "#Value|
00002a30  3a 2c 24 6e 78 74 73 77  22 0d 0e b0 1e 73 77 33  |:,$nxtsw"....sw3|
00002a40  3d a4 63 72 6d 65 6e 75  3a 6e 78 74 73 77 3d 6e  |=.crmenu:nxtsw=n|
00002a50  78 74 73 77 2b 31 32 0d  0e ba 16 dc 20 22 23 56  |xtsw+12..... "#V|
00002a60  61 6c 75 65 3a 2c 24 6e  78 74 73 77 22 0d 0e c4  |alue:,$nxtsw"...|
00002a70  1e 73 77 34 3d a4 63 72  6d 65 6e 75 3a 6e 78 74  |.sw4=.crmenu:nxt|
00002a80  73 77 3d 6e 78 74 73 77  2b 31 32 0d 0e ce 16 dc  |sw=nxtsw+12.....|
00002a90  20 22 23 56 61 6c 75 65  3a 2c 24 6e 78 74 73 77  | "#Value:,$nxtsw|
00002aa0  22 0d 0e d8 1e 73 77 35  3d a4 63 72 6d 65 6e 75  |"....sw5=.crmenu|
00002ab0  3a 6e 78 74 73 77 3d 6e  78 74 73 77 2b 31 32 0d  |:nxtsw=nxtsw+12.|
00002ac0  0e e2 16 dc 20 22 23 56  61 6c 75 65 3a 2c 24 6e  |.... "#Value:,$n|
00002ad0  78 74 73 77 22 0d 0e ec  1e 73 77 36 3d a4 63 72  |xtsw"....sw6=.cr|
00002ae0  6d 65 6e 75 3a 6e 78 74  73 77 3d 6e 78 74 73 77  |menu:nxtsw=nxtsw|
00002af0  2b 31 32 0d 0e f6 16 dc  20 22 23 56 61 6c 75 65  |+12..... "#Value|
00002b00  3a 2c 24 6e 78 74 73 77  22 0d 0f 00 1e 73 77 37  |:,$nxtsw"....sw7|
00002b10  3d a4 63 72 6d 65 6e 75  3a 6e 78 74 73 77 3d 6e  |=.crmenu:nxtsw=n|
00002b20  78 74 73 77 2b 31 32 0d  0f 0a 16 dc 20 22 23 56  |xtsw+12..... "#V|
00002b30  61 6c 75 65 3a 2c 24 6e  78 74 73 77 22 0d 0f 14  |alue:,$nxtsw"...|
00002b40  1e 73 77 38 3d a4 63 72  6d 65 6e 75 3a 6e 78 74  |.sw8=.crmenu:nxt|
00002b50  73 77 3d 6e 78 74 73 77  2b 31 32 0d 0f 1e 16 dc  |sw=nxtsw+12.....|
00002b60  20 22 23 56 61 6c 75 65  3a 2c 24 6e 78 74 73 77  | "#Value:,$nxtsw|
00002b70  22 0d 0f 28 1e 73 77 39  3d a4 63 72 6d 65 6e 75  |"..(.sw9=.crmenu|
00002b80  3a 6e 78 74 73 77 3d 6e  78 74 73 77 2b 31 32 0d  |:nxtsw=nxtsw+12.|
00002b90  0f 32 16 dc 20 22 23 56  61 6c 75 65 3a 2c 24 6e  |.2.. "#Value:,$n|
00002ba0  78 74 73 77 22 0d 0f 3c  1f 73 77 31 30 3d a4 63  |xtsw"..<.sw10=.c|
00002bb0  72 6d 65 6e 75 3a 6e 78  74 73 77 3d 6e 78 74 73  |rmenu:nxtsw=nxts|
00002bc0  77 2b 31 32 0d 0f 46 16  dc 20 22 23 56 61 6c 75  |w+12..F.. "#Valu|
00002bd0  65 3a 2c 24 6e 78 74 73  77 22 0d 0f 50 15 6d 5f  |e:,$nxtsw"..P.m_|
00002be0  73 77 69 74 63 68 25 3d  a4 63 72 6d 65 6e 75 0d  |switch%=.crmenu.|
00002bf0  0f 5a 59 dc 20 22 23 53  77 69 74 63 68 2c 4e 6f  |.ZY. "#Switch,No|
00002c00  20 73 77 69 74 63 68 65  73 2c 31 3e 73 77 31 2c  | switches,1>sw1,|
00002c10  32 3e 73 77 32 2c 33 3e  73 77 33 2c 34 3e 73 77  |2>sw2,3>sw3,4>sw|
00002c20  34 2c 35 3e 73 77 35 2c  36 3e 73 77 36 2c 37 3e  |4,5>sw5,6>sw6,7>|
00002c30  73 77 37 2c 38 3e 73 77  38 2c 39 3e 73 77 39 2c  |sw7,8>sw8,9>sw9,|
00002c40  31 30 3e 73 77 31 30 22  0d 0f 64 13 6d 5f 74 65  |10>sw10"..d.m_te|
00002c50  78 74 25 3d a4 63 72 6d  65 6e 75 0d 0f 6e 84 dc  |xt%=.crmenu..n..|
00002c60  20 22 23 4d 53 47 3a 20  6e 6e 6e 6e 6e 2c 49 6e  | "#MSG: nnnnn,In|
00002c70  73 65 72 74 2c 4f 76 65  72 74 79 70 65 23 2c 43  |sert,Overtype#,C|
00002c80  75 74 2c 43 6f 70 79 2c  50 61 73 74 65 23 2c 4e  |ut,Copy,Paste#,N|
00002c90  65 78 74 2c 50 72 65 76  69 6f 75 73 2c 46 69 72  |ext,Previous,Fir|
00002ca0  73 74 2c 4c 61 73 74 2c  47 6f 74 6f 20 6d 73 67  |st,Last,Goto msg|
00002cb0  23 3e 6d 5f 67 6f 74 6f  6d 73 67 25 2c 45 64 69  |#>m_gotomsg%,Edi|
00002cc0  74 20 73 77 69 74 63 68  23 3e 6d 5f 73 77 69 74  |t switch#>m_swit|
00002cd0  63 68 25 2c 50 72 69 6e  74 20 74 68 69 73 22 0d  |ch%,Print this".|
00002ce0  0f 78 13 6d 5f 70 72 6f  67 25 3d a4 63 72 6d 65  |.x.m_prog%=.crme|
00002cf0  6e 75 0d 0f 82 96 dc 20  22 23 50 72 6f 67 72 61  |nu..... "#Progra|
00002d00  6d 20 45 64 69 74 6f 72  2c 49 6e 73 65 72 74 2c  |m Editor,Insert,|
00002d10  4f 76 65 72 74 79 70 65  23 2c 43 75 74 2c 43 6f  |Overtype#,Cut,Co|
00002d20  70 79 2c 50 61 73 74 65  23 2c 4d 61 69 6e 2c 50  |py,Paste#,Main,P|
00002d30  72 6f 63 65 64 75 72 65  3e 6d 5f 70 72 6f 63 25  |rocedure>m_proc%|
00002d40  2c 44 65 66 69 6e 65 3e  6d 5f 64 65 66 25 2c 45  |,Define>m_def%,E|
00002d50  78 69 74 20 72 6f 75 74  69 6e 65 23 3e 6d 5f 65  |xit routine#>m_e|
00002d60  78 69 74 25 2c 50 72 69  6e 74 20 74 68 69 73 2c  |xit%,Print this,|
00002d70  4c 69 73 74 20 6f 70 74  69 6f 6e 73 3e 6d 5f 6c  |List options>m_l|
00002d80  69 73 74 6f 70 74 73 22  0d 0f 8c 14 6d 5f 76 6f  |istopts"....m_vo|
00002d90  63 61 62 25 3d a4 63 72  6d 65 6e 75 0d 0f 96 80  |cab%=.crmenu....|
00002da0  dc 20 22 23 56 6f 63 61  62 75 6c 61 72 79 2c 49  |. "#Vocabulary,I|
00002db0  6e 73 65 72 74 2c 4f 76  65 72 74 79 70 65 23 2c  |nsert,Overtype#,|
00002dc0  43 75 74 2c 43 6f 70 79  2c 50 61 73 74 65 23 2c  |Cut,Copy,Paste#,|
00002dd0  4e 6f 75 6e 73 2c 56 65  72 62 73 2c 41 64 6a 65  |Nouns,Verbs,Adje|
00002de0  63 74 69 76 65 73 2c 50  72 65 70 6f 73 69 74 69  |ctives,Prepositi|
00002df0  6f 6e 73 2c 43 6f 6e 6a  75 6e 63 74 69 6f 6e 73  |ons,Conjunctions|
00002e00  2c 53 70 65 63 69 61 6c  73 2c 4e 6f 69 73 65 23  |,Specials,Noise#|
00002e10  2c 50 72 69 6e 74 20 74  68 69 73 22 0d 0f a0 13  |,Print this"....|
00002e20  70 69 78 6d 65 6e 75 3d  a4 63 72 6d 65 6e 75 0d  |pixmenu=.crmenu.|
00002e30  0f aa 17 dc 20 22 23 50  69 63 74 75 72 65 73 2c  |.... "#Pictures,|
00002e40  50 72 69 6e 74 22 0d 0f  b4 14 70 72 6f 67 6d 65  |Print"....progme|
00002e50  6e 75 3d a4 63 72 6d 65  6e 75 0d 0f be 2c dc 20  |nu=.crmenu...,. |
00002e60  22 23 50 72 6f 67 72 61  6d 2c 50 72 69 6e 74 2c  |"#Program,Print,|
00002e70  49 6d 70 6f 72 74 23 3e  6d 5f 69 6d 70 6f 72 74  |Import#>m_import|
00002e80  25 2c 52 75 6e 22 0d 0f  c8 14 63 68 61 72 6d 65  |%,Run"....charme|
00002e90  6e 75 3d a4 63 72 6d 65  6e 75 0d 0f d2 32 dc 20  |nu=.crmenu...2. |
00002ea0  22 23 43 68 61 72 53 65  74 2c 53 61 76 65 3e 63  |"#CharSet,Save>c|
00002eb0  68 61 72 5f 66 6e 61 6d  65 25 2c 4c 6f 61 64 3e  |har_fname%,Load>|
00002ec0  63 68 61 72 5f 66 6e 61  6d 65 25 22 0d 0f dc 15  |char_fname%"....|
00002ed0  76 6f 63 61 62 6d 65 6e  75 3d a4 63 72 6d 65 6e  |vocabmenu=.crmen|
00002ee0  75 0d 0f e6 19 dc 20 22  23 56 6f 63 61 62 75 6c  |u..... "#Vocabul|
00002ef0  61 72 79 2c 50 72 69 6e  74 22 0d 0f f0 14 64 69  |ary,Print"....di|
00002f00  73 6b 6d 65 6e 75 3d a4  63 72 6d 65 6e 75 0d 0f  |skmenu=.crmenu..|
00002f10  fa 2d dc 20 22 23 46 69  6c 65 73 2c 53 61 76 65  |.-. "#Files,Save|
00002f20  20 61 6c 6c 3e 73 61 76  65 68 61 6e 64 6c 65 2c  | all>savehandle,|
00002f30  53 65 74 75 70 20 64 69  73 6b 22 0d 10 04 14 66  |Setup disk"....f|
00002f40  61 63 65 6d 65 6e 75 3d  a4 63 72 6d 65 6e 75 0d  |acemenu=.crmenu.|
00002f50  10 0e 15 dc 20 22 23 41  63 74 6f 72 73 2c 50 72  |.... "#Actors,Pr|
00002f60  69 6e 74 22 0d 10 18 14  6d 69 73 63 6d 65 6e 75  |int"....miscmenu|
00002f70  3d a4 63 72 6d 65 6e 75  0d 10 22 22 dc 20 22 23  |=.crmenu.."". "#|
00002f80  41 4c 50 53 2c 49 6e 66  6f 3e 69 6e 66 6f 68 61  |ALPS,Info>infoha|
00002f90  6e 64 6c 65 2c 51 75 69  74 22 0d 10 2c 11 6d 73  |ndle,Quit"..,.ms|
00002fa0  67 32 25 3d a4 63 72 6d  65 6e 75 0d 10 36 13 dc  |g2%=.crmenu..6..|
00002fb0  20 22 24 73 74 5f 6d 73  67 25 28 36 29 22 0d 10  | "$st_msg%(6)"..|
00002fc0  40 11 6d 73 67 33 25 3d  a4 63 72 6d 65 6e 75 0d  |@.msg3%=.crmenu.|
00002fd0  10 4a 14 dc 20 22 24 65  6e 64 5f 6d 73 67 25 28  |.J.. "$end_msg%(|
00002fe0  36 29 22 0d 10 54 11 6d  73 67 31 25 3d a4 63 72  |6)"..T.msg1%=.cr|
00002ff0  6d 65 6e 75 0d 10 5e 2f  dc 20 22 23 46 72 6f 6d  |menu..^/. "#From|
00003000  2f 54 6f 3f 2c 53 74 61  72 74 20 6d 73 67 3e 6d  |/To?,Start msg>m|
00003010  73 67 32 25 2c 45 6e 64  20 6d 73 67 3e 6d 73 67  |sg2%,End msg>msg|
00003020  33 25 22 0d 10 68 14 74  65 78 74 6d 65 6e 75 3d  |3%"..h.textmenu=|
00003030  a4 63 72 6d 65 6e 75 0d  10 72 2a dc 20 22 23 54  |.crmenu..r*. "#T|
00003040  65 78 74 2c 50 72 69 6e  74 3e 6d 73 67 31 25 2c  |ext,Print>msg1%,|
00003050  49 6d 70 6f 72 74 3e 6d  5f 69 6d 70 6f 72 74 25  |Import>m_import%|
00003060  22 0d 10 7c 13 6f 62 6a  6d 65 6e 75 3d a4 63 72  |"..|.objmenu=.cr|
00003070  6d 65 6e 75 0d 10 86 27  dc 20 22 23 4f 62 6a 65  |menu...'. "#Obje|
00003080  63 74 73 2c 50 72 69 6e  74 2c 49 6d 70 6f 72 74  |cts,Print,Import|
00003090  3e 6d 5f 69 6d 70 6f 72  74 25 22 0d 10 90 2a 6d  |>m_import%"...*m|
000030a0  6f 5f 75 73 65 72 35 3d  a4 63 72 6d 65 6e 75 3a  |o_user5=.crmenu:|
000030b0  6f 66 6c 25 3d 6f 5f 66  6c 61 67 73 25 2b 6d 61  |ofl%=o_flags%+ma|
000030c0  78 64 25 2a 33 0d 10 9a  23 dc 20 22 23 44 65 73  |xd%*3...#. "#Des|
000030d0  63 72 69 70 74 69 6f 6e  3a 2c 24 6f 5f 66 6c 61  |cription:,$o_fla|
000030e0  67 73 25 28 31 33 29 22  0d 10 a4 24 6d 6f 5f 75  |gs%(13)"...$mo_u|
000030f0  73 65 72 34 3d a4 63 72  6d 65 6e 75 3a 6f 66 6c  |ser4=.crmenu:ofl|
00003100  25 3d 6f 66 6c 25 2b 6d  61 78 64 25 0d 10 ae 1f  |%=ofl%+maxd%....|
00003110  dc 20 22 23 44 65 73 63  72 69 70 74 69 6f 6e 3a  |. "#Description:|
00003120  2c 24 6f 66 6c 25 28 31  33 29 22 0d 10 b8 24 6d  |,$ofl%(13)"...$m|
00003130  6f 5f 75 73 65 72 33 3d  a4 63 72 6d 65 6e 75 3a  |o_user3=.crmenu:|
00003140  6f 66 6c 25 3d 6f 66 6c  25 2b 6d 61 78 64 25 0d  |ofl%=ofl%+maxd%.|
00003150  10 c2 1f dc 20 22 23 44  65 73 63 72 69 70 74 69  |.... "#Descripti|
00003160  6f 6e 3a 2c 24 6f 66 6c  25 28 31 33 29 22 0d 10  |on:,$ofl%(13)"..|
00003170  cc 24 6d 6f 5f 75 73 65  72 32 3d a4 63 72 6d 65  |.$mo_user2=.crme|
00003180  6e 75 3a 6f 66 6c 25 3d  6f 66 6c 25 2b 6d 61 78  |nu:ofl%=ofl%+max|
00003190  64 25 0d 10 d6 1f dc 20  22 23 44 65 73 63 72 69  |d%..... "#Descri|
000031a0  70 74 69 6f 6e 3a 2c 24  6f 66 6c 25 28 31 33 29  |ption:,$ofl%(13)|
000031b0  22 0d 10 e0 24 6d 6f 5f  75 73 65 72 31 3d a4 63  |"...$mo_user1=.c|
000031c0  72 6d 65 6e 75 3a 6f 66  6c 25 3d 6f 66 6c 25 2b  |rmenu:ofl%=ofl%+|
000031d0  6d 61 78 64 25 0d 10 ea  1f dc 20 22 23 44 65 73  |maxd%..... "#Des|
000031e0  63 72 69 70 74 69 6f 6e  3a 2c 24 6f 66 6c 25 28  |cription:,$ofl%(|
000031f0  31 33 29 22 0d 10 f4 24  6d 6f 5f 75 73 65 72 30  |13)"...$mo_user0|
00003200  3d a4 63 72 6d 65 6e 75  3a 6f 66 6c 25 3d 6f 66  |=.crmenu:ofl%=of|
00003210  6c 25 2b 6d 61 78 64 25  0d 10 fe 1f dc 20 22 23  |l%+maxd%..... "#|
00003220  44 65 73 63 72 69 70 74  69 6f 6e 3a 2c 24 6f 66  |Description:,$of|
00003230  6c 25 28 31 33 29 22 0d  11 08 15 6d 5f 6f 62 6a  |l%(13)"....m_obj|
00003240  66 6c 61 67 3d a4 63 72  6d 65 6e 75 0d 11 12 80  |flag=.crmenu....|
00003250  dc 20 22 23 46 6c 61 67  73 2c 37 20 4c 69 67 68  |. "#Flags,7 Ligh|
00003260  74 20 73 6f 75 72 63 65  2c 36 20 54 61 6b 65 61  |t source,6 Takea|
00003270  62 6c 65 2c 35 20 49 6e  76 69 73 69 62 6c 65 2c  |ble,5 Invisible,|
00003280  34 20 53 63 65 6e 65 72  79 2c 33 20 57 65 61 72  |4 Scenery,3 Wear|
00003290  61 62 6c 65 2c 32 20 42  65 69 6e 67 20 77 6f 72  |able,2 Being wor|
000032a0  6e 2c 31 20 55 73 65 72  20 66 6c 61 67 3e 6d 6f  |n,1 User flag>mo|
000032b0  5f 75 73 65 72 31 2c 30  20 55 73 65 72 20 66 6c  |_user1,0 User fl|
000032c0  61 67 3e 6d 6f 5f 75 73  65 72 30 22 0d 11 1c 14  |ag>mo_user0"....|
000032d0  72 6f 6f 6d 6d 65 6e 75  3d a4 63 72 6d 65 6e 75  |roommenu=.crmenu|
000032e0  0d 11 26 25 dc 20 22 23  52 6f 6f 6d 73 2c 50 72  |..&%. "#Rooms,Pr|
000032f0  69 6e 74 2c 49 6d 70 6f  72 74 3e 6d 5f 69 6d 70  |int,Import>m_imp|
00003300  6f 72 74 25 22 0d 11 30  2a 6d 72 5f 75 73 65 72  |ort%"..0*mr_user|
00003310  36 3d a4 63 72 6d 65 6e  75 3a 72 66 6c 25 3d 72  |6=.crmenu:rfl%=r|
00003320  5f 66 6c 61 67 73 25 2b  6d 61 78 64 25 2a 32 0d  |_flags%+maxd%*2.|
00003330  11 3a 23 dc 20 22 23 44  65 73 63 72 69 70 74 69  |.:#. "#Descripti|
00003340  6f 6e 3a 2c 24 72 5f 66  6c 61 67 73 25 28 31 33  |on:,$r_flags%(13|
00003350  29 22 0d 11 44 24 6d 72  5f 75 73 65 72 35 3d a4  |)"..D$mr_user5=.|
00003360  63 72 6d 65 6e 75 3a 72  66 6c 25 3d 72 66 6c 25  |crmenu:rfl%=rfl%|
00003370  2b 6d 61 78 64 25 0d 11  4e 1f dc 20 22 23 44 65  |+maxd%..N.. "#De|
00003380  73 63 72 69 70 74 69 6f  6e 3a 2c 24 72 66 6c 25  |scription:,$rfl%|
00003390  28 31 33 29 22 0d 11 58  24 6d 72 5f 75 73 65 72  |(13)"..X$mr_user|
000033a0  34 3d a4 63 72 6d 65 6e  75 3a 72 66 6c 25 3d 72  |4=.crmenu:rfl%=r|
000033b0  66 6c 25 2b 6d 61 78 64  25 0d 11 62 1f dc 20 22  |fl%+maxd%..b.. "|
000033c0  23 44 65 73 63 72 69 70  74 69 6f 6e 3a 2c 24 72  |#Description:,$r|
000033d0  66 6c 25 28 31 33 29 22  0d 11 6c 24 6d 72 5f 75  |fl%(13)"..l$mr_u|
000033e0  73 65 72 33 3d a4 63 72  6d 65 6e 75 3a 72 66 6c  |ser3=.crmenu:rfl|
000033f0  25 3d 72 66 6c 25 2b 6d  61 78 64 25 0d 11 76 1f  |%=rfl%+maxd%..v.|
00003400  dc 20 22 23 44 65 73 63  72 69 70 74 69 6f 6e 3a  |. "#Description:|
00003410  2c 24 72 66 6c 25 28 31  33 29 22 0d 11 80 24 6d  |,$rfl%(13)"...$m|
00003420  72 5f 75 73 65 72 32 3d  a4 63 72 6d 65 6e 75 3a  |r_user2=.crmenu:|
00003430  72 66 6c 25 3d 72 66 6c  25 2b 6d 61 78 64 25 0d  |rfl%=rfl%+maxd%.|
00003440  11 8a 1f dc 20 22 23 44  65 73 63 72 69 70 74 69  |.... "#Descripti|
00003450  6f 6e 3a 2c 24 72 66 6c  25 28 31 33 29 22 0d 11  |on:,$rfl%(13)"..|
00003460  94 24 6d 72 5f 75 73 65  72 31 3d a4 63 72 6d 65  |.$mr_user1=.crme|
00003470  6e 75 3a 72 66 6c 25 3d  72 66 6c 25 2b 6d 61 78  |nu:rfl%=rfl%+max|
00003480  64 25 0d 11 9e 1f dc 20  22 23 44 65 73 63 72 69  |d%..... "#Descri|
00003490  70 74 69 6f 6e 3a 2c 24  72 66 6c 25 28 31 33 29  |ption:,$rfl%(13)|
000034a0  22 0d 11 a8 24 6d 72 5f  75 73 65 72 30 3d a4 63  |"...$mr_user0=.c|
000034b0  72 6d 65 6e 75 3a 72 66  6c 25 3d 72 66 6c 25 2b  |rmenu:rfl%=rfl%+|
000034c0  6d 61 78 64 25 0d 11 b2  1f dc 20 22 23 44 65 73  |maxd%..... "#Des|
000034d0  63 72 69 70 74 69 6f 6e  3a 2c 24 72 66 6c 25 28  |cription:,$rfl%(|
000034e0  31 33 29 22 0d 11 bc 14  6d 5f 72 6d 66 6c 61 67  |13)"....m_rmflag|
000034f0  3d a4 63 72 6d 65 6e 75  0d 11 c6 a3 dc 20 22 23  |=.crmenu..... "#|
00003500  46 6c 61 67 73 2c 37 20  4c 69 67 68 74 2c 36 20  |Flags,7 Light,6 |
00003510  56 69 73 69 74 65 64 2c  35 20 55 73 65 72 20 28  |Visited,5 User (|
00003520  54 72 61 6e 73 29 3e 6d  72 5f 75 73 65 72 35 2c  |Trans)>mr_user5,|
00003530  34 20 55 73 65 72 20 28  4f 70 65 6e 29 3e 6d 72  |4 User (Open)>mr|
00003540  5f 75 73 65 72 34 2c 33  20 55 73 65 72 20 66 6c  |_user4,3 User fl|
00003550  61 67 3e 6d 72 5f 75 73  65 72 33 2c 32 20 55 73  |ag>mr_user3,2 Us|
00003560  65 72 20 66 6c 61 67 3e  6d 72 5f 75 73 65 72 32  |er flag>mr_user2|
00003570  2c 31 20 55 73 65 72 20  66 6c 61 67 3e 6d 72 5f  |,1 User flag>mr_|
00003580  75 73 65 72 31 2c 30 20  55 73 65 72 20 66 6c 61  |user1,0 User fla|
00003590  67 3e 6d 72 5f 75 73 65  72 30 22 0d 11 d0 13 6d  |g>mr_user0"....m|
000035a0  5f 65 78 69 74 66 3d a4  63 72 6d 65 6e 75 0d 11  |_exitf=.crmenu..|
000035b0  da 7c dc 20 22 23 46 6c  61 67 73 2c 37 20 49 6e  |.|. "#Flags,7 In|
000035c0  76 69 73 69 62 6c 65 20  65 78 69 74 2c 36 20 43  |visible exit,6 C|
000035d0  6c 6f 73 65 64 20 64 6f  6f 72 2c 35 20 4f 70 65  |losed door,5 Ope|
000035e0  6e 20 64 6f 6f 72 2c 34  20 4c 6f 63 6b 65 64 20  |n door,4 Locked |
000035f0  64 6f 6f 72 2c 33 20 55  6e 6c 6f 63 6b 65 64 20  |door,3 Unlocked |
00003600  64 6f 6f 72 2c 32 20 42  6c 6f 63 6b 65 64 20 65  |door,2 Blocked e|
00003610  78 69 74 2c 31 20 52 65  73 65 72 76 65 64 2c 30  |xit,1 Reserved,0|
00003620  20 52 65 73 65 72 76 65  64 22 0d 11 e4 04 0d 11  | Reserved"......|
00003630  ee 05 e1 0d 11 f8 04 0d  12 02 3e f4 20 2d 2d 2d  |..........>. ---|
00003640  2d 2d 2d 20 4e 6f 77 20  77 65 20 68 61 76 65 20  |--- Now we have |
00003650  74 68 65 20 50 72 6f 63  65 64 75 72 65 73 20 61  |the Procedures a|
00003660  6e 64 20 46 75 6e 63 74  69 6f 6e 73 21 21 20 2d  |nd Functions!! -|
00003670  2d 2d 2d 2d 2d 0d 12 0c  04 0d 12 16 12 dd 20 f2  |-----......... .|
00003680  67 65 74 6d 6f 64 65 69  6e 66 6f 0d 12 20 18 ea  |getmodeinfo.. ..|
00003690  20 78 2c 79 2c 78 65 69  67 2c 79 65 69 67 2c 63  | x,y,xeig,yeig,c|
000036a0  6f 6c 73 0d 12 2a 0a 6d  6f 64 65 3d eb 0d 12 34  |ols..*.mode=...4|
000036b0  04 0d 12 3e 31 c8 99 20  22 4f 53 5f 52 65 61 64  |...>1.. "OS_Read|
000036c0  4d 6f 64 65 56 61 72 69  61 62 6c 65 22 2c 6d 6f  |ModeVariable",mo|
000036d0  64 65 2c 31 20 b8 20 2c  2c 74 65 78 74 63 6f 6c  |de,1 . ,,textcol|
000036e0  73 25 0d 12 48 31 c8 99  20 22 4f 53 5f 52 65 61  |s%..H1.. "OS_Rea|
000036f0  64 4d 6f 64 65 56 61 72  69 61 62 6c 65 22 2c 6d  |dModeVariable",m|
00003700  6f 64 65 2c 32 20 b8 20  2c 2c 74 65 78 74 72 6f  |ode,2 . ,,textro|
00003710  77 73 25 0d 12 52 1d 74  65 78 74 5f 6d 61 78 6c  |ws%..R.text_maxl|
00003720  6c 65 6e 25 3d 74 65 78  74 63 6f 6c 73 25 2d 32  |len%=textcols%-2|
00003730  0d 12 5c 2c c8 99 20 22  4f 53 5f 52 65 61 64 4d  |..\,.. "OS_ReadM|
00003740  6f 64 65 56 61 72 69 61  62 6c 65 22 2c 6d 6f 64  |odeVariable",mod|
00003750  65 2c 33 20 b8 20 2c 2c  63 6f 6c 73 0d 12 66 2c  |e,3 . ,,cols..f,|
00003760  c8 99 20 22 4f 53 5f 52  65 61 64 4d 6f 64 65 56  |.. "OS_ReadModeV|
00003770  61 72 69 61 62 6c 65 22  2c 6d 6f 64 65 2c 34 20  |ariable",mode,4 |
00003780  b8 20 2c 2c 78 65 69 67  0d 12 70 2c c8 99 20 22  |. ,,xeig..p,.. "|
00003790  4f 53 5f 52 65 61 64 4d  6f 64 65 56 61 72 69 61  |OS_ReadModeVaria|
000037a0  62 6c 65 22 2c 6d 6f 64  65 2c 35 20 b8 20 2c 2c  |ble",mode,5 . ,,|
000037b0  79 65 69 67 0d 12 7a 30  c8 99 20 22 4f 53 5f 52  |yeig..z0.. "OS_R|
000037c0  65 61 64 4d 6f 64 65 56  61 72 69 61 62 6c 65 22  |eadModeVariable"|
000037d0  2c 6d 6f 64 65 2c 37 20  b8 20 2c 2c 73 63 72 6e  |,mode,7 . ,,scrn|
000037e0  73 69 7a 65 0d 12 84 2a  c8 99 20 22 4f 53 5f 52  |size...*.. "OS_R|
000037f0  65 61 64 4d 6f 64 65 56  61 72 69 61 62 6c 65 22  |eadModeVariable"|
00003800  2c 6d 6f 64 65 2c 31 31  20 b8 20 2c 2c 78 0d 12  |,mode,11 . ,,x..|
00003810  8e 2a c8 99 20 22 4f 53  5f 52 65 61 64 4d 6f 64  |.*.. "OS_ReadMod|
00003820  65 56 61 72 69 61 62 6c  65 22 2c 6d 6f 64 65 2c  |eVariable",mode,|
00003830  31 32 20 b8 20 2c 2c 79  0d 12 98 2d 73 63 72 77  |12 . ,,y...-scrw|
00003840  3d 28 28 78 2b 31 29 3c  3c 78 65 69 67 29 2d 31  |=((x+1)<<xeig)-1|
00003850  3a 73 63 72 68 3d 28 28  79 2b 31 29 3c 3c 79 65  |:scrh=((y+1)<<ye|
00003860  69 67 29 2d 31 0d 12 a2  05 e1 0d 12 ac 04 0d 12  |ig)-1...........|
00003870  b6 0c dd 20 f2 63 6c 65  61 72 0d 12 c0 24 f2 66  |... .clear...$.f|
00003880  69 6c 6c 28 6f 64 61 74  61 25 2c 28 6d 61 78 6f  |ill(odata%,(maxo|
00003890  62 73 2b 31 29 2a 6f 5f  6c 65 6e 2c 30 29 0d 12  |bs+1)*o_len,0)..|
000038a0  ca 24 f2 66 69 6c 6c 28  72 64 61 74 61 25 2c 28  |.$.fill(rdata%,(|
000038b0  6d 61 78 72 6d 73 2b 31  29 2a 72 5f 6c 65 6e 2c  |maxrms+1)*r_len,|
000038c0  30 29 0d 12 d4 25 f2 66  69 6c 6c 28 70 72 6f 67  |0)...%.fill(prog|
000038d0  72 61 6d 25 2b 34 2c 63  6f 64 65 5f 73 69 7a 65  |ram%+4,code_size|
000038e0  25 2d 32 30 2c 30 29 0d  12 de 27 f4 20 50 52 4f  |%-20,0)...'. PRO|
000038f0  43 66 69 6c 6c 28 69 6e  69 74 73 61 76 65 2c 69  |Cfill(initsave,i|
00003900  6e 69 74 61 72 65 61 73  69 7a 65 2c 30 29 0d 12  |nitareasize,0)..|
00003910  e8 05 e1 0d 12 f2 04 0d  12 fc 04 0d 13 06 14 dd  |................|
00003920  20 f2 72 65 74 75 72 6e  28 78 25 2c 79 25 29 0d  | .return(x%,y%).|
00003930  13 10 18 f2 63 6f 6c 28  31 32 38 2b 31 32 29 3a  |....col(128+12):|
00003940  f2 63 6f 6c 28 37 29 0d  13 1a 3e f2 63 65 6e 74  |.col(7)...>.cent|
00003950  72 65 28 22 20 48 69 74  20 61 6e 79 20 6b 65 79  |re(" Hit any key|
00003960  2f 62 75 74 74 6f 6e 20  74 6f 20 72 65 74 75 72  |/button to retur|
00003970  6e 20 74 6f 20 74 68 65  20 65 64 69 74 6f 72 20  |n to the editor |
00003980  22 2c 79 25 29 0d 13 24  05 f5 0d 13 2e 0f c8 97  |",y%)..$........|
00003990  20 58 25 2c 59 25 2c 42  25 0d 13 38 0a fd 20 42  | X%,Y%,B%..8.. B|
000039a0  25 3d 30 0d 13 42 04 0d  13 4c 05 f5 0d 13 56 0c  |%=0..B...L....V.|
000039b0  61 6e 79 3d a6 28 30 29  0d 13 60 0f c8 97 20 58  |any=.(0)..`... X|
000039c0  25 2c 59 25 2c 42 25 0d  13 6a 12 fd 20 61 6e 79  |%,Y%,B%..j.. any|
000039d0  3e 30 20 84 20 42 25 3e  30 0d 13 74 05 e1 0d 13  |>0 . B%>0..t....|
000039e0  7e 04 0d 13 88 13 dd 20  f2 63 65 6e 74 72 65 28  |~...... .centre(|
000039f0  74 24 2c 72 29 0d 13 92  23 f1 8a 28 74 65 78 74  |t$,r)...#..(text|
00003a00  63 6f 6c 73 25 2d a9 20  74 24 2b 31 29 20 81 20  |cols%-. t$+1) . |
00003a10  32 2c 72 29 3b 74 24 3b  0d 13 9c 05 e1 0d 13 a6  |2,r);t$;........|
00003a20  04 0d 13 b0 34 f4 20 2d  2d 2d 2d 2d 2d 20 47 65  |....4. ------ Ge|
00003a30  6e 65 72 61 6c 20 77 69  6e 64 6f 77 20 68 61 6e  |neral window han|
00003a40  64 6c 69 6e 67 20 72 6f  75 74 69 6e 65 73 20 2d  |dling routines -|
00003a50  2d 2d 2d 2d 2d 0d 13 ba  04 0d 13 c4 17 dd 20 f2  |-----......... .|
00003a60  64 65 6c 65 74 65 77 69  6e 64 6f 77 28 49 25 29  |deletewindow(I%)|
00003a70  0d 13 ce 13 21 71 25 3d  68 61 6e 64 6c 65 25 28  |....!q%=handle%(|
00003a80  49 25 29 0d 13 d8 26 68  61 6e 64 6c 65 25 28 49  |I%)...&handle%(I|
00003a90  25 29 3d 68 61 6e 64 6c  65 53 50 25 3a 68 61 6e  |%)=handleSP%:han|
00003aa0  64 6c 65 53 50 25 3d 49  25 0d 13 e2 12 c8 99 20  |dleSP%=I%...... |
00003ab0  44 65 6c 65 74 65 57 2c  2c 71 25 0d 13 ec 12 77  |DeleteW,,q%....w|
00003ac0  69 64 65 6e 74 24 28 49  25 29 3d 22 22 0d 13 f6  |ident$(I%)=""...|
00003ad0  05 e1 0d 14 00 04 0d 14  0a 1c dd 20 f2 6c 6f 61  |........... .loa|
00003ae0  64 74 65 6d 70 6c 61 74  65 73 28 74 66 69 6c 65  |dtemplates(tfile|
00003af0  24 29 0d 14 14 0a 74 6d  70 25 3d 30 0d 14 1e 22  |$)....tmp%=0..."|
00003b00  c8 99 20 22 57 69 6d 70  5f 4f 70 65 6e 54 65 6d  |.. "Wimp_OpenTem|
00003b10  70 6c 61 74 65 22 2c 2c  74 66 69 6c 65 24 0d 14  |plate",,tfile$..|
00003b20  28 11 74 66 5f 69 6e 64  65 78 25 3d 30 3a f5 0d  |(.tf_index%=0:..|
00003b30  14 32 13 24 6d 62 5f 77  69 64 65 6e 74 25 3d 22  |.2.$mb_wident%="|
00003b40  2a 22 0d 14 3c 74 c8 99  20 22 57 69 6d 70 5f 4c  |*"..<t.. "Wimp_L|
00003b50  6f 61 64 54 65 6d 70 6c  61 74 65 22 2c 2c 71 25  |oadTemplate",,q%|
00003b60  2b 34 2c 63 75 72 62 75  66 66 25 2c 62 75 66 66  |+4,curbuff%,buff|
00003b70  65 72 25 2b 6d 61 78 62  75 66 25 2c 66 6f 6e 74  |er%+maxbuf%,font|
00003b80  63 6f 75 6e 74 73 25 2c  6d 62 5f 77 69 64 65 6e  |counts%,mb_widen|
00003b90  74 25 2c 74 66 5f 69 6e  64 65 78 25 20 b8 20 2c  |t%,tf_index% . ,|
00003ba0  2c 63 75 72 62 75 66 66  25 2c 2c 2c 2c 74 66 5f  |,curbuff%,,,,tf_|
00003bb0  69 6e 64 65 78 25 0d 14  46 2b e7 20 74 66 5f 69  |index%..F+. tf_i|
00003bc0  6e 64 65 78 25 3c 3e 30  20 8c 20 f2 6c 6f 61 64  |ndex%<>0 . .load|
00003bd0  74 65 6d 70 28 24 6d 62  5f 77 69 64 65 6e 74 25  |temp($mb_wident%|
00003be0  29 0d 14 50 11 fd 20 74  66 5f 69 6e 64 65 78 25  |)..P.. tf_index%|
00003bf0  3d 30 0d 14 5a 1b c8 99  20 22 57 69 6d 70 5f 43  |=0..Z... "Wimp_C|
00003c00  6c 6f 73 65 54 65 6d 70  6c 61 74 65 22 0d 14 64  |loseTemplate"..d|
00003c10  05 e1 0d 14 6e 04 0d 14  78 18 dd 20 f2 6c 6f 61  |....n...x.. .loa|
00003c20  64 74 65 6d 70 28 77 69  64 65 6e 74 24 29 0d 14  |dtemp(wident$)..|
00003c30  82 38 49 25 3d a4 6d 61  74 63 68 69 64 65 6e 74  |.8I%=.matchident|
00003c40  28 77 69 64 65 6e 74 24  29 3a e7 20 49 25 3c 3e  |(wident$):. I%<>|
00003c50  2d 31 20 8c 20 f2 64 65  6c 65 74 65 77 69 6e 64  |-1 . .deletewind|
00003c60  6f 77 28 49 25 29 0d 14  8c 2d 71 25 21 36 38 3d  |ow(I%)...-q%!68=|
00003c70  73 70 72 69 74 65 61 72  65 61 25 20 20 20 20 3a  |spritearea%    :|
00003c80  20 f4 20 75 73 65 72 20  73 70 72 69 74 65 20 61  | . user sprite a|
00003c90  72 65 61 0d 14 96 1b f2  63 72 77 69 6e 64 6f 77  |rea.....crwindow|
00003ca0  28 71 25 2b 34 2c 77 69  64 65 6e 74 24 29 0d 14  |(q%+4,wident$)..|
00003cb0  a0 05 e1 0d 14 aa 04 0d  14 b4 14 dd 20 f2 68 69  |............ .hi|
00003cc0  67 68 6c 69 67 68 74 28  49 25 29 0d 14 be 05 e1  |ghlight(I%).....|
00003cd0  0d 14 c8 2d c8 99 20 53  65 74 43 61 72 65 74 2c  |...-.. SetCaret,|
00003ce0  68 61 6e 64 6c 65 25 28  49 25 29 2c 2d 31 2c 30  |handle%(I%),-1,0|
00003cf0  2c 30 2c 26 32 30 30 30  30 30 30 2c 30 0d 14 d2  |,0,&2000000,0...|
00003d00  05 e1 0d 14 dc 04 0d 14  e6 2b dd 20 f2 72 65 74  |.........+. .ret|
00003d10  69 74 6c 65 28 68 61 6e  64 6c 65 25 2c 6e 65 77  |itle(handle%,new|
00003d20  74 69 74 6c 65 24 2c f8  20 68 61 6e 64 6c 65 25  |title$,. handle%|
00003d30  29 0d 14 f0 17 69 6e 64  65 78 25 3d 77 69 6e 64  |)....index%=wind|
00003d40  6f 77 69 6e 64 65 78 25  0d 14 fa 05 f5 0d 15 04  |owindex%........|
00003d50  31 20 20 69 6e 64 65 78  25 2d 3d 31 3a 20 e7 69  |1  index%-=1: .i|
00003d60  6e 64 65 78 25 3c 30 20  85 20 32 35 35 2c 22 49  |ndex%<0 . 255,"I|
00003d70  6e 76 61 6c 69 64 20 77  69 6e 64 6f 77 22 0d 15  |nvalid window"..|
00003d80  0e 1d fd 20 68 61 6e 64  6c 65 25 28 69 6e 64 65  |... handle%(inde|
00003d90  78 25 29 3d 68 61 6e 64  6c 65 25 0d 15 18 0f 21  |x%)=handle%....!|
00003da0  71 25 3d 68 61 6e 64 6c  65 25 0d 15 22 10 c8 99  |q%=handle%.."...|
00003db0  20 47 65 74 57 49 2c 2c  71 25 0d 15 2c 12 c8 99  | GetWI,,q%..,...|
00003dc0  20 44 65 6c 65 74 65 57  2c 2c 71 25 0d 15 36 1b  | DeleteW,,q%..6.|
00003dd0  24 28 71 25 2b 37 36 29  3d c0 6e 65 77 74 69 74  |$(q%+76)=.newtit|
00003de0  6c 65 24 2c 31 31 29 0d  15 40 1e c8 99 20 43 72  |le$,11)..@... Cr|
00003df0  65 61 74 65 57 2c 2c 71  25 2b 34 20 b8 20 68 61  |eateW,,q%+4 . ha|
00003e00  6e 64 6c 65 25 0d 15 4a  1b 68 61 6e 64 6c 65 25  |ndle%..J.handle%|
00003e10  28 69 6e 64 65 78 25 29  3d 68 61 6e 64 6c 65 25  |(index%)=handle%|
00003e20  0d 15 54 05 e1 0d 15 5e  04 0d 15 68 1b dd 20 f2  |..T....^...h.. .|
00003e30  63 72 77 69 6e 64 6f 77  28 71 25 2c 77 69 64 65  |crwindow(q%,wide|
00003e40  6e 74 24 29 0d 15 72 1c  c8 99 20 43 72 65 61 74  |nt$)..r... Creat|
00003e50  65 57 2c 2c 71 25 20 b8  20 68 61 6e 64 6c 65 25  |eW,,q% . handle%|
00003e60  0d 15 7c 41 6d 25 3d 68  61 6e 64 6c 65 53 50 25  |..|Am%=handleSP%|
00003e70  3a 68 61 6e 64 6c 65 53  50 25 3d 68 61 6e 64 6c  |:handleSP%=handl|
00003e80  65 25 28 68 61 6e 64 6c  65 53 50 25 29 3a 68 61  |e%(handleSP%):ha|
00003e90  6e 64 6c 65 25 28 6d 25  29 3d 68 61 6e 64 6c 65  |ndle%(m%)=handle|
00003ea0  25 0d 15 86 0f 21 71 25  3d 68 61 6e 64 6c 65 25  |%....!q%=handle%|
00003eb0  0d 15 90 0f c8 99 20 47  65 74 57 2c 2c 71 25 0d  |...... GetW,,q%.|
00003ec0  15 9a 29 63 75 72 72 65  6e 74 77 69 6e 64 6f 77  |..)currentwindow|
00003ed0  25 3d 6d 25 3a 77 69 64  65 6e 74 24 28 6d 25 29  |%=m%:wident$(m%)|
00003ee0  3d 77 69 64 65 6e 74 24  0d 15 a4 13 63 75 72 72  |=wident$....curr|
00003ef0  65 6e 74 69 63 6f 6e 25  3d 2d 31 0d 15 ae 12 f2  |enticon%=-1.....|
00003f00  68 69 67 68 6c 69 67 68  74 28 6d 25 29 0d 15 b8  |highlight(m%)...|
00003f10  05 e1 0d 15 c2 04 0d 15  cc 12 dd 20 f2 63 6c 6f  |........... .clo|
00003f20  73 65 28 77 69 6e 64 29  0d 15 d6 0c 69 25 3d 6e  |se(wind)....i%=n|
00003f30  69 25 2b 31 0d 15 e0 0d  c8 8e 20 77 69 6e 64 20  |i%+1...... wind |
00003f40  ca 0d 15 ea 3f 20 c9 20  6f 62 6a 68 61 6e 64 6c  |....? . objhandl|
00003f50  65 3a 69 25 3d 54 48 45  6b 65 79 69 63 6f 6e 3a  |e:i%=THEkeyicon:|
00003f60  e7 20 69 63 6f 6e 25 28  69 25 29 3c 3e 2d 31 20  |. icon%(i%)<>-1 |
00003f70  f2 73 74 6f 72 65 5f 6f  62 6a 28 6f 70 74 72 29  |.store_obj(optr)|
00003f80  0d 15 f4 43 20 c9 20 72  6f 6f 6d 68 61 6e 64 6c  |...C . roomhandl|
00003f90  65 3a 20 69 25 3d 54 48  45 64 6f 6f 72 69 63 6f  |e: i%=THEdoorico|
00003fa0  6e 3a e7 20 69 63 6f 6e  25 28 69 25 29 3c 3e 2d  |n:. icon%(i%)<>-|
00003fb0  31 20 f2 73 74 6f 72 65  5f 72 6f 6f 6d 28 72 70  |1 .store_room(rp|
00003fc0  74 72 29 0d 15 fe 11 20  c9 20 74 65 78 74 68 61  |tr).... . textha|
00003fd0  6e 64 6c 65 0d 16 08 12  20 20 20 69 25 3d 74 65  |ndle....   i%=te|
00003fe0  78 74 69 63 6f 6e 0d 16  12 16 20 20 20 f2 72 65  |xticon....   .re|
00003ff0  6d 6f 76 65 5f 6d 61 72  6b 65 72 73 0d 16 1c 17  |move_markers....|
00004000  20 20 20 c8 8e 20 74 65  78 74 5f 6f 77 6e 65 72  |   .. text_owner|
00004010  24 20 ca 0d 16 26 20 20  20 20 20 20 c9 20 22 74  |$ ...&      . "t|
00004020  65 78 74 65 64 22 20 3a  20 f2 73 74 6f 72 65 5f  |exted" : .store_|
00004030  6d 73 67 0d 16 30 30 20  20 20 20 20 c9 20 22 70  |msg..00     . "p|
00004040  72 6f 67 72 61 6d 22 20  3a 20 e7 20 ac 20 74 65  |rogram" : . . te|
00004050  78 74 5f 6f 6b 20 8c 20  f2 73 74 6f 72 65 5f 70  |xt_ok . .store_p|
00004060  72 6f 67 0d 16 3a 2f 20  20 20 20 20 c9 20 22 76  |rog..:/     . "v|
00004070  6f 63 61 62 22 20 3a 20  e7 20 ac 20 74 65 78 74  |ocab" : . . text|
00004080  5f 6f 6b 20 8c 20 f2 73  74 6f 72 65 5f 76 6f 63  |_ok . .store_voc|
00004090  61 62 0d 16 44 1d 20 20  20 20 20 c9 20 22 70 69  |ab..D.     . "pi|
000040a0  78 22 20 3a 20 f2 73 74  6f 72 65 5f 70 69 78 0d  |x" : .store_pix.|
000040b0  16 4e 08 20 20 20 cb 0d  16 58 14 20 20 20 e7 20  |.N.   ...X.   . |
000040c0  ac 20 65 72 72 66 6c 61  67 20 8c 0d 16 62 34 20  |. errflag ...b4 |
000040d0  20 20 20 20 74 65 78 74  5f 6f 77 6e 65 72 24 3d  |    text_owner$=|
000040e0  22 22 3a f4 20 72 65 6c  65 61 73 65 20 54 65 78  |"":. release Tex|
000040f0  74 20 45 64 69 74 6f 72  20 77 69 6e 64 6f 77 0d  |t Editor window.|
00004100  16 6c 35 20 20 20 20 20  f2 66 69 6c 6c 28 74 65  |.l5     .fill(te|
00004110  78 74 5f 62 6c 6f 63 6b  25 2c 74 65 78 74 5f 62  |xt_block%,text_b|
00004120  6c 6f 63 6b 73 69 7a 65  25 2c 64 75 6d 6d 79 5f  |locksize%,dummy_|
00004130  73 70 63 29 0d 16 76 08  20 20 20 cd 0d 16 80 1d  |spc)..v.   .....|
00004140  20 c9 20 64 65 73 69 67  6e 3a 20 69 25 3d 54 48  | . design: i%=TH|
00004150  45 63 68 61 72 69 63 6f  6e 0d 16 8a 05 cb 0d 16  |Echaricon.......|
00004160  94 d6 e7 20 28 74 65 78  74 5f 6f 77 6e 65 72 24  |... (text_owner$|
00004170  3d 22 70 72 6f 67 72 61  6d 22 20 80 20 65 72 72  |="program" . err|
00004180  66 6c 61 67 20 80 20 77  69 6e 64 3d 74 65 78 74  |flag . wind=text|
00004190  68 61 6e 64 6c 65 29 20  84 20 28 74 65 78 74 5f  |handle) . (text_|
000041a0  6f 77 6e 65 72 24 3d 22  76 6f 63 61 62 22 20 80  |owner$="vocab" .|
000041b0  20 65 72 72 66 6c 61 67  20 80 20 77 69 6e 64 3d  | errflag . wind=|
000041c0  74 65 78 74 68 61 6e 64  6c 65 29 20 84 20 28 74  |texthandle) . (t|
000041d0  65 78 74 5f 6f 77 6e 65  72 24 3d 22 70 69 78 22  |ext_owner$="pix"|
000041e0  20 80 20 65 72 72 66 6c  61 67 20 80 20 77 69 6e  | . errflag . win|
000041f0  64 3d 74 65 78 74 68 61  6e 64 6c 65 29 20 84 20  |d=texthandle) . |
00004200  28 74 65 78 74 5f 6f 77  6e 65 72 24 3d 22 74 65  |(text_owner$="te|
00004210  78 74 65 64 22 20 80 20  65 72 72 66 6c 61 67 20  |xted" . errflag |
00004220  80 20 77 69 6e 64 3d 74  65 78 74 68 61 6e 64 6c  |. wind=texthandl|
00004230  65 29 20 8c 0d 16 9e 05  cc 0d 16 a8 12 20 20 69  |e) ..........  i|
00004240  63 6f 6e 25 28 69 25 29  3d 2d 31 0d 16 b2 11 20  |con%(i%)=-1.... |
00004250  20 21 62 6c 6f 63 6b 3d  77 69 6e 64 0d 16 bc 16  | !block=wind....|
00004260  20 20 c8 99 20 43 6c 6f  73 65 57 2c 2c 62 6c 6f  |  .. CloseW,,blo|
00004270  63 6b 0d 16 c6 05 cd 0d  16 d0 05 e1 0d 16 da 04  |ck..............|
00004280  0d 16 e4 1b dd 20 f2 6f  70 65 6e 28 68 61 6e 64  |..... .open(hand|
00004290  6c 65 2c 78 2c 79 2c 77  2c 64 29 0d 16 ee 11 21  |le,x,y,w,d)....!|
000042a0  62 6c 6f 63 6b 3d 68 61  6e 64 6c 65 0d 16 f8 19  |block=handle....|
000042b0  62 6c 6f 63 6b 21 34 3d  78 3a 62 6c 6f 63 6b 21  |block!4=x:block!|
000042c0  38 3d 79 2d 64 0d 17 02  1b 62 6c 6f 63 6b 21 31  |8=y-d....block!1|
000042d0  32 3d 78 2b 77 3a 62 6c  6f 63 6b 21 31 36 3d 79  |2=x+w:block!16=y|
000042e0  0d 17 0c 19 62 6c 6f 63  6b 21 32 30 3d 30 3a 62  |....block!20=0:b|
000042f0  6c 6f 63 6b 21 32 34 3d  30 0d 17 16 0f 62 6c 6f  |lock!24=0....blo|
00004300  63 6b 21 32 38 3d 2d 31  0d 17 20 13 c8 99 20 4f  |ck!28=-1.. ... O|
00004310  70 65 6e 57 2c 2c 62 6c  6f 63 6b 0d 17 2a 05 e1  |penW,,block..*..|
00004320  0d 17 34 04 0d 17 3e 15  dd 20 f2 72 65 64 72 61  |..4...>.. .redra|
00004330  77 28 68 61 6e 64 6c 65  29 0d 17 48 12 62 6c 6f  |w(handle)..H.blo|
00004340  63 6b 21 30 3d 68 61 6e  64 6c 65 0d 17 52 1e c8  |ck!0=handle..R..|
00004350  99 20 52 65 64 72 61 77  57 2c 30 2c 62 6c 6f 63  |. RedrawW,0,bloc|
00004360  6b 20 b8 20 6d 6f 72 65  25 0d 17 5c 12 f2 69 6e  |k . more%..\..in|
00004370  66 6f 28 62 6c 6f 63 6b  2b 34 29 0d 17 66 2f e7  |fo(block+4)..f/.|
00004380  20 68 61 6e 64 6c 65 3d  74 65 78 74 68 61 6e 64  | handle=texthand|
00004390  6c 65 20 8c 20 64 75 6d  6d 79 3d a4 72 65 64 72  |le . dummy=.redr|
000043a0  61 77 5f 74 65 78 74 28  b9 29 0d 17 70 05 e1 0d  |aw_text(.)..p...|
000043b0  17 7a 04 0d 17 84 15 dd  20 f2 66 6f 72 63 65 52  |.z...... .forceR|
000043c0  28 68 61 6e 64 6c 65 29  0d 17 8e 2f f4 20 46 6f  |(handle).../. Fo|
000043d0  72 63 65 20 74 68 65 20  67 69 76 65 6e 20 77 69  |rce the given wi|
000043e0  6e 64 6f 77 20 4f 4e 4c  59 20 74 6f 20 62 65 20  |ndow ONLY to be |
000043f0  72 65 64 72 61 77 6e 0d  17 98 11 f2 67 65 74 77  |redrawn.....getw|
00004400  28 68 61 6e 64 6c 65 29  0d 17 a2 3c c8 99 20 46  |(handle)...<.. F|
00004410  6f 72 63 65 52 2c 68 61  6e 64 6c 65 2c 73 63 78  |orceR,handle,scx|
00004420  25 2c 73 63 79 25 2d 28  79 31 25 2d 79 30 25 29  |%,scy%-(y1%-y0%)|
00004430  2c 73 63 78 25 2b 28 78  31 25 2d 78 30 25 29 2c  |,scx%+(x1%-x0%),|
00004440  73 63 79 25 0d 17 ac 05  e1 0d 17 b6 04 0d 17 c0  |scy%............|
00004450  15 dd 20 a4 6d 61 74 63  68 69 64 65 6e 74 28 41  |.. .matchident(A|
00004460  24 29 0d 17 ca 11 e7 20  41 24 3d 22 22 20 8c 20  |$)..... A$="" . |
00004470  3d 2d 31 0d 17 d4 08 ea  20 49 25 0d 17 de 2a 49  |=-1..... I%...*I|
00004480  25 3d 6e 68 25 2b 31 3a  f5 49 25 3d 49 25 2d 31  |%=nh%+1:.I%=I%-1|
00004490  3a fd 41 24 3d 77 69 64  65 6e 74 24 28 49 25 29  |:.A$=wident$(I%)|
000044a0  84 49 25 3d 30 0d 17 e8  1b e7 41 24 3d 77 69 64  |.I%=0.....A$=wid|
000044b0  65 6e 74 24 28 49 25 29  8c 3d 49 25 8b 3d 2d 31  |ent$(I%).=I%.=-1|
000044c0  0d 17 f2 04 0d 17 fc 14  dd 20 f2 67 65 74 77 28  |......... .getw(|
000044d0  68 61 6e 64 6c 65 25 29  0d 18 06 19 e7 20 68 61  |handle%)..... ha|
000044e0  6e 64 6c 65 25 3d 69 63  6f 6e 62 61 72 25 20 20  |ndle%=iconbar%  |
000044f0  e1 0d 18 10 21 21 62 6c  6f 63 6b 3d 68 61 6e 64  |....!!block=hand|
00004500  6c 65 25 3a c8 99 47 65  74 57 2c 30 2c 62 6c 6f  |le%:..GetW,0,blo|
00004510  63 6b 0d 18 1a 34 f2 69  6e 66 6f 28 62 6c 6f 63  |ck...4.info(bloc|
00004520  6b 2b 34 29 3a 62 68 61  6e 64 6c 65 25 3d 62 6c  |k+4):bhandle%=bl|
00004530  6f 63 6b 21 32 38 3a 66  6c 61 67 73 25 3d 62 6c  |ock!28:flags%=bl|
00004540  6f 63 6b 21 33 32 0d 18  24 19 6f 6e 74 6f 70 3d  |ock!32..$.ontop=|
00004550  66 6c 61 67 73 25 20 80  20 26 32 30 30 30 30 0d  |flags% . &20000.|
00004560  18 2e 05 e1 0d 18 38 04  0d 18 42 0e dd 20 f2 69  |......8...B.. .i|
00004570  6e 66 6f 28 62 29 0d 18  4c 37 78 30 25 3d 21 62  |nfo(b)..L7x0%=!b|
00004580  3a 79 30 25 3d 62 21 34  3a 78 31 25 3d 62 21 38  |:y0%=b!4:x1%=b!8|
00004590  3a 79 31 25 3d 62 21 31  32 3a 73 63 78 25 3d 62  |:y1%=b!12:scx%=b|
000045a0  21 31 36 3a 73 63 79 25  3d 62 21 32 30 0d 18 56  |!16:scy%=b!20..V|
000045b0  1d 62 78 25 3d 78 30 25  2d 73 63 78 25 3a 62 79  |.bx%=x0%-scx%:by|
000045c0  25 3d 79 31 25 2d 73 63  79 25 0d 18 60 2f 67 77  |%=y1%-scy%..`/gw|
000045d0  78 6c 25 3d 62 21 32 34  3a 67 77 79 62 25 3d 62  |xl%=b!24:gwyb%=b|
000045e0  21 32 38 3a 67 77 78 72  25 3d 62 21 33 32 3a 67  |!28:gwxr%=b!32:g|
000045f0  77 79 74 25 3d 62 21 33  36 0d 18 6a 05 e1 0d 18  |wyt%=b!36..j....|
00004600  74 04 0d 18 7e 11 dd 20  f2 67 65 74 70 6f 69 6e  |t...~.. .getpoin|
00004610  74 65 72 0d 18 88 12 c8  99 47 65 74 50 2c 30 2c  |ter......GetP,0,|
00004620  62 6c 6f 63 6b 0d 18 92  5a 6d 6f 75 73 65 78 25  |block...Zmousex%|
00004630  3d 21 62 6c 6f 63 6b 3a  6d 6f 75 73 65 79 25 3d  |=!block:mousey%=|
00004640  62 6c 6f 63 6b 21 34 3a  62 25 3d 62 6c 6f 63 6b  |block!4:b%=block|
00004650  21 38 3a 68 61 6e 64 6c  65 25 3d 62 6c 6f 63 6b  |!8:handle%=block|
00004660  21 31 32 3a 69 63 6f 6e  25 3d 62 6c 6f 63 6b 21  |!12:icon%=block!|
00004670  31 36 3a 6f 62 25 3d 62  6c 6f 63 6b 21 32 30 0d  |16:ob%=block!20.|
00004680  18 9c 05 e1 0d 18 a6 04  0d 18 b0 46 dd 20 f2 73  |...........F. .s|
00004690  79 73 5f 63 6c 61 69 6d  69 6e 70 75 74 66 6f 63  |ys_claiminputfoc|
000046a0  75 73 28 77 69 6e 64 6f  77 25 2c 69 63 6f 6e 25  |us(window%,icon%|
000046b0  2c 78 6f 66 73 74 25 2c  79 6f 66 73 74 25 2c 68  |,xofst%,yofst%,h|
000046c0  65 69 67 68 74 25 2c 69  6e 64 65 78 25 29 0d 18  |eight%,index%)..|
000046d0  ba 3a c8 99 53 65 74 43  61 72 65 74 2c 20 77 69  |.:..SetCaret, wi|
000046e0  6e 64 6f 77 25 2c 69 63  6f 6e 25 2c 78 6f 66 73  |ndow%,icon%,xofs|
000046f0  74 25 2c 79 6f 66 73 74  25 2c 68 65 69 67 68 74  |t%,yofst%,height|
00004700  25 2c 69 6e 64 65 78 25  0d 18 c4 05 e1 0d 18 ce  |%,index%........|
00004710  04 0d 18 d8 52 dd 20 f2  73 79 73 5f 67 65 74 63  |....R. .sys_getc|
00004720  61 72 65 74 70 6f 73 69  74 69 6f 6e 28 f8 20 77  |aretposition(. w|
00004730  69 6e 64 6f 77 25 2c f8  20 69 63 6f 6e 25 2c f8  |indow%,. icon%,.|
00004740  20 78 6f 66 73 74 25 2c  f8 20 79 6f 66 73 74 25  | xofst%,. yofst%|
00004750  2c f8 20 68 65 69 67 68  74 25 2c f8 20 69 6e 64  |,. height%,. ind|
00004760  78 25 29 0d 18 e2 12 c8  99 47 65 74 43 61 72 65  |x%)......GetCare|
00004770  74 2c 30 2c 62 0d 18 ec  64 77 69 6e 64 6f 77 25  |t,0,b...dwindow%|
00004780  3d 21 62 6c 6f 63 6b 3a  20 69 63 6f 6e 25 3d 62  |=!block: icon%=b|
00004790  6c 6f 63 6b 21 34 3a 20  78 6f 66 73 74 25 3d 62  |lock!4: xofst%=b|
000047a0  6c 6f 63 6b 21 38 3a 20  79 6f 66 73 74 25 3d 62  |lock!8: yofst%=b|
000047b0  6c 6f 63 6b 21 31 32 3a  20 68 65 69 67 68 74 25  |lock!12: height%|
000047c0  3d 62 6c 6f 63 6b 21 31  36 3a 20 69 6e 64 78 25  |=block!16: indx%|
000047d0  3d 62 6c 6f 63 6b 21 32  30 0d 18 f6 05 e1 0d 19  |=block!20.......|
000047e0  00 04 0d 19 0a 14 dd 20  f2 63 75 72 73 6f 72 28  |....... .cursor(|
000047f0  78 25 2c 79 25 29 0d 19  14 5e f2 73 79 73 5f 63  |x%,y%)...^.sys_c|
00004800  6c 61 69 6d 69 6e 70 75  74 66 6f 63 75 73 28 74  |laiminputfocus(t|
00004810  65 78 74 68 61 6e 64 6c  65 2c 2d 31 2c 28 78 25  |exthandle,-1,(x%|
00004820  2d 31 29 2a 63 68 58 25  2c 2d 79 25 2a 6c 73 59  |-1)*chX%,-y%*lsY|
00004830  25 2d 39 2a 79 70 69 78  65 6c 25 2c 26 31 30 30  |%-9*ypixel%,&100|
00004840  30 30 30 30 20 84 31 30  2a 79 70 69 78 65 6c 25  |0000 .10*ypixel%|
00004850  2c 2d 31 29 0d 19 1e 05  e1 0d 19 28 04 0d 19 32  |,-1).......(...2|
00004860  13 dd 20 f2 74 65 78 74  5f 6d 65 6e 75 62 6f 78  |.. .text_menubox|
00004870  0d 19 3c 14 c8 8e 20 74  65 78 74 5f 6f 77 6e 65  |..<... text_owne|
00004880  72 24 20 ca 0d 19 46 0e  c9 20 22 74 65 78 74 65  |r$ ...F.. "texte|
00004890  64 22 0d 19 50 15 20 20  74 69 63 6b 24 3d 22 6d  |d"..P.  tick$="m|
000048a0  65 73 73 61 67 65 22 0d  19 5a 1a 20 20 6e 75 6c  |essage"..Z.  nul|
000048b0  6c 20 3d 20 a4 74 69 63  6b 5f 6d 65 73 73 61 67  |l = .tick_messag|
000048c0  65 0d 19 64 42 20 20 c8  99 20 43 72 65 61 74 65  |e..dB  .. Create|
000048d0  4d 2c 30 2c 6d 5f 74 65  78 74 25 2c 6d 6f 75 73  |M,0,m_text%,mous|
000048e0  65 78 25 2d 36 34 2c 6d  6f 75 73 65 79 25 3a 63  |ex%-64,mousey%:c|
000048f0  6c 61 69 6d 6d 65 6e 75  24 3d 22 6d 65 73 73 61  |laimmenu$="messa|
00004900  67 65 22 0d 19 6e 1b 20  20 74 68 65 4c 61 73 74  |ge"..n.  theLast|
00004910  4d 65 6e 75 20 3d 20 6d  5f 74 65 78 74 25 0d 19  |Menu = m_text%..|
00004920  78 04 0d 19 82 0f c9 20  22 70 72 6f 67 72 61 6d  |x...... "program|
00004930  22 0d 19 8c 15 20 20 74  69 63 6b 24 3d 22 70 72  |"....  tick$="pr|
00004940  6f 67 72 61 6d 22 0d 19  96 1a 20 20 6e 75 6c 6c  |ogram"....  null|
00004950  20 3d 20 a4 74 69 63 6b  5f 70 72 6f 67 72 61 6d  | = .tick_program|
00004960  0d 19 a0 42 20 20 c8 99  20 43 72 65 61 74 65 4d  |...B  .. CreateM|
00004970  2c 30 2c 6d 5f 70 72 6f  67 25 2c 6d 6f 75 73 65  |,0,m_prog%,mouse|
00004980  78 25 2d 36 34 2c 6d 6f  75 73 65 79 25 3a 63 6c  |x%-64,mousey%:cl|
00004990  61 69 6d 6d 65 6e 75 24  3d 22 70 72 6f 67 72 61  |aimmenu$="progra|
000049a0  6d 22 0d 19 aa 1b 20 20  74 68 65 4c 61 73 74 4d  |m"....  theLastM|
000049b0  65 6e 75 20 3d 20 6d 5f  70 72 6f 67 25 0d 19 b4  |enu = m_prog%...|
000049c0  04 0d 19 be 0d c9 20 22  76 6f 63 61 62 22 0d 19  |...... "vocab"..|
000049d0  c8 13 20 20 74 69 63 6b  24 3d 22 76 6f 63 61 62  |..  tick$="vocab|
000049e0  22 0d 19 d2 18 20 20 6e  75 6c 6c 20 3d 20 a4 74  |"....  null = .t|
000049f0  69 63 6b 5f 76 6f 63 61  62 0d 19 dc 41 20 20 c8  |ick_vocab...A  .|
00004a00  99 20 43 72 65 61 74 65  4d 2c 30 2c 6d 5f 76 6f  |. CreateM,0,m_vo|
00004a10  63 61 62 25 2c 6d 6f 75  73 65 78 25 2d 36 34 2c  |cab%,mousex%-64,|
00004a20  6d 6f 75 73 65 79 25 3a  63 6c 61 69 6d 6d 65 6e  |mousey%:claimmen|
00004a30  75 24 3d 22 76 6f 63 61  62 22 0d 19 e6 1c 20 20  |u$="vocab"....  |
00004a40  74 68 65 4c 61 73 74 4d  65 6e 75 20 3d 20 6d 5f  |theLastMenu = m_|
00004a50  76 6f 63 61 62 25 0d 19  f0 04 0d 19 fa 05 cb 0d  |vocab%..........|
00004a60  1a 04 04 0d 1a 0e 05 e1  0d 1a 18 04 0d 1a 22 3c  |.............."<|
00004a70  dd 20 f2 63 68 65 63 6b  6d 6f 75 73 65 28 6d 6f  |. .checkmouse(mo|
00004a80  75 73 65 78 25 2c 6d 6f  75 73 65 79 25 2c 62 75  |usex%,mousey%,bu|
00004a90  74 74 6f 6e 25 2c 68 61  6e 64 6c 65 25 2c 69 63  |tton%,handle%,ic|
00004aa0  6f 6e 25 2c 6f 62 25 29  0d 1a 2c 13 e7 68 61 6e  |on%,ob%)..,..han|
00004ab0  64 6c 65 25 3d 2d 31 20  8c 20 e1 0d 1a 36 12 f2  |dle%=-1 . ...6..|
00004ac0  67 65 74 77 28 68 61 6e  64 6c 65 25 29 0d 1a 40  |getw(handle%)..@|
00004ad0  17 e7 68 61 6e 64 6c 65  25 3d 41 4c 50 53 6d 61  |..handle%=ALPSma|
00004ae0  69 6e 20 8c 0d 1a 4a 12  20 20 e7 69 63 6f 6e 25  |in ...J.  .icon%|
00004af0  3c 3e 2d 31 20 8c 0d 1a  54 23 f4 20 20 20 20 69  |<>-1 ...T#.    i|
00004b00  63 6f 6e 25 20 2d 3d 20  66 69 72 73 74 49 63 6f  |con% -= firstIco|
00004b10  6e 42 61 72 49 63 6f 6e  25 0d 1a 5e 0d 20 20 20  |nBarIcon%..^.   |
00004b20  20 c8 8e b9 20 ca 0d 1a  68 30 20 20 20 20 20 20  | ... ...h0      |
00004b30  c9 28 62 75 74 74 6f 6e  25 80 31 29 3d 31 20 3a  |.(button%.1)=1 :|
00004b40  20 f4 20 61 64 6a 75 73  74 20 64 6f 65 73 20 6e  | . adjust does n|
00004b50  6f 74 68 69 6e 67 0d 1a  72 3c 20 20 20 20 20 20  |othing..r<      |
00004b60  c9 28 62 75 74 74 6f 6e  25 80 32 29 3d 32 20 3a  |.(button%.2)=2 :|
00004b70  20 76 6f 69 64 3d a0 28  22 46 4e 6d 65 6e 75 5f  | void=.("FNmenu_|
00004b80  22 2b 69 63 6f 6e 62 61  72 24 28 69 63 6f 6e 25  |"+iconbar$(icon%|
00004b90  29 29 0d 1a 7c 29 20 20  20 20 20 20 c9 28 62 75  |))..|)      .(bu|
00004ba0  74 74 6f 6e 25 80 34 29  3d 34 20 3a 20 f2 6f 70  |tton%.4)=4 : .op|
00004bb0  65 6e 75 70 28 69 63 6f  6e 25 29 0d 1a 86 09 20  |enup(icon%).... |
00004bc0  20 20 20 cb 0d 1a 90 07  20 20 cd 0d 1a 9a 05 cc  |   .....  ......|
00004bd0  0d 1a a4 1a 20 20 e7 20  68 61 6e 64 6c 65 25 3d  |....  . handle%=|
00004be0  69 63 6f 6e 62 61 72 25  20 8c 0d 1a ae 1c 20 20  |iconbar% .....  |
00004bf0  f4 20 54 68 65 20 52 49  53 43 20 4f 53 20 69 63  |. The RISC OS ic|
00004c00  6f 6e 20 62 61 72 0d 1a  b8 0c 20 20 c8 8e 20 b9  |on bar....  .. .|
00004c10  20 ca 0d 1a c2 29 20 20  20 20 c9 20 28 62 75 74  | ....)    . (but|
00004c20  74 6f 6e 25 80 32 29 3d  32 20 3a 20 76 6f 69 64  |ton%.2)=2 : void|
00004c30  3d a4 6d 65 6e 75 5f 6d  69 73 63 0d 1a cc 17 20  |=.menu_misc.... |
00004c40  20 20 20 c9 20 28 62 75  74 74 6f 6e 25 80 34 29  |   . (button%.4)|
00004c50  3d 34 0d 1a d6 43 20 20  20 20 e7 20 69 63 6f 6e  |=4...C    . icon|
00004c60  25 3d 66 69 72 73 74 49  63 6f 6e 42 61 72 49 63  |%=firstIconBarIc|
00004c70  6f 6e 25 20 8c 20 f2 6f  70 65 6e 28 41 4c 50 53  |on% . .open(ALPS|
00004c80  6d 61 69 6e 2c 34 30 30  2c 38 30 30 2c 36 30 30  |main,400,800,600|
00004c90  2c 36 30 30 29 0d 1a e0  07 20 20 cb 0d 1a ea 08  |,600)....  .....|
00004ca0  20 20 20 cc 0d 1a f4 1b  20 20 20 20 69 6e 64 65  |   .....    inde|
00004cb0  78 25 3d 77 69 6e 64 6f  77 69 6e 64 65 78 25 0d  |x%=windowindex%.|
00004cc0  1a fe 0a 20 20 20 20 20  f5 0d 1b 08 35 20 20 20  |...     ....5   |
00004cd0  20 20 20 69 6e 64 65 78  25 2d 3d 31 3a 20 e7 69  |   index%-=1: .i|
00004ce0  6e 64 65 78 25 3c 30 20  85 20 32 35 35 2c 22 49  |ndex%<0 . 255,"I|
00004cf0  6e 76 61 6c 69 64 20 77  69 6e 64 6f 77 22 0d 1b  |nvalid window"..|
00004d00  12 22 20 20 20 20 20 fd  20 68 61 6e 64 6c 65 25  |."     . handle%|
00004d10  28 69 6e 64 65 78 25 29  3d 68 61 6e 64 6c 65 25  |(index%)=handle%|
00004d20  0d 1b 1c 2b 20 20 20 20  76 6f 69 64 3d a0 28 22  |...+    void=.("|
00004d30  46 4e 62 75 74 74 6f 6e  5f 22 2b 77 69 64 65 6e  |FNbutton_"+widen|
00004d40  74 24 28 69 6e 64 65 78  25 29 29 0d 1b 26 07 20  |t$(index%))..&. |
00004d50  20 cd 0d 1b 30 05 cd 0d  1b 3a 05 e1 0d 1b 44 04  | ...0....:....D.|
00004d60  0d 1b 4e 29 dd 20 f2 75  73 65 72 6b 65 79 70 72  |..N). .userkeypr|
00004d70  65 73 73 65 64 28 68 61  6e 64 6c 65 25 2c 69 63  |essed(handle%,ic|
00004d80  6f 6e 25 2c 6b 65 79 25  29 0d 1b 58 12 f2 67 65  |on%,key%)..X..ge|
00004d90  74 77 28 68 61 6e 64 6c  65 25 29 0d 1b 62 0b ea  |tw(handle%)..b..|
00004da0  69 6e 64 65 78 25 0d 1b  6c 17 69 6e 64 65 78 25  |index%..l.index%|
00004db0  3d 77 69 6e 64 6f 77 69  6e 64 65 78 25 0d 1b 76  |=windowindex%..v|
00004dc0  05 f5 0d 1b 80 1c 69 6e  64 65 78 25 2d 3d 31 3a  |......index%-=1:|
00004dd0  20 e7 69 6e 64 65 78 25  3c 30 20 8c 20 e1 0d 1b  | .index%<0 . ...|
00004de0  8a 1c fd 68 61 6e 64 6c  65 25 28 69 6e 64 65 78  |...handle%(index|
00004df0  25 29 3d 68 61 6e 64 6c  65 25 0d 1b 94 29 76 6f  |%)=handle%...)vo|
00004e00  69 64 3d a0 28 22 46 4e  6b 65 79 70 72 65 73 73  |id=.("FNkeypress|
00004e10  5f 22 2b 77 69 64 65 6e  74 24 28 69 6e 64 65 78  |_"+wident$(index|
00004e20  25 29 29 0d 1b 9e 05 e1  0d 1b a8 04 0d 1b b2 20  |%))............ |
00004e30  dd 20 f2 6d 65 6e 75 73  65 6c 65 63 74 28 69 74  |. .menuselect(it|
00004e40  65 6d 30 25 2c 69 74 65  6d 31 25 29 0d 1b bc 23  |em0%,item1%)...#|
00004e50  c8 99 20 22 57 69 6d 70  5f 47 65 74 50 6f 69 6e  |.. "Wimp_GetPoin|
00004e60  74 65 72 49 6e 66 6f 22  2c 2c 62 6c 6f 63 6b 0d  |terInfo",,block.|
00004e70  1b c6 14 62 75 54 54 6f  6e 20 3d 20 62 6c 6f 63  |...buTTon = bloc|
00004e80  6b 21 38 0d 1b d0 26 76  6f 69 64 3d a0 28 22 46  |k!8...&void=.("F|
00004e90  4e 6d 65 6e 75 73 65 6c  65 63 74 5f 22 2b 63 6c  |Nmenuselect_"+cl|
00004ea0  61 69 6d 6d 65 6e 75 24  29 0d 1b da 10 e7 20 62  |aimmenu$)..... b|
00004eb0  75 54 54 6f 6e 3d 31 20  8c 0d 1b e4 3a 20 20 20  |uTTon=1 ....:   |
00004ec0  f4 20 2a 2a 2a 20 41 44  4a 55 53 54 20 70 72 65  |. *** ADJUST pre|
00004ed0  73 73 65 64 20 73 6f 20  6b 65 65 70 20 74 68 65  |ssed so keep the|
00004ee0  20 6d 65 6e 75 20 73 74  72 75 63 74 75 72 65 20  | menu structure |
00004ef0  2a 2a 2a 0d 1b ee 20 20  20 20 6e 75 6c 6c 20 3d  |***...    null =|
00004f00  20 a0 28 22 46 4e 74 69  63 6b 5f 22 2b 74 69 63  | .("FNtick_"+tic|
00004f10  6b 24 29 0d 1b f8 23 20  20 20 c8 99 20 43 72 65  |k$)...#   .. Cre|
00004f20  61 74 65 4d 2c 30 2c 74  68 65 4c 61 73 74 4d 65  |ateM,0,theLastMe|
00004f30  6e 75 2c 30 2c 30 0d 1c  02 05 cc 0d 1c 0c 14 20  |nu,0,0......... |
00004f40  20 20 63 6c 61 69 6d 6d  65 6e 75 24 3d 22 22 0d  |  claimmenu$="".|
00004f50  1c 16 05 cd 0d 1c 20 05  e1 0d 1c 2a 04 0d 1c 34  |...... ....*...4|
00004f60  2a dd 20 f2 75 70 64 61  74 65 28 68 61 6e 64 6c  |*. .update(handl|
00004f70  65 25 2c 75 78 30 25 2c  75 79 30 25 2c 75 78 31  |e%,ux0%,uy0%,ux1|
00004f80  25 2c 75 79 31 25 29 0d  1c 3e 48 21 62 6c 6f 63  |%,uy1%)..>H!bloc|
00004f90  6b 3d 68 61 6e 64 6c 65  25 3a 62 6c 6f 63 6b 21  |k=handle%:block!|
00004fa0  34 3d 75 78 30 25 3a 62  6c 6f 63 6b 21 38 3d 75  |4=ux0%:block!8=u|
00004fb0  79 30 25 3a 62 6c 6f 63  6b 21 31 32 3d 75 78 31  |y0%:block!12=ux1|
00004fc0  25 3a 62 6c 6f 63 6b 21  31 36 3d 75 79 31 25 0d  |%:block!16=uy1%.|
00004fd0  1c 48 2d c8 99 20 55 70  64 61 74 65 57 2c 30 2c  |.H-.. UpdateW,0,|
00004fe0  62 6c 6f 63 6b 20 b8 20  6d 6f 72 65 25 3a f2 69  |block . more%:.i|
00004ff0  6e 66 6f 28 62 6c 6f 63  6b 2b 34 29 0d 1c 52 05  |nfo(block+4)..R.|
00005000  e1 0d 1c 5c 04 0d 1c 66  14 dd 20 f2 6f 70 65 6e  |...\...f.. .open|
00005010  75 70 28 69 63 6f 6e 25  29 0d 1c 70 17 e7 20 69  |up(icon%)..p.. i|
00005020  63 6f 6e 25 28 69 63 6f  6e 25 29 3d 2d 31 20 8c  |con%(icon%)=-1 .|
00005030  0d 1c 7a 97 20 20 e7 20  69 63 6f 6e 25 3c 3e 64  |..z.  . icon%<>d|
00005040  69 73 6b 69 63 6f 6e 20  80 20 69 63 6f 6e 25 3c  |iskicon . icon%<|
00005050  3e 74 65 78 74 69 63 6f  6e 20 80 20 69 63 6f 6e  |>texticon . icon|
00005060  25 3c 3e 61 72 63 69 63  6f 6e 20 80 20 69 63 6f  |%<>arcicon . ico|
00005070  6e 25 3c 3e 73 77 61 70  69 63 6f 6e 20 80 20 69  |n%<>swapicon . i|
00005080  63 6f 6e 25 3c 3e 70 72  6f 67 69 63 6f 6e 20 80  |con%<>progicon .|
00005090  20 69 63 6f 6e 25 3c 3e  76 6f 63 61 62 69 63 6f  | icon%<>vocabico|
000050a0  6e 20 80 20 69 63 6f 6e  25 3c 3e 65 79 65 69 63  |n . icon%<>eyeic|
000050b0  6f 6e 20 8c 20 69 63 6f  6e 25 28 69 63 6f 6e 25  |on . icon%(icon%|
000050c0  29 3d 69 63 6f 6e 25 0d  1c 84 11 20 20 20 c8 8e  |)=icon%....   ..|
000050d0  20 69 63 6f 6e 25 20 ca  0d 1c 8e 14 20 20 20 20  | icon% .....    |
000050e0  20 c9 20 64 69 73 6b 69  63 6f 6e 3a 0d 1c 98 36  | . diskicon:...6|
000050f0  20 20 20 20 20 20 20 20  20 20 c8 99 20 43 72 65  |          .. Cre|
00005100  61 74 65 4d 2c 30 2c 64  69 73 6b 6d 65 6e 75 2c  |ateM,0,diskmenu,|
00005110  6d 6f 75 73 65 78 25 2d  36 34 2c 6d 6f 75 73 65  |mousex%-64,mouse|
00005120  79 25 0d 1c a2 36 20 20  20 20 20 20 20 20 20 20  |y%...6          |
00005130  e7 20 6c 6f 61 64 65 64  24 3c 3e 22 22 20 8c 20  |. loaded$<>"" . |
00005140  66 24 3d 70 61 74 68 24  20 8b 20 66 24 3d 22 41  |f$=path$ . f$="A|
00005150  6c 70 73 46 69 6c 65 22  0d 1c ac 2f 20 20 20 20  |lpsFile".../    |
00005160  20 20 20 20 20 20 f2 63  68 61 6e 67 65 69 63 6f  |      .changeico|
00005170  6e 28 73 61 76 65 68 61  6e 64 6c 65 2c 32 2c 66  |n(savehandle,2,f|
00005180  24 2c 76 6f 69 64 29 0d  1c b6 3f 20 20 20 20 20  |$,void)...?     |
00005190  20 20 20 20 20 63 6c 61  69 6d 6d 65 6e 75 24 3d  |     claimmenu$=|
000051a0  22 64 69 73 6b 33 35 22  3a 74 68 65 4c 61 73 74  |"disk35":theLast|
000051b0  4d 65 6e 75 3d 64 69 73  6b 6d 65 6e 75 3a 74 69  |Menu=diskmenu:ti|
000051c0  63 6b 24 3d 22 22 0d 1c  c0 1c 20 20 20 20 20 f4  |ck$=""....     .|
000051d0  20 57 48 45 4e 20 54 48  45 6d 69 73 63 69 63 6f  | WHEN THEmiscico|
000051e0  6e 3a 0d 1c ca 3c 20 20  20 20 20 20 20 20 20 20  |n:...<          |
000051f0  f4 20 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 20 64 6f  |. *********** do|
00005200  20 6e 6f 74 68 69 6e 67  20 66 6f 72 20 74 68 69  | nothing for thi|
00005210  73 20 69 63 6f 6e 20 2a  2a 2a 2a 2a 2a 2a 0d 1c  |s icon *******..|
00005220  d4 14 20 20 20 20 20 c9  20 74 65 78 74 69 63 6f  |..     . textico|
00005230  6e 3a 0d 1c de 20 20 20  20 20 20 20 20 20 20 20  |n:...           |
00005240  e7 20 74 65 78 74 5f 6f  77 6e 65 72 24 3d 22 22  |. text_owner$=""|
00005250  20 8c 0d 1c e8 3a 20 20  20 20 20 20 20 20 20 20  | ....:          |
00005260  20 20 f2 72 65 74 69 74  6c 65 28 74 65 78 74 68  |  .retitle(texth|
00005270  61 6e 64 6c 65 2c 22 4d  45 53 53 41 47 45 53 22  |andle,"MESSAGES"|
00005280  2c 74 65 78 74 68 61 6e  64 6c 65 29 0d 1c f2 31  |,texthandle)...1|
00005290  20 20 20 20 20 20 20 20  20 20 20 20 f2 6f 70 65  |            .ope|
000052a0  6e 28 74 65 78 74 68 61  6e 64 6c 65 2c 30 2c 31  |n(texthandle,0,1|
000052b0  30 30 30 2c 73 63 72 77  2c 34 30 30 29 0d 1c fc  |000,scrw,400)...|
000052c0  2e 20 20 20 20 20 20 20  20 20 20 20 20 74 65 78  |.            tex|
000052d0  74 5f 6f 77 6e 65 72 24  3d 22 74 65 78 74 65 64  |t_owner$="texted|
000052e0  22 3a 74 65 78 74 5f 6f  6b 3d b9 0d 1d 06 1f 20  |":text_ok=..... |
000052f0  20 20 20 20 20 20 20 20  20 20 20 f2 73 68 6f 77  |           .show|
00005300  5f 6d 73 67 28 6d 70 74  72 29 0d 1d 10 0f 20 20  |_msg(mptr)....  |
00005310  20 20 20 20 20 20 20 20  cc 0d 1d 1a 13 20 20 20  |        .....   |
00005320  20 20 20 20 20 20 20 20  20 ef 20 37 0d 1d 24 0f  |         . 7..$.|
00005330  20 20 20 20 20 20 20 20  20 20 cd 0d 1d 2e 17 20  |          ..... |
00005340  20 20 20 20 c9 20 54 48  45 64 6f 6f 72 69 63 6f  |    . THEdoorico|
00005350  6e 3a 0d 1d 38 45 20 20  20 20 20 20 20 20 20 20  |n:..8E          |
00005360  f2 6f 70 65 6e 28 68 61  6e 64 6c 65 25 28 a4 6d  |.open(handle%(.m|
00005370  61 74 63 68 69 64 65 6e  74 28 22 72 6f 6f 6d 65  |atchident("roome|
00005380  64 69 74 22 29 29 2c 30  2c 37 32 30 2c 31 32 38  |dit")),0,720,128|
00005390  30 2c 31 30 34 30 29 0d  1d 42 21 20 20 20 20 20  |0,1040)..B!     |
000053a0  20 20 20 20 20 f2 72 65  73 74 6f 72 65 5f 72 6f  |     .restore_ro|
000053b0  6f 6d 28 72 70 74 72 29  0d 1d 4c 16 20 20 20 20  |om(rptr)..L.    |
000053c0  20 c9 20 54 48 45 6b 65  79 69 63 6f 6e 3a 0d 1d  | . THEkeyicon:..|
000053d0  56 45 20 20 20 20 20 20  20 20 20 20 f2 6f 70 65  |VE          .ope|
000053e0  6e 28 68 61 6e 64 6c 65  25 28 a4 6d 61 74 63 68  |n(handle%(.match|
000053f0  69 64 65 6e 74 28 22 6f  62 6a 65 63 74 65 64 22  |ident("objected"|
00005400  29 29 2c 38 35 30 2c 35  36 30 2c 38 30 30 2c 36  |)),850,560,800,6|
00005410  38 30 29 0d 1d 60 20 20  20 20 20 20 20 20 20 20  |80)..`          |
00005420  20 f2 72 65 73 74 6f 72  65 5f 6f 62 6a 28 6f 70  | .restore_obj(op|
00005430  74 72 29 0d 1d 6a 14 20  20 20 20 20 c9 20 70 72  |tr)..j.     . pr|
00005440  6f 67 69 63 6f 6e 3a 0d  1d 74 20 20 20 20 20 20  |ogicon:..t      |
00005450  20 20 20 20 20 e7 20 74  65 78 74 5f 6f 77 6e 65  |     . text_owne|
00005460  72 24 3d 22 22 20 8c 0d  1d 7e 39 20 20 20 20 20  |r$="" ...~9     |
00005470  20 20 20 20 20 20 20 f2  72 65 74 69 74 6c 65 28  |       .retitle(|
00005480  74 65 78 74 68 61 6e 64  6c 65 2c 22 50 52 4f 47  |texthandle,"PROG|
00005490  52 41 4d 22 2c 74 65 78  74 68 61 6e 64 6c 65 29  |RAM",texthandle)|
000054a0  0d 1d 88 31 20 20 20 20  20 20 20 20 20 20 20 20  |...1            |
000054b0  f2 6f 70 65 6e 28 74 65  78 74 68 61 6e 64 6c 65  |.open(texthandle|
000054c0  2c 30 2c 31 30 30 30 2c  73 63 72 77 2c 34 30 30  |,0,1000,scrw,400|
000054d0  29 0d 1d 92 2f 20 20 20  20 20 20 20 20 20 20 20  |).../           |
000054e0  20 74 65 78 74 5f 6f 77  6e 65 72 24 3d 22 70 72  | text_owner$="pr|
000054f0  6f 67 72 61 6d 22 3a 74  65 78 74 5f 6f 6b 3d b9  |ogram":text_ok=.|
00005500  0d 1d 9c 28 20 20 20 20  20 20 20 20 20 20 20 20  |...(            |
00005510  f2 6c 69 73 74 28 70 72  67 5f 73 65 6c 25 2c 70  |.list(prg_sel%,p|
00005520  72 6f 67 76 61 6c 24 29  0d 1d a6 0f 20 20 20 20  |rogval$)....    |
00005530  20 20 20 20 20 20 cc 0d  1d b0 13 20 20 20 20 20  |      .....     |
00005540  20 20 20 20 20 20 20 ef  20 37 0d 1d ba 0f 20 20  |       . 7....  |
00005550  20 20 20 20 20 20 20 20  cd 0d 1d c4 17 20 20 20  |        .....   |
00005560  20 20 c9 20 54 48 45 63  68 61 72 69 63 6f 6e 3a  |  . THEcharicon:|
00005570  0d 1d ce 45 20 20 20 20  20 20 20 20 20 20 f2 6f  |...E          .o|
00005580  70 65 6e 28 68 61 6e 64  6c 65 25 28 a4 6d 61 74  |pen(handle%(.mat|
00005590  63 68 69 64 65 6e 74 28  22 63 68 72 64 65 73 69  |chident("chrdesi|
000055a0  67 6e 22 29 29 2c 30 2c  35 36 30 2c 31 32 38 30  |gn")),0,560,1280|
000055b0  2c 38 36 30 29 0d 1d d8  24 20 20 20 20 20 20 20  |,860)...$       |
000055c0  20 20 20 f2 64 69 73 70  6c 61 79 5f 63 68 72 28  |   .display_chr(|
000055d0  63 75 72 5f 63 68 72 25  29 0d 1d e2 36 20 20 20  |cur_chr%)...6   |
000055e0  20 20 20 20 20 20 20 f2  63 68 61 6e 67 65 69 63  |       .changeic|
000055f0  6f 6e 28 64 65 73 69 67  6e 2c 36 34 2c bd 28 63  |on(design,64,.(c|
00005600  75 72 5f 63 68 72 25 29  2c 64 75 6d 6d 79 29 0d  |ur_chr%),dummy).|
00005610  1d ec 15 20 20 20 20 20  c9 20 76 6f 63 61 62 69  |...     . vocabi|
00005620  63 6f 6e 3a 0d 1d f6 20  20 20 20 20 20 20 20 20  |con:...         |
00005630  20 20 e7 20 74 65 78 74  5f 6f 77 6e 65 72 24 3d  |  . text_owner$=|
00005640  22 22 20 8c 0d 1e 00 3c  20 20 20 20 20 20 20 20  |"" ....<        |
00005650  20 20 20 20 f2 72 65 74  69 74 6c 65 28 74 65 78  |    .retitle(tex|
00005660  74 68 61 6e 64 6c 65 2c  22 56 4f 43 41 42 55 4c  |thandle,"VOCABUL|
00005670  41 52 59 22 2c 74 65 78  74 68 61 6e 64 6c 65 29  |ARY",texthandle)|
00005680  0d 1e 0a 31 20 20 20 20  20 20 20 20 20 20 20 20  |...1            |
00005690  f2 6f 70 65 6e 28 74 65  78 74 68 61 6e 64 6c 65  |.open(texthandle|
000056a0  2c 30 2c 31 30 30 30 2c  73 63 72 77 2c 34 30 30  |,0,1000,scrw,400|
000056b0  29 0d 1e 14 2d 20 20 20  20 20 20 20 20 20 20 20  |)...-           |
000056c0  20 74 65 78 74 5f 6f 77  6e 65 72 24 3d 22 76 6f  | text_owner$="vo|
000056d0  63 61 62 22 3a 74 65 78  74 5f 6f 6b 3d b9 0d 1e  |cab":text_ok=...|
000056e0  1e 26 20 20 20 20 20 20  20 20 20 20 20 20 f2 6c  |.&            .l|
000056f0  69 73 74 5f 76 6f 63 61  62 28 76 6f 63 5f 73 65  |ist_vocab(voc_se|
00005700  63 74 25 29 0d 1e 28 0f  20 20 20 20 20 20 20 20  |ct%)..(.        |
00005710  20 20 cc 0d 1e 32 13 20  20 20 20 20 20 20 20 20  |  ...2.         |
00005720  20 20 20 ef 20 37 0d 1e  3c 0f 20 20 20 20 20 20  |   . 7..<.      |
00005730  20 20 20 20 cd 0d 1e 46  14 20 20 20 20 20 c9 20  |    ...F.     . |
00005740  68 65 6c 70 69 63 6f 6e  3a 0d 1e 50 3f 20 20 20  |helpicon:..P?   |
00005750  20 20 20 20 20 20 20 f2  6f 70 65 6e 28 68 61 6e  |       .open(han|
00005760  64 6c 65 25 28 a4 6d 61  74 63 68 69 64 65 6e 74  |dle%(.matchident|
00005770  28 22 48 45 4c 50 22 29  29 2c 30 2c 35 30 30 2c  |("HELP")),0,500,|
00005780  39 36 30 2c 34 30 30 29  0d 1e 5a 13 20 20 20 20  |960,400)..Z.    |
00005790  20 c9 20 65 79 65 69 63  6f 6e 3a 0d 1e 64 20 20  | . eyeicon:..d  |
000057a0  20 20 20 20 20 20 20 20  20 e7 20 74 65 78 74 5f  |         . text_|
000057b0  6f 77 6e 65 72 24 3d 22  22 20 8c 0d 1e 6e 3a 20  |owner$="" ...n: |
000057c0  20 20 20 20 20 20 20 20  20 20 20 f2 72 65 74 69  |           .reti|
000057d0  74 6c 65 28 74 65 78 74  68 61 6e 64 6c 65 2c 22  |tle(texthandle,"|
000057e0  50 49 43 54 55 52 45 53  22 2c 74 65 78 74 68 61  |PICTURES",textha|
000057f0  6e 64 6c 65 29 0d 1e 78  31 20 20 20 20 20 20 20  |ndle)..x1       |
00005800  20 20 20 20 20 f2 6f 70  65 6e 28 74 65 78 74 68  |     .open(texth|
00005810  61 6e 64 6c 65 2c 30 2c  31 30 30 30 2c 73 63 72  |andle,0,1000,scr|
00005820  77 2c 34 30 30 29 0d 1e  82 2b 20 20 20 20 20 20  |w,400)...+      |
00005830  20 20 20 20 20 20 74 65  78 74 5f 6f 77 6e 65 72  |      text_owner|
00005840  24 3d 22 70 69 78 22 3a  74 65 78 74 5f 6f 6b 3d  |$="pix":text_ok=|
00005850  b9 0d 1e 8c 19 20 20 20  20 20 20 20 20 20 20 20  |.....           |
00005860  20 f2 6c 69 73 74 5f 70  69 78 0d 1e 96 0f 20 20  | .list_pix....  |
00005870  20 20 20 20 20 20 20 20  cc 0d 1e a0 13 20 20 20  |        .....   |
00005880  20 20 20 20 20 20 20 20  20 ef 20 37 0d 1e aa 0f  |         . 7....|
00005890  20 20 20 20 20 20 20 20  20 20 cd 0d 1e b4 29 20  |          ....) |
000058a0  20 20 20 20 c9 20 61 72  63 69 63 6f 6e 3a 64 75  |    . arcicon:du|
000058b0  6d 6d 79 3d a4 6b 65 79  70 72 65 73 73 5f 73 74  |mmy=.keypress_st|
000058c0  61 74 75 73 0d 1e be 13  20 20 20 20 20 c9 20 73  |atus....     . s|
000058d0  77 61 70 69 63 6f 6e 0d  1e c8 2d 20 20 20 20 20  |wapicon...-     |
000058e0  64 61 74 61 76 61 6c 69  64 3d ac 20 64 61 74 61  |datavalid=. data|
000058f0  76 61 6c 69 64 3a ef 20  37 3a f2 73 77 61 70 5f  |valid:. 7:.swap_|
00005900  64 61 74 61 0d 1e d2 16  20 20 20 20 20 e7 20 64  |data....     . d|
00005910  61 74 61 76 61 6c 69 64  20 8c 0d 1e dc 38 20 20  |atavalid ....8  |
00005920  20 20 20 20 f2 63 68 61  6e 67 65 69 63 6f 6e 28  |    .changeicon(|
00005930  41 4c 50 53 6d 61 69 6e  2c 73 77 61 70 69 63 6f  |ALPSmain,swapico|
00005940  6e 2c 22 73 77 61 70 22  2c 73 77 61 70 69 63 6f  |n,"swap",swapico|
00005950  6e 29 0d 1e e6 0a 20 20  20 20 20 cc 0d 1e f0 3a  |n)....     ....:|
00005960  20 20 20 20 20 20 f2 63  68 61 6e 67 65 69 63 6f  |      .changeico|
00005970  6e 28 41 4c 50 53 6d 61  69 6e 2c 73 77 61 70 69  |n(ALPSmain,swapi|
00005980  63 6f 6e 2c 22 73 77 61  70 5f 78 22 2c 73 77 61  |con,"swap_x",swa|
00005990  70 69 63 6f 6e 29 0d 1e  fa 0a 20 20 20 20 20 cd  |picon)....     .|
000059a0  0d 1f 04 1a 20 20 20 20  20 f2 66 6f 72 63 65 52  |....     .forceR|
000059b0  28 41 4c 50 53 6d 61 69  6e 29 0d 1f 0e 0a 20 20  |(ALPSmain)....  |
000059c0  20 20 20 cb 0d 1f 18 05  cd 0d 1f 22 05 e1 0d 1f  |   ........"....|
000059d0  2c 04 0d 1f 36 04 0d 1f  40 4a f4 20 20 2d 2d 2d  |,...6...@J.  ---|
000059e0  2d 2d 2d 20 60 62 75 74  74 6f 6e 60 20 72 6f 75  |--- `button` rou|
000059f0  74 69 6e 65 73 20 74 6f  20 64 65 61 6c 20 77 69  |tines to deal wi|
00005a00  74 68 20 63 6c 69 63 6b  73 20 69 6e 20 67 69 76  |th clicks in giv|
00005a10  65 6e 20 77 69 6e 64 6f  77 20 2d 2d 2d 2d 2d 2d  |en window ------|
00005a20  0d 1f 4a 04 0d 1f 54 14  dd 20 a4 62 75 74 74 6f  |..J...T.. .butto|
00005a30  6e 5f 74 65 78 74 65 64  0d 1f 5e 0c ea 6d 78 25  |n_texted..^..mx%|
00005a40  2c 6d 79 25 0d 1f 68 12  e7 20 62 75 74 74 6f 6e  |,my%..h.. button|
00005a50  25 3c 3e 32 20 8c 0d 1f  72 0f f2 67 65 74 70 6f  |%<>2 ...r..getpo|
00005a60  69 6e 74 65 72 0d 1f 7c  29 6d 78 25 3d 28 6d 6f  |inter..|)mx%=(mo|
00005a70  75 73 65 78 25 2d 62 78  25 2b 63 68 58 25 81 34  |usex%-bx%+chX%.4|
00005a80  29 20 80 28 ac 28 63 68  58 25 2d 31 29 29 0d 1f  |) .(.(chX%-1))..|
00005a90  86 2d 6d 79 25 3d 28 6d  6f 75 73 65 79 25 2d 62  |.-my%=(mousey%-b|
00005aa0  79 25 29 20 2d 20 28 28  6d 6f 75 73 65 79 25 2d  |y%) - ((mousey%-|
00005ab0  62 79 25 29 20 83 6c 73  59 25 29 0d 1f 90 19 74  |by%) .lsY%)....t|
00005ac0  65 78 74 5f 63 6f 6c 25  3d 31 2b 6d 78 25 20 81  |ext_col%=1+mx% .|
00005ad0  63 68 58 25 0d 1f 9a 24  74 65 78 74 5f 72 6f 77  |chX%...$text_row|
00005ae0  25 3d 2d 28 28 6d 6f 75  73 65 79 25 2d 62 79 25  |%=-((mousey%-by%|
00005af0  29 20 81 6c 73 59 25 29  0d 1f a4 2d e7 20 74 65  |) .lsY%)...-. te|
00005b00  78 74 5f 72 6f 77 25 3e  6c 61 73 74 5f 72 6f 77  |xt_row%>last_row|
00005b10  25 20 74 65 78 74 5f 72  6f 77 25 3d 6c 61 73 74  |% text_row%=last|
00005b20  5f 72 6f 77 25 0d 1f ae  4b e7 20 74 65 78 74 5f  |_row%...K. text_|
00005b30  63 6f 6c 25 3e 74 65 78  74 5f 72 6f 77 6c 65 6e  |col%>text_rowlen|
00005b40  25 28 74 65 78 74 5f 72  6f 77 25 29 20 74 65 78  |%(text_row%) tex|
00005b50  74 5f 63 6f 6c 25 3d 74  65 78 74 5f 72 6f 77 6c  |t_col%=text_rowl|
00005b60  65 6e 25 28 74 65 78 74  5f 72 6f 77 25 29 2b 31  |en%(text_row%)+1|
00005b70  0d 1f b8 1d e7 20 74 65  78 74 5f 63 6f 6c 25 3c  |..... text_col%<|
00005b80  31 20 74 65 78 74 5f 63  6f 6c 25 3d 31 0d 1f c2  |1 text_col%=1...|
00005b90  05 cd 0d 1f cc 04 0d 1f  d6 10 c8 8e 20 62 75 74  |............ but|
00005ba0  74 6f 6e 25 20 ca 0d 1f  e0 07 c9 20 32 0d 1f ea  |ton% ...... 2...|
00005bb0  11 f2 74 65 78 74 5f 6d  65 6e 75 62 6f 78 0d 1f  |..text_menubox..|
00005bc0  f4 07 c9 20 34 0d 1f fe  0f f2 6c 6f 63 61 74 65  |... 4.....locate|
00005bd0  5f 70 74 72 0d 20 08 20  f2 63 75 72 73 6f 72 28  |_ptr. . .cursor(|
00005be0  74 65 78 74 5f 63 6f 6c  25 2c 74 65 78 74 5f 72  |text_col%,text_r|
00005bf0  6f 77 25 29 0d 20 12 07  c9 20 31 0d 20 1c 1a e7  |ow%). ... 1. ...|
00005c00  20 74 65 78 74 5f 6f 77  6e 65 72 24 3c 3e 22 70  | text_owner$<>"p|
00005c10  69 78 22 20 8c 0d 20 26  0f f2 6c 6f 63 61 74 65  |ix" .. &..locate|
00005c20  5f 70 74 72 0d 20 30 0d  e7 20 6d 72 6b 3c 32 20  |_ptr. 0.. mrk<2 |
00005c30  8c 0d 20 3a 17 6d 61 72  6b 28 6d 72 6b 29 3d 74  |.. :.mark(mrk)=t|
00005c40  65 78 74 5f 70 74 72 25  0d 20 44 29 63 6f 6c 28  |ext_ptr%. D)col(|
00005c50  6d 72 6b 29 3d 74 65 78  74 5f 63 6f 6c 25 3a 72  |mrk)=text_col%:r|
00005c60  6f 77 28 6d 72 6b 29 3d  74 65 78 74 5f 72 6f 77  |ow(mrk)=text_row|
00005c70  25 0d 20 4e 17 61 73 63  28 6d 72 6b 29 3d 3f 74  |%. N.asc(mrk)=?t|
00005c80  65 78 74 5f 70 74 72 25  0d 20 58 2f e7 20 61 73  |ext_ptr%. X/. as|
00005c90  63 28 6d 72 6b 29 3d 31  33 20 8c 20 ef 32 33 2c  |c(mrk)=13 . .23,|
00005ca0  64 75 6d 6d 79 5f 63 72  20 8b 20 ef 32 33 2c 63  |dummy_cr . .23,c|
00005cb0  68 72 28 6d 72 6b 29 0d  20 62 16 3f 6f 73 5f 62  |hr(mrk). b.?os_b|
00005cc0  6c 6f 63 6b 3d 61 73 63  28 6d 72 6b 29 0d 20 6c  |lock=asc(mrk). l|
00005cd0  1c c8 99 20 22 4f 53 5f  57 6f 72 64 22 2c 26 41  |... "OS_Word",&A|
00005ce0  2c 6f 73 5f 62 6c 6f 63  6b 0d 20 76 0e e3 20 52  |,os_block. v.. R|
00005cf0  25 3d 31 20 b8 20 38 0d  20 80 19 72 6f 77 5f 76  |%=1 . 8. ..row_v|
00005d00  61 6c 75 65 3d 52 25 3f  6f 73 5f 62 6c 6f 63 6b  |alue=R%?os_block|
00005d10  0d 20 8a 15 ef 20 72 6f  77 5f 76 61 6c 75 65 20  |. ... row_value |
00005d20  82 20 26 46 46 0d 20 94  05 ed 0d 20 9e 3d e7 20  |. &FF. .... .=. |
00005d30  61 73 63 28 6d 72 6b 29  3d 31 33 20 8c 20 3f 74  |asc(mrk)=13 . ?t|
00005d40  65 78 74 5f 70 74 72 25  3d 64 75 6d 6d 79 5f 63  |ext_ptr%=dummy_c|
00005d50  72 20 8b 20 3f 74 65 78  74 5f 70 74 72 25 3d 63  |r . ?text_ptr%=c|
00005d60  68 72 28 6d 72 6b 29 0d  20 a8 68 f2 75 70 64 61  |hr(mrk). .h.upda|
00005d70  74 65 28 74 65 78 74 68  61 6e 64 6c 65 2c 63 68  |te(texthandle,ch|
00005d80  58 25 2a 28 74 65 78 74  5f 63 6f 6c 25 2d 31 29  |X%*(text_col%-1)|
00005d90  2c 2d 28 74 65 78 74 5f  72 6f 77 25 2b 31 29 2a  |,-(text_row%+1)*|
00005da0  6c 73 59 25 2c 63 68 58  25 2a 28 74 65 78 74 5f  |lsY%,chX%*(text_|
00005db0  63 6f 6c 25 2d 31 29 2b  63 68 58 25 2c 2d 28 74  |col%-1)+chX%,-(t|
00005dc0  65 78 74 5f 72 6f 77 25  29 2a 6c 73 59 25 29 0d  |ext_row%)*lsY%).|
00005dd0  20 b2 19 64 75 6d 6d 79  3d a4 72 65 64 72 61 77  | ..dummy=.redraw|
00005de0  5f 74 65 78 74 28 b9 29  0d 20 bc 0a 6d 72 6b 2b  |_text(.). ..mrk+|
00005df0  3d 31 0d 20 c6 20 f2 63  75 72 73 6f 72 28 74 65  |=1. . .cursor(te|
00005e00  78 74 5f 63 6f 6c 25 2c  74 65 78 74 5f 72 6f 77  |xt_col%,text_row|
00005e10  25 29 0d 20 d0 05 cd 0d  20 da 05 cd 0d 20 e4 05  |%). .... .... ..|
00005e20  cb 0d 20 ee 06 3d 30 0d  20 f8 04 0d 21 02 11 dd  |.. ..=0. ...!...|
00005e30  20 f2 6c 6f 63 61 74 65  5f 70 74 72 0d 21 0c 19  | .locate_ptr.!..|
00005e40  74 65 78 74 5f 70 74 72  25 3d 74 65 78 74 5f 62  |text_ptr%=text_b|
00005e50  6c 6f 63 6b 25 0d 21 16  13 e7 20 74 65 78 74 5f  |lock%.!... text_|
00005e60  72 6f 77 25 3e 30 20 8c  0d 21 20 1a 20 20 e3 20  |row%>0 ..! .  . |
00005e70  52 25 3d 30 20 b8 20 74  65 78 74 5f 72 6f 77 25  |R%=0 . text_row%|
00005e80  2d 31 0d 21 2a 23 20 20  20 20 74 65 78 74 5f 70  |-1.!*#    text_p|
00005e90  74 72 25 2b 3d 74 65 78  74 5f 72 6f 77 6c 65 6e  |tr%+=text_rowlen|
00005ea0  25 28 52 25 29 0d 21 34  37 20 20 20 20 e7 20 74  |%(R%).!47    . t|
00005eb0  65 78 74 5f 72 6f 77 6c  65 6e 25 28 52 25 29 3c  |ext_rowlen%(R%)<|
00005ec0  74 65 78 74 5f 6d 61 78  6c 6c 65 6e 25 20 8c 20  |text_maxllen% . |
00005ed0  74 65 78 74 5f 70 74 72  25 2b 3d 31 0d 21 3e 07  |text_ptr%+=1.!>.|
00005ee0  20 20 ed 0d 21 48 05 cd  0d 21 52 1a 74 65 78 74  |  ..!H...!R.text|
00005ef0  5f 70 74 72 25 2b 3d 74  65 78 74 5f 63 6f 6c 25  |_ptr%+=text_col%|
00005f00  2d 31 0d 21 5c 2f e7 20  74 65 78 74 5f 70 74 72  |-1.!\/. text_ptr|
00005f10  25 3e 74 65 78 74 5f 65  6e 64 25 20 8c 20 74 65  |%>text_end% . te|
00005f20  78 74 5f 70 74 72 25 3d  74 65 78 74 5f 65 6e 64  |xt_ptr%=text_end|
00005f30  25 0d 21 66 05 e1 0d 21  70 04 0d 21 7a 16 dd 20  |%.!f...!p..!z.. |
00005f40  a4 62 75 74 74 6f 6e 5f  6f 62 6a 65 63 74 65 64  |.button_objected|
00005f50  0d 21 84 0e c8 8e 20 69  63 6f 6e 25 20 ca 0d 21  |.!.... icon% ..!|
00005f60  8e 08 c9 20 30 3a 0d 21  98 04 0d 21 a2 32 f4 20  |... 0:.!...!.2. |
00005f70  46 69 72 73 74 20 73 65  74 20 74 68 65 20 27 74  |First set the 't|
00005f80  69 63 6b 27 20 62 69 74  73 20 66 6f 72 20 65 61  |ick' bits for ea|
00005f90  63 68 20 6d 65 6e 75 20  69 74 65 6d 0d 21 ac 19  |ch menu item.!..|
00005fa0  6e 75 6c 6c 20 3d 20 a4  74 69 63 6b 5f 6f 62 6a  |null = .tick_obj|
00005fb0  65 63 74 65 64 0d 21 b6  43 c8 99 20 43 72 65 61  |ected.!.C.. Crea|
00005fc0  74 65 4d 2c 30 2c 6d 5f  6f 62 6a 66 6c 61 67 2c  |teM,0,m_objflag,|
00005fd0  6d 6f 75 73 65 78 25 2d  36 34 2c 6d 6f 75 73 65  |mousex%-64,mouse|
00005fe0  79 25 3a 63 6c 61 69 6d  6d 65 6e 75 24 3d 22 6f  |y%:claimmenu$="o|
00005ff0  62 6a 65 63 74 65 64 22  0d 21 c0 14 74 69 63 6b  |bjected".!..tick|
00006000  24 3d 22 6f 62 6a 65 63  74 65 64 22 0d 21 ca 1b  |$="objected".!..|
00006010  74 68 65 4c 61 73 74 4d  65 6e 75 20 3d 20 6d 5f  |theLastMenu = m_|
00006020  6f 62 6a 66 6c 61 67 0d  21 d4 04 0d 21 de 12 c9  |objflag.!...!...|
00006030  20 35 3a f2 66 69 72 73  74 5f 6f 62 6a 0d 21 e8  | 5:.first_obj.!.|
00006040  11 c9 20 36 3a f2 6c 61  73 74 5f 6f 62 6a 0d 21  |.. 6:.last_obj.!|
00006050  f2 12 c9 20 32 37 3a f2  6e 65 78 74 5f 6f 62 6a  |... 27:.next_obj|
00006060  0d 21 fc 12 c9 20 31 36  3a f2 70 72 65 76 5f 6f  |.!... 16:.prev_o|
00006070  62 6a 0d 22 06 15 c9 20  32 30 3a f2 66 77 64 5f  |bj."... 20:.fwd_|
00006080  6f 62 6a 28 31 30 29 0d  22 10 18 c9 20 32 31 3a  |obj(10)."... 21:|
00006090  f2 72 65 77 69 6e 64 5f  6f 62 6a 28 31 30 29 0d  |.rewind_obj(10).|
000060a0  22 1a 08 c9 20 31 37 0d  22 24 14 f2 73 74 6f 72  |"... 17."$..stor|
000060b0  65 5f 6f 62 6a 28 6f 70  74 72 29 0d 22 2e 25 6f  |e_obj(optr).".%o|
000060c0  70 74 72 3d bb 28 a4 67  65 74 69 63 6f 6e 64 61  |ptr=.(.geticonda|
000060d0  74 61 28 6f 62 6a 68 61  6e 64 6c 65 2c 37 29 29  |ta(objhandle,7))|
000060e0  0d 22 38 15 e7 20 6f 70  74 72 3c 31 20 8c 20 6f  |."8.. optr<1 . o|
000060f0  70 74 72 3d 31 0d 22 42  1f e7 20 6f 70 74 72 3e  |ptr=1."B.. optr>|
00006100  6d 61 78 6f 62 73 20 8c  20 6f 70 74 72 3d 6d 61  |maxobs . optr=ma|
00006110  78 6f 62 73 0d 22 4c 16  f2 72 65 73 74 6f 72 65  |xobs."L..restore|
00006120  5f 6f 62 6a 28 6f 70 74  72 29 0d 22 56 19 c9 20  |_obj(optr)."V.. |
00006130  32 32 3a 6c 61 73 74 5f  6f 62 6a 65 63 74 3d 6f  |22:last_object=o|
00006140  70 74 72 0d 22 60 09 c9  20 32 36 3a 0d 22 6a 44  |ptr."`.. 26:."jD|
00006150  c8 99 20 43 72 65 61 74  65 4d 2c 30 2c 6d 5f 63  |.. CreateM,0,m_c|
00006160  6f 6e 74 61 69 6e 2c 6d  6f 75 73 65 78 25 2d 36  |ontain,mousex%-6|
00006170  34 2c 6d 6f 75 73 65 79  25 3a 63 6c 61 69 6d 6d  |4,mousey%:claimm|
00006180  65 6e 75 24 3d 22 63 6f  6e 74 61 69 6e 65 72 22  |enu$="container"|
00006190  0d 22 74 0c 74 69 63 6b  24 3d 22 22 0d 22 7e 1b  |."t.tick$=""."~.|
000061a0  74 68 65 4c 61 73 74 4d  65 6e 75 20 3d 20 6d 5f  |theLastMenu = m_|
000061b0  63 6f 6e 74 61 69 6e 0d  22 88 05 7f 0d 22 92 05  |contain."...."..|
000061c0  cb 0d 22 9c 34 e7 20 6f  70 74 72 3e 6c 61 73 74  |..".4. optr>last|
000061d0  5f 6f 62 6a 65 63 74 20  6c 61 73 74 5f 6f 62 6a  |_object last_obj|
000061e0  65 63 74 3d 6f 70 74 72  3a 64 61 74 61 5f 73 61  |ect=optr:data_sa|
000061f0  76 65 64 3d a3 0d 22 a6  06 3d 30 0d 22 b0 04 0d  |ved=.."..=0."...|
00006200  22 ba 16 dd 20 a4 62 75  74 74 6f 6e 5f 72 6f 6f  |"... .button_roo|
00006210  6d 65 64 69 74 0d 22 c4  0e c8 8e 20 69 63 6f 6e  |medit.".... icon|
00006220  25 20 ca 0d 22 ce 08 c9  20 31 3a 0d 22 d8 14 74  |% .."... 1:."..t|
00006230  69 63 6b 24 3d 22 72 6f  6f 6d 65 64 69 74 22 0d  |ick$="roomedit".|
00006240  22 e2 19 6e 75 6c 6c 20  3d 20 a4 74 69 63 6b 5f  |"..null = .tick_|
00006250  72 6f 6f 6d 65 64 69 74  0d 22 ec 42 c8 99 20 43  |roomedit.".B.. C|
00006260  72 65 61 74 65 4d 2c 30  2c 6d 5f 72 6d 66 6c 61  |reateM,0,m_rmfla|
00006270  67 2c 6d 6f 75 73 65 78  25 2d 36 34 2c 6d 6f 75  |g,mousex%-64,mou|
00006280  73 65 79 25 3a 63 6c 61  69 6d 6d 65 6e 75 24 3d  |sey%:claimmenu$=|
00006290  22 72 6f 6f 6d 65 64 69  74 22 0d 22 f6 1a 74 68  |"roomedit"."..th|
000062a0  65 4c 61 73 74 4d 65 6e  75 20 3d 20 6d 5f 72 6d  |eLastMenu = m_rm|
000062b0  66 6c 61 67 0d 23 00 04  0d 23 0a 13 c9 20 35 3a  |flag.#...#... 5:|
000062c0  f2 66 69 72 73 74 5f 72  6f 6f 6d 0d 23 14 12 c9  |.first_room.#...|
000062d0  20 36 3a f2 6c 61 73 74  5f 72 6f 6f 6d 0d 23 1e  | 6:.last_room.#.|
000062e0  12 c9 20 37 3a f2 6e 65  78 74 5f 72 6f 6f 6d 0d  |.. 7:.next_room.|
000062f0  23 28 12 c9 20 38 3a f2  70 72 65 76 5f 72 6f 6f  |#(.. 8:.prev_roo|
00006300  6d 0d 23 32 15 c9 20 39  3a f2 66 77 64 5f 72 6f  |m.#2.. 9:.fwd_ro|
00006310  6f 6d 28 31 30 29 0d 23  3c 19 c9 20 31 30 3a f2  |om(10).#<.. 10:.|
00006320  72 65 77 69 6e 64 5f 72  6f 6f 6d 28 31 30 29 0d  |rewind_room(10).|
00006330  23 46 08 c9 20 31 31 0d  23 50 15 f2 73 74 6f 72  |#F.. 11.#P..stor|
00006340  65 5f 72 6f 6f 6d 28 72  70 74 72 29 0d 23 5a 27  |e_room(rptr).#Z'|
00006350  72 70 74 72 3d bb 28 a4  67 65 74 69 63 6f 6e 64  |rptr=.(.geticond|
00006360  61 74 61 28 72 6f 6f 6d  68 61 6e 64 6c 65 2c 33  |ata(roomhandle,3|
00006370  33 29 29 0d 23 64 15 e7  20 72 70 74 72 3c 31 20  |3)).#d.. rptr<1 |
00006380  8c 20 72 70 74 72 3d 31  0d 23 6e 1f e7 20 72 70  |. rptr=1.#n.. rp|
00006390  74 72 3e 6d 61 78 72 6d  73 20 8c 20 72 70 74 72  |tr>maxrms . rptr|
000063a0  3d 6d 61 78 72 6d 73 0d  23 78 17 f2 72 65 73 74  |=maxrms.#x..rest|
000063b0  6f 72 65 5f 72 6f 6f 6d  28 72 70 74 72 29 0d 23  |ore_room(rptr).#|
000063c0  82 04 0d 23 8c 17 c9 20  31 32 3a 6c 61 73 74 5f  |...#... 12:last_|
000063d0  72 6f 6f 6d 3d 72 70 74  72 0d 23 96 05 cb 0d 23  |room=rptr.#....#|
000063e0  a0 30 e7 20 72 70 74 72  3e 6c 61 73 74 5f 72 6f  |.0. rptr>last_ro|
000063f0  6f 6d 20 6c 61 73 74 5f  72 6f 6f 6d 3d 72 70 74  |om last_room=rpt|
00006400  72 3a 64 61 74 61 5f 73  61 76 65 64 3d a3 0d 23  |r:data_saved=..#|
00006410  aa 04 0d 23 b4 38 f4 20  4e 6f 77 20 63 68 65 63  |...#.8. Now chec|
00006420  6b 20 66 6f 72 20 63 6c  69 63 6b 69 6e 67 20 6d  |k for clicking m|
00006430  65 6e 75 20 6f 6e 20 73  65 6c 65 63 74 65 64 20  |enu on selected |
00006440  45 58 49 54 52 20 69 63  6f 6e 0d 23 be 04 0d 23  |EXITR icon.#...#|
00006450  c8 0a c8 8e 20 b9 20 ca  0d 23 d2 04 0d 23 dc 19  |.... . ..#...#..|
00006460  c9 20 69 63 6f 6e 25 3e  35 33 20 80 20 69 63 6f  |. icon%>53 . ico|
00006470  6e 25 3c 37 30 0d 23 e6  04 0d 23 f0 14 6f 6c 64  |n%<70.#...#..old|
00006480  72 6d 69 63 6f 6e 25 3d  69 63 6f 6e 25 0d 23 fa  |rmicon%=icon%.#.|
00006490  19 6e 75 6c 6c 20 3d 20  a4 74 69 63 6b 5f 65 78  |.null = .tick_ex|
000064a0  69 74 65 64 69 74 0d 24  04 14 74 69 63 6b 24 3d  |itedit.$..tick$=|
000064b0  22 65 78 69 74 65 64 69  74 22 0d 24 0e 41 c8 99  |"exitedit".$.A..|
000064c0  20 43 72 65 61 74 65 4d  2c 30 2c 6d 5f 65 78 69  | CreateM,0,m_exi|
000064d0  74 66 2c 6d 6f 75 73 65  78 25 2d 36 34 2c 6d 6f  |tf,mousex%-64,mo|
000064e0  75 73 65 79 25 3a 63 6c  61 69 6d 6d 65 6e 75 24  |usey%:claimmenu$|
000064f0  3d 22 65 78 69 74 65 64  69 74 22 0d 24 18 19 74  |="exitedit".$..t|
00006500  68 65 4c 61 73 74 4d 65  6e 75 20 3d 20 6d 5f 65  |heLastMenu = m_e|
00006510  78 69 74 66 0d 24 22 05  7f 0d 24 2c 05 cb 0d 24  |xitf.$"...$,...$|
00006520  36 06 3d 30 0d 24 40 04  0d 24 4a 17 dd 20 a4 62  |6.=0.$@..$J.. .b|
00006530  75 74 74 6f 6e 5f 63 68  72 64 65 73 69 67 6e 0d  |utton_chrdesign.|
00006540  24 54 0a c8 8e 20 b9 20  ca 0d 24 5e 19 c9 20 69  |$T... . ..$^.. i|
00006550  63 6f 6e 25 3e 3d 30 20  80 20 69 63 6f 6e 25 3c  |con%>=0 . icon%<|
00006560  36 34 0d 24 68 29 20 20  f2 73 65 74 5f 69 63 6f  |64.$h)  .set_ico|
00006570  6e 28 64 65 73 69 67 6e  2c 69 63 6f 6e 25 2c 26  |n(design,icon%,&|
00006580  35 30 30 30 30 30 30 30  2c 30 29 0d 24 72 1a 20  |50000000,0).$r. |
00006590  20 f2 77 72 69 74 65 5f  63 68 72 28 63 75 72 5f  | .write_chr(cur_|
000065a0  63 68 72 25 29 0d 24 7c  1e 20 20 f2 73 65 74 5f  |chr%).$|.  .set_|
000065b0  69 63 6f 6e 28 64 65 73  69 67 6e 2c 36 34 2c 30  |icon(design,64,0|
000065c0  2c 30 29 0d 24 86 0e c9  20 69 63 6f 6e 25 3d 36  |,0).$... icon%=6|
000065d0  36 0d 24 90 11 20 20 63  75 72 5f 63 68 72 25 2b  |6.$..  cur_chr%+|
000065e0  3d 31 0d 24 9a 2b 20 20  e7 20 63 75 72 5f 63 68  |=1.$.+  . cur_ch|
000065f0  72 25 3e 6d 61 78 5f 63  68 72 25 20 63 75 72 5f  |r%>max_chr% cur_|
00006600  63 68 72 25 3d 6d 61 78  5f 63 68 72 25 0d 24 a4  |chr%=max_chr%.$.|
00006610  2e 20 20 f2 63 68 61 6e  67 65 69 63 6f 6e 28 64  |.  .changeicon(d|
00006620  65 73 69 67 6e 2c 36 34  2c bd 28 63 75 72 5f 63  |esign,64,.(cur_c|
00006630  68 72 25 29 2c 69 63 6f  6e 25 29 0d 24 ae 1c 20  |hr%),icon%).$.. |
00006640  20 f2 64 69 73 70 6c 61  79 5f 63 68 72 28 63 75  | .display_chr(cu|
00006650  72 5f 63 68 72 25 29 0d  24 b8 0e c9 20 69 63 6f  |r_chr%).$... ico|
00006660  6e 25 3d 36 37 0d 24 c2  11 20 20 63 75 72 5f 63  |n%=67.$..  cur_c|
00006670  68 72 25 2d 3d 31 0d 24  cc 1f 20 20 e7 20 63 75  |hr%-=1.$..  . cu|
00006680  72 5f 63 68 72 25 3c 33  32 20 63 75 72 5f 63 68  |r_chr%<32 cur_ch|
00006690  72 25 3d 33 32 0d 24 d6  2e 20 20 f2 63 68 61 6e  |r%=32.$..  .chan|
000066a0  67 65 69 63 6f 6e 28 64  65 73 69 67 6e 2c 36 34  |geicon(design,64|
000066b0  2c bd 28 63 75 72 5f 63  68 72 25 29 2c 69 63 6f  |,.(cur_chr%),ico|
000066c0  6e 25 29 0d 24 e0 1c 20  20 f2 64 69 73 70 6c 61  |n%).$..  .displa|
000066d0  79 5f 63 68 72 28 63 75  72 5f 63 68 72 25 29 0d  |y_chr(cur_chr%).|
000066e0  24 ea 0e c9 20 69 63 6f  6e 25 3d 36 38 0d 24 f4  |$... icon%=68.$.|
000066f0  44 20 20 c8 99 20 43 72  65 61 74 65 4d 2c 30 2c  |D  .. CreateM,0,|
00006700  6d 5f 63 68 61 72 64 65  73 25 2c 6d 6f 75 73 65  |m_chardes%,mouse|
00006710  78 25 2d 36 34 2c 6d 6f  75 73 65 79 25 3a 63 6c  |x%-64,mousey%:cl|
00006720  61 69 6d 6d 65 6e 75 24  3d 22 63 68 72 64 65 66  |aimmenu$="chrdef|
00006730  22 0d 24 fe 27 20 20 74  68 65 4c 61 73 74 4d 65  |".$.'  theLastMe|
00006740  6e 75 20 3d 20 6d 5f 63  68 61 72 64 65 73 25 3a  |nu = m_chardes%:|
00006750  74 69 63 6b 24 3d 22 22  0d 25 08 05 cb 0d 25 12  |tick$="".%....%.|
00006760  06 3d 30 0d 25 1c 04 0d  25 26 04 0d 25 30 12 dd  |.=0.%...%&..%0..|
00006770  20 a4 62 75 74 74 6f 6e  5f 69 6e 66 6f 0d 25 3a  | .button_info.%:|
00006780  0f e7 20 69 63 6f 6e 25  3d 35 20 8c 0d 25 44 16  |.. icon%=5 ..%D.|
00006790  f2 63 6c 6f 73 65 28 69  6e 66 6f 68 61 6e 64 6c  |.close(infohandl|
000067a0  65 29 0d 25 4e 05 cd 0d  25 58 06 3d 30 0d 25 62  |e).%N...%X.=0.%b|
000067b0  04 0d 25 6c 14 dd 20 a4  62 75 74 74 6f 6e 5f 73  |..%l.. .button_s|
000067c0  61 76 65 61 73 0d 25 76  0e c8 8e 20 69 63 6f 6e  |aveas.%v... icon|
000067d0  25 20 ca 0d 25 80 2f c9  20 30 20 3a 20 f2 73 61  |% ..%./. 0 : .sa|
000067e0  76 65 5f 61 6c 6c 28 a4  67 65 74 69 63 6f 6e 64  |ve_all(.geticond|
000067f0  61 74 61 28 73 61 76 65  68 61 6e 64 6c 65 2c 32  |ata(savehandle,2|
00006800  29 29 0d 25 8a 1b c9 20  31 20 3a 20 f2 67 65 74  |)).%... 1 : .get|
00006810  77 28 73 61 76 65 68 61  6e 64 6c 65 29 0d 25 94  |w(savehandle).%.|
00006820  2e 20 20 20 20 20 20 20  20 20 64 75 6d 6d 79 24  |.         dummy$|
00006830  3d a4 67 65 74 69 63 6f  6e 64 61 74 61 28 73 61  |=.geticondata(sa|
00006840  76 65 68 61 6e 64 6c 65  2c 31 29 0d 25 9e 2a 20  |vehandle,1).%.* |
00006850  20 20 20 20 20 20 20 20  62 6c 6f 63 6b 21 34 3d  |        block!4=|
00006860  35 3a 62 6c 6f 63 6b 21  38 3d 62 6c 6f 63 6b 21  |5:block!8=block!|
00006870  38 2b 62 78 25 0d 25 a8  22 20 20 20 20 20 20 20  |8+bx%.%."       |
00006880  20 20 62 6c 6f 63 6b 21  31 32 3d 62 6c 6f 63 6b  |  block!12=block|
00006890  21 31 32 2b 62 79 25 0d  25 b2 22 20 20 20 20 20  |!12+by%.%."     |
000068a0  20 20 20 20 62 6c 6f 63  6b 21 31 36 3d 62 6c 6f  |    block!16=blo|
000068b0  63 6b 21 31 36 2b 62 78  25 0d 25 bc 22 20 20 20  |ck!16+bx%.%."   |
000068c0  20 20 20 20 20 20 62 6c  6f 63 6b 21 32 30 3d 62  |      block!20=b|
000068d0  6c 6f 63 6b 21 32 30 2b  62 79 25 0d 25 c6 42 20  |lock!20+by%.%.B |
000068e0  20 20 20 20 20 20 20 20  62 6c 6f 63 6b 21 32 34  |        block!24|
000068f0  3d 30 3a 62 6c 6f 63 6b  21 32 38 3d 30 3a 62 6c  |=0:block!28=0:bl|
00006900  6f 63 6b 21 33 32 3d 73  63 72 77 2b 31 3a 62 6c  |ock!32=scrw+1:bl|
00006910  6f 63 6b 21 33 36 3d 73  63 72 68 2b 31 0d 25 d0  |ock!36=scrh+1.%.|
00006920  25 20 20 20 20 20 20 20  20 20 c8 99 20 22 57 69  |%         .. "Wi|
00006930  6d 70 5f 44 72 61 67 42  6f 78 22 2c 2c 62 6c 6f  |mp_DragBox",,blo|
00006940  63 6b 0d 25 da 05 cb 0d  25 e4 06 3d 30 0d 25 ee  |ck.%....%..=0.%.|
00006950  04 0d 25 f8 13 dd 20 a4  62 75 74 74 6f 6e 5f 53  |..%... .button_S|
00006960  65 74 75 70 0d 26 02 0e  c8 8e 20 69 63 6f 6e 25  |etup.&.... icon%|
00006970  20 ca 0d 26 0c 07 c9 20  30 0d 26 16 43 c9 20 31  | ..&... 0.&.C. 1|
00006980  3a f2 63 72 65 61 74 65  5f 64 69 72 73 28 a4 67  |:.create_dirs(.g|
00006990  65 74 69 63 6f 6e 64 61  74 61 28 73 65 74 75 70  |eticondata(setup|
000069a0  68 2c 32 29 2c a4 67 65  74 69 63 6f 6e 64 61 74  |h,2),.geticondat|
000069b0  61 28 73 65 74 75 70 68  2c 35 29 29 0d 26 20 05  |a(setuph,5)).& .|
000069c0  cb 0d 26 2a 12 f2 63 6c  6f 73 65 28 73 65 74 75  |..&*..close(setu|
000069d0  70 68 29 0d 26 34 17 c8  97 20 c8 93 20 30 2c 30  |ph).&4... .. 0,0|
000069e0  2c 73 63 72 77 2c 73 63  72 68 0d 26 3e 06 3d 30  |,scrw,scrh.&>.=0|
000069f0  0d 26 48 04 0d 26 52 4b  f4 20 20 2d 2d 2d 2d 2d  |.&H..&RK.  -----|
00006a00  2d 20 60 6b 65 79 70 72  65 73 73 60 20 72 6f 75  |- `keypress` rou|
00006a10  74 69 6e 65 73 20 64 65  61 6c 20 77 69 74 68 20  |tines deal with |
00006a20  70 72 65 73 73 69 6e 67  20 6b 65 79 20 60 6b 65  |pressing key `ke|
00006a30  79 25 60 20 69 6e 20 61  20 77 69 6e 64 6f 77 0d  |y%` in a window.|
00006a40  26 5c 04 0d 26 66 16 dd  20 a4 6b 65 79 70 72 65  |&\..&f.. .keypre|
00006a50  73 73 5f 74 65 78 74 65  64 0d 26 70 0a c8 8e 20  |ss_texted.&p... |
00006a60  b9 20 ca 0d 26 7a 2d c9  20 6b 65 79 25 3d 31 33  |. ..&z-. key%=13|
00006a70  3a f2 6e 65 77 6c 69 6e  65 3a 64 61 74 61 5f 73  |:.newline:data_s|
00006a80  61 76 65 64 3d a3 3a 74  65 78 74 5f 6f 6b 3d a3  |aved=.:text_ok=.|
00006a90  0d 26 84 13 c9 20 6b 65  79 25 3d 26 31 38 46 3a  |.&... key%=&18F:|
00006aa0  f2 75 70 0d 26 8e 15 c9  20 6b 65 79 25 3d 26 31  |.up.&... key%=&1|
00006ab0  38 45 3a f2 64 6f 77 6e  0d 26 98 16 c9 20 6b 65  |8E:.down.&... ke|
00006ac0  79 25 3d 26 31 38 44 3a  f2 72 69 67 68 74 0d 26  |y%=&18D:.right.&|
00006ad0  a2 29 c9 20 6b 65 79 25  3d 26 31 38 41 3a e3 20  |.). key%=&18A:. |
00006ae0  49 25 3d 31 20 b8 20 74  61 62 5f 73 65 74 3a f2  |I%=1 . tab_set:.|
00006af0  72 69 67 68 74 3a ed 0d  26 ac 28 c9 20 6b 65 79  |right:..&.(. key|
00006b00  25 3d 26 31 39 41 3a e3  20 49 25 3d 31 20 b8 20  |%=&19A:. I%=1 . |
00006b10  74 61 62 5f 73 65 74 3a  f2 6c 65 66 74 3a ed 0d  |tab_set:.left:..|
00006b20  26 b6 15 c9 20 6b 65 79  25 3d 26 31 38 43 3a f2  |&... key%=&18C:.|
00006b30  6c 65 66 74 0d 26 c0 33  c9 20 6b 65 79 25 3d 26  |left.&.3. key%=&|
00006b40  31 41 42 3a f2 64 65 6c  65 74 65 5f 6c 69 6e 65  |1AB:.delete_line|
00006b50  3a 64 61 74 61 5f 73 61  76 65 64 3d a3 3a 74 65  |:data_saved=.:te|
00006b60  78 74 5f 6f 6b 3d a3 0d  26 ca 33 c9 20 6b 65 79  |xt_ok=..&.3. key|
00006b70  25 3d 26 31 45 44 3a f2  69 6e 73 65 72 74 5f 6c  |%=&1ED:.insert_l|
00006b80  69 6e 65 3a 64 61 74 61  5f 73 61 76 65 64 3d a3  |ine:data_saved=.|
00006b90  3a 74 65 78 74 5f 6f 6b  3d a3 0d 26 d4 19 c9 20  |:text_ok=..&... |
00006ba0  6b 65 79 25 3d 26 31 41  43 3a f2 6c 65 66 74 5f  |key%=&1AC:.left_|
00006bb0  65 6e 64 0d 26 de 1a c9  20 6b 65 79 25 3d 26 31  |end.&... key%=&1|
00006bc0  41 44 3a f2 72 69 67 68  74 5f 65 6e 64 0d 26 e8  |AD:.right_end.&.|
00006bd0  3a c9 20 6b 65 79 25 3d  26 31 38 42 3a f2 72 69  |:. key%=&18B:.ri|
00006be0  67 68 74 3a f2 64 65 6c  65 74 65 5f 63 68 61 72  |ght:.delete_char|
00006bf0  3a 64 61 74 61 5f 73 61  76 65 64 3d a3 3a 74 65  |:data_saved=.:te|
00006c00  78 74 5f 6f 6b 3d a3 0d  26 f2 25 c9 20 6b 65 79  |xt_ok=..&.%. key|
00006c10  25 3d 26 31 43 44 3a 6f  76 65 72 77 72 69 74 65  |%=&1CD:overwrite|
00006c20  3d ac 20 6f 76 65 72 77  72 69 74 65 0d 26 fc 32  |=. overwrite.&.2|
00006c30  c9 20 6b 65 79 25 3d 31  32 37 3a f2 64 65 6c 65  |. key%=127:.dele|
00006c40  74 65 5f 63 68 61 72 3a  64 61 74 61 5f 73 61 76  |te_char:data_sav|
00006c50  65 64 3d a3 3a 74 65 78  74 5f 6f 6b 3d a3 0d 27  |ed=.:text_ok=..'|
00006c60  06 1c c9 20 28 6b 65 79  25 3e 33 31 29 20 80 20  |... (key%>31) . |
00006c70  28 6b 65 79 25 3c 31 32  36 29 0d 27 10 3c e7 20  |(key%<126).'.<. |
00006c80  6f 76 65 72 77 72 69 74  65 20 8c 20 f2 6f 76 65  |overwrite . .ove|
00006c90  72 77 72 69 74 65 5f 63  68 61 72 28 6b 65 79 25  |rwrite_char(key%|
00006ca0  29 20 8b 20 f2 69 6e 73  65 72 74 5f 63 68 61 72  |) . .insert_char|
00006cb0  28 6b 65 79 25 29 0d 27  1a 1a 64 61 74 61 5f 73  |(key%).'..data_s|
00006cc0  61 76 65 64 3d a3 3a 74  65 78 74 5f 6f 6b 3d a3  |aved=.:text_ok=.|
00006cd0  0d 27 24 1f 7f 20 c8 99  20 22 57 69 6d 70 5f 50  |.'$.. .. "Wimp_P|
00006ce0  72 6f 63 65 73 73 4b 65  79 22 2c 6b 65 79 25 0d  |rocessKey",key%.|
00006cf0  27 2e 05 cb 0d 27 38 04  0d 27 42 20 f2 63 75 72  |'....'8..'B .cur|
00006d00  73 6f 72 28 74 65 78 74  5f 63 6f 6c 25 2c 74 65  |sor(text_col%,te|
00006d10  78 74 5f 72 6f 77 25 29  0d 27 4c 06 3d 30 0d 27  |xt_row%).'L.=0.'|
00006d20  56 04 0d 27 60 16 dd 20  a4 6b 65 79 70 72 65 73  |V..'`.. .keypres|
00006d30  73 5f 73 61 76 65 61 73  0d 27 6a 51 e7 20 6b 65  |s_saveas.'jQ. ke|
00006d40  79 25 3d 31 33 20 8c 20  f2 73 61 76 65 5f 61 6c  |y%=13 . .save_al|
00006d50  6c 28 a4 67 65 74 69 63  6f 6e 64 61 74 61 28 73  |l(.geticondata(s|
00006d60  61 76 65 68 61 6e 64 6c  65 2c 32 29 29 20 8b 20  |avehandle,2)) . |
00006d70  c8 99 20 22 57 69 6d 70  5f 50 72 6f 63 65 73 73  |.. "Wimp_Process|
00006d80  4b 65 79 22 2c 6b 65 79  25 0d 27 7e 06 3d 30 0d  |Key",key%.'~.=0.|
00006d90  27 88 04 0d 27 92 18 dd  20 a4 6b 65 79 70 72 65  |'...'... .keypre|
00006da0  73 73 5f 6f 62 6a 65 63  74 65 64 0d 27 9c 19 e7  |ss_objected.'...|
00006db0  20 6b 65 79 25 3d 31 33  20 80 20 69 63 6f 6e 25  | key%=13 . icon%|
00006dc0  3d 37 20 8c 0d 27 a6 16  20 20 f2 73 74 6f 72 65  |=7 ..'..  .store|
00006dd0  5f 6f 62 6a 28 6f 70 74  72 29 0d 27 b0 2b 20 20  |_obj(optr).'.+  |
00006de0  6f 70 74 72 3d bb 28 a4  67 65 74 69 63 6f 6e 64  |optr=.(.geticond|
00006df0  61 74 61 28 6f 62 6a 68  61 6e 64 6c 65 2c 69 63  |ata(objhandle,ic|
00006e00  6f 6e 25 29 29 0d 27 ba  17 20 20 e7 20 6f 70 74  |on%)).'..  . opt|
00006e10  72 3c 31 20 8c 20 6f 70  74 72 3d 31 0d 27 c4 21  |r<1 . optr=1.'.!|
00006e20  20 20 e7 20 6f 70 74 72  3e 6d 61 78 6f 62 73 20  |  . optr>maxobs |
00006e30  8c 20 6f 70 74 72 3d 6d  61 78 6f 62 73 0d 27 ce  |. optr=maxobs.'.|
00006e40  18 20 20 f2 72 65 73 74  6f 72 65 5f 6f 62 6a 28  |.  .restore_obj(|
00006e50  6f 70 74 72 29 0d 27 d8  05 cd 0d 27 e2 04 0d 27  |optr).'....'...'|
00006e60  ec 0d c8 8e 20 6b 65 79  25 20 ca 0d 27 f6 24 c9  |.... key% ..'.$.|
00006e70  20 31 33 2c 26 31 38 45  3a f4 20 52 65 74 75 72  | 13,&18E:. Retur|
00006e80  6e 20 6f 72 20 64 6f 77  6e 20 61 72 72 6f 77 0d  |n or down arrow.|
00006e90  28 00 10 e7 20 69 63 6f  6e 25 3c 31 35 20 8c 0d  |(... icon%<15 ..|
00006ea0  28 0a 0e 20 20 69 63 6f  6e 25 2b 3d 31 0d 28 14  |(..  icon%+=1.(.|
00006eb0  05 cc 0d 28 1e 0d 20 20  69 63 6f 6e 25 3d 37 0d  |...(..  icon%=7.|
00006ec0  28 28 05 cd 0d 28 32 15  c9 20 26 31 38 46 3a f4  |((...(2.. &18F:.|
00006ed0  20 55 70 20 61 72 72 6f  77 0d 28 3c 0f e7 20 69  | Up arrow.(<.. i|
00006ee0  63 6f 6e 25 3e 37 20 8c  0d 28 46 0e 20 20 69 63  |con%>7 ..(F.  ic|
00006ef0  6f 6e 25 2d 3d 31 0d 28  50 05 cc 0d 28 5a 0e 20  |on%-=1.(P...(Z. |
00006f00  20 69 63 6f 6e 25 3d 31  35 0d 28 64 05 cd 0d 28  | icon%=15.(d...(|
00006f10  6e 1f 7f 20 c8 99 20 22  57 69 6d 70 5f 50 72 6f  |n.. .. "Wimp_Pro|
00006f20  63 65 73 73 4b 65 79 22  2c 6b 65 79 25 0d 28 78  |cessKey",key%.(x|
00006f30  05 cb 0d 28 82 51 f2 73  79 73 5f 63 6c 61 69 6d  |...(.Q.sys_claim|
00006f40  69 6e 70 75 74 66 6f 63  75 73 28 6f 62 6a 68 61  |inputfocus(objha|
00006f50  6e 64 6c 65 2c 69 63 6f  6e 25 2c 30 2c 30 2c 2d  |ndle,icon%,0,0,-|
00006f60  31 2c a9 28 a4 67 65 74  69 63 6f 6e 64 61 74 61  |1,.(.geticondata|
00006f70  28 6f 62 6a 68 61 6e 64  6c 65 2c 69 63 6f 6e 25  |(objhandle,icon%|
00006f80  29 29 29 0d 28 8c 06 3d  30 0d 28 96 04 0d 28 a0  |))).(..=0.(...(.|
00006f90  18 dd 20 a4 6b 65 79 70  72 65 73 73 5f 72 6f 6f  |.. .keypress_roo|
00006fa0  6d 65 64 69 74 0d 28 aa  0d c8 8e 20 6b 65 79 25  |medit.(.... key%|
00006fb0  20 ca 0d 28 b4 12 c9 20  31 33 2c 26 31 38 45 2c  | ..(... 13,&18E,|
00006fc0  26 31 38 46 0d 28 be 04  0d 28 c8 1a e7 20 6b 65  |&18F.(...(... ke|
00006fd0  79 25 3d 31 33 20 80 20  69 63 6f 6e 25 3d 33 33  |y%=13 . icon%=33|
00006fe0  20 8c 0d 28 d2 17 20 20  f2 73 74 6f 72 65 5f 72  | ..(..  .store_r|
00006ff0  6f 6f 6d 28 72 70 74 72  29 0d 28 dc 2c 20 20 72  |oom(rptr).(.,  r|
00007000  70 74 72 3d bb 28 a4 67  65 74 69 63 6f 6e 64 61  |ptr=.(.geticonda|
00007010  74 61 28 72 6f 6f 6d 68  61 6e 64 6c 65 2c 69 63  |ta(roomhandle,ic|
00007020  6f 6e 25 29 29 0d 28 e6  17 20 20 e7 20 72 70 74  |on%)).(..  . rpt|
00007030  72 3c 31 20 8c 20 72 70  74 72 3d 31 0d 28 f0 21  |r<1 . rptr=1.(.!|
00007040  20 20 e7 20 72 70 74 72  3e 6d 61 78 72 6d 73 20  |  . rptr>maxrms |
00007050  8c 20 72 70 74 72 3d 6d  61 78 72 6d 73 0d 28 fa  |. rptr=maxrms.(.|
00007060  19 20 20 f2 72 65 73 74  6f 72 65 5f 72 6f 6f 6d  |.  .restore_room|
00007070  28 72 70 74 72 29 0d 29  04 05 cd 0d 29 0e 04 0d  |(rptr).)....)...|
00007080  29 18 1b e7 20 6b 65 79  25 3d 31 33 20 84 20 6b  |)... key%=13 . k|
00007090  65 79 25 3d 26 31 38 45  20 8c 0d 29 22 0a c8 8e  |ey%=&18E ..)"...|
000070a0  20 b9 20 ca 0d 29 2c 1a  c9 20 69 63 6f 6e 25 3d  | . ..),.. icon%=|
000070b0  33 37 3a 6e 65 77 69 63  6f 6e 25 3d 37 31 0d 29  |37:newicon%=71.)|
000070c0  36 1a c9 20 69 63 6f 6e  25 3d 37 31 3a 6e 65 77  |6.. icon%=71:new|
000070d0  69 63 6f 6e 25 3d 33 38  0d 29 40 1a c9 20 69 63  |icon%=38.)@.. ic|
000070e0  6f 6e 25 3d 36 39 3a 6e  65 77 69 63 6f 6e 25 3d  |on%=69:newicon%=|
000070f0  33 33 0d 29 4a 1f c9 20  69 63 6f 6e 25 3c 33 37  |33.)J.. icon%<37|
00007100  3a 6e 65 77 69 63 6f 6e  25 3d 69 63 6f 6e 25 2b  |:newicon%=icon%+|
00007110  31 0d 29 54 2d c9 20 28  69 63 6f 6e 25 3e 33 37  |1.)T-. (icon%>37|
00007120  20 80 20 69 63 6f 6e 25  3c 35 34 29 3a 6e 65 77  | . icon%<54):new|
00007130  69 63 6f 6e 25 3d 69 63  6f 6e 25 2b 31 36 0d 29  |icon%=icon%+16.)|
00007140  5e 2d c9 20 28 69 63 6f  6e 25 3e 35 33 20 80 20  |^-. (icon%>53 . |
00007150  69 63 6f 6e 25 3c 36 39  29 3a 6e 65 77 69 63 6f  |icon%<69):newico|
00007160  6e 25 3d 69 63 6f 6e 25  2d 31 35 0d 29 68 05 cb  |n%=icon%-15.)h..|
00007170  0d 29 72 05 cd 0d 29 7c  04 0d 29 86 11 e7 20 6b  |.)r...)|..)... k|
00007180  65 79 25 3d 26 31 38 46  20 8c 0d 29 90 0a c8 8e  |ey%=&18F ..)....|
00007190  20 b9 20 ca 0d 29 9a 1a  c9 20 69 63 6f 6e 25 3d  | . ..)... icon%=|
000071a0  37 31 3a 6e 65 77 69 63  6f 6e 25 3d 33 37 0d 29  |71:newicon%=37.)|
000071b0  a4 1a c9 20 69 63 6f 6e  25 3d 33 38 3a 6e 65 77  |... icon%=38:new|
000071c0  69 63 6f 6e 25 3d 37 31  0d 29 ae 1a c9 20 69 63  |icon%=71.)... ic|
000071d0  6f 6e 25 3d 33 33 3a 6e  65 77 69 63 6f 6e 25 3d  |on%=33:newicon%=|
000071e0  36 39 0d 29 b8 1f c9 20  69 63 6f 6e 25 3e 33 33  |69.)... icon%>33|
000071f0  3a 6e 65 77 69 63 6f 6e  25 3d 69 63 6f 6e 25 2d  |:newicon%=icon%-|
00007200  31 0d 29 c2 2d c9 20 28  69 63 6f 6e 25 3e 33 37  |1.).-. (icon%>37|
00007210  20 80 20 69 63 6f 6e 25  3c 35 34 29 3a 6e 65 77  | . icon%<54):new|
00007220  69 63 6f 6e 25 3d 69 63  6f 6e 25 2d 31 36 0d 29  |icon%=icon%-16.)|
00007230  cc 2d c9 20 28 69 63 6f  6e 25 3e 35 33 20 80 20  |.-. (icon%>53 . |
00007240  69 63 6f 6e 25 3c 36 39  29 3a 6e 65 77 69 63 6f  |icon%<69):newico|
00007250  6e 25 3d 69 63 6f 6e 25  2b 31 35 0d 29 d6 05 cb  |n%=icon%+15.)...|
00007260  0d 29 e0 05 cd 0d 29 ea  04 0d 29 f4 1f 7f 20 c8  |.)....)...)... .|
00007270  99 20 22 57 69 6d 70 5f  50 72 6f 63 65 73 73 4b  |. "Wimp_ProcessK|
00007280  65 79 22 2c 6b 65 79 25  0d 29 f5 05 cb 0d 29 fe  |ey",key%.)....).|
00007290  59 f2 73 79 73 5f 63 6c  61 69 6d 69 6e 70 75 74  |Y.sys_claiminput|
000072a0  66 6f 63 75 73 28 72 6f  6f 6d 68 61 6e 64 6c 65  |focus(roomhandle|
000072b0  2c 6e 65 77 69 63 6f 6e  25 2c 30 2c 30 2c 2d 31  |,newicon%,0,0,-1|
000072c0  2c a9 28 a4 67 65 74 69  63 6f 6e 64 61 74 61 28  |,.(.geticondata(|
000072d0  72 6f 6f 6d 68 61 6e 64  6c 65 2c 6e 65 77 69 63  |roomhandle,newic|
000072e0  6f 6e 25 29 29 29 0d 2a  08 06 3d 30 0d 2a 12 04  |on%))).*..=0.*..|
000072f0  0d 2a 1c 16 dd 20 a4 6b  65 79 70 72 65 73 73 5f  |.*... .keypress_|
00007300  73 74 61 74 75 73 0d 2a  26 0f f2 63 6f 6c 28 31  |status.*&..col(1|
00007310  32 38 2b 32 29 0d 2a 30  0d ef 20 32 36 2c 34 2c  |28+2).*0.. 26,4,|
00007320  31 32 0d 2a 3a 17 f2 63  6f 6c 28 39 29 3a f2 63  |12.*:..col(9):.c|
00007330  6f 6c 28 31 32 38 2b 37  29 0d 2a 44 3c f2 63 65  |ol(128+7).*D<.ce|
00007340  6e 74 72 65 28 c4 32 37  2c 22 20 22 29 2b 22 53  |ntre(.27," ")+"S|
00007350  79 73 74 65 6d 20 53 74  61 74 75 73 20 49 6e 66  |ystem Status Inf|
00007360  6f 72 6d 61 74 69 6f 6e  22 2b c4 32 38 2c 22 20  |ormation"+.28," |
00007370  22 29 2c 30 29 0d 2a 4e  17 f2 63 6f 6c 28 31 32  |"),0).*N..col(12|
00007380  38 2b 32 29 3a f2 63 6f  6c 28 37 29 0d 2a 58 0b  |8+2):.col(7).*X.|
00007390  f2 73 74 61 74 75 73 0d  2a 62 17 f2 63 6f 6c 28  |.status.*b..col(|
000073a0  31 32 38 2b 37 29 3a f2  63 6f 6c 28 39 29 0d 2a  |128+7):.col(9).*|
000073b0  6c 35 f2 63 65 6e 74 72  65 28 c4 33 31 2c 22 20  |l5.centre(.31," |
000073c0  22 29 2b 22 49 6e 74 65  67 65 72 20 56 61 72 69  |")+"Integer Vari|
000073d0  61 62 6c 65 73 22 2b c4  33 32 2c 22 20 22 29 2c  |ables"+.32," "),|
000073e0  31 30 29 0d 2a 76 17 f2  63 6f 6c 28 31 32 38 2b  |10).*v..col(128+|
000073f0  32 29 3a f2 63 6f 6c 28  37 29 0d 2a 80 09 f2 6c  |2):.col(7).*...l|
00007400  76 61 72 0d 2a 8a 16 87  3a f2 72 65 74 75 72 6e  |var.*...:.return|
00007410  28 31 38 2c 33 31 29 3a  ee 0d 2a 94 0a ef 20 32  |(18,31):..*... 2|
00007420  36 2c 35 0d 2a 9e 22 c8  99 20 46 6f 72 63 65 52  |6,5.*.".. ForceR|
00007430  2c 2d 31 2c 30 2c 30 2c  73 63 72 77 2b 31 2c 73  |,-1,0,0,scrw+1,s|
00007440  63 72 68 2b 31 0d 2a a8  06 3d 30 0d 2a b2 04 0d  |crh+1.*..=0.*...|
00007450  2a bc 16 dd 20 a4 6b 65  79 70 72 65 73 73 5f 63  |*... .keypress_c|
00007460  68 72 64 65 66 0d 2a c6  1a e7 20 6b 65 79 25 3d  |hrdef.*... key%=|
00007470  31 33 20 80 20 69 63 6f  6e 25 3d 36 34 20 8c 0d  |13 . icon%=64 ..|
00007480  2a d0 2a 63 75 72 5f 63  68 72 25 3d 97 28 a4 67  |*.*cur_chr%=.(.g|
00007490  65 74 69 63 6f 6e 64 61  74 61 28 64 65 73 69 67  |eticondata(desig|
000074a0  6e 2c 69 63 6f 6e 25 29  29 0d 2a da 1a f2 64 69  |n,icon%)).*...di|
000074b0  73 70 6c 61 79 5f 63 68  72 28 63 75 72 5f 63 68  |splay_chr(cur_ch|
000074c0  72 25 29 0d 2a e4 2c f2  63 68 61 6e 67 65 69 63  |r%).*.,.changeic|
000074d0  6f 6e 28 64 65 73 69 67  6e 2c 36 34 2c bd 28 63  |on(design,64,.(c|
000074e0  75 72 5f 63 68 72 25 29  2c 69 63 6f 6e 25 29 0d  |ur_chr%),icon%).|
000074f0  2a e5 05 cc 0d 2a e6 2a  e7 20 6b 65 79 25 3c 3e  |*....*.*. key%<>|
00007500  31 33 20 8c 20 c8 99 20  22 57 69 6d 70 5f 50 72  |13 . .. "Wimp_Pr|
00007510  6f 63 65 73 73 4b 65 79  22 2c 6b 65 79 25 0d 2a  |ocessKey",key%.*|
00007520  e7 05 cd 0d 2a ee 06 3d  30 0d 2a f8 04 0d 2b 02  |....*..=0.*...+.|
00007530  15 dd 20 a4 6b 65 79 70  72 65 73 73 5f 53 65 74  |.. .keypress_Set|
00007540  75 70 0d 2b 0c 30 e7 20  6b 65 79 25 3d 26 31 38  |up.+.0. key%=&18|
00007550  45 20 84 20 6b 65 79 25  3d 31 33 20 80 20 69 63  |E . key%=13 . ic|
00007560  6f 6e 25 3d 32 20 8c 20  6e 65 77 69 63 6f 6e 25  |on%=2 . newicon%|
00007570  3d 35 0d 2b 16 37 e7 20  6b 65 79 25 3d 31 33 20  |=5.+.7. key%=13 |
00007580  80 20 69 63 6f 6e 25 3d  35 20 8c 20 69 63 6f 6e  |. icon%=5 . icon|
00007590  25 3d 31 3a 76 6f 69 64  3d a4 62 75 74 74 6f 6e  |%=1:void=.button|
000075a0  5f 53 65 74 75 70 3a 3d  30 0d 2b 20 26 e7 20 6b  |_Setup:=0.+ &. k|
000075b0  65 79 25 3d 26 31 38 45  20 80 20 69 63 6f 6e 25  |ey%=&18E . icon%|
000075c0  3d 35 20 8c 20 6e 65 77  69 63 6f 6e 25 3d 32 0d  |=5 . newicon%=2.|
000075d0  2b 2a 26 e7 20 6b 65 79  25 3d 26 31 38 46 20 80  |+*&. key%=&18F .|
000075e0  20 69 63 6f 6e 25 3d 35  20 8c 20 6e 65 77 69 63  | icon%=5 . newic|
000075f0  6f 6e 25 3d 32 0d 2b 34  26 e7 20 6b 65 79 25 3d  |on%=2.+4&. key%=|
00007600  26 31 38 46 20 80 20 69  63 6f 6e 25 3d 32 20 8c  |&18F . icon%=2 .|
00007610  20 6e 65 77 69 63 6f 6e  25 3d 35 0d 2b 35 44 e7  | newicon%=5.+5D.|
00007620  20 6b 65 79 25 3c 3e 31  33 20 80 20 6b 65 79 25  | key%<>13 . key%|
00007630  3c 3e 26 31 38 45 20 80  20 6b 65 79 25 3c 3e 26  |<>&18E . key%<>&|
00007640  31 38 46 20 8c 20 c8 99  20 22 57 69 6d 70 5f 50  |18F . .. "Wimp_P|
00007650  72 6f 63 65 73 73 4b 65  79 22 2c 6b 65 79 25 0d  |rocessKey",key%.|
00007660  2b 3e 51 f2 73 79 73 5f  63 6c 61 69 6d 69 6e 70  |+>Q.sys_claiminp|
00007670  75 74 66 6f 63 75 73 28  73 65 74 75 70 68 2c 6e  |utfocus(setuph,n|
00007680  65 77 69 63 6f 6e 25 2c  30 2c 30 2c 2d 31 2c a9  |ewicon%,0,0,-1,.|
00007690  28 a4 67 65 74 69 63 6f  6e 64 61 74 61 28 73 65  |(.geticondata(se|
000076a0  74 75 70 68 2c 6e 65 77  69 63 6f 6e 25 29 29 29  |tuph,newicon%)))|
000076b0  0d 2b 48 06 3d 30 0d 2b  52 04 0d 2b 5c 41 f4 20  |.+H.=0.+R..+\A. |
000076c0  2d 2d 2d 2d 2d 2d 20 54  68 65 20 60 6d 65 6e 75  |------ The `menu|
000076d0  60 20 72 6f 75 74 69 6e  65 73 20 74 6f 20 6f 70  |` routines to op|
000076e0  65 6e 20 74 68 65 20 73  65 6c 65 63 74 65 64 20  |en the selected |
000076f0  6d 65 6e 75 20 2d 2d 2d  2d 2d 2d 0d 2b 66 04 0d  |menu ------.+f..|
00007700  2b 70 0c dd 20 a4 6d 65  6e 75 5f 0d 2b 7a 06 3d  |+p.. .menu_.+z.=|
00007710  30 0d 2b 84 04 0d 2b 8e  10 dd 20 a4 6d 65 6e 75  |0.+...+... .menu|
00007720  5f 73 77 61 70 0d 2b 98  06 3d 30 0d 2b a2 04 0d  |_swap.+..=0.+...|
00007730  2b ac 13 dd 20 a4 6d 65  6e 75 5f 61 72 63 6c 6f  |+... .menu_arclo|
00007740  67 6f 0d 2b b6 06 3d 30  0d 2b c0 04 0d 2b ca 10  |go.+..=0.+...+..|
00007750  dd 20 a4 6d 65 6e 75 5f  69 6e 66 6f 0d 2b d4 06  |. .menu_info.+..|
00007760  3d 30 0d 2b de 04 0d 2b  e8 04 0d 2b f2 12 dd 20  |=0.+...+...+... |
00007770  a4 6d 65 6e 75 5f 64 69  73 6b 33 35 0d 2b fc 2c  |.menu_disk35.+.,|
00007780  c8 99 20 43 72 65 61 74  65 4d 2c 30 2c 64 69 73  |.. CreateM,0,dis|
00007790  6b 6d 65 6e 75 2c 6d 6f  75 73 65 78 25 2d 36 34  |kmenu,mousex%-64|
000077a0  2c 6d 6f 75 73 65 79 25  0d 2c 06 2c e7 20 6c 6f  |,mousey%.,.,. lo|
000077b0  61 64 65 64 24 3c 3e 22  22 20 8c 20 66 24 3d 70  |aded$<>"" . f$=p|
000077c0  61 74 68 24 20 8b 20 66  24 3d 22 41 6c 70 73 46  |ath$ . f$="AlpsF|
000077d0  69 6c 65 22 0d 2c 10 25  f2 63 68 61 6e 67 65 69  |ile".,.%.changei|
000077e0  63 6f 6e 28 73 61 76 65  68 61 6e 64 6c 65 2c 32  |con(savehandle,2|
000077f0  2c 66 24 2c 76 6f 69 64  29 0d 2c 1a 19 74 68 65  |,f$,void).,..the|
00007800  4c 61 73 74 4d 65 6e 75  3d 20 64 69 73 6b 6d 65  |LastMenu= diskme|
00007810  6e 75 0d 2c 24 20 63 6c  61 69 6d 6d 65 6e 75 24  |nu.,$ claimmenu$|
00007820  3d 22 64 69 73 6b 33 35  22 3a 74 69 63 6b 24 3d  |="disk35":tick$=|
00007830  22 22 0d 2c 2e 06 3d 30  0d 2c 38 04 0d 2c 42 04  |"".,..=0.,8..,B.|
00007840  0d 2c 4c 0f dd 20 a4 6d  65 6e 75 5f 6b 65 79 0d  |.,L.. .menu_key.|
00007850  2c 56 2b c8 99 20 43 72  65 61 74 65 4d 2c 30 2c  |,V+.. CreateM,0,|
00007860  6f 62 6a 6d 65 6e 75 2c  6d 6f 75 73 65 78 25 2d  |objmenu,mousex%-|
00007870  36 34 2c 6d 6f 75 73 65  79 25 0d 2c 60 19 74 68  |64,mousey%.,`.th|
00007880  65 4c 61 73 74 4d 65 6e  75 20 3d 20 6f 62 6a 6d  |eLastMenu = objm|
00007890  65 6e 75 0d 2c 6a 1d 63  6c 61 69 6d 6d 65 6e 75  |enu.,j.claimmenu|
000078a0  24 3d 22 6b 65 79 22 3a  74 69 63 6b 24 3d 22 22  |$="key":tick$=""|
000078b0  0d 2c 74 06 3d 30 0d 2c  7e 04 0d 2c 88 10 dd 20  |.,t.=0.,~..,... |
000078c0  a4 6d 65 6e 75 5f 64 6f  6f 72 0d 2c 92 2c c8 99  |.menu_door.,.,..|
000078d0  20 43 72 65 61 74 65 4d  2c 30 2c 72 6f 6f 6d 6d  | CreateM,0,roomm|
000078e0  65 6e 75 2c 6d 6f 75 73  65 78 25 2d 36 34 2c 6d  |enu,mousex%-64,m|
000078f0  6f 75 73 65 79 25 0d 2c  9c 1a 74 68 65 4c 61 73  |ousey%.,..theLas|
00007900  74 4d 65 6e 75 20 3d 20  72 6f 6f 6d 6d 65 6e 75  |tMenu = roommenu|
00007910  0d 2c a6 1e 63 6c 61 69  6d 6d 65 6e 75 24 3d 22  |.,..claimmenu$="|
00007920  64 6f 6f 72 22 3a 74 69  63 6b 24 3d 22 22 0d 2c  |door":tick$="".,|
00007930  b0 06 3d 30 0d 2c ba 04  0d 2c c4 11 dd 20 a4 6d  |..=0.,...,... .m|
00007940  65 6e 75 5f 71 75 69 6c  6c 0d 2c ce 18 24 65 6e  |enu_quill.,..$en|
00007950  64 5f 6d 73 67 25 3d c3  28 a4 6d 61 78 6d 73 67  |d_msg%=.(.maxmsg|
00007960  29 0d 2c d8 2c c8 99 20  43 72 65 61 74 65 4d 2c  |).,.,.. CreateM,|
00007970  30 2c 74 65 78 74 6d 65  6e 75 2c 6d 6f 75 73 65  |0,textmenu,mouse|
00007980  78 25 2d 36 34 2c 6d 6f  75 73 65 79 25 0d 2c e2  |x%-64,mousey%.,.|
00007990  1a 74 68 65 4c 61 73 74  4d 65 6e 75 20 3d 20 74  |.theLastMenu = t|
000079a0  65 78 74 6d 65 6e 75 0d  2c ec 1f 63 6c 61 69 6d  |extmenu.,..claim|
000079b0  6d 65 6e 75 24 3d 22 71  75 69 6c 6c 22 3a 74 69  |menu$="quill":ti|
000079c0  63 6b 24 3d 22 22 0d 2c  f6 06 3d 30 0d 2d 00 04  |ck$="".,..=0.-..|
000079d0  0d 2d 0a 04 0d 2d 14 13  dd 20 a4 6d 65 6e 75 5f  |.-...-... .menu_|
000079e0  6c 69 73 74 69 6e 67 0d  2d 1e 2c c8 99 20 43 72  |listing.-.,.. Cr|
000079f0  65 61 74 65 4d 2c 30 2c  70 72 6f 67 6d 65 6e 75  |eateM,0,progmenu|
00007a00  2c 6d 6f 75 73 65 78 25  2d 36 34 2c 6d 6f 75 73  |,mousex%-64,mous|
00007a10  65 79 25 0d 2d 28 1a 74  68 65 4c 61 73 74 4d 65  |ey%.-(.theLastMe|
00007a20  6e 75 20 3d 20 70 72 6f  67 6d 65 6e 75 0d 2d 32  |nu = progmenu.-2|
00007a30  21 63 6c 61 69 6d 6d 65  6e 75 24 3d 22 6c 69 73  |!claimmenu$="lis|
00007a40  74 69 6e 67 22 3a 74 69  63 6b 24 3d 22 22 0d 2d  |ting":tick$="".-|
00007a50  3c 06 3d 30 0d 2d 46 04  0d 2d 50 04 0d 2d 5a 13  |<.=0.-F..-P..-Z.|
00007a60  dd 20 a4 6d 65 6e 75 5f  63 68 61 72 64 65 73 0d  |. .menu_chardes.|
00007a70  2d 64 06 3d 30 0d 2d 6e  2c c8 99 20 43 72 65 61  |-d.=0.-n,.. Crea|
00007a80  74 65 4d 2c 30 2c 63 68  61 72 6d 65 6e 75 2c 6d  |teM,0,charmenu,m|
00007a90  6f 75 73 65 78 25 2d 36  34 2c 6d 6f 75 73 65 79  |ousex%-64,mousey|
00007aa0  25 0d 2d 78 1a 74 68 65  4c 61 73 74 4d 65 6e 75  |%.-x.theLastMenu|
00007ab0  20 3d 20 63 68 61 72 6d  65 6e 75 0d 2d 82 21 63  | = charmenu.-.!c|
00007ac0  6c 61 69 6d 6d 65 6e 75  24 3d 22 63 68 61 72 64  |laimmenu$="chard|
00007ad0  65 73 22 3a 74 69 63 6b  24 3d 22 22 0d 2d 8c 06  |es":tick$="".-..|
00007ae0  3d 30 0d 2d 96 04 0d 2d  a0 11 dd 20 a4 6d 65 6e  |=0.-...-... .men|
00007af0  75 5f 76 6f 63 61 62 0d  2d aa 2d c8 99 20 43 72  |u_vocab.-.-.. Cr|
00007b00  65 61 74 65 4d 2c 30 2c  76 6f 63 61 62 6d 65 6e  |eateM,0,vocabmen|
00007b10  75 2c 6d 6f 75 73 65 78  25 2d 36 34 2c 6d 6f 75  |u,mousex%-64,mou|
00007b20  73 65 79 25 0d 2d b4 1b  74 68 65 4c 61 73 74 4d  |sey%.-..theLastM|
00007b30  65 6e 75 20 3d 20 76 6f  63 61 62 6d 65 6e 75 0d  |enu = vocabmenu.|
00007b40  2d be 24 63 6c 61 69 6d  6d 65 6e 75 24 3d 22 76  |-.$claimmenu$="v|
00007b50  6f 63 61 62 75 6c 61 72  79 22 3a 74 69 63 6b 24  |ocabulary":tick$|
00007b60  3d 22 22 0d 2d c8 06 3d  30 0d 2d d2 04 0d 2d dc  |="".-..=0.-...-.|
00007b70  10 dd 20 a4 6d 65 6e 75  5f 66 61 63 65 0d 2d e6  |.. .menu_face.-.|
00007b80  2c c8 99 20 43 72 65 61  74 65 4d 2c 30 2c 66 61  |,.. CreateM,0,fa|
00007b90  63 65 6d 65 6e 75 2c 6d  6f 75 73 65 78 25 2d 36  |cemenu,mousex%-6|
00007ba0  34 2c 6d 6f 75 73 65 79  25 0d 2d f0 1a 74 68 65  |4,mousey%.-..the|
00007bb0  4c 61 73 74 4d 65 6e 75  20 3d 20 66 61 63 65 6d  |LastMenu = facem|
00007bc0  65 6e 75 0d 2d fa 20 63  6c 61 69 6d 6d 65 6e 75  |enu.-. claimmenu|
00007bd0  24 3d 22 61 63 74 6f 72  73 22 3a 74 69 63 6b 24  |$="actors":tick$|
00007be0  3d 22 22 0d 2e 04 06 3d  30 0d 2e 0e 04 0d 2e 18  |=""....=0.......|
00007bf0  10 dd 20 a4 6d 65 6e 75  5f 6d 69 73 63 0d 2e 22  |.. .menu_misc.."|
00007c00  15 6e 75 6c 6c 20 3d 20  a4 74 69 63 6b 5f 6d 69  |.null = .tick_mi|
00007c10  73 63 0d 2e 2c 3c c8 99  20 43 72 65 61 74 65 4d  |sc..,<.. CreateM|
00007c20  2c 30 2c 6d 69 73 63 6d  65 6e 75 2c 6d 6f 75 73  |,0,miscmenu,mous|
00007c30  65 78 25 2d 36 34 2c a4  6d 65 6e 75 48 65 69 67  |ex%-64,.menuHeig|
00007c40  68 74 28 6d 69 73 63 6d  65 6e 75 2c 31 29 0d 2e  |ht(miscmenu,1)..|
00007c50  36 1a 74 68 65 4c 61 73  74 4d 65 6e 75 20 3d 20  |6.theLastMenu = |
00007c60  6d 69 73 63 6d 65 6e 75  0d 2e 40 22 63 6c 61 69  |miscmenu..@"clai|
00007c70  6d 6d 65 6e 75 24 3d 22  6d 69 73 63 22 3a 74 69  |mmenu$="misc":ti|
00007c80  63 6b 24 3d 22 6d 69 73  63 22 0d 2e 4a 06 3d 30  |ck$="misc"..J.=0|
00007c90  0d 2e 54 04 0d 2e 5e 10  dd 20 a4 6d 65 6e 75 5f  |..T...^.. .menu_|
00007ca0  68 65 6c 70 0d 2e 68 06  3d 30 0d 2e 72 04 0d 2e  |help..h.=0..r...|
00007cb0  7c 04 0d 2e 86 0f dd 20  a4 6d 65 6e 75 5f 65 79  ||...... .menu_ey|
00007cc0  65 0d 2e 90 2b c8 99 20  43 72 65 61 74 65 4d 2c  |e...+.. CreateM,|
00007cd0  30 2c 70 69 78 6d 65 6e  75 2c 6d 6f 75 73 65 78  |0,pixmenu,mousex|
00007ce0  25 2d 36 34 2c 6d 6f 75  73 65 79 25 0d 2e 9a 19  |%-64,mousey%....|
00007cf0  74 68 65 4c 61 73 74 4d  65 6e 75 20 3d 20 70 69  |theLastMenu = pi|
00007d00  78 6d 65 6e 75 0d 2e a4  1d 63 6c 61 69 6d 6d 65  |xmenu....claimme|
00007d10  6e 75 24 3d 22 65 79 65  22 3a 74 69 63 6b 24 3d  |nu$="eye":tick$=|
00007d20  22 22 0d 2e ae 06 3d 30  0d 2e b8 04 0d 2e c2 04  |""....=0........|
00007d30  0d 2e cc 4a f4 20 60 6d  65 6e 75 73 65 6c 65 63  |...J. `menuselec|
00007d40  74 60 20 66 75 6e 63 74  69 6f 6e 73 20 2d 20 63  |t` functions - c|
00007d50  61 6c 6c 65 64 20 77 68  65 6e 20 61 20 73 65 6c  |alled when a sel|
00007d60  65 63 74 69 6f 6e 20 69  73 20 6d 61 64 65 20 66  |ection is made f|
00007d70  72 6f 6d 20 61 20 6d 65  6e 75 0d 2e d6 44 f4 20  |rom a menu...D. |
00007d80  60 69 74 65 6d 30 25 60  20 69 73 20 74 68 65 20  |`item0%` is the |
00007d90  6e 75 6d 62 65 72 20 6f  66 20 73 65 6c 65 63 74  |number of select|
00007da0  69 6f 6e 20 66 72 6f 6d  20 66 69 72 73 74 20 6d  |ion from first m|
00007db0  65 6e 75 20 28 30 2c 31  2c 32 2e 2e 2e 29 0d 2e  |enu (0,1,2...)..|
00007dc0  e0 45 f4 20 60 69 74 65  6d 31 25 60 20 69 73 20  |.E. `item1%` is |
00007dd0  74 68 65 20 6e 75 6d 62  65 72 20 6f 66 20 73 65  |the number of se|
00007de0  6c 65 63 74 69 6f 6e 20  66 72 6f 6d 20 73 65 63  |lection from sec|
00007df0  6f 6e 64 20 6d 65 6e 75  20 28 30 2c 31 2c 32 2e  |ond menu (0,1,2.|
00007e00  2e 2e 29 0d 2e ea 04 0d  2e f4 12 dd 20 a4 6d 65  |..)......... .me|
00007e10  6e 75 73 65 6c 65 63 74  5f 0d 2e fe 06 3d 30 0d  |nuselect_....=0.|
00007e20  2f 08 04 0d 2f 12 04 0d  2f 1c 19 dd 20 a4 6d 65  |/.../.../... .me|
00007e30  6e 75 73 65 6c 65 63 74  5f 6d 65 73 73 61 67 65  |nuselect_message|
00007e40  0d 2f 26 11 ea 20 63 68  61 6e 67 65 64 5f 6d 73  |./&.. changed_ms|
00007e50  67 0d 2f 30 04 0d 2f 3a  0f c8 8e 20 69 74 65 6d  |g./0../:... item|
00007e60  30 25 20 ca 0d 2f 44 0a  20 20 c9 20 2d 31 0d 2f  |0% ../D.  . -1./|
00007e70  4e 21 20 20 c9 20 30 2c  31 3a 6f 76 65 72 77 72  |N!  . 0,1:overwr|
00007e80  69 74 65 3d ac 20 6f 76  65 72 77 72 69 74 65 0d  |ite=. overwrite.|
00007e90  2f 58 26 20 20 c9 20 32  3a f2 63 75 74 28 6d 61  |/X&  . 2:.cut(ma|
00007ea0  72 6b 28 30 29 2c 6d 61  72 6b 28 31 29 2c 70 69  |rk(0),mark(1),pi|
00007eb0  63 62 75 66 29 0d 2f 62  27 20 20 c9 20 33 3a f2  |cbuf)./b'  . 3:.|
00007ec0  63 6f 70 79 28 6d 61 72  6b 28 30 29 2c 6d 61 72  |copy(mark(0),mar|
00007ed0  6b 28 31 29 2c 70 69 63  62 75 66 29 0d 2f 6c 22  |k(1),picbuf)./l"|
00007ee0  20 20 c9 20 34 3a f2 70  61 73 74 65 28 74 65 78  |  . 4:.paste(tex|
00007ef0  74 5f 70 74 72 25 2c 70  69 63 62 75 66 29 0d 2f  |t_ptr%,picbuf)./|
00007f00  76 13 20 20 c9 20 35 3a  f2 6e 65 78 74 5f 6d 73  |v.  . 5:.next_ms|
00007f10  67 0d 2f 80 13 20 20 c9  20 36 3a f2 70 72 65 76  |g./..  . 6:.prev|
00007f20  5f 6d 73 67 0d 2f 8a 14  20 20 c9 20 37 3a f2 66  |_msg./..  . 7:.f|
00007f30  69 72 73 74 5f 6d 73 67  0d 2f 94 13 20 20 c9 20  |irst_msg./..  . |
00007f40  38 3a f2 6c 61 73 74 5f  6d 73 67 0d 2f 9e 1f 20  |8:.last_msg./.. |
00007f50  20 c9 20 39 3a f2 67 6f  74 6f 5f 6d 73 67 28 bb  | . 9:.goto_msg(.|
00007f60  28 24 6d 5f 6d 73 67 25  29 29 0d 2f a8 0a 20 20  |($m_msg%))./..  |
00007f70  c9 20 31 30 0d 2f b2 13  20 20 e7 20 69 74 65 6d  |. 10./..  . item|
00007f80  31 25 3e 2d 31 20 8c 0d  2f bc 14 20 20 20 20 e7  |1%>-1 ../..    .|
00007f90  20 69 74 65 6d 31 25 3d  30 20 8c 0d 2f c6 19 20  | item1%=0 ../.. |
00007fa0  20 20 20 20 20 e3 20 49  25 3d 30 20 b8 20 6d 61  |     . I%=0 . ma|
00007fb0  78 73 77 25 0d 2f d0 1d  20 20 20 20 20 20 20 20  |xsw%./..        |
00007fc0  73 77 69 74 63 68 5f 76  61 6c 73 28 49 25 29 3d  |switch_vals(I%)=|
00007fd0  30 0d 2f da 0e 20 20 20  20 20 20 ed 20 49 25 0d  |0./..      . I%.|
00007fe0  2f e4 09 20 20 20 20 cd  0d 2f ee 37 20 20 20 20  |/..    ../.7    |
00007ff0  73 77 69 74 63 68 5f 76  61 6c 73 28 69 74 65 6d  |switch_vals(item|
00008000  31 25 29 3d bb 28 24 28  73 77 64 61 74 61 25 2b  |1%)=.($(swdata%+|
00008010  31 32 2a 28 69 74 65 6d  31 25 2d 31 29 29 29 0d  |12*(item1%-1))).|
00008020  2f f8 37 20 20 20 20 e7  20 69 74 65 6d 31 25 3e  |/.7    . item1%>|
00008030  73 77 69 74 63 68 5f 76  61 6c 73 28 30 29 20 8c  |switch_vals(0) .|
00008040  20 73 77 69 74 63 68 5f  76 61 6c 73 28 30 29 3d  | switch_vals(0)=|
00008050  69 74 65 6d 31 25 0d 30  02 36 20 20 20 20 f4 20  |item1%.0.6    . |
00008060  73 77 69 74 63 68 5f 76  61 6c 73 28 30 29 20 73  |switch_vals(0) s|
00008070  74 6f 72 65 73 20 74 68  65 20 6e 75 6d 62 65 72  |tores the number|
00008080  20 6f 66 20 73 77 69 74  63 68 65 73 0d 30 0c 07  | of switches.0..|
00008090  20 20 cd 0d 30 16 0a 20  20 c9 20 31 31 0d 30 20  |  ..0..  . 11.0 |
000080a0  0d 20 20 2a 46 58 33 2c  31 30 0d 30 2a 16 20 20  |.  *FX3,10.0*.  |
000080b0  f2 70 72 69 6e 74 5f 6d  73 67 28 6d 70 74 72 29  |.print_msg(mptr)|
000080c0  0d 30 34 0c 20 20 2a 46  58 33 2c 30 0d 30 3e 05  |.04.  *FX3,0.0>.|
000080d0  cb 0d 30 48 17 f2 66 6f  72 63 65 52 28 74 65 78  |..0H..forceR(tex|
000080e0  74 68 61 6e 64 6c 65 29  0d 30 52 13 e7 20 63 68  |thandle).0R.. ch|
000080f0  61 6e 67 65 64 5f 6d 73  67 20 8c 0d 30 5c 1b 74  |anged_msg ..0\.t|
00008100  65 78 74 5f 72 6f 77 25  3d 30 3a 74 65 78 74 5f  |ext_row%=0:text_|
00008110  63 6f 6c 25 3d 31 0d 30  66 10 f2 63 75 72 73 6f  |col%=1.0f..curso|
00008120  72 28 31 2c 30 29 0d 30  70 05 cd 0d 30 7a 13 f4  |r(1,0).0p...0z..|
00008130  20 63 6c 61 69 6d 6d 65  6e 75 24 3d 22 22 0d 30  | claimmenu$="".0|
00008140  84 06 3d 30 0d 30 8e 04  0d 30 98 19 dd 20 f2 63  |..=0.0...0... .c|
00008150  75 74 28 73 74 61 72 74  2c 65 6e 64 2c 62 75 66  |ut(start,end,buf|
00008160  29 0d 30 a2 1c e7 20 6d  72 6b 3c 32 20 8c 20 85  |).0... mrk<2 . .|
00008170  20 31 2c 65 72 72 6f 72  24 28 32 39 29 0d 30 ac  | 1,error$(29).0.|
00008180  51 e7 20 65 6e 64 3c 73  74 61 72 74 20 8c 20 c8  |Q. end<start . .|
00008190  94 20 73 74 61 72 74 2c  65 6e 64 3a c8 94 20 63  |. start,end:.. c|
000081a0  6f 6c 28 30 29 2c 63 6f  6c 28 31 29 3a c8 94 20  |ol(0),col(1):.. |
000081b0  72 6f 77 28 30 29 2c 72  6f 77 28 31 29 3a c8 94  |row(0),row(1):..|
000081c0  20 61 73 63 28 30 29 2c  61 73 63 28 31 29 0d 30  | asc(0),asc(1).0|
000081d0  b6 17 63 6c 69 70 6c 65  6e 3d 65 6e 64 2d 73 74  |..cliplen=end-st|
000081e0  61 72 74 2b 31 0d 30 c0  1c f2 6d 6f 76 65 28 73  |art+1.0...move(s|
000081f0  74 61 72 74 2c 62 75 66  2c 63 6c 69 70 6c 65 6e  |tart,buf,cliplen|
00008200  29 0d 30 ca 26 f4 20 53  59 53 22 57 69 6d 70 5f  |).0.&. SYS"Wimp_|
00008210  43 6c 6f 73 65 44 6f 77  6e 22 3a 4d 4f 44 45 20  |CloseDown":MODE |
00008220  31 32 3a 53 54 4f 50 0d  30 d4 3b f2 6d 6f 76 65  |12:STOP.0.;.move|
00008230  28 65 6e 64 2b 31 2c 73  74 61 72 74 2c 74 65 78  |(end+1,start,tex|
00008240  74 5f 65 6e 64 25 2d 65  6e 64 29 3a f4 20 77 61  |t_end%-end):. wa|
00008250  73 20 2b 31 20 75 6e 74  69 6c 20 31 36 2e 36 2e  |s +1 until 16.6.|
00008260  38 39 0d 30 de 26 3f 62  75 66 3d 61 73 63 28 30  |89.0.&?buf=asc(0|
00008270  29 3a 62 75 66 3f 28 63  6c 69 70 6c 65 6e 2d 31  |):buf?(cliplen-1|
00008280  29 3d 61 73 63 28 31 29  0d 30 e8 1f 74 65 78 74  |)=asc(1).0..text|
00008290  5f 65 6e 64 25 3d 74 65  78 74 5f 65 6e 64 25 2d  |_end%=text_end%-|
000082a0  63 6c 69 70 6c 65 6e 0d  30 f2 1d e7 20 61 73 63  |cliplen.0... asc|
000082b0  28 31 29 3d 30 20 8c 20  74 65 78 74 5f 65 6e 64  |(1)=0 . text_end|
000082c0  25 2b 3d 31 0d 30 fc 2b  f4 20 52 65 73 74 6f 72  |%+=1.0.+. Restor|
000082d0  65 20 65 6e 64 20 6d 61  72 6b 65 72 20 69 66 20  |e end marker if |
000082e0  69 74 20 68 61 73 20 62  65 65 6e 20 63 75 74 0d  |it has been cut.|
000082f0  31 06 33 e7 20 74 65 78  74 5f 65 6e 64 25 3c 74  |1.3. text_end%<t|
00008300  65 78 74 5f 62 6c 6f 63  6b 25 20 8c 20 74 65 78  |ext_block% . tex|
00008310  74 5f 65 6e 64 25 3d 74  65 78 74 5f 62 6c 6f 63  |t_end%=text_bloc|
00008320  6b 25 0d 31 10 10 3f 74  65 78 74 5f 65 6e 64 25  |k%.1..?text_end%|
00008330  3d 30 0d 31 1a 1b 6c 61  73 74 5f 72 6f 77 25 3d  |=0.1..last_row%=|
00008340  a4 66 69 6e 64 5f 6c 61  73 74 72 6f 77 0d 31 24  |.find_lastrow.1$|
00008350  16 e3 20 49 25 3d 30 20  b8 20 6c 61 73 74 5f 72  |.. I%=0 . last_r|
00008360  6f 77 25 0d 31 2e 1e 74  65 78 74 5f 72 6f 77 6c  |ow%.1..text_rowl|
00008370  65 6e 25 28 49 25 29 3d  a9 a4 72 6f 77 28 49 25  |en%(I%)=..row(I%|
00008380  29 0d 31 38 05 ed 0d 31  42 13 6d 72 6b 3d 30 3a  |).18...1B.mrk=0:|
00008390  6d 61 72 6b 28 29 3d 2b  30 0d 31 4c 2f e7 20 74  |mark()=+0.1L/. t|
000083a0  65 78 74 5f 72 6f 77 25  3e 6c 61 73 74 5f 72 6f  |ext_row%>last_ro|
000083b0  77 25 20 8c 20 74 65 78  74 5f 72 6f 77 25 3d 6c  |w% . text_row%=l|
000083c0  61 73 74 5f 72 6f 77 25  0d 31 56 4d e7 20 74 65  |ast_row%.1VM. te|
000083d0  78 74 5f 63 6f 6c 25 3e  74 65 78 74 5f 72 6f 77  |xt_col%>text_row|
000083e0  6c 65 6e 25 28 74 65 78  74 5f 72 6f 77 25 29 20  |len%(text_row%) |
000083f0  8c 20 74 65 78 74 5f 63  6f 6c 25 3d 74 65 78 74  |. text_col%=text|
00008400  5f 72 6f 77 6c 65 6e 25  28 74 65 78 74 5f 72 6f  |_rowlen%(text_ro|
00008410  77 25 29 2b 31 0d 31 60  2c f2 6c 6f 63 61 74 65  |w%)+1.1`,.locate|
00008420  5f 70 74 72 3a f2 63 75  72 73 6f 72 28 74 65 78  |_ptr:.cursor(tex|
00008430  74 5f 63 6f 6c 25 2c 74  65 78 74 5f 72 6f 77 25  |t_col%,text_row%|
00008440  29 0d 31 6a 1a 64 61 74  61 5f 73 61 76 65 64 3d  |).1j.data_saved=|
00008450  a3 3a 74 65 78 74 5f 6f  6b 3d a3 0d 31 74 05 e1  |.:text_ok=..1t..|
00008460  0d 31 7e 04 0d 31 88 1a  dd 20 f2 63 6f 70 79 28  |.1~..1... .copy(|
00008470  73 74 61 72 74 2c 65 6e  64 2c 62 75 66 29 0d 31  |start,end,buf).1|
00008480  92 1c e7 20 6d 72 6b 3c  32 20 8c 20 85 20 31 2c  |... mrk<2 . . 1,|
00008490  65 72 72 6f 72 24 28 32  39 29 0d 31 9c 51 e7 20  |error$(29).1.Q. |
000084a0  65 6e 64 3c 73 74 61 72  74 20 8c 20 c8 94 20 73  |end<start . .. s|
000084b0  74 61 72 74 2c 65 6e 64  3a c8 94 20 63 6f 6c 28  |tart,end:.. col(|
000084c0  30 29 2c 63 6f 6c 28 31  29 3a c8 94 20 72 6f 77  |0),col(1):.. row|
000084d0  28 30 29 2c 72 6f 77 28  31 29 3a c8 94 20 61 73  |(0),row(1):.. as|
000084e0  63 28 30 29 2c 61 73 63  28 31 29 0d 31 a6 17 63  |c(0),asc(1).1..c|
000084f0  6c 69 70 6c 65 6e 3d 65  6e 64 2b 31 2d 73 74 61  |liplen=end+1-sta|
00008500  72 74 0d 31 b0 1c f2 6d  6f 76 65 28 73 74 61 72  |rt.1...move(star|
00008510  74 2c 62 75 66 2c 63 6c  69 70 6c 65 6e 29 0d 31  |t,buf,cliplen).1|
00008520  ba 26 3f 62 75 66 3d 61  73 63 28 30 29 3a 62 75  |.&?buf=asc(0):bu|
00008530  66 3f 28 63 6c 69 70 6c  65 6e 2d 31 29 3d 61 73  |f?(cliplen-1)=as|
00008540  63 28 31 29 0d 31 c4 2d  3f 73 74 61 72 74 3d 61  |c(1).1.-?start=a|
00008550  73 63 28 30 29 3a 3f 65  6e 64 3d 61 73 63 28 31  |sc(0):?end=asc(1|
00008560  29 3a 6d 72 6b 3d 30 3a  6d 61 72 6b 28 29 3d 2b  |):mrk=0:mark()=+|
00008570  30 0d 31 ce 05 e1 0d 31  d8 04 0d 31 e2 15 dd 20  |0.1....1...1... |
00008580  f2 70 61 73 74 65 28 74  6f 2c 66 72 6f 6d 29 0d  |.paste(to,from).|
00008590  31 ec 20 e7 20 63 6c 69  70 6c 65 6e 3d 30 20 8c  |1. . cliplen=0 .|
000085a0  20 85 20 31 2c 65 72 72  6f 72 24 28 33 30 29 0d  | . 1,error$(30).|
000085b0  31 f6 27 f2 6d 6f 76 65  28 74 6f 2c 74 6f 2b 63  |1.'.move(to,to+c|
000085c0  6c 69 70 6c 65 6e 2c 74  65 78 74 5f 65 6e 64 25  |liplen,text_end%|
000085d0  2d 74 6f 2b 31 29 0d 32  00 1a f2 6d 6f 76 65 28  |-to+1).2...move(|
000085e0  66 72 6f 6d 2c 74 6f 2c  63 6c 69 70 6c 65 6e 29  |from,to,cliplen)|
000085f0  0d 32 0a 16 74 65 78 74  5f 65 6e 64 25 2b 3d 63  |.2..text_end%+=c|
00008600  6c 69 70 6c 65 6e 0d 32  14 1b 6c 61 73 74 5f 72  |liplen.2..last_r|
00008610  6f 77 25 3d a4 66 69 6e  64 5f 6c 61 73 74 72 6f  |ow%=.find_lastro|
00008620  77 0d 32 1e 16 e3 20 49  25 3d 30 20 b8 20 6c 61  |w.2... I%=0 . la|
00008630  73 74 5f 72 6f 77 25 0d  32 28 1e 74 65 78 74 5f  |st_row%.2(.text_|
00008640  72 6f 77 6c 65 6e 25 28  49 25 29 3d a9 a4 72 6f  |rowlen%(I%)=..ro|
00008650  77 28 49 25 29 0d 32 32  05 ed 0d 32 3c 2c f2 6c  |w(I%).22...2<,.l|
00008660  6f 63 61 74 65 5f 70 74  72 3a f2 63 75 72 73 6f  |ocate_ptr:.curso|
00008670  72 28 74 65 78 74 5f 63  6f 6c 25 2c 74 65 78 74  |r(text_col%,text|
00008680  5f 72 6f 77 25 29 0d 32  46 1a 64 61 74 61 5f 73  |_row%).2F.data_s|
00008690  61 76 65 64 3d a3 3a 74  65 78 74 5f 6f 6b 3d a3  |aved=.:text_ok=.|
000086a0  0d 32 50 05 e1 0d 32 5a  04 0d 32 64 19 dd 20 a4  |.2P...2Z..2d.. .|
000086b0  6d 65 6e 75 73 65 6c 65  63 74 5f 70 72 6f 67 72  |menuselect_progr|
000086c0  61 6d 0d 32 6e 0d 65 72  72 66 6c 61 67 3d a3 0d  |am.2n.errflag=..|
000086d0  32 78 1b e7 20 69 74 65  6d 30 25 3e 34 20 80 20  |2x.. item0%>4 . |
000086e0  69 74 65 6d 30 25 3c 39  20 8c 0d 32 82 13 f2 72  |item0%<9 ..2...r|
000086f0  65 6d 6f 76 65 5f 6d 61  72 6b 65 72 73 0d 32 8c  |emove_markers.2.|
00008700  1d e7 20 ac 20 74 65 78  74 5f 6f 6b 20 8c 20 f2  |.. . text_ok . .|
00008710  73 74 6f 72 65 5f 70 72  6f 67 0d 32 96 15 70 72  |store_prog.2..pr|
00008720  67 5f 73 65 6c 25 3d 69  74 65 6d 30 25 2d 33 0d  |g_sel%=item0%-3.|
00008730  32 a0 1b 74 65 78 74 5f  72 6f 77 25 3d 30 3a 74  |2..text_row%=0:t|
00008740  65 78 74 5f 63 6f 6c 25  3d 31 0d 32 aa 10 f2 63  |ext_col%=1.2...c|
00008750  75 72 73 6f 72 28 31 2c  30 29 0d 32 b4 05 cd 0d  |ursor(1,0).2....|
00008760  32 be 04 0d 32 c8 0f c8  8e 20 69 74 65 6d 30 25  |2...2.... item0%|
00008770  20 ca 0d 32 d2 1f c9 20  30 2c 31 3a 6f 76 65 72  | ..2... 0,1:over|
00008780  77 72 69 74 65 3d ac 20  6f 76 65 72 77 72 69 74  |write=. overwrit|
00008790  65 0d 32 dc 24 c9 20 32  3a f2 63 75 74 28 6d 61  |e.2.$. 2:.cut(ma|
000087a0  72 6b 28 30 29 2c 6d 61  72 6b 28 31 29 2c 70 69  |rk(0),mark(1),pi|
000087b0  63 62 75 66 29 0d 32 e6  25 c9 20 33 3a f2 63 6f  |cbuf).2.%. 3:.co|
000087c0  70 79 28 6d 61 72 6b 28  30 29 2c 6d 61 72 6b 28  |py(mark(0),mark(|
000087d0  31 29 2c 70 69 63 62 75  66 29 0d 32 f0 20 c9 20  |1),picbuf).2. . |
000087e0  34 3a f2 70 61 73 74 65  28 74 65 78 74 5f 70 74  |4:.paste(text_pt|
000087f0  72 25 2c 70 69 63 62 75  66 29 0d 32 fa 13 c9 20  |r%,picbuf).2... |
00008800  35 3a 70 72 6f 67 76 61  6c 24 3d 22 22 0d 33 04  |5:progval$="".3.|
00008810  17 c9 20 36 3a 70 72 6f  67 76 61 6c 24 3d 24 70  |.. 6:progval$=$p|
00008820  72 6f 63 25 0d 33 0e 16  c9 20 37 3a 70 72 6f 67  |roc%.3... 7:prog|
00008830  76 61 6c 24 3d 24 64 65  66 25 0d 33 18 17 c9 20  |val$=$def%.3... |
00008840  38 3a 70 72 6f 67 76 61  6c 24 3d 24 65 78 69 74  |8:progval$=$exit|
00008850  25 0d 33 22 17 c9 20 39  3a f2 70 72 69 6e 74 5f  |%.3".. 9:.print_|
00008860  70 72 6f 67 5f 73 65 67  0d 33 2c 0f c9 20 31 30  |prog_seg.3,.. 10|
00008870  3a f2 6c 69 73 74 6f 0d  33 36 05 cb 0d 33 40 04  |:.listo.36...3@.|
00008880  0d 33 4a 1d e7 20 28 69  74 65 6d 30 25 3e 34 20  |.3J.. (item0%>4 |
00008890  80 20 69 74 65 6d 30 25  3c 39 29 20 8c 0d 33 54  |. item0%<9) ..3T|
000088a0  12 20 e7 20 ac 20 65 72  72 66 6c 61 67 20 8c 0d  |. . . errflag ..|
000088b0  33 5e 1e 20 20 f2 6c 69  73 74 28 69 74 65 6d 30  |3^.  .list(item0|
000088c0  25 2d 33 2c 70 72 6f 67  76 61 6c 24 29 0d 33 68  |%-3,progval$).3h|
000088d0  19 20 20 f2 66 6f 72 63  65 52 28 74 65 78 74 68  |.  .forceR(texth|
000088e0  61 6e 64 6c 65 29 0d 33  72 06 20 cd 0d 33 7c 05  |andle).3r. ..3|.|
000088f0  cd 0d 33 86 1d e7 20 28  69 74 65 6d 30 25 3e 31  |..3... (item0%>1|
00008900  20 80 20 69 74 65 6d 30  25 3c 35 29 20 8c 0d 33  | . item0%<5) ..3|
00008910  90 17 f2 66 6f 72 63 65  52 28 74 65 78 74 68 61  |...forceR(textha|
00008920  6e 64 6c 65 29 0d 33 9a  05 cd 0d 33 a4 11 e7 20  |ndle).3....3... |
00008930  69 74 65 6d 30 25 3d 31  30 20 8c 0d 33 ae 1d e7  |item0%=10 ..3...|
00008940  20 ac 20 74 65 78 74 5f  6f 6b 20 8c 20 f2 73 74  | . text_ok . .st|
00008950  6f 72 65 5f 70 72 6f 67  0d 33 b8 11 e7 20 ac 20  |ore_prog.3... . |
00008960  65 72 72 66 6c 61 67 20  8c 0d 33 c2 1b 74 65 78  |errflag ..3..tex|
00008970  74 5f 72 6f 77 25 3d 30  3a 74 65 78 74 5f 63 6f  |t_row%=0:text_co|
00008980  6c 25 3d 31 0d 33 cc 10  f2 63 75 72 73 6f 72 28  |l%=1.3...cursor(|
00008990  31 2c 30 29 0d 33 d6 1c  f2 6c 69 73 74 28 70 72  |1,0).3...list(pr|
000089a0  67 5f 73 65 6c 25 2c 70  72 6f 67 76 61 6c 24 29  |g_sel%,progval$)|
000089b0  0d 33 e0 17 f2 66 6f 72  63 65 52 28 74 65 78 74  |.3...forceR(text|
000089c0  68 61 6e 64 6c 65 29 0d  33 ea 05 cd 0d 33 f4 05  |handle).3....3..|
000089d0  cd 0d 33 fe 06 3d 30 0d  34 08 04 0d 34 12 17 dd  |..3..=0.4...4...|
000089e0  20 a4 6d 65 6e 75 73 65  6c 65 63 74 5f 76 6f 63  | .menuselect_voc|
000089f0  61 62 0d 34 1c 36 f4 20  4d 61 6b 65 20 61 20 73  |ab.4.6. Make a s|
00008a00  65 6c 65 63 74 69 6f 6e  20 66 72 6f 6d 20 74 68  |election from th|
00008a10  65 20 76 6f 63 61 62 75  6c 61 72 79 20 65 64 69  |e vocabulary edi|
00008a20  74 6f 72 20 6d 65 6e 75  0d 34 26 0f c8 8e 20 69  |tor menu.4&... i|
00008a30  74 65 6d 30 25 20 ca 0d  34 30 1f c9 20 30 2c 31  |tem0% ..40.. 0,1|
00008a40  3a 6f 76 65 72 77 72 69  74 65 3d ac 20 6f 76 65  |:overwrite=. ove|
00008a50  72 77 72 69 74 65 0d 34  3a 24 c9 20 32 3a f2 63  |rwrite.4:$. 2:.c|
00008a60  75 74 28 6d 61 72 6b 28  30 29 2c 6d 61 72 6b 28  |ut(mark(0),mark(|
00008a70  31 29 2c 70 69 63 62 75  66 29 0d 34 44 25 c9 20  |1),picbuf).4D%. |
00008a80  33 3a f2 63 6f 70 79 28  6d 61 72 6b 28 30 29 2c  |3:.copy(mark(0),|
00008a90  6d 61 72 6b 28 31 29 2c  70 69 63 62 75 66 29 0d  |mark(1),picbuf).|
00008aa0  34 4e 20 c9 20 34 3a f2  70 61 73 74 65 28 74 65  |4N . 4:.paste(te|
00008ab0  78 74 5f 70 74 72 25 2c  70 69 63 62 75 66 29 0d  |xt_ptr%,picbuf).|
00008ac0  34 58 15 c9 20 35 2c 36  2c 37 2c 38 2c 39 2c 31  |4X.. 5,6,7,8,9,1|
00008ad0  30 2c 31 31 0d 34 62 24  f2 72 65 6d 6f 76 65 5f  |0,11.4b$.remove_|
00008ae0  6d 61 72 6b 65 72 73 3a  f4 20 41 64 64 65 64 20  |markers:. Added |
00008af0  32 33 2e 30 38 2e 38 39  0d 34 6c 1e e7 20 ac 20  |23.08.89.4l.. . |
00008b00  74 65 78 74 5f 6f 6b 20  8c 20 f2 73 74 6f 72 65  |text_ok . .store|
00008b10  5f 76 6f 63 61 62 0d 34  76 11 e7 20 ac 20 65 72  |_vocab.4v.. . er|
00008b20  72 66 6c 61 67 20 8c 0d  34 80 16 76 6f 63 5f 73  |rflag ..4..voc_s|
00008b30  65 63 74 25 3d 69 74 65  6d 30 25 2d 34 0d 34 8a  |ect%=item0%-4.4.|
00008b40  1a f2 6c 69 73 74 5f 76  6f 63 61 62 28 76 6f 63  |..list_vocab(voc|
00008b50  5f 73 65 63 74 25 29 0d  34 94 1b 74 65 78 74 5f  |_sect%).4..text_|
00008b60  72 6f 77 25 3d 30 3a 74  65 78 74 5f 63 6f 6c 25  |row%=0:text_col%|
00008b70  3d 31 0d 34 9e 10 f2 63  75 72 73 6f 72 28 31 2c  |=1.4...cursor(1,|
00008b80  30 29 0d 34 a8 05 cd 0d  34 b2 18 c9 20 31 32 3a  |0).4....4... 12:|
00008b90  f2 70 72 69 6e 74 5f 70  72 6f 67 5f 73 65 67 0d  |.print_prog_seg.|
00008ba0  34 bc 05 cb 0d 34 c6 0f  c8 8e 20 69 74 65 6d 30  |4....4.... item0|
00008bb0  25 20 ca 0d 34 d0 1b c9  20 32 2c 33 2c 34 2c 35  |% ..4... 2,3,4,5|
00008bc0  2c 36 2c 37 2c 38 2c 39  2c 31 30 2c 31 31 0d 34  |,6,7,8,9,10,11.4|
00008bd0  da 17 f2 66 6f 72 63 65  52 28 74 65 78 74 68 61  |...forceR(textha|
00008be0  6e 64 6c 65 29 0d 34 e4  05 cb 0d 34 ee 13 f4 20  |ndle).4....4... |
00008bf0  63 6c 61 69 6d 6d 65 6e  75 24 3d 22 22 0d 34 f8  |claimmenu$="".4.|
00008c00  06 3d 30 0d 35 02 04 0d  35 0c 1a dd 20 a4 6d 65  |.=0.5...5... .me|
00008c10  6e 75 73 65 6c 65 63 74  5f 65 78 69 74 65 64 69  |nuselect_exitedi|
00008c20  74 0d 35 16 0b 78 65 72  72 25 3d a3 0d 35 20 15  |t.5..xerr%=..5 .|
00008c30  e7 20 6f 6c 64 72 6d 69  63 6f 6e 25 3c 3e 30 20  |. oldrmicon%<>0 |
00008c40  8c 0d 35 2a 29 20 20 70  74 72 25 3d 28 72 64 61  |..5*)  ptr%=(rda|
00008c50  74 61 25 2b 72 70 74 72  2a 72 5f 6c 65 6e 2b 6f  |ta%+rptr*r_len+o|
00008c60  6c 64 72 6d 69 63 6f 6e  25 29 0d 35 34 12 20 20  |ldrmicon%).54.  |
00008c70  66 6c 61 67 73 25 3d 3f  70 74 72 25 0d 35 3e 1b  |flags%=?ptr%.5>.|
00008c80  20 20 63 6c 5f 64 6f 6f  72 25 3d 66 6c 61 67 73  |  cl_door%=flags|
00008c90  25 20 80 20 26 34 30 0d  35 48 1b 20 20 6f 70 5f  |% . &40.5H.  op_|
00008ca0  64 6f 6f 72 25 3d 66 6c  61 67 73 25 20 80 20 26  |door%=flags% . &|
00008cb0  32 30 0d 35 52 1b 20 20  6c 6b 5f 64 6f 6f 72 25  |20.5R.  lk_door%|
00008cc0  3d 66 6c 61 67 73 25 20  80 20 26 31 30 0d 35 5c  |=flags% . &10.5\|
00008cd0  1c 20 20 75 6e 6c 6b 5f  64 6f 6f 72 25 3d 66 6c  |.  unlk_door%=fl|
00008ce0  61 67 73 25 20 80 20 26  38 0d 35 66 25 20 20 e7  |ags% . &8.5f%  .|
00008cf0  20 63 6c 5f 64 6f 6f 72  25 20 80 20 69 74 65 6d  | cl_door% . item|
00008d00  30 25 3d 32 20 8c 20 78  65 72 72 25 3d b9 0d 35  |0%=2 . xerr%=..5|
00008d10  70 25 20 20 e7 20 6f 70  5f 64 6f 6f 72 25 20 80  |p%  . op_door% .|
00008d20  20 69 74 65 6d 30 25 3d  31 20 8c 20 78 65 72 72  | item0%=1 . xerr|
00008d30  25 3d b9 0d 35 7a 25 20  20 e7 20 6f 70 5f 64 6f  |%=..5z%  . op_do|
00008d40  6f 72 25 20 80 20 69 74  65 6d 30 25 3d 33 20 8c  |or% . item0%=3 .|
00008d50  20 78 65 72 72 25 3d b9  0d 35 84 27 20 20 e7 20  | xerr%=..5.'  . |
00008d60  75 6e 6c 6b 5f 64 6f 6f  72 25 20 80 20 69 74 65  |unlk_door% . ite|
00008d70  6d 30 25 3d 33 20 8c 20  78 65 72 72 25 3d b9 0d  |m0%=3 . xerr%=..|
00008d80  35 8e 25 20 20 e7 20 6c  6b 5f 64 6f 6f 72 25 20  |5.%  . lk_door% |
00008d90  80 20 69 74 65 6d 30 25  3d 34 20 8c 20 78 65 72  |. item0%=4 . xer|
00008da0  72 25 3d b9 0d 35 98 25  20 20 e7 20 6c 6b 5f 64  |r%=..5.%  . lk_d|
00008db0  6f 6f 72 25 20 80 20 69  74 65 6d 30 25 3d 32 20  |oor% . item0%=2 |
00008dc0  8c 20 78 65 72 72 25 3d  b9 0d 35 a2 0f 20 20 e7  |. xerr%=..5..  .|
00008dd0  20 78 65 72 72 25 20 8c  0d 35 ac 0b 20 20 20 20  | xerr% ..5..    |
00008de0  ef 20 37 0d 35 b6 07 20  20 cc 0d 35 c0 23 20 20  |. 7.5..  ..5.#  |
00008df0  3f 70 74 72 25 3d 3f 70  74 72 25 20 82 20 28 26  |?ptr%=?ptr% . (&|
00008e00  38 30 20 3e 3e 20 69 74  65 6d 30 25 29 0d 35 ca  |80 >> item0%).5.|
00008e10  1f 20 20 e7 20 ac 20 6c  6b 5f 64 6f 6f 72 25 20  |.  . . lk_door% |
00008e20  80 20 69 74 65 6d 30 25  3d 33 20 8c 0d 35 d4 2b  |. item0%=3 ..5.+|
00008e30  20 20 20 20 3f 70 74 72  25 3d 3f 70 74 72 25 20  |    ?ptr%=?ptr% |
00008e40  80 20 25 31 31 30 31 31  31 31 31 20 84 20 25 30  |. %11011111 . %0|
00008e50  31 30 30 30 30 30 30 0d  35 de 07 20 20 cd 0d 35  |1000000.5..  ..5|
00008e60  e8 1d 20 20 e7 20 6c 6b  5f 64 6f 6f 72 25 20 80  |..  . lk_door% .|
00008e70  20 69 74 65 6d 30 25 3d  31 20 8c 0d 35 f2 1f 20  | item0%=1 ..5.. |
00008e80  20 20 20 3f 70 74 72 25  3d 3f 70 74 72 25 20 80  |   ?ptr%=?ptr% .|
00008e90  20 25 31 31 31 30 31 31  31 31 0d 35 fc 07 20 20  | %11101111.5..  |
00008ea0  cd 0d 36 06 07 20 20 cd  0d 36 10 12 20 20 64 61  |..6..  ..6..  da|
00008eb0  74 61 5f 73 61 76 65 64  3d a3 0d 36 1a 05 cd 0d  |ta_saved=..6....|
00008ec0  36 24 13 f4 20 63 6c 61  69 6d 6d 65 6e 75 24 3d  |6$.. claimmenu$=|
00008ed0  22 22 0d 36 2e 06 3d 30  0d 36 38 04 0d 36 42 18  |"".6..=0.68..6B.|
00008ee0  dd 20 a4 6d 65 6e 75 73  65 6c 65 63 74 5f 64 69  |. .menuselect_di|
00008ef0  73 6b 33 35 0d 36 4c 0f  c8 8e 20 69 74 65 6d 30  |sk35.6L... item0|
00008f00  25 20 ca 0d 36 56 09 20  20 c9 20 30 0d 36 60 28  |% ..6V.  . 0.6`(|
00008f10  20 20 20 20 70 61 74 68  24 3d a4 67 65 74 69 63  |    path$=.getic|
00008f20  6f 6e 64 61 74 61 28 73  61 76 65 68 61 6e 64 6c  |ondata(savehandl|
00008f30  65 2c 32 29 0d 36 6a 24  20 20 20 20 c8 99 20 22  |e,2).6j$    .. "|
00008f40  4f 53 5f 46 69 6c 65 22  2c 35 2c 70 61 74 68 24  |OS_File",5,path$|
00008f50  20 b8 20 66 74 79 70 65  0d 36 74 65 20 20 20 20  | . ftype.6te    |
00008f60  e7 20 66 74 79 70 65 3d  30 20 8c 20 f2 73 61 76  |. ftype=0 . .sav|
00008f70  65 5f 61 6c 6c 28 70 61  74 68 24 29 20 8b 20 f2  |e_all(path$) . .|
00008f80  65 6e 73 75 72 65 28 69  74 65 6d 30 25 2c 22 54  |ensure(item0%,"T|
00008f90  68 69 73 20 66 69 6c 65  20 65 78 69 73 74 73 2e  |his file exists.|
00008fa0  20 44 6f 20 79 6f 75 20  77 61 6e 74 20 74 6f 20  | Do you want to |
00008fb0  72 65 70 6c 61 63 65 20  69 74 3f 22 29 0d 36 7e  |replace it?").6~|
00008fc0  09 20 20 c9 20 31 0d 36  88 2a 20 20 20 20 f2 6c  |.  . 1.6.*    .l|
00008fd0  6f 61 64 5f 62 69 74 73  28 a4 67 65 74 69 63 6f  |oad_bits(.getico|
00008fe0  6e 64 61 74 61 28 73 65  74 75 70 68 2c 32 29 29  |ndata(setuph,2))|
00008ff0  0d 36 92 1b 20 20 20 20  f2 73 65 74 75 70 5f 64  |.6..    .setup_d|
00009000  69 73 6b 28 69 74 65 6d  30 25 29 0d 36 9c 05 cb  |isk(item0%).6...|
00009010  0d 36 a6 26 69 63 6f 6e  25 28 64 69 73 6b 69 63  |.6.&icon%(diskic|
00009020  6f 6e 29 3d 2d 31 3a f4  20 63 6c 61 69 6d 6d 65  |on)=-1:. claimme|
00009030  6e 75 24 3d 22 22 0d 36  b0 06 3d 30 0d 36 ba 04  |nu$="".6..=0.6..|
00009040  0d 36 c4 04 0d 36 ce 04  0d 36 d8 1a dd 20 a4 6d  |.6...6...6... .m|
00009050  65 6e 75 73 65 6c 65 63  74 5f 6f 62 6a 65 63 74  |enuselect_object|
00009060  65 64 0d 36 e2 2b 6f 6c  64 5f 66 6c 61 67 73 25  |ed.6.+old_flags%|
00009070  3d bb 28 a4 67 65 74 69  63 6f 6e 64 61 74 61 28  |=.(.geticondata(|
00009080  6f 62 6a 68 61 6e 64 6c  65 2c 38 29 29 0d 36 ec  |objhandle,8)).6.|
00009090  2b 6e 65 77 5f 66 6c 61  67 73 25 3d 6f 6c 64 5f  |+new_flags%=old_|
000090a0  66 6c 61 67 73 25 20 82  20 28 26 38 30 20 3e 3e  |flags% . (&80 >>|
000090b0  20 69 74 65 6d 30 25 29  0d 36 f6 30 f2 63 68 61  | item0%).6.0.cha|
000090c0  6e 67 65 69 63 6f 6e 28  6f 62 6a 68 61 6e 64 6c  |ngeicon(objhandl|
000090d0  65 2c 38 2c c3 28 6e 65  77 5f 66 6c 61 67 73 25  |e,8,.(new_flags%|
000090e0  29 2c 64 75 6d 6d 79 29  0d 37 00 13 f4 20 63 6c  |),dummy).7... cl|
000090f0  61 69 6d 6d 65 6e 75 24  3d 22 22 0d 37 0a 06 3d  |aimmenu$="".7..=|
00009100  30 0d 37 14 04 0d 37 1e  1b dd 20 a4 6d 65 6e 75  |0.7...7... .menu|
00009110  73 65 6c 65 63 74 5f 63  6f 6e 74 61 69 6e 65 72  |select_container|
00009120  0d 37 28 0f c8 8e 20 69  74 65 6d 30 25 20 ca 0d  |.7(... item0% ..|
00009130  37 32 07 c9 20 30 0d 37  3c 19 63 6f 6e 74 61 69  |72.. 0.7<.contai|
00009140  6e 65 72 3d ac 20 63 6f  6e 74 61 69 6e 65 72 0d  |ner=. container.|
00009150  37 46 11 e7 20 63 6f 6e  74 61 69 6e 65 72 20 8c  |7F.. container .|
00009160  0d 37 50 2e f2 63 68 61  6e 67 65 69 63 6f 6e 28  |.7P..changeicon(|
00009170  6f 62 6a 68 61 6e 64 6c  65 2c 32 36 2c 22 53 49  |objhandle,26,"SI|
00009180  5a 45 20 3c 43 3e 22 2c  64 75 6d 6d 79 29 0d 37  |ZE <C>",dummy).7|
00009190  5a 05 cc 0d 37 64 2a f2  63 68 61 6e 67 65 69 63  |Z...7d*.changeic|
000091a0  6f 6e 28 6f 62 6a 68 61  6e 64 6c 65 2c 32 36 2c  |on(objhandle,26,|
000091b0  22 53 49 5a 45 22 2c 64  75 6d 6d 79 29 0d 37 6e  |"SIZE",dummy).7n|
000091c0  05 cd 0d 37 78 07 c9 20  31 0d 37 82 1b 63 6f 6e  |...7x.. 1.7..con|
000091d0  74 5f 72 6f 6f 6d 3d bb  28 24 63 6f 6e 74 72 6f  |t_room=.($contro|
000091e0  6f 6d 25 29 0d 37 8c 05  cb 0d 37 96 16 f4 20 64  |om%).7....7... d|
000091f0  61 74 61 5f 73 61 76 65  64 3d 46 41 4c 53 45 0d  |ata_saved=FALSE.|
00009200  37 a0 13 f4 20 63 6c 61  69 6d 6d 65 6e 75 24 3d  |7... claimmenu$=|
00009210  22 22 0d 37 aa 06 3d 30  0d 37 b4 04 0d 37 be 1a  |"".7..=0.7...7..|
00009220  dd 20 a4 6d 65 6e 75 73  65 6c 65 63 74 5f 72 6f  |. .menuselect_ro|
00009230  6f 6d 65 64 69 74 0d 37  c8 2d 6f 6c 64 5f 66 6c  |omedit.7.-old_fl|
00009240  61 67 73 25 3d bb 28 a4  67 65 74 69 63 6f 6e 64  |ags%=.(.geticond|
00009250  61 74 61 28 72 6f 6f 6d  68 61 6e 64 6c 65 2c 33  |ata(roomhandle,3|
00009260  34 29 29 0d 37 d2 2b 6e  65 77 5f 66 6c 61 67 73  |4)).7.+new_flags|
00009270  25 3d 6f 6c 64 5f 66 6c  61 67 73 25 20 82 20 28  |%=old_flags% . (|
00009280  26 38 30 20 3e 3e 20 69  74 65 6d 30 25 29 0d 37  |&80 >> item0%).7|
00009290  dc 32 f2 63 68 61 6e 67  65 69 63 6f 6e 28 72 6f  |.2.changeicon(ro|
000092a0  6f 6d 68 61 6e 64 6c 65  2c 33 34 2c c3 28 6e 65  |omhandle,34,.(ne|
000092b0  77 5f 66 6c 61 67 73 25  29 2c 64 75 6d 6d 79 29  |w_flags%),dummy)|
000092c0  0d 37 e6 13 f4 20 63 6c  61 69 6d 6d 65 6e 75 24  |.7... claimmenu$|
000092d0  3d 22 22 0d 37 f0 06 3d  30 0d 37 fa 04 0d 38 04  |="".7..=0.7...8.|
000092e0  15 dd 20 a4 6d 65 6e 75  73 65 6c 65 63 74 5f 6b  |.. .menuselect_k|
000092f0  65 79 0d 38 0e 0f c8 8e  20 69 74 65 6d 30 25 20  |ey.8.... item0% |
00009300  ca 0d 38 18 15 20 20 c9  20 30 3a f2 70 72 69 6e  |..8..  . 0:.prin|
00009310  74 5f 6f 62 6a 73 0d 38  22 24 20 20 c9 20 31 3a  |t_objs.8"$  . 1:|
00009320  f2 69 6d 70 6f 72 74 5f  6f 62 6a 28 22 4f 2e 22  |.import_obj("O."|
00009330  2b 24 69 6d 70 6f 72 74  25 29 0d 38 2c 05 cb 0d  |+$import%).8,...|
00009340  38 36 13 f4 20 63 6c 61  69 6d 6d 65 6e 75 24 3d  |86.. claimmenu$=|
00009350  22 22 0d 38 40 06 3d 30  0d 38 4a 04 0d 38 54 16  |"".8@.=0.8J..8T.|
00009360  dd 20 a4 6d 65 6e 75 73  65 6c 65 63 74 5f 64 6f  |. .menuselect_do|
00009370  6f 72 0d 38 5e 0f c8 8e  20 69 74 65 6d 30 25 20  |or.8^... item0% |
00009380  ca 0d 38 68 16 20 20 c9  20 30 3a f2 70 72 69 6e  |..8h.  . 0:.prin|
00009390  74 5f 72 6f 6f 6d 73 0d  38 72 26 20 20 c9 20 31  |t_rooms.8r&  . 1|
000093a0  3a f2 69 6d 70 6f 72 74  5f 72 6f 6f 6d 73 28 22  |:.import_rooms("|
000093b0  52 2e 22 2b 24 69 6d 70  6f 72 74 25 29 0d 38 7c  |R."+$import%).8||
000093c0  05 cb 0d 38 86 13 f4 20  63 6c 61 69 6d 6d 65 6e  |...8... claimmen|
000093d0  75 24 3d 22 22 0d 38 90  06 3d 30 0d 38 9a 04 0d  |u$="".8..=0.8...|
000093e0  38 a4 17 dd 20 a4 6d 65  6e 75 73 65 6c 65 63 74  |8... .menuselect|
000093f0  5f 71 75 69 6c 6c 0d 38  ae 0f c8 8e 20 69 74 65  |_quill.8.... ite|
00009400  6d 30 25 20 ca 0d 38 b8  15 20 20 c9 20 30 3a f2  |m0% ..8..  . 0:.|
00009410  70 72 69 6e 74 5f 74 65  78 74 0d 38 c2 25 20 20  |print_text.8.%  |
00009420  c9 20 31 3a f2 69 6d 70  6f 72 74 5f 74 65 78 74  |. 1:.import_text|
00009430  28 22 54 2e 22 2b 24 69  6d 70 6f 72 74 25 29 0d  |("T."+$import%).|
00009440  38 cc 26 20 20 20 20 20  20 20 20 20 f2 6c 6f 61  |8.&         .loa|
00009450  64 5f 64 69 63 74 28 22  44 2e 22 2b 24 69 6d 70  |d_dict("D."+$imp|
00009460  6f 72 74 25 29 0d 38 d6  05 cb 0d 38 e0 13 f4 20  |ort%).8....8... |
00009470  63 6c 61 69 6d 6d 65 6e  75 24 3d 22 22 0d 38 ea  |claimmenu$="".8.|
00009480  06 3d 30 0d 38 f4 04 0d  38 fe 19 dd 20 a4 6d 65  |.=0.8...8... .me|
00009490  6e 75 73 65 6c 65 63 74  5f 6c 69 73 74 69 6e 67  |nuselect_listing|
000094a0  0d 39 08 0f c8 8e 20 69  74 65 6d 30 25 20 ca 0d  |.9.... item0% ..|
000094b0  39 12 18 20 20 c9 20 30  3a f2 70 72 69 6e 74 5f  |9..  . 0:.print_|
000094c0  70 72 6f 67 72 61 6d 0d  39 1c 1c 20 20 c9 20 31  |program.9..  . 1|
000094d0  3a f2 63 6f 6e 76 65 72  74 28 24 69 6d 70 6f 72  |:.convert($impor|
000094e0  74 25 29 0d 39 26 0e 20  20 c9 20 32 3a f2 72 75  |t%).9&.  . 2:.ru|
000094f0  6e 0d 39 30 05 cb 0d 39  3a 13 f4 20 63 6c 61 69  |n.90...9:.. clai|
00009500  6d 6d 65 6e 75 24 3d 22  22 0d 39 44 06 3d 30 0d  |mmenu$="".9D.=0.|
00009510  39 4e 04 0d 39 58 19 dd  20 a4 6d 65 6e 75 73 65  |9N..9X.. .menuse|
00009520  6c 65 63 74 5f 63 68 61  72 64 65 73 0d 39 62 32  |lect_chardes.9b2|
00009530  f4 20 57 68 65 6e 20 60  6d 65 6e 75 60 20 69 73  |. When `menu` is|
00009540  20 63 6c 69 63 6b 65 64  20 6f 6e 20 74 68 65 20  | clicked on the |
00009550  60 63 68 61 72 64 65 73  60 20 69 63 6f 6e 0d 39  |`chardes` icon.9|
00009560  6c 0f c8 8e 20 69 74 65  6d 30 25 20 ca 0d 39 76  |l... item0% ..9v|
00009570  35 c9 20 30 3a f2 73 61  76 65 5f 63 68 61 72 73  |5. 0:.save_chars|
00009580  28 22 3c 55 73 65 72 73  24 52 65 73 6f 75 72 63  |("<Users$Resourc|
00009590  65 73 3e 2e 22 2b 24 66  69 6c 65 6e 61 6d 65 32  |es>."+$filename2|
000095a0  25 29 0d 39 80 07 c9 20  31 0d 39 8a 2c ff 28 22  |%).9... 1.9.,.("|
000095b0  50 52 49 4e 54 20 3c 41  6c 70 73 24 52 65 73 6f  |PRINT <Alps$Reso|
000095c0  75 72 63 65 73 3e 2e 22  2b 24 66 69 6c 65 6e 61  |urces>."+$filena|
000095d0  6d 65 32 25 29 0d 39 94  1a f2 64 69 73 70 6c 61  |me2%).9...displa|
000095e0  79 5f 63 68 72 28 63 75  72 5f 63 68 72 25 29 0d  |y_chr(cur_chr%).|
000095f0  39 9e 22 c8 99 20 46 6f  72 63 65 52 2c 2d 31 2c  |9.".. ForceR,-1,|
00009600  30 2c 30 2c 73 63 72 77  2b 31 2c 73 63 72 68 2b  |0,0,scrw+1,scrh+|
00009610  31 0d 39 a8 05 cb 0d 39  b2 13 f4 20 63 6c 61 69  |1.9....9... clai|
00009620  6d 6d 65 6e 75 24 3d 22  22 0d 39 bc 06 3d 30 0d  |mmenu$="".9..=0.|
00009630  39 c6 04 0d 39 d0 18 dd  20 a4 6d 65 6e 75 73 65  |9...9... .menuse|
00009640  6c 65 63 74 5f 63 68 72  64 65 66 0d 39 da 4b f4  |lect_chrdef.9.K.|
00009650  20 57 68 65 6e 20 62 75  74 74 6f 6e 20 69 73 20  | When button is |
00009660  63 6c 69 63 6b 65 64 20  6f 6e 20 74 68 65 20 60  |clicked on the `|
00009670  53 45 4c 45 43 54 60 20  69 63 6f 6e 20 69 6e 20  |SELECT` icon in |
00009680  74 68 65 20 63 68 61 72  20 64 65 73 69 67 6e 20  |the char design |
00009690  77 69 6e 64 6f 77 0d 39  e4 14 63 68 72 25 3d 97  |window.9..chr%=.|
000096a0  28 24 63 68 61 72 6e 75  6d 29 0d 39 ee 20 e7 20  |($charnum).9. . |
000096b0  63 68 72 25 3e 33 31 20  80 20 63 68 72 25 3c 3d  |chr%>31 . chr%<=|
000096c0  6d 61 78 5f 63 68 72 25  20 8c 0d 39 f8 13 20 20  |max_chr% ..9..  |
000096d0  63 75 72 5f 63 68 72 25  3d 63 68 72 25 0d 3a 02  |cur_chr%=chr%.:.|
000096e0  2e 20 20 f2 63 68 61 6e  67 65 69 63 6f 6e 28 64  |.  .changeicon(d|
000096f0  65 73 69 67 6e 2c 36 34  2c bd 28 63 75 72 5f 63  |esign,64,.(cur_c|
00009700  68 72 25 29 2c 69 63 6f  6e 25 29 0d 3a 0c 1c 20  |hr%),icon%).:.. |
00009710  20 f2 64 69 73 70 6c 61  79 5f 63 68 72 28 63 75  | .display_chr(cu|
00009720  72 5f 63 68 72 25 29 0d  3a 16 05 cd 0d 3a 20 13  |r_chr%).:....: .|
00009730  f4 20 63 6c 61 69 6d 6d  65 6e 75 24 3d 22 22 0d  |. claimmenu$="".|
00009740  3a 2a 06 3d 30 0d 3a 34  04 0d 3a 3e 1c dd 20 a4  |:*.=0.:4..:>.. .|
00009750  6d 65 6e 75 73 65 6c 65  63 74 5f 76 6f 63 61 62  |menuselect_vocab|
00009760  75 6c 61 72 79 0d 3a 48  2d f4 20 57 68 65 6e 20  |ulary.:H-. When |
00009770  53 45 4c 45 43 54 20 70  72 65 73 73 65 64 20 69  |SELECT pressed i|
00009780  6e 20 73 6d 61 6c 6c 20  76 6f 63 61 62 20 6d 65  |n small vocab me|
00009790  6e 75 0d 3a 52 0f c8 8e  20 69 74 65 6d 30 25 20  |nu.:R... item0% |
000097a0  ca 0d 3a 5c 14 c9 20 30  3a f2 70 72 69 6e 74 5f  |..:\.. 0:.print_|
000097b0  76 6f 63 61 62 0d 3a 66  05 cb 0d 3a 70 13 f4 20  |vocab.:f...:p.. |
000097c0  63 6c 61 69 6d 6d 65 6e  75 24 3d 22 22 0d 3a 7a  |claimmenu$="".:z|
000097d0  06 3d 30 0d 3a 84 04 0d  3a 8e 18 dd 20 a4 6d 65  |.=0.:...:... .me|
000097e0  6e 75 73 65 6c 65 63 74  5f 61 63 74 6f 72 73 0d  |nuselect_actors.|
000097f0  3a 98 32 f4 20 53 45 4c  45 43 54 20 70 72 65 73  |:.2. SELECT pres|
00009800  73 65 64 20 69 6e 20 73  6d 61 6c 6c 20 27 66 61  |sed in small 'fa|
00009810  63 65 27 20 6d 65 6e 75  20 28 41 63 74 6f 72 73  |ce' menu (Actors|
00009820  29 0d 3a a2 0f c8 8e 20  69 74 65 6d 30 25 20 ca  |).:.... item0% .|
00009830  0d 3a ac 15 c9 20 30 3a  f2 70 72 69 6e 74 5f 61  |.:... 0:.print_a|
00009840  63 74 6f 72 73 0d 3a b6  05 cb 0d 3a c0 13 f4 20  |ctors.:....:... |
00009850  63 6c 61 69 6d 6d 65 6e  75 24 3d 22 22 0d 3a ca  |claimmenu$="".:.|
00009860  06 3d 30 0d 3a d4 04 0d  3a de 15 dd 20 a4 6d 65  |.=0.:...:... .me|
00009870  6e 75 73 65 6c 65 63 74  5f 65 79 65 0d 3a e8 33  |nuselect_eye.:.3|
00009880  f4 20 53 45 4c 45 43 54  20 70 72 65 73 73 65 64  |. SELECT pressed|
00009890  20 69 6e 20 73 6d 61 6c  6c 20 27 65 79 65 27 20  | in small 'eye' |
000098a0  6d 65 6e 75 20 28 50 69  63 74 75 72 65 73 29 0d  |menu (Pictures).|
000098b0  3a f2 0f c8 8e 20 69 74  65 6d 30 25 20 ca 0d 3a  |:.... item0% ..:|
000098c0  fc 12 c9 20 30 3a f2 70  72 69 6e 74 5f 70 69 78  |... 0:.print_pix|
000098d0  0d 3b 06 05 cb 0d 3b 10  13 f4 20 63 6c 61 69 6d  |.;....;... claim|
000098e0  6d 65 6e 75 24 3d 22 22  0d 3b 1a 06 3d 30 0d 3b  |menu$="".;..=0.;|
000098f0  24 04 0d 3b 2e 16 dd 20  a4 6d 65 6e 75 73 65 6c  |$..;... .menusel|
00009900  65 63 74 5f 6d 69 73 63  0d 3b 38 0f c8 8e 20 69  |ect_misc.;8... i|
00009910  74 65 6d 30 25 20 ca 0d  3b 42 10 20 c9 20 31 3a  |tem0% ..;B. . 1:|
00009920  20 f4 20 71 75 69 74 0d  3b 4c 0e 20 20 f2 71 75  | . quit.;L.  .qu|
00009930  69 74 28 34 29 0d 3b 56  06 20 cb 0d 3b 60 19 69  |it(4).;V. ..;`.i|
00009940  63 6f 6e 25 28 54 48 45  6d 69 73 63 69 63 6f 6e  |con%(THEmiscicon|
00009950  29 3d 2d 31 0d 3b 6a 06  3d 30 0d 3b 74 04 0d 3b  |)=-1.;j.=0.;t..;|
00009960  7e 04 0d 3b 88 44 f4 20  2d 2d 2d 2d 2d 2d 20 55  |~..;.D. ------ U|
00009970  74 69 6c 69 74 79 20 70  72 6f 63 65 64 75 72 65  |tility procedure|
00009980  73 20 61 6e 64 20 66 75  6e 63 74 69 6f 6e 73 20  |s and functions |
00009990  66 6f 72 20 65 61 63 68  20 65 64 69 74 6f 72 20  |for each editor |
000099a0  2d 2d 2d 2d 2d 2d 0d 3b  92 04 0d 3b 9c 30 f4 20  |------.;...;.0. |
000099b0  2d 2d 2d 2d 2d 2d 20 43  68 61 72 61 63 74 65 72  |------ Character|
000099c0  20 64 65 73 69 67 6e 65  72 20 75 74 69 6c 69 74  | designer utilit|
000099d0  69 65 73 20 2d 2d 2d 2d  2d 2d 0d 3b a6 04 0d 3b  |ies ------.;...;|
000099e0  b0 14 dd 20 f2 77 72 69  74 65 5f 63 68 72 28 43  |... .write_chr(C|
000099f0  25 29 0d 3b ba 0b ef 20  32 33 2c 43 25 0d 3b c4  |%).;... 23,C%.;.|
00009a00  10 e3 20 72 6f 77 25 3d  30 20 b8 20 37 0d 3b ce  |.. row%=0 . 7.;.|
00009a10  0f 72 6f 77 5f 76 61 6c  75 65 3d 30 0d 3b d8 10  |.row_value=0.;..|
00009a20  e3 20 63 6f 6c 25 3d 30  20 b8 20 37 0d 3b e2 2d  |. col%=0 . 7.;.-|
00009a30  64 75 6d 6d 79 3d bb 28  a4 67 65 74 69 63 6f 6e  |dummy=.(.geticon|
00009a40  64 61 74 61 28 64 65 73  69 67 6e 2c 72 6f 77 25  |data(design,row%|
00009a50  2a 38 2b 63 6f 6c 25 29  29 0d 3b ec 15 62 69 74  |*8+col%)).;..bit|
00009a60  3d 66 6c 61 67 73 25 20  3e 3e 3e 20 32 38 0d 3b  |=flags% >>> 28.;|
00009a70  f6 2c e7 20 62 69 74 3d  37 20 8c 20 72 6f 77 5f  |.,. bit=7 . row_|
00009a80  76 61 6c 75 65 3d 72 6f  77 5f 76 61 6c 75 65 2b  |value=row_value+|
00009a90  32 5e 28 37 2d 63 6f 6c  25 29 0d 3c 00 0a ed 20  |2^(7-col%).<... |
00009aa0  63 6f 6c 25 0d 3c 0a 0f  ef 20 72 6f 77 5f 76 61  |col%.<... row_va|
00009ab0  6c 75 65 0d 3c 14 0a ed  20 72 6f 77 25 0d 3c 1e  |lue.<... row%.<.|
00009ac0  05 e1 0d 3c 28 04 0d 3c  32 16 dd 20 f2 64 69 73  |...<(..<2.. .dis|
00009ad0  70 6c 61 79 5f 63 68 72  28 43 25 29 0d 3c 3c 10  |play_chr(C%).<<.|
00009ae0  3f 6f 73 5f 62 6c 6f 63  6b 3d 43 25 0d 3c 46 1c  |?os_block=C%.<F.|
00009af0  c8 99 20 22 4f 53 5f 57  6f 72 64 22 2c 26 41 2c  |.. "OS_Word",&A,|
00009b00  6f 73 5f 62 6c 6f 63 6b  0d 3c 50 0e e3 20 52 25  |os_block.<P.. R%|
00009b10  3d 31 20 b8 20 38 0d 3c  5a 19 72 6f 77 5f 76 61  |=1 . 8.<Z.row_va|
00009b20  6c 75 65 3d 52 25 3f 6f  73 5f 62 6c 6f 63 6b 0d  |lue=R%?os_block.|
00009b30  3c 64 0e e3 20 43 25 3d  30 20 b8 20 37 0d 3c 6e  |<d.. C%=0 . 7.<n|
00009b40  1c 62 69 74 3d 72 6f 77  5f 76 61 6c 75 65 20 81  |.bit=row_value .|
00009b50  20 32 5e 28 37 2d 43 25  29 0d 3c 78 22 72 6f 77  | 2^(7-C%).<x"row|
00009b60  5f 76 61 6c 75 65 3d 72  6f 77 5f 76 61 6c 75 65  |_value=row_value|
00009b70  20 83 20 32 5e 28 37 2d  43 25 29 0d 3c 82 71 e7  | . 2^(7-C%).<.q.|
00009b80  20 62 69 74 3e 30 20 f2  73 65 74 5f 69 63 6f 6e  | bit>0 .set_icon|
00009b90  28 64 65 73 69 67 6e 2c  28 52 25 2d 31 29 2a 38  |(design,(R%-1)*8|
00009ba0  2b 43 25 2c 26 37 30 30  30 30 30 30 30 2c 26 46  |+C%,&70000000,&F|
00009bb0  30 30 30 30 30 30 30 29  20 8b 20 f2 73 65 74 5f  |0000000) . .set_|
00009bc0  69 63 6f 6e 28 64 65 73  69 67 6e 2c 28 52 25 2d  |icon(design,(R%-|
00009bd0  31 29 2a 38 2b 43 25 2c  26 32 30 30 30 30 30 30  |1)*8+C%,&2000000|
00009be0  30 2c 26 46 30 30 30 30  30 30 30 29 0d 3c 8c 08  |0,&F0000000).<..|
00009bf0  ed 20 43 25 0d 3c 96 08  ed 20 52 25 0d 3c a0 05  |. C%.<... R%.<..|
00009c00  e1 0d 3c aa 04 0d 3c b4  15 dd 20 f2 73 61 76 65  |..<...<... .save|
00009c10  5f 63 68 61 72 73 28 66  24 29 0d 3c be 0c 66 25  |_chars(f$).<..f%|
00009c20  3d ae 28 66 24 29 0d 3c  c8 17 e3 20 63 68 25 3d  |=.(f$).<... ch%=|
00009c30  33 32 20 b8 20 6d 61 78  5f 63 68 72 25 0d 3c d2  |32 . max_chr%.<.|
00009c40  14 d5 23 66 25 2c 32 33  3a d5 23 66 25 2c 63 68  |..#f%,23:.#f%,ch|
00009c50  25 0d 3c dc 11 3f 6f 73  5f 62 6c 6f 63 6b 3d 63  |%.<..?os_block=c|
00009c60  68 25 0d 3c e6 1c c8 99  20 22 4f 53 5f 57 6f 72  |h%.<.... "OS_Wor|
00009c70  64 22 2c 26 41 2c 6f 73  5f 62 6c 6f 63 6b 0d 3c  |d",&A,os_block.<|
00009c80  f0 0e e3 20 49 25 3d 31  20 b8 20 38 0d 3c fa 14  |... I%=1 . 8.<..|
00009c90  d5 23 66 25 2c 49 25 3f  6f 73 5f 62 6c 6f 63 6b  |.#f%,I%?os_block|
00009ca0  0d 3d 04 08 ed 20 49 25  0d 3d 0e 09 ed 20 63 68  |.=... I%.=... ch|
00009cb0  25 0d 3d 18 08 d9 23 66  25 0d 3d 22 20 ff 28 22  |%.=...#f%.=" .("|
00009cc0  53 45 54 54 59 50 45 20  22 2b 66 24 2b 22 20 42  |SETTYPE "+f$+" B|
00009cd0  42 43 20 46 6f 6e 74 22  29 0d 3d 2c 05 e1 0d 3d  |BC Font").=,...=|
00009ce0  36 04 0d 3d 40 13 dd 20  f2 73 61 76 65 5f 70 61  |6..=@.. .save_pa|
00009cf0  6c 28 66 24 29 0d 3d 4a  12 ea 20 63 68 25 2c 63  |l(f$).=J.. ch%,c|
00009d00  6f 6c 31 2c 72 67 62 0d  3d 54 10 f2 72 65 61 64  |ol1,rgb.=T..read|
00009d10  50 61 6c 65 74 74 65 0d  3d 5e 0c 63 68 25 3d ae  |Palette.=^.ch%=.|
00009d20  20 66 24 0d 3d 68 10 e3  20 63 6f 6c 3d 30 20 b8  | f$.=h.. col=0 .|
00009d30  20 31 39 0d 3d 72 0f e3  20 72 67 62 3d 31 20 b8  | 19.=r.. rgb=1 .|
00009d40  20 33 0d 3d 7c 16 d5 23  63 68 25 2c 72 67 62 28  | 3.=|..#ch%,rgb(|
00009d50  63 6f 6c 2c 72 67 62 29  0d 3d 86 09 ed 20 72 67  |col,rgb).=... rg|
00009d60  62 0d 3d 90 09 ed 20 63  6f 6c 0d 3d 9a 09 d9 23  |b.=... col.=...#|
00009d70  63 68 25 0d 3d a4 1a ff  20 22 53 45 54 54 59 50  |ch%.=... "SETTYP|
00009d80  45 20 22 2b 66 24 2b 22  20 46 45 44 22 0d 3d ae  |E "+f$+" FED".=.|
00009d90  05 e1 0d 3d b8 04 0d 3d  c2 04 0d 3d cc 04 0d 3d  |...=...=...=...=|
00009da0  d6 29 f4 20 2d 2d 2d 2d  2d 2d 20 54 65 78 74 20  |.). ------ Text |
00009db0  65 64 69 74 6f 72 20 75  74 69 6c 69 74 69 65 73  |editor utilities|
00009dc0  20 2d 2d 2d 2d 2d 2d 0d  3d e0 04 0d 3d ea 0b dd  | ------.=...=...|
00009dd0  20 f2 6c 65 66 74 0d 3d  f4 14 e7 20 74 65 78 74  | .left.=... text|
00009de0  5f 63 6f 6c 25 3c 3e 31  20 8c 0d 3d fe 12 20 20  |_col%<>1 ..=..  |
00009df0  74 65 78 74 5f 70 74 72  25 2d 3d 31 0d 3e 08 12  |text_ptr%-=1.>..|
00009e00  20 20 74 65 78 74 5f 63  6f 6c 25 2d 3d 31 0d 3e  |  text_col%-=1.>|
00009e10  12 05 cc 0d 3e 1c 16 20  20 e7 20 74 65 78 74 5f  |....>..  . text_|
00009e20  72 6f 77 25 3c 3e 30 20  8c 0d 3e 26 14 20 20 20  |row%<>0 ..>&.   |
00009e30  20 74 65 78 74 5f 72 6f  77 25 2d 3d 31 0d 3e 30  | text_row%-=1.>0|
00009e40  2b 20 20 20 20 74 65 78  74 5f 63 6f 6c 25 3d 74  |+    text_col%=t|
00009e50  65 78 74 5f 72 6f 77 6c  65 6e 25 28 74 65 78 74  |ext_rowlen%(text|
00009e60  5f 72 6f 77 25 29 2b 31  0d 3e 3a 3e 20 20 20 20  |_row%)+1.>:>    |
00009e70  e7 20 74 65 78 74 5f 72  6f 77 6c 65 6e 25 28 74  |. text_rowlen%(t|
00009e80  65 78 74 5f 72 6f 77 25  29 3c 74 65 78 74 5f 6d  |ext_row%)<text_m|
00009e90  61 78 6c 6c 65 6e 25 20  8c 20 74 65 78 74 5f 70  |axllen% . text_p|
00009ea0  74 72 25 2d 3d 31 0d 3e  44 07 20 20 cc 0d 3e 4e  |tr%-=1.>D.  ..>N|
00009eb0  0b 20 20 20 20 ef 20 37  0d 3e 58 07 20 20 cd 0d  |.    . 7.>X.  ..|
00009ec0  3e 62 05 cd 0d 3e 6c 05  e1 0d 3e 76 04 0d 3e 80  |>b...>l...>v..>.|
00009ed0  0f dd 20 f2 6c 65 66 74  5f 65 6e 64 0d 3e 8a 1c  |.. .left_end.>..|
00009ee0  74 65 78 74 5f 70 74 72  25 2d 3d 28 74 65 78 74  |text_ptr%-=(text|
00009ef0  5f 63 6f 6c 25 2d 31 29  0d 3e 94 0f 74 65 78 74  |_col%-1).>..text|
00009f00  5f 63 6f 6c 25 3d 31 0d  3e 9e 05 e1 0d 3e a8 04  |_col%=1.>....>..|
00009f10  0d 3e b2 0c dd 20 f2 72  69 67 68 74 0d 3e bc 41  |.>... .right.>.A|
00009f20  e7 20 74 65 78 74 5f 72  6f 77 25 3d 6c 61 73 74  |. text_row%=last|
00009f30  5f 72 6f 77 25 20 80 20  74 65 78 74 5f 63 6f 6c  |_row% . text_col|
00009f40  25 3d 74 65 78 74 5f 72  6f 77 6c 65 6e 25 28 74  |%=text_rowlen%(t|
00009f50  65 78 74 5f 72 6f 77 25  29 2b 31 20 8c 0d 3e c6  |ext_row%)+1 ..>.|
00009f60  09 20 20 ef 20 37 0d 3e  d0 05 cc 0d 3e da 30 20  |.  . 7.>....>.0 |
00009f70  20 f4 20 54 68 69 73 20  27 3c 27 20 77 61 73 20  | . This '<' was |
00009f80  63 68 61 6e 67 65 64 20  74 6f 20 27 3c 3d 27 20  |changed to '<=' |
00009f90  6f 6e 20 32 33 2e 30 38  2e 38 39 0d 3e e4 2f 20  |on 23.08.89.>./ |
00009fa0  20 e7 20 74 65 78 74 5f  63 6f 6c 25 3c 3d 74 65  | . text_col%<=te|
00009fb0  78 74 5f 6d 61 78 6c 6c  65 6e 25 20 8c 20 74 65  |xt_maxllen% . te|
00009fc0  78 74 5f 70 74 72 25 2b  3d 31 0d 3e ee 12 20 20  |xt_ptr%+=1.>..  |
00009fd0  74 65 78 74 5f 63 6f 6c  25 2b 3d 31 0d 3e f8 44  |text_col%+=1.>.D|
00009fe0  20 20 e7 20 74 65 78 74  5f 63 6f 6c 25 3e 74 65  |  . text_col%>te|
00009ff0  78 74 5f 72 6f 77 6c 65  6e 25 28 74 65 78 74 5f  |xt_rowlen%(text_|
0000a000  72 6f 77 25 29 2b 31 20  80 20 74 65 78 74 5f 72  |row%)+1 . text_r|
0000a010  6f 77 25 3c 3e 6c 61 73  74 5f 72 6f 77 25 20 8c  |ow%<>last_row% .|
0000a020  0d 3f 02 20 20 20 20 20  74 65 78 74 5f 63 6f 6c  |.?.     text_col|
0000a030  25 3d 31 3a 74 65 78 74  5f 72 6f 77 25 2b 3d 31  |%=1:text_row%+=1|
0000a040  0d 3f 0c 07 20 20 cd 0d  3f 16 05 cd 0d 3f 20 05  |.?..  ..?....? .|
0000a050  e1 0d 3f 2a 04 0d 3f 34  10 dd 20 f2 72 69 67 68  |..?*..?4.. .righ|
0000a060  74 5f 65 6e 64 0d 3f 3e  34 74 65 78 74 5f 70 74  |t_end.?>4text_pt|
0000a070  72 25 2b 3d 28 74 65 78  74 5f 72 6f 77 6c 65 6e  |r%+=(text_rowlen|
0000a080  25 28 74 65 78 74 5f 72  6f 77 25 29 2d 74 65 78  |%(text_row%)-tex|
0000a090  74 5f 63 6f 6c 25 29 2b  31 0d 3f 48 27 74 65 78  |t_col%)+1.?H'tex|
0000a0a0  74 5f 63 6f 6c 25 3d 74  65 78 74 5f 72 6f 77 6c  |t_col%=text_rowl|
0000a0b0  65 6e 25 28 74 65 78 74  5f 72 6f 77 25 29 2b 31  |en%(text_row%)+1|
0000a0c0  0d 3f 52 38 f4 20 49 46  20 74 65 78 74 5f 63 6f  |.?R8. IF text_co|
0000a0d0  6c 25 3e 74 65 78 74 5f  6d 61 78 6c 6c 65 6e 25  |l%>text_maxllen%|
0000a0e0  20 74 65 78 74 5f 63 6f  6c 25 3d 74 65 78 74 5f  | text_col%=text_|
0000a0f0  6d 61 78 6c 6c 65 6e 25  0d 3f 5c 05 e1 0d 3f 66  |maxllen%.?\...?f|
0000a100  04 0d 3f 70 0b dd 20 f2  64 6f 77 6e 0d 3f 7a 35  |..?p.. .down.?z5|
0000a110  e7 20 74 65 78 74 5f 72  6f 77 25 3d 74 65 78 74  |. text_row%=text|
0000a120  5f 6d 61 78 72 6f 77 73  25 20 84 20 74 65 78 74  |_maxrows% . text|
0000a130  5f 72 6f 77 25 3d 6c 61  73 74 5f 72 6f 77 25 20  |_row%=last_row% |
0000a140  8c 0d 3f 84 09 20 20 ef  20 37 0d 3f 8e 05 cc 0d  |..?..  . 7.?....|
0000a150  3f 98 12 20 20 74 65 78  74 5f 72 6f 77 25 2b 3d  |?..  text_row%+=|
0000a160  31 0d 3f a2 18 20 20 6f  6c 64 5f 63 6f 6c 25 3d  |1.?..  old_col%=|
0000a170  74 65 78 74 5f 63 6f 6c  25 0d 3f ac 2b 20 20 e7  |text_col%.?.+  .|
0000a180  20 74 65 78 74 5f 72 6f  77 6c 65 6e 25 28 74 65  | text_rowlen%(te|
0000a190  78 74 5f 72 6f 77 25 29  3c 74 65 78 74 5f 63 6f  |xt_row%)<text_co|
0000a1a0  6c 25 20 8c 0d 3f b6 2b  20 20 20 20 74 65 78 74  |l% ..?.+    text|
0000a1b0  5f 63 6f 6c 25 3d 74 65  78 74 5f 72 6f 77 6c 65  |_col%=text_rowle|
0000a1c0  6e 25 28 74 65 78 74 5f  72 6f 77 25 29 2b 31 0d  |n%(text_row%)+1.|
0000a1d0  3f c0 07 20 20 cd 0d 3f  ca 3f 20 20 74 65 78 74  |?..  ..?.?  text|
0000a1e0  5f 70 74 72 25 2b 3d 28  74 65 78 74 5f 72 6f 77  |_ptr%+=(text_row|
0000a1f0  6c 65 6e 25 28 74 65 78  74 5f 72 6f 77 25 2d 31  |len%(text_row%-1|
0000a200  29 2d 6f 6c 64 5f 63 6f  6c 25 2b 74 65 78 74 5f  |)-old_col%+text_|
0000a210  63 6f 6c 25 29 0d 3f d4  3c 20 20 e7 20 74 65 78  |col%).?.<  . tex|
0000a220  74 5f 72 6f 77 6c 65 6e  25 28 74 65 78 74 5f 72  |t_rowlen%(text_r|
0000a230  6f 77 25 2d 31 29 3c 74  65 78 74 5f 6d 61 78 6c  |ow%-1)<text_maxl|
0000a240  6c 65 6e 25 20 74 65 78  74 5f 70 74 72 25 2b 3d  |len% text_ptr%+=|
0000a250  31 0d 3f de 05 cd 0d 3f  e8 05 e1 0d 3f f2 04 0d  |1.?....?....?...|
0000a260  3f fc 09 dd 20 f2 75 70  0d 40 06 14 e7 20 74 65  |?... .up.@... te|
0000a270  78 74 5f 72 6f 77 25 3c  3e 30 20 8c 0d 40 10 12  |xt_row%<>0 ..@..|
0000a280  20 20 74 65 78 74 5f 72  6f 77 25 2d 3d 31 0d 40  |  text_row%-=1.@|
0000a290  1a 18 20 20 6f 6c 64 5f  63 6f 6c 25 3d 74 65 78  |..  old_col%=tex|
0000a2a0  74 5f 63 6f 6c 25 0d 40  24 2b 20 20 e7 20 74 65  |t_col%.@$+  . te|
0000a2b0  78 74 5f 72 6f 77 6c 65  6e 25 28 74 65 78 74 5f  |xt_rowlen%(text_|
0000a2c0  72 6f 77 25 29 3c 74 65  78 74 5f 63 6f 6c 25 20  |row%)<text_col% |
0000a2d0  8c 0d 40 2e 2b 20 20 20  20 74 65 78 74 5f 63 6f  |..@.+    text_co|
0000a2e0  6c 25 3d 74 65 78 74 5f  72 6f 77 6c 65 6e 25 28  |l%=text_rowlen%(|
0000a2f0  74 65 78 74 5f 72 6f 77  25 29 2b 31 0d 40 38 07  |text_row%)+1.@8.|
0000a300  20 20 cd 0d 40 42 3f 20  20 74 65 78 74 5f 70 74  |  ..@B?  text_pt|
0000a310  72 25 2d 3d 28 6f 6c 64  5f 63 6f 6c 25 2b 28 74  |r%-=(old_col%+(t|
0000a320  65 78 74 5f 72 6f 77 6c  65 6e 25 28 74 65 78 74  |ext_rowlen%(text|
0000a330  5f 72 6f 77 25 29 2d 74  65 78 74 5f 63 6f 6c 25  |_row%)-text_col%|
0000a340  29 29 0d 40 4c 3a 20 20  e7 20 74 65 78 74 5f 72  |)).@L:  . text_r|
0000a350  6f 77 6c 65 6e 25 28 74  65 78 74 5f 72 6f 77 25  |owlen%(text_row%|
0000a360  29 3c 74 65 78 74 5f 6d  61 78 6c 6c 65 6e 25 20  |)<text_maxllen% |
0000a370  74 65 78 74 5f 70 74 72  25 2d 3d 31 0d 40 56 05  |text_ptr%-=1.@V.|
0000a380  cc 0d 40 60 09 20 20 ef  20 37 0d 40 6a 05 cd 0d  |..@`.  . 7.@j...|
0000a390  40 74 05 e1 0d 40 7e 04  0d 40 88 0e dd 20 f2 6e  |@t...@~..@... .n|
0000a3a0  65 77 6c 69 6e 65 0d 40  92 16 6f 6c 64 5f 63 6f  |ewline.@..old_co|
0000a3b0  6c 25 3d 74 65 78 74 5f  63 6f 6c 25 0d 40 9c 14  |l%=text_col%.@..|
0000a3c0  f2 69 6e 73 65 72 74 5f  63 68 61 72 28 31 33 29  |.insert_char(13)|
0000a3d0  0d 40 a6 10 74 65 78 74  5f 72 6f 77 25 2b 3d 31  |.@..text_row%+=1|
0000a3e0  0d 40 b0 0f 74 65 78 74  5f 63 6f 6c 25 3d 31 0d  |.@..text_col%=1.|
0000a3f0  40 ba 44 f2 75 70 64 61  74 65 28 74 65 78 74 68  |@.D.update(texth|
0000a400  61 6e 64 6c 65 2c 73 63  78 25 2c 73 63 79 25 2d  |andle,scx%,scy%-|
0000a410  28 79 31 25 2d 79 30 25  29 2c 73 63 78 25 2b 28  |(y1%-y0%),scx%+(|
0000a420  78 31 25 2d 78 30 25 29  2b 63 68 58 25 2c 73 63  |x1%-x0%)+chX%,sc|
0000a430  79 25 29 0d 40 c4 19 64  75 6d 6d 79 3d a4 72 65  |y%).@..dummy=.re|
0000a440  64 72 61 77 5f 74 65 78  74 28 b9 29 0d 40 ce 05  |draw_text(.).@..|
0000a450  e1 0d 40 d8 04 0d 40 e2  18 dd 20 f2 69 6e 73 65  |..@...@... .inse|
0000a460  72 74 5f 63 68 61 72 28  63 68 72 25 29 0d 40 ec  |rt_char(chr%).@.|
0000a470  53 e7 20 74 65 78 74 5f  70 74 72 25 3e 74 65 78  |S. text_ptr%>tex|
0000a480  74 5f 65 6e 64 25 20 8c  20 e3 20 49 25 3d 74 65  |t_end% . . I%=te|
0000a490  78 74 5f 65 6e 64 25 20  b8 20 74 65 78 74 5f 70  |xt_end% . text_p|
0000a4a0  74 72 25 3a 3f 49 25 3d  33 32 3a ed 3a 74 65 78  |tr%:?I%=32:.:tex|
0000a4b0  74 5f 65 6e 64 25 3d 74  65 78 74 5f 70 74 72 25  |t_end%=text_ptr%|
0000a4c0  0d 40 f6 45 e7 20 74 65  78 74 5f 70 74 72 25 3d  |.@.E. text_ptr%=|
0000a4d0  74 65 78 74 5f 65 6e 64  25 20 84 20 74 65 78 74  |text_end% . text|
0000a4e0  5f 72 6f 77 6c 65 6e 25  28 74 65 78 74 5f 72 6f  |_rowlen%(text_ro|
0000a4f0  77 25 29 3c 74 65 78 74  5f 6d 61 78 6c 6c 65 6e  |w%)<text_maxllen|
0000a500  25 2d 31 20 8c 0d 41 00  13 20 20 72 65 64 72 61  |%-1 ..A..  redra|
0000a510  77 5f 61 6c 6c 25 3d a3  0d 41 0a 05 cc 0d 41 14  |w_all%=..A....A.|
0000a520  13 20 20 72 65 64 72 61  77 5f 61 6c 6c 25 3d b9  |.  redraw_all%=.|
0000a530  0d 41 1e 05 cd 0d 41 28  04 0d 41 32 34 f2 6d 6f  |.A....A(..A24.mo|
0000a540  76 65 28 74 65 78 74 5f  70 74 72 25 2c 74 65 78  |ve(text_ptr%,tex|
0000a550  74 5f 70 74 72 25 2b 31  2c 74 65 78 74 5f 65 6e  |t_ptr%+1,text_en|
0000a560  64 25 2d 74 65 78 74 5f  70 74 72 25 29 0d 41 3c  |d%-text_ptr%).A<|
0000a570  24 e7 20 74 65 78 74 5f  70 74 72 25 3c 6d 61 72  |$. text_ptr%<mar|
0000a580  6b 28 30 29 20 8c 20 6d  61 72 6b 28 30 29 2b 3d  |k(0) . mark(0)+=|
0000a590  31 0d 41 46 24 e7 20 74  65 78 74 5f 70 74 72 25  |1.AF$. text_ptr%|
0000a5a0  3c 6d 61 72 6b 28 31 29  20 8c 20 6d 61 72 6b 28  |<mark(1) . mark(|
0000a5b0  31 29 2b 3d 31 0d 41 50  3a 3f 74 65 78 74 5f 70  |1)+=1.AP:?text_p|
0000a5c0  74 72 25 3d 63 68 72 25  3a 74 65 78 74 5f 70 74  |tr%=chr%:text_pt|
0000a5d0  72 25 2b 3d 31 3a 74 65  78 74 5f 65 6e 64 25 2b  |r%+=1:text_end%+|
0000a5e0  3d 31 3a 3f 74 65 78 74  5f 65 6e 64 25 3d 30 0d  |=1:?text_end%=0.|
0000a5f0  41 5a 04 0d 41 64 3a e7  20 74 65 78 74 5f 72 6f  |AZ..Ad:. text_ro|
0000a600  77 6c 65 6e 25 28 74 65  78 74 5f 72 6f 77 25 29  |wlen%(text_row%)|
0000a610  3c 74 65 78 74 5f 6d 61  78 6c 6c 65 6e 25 2d 31  |<text_maxllen%-1|
0000a620  20 80 20 63 68 72 25 3c  3e 31 33 20 8c 0d 41 6e  | . chr%<>13 ..An|
0000a630  32 f4 20 54 68 65 20 27  2d 31 27 20 61 62 6f 76  |2. The '-1' abov|
0000a640  65 20 61 64 64 65 64 20  32 39 2e 30 38 2e 38 39  |e added 29.08.89|
0000a650  20 74 6f 20 66 69 78 20  62 75 67 20 38 61 2e 0d  | to fix bug 8a..|
0000a660  41 78 1e 74 65 78 74 5f  72 6f 77 6c 65 6e 25 28  |Ax.text_rowlen%(|
0000a670  74 65 78 74 5f 72 6f 77  25 29 2b 3d 31 0d 41 82  |text_row%)+=1.A.|
0000a680  05 cc 0d 41 8c 1b 6c 61  73 74 5f 72 6f 77 25 3d  |...A..last_row%=|
0000a690  a4 66 69 6e 64 5f 6c 61  73 74 72 6f 77 0d 41 96  |.find_lastrow.A.|
0000a6a0  1e e3 20 52 25 3d 74 65  78 74 5f 72 6f 77 25 20  |.. R%=text_row% |
0000a6b0  b8 20 6c 61 73 74 5f 72  6f 77 25 0d 41 a0 21 20  |. last_row%.A.! |
0000a6c0  20 74 65 78 74 5f 72 6f  77 6c 65 6e 25 28 52 25  | text_rowlen%(R%|
0000a6d0  29 3d a9 20 a4 72 6f 77  28 52 25 29 0d 41 aa 05  |)=. .row(R%).A..|
0000a6e0  ed 0d 41 b4 05 cd 0d 41  be 04 0d 41 c8 13 e7 20  |..A....A...A... |
0000a6f0  72 65 64 72 61 77 5f 61  6c 6c 25 20 8c 0d 41 d2  |redraw_all% ..A.|
0000a700  53 f2 75 70 64 61 74 65  28 74 65 78 74 68 61 6e  |S.update(texthan|
0000a710  64 6c 65 2c 30 2c 2d 28  6c 61 73 74 5f 72 6f 77  |dle,0,-(last_row|
0000a720  25 2b 31 29 2a 6c 73 59  25 2c 73 63 78 25 2b 28  |%+1)*lsY%,scx%+(|
0000a730  78 31 25 2d 78 30 25 29  2b 63 68 58 25 2c 2d 28  |x1%-x0%)+chX%,-(|
0000a740  74 65 78 74 5f 72 6f 77  25 29 2a 6c 73 59 25 29  |text_row%)*lsY%)|
0000a750  0d 41 dc 05 cc 0d 41 e6  1f e7 20 74 65 78 74 5f  |.A....A... text_|
0000a760  63 6f 6c 25 3e 74 65 78  74 5f 6d 61 78 6c 6c 65  |col%>text_maxlle|
0000a770  6e 25 20 8c 0d 41 f0 53  f2 75 70 64 61 74 65 28  |n% ..A.S.update(|
0000a780  74 65 78 74 68 61 6e 64  6c 65 2c 30 2c 2d 28 74  |texthandle,0,-(t|
0000a790  65 78 74 5f 72 6f 77 25  29 2a 6c 73 59 25 2c 73  |ext_row%)*lsY%,s|
0000a7a0  63 78 25 2b 28 78 31 25  2d 78 30 25 29 2b 63 68  |cx%+(x1%-x0%)+ch|
0000a7b0  58 25 2c 2d 28 74 65 78  74 5f 72 6f 77 25 2d 31  |X%,-(text_row%-1|
0000a7c0  29 2a 6c 73 59 25 29 0d  41 fa 05 cc 0d 42 04 64  |)*lsY%).A....B.d|
0000a7d0  f2 75 70 64 61 74 65 28  74 65 78 74 68 61 6e 64  |.update(texthand|
0000a7e0  6c 65 2c 63 68 58 25 2a  28 74 65 78 74 5f 63 6f  |le,chX%*(text_co|
0000a7f0  6c 25 2d 31 29 2c 2d 28  74 65 78 74 5f 72 6f 77  |l%-1),-(text_row|
0000a800  25 2b 31 29 2a 6c 73 59  25 2c 73 63 78 25 2b 28  |%+1)*lsY%,scx%+(|
0000a810  78 31 25 2d 78 30 25 29  2b 63 68 58 25 2c 2d 28  |x1%-x0%)+chX%,-(|
0000a820  74 65 78 74 5f 72 6f 77  25 29 2a 6c 73 59 25 29  |text_row%)*lsY%)|
0000a830  0d 42 0e 05 cd 0d 42 18  05 cd 0d 42 22 04 0d 42  |.B....B....B"..B|
0000a840  2c 1f e7 20 74 65 78 74  5f 63 6f 6c 25 3e 74 65  |,.. text_col%>te|
0000a850  78 74 5f 6d 61 78 6c 6c  65 6e 25 20 8c 0d 42 36  |xt_maxllen% ..B6|
0000a860  1c 74 65 78 74 5f 63 6f  6c 25 3d 32 3a 74 65 78  |.text_col%=2:tex|
0000a870  74 5f 72 6f 77 25 2b 3d  31 0d 42 40 2d e7 20 74  |t_row%+=1.B@-. t|
0000a880  65 78 74 5f 72 6f 77 25  3e 6c 61 73 74 5f 72 6f  |ext_row%>last_ro|
0000a890  77 25 20 6c 61 73 74 5f  72 6f 77 25 3d 74 65 78  |w% last_row%=tex|
0000a8a0  74 5f 72 6f 77 25 0d 42  4a 05 cc 0d 42 54 10 74  |t_row%.BJ...BT.t|
0000a8b0  65 78 74 5f 63 6f 6c 25  2b 3d 31 0d 42 5e 1f e7  |ext_col%+=1.B^..|
0000a8c0  20 74 65 78 74 5f 63 6f  6c 25 3e 74 65 78 74 5f  | text_col%>text_|
0000a8d0  6d 61 78 6c 6c 65 6e 25  20 8c 0d 42 68 1e 20 20  |maxllen% ..Bh.  |
0000a8e0  74 65 78 74 5f 63 6f 6c  25 3d 31 3a 74 65 78 74  |text_col%=1:text|
0000a8f0  5f 72 6f 77 25 2b 3d 31  0d 42 72 2f 20 20 e7 20  |_row%+=1.Br/  . |
0000a900  74 65 78 74 5f 72 6f 77  25 3e 6c 61 73 74 5f 72  |text_row%>last_r|
0000a910  6f 77 25 20 6c 61 73 74  5f 72 6f 77 25 3d 74 65  |ow% last_row%=te|
0000a920  78 74 5f 72 6f 77 25 0d  42 7c 05 cd 0d 42 86 05  |xt_row%.B|...B..|
0000a930  cd 0d 42 90 04 0d 42 9a  23 64 75 6d 6d 79 3d a4  |..B...B.#dummy=.|
0000a940  72 65 64 72 61 77 5f 74  65 78 74 28 72 65 64 72  |redraw_text(redr|
0000a950  61 77 5f 61 6c 6c 25 29  0d 42 a4 05 e1 0d 42 ae  |aw_all%).B....B.|
0000a960  04 0d 42 b8 1b dd 20 f2  6f 76 65 72 77 72 69 74  |..B... .overwrit|
0000a970  65 5f 63 68 61 72 28 63  68 72 25 29 0d 42 c2 3e  |e_char(chr%).B.>|
0000a980  e7 20 74 65 78 74 5f 63  6f 6c 25 3e 74 65 78 74  |. text_col%>text|
0000a990  5f 72 6f 77 6c 65 6e 25  28 74 65 78 74 5f 72 6f  |_rowlen%(text_ro|
0000a9a0  77 25 29 20 8c 20 f2 69  6e 73 65 72 74 5f 63 68  |w%) . .insert_ch|
0000a9b0  61 72 28 63 68 72 25 29  3a e1 0d 42 cc 88 e7 20  |ar(chr%):..B... |
0000a9c0  74 65 78 74 5f 70 74 72  25 3d 6d 61 72 6b 28 30  |text_ptr%=mark(0|
0000a9d0  29 20 8c 20 c8 94 20 6d  61 72 6b 28 30 29 2c 6d  |) . .. mark(0),m|
0000a9e0  61 72 6b 28 31 29 3a c8  94 20 61 73 63 28 30 29  |ark(1):.. asc(0)|
0000a9f0  2c 61 73 63 28 31 29 3a  c8 94 20 63 68 72 28 30  |,asc(1):.. chr(0|
0000aa00  29 2c 63 68 72 28 31 29  3a 6d 72 6b 2d 3d 31 3a  |),chr(1):mrk-=1:|
0000aa10  6d 61 72 6b 28 31 29 3d  30 20 8b 20 e7 20 74 65  |mark(1)=0 . . te|
0000aa20  78 74 5f 70 74 72 25 3d  6d 61 72 6b 28 31 29 20  |xt_ptr%=mark(1) |
0000aa30  8c 20 6d 72 6b 2d 3d 31  3a 6d 61 72 6b 28 31 29  |. mrk-=1:mark(1)|
0000aa40  3d 30 0d 42 d6 13 3f 74  65 78 74 5f 70 74 72 25  |=0.B..?text_ptr%|
0000aa50  3d 63 68 72 25 0d 42 e0  10 74 65 78 74 5f 70 74  |=chr%.B..text_pt|
0000aa60  72 25 2b 3d 31 0d 42 ea  2d e7 20 74 65 78 74 5f  |r%+=1.B.-. text_|
0000aa70  70 74 72 25 3e 74 65 78  74 5f 65 6e 64 25 20 74  |ptr%>text_end% t|
0000aa80  65 78 74 5f 65 6e 64 25  3d 74 65 78 74 5f 70 74  |ext_end%=text_pt|
0000aa90  72 25 0d 42 f4 10 3f 74  65 78 74 5f 65 6e 64 25  |r%.B..?text_end%|
0000aaa0  3d 30 0d 42 fe 64 f2 75  70 64 61 74 65 28 74 65  |=0.B.d.update(te|
0000aab0  78 74 68 61 6e 64 6c 65  2c 63 68 58 25 2a 28 74  |xthandle,chX%*(t|
0000aac0  65 78 74 5f 63 6f 6c 25  2d 31 29 2c 2d 28 74 65  |ext_col%-1),-(te|
0000aad0  78 74 5f 72 6f 77 25 2b  31 29 2a 6c 73 59 25 2c  |xt_row%+1)*lsY%,|
0000aae0  73 63 78 25 2b 28 78 31  25 2d 78 30 25 29 2b 63  |scx%+(x1%-x0%)+c|
0000aaf0  68 58 25 2c 2d 28 74 65  78 74 5f 72 6f 77 25 29  |hX%,-(text_row%)|
0000ab00  2a 6c 73 59 25 29 0d 43  08 19 64 75 6d 6d 79 3d  |*lsY%).C..dummy=|
0000ab10  a4 72 65 64 72 61 77 5f  74 65 78 74 28 b9 29 0d  |.redraw_text(.).|
0000ab20  43 12 10 74 65 78 74 5f  63 6f 6c 25 2b 3d 31 0d  |C..text_col%+=1.|
0000ab30  43 1c 38 e7 20 74 65 78  74 5f 63 6f 6c 25 3e 74  |C.8. text_col%>t|
0000ab40  65 78 74 5f 6d 61 78 6c  6c 65 6e 25 20 8c 20 74  |ext_maxllen% . t|
0000ab50  65 78 74 5f 63 6f 6c 25  3d 31 3a 74 65 78 74 5f  |ext_col%=1:text_|
0000ab60  72 6f 77 25 2b 3d 31 0d  43 26 04 0d 43 30 1b 6c  |row%+=1.C&..C0.l|
0000ab70  61 73 74 5f 72 6f 77 25  3d a4 66 69 6e 64 5f 6c  |ast_row%=.find_l|
0000ab80  61 73 74 72 6f 77 0d 43  3a 04 0d 43 44 1e e3 20  |astrow.C:..CD.. |
0000ab90  52 25 3d 74 65 78 74 5f  72 6f 77 25 20 b8 20 6c  |R%=text_row% . l|
0000aba0  61 73 74 5f 72 6f 77 25  0d 43 4e 21 20 20 74 65  |ast_row%.CN!  te|
0000abb0  78 74 5f 72 6f 77 6c 65  6e 25 28 52 25 29 3d a9  |xt_rowlen%(R%)=.|
0000abc0  20 a4 72 6f 77 28 52 25  29 0d 43 58 05 ed 0d 43  | .row(R%).CX...C|
0000abd0  62 05 e1 0d 43 6c 04 0d  43 76 12 dd 20 f2 64 65  |b...Cl..Cv.. .de|
0000abe0  6c 65 74 65 5f 63 68 61  72 0d 43 80 25 e7 20 74  |lete_char.C.%. t|
0000abf0  65 78 74 5f 63 6f 6c 25  3d 31 20 80 20 74 65 78  |ext_col%=1 . tex|
0000ac00  74 5f 72 6f 77 25 3d 30  20 ef 20 37 3a e1 0d 43  |t_row%=0 . 7:..C|
0000ac10  8a 24 e7 20 74 65 78 74  5f 70 74 72 25 3c 6d 61  |.$. text_ptr%<ma|
0000ac20  72 6b 28 30 29 20 8c 20  6d 61 72 6b 28 30 29 2d  |rk(0) . mark(0)-|
0000ac30  3d 31 0d 43 94 24 e7 20  74 65 78 74 5f 70 74 72  |=1.C.$. text_ptr|
0000ac40  25 3c 6d 61 72 6b 28 31  29 20 8c 20 6d 61 72 6b  |%<mark(1) . mark|
0000ac50  28 31 29 2d 3d 31 0d 43  9e 1d 74 65 78 74 5f 70  |(1)-=1.C..text_p|
0000ac60  74 72 25 2d 3d 31 3a 74  65 78 74 5f 65 6e 64 25  |tr%-=1:text_end%|
0000ac70  2d 3d 31 0d 43 a8 88 e7  20 74 65 78 74 5f 70 74  |-=1.C... text_pt|
0000ac80  72 25 3d 6d 61 72 6b 28  30 29 20 8c 20 c8 94 20  |r%=mark(0) . .. |
0000ac90  6d 61 72 6b 28 30 29 2c  6d 61 72 6b 28 31 29 3a  |mark(0),mark(1):|
0000aca0  c8 94 20 61 73 63 28 30  29 2c 61 73 63 28 31 29  |.. asc(0),asc(1)|
0000acb0  3a c8 94 20 63 68 72 28  30 29 2c 63 68 72 28 31  |:.. chr(0),chr(1|
0000acc0  29 3a 6d 72 6b 2d 3d 31  3a 6d 61 72 6b 28 31 29  |):mrk-=1:mark(1)|
0000acd0  3d 30 20 8b 20 e7 20 74  65 78 74 5f 70 74 72 25  |=0 . . text_ptr%|
0000ace0  3d 6d 61 72 6b 28 31 29  20 8c 20 6d 72 6b 2d 3d  |=mark(1) . mrk-=|
0000acf0  31 3a 6d 61 72 6b 28 31  29 3d 30 0d 43 b2 41 74  |1:mark(1)=0.C.At|
0000ad00  65 78 74 5f 63 6f 6c 25  2d 3d 31 3a 74 68 69 73  |ext_col%-=1:this|
0000ad10  5f 72 6f 77 25 3d 74 65  78 74 5f 72 6f 77 25 3a  |_row%=text_row%:|
0000ad20  f4 20 74 65 78 74 5f 72  6f 77 6c 65 6e 25 28 74  |. text_rowlen%(t|
0000ad30  65 78 74 5f 72 6f 77 25  29 2d 3d 31 0d 43 bc 09  |ext_row%)-=1.C..|
0000ad40  63 72 25 3d a3 0d 43 c6  13 e7 20 74 65 78 74 5f  |cr%=..C... text_|
0000ad50  63 6f 6c 25 3c 31 20 8c  0d 43 d0 0b 20 20 63 72  |col%<1 ..C..  cr|
0000ad60  25 3d b9 0d 43 da 29 20  20 74 65 78 74 5f 63 6f  |%=..C.)  text_co|
0000ad70  6c 25 3d 74 65 78 74 5f  72 6f 77 6c 65 6e 25 28  |l%=text_rowlen%(|
0000ad80  74 65 78 74 5f 72 6f 77  25 2d 31 29 0d 43 e4 22  |text_row%-1).C."|
0000ad90  20 20 e7 20 3f 74 65 78  74 5f 70 74 72 25 3d 31  |  . ?text_ptr%=1|
0000ada0  33 20 74 65 78 74 5f 63  6f 6c 25 2b 3d 31 0d 43  |3 text_col%+=1.C|
0000adb0  ee 12 20 20 74 65 78 74  5f 72 6f 77 25 2d 3d 31  |..  text_row%-=1|
0000adc0  0d 43 f8 05 cd 0d 44 02  36 f2 6d 6f 76 65 28 74  |.C....D.6.move(t|
0000add0  65 78 74 5f 70 74 72 25  2b 31 2c 74 65 78 74 5f  |ext_ptr%+1,text_|
0000ade0  70 74 72 25 2c 74 65 78  74 5f 65 6e 64 25 2d 74  |ptr%,text_end%-t|
0000adf0  65 78 74 5f 70 74 72 25  2b 31 29 0d 44 0c 04 0d  |ext_ptr%+1).D...|
0000ae00  44 16 35 e7 20 74 65 78  74 5f 72 6f 77 6c 65 6e  |D.5. text_rowlen|
0000ae10  25 28 74 68 69 73 5f 72  6f 77 25 29 3c 74 65 78  |%(this_row%)<tex|
0000ae20  74 5f 6d 61 78 6c 6c 65  6e 25 20 80 20 ac 20 63  |t_maxllen% . . c|
0000ae30  72 25 20 8c 0d 44 20 1e  74 65 78 74 5f 72 6f 77  |r% ..D .text_row|
0000ae40  6c 65 6e 25 28 74 68 69  73 5f 72 6f 77 25 29 2d  |len%(this_row%)-|
0000ae50  3d 31 0d 44 2a 05 cc 0d  44 34 1b 6c 61 73 74 5f  |=1.D*...D4.last_|
0000ae60  72 6f 77 25 3d a4 66 69  6e 64 5f 6c 61 73 74 72  |row%=.find_lastr|
0000ae70  6f 77 0d 44 3e 1e e3 20  52 25 3d 74 65 78 74 5f  |ow.D>.. R%=text_|
0000ae80  72 6f 77 25 20 b8 20 6c  61 73 74 5f 72 6f 77 25  |row% . last_row%|
0000ae90  0d 44 48 21 20 20 74 65  78 74 5f 72 6f 77 6c 65  |.DH!  text_rowle|
0000aea0  6e 25 28 52 25 29 3d a9  20 a4 72 6f 77 28 52 25  |n%(R%)=. .row(R%|
0000aeb0  29 0d 44 52 05 ed 0d 44  5c 05 cd 0d 44 66 15 f2  |).DR...D\...Df..|
0000aec0  67 65 74 77 28 74 65 78  74 68 61 6e 64 6c 65 29  |getw(texthandle)|
0000aed0  0d 44 70 50 e7 20 28 74  65 78 74 5f 70 74 72 25  |.DpP. (text_ptr%|
0000aee0  3d 74 65 78 74 5f 65 6e  64 25 20 84 20 74 65 78  |=text_end% . tex|
0000aef0  74 5f 72 6f 77 6c 65 6e  25 28 74 65 78 74 5f 72  |t_rowlen%(text_r|
0000af00  6f 77 25 29 3c 74 65 78  74 5f 6d 61 78 6c 6c 65  |ow%)<text_maxlle|
0000af10  6e 25 2d 31 29 20 20 80  20 ac 20 63 72 25 20 8c  |n%-1)  . . cr% .|
0000af20  0d 44 7a 64 f2 75 70 64  61 74 65 28 74 65 78 74  |.Dzd.update(text|
0000af30  68 61 6e 64 6c 65 2c 63  68 58 25 2a 28 74 65 78  |handle,chX%*(tex|
0000af40  74 5f 63 6f 6c 25 2d 31  29 2c 2d 28 74 65 78 74  |t_col%-1),-(text|
0000af50  5f 72 6f 77 25 2b 31 29  2a 6c 73 59 25 2c 73 63  |_row%+1)*lsY%,sc|
0000af60  78 25 2b 28 78 31 25 2d  78 30 25 29 2b 63 68 58  |x%+(x1%-x0%)+chX|
0000af70  25 2c 2d 28 74 65 78 74  5f 72 6f 77 25 29 2a 6c  |%,-(text_row%)*l|
0000af80  73 59 25 29 0d 44 84 12  20 20 43 25 3d 74 65 78  |sY%).D..  C%=tex|
0000af90  74 5f 63 6f 6c 25 0d 44  8e 05 cc 0d 44 98 53 f2  |t_col%.D....D.S.|
0000afa0  75 70 64 61 74 65 28 74  65 78 74 68 61 6e 64 6c  |update(texthandl|
0000afb0  65 2c 30 2c 2d 28 6c 61  73 74 5f 72 6f 77 25 2b  |e,0,-(last_row%+|
0000afc0  32 29 2a 6c 73 59 25 2c  73 63 78 25 2b 28 78 31  |2)*lsY%,scx%+(x1|
0000afd0  25 2d 78 30 25 29 2b 63  68 58 25 2c 2d 28 74 65  |%-x0%)+chX%,-(te|
0000afe0  78 74 5f 72 6f 77 25 29  2a 6c 73 59 25 29 0d 44  |xt_row%)*lsY%).D|
0000aff0  a2 4a f4 20 20 50 52 4f  43 75 70 64 61 74 65 28  |.J.  PROCupdate(|
0000b000  74 65 78 74 68 61 6e 64  6c 65 2c 73 63 78 25 2c  |texthandle,scx%,|
0000b010  73 63 79 25 2d 28 79 31  25 2d 79 30 25 29 2c 73  |scy%-(y1%-y0%),s|
0000b020  63 78 25 2b 28 78 31 25  2d 78 30 25 29 2b 63 68  |cx%+(x1%-x0%)+ch|
0000b030  58 25 2c 73 63 79 25 29  0d 44 ac 05 cd 0d 44 b6  |X%,scy%).D....D.|
0000b040  04 0d 44 c0 19 64 75 6d  6d 79 3d a4 72 65 64 72  |..D..dummy=.redr|
0000b050  61 77 5f 74 65 78 74 28  b9 29 0d 44 ca 05 e1 0d  |aw_text(.).D....|
0000b060  44 d4 04 0d 44 de 12 dd  20 f2 69 6e 73 65 72 74  |D...D... .insert|
0000b070  5f 6c 69 6e 65 0d 44 e8  24 e7 20 6c 61 73 74 5f  |_line.D.$. last_|
0000b080  72 6f 77 25 3d 74 65 78  74 5f 6d 61 78 72 6f 77  |row%=text_maxrow|
0000b090  73 25 20 8c 20 ef 37 3a  e1 0d 44 f2 1f 66 72 6f  |s% . .7:..D..fro|
0000b0a0  6d 25 3d 74 65 78 74 5f  70 74 72 25 2d 74 65 78  |m%=text_ptr%-tex|
0000b0b0  74 5f 63 6f 6c 25 2b 31  0d 44 fc 20 e7 20 66 72  |t_col%+1.D. . fr|
0000b0c0  6f 6d 25 3c 6d 61 72 6b  28 30 29 20 8c 20 6d 61  |om%<mark(0) . ma|
0000b0d0  72 6b 28 30 29 2b 3d 31  0d 45 06 20 e7 20 66 72  |rk(0)+=1.E. . fr|
0000b0e0  6f 6d 25 3c 6d 61 72 6b  28 31 29 20 8c 20 6d 61  |om%<mark(1) . ma|
0000b0f0  72 6b 28 31 29 2b 3d 31  0d 45 10 2a f2 6d 6f 76  |rk(1)+=1.E.*.mov|
0000b100  65 28 66 72 6f 6d 25 2c  66 72 6f 6d 25 2b 31 2c  |e(from%,from%+1,|
0000b110  74 65 78 74 5f 65 6e 64  25 2d 66 72 6f 6d 25 2b  |text_end%-from%+|
0000b120  31 29 0d 45 1a 0d 3f 66  72 6f 6d 25 3d 31 33 0d  |1).E..?from%=13.|
0000b130  45 24 27 e3 20 52 25 3d  6c 61 73 74 5f 72 6f 77  |E$'. R%=last_row|
0000b140  25 2b 31 20 b8 20 74 65  78 74 5f 72 6f 77 25 2b  |%+1 . text_row%+|
0000b150  31 20 88 20 2d 31 0d 45  2e 27 74 65 78 74 5f 72  |1 . -1.E.'text_r|
0000b160  6f 77 6c 65 6e 25 28 52  25 29 3d 74 65 78 74 5f  |owlen%(R%)=text_|
0000b170  72 6f 77 6c 65 6e 25 28  52 25 2d 31 29 0d 45 38  |rowlen%(R%-1).E8|
0000b180  05 ed 0d 45 42 1d 74 65  78 74 5f 72 6f 77 6c 65  |...EB.text_rowle|
0000b190  6e 25 28 74 65 78 74 5f  72 6f 77 25 29 3d 30 0d  |n%(text_row%)=0.|
0000b1a0  45 4c 1d 74 65 78 74 5f  65 6e 64 25 2b 3d 31 3a  |EL.text_end%+=1:|
0000b1b0  6c 61 73 74 5f 72 6f 77  25 2b 3d 31 0d 45 56 1a  |last_row%+=1.EV.|
0000b1c0  74 65 78 74 5f 70 74 72  25 2d 3d 74 65 78 74 5f  |text_ptr%-=text_|
0000b1d0  63 6f 6c 25 2d 31 0d 45  60 0f 74 65 78 74 5f 63  |col%-1.E`.text_c|
0000b1e0  6f 6c 25 3d 31 0d 45 6a  55 f2 75 70 64 61 74 65  |ol%=1.EjU.update|
0000b1f0  28 74 65 78 74 68 61 6e  64 6c 65 2c 73 63 78 25  |(texthandle,scx%|
0000b200  2c 73 63 79 25 2d 28 79  31 25 2d 79 30 25 29 2c  |,scy%-(y1%-y0%),|
0000b210  73 63 78 25 2b 28 78 31  25 2d 78 30 25 29 2b 63  |scx%+(x1%-x0%)+c|
0000b220  68 58 25 2c 73 63 79 25  2d 28 74 65 78 74 5f 72  |hX%,scy%-(text_r|
0000b230  6f 77 25 29 2a 6c 73 59  25 29 0d 45 74 19 64 75  |ow%)*lsY%).Et.du|
0000b240  6d 6d 79 3d a4 72 65 64  72 61 77 5f 74 65 78 74  |mmy=.redraw_text|
0000b250  28 b9 29 0d 45 7e 05 e1  0d 45 88 04 0d 45 92 12  |(.).E~...E...E..|
0000b260  dd 20 f2 64 65 6c 65 74  65 5f 6c 69 6e 65 0d 45  |. .delete_line.E|
0000b270  9c 0d ea 20 63 72 25 2c  74 6f 25 0d 45 a6 13 f2  |... cr%,to%.E...|
0000b280  72 65 6d 6f 76 65 5f 6d  61 72 6b 65 72 73 0d 45  |remove_markers.E|
0000b290  b0 3c 6e 65 78 74 5f 6c  69 6e 65 25 3d 74 65 78  |.<next_line%=tex|
0000b2a0  74 5f 70 74 72 25 2b 74  65 78 74 5f 72 6f 77 6c  |t_ptr%+text_rowl|
0000b2b0  65 6e 25 28 74 65 78 74  5f 72 6f 77 25 29 2d 74  |en%(text_row%)-t|
0000b2c0  65 78 74 5f 63 6f 6c 25  2b 31 0d 45 ba 2a 74 65  |ext_col%+1.E.*te|
0000b2d0  78 74 5f 70 74 72 25 2d  3d 28 74 65 78 74 5f 63  |xt_ptr%-=(text_c|
0000b2e0  6f 6c 25 2d 31 29 3a 74  6f 25 3d 74 65 78 74 5f  |ol%-1):to%=text_|
0000b2f0  70 74 72 25 0d 45 c4 41  e7 20 3f 28 74 65 78 74  |ptr%.E.A. ?(text|
0000b300  5f 70 74 72 25 2b 74 65  78 74 5f 72 6f 77 6c 65  |_ptr%+text_rowle|
0000b310  6e 25 28 74 65 78 74 5f  72 6f 77 25 29 29 3d 31  |n%(text_row%))=1|
0000b320  33 20 6e 65 78 74 5f 6c  69 6e 65 25 2b 3d 31 3a  |3 next_line%+=1:|
0000b330  63 72 25 3d b9 0d 45 ce  2e f2 6d 6f 76 65 28 6e  |cr%=..E...move(n|
0000b340  65 78 74 5f 6c 69 6e 65  25 2c 74 6f 25 2c 74 65  |ext_line%,to%,te|
0000b350  78 74 5f 65 6e 64 25 2d  6e 65 78 74 5f 6c 69 6e  |xt_end%-next_lin|
0000b360  65 25 29 0d 45 d8 26 74  65 78 74 5f 65 6e 64 25  |e%).E.&text_end%|
0000b370  2d 3d 74 65 78 74 5f 72  6f 77 6c 65 6e 25 28 74  |-=text_rowlen%(t|
0000b380  65 78 74 5f 72 6f 77 25  29 0d 45 e2 16 e7 20 63  |ext_row%).E... c|
0000b390  72 25 20 74 65 78 74 5f  65 6e 64 25 2d 3d 31 0d  |r% text_end%-=1.|
0000b3a0  45 ec 31 e7 20 74 65 78  74 5f 65 6e 64 25 3c 74  |E.1. text_end%<t|
0000b3b0  65 78 74 5f 62 6c 6f 63  6b 25 20 74 65 78 74 5f  |ext_block% text_|
0000b3c0  65 6e 64 25 3d 74 65 78  74 5f 62 6c 6f 63 6b 25  |end%=text_block%|
0000b3d0  0d 45 f6 10 3f 74 65 78  74 5f 65 6e 64 25 3d 30  |.E..?text_end%=0|
0000b3e0  0d 46 00 0f 74 65 78 74  5f 63 6f 6c 25 3d 31 0d  |.F..text_col%=1.|
0000b3f0  46 0a 1b 6c 61 73 74 5f  72 6f 77 25 3d a4 66 69  |F..last_row%=.fi|
0000b400  6e 64 5f 6c 61 73 74 72  6f 77 0d 46 14 04 0d 46  |nd_lastrow.F...F|
0000b410  1e 1e e3 20 52 25 3d 74  65 78 74 5f 72 6f 77 25  |... R%=text_row%|
0000b420  20 b8 20 6c 61 73 74 5f  72 6f 77 25 0d 46 28 21  | . last_row%.F(!|
0000b430  20 20 74 65 78 74 5f 72  6f 77 6c 65 6e 25 28 52  |  text_rowlen%(R|
0000b440  25 29 3d a9 20 a4 72 6f  77 28 52 25 29 0d 46 32  |%)=. .row(R%).F2|
0000b450  05 ed 0d 46 3c 04 0d 46  46 5a f4 20 50 52 4f 43  |...F<..FFZ. PROC|
0000b460  75 70 64 61 74 65 28 74  65 78 74 68 61 6e 64 6c  |update(texthandl|
0000b470  65 2c 73 63 78 25 2c 73  63 79 25 2d 28 79 31 25  |e,scx%,scy%-(y1%|
0000b480  2d 79 30 25 29 2c 73 63  78 25 2b 28 78 31 25 2d  |-y0%),scx%+(x1%-|
0000b490  78 30 25 29 2b 63 68 58  25 2c 73 63 79 25 2d 28  |x0%)+chX%,scy%-(|
0000b4a0  74 65 78 74 5f 72 6f 77  25 29 2a 6c 73 59 25 29  |text_row%)*lsY%)|
0000b4b0  0d 46 50 44 f2 75 70 64  61 74 65 28 74 65 78 74  |.FPD.update(text|
0000b4c0  68 61 6e 64 6c 65 2c 73  63 78 25 2c 73 63 79 25  |handle,scx%,scy%|
0000b4d0  2d 28 79 31 25 2d 79 30  25 29 2c 73 63 78 25 2b  |-(y1%-y0%),scx%+|
0000b4e0  28 78 31 25 2d 78 30 25  29 2b 63 68 58 25 2c 73  |(x1%-x0%)+chX%,s|
0000b4f0  63 79 25 29 0d 46 5a 19  64 75 6d 6d 79 3d a4 72  |cy%).FZ.dummy=.r|
0000b500  65 64 72 61 77 5f 74 65  78 74 28 b9 29 0d 46 64  |edraw_text(.).Fd|
0000b510  05 e1 0d 46 6e 04 0d 46  78 15 dd 20 f2 69 6e 73  |...Fn..Fx.. .ins|
0000b520  74 61 6c 6c 5f 74 65 78  74 65 64 0d 46 82 15 74  |tall_texted.F..t|
0000b530  65 78 74 5f 6d 61 78 72  6f 77 73 25 3d 35 30 30  |ext_maxrows%=500|
0000b540  0d 46 8c 19 74 65 78 74  5f 62 6c 6f 63 6b 73 69  |.F..text_blocksi|
0000b550  7a 65 25 3d 32 30 30 30  30 0d 46 96 14 74 65 78  |ze%=20000.F..tex|
0000b560  74 5f 6f 72 69 67 69 6e  61 6c 25 3d b9 0d 46 a0  |t_original%=..F.|
0000b570  21 de 20 74 65 78 74 5f  72 6f 77 6c 65 6e 25 28  |!. text_rowlen%(|
0000b580  74 65 78 74 5f 6d 61 78  72 6f 77 73 25 29 0d 46  |text_maxrows%).F|
0000b590  aa 2d de 20 64 65 66 61  75 6c 74 5f 74 65 78 74  |.-. default_text|
0000b5a0  5f 62 6c 6f 63 6b 25 20  74 65 78 74 5f 62 6c 6f  |_block% text_blo|
0000b5b0  63 6b 73 69 7a 65 25 2b  33 30 30 0d 46 b4 23 74  |cksize%+300.F.#t|
0000b5c0  65 78 74 5f 62 6c 6f 63  6b 25 3d 64 65 66 61 75  |ext_block%=defau|
0000b5d0  6c 74 5f 74 65 78 74 5f  62 6c 6f 63 6b 25 0d 46  |lt_text_block%.F|
0000b5e0  be 1d 64 75 6d 6d 79 5f  73 70 63 3d 32 37 3a 64  |..dummy_spc=27:d|
0000b5f0  75 6d 6d 79 5f 63 72 3d  32 35 33 0d 46 c8 21 ef  |ummy_cr=253.F.!.|
0000b600  32 33 2c 64 75 6d 6d 79  5f 73 70 63 2c 30 2c 30  |23,dummy_spc,0,0|
0000b610  2c 30 2c 30 2c 30 2c 30  2c 30 2c 30 0d 46 d2 20  |,0,0,0,0,0,0.F. |
0000b620  ef 32 33 2c 64 75 6d 6d  79 5f 63 72 2c 30 2c 30  |.23,dummy_cr,0,0|
0000b630  2c 30 2c 30 2c 30 2c 30  2c 30 2c 30 0d 46 dc 0f  |,0,0,0,0,0,0.F..|
0000b640  74 65 78 74 5f 72 6f 77  25 3d 30 0d 46 e6 0f 74  |text_row%=0.F..t|
0000b650  65 78 74 5f 63 6f 6c 25  3d 31 0d 46 f0 0f 6c 61  |ext_col%=1.F..la|
0000b660  73 74 5f 72 6f 77 25 3d  30 0d 46 fa 0f 74 65 78  |st_row%=0.F..tex|
0000b670  74 5f 63 75 72 25 3d b9  0d 47 04 0f 6f 76 65 72  |t_cur%=..G..over|
0000b680  77 72 69 74 65 3d a3 0d  47 0e 0d 74 61 62 5f 73  |write=..G..tab_s|
0000b690  65 74 3d 35 0d 47 18 19  74 65 78 74 5f 70 74 72  |et=5.G..text_ptr|
0000b6a0  25 3d 74 65 78 74 5f 62  6c 6f 63 6b 25 0d 47 22  |%=text_block%.G"|
0000b6b0  19 74 65 78 74 5f 65 6e  64 25 3d 74 65 78 74 5f  |.text_end%=text_|
0000b6c0  62 6c 6f 63 6b 25 0d 47  2c 12 3f 74 65 78 74 5f  |block%.G,.?text_|
0000b6d0  62 6c 6f 63 6b 25 3d 30  0d 47 36 4f 6d 72 6b 3d  |block%=0.G6Omrk=|
0000b6e0  30 3a de 20 6d 61 72 6b  28 31 29 2c 72 6f 77 28  |0:. mark(1),row(|
0000b6f0  31 29 2c 63 6f 6c 28 31  29 2c 63 68 72 28 31 29  |1),col(1),chr(1)|
0000b700  2c 61 73 63 28 31 29 3a  63 68 72 28 30 29 3d 32  |,asc(1):chr(0)=2|
0000b710  35 34 3a 63 68 72 28 31  29 3d 32 35 35 3a 63 6c  |54:chr(1)=255:cl|
0000b720  69 70 6c 65 6e 3d 30 0d  47 40 05 e1 0d 47 4a 04  |iplen=0.G@...GJ.|
0000b730  0d 47 54 15 dd 20 f2 72  65 6d 6f 76 65 5f 6d 61  |.GT.. .remove_ma|
0000b740  72 6b 65 72 73 0d 47 5e  08 ea 20 49 25 0d 47 68  |rkers.G^.. I%.Gh|
0000b750  0d e7 20 6d 72 6b 3e 30  20 8c 0d 47 72 0a 6d 72  |.. mrk>0 ..Gr.mr|
0000b760  6b 2d 3d 31 0d 47 7c 10  e3 20 49 25 3d 30 20 b8  |k-=1.G|.. I%=0 .|
0000b770  20 6d 72 6b 0d 47 86 20  3f 6d 61 72 6b 28 49 25  | mrk.G. ?mark(I%|
0000b780  29 3d 61 73 63 28 49 25  29 3a 6d 61 72 6b 28 49  |)=asc(I%):mark(I|
0000b790  25 29 3d 30 0d 47 90 05  ed 0d 47 9a 09 6d 72 6b  |%)=0.G....G..mrk|
0000b7a0  3d 30 0d 47 a4 05 cd 0d  47 ae 05 e1 0d 47 b8 04  |=0.G....G....G..|
0000b7b0  0d 47 c2 13 dd 20 a4 66  69 6e 64 5f 6c 61 73 74  |.G... .find_last|
0000b7c0  72 6f 77 0d 47 cc 0b ea  20 41 25 2c 42 25 0d 47  |row.G... A%,B%.G|
0000b7d0  d6 1f 41 25 3d 74 65 78  74 5f 62 6c 6f 63 6b 25  |..A%=text_block%|
0000b7e0  3a 42 25 3d 74 65 78 74  5f 65 6e 64 25 0d 47 e0  |:B%=text_end%.G.|
0000b7f0  0d d6 20 6c 61 73 74 72  6f 77 0d 47 ea 0e 3d 21  |.. lastrow.G..=!|
0000b800  72 6f 77 63 6f 75 6e 74  0d 47 f4 04 0d 47 fe 10  |rowcount.G...G..|
0000b810  dd 20 a4 72 6f 77 28 72  6f 77 25 29 0d 48 08 0b  |. .row(row%).H..|
0000b820  ea 20 41 25 2c 42 25 0d  48 12 1a 41 25 3d 74 65  |. A%,B%.H..A%=te|
0000b830  78 74 5f 62 6c 6f 63 6b  25 3a 42 25 3d 72 6f 77  |xt_block%:B%=row|
0000b840  25 0d 48 1c 09 d6 20 72  6f 77 0d 48 26 10 3d 24  |%.H... row.H&.=$|
0000b850  6c 69 6e 65 62 75 66 66  65 72 0d 48 30 04 0d 48  |linebuffer.H0..H|
0000b860  3a 04 0d 48 44 2b f4 20  2d 2d 2d 2d 2d 2d 20 4f  |:..HD+. ------ O|
0000b870  62 6a 65 63 74 20 65 64  69 74 6f 72 20 75 74 69  |bject editor uti|
0000b880  6c 69 74 69 65 73 20 2d  2d 2d 2d 2d 2d 0d 48 4e  |lities ------.HN|
0000b890  04 0d 48 58 10 dd 20 f2  66 69 72 73 74 5f 6f 62  |..HX.. .first_ob|
0000b8a0  6a 0d 48 62 14 f2 73 74  6f 72 65 5f 6f 62 6a 28  |j.Hb..store_obj(|
0000b8b0  6f 70 74 72 29 0d 48 6c  0a 6f 70 74 72 3d 31 0d  |optr).Hl.optr=1.|
0000b8c0  48 76 13 f2 72 65 73 74  6f 72 65 5f 6f 62 6a 28  |Hv..restore_obj(|
0000b8d0  31 29 0d 48 80 05 e1 0d  48 8a 04 0d 48 94 0f dd  |1).H....H...H...|
0000b8e0  20 f2 6c 61 73 74 5f 6f  62 6a 0d 48 9e 14 f2 73  | .last_obj.H...s|
0000b8f0  74 6f 72 65 5f 6f 62 6a  28 6f 70 74 72 29 0d 48  |tore_obj(optr).H|
0000b900  a8 14 6f 70 74 72 3d 6c  61 73 74 5f 6f 62 6a 65  |..optr=last_obje|
0000b910  63 74 0d 48 b2 16 f2 72  65 73 74 6f 72 65 5f 6f  |ct.H...restore_o|
0000b920  62 6a 28 6f 70 74 72 29  0d 48 bc 05 e1 0d 48 c6  |bj(optr).H....H.|
0000b930  04 0d 48 d0 0f dd 20 f2  6e 65 78 74 5f 6f 62 6a  |..H... .next_obj|
0000b940  0d 48 da 14 f2 73 74 6f  72 65 5f 6f 62 6a 28 6f  |.H...store_obj(o|
0000b950  70 74 72 29 0d 48 e4 0b  6f 70 74 72 2b 3d 31 0d  |ptr).H..optr+=1.|
0000b960  48 ee 1d e7 20 6f 70 74  72 3e 6d 61 78 6f 62 73  |H... optr>maxobs|
0000b970  20 6f 70 74 72 3d 6d 61  78 6f 62 73 0d 48 f8 16  | optr=maxobs.H..|
0000b980  f2 72 65 73 74 6f 72 65  5f 6f 62 6a 28 6f 70 74  |.restore_obj(opt|
0000b990  72 29 0d 49 02 05 e1 0d  49 0c 04 0d 49 16 0f dd  |r).I....I...I...|
0000b9a0  20 f2 70 72 65 76 5f 6f  62 6a 0d 49 20 14 f2 73  | .prev_obj.I ..s|
0000b9b0  74 6f 72 65 5f 6f 62 6a  28 6f 70 74 72 29 0d 49  |tore_obj(optr).I|
0000b9c0  2a 0b 6f 70 74 72 2d 3d  31 0d 49 34 13 e7 20 6f  |*.optr-=1.I4.. o|
0000b9d0  70 74 72 3c 31 20 6f 70  74 72 3d 31 0d 49 3e 16  |ptr<1 optr=1.I>.|
0000b9e0  f2 72 65 73 74 6f 72 65  5f 6f 62 6a 28 6f 70 74  |.restore_obj(opt|
0000b9f0  72 29 0d 49 48 05 e1 0d  49 52 04 0d 49 5c 16 dd  |r).IH...IR..I\..|
0000ba00  20 f2 66 77 64 5f 6f 62  6a 28 74 69 6d 65 73 25  | .fwd_obj(times%|
0000ba10  29 0d 49 66 14 f2 73 74  6f 72 65 5f 6f 62 6a 28  |).If..store_obj(|
0000ba20  6f 70 74 72 29 0d 49 70  2c 6f 70 74 72 2b 3d 74  |optr).Ip,optr+=t|
0000ba30  69 6d 65 73 25 3a e7 20  6f 70 74 72 3e 6d 61 78  |imes%:. optr>max|
0000ba40  6f 62 73 20 8c 20 6f 70  74 72 3d 6d 61 78 6f 62  |obs . optr=maxob|
0000ba50  73 0d 49 7a 16 f2 72 65  73 74 6f 72 65 5f 6f 62  |s.Iz..restore_ob|
0000ba60  6a 28 6f 70 74 72 29 0d  49 84 05 e1 0d 49 8e 04  |j(optr).I....I..|
0000ba70  0d 49 98 19 dd 20 f2 72  65 77 69 6e 64 5f 6f 62  |.I... .rewind_ob|
0000ba80  6a 28 74 69 6d 65 73 25  29 0d 49 a2 14 f2 73 74  |j(times%).I...st|
0000ba90  6f 72 65 5f 6f 62 6a 28  6f 70 74 72 29 0d 49 ac  |ore_obj(optr).I.|
0000baa0  22 6f 70 74 72 2d 3d 74  69 6d 65 73 25 3a e7 20  |"optr-=times%:. |
0000bab0  6f 70 74 72 3c 31 20 8c  20 6f 70 74 72 3d 31 0d  |optr<1 . optr=1.|
0000bac0  49 b6 16 f2 72 65 73 74  6f 72 65 5f 6f 62 6a 28  |I...restore_obj(|
0000bad0  6f 70 74 72 29 0d 49 c0  05 e1 0d 49 ca 04 0d 49  |optr).I....I...I|
0000bae0  d4 14 dd 20 f2 73 74 6f  72 65 5f 6f 62 6a 28 6f  |... .store_obj(o|
0000baf0  25 29 0d 49 de 47 f4 20  54 68 69 73 20 72 65 61  |%).I.G. This rea|
0000bb00  64 73 20 74 68 65 20 6f  62 6a 65 63 74 20 64 61  |ds the object da|
0000bb10  74 61 20 66 72 6f 6d 20  74 68 65 20 77 72 69 74  |ta from the writ|
0000bb20  65 61 62 6c 65 20 69 63  6f 6e 73 20 69 6e 20 74  |eable icons in t|
0000bb30  68 65 20 77 69 6e 64 6f  77 0d 49 e8 37 f4 20 61  |he window.I.7. a|
0000bb40  6e 64 20 73 74 6f 72 65  73 20 69 74 20 69 6e 20  |nd stores it in |
0000bb50  74 68 65 20 6f 62 6a 65  63 74 20 64 61 74 61 20  |the object data |
0000bb60  61 72 65 61 20 28 6f 64  61 74 61 25 2e 2e 2e 29  |area (odata%...)|
0000bb70  0d 49 f2 0d ea 20 6f 6c  64 64 61 74 61 0d 49 fc  |.I... olddata.I.|
0000bb80  10 70 74 72 3d 6f 25 2a  6f 5f 6c 65 6e 0d 4a 06  |.ptr=o%*o_len.J.|
0000bb90  04 0d 4a 10 0f e3 20 49  25 3d 38 20 b8 20 31 35  |..J... I%=8 . 15|
0000bba0  0d 4a 1a 2c 20 20 69 63  6f 6e 64 61 74 61 3d bb  |.J.,  icondata=.|
0000bbb0  28 a4 67 65 74 69 63 6f  6e 64 61 74 61 28 6f 62  |(.geticondata(ob|
0000bbc0  6a 68 61 6e 64 6c 65 2c  49 25 29 29 0d 4a 24 0d  |jhandle,I%)).J$.|
0000bbd0  20 20 c8 8e 20 49 25 20  ca 0d 4a 2e 15 20 20 20  |  .. I% ..J..   |
0000bbe0  20 c9 20 31 30 2c 31 31  2c 31 32 2c 31 33 0d 4a  | . 10,11,12,13.J|
0000bbf0  38 20 20 20 20 20 f4 20  54 68 65 20 64 6f 75 62  |8     . The doub|
0000bc00  6c 65 2d 62 79 74 65 20  76 61 6c 75 65 73 0d 4a  |le-byte values.J|
0000bc10  42 31 20 20 20 20 6f 6c  64 64 61 74 61 3d 3f 28  |B1    olddata=?(|
0000bc20  6f 64 61 74 61 25 2b 70  74 72 29 2b 3f 28 6f 64  |odata%+ptr)+?(od|
0000bc30  61 74 61 25 2b 70 74 72  2b 31 29 2a 32 35 36 0d  |ata%+ptr+1)*256.|
0000bc40  4a 4c 2a 20 20 20 20 e7  20 69 63 6f 6e 64 61 74  |JL*    . icondat|
0000bc50  61 3c 3e 6f 6c 64 64 61  74 61 20 8c 20 64 61 74  |a<>olddata . dat|
0000bc60  61 5f 73 61 76 65 64 3d  a3 0d 4a 56 24 20 20 20  |a_saved=..JV$   |
0000bc70  20 3f 28 6f 64 61 74 61  25 2b 70 74 72 29 3d 69  | ?(odata%+ptr)=i|
0000bc80  63 6f 6e 64 61 74 61 20  83 20 32 35 36 0d 4a 60  |condata . 256.J`|
0000bc90  26 20 20 20 20 3f 28 6f  64 61 74 61 25 2b 70 74  |&    ?(odata%+pt|
0000bca0  72 2b 31 29 3d 69 63 6f  6e 64 61 74 61 20 81 20  |r+1)=icondata . |
0000bcb0  32 35 36 0d 4a 6a 0e 20  20 20 20 70 74 72 2b 3d  |256.Jj.    ptr+=|
0000bcc0  32 0d 4a 74 13 20 20 20  20 c9 20 38 2c 39 2c 31  |2.Jt.    . 8,9,1|
0000bcd0  34 2c 31 35 0d 4a 7e 20  20 20 20 20 f4 20 54 68  |4,15.J~     . Th|
0000bce0  65 20 73 69 6e 67 6c 65  2d 62 79 74 65 20 76 61  |e single-byte va|
0000bcf0  6c 75 65 73 0d 4a 88 1d  20 20 20 20 6f 6c 64 64  |lues.J..    oldd|
0000bd00  61 74 61 3d 3f 28 6f 64  61 74 61 25 2b 70 74 72  |ata=?(odata%+ptr|
0000bd10  29 0d 4a 92 30 20 20 20  20 e7 20 6f 6c 64 64 61  |).J.0    . oldda|
0000bd20  74 61 3c 3e 69 63 6f 6e  64 61 74 61 20 83 20 32  |ta<>icondata . 2|
0000bd30  35 36 20 8c 20 64 61 74  61 5f 73 61 76 65 64 3d  |56 . data_saved=|
0000bd40  a3 0d 4a 9c 2b 20 20 20  20 3f 28 6f 64 61 74 61  |..J.+    ?(odata|
0000bd50  25 2b 70 74 72 29 3d 69  63 6f 6e 64 61 74 61 20  |%+ptr)=icondata |
0000bd60  83 20 32 35 36 3a 70 74  72 2b 3d 31 0d 4a a6 07  |. 256:ptr+=1.J..|
0000bd70  20 20 cb 0d 4a b0 05 ed  0d 4a ba 11 e7 20 63 6f  |  ..J....J... co|
0000bd80  6e 74 61 69 6e 65 72 20  8c 0d 4a c4 4a 3f 28 6f  |ntainer ..J.J?(o|
0000bd90  64 61 74 61 25 2b 70 74  72 29 3d 3f 28 6f 64 61  |data%+ptr)=?(oda|
0000bda0  74 61 25 2b 70 74 72 29  20 84 20 25 31 30 30 30  |ta%+ptr) . %1000|
0000bdb0  30 30 30 30 3a 70 74 72  2b 3d 31 3a 3f 28 6f 64  |0000:ptr+=1:?(od|
0000bdc0  61 74 61 25 2b 70 74 72  29 3d 63 6f 6e 74 5f 72  |ata%+ptr)=cont_r|
0000bdd0  6f 6f 6d 0d 4a ce 05 cc  0d 4a d8 42 3f 28 6f 64  |oom.J....J.B?(od|
0000bde0  61 74 61 25 2b 70 74 72  29 3d 3f 28 6f 64 61 74  |ata%+ptr)=?(odat|
0000bdf0  61 25 2b 70 74 72 29 20  80 20 25 30 31 31 31 31  |a%+ptr) . %01111|
0000be00  31 31 31 3a 70 74 72 2b  3d 31 3a 3f 28 6f 64 61  |111:ptr+=1:?(oda|
0000be10  74 61 25 2b 70 74 72 29  3d 30 0d 4a e2 05 cd 0d  |ta%+ptr)=0.J....|
0000be20  4a ec 05 e1 0d 4a f6 04  0d 4b 00 16 dd 20 f2 72  |J....J...K... .r|
0000be30  65 73 74 6f 72 65 5f 6f  62 6a 28 6f 25 29 0d 4b  |estore_obj(o%).K|
0000be40  0a 48 f4 20 54 68 69 73  20 72 65 61 64 73 20 74  |.H. This reads t|
0000be50  68 65 20 64 61 74 61 20  66 6f 72 20 6f 62 6a 65  |he data for obje|
0000be60  63 74 20 6f 25 20 66 72  6f 6d 20 6d 65 6d 6f 72  |ct o% from memor|
0000be70  79 20 61 6e 64 20 75 70  64 61 74 65 73 20 74 68  |y and updates th|
0000be80  65 20 69 63 6f 6e 0d 4b  14 3b f4 20 63 6f 6e 74  |e icon.K.;. cont|
0000be90  65 6e 74 73 2c 20 65 6e  73 75 72 69 6e 67 20 74  |ents, ensuring t|
0000bea0  68 65 20 77 69 6e 64 6f  77 20 72 65 66 6c 65 63  |he window reflec|
0000beb0  74 73 20 74 68 65 20 6e  65 77 20 76 61 6c 75 65  |ts the new value|
0000bec0  73 0d 4b 1e 04 0d 4b 28  10 70 74 72 3d 6f 25 2a  |s.K...K(.ptr=o%*|
0000bed0  6f 5f 6c 65 6e 0d 4b 32  28 f2 63 68 61 6e 67 65  |o_len.K2(.change|
0000bee0  69 63 6f 6e 28 6f 62 6a  68 61 6e 64 6c 65 2c 37  |icon(objhandle,7|
0000bef0  2c c3 28 6f 25 29 2c 69  63 6f 6e 25 29 0d 4b 3c  |,.(o%),icon%).K<|
0000bf00  0f e3 20 49 25 3d 38 20  b8 20 31 35 0d 4b 46 0d  |.. I%=8 . 15.KF.|
0000bf10  20 20 c8 8e 20 49 25 20  ca 0d 4b 50 47 20 20 20  |  .. I% ..KPG   |
0000bf20  20 c9 20 31 30 2c 31 31  2c 31 32 2c 31 33 3a 64  | . 10,11,12,13:d|
0000bf30  61 74 61 24 3d c3 28 3f  28 6f 64 61 74 61 25 2b  |ata$=.(?(odata%+|
0000bf40  70 74 72 29 2b 32 35 36  2a 3f 28 6f 64 61 74 61  |ptr)+256*?(odata|
0000bf50  25 2b 70 74 72 2b 31 29  29 3a 70 74 72 2b 3d 32  |%+ptr+1)):ptr+=2|
0000bf60  0d 4b 5a 31 20 20 20 20  c9 20 38 2c 39 2c 31 34  |.KZ1    . 8,9,14|
0000bf70  2c 31 35 3a 64 61 74 61  24 3d c3 28 3f 28 6f 64  |,15:data$=.(?(od|
0000bf80  61 74 61 25 2b 70 74 72  29 29 3a 70 74 72 2b 3d  |ata%+ptr)):ptr+=|
0000bf90  31 0d 4b 64 07 20 20 cb  0d 4b 6e 1c 20 20 e7 20  |1.Kd.  ..Kn.  . |
0000bfa0  64 61 74 61 24 3d 22 22  20 8c 20 64 61 74 61 24  |data$="" . data$|
0000bfb0  3d 22 30 22 0d 4b 78 2e  20 20 f2 63 68 61 6e 67  |="0".Kx.  .chang|
0000bfc0  65 69 63 6f 6e 28 6f 62  6a 68 61 6e 64 6c 65 2c  |eicon(objhandle,|
0000bfd0  49 25 2c 64 61 74 61 24  2c 6e 65 77 69 63 6f 6e  |I%,data$,newicon|
0000bfe0  25 29 0d 4b 82 08 ed 20  49 25 0d 4b 8c 04 0d 4b  |%).K... I%.K...K|
0000bff0  96 23 73 74 6f 72 65 3d  73 6d 61 6c 6c 5f 61 72  |.#store=small_ar|
0000c000  65 61 25 3a 63 6f 6c 25  3d 31 3a 72 6f 77 25 3d  |ea%:col%=1:row%=|
0000c010  30 0d 4b a0 29 f2 66 69  6c 6c 28 73 6d 61 6c 6c  |0.K.).fill(small|
0000c020  5f 61 72 65 61 25 2c 73  6d 61 6c 6c 5f 61 72 65  |_area%,small_are|
0000c030  61 73 69 7a 65 25 2c 31  33 29 0d 4b aa 0b 70 72  |asize%,13).K..pr|
0000c040  69 6e 74 3d a3 0d 4b b4  21 f2 70 76 6f 6b 28 a4  |int=..K.!.pvok(.|
0000c050  66 69 6e 64 6e 6f 75 6e  28 6f 25 2c 76 6f 69 64  |findnoun(o%,void|
0000c060  29 2c 31 2c a3 29 0d 4b  be 33 f2 63 68 61 6e 67  |),1,.).K.3.chang|
0000c070  65 69 63 6f 6e 28 6f 62  6a 68 61 6e 64 6c 65 2c  |eicon(objhandle,|
0000c080  31 39 2c 24 73 6d 61 6c  6c 5f 61 72 65 61 25 2c  |19,$small_area%,|
0000c090  6e 65 77 69 63 6f 6e 25  29 0d 4b c8 47 e7 20 28  |newicon%).K.G. (|
0000c0a0  28 3f 28 6f 64 61 74 61  25 2b 70 74 72 29 20 80  |(?(odata%+ptr) .|
0000c0b0  20 25 31 30 30 30 30 30  30 30 29 20 81 20 31 32  | %10000000) . 12|
0000c0c0  38 29 3e 30 20 8c 20 63  6f 6e 74 61 69 6e 65 72  |8)>0 . container|
0000c0d0  3d b9 20 8b 20 63 6f 6e  74 61 69 6e 65 72 3d a3  |=. . container=.|
0000c0e0  0d 4b d2 0a 70 74 72 2b  3d 31 0d 4b dc 33 63 6f  |.K..ptr+=1.K.3co|
0000c0f0  6e 74 5f 72 6f 6f 6d 3d  3f 28 6f 64 61 74 61 25  |nt_room=?(odata%|
0000c100  2b 70 74 72 29 3a 24 63  6f 6e 74 72 6f 6f 6d 25  |+ptr):$controom%|
0000c110  3d c3 28 63 6f 6e 74 5f  72 6f 6f 6d 29 0d 4b e6  |=.(cont_room).K.|
0000c120  69 e7 20 63 6f 6e 74 61  69 6e 65 72 20 f2 63 68  |i. container .ch|
0000c130  61 6e 67 65 69 63 6f 6e  28 6f 62 6a 68 61 6e 64  |angeicon(objhand|
0000c140  6c 65 2c 32 36 2c 22 53  49 5a 45 20 3c 43 3e 22  |le,26,"SIZE <C>"|
0000c150  2c 6e 65 77 69 63 6f 6e  25 29 20 8b 20 f2 63 68  |,newicon%) . .ch|
0000c160  61 6e 67 65 69 63 6f 6e  28 6f 62 6a 68 61 6e 64  |angeicon(objhand|
0000c170  6c 65 2c 32 36 2c 22 53  49 5a 45 22 2c 6e 65 77  |le,26,"SIZE",new|
0000c180  69 63 6f 6e 25 29 0d 4b  f0 05 e1 0d 4b fa 04 0d  |icon%).K....K...|
0000c190  4c 04 04 0d 4c 0e 29 f4  20 2d 2d 2d 2d 2d 2d 20  |L...L.). ------ |
0000c1a0  52 6f 6f 6d 20 65 64 69  74 6f 72 20 75 74 69 6c  |Room editor util|
0000c1b0  69 74 69 65 73 20 2d 2d  2d 2d 2d 2d 0d 4c 18 04  |ities ------.L..|
0000c1c0  0d 4c 22 11 dd 20 f2 66  69 72 73 74 5f 72 6f 6f  |.L".. .first_roo|
0000c1d0  6d 0d 4c 2c 15 f2 73 74  6f 72 65 5f 72 6f 6f 6d  |m.L,..store_room|
0000c1e0  28 72 70 74 72 29 0d 4c  36 0a 72 70 74 72 3d 31  |(rptr).L6.rptr=1|
0000c1f0  0d 4c 40 14 f2 72 65 73  74 6f 72 65 5f 72 6f 6f  |.L@..restore_roo|
0000c200  6d 28 31 29 0d 4c 4a 05  e1 0d 4c 54 04 0d 4c 5e  |m(1).LJ...LT..L^|
0000c210  10 dd 20 f2 6c 61 73 74  5f 72 6f 6f 6d 0d 4c 68  |.. .last_room.Lh|
0000c220  15 f2 73 74 6f 72 65 5f  72 6f 6f 6d 28 72 70 74  |..store_room(rpt|
0000c230  72 29 0d 4c 72 12 72 70  74 72 3d 6c 61 73 74 5f  |r).Lr.rptr=last_|
0000c240  72 6f 6f 6d 0d 4c 7c 17  f2 72 65 73 74 6f 72 65  |room.L|..restore|
0000c250  5f 72 6f 6f 6d 28 72 70  74 72 29 0d 4c 86 05 e1  |_room(rptr).L...|
0000c260  0d 4c 90 04 0d 4c 9a 10  dd 20 f2 6e 65 78 74 5f  |.L...L... .next_|
0000c270  72 6f 6f 6d 0d 4c a4 15  f2 73 74 6f 72 65 5f 72  |room.L...store_r|
0000c280  6f 6f 6d 28 72 70 74 72  29 0d 4c ae 0b 72 70 74  |oom(rptr).L..rpt|
0000c290  72 2b 3d 31 0d 4c b8 1d  e7 20 72 70 74 72 3e 6d  |r+=1.L... rptr>m|
0000c2a0  61 78 72 6d 73 20 72 70  74 72 3d 6d 61 78 72 6d  |axrms rptr=maxrm|
0000c2b0  73 0d 4c c2 17 f2 72 65  73 74 6f 72 65 5f 72 6f  |s.L...restore_ro|
0000c2c0  6f 6d 28 72 70 74 72 29  0d 4c cc 05 e1 0d 4c d6  |om(rptr).L....L.|
0000c2d0  04 0d 4c e0 10 dd 20 f2  70 72 65 76 5f 72 6f 6f  |..L... .prev_roo|
0000c2e0  6d 0d 4c ea 15 f2 73 74  6f 72 65 5f 72 6f 6f 6d  |m.L...store_room|
0000c2f0  28 72 70 74 72 29 0d 4c  f4 0b 72 70 74 72 2d 3d  |(rptr).L..rptr-=|
0000c300  31 0d 4c fe 13 e7 20 72  70 74 72 3c 31 20 72 70  |1.L... rptr<1 rp|
0000c310  74 72 3d 31 0d 4d 08 17  f2 72 65 73 74 6f 72 65  |tr=1.M...restore|
0000c320  5f 72 6f 6f 6d 28 72 70  74 72 29 0d 4d 12 05 e1  |_room(rptr).M...|
0000c330  0d 4d 1c 04 0d 4d 26 17  dd 20 f2 66 77 64 5f 72  |.M...M&.. .fwd_r|
0000c340  6f 6f 6d 28 74 69 6d 65  73 25 29 0d 4d 30 15 f2  |oom(times%).M0..|
0000c350  73 74 6f 72 65 5f 72 6f  6f 6d 28 72 70 74 72 29  |store_room(rptr)|
0000c360  0d 4d 3a 2c 72 70 74 72  2b 3d 74 69 6d 65 73 25  |.M:,rptr+=times%|
0000c370  3a e7 20 72 70 74 72 3e  6d 61 78 72 6d 73 20 8c  |:. rptr>maxrms .|
0000c380  20 72 70 74 72 3d 6d 61  78 72 6d 73 0d 4d 44 17  | rptr=maxrms.MD.|
0000c390  f2 72 65 73 74 6f 72 65  5f 72 6f 6f 6d 28 72 70  |.restore_room(rp|
0000c3a0  74 72 29 0d 4d 4e 05 e1  0d 4d 58 04 0d 4d 62 1a  |tr).MN...MX..Mb.|
0000c3b0  dd 20 f2 72 65 77 69 6e  64 5f 72 6f 6f 6d 28 74  |. .rewind_room(t|
0000c3c0  69 6d 65 73 25 29 0d 4d  6c 15 f2 73 74 6f 72 65  |imes%).Ml..store|
0000c3d0  5f 72 6f 6f 6d 28 72 70  74 72 29 0d 4d 76 22 72  |_room(rptr).Mv"r|
0000c3e0  70 74 72 2d 3d 74 69 6d  65 73 25 3a e7 20 72 70  |ptr-=times%:. rp|
0000c3f0  74 72 3c 31 20 8c 20 72  70 74 72 3d 31 0d 4d 80  |tr<1 . rptr=1.M.|
0000c400  17 f2 72 65 73 74 6f 72  65 5f 72 6f 6f 6d 28 72  |..restore_room(r|
0000c410  70 74 72 29 0d 4d 8a 05  e1 0d 4d 94 04 0d 4d 9e  |ptr).M....M...M.|
0000c420  15 dd 20 f2 73 74 6f 72  65 5f 72 6f 6f 6d 28 72  |.. .store_room(r|
0000c430  25 29 0d 4d a8 10 70 74  72 3d 72 25 2a 72 5f 6c  |%).M..ptr=r%*r_l|
0000c440  65 6e 0d 4d b2 10 e3 20  49 25 3d 33 34 20 b8 20  |en.M... I%=34 . |
0000c450  36 39 0d 4d bc 2d 20 20  69 63 6f 6e 64 61 74 61  |69.M.-  icondata|
0000c460  3d bb 28 a4 67 65 74 69  63 6f 6e 64 61 74 61 28  |=.(.geticondata(|
0000c470  72 6f 6f 6d 68 61 6e 64  6c 65 2c 49 25 29 29 0d  |roomhandle,I%)).|
0000c480  4d c6 0c 20 20 c8 8e 20  b9 20 ca 0d 4d d0 17 20  |M..  .. . ..M.. |
0000c490  20 20 20 c9 20 49 25 3e  33 35 20 80 20 49 25 3c  |   . I%>35 . I%<|
0000c4a0  35 34 0d 4d da 31 20 20  20 20 6f 6c 64 64 61 74  |54.M.1    olddat|
0000c4b0  61 3d 3f 28 72 64 61 74  61 25 2b 70 74 72 29 2b  |a=?(rdata%+ptr)+|
0000c4c0  3f 28 72 64 61 74 61 25  2b 70 74 72 2b 31 29 2a  |?(rdata%+ptr+1)*|
0000c4d0  32 35 36 0d 4d e4 2a 20  20 20 20 e7 20 69 63 6f  |256.M.*    . ico|
0000c4e0  6e 64 61 74 61 3c 3e 6f  6c 64 64 61 74 61 20 8c  |ndata<>olddata .|
0000c4f0  20 64 61 74 61 5f 73 61  76 65 64 3d a3 0d 4d ee  | data_saved=..M.|
0000c500  24 20 20 20 20 3f 28 72  64 61 74 61 25 2b 70 74  |$    ?(rdata%+pt|
0000c510  72 29 3d 69 63 6f 6e 64  61 74 61 20 83 20 32 35  |r)=icondata . 25|
0000c520  36 0d 4d f8 26 20 20 20  20 3f 28 72 64 61 74 61  |6.M.&    ?(rdata|
0000c530  25 2b 70 74 72 2b 31 29  3d 69 63 6f 6e 64 61 74  |%+ptr+1)=icondat|
0000c540  61 20 81 20 32 35 36 0d  4e 02 0e 20 20 20 20 70  |a . 256.N..    p|
0000c550  74 72 2b 3d 32 0d 4e 0c  17 20 20 20 20 c9 20 49  |tr+=2.N..    . I|
0000c560  25 3c 33 36 20 84 20 49  25 3e 35 33 0d 4e 16 1d  |%<36 . I%>53.N..|
0000c570  20 20 20 20 6f 6c 64 64  61 74 61 3d 3f 28 72 64  |    olddata=?(rd|
0000c580  61 74 61 25 2b 70 74 72  29 0d 4e 20 30 20 20 20  |ata%+ptr).N 0   |
0000c590  20 e7 20 6f 6c 64 64 61  74 61 3c 3e 69 63 6f 6e  | . olddata<>icon|
0000c5a0  64 61 74 61 20 83 20 32  35 36 20 8c 20 64 61 74  |data . 256 . dat|
0000c5b0  61 5f 73 61 76 65 64 3d  a3 0d 4e 2a 24 20 20 20  |a_saved=..N*$   |
0000c5c0  20 3f 28 72 64 61 74 61  25 2b 70 74 72 29 3d 69  | ?(rdata%+ptr)=i|
0000c5d0  63 6f 6e 64 61 74 61 20  83 20 32 35 36 0d 4e 34  |condata . 256.N4|
0000c5e0  0e 20 20 20 20 70 74 72  2b 3d 31 0d 4e 3e 07 20  |.    ptr+=1.N>. |
0000c5f0  20 cb 0d 4e 48 08 ed 20  49 25 0d 4e 52 2b 69 63  | ..NH.. I%.NR+ic|
0000c600  6f 6e 64 61 74 61 3d bb  28 a4 67 65 74 69 63 6f  |ondata=.(.getico|
0000c610  6e 64 61 74 61 28 72 6f  6f 6d 68 61 6e 64 6c 65  |ndata(roomhandle|
0000c620  2c 37 31 29 29 0d 4e 5c  23 3f 28 72 64 61 74 61  |,71)).N\#?(rdata|
0000c630  25 2b 70 74 72 2b 31 36  29 3d 69 63 6f 6e 64 61  |%+ptr+16)=iconda|
0000c640  74 61 20 83 20 32 35 36  0d 4e 66 23 3f 28 72 64  |ta . 256.Nf#?(rd|
0000c650  61 74 61 25 2b 70 74 72  2b 31 37 29 3d 69 63 6f  |ata%+ptr+17)=ico|
0000c660  6e 64 61 74 61 20 81 20  32 35 36 0d 4e 70 05 e1  |ndata . 256.Np..|
0000c670  0d 4e 7a 04 0d 4e 84 17  dd 20 f2 72 65 73 74 6f  |.Nz..N... .resto|
0000c680  72 65 5f 72 6f 6f 6d 28  72 25 29 0d 4e 8e 10 70  |re_room(r%).N..p|
0000c690  74 72 3d 72 25 2a 72 5f  6c 65 6e 0d 4e 98 2a f2  |tr=r%*r_len.N.*.|
0000c6a0  63 68 61 6e 67 65 69 63  6f 6e 28 72 6f 6f 6d 68  |changeicon(roomh|
0000c6b0  61 6e 64 6c 65 2c 33 33  2c c3 28 72 25 29 2c 69  |andle,33,.(r%),i|
0000c6c0  63 6f 6e 25 29 0d 4e a2  10 e3 20 49 25 3d 33 34  |con%).N... I%=34|
0000c6d0  20 b8 20 36 39 0d 4e ac  0c 20 20 c8 8e 20 b9 20  | . 69.N..  .. . |
0000c6e0  ca 0d 4e b6 17 20 20 20  20 c9 20 49 25 3e 33 35  |..N..    . I%>35|
0000c6f0  20 80 20 49 25 3c 35 34  0d 4e c0 39 20 20 20 20  | . I%<54.N.9    |
0000c700  64 61 74 61 24 3d c3 28  3f 28 72 64 61 74 61 25  |data$=.(?(rdata%|
0000c710  2b 70 74 72 29 2b 32 35  36 2a 3f 28 72 64 61 74  |+ptr)+256*?(rdat|
0000c720  61 25 2b 70 74 72 2b 31  29 29 3a 70 74 72 2b 3d  |a%+ptr+1)):ptr+=|
0000c730  32 0d 4e ca 17 20 20 20  20 c9 20 49 25 3c 33 36  |2.N..    . I%<36|
0000c740  20 84 20 49 25 3e 35 33  0d 4e d4 25 20 20 20 20  | . I%>53.N.%    |
0000c750  64 61 74 61 24 3d c3 28  3f 28 72 64 61 74 61 25  |data$=.(?(rdata%|
0000c760  2b 70 74 72 29 29 3a 70  74 72 2b 3d 31 0d 4e de  |+ptr)):ptr+=1.N.|
0000c770  07 20 20 cb 0d 4e e8 1c  20 20 e7 20 64 61 74 61  |.  ..N..  . data|
0000c780  24 3d 22 22 20 8c 20 64  61 74 61 24 3d 22 30 22  |$="" . data$="0"|
0000c790  0d 4e f2 2f 20 20 f2 63  68 61 6e 67 65 69 63 6f  |.N./  .changeico|
0000c7a0  6e 28 72 6f 6f 6d 68 61  6e 64 6c 65 2c 49 25 2c  |n(roomhandle,I%,|
0000c7b0  64 61 74 61 24 2c 6e 65  77 69 63 6f 6e 25 29 0d  |data$,newicon%).|
0000c7c0  4e fc 08 ed 20 49 25 0d  4f 06 32 64 61 74 61 24  |N... I%.O.2data$|
0000c7d0  3d c3 28 3f 28 72 64 61  74 61 25 2b 70 74 72 2b  |=.(?(rdata%+ptr+|
0000c7e0  31 36 29 2b 32 35 36 2a  3f 28 72 64 61 74 61 25  |16)+256*?(rdata%|
0000c7f0  2b 70 74 72 2b 31 37 29  29 0d 4f 10 1a e7 20 64  |+ptr+17)).O... d|
0000c800  61 74 61 24 3d 22 22 20  8c 20 64 61 74 61 24 3d  |ata$="" . data$=|
0000c810  22 30 22 0d 4f 1a 2d f2  63 68 61 6e 67 65 69 63  |"0".O.-.changeic|
0000c820  6f 6e 28 72 6f 6f 6d 68  61 6e 64 6c 65 2c 37 31  |on(roomhandle,71|
0000c830  2c 64 61 74 61 24 2c 6e  65 77 69 63 6f 6e 25 29  |,data$,newicon%)|
0000c840  0d 4f 24 05 e1 0d 4f 2e  04 0d 4f 38 04 0d 4f 42  |.O$...O...O8..OB|
0000c850  2c f4 20 2d 2d 2d 2d 2d  2d 20 4d 65 73 73 61 67  |,. ------ Messag|
0000c860  65 20 65 64 69 74 6f 72  20 75 74 69 6c 69 74 69  |e editor utiliti|
0000c870  65 73 20 2d 2d 2d 2d 2d  2d 0d 4f 4c 04 0d 4f 56  |es ------.OL..OV|
0000c880  10 dd 20 f2 73 74 6f 72  65 5f 6d 73 67 0d 4f 60  |.. .store_msg.O`|
0000c890  1d 65 72 72 66 6c 61 67  3d a3 3a f2 72 65 6d 6f  |.errflag=.:.remo|
0000c8a0  76 65 5f 6d 61 72 6b 65  72 73 0d 4f 6a 20 6e 65  |ve_markers.Oj ne|
0000c8b0  77 6c 65 6e 3d 74 65 78  74 5f 65 6e 64 25 2d 74  |wlen=text_end%-t|
0000c8c0  65 78 74 5f 62 6c 6f 63  6b 25 0d 4f 74 16 64 69  |ext_block%.Ot.di|
0000c8d0  66 66 3d 6e 65 77 6c 65  6e 2d 6f 6c 64 6c 65 6e  |ff=newlen-oldlen|
0000c8e0  0d 4f 7e 1d e7 20 64 69  66 66 2b 74 65 78 74 25  |.O~.. diff+text%|
0000c8f0  21 32 3e 6d 61 78 74 65  78 74 25 20 8c 0d 4f 88  |!2>maxtext% ..O.|
0000c900  1b 20 20 f2 65 72 72 6f  72 28 31 33 2c 65 72 72  |.  .error(13,err|
0000c910  6f 72 24 28 33 36 29 29  0d 4f 92 0f 20 20 65 72  |or$(36)).O..  er|
0000c920  72 66 6c 61 67 3d b9 0d  4f 9c 05 cc 0d 4f a6 18  |rflag=..O....O..|
0000c930  20 20 74 6f 3d 6d 73 74  61 72 74 2b 6e 65 77 6c  |  to=mstart+newl|
0000c940  65 6e 2d 31 0d 4f b0 11  20 20 66 72 6f 6d 3d 6d  |en-1.O..  from=m|
0000c950  65 6e 64 2d 31 0d 4f ba  31 20 20 74 65 78 74 5f  |end-1.O.1  text_|
0000c960  65 6e 64 25 3d 74 65 78  74 5f 62 6c 6f 63 6b 25  |end%=text_block%|
0000c970  3a 74 65 78 74 5f 70 74  72 25 3d 74 65 78 74 5f  |:text_ptr%=text_|
0000c980  62 6c 6f 63 6b 25 0d 4f  c4 24 20 20 62 79 74 65  |block%.O.$  byte|
0000c990  73 5f 74 6f 5f 6d 6f 76  65 3d a4 74 65 78 74 5f  |s_to_move=.text_|
0000c9a0  65 6e 64 2d 6d 65 6e 64  2b 31 0d 4f ce 22 20 20  |end-mend+1.O."  |
0000c9b0  f2 6d 6f 76 65 28 66 72  6f 6d 2c 74 6f 2c 62 79  |.move(from,to,by|
0000c9c0  74 65 73 5f 74 6f 5f 6d  6f 76 65 29 0d 4f d8 26  |tes_to_move).O.&|
0000c9d0  20 20 f2 6d 6f 76 65 28  74 65 78 74 5f 62 6c 6f  |  .move(text_blo|
0000c9e0  63 6b 25 2c 6d 73 74 61  72 74 2c 6e 65 77 6c 65  |ck%,mstart,newle|
0000c9f0  6e 29 0d 4f e2 16 20 20  f2 69 6e 63 6d 73 67 6c  |n).O..  .incmsgl|
0000ca00  65 6e 28 64 69 66 66 29  0d 4f ec 18 20 20 6e 73  |en(diff).O..  ns|
0000ca10  25 3d 73 77 69 74 63 68  5f 76 61 6c 73 28 30 29  |%=switch_vals(0)|
0000ca20  0d 4f f6 0f 20 20 e7 20  6e 73 25 3e 30 20 8c 0d  |.O..  . ns%>0 ..|
0000ca30  50 00 1f 20 20 20 20 3f  73 77 69 74 63 68 5f 62  |P..    ?switch_b|
0000ca40  75 66 25 3d 6e 73 25 3a  70 74 72 25 3d 31 0d 50  |uf%=ns%:ptr%=1.P|
0000ca50  0a 14 20 20 20 20 e3 20  49 25 3d 31 20 b8 20 6e  |..    . I%=1 . n|
0000ca60  73 25 0d 50 14 2a 20 20  20 20 20 20 73 77 69 74  |s%.P.*      swit|
0000ca70  63 68 5f 62 75 66 25 3f  70 74 72 25 3d 73 77 69  |ch_buf%?ptr%=swi|
0000ca80  74 63 68 5f 76 61 6c 73  28 49 25 29 0d 50 1e 34  |tch_vals(I%).P.4|
0000ca90  20 20 20 20 20 20 73 77  69 74 63 68 5f 62 75 66  |      switch_buf|
0000caa0  25 3f 28 70 74 72 25 2b  31 29 3d 73 77 69 74 63  |%?(ptr%+1)=switc|
0000cab0  68 5f 76 61 6c 73 28 49  25 29 20 81 20 32 35 36  |h_vals(I%) . 256|
0000cac0  0d 50 28 11 20 20 20 20  20 20 70 74 72 25 2b 3d  |.P(.      ptr%+=|
0000cad0  32 0d 50 32 09 20 20 20  20 ed 0d 50 3c 07 20 20  |2.P2.    ..P<.  |
0000cae0  cc 0d 50 46 27 20 20 20  20 f2 66 69 6c 6c 28 73  |..PF'    .fill(s|
0000caf0  77 69 74 63 68 5f 62 75  66 25 2c 6d 61 78 73 77  |witch_buf%,maxsw|
0000cb00  25 2a 32 2b 31 2c 30 29  0d 50 50 07 20 20 cd 0d  |%*2+1,0).PP.  ..|
0000cb10  50 5a 32 20 20 f2 6d 6f  76 65 28 6d 73 74 61 72  |PZ2  .move(mstar|
0000cb20  74 2c 73 77 6c 6f 63 2b  32 2a 6e 73 25 2b 31 2c  |t,swloc+2*ns%+1,|
0000cb30  a4 74 65 78 74 5f 65 6e  64 2d 6d 73 74 61 72 74  |.text_end-mstart|
0000cb40  29 0d 50 64 26 20 20 f2  6d 6f 76 65 28 73 77 69  |).Pd&  .move(swi|
0000cb50  74 63 68 5f 62 75 66 25  2c 73 77 6c 6f 63 2c 32  |tch_buf%,swloc,2|
0000cb60  2a 6e 73 25 2b 31 29 0d  50 6e 1f 20 20 f2 69 6e  |*ns%+1).Pn.  .in|
0000cb70  63 6d 73 67 6c 65 6e 28  32 2a 6e 73 25 2d 32 2a  |cmsglen(2*ns%-2*|
0000cb80  6f 6c 64 73 77 29 0d 50  78 05 cd 0d 50 82 05 e1  |oldsw).Px...P...|
0000cb90  0d 50 8c 04 0d 50 96 1e  dd 20 f2 69 6e 63 6d 73  |.P...P... .incms|
0000cba0  67 6c 65 6e 28 62 79 74  65 73 5f 74 6f 5f 61 64  |glen(bytes_to_ad|
0000cbb0  64 29 0d 50 a0 20 74 65  78 74 25 21 32 3d 74 65  |d).P. text%!2=te|
0000cbc0  78 74 25 21 32 2b 62 79  74 65 73 5f 74 6f 5f 61  |xt%!2+bytes_to_a|
0000cbd0  64 64 0d 50 aa 05 e1 0d  50 b4 04 0d 50 be 0f dd  |dd.P....P...P...|
0000cbe0  20 a4 74 65 78 74 5f 65  6e 64 0d 50 c8 12 3d 74  | .text_end.P..=t|
0000cbf0  65 78 74 25 2b 74 65 78  74 25 21 32 0d 50 d2 04  |ext%+text%!2.P..|
0000cc00  0d 50 dc 0d dd 20 a4 6d  61 78 6d 73 67 0d 50 e6  |.P... .maxmsg.P.|
0000cc10  17 3d 3f 74 65 78 74 25  2b 32 35 36 2a 74 65 78  |.=?text%+256*tex|
0000cc20  74 25 3f 31 0d 50 f0 04  0d 50 fa 10 dd 20 f2 69  |t%?1.P...P... .i|
0000cc30  6e 63 6d 61 78 6d 73 67  0d 51 04 26 3f 74 65 78  |ncmaxmsg.Q.&?tex|
0000cc40  74 25 2b 3d 31 3a e7 20  3f 74 65 78 74 25 3d 30  |t%+=1:. ?text%=0|
0000cc50  20 3f 28 74 65 78 74 25  2b 31 29 2b 3d 31 0d 51  | ?(text%+1)+=1.Q|
0000cc60  0e 05 e1 0d 51 18 04 0d  51 22 14 dd 20 f2 73 68  |....Q...Q".. .sh|
0000cc70  6f 77 5f 6d 73 67 28 6d  73 25 29 0d 51 2c 22 e7  |ow_msg(ms%).Q,".|
0000cc80  20 6d 73 25 3e a4 6d 61  78 6d 73 67 20 8c 20 85  | ms%>.maxmsg . .|
0000cc90  20 34 2c 65 72 72 6f 72  24 28 33 31 29 0d 51 36  | 4,error$(31).Q6|
0000cca0  0d e7 20 6d 73 25 3c 31  20 e1 0d 51 40 30 f2 66  |.. ms%<1 ..Q@0.f|
0000ccb0  69 6c 6c 28 74 65 78 74  5f 62 6c 6f 63 6b 25 2c  |ill(text_block%,|
0000ccc0  74 65 78 74 5f 62 6c 6f  63 6b 73 69 7a 65 25 2c  |text_blocksize%,|
0000ccd0  64 75 6d 6d 79 5f 73 70  63 29 0d 51 4a 26 74 65  |dummy_spc).QJ&te|
0000cce0  78 74 5f 72 6f 77 6c 65  6e 25 28 29 3d 2b 30 3a  |xt_rowlen%()=+0:|
0000ccf0  73 77 69 74 63 68 5f 76  61 6c 73 28 29 3d 2b 30  |switch_vals()=+0|
0000cd00  0d 51 54 11 63 68 61 6e  67 65 64 5f 6d 73 67 3d  |.QT.changed_msg=|
0000cd10  b9 0d 51 5e 24 41 25 3d  6d 73 25 3a 43 25 3d 74  |..Q^$A%=ms%:C%=t|
0000cd20  65 78 74 25 2b 37 3a 70  74 72 25 3d ba 20 66 69  |ext%+7:ptr%=. fi|
0000cd30  6e 64 6d 73 67 0d 51 68  16 63 68 72 25 3d 3f 70  |ndmsg.Qh.chr%=?p|
0000cd40  74 72 25 3a 70 74 72 25  2b 3d 31 0d 51 72 2f 73  |tr%:ptr%+=1.Qr/s|
0000cd50  77 69 74 63 68 5f 76 61  6c 73 28 30 29 3d 63 68  |witch_vals(0)=ch|
0000cd60  72 25 3a 6f 6c 64 73 77  3d 63 68 72 25 3a 73 77  |r%:oldsw=chr%:sw|
0000cd70  6c 6f 63 3d 70 74 72 25  2d 31 0d 51 7c 0e e7 20  |loc=ptr%-1.Q|.. |
0000cd80  63 68 72 25 3e 30 20 8c  0d 51 86 13 20 20 e3 20  |chr%>0 ..Q..  . |
0000cd90  49 25 3d 31 20 b8 20 63  68 72 25 0d 51 90 28 20  |I%=1 . chr%.Q.( |
0000cda0  20 20 20 73 77 69 74 63  68 5f 76 61 6c 73 28 49  |   switch_vals(I|
0000cdb0  25 29 3d 3f 70 74 72 25  2b 32 35 36 2a 70 74 72  |%)=?ptr%+256*ptr|
0000cdc0  25 3f 31 0d 51 9a 0f 20  20 20 20 70 74 72 25 2b  |%?1.Q..    ptr%+|
0000cdd0  3d 32 0d 51 a4 07 20 20  ed 0d 51 ae 05 cd 0d 51  |=2.Q..  ..Q....Q|
0000cde0  b8 0f 6d 73 74 61 72 74  3d 70 74 72 25 0d 51 c2  |..mstart=ptr%.Q.|
0000cdf0  0e 63 68 72 25 3d 3f 70  74 72 25 0d 51 cc 20 72  |.chr%=?ptr%.Q. r|
0000ce00  6f 77 25 3d 30 3a 74 65  78 74 5f 70 74 72 25 3d  |ow%=0:text_ptr%=|
0000ce10  74 65 78 74 5f 62 6c 6f  63 6b 25 0d 51 d6 0d c8  |text_block%.Q...|
0000ce20  95 20 63 68 72 25 3e 30  0d 51 e0 15 20 20 63 6f  |. chr%>0.Q..  co|
0000ce30  6c 25 3d 31 3a 6c 69 6e  65 24 3d 22 22 0d 51 ea  |l%=1:line$="".Q.|
0000ce40  31 20 20 c8 95 20 63 68  72 25 3c 3e 31 33 20 80  |1  .. chr%<>13 .|
0000ce50  20 63 68 72 25 3c 3e 30  20 80 20 63 6f 6c 25 3c  | chr%<>0 . col%<|
0000ce60  3d 74 65 78 74 5f 6d 61  78 6c 6c 65 6e 25 0d 51  |=text_maxllen%.Q|
0000ce70  f4 12 20 20 e7 20 63 68  72 25 3e 26 37 46 20 8c  |..  . chr%>&7F .|
0000ce80  0d 51 fe 15 20 20 74 6f  6b 70 74 72 3d 63 68 72  |.Q..  tokptr=chr|
0000ce90  25 2d 26 37 46 0d 52 08  2b 20 20 6c 69 6e 65 24  |%-&7F.R.+  line$|
0000cea0  2b 3d 74 6f 6b 24 28 74  6f 6b 70 74 72 29 3a 4c  |+=tok$(tokptr):L|
0000ceb0  25 3d a9 20 74 6f 6b 24  28 74 6f 6b 70 74 72 29  |%=. tok$(tokptr)|
0000cec0  0d 52 12 11 20 20 e3 20  49 25 3d 31 20 b8 20 4c  |.R..  . I%=1 . L|
0000ced0  25 0d 52 1c 2e 20 20 3f  28 74 65 78 74 5f 70 74  |%.R..  ?(text_pt|
0000cee0  72 25 2b 49 25 2d 31 29  3d 97 28 c1 74 6f 6b 24  |r%+I%-1)=.(.tok$|
0000cef0  28 74 6f 6b 70 74 72 29  2c 49 25 2c 31 29 29 0d  |(tokptr),I%,1)).|
0000cf00  52 26 07 20 20 ed 0d 52  30 17 20 20 74 65 78 74  |R&.  ..R0.  text|
0000cf10  5f 70 74 72 25 2b 3d 28  4c 25 2d 31 29 0d 52 3a  |_ptr%+=(L%-1).R:|
0000cf20  07 20 20 cc 0d 52 44 25  20 20 20 20 3f 74 65 78  |.  ..RD%    ?tex|
0000cf30  74 5f 70 74 72 25 3d 63  68 72 25 3a 6c 69 6e 65  |t_ptr%=chr%:line|
0000cf40  24 2b 3d bd 20 63 68 72  25 0d 52 4e 07 20 20 cd  |$+=. chr%.RN.  .|
0000cf50  0d 52 58 2f 20 20 20 20  70 74 72 25 2b 3d 31 3a  |.RX/    ptr%+=1:|
0000cf60  74 65 78 74 5f 70 74 72  25 2b 3d 31 3a 63 68 72  |text_ptr%+=1:chr|
0000cf70  25 3d 3f 70 74 72 25 3a  63 6f 6c 25 2b 3d 31 0d  |%=?ptr%:col%+=1.|
0000cf80  52 62 07 20 20 ce 0d 52  6c 20 20 20 74 65 78 74  |Rb.  ..Rl   text|
0000cf90  5f 72 6f 77 6c 65 6e 25  28 72 6f 77 25 29 3d a9  |_rowlen%(row%)=.|
0000cfa0  20 6c 69 6e 65 24 0d 52  76 33 20 20 e7 20 63 6f  | line$.Rv3  . co|
0000cfb0  6c 25 3e 74 65 78 74 5f  6d 61 78 6c 6c 65 6e 25  |l%>text_maxllen%|
0000cfc0  20 84 20 63 68 72 25 3d  31 33 20 72 6f 77 25 2b  | . chr%=13 row%+|
0000cfd0  3d 31 3a 63 6f 6c 25 3d  31 0d 52 80 32 20 20 e7  |=1:col%=1.R.2  .|
0000cfe0  20 63 68 72 25 3d 31 33  20 3f 74 65 78 74 5f 70  | chr%=13 ?text_p|
0000cff0  74 72 25 3d 31 33 3a 74  65 78 74 5f 70 74 72 25  |tr%=13:text_ptr%|
0000d000  2b 3d 31 3a 70 74 72 25  2b 3d 31 0d 52 8a 1a 20  |+=1:ptr%+=1.R.. |
0000d010  20 63 68 72 25 3d 3f 70  74 72 25 3a f4 20 70 74  | chr%=?ptr%:. pt|
0000d020  72 25 2b 3d 31 0d 52 94  05 ce 0d 52 9e 1d 6d 65  |r%+=1.R....R..me|
0000d030  6e 64 3d 70 74 72 25 3a  3f 74 65 78 74 5f 70 74  |nd=ptr%:?text_pt|
0000d040  72 25 3d 63 68 72 25 0d  52 a8 17 74 65 78 74 5f  |r%=chr%.R..text_|
0000d050  65 6e 64 25 3d 74 65 78  74 5f 70 74 72 25 0d 52  |end%=text_ptr%.R|
0000d060  b2 16 6f 6c 64 6c 65 6e  3d 6d 65 6e 64 2d 6d 73  |..oldlen=mend-ms|
0000d070  74 61 72 74 0d 52 bc 17  e7 20 6f 6c 64 6c 65 6e  |tart.R... oldlen|
0000d080  3c 30 20 6f 6c 64 6c 65  6e 3d 30 0d 52 c6 19 74  |<0 oldlen=0.R..t|
0000d090  65 78 74 5f 70 74 72 25  3d 74 65 78 74 5f 62 6c  |ext_ptr%=text_bl|
0000d0a0  6f 63 6b 25 0d 52 d0 1b  6c 61 73 74 5f 72 6f 77  |ock%.R..last_row|
0000d0b0  25 3d a4 66 69 6e 64 5f  6c 61 73 74 72 6f 77 0d  |%=.find_lastrow.|
0000d0c0  52 da 34 e3 20 49 25 3d  30 20 b8 20 6c 61 73 74  |R.4. I%=0 . last|
0000d0d0  5f 72 6f 77 25 3a 74 65  78 74 5f 72 6f 77 6c 65  |_row%:text_rowle|
0000d0e0  6e 25 28 49 25 29 3d a9  20 a4 72 6f 77 28 49 25  |n%(I%)=. .row(I%|
0000d0f0  29 3a ed 0d 52 e4 05 e1  0d 52 ee 04 0d 52 f8 0f  |):..R....R...R..|
0000d100  dd 20 f2 6e 65 78 74 5f  6d 73 67 0d 53 02 0b 6d  |. .next_msg.S..m|
0000d110  70 74 72 2b 3d 31 0d 53  0c 24 f2 73 74 6f 72 65  |ptr+=1.S.$.store|
0000d120  5f 6d 73 67 3a f4 20 73  61 76 65 20 74 68 69 73  |_msg:. save this|
0000d130  20 6f 6e 65 20 66 69 72  73 74 0d 53 16 4b e7 20  | one first.S.K. |
0000d140  6d 70 74 72 3e a4 6d 61  78 6d 73 67 20 8c 20 70  |mptr>.maxmsg . p|
0000d150  74 72 3d a4 74 65 78 74  5f 65 6e 64 3a 70 74 72  |tr=.text_end:ptr|
0000d160  3f 30 3d 30 3a 70 74 72  3f 31 3d 30 3a f2 69 6e  |?0=0:ptr?1=0:.in|
0000d170  63 6d 61 78 6d 73 67 3a  f2 69 6e 63 6d 73 67 6c  |cmaxmsg:.incmsgl|
0000d180  65 6e 28 32 29 0d 53 20  39 f2 73 68 6f 77 5f 6d  |en(2).S 9.show_m|
0000d190  73 67 28 6d 70 74 72 29  3a f4 20 4e 6f 77 20 6c  |sg(mptr):. Now l|
0000d1a0  6f 61 64 20 74 68 65 20  6e 65 78 74 20 6f 6e 65  |oad the next one|
0000d1b0  20 69 6e 74 6f 20 60 74  65 78 74 65 64 60 0d 53  | into `texted`.S|
0000d1c0  2a 05 e1 0d 53 34 04 0d  53 3e 0f dd 20 f2 70 72  |*...S4..S>.. .pr|
0000d1d0  65 76 5f 6d 73 67 0d 53  48 0e e7 20 6d 70 74 72  |ev_msg.SH.. mptr|
0000d1e0  3e 31 20 8c 0d 53 52 0b  6d 70 74 72 2d 3d 31 0d  |>1 ..SR.mptr-=1.|
0000d1f0  53 5c 0e f2 73 74 6f 72  65 5f 6d 73 67 0d 53 66  |S\..store_msg.Sf|
0000d200  13 f2 73 68 6f 77 5f 6d  73 67 28 6d 70 74 72 29  |..show_msg(mptr)|
0000d210  0d 53 70 05 cd 0d 53 7a  05 e1 0d 53 84 04 0d 53  |.Sp...Sz...S...S|
0000d220  8e 14 dd 20 f2 67 6f 74  6f 5f 6d 73 67 28 6d 73  |... .goto_msg(ms|
0000d230  25 29 0d 53 98 21 e7 20  6d 73 25 3e a4 6d 61 78  |%).S.!. ms%>.max|
0000d240  6d 73 67 20 6d 73 25 3d  a4 6d 61 78 6d 73 67 3a  |msg ms%=.maxmsg:|
0000d250  ef 20 37 0d 53 a2 15 e7  20 6d 73 25 3c 31 20 6d  |. 7.S... ms%<1 m|
0000d260  73 25 3d 31 3a ef 20 37  0d 53 ac 0e f2 73 74 6f  |s%=1:. 7.S...sto|
0000d270  72 65 5f 6d 73 67 0d 53  b6 12 f2 73 68 6f 77 5f  |re_msg.S...show_|
0000d280  6d 73 67 28 6d 73 25 29  0d 53 c0 0c 6d 70 74 72  |msg(ms%).S..mptr|
0000d290  3d 6d 73 25 0d 53 ca 05  e1 0d 53 d4 04 0d 53 de  |=ms%.S....S...S.|
0000d2a0  0f dd 20 f2 6c 61 73 74  5f 6d 73 67 0d 53 e8 0e  |.. .last_msg.S..|
0000d2b0  f2 73 74 6f 72 65 5f 6d  73 67 0d 53 f2 10 6d 70  |.store_msg.S..mp|
0000d2c0  74 72 3d a4 6d 61 78 6d  73 67 0d 53 fc 13 f2 73  |tr=.maxmsg.S...s|
0000d2d0  68 6f 77 5f 6d 73 67 28  6d 70 74 72 29 0d 54 06  |how_msg(mptr).T.|
0000d2e0  05 e1 0d 54 10 04 0d 54  1a 10 dd 20 f2 66 69 72  |...T...T... .fir|
0000d2f0  73 74 5f 6d 73 67 0d 54  24 0e f2 73 74 6f 72 65  |st_msg.T$..store|
0000d300  5f 6d 73 67 0d 54 2e 0a  6d 70 74 72 3d 31 0d 54  |_msg.T..mptr=1.T|
0000d310  38 13 f2 73 68 6f 77 5f  6d 73 67 28 6d 70 74 72  |8..show_msg(mptr|
0000d320  29 0d 54 42 05 e1 0d 54  4c 04 0d 54 56 04 0d 54  |).TB...TL..TV..T|
0000d330  60 2c f4 20 2d 2d 2d 2d  2d 2d 20 50 72 6f 67 72  |`,. ------ Progr|
0000d340  61 6d 20 45 64 69 74 6f  72 20 75 74 69 6c 69 74  |am Editor utilit|
0000d350  69 65 73 20 2d 2d 2d 2d  2d 2d 0d 54 6a 04 0d 54  |ies ------.Tj..T|
0000d360  74 11 dd 20 f2 73 74 6f  72 65 5f 70 72 6f 67 0d  |t.. .store_prog.|
0000d370  54 7e 18 ea 20 73 70 5f  70 74 72 25 2c 6c 69 6e  |T~.. sp_ptr%,lin|
0000d380  65 24 2c 63 68 72 25 0d  54 88 1d f4 20 55 73 65  |e$,chr%.T... Use|
0000d390  20 60 68 6f 75 72 67 6c  61 73 73 60 20 70 6f 69  | `hourglass` poi|
0000d3a0  6e 74 65 72 0d 54 92 15  c8 99 20 22 48 6f 75 72  |nter.T.... "Hour|
0000d3b0  67 6c 61 73 73 5f 4f 6e  22 0d 54 9c 1d 65 72 72  |glass_On".T..err|
0000d3c0  66 6c 61 67 3d a3 3a f2  72 65 6d 6f 76 65 5f 6d  |flag=.:.remove_m|
0000d3d0  61 72 6b 65 72 73 0d 54  a6 17 73 70 5f 70 74 72  |arkers.T..sp_ptr|
0000d3e0  25 3d 74 65 78 74 5f 62  6c 6f 63 6b 25 0d 54 b0  |%=text_block%.T.|
0000d3f0  11 63 68 72 25 3d 3f 73  70 5f 70 74 72 25 0d 54  |.chr%=?sp_ptr%.T|
0000d400  ba 12 70 72 67 70 74 72  3d 70 72 67 62 75 66 25  |..prgptr=prgbuf%|
0000d410  0d 54 c4 24 c8 95 20 73  70 5f 70 74 72 25 3c 74  |.T.$.. sp_ptr%<t|
0000d420  65 78 74 5f 65 6e 64 25  20 80 20 ac 20 65 72 72  |ext_end% . . err|
0000d430  66 6c 61 67 0d 54 ce 0e  20 20 6c 69 6e 65 24 3d  |flag.T..  line$=|
0000d440  22 22 0d 54 d8 33 20 20  c8 95 20 28 63 68 72 25  |"".T.3  .. (chr%|
0000d450  3c 3e 31 33 29 20 80 20  28 63 68 72 25 3c 3e 30  |<>13) . (chr%<>0|
0000d460  29 20 80 20 28 63 68 72  25 3c 3e 64 75 6d 6d 79  |) . (chr%<>dummy|
0000d470  5f 73 70 63 29 0d 54 e2  15 20 20 20 20 63 68 72  |_spc).T..    chr|
0000d480  25 3d 3f 73 70 5f 70 74  72 25 0d 54 ec 12 20 20  |%=?sp_ptr%.T..  |
0000d490  20 20 73 70 5f 70 74 72  25 2b 3d 31 0d 54 f6 16  |  sp_ptr%+=1.T..|
0000d4a0  20 20 20 20 6c 69 6e 65  24 2b 3d bd 28 63 68 72  |    line$+=.(chr|
0000d4b0  25 29 0d 55 00 07 20 20  ce 0d 55 0a 0b 20 20 f2  |%).U..  ..U..  .|
0000d4c0  73 63 61 6e 0d 55 14 13  20 20 63 68 72 25 3d 3f  |scan.U..  chr%=?|
0000d4d0  73 70 5f 70 74 72 25 0d  55 1e 42 20 20 c8 95 20  |sp_ptr%.U.B  .. |
0000d4e0  28 63 68 72 25 3d 31 33  20 84 20 63 68 72 25 3d  |(chr%=13 . chr%=|
0000d4f0  64 75 6d 6d 79 5f 73 70  63 20 84 20 63 68 72 25  |dummy_spc . chr%|
0000d500  3d 30 29 20 80 20 28 73  70 5f 70 74 72 25 3c 74  |=0) . (sp_ptr%<t|
0000d510  65 78 74 5f 65 6e 64 25  29 0d 55 28 20 20 20 20  |ext_end%).U(    |
0000d520  20 73 70 5f 70 74 72 25  2b 3d 31 3a 63 68 72 25  | sp_ptr%+=1:chr%|
0000d530  3d 3f 73 70 5f 70 74 72  25 0d 55 32 07 20 20 ce  |=?sp_ptr%.U2.  .|
0000d540  0d 55 3c 05 ce 0d 55 46  11 e7 20 ac 20 65 72 72  |.U<...UF.. . err|
0000d550  66 6c 61 67 20 8c 0d 55  50 33 20 20 6f 6c 64 6c  |flag ..UP3  oldl|
0000d560  65 6e 25 3d 70 72 67 65  6e 64 2d 70 73 74 61 72  |en%=prgend-pstar|
0000d570  74 3a e7 20 6f 6c 64 6c  65 6e 25 3c 3e 30 20 6f  |t:. oldlen%<>0 o|
0000d580  6c 64 6c 65 6e 25 2b 3d  31 0d 55 5a 23 20 20 62  |ldlen%+=1.UZ#  b|
0000d590  79 74 65 73 5f 74 6f 5f  6d 6f 76 65 3d a4 70 72  |ytes_to_move=.pr|
0000d5a0  67 6c 65 6e 2d 6f 6c 64  6c 65 6e 25 0d 55 64 1a  |glen-oldlen%.Ud.|
0000d5b0  20 20 f2 69 6e 63 70 72  67 6c 65 6e 28 2d 6f 6c  |  .incprglen(-ol|
0000d5c0  64 6c 65 6e 25 29 0d 55  6e 1c 20 20 6e 65 77 6c  |dlen%).Un.  newl|
0000d5d0  65 6e 25 3d 70 72 67 70  74 72 2d 70 72 67 62 75  |en%=prgptr-prgbu|
0000d5e0  66 25 0d 55 78 31 20 20  f4 20 54 68 69 73 20 63  |f%.Ux1  . This c|
0000d5f0  68 65 63 6b 20 66 6f 72  20 27 4e 6f 20 72 6f 6f  |heck for 'No roo|
0000d600  6d 27 20 77 61 73 20 61  64 64 65 64 20 32 2e 36  |m' was added 2.6|
0000d610  2e 38 39 0d 55 82 26 20  20 e7 20 a4 70 72 67 6c  |.89.U.&  . .prgl|
0000d620  65 6e 2b 6e 65 77 6c 65  6e 25 3e 63 6f 64 65 5f  |en+newlen%>code_|
0000d630  73 69 7a 65 25 2d 34 20  8c 0d 55 8c 1b 20 20 20  |size%-4 ..U..   |
0000d640  20 f2 69 6e 63 70 72 67  6c 65 6e 28 6f 6c 64 6c  | .incprglen(oldl|
0000d650  65 6e 25 29 0d 55 96 1d  20 20 20 20 f2 65 72 72  |en%).U..    .err|
0000d660  6f 72 28 31 33 2c 65 72  72 6f 72 24 28 33 35 29  |or(13,error$(35)|
0000d670  29 0d 55 a0 07 20 20 cc  0d 55 aa 34 20 20 20 20  |).U..  ..U.4    |
0000d680  f2 6d 6f 76 65 28 70 72  67 65 6e 64 2b 31 2c 70  |.move(prgend+1,p|
0000d690  73 74 61 72 74 2b 6e 65  77 6c 65 6e 25 2c 62 79  |start+newlen%,by|
0000d6a0  74 65 73 5f 74 6f 5f 6d  6f 76 65 29 0d 55 b4 25  |tes_to_move).U.%|
0000d6b0  20 20 20 20 f2 6d 6f 76  65 28 70 72 67 62 75 66  |    .move(prgbuf|
0000d6c0  25 2c 70 73 74 61 72 74  2c 6e 65 77 6c 65 6e 25  |%,pstart,newlen%|
0000d6d0  29 0d 55 be 1b 20 20 20  20 f2 69 6e 63 70 72 67  |).U..    .incprg|
0000d6e0  6c 65 6e 28 6e 65 77 6c  65 6e 25 29 0d 55 c8 48  |len(newlen%).U.H|
0000d6f0  20 20 20 20 3f 28 70 72  6f 67 72 61 6d 25 2b 34  |    ?(program%+4|
0000d700  2b a4 70 72 67 6c 65 6e  29 3d 30 3a f4 20 72 65  |+.prglen)=0:. re|
0000d710  73 74 6f 72 65 20 65 6e  64 20 6f 66 20 70 72 6f  |store end of pro|
0000d720  67 72 61 6d 20 6d 61 72  6b 65 72 20 28 39 2f 34  |gram marker (9/4|
0000d730  2f 38 39 29 0d 55 d2 11  20 20 20 20 74 65 78 74  |/89).U..    text|
0000d740  5f 6f 6b 3d b9 0d 55 dc  07 20 20 cd 0d 55 e6 05  |_ok=..U..  ..U..|
0000d750  cd 0d 55 f0 16 c8 99 20  22 48 6f 75 72 67 6c 61  |..U.... "Hourgla|
0000d760  73 73 5f 4f 66 66 22 0d  55 fa 05 e1 0d 56 04 04  |ss_Off".U....V..|
0000d770  0d 56 0e 0d dd 20 a4 70  72 67 6c 65 6e 0d 56 18  |.V... .prglen.V.|
0000d780  0e 3d 21 70 72 6f 67 72  61 6d 25 0d 56 22 04 0d  |.=!program%.V"..|
0000d790  56 2c 17 dd 20 f2 69 6e  63 70 72 67 6c 65 6e 28  |V,.. .incprglen(|
0000d7a0  62 79 74 65 73 29 0d 56  36 1d 21 70 72 6f 67 72  |bytes).V6.!progr|
0000d7b0  61 6d 25 3d 21 70 72 6f  67 72 61 6d 25 2b 62 79  |am%=!program%+by|
0000d7c0  74 65 73 0d 56 40 05 e1  0d 56 4a 04 0d 56 54 04  |tes.V@...VJ..VT.|
0000d7d0  0d 56 5e 2d f4 20 2d 2d  2d 2d 2d 2d 20 57 69 6e  |.V^-. ------ Win|
0000d7e0  64 6f 77 20 60 72 65 64  72 61 77 60 20 66 75 6e  |dow `redraw` fun|
0000d7f0  63 74 69 6f 6e 73 20 2d  2d 2d 2d 2d 2d 0d 56 68  |ctions ------.Vh|
0000d800  04 0d 56 72 04 0d 56 7c  19 dd 20 a4 72 65 64 72  |..Vr..V|.. .redr|
0000d810  61 77 5f 74 65 78 74 28  66 6c 61 67 25 29 0d 56  |aw_text(flag%).V|
0000d820  86 2c f4 20 66 6c 61 67  25 3d 54 52 55 45 20 2d  |.,. flag%=TRUE -|
0000d830  3e 20 72 65 64 72 61 77  20 57 48 4f 4c 45 20 74  |> redraw WHOLE t|
0000d840  65 78 74 20 77 69 6e 64  6f 77 0d 56 90 2b f4 20  |ext window.V.+. |
0000d850  65 6c 73 65 20 6f 6e 6c  79 20 72 65 64 72 61 77  |else only redraw|
0000d860  20 66 72 6f 6d 20 74 68  65 20 63 75 72 73 6f 72  | from the cursor|
0000d870  20 6c 69 6e 65 0d 56 9a  04 0d 56 a4 0c c8 95 20  | line.V...V.... |
0000d880  6d 6f 72 65 25 0d 56 ae  25 42 52 25 3d 28 62 79  |more%.V.%BR%=(by|
0000d890  25 2d 62 6c 6f 63 6b 21  33 32 2d 79 70 69 78 65  |%-block!32-ypixe|
0000d8a0  6c 25 29 20 81 20 6c 73  59 25 0d 56 b8 21 e7 20  |l%) . lsY%.V.!. |
0000d8b0  42 52 25 3e 6c 61 73 74  5f 72 6f 77 25 20 42 52  |BR%>last_row% BR|
0000d8c0  25 3d 6c 61 73 74 5f 72  6f 77 25 0d 56 c2 25 54  |%=last_row%.V.%T|
0000d8d0  52 25 3d 28 62 79 25 2d  62 6c 6f 63 6b 21 34 30  |R%=(by%-block!40|
0000d8e0  2d 79 70 69 78 65 6c 25  29 20 81 20 6c 73 59 25  |-ypixel%) . lsY%|
0000d8f0  0d 56 cc 21 e7 20 54 52  25 3e 6c 61 73 74 5f 72  |.V.!. TR%>last_r|
0000d900  6f 77 25 20 54 52 25 3d  6c 61 73 74 5f 72 6f 77  |ow% TR%=last_row|
0000d910  25 0d 56 d6 2a 70 74 72  5f 65 6e 64 25 3d 42 52  |%.V.*ptr_end%=BR|
0000d920  25 2a 74 65 78 74 5f 6d  61 78 6c 6c 65 6e 25 2b  |%*text_maxllen%+|
0000d930  74 65 78 74 5f 62 6c 6f  63 6b 25 0d 56 e0 05 da  |text_block%.V...|
0000d940  0d 56 ea 12 e3 20 49 25  3d 54 52 25 20 b8 20 42  |.V... I%=TR% . B|
0000d950  52 25 0d 56 f4 1f 20 20  ec 20 62 78 25 2c 62 79  |R%.V..  . bx%,by|
0000d960  25 2d 6c 73 59 25 2a 49  25 2d 79 70 69 78 65 6c  |%-lsY%*I%-ypixel|
0000d970  25 0d 56 fe 11 20 20 f1  20 a4 72 6f 77 28 49 25  |%.V..  . .row(I%|
0000d980  29 3b 0d 57 08 05 ed 0d  57 12 1a c8 99 47 65 74  |);.W....W....Get|
0000d990  52 2c 30 2c 62 6c 6f 63  6b 20 b8 20 6d 6f 72 65  |R,0,block . more|
0000d9a0  25 0d 57 1c 05 ce 0d 57  26 06 3d 30 0d 57 30 04  |%.W....W&.=0.W0.|
0000d9b0  0d 57 3a 04 0d 57 44 32  f4 20 2d 2d 2d 2d 2d 2d  |.W:..WD2. ------|
0000d9c0  20 47 65 6e 65 72 61 6c  20 69 63 6f 6e 20 68 61  | General icon ha|
0000d9d0  6e 64 6c 69 6e 67 20 72  6f 75 74 69 6e 65 73 20  |ndling routines |
0000d9e0  2d 2d 2d 2d 2d 2d 0d 57  4e 04 0d 57 58 24 dd 20  |------.WN..WX$. |
0000d9f0  f2 68 74 28 68 61 6e 64  6c 65 25 2c 69 63 6f 6e  |.ht(handle%,icon|
0000da00  25 2c 66 6c 24 2c 66 63  25 2c 62 63 25 29 0d 57  |%,fl$,fc%,bc%).W|
0000da10  62 0a ea 6d 61 73 6b 25  0d 57 6c 35 e7 66 6c 24  |b..mask%.Wl5.fl$|
0000da20  3d 22 2a 22 8c 66 6c 25  3d 30 3a 6d 61 73 6b 25  |="*".fl%=0:mask%|
0000da30  3d 26 46 46 30 30 30 30  30 30 20 8b 66 6c 25 3d  |=&FF000000 .fl%=|
0000da40  a0 66 6c 24 3a 6d 61 73  6b 25 3d 2d 31 0d 57 76  |.fl$:mask%=-1.Wv|
0000da50  61 21 62 6c 6f 63 6b 3d  68 61 6e 64 6c 65 25 3a  |a!block=handle%:|
0000da60  62 6c 6f 63 6b 21 34 3d  69 63 6f 6e 25 3a 62 6c  |block!4=icon%:bl|
0000da70  6f 63 6b 21 38 3d 66 6c  25 3a 62 6c 6f 63 6b 3f  |ock!8=fl%:block?|
0000da80  31 31 3d 66 63 25 2b 28  62 63 25 3c 3c 34 29 3a  |11=fc%+(bc%<<4):|
0000da90  62 6c 6f 63 6b 21 31 32  3d 6d 61 73 6b 25 3a c8  |block!12=mask%:.|
0000daa0  99 20 53 65 74 49 2c 30  2c 62 6c 6f 63 6b 0d 57  |. SetI,0,block.W|
0000dab0  80 05 e1 0d 57 8a 04 0d  57 94 21 dd 20 a4 67 65  |....W...W.!. .ge|
0000dac0  74 69 63 6f 6e 64 61 74  61 28 68 61 6e 64 6c 65  |ticondata(handle|
0000dad0  25 2c 69 63 6f 6e 25 29  0d 57 9e 20 21 62 6c 6f  |%,icon%).W. !blo|
0000dae0  63 6b 3d 68 61 6e 64 6c  65 25 3a 62 6c 6f 63 6b  |ck=handle%:block|
0000daf0  21 34 3d 69 63 6f 6e 25  0d 57 a8 13 c8 99 20 47  |!4=icon%.W.... G|
0000db00  65 74 49 2c 30 2c 62 6c  6f 63 6b 0d 57 b2 13 66  |etI,0,block.W..f|
0000db10  6c 61 67 73 25 3d 62 6c  6f 63 6b 21 32 34 0d 57  |lags%=block!24.W|
0000db20  bc 42 e7 20 28 66 6c 61  67 73 25 20 80 20 32 35  |.B. (flags% . 25|
0000db30  36 29 3c 3e 30 20 8c 20  64 61 74 61 24 3d 24 28  |6)<>0 . data$=$(|
0000db40  21 28 62 6c 6f 63 6b 2b  32 38 29 29 20 8b 20 64  |!(block+28)) . d|
0000db50  61 74 61 24 3d 24 28 62  6c 6f 63 6b 2b 32 38 29  |ata$=$(block+28)|
0000db60  0d 57 c6 0a 3d 64 61 74  61 24 0d 57 d0 04 0d 57  |.W..=data$.W...W|
0000db70  da 2d dd 20 f2 63 68 61  6e 67 65 69 63 6f 6e 28  |.-. .changeicon(|
0000db80  68 61 6e 64 6c 65 25 2c  69 63 6f 6e 25 2c 6e 65  |handle%,icon%,ne|
0000db90  77 24 2c f8 20 69 63 6f  6e 25 29 0d 57 e4 08 ea  |w$,. icon%).W...|
0000dba0  20 4a 25 0d 57 ee 26 64  75 6d 6d 79 24 3d a4 67  | J%.W.&dummy$=.g|
0000dbb0  65 74 69 63 6f 6e 64 61  74 61 28 68 61 6e 64 6c  |eticondata(handl|
0000dbc0  65 25 2c 69 63 6f 6e 25  29 0d 57 f8 40 e7 20 28  |e%,icon%).W.@. (|
0000dbd0  66 6c 61 67 73 25 20 80  20 32 35 36 29 3c 3e 30  |flags% . 256)<>0|
0000dbe0  20 8c 20 24 28 21 28 62  6c 6f 63 6b 2b 32 38 29  | . $(!(block+28)|
0000dbf0  29 3d 6e 65 77 24 20 8b  20 24 28 62 6c 6f 63 6b  |)=new$ . $(block|
0000dc00  2b 32 38 29 3d 6e 65 77  24 0d 58 02 16 c8 99 20  |+28)=new$.X.... |
0000dc10  44 65 6c 65 74 65 49 2c  30 2c 62 6c 6f 63 6b 0d  |DeleteI,0,block.|
0000dc20  58 0c 13 e3 20 4a 25 3d  34 20 b8 20 32 38 20 88  |X... J%=4 . 28 .|
0000dc30  20 34 0d 58 16 1b 20 20  62 6c 6f 63 6b 21 4a 25  | 4.X..  block!J%|
0000dc40  3d 62 6c 6f 63 6b 21 28  4a 25 2b 34 29 0d 58 20  |=block!(J%+4).X |
0000dc50  08 ed 20 4a 25 0d 58 2a  2d 21 62 6c 6f 63 6b 3d  |.. J%.X*-!block=|
0000dc60  68 61 6e 64 6c 65 25 3a  c8 99 20 43 72 65 61 74  |handle%:.. Creat|
0000dc70  65 49 2c 30 2c 62 6c 6f  63 6b 20 b8 20 69 63 6f  |eI,0,block . ico|
0000dc80  6e 25 0d 58 34 46 f2 73  65 74 5f 69 63 6f 6e 28  |n%.X4F.set_icon(|
0000dc90  68 61 6e 64 6c 65 25 2c  69 63 6f 6e 25 2c 30 2c  |handle%,icon%,0,|
0000dca0  30 29 3a f4 20 65 6e 73  75 72 65 20 69 74 20 61  |0):. ensure it a|
0000dcb0  70 70 65 61 72 73 20 75  70 64 61 74 65 64 20 6f  |ppears updated o|
0000dcc0  6e 20 73 63 72 65 65 6e  0d 58 3e 05 e1 0d 58 48  |n screen.X>...XH|
0000dcd0  04 0d 58 52 29 dd 20 f2  73 65 74 5f 69 63 6f 6e  |..XR). .set_icon|
0000dce0  28 68 61 6e 64 6c 65 25  2c 69 63 6f 6e 25 2c 65  |(handle%,icon%,e|
0000dcf0  6f 72 25 2c 6d 61 73 6b  25 29 0d 58 5c 3c 21 62  |or%,mask%).X\<!b|
0000dd00  6c 6f 63 6b 3d 68 61 6e  64 6c 65 25 3a 62 6c 6f  |lock=handle%:blo|
0000dd10  63 6b 21 34 3d 69 63 6f  6e 25 3a 62 6c 6f 63 6b  |ck!4=icon%:block|
0000dd20  21 38 3d 65 6f 72 25 3a  62 6c 6f 63 6b 21 31 32  |!8=eor%:block!12|
0000dd30  3d 6d 61 73 6b 25 0d 58  66 13 c8 99 20 53 65 74  |=mask%.Xf... Set|
0000dd40  49 2c 30 2c 62 6c 6f 63  6b 0d 58 70 05 e1 0d 58  |I,0,block.Xp...X|
0000dd50  7a 04 0d 58 84 04 0d 58  8e 2c f4 20 2d 2d 2d 2d  |z..X...X.,. ----|
0000dd60  2d 2d 20 4d 65 6e 75 20  63 72 65 61 74 69 6f 6e  |-- Menu creation|
0000dd70  20 70 72 6f 63 65 64 75  72 65 73 20 2d 2d 2d 2d  | procedures ----|
0000dd80  2d 2d 0d 58 98 04 0d 58  a2 37 f4 20 2a 2a 2a 2a  |--.X...X.7. ****|
0000dd90  20 6f 6e 49 63 6f 6e 42  61 72 20 3d 20 31 20 69  | onIconBar = 1 i|
0000dda0  66 20 79 65 73 2c 20 6f  74 68 65 72 77 69 73 65  |f yes, otherwise|
0000ddb0  20 30 20 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 0d 58 ac  | 0 **********.X.|
0000ddc0  27 dd 20 a4 6d 65 6e 75  48 65 69 67 68 74 28 74  |'. .menuHeight(t|
0000ddd0  68 65 4d 65 6e 75 25 2c  20 6f 6e 49 63 6f 6e 42  |heMenu%, onIconB|
0000dde0  61 72 25 29 0d 58 b6 43  3d 20 28 28 39 36 20 2a  |ar%).X.C= ((96 *|
0000ddf0  20 6f 6e 49 63 6f 6e 42  61 72 25 29 20 2b 20 28  | onIconBar%) + (|
0000de00  74 68 65 4d 65 6e 75 25  3f 33 30 20 2a 20 34 34  |theMenu%?30 * 44|
0000de10  29 20 2b 20 28 74 68 65  4d 65 6e 75 25 3f 33 31  |) + (theMenu%?31|
0000de20  20 2a 20 32 34 29 29 0d  58 c0 04 0d 58 ca 04 0d  | * 24)).X...X...|
0000de30  58 d4 0d dd 20 a4 63 72  6d 65 6e 75 0d 58 de 2e  |X... .crmenu.X..|
0000de40  e7 20 6d 65 6e 75 66 72  65 65 25 2b 32 38 20 3e  |. menufree%+28 >|
0000de50  20 6d 65 6e 75 65 6e 64  25 20 8c 20 85 20 31 2c  | menuend% . . 1,|
0000de60  65 72 72 6f 72 24 28 33  32 29 0d 58 e8 16 ea 20  |error$(32).X... |
0000de70  6d 25 2c 6d 65 6e 75 24  3a f3 20 6d 65 6e 75 24  |m%,menu$:. menu$|
0000de80  0d 58 f2 04 0d 58 fc 04  0d 59 06 48 f4 20 2a 2a  |.X...X...Y.H. **|
0000de90  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 20 74 68 65  |************ the|
0000dea0  20 62 6f 64 67 65 20 74  6f 20 73 74 6f 72 65 20  | bodge to store |
0000deb0  74 68 65 20 6d 65 6e 75  20 68 65 69 67 68 74 20  |the menu height |
0000dec0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
0000ded0  0d 59 10 11 ea 20 6d 65  6e 75 48 69 41 64 64 72  |.Y... menuHiAddr|
0000dee0  25 0d 59 1a 4b 6d 65 6e  75 48 69 41 64 64 72 25  |%.Y.KmenuHiAddr%|
0000def0  20 3d 20 6d 65 6e 75 66  72 65 65 25 20 2b 20 32  | = menufree% + 2|
0000df00  38 20 2b 20 32 20 3a f4  20 32 6e 64 20 6c 61 73  |8 + 2 :. 2nd las|
0000df10  74 20 62 79 74 65 20 69  6e 20 31 73 74 20 6d 65  |t byte in 1st me|
0000df20  6e 75 69 74 65 6d 20 66  6c 61 67 73 0d 59 24 14  |nuitem flags.Y$.|
0000df30  6d 65 6e 75 49 74 65 6d  4e 75 6d 25 20 3d 20 30  |menuItemNum% = 0|
0000df40  0d 59 2e 14 64 61 73 68  49 74 65 6d 4e 75 6d 25  |.Y..dashItemNum%|
0000df50  20 3d 20 30 0d 59 38 04  0d 59 42 04 0d 59 4c 26  | = 0.Y8..YB..YL&|
0000df60  e7 20 c0 6d 65 6e 75 24  2c 31 29 3d 22 3d 22 20  |. .menu$,1)="=" |
0000df70  8c 20 6d 65 6e 75 24 3d  a0 c1 6d 65 6e 75 24 2c  |. menu$=..menu$,|
0000df80  32 29 0d 59 56 16 6d 65  6e 75 70 74 72 25 3d 6d  |2).YV.menuptr%=m|
0000df90  65 6e 75 66 72 65 65 25  0d 59 60 0f 69 25 3d 30  |enufree%.Y`.i%=0|
0000dfa0  3a 63 74 72 25 3d 30 0d  59 6a 3f e7 20 c0 6d 65  |:ctr%=0.Yj?. .me|
0000dfb0  6e 75 24 2c 31 29 3d 22  23 22 20 8c 20 69 25 3d  |nu$,1)="#" . i%=|
0000dfc0  31 3a 6d 65 6e 75 74 69  74 6c 65 24 3d a4 70 61  |1:menutitle$=.pa|
0000dfd0  72 28 22 2c 22 29 20 8b  20 6d 65 6e 75 74 69 74  |r(",") . menutit|
0000dfe0  6c 65 24 3d 22 22 0d 59  74 17 49 25 3d a7 6d 65  |le$="".Yt.I%=.me|
0000dff0  6e 75 74 69 74 6c 65 24  2c 22 3e 22 29 0d 59 7e  |nutitle$,">").Y~|
0000e000  0c e7 20 49 25 3e 30 20  8c 0d 59 88 29 20 20 20  |.. I%>0 ..Y.)   |
0000e010  20 20 6d 65 6e 75 70 74  72 25 21 32 30 3d a0 28  |  menuptr%!20=.(|
0000e020  c1 6d 65 6e 75 74 69 74  6c 65 24 2c 49 25 2b 31  |.menutitle$,I%+1|
0000e030  29 29 0d 59 92 25 20 20  20 20 20 6d 65 6e 75 74  |)).Y.%     menut|
0000e040  69 74 6c 65 24 3d c0 6d  65 6e 75 74 69 74 6c 65  |itle$=.menutitle|
0000e050  24 2c 49 25 2d 31 29 0d  59 9c 14 cc 20 6d 65 6e  |$,I%-1).Y... men|
0000e060  75 70 74 72 25 21 32 30  3d 34 34 0d 59 a6 05 cd  |uptr%!20=44.Y...|
0000e070  0d 59 b0 18 24 6d 65 6e  75 70 74 72 25 3d 6d 65  |.Y..$menuptr%=me|
0000e080  6e 75 74 69 74 6c 65 24  0d 59 ba 4f 6d 65 6e 75  |nutitle$.Y.Omenu|
0000e090  70 74 72 25 3f 31 32 3d  60 74 66 63 6f 6c 3a 6d  |ptr%?12=`tfcol:m|
0000e0a0  65 6e 75 70 74 72 25 3f  31 33 3d 60 74 62 63 6f  |enuptr%?13=`tbco|
0000e0b0  6c 3a 6d 65 6e 75 70 74  72 25 3f 31 34 3d 60 77  |l:menuptr%?14=`w|
0000e0c0  66 63 6f 6c 3a 6d 65 6e  75 70 74 72 25 3f 31 35  |fcol:menuptr%?15|
0000e0d0  3d 60 77 62 63 6f 6c 0d  59 c4 24 6d 65 6e 75 70  |=`wbcol.Y.$menup|
0000e0e0  74 72 25 21 31 36 3d 31  39 36 2d 32 34 3a 6d 65  |tr%!16=196-24:me|
0000e0f0  6e 75 70 74 72 25 21 32  34 3d 30 0d 59 ce 24 6d  |nuptr%!24=0.Y.$m|
0000e100  65 6e 75 70 74 72 25 2b  3d 32 38 3a 6d 61 78 78  |enuptr%+=28:maxx|
0000e110  25 3d a9 6d 65 6e 75 74  69 74 6c 65 24 2d 33 0d  |%=.menutitle$-3.|
0000e120  59 d8 14 c8 95 20 c2 6d  65 6e 75 24 2c 31 29 3d  |Y.... .menu$,1)=|
0000e130  22 7e 22 0d 59 e2 1c 20  20 6d 65 6e 75 24 3d c0  |"~".Y..  menu$=.|
0000e140  6d 65 6e 75 24 2c a9 6d  65 6e 75 24 2d 31 29 0d  |menu$,.menu$-1).|
0000e150  59 ec 33 20 20 f5 20 69  74 65 6d 24 3d a4 70 61  |Y.3  . item$=.pa|
0000e160  72 28 22 2c 22 29 3a f2  6d 65 6e 75 69 74 65 6d  |r(","):.menuitem|
0000e170  28 69 74 65 6d 24 29 3a  fd 20 69 74 65 6d 24 3d  |(item$):. item$=|
0000e180  22 22 0d 59 f6 0d 20 20  f3 20 6d 65 6e 75 24 0d  |"".Y..  . menu$.|
0000e190  5a 00 05 ce 0d 5a 0a 31  f5 20 69 74 65 6d 24 3d  |Z....Z.1. item$=|
0000e1a0  a4 70 61 72 28 22 2c 22  29 3a f2 6d 65 6e 75 69  |.par(","):.menui|
0000e1b0  74 65 6d 28 69 74 65 6d  24 29 3a fd 20 69 74 65  |tem(item$):. ite|
0000e1c0  6d 24 3d 22 22 0d 5a 14  23 6d 65 6e 75 70 74 72  |m$="".Z.#menuptr|
0000e1d0  25 21 2d 32 34 3d 28 6d  65 6e 75 70 74 72 25 21  |%!-24=(menuptr%!|
0000e1e0  2d 32 34 29 84 26 38 30  0d 5a 1e 26 6d 25 3d 6d  |-24).&80.Z.&m%=m|
0000e1f0  65 6e 75 66 72 65 65 25  3a 6d 25 21 31 36 3d 28  |enufree%:m%!16=(|
0000e200  6d 61 78 78 25 2a 38 2b  36 29 2a 64 78 25 0d 5a  |maxx%*8+6)*dx%.Z|
0000e210  28 16 6d 65 6e 75 66 72  65 65 25 3d 6d 65 6e 75  |(.menufree%=menu|
0000e220  70 74 72 25 0d 5a 32 3c  3f 6d 65 6e 75 48 69 41  |ptr%.Z2<?menuHiA|
0000e230  64 64 72 25 20 3d 20 6d  65 6e 75 49 74 65 6d 4e  |ddr% = menuItemN|
0000e240  75 6d 25 20 20 20 20 20  20 3a 20 f4 20 74 68 65  |um%      : . the|
0000e250  20 6e 75 6d 62 65 72 20  6f 66 20 69 74 65 6d 73  | number of items|
0000e260  0d 5a 3c 3d 3f 28 6d 65  6e 75 48 69 41 64 64 72  |.Z<=?(menuHiAddr|
0000e270  25 20 2b 31 29 20 3d 20  64 61 73 68 49 74 65 6d  |% +1) = dashItem|
0000e280  4e 75 6d 25 20 3a 20 f4  20 74 68 65 20 6e 75 6d  |Num% : . the num|
0000e290  62 65 72 20 6f 66 20 64  61 73 68 65 73 0d 5a 46  |ber of dashes.ZF|
0000e2a0  07 3d 6d 25 0d 5a 50 04  0d 5a 5a 16 dd 20 f2 6d  |.=m%.ZP..ZZ.. .m|
0000e2b0  65 6e 75 69 74 65 6d 28  74 65 78 74 24 29 0d 5a  |enuitem(text$).Z|
0000e2c0  64 12 e7 20 74 65 78 74  24 3d 22 22 20 8c 20 e1  |d.. text$="" . .|
0000e2d0  0d 5a 6e 2d e7 20 6d 65  6e 75 70 74 72 25 2b 32  |.Zn-. menuptr%+2|
0000e2e0  34 20 3e 20 6d 65 6e 75  65 6e 64 25 20 8c 20 85  |4 > menuend% . .|
0000e2f0  20 31 2c 65 72 72 6f 72  24 28 33 32 29 0d 5a 78  | 1,error$(32).Zx|
0000e300  11 e7 20 74 65 78 74 24  3d 22 26 22 20 8c 0d 5a  |.. text$="&" ..Z|
0000e310  82 2b 20 20 c8 99 20 22  46 6f 6e 74 5f 4c 69 73  |.+  .. "Font_Lis|
0000e320  74 46 6f 6e 74 73 22 2c  2c 71 25 2c 63 74 72 25  |tFonts",,q%,ctr%|
0000e330  20 b8 20 2c 2c 63 74 72  25 0d 5a 8c 31 20 20 e7  | . ,,ctr%.Z.1  .|
0000e340  20 63 74 72 25 3e 3d 30  20 8c 20 74 65 78 74 24  | ctr%>=0 . text$|
0000e350  3d 24 71 25 2b 22 3e 6d  5f 66 73 69 7a 65 25 22  |=$q%+">m_fsize%"|
0000e360  3a 69 25 2d 3d 32 20 8b  20 e1 0d 5a 96 05 cd 0d  |:i%-=2 . ..Z....|
0000e370  5a a0 0c ea 69 25 2c 66  6c 67 25 0d 5a aa 04 0d  |Z...i%,flg%.Z...|
0000e380  5a b4 15 6d 65 6e 75 49  74 65 6d 4e 75 6d 25 20  |Z..menuItemNum% |
0000e390  2b 3d 20 31 0d 5a be 04  0d 5a c8 0c 66 6c 67 25  |+= 1.Z...Z..flg%|
0000e3a0  3d 26 30 30 0d 5a d2 12  69 25 3d a7 74 65 78 74  |=&00.Z..i%=.text|
0000e3b0  24 2c 22 3e 22 29 0d 5a  dc 3d e7 69 25 3e 30 8c  |$,">").Z.=.i%>0.|
0000e3c0  73 75 62 70 74 72 25 3d  a0 c1 74 65 78 74 24 2c  |subptr%=..text$,|
0000e3d0  69 25 2b 31 29 3a 74 65  78 74 24 3d c0 74 65 78  |i%+1):text$=.tex|
0000e3e0  74 24 2c 69 25 2d 31 29  8b 73 75 62 70 74 72 25  |t$,i%-1).subptr%|
0000e3f0  3d 2d 31 0d 5a e6 48 e7  20 c2 74 65 78 74 24 2c  |=-1.Z.H. .text$,|
0000e400  31 29 3d 22 23 22 20 8c  20 74 65 78 74 24 3d c0  |1)="#" . text$=.|
0000e410  74 65 78 74 24 2c a9 74  65 78 74 24 2d 31 29 3a  |text$,.text$-1):|
0000e420  66 6c 67 25 2b 3d 26 30  32 3a 64 61 73 68 49 74  |flg%+=&02:dashIt|
0000e430  65 6d 4e 75 6d 25 20 2b  3d 20 31 0d 5a f0 13 6d  |emNum% += 1.Z..m|
0000e440  65 6e 75 70 74 72 25 21  30 3d 66 6c 67 25 0d 5a  |enuptr%!0=flg%.Z|
0000e450  fa 16 6d 65 6e 75 70 74  72 25 21 34 3d 73 75 62  |..menuptr%!4=sub|
0000e460  70 74 72 25 0d 5b 04 18  6d 65 6e 75 70 74 72 25  |ptr%.[..menuptr%|
0000e470  21 38 3d 26 30 37 30 30  30 30 32 31 0d 5b 0e 15  |!8=&07000021.[..|
0000e480  e7 20 c0 74 65 78 74 24  2c 31 29 3d 22 3f 22 20  |. .text$,1)="?" |
0000e490  8c 0d 5b 18 1a 20 20 6d  65 6e 75 70 74 72 25 21  |..[..  menuptr%!|
0000e4a0  38 3d 26 30 37 30 30 30  31 31 41 0d 5b 22 29 20  |8=&0700011A.[") |
0000e4b0  20 49 25 3d a4 77 6f 72  6b 73 70 61 63 65 28 a9  | I%=.workspace(.|
0000e4c0  74 65 78 74 24 29 3a 24  49 25 3d c1 74 65 78 74  |text$):$I%=.text|
0000e4d0  24 2c 32 29 0d 5b 2c 42  20 20 6d 65 6e 75 70 74  |$,2).[,B  menupt|
0000e4e0  72 25 21 31 32 3d 49 25  3a 6d 65 6e 75 70 74 72  |r%!12=I%:menuptr|
0000e4f0  25 21 31 36 3d 73 79 73  74 65 6d 73 70 72 69 74  |%!16=systemsprit|
0000e500  65 73 25 3a 6d 65 6e 75  70 74 72 25 21 32 30 3d  |es%:menuptr%!20=|
0000e510  a9 74 65 78 74 24 0d 5b  36 05 cc 0d 5b 40 17 20  |.text$.[6...[@. |
0000e520  20 e7 20 c0 74 65 78 74  24 2c 31 29 3d 22 24 22  | . .text$,1)="$"|
0000e530  20 8c 0d 5b 4a 16 20 20  20 20 21 6d 65 6e 75 70  | ..[J.    !menup|
0000e540  74 72 25 2b 3d 26 30 34  0d 5b 54 18 20 20 20 20  |tr%+=&04.[T.    |
0000e550  6d 65 6e 75 70 74 72 25  21 38 2b 3d 26 31 30 30  |menuptr%!8+=&100|
0000e560  0d 5b 5e 16 20 20 20 20  69 25 3d a7 74 65 78 74  |.[^.    i%=.text|
0000e570  24 2c 22 28 22 29 0d 5b  68 37 20 20 20 20 e7 69  |$,"(").[h7    .i|
0000e580  25 3e 30 8c 4c 25 3d bb  c1 74 65 78 74 24 2c 69  |%>0.L%=..text$,i|
0000e590  25 2b 31 29 3a 74 65 78  74 24 3d c0 74 65 78 74  |%+1):text$=.text|
0000e5a0  24 2c 69 25 2d 31 29 8b  4c 25 3d 31 32 0d 5b 72  |$,i%-1).L%=12.[r|
0000e5b0  3e 20 20 20 20 6d 65 6e  75 70 74 72 25 21 31 32  |>    menuptr%!12|
0000e5c0  3d a0 28 c1 74 65 78 74  24 2c 32 29 29 3a 6d 65  |=.(.text$,2)):me|
0000e5d0  6e 75 70 74 72 25 21 31  36 3d 2d 31 3a 6d 65 6e  |nuptr%!16=-1:men|
0000e5e0  75 70 74 72 25 21 32 30  3d 4c 25 0d 5b 7c 16 20  |uptr%!20=L%.[|. |
0000e5f0  20 20 20 74 65 78 74 24  3d c4 4c 25 2c 22 20 22  |   text$=.L%," "|
0000e600  29 0d 5b 86 07 20 20 cc  0d 5b 90 14 20 20 20 20  |).[..  ..[..    |
0000e610  e7 a9 74 65 78 74 24 3c  3d 31 32 8c 0d 5b 9a 21  |..text$<=12..[.!|
0000e620  20 20 20 20 20 20 20 20  20 24 28 6d 65 6e 75 70  |         $(menup|
0000e630  74 72 25 2b 31 32 29 3d  74 65 78 74 24 0d 5b a4  |tr%+12)=text$.[.|
0000e640  2b 20 20 20 20 cc 20 49  25 3d a4 77 6f 72 6b 73  |+    . I%=.works|
0000e650  70 61 63 65 28 a9 74 65  78 74 24 2b 31 29 3a 24  |pace(.text$+1):$|
0000e660  49 25 3d 74 65 78 74 24  0d 5b ae 3f 20 20 20 20  |I%=text$.[.?    |
0000e670  20 20 20 20 20 6d 65 6e  75 70 74 72 25 21 31 32  |     menuptr%!12|
0000e680  3d 49 25 3a 6d 65 6e 75  70 74 72 25 21 31 36 3d  |=I%:menuptr%!16=|
0000e690  2d 31 3a 6d 65 6e 75 70  74 72 25 21 32 30 3d a9  |-1:menuptr%!20=.|
0000e6a0  74 65 78 74 24 2b 31 0d  5b b8 29 20 20 20 20 20  |text$+1.[.)     |
0000e6b0  20 20 20 20 6d 65 6e 75  70 74 72 25 21 38 3d 6d  |    menuptr%!8=m|
0000e6c0  65 6e 75 70 74 72 25 21  38 20 84 20 26 31 30 30  |enuptr%!8 . &100|
0000e6d0  0d 5b c2 09 20 20 20 20  cd 0d 5b cc 07 20 20 cd  |.[..    ..[..  .|
0000e6e0  0d 5b d6 20 20 20 e7 a9  74 65 78 74 24 3e 6d 61  |.[.   ..text$>ma|
0000e6f0  78 78 25 8c 6d 61 78 78  25 3d a9 74 65 78 74 24  |xx%.maxx%=.text$|
0000e700  0d 5b e0 05 cd 0d 5b ea  10 6d 65 6e 75 70 74 72  |.[....[..menuptr|
0000e710  25 2b 3d 32 34 0d 5b f4  05 e1 0d 5b fe 05 20 0d  |%+=24.[....[.. .|
0000e720  5c 08 10 dd 20 a4 70 61  72 28 73 65 70 24 29 0d  |\... .par(sep$).|
0000e730  5c 12 25 69 31 25 3d 69  25 2b 31 3a 69 25 3d a7  |\.%i1%=i%+1:i%=.|
0000e740  6d 65 6e 75 24 2b 73 65  70 24 2c 73 65 70 24 2c  |menu$+sep$,sep$,|
0000e750  69 31 25 29 0d 5c 1c 17  3d c1 6d 65 6e 75 24 2c  |i1%).\..=.menu$,|
0000e760  69 31 25 2c 69 25 2d 69  31 25 29 0d 5c 26 04 0d  |i1%,i%-i1%).\&..|
0000e770  5c 30 14 dd 20 a4 77 6f  72 6b 73 70 61 63 65 28  |\0.. .workspace(|
0000e780  4c 25 29 0d 5c 3a 32 e7  20 63 75 72 62 75 66 66  |L%).\:2. curbuff|
0000e790  25 2b 4c 25 3e 62 75 66  66 65 72 25 2b 6d 61 78  |%+L%>buffer%+max|
0000e7a0  62 75 66 25 20 8c 20 85  20 31 2c 65 72 72 6f 72  |buf% . . 1,error|
0000e7b0  24 28 33 33 29 0d 5c 44  1d 63 75 72 62 75 66 66  |$(33).\D.curbuff|
0000e7c0  25 2b 3d 4c 25 3a 3d 63  75 72 62 75 66 66 25 2d  |%+=L%:=curbuff%-|
0000e7d0  4c 25 0d 5c 4e 04 0d 5c  58 04 0d 5c 62 39 f4 20  |L%.\N..\X..\b9. |
0000e7e0  2d 2d 2d 2d 2d 2d 20 50  72 6f 63 65 64 75 72 65  |------ Procedure|
0000e7f0  73 20 74 6f 20 69 6e 74  65 72 66 61 63 65 20 77  |s to interface w|
0000e800  69 74 68 20 41 52 4d 20  63 6f 64 65 20 2d 2d 2d  |ith ARM code ---|
0000e810  2d 2d 2d 0d 5c 6c 04 0d  5c 76 22 dd 20 f2 6d 6f  |---.\l..\v". .mo|
0000e820  76 65 28 66 72 6f 6d 2c  74 6f 2c 62 79 74 65 73  |ve(from,to,bytes|
0000e830  5f 74 6f 5f 6d 6f 76 65  29 0d 5c 80 19 e7 20 62  |_to_move).\... b|
0000e840  79 74 65 73 5f 74 6f 5f  6d 6f 76 65 3d 30 20 8c  |ytes_to_move=0 .|
0000e850  20 e1 0d 5c 8a 22 41 25  3d 66 72 6f 6d 3a 42 25  | ..\."A%=from:B%|
0000e860  3d 74 6f 3a 43 25 3d 62  79 74 65 73 5f 74 6f 5f  |=to:C%=bytes_to_|
0000e870  6d 6f 76 65 0d 5c 94 0a  d6 20 6d 6f 76 65 0d 5c  |move.\... move.\|
0000e880  9e 05 e1 0d 5c a8 04 0d  5c b2 1f dd 20 f2 66 69  |....\...\... .fi|
0000e890  6c 6c 28 73 74 61 72 74  2c 62 79 74 65 73 2c 66  |ll(start,bytes,f|
0000e8a0  69 6c 6c 65 72 29 0d 5c  bc 1f 41 25 3d 73 74 61  |iller).\..A%=sta|
0000e8b0  72 74 3a 42 25 3d 62 79  74 65 73 3a 43 25 3d 66  |rt:B%=bytes:C%=f|
0000e8c0  69 6c 6c 65 72 0d 5c c6  09 d6 66 69 6c 6c 0d 5c  |iller.\...fill.\|
0000e8d0  d0 05 e1 0d 5c da 04 0d  5c e4 04 0d 5c ee 23 f4  |....\...\...\.#.|
0000e8e0  20 2d 2d 2d 2d 2d 2d 20  41 52 4d 20 73 6f 75 72  | ------ ARM sour|
0000e8f0  63 65 20 63 6f 64 65 20  2d 2d 2d 2d 2d 2d 0d 5c  |ce code ------.\|
0000e900  f8 04 0d 5d 02 16 dd 20  f2 61 73 73 65 6d 62 6c  |...]... .assembl|
0000e910  65 28 61 64 64 72 25 29  0d 5d 0c 0a ea 20 70 61  |e(addr%).]... pa|
0000e920  73 73 0d 5d 16 11 73 70  3d 31 33 3a 6c 69 6e 6b  |ss.]..sp=13:link|
0000e930  3d 31 34 0d 5d 20 14 e3  20 70 61 73 73 3d 30 20  |=14.] .. pass=0 |
0000e940  b8 20 32 20 88 20 32 0d  5d 2a 0c 50 25 3d 61 64  |. 2 . 2.]*.P%=ad|
0000e950  64 72 25 0d 5d 34 0d 5b  4f 50 54 20 70 61 73 73  |dr%.]4.[OPT pass|
0000e960  0d 5d 3e 15 2e 66 69 6c  6c 20 20 20 20 20 62 20  |.]>..fill     b |
0000e970  66 69 6c 6c 32 0d 5d 48  19 2e 6d 6f 76 65 20 20  |fill2.]H..move  |
0000e980  20 20 20 62 20 62 6c 6f  63 6b 6d 6f 76 65 0d 5d  |   b blockmove.]|
0000e990  52 04 0d 5d 5c 0a 2e 66  69 6c 6c 32 0d 5d 66 3f  |R..]\..fill2.]f?|
0000e9a0  5c 20 72 30 3d 73 74 61  72 74 20 61 64 64 72 65  |\ r0=start addre|
0000e9b0  73 73 20 72 31 3d 6e 75  6d 62 65 72 20 6f 66 20  |ss r1=number of |
0000e9c0  62 79 74 65 73 20 72 32  3d 76 61 6c 75 65 20 74  |bytes r2=value t|
0000e9d0  6f 20 66 69 6c 6c 20 77  69 74 68 0d 5d 70 21 5c  |o fill with.]p!\|
0000e9e0  20 61 6c 6c 20 72 65 67  69 73 74 65 72 73 20 61  | all registers a|
0000e9f0  72 65 20 70 72 65 73 65  72 76 65 64 0d 5d 7a 1c  |re preserved.]z.|
0000ea00  73 74 6d 66 64 20 28 73  70 29 21 2c 7b 72 30 2d  |stmfd (sp)!,{r0-|
0000ea10  72 33 2c 6c 69 6e 6b 7d  0d 5d 84 0d 6d 6f 76 20  |r3,link}.]..mov |
0000ea20  72 33 2c 72 30 0d 5d 8e  10 61 64 64 20 72 33 2c  |r3,r0.]..add r3,|
0000ea30  72 33 2c 72 31 0d 5d 98  0d 2e 66 69 6c 6c 6c 6f  |r3,r1.]...filllo|
0000ea40  6f 70 0d 5d a2 13 73 74  72 62 20 72 32 2c 5b 72  |op.]..strb r2,[r|
0000ea50  30 5d 2c 23 31 0d 5d ac  0d 63 6d 70 20 72 30 2c  |0],#1.]..cmp r0,|
0000ea60  72 33 0d 5d b6 10 62 6c  74 20 66 69 6c 6c 6c 6f  |r3.]..blt filllo|
0000ea70  6f 70 0d 5d c0 1a 6c 64  6d 66 64 20 28 73 70 29  |op.]..ldmfd (sp)|
0000ea80  21 2c 7b 72 30 2d 72 33  2c 50 43 7d 0d 5d ca 04  |!,{r0-r3,PC}.]..|
0000ea90  0d 5d d4 45 5c 20 47 65  6e 65 72 61 6c 20 70 75  |.].E\ General pu|
0000eaa0  72 70 6f 73 65 20 62 6c  6f 63 6b 20 6d 6f 76 65  |rpose block move|
0000eab0  20 72 6f 75 74 69 6e 65  20 28 75 70 20 6f 72 20  | routine (up or |
0000eac0  64 6f 77 6e 20 61 6e 64  20 6f 76 65 72 6c 61 70  |down and overlap|
0000ead0  70 69 6e 67 29 0d 5d de  4a 5c 20 72 30 20 3d 20  |ping).].J\ r0 = |
0000eae0  60 66 72 6f 6d 60 20 61  64 64 72 65 73 73 2c 20  |`from` address, |
0000eaf0  72 31 20 3d 20 60 74 6f  60 20 61 64 64 72 65 73  |r1 = `to` addres|
0000eb00  73 2c 20 72 32 20 3d 20  6e 75 6d 62 65 72 20 6f  |s, r2 = number o|
0000eb10  66 20 62 79 74 65 73 20  74 6f 20 6d 6f 76 65 0d  |f bytes to move.|
0000eb20  5d e8 0e 2e 62 6c 6f 63  6b 6d 6f 76 65 0d 5d f2  |]...blockmove.].|
0000eb30  0d 63 6d 70 20 72 30 2c  72 31 0d 5d fc 0e 62 6c  |.cmp r0,r1.]..bl|
0000eb40  74 20 6d 6f 76 65 75 70  0d 5e 06 10 62 61 6c 20  |t moveup.^..bal |
0000eb50  6d 6f 76 65 64 6f 77 6e  0d 5e 10 04 0d 5e 1a 0d  |movedown.^...^..|
0000eb60  2e 6d 6f 76 65 64 6f 77  6e 0d 5e 24 1c 5c 20 4d  |.movedown.^$.\ M|
0000eb70  6f 76 65 20 6d 65 6d 6f  72 79 20 62 6c 6f 63 6b  |ove memory block|
0000eb80  20 64 6f 77 6e 0d 5e 2e  49 5c 20 72 30 20 3d 20  | down.^.I\ r0 = |
0000eb90  60 66 72 6f 6d 60 20 61  64 64 72 65 73 73 2c 20  |`from` address, |
0000eba0  72 31 3d 20 60 74 6f 60  20 61 64 64 72 65 73 73  |r1= `to` address|
0000ebb0  2c 20 72 32 20 3d 20 6e  75 6d 62 65 72 20 6f 66  |, r2 = number of|
0000ebc0  20 62 79 74 65 73 20 74  6f 20 6d 6f 76 65 0d 5e  | bytes to move.^|
0000ebd0  38 1c 73 74 6d 66 64 20  28 73 70 29 21 2c 7b 72  |8.stmfd (sp)!,{r|
0000ebe0  30 2d 72 33 2c 6c 69 6e  6b 7d 0d 5e 42 04 0d 5e  |0-r3,link}.^B..^|
0000ebf0  4c 0d 2e 6d 6f 76 64 6c  6f 6f 70 0d 5e 56 13 6c  |L..movdloop.^V.l|
0000ec00  64 72 62 20 72 33 2c 5b  72 30 5d 2c 23 31 0d 5e  |drb r3,[r0],#1.^|
0000ec10  60 13 73 74 72 62 20 72  33 2c 5b 72 31 5d 2c 23  |`.strb r3,[r1],#|
0000ec20  31 0d 5e 6a 11 73 75 62  73 20 72 32 2c 72 32 2c  |1.^j.subs r2,r2,|
0000ec30  23 31 0d 5e 74 10 62 6e  65 20 6d 6f 76 64 6c 6f  |#1.^t.bne movdlo|
0000ec40  6f 70 0d 5e 7e 04 0d 5e  88 1a 6c 64 6d 66 64 20  |op.^~..^..ldmfd |
0000ec50  28 73 70 29 21 2c 7b 72  30 2d 72 33 2c 50 43 7d  |(sp)!,{r0-r3,PC}|
0000ec60  0d 5e 92 04 0d 5e 9c 0b  2e 6d 6f 76 65 75 70 0d  |.^...^...moveup.|
0000ec70  5e a6 1a 5c 20 4d 6f 76  65 20 6d 65 6d 6f 72 79  |^..\ Move memory|
0000ec80  20 62 6c 6f 63 6b 20 75  70 0d 5e b0 49 5c 20 72  | block up.^.I\ r|
0000ec90  30 20 3d 20 60 66 72 6f  6d 60 20 61 64 64 72 65  |0 = `from` addre|
0000eca0  73 73 2c 20 72 31 3d 20  60 74 6f 60 20 61 64 64  |ss, r1= `to` add|
0000ecb0  72 65 73 73 2c 20 72 32  20 3d 20 6e 75 6d 62 65  |ress, r2 = numbe|
0000ecc0  72 20 6f 66 20 62 79 74  65 73 20 74 6f 20 6d 6f  |r of bytes to mo|
0000ecd0  76 65 0d 5e ba 04 0d 5e  c4 1c 73 74 6d 66 64 20  |ve.^...^..stmfd |
0000ece0  28 73 70 29 21 2c 7b 72  30 2d 72 33 2c 6c 69 6e  |(sp)!,{r0-r3,lin|
0000ecf0  6b 7d 0d 5e ce 10 73 75  62 20 72 32 2c 72 32 2c  |k}.^..sub r2,r2,|
0000ed00  23 31 0d 5e d8 10 61 64  64 20 72 30 2c 72 30 2c  |#1.^..add r0,r0,|
0000ed10  72 32 0d 5e e2 10 61 64  64 20 72 31 2c 72 31 2c  |r2.^..add r1,r1,|
0000ed20  72 32 0d 5e ec 23 5c 20  43 61 6c 6c 20 68 65 72  |r2.^.#\ Call her|
0000ed30  65 20 69 66 20 72 32 20  3d 20 65 6e 64 20 61 64  |e if r2 = end ad|
0000ed40  64 72 65 73 73 0d 5e f6  0f 2e 6d 6f 76 65 75 70  |dress.^...moveup|
0000ed50  6c 6f 6f 70 0d 5f 00 14  6c 64 72 62 20 72 33 2c  |loop._..ldrb r3,|
0000ed60  5b 72 30 5d 2c 23 2d 31  0d 5f 0a 14 73 74 72 62  |[r0],#-1._..strb|
0000ed70  20 72 33 2c 5b 72 31 5d  2c 23 2d 31 0d 5f 14 11  | r3,[r1],#-1._..|
0000ed80  73 75 62 73 20 72 32 2c  72 32 2c 23 31 0d 5f 1e  |subs r2,r2,#1._.|
0000ed90  12 62 70 6c 20 6d 6f 76  65 75 70 6c 6f 6f 70 0d  |.bpl moveuploop.|
0000eda0  5f 28 1a 6c 64 6d 66 64  20 28 73 70 29 21 2c 7b  |_(.ldmfd (sp)!,{|
0000edb0  72 30 2d 72 33 2c 50 43  7d 0d 5f 32 04 0d 5f 3c  |r0-r3,PC}._2.._<|
0000edc0  0c 2e 6c 61 73 74 72 6f  77 0d 5f 46 1b 5c 20 46  |..lastrow._F.\ F|
0000edd0  69 6e 64 20 6c 61 73 74  20 72 6f 77 20 6f 66 20  |ind last row of |
0000ede0  74 65 78 74 0d 5f 50 36  5c 20 45 6e 74 72 79 20  |text._P6\ Entry |
0000edf0  2d 20 72 30 20 3d 20 73  74 61 72 74 20 61 64 64  |- r0 = start add|
0000ee00  72 65 73 73 20 6f 66 20  74 65 78 74 20 28 74 65  |ress of text (te|
0000ee10  78 74 5f 62 6c 6f 63 6b  25 29 0d 5f 5a 32 5c 20  |xt_block%)._Z2\ |
0000ee20  20 20 20 20 20 20 20 20  72 31 20 3d 20 65 6e 64  |        r1 = end|
0000ee30  20 61 64 64 72 65 73 73  20 6f 66 20 74 65 78 74  | address of text|
0000ee40  20 28 74 65 78 74 5f 65  6e 64 25 29 0d 5f 64 4a  | (text_end%)._dJ|
0000ee50  5c 20 45 78 69 74 20 20  2d 20 6e 75 6d 62 65 72  |\ Exit  - number|
0000ee60  20 6f 66 20 6c 61 73 74  20 72 6f 77 20 69 73 20  | of last row is |
0000ee70  69 6e 20 27 72 6f 77 63  6f 75 6e 74 27 20 28 72  |in 'rowcount' (r|
0000ee80  6f 77 73 20 6e 75 6d 62  65 72 65 64 20 30 2c 31  |ows numbered 0,1|
0000ee90  2c 32 2e 2e 2e 29 0d 5f  6e 1c 73 74 6d 66 64 20  |,2...)._n.stmfd |
0000eea0  28 73 70 29 21 2c 7b 72  30 2d 72 34 2c 6c 69 6e  |(sp)!,{r0-r4,lin|
0000eeb0  6b 7d 0d 5f 78 0d 6d 6f  76 20 72 32 2c 23 30 0d  |k}._x.mov r2,#0.|
0000eec0  5f 82 0d 6d 6f 76 20 72  33 2c 23 30 0d 5f 8c 0d  |_..mov r3,#0._..|
0000eed0  6d 6f 76 20 72 34 2c 23  30 0d 5f 96 04 0d 5f a0  |mov r4,#0._..._.|
0000eee0  0a 2e 77 68 69 6c 65 0d  5f aa 0d 63 6d 70 20 72  |..while._..cmp r|
0000eef0  30 2c 72 31 0d 5f b4 10  62 65 71 20 65 6e 64 77  |0,r1._..beq endw|
0000ef00  68 69 6c 65 0d 5f be 13  6c 64 72 62 20 72 33 2c  |hile._..ldrb r3,|
0000ef10  5b 72 30 5d 2c 23 31 0d  5f c8 10 61 64 64 20 72  |[r0],#1._..add r|
0000ef20  34 2c 72 34 2c 23 31 0d  5f d2 19 63 6d 70 20 72  |4,r4,#1._..cmp r|
0000ef30  34 2c 23 74 65 78 74 5f  6d 61 78 6c 6c 65 6e 25  |4,#text_maxllen%|
0000ef40  0d 5f dc 12 61 64 64 65  71 20 72 32 2c 72 32 2c  |._..addeq r2,r2,|
0000ef50  23 31 0d 5f e6 0f 6d 6f  76 65 71 20 72 34 2c 23  |#1._..moveq r4,#|
0000ef60  30 0d 5f f0 0d 62 65 71  20 77 68 69 6c 65 0d 5f  |0._..beq while._|
0000ef70  fa 0e 63 6d 70 20 72 33  2c 23 31 33 0d 60 04 12  |..cmp r3,#13.`..|
0000ef80  61 64 64 65 71 20 72 32  2c 72 32 2c 23 31 0d 60  |addeq r2,r2,#1.`|
0000ef90  0e 0f 6d 6f 76 65 71 20  72 34 2c 23 30 0d 60 18  |..moveq r4,#0.`.|
0000efa0  14 63 6d 70 20 72 33 2c  23 64 75 6d 6d 79 5f 63  |.cmp r3,#dummy_c|
0000efb0  72 0d 60 22 12 61 64 64  65 71 20 72 32 2c 72 32  |r.`".addeq r2,r2|
0000efc0  2c 23 31 0d 60 2c 0f 6d  6f 76 65 71 20 72 34 2c  |,#1.`,.moveq r4,|
0000efd0  23 30 0d 60 36 0d 62 61  6c 20 77 68 69 6c 65 0d  |#0.`6.bal while.|
0000efe0  60 40 04 0d 60 4a 0d 2e  65 6e 64 77 68 69 6c 65  |`@..`J..endwhile|
0000eff0  0d 60 54 13 73 74 72 20  72 32 2c 72 6f 77 63 6f  |.`T.str r2,rowco|
0000f000  75 6e 74 0d 60 5e 1a 6c  64 6d 66 64 20 28 73 70  |unt.`^.ldmfd (sp|
0000f010  29 21 2c 7b 72 30 2d 72  34 2c 50 43 7d 0d 60 68  |)!,{r0-r4,PC}.`h|
0000f020  04 0d 60 72 14 2e 72 6f  77 63 6f 75 6e 74 20 45  |..`r..rowcount E|
0000f030  51 55 44 20 30 0d 60 7c  04 0d 60 86 08 2e 72 6f  |QUD 0.`|..`...ro|
0000f040  77 0d 60 90 47 5c 20 52  65 74 75 72 6e 73 20 74  |w.`.G\ Returns t|
0000f050  68 65 20 73 74 72 69 6e  67 20 6f 66 20 74 65 78  |he string of tex|
0000f060  74 20 69 6e 20 74 68 65  20 73 70 65 63 69 66 69  |t in the specifi|
0000f070  65 64 20 72 6f 77 20 6f  66 20 74 68 65 20 74 65  |ed row of the te|
0000f080  78 74 20 62 6c 6f 63 6b  0d 60 9a 36 5c 20 45 6e  |xt block.`.6\ En|
0000f090  74 72 79 20 2d 20 72 30  20 3d 20 73 74 61 72 74  |try - r0 = start|
0000f0a0  20 61 64 64 72 65 73 73  20 6f 66 20 74 65 78 74  | address of text|
0000f0b0  20 28 74 65 78 74 5f 62  6c 6f 63 6b 25 29 0d 60  | (text_block%).`|
0000f0c0  a4 28 5c 20 20 20 20 20  20 20 20 20 72 31 20 3d  |.(\         r1 =|
0000f0d0  20 72 6f 77 20 77 61 6e  74 65 64 20 28 30 2c 31  | row wanted (0,1|
0000f0e0  2c 32 2e 2e 2e 29 0d 60  ae 48 5c 20 45 78 69 74  |,2...).`.H\ Exit|
0000f0f0  20 20 2d 20 74 68 65 20  73 74 72 69 6e 67 20 69  |  - the string i|
0000f100  73 20 72 65 74 75 72 6e  65 64 20 69 6e 20 27 6c  |s returned in 'l|
0000f110  69 6e 65 62 75 66 66 65  72 27 2c 20 74 65 72 6d  |inebuffer', term|
0000f120  69 6e 61 74 65 64 20 62  79 20 3c 63 72 3e 0d 60  |inated by <cr>.`|
0000f130  b8 1b 5c 20 72 32 20 69  73 20 74 68 65 20 63 75  |..\ r2 is the cu|
0000f140  72 72 65 6e 74 20 72 6f  77 0d 60 c2 21 5c 20 72  |rrent row.`.!\ r|
0000f150  33 20 69 73 20 74 68 65  20 63 75 72 72 65 6e 74  |3 is the current|
0000f160  20 63 68 61 72 61 63 74  65 72 0d 60 cc 29 5c 20  | character.`.)\ |
0000f170  72 34 20 69 73 20 74 68  65 20 6c 65 6e 67 74 68  |r4 is the length|
0000f180  20 6f 66 20 74 68 65 20  63 75 72 72 65 6e 74 20  | of the current |
0000f190  72 6f 77 0d 60 d6 04 0d  60 e0 1c 73 74 6d 66 64  |row.`...`..stmfd|
0000f1a0  20 28 73 70 29 21 2c 7b  72 30 2d 72 34 2c 6c 69  | (sp)!,{r0-r4,li|
0000f1b0  6e 6b 7d 0d 60 ea 0d 6d  6f 76 20 72 32 2c 23 30  |nk}.`..mov r2,#0|
0000f1c0  0d 60 f4 0d 6d 6f 76 20  72 34 2c 23 30 0d 60 fe  |.`..mov r4,#0.`.|
0000f1d0  04 0d 61 08 0b 2e 77 68  69 6c 65 32 0d 61 12 0d  |..a...while2.a..|
0000f1e0  63 6d 70 20 72 32 2c 72  31 0d 61 1c 11 62 65 71  |cmp r2,r1.a..beq|
0000f1f0  20 65 6e 64 77 68 69 6c  65 32 0d 61 26 13 6c 64  | endwhile2.a&.ld|
0000f200  72 62 20 72 33 2c 5b 72  30 5d 2c 23 31 0d 61 30  |rb r3,[r0],#1.a0|
0000f210  10 61 64 64 20 72 34 2c  72 34 2c 23 31 0d 61 3a  |.add r4,r4,#1.a:|
0000f220  19 63 6d 70 20 72 34 2c  23 74 65 78 74 5f 6d 61  |.cmp r4,#text_ma|
0000f230  78 6c 6c 65 6e 25 0d 61  44 0f 6d 6f 76 65 71 20  |xllen%.aD.moveq |
0000f240  72 34 2c 23 30 0d 61 4e  12 61 64 64 65 71 20 72  |r4,#0.aN.addeq r|
0000f250  32 2c 72 32 2c 23 31 0d  61 58 0e 62 65 71 20 77  |2,r2,#1.aX.beq w|
0000f260  68 69 6c 65 32 0d 61 62  0e 63 6d 70 20 72 33 2c  |hile2.ab.cmp r3,|
0000f270  23 31 33 0d 61 6c 0f 6d  6f 76 65 71 20 72 34 2c  |#13.al.moveq r4,|
0000f280  23 30 0d 61 76 12 61 64  64 65 71 20 72 32 2c 72  |#0.av.addeq r2,r|
0000f290  32 2c 23 31 0d 61 80 14  63 6d 70 20 72 33 2c 23  |2,#1.a..cmp r3,#|
0000f2a0  64 75 6d 6d 79 5f 63 72  0d 61 8a 0f 6d 6f 76 65  |dummy_cr.a..move|
0000f2b0  71 20 72 34 2c 23 30 0d  61 94 12 61 64 64 65 71  |q r4,#0.a..addeq|
0000f2c0  20 72 32 2c 72 32 2c 23  31 0d 61 9e 0e 62 61 6c  | r2,r2,#1.a..bal|
0000f2d0  20 77 68 69 6c 65 32 0d  61 a8 04 0d 61 b2 0e 2e  | while2.a...a...|
0000f2e0  65 6e 64 77 68 69 6c 65  32 0d 61 bc 15 61 64 72  |endwhile2.a..adr|
0000f2f0  20 72 31 2c 6c 69 6e 65  62 75 66 66 65 72 0d 61  | r1,linebuffer.a|
0000f300  c6 0d 6d 6f 76 20 72 34  2c 23 30 0d 61 d0 04 0d  |..mov r4,#0.a...|
0000f310  61 da 0c 2e 73 74 72 6c  6f 6f 70 0d 61 e4 13 6c  |a...strloop.a..l|
0000f320  64 72 62 20 72 33 2c 5b  72 30 5d 2c 23 31 0d 61  |drb r3,[r0],#1.a|
0000f330  ee 10 61 64 64 20 72 34  2c 72 34 2c 23 31 0d 61  |..add r4,r4,#1.a|
0000f340  f8 0d 63 6d 70 20 72 33  2c 23 30 0d 62 02 0f 62  |..cmp r3,#0.b..b|
0000f350  65 71 20 6c 69 6e 65 65  6e 64 0d 62 0c 15 63 6d  |eq lineend.b..cm|
0000f360  70 20 72 33 2c 23 64 75  6d 6d 79 5f 73 70 63 0d  |p r3,#dummy_spc.|
0000f370  62 16 0f 62 65 71 20 6c  69 6e 65 65 6e 64 0d 62  |b..beq lineend.b|
0000f380  20 0e 63 6d 70 20 72 33  2c 23 31 33 0d 62 2a 0f  | .cmp r3,#13.b*.|
0000f390  62 65 71 20 6c 69 6e 65  65 6e 64 0d 62 34 14 63  |beq lineend.b4.c|
0000f3a0  6d 70 20 72 33 2c 23 64  75 6d 6d 79 5f 63 72 0d  |mp r3,#dummy_cr.|
0000f3b0  62 3e 15 73 74 72 65 71  62 20 72 33 2c 5b 72 31  |b>.streqb r3,[r1|
0000f3c0  5d 2c 23 31 0d 62 48 0f  62 65 71 20 6c 69 6e 65  |],#1.bH.beq line|
0000f3d0  65 6e 64 0d 62 52 13 73  74 72 62 20 72 33 2c 5b  |end.bR.strb r3,[|
0000f3e0  72 31 5d 2c 23 31 0d 62  5c 19 63 6d 70 20 72 34  |r1],#1.b\.cmp r4|
0000f3f0  2c 23 74 65 78 74 5f 6d  61 78 6c 6c 65 6e 25 0d  |,#text_maxllen%.|
0000f400  62 66 0f 62 6e 65 20 73  74 72 6c 6f 6f 70 0d 62  |bf.bne strloop.b|
0000f410  70 04 0d 62 7a 0c 2e 6c  69 6e 65 65 6e 64 0d 62  |p..bz..lineend.b|
0000f420  84 0d 63 6d 70 20 72 33  2c 23 30 0d 62 8e 10 6d  |..cmp r3,#0.b..m|
0000f430  6f 76 65 71 20 72 33 2c  23 31 33 0d 62 98 15 63  |oveq r3,#13.b..c|
0000f440  6d 70 20 72 33 2c 23 64  75 6d 6d 79 5f 73 70 63  |mp r3,#dummy_spc|
0000f450  0d 62 a2 10 6d 6f 76 65  71 20 72 33 2c 23 31 33  |.b..moveq r3,#13|
0000f460  0d 62 ac 14 63 6d 70 20  72 33 2c 23 64 75 6d 6d  |.b..cmp r3,#dumm|
0000f470  79 5f 63 72 0d 62 b6 10  6d 6f 76 65 71 20 72 33  |y_cr.b..moveq r3|
0000f480  2c 23 31 33 0d 62 c0 19  63 6d 70 20 72 34 2c 23  |,#13.b..cmp r4,#|
0000f490  74 65 78 74 5f 6d 61 78  6c 6c 65 6e 25 0d 62 ca  |text_maxllen%.b.|
0000f4a0  10 6d 6f 76 65 71 20 72  33 2c 23 31 33 0d 62 d4  |.moveq r3,#13.b.|
0000f4b0  13 73 74 72 62 20 72 33  2c 5b 72 31 5d 2c 23 31  |.strb r3,[r1],#1|
0000f4c0  0d 62 de 1a 6c 64 6d 66  64 20 28 73 70 29 21 2c  |.b..ldmfd (sp)!,|
0000f4d0  7b 72 30 2d 72 34 2c 50  43 7d 0d 62 e8 04 0d 62  |{r0-r4,PC}.b...b|
0000f4e0  f2 32 2e 6c 69 6e 65 62  75 66 66 65 72 20 45 51  |.2.linebuffer EQ|
0000f4f0  55 53 20 c4 74 65 78 74  5f 6d 61 78 6c 6c 65 6e  |US .text_maxllen|
0000f500  25 2b 31 2c bd 20 64 75  6d 6d 79 5f 73 70 63 29  |%+1,. dummy_spc)|
0000f510  0d 62 fc 0a 20 61 6c 69  67 6e 0d 63 06 04 0d 63  |.b.. align.c...c|
0000f520  10 0c 2e 66 69 6e 64 6d  73 67 0d 63 1a 25 5c 46  |...findmsg.c.%\F|
0000f530  69 6e 64 73 20 73 74 61  72 74 20 6f 66 20 73 70  |inds start of sp|
0000f540  65 63 69 66 69 65 64 20  6d 65 73 73 61 67 65 0d  |ecified message.|
0000f550  63 24 20 5c 45 6e 74 72  79 20 2d 20 72 30 20 3d  |c$ \Entry - r0 =|
0000f560  20 6d 65 73 73 61 67 65  20 6e 75 6d 62 65 72 0d  | message number.|
0000f570  63 2e 2c 5c 20 20 20 20  20 20 2d 20 72 32 20 3d  |c.,\      - r2 =|
0000f580  20 74 65 78 74 20 73 74  61 72 74 20 61 64 64 72  | text start addr|
0000f590  65 73 73 20 28 4d 53 47  23 30 29 0d 63 38 35 5c  |ess (MSG#0).c85\|
0000f5a0  45 78 69 74 20 20 2d 20  72 30 20 3d 20 73 74 61  |Exit  - r0 = sta|
0000f5b0  72 74 20 61 64 64 72 65  73 73 20 6f 66 20 6d 65  |rt address of me|
0000f5c0  73 73 61 67 65 20 28 73  77 69 74 63 68 65 73 29  |ssage (switches)|
0000f5d0  0d 63 42 1c 73 74 6d 66  64 20 28 73 70 29 21 2c  |.cB.stmfd (sp)!,|
0000f5e0  7b 72 31 2d 72 33 2c 6c  69 6e 6b 7d 0d 63 4c 0d  |{r1-r3,link}.cL.|
0000f5f0  63 6d 70 20 72 30 2c 23  30 0d 63 56 0e 62 65 71  |cmp r0,#0.cV.beq|
0000f600  20 73 74 61 72 74 6d 0d  63 60 04 0d 63 6a 0b 2e  | startm.c`..cj..|
0000f610  6e 78 74 6d 73 67 0d 63  74 13 6c 64 72 62 20 72  |nxtmsg.ct.ldrb r|
0000f620  31 2c 5b 72 32 5d 2c 23  31 0d 63 7e 29 61 64 64  |1,[r2],#1.c~)add|
0000f630  20 72 32 2c 72 32 2c 72  31 2c 20 6c 73 6c 20 23  | r2,r2,r1, lsl #|
0000f640  31 20 5c 20 72 32 20 3d  20 72 32 20 2b 20 72 31  |1 \ r2 = r2 + r1|
0000f650  2a 32 0d 63 88 04 0d 63  92 0b 2e 72 65 61 64 63  |*2.c...c...readc|
0000f660  68 0d 63 9c 13 6c 64 72  62 20 72 31 2c 5b 72 32  |h.c..ldrb r1,[r2|
0000f670  5d 2c 23 31 0d 63 a6 0d  63 6d 70 20 72 31 2c 23  |],#1.c..cmp r1,#|
0000f680  30 0d 63 b0 0e 62 6e 65  20 72 65 61 64 63 68 0d  |0.c..bne readch.|
0000f690  63 ba 11 73 75 62 73 20  72 30 2c 72 30 2c 23 31  |c..subs r0,r0,#1|
0000f6a0  0d 63 c4 0e 62 6e 65 20  6e 78 74 6d 73 67 0d 63  |.c..bne nxtmsg.c|
0000f6b0  ce 04 0d 63 d8 0b 2e 73  74 61 72 74 6d 0d 63 e2  |...c...startm.c.|
0000f6c0  0d 6d 6f 76 20 72 30 2c  72 32 0d 63 ec 1a 6c 64  |.mov r0,r2.c..ld|
0000f6d0  6d 66 64 20 28 73 70 29  21 2c 7b 72 31 2d 72 33  |mfd (sp)!,{r1-r3|
0000f6e0  2c 70 63 7d 0d 63 f6 04  0d 64 00 09 2e 70 76 6f  |,pc}.c...d...pvo|
0000f6f0  6b 0d 64 0a 3c 3b 50 72  69 6e 74 20 56 65 72 62  |k.d.<;Print Verb|
0000f700  2c 20 4f 62 6a 65 63 74  20 6f 72 20 4b 65 79 77  |, Object or Keyw|
0000f710  6f 72 64 20 28 72 65 74  75 72 6e 73 20 74 68 65  |ord (returns the|
0000f720  20 77 6f 72 64 20 73 74  72 69 6e 67 29 0d 64 14  | word string).d.|
0000f730  29 3b 45 6e 74 72 79 20  2d 20 72 30 20 3d 20 4e  |);Entry - r0 = N|
0000f740  75 6d 62 65 72 20 6f 66  20 77 6f 72 64 20 74 6f  |umber of word to|
0000f750  20 70 72 69 6e 74 0d 64  1e 30 3b 20 20 20 20 20  | print.d.0;     |
0000f760  20 20 20 72 31 20 3d 20  61 64 64 72 65 73 73 20  |   r1 = address |
0000f770  6f 66 20 72 65 71 75 69  72 65 64 20 77 6f 72 64  |of required word|
0000f780  20 74 61 62 6c 65 0d 64  28 32 3b 45 78 69 74 20  | table.d(2;Exit |
0000f790  20 2d 20 77 6f 72 64 20  69 73 20 69 6e 20 27 61  | - word is in 'a|
0000f7a0  74 65 78 74 27 20 74 65  72 6d 69 6e 61 74 65 64  |text' terminated|
0000f7b0  20 62 79 20 3c 63 72 3e  0d 64 32 1c 73 74 6d 66  | by <cr>.d2.stmf|
0000f7c0  64 20 28 73 70 29 21 2c  7b 72 30 2d 72 35 2c 6c  |d (sp)!,{r0-r5,l|
0000f7d0  69 6e 6b 7d 0d 64 3c 2c  6d 6f 76 20 72 33 2c 72  |ink}.d<,mov r3,r|
0000f7e0  30 20 20 20 20 20 20 5c  57 6f 72 64 20 6e 75 6d  |0      \Word num|
0000f7f0  62 65 72 20 69 73 20 6e  6f 77 20 69 6e 20 72 33  |ber is now in r3|
0000f800  0d 64 46 24 6d 6f 76 20  72 34 2c 72 32 20 20 20  |.dF$mov r4,r2   |
0000f810  20 20 20 5c 72 34 20 69  73 20 27 61 6c 6c 27 20  |   \r4 is 'all' |
0000f820  66 6c 61 67 0d 64 50 1f  6d 6f 76 20 72 35 2c 23  |flag.dP.mov r5,#|
0000f830  30 20 20 20 20 20 20 5c  72 35 20 69 73 20 27 63  |0      \r5 is 'c|
0000f840  74 72 27 0d 64 5a 04 0d  64 64 09 2e 4c 4c 4c 31  |tr'.dZ..dd..LLL1|
0000f850  0d 64 6e 28 61 64 72 20  72 32 2c 61 74 65 78 74  |.dn(adr r2,atext|
0000f860  20 20 20 5c 72 32 20 70  6f 69 6e 74 73 20 74 6f  |   \r2 points to|
0000f870  20 27 61 74 65 78 74 27  0d 64 78 04 0d 64 82 09  | 'atext'.dx..d..|
0000f880  2e 4c 4c 4c 32 0d 64 8c  2b 6c 64 72 62 20 72 30  |.LLL2.d.+ldrb r0|
0000f890  2c 5b 72 31 5d 20 20 20  5c 47 65 74 20 63 68 61  |,[r1]   \Get cha|
0000f8a0  72 61 63 74 65 72 20 66  72 6f 6d 20 6c 69 73 74  |racter from list|
0000f8b0  0d 64 96 2a 5c 6f 72 72  20 72 30 2c 72 30 2c 23  |.d.*\orr r0,r0,#|
0000f8c0  33 32 20 20 5c 43 6f 6e  76 65 72 74 20 74 6f 20  |32  \Convert to |
0000f8d0  6c 6f 77 65 72 20 63 61  73 65 0d 64 a0 24 73 74  |lower case.d.$st|
0000f8e0  72 62 20 72 30 2c 5b 72  32 5d 20 20 20 5c 50 75  |rb r0,[r2]   \Pu|
0000f8f0  74 20 69 74 20 69 6e 20  27 74 65 78 74 27 0d 64  |t it in 'text'.d|
0000f900  aa 32 74 73 74 20 72 30  2c 23 26 38 30 20 20 20  |.2tst r0,#&80   |
0000f910  20 5c 49 73 20 62 69 74  20 37 20 73 65 74 20 28  | \Is bit 7 set (|
0000f920  65 6e 64 20 6f 66 20 74  68 65 20 77 6f 72 64 29  |end of the word)|
0000f930  0d 64 b4 17 62 6e 65 20  65 6e 64 6f 66 77 20 20  |.d..bne endofw  |
0000f940  20 20 20 5c 59 65 73 0d  64 be 10 61 64 64 20 72  |   \Yes.d..add r|
0000f950  32 2c 72 32 2c 23 31 0d  64 c8 10 61 64 64 20 72  |2,r2,#1.d..add r|
0000f960  31 2c 72 31 2c 23 31 0d  64 d2 0a 62 20 4c 4c 4c  |1,r1,#1.d..b LLL|
0000f970  32 0d 64 dc 04 0d 64 e6  0b 2e 65 6e 64 6f 66 77  |2.d...d...endofw|
0000f980  0d 64 f0 0f 63 6d 70 20  72 30 2c 23 26 46 46 0d  |.d..cmp r0,#&FF.|
0000f990  64 fa 15 61 64 72 65 71  20 72 32 2c 70 76 6f 6b  |d..adreq r2,pvok|
0000f9a0  66 6c 61 67 0d 65 04 12  73 74 72 65 71 62 20 72  |flag.e..streqb r|
0000f9b0  30 2c 5b 72 32 5d 0d 65  0e 0e 62 65 71 20 65 6e  |0,[r2].e..beq en|
0000f9c0  64 74 62 6c 0d 65 18 25  61 6e 64 20 72 30 2c 72  |dtbl.e.%and r0,r|
0000f9d0  30 2c 23 25 30 31 31 31  31 31 31 31 20 3b 43 6c  |0,#%01111111 ;Cl|
0000f9e0  65 61 72 20 62 69 74 20  37 0d 65 22 13 73 74 72  |ear bit 7.e".str|
0000f9f0  62 20 72 30 2c 5b 72 32  5d 2c 23 31 0d 65 2c 0e  |b r0,[r2],#1.e,.|
0000fa00  6d 6f 76 20 72 30 2c 23  31 33 0d 65 36 10 73 74  |mov r0,#13.e6.st|
0000fa10  72 62 20 72 30 2c 5b 72  32 5d 0d 65 40 10 61 64  |rb r0,[r2].e@.ad|
0000fa20  64 20 72 31 2c 72 31 2c  23 31 0d 65 4a 37 6c 64  |d r1,r1,#1.eJ7ld|
0000fa30  72 62 20 72 30 2c 5b 72  31 5d 20 3b 47 65 74 20  |rb r0,[r1] ;Get |
0000fa40  74 68 65 20 76 65 72 62  2f 6f 62 6a 65 63 74 20  |the verb/object |
0000fa50  6e 75 6d 62 65 72 20 66  72 6f 6d 20 74 61 62 6c  |number from tabl|
0000fa60  65 0d 65 54 21 61 64 64  20 72 31 2c 72 31 2c 23  |e.eT!add r1,r1,#|
0000fa70  31 20 3b 53 6b 69 70 20  74 68 65 20 6e 75 6d 62  |1 ;Skip the numb|
0000fa80  65 72 0d 65 5e 28 63 6d  70 20 72 30 2c 72 33 20  |er.e^(cmp r0,r3 |
0000fa90  20 20 20 3b 49 73 20 69  74 20 74 68 65 20 6f 6e  |   ;Is it the on|
0000faa0  65 20 77 65 20 77 61 6e  74 3f 0d 65 68 27 62 6e  |e we want?.eh'bn|
0000fab0  65 20 4c 4c 4c 31 20 20  20 20 20 3b 4e 6f 20 2d  |e LLL1     ;No -|
0000fac0  20 74 72 79 20 74 68 65  20 6e 65 78 74 20 6f 6e  | try the next on|
0000fad0  65 0d 65 72 04 0d 65 7c  0b 2e 65 6e 64 74 62 6c  |e.er..e|..endtbl|
0000fae0  0d 65 86 12 61 64 72 20  72 32 2c 61 64 64 72 65  |.e..adr r2,addre|
0000faf0  73 73 0d 65 90 0f 73 74  72 20 72 31 2c 5b 72 32  |ss.e..str r1,[r2|
0000fb00  5d 0d 65 9a 1a 6c 64 6d  66 64 20 28 73 70 29 21  |].e..ldmfd (sp)!|
0000fb10  2c 7b 72 30 2d 72 35 2c  70 63 7d 0d 65 a4 04 0d  |,{r0-r5,pc}.e...|
0000fb20  65 ae 18 2e 61 74 65 78  74 20 45 51 55 53 20 c4  |e...atext EQUS .|
0000fb30  38 30 2c 22 2a 22 29 0d  65 b8 09 61 6c 69 67 6e  |80,"*").e..align|
0000fb40  0d 65 c2 13 2e 61 64 64  72 65 73 73 20 65 71 75  |.e...address equ|
0000fb50  64 20 30 0d 65 cc 14 2e  70 76 6f 6b 66 6c 61 67  |d 0.e...pvokflag|
0000fb60  20 65 71 75 62 20 30 0d  65 d6 09 61 6c 69 67 6e  | equb 0.e..align|
0000fb70  0d 65 e0 05 5d 0d 65 ea  0a ed 20 70 61 73 73 0d  |.e..].e... pass.|
0000fb80  65 f4 05 e1 0d 65 fe 04  0d 66 08 04 0d 66 12 31  |e....e...f...f.1|
0000fb90  f4 20 2d 2d 2d 2d 2d 2d  20 53 6f 6d 65 20 67 65  |. ------ Some ge|
0000fba0  6e 65 72 61 6c 20 75 74  69 6c 69 74 79 20 72 6f  |neral utility ro|
0000fbb0  75 74 69 6e 65 73 20 2d  2d 2d 2d 2d 2d 0d 66 1c  |utines ------.f.|
0000fbc0  04 0d 66 26 13 dd 20 f2  45 72 72 6f 72 4d 73 67  |..f&.. .ErrorMsg|
0000fbd0  52 65 61 64 0d 66 30 27  69 6e 25 3d 8e 28 22 3c  |Read.f0'in%=.("<|
0000fbe0  41 6c 70 73 24 52 65 73  6f 75 72 63 65 73 3e 2e  |Alps$Resources>.|
0000fbf0  45 72 72 6f 72 6d 73 67  73 22 29 0d 66 3a 10 e8  |Errormsgs").f:..|
0000fc00  23 69 6e 25 2c 65 72 72  6f 72 73 0d 66 44 14 de  |#in%,errors.fD..|
0000fc10  20 65 72 72 6f 72 24 28  65 72 72 6f 72 73 29 0d  | error$(errors).|
0000fc20  66 4e 18 e3 20 65 72 72  6f 72 3d 30 20 b8 20 65  |fN.. error=0 . e|
0000fc30  72 72 6f 72 73 2d 31 0d  66 58 19 20 20 e8 23 69  |rrors-1.fX.  .#i|
0000fc40  6e 25 2c 65 72 72 6f 72  24 28 65 72 72 6f 72 29  |n%,error$(error)|
0000fc50  0d 66 62 0b ed 20 65 72  72 6f 72 0d 66 6c 09 d9  |.fb.. error.fl..|
0000fc60  23 69 6e 25 0d 66 76 05  e1 0d 66 80 04 0d 66 8a  |#in%.fv...f...f.|
0000fc70  12 dd 20 f2 4b 65 79 57  6f 72 64 52 65 61 64 0d  |.. .KeyWordRead.|
0000fc80  66 94 27 f4 20 52 65 61  64 73 20 66 69 6c 65 20  |f.'. Reads file |
0000fc90  6f 66 20 6b 65 79 77 6f  72 64 73 2f 69 6e 66 6f  |of keywords/info|
0000fca0  20 62 79 74 65 73 0d 66  9e 28 f4 20 4b 65 79 77  | bytes.f.(. Keyw|
0000fcb0  6f 72 64 73 20 61 72 65  20 69 6e 20 61 6c 70 68  |ords are in alph|
0000fcc0  61 62 65 74 69 63 61 6c  20 6f 72 64 65 72 0d 66  |abetical order.f|
0000fcd0  a8 10 ea 20 43 48 4e 25  2c 49 25 2c 4a 25 0d 66  |... CHN%,I%,J%.f|
0000fce0  b2 13 66 69 72 73 74 5f  74 6f 6b 65 6e 3d 26 36  |..first_token=&6|
0000fcf0  30 0d 66 bc 35 6d 61 78  6d 73 67 3d 36 35 35 33  |0.f.5maxmsg=6553|
0000fd00  35 3a 6d 61 78 6f 62 6e  3d 32 35 35 3a 6d 61 78  |5:maxobn=255:max|
0000fd10  76 62 6e 3d 32 35 35 3a  6d 61 78 63 6f 6e 73 74  |vbn=255:maxconst|
0000fd20  3d 36 35 35 33 35 0d 66  c6 28 63 68 6e 25 3d 8e  |=65535.f.(chn%=.|
0000fd30  20 22 3c 41 6c 70 73 24  52 65 73 6f 75 72 63 65  | "<Alps$Resource|
0000fd40  73 3e 2e 6b 65 79 77 72  64 6c 69 73 74 22 0d 66  |s>.keywrdlist".f|
0000fd50  d0 13 e8 23 63 68 6e 25  2c 6b 65 79 77 6f 72 64  |...#chn%,keyword|
0000fd60  73 0d 66 da 2a de 20 6b  65 79 77 6f 72 64 24 28  |s.f.*. keyword$(|
0000fd70  6b 65 79 77 6f 72 64 73  29 2c 69 6e 66 6f 25 28  |keywords),info%(|
0000fd80  6b 65 79 77 6f 72 64 73  2c 35 29 0d 66 e4 04 0d  |keywords,5).f...|
0000fd90  66 ee 1b f4 20 53 65 74  20 75 70 20 6b 65 79 77  |f... Set up keyw|
0000fda0  6f 72 64 20 74 61 62 6c  65 73 0d 66 f8 43 f4 20  |ord tables.f.C. |
0000fdb0  6b 65 79 77 6f 72 64 24  20 7c 20 74 6f 6b 65 6e  |keyword$ | token|
0000fdc0  20 7c 20 74 79 70 65 2f  4e 6f 2e 20 70 61 72 61  | | type/No. para|
0000fdd0  6d 73 20 7c 20 4d 61 78  20 76 61 6c 75 65 73 20  |ms | Max values |
0000fde0  70 61 72 61 6d 20 31 2c  32 2c 33 20 7c 0d 67 02  |param 1,2,3 |.g.|
0000fdf0  48 f4 20 74 79 70 65 2f  4e 6f 2e 20 70 61 72 61  |H. type/No. para|
0000fe00  6d 73 20 67 69 76 65 73  20 6e 75 6d 62 65 72 20  |ms gives number |
0000fe10  6f 66 20 70 61 72 61 6d  65 74 65 72 73 20 61 6e  |of parameters an|
0000fe20  64 20 62 69 74 20 37 20  69 73 20 73 65 74 20 69  |d bit 7 is set i|
0000fe30  66 20 69 74 73 0d 67 0c  48 f4 20 61 20 66 75 6e  |f its.g.H. a fun|
0000fe40  63 74 69 6f 6e 2c 20 62  69 74 20 36 20 73 65 74  |ction, bit 6 set|
0000fe50  20 66 6f 72 20 6f 62 6a  65 63 74 20 6b 65 79 77  | for object keyw|
0000fe60  6f 72 64 73 2c 20 62 69  74 20 35 20 66 6f 72 20  |ords, bit 5 for |
0000fe70  76 65 72 62 20 6b 65 79  77 6f 72 64 73 0d 67 16  |verb keywords.g.|
0000fe80  04 0d 67 20 15 e3 20 49  25 3d 31 20 b8 20 6b 65  |..g .. I%=1 . ke|
0000fe90  79 77 6f 72 64 73 0d 67  2a 17 e8 23 63 68 6e 25  |ywords.g*..#chn%|
0000fea0  2c 6b 65 79 77 6f 72 64  24 28 49 25 29 0d 67 34  |,keyword$(I%).g4|
0000feb0  0e e3 20 4a 25 3d 30 20  b8 20 35 0d 67 3e 17 e8  |.. J%=0 . 5.g>..|
0000fec0  23 63 68 6e 25 2c 69 6e  66 6f 25 28 49 25 2c 4a  |#chn%,info%(I%,J|
0000fed0  25 29 0d 67 48 08 ed 20  4a 25 0d 67 52 08 ed 20  |%).gH.. J%.gR.. |
0000fee0  49 25 0d 67 5c 0a d9 23  63 68 6e 25 0d 67 66 04  |I%.g\..#chn%.gf.|
0000fef0  0d 67 70 15 e3 20 49 25  3d 31 20 b8 20 6b 65 79  |.gp.. I%=1 . key|
0000ff00  77 6f 72 64 73 0d 67 7a  2b 70 61 72 61 6d 73 3d  |words.gz+params=|
0000ff10  69 6e 66 6f 25 28 69 6e  66 6f 25 28 49 25 2c 32  |info%(info%(I%,2|
0000ff20  29 2c 31 29 20 80 20 25  30 30 30 31 31 31 31 31  |),1) . %00011111|
0000ff30  0d 67 84 0b 62 79 74 65  73 3d 30 0d 67 8e 10 e7  |.g..bytes=0.g...|
0000ff40  20 70 61 72 61 6d 73 3e  30 20 8c 0d 67 98 0e e3  | params>0 ..g...|
0000ff50  20 4b 25 3d 33 20 b8 20  35 0d 67 a2 20 6d 61 78  | K%=3 . 5.g. max|
0000ff60  76 61 6c 3d 69 6e 66 6f  25 28 69 6e 66 6f 25 28  |val=info%(info%(|
0000ff70  49 25 2c 32 29 2c 4b 25  29 0d 67 ac 26 e7 20 6d  |I%,2),K%).g.&. m|
0000ff80  61 78 76 61 6c 3c 32 35  36 20 80 20 6d 61 78 76  |axval<256 . maxv|
0000ff90  61 6c 3e 30 20 8c 20 62  79 74 65 73 2b 3d 31 0d  |al>0 . bytes+=1.|
0000ffa0  67 b6 2a e7 20 6d 61 78  76 61 6c 3e 32 35 35 20  |g.*. maxval>255 |
0000ffb0  80 20 6d 61 78 76 61 6c  3c 36 35 35 33 36 20 8c  |. maxval<65536 .|
0000ffc0  20 62 79 74 65 73 2b 3d  32 0d 67 c0 1d e7 20 6d  | bytes+=2.g... m|
0000ffd0  61 78 76 61 6c 3e 36 35  35 33 35 20 8c 20 62 79  |axval>65535 . by|
0000ffe0  74 65 73 2b 3d 33 0d 67  ca 08 ed 20 4b 25 0d 67  |tes+=3.g... K%.g|
0000fff0  d4 05 cd 0d 67 de 2e 70  61 72 61 6d 62 79 74 65  |....g..parambyte|
00010000  3d 69 6e 66 6f 25 28 69  6e 66 6f 25 28 49 25 2c  |=info%(info%(I%,|
00010010  32 29 2c 31 29 20 80 20  25 31 30 30 30 30 30 30  |2),1) . %1000000|
00010020  30 0d 67 e8 23 70 62 79  74 65 73 3f 28 49 25 2d  |0.g.#pbytes?(I%-|
00010030  31 29 3d 62 79 74 65 73  20 84 20 70 61 72 61 6d  |1)=bytes . param|
00010040  62 79 74 65 0d 67 f2 05  ed 0d 67 fc 05 e1 0d 68  |byte.g....g....h|
00010050  06 04 0d 68 10 04 0d 68  1a 27 f4 20 2d 2d 2d 2d  |...h...h.'. ----|
00010060  2d 2d 20 50 72 69 6e 74  69 6e 67 20 70 72 6f 63  |-- Printing proc|
00010070  65 64 75 72 65 73 20 2d  2d 2d 2d 2d 2d 0d 68 24  |edures ------.h$|
00010080  04 0d 68 2e 15 dd 20 f2  70 72 69 6e 74 5f 70 72  |..h... .print_pr|
00010090  6f 67 5f 73 65 67 0d 68  38 08 ea 20 52 25 0d 68  |og_seg.h8.. R%.h|
000100a0  42 07 ea 20 85 0d 68 4c  29 ee 20 85 20 ea 3a ff  |B.. ..hL). . .:.|
000100b0  28 22 46 58 33 2c 30 22  29 3a c8 99 20 22 48 6f  |("FX3,0"):.. "Ho|
000100c0  75 72 67 6c 61 73 73 5f  4f 66 66 22 3a e1 0d 68  |urglass_Off":..h|
000100d0  56 0b 2a 46 58 33 2c 31  30 0d 68 60 16 e3 20 52  |V.*FX3,10.h`.. R|
000100e0  25 3d 30 20 b8 20 6c 61  73 74 5f 72 6f 77 25 0d  |%=0 . last_row%.|
000100f0  68 6a 10 20 20 f1 20 a4  72 6f 77 28 52 25 29 0d  |hj.  . .row(R%).|
00010100  68 74 08 ed 20 52 25 0d  68 7e 0a 2a 46 58 33 2c  |ht.. R%.h~.*FX3,|
00010110  30 0d 68 88 05 e1 0d 68  92 04 0d 68 9c 14 dd 20  |0.h....h...h... |
00010120  f2 70 72 69 6e 74 5f 70  72 6f 67 72 61 6d 0d 68  |.print_program.h|
00010130  a6 07 ea 20 85 0d 68 b0  29 ee 20 85 20 ea 3a ff  |... ..h.). . .:.|
00010140  28 22 46 58 33 2c 30 22  29 3a c8 99 20 22 48 6f  |("FX3,0"):.. "Ho|
00010150  75 72 67 6c 61 73 73 5f  4f 66 66 22 3a e1 0d 68  |urglass_Off":..h|
00010160  ba 0f f2 6c 69 73 74 28  31 2c 22 22 29 0d 68 c4  |...list(1,"").h.|
00010170  05 e1 0d 68 ce 04 0d 68  d8 11 dd 20 f2 70 72 69  |...h...h... .pri|
00010180  6e 74 5f 74 65 78 74 0d  68 e2 11 ea 20 73 74 25  |nt_text.h... st%|
00010190  2c 65 6e 64 25 2c 4d 25  0d 68 ec 07 ea 20 85 0d  |,end%,M%.h... ..|
000101a0  68 f6 29 ee 20 85 20 ea  3a ff 28 22 46 58 33 2c  |h.). . .:.("FX3,|
000101b0  30 22 29 3a c8 99 20 22  48 6f 75 72 67 6c 61 73  |0"):.. "Hourglas|
000101c0  73 5f 4f 66 66 22 3a e1  0d 69 00 16 f2 63 6c 6f  |s_Off":..i...clo|
000101d0  73 65 28 74 65 78 74 68  61 6e 64 6c 65 29 0d 69  |se(texthandle).i|
000101e0  0a 0b 2a 46 58 33 2c 31  30 0d 69 14 12 73 74 25  |..*FX3,10.i..st%|
000101f0  3d bb 20 24 73 74 5f 6d  73 67 25 0d 69 1e 14 65  |=. $st_msg%.i..e|
00010200  6e 64 25 3d bb 20 24 65  6e 64 5f 6d 73 67 25 0d  |nd%=. $end_msg%.|
00010210  69 28 1f e7 20 65 6e 64  25 3e a4 6d 61 78 6d 73  |i(.. end%>.maxms|
00010220  67 20 65 6e 64 25 3d a4  6d 61 78 6d 73 67 0d 69  |g end%=.maxmsg.i|
00010230  32 13 e3 20 4d 25 3d 73  74 25 20 b8 20 65 6e 64  |2.. M%=st% . end|
00010240  25 0d 69 3c 13 20 20 f2  73 68 6f 77 5f 6d 73 67  |%.i<.  .show_msg|
00010250  28 4d 25 29 0d 69 46 14  20 20 f2 70 72 69 6e 74  |(M%).iF.  .print|
00010260  5f 6d 73 67 28 4d 25 29  0d 69 50 08 ed 20 4d 25  |_msg(M%).iP.. M%|
00010270  0d 69 5a 0a 2a 46 58 33  2c 30 0d 69 64 05 e1 0d  |.iZ.*FX3,0.id...|
00010280  69 6e 04 0d 69 78 14 dd  20 f2 70 72 69 6e 74 5f  |in..ix.. .print_|
00010290  6d 73 67 28 4d 25 29 0d  69 82 0b ea 20 53 25 2c  |msg(M%).i... S%,|
000102a0  52 25 0d 69 8c 22 f1 22  4d 65 73 73 61 67 65 3a  |R%.i."."Message:|
000102b0  20 22 3b 4d 25 3b 22 20  53 77 69 74 63 68 65 73  | ";M%;" Switches|
000102c0  3a 20 22 3b 0d 69 96 18  e7 20 73 77 69 74 63 68  |: ";.i... switch|
000102d0  5f 76 61 6c 73 28 30 29  3d 30 20 8c 0d 69 a0 0e  |_vals(0)=0 ..i..|
000102e0  20 20 f1 22 4e 6f 6e 65  22 3b 0d 69 aa 05 cc 0d  |  ."None";.i....|
000102f0  69 b4 1d 20 20 e3 20 53  25 3d 31 20 b8 20 73 77  |i..  . S%=1 . sw|
00010300  69 74 63 68 5f 76 61 6c  73 28 30 29 0d 69 be 21  |itch_vals(0).i.!|
00010310  20 20 20 20 f1 22 3c 22  3b 73 77 69 74 63 68 5f  |    ."<";switch_|
00010320  76 61 6c 73 28 53 25 29  3b 22 3e 22 3b 0d 69 c8  |vals(S%);">";.i.|
00010330  07 20 20 ed 0d 69 d2 05  cd 0d 69 dc 05 f1 0d 69  |.  ..i....i....i|
00010340  e6 16 e3 20 52 25 3d 30  20 b8 20 6c 61 73 74 5f  |... R%=0 . last_|
00010350  72 6f 77 25 0d 69 f0 10  20 20 f1 20 a4 72 6f 77  |row%.i..  . .row|
00010360  28 52 25 29 0d 69 fa 08  ed 20 52 25 0d 6a 04 19  |(R%).i... R%.j..|
00010370  f1 20 c4 74 65 78 74 5f  6d 61 78 6c 6c 65 6e 25  |. .text_maxllen%|
00010380  2c 22 2d 22 29 0d 6a 0e  05 e1 0d 6a 18 04 0d 6a  |,"-").j....j...j|
00010390  22 11 dd 20 f2 70 72 69  6e 74 5f 6f 62 6a 73 0d  |".. .print_objs.|
000103a0  6a 2c 13 ea 20 4f 25 2c  46 25 2c 49 25 2c 70 74  |j,.. O%,F%,I%,pt|
000103b0  72 25 0d 6a 36 0b 2a 46  58 33 2c 31 30 0d 6a 40  |r%.j6.*FX3,10.j@|
000103c0  0f ef 20 63 6f 6e 64 65  6e 73 65 64 0d 6a 4a 0b  |.. condensed.jJ.|
000103d0  f1 70 6c 69 6e 65 24 0d  6a 54 1a f2 70 72 69 6e  |.pline$.jT..prin|
000103e0  74 5f 66 6c 61 67 73 28  6f 5f 66 6c 61 67 73 25  |t_flags(o_flags%|
000103f0  29 0d 6a 5e 0b f1 70 6c  69 6e 65 24 0d 6a 68 74  |).j^..pline$.jht|
00010400  f1 22 4f 62 6a 20 4e 6f  75 6e 20 20 20 20 20 20  |."Obj Noun      |
00010410  20 46 6c 61 67 73 20 37  20 36 20 35 20 34 20 33  | Flags 7 6 5 4 3|
00010420  20 32 20 31 20 30 20 53  74 61 74 65 20 53 74 61  | 2 1 0 State Sta|
00010430  72 74 20 44 65 73 63 72  69 62 65 20 53 68 6f 72  |rt Describe Shor|
00010440  74 20 45 78 61 6d 69 6e  65 20 57 65 69 67 68 74  |t Examine Weight|
00010450  20 53 69 7a 65 20 43 6f  6e 74 2e 20 27 53 74 6f  | Size Cont. 'Sto|
00010460  72 65 27 20 54 72 61 6e  73 2e 20 4f 70 65 6e 22  |re' Trans. Open"|
00010470  0d 6a 72 0b f1 70 6c 69  6e 65 24 0d 6a 7c 18 e3  |.jr..pline$.j|..|
00010480  20 4f 25 3d 31 20 b8 20  6c 61 73 74 5f 6f 62 6a  | O%=1 . last_obj|
00010490  65 63 74 0d 6a 86 09 f1  3b 4f 25 3b 0d 6a 90 23  |ect.j...;O%;.j.#|
000104a0  73 74 6f 72 65 3d 73 6d  61 6c 6c 5f 61 72 65 61  |store=small_area|
000104b0  25 3a 63 6f 6c 25 3d 31  3a 72 6f 77 25 3d 30 0d  |%:col%=1:row%=0.|
000104c0  6a 9a 29 f2 66 69 6c 6c  28 73 6d 61 6c 6c 5f 61  |j.).fill(small_a|
000104d0  72 65 61 25 2c 73 6d 61  6c 6c 5f 61 72 65 61 73  |rea%,small_areas|
000104e0  69 7a 65 25 2c 31 33 29  0d 6a a4 0b 70 72 69 6e  |ize%,13).j..prin|
000104f0  74 3d a3 0d 6a ae 38 f2  70 76 6f 6b 28 a4 66 69  |t=..j.8.pvok(.fi|
00010500  6e 64 6e 6f 75 6e 28 4f  25 2c 76 6f 69 64 29 2c  |ndnoun(O%,void),|
00010510  31 2c a3 29 3a f1 8a 34  29 24 73 6d 61 6c 6c 5f  |1,.):..4)$small_|
00010520  61 72 65 61 25 3b 8a 32  31 29 3b 0d 6a b8 18 70  |area%;.21);.j..p|
00010530  74 72 25 3d 6f 64 61 74  61 25 2b 4f 25 2a 6f 5f  |tr%=odata%+O%*o_|
00010540  6c 65 6e 0d 6a c2 12 e3  20 46 25 3d 37 20 b8 20  |len.j... F%=7 . |
00010550  30 20 88 2d 31 0d 6a cc  26 e7 20 3f 70 74 72 25  |0 .-1.j.&. ?ptr%|
00010560  20 80 20 28 32 5e 46 25  29 20 8c 20 f1 22 2a 20  | . (2^F%) . ."* |
00010570  22 3b 20 8b 20 f1 22 2e  20 22 3b 0d 6a d6 05 ed  |"; . .". ";.j...|
00010580  0d 6a e0 86 f1 8a 33 39  29 3b 70 74 72 25 3f 31  |.j....39);ptr%?1|
00010590  3b 8a 34 33 29 3b 70 74  72 25 3f 32 2b 32 35 36  |;.43);ptr%?2+256|
000105a0  2a 70 74 72 25 3f 33 3b  8a 35 30 29 70 74 72 25  |*ptr%?3;.50)ptr%|
000105b0  3f 34 2b 32 35 36 2a 70  74 72 25 3f 35 3b 8a 35  |?4+256*ptr%?5;.5|
000105c0  38 29 3b 70 74 72 25 3f  36 2b 32 35 36 2a 70 74  |8);ptr%?6+256*pt|
000105d0  72 25 3f 37 3b 8a 36 35  29 3b 70 74 72 25 3f 38  |r%?7;.65);ptr%?8|
000105e0  2b 32 35 36 2a 70 74 72  25 3f 39 3b 8a 37 33 29  |+256*ptr%?9;.73)|
000105f0  3b 70 74 72 25 3f 31 30  3b 8a 38 30 29 3b 70 74  |;ptr%?10;.80);pt|
00010600  72 25 3f 31 31 3b 0d 6a  ea 33 e7 20 28 70 74 72  |r%?11;.j.3. (ptr|
00010610  25 3f 31 32 20 80 20 26  38 30 29 3c 3e 30 20 8c  |%?12 . &80)<>0 .|
00010620  20 f1 8a 38 35 29 22 3c  43 3e 22 3b 8a 39 32 29  | ..85)"<C>";.92)|
00010630  3b 70 74 72 25 3f 31 33  3b 0d 6a f4 1a e7 20 28  |;ptr%?13;.j... (|
00010640  70 74 72 25 3f 31 32 20  80 20 26 38 30 29 3c 3e  |ptr%?12 . &80)<>|
00010650  30 20 8c 0d 6a fe 16 73  74 6f 72 65 5f 72 6f 6f  |0 ..j..store_roo|
00010660  6d 3d 70 74 72 25 3f 31  33 0d 6b 08 26 72 6d 66  |m=ptr%?13.k.&rmf|
00010670  6c 61 67 73 3d 3f 28 72  64 61 74 61 25 2b 73 74  |lags=?(rdata%+st|
00010680  6f 72 65 5f 72 6f 6f 6d  2a 72 5f 6c 65 6e 29 0d  |ore_room*r_len).|
00010690  6b 12 21 74 72 5f 66 6c  61 67 3d 28 72 6d 66 6c  |k.!tr_flag=(rmfl|
000106a0  61 67 73 20 80 20 25 31  30 30 30 30 30 29 3e 30  |ags . %100000)>0|
000106b0  0d 6b 1c 20 6f 70 5f 66  6c 61 67 3d 28 72 6d 66  |.k. op_flag=(rmf|
000106c0  6c 61 67 73 20 80 20 25  31 30 30 30 30 29 3e 30  |lags . %10000)>0|
000106d0  0d 6b 26 27 e7 20 74 72  5f 66 6c 61 67 20 f1 8a  |.k&'. tr_flag ..|
000106e0  31 30 30 29 3b 22 59 22  3b 20 8b 20 f1 8a 31 30  |100);"Y"; . ..10|
000106f0  30 29 3b 22 4e 22 3b 0d  6b 30 25 e7 20 6f 70 5f  |0);"N";.k0%. op_|
00010700  66 6c 61 67 20 f1 8a 31  30 36 29 3b 22 59 22 20  |flag ..106);"Y" |
00010710  8b 20 f1 8a 31 30 36 29  3b 22 4e 22 0d 6b 3a 05  |. ..106);"N".k:.|
00010720  cc 0d 6b 44 05 f1 0d 6b  4e 05 cd 0d 6b 58 05 ed  |..kD...kN...kX..|
00010730  0d 6b 62 0b f1 70 6c 69  6e 65 24 0d 6b 6c 0e ef  |.kb..pline$.kl..|
00010740  20 32 37 2c 72 65 73 65  74 0d 6b 76 0a 2a 46 58  | 27,reset.kv.*FX|
00010750  33 2c 30 0d 6b 80 05 e1  0d 6b 8a 04 0d 6b 94 12  |3,0.k....k...k..|
00010760  dd 20 f2 70 72 69 6e 74  5f 72 6f 6f 6d 73 0d 6b  |. .print_rooms.k|
00010770  9e 13 ea 20 52 25 2c 46  25 2c 49 25 2c 70 74 72  |... R%,F%,I%,ptr|
00010780  25 0d 6b a8 0b 2a 46 58  33 2c 31 30 0d 6b b2 0f  |%.k..*FX3,10.k..|
00010790  ef 20 63 6f 6e 64 65 6e  73 65 64 0d 6b bc 0b f1  |. condensed.k...|
000107a0  70 6c 69 6e 65 24 0d 6b  c6 1a f2 70 72 69 6e 74  |pline$.k...print|
000107b0  5f 66 6c 61 67 73 28 72  5f 66 6c 61 67 73 25 29  |_flags(r_flags%)|
000107c0  0d 6b d0 25 f1 70 6c 69  6e 65 24 3a f1 8a 37 30  |.k.%.pline$:..70|
000107d0  29 3b 22 20 2a 20 44 45  53 54 49 4e 41 54 49 4f  |);" * DESTINATIO|
000107e0  4e 53 20 2a 22 0d 6b da  82 f1 22 52 6f 6f 6d 20  |NS *".k..."Room |
000107f0  46 6c 61 67 73 20 37 36  35 34 33 32 31 30 20 53  |Flags 76543210 S|
00010800  74 61 74 65 20 44 65 73  63 2e 20 53 68 6f 72 74  |tate Desc. Short|
00010810  20 50 69 63 74 2e 20 4e  20 20 20 20 53 20 20 20  | Pict. N    S   |
00010820  20 45 20 20 20 20 57 20  20 20 20 4e 45 20 20 20  | E    W    NE   |
00010830  4e 57 20 20 20 53 45 20  20 20 53 57 20 20 20 55  |NW   SE   SW   U|
00010840  70 20 20 20 44 6f 77 6e  20 49 6e 20 20 20 4f 75  |p   Down In   Ou|
00010850  74 20 20 42 61 63 6b 20  4c 65 66 74 20 52 69 67  |t  Back Left Rig|
00010860  68 20 4a 75 6d 70 22 0d  6b e4 0b f1 70 6c 69 6e  |h Jump".k...plin|
00010870  65 24 0d 6b ee 16 e3 20  52 25 3d 31 20 b8 20 6c  |e$.k... R%=1 . l|
00010880  61 73 74 5f 72 6f 6f 6d  0d 6b f8 0e f1 3b 52 25  |ast_room.k...;R%|
00010890  3b 8a 31 31 29 3b 0d 6c  02 18 70 74 72 25 3d 72  |;.11);.l..ptr%=r|
000108a0  64 61 74 61 25 2b 52 25  2a 72 5f 6c 65 6e 0d 6c  |data%+R%*r_len.l|
000108b0  0c 12 e3 20 46 25 3d 37  20 b8 20 30 20 88 2d 31  |... F%=7 . 0 .-1|
000108c0  0d 6c 16 24 e7 20 3f 70  74 72 25 20 80 20 28 32  |.l.$. ?ptr% . (2|
000108d0  5e 46 25 29 20 8c 20 f1  22 2a 22 3b 20 8b 20 f1  |^F%) . ."*"; . .|
000108e0  22 2e 22 3b 0d 6c 20 05  ed 0d 6c 2a 58 f1 8a 32  |".";.l ...l*X..2|
000108f0  30 29 3b 70 74 72 25 3f  31 3b 8a 32 36 29 3b 70  |0);ptr%?1;.26);p|
00010900  74 72 25 3f 32 2b 32 35  36 2a 70 74 72 25 3f 33  |tr%?2+256*ptr%?3|
00010910  3b 8a 33 32 29 3b 70 74  72 25 3f 34 2b 32 35 36  |;.32);ptr%?4+256|
00010920  2a 70 74 72 25 3f 35 3b  8a 33 38 29 3b 70 74 72  |*ptr%?5;.38);ptr|
00010930  25 3f 37 30 2b 32 35 36  2a 70 74 72 25 3f 37 31  |%?70+256*ptr%?71|
00010940  3b 0d 6c 34 13 e3 20 49  25 3d 36 20 b8 20 33 36  |;.l4.. I%=6 . 36|
00010950  20 88 20 32 0d 6c 3e 2f  f1 8a 35 2a 28 49 25 20  | . 2.l>/..5*(I% |
00010960  81 20 32 2d 33 29 2b 34  34 29 3b 70 74 72 25 3f  |. 2-3)+44);ptr%?|
00010970  49 25 2b 32 35 36 2a 70  74 72 25 3f 28 49 25 2b  |I%+256*ptr%?(I%+|
00010980  31 29 3b 0d 6c 48 08 ed  20 49 25 0d 6c 52 05 f1  |1);.lH.. I%.lR..|
00010990  0d 6c 5c 08 ed 20 52 25  0d 6c 66 04 0d 6c 70 26  |.l\.. R%.lf..lp&|
000109a0  f1 70 6c 69 6e 65 24 3a  f1 8a 33 30 29 3b 22 20  |.pline$:..30);" |
000109b0  2a 20 45 58 49 54 20 52  4f 55 54 49 4e 45 53 20  |* EXIT ROUTINES |
000109c0  2a 22 0d 6c 7a 5c f1 22  52 6f 6f 6d 20 20 4e 20  |*".lz\."Room  N |
000109d0  20 20 20 53 20 20 20 20  45 20 20 20 20 57 20 20  |   S    E    W  |
000109e0  20 20 4e 45 20 20 20 4e  57 20 20 20 53 45 20 20  |  NE   NW   SE  |
000109f0  20 53 57 20 20 20 55 70  20 20 20 44 6f 77 6e 20  | SW   Up   Down |
00010a00  49 6e 20 20 20 4f 75 74  20 20 42 61 63 6b 20 4c  |In   Out  Back L|
00010a10  65 66 74 20 52 69 67 68  20 4a 75 6d 70 22 0d 6c  |eft Righ Jump".l|
00010a20  84 0b f1 70 6c 69 6e 65  24 0d 6c 8e 16 e3 20 52  |...pline$.l... R|
00010a30  25 3d 31 20 b8 20 6c 61  73 74 5f 72 6f 6f 6d 0d  |%=1 . last_room.|
00010a40  6c 98 09 f1 3b 52 25 3b  0d 6c a2 18 70 74 72 25  |l...;R%;.l..ptr%|
00010a50  3d 72 64 61 74 61 25 2b  52 25 2a 72 5f 6c 65 6e  |=rdata%+R%*r_len|
00010a60  0d 6c ac 10 e3 20 49 25  3d 33 38 20 b8 20 35 33  |.l... I%=38 . 53|
00010a70  0d 6c b6 1b f1 8a 35 2a  28 49 25 2d 33 38 29 2b  |.l....5*(I%-38)+|
00010a80  36 29 3b 70 74 72 25 3f  49 25 3b 0d 6c c0 08 ed  |6);ptr%?I%;.l...|
00010a90  20 49 25 0d 6c ca 05 f1  0d 6c d4 08 ed 20 52 25  | I%.l....l... R%|
00010aa0  0d 6c de 0b f1 70 6c 69  6e 65 24 0d 6c e8 19 f1  |.l...pline$.l...|
00010ab0  8a 35 39 29 22 2a 20 45  58 49 54 20 46 4c 41 47  |.59)"* EXIT FLAG|
00010ac0  53 20 2a 22 0d 6c f2 0b  f1 70 6c 69 6e 65 24 0d  |S *".l...pline$.|
00010ad0  6c fc 13 f1 22 45 78 69  74 20 46 6c 61 67 3a 20  |l..."Exit Flag: |
00010ae0  22 3b 0d 6d 06 14 e3 20  66 6c 61 67 3d 37 20 b8  |";.m... flag=7 .|
00010af0  20 30 20 88 2d 31 0d 6d  10 2f f1 8a 31 31 2b 28  | 0 .-1.m./..11+(|
00010b00  37 2d 66 6c 61 67 29 2a  31 35 29 3b 22 7c 22 8a  |7-flag)*15);"|".|
00010b10  32 30 2b 28 37 2d 66 6c  61 67 29 2a 31 35 29 3b  |20+(7-flag)*15);|
00010b20  66 6c 61 67 3b 0d 6d 1a  05 ed 0d 6d 24 12 f1 8a  |flag;.m....m$...|
00010b30  31 31 2b 38 2a 31 35 29  3b 22 7c 22 0d 6d 2e 12  |11+8*15);"|".m..|
00010b40  f1 22 44 65 73 63 72 69  70 74 27 6e 22 3b 0d 6d  |."Descript'n";.m|
00010b50  38 14 e3 20 66 6c 61 67  3d 37 20 b8 20 30 20 88  |8.. flag=7 . 0 .|
00010b60  2d 31 0d 6d 42 2d f1 8a  31 30 2b 28 37 2d 66 6c  |-1.mB-..10+(7-fl|
00010b70  61 67 29 2a 31 35 29 3b  22 20 7c 20 22 3b 65 78  |ag)*15);" | ";ex|
00010b80  69 74 5f 66 6c 61 67 24  28 66 6c 61 67 29 3b 0d  |it_flag$(flag);.|
00010b90  6d 4c 05 ed 0d 6d 56 13  f1 8a 31 30 2b 38 2a 31  |mL...mV...10+8*1|
00010ba0  35 29 3b 22 20 7c 22 0d  6d 60 0b f1 70 6c 69 6e  |5);" |".m`..plin|
00010bb0  65 24 0d 6d 6a 8b f1 8a  34 29 3b 22 20 4e 6f 72  |e$.mj...4);" Nor|
00010bc0  74 68 20 20 20 53 6f 75  74 68 20 20 20 20 45 61  |th   South    Ea|
00010bd0  73 74 20 20 20 20 57 65  73 74 20 20 20 4e 6f 27  |st    West   No'|
00010be0  65 61 73 74 20 4e 6f 27  77 65 73 74 20 53 6f 27  |east No'west So'|
00010bf0  65 61 73 74 20 53 6f 27  77 65 73 74 20 20 20 55  |east So'west   U|
00010c00  70 20 20 20 20 20 44 6f  77 6e 20 20 20 20 20 49  |p     Down     I|
00010c10  6e 20 20 20 20 20 4f 75  74 20 20 20 20 20 42 61  |n     Out     Ba|
00010c20  63 6b 20 20 20 20 4c 65  66 74 20 20 20 20 52 69  |ck    Left    Ri|
00010c30  67 68 74 20 20 20 4a 75  6d 70 20 20 22 0d 6d 74  |ght   Jump  ".mt|
00010c40  16 e3 20 52 25 3d 31 20  b8 20 6c 61 73 74 5f 72  |.. R%=1 . last_r|
00010c50  6f 6f 6d 0d 6d 7e 2c e7  20 52 25 3d 31 20 84 20  |oom.m~,. R%=1 . |
00010c60  52 25 20 83 20 31 30 3d  30 20 8c 20 f1 8a 34 29  |R% . 10=0 . ..4)|
00010c70  c4 31 36 2c 22 7c 2d 2d  2d 2d 2d 2d 2d 22 29 0d  |.16,"|-------").|
00010c80  6d 88 09 f1 3b 52 25 3b  0d 6d 92 18 70 74 72 25  |m...;R%;.m..ptr%|
00010c90  3d 72 64 61 74 61 25 2b  52 25 2a 72 5f 6c 65 6e  |=rdata%+R%*r_len|
00010ca0  0d 6d 9c 09 f1 8a 34 29  3b 0d 6d a6 10 e3 20 49  |.m....4);.m... I|
00010cb0  25 3d 35 34 20 b8 20 36  39 0d 6d b0 12 e3 20 46  |%=54 . 69.m... F|
00010cc0  25 3d 37 20 b8 20 30 20  88 2d 31 0d 6d ba 29 e7  |%=7 . 0 .-1.m.).|
00010cd0  20 3f 28 70 74 72 25 2b  49 25 29 20 80 20 28 32  | ?(ptr%+I%) . (2|
00010ce0  5e 46 25 29 20 8c 20 f1  22 2a 22 3b 20 8b 20 f1  |^F%) . ."*"; . .|
00010cf0  22 2e 22 3b 0d 6d c4 08  ed 20 46 25 0d 6d ce 08  |".";.m... F%.m..|
00010d00  ed 20 49 25 0d 6d d8 05  f1 0d 6d e2 08 ed 20 52  |. I%.m....m... R|
00010d10  25 0d 6d ec 0b f1 70 6c  69 6e 65 24 0d 6d f6 0e  |%.m...pline$.m..|
00010d20  ef 20 32 37 2c 72 65 73  65 74 0d 6e 00 0a 2a 46  |. 27,reset.n..*F|
00010d30  58 33 2c 30 0d 6e 0a 05  e1 0d 6e 14 04 0d 6e 1e  |X3,0.n....n...n.|
00010d40  18 dd 20 f2 70 72 69 6e  74 5f 66 6c 61 67 73 28  |.. .print_flags(|
00010d50  6d 65 6d 25 29 0d 6e 28  13 f1 22 46 6c 61 67 3a  |mem%).n(.."Flag:|
00010d60  20 20 20 20 20 20 22 3b  0d 6e 32 14 e3 20 66 6c  |      ";.n2.. fl|
00010d70  61 67 3d 37 20 b8 20 30  20 88 2d 31 0d 6e 3c 2f  |ag=7 . 0 .-1.n</|
00010d80  f1 8a 31 31 2b 28 37 2d  66 6c 61 67 29 2a 31 35  |..11+(7-flag)*15|
00010d90  29 3b 22 7c 22 8a 32 30  2b 28 37 2d 66 6c 61 67  |);"|".20+(7-flag|
00010da0  29 2a 31 35 29 3b 66 6c  61 67 3b 0d 6e 46 05 ed  |)*15);flag;.nF..|
00010db0  0d 6e 50 12 f1 8a 31 31  2b 38 2a 31 35 29 3b 22  |.nP...11+8*15);"|
00010dc0  7c 22 0d 6e 5a 12 f1 22  44 65 73 63 72 69 70 74  ||".nZ.."Descript|
00010dd0  27 6e 22 3b 0d 6e 64 14  e3 20 66 6c 61 67 3d 37  |'n";.nd.. flag=7|
00010de0  20 b8 20 30 20 88 2d 31  0d 6e 6e 2b f1 8a 31 30  | . 0 .-1.nn+..10|
00010df0  2b 28 37 2d 66 6c 61 67  29 2a 28 6d 61 78 64 25  |+(7-flag)*(maxd%|
00010e00  2d 31 2b 33 29 29 3b 22  20 7c 20 22 3b 24 6d 65  |-1+3));" | ";$me|
00010e10  6d 25 3b 0d 6e 78 0f 6d  65 6d 25 2b 3d 6d 61 78  |m%;.nx.mem%+=max|
00010e20  64 25 0d 6e 82 05 ed 0d  6e 8c 1c f1 8a 31 30 2b  |d%.n....n....10+|
00010e30  38 2a 28 6d 61 78 64 25  2d 31 2b 33 29 29 3b 22  |8*(maxd%-1+3));"|
00010e40  20 7c 22 0d 6e 96 05 e1  0d 6e a0 04 0d 6e aa 12  | |".n....n...n..|
00010e50  dd 20 f2 70 72 69 6e 74  5f 76 6f 63 61 62 0d 6e  |. .print_vocab.n|
00010e60  b4 0b 70 72 69 6e 74 3d  b9 0d 6e be 15 f2 70 75  |..print=..n...pu|
00010e70  74 28 70 6c 69 6e 65 32  24 2b bd 31 33 29 0d 6e  |t(pline2$+.13).n|
00010e80  c8 2a f2 70 75 74 28 c4  33 37 2c 22 20 22 29 2b  |.*.put(.37," ")+|
00010e90  22 4e 6f 75 6e 73 3a 22  2b bd 31 33 29 3a f2 6c  |"Nouns:"+.13):.l|
00010ea0  69 73 74 6e 6f 75 6e 73  0d 6e d2 15 f2 70 75 74  |istnouns.n...put|
00010eb0  28 70 6c 69 6e 65 32 24  2b bd 31 33 29 0d 6e dc  |(pline2$+.13).n.|
00010ec0  2a f2 70 75 74 28 c4 33  37 2c 22 20 22 29 2b 22  |*.put(.37," ")+"|
00010ed0  56 65 72 62 73 3a 22 2b  bd 31 33 29 3a f2 6c 69  |Verbs:"+.13):.li|
00010ee0  73 74 76 65 72 62 73 0d  6e e6 15 f2 70 75 74 28  |stverbs.n...put(|
00010ef0  70 6c 69 6e 65 32 24 2b  bd 31 33 29 0d 6e f0 2e  |pline2$+.13).n..|
00010f00  f2 70 75 74 28 c4 33 34  2c 22 20 22 29 2b 22 41  |.put(.34," ")+"A|
00010f10  64 6a 65 63 74 69 76 65  73 3a 22 2b bd 31 33 29  |djectives:"+.13)|
00010f20  3a f2 6c 69 73 74 61 64  6a 73 0d 6e fa 15 f2 70  |:.listadjs.n...p|
00010f30  75 74 28 70 6c 69 6e 65  32 24 2b bd 31 33 29 0d  |ut(pline2$+.13).|
00010f40  6f 04 31 f2 70 75 74 28  c4 33 33 2c 22 20 22 29  |o.1.put(.33," ")|
00010f50  2b 22 43 6f 6e 6a 75 6e  63 74 69 6f 6e 73 3a 22  |+"Conjunctions:"|
00010f60  2b bd 31 33 29 3a f2 6c  69 73 74 63 6f 6e 6a 73  |+.13):.listconjs|
00010f70  0d 6f 0e 15 f2 70 75 74  28 70 6c 69 6e 65 32 24  |.o...put(pline2$|
00010f80  2b bd 31 33 29 0d 6f 18  31 f2 70 75 74 28 c4 33  |+.13).o.1.put(.3|
00010f90  33 2c 22 20 22 29 2b 22  50 72 65 70 6f 73 69 74  |3," ")+"Preposit|
00010fa0  69 6f 6e 73 3a 22 2b bd  31 33 29 3a f2 6c 69 73  |ions:"+.13):.lis|
00010fb0  74 70 72 65 70 73 0d 6f  22 15 f2 70 75 74 28 70  |tpreps.o"..put(p|
00010fc0  6c 69 6e 65 32 24 2b bd  31 33 29 0d 6f 2c 2d f2  |line2$+.13).o,-.|
00010fd0  70 75 74 28 c4 33 35 2c  22 20 22 29 2b 22 53 70  |put(.35," ")+"Sp|
00010fe0  65 63 69 61 6c 73 3a 22  2b bd 31 33 29 3a f2 6c  |ecials:"+.13):.l|
00010ff0  69 73 74 73 70 65 63 73  0d 6f 36 15 f2 70 75 74  |istspecs.o6..put|
00011000  28 70 6c 69 6e 65 32 24  2b bd 31 33 29 0d 6f 40  |(pline2$+.13).o@|
00011010  2a f2 70 75 74 28 c4 33  37 2c 22 20 22 29 2b 22  |*.put(.37," ")+"|
00011020  4e 6f 69 73 65 3a 22 2b  bd 31 33 29 3a f2 6c 69  |Noise:"+.13):.li|
00011030  73 74 6e 6f 69 73 65 0d  6f 4a 15 f2 70 75 74 28  |stnoise.oJ..put(|
00011040  70 6c 69 6e 65 32 24 2b  bd 31 33 29 0d 6f 54 0b  |pline2$+.13).oT.|
00011050  70 72 69 6e 74 3d a3 0d  6f 5e 05 e1 0d 6f 68 04  |print=..o^...oh.|
00011060  0d 6f 72 10 dd 20 f2 70  72 69 6e 74 5f 70 69 78  |.or.. .print_pix|
00011070  0d 6f 7c 0a ea 20 6d 70  74 72 0d 6f 86 1d 70 72  |.o|.. mptr.o..pr|
00011080  69 6e 74 3d b9 3a c8 99  20 22 48 6f 75 72 67 6c  |int=.:.. "Hourgl|
00011090  61 73 73 5f 4f 6e 22 0d  6f 90 04 0d 6f 9a 0d e7  |ass_On".o...o...|
000110a0  20 70 78 6e 3e 31 20 8c  0d 6f a4 0f 6d 70 74 72  | pxn>1 ..o..mptr|
000110b0  3d 70 69 78 73 2b 33 0d  6f ae 12 e3 20 49 25 3d  |=pixs+3.o... I%=|
000110c0  31 20 b8 20 70 78 6e 2d  31 0d 6f b8 16 20 20 f2  |1 . pxn-1.o..  .|
000110d0  70 75 74 28 c3 28 49 25  29 2b 22 3d 20 22 29 0d  |put(.(I%)+"= ").|
000110e0  6f c2 11 20 20 f2 70 75  74 28 24 6d 70 74 72 29  |o..  .put($mptr)|
000110f0  0d 6f cc 14 20 20 6d 70  74 72 2b 3d a9 24 6d 70  |.o..  mptr+=.$mp|
00011100  74 72 2b 31 0d 6f d6 24  20 20 f2 70 75 74 28 22  |tr+1.o.$  .put("|
00011110  2c 3c 22 2b 70 6f 73 24  28 3f 6d 70 74 72 29 2b  |,<"+pos$(?mptr)+|
00011120  22 3e 22 2b bd 31 33 29  0d 6f e0 0d 20 20 6d 70  |">"+.13).o..  mp|
00011130  74 72 2b 3d 35 0d 6f ea  05 ed 0d 6f f4 05 cd 0d  |tr+=5.o....o....|
00011140  6f fe 04 0d 70 08 1e 70  72 69 6e 74 3d a3 3a c8  |o...p..print=.:.|
00011150  99 20 22 48 6f 75 72 67  6c 61 73 73 5f 4f 66 66  |. "Hourglass_Off|
00011160  22 0d 70 12 05 e1 0d 70  1c 04 0d 70 26 0b dd 20  |".p....p...p&.. |
00011170  f2 73 63 61 6e 0d 70 30  1b 6f 6c 64 70 74 72 3d  |.scan.p0.oldptr=|
00011180  70 72 67 70 74 72 3a 6e  75 6d 66 6c 61 67 3d 30  |prgptr:numflag=0|
00011190  0d 70 3a 26 70 74 72 3d  31 3a 6c 65 6e 3d a9 20  |.p:&ptr=1:len=. |
000111a0  6c 69 6e 65 24 3a e7 20  6c 65 6e 3d 30 20 8c 20  |line$:. len=0 . |
000111b0  e5 20 8d 60 54 71 0d 70  44 05 f5 0d 70 4e 0c 74  |. .`Tq.pD...pN.t|
000111c0  65 6d 70 24 3d 22 22 0d  70 58 22 c8 95 20 c1 6c  |emp$="".pX".. .l|
000111d0  69 6e 65 24 2c 70 74 72  2c 31 29 3c 22 41 22 20  |ine$,ptr,1)<"A" |
000111e0  80 20 70 74 72 3c 6c 65  6e 0d 70 62 0a 70 74 72  |. ptr<len.pb.ptr|
000111f0  2b 3d 31 0d 70 6c 05 ce  0d 70 76 0c 76 70 74 72  |+=1.pl...pv.vptr|
00011200  3d 70 74 72 0d 70 80 22  c8 95 20 c1 6c 69 6e 65  |=ptr.p.".. .line|
00011210  24 2c 70 74 72 2c 31 29  3e 22 40 22 20 80 20 70  |$,ptr,1)>"@" . p|
00011220  74 72 3c 6c 65 6e 0d 70  8a 24 74 65 6d 70 24 3d  |tr<len.p.$temp$=|
00011230  74 65 6d 70 24 2b c1 6c  69 6e 65 24 2c 70 74 72  |temp$+.line$,ptr|
00011240  2c 31 29 3a 70 74 72 2b  3d 31 0d 70 94 05 ce 0d  |,1):ptr+=1.p....|
00011250  70 9e 11 e7 20 74 65 6d  70 24 3c 3e 22 22 20 8c  |p... temp$<>"" .|
00011260  0d 70 a8 21 f2 6c 6f 6f  6b 75 70 28 74 65 6d 70  |.p.!.lookup(temp|
00011270  24 2c 74 6f 6b 65 6e 2c  69 6e 66 6f 5f 70 74 72  |$,token,info_ptr|
00011280  29 0d 70 b2 41 e7 20 74  6f 6b 65 6e 3d 30 20 f2  |).p.A. token=0 .|
00011290  65 72 72 6f 72 28 30 2c  22 3a 20 22 2b c1 6c 69  |error(0,": "+.li|
000112a0  6e 65 24 2c 76 70 74 72  2c 33 30 29 29 3a 70 72  |ne$,vptr,30)):pr|
000112b0  67 70 74 72 3d 6f 6c 64  70 74 72 3a e5 20 8d 60  |gptr=oldptr:. .`|
000112c0  40 71 0d 70 bc 25 e7 20  74 6f 6b 65 6e 3d 64 65  |@q.p.%. token=de|
000112d0  66 5f 74 6f 6b 65 6e 20  8c 20 f2 64 6f 64 65 66  |f_token . .dodef|
000112e0  6e 3a e5 8d 60 40 71 0d  70 c6 29 3f 70 72 67 70  |n:..`@q.p.)?prgp|
000112f0  74 72 3d 74 6f 6b 65 6e  3a 74 6f 6b 70 74 72 3d  |tr=token:tokptr=|
00011300  70 72 67 70 74 72 3a 70  72 67 70 74 72 2b 3d 31  |prgptr:prgptr+=1|
00011310  0d 70 d0 46 70 5f 69 6e  66 6f 3d 69 6e 66 6f 25  |.p.Fp_info=info%|
00011320  28 69 6e 66 6f 25 28 74  6f 6b 65 6e 2d 66 69 72  |(info%(token-fir|
00011330  73 74 5f 74 6f 6b 65 6e  2b 31 2c 32 29 2c 31 29  |st_token+1,2),1)|
00011340  3a 70 61 72 61 6d 73 3d  70 5f 69 6e 66 6f 20 80  |:params=p_info .|
00011350  20 25 31 31 31 31 0d 70  da 0a 70 74 72 2b 3d 31  | %1111.p..ptr+=1|
00011360  0d 70 e4 12 e7 20 70 61  72 61 6d 73 20 3c 3e 30  |.p... params <>0|
00011370  20 8c 0d 70 ee 13 e3 20  49 25 3d 31 20 b8 20 70  | ..p... I%=1 . p|
00011380  61 72 61 6d 73 0d 70 f8  29 20 c8 95 20 a7 22 2c  |arams.p.) .. .",|
00011390  20 22 2c c1 6c 69 6e 65  24 2c 70 74 72 2c 31 29  | ",.line$,ptr,1)|
000113a0  29 3c 3e 30 20 80 20 70  74 72 3c 6c 65 6e 0d 71  |)<>0 . ptr<len.q|
000113b0  02 0c 20 20 70 74 72 2b  3d 31 0d 71 0c 06 20 ce  |..  ptr+=1.q.. .|
000113c0  0d 71 16 43 20 20 e7 20  74 6f 6b 65 6e 3e 3d 76  |.q.C  . token>=v|
000113d0  61 72 5f 74 6f 6b 65 6e  20 80 20 49 25 3d 31 20  |ar_token . I%=1 |
000113e0  8c 20 f2 67 65 74 5f 76  61 72 28 70 74 72 2c 70  |. .get_var(ptr,p|
000113f0  74 72 2c 70 61 72 61 6d  76 61 6c 75 65 2c 76 70  |tr,paramvalue,vp|
00011400  74 72 29 0d 71 20 6d 20  20 e7 20 74 6f 6b 65 6e  |tr).q m  . token|
00011410  3e 3d 76 61 72 5f 74 6f  6b 65 6e 20 80 20 49 25  |>=var_token . I%|
00011420  3e 31 20 8c 20 f2 67 65  74 5f 6e 75 6d 5f 6f 72  |>1 . .get_num_or|
00011430  5f 76 61 72 28 70 74 72  2c 70 74 72 2c 70 61 72  |_var(ptr,ptr,par|
00011440  61 6d 76 61 6c 75 65 2c  76 61 72 66 6c 61 67 29  |amvalue,varflag)|
00011450  3a e7 20 76 61 72 66 6c  61 67 20 8c 20 3f 74 6f  |:. varflag . ?to|
00011460  6b 70 74 72 3d 3f 74 6f  6b 70 74 72 2b 26 31 30  |kptr=?tokptr+&10|
00011470  0d 71 2a 19 20 20 e7 20  74 6f 6b 65 6e 3c 76 61  |.q*.  . token<va|
00011480  72 5f 74 6f 6b 65 6e 20  8c 0d 71 34 85 20 20 e7  |r_token ..q4.  .|
00011490  20 c1 6c 69 6e 65 24 2c  70 74 72 2c 31 29 3d bd  | .line$,ptr,1)=.|
000114a0  33 34 20 f2 64 65 63 6f  64 65 5f 73 74 72 69 6e  |34 .decode_strin|
000114b0  67 28 6c 69 6e 65 24 2c  70 74 72 2c 70 74 72 2c  |g(line$,ptr,ptr,|
000114c0  70 61 72 61 6d 76 61 6c  75 65 2c a4 66 6e 74 79  |paramvalue,.fnty|
000114d0  70 65 28 70 5f 69 6e 66  6f 29 29 20 8b 20 f2 64  |pe(p_info)) . .d|
000114e0  65 63 6f 64 65 5f 70 61  72 61 6d 65 74 65 72 28  |ecode_parameter(|
000114f0  6c 69 6e 65 24 2c 70 74  72 2c 70 74 72 2c 70 61  |line$,ptr,ptr,pa|
00011500  72 61 6d 76 61 6c 75 65  2c 76 70 74 72 29 0d 71  |ramvalue,vptr).q|
00011510  3e 07 20 20 cd 0d 71 48  16 20 20 e7 20 65 72 72  |>.  ..qH.  . err|
00011520  66 6c 61 67 20 8c 20 8d  60 40 71 0d 71 52 5e 20  |flag . .`@q.qR^ |
00011530  20 e7 20 70 61 72 61 6d  76 61 6c 75 65 3e 69 6e  | . paramvalue>in|
00011540  66 6f 25 28 69 6e 66 6f  5f 70 74 72 2c 49 25 2b  |fo%(info_ptr,I%+|
00011550  32 29 20 f2 65 72 72 6f  72 28 32 2c c3 28 69 6e  |2) .error(2,.(in|
00011560  66 6f 25 28 69 6e 66 6f  5f 70 74 72 2c 49 25 2b  |fo%(info_ptr,I%+|
00011570  32 29 29 2b 22 20 28 22  2b 74 65 6d 70 24 2b 22  |2))+" ("+temp$+"|
00011580  29 22 29 3a e5 8d 60 40  71 0d 71 5c 2a 20 20 e7  |)"):..`@q.q\*  .|
00011590  20 69 6e 66 6f 25 28 69  6e 66 6f 5f 70 74 72 2c  | info%(info_ptr,|
000115a0  49 25 2b 32 29 3c 32 35  36 20 8c 20 62 79 74 65  |I%+2)<256 . byte|
000115b0  73 3d 31 0d 71 66 47 20  20 e7 20 69 6e 66 6f 25  |s=1.qfG  . info%|
000115c0  28 69 6e 66 6f 5f 70 74  72 2c 49 25 2b 32 29 3e  |(info_ptr,I%+2)>|
000115d0  32 35 35 20 80 20 69 6e  66 6f 25 28 69 6e 66 6f  |255 . info%(info|
000115e0  5f 70 74 72 2c 49 25 2b  32 29 3c 36 35 35 33 36  |_ptr,I%+2)<65536|
000115f0  20 8c 20 62 79 74 65 73  3d 32 0d 71 70 2c 20 20  | . bytes=2.qp,  |
00011600  e7 20 69 6e 66 6f 25 28  69 6e 66 6f 5f 70 74 72  |. info%(info_ptr|
00011610  2c 49 25 2b 32 29 3e 36  35 35 33 35 20 8c 20 62  |,I%+2)>65535 . b|
00011620  79 74 65 73 3d 33 0d 71  7a 16 20 20 e3 20 4a 25  |ytes=3.qz.  . J%|
00011630  3d 30 20 b8 20 62 79 74  65 73 2d 31 0d 71 84 25  |=0 . bytes-1.q.%|
00011640  20 20 20 20 4a 25 3f 70  72 67 70 74 72 3d 70 61  |    J%?prgptr=pa|
00011650  72 61 6d 76 61 6c 75 65  20 81 20 32 35 36 5e 4a  |ramvalue . 256^J|
00011660  25 0d 71 8e 0a 20 20 ed  20 4a 25 0d 71 98 13 20  |%.q..  . J%.q.. |
00011670  20 70 72 67 70 74 72 2b  3d 62 79 74 65 73 0d 71  | prgptr+=bytes.q|
00011680  a2 08 ed 20 49 25 0d 71  ac 05 cd 0d 71 b6 05 cd  |... I%.q....q...|
00011690  0d 71 c0 26 fd 20 70 74  72 3e 3d 28 6c 65 6e 2d  |.q.&. ptr>=(len-|
000116a0  31 29 20 84 20 74 6f 6b  65 6e 3d 30 20 84 20 65  |1) . token=0 . e|
000116b0  72 72 66 6c 61 67 0d 71  ca 2c e7 20 74 6f 6b 65  |rrflag.q.,. toke|
000116c0  6e 3d 30 20 84 20 65 72  72 66 6c 61 67 20 8c 20  |n=0 . errflag . |
000116d0  f2 72 65 73 74 6f 72 65  5f 65 6e 64 3a e5 8d 60  |.restore_end:..`|
000116e0  5e 71 0d 71 d4 18 3f 70  72 67 70 74 72 3d 31 33  |^q.q..?prgptr=13|
000116f0  3a 70 72 67 70 74 72 2b  3d 31 0d 71 de 05 e1 0d  |:prgptr+=1.q....|
00011700  71 e8 04 0d 71 f2 12 dd  20 f2 72 65 73 74 6f 72  |q...q... .restor|
00011710  65 5f 65 6e 64 0d 71 fc  1b 70 72 67 70 74 72 3d  |e_end.q..prgptr=|
00011720  6f 6c 64 70 74 72 3a 3f  70 72 67 70 74 72 3d 30  |oldptr:?prgptr=0|
00011730  0d 72 06 05 e1 0d 72 10  04 0d 72 1a 1a dd 20 f2  |.r....r...r... .|
00011740  65 72 72 6f 72 28 65 72  72 5f 6e 75 6d 2c 65 72  |error(err_num,er|
00011750  72 24 29 0d 72 24 0d 65  72 72 66 6c 61 67 3d b9  |r$).r$.errflag=.|
00011760  0d 72 2e 3b 6e 75 6c 6c  20 3d a4 65 72 72 6f 72  |.r.;null =.error|
00011770  62 6f 78 28 65 72 72 6f  72 24 28 65 72 72 5f 6e  |box(error$(err_n|
00011780  75 6d 29 2b 22 20 22 2b  65 72 72 24 2c 65 72 72  |um)+" "+err$,err|
00011790  5f 6e 75 6d 2c 31 2c 2d  39 39 29 0d 72 38 05 e1  |_num,1,-99).r8..|
000117a0  0d 72 42 04 0d 72 4c 2d  dd 20 f2 66 69 6e 64 5f  |.rB..rL-. .find_|
000117b0  74 6f 6b 65 6e 28 41 24  28 29 2c 73 65 61 72 63  |token(A$(),searc|
000117c0  68 24 2c f8 20 74 6f 6b  65 6e 2c f8 20 6d 69 64  |h$,. token,. mid|
000117d0  29 0d 72 56 26 ea 20 66  69 72 73 74 2c 6c 61 73  |).rV&. first,las|
000117e0  74 2c 73 74 6f 70 5f 73  65 61 72 63 68 2c 66 6f  |t,stop_search,fo|
000117f0  75 6e 64 2c 6c 65 6e 0d  72 60 11 6c 65 6e 3d a9  |und,len.r`.len=.|
00011800  20 73 65 61 72 63 68 24  0d 72 6a 0b 66 69 72 73  | search$.rj.firs|
00011810  74 3d 31 0d 72 74 12 6c  61 73 74 3d de 28 41 24  |t=1.rt.last=.(A$|
00011820  28 29 2c 31 29 0d 72 7e  19 73 74 6f 70 5f 73 65  |(),1).r~.stop_se|
00011830  61 72 63 68 3d a3 3a 66  6f 75 6e 64 3d a3 0d 72  |arch=.:found=..r|
00011840  88 05 f5 0d 72 92 09 f2  63 68 6f 70 0d 72 9c 11  |....r...chop.r..|
00011850  fd 20 73 74 6f 70 5f 73  65 61 72 63 68 0d 72 a6  |. stop_search.r.|
00011860  2a e7 20 66 6f 75 6e 64  20 8c 20 74 6f 6b 65 6e  |*. found . token|
00011870  3d 69 6e 66 6f 25 28 6d  69 64 2c 30 29 20 8b 20  |=info%(mid,0) . |
00011880  74 6f 6b 65 6e 3d 30 0d  72 b0 05 e1 0d 72 ba 04  |token=0.r....r..|
00011890  0d 72 c4 0b dd 20 f2 63  68 6f 70 0d 72 ce 18 6d  |.r... .chop.r..m|
000118a0  69 64 3d 28 66 69 72 73  74 2b 6c 61 73 74 29 20  |id=(first+last) |
000118b0  81 20 32 0d 72 d8 0e 41  24 3d 41 24 28 6d 69 64  |. 2.r..A$=A$(mid|
000118c0  29 0d 72 e2 2a e7 20 41  24 3d 73 65 61 72 63 68  |).r.*. A$=search|
000118d0  24 20 8c 20 73 74 6f 70  5f 73 65 61 72 63 68 3d  |$ . stop_search=|
000118e0  b9 3a 66 6f 75 6e 64 3d  b9 3a e1 0d 72 ec 12 e7  |.:found=.:..r...|
000118f0  20 41 24 3e 73 65 61 72  63 68 24 20 8c 0d 72 f6  | A$>search$ ..r.|
00011900  0e 6c 61 73 74 3d 6d 69  64 2d 31 0d 73 00 05 cc  |.last=mid-1.s...|
00011910  0d 73 0a 0f 66 69 72 73  74 3d 6d 69 64 2b 31 0d  |.s..first=mid+1.|
00011920  73 14 05 cd 0d 73 1e 20  e7 20 66 69 72 73 74 3e  |s....s. . first>|
00011930  6c 61 73 74 20 8c 20 73  74 6f 70 5f 73 65 61 72  |last . stop_sear|
00011940  63 68 3d b9 0d 73 28 05  e1 0d 73 32 04 0d 73 3c  |ch=..s(...s2..s<|
00011950  26 dd 20 f2 6c 6f 6f 6b  75 70 28 73 65 61 72 63  |&. .lookup(searc|
00011960  68 24 2c f8 20 74 6f 6b  65 6e 2c f8 20 69 6e 64  |h$,. token,. ind|
00011970  65 78 29 0d 73 46 0e ea  20 49 25 2c 66 6f 75 6e  |ex).sF.. I%,foun|
00011980  64 0d 73 50 0b 74 6f 6b  65 6e 3d 30 0d 73 5a 14  |d.sP.token=0.sZ.|
00011990  e7 20 73 65 61 72 63 68  24 3d 22 22 20 8c 20 e1  |. search$="" . .|
000119a0  0d 73 64 2f f2 66 69 6e  64 5f 74 6f 6b 65 6e 28  |.sd/.find_token(|
000119b0  6b 65 79 77 6f 72 64 24  28 29 2c 73 65 61 72 63  |keyword$(),searc|
000119c0  68 24 2c 74 6f 6b 65 6e  2c 69 6e 64 65 78 29 0d  |h$,token,index).|
000119d0  73 6e 05 e1 0d 73 78 04  0d 73 82 08 49 25 3d 31  |sn...sx..s..I%=1|
000119e0  0d 73 8c 05 f5 0d 73 96  51 e7 20 a7 c0 6b 65 79  |.s....s.Q. ..key|
000119f0  77 6f 72 64 24 28 49 25  29 2c a9 28 73 65 61 72  |word$(I%),.(sear|
00011a00  63 68 24 29 29 2c 73 65  61 72 63 68 24 29 3c 3e  |ch$)),search$)<>|
00011a10  30 20 8c 20 74 6f 6b 65  6e 3d 69 6e 66 6f 25 28  |0 . token=info%(|
00011a20  49 25 2c 30 29 3a 66 6f  75 6e 64 3d b9 3a 69 6e  |I%,0):found=.:in|
00011a30  64 65 78 3d 49 25 0d 73  a0 09 49 25 2b 3d 31 0d  |dex=I%.s..I%+=1.|
00011a40  73 aa 1b fd 20 66 6f 75  6e 64 20 84 20 49 25 3d  |s... found . I%=|
00011a50  6b 65 79 77 6f 72 64 73  2b 31 0d 73 b4 05 e1 0d  |keywords+1.s....|
00011a60  73 be 04 0d 73 c8 39 dd  20 f2 64 65 63 6f 64 65  |s...s.9. .decode|
00011a70  5f 70 61 72 61 6d 65 74  65 72 28 6c 69 6e 65 24  |_parameter(line$|
00011a80  2c 70 6c 61 63 65 2c f8  20 70 6c 61 63 65 2c f8  |,place,. place,.|
00011a90  20 76 61 6c 75 65 2c 76  70 74 72 29 0d 73 d2 0c  | value,vptr).s..|
00011aa0  ea 20 74 65 6d 70 31 24  0d 73 dc 2a c8 95 20 a7  |. temp1$.s.*.. .|
00011ab0  22 20 28 2c 22 2c c1 6c  69 6e 65 24 2c 70 6c 61  |" (,",.line$,pla|
00011ac0  63 65 2c 31 29 29 3c 3e  30 20 70 6c 61 63 65 2b  |ce,1))<>0 place+|
00011ad0  3d 31 0d 73 e6 05 ce 0d  73 f0 61 c8 95 20 a7 22  |=1.s....s.a.. ."|
00011ae0  30 31 32 33 34 35 36 37  38 39 22 2c c1 6c 69 6e  |0123456789",.lin|
00011af0  65 24 2c 70 6c 61 63 65  2c 31 29 29 3c 3e 30 20  |e$,place,1))<>0 |
00011b00  80 20 70 6c 61 63 65 3c  3d a9 28 6c 69 6e 65 24  |. place<=.(line$|
00011b10  29 20 74 65 6d 70 31 24  3d 74 65 6d 70 31 24 2b  |) temp1$=temp1$+|
00011b20  c1 6c 69 6e 65 24 2c 70  6c 61 63 65 2c 31 29 3a  |.line$,place,1):|
00011b30  70 6c 61 63 65 2b 3d 31  0d 73 fa 05 ce 0d 74 04  |place+=1.s....t.|
00011b40  25 e7 20 a7 22 29 20 2c  22 2b bd 31 33 2c c1 6c  |%. .") ,"+.13,.l|
00011b50  69 6e 65 24 2c 70 6c 61  63 65 2c 31 29 29 3d 30  |ine$,place,1))=0|
00011b60  20 8c 0d 74 0e 2c f2 65  72 72 6f 72 28 31 2c 22  | ..t.,.error(1,"|
00011b70  3a 20 22 2b c1 6c 69 6e  65 24 2c 76 70 74 72 2c  |: "+.line$,vptr,|
00011b80  33 30 29 29 3a 65 72 72  66 6c 61 67 3d b9 0d 74  |30)):errflag=..t|
00011b90  18 05 cc 0d 74 22 13 76  61 6c 75 65 3d bb 28 74  |....t".value=.(t|
00011ba0  65 6d 70 31 24 29 0d 74  2c 05 cd 0d 74 36 05 e1  |emp1$).t,...t6..|
00011bb0  0d 74 40 04 0d 74 4a 36  dd 20 f2 64 65 63 6f 64  |.t@..tJ6. .decod|
00011bc0  65 5f 73 74 72 69 6e 67  28 6c 69 6e 65 24 2c 70  |e_string(line$,p|
00011bd0  6c 61 63 65 2c f8 20 70  6c 61 63 65 2c f8 20 76  |lace,. place,. v|
00011be0  61 6c 75 65 2c 74 79 70  65 29 0d 74 54 18 ea 20  |alue,type).tT.. |
00011bf0  74 65 6d 70 31 24 2c 64  75 6d 6d 79 24 2c 76 70  |temp1$,dummy$,vp|
00011c00  74 72 0d 74 5e 10 76 70  74 72 3d 70 6c 61 63 65  |tr.t^.vptr=place|
00011c10  2d 31 0d 74 68 0c 70 6c  61 63 65 2b 3d 31 0d 74  |-1.th.place+=1.t|
00011c20  72 0d 74 65 6d 70 31 24  3d 22 22 0d 74 7c 2f c8  |r.temp1$="".t|/.|
00011c30  95 20 28 a7 bd 33 34 2c  c1 6c 69 6e 65 24 2c 70  |. (..34,.line$,p|
00011c40  6c 61 63 65 2c 31 29 29  3d 30 20 80 20 70 6c 61  |lace,1))=0 . pla|
00011c50  63 65 3c a9 6c 69 6e 65  24 29 0d 74 86 1b 74 65  |ce<.line$).t..te|
00011c60  6d 70 31 24 2b 3d c1 6c  69 6e 65 24 2c 70 6c 61  |mp1$+=.line$,pla|
00011c70  63 65 2c 31 29 0d 74 90  0c 70 6c 61 63 65 2b 3d  |ce,1).t..place+=|
00011c80  31 0d 74 9a 05 ce 0d 74  a4 39 e7 20 a7 bd 33 34  |1.t....t.9. ..34|
00011c90  2c c1 6c 69 6e 65 24 2c  70 6c 61 63 65 2c 31 29  |,.line$,place,1)|
00011ca0  29 3c 3e 30 20 8c 20 70  6c 61 63 65 2b 3d 31 3a  |)<>0 . place+=1:|
00011cb0  f4 20 61 64 64 65 64 20  33 31 2e 35 2e 38 39 0d  |. added 31.5.89.|
00011cc0  74 ae 11 e7 20 74 65 6d  70 31 24 3d 22 22 20 8c  |t... temp1$="" .|
00011cd0  0d 74 b8 0b 76 61 6c 75  65 3d 30 0d 74 c2 05 cc  |.t..value=0.t...|
00011ce0  0d 74 cc 0d c8 8e 20 74  79 70 65 20 ca 0d 74 d6  |.t.... type ..t.|
00011cf0  07 c9 20 31 0d 74 e0 37  f2 67 65 74 6f 62 6e 28  |.. 1.t.7.getobn(|
00011d00  74 65 6d 70 31 24 2c 76  61 6c 75 65 2c 64 75 6d  |temp1$,value,dum|
00011d10  6d 79 24 29 3a f4 20 46  69 6e 64 20 74 68 65 20  |my$):. Find the |
00011d20  6e 6f 75 6e 20 6e 75 6d  62 65 72 0d 74 ea 0f e7  |noun number.t...|
00011d30  20 76 61 6c 75 65 3d 30  20 8c 0d 74 f4 16 74 65  | value=0 ..t..te|
00011d40  6d 70 31 24 3d 22 3a 20  22 2b 74 65 6d 70 31 24  |mp1$=": "+temp1$|
00011d50  0d 74 fe 41 85 20 31 2c  22 42 61 64 6c 79 20 66  |.t.A. 1,"Badly f|
00011d60  6f 72 6d 65 64 2f 4e 6f  6e 2d 65 78 69 73 74 65  |ormed/Non-existe|
00011d70  6e 74 20 6e 6f 75 6e 3a  20 22 2b c1 6c 69 6e 65  |nt noun: "+.line|
00011d80  24 2c 76 70 74 72 2d a9  74 65 6d 70 24 2c 32 30  |$,vptr-.temp$,20|
00011d90  29 0d 75 08 05 cc 0d 75  12 43 f2 77 68 69 63 68  |).u....u.C.which|
00011da0  5f 6f 62 6a 28 76 61 6c  75 65 2c 76 61 6c 24 2c  |_obj(value,val$,|
00011db0  72 65 66 73 29 3a f4 20  46 69 6e 64 20 77 68 69  |refs):. Find whi|
00011dc0  63 68 20 6f 62 6a 65 63  74 2f 73 20 69 74 20 72  |ch object/s it r|
00011dd0  65 66 65 72 65 6e 63 65  73 0d 75 1c 3b e7 20 72  |eferences.u.;. r|
00011de0  65 66 73 3d 31 20 8c 20  76 61 6c 75 65 3d bb 28  |efs=1 . value=.(|
00011df0  76 61 6c 24 29 20 8b 20  f2 65 72 72 6f 72 28 32  |val$) . .error(2|
00011e00  37 2c 74 65 6d 70 31 24  2b 65 72 72 6f 72 24 28  |7,temp1$+error$(|
00011e10  33 37 29 29 0d 75 26 05  cd 0d 75 30 24 c9 20 32  |37)).u&...u0$. 2|
00011e20  3a f2 67 65 74 76 62 6e  28 74 65 6d 70 31 24 2c  |:.getvbn(temp1$,|
00011e30  76 61 6c 75 65 2c 64 75  6d 6d 79 24 29 0d 75 3a  |value,dummy$).u:|
00011e40  24 c9 20 33 3a f2 67 65  74 70 72 6e 28 74 65 6d  |$. 3:.getprn(tem|
00011e50  70 31 24 2c 76 61 6c 75  65 2c 64 75 6d 6d 79 24  |p1$,value,dummy$|
00011e60  29 0d 75 44 05 cb 0d 75  4e 05 cd 0d 75 58 05 e1  |).uD...uN...uX..|
00011e70  0d 75 62 04 0d 75 6c 2a  dd 20 f2 67 65 74 5f 76  |.ub..ul*. .get_v|
00011e80  61 72 28 70 6c 61 63 65  2c f8 20 70 6c 61 63 65  |ar(place,. place|
00011e90  2c f8 20 76 61 6c 75 65  2c 76 70 74 72 29 0d 75  |,. value,vptr).u|
00011ea0  76 2a c8 95 20 a7 22 20  28 2c 22 2c c1 6c 69 6e  |v*.. ." (,",.lin|
00011eb0  65 24 2c 70 6c 61 63 65  2c 31 29 29 3c 3e 30 20  |e$,place,1))<>0 |
00011ec0  70 6c 61 63 65 2b 3d 31  0d 75 80 05 ce 0d 75 8a  |place+=1.u....u.|
00011ed0  18 63 68 72 24 3d c1 6c  69 6e 65 24 2c 70 6c 61  |.chr$=.line$,pla|
00011ee0  63 65 2c 31 29 0d 75 94  3c e7 20 63 68 72 24 3c  |ce,1).u.<. chr$<|
00011ef0  22 41 22 20 84 20 63 68  72 24 3e 22 7c 22 20 8c  |"A" . chr$>"|" .|
00011f00  20 f2 65 72 72 6f 72 28  33 2c 22 3a 20 22 2b c1  | .error(3,": "+.|
00011f10  6c 69 6e 65 24 2c 76 70  74 72 2c 33 30 29 29 3a  |line$,vptr,30)):|
00011f20  e1 0d 75 9e 17 76 61 6c  75 65 3d 97 20 63 68 72  |..u..value=. chr|
00011f30  24 20 2d 20 97 22 41 22  0d 75 a8 4f 70 6c 61 63  |$ - ."A".u.Oplac|
00011f40  65 2b 3d 31 3a e7 20 c1  6c 69 6e 65 24 2c 70 6c  |e+=1:. .line$,pl|
00011f50  61 63 65 2c 31 29 3c 3e  22 25 22 20 8c 20 f2 65  |ace,1)<>"%" . .e|
00011f60  72 72 6f 72 28 33 2c 22  3a 20 22 2b c1 6c 69 6e  |rror(3,": "+.lin|
00011f70  65 24 2c 76 70 74 72 2c  33 30 29 29 20 8b 20 70  |e$,vptr,30)) . p|
00011f80  6c 61 63 65 2b 3d 31 0d  75 b2 05 e1 0d 75 bc 04  |lace+=1.u....u..|
00011f90  0d 75 c6 33 dd 20 f2 67  65 74 5f 6e 75 6d 5f 6f  |.u.3. .get_num_o|
00011fa0  72 5f 76 61 72 28 70 6c  61 63 65 2c f8 20 70 6c  |r_var(place,. pl|
00011fb0  61 63 65 2c f8 20 76 61  6c 75 65 2c f8 20 66 6c  |ace,. value,. fl|
00011fc0  61 67 29 0d 75 d0 2a c8  95 20 a7 22 20 28 2c 22  |ag).u.*.. ." (,"|
00011fd0  2c c1 6c 69 6e 65 24 2c  70 6c 61 63 65 2c 31 29  |,.line$,place,1)|
00011fe0  29 3c 3e 30 20 70 6c 61  63 65 2b 3d 31 0d 75 da  |)<>0 place+=1.u.|
00011ff0  05 ce 0d 75 e4 18 63 68  72 24 3d c1 6c 69 6e 65  |...u..chr$=.line|
00012000  24 2c 70 6c 61 63 65 2c  31 29 0d 75 ee 54 e7 20  |$,place,1).u.T. |
00012010  a7 22 30 31 32 33 34 35  36 37 38 39 22 2c 63 68  |."0123456789",ch|
00012020  72 24 29 20 8c 20 66 6c  61 67 3d a3 3a f2 64 65  |r$) . flag=.:.de|
00012030  63 6f 64 65 5f 70 61 72  61 6d 65 74 65 72 28 6c  |code_parameter(l|
00012040  69 6e 65 24 2c 70 6c 61  63 65 2c 70 6c 61 63 65  |ine$,place,place|
00012050  2c 76 61 6c 75 65 2c 76  70 74 72 29 3a e1 0d 75  |,value,vptr):..u|
00012060  f8 2b f2 67 65 74 5f 76  61 72 28 70 6c 61 63 65  |.+.get_var(place|
00012070  2c 70 6c 61 63 65 2c 76  61 6c 75 65 2c 76 70 74  |,place,value,vpt|
00012080  72 29 3a 66 6c 61 67 3d  b9 0d 76 02 05 e1 0d 76  |r):flag=..v....v|
00012090  0c 04 0d 76 16 0a dd 20  f2 72 75 6e 0d 76 20 07  |...v... .run.v .|
000120a0  ea 20 85 0d 76 2a 25 c8  99 20 22 4f 53 5f 42 79  |. ..v*%.. "OS_By|
000120b0  74 65 22 2c 32 32 39 2c  30 2c 30 20 b8 20 2c 6f  |te",229,0,0 . ,o|
000120c0  6c 64 73 74 61 74 65 25  0d 76 34 3a 65 72 72 5f  |ldstate%.v4:err_|
000120d0  63 6f 6c 3d 31 31 3a f2  63 6f 6c 28 31 33 30 29  |col=11:.col(130)|
000120e0  3a f2 63 6f 6c 28 37 29  3a c8 99 20 22 57 69 6d  |:.col(7):.. "Wim|
000120f0  70 5f 53 65 74 43 6f 6c  6f 75 72 22 2c 31 32 38  |p_SetColour",128|
00012100  2b 32 0d 76 3e 61 ee 20  85 20 ea 3a f2 63 6f 6c  |+2.v>a. . .:.col|
00012110  28 65 72 72 5f 63 6f 6c  29 3a e7 20 9f 3c 3e 31  |(err_col):. .<>1|
00012120  37 20 f1 27 22 49 6e 74  65 72 70 72 65 74 65 72  |7 .'"Interpreter|
00012130  20 72 65 70 6f 72 74 73  20 61 20 72 75 6e 2d 74  | reports a run-t|
00012140  69 6d 65 20 65 72 72 6f  72 3a 20 22 f6 24 3a e5  |ime error: ".$:.|
00012150  20 8d 70 52 77 20 8b 20  f1 27 f6 24 3a e5 20 8d  | .pRw . .'.$:. .|
00012160  70 52 77 0d 76 48 3b f2  63 6c 6f 73 65 28 74 65  |pRw.vH;.close(te|
00012170  78 74 68 61 6e 64 6c 65  29 3a f2 63 6c 6f 73 65  |xthandle):.close|
00012180  28 6f 62 6a 68 61 6e 64  6c 65 29 3a f2 63 6c 6f  |(objhandle):.clo|
00012190  73 65 28 72 6f 6f 6d 68  61 6e 64 6c 65 29 0d 76  |se(roomhandle).v|
000121a0  52 11 21 77 6f 72 6b 25  3d 72 64 61 74 61 25 0d  |R.!work%=rdata%.|
000121b0  76 5c 13 77 6f 72 6b 25  21 34 3d 76 65 72 62 73  |v\.work%!4=verbs|
000121c0  2b 33 0d 76 66 13 77 6f  72 6b 25 21 38 3d 6e 6f  |+3.vf.work%!8=no|
000121d0  75 6e 73 2b 33 0d 76 70  17 77 6f 72 6b 25 21 31  |uns+3.vp.work%!1|
000121e0  32 3d 70 72 6f 67 72 61  6d 25 2b 34 0d 76 7a 14  |2=program%+4.vz.|
000121f0  77 6f 72 6b 25 21 31 36  3d 74 65 78 74 25 2b 37  |work%!16=text%+7|
00012200  0d 76 84 14 77 6f 72 6b  25 21 32 30 3d 64 69 63  |.v..work%!20=dic|
00012210  74 25 2b 33 0d 76 8e 13  77 6f 72 6b 25 21 32 34  |t%+3.v..work%!24|
00012220  3d 6f 64 61 74 61 25 0d  76 98 16 77 6f 72 6b 25  |=odata%.v..work%|
00012230  21 32 38 3d 61 64 6a 65  63 74 73 2b 33 0d 76 a2  |!28=adjects+3.v.|
00012240  14 77 6f 72 6b 25 21 33  32 3d 70 72 65 70 73 2b  |.work%!32=preps+|
00012250  33 0d 76 ac 14 77 6f 72  6b 25 21 33 36 3d 63 6f  |3.v..work%!36=co|
00012260  6e 6a 73 2b 33 0d 76 b6  14 77 6f 72 6b 25 21 34  |njs+3.v..work%!4|
00012270  30 3d 73 70 65 63 73 2b  33 0d 76 c0 14 77 6f 72  |0=specs+3.v..wor|
00012280  6b 25 21 34 34 3d 6e 6f  69 73 65 2b 33 0d 76 ca  |k%!44=noise+3.v.|
00012290  13 77 6f 72 6b 25 21 34  38 3d 70 69 78 73 2b 33  |.work%!48=pixs+3|
000122a0  0d 76 d4 1b f4 20 20 77  6f 72 6b 25 21 35 32 20  |.v...  work%!52 |
000122b0  69 73 20 72 65 73 65 72  76 65 64 0d 76 de 15 77  |is reserved.v..w|
000122c0  6f 72 6b 25 21 35 36 3d  69 6e 69 74 73 61 76 65  |ork%!56=initsave|
000122d0  0d 76 e8 16 77 6f 72 6b  25 21 36 30 3d 6c 61 73  |.v..work%!60=las|
000122e0  74 5f 72 6f 6f 6d 0d 76  f2 1a 77 6f 72 6b 25 21  |t_room.v..work%!|
000122f0  36 34 3d 6c 61 73 74 5f  6f 62 6a 65 63 74 2b 31  |64=last_object+1|
00012300  0d 76 fc 0c ef 32 36 2c  34 2c 31 32 0d 77 06 1e  |.v...26,4,12.w..|
00012310  f2 63 65 6e 74 72 65 28  22 50 4c 45 41 53 45 20  |.centre("PLEASE |
00012320  57 41 49 54 22 2c 30 29  3a 87 0d 77 10 35 e7 20  |WAIT",0):..w.5. |
00012330  64 61 74 61 76 61 6c 69  64 20 8c 20 f2 63 6f 70  |datavalid . .cop|
00012340  79 5f 66 72 6f 6d 5f 65  64 69 74 6f 72 20 8b 20  |y_from_editor . |
00012350  f2 63 6f 70 79 5f 74 6f  5f 65 64 69 74 6f 72 0d  |.copy_to_editor.|
00012360  77 1a 12 21 70 69 63 62  75 66 3d 70 62 73 69 7a  |w..!picbuf=pbsiz|
00012370  65 0d 77 24 35 ff 28 22  4c 4f 41 44 20 3c 55 73  |e.w$5.("LOAD <Us|
00012380  65 72 73 24 52 65 73 6f  75 72 63 65 73 3e 2e 42  |ers$Resources>.B|
00012390  75 74 74 6f 6e 73 20 22  2b c3 7e 28 70 69 63 62  |uttons "+.~(picb|
000123a0  75 66 2b 34 29 29 0d 77  2e 38 f4 20 52 65 61 64  |uf+4)).w.8. Read|
000123b0  20 74 68 65 20 73 63 61  6c 65 20 66 61 63 74 6f  | the scale facto|
000123c0  72 73 20 61 6e 64 20 70  69 78 65 6c 20 74 72 61  |rs and pixel tra|
000123d0  6e 73 6c 61 74 69 6f 6e  20 74 61 62 6c 65 0d 77  |nslation table.w|
000123e0  38 42 c8 99 20 22 57 69  6d 70 5f 52 65 61 64 50  |8B.. "Wimp_ReadP|
000123f0  69 78 54 72 61 6e 73 22  2c 26 32 30 30 2c 70 69  |ixTrans",&200,pi|
00012400  63 62 75 66 2c 70 69 63  62 75 66 2b 31 36 2c 30  |cbuf,picbuf+16,0|
00012410  2c 30 2c 30 2c 73 63 61  6c 65 2c 70 69 78 74 72  |,0,0,scale,pixtr|
00012420  0d 77 42 19 f4 20 4e 6f  77 20 50 75 74 53 70 72  |.wB.. Now PutSpr|
00012430  69 74 65 53 63 61 6c 65  64 0d 77 4c 3c c8 99 20  |iteScaled.wL<.. |
00012440  22 4f 53 5f 53 70 72 69  74 65 4f 70 22 2c 26 32  |"OS_SpriteOp",&2|
00012450  33 34 2c 70 69 63 62 75  66 2c 70 69 63 62 75 66  |34,picbuf,picbuf|
00012460  2b 31 36 2c 30 2c 30 2c  38 2c 73 63 61 6c 65 2c  |+16,0,0,8,scale,|
00012470  70 69 78 74 72 0d 77 56  36 ef 20 32 38 2c 30 2c  |pixtr.wV6. 28,0,|
00012480  74 65 78 74 72 6f 77 73  25 2d 35 2c 74 65 78 74  |textrows%-5,text|
00012490  63 6f 6c 73 25 2c 30 2c  32 34 2c 30 3b 31 34 38  |cols%,0,24,0;148|
000124a0  3b 73 63 72 77 3b 73 63  72 68 3b 0d 77 60 1b f2  |;scrw;scrh;.w`..|
000124b0  63 65 6e 74 72 65 28 c4  31 31 2c 22 20 22 29 2c  |centre(.11," "),|
000124c0  30 29 3a f1 3a ee 0d 77  6a 2b 41 25 3d 76 65 72  |0):.:..wj+A%=ver|
000124d0  62 5f 74 79 70 65 3a 42  25 3d 6e 72 65 66 3a 43  |b_type:B%=nref:C|
000124e0  25 3d 61 72 65 66 3a 44  25 3d 72 61 6d 73 61 76  |%=aref:D%=ramsav|
000124f0  65 0d 77 74 2a 45 25 3d  70 62 79 74 65 73 3a 46  |e.wt*E%=pbytes:F|
00012500  25 3d 77 6f 72 6b 25 3a  47 25 3d 70 69 63 62 75  |%=work%:G%=picbu|
00012510  66 3a 48 25 3d 70 62 73  69 7a 65 0d 77 7e 0d 63  |f:H%=pbsize.w~.c|
00012520  6c 69 70 6c 65 6e 3d 30  0d 77 88 09 d6 20 72 75  |liplen=0.w... ru|
00012530  6e 0d 77 92 60 ef 20 32  36 3a f2 63 65 6e 74 72  |n.w.`. 26:.centr|
00012540  65 28 22 50 4c 45 41 53  45 20 57 41 49 54 22 2c  |e("PLEASE WAIT",|
00012550  32 36 29 3a 87 3a f2 73  77 61 70 5f 64 61 74 61  |26):.:.swap_data|
00012560  3a 64 61 74 61 76 61 6c  69 64 3d b9 3a f2 63 65  |:datavalid=.:.ce|
00012570  6e 74 72 65 28 c4 31 31  2c 22 20 22 29 2c 32 36  |ntre(.11," "),26|
00012580  29 3a f2 72 65 74 75 72  6e 28 31 38 2c 30 29 3a  |):.return(18,0):|
00012590  ee 0d 77 9c 32 f2 63 68  61 6e 67 65 69 63 6f 6e  |..w.2.changeicon|
000125a0  28 41 4c 50 53 6d 61 69  6e 2c 73 77 61 70 69 63  |(ALPSmain,swapic|
000125b0  6f 6e 2c 22 73 77 61 70  22 2c 73 77 61 70 69 63  |on,"swap",swapic|
000125c0  6f 6e 29 0d 77 a6 4b f4  20 54 68 65 20 63 6f 70  |on).w.K. The cop|
000125d0  79 2f 73 77 61 70 20 72  6f 75 74 69 6e 65 73 20  |y/swap routines |
000125e0  61 73 20 75 73 65 64 20  61 62 6f 76 65 20 65 6e  |as used above en|
000125f0  73 75 72 65 20 74 68 65  20 64 61 74 61 20 69 6e  |sure the data in|
00012600  20 74 68 65 20 65 64 69  74 6f 72 20 69 73 0d 77  | the editor is.w|
00012610  b0 4c f4 20 41 4c 57 41  59 53 20 76 61 6c 69 64  |.L. ALWAYS valid|
00012620  20 61 66 74 65 72 20 72  75 6e 6e 69 6e 67 20 61  | after running a|
00012630  20 67 61 6d 65 2c 20 65  76 65 6e 20 69 66 20 69  | game, even if i|
00012640  74 20 77 61 73 6e 27 74  20 62 65 66 6f 72 65 20  |t wasn't before |
00012650  72 75 6e 6e 69 6e 67 20  69 74 0d 77 ba 07 ef 20  |running it.w... |
00012660  35 0d 77 c4 22 c8 99 20  46 6f 72 63 65 52 2c 2d  |5.w.".. ForceR,-|
00012670  31 2c 30 2c 30 2c 73 63  72 77 2b 31 2c 73 63 72  |1,0,0,scrw+1,scr|
00012680  68 2b 31 0d 77 ce 07 f7  20 85 0d 77 d8 20 c8 99  |h+1.w... ..w. ..|
00012690  20 22 4f 53 5f 42 79 74  65 22 2c 32 32 39 2c 6f  | "OS_Byte",229,o|
000126a0  6c 64 73 74 61 74 65 25  2c 30 0d 77 e2 14 c8 99  |ldstate%,0.w....|
000126b0  20 22 4f 53 5f 42 79 74  65 22 2c 31 32 34 0d 77  | "OS_Byte",124.w|
000126c0  ec 05 e1 0d 77 f6 04 0d  78 00 11 dd 20 f2 63 6f  |....w...x... .co|
000126d0  6c 28 63 6f 6c 6f 72 29  0d 78 0a 1e c8 99 20 22  |l(color).x.... "|
000126e0  57 69 6d 70 5f 54 65 78  74 43 6f 6c 6f 75 72 22  |Wimp_TextColour"|
000126f0  2c 63 6f 6c 6f 72 0d 78  14 05 e1 0d 78 1e 04 0d  |,color.x....x...|
00012700  78 28 29 dd 20 f2 66 69  6e 64 5f 73 65 63 74 69  |x(). .find_secti|
00012710  6f 6e 28 63 6f 64 65 25  2c 76 61 6c 75 65 25 2c  |on(code%,value%,|
00012720  f8 20 66 6f 75 6e 64 29  0d 78 32 34 f4 20 53 65  |. found).x24. Se|
00012730  61 72 63 68 65 73 20 70  72 6f 67 72 61 6d 20 66  |arches program f|
00012740  6f 72 20 61 20 6d 61 74  63 68 20 77 69 74 68 20  |or a match with |
00012750  63 6f 64 65 25 2c 76 61  6c 75 65 25 0d 78 3c 1f  |code%,value%.x<.|
00012760  f4 20 65 67 20 44 45 46  50 52 4f 43 28 33 29 20  |. eg DEFPROC(3) |
00012770  2d 2d 3e 20 26 38 36 2c  26 30 33 0d 78 46 41 f4  |--> &86,&03.xFA.|
00012780  20 53 65 74 73 20 60 6c  69 73 74 70 74 72 60 20  | Sets `listptr` |
00012790  74 6f 20 74 68 65 20 61  64 64 72 65 73 73 20 6f  |to the address o|
000127a0  66 20 74 68 65 20 60 63  6f 64 65 25 60 20 62 79  |f the `code%` by|
000127b0  74 65 2c 20 69 66 20 66  6f 75 6e 64 0d 78 50 0f  |te, if found.xP.|
000127c0  70 74 72 3d 6c 69 73 74  70 74 72 0d 78 5a 11 ea  |ptr=listptr.xZ..|
000127d0  20 62 79 74 65 31 2c 62  79 74 65 32 0d 78 64 0b  | byte1,byte2.xd.|
000127e0  66 6f 75 6e 64 3d a3 0d  78 6e 25 45 25 3d 70 62  |found=..xn%E%=pb|
000127f0  79 74 65 73 3a 46 25 3d  77 6f 72 6b 25 3a d6 20  |ytes:F%=work%:. |
00012800  73 65 74 75 70 3a 47 25  3d 70 74 72 0d 78 78 05  |setup:G%=ptr.xx.|
00012810  f5 0d 78 82 1b 41 25 3d  63 6f 64 65 25 3a 70 74  |..x..A%=code%:pt|
00012820  72 3d ba 20 66 69 6e 64  63 6f 64 65 0d 78 8c 26  |r=. findcode.x.&|
00012830  e7 20 3f 70 74 72 3d 76  61 6c 75 65 25 20 8c 20  |. ?ptr=value% . |
00012840  66 6f 75 6e 64 3d b9 20  8b 20 47 25 3d 70 74 72  |found=. . G%=ptr|
00012850  2b 31 0d 78 96 13 fd 20  66 6f 75 6e 64 20 84 20  |+1.x... found . |
00012860  70 74 72 3d 30 0d 78 a0  3a e7 20 66 6f 75 6e 64  |ptr=0.x.:. found|
00012870  20 8c 20 6c 69 73 74 70  74 72 3d 70 74 72 2d 31  | . listptr=ptr-1|
00012880  20 8b 20 6c 69 73 74 70  74 72 3d 70 72 6f 67 72  | . listptr=progr|
00012890  61 6d 25 2b 34 2b a4 70  72 67 6c 65 6e 2b 31 0d  |am%+4+.prglen+1.|
000128a0  78 aa 05 e1 0d 78 b4 04  0d 78 be 1b dd 20 f2 6c  |x....x...x... .l|
000128b0  69 73 74 28 70 72 67 5f  70 61 72 74 25 2c 76 61  |ist(prg_part%,va|
000128c0  6c 24 29 0d 78 c8 0f ea  20 63 6f 6c 25 2c 72 6f  |l$).x... col%,ro|
000128d0  77 25 0d 78 d2 30 f2 66  69 6c 6c 28 74 65 78 74  |w%.x.0.fill(text|
000128e0  5f 62 6c 6f 63 6b 25 2c  74 65 78 74 5f 62 6c 6f  |_block%,text_blo|
000128f0  63 6b 73 69 7a 65 25 2c  64 75 6d 6d 79 5f 73 70  |cksize%,dummy_sp|
00012900  63 29 0d 78 dc 15 74 65  78 74 5f 72 6f 77 6c 65  |c).x..text_rowle|
00012910  6e 25 28 29 3d 2b 30 0d  78 e6 15 c8 99 20 22 48  |n%()=+0.x.... "H|
00012920  6f 75 72 67 6c 61 73 73  5f 4f 6e 22 0d 78 f0 30  |ourglass_On".x.0|
00012930  6c 69 73 74 70 74 72 3d  70 72 6f 67 72 61 6d 25  |listptr=program%|
00012940  2b 34 3a 6c 69 6e 65 3d  31 3a 6c 61 73 74 3d 36  |+4:line=1:last=6|
00012950  35 35 33 35 3a 66 69 72  73 74 3d 31 0d 78 fa 11  |5535:first=1.x..|
00012960  63 6f 6c 25 3d 31 3a 72  6f 77 25 3d 30 0d 79 04  |col%=1:row%=0.y.|
00012970  15 73 74 6f 72 65 3d 74  65 78 74 5f 62 6c 6f 63  |.store=text_bloc|
00012980  6b 25 0d 79 0e 13 65 78  69 73 74 69 6e 67 5f 76  |k%.y..existing_v|
00012990  65 72 62 3d a3 0d 79 18  0b 70 72 69 6e 74 3d a3  |erb=..y..print=.|
000129a0  0d 79 22 0d 65 72 72 66  6c 61 67 3d a3 0d 79 2c  |.y".errflag=..y,|
000129b0  04 0d 79 36 12 c8 8e 20  70 72 67 5f 70 61 72 74  |..y6... prg_part|
000129c0  25 20 ca 0d 79 40 3d c9  20 31 3a 66 6f 75 6e 64  |% ..y@=. 1:found|
000129d0  3d b9 3a 65 6e 64 31 25  3d 30 3a 65 6e 64 32 25  |=.:end1%=0:end2%|
000129e0  3d 30 3a 70 72 69 6e 74  3d b9 3a f4 20 50 72 69  |=0:print=.:. Pri|
000129f0  6e 74 20 77 68 6f 6c 65  20 70 72 6f 67 72 61 6d  |nt whole program|
00012a00  0d 79 4a 30 c9 20 32 3a  66 6f 75 6e 64 3d b9 3a  |.yJ0. 2:found=.:|
00012a10  65 6e 64 31 25 3d 73 74  6f 70 5f 74 6f 6b 65 6e  |end1%=stop_token|
00012a20  3a 65 6e 64 32 25 3d 64  65 66 5f 74 6f 6b 65 6e  |:end2%=def_token|
00012a30  0d 79 54 23 c9 20 33 2c  34 2c 35 3a 65 6e 64 31  |.yT#. 3,4,5:end1|
00012a40  25 3d 65 6e 64 5f 74 6f  6b 65 6e 3a 65 6e 64 32  |%=end_token:end2|
00012a50  25 3d 30 0d 79 5e 05 cb  0d 79 68 04 0d 79 72 12  |%=0.y^...yh..yr.|
00012a60  c8 8e 20 70 72 67 5f 70  61 72 74 25 20 ca 0d 79  |.. prg_part% ..y|
00012a70  7c 07 c9 20 33 0d 79 86  2a f2 66 69 6e 64 5f 73  ||.. 3.y.*.find_s|
00012a80  65 63 74 69 6f 6e 28 70  72 6f 63 5f 74 6f 6b 65  |ection(proc_toke|
00012a90  6e 2c bb 20 76 61 6c 24  2c 66 6f 75 6e 64 29 0d  |n,. val$,found).|
00012aa0  79 90 14 74 6f 6b 65 6e  3d 70 72 6f 63 5f 74 6f  |y..token=proc_to|
00012ab0  6b 65 6e 0d 79 9a 07 c9  20 34 0d 79 a4 13 65 78  |ken.y... 4.y..ex|
00012ac0  69 73 74 69 6e 67 5f 76  65 72 62 3d b9 0d 79 ae  |isting_verb=..y.|
00012ad0  1d f2 67 65 74 76 62 6e  28 76 61 6c 24 2c 76 65  |..getvbn(val$,ve|
00012ae0  72 62 2c 64 75 6d 6d 79  24 29 0d 79 b8 27 f2 66  |rb,dummy$).y.'.f|
00012af0  69 6e 64 5f 73 65 63 74  69 6f 6e 28 64 65 66 5f  |ind_section(def_|
00012b00  74 6f 6b 65 6e 2c 76 65  72 62 2c 66 6f 75 6e 64  |token,verb,found|
00012b10  29 0d 79 c2 13 74 6f 6b  65 6e 3d 64 65 66 5f 74  |).y..token=def_t|
00012b20  6f 6b 65 6e 0d 79 cc 07  c9 20 35 0d 79 d6 2a f2  |oken.y... 5.y.*.|
00012b30  66 69 6e 64 5f 73 65 63  74 69 6f 6e 28 65 78 69  |find_section(exi|
00012b40  74 5f 74 6f 6b 65 6e 2c  bb 20 76 61 6c 24 2c 66  |t_token,. val$,f|
00012b50  6f 75 6e 64 29 0d 79 e0  14 74 6f 6b 65 6e 3d 65  |ound).y..token=e|
00012b60  78 69 74 5f 74 6f 6b 65  6e 0d 79 ea 05 cb 0d 79  |xit_token.y....y|
00012b70  f4 04 0d 79 fe 0f e7 20  ac 20 66 6f 75 6e 64 20  |...y... . found |
00012b80  8c 0d 7a 08 39 20 20 f2  65 72 72 6f 72 28 31 30  |..z.9  .error(10|
00012b90  2c 22 22 2b a4 74 6f 6b  65 6e 5f 74 6f 5f 6b 65  |,""+.token_to_ke|
00012ba0  79 77 6f 72 64 28 74 6f  6b 65 6e 29 2b 22 28 22  |yword(token)+"("|
00012bb0  2b 76 61 6c 24 2b 22 29  22 29 0d 7a 12 2a 20 20  |+val$+")").z.*  |
00012bc0  6c 69 73 74 70 74 72 2d  3d 31 3a f4 20 50 6f 69  |listptr-=1:. Poi|
00012bd0  6e 74 20 74 6f 20 65 6e  64 20 6f 66 20 70 72 6f  |nt to end of pro|
00012be0  67 72 61 6d 0d 7a 1c 29  20 20 e7 20 74 6f 6b 65  |gram.z.)  . toke|
00012bf0  6e 3d 64 65 66 5f 74 6f  6b 65 6e 20 8c 20 65 78  |n=def_token . ex|
00012c00  69 73 74 69 6e 67 5f 76  65 72 62 3d a3 0d 7a 26  |isting_verb=..z&|
00012c10  05 cd 0d 7a 30 04 0d 7a  3a 35 70 73 74 61 72 74  |...z0..z:5pstart|
00012c20  3d 6c 69 73 74 70 74 72  3a f4 20 53 74 61 72 74  |=listptr:. Start|
00012c30  20 61 64 64 72 65 73 73  20 6f 66 20 70 72 6f 67  | address of prog|
00012c40  72 61 6d 20 73 65 63 74  69 6f 6e 0d 7a 44 1e 62  |ram section.zD.b|
00012c50  79 74 65 31 3d 3f 6c 69  73 74 70 74 72 3a 66 6f  |yte1=?listptr:fo|
00012c60  75 6e 64 5f 65 6e 64 3d  a3 0d 7a 4e 1d c8 95 20  |und_end=..zN... |
00012c70  62 79 74 65 31 3c 3e 30  20 80 20 ac 20 66 6f 75  |byte1<>0 . . fou|
00012c80  6e 64 5f 65 6e 64 0d 7a  58 0a 65 6f 6c 25 3d a3  |nd_end.zX.eol%=.|
00012c90  0d 7a 62 11 20 20 c8 95  20 62 79 74 65 31 3d 31  |.zb.  .. byte1=1|
00012ca0  33 0d 7a 6c 23 20 20 20  20 6c 69 73 74 70 74 72  |3.zl#    listptr|
00012cb0  2b 3d 31 3a f2 70 75 74  28 bd 31 33 29 3a 65 6f  |+=1:.put(.13):eo|
00012cc0  6c 25 3d b9 0d 7a 76 0f  20 20 20 20 72 6f 77 25  |l%=..zv.    row%|
00012cd0  2b 3d 31 0d 7a 80 16 20  20 20 20 62 79 74 65 31  |+=1.z..    byte1|
00012ce0  3d 3f 6c 69 73 74 70 74  72 0d 7a 8a 07 20 20 ce  |=?listptr.z..  .|
00012cf0  0d 7a 94 22 20 20 e7 20  62 79 74 65 31 3d 30 20  |.z."  . byte1=0 |
00012d00  8c 20 f2 70 75 74 28 bd  28 30 29 29 3a e5 8d 50  |. .put(.(0)):..P|
00012d10  5a 7c 0d 7a 9e 38 20 20  e7 20 28 62 79 74 65 31  |Z|.z.8  . (byte1|
00012d20  3d 65 6e 64 31 25 20 80  20 65 6f 6c 25 29 20 84  |=end1% . eol%) .|
00012d30  20 62 79 74 65 31 3d 65  6e 64 32 25 20 8c 20 66  | byte1=end2% . f|
00012d40  6f 75 6e 64 5f 65 6e 64  3d b9 0d 7a a8 31 20 20  |ound_end=..z.1  |
00012d50  e7 20 62 79 74 65 31 3e  26 42 46 20 8c 20 62 79  |. byte1>&BF . by|
00012d60  74 65 32 3d 62 79 74 65  31 2d 26 31 30 20 8b 20  |te2=byte1-&10 . |
00012d70  62 79 74 65 32 3d 62 79  74 65 31 0d 7a b2 1c 20  |byte2=byte1.z.. |
00012d80  20 74 6f 6b 65 6e 3d 62  79 74 65 32 3a 6c 69 73  | token=byte2:lis|
00012d90  74 70 74 72 2b 3d 31 0d  7a bc 24 20 20 77 6f 72  |tptr+=1.z.$  wor|
00012da0  64 24 3d a4 74 6f 6b 65  6e 5f 74 6f 5f 6b 65 79  |d$=.token_to_key|
00012db0  77 6f 72 64 28 74 6f 6b  65 6e 29 0d 7a c6 11 20  |word(token).z.. |
00012dc0  20 f2 70 75 74 28 77 6f  72 64 24 29 0d 7a d0 32  | .put(word$).z.2|
00012dd0  20 20 e7 20 62 79 74 65  32 3d 64 65 66 5f 74 6f  |  . byte2=def_to|
00012de0  6b 65 6e 20 8c 20 f2 70  72 74 64 65 66 3a 6c 69  |ken . .prtdef:li|
00012df0  73 74 70 74 72 2b 3d 31  3a e5 8d 50 5a 7c 0d 7a  |stptr+=1:..PZ|.z|
00012e00  da 48 20 20 70 5f 69 6e  66 6f 3d 69 6e 66 6f 25  |.H  p_info=info%|
00012e10  28 69 6e 66 6f 25 28 74  6f 6b 65 6e 2d 66 69 72  |(info%(token-fir|
00012e20  73 74 5f 74 6f 6b 65 6e  2b 31 2c 32 29 2c 31 29  |st_token+1,2),1)|
00012e30  3a 70 61 72 61 6d 73 3d  70 5f 69 6e 66 6f 20 80  |:params=p_info .|
00012e40  20 25 31 31 31 31 0d 7a  e4 29 20 20 e7 20 70 61  | %1111.z.)  . pa|
00012e50  72 61 6d 73 3d 30 20 80  20 3f 6c 69 73 74 70 74  |rams=0 . ?listpt|
00012e60  72 3c 3e 31 33 20 f2 70  75 74 28 22 20 22 29 0d  |r<>13 .put(" ").|
00012e70  7a ee 13 20 20 e7 20 70  61 72 61 6d 73 3c 3e 30  |z..  . params<>0|
00012e80  20 8c 0d 7a f8 11 20 20  20 20 f2 70 75 74 28 22  | ..z..    .put("|
00012e90  28 22 29 0d 7b 02 17 20  20 20 20 e3 20 49 25 3d  |(").{..    . I%=|
00012ea0  31 20 b8 20 70 61 72 61  6d 73 0d 7b 0c 3b 20 20  |1 . params.{.;  |
00012eb0  20 20 20 20 6d 61 78 76  61 6c 75 65 3d 69 6e 66  |    maxvalue=inf|
00012ec0  6f 25 28 69 6e 66 6f 25  28 74 6f 6b 65 6e 2d 66  |o%(info%(token-f|
00012ed0  69 72 73 74 5f 74 6f 6b  65 6e 2b 31 2c 32 29 2c  |irst_token+1,2),|
00012ee0  49 25 2b 32 29 0d 7b 16  22 20 20 20 20 20 20 e7  |I%+2).{."      .|
00012ef0  20 6d 61 78 76 61 6c 75  65 3c 32 35 36 20 8c 20  | maxvalue<256 . |
00012f00  62 79 74 65 73 3d 31 0d  7b 20 33 20 20 20 20 20  |bytes=1.{ 3     |
00012f10  20 e7 20 6d 61 78 76 61  6c 75 65 3e 32 35 35 20  | . maxvalue>255 |
00012f20  80 20 6d 61 78 76 61 6c  75 65 3c 36 35 35 33 36  |. maxvalue<65536|
00012f30  20 8c 20 62 79 74 65 73  3d 32 0d 7b 2a 24 20 20  | . bytes=2.{*$  |
00012f40  20 20 20 20 e7 20 6d 61  78 76 61 6c 75 65 3e 36  |    . maxvalue>6|
00012f50  35 35 33 35 20 8c 20 62  79 74 65 73 3d 33 0d 7b  |5535 . bytes=3.{|
00012f60  34 11 20 20 20 20 20 20  76 61 6c 75 65 3d 30 0d  |4.      value=0.|
00012f70  7b 3e 1a 20 20 20 20 20  20 e3 20 4a 25 3d 30 20  |{>.      . J%=0 |
00012f80  b8 20 62 79 74 65 73 2d  31 0d 7b 48 2b 20 20 20  |. bytes-1.{H+   |
00012f90  20 20 20 20 20 76 61 6c  75 65 3d 76 61 6c 75 65  |     value=value|
00012fa0  2b 28 4a 25 3f 6c 69 73  74 70 74 72 29 2a 32 35  |+(J%?listptr)*25|
00012fb0  36 5e 4a 25 0d 7b 52 0e  20 20 20 20 20 20 ed 20  |6^J%.{R.      . |
00012fc0  4a 25 0d 7b 5c 12 20 20  20 20 20 20 64 6f 6e 65  |J%.{\.      done|
00012fd0  69 74 3d a3 0d 7b 66 3e  20 20 20 20 20 20 e7 20  |it=..{f>      . |
00012fe0  49 25 3d 31 20 80 20 28  6c 69 73 74 6f 70 74 69  |I%=1 . (listopti|
00012ff0  6f 6e 20 80 20 25 31 30  29 3c 3e 30 20 80 20 a4  |on . %10)<>0 . .|
00013000  66 6e 74 79 70 65 28 70  5f 69 6e 66 6f 29 3d 31  |fntype(p_info)=1|
00013010  20 8c 0d 7b 70 14 20 20  20 20 20 20 20 20 f2 70  | ..{p.        .p|
00013020  72 6e 74 6f 62 6a 0d 7b  7a 0b 20 20 20 20 20 20  |rntobj.{z.      |
00013030  cc 0d 7b 84 40 20 20 20  20 20 20 20 20 e7 20 49  |..{.@        . I|
00013040  25 3d 31 20 80 20 28 6c  69 73 74 6f 70 74 69 6f  |%=1 . (listoptio|
00013050  6e 20 80 20 25 31 30 29  3c 3e 30 20 80 20 a4 66  |n . %10)<>0 . .f|
00013060  6e 74 79 70 65 28 70 5f  69 6e 66 6f 29 3d 32 20  |ntype(p_info)=2 |
00013070  8c 0d 7b 8e 16 20 20 20  20 20 20 20 20 20 20 f2  |..{..          .|
00013080  70 72 6e 74 76 72 62 0d  7b 98 0d 20 20 20 20 20  |prntvrb.{..     |
00013090  20 20 20 cd 0d 7b a2 0b  20 20 20 20 20 20 cd 0d  |   ..{..      ..|
000130a0  7b ac 58 20 20 20 20 20  20 e7 20 49 25 3d 31 20  |{.X      . I%=1 |
000130b0  80 20 28 77 6f 72 64 24  3d 22 50 52 45 50 22 20  |. (word$="PREP" |
000130c0  84 20 77 6f 72 64 24 3d  22 4e 4f 54 50 52 45 50  |. word$="NOTPREP|
000130d0  22 29 20 80 20 28 6c 69  73 74 6f 70 74 69 6f 6e  |") . (listoption|
000130e0  20 80 20 25 31 30 29 3c  3e 30 20 8c 20 f2 70 72  | . %10)<>0 . .pr|
000130f0  69 6e 74 70 72 65 70 0d  7b b6 57 20 20 20 20 20  |intprep.{.W     |
00013100  20 e7 20 49 25 3d 32 20  80 20 28 77 6f 72 64 24  | . I%=2 . (word$|
00013110  3d 22 50 55 54 49 4e 22  20 84 20 77 6f 72 64 24  |="PUTIN" . word$|
00013120  3d 22 54 41 4b 45 4f 55  54 22 29 20 80 20 28 6c  |="TAKEOUT") . (l|
00013130  69 73 74 6f 70 74 69 6f  6e 20 80 20 25 31 30 29  |istoption . %10)|
00013140  3c 3e 30 20 8c 20 f2 70  72 6e 74 6f 62 6a 0d 7b  |<>0 . .prntobj.{|
00013150  c0 16 20 20 20 20 20 20  e7 20 ac 20 64 6f 6e 65  |..      . . done|
00013160  69 74 20 8c 0d 7b ca 5b  20 20 20 20 20 20 20 20  |it ..{.[        |
00013170  e7 20 62 79 74 65 31 3c  76 61 72 5f 74 6f 6b 65  |. byte1<var_toke|
00013180  6e 20 84 20 28 49 25 3e  31 20 80 20 62 79 74 65  |n . (I%>1 . byte|
00013190  31 3c 26 43 30 29 20 f2  70 75 74 28 c3 28 76 61  |1<&C0) .put(.(va|
000131a0  6c 75 65 29 29 20 8b 20  f2 70 75 74 28 bd 28 76  |lue)) . .put(.(v|
000131b0  61 6c 75 65 2b 97 22 41  22 29 2b 22 25 22 29 0d  |alue+."A")+"%").|
000131c0  7b d4 0b 20 20 20 20 20  20 cd 0d 7b de 18 20 20  |{..      ..{..  |
000131d0  20 20 20 20 6c 69 73 74  70 74 72 2b 3d 62 79 74  |    listptr+=byt|
000131e0  65 73 0d 7b e8 22 20 20  20 20 20 20 e7 20 49 25  |es.{."      . I%|
000131f0  3c 3e 70 61 72 61 6d 73  20 8c 20 f2 70 75 74 28  |<>params . .put(|
00013200  22 2c 22 29 0d 7b f2 0c  20 20 20 20 ed 20 49 25  |",").{..    . I%|
00013210  0d 7b fc 11 20 20 20 20  f2 70 75 74 28 22 29 22  |.{..    .put(")"|
00013220  29 0d 7c 06 20 20 20 20  20 e7 20 3f 6c 69 73 74  |).|.     . ?list|
00013230  70 74 72 3c 3e 31 33 20  f2 70 75 74 28 22 20 22  |ptr<>13 .put(" "|
00013240  29 0d 7c 10 07 20 20 cd  0d 7c 1a 16 20 20 20 20  |).|..  ..|..    |
00013250  62 79 74 65 31 3d 3f 6c  69 73 74 70 74 72 0d 7c  |byte1=?listptr.||
00013260  24 05 ce 0d 7c 2e 1c e7  20 66 6f 75 6e 64 5f 65  |$...|... found_e|
00013270  6e 64 20 f2 70 75 74 28  bd 31 33 2b bd 30 29 0d  |nd .put(.13+.0).|
00013280  7c 38 2b 74 65 78 74 5f  65 6e 64 25 3d 73 74 6f  ||8+text_end%=sto|
00013290  72 65 2d 31 3a 74 65 78  74 5f 70 74 72 25 3d 74  |re-1:text_ptr%=t|
000132a0  65 78 74 5f 62 6c 6f 63  6b 25 0d 7c 42 31 e7 20  |ext_block%.|B1. |
000132b0  74 65 78 74 5f 65 6e 64  25 3c 74 65 78 74 5f 62  |text_end%<text_b|
000132c0  6c 6f 63 6b 25 20 74 65  78 74 5f 65 6e 64 25 3d  |lock% text_end%=|
000132d0  74 65 78 74 5f 62 6c 6f  63 6b 25 0d 7c 4c 33 70  |text_block%.|L3p|
000132e0  72 67 65 6e 64 3d 6c 69  73 74 70 74 72 3a f4 20  |rgend=listptr:. |
000132f0  45 6e 64 20 61 64 64 72  65 73 73 20 6f 66 20 70  |End address of p|
00013300  72 6f 67 72 61 6d 20 73  65 63 74 69 6f 6e 0d 7c  |rogram section.||
00013310  56 1b 6c 61 73 74 5f 72  6f 77 25 3d a4 66 69 6e  |V.last_row%=.fin|
00013320  64 5f 6c 61 73 74 72 6f  77 0d 7c 60 04 0d 7c 6a  |d_lastrow.|`..|j|
00013330  16 e3 20 52 25 3d 30 20  b8 20 6c 61 73 74 5f 72  |.. R%=0 . last_r|
00013340  6f 77 25 0d 7c 74 1f 74  65 78 74 5f 72 6f 77 6c  |ow%.|t.text_rowl|
00013350  65 6e 25 28 52 25 29 3d  a9 20 a4 72 6f 77 28 52  |en%(R%)=. .row(R|
00013360  25 29 0d 7c 7e 05 ed 0d  7c 88 04 0d 7c 92 16 c8  |%).|~...|...|...|
00013370  99 20 22 48 6f 75 72 67  6c 61 73 73 5f 4f 66 66  |. "Hourglass_Off|
00013380  22 0d 7c 9c 05 e1 0d 7c  a6 04 0d 7c b0 11 dd 20  |".|....|...|... |
00013390  f2 70 75 74 28 74 65 78  74 24 29 0d 7c ba 08 ea  |.put(text$).|...|
000133a0  20 49 25 0d 7c c4 0f e7  20 ac 20 70 72 69 6e 74  | I%.|... . print|
000133b0  20 8c 0d 7c ce 11 e7 20  74 65 78 74 24 3c 3e 22  | ..|... text$<>"|
000133c0  22 20 8c 0d 7c d8 10 24  73 74 6f 72 65 3d 74 65  |" ..|..$store=te|
000133d0  78 74 24 0d 7c e2 12 73  74 6f 72 65 2b 3d a9 20  |xt$.|..store+=. |
000133e0  74 65 78 74 24 0d 7c ec  05 cd 0d 7c f6 05 cc 0d  |text$.|....|....|
000133f0  7d 00 0b 2a 46 58 33 2c  31 30 0d 7d 0a 0b f1 74  |}..*FX3,10.}...t|
00013400  65 78 74 24 3b 0d 7d 14  0a 2a 46 58 33 2c 30 0d  |ext$;.}..*FX3,0.|
00013410  7d 1e 05 cd 0d 7d 28 05  e1 0d 7d 32 04 0d 7d 3c  |}....}(...}2..}<|
00013420  17 dd 20 f2 6c 69 73 74  5f 76 6f 63 61 62 28 76  |.. .list_vocab(v|
00013430  6f 63 25 29 0d 7d 46 15  c8 99 20 22 48 6f 75 72  |oc%).}F... "Hour|
00013440  67 6c 61 73 73 5f 4f 6e  22 0d 7d 50 1d 70 72 69  |glass_On".}P.pri|
00013450  6e 74 3d a3 3a 73 74 6f  72 65 3d 74 65 78 74 5f  |nt=.:store=text_|
00013460  62 6c 6f 63 6b 25 0d 7d  5a 30 f2 66 69 6c 6c 28  |block%.}Z0.fill(|
00013470  74 65 78 74 5f 62 6c 6f  63 6b 25 2c 74 65 78 74  |text_block%,text|
00013480  5f 62 6c 6f 63 6b 73 69  7a 65 25 2c 64 75 6d 6d  |_blocksize%,dumm|
00013490  79 5f 73 70 63 29 0d 7d  64 11 63 6f 6c 25 3d 31  |y_spc).}d.col%=1|
000134a0  3a 72 6f 77 25 3d 30 0d  7d 6e 04 0d 7d 78 0d c8  |:row%=0.}n..}x..|
000134b0  8e 20 76 6f 63 25 20 ca  0d 7d 82 13 c9 20 31 3a  |. voc% ..}... 1:|
000134c0  20 f2 6c 69 73 74 6e 6f  75 6e 73 0d 7d 8c 13 c9  | .listnouns.}...|
000134d0  20 32 3a 20 f2 6c 69 73  74 76 65 72 62 73 0d 7d  | 2: .listverbs.}|
000134e0  96 12 c9 20 33 3a 20 f2  6c 69 73 74 61 64 6a 73  |... 3: .listadjs|
000134f0  0d 7d a0 13 c9 20 34 3a  20 f2 6c 69 73 74 70 72  |.}... 4: .listpr|
00013500  65 70 73 0d 7d aa 13 c9  20 35 3a 20 f2 6c 69 73  |eps.}... 5: .lis|
00013510  74 63 6f 6e 6a 73 0d 7d  b4 13 c9 20 36 3a 20 f2  |tconjs.}... 6: .|
00013520  6c 69 73 74 73 70 65 63  73 0d 7d be 13 c9 20 37  |listspecs.}... 7|
00013530  3a 20 f2 6c 69 73 74 6e  6f 69 73 65 0d 7d c8 05  |: .listnoise.}..|
00013540  cb 0d 7d d2 04 0d 7d dc  2b 74 65 78 74 5f 65 6e  |..}...}.+text_en|
00013550  64 25 3d 73 74 6f 72 65  2d 31 3a 74 65 78 74 5f  |d%=store-1:text_|
00013560  70 74 72 25 3d 74 65 78  74 5f 62 6c 6f 63 6b 25  |ptr%=text_block%|
00013570  0d 7d e6 31 e7 20 74 65  78 74 5f 65 6e 64 25 3c  |.}.1. text_end%<|
00013580  74 65 78 74 5f 62 6c 6f  63 6b 25 20 74 65 78 74  |text_block% text|
00013590  5f 65 6e 64 25 3d 74 65  78 74 5f 62 6c 6f 63 6b  |_end%=text_block|
000135a0  25 0d 7d f0 1b 6c 61 73  74 5f 72 6f 77 25 3d a4  |%.}..last_row%=.|
000135b0  66 69 6e 64 5f 6c 61 73  74 72 6f 77 0d 7d fa 16  |find_lastrow.}..|
000135c0  e3 20 52 25 3d 30 20 b8  20 6c 61 73 74 5f 72 6f  |. R%=0 . last_ro|
000135d0  77 25 0d 7e 04 21 20 20  74 65 78 74 5f 72 6f 77  |w%.~.!  text_row|
000135e0  6c 65 6e 25 28 52 25 29  3d a9 20 a4 72 6f 77 28  |len%(R%)=. .row(|
000135f0  52 25 29 0d 7e 0e 05 ed  0d 7e 18 16 c8 99 20 22  |R%).~....~.... "|
00013600  48 6f 75 72 67 6c 61 73  73 5f 4f 66 66 22 0d 7e  |Hourglass_Off".~|
00013610  22 05 e1 0d 7e 2c 04 0d  7e 36 0f dd 20 f2 6c 69  |"...~,..~6.. .li|
00013620  73 74 5f 70 69 78 0d 7e  40 0a ea 20 6d 70 74 72  |st_pix.~@.. mptr|
00013630  0d 7e 4a 15 c8 99 20 22  48 6f 75 72 67 6c 61 73  |.~J... "Hourglas|
00013640  73 5f 4f 6e 22 0d 7e 54  1d 70 72 69 6e 74 3d a3  |s_On".~T.print=.|
00013650  3a 73 74 6f 72 65 3d 74  65 78 74 5f 62 6c 6f 63  |:store=text_bloc|
00013660  6b 25 0d 7e 5e 30 f2 66  69 6c 6c 28 74 65 78 74  |k%.~^0.fill(text|
00013670  5f 62 6c 6f 63 6b 25 2c  74 65 78 74 5f 62 6c 6f  |_block%,text_blo|
00013680  63 6b 73 69 7a 65 25 2c  64 75 6d 6d 79 5f 73 70  |cksize%,dummy_sp|
00013690  63 29 0d 7e 68 11 63 6f  6c 25 3d 31 3a 72 6f 77  |c).~h.col%=1:row|
000136a0  25 3d 30 0d 7e 72 04 0d  7e 7c 0d e7 20 70 78 6e  |%=0.~r..~|.. pxn|
000136b0  3e 31 20 8c 0d 7e 86 0f  6d 70 74 72 3d 70 69 78  |>1 ..~..mptr=pix|
000136c0  73 2b 33 0d 7e 90 12 e3  20 49 25 3d 31 20 b8 20  |s+3.~... I%=1 . |
000136d0  70 78 6e 2d 31 0d 7e 9a  16 20 20 f2 70 75 74 28  |pxn-1.~..  .put(|
000136e0  c3 28 49 25 29 2b 22 3d  20 22 29 0d 7e a4 11 20  |.(I%)+"= ").~.. |
000136f0  20 f2 70 75 74 28 24 6d  70 74 72 29 0d 7e ae 14  | .put($mptr).~..|
00013700  20 20 6d 70 74 72 2b 3d  a9 24 6d 70 74 72 2b 31  |  mptr+=.$mptr+1|
00013710  0d 7e b8 24 20 20 f2 70  75 74 28 22 2c 3c 22 2b  |.~.$  .put(",<"+|
00013720  70 6f 73 24 28 3f 6d 70  74 72 29 2b 22 3e 22 2b  |pos$(?mptr)+">"+|
00013730  bd 31 33 29 0d 7e c2 0d  20 20 6d 70 74 72 2b 3d  |.13).~..  mptr+=|
00013740  35 0d 7e cc 05 ed 0d 7e  d6 0c f2 70 75 74 28 bd  |5.~....~...put(.|
00013750  30 29 0d 7e e0 05 cd 0d  7e ea 04 0d 7e f4 2b 74  |0).~....~...~.+t|
00013760  65 78 74 5f 65 6e 64 25  3d 73 74 6f 72 65 2d 31  |ext_end%=store-1|
00013770  3a 74 65 78 74 5f 70 74  72 25 3d 74 65 78 74 5f  |:text_ptr%=text_|
00013780  62 6c 6f 63 6b 25 0d 7e  fe 31 e7 20 74 65 78 74  |block%.~.1. text|
00013790  5f 65 6e 64 25 3c 74 65  78 74 5f 62 6c 6f 63 6b  |_end%<text_block|
000137a0  25 20 74 65 78 74 5f 65  6e 64 25 3d 74 65 78 74  |% text_end%=text|
000137b0  5f 62 6c 6f 63 6b 25 0d  7f 08 1b 6c 61 73 74 5f  |_block%....last_|
000137c0  72 6f 77 25 3d a4 66 69  6e 64 5f 6c 61 73 74 72  |row%=.find_lastr|
000137d0  6f 77 0d 7f 12 04 0d 7f  1c 16 e3 20 52 25 3d 30  |ow......... R%=0|
000137e0  20 b8 20 6c 61 73 74 5f  72 6f 77 25 0d 7f 26 1f  | . last_row%..&.|
000137f0  74 65 78 74 5f 72 6f 77  6c 65 6e 25 28 52 25 29  |text_rowlen%(R%)|
00013800  3d a9 20 a4 72 6f 77 28  52 25 29 0d 7f 30 05 ed  |=. .row(R%)..0..|
00013810  0d 7f 3a 04 0d 7f 44 16  c8 99 20 22 48 6f 75 72  |..:...D... "Hour|
00013820  67 6c 61 73 73 5f 4f 66  66 22 0d 7f 4e 05 e1 0d  |glass_Off"..N...|
00013830  7f 58 04 0d 7f 62 1e dd  20 a4 74 6f 6b 65 6e 5f  |.X...b.. .token_|
00013840  74 6f 5f 6b 65 79 77 6f  72 64 28 74 6f 6b 65 6e  |to_keyword(token|
00013850  29 0d 7f 6c 2b 3d 6b 65  79 77 6f 72 64 24 28 69  |)..l+=keyword$(i|
00013860  6e 66 6f 25 28 74 6f 6b  65 6e 2d 66 69 72 73 74  |nfo%(token-first|
00013870  5f 74 6f 6b 65 6e 2b 31  2c 32 29 29 0d 7f 76 04  |_token+1,2))..v.|
00013880  0d 7f 80 0a dd 20 f2 6e  65 77 0d 7f 8a 33 6f 62  |..... .new...3ob|
00013890  6e 3d 31 3a 76 62 6e 3d  31 3a 61 64 6e 3d 31 3a  |n=1:vbn=1:adn=1:|
000138a0  70 72 6e 3d 31 3a 63 6a  6e 3d 31 3a 73 70 6e 3d  |prn=1:cjn=1:spn=|
000138b0  31 3a 6e 73 6e 3d 31 3a  70 78 6e 3d 31 0d 7f 94  |1:nsn=1:pxn=1...|
000138c0  48 6e 78 74 6f 62 6a 3d  6e 6f 75 6e 73 3a 3f 6e  |Hnxtobj=nouns:?n|
000138d0  78 74 6f 62 6a 3d 6f 62  6e 3a 6e 78 74 6f 62 6a  |xtobj=obn:nxtobj|
000138e0  3f 31 3d 33 3a 6e 78 74  6f 62 6a 3f 32 3d 30 3a  |?1=3:nxtobj?2=0:|
000138f0  6e 78 74 6f 62 6a 2b 3d  33 3a 3f 6e 78 74 6f 62  |nxtobj+=3:?nxtob|
00013900  6a 3d 26 46 46 0d 7f 9e  48 6e 78 74 76 72 62 3d  |j=&FF...Hnxtvrb=|
00013910  76 65 72 62 73 3a 3f 6e  78 74 76 72 62 3d 76 62  |verbs:?nxtvrb=vb|
00013920  6e 3a 6e 78 74 76 72 62  3f 31 3d 33 3a 6e 78 74  |n:nxtvrb?1=3:nxt|
00013930  76 72 62 3f 32 3d 30 3a  6e 78 74 76 72 62 2b 3d  |vrb?2=0:nxtvrb+=|
00013940  33 3a 3f 6e 78 74 76 72  62 3d 26 46 46 0d 7f a8  |3:?nxtvrb=&FF...|
00013950  4a 6e 78 74 61 64 6a 3d  61 64 6a 65 63 74 73 3a  |Jnxtadj=adjects:|
00013960  3f 6e 78 74 61 64 6a 3d  61 64 6e 3a 6e 78 74 61  |?nxtadj=adn:nxta|
00013970  64 6a 3f 31 3d 33 3a 6e  78 74 61 64 6a 3f 32 3d  |dj?1=3:nxtadj?2=|
00013980  30 3a 6e 78 74 61 64 6a  2b 3d 33 3a 3f 6e 78 74  |0:nxtadj+=3:?nxt|
00013990  61 64 6a 3d 26 46 46 0d  7f b2 48 6e 78 74 70 72  |adj=&FF...Hnxtpr|
000139a0  70 3d 70 72 65 70 73 3a  3f 6e 78 74 70 72 70 3d  |p=preps:?nxtprp=|
000139b0  70 72 6e 3a 6e 78 74 70  72 70 3f 31 3d 33 3a 6e  |prn:nxtprp?1=3:n|
000139c0  78 74 70 72 70 3f 32 3d  30 3a 6e 78 74 70 72 70  |xtprp?2=0:nxtprp|
000139d0  2b 3d 33 3a 3f 6e 78 74  70 72 70 3d 26 46 46 0d  |+=3:?nxtprp=&FF.|
000139e0  7f bc 48 6e 78 74 63 6a  6e 3d 63 6f 6e 6a 73 3a  |..Hnxtcjn=conjs:|
000139f0  3f 6e 78 74 63 6a 6e 3d  63 6a 6e 3a 6e 78 74 63  |?nxtcjn=cjn:nxtc|
00013a00  6a 6e 3f 31 3d 33 3a 6e  78 74 63 6a 6e 3f 32 3d  |jn?1=3:nxtcjn?2=|
00013a10  30 3a 6e 78 74 63 6a 6e  2b 3d 33 3a 3f 6e 78 74  |0:nxtcjn+=3:?nxt|
00013a20  63 6a 6e 3d 26 46 46 0d  7f c6 48 6e 78 74 73 70  |cjn=&FF...Hnxtsp|
00013a30  6e 3d 73 70 65 63 73 3a  3f 6e 78 74 73 70 6e 3d  |n=specs:?nxtspn=|
00013a40  73 70 6e 3a 6e 78 74 73  70 6e 3f 31 3d 33 3a 6e  |spn:nxtspn?1=3:n|
00013a50  78 74 73 70 6e 3f 32 3d  30 3a 6e 78 74 73 70 6e  |xtspn?2=0:nxtspn|
00013a60  2b 3d 33 3a 3f 6e 78 74  73 70 6e 3d 26 46 46 0d  |+=3:?nxtspn=&FF.|
00013a70  7f d0 48 6e 78 74 6e 73  6e 3d 6e 6f 69 73 65 3a  |..Hnxtnsn=noise:|
00013a80  3f 6e 78 74 6e 73 6e 3d  6e 73 6e 3a 6e 78 74 6e  |?nxtnsn=nsn:nxtn|
00013a90  73 6e 3f 31 3d 33 3a 6e  78 74 6e 73 6e 3f 32 3d  |sn?1=3:nxtnsn?2=|
00013aa0  30 3a 6e 78 74 6e 73 6e  2b 3d 33 3a 3f 6e 78 74  |0:nxtnsn+=3:?nxt|
00013ab0  6e 73 6e 3d 26 46 46 0d  7f da 47 6e 78 74 70 78  |nsn=&FF...Gnxtpx|
00013ac0  6e 3d 70 69 78 73 3a 3f  6e 78 74 70 78 6e 3d 70  |n=pixs:?nxtpxn=p|
00013ad0  78 6e 3a 6e 78 74 70 78  6e 3f 31 3d 33 3a 6e 78  |xn:nxtpxn?1=3:nx|
00013ae0  74 70 78 6e 3f 32 3d 30  3a 6e 78 74 70 78 6e 2b  |tpxn?2=0:nxtpxn+|
00013af0  3d 33 3a 3f 6e 78 74 70  78 6e 3d 26 46 46 0d 7f  |=3:?nxtpxn=&FF..|
00013b00  e4 25 21 61 72 65 66 3d  34 3a 61 72 65 66 3f 34  |.%!aref=4:aref?4|
00013b10  3d 30 3a 21 6e 72 65 66  3d 34 3a 6e 72 65 66 3f  |=0:!nref=4:nref?|
00013b20  34 3d 30 0d 7f ee 11 70  72 65 76 5f 66 69 6c 65  |4=0....prev_file|
00013b30  24 3d 22 22 0d 7f f8 05  e1 0d 80 02 04 0d 80 0c  |$=""............|
00013b40  0b dd 20 f2 6c 76 61 72  0d 80 16 12 76 61 72 73  |.. .lvar....vars|
00013b50  3d 77 6f 72 6b 25 2b 26  38 38 0d 80 20 1b e3 20  |=work%+&88.. .. |
00013b60  49 25 3d 31 20 b8 20 32  2a 6e 75 6d 5f 76 61 72  |I%=1 . 2*num_var|
00013b70  73 20 88 20 38 0d 80 2a  37 f1 8a 38 29 bd 28 49  |s . 8..*7..8).(I|
00013b80  25 20 81 20 32 20 2b 97  22 41 22 29 3b 22 25 20  |% . 2 +."A");"% |
00013b90  3d 20 22 3b 76 61 72 73  3f 28 49 25 2d 31 29 2b  |= ";vars?(I%-1)+|
00013ba0  76 61 72 73 3f 49 25 2a  32 35 36 3b 0d 80 34 3c  |vars?I%*256;..4<|
00013bb0  f1 8a 32 34 29 bd 28 49  25 20 81 20 32 20 2b 97  |..24).(I% . 2 +.|
00013bc0  22 42 22 29 3b 22 25 20  3d 20 22 3b 76 61 72 73  |"B");"% = ";vars|
00013bd0  3f 28 49 25 2b 31 29 2b  76 61 72 73 3f 28 49 25  |?(I%+1)+vars?(I%|
00013be0  2b 32 29 2a 32 35 36 3b  0d 80 3e 3c f1 8a 34 30  |+2)*256;..><..40|
00013bf0  29 bd 28 49 25 20 81 20  32 20 2b 97 22 43 22 29  |).(I% . 2 +."C")|
00013c00  3b 22 25 20 3d 20 22 3b  76 61 72 73 3f 28 49 25  |;"% = ";vars?(I%|
00013c10  2b 33 29 2b 76 61 72 73  3f 28 49 25 2b 34 29 2a  |+3)+vars?(I%+4)*|
00013c20  32 35 36 3b 0d 80 48 3b  f1 8a 35 36 29 bd 28 49  |256;..H;..56).(I|
00013c30  25 20 81 20 32 20 2b 97  22 44 22 29 3b 22 25 20  |% . 2 +."D");"% |
00013c40  3d 20 22 3b 76 61 72 73  3f 28 49 25 2b 35 29 2b  |= ";vars?(I%+5)+|
00013c50  76 61 72 73 3f 28 49 25  2b 36 29 2a 32 35 36 0d  |vars?(I%+6)*256.|
00013c60  80 52 05 ed 0d 80 5c 05  e1 0d 80 66 04 0d 80 70  |.R....\....f...p|
00013c70  0c dd 20 f2 6c 69 73 74  6f 0d 80 7a 12 ea 20 62  |.. .listo..z.. b|
00013c80  69 74 6d 61 73 6b 24 2c  6f 70 24 0d 80 84 0f c8  |itmask$,op$.....|
00013c90  8e 20 69 74 65 6d 31 25  20 ca 0d 80 8e 29 c9 20  |. item1% ....). |
00013ca0  30 3a 20 62 69 74 6d 61  73 6b 24 3d 22 25 31 31  |0: bitmask$="%11|
00013cb0  31 31 31 31 30 31 22 3a  6f 70 24 3d 22 20 41 4e  |111101":op$=" AN|
00013cc0  44 20 22 0d 80 98 28 c9  20 31 3a 20 62 69 74 6d  |D "...(. 1: bitm|
00013cd0  61 73 6b 24 3d 22 25 30  30 30 30 30 30 31 30 22  |ask$="%00000010"|
00013ce0  3a 6f 70 24 3d 22 20 4f  52 20 22 0d 80 a2 29 c9  |:op$=" OR "...).|
00013cf0  20 32 3a 20 62 69 74 6d  61 73 6b 24 3d 22 25 31  | 2: bitmask$="%1|
00013d00  31 31 31 31 30 31 31 22  3a 6f 70 24 3d 22 20 41  |1111011":op$=" A|
00013d10  4e 44 20 22 0d 80 ac 28  c9 20 33 3a 20 62 69 74  |ND "...(. 3: bit|
00013d20  6d 61 73 6b 24 3d 22 25  30 30 30 30 30 31 30 30  |mask$="%00000100|
00013d30  22 3a 6f 70 24 3d 22 20  4f 52 20 22 0d 80 b6 05  |":op$=" OR "....|
00013d40  cb 0d 80 c0 2a 6c 69 73  74 6f 70 74 69 6f 6e 3d  |....*listoption=|
00013d50  a0 28 c3 6c 69 73 74 6f  70 74 69 6f 6e 2b 6f 70  |.(.listoption+op|
00013d60  24 2b 62 69 74 6d 61 73  6b 24 29 0d 80 ca 05 e1  |$+bitmask$).....|
00013d70  0d 80 d4 04 0d 80 de 0d  dd 20 f2 73 74 61 74 75  |......... .statu|
00013d80  73 0d 80 e8 46 f1 8a 31  29 3b 22 55 73 65 72 20  |s...F..1);"User |
00013d90  63 6f 64 65 20 61 64 64  72 65 73 73 20 3d 20 26  |code address = &|
00013da0  22 3b 7e 75 73 65 72 63  6f 64 65 25 3b 22 20 28  |";~usercode%;" (|
00013db0  22 3b 75 73 65 72 63 6f  64 65 25 3b 22 20 64 65  |";usercode%;" de|
00013dc0  63 69 6d 61 6c 29 22 0d  80 f2 4e f1 8a 31 29 3b  |cimal)"...N..1);|
00013dd0  22 50 72 6f 67 72 61 6d  20 62 79 74 65 73 3a 20  |"Program bytes: |
00013de0  22 3b 8a 32 31 29 3b a4  70 72 67 6c 65 6e 3b 8a  |";.21);.prglen;.|
00013df0  32 38 29 3b 63 6f 64 65  5f 73 69 7a 65 25 2d a4  |28);code_size%-.|
00013e00  70 72 67 6c 65 6e 3b 22  20 62 79 74 65 73 20 66  |prglen;" bytes f|
00013e10  72 65 65 2e 22 0d 80 fc  83 f1 8a 31 29 22 4d 65  |ree."......1)"Me|
00013e20  73 73 61 67 65 73 20 64  65 66 69 6e 65 64 3a 20  |ssages defined: |
00013e30  22 8a 32 31 29 3b a4 6d  61 78 6d 73 67 3b 8a 32  |".21);.maxmsg;.2|
00013e40  38 29 3b 28 a4 74 65 78  74 5f 65 6e 64 2d 74 65  |8);(.text_end-te|
00013e50  78 74 25 29 3b 22 20 63  68 61 72 61 63 74 65 72  |xt%);" character|
00013e60  73 20 75 73 65 64 2e 20  22 3b 6d 61 78 74 65 78  |s used. ";maxtex|
00013e70  74 25 2d 28 a4 74 65 78  74 5f 65 6e 64 2d 74 65  |t%-(.text_end-te|
00013e80  78 74 25 29 3b 22 20 63  68 61 72 61 63 74 65 72  |xt%);" character|
00013e90  73 20 66 72 65 65 2e 22  0d 81 06 55 f1 8a 31 29  |s free."...U..1)|
00013ea0  22 56 65 72 62 73 20 64  65 66 69 6e 65 64 3a 20  |"Verbs defined: |
00013eb0  22 8a 32 31 29 3b 76 62  6e 2d 31 3b 8a 32 38 29  |".21);vbn-1;.28)|
00013ec0  3b 76 65 72 62 5f 73 69  7a 65 2d 28 6e 78 74 76  |;verb_size-(nxtv|
00013ed0  72 62 2d 76 65 72 62 73  29 3b 22 20 63 68 61 72  |rb-verbs);" char|
00013ee0  61 63 74 65 72 73 20 66  72 65 65 2e 22 0d 81 10  |acters free."...|
00013ef0  55 f1 8a 31 29 22 4e 6f  75 6e 73 20 64 65 66 69  |U..1)"Nouns defi|
00013f00  6e 65 64 3a 20 22 8a 32  31 29 3b 6f 62 6e 2d 31  |ned: ".21);obn-1|
00013f10  3b 8a 32 38 29 3b 6e 6f  75 6e 5f 73 69 7a 65 2d  |;.28);noun_size-|
00013f20  28 6e 78 74 6f 62 6a 2d  6e 6f 75 6e 73 29 3b 22  |(nxtobj-nouns);"|
00013f30  20 63 68 61 72 61 63 74  65 72 73 20 66 72 65 65  | characters free|
00013f40  2e 22 0d 81 1a 5c f1 8a  31 29 22 41 64 6a 65 63  |."...\..1)"Adjec|
00013f50  74 69 76 65 73 20 64 65  66 69 6e 65 64 3a 20 22  |tives defined: "|
00013f60  8a 32 31 29 3b 61 64 6e  2d 31 3b 8a 32 38 29 3b  |.21);adn-1;.28);|
00013f70  61 64 6a 63 5f 73 69 7a  65 2d 28 6e 78 74 61 64  |adjc_size-(nxtad|
00013f80  6a 2d 61 64 6a 65 63 74  73 29 3b 22 20 63 68 61  |j-adjects);" cha|
00013f90  72 61 63 74 65 72 73 20  66 72 65 65 2e 22 0d 81  |racters free."..|
00013fa0  24 5a f1 8a 31 29 22 4f  62 6a 65 63 74 73 20 64  |$Z..1)"Objects d|
00013fb0  65 66 69 6e 65 64 3a 20  22 8a 32 31 29 3b 6c 61  |efined: ".21);la|
00013fc0  73 74 5f 6f 62 6a 65 63  74 3b 8a 32 38 29 3b 6d  |st_object;.28);m|
00013fd0  61 78 6f 62 73 2d 6c 61  73 74 5f 6f 62 6a 65 63  |axobs-last_objec|
00013fe0  74 22 20 6f 62 6a 65 63  74 28 73 29 20 72 65 6d  |t" object(s) rem|
00013ff0  61 69 6e 69 6e 67 2e 22  0d 81 2e 52 f1 8a 31 29  |aining."...R..1)|
00014000  22 52 6f 6f 6d 73 20 64  65 66 69 6e 65 64 3a 20  |"Rooms defined: |
00014010  22 8a 32 31 29 3b 6c 61  73 74 5f 72 6f 6f 6d 3b  |".21);last_room;|
00014020  8a 32 38 29 3b 6d 61 78  72 6d 73 2d 6c 61 73 74  |.28);maxrms-last|
00014030  5f 72 6f 6f 6d 22 20 72  6f 6f 6d 28 73 29 20 72  |_room" room(s) r|
00014040  65 6d 61 69 6e 69 6e 67  2e 22 0d 81 38 70 f1 8a  |emaining."..8p..|
00014050  31 29 22 53 63 72 65 65  6e 20 6d 6f 64 65 3a 20  |1)"Screen mode: |
00014060  22 3b 6d 6f 64 65 25 3b  22 2c 20 46 69 6c 65 3a  |";mode%;", File:|
00014070  20 22 bd 33 34 2b 6c 6f  61 64 65 64 24 2b bd 33  | ".34+loaded$+.3|
00014080  34 22 2c 20 44 61 74 61  3a 20 22 3b 3a f2 63 6f  |4", Data: ";:.co|
00014090  6c 28 31 31 29 3a e7 20  64 61 74 61 5f 73 61 76  |l(11):. data_sav|
000140a0  65 64 20 f1 22 53 61 76  65 64 22 20 8b 20 f1 22  |ed ."Saved" . ."|
000140b0  4e 4f 54 20 53 61 76 65  64 22 0d 81 42 05 e1 0d  |NOT Saved"..B...|
000140c0  81 4c 04 0d 81 56 04 0d  81 60 2b f4 20 2d 2d 2d  |.L...V...`+. ---|
000140d0  2d 2d 2d 20 56 61 72 69  6f 75 73 20 44 69 73 6b  |--- Various Disk|
000140e0  20 4f 70 65 72 61 74 69  6f 6e 73 20 2d 2d 2d 2d  | Operations ----|
000140f0  2d 2d 0d 81 6a 04 0d 81  74 1e dd 20 f2 63 72 65  |--..j...t.. .cre|
00014100  61 74 65 5f 64 69 72 73  28 61 70 70 24 2c 72 6f  |ate_dirs(app$,ro|
00014110  6f 74 24 29 0d 81 7e 1a  ea 20 74 24 2c 6c 24 2c  |ot$)..~.. t$,l$,|
00014120  72 24 2c 49 25 2c 72 64  24 2c 6f 75 74 25 0d 81  |r$,I%,rd$,out%..|
00014130  88 15 c8 99 20 22 48 6f  75 72 67 6c 61 73 73 5f  |.... "Hourglass_|
00014140  4f 6e 22 0d 81 92 21 e7  20 c2 72 6f 6f 74 24 2c  |On"...!. .root$,|
00014150  31 29 3c 3e 22 2e 22 20  8c 20 72 6f 6f 74 24 2b  |1)<>"." . root$+|
00014160  3d 22 2e 22 0d 81 9c 17  74 24 3d 72 6f 6f 74 24  |="."....t$=root$|
00014170  3a 6c 24 3d 22 22 3a 49  25 3d 30 0d 81 a6 13 20  |:l$="":I%=0.... |
00014180  c8 95 20 a7 74 24 2c 22  2e 22 29 3c 3e 30 0d 81  |.. .t$,".")<>0..|
00014190  b0 18 20 20 72 24 3d c0  74 24 2c a7 74 24 2c 22  |..  r$=.t$,.t$,"|
000141a0  2e 22 29 2d 31 29 0d 81  ba 21 20 20 e7 20 49 25  |.")-1)...!  . I%|
000141b0  3e 30 20 6c 24 3d 6c 24  2b 22 2e 22 2b 72 24 20  |>0 l$=l$+"."+r$ |
000141c0  8b 20 6c 24 3d 72 24 0d  81 c4 0b 20 20 49 25 2b  |. l$=r$....  I%+|
000141d0  3d 31 0d 81 ce 13 20 20  ff 28 22 43 44 49 52 20  |=1....  .("CDIR |
000141e0  22 2b 6c 24 29 0d 81 d8  18 20 20 74 24 3d c1 74  |"+l$)....  t$=.t|
000141f0  24 2c a7 74 24 2c 22 2e  22 29 2b 31 29 0d 81 e2  |$,.t$,".")+1)...|
00014200  06 20 ce 0d 81 ec 25 20  20 e7 20 c0 61 70 70 24  |. ....%  . .app$|
00014210  2c 31 29 3c 3e 22 21 22  20 8c 20 61 70 70 24 3d  |,1)<>"!" . app$=|
00014220  22 21 22 2b 61 70 70 24  0d 81 f6 14 20 20 61 70  |"!"+app$....  ap|
00014230  70 24 3d c0 61 70 70 24  2c 31 30 29 0d 82 00 30  |p$=.app$,10)...0|
00014240  20 20 72 61 24 3d 72 6f  6f 74 24 2b 61 70 70 24  |  ra$=root$+app$|
00014250  3a f4 20 70 61 74 68 20  74 6f 20 75 73 65 72 73  |:. path to users|
00014260  20 27 41 6c 70 73 27 20  66 69 6c 65 0d 82 0a 14  | 'Alps' file....|
00014270  20 20 ff 28 22 43 44 49  52 20 22 2b 72 61 24 29  |  .("CDIR "+ra$)|
00014280  0d 82 14 1c 20 20 ff 28  22 43 44 49 52 20 22 2b  |....  .("CDIR "+|
00014290  72 61 24 2b 22 2e 41 4c  50 53 22 29 0d 82 1e 20  |ra$+".ALPS")... |
000142a0  20 20 ff 28 22 43 44 49  52 20 22 2b 72 61 24 2b  |  .("CDIR "+ra$+|
000142b0  22 2e 50 49 43 54 55 52  45 53 22 29 0d 82 28 21  |".PICTURES")..(!|
000142c0  20 20 ff 28 22 43 44 49  52 20 22 2b 72 61 24 2b  |  .("CDIR "+ra$+|
000142d0  22 2e 52 65 73 6f 75 72  63 65 73 22 29 0d 82 32  |".Resources")..2|
000142e0  30 20 20 72 64 24 3d 72  61 24 2b 22 2e 52 65 73  |0  rd$=ra$+".Res|
000142f0  6f 75 72 63 65 73 2e 22  3a f4 20 52 65 73 6f 75  |ources.":. Resou|
00014300  72 63 65 73 20 64 69 72  20 70 61 74 68 0d 82 3c  |rces dir path..<|
00014310  37 20 20 ff 20 22 53 41  56 45 20 22 2b 72 64 24  |7  . "SAVE "+rd$|
00014320  2b 22 70 62 79 74 65 73  20 22 2b c3 7e 70 62 79  |+"pbytes "+.~pby|
00014330  74 65 73 2b 22 2b 22 2b  c3 7e 70 62 79 74 65 5f  |tes+"+"+.~pbyte_|
00014340  73 69 7a 65 0d 82 46 3c  20 20 ff 28 22 53 41 56  |size..F<  .("SAV|
00014350  45 20 22 2b 72 64 24 2b  22 41 53 49 6f 62 6a 63  |E "+rd$+"ASIobjc|
00014360  6f 64 65 20 22 2b c3 7e  61 73 69 63 6f 64 65 25  |ode "+.~asicode%|
00014370  2b 22 2b 22 2b c3 7e 63  6f 64 65 73 69 7a 65 29  |+"+"+.~codesize)|
00014380  0d 82 50 34 20 20 ff 20  22 53 41 56 45 20 22 2b  |..P4  . "SAVE "+|
00014390  72 64 24 2b 22 62 75 74  74 6f 6e 73 20 22 2b c3  |rd$+"buttons "+.|
000143a0  7e 70 69 63 62 75 66 2b  22 2b 22 2b c3 7e 62 75  |~picbuf+"+"+.~bu|
000143b0  74 6c 65 6e 0d 82 5a 27  20 20 ff 20 22 53 45 54  |tlen..Z'  . "SET|
000143c0  54 59 50 45 20 22 2b 72  64 24 2b 22 62 75 74 74  |TYPE "+rd$+"butt|
000143d0  6f 6e 73 20 53 70 72 69  74 65 22 0d 82 64 24 20  |ons Sprite"..d$ |
000143e0  20 ff 20 22 53 45 54 54  59 50 45 20 22 2b 72 64  | . "SETTYPE "+rd|
000143f0  24 2b 22 70 62 79 74 65  73 20 44 61 74 61 22 0d  |$+"pbytes Data".|
00014400  82 6e 2c 20 20 ff 20 22  53 45 54 54 59 50 45 20  |.n,  . "SETTYPE |
00014410  22 2b 72 64 24 2b 22 41  53 49 6f 62 6a 63 6f 64  |"+rd$+"ASIobjcod|
00014420  65 20 41 62 73 6f 6c 75  74 65 22 0d 82 78 3f 20  |e Absolute"..x? |
00014430  20 ff 20 22 53 41 56 45  20 22 2b 72 61 24 2b 22  | . "SAVE "+ra$+"|
00014440  2e 21 52 75 6e 49 6d 61  67 65 20 22 2b c3 7e 28  |.!RunImage "+.~(|
00014450  70 69 63 62 75 66 2b 62  75 74 6c 65 6e 29 2b 22  |picbuf+butlen)+"|
00014460  2b 22 2b c3 7e 6c 64 6c  65 6e 0d 82 82 29 20 20  |+"+.~ldlen...)  |
00014470  ff 20 22 53 45 54 54 59  50 45 20 22 2b 72 61 24  |. "SETTYPE "+ra$|
00014480  2b 22 2e 21 52 75 6e 49  6d 61 67 65 20 42 41 53  |+".!RunImage BAS|
00014490  49 43 22 0d 82 8c 45 20  20 c8 99 20 22 4f 53 5f  |IC"...E  .. "OS_|
000144a0  53 70 72 69 74 65 4f 70  22 2c 32 35 36 2b 32 36  |SpriteOp",256+26|
000144b0  2c 73 70 72 6c 64 2c 22  21 61 6c 70 73 67 61 6d  |,sprld,"!alpsgam|
000144c0  65 73 22 2c 61 70 70 24  3a f4 20 52 65 6e 61 6d  |es",app$:. Renam|
000144d0  65 20 53 70 72 69 74 65  0d 82 96 3d 20 20 c8 99  |e Sprite...=  ..|
000144e0  20 22 4f 53 5f 53 70 72  69 74 65 4f 70 22 2c 32  | "OS_SpriteOp",2|
000144f0  35 36 2b 31 32 2c 73 70  72 6c 64 2c 72 61 24 2b  |56+12,sprld,ra$+|
00014500  22 2e 21 53 70 72 69 74  65 73 22 3a f4 20 53 61  |".!Sprites":. Sa|
00014510  76 65 20 69 74 0d 82 a0  19 20 20 6f 75 74 25 3d  |ve it....  out%=|
00014520  ae 28 72 61 24 2b 22 2e  21 52 75 6e 22 29 0d 82  |.(ra$+".!Run")..|
00014530  aa 1b 20 20 6f 75 74 32  25 3d ae 28 72 61 24 2b  |..  out2%=.(ra$+|
00014540  22 2e 21 42 6f 6f 74 22  29 0d 82 b4 29 20 20 d5  |".!Boot")...)  .|
00014550  23 6f 75 74 25 2c 22 7c  20 21 52 75 6e 20 66 69  |#out%,"| !Run fi|
00014560  6c 65 20 66 6f 72 20 41  4c 50 53 20 67 61 6d 65  |le for ALPS game|
00014570  73 22 0d 82 be 2b 20 20  d5 23 6f 75 74 32 25 2c  |s"...+  .#out2%,|
00014580  22 7c 20 21 42 6f 6f 74  20 66 69 6c 65 20 66 6f  |"| !Boot file fo|
00014590  72 20 41 4c 50 53 20 67  61 6d 65 73 22 0d 82 c8  |r ALPS games"...|
000145a0  10 20 20 d5 23 6f 75 74  25 2c 22 7c 22 0d 82 d2  |.  .#out%,"|"...|
000145b0  26 20 20 d5 23 6f 75 74  25 2c 22 53 45 54 20 41  |&  .#out%,"SET A|
000145c0  6c 70 73 24 4e 6f 4d 6f  75 73 65 49 6e 70 75 74  |lps$NoMouseInput|
000145d0  20 30 22 0d 82 dc 10 20  20 d5 23 6f 75 74 25 2c  | 0"....  .#out%,|
000145e0  22 7c 22 0d 82 e6 25 20  20 d5 23 6f 75 74 25 2c  |"|"...%  .#out%,|
000145f0  22 53 45 54 20 41 6c 70  73 24 53 68 6f 77 41 64  |"SET Alps$ShowAd|
00014600  64 72 65 73 73 20 30 22  0d 82 f0 10 20 20 d5 23  |dress 0"....  .#|
00014610  6f 75 74 25 2c 22 7c 22  0d 82 fa 11 20 20 d5 23  |out%,"|"....  .#|
00014620  6f 75 74 32 25 2c 22 7c  22 0d 83 04 2e 20 20 d5  |out2%,"|"....  .|
00014630  23 6f 75 74 25 2c 22 49  63 6f 6e 53 70 72 69 74  |#out%,"IconSprit|
00014640  65 73 20 3c 4f 62 65 79  24 44 69 72 3e 2e 21 53  |es <Obey$Dir>.!S|
00014650  70 72 69 74 65 73 22 0d  83 0e 2f 20 20 d5 23 6f  |prites".../  .#o|
00014660  75 74 32 25 2c 22 49 63  6f 6e 53 70 72 69 74 65  |ut2%,"IconSprite|
00014670  73 20 3c 4f 62 65 79 24  44 69 72 3e 2e 21 53 70  |s <Obey$Dir>.!Sp|
00014680  72 69 74 65 73 22 0d 83  18 2a 20 20 d5 23 6f 75  |rites"...*  .#ou|
00014690  74 25 2c 22 53 45 54 20  41 6c 70 73 47 61 6d 65  |t%,"SET AlpsGame|
000146a0  24 52 65 73 6f 75 72 63  65 73 20 22 2b 72 64 24  |$Resources "+rd$|
000146b0  0d 83 22 2d 20 20 d5 23  6f 75 74 25 2c 22 53 45  |.."-  .#out%,"SE|
000146c0  54 20 41 6c 70 73 47 61  6d 65 24 44 61 74 61 20  |T AlpsGame$Data |
000146d0  22 2b 72 61 24 2b 22 2e  41 6c 70 73 22 0d 83 2c  |"+ra$+".Alps"..,|
000146e0  32 20 20 d5 23 6f 75 74  25 2c 22 53 45 54 20 41  |2  .#out%,"SET A|
000146f0  6c 70 73 24 50 69 63 74  75 72 65 73 20 22 2b 72  |lps$Pictures "+r|
00014700  61 24 2b 22 2e 50 69 63  74 75 72 65 73 2e 22 0d  |a$+".Pictures.".|
00014710  83 36 2b 20 20 d5 23 6f  75 74 32 25 2c 22 53 45  |.6+  .#out2%,"SE|
00014720  54 20 41 6c 70 73 47 61  6d 65 24 52 65 73 6f 75  |T AlpsGame$Resou|
00014730  72 63 65 73 20 22 2b 72  64 24 0d 83 40 2e 20 20  |rces "+rd$..@.  |
00014740  d5 23 6f 75 74 32 25 2c  22 53 45 54 20 41 6c 70  |.#out2%,"SET Alp|
00014750  73 47 61 6d 65 24 44 61  74 61 20 22 2b 72 61 24  |sGame$Data "+ra$|
00014760  2b 22 2e 41 6c 70 73 22  0d 83 4a 33 20 20 d5 23  |+".Alps"..J3  .#|
00014770  6f 75 74 32 25 2c 22 53  45 54 20 41 6c 70 73 24  |out2%,"SET Alps$|
00014780  50 69 63 74 75 72 65 73  20 22 2b 72 61 24 2b 22  |Pictures "+ra$+"|
00014790  2e 50 69 63 74 75 72 65  73 2e 22 0d 83 54 27 20  |.Pictures."..T' |
000147a0  20 d5 23 6f 75 74 25 2c  22 52 75 6e 20 3c 4f 62  | .#out%,"Run <Ob|
000147b0  65 79 24 44 69 72 3e 2e  21 52 75 6e 49 6d 61 67  |ey$Dir>.!RunImag|
000147c0  65 22 0d 83 5e 14 20 20  d9 23 6f 75 74 25 3a d9  |e"..^.  .#out%:.|
000147d0  23 6f 75 74 32 25 0d 83  68 24 20 20 ff 20 22 2a  |#out2%..h$  . "*|
000147e0  53 45 54 54 59 50 45 20  22 2b 72 61 24 2b 22 2e  |SETTYPE "+ra$+".|
000147f0  21 52 75 6e 20 4f 62 65  79 22 0d 83 72 25 20 20  |!Run Obey"..r%  |
00014800  ff 20 22 2a 53 45 54 54  59 50 45 20 22 2b 72 61  |. "*SETTYPE "+ra|
00014810  24 2b 22 2e 21 42 6f 6f  74 20 4f 62 65 79 22 0d  |$+".!Boot Obey".|
00014820  83 7c 16 c8 99 20 22 48  6f 75 72 67 6c 61 73 73  |.|... "Hourglass|
00014830  5f 4f 66 66 22 0d 83 86  05 e1 0d 83 90 04 0d 83  |_Off"...........|
00014840  9a 16 dd 20 f2 6c 6f 61  64 5f 62 69 74 73 28 61  |... .load_bits(a|
00014850  70 70 24 29 0d 83 a4 45  f4 20 4c 6f 61 64 73 20  |pp$)...E. Loads |
00014860  27 62 75 74 74 6f 6e 73  27 20 73 70 72 69 74 65  |'buttons' sprite|
00014870  20 61 6e 64 20 27 4c 6f  61 64 65 72 27 20 70 72  | and 'Loader' pr|
00014880  6f 67 72 61 6d 20 69 6e  74 6f 20 70 69 63 74 75  |ogram into pictu|
00014890  72 65 20 62 75 66 66 65  72 0d 83 ae 48 f4 20 54  |re buffer...H. T|
000148a0  68 65 79 20 77 69 6c 6c  20 74 68 65 6e 20 62 65  |hey will then be|
000148b0  20 73 61 76 65 64 20 74  6f 20 74 68 65 20 75 73  | saved to the us|
000148c0  65 72 27 73 20 64 61 74  61 20 64 69 73 6b 20 62  |er's data disk b|
000148d0  79 20 50 52 4f 43 63 72  65 61 74 65 5f 64 69 72  |y PROCcreate_dir|
000148e0  73 0d 83 b8 23 e7 20 c0  61 70 70 24 2c 31 29 3c  |s...#. .app$,1)<|
000148f0  3e 22 21 22 20 8c 20 61  70 70 24 3d 22 21 22 2b  |>"!" . app$="!"+|
00014900  61 70 70 24 0d 83 c2 23  62 69 74 24 3d 22 3c 41  |app$...#bit$="<A|
00014910  6c 70 73 24 52 65 73 6f  75 72 63 65 73 3e 2e 62  |lps$Resources>.b|
00014920  75 74 74 6f 6e 73 22 0d  83 cc 29 c8 99 20 22 4f  |uttons"...).. "O|
00014930  53 5f 46 69 6c 65 22 2c  35 2c 62 69 74 24 20 b8  |S_File",5,bit$ .|
00014940  20 66 74 79 70 65 2c 2c  2c 2c 62 75 74 6c 65 6e  | ftype,,,,butlen|
00014950  0d 83 d6 1f ff 20 22 4c  4f 41 44 20 22 2b 62 69  |..... "LOAD "+bi|
00014960  74 24 2b 22 20 22 2b c3  7e 70 69 63 62 75 66 0d  |t$+" "+.~picbuf.|
00014970  83 e0 40 c8 99 20 22 4f  53 5f 46 69 6c 65 22 2c  |..@.. "OS_File",|
00014980  35 2c 22 3c 41 6c 70 73  24 52 65 73 6f 75 72 63  |5,"<Alps$Resourc|
00014990  65 73 3e 2e 21 52 75 6e  69 6d 61 67 65 22 20 b8  |es>.!Runimage" .|
000149a0  20 66 74 79 70 65 2c 2c  2c 2c 6c 64 6c 65 6e 0d  | ftype,,,,ldlen.|
000149b0  83 ea 3a ff 20 22 4c 4f  41 44 20 3c 41 6c 70 73  |..:. "LOAD <Alps|
000149c0  24 52 65 73 6f 75 72 63  65 73 3e 2e 21 52 75 6e  |$Resources>.!Run|
000149d0  69 6d 61 67 65 20 22 2b  c3 7e 28 70 69 63 62 75  |image "+.~(picbu|
000149e0  66 2b 62 75 74 6c 65 6e  29 0d 83 f4 40 c8 99 20  |f+butlen)...@.. |
000149f0  22 4f 53 5f 46 69 6c 65  22 2c 35 2c 22 3c 41 6c  |"OS_File",5,"<Al|
00014a00  70 73 24 52 65 73 6f 75  72 63 65 73 3e 2e 21 53  |ps$Resources>.!S|
00014a10  70 72 69 74 65 73 22 20  b8 20 66 74 79 70 65 2c  |prites" . ftype,|
00014a20  2c 2c 2c 73 70 72 6c 65  6e 0d 83 fe 24 de 20 73  |,,,sprlen...$. s|
00014a30  70 72 6c 64 20 73 70 72  6c 65 6e 2b 34 3a 21 73  |prld sprlen+4:!s|
00014a40  70 72 6c 64 3d 73 70 72  6c 65 6e 2b 34 0d 84 08  |prld=sprlen+4...|
00014a50  24 73 70 72 6c 64 21 34  3d 30 3a 73 70 72 6c 64  |$sprld!4=0:sprld|
00014a60  21 38 3d 31 36 3a 73 70  72 6c 64 21 31 32 3d 31  |!8=16:sprld!12=1|
00014a70  36 0d 84 12 3a c8 99 20  22 4f 53 5f 53 70 72 69  |6...:.. "OS_Spri|
00014a80  74 65 4f 70 22 2c 32 36  36 2c 73 70 72 6c 64 2c  |teOp",266,sprld,|
00014a90  22 3c 41 6c 70 73 24 52  65 73 6f 75 72 63 65 73  |"<Alps$Resources|
00014aa0  3e 2e 21 53 70 72 69 74  65 73 22 0d 84 1c 0d 63  |>.!Sprites"....c|
00014ab0  6c 69 70 6c 65 6e 3d 30  0d 84 26 05 e1 0d 84 30  |liplen=0..&....0|
00014ac0  04 0d 84 3a 17 dd 20 f2  63 6f 6e 76 65 72 74 28  |...:.. .convert(|
00014ad0  69 6d 70 6f 72 74 24 29  0d 84 44 16 ea 20 69 6e  |import$)..D.. in|
00014ae0  25 2c 49 25 2c 56 25 2c  70 74 72 2c 54 25 0d 84  |%,I%,V%,ptr,T%..|
00014af0  4e 15 c8 99 20 22 48 6f  75 72 67 6c 61 73 73 5f  |N... "Hourglass_|
00014b00  4f 6e 22 0d 84 58 0f 21  70 72 6f 67 72 61 6d 25  |On"..X.!program%|
00014b10  3d 30 0d 84 62 10 70 72  6f 67 72 61 6d 25 21 34  |=0..b.program%!4|
00014b20  3d 30 0d 84 6c 1f f2 66  69 6c 6c 28 6e 72 65 66  |=0..l..fill(nref|
00014b30  2b 34 2c 6e 72 65 66 5f  73 69 7a 65 2d 34 2c 30  |+4,nref_size-4,0|
00014b40  29 0d 84 76 11 69 6e 25  3d 8e 20 69 6d 70 6f 72  |)..v.in%=. impor|
00014b50  74 24 0d 84 80 04 0d 84  8a 11 e3 20 49 25 3d 30  |t$......... I%=0|
00014b60  20 b8 20 26 35 37 46 0d  84 94 0d 20 56 25 3d 9a  | . &57F.... V%=.|
00014b70  23 69 6e 25 0d 84 9e 10  20 76 65 72 62 73 3f 49  |#in%.... verbs?I|
00014b80  25 3d 56 25 0d 84 a8 08  ed 20 49 25 0d 84 b2 0e  |%=V%..... I%....|
00014b90  76 62 6e 3d 3f 76 65 72  62 73 0d 84 bc 28 6e 78  |vbn=?verbs...(nx|
00014ba0  74 76 72 62 3d 76 65 72  62 73 2b 28 76 65 72 62  |tvrb=verbs+(verb|
00014bb0  73 3f 31 2b 32 35 36 2a  28 76 65 72 62 73 3f 32  |s?1+256*(verbs?2|
00014bc0  29 29 0d 84 c6 04 0d 84  d0 11 e3 20 49 25 3d 30  |))......... I%=0|
00014bd0  20 b8 20 26 35 37 46 0d  84 da 0d 20 56 25 3d 9a  | . &57F.... V%=.|
00014be0  23 69 6e 25 0d 84 e4 10  20 6e 6f 75 6e 73 3f 49  |#in%.... nouns?I|
00014bf0  25 3d 56 25 0d 84 ee 08  ed 20 49 25 0d 84 f8 0e  |%=V%..... I%....|
00014c00  6f 62 6e 3d 3f 6e 6f 75  6e 73 0d 85 02 28 6e 78  |obn=?nouns...(nx|
00014c10  74 6f 62 6a 3d 6e 6f 75  6e 73 2b 28 6e 6f 75 6e  |tobj=nouns+(noun|
00014c20  73 3f 31 2b 32 35 36 2a  28 6e 6f 75 6e 73 3f 32  |s?1+256*(nouns?2|
00014c30  29 29 0d 85 0c 04 0d 85  16 0c 56 25 3d 9a 23 69  |))........V%=.#i|
00014c40  6e 25 0d 85 20 0c 56 25  3d 9a 23 69 6e 25 0d 85  |n%.. .V%=.#in%..|
00014c50  2a 12 70 74 72 3d 70 72  6f 67 72 61 6d 25 2b 34  |*.ptr=program%+4|
00014c60  0d 85 34 04 0d 85 3e 05  f5 0d 85 48 0d 20 54 25  |..4...>....H. T%|
00014c70  3d 9a 23 69 6e 25 0d 85  52 13 20 3f 70 74 72 3d  |=.#in%..R. ?ptr=|
00014c80  54 25 3a 70 74 72 2b 3d  31 0d 85 5c 18 20 e7 20  |T%:ptr+=1..\. . |
00014c90  54 25 3e 3d 26 43 30 20  8c 20 54 25 2d 3d 26 31  |T%>=&C0 . T%-=&1|
00014ca0  30 0d 85 66 10 20 e7 20  54 25 3e 3d 26 37 30 20  |0..f. . T%>=&70 |
00014cb0  8c 0d 85 70 18 20 70 62  3d 6f 6c 64 70 61 72 73  |...p. pb=oldpars|
00014cc0  3f 28 54 25 2d 26 37 30  29 0d 85 7a 0d 20 e7 20  |?(T%-&70)..z. . |
00014cd0  70 62 3e 30 20 8c 0d 85  84 11 20 20 e3 20 49 25  |pb>0 .....  . I%|
00014ce0  3d 31 20 b8 20 70 62 0d  85 8e 0f 20 20 20 56 25  |=1 . pb....   V%|
00014cf0  3d 9a 23 69 6e 25 0d 85  98 15 20 20 20 3f 70 74  |=.#in%....   ?pt|
00014d00  72 3d 56 25 3a 70 74 72  2b 3d 31 0d 85 a2 0e 20  |r=V%:ptr+=1.... |
00014d10  20 20 c8 8e 20 54 25 20  ca 0d 85 ac 39 20 20 20  |  .. T% ....9   |
00014d20  20 c9 20 26 41 34 2c 26  41 31 2c 26 39 32 2c 26  | . &A4,&A1,&92,&|
00014d30  39 30 2c 26 39 36 2c 26  39 37 2c 26 41 36 2c 26  |90,&96,&97,&A6,&|
00014d40  39 41 2c 26 41 41 2c 26  38 37 2c 26 38 38 2c 26  |9A,&AA,&87,&88,&|
00014d50  37 42 0d 85 b6 1f 20 20  20 20 20 e7 20 49 25 3d  |7B....     . I%=|
00014d60  31 20 8c 20 3f 70 74 72  3d 30 3a 70 74 72 2b 3d  |1 . ?ptr=0:ptr+=|
00014d70  31 0d 85 c0 2d 20 20 20  20 c9 20 26 37 41 2c 26  |1...-    . &7A,&|
00014d80  41 35 2c 26 42 32 2c 26  42 33 2c 26 42 34 2c 26  |A5,&B2,&B3,&B4,&|
00014d90  42 35 2c 26 42 36 2c 26  42 37 2c 26 42 38 0d 85  |B5,&B6,&B7,&B8..|
00014da0  ca 1f 20 20 20 20 20 e7  20 49 25 3d 32 20 8c 20  |..     . I%=2 . |
00014db0  3f 70 74 72 3d 30 3a 70  74 72 2b 3d 31 0d 85 d4  |?ptr=0:ptr+=1...|
00014dc0  08 20 20 20 cb 0d 85 de  0a 20 20 ed 20 49 25 0d  |.   .....  . I%.|
00014dd0  85 e8 06 20 cd 0d 85 f2  05 cd 0d 85 fc 0b fd 20  |... ........... |
00014de0  c5 23 69 6e 25 0d 86 06  09 d9 23 69 6e 25 0d 86  |.#in%.....#in%..|
00014df0  10 1e f2 69 6e 63 70 72  67 6c 65 6e 28 70 74 72  |...incprglen(ptr|
00014e00  2d 35 2d 70 72 6f 67 72  61 6d 25 29 0d 86 1a 16  |-5-program%)....|
00014e10  c8 99 20 22 48 6f 75 72  67 6c 61 73 73 5f 4f 66  |.. "Hourglass_Of|
00014e20  66 22 0d 86 24 05 e1 0d  86 2e 04 0d 86 38 1b dd  |f"..$........8..|
00014e30  20 f2 69 6d 70 6f 72 74  5f 74 65 78 74 28 69 6d  | .import_text(im|
00014e40  70 6f 72 74 24 29 0d 86  42 12 e7 20 69 6d 70 6f  |port$)..B.. impo|
00014e50  72 74 24 3d 22 22 20 8c  0d 86 4c 11 f2 65 72 72  |rt$="" ...L..err|
00014e60  6f 72 28 31 36 2c 22 22  29 0d 86 56 05 cc 0d 86  |or(16,"")..V....|
00014e70  60 25 ff 20 22 4c 4f 41  44 20 22 2b 69 6d 70 6f  |`%. "LOAD "+impo|
00014e80  72 74 24 2b 22 20 22 2b  c3 7e 28 74 65 78 74 25  |rt$+" "+.~(text%|
00014e90  2b 32 29 0d 86 6a 0a 6d  70 74 72 3d 31 0d 86 74  |+2)..j.mptr=1..t|
00014ea0  22 3f 74 65 78 74 25 3d  74 65 78 74 25 3f 32 3a  |"?text%=text%?2:|
00014eb0  74 65 78 74 25 3f 31 3d  74 65 78 74 25 3f 33 0d  |text%?1=text%?3.|
00014ec0  86 7e 23 74 65 78 74 25  21 32 3d 28 74 65 78 74  |.~#text%!2=(text|
00014ed0  25 3f 34 2b 32 35 36 2a  74 65 78 74 25 3f 35 29  |%?4+256*text%?5)|
00014ee0  2b 32 0d 86 88 13 74 65  78 74 25 21 36 3d 74 65  |+2....text%!6=te|
00014ef0  78 74 25 3f 36 0d 86 92  05 cd 0d 86 9c 05 e1 0d  |xt%?6...........|
00014f00  86 a6 04 0d 86 b0 1a dd  20 f2 69 6d 70 6f 72 74  |........ .import|
00014f10  5f 6f 62 6a 28 69 6d 70  6f 72 74 24 29 0d 86 ba  |_obj(import$)...|
00014f20  2b ea 20 69 6e 25 2c 4f  25 2c 4d 25 2c 4a 25 2c  |+. in%,O%,M%,J%,|
00014f30  66 6c 61 67 73 2c 73 74  61 74 65 2c 72 6f 6f 6d  |flags,state,room|
00014f40  2c 6d 6c 6f 2c 6d 68 69  0d 86 c4 0d 4d 25 3d 6f  |,mlo,mhi....M%=o|
00014f50  64 61 74 61 25 0d 86 ce  12 69 6e 25 3d 8e 28 69  |data%....in%=.(i|
00014f60  6d 70 6f 72 74 24 29 0d  86 d8 1b e7 20 69 6e 25  |mport$)..... in%|
00014f70  3d 30 20 f2 65 72 72 6f  72 28 31 30 2c 22 22 29  |=0 .error(10,"")|
00014f80  3a e1 0d 86 e2 0c 4f 25  3d 9a 23 69 6e 25 0d 86  |:.....O%=.#in%..|
00014f90  ec 0b cf 23 69 6e 25 3d  30 0d 86 f6 0f e3 20 49  |...#in%=0..... I|
00014fa0  25 3d 30 20 b8 20 4f 25  0d 87 00 26 66 6c 61 67  |%=0 . O%...&flag|
00014fb0  73 3d 9a 23 69 6e 25 3a  73 74 61 74 65 3d 9a 23  |s=.#in%:state=.#|
00014fc0  69 6e 25 3a 72 6f 6f 6d  3d 9a 23 69 6e 25 0d 87  |in%:room=.#in%..|
00014fd0  0a 17 6d 6c 6f 3d 9a 23  69 6e 25 3a 6d 68 69 3d  |..mlo=.#in%:mhi=|
00014fe0  9a 23 69 6e 25 0d 87 14  19 4d 25 3f 30 3d 66 6c  |.#in%....M%?0=fl|
00014ff0  61 67 73 3a 4d 25 3f 31  3d 73 74 61 74 65 0d 87  |ags:M%?1=state..|
00015000  1e 14 4d 25 3f 32 3d 72  6f 6f 6d 3a 4d 25 3f 33  |..M%?2=room:M%?3|
00015010  3d 30 0d 87 28 15 4d 25  3f 34 3d 6d 6c 6f 3a 4d  |=0..(.M%?4=mlo:M|
00015020  25 3f 35 3d 6d 68 69 0d  87 32 14 e3 20 4a 25 3d  |%?5=mhi..2.. J%=|
00015030  36 20 b8 20 6f 5f 6c 65  6e 2d 31 0d 87 3c 0b 4d  |6 . o_len-1..<.M|
00015040  25 3f 4a 25 3d 30 0d 87  46 08 ed 20 4a 25 0d 87  |%?J%=0..F.. J%..|
00015050  50 0d 4d 25 2b 3d 6f 5f  6c 65 6e 0d 87 5a 08 ed  |P.M%+=o_len..Z..|
00015060  20 49 25 0d 87 64 12 6c  61 73 74 5f 6f 62 6a 65  | I%..d.last_obje|
00015070  63 74 3d 4f 25 0d 87 6e  09 d9 23 69 6e 25 0d 87  |ct=O%..n..#in%..|
00015080  78 05 e1 0d 87 82 04 0d  87 8c 1c dd 20 f2 69 6d  |x........... .im|
00015090  70 6f 72 74 5f 72 6f 6f  6d 73 28 69 6d 70 6f 72  |port_rooms(impor|
000150a0  74 24 29 0d 87 96 12 ea  20 69 6e 25 2c 52 25 2c  |t$)..... in%,R%,|
000150b0  4d 25 2c 4a 25 0d 87 a0  0d 4d 25 3d 72 64 61 74  |M%,J%....M%=rdat|
000150c0  61 25 0d 87 aa 12 69 6e  25 3d 8e 28 69 6d 70 6f  |a%....in%=.(impo|
000150d0  72 74 24 29 0d 87 b4 1b  e7 20 69 6e 25 3d 30 20  |rt$)..... in%=0 |
000150e0  f2 65 72 72 6f 72 28 31  30 2c 22 22 29 3a e1 0d  |.error(10,""):..|
000150f0  87 be 0c 52 25 3d 9a 23  69 6e 25 0d 87 c8 0b cf  |...R%=.#in%.....|
00015100  23 69 6e 25 3d 30 0d 87  d2 0f e3 20 49 25 3d 30  |#in%=0..... I%=0|
00015110  20 b8 20 52 25 0d 87 dc  0e e3 20 4a 25 3d 30 20  | . R%..... J%=0 |
00015120  b8 20 33 0d 87 e6 0f 4d  25 3f 4a 25 3d 9a 23 69  |. 3....M%?J%=.#i|
00015130  6e 25 0d 87 f0 08 ed 20  4a 25 0d 87 fa 11 4d 25  |n%..... J%....M%|
00015140  3f 34 3d 30 3a 4d 25 3f  35 3d 30 0d 88 04 12 e3  |?4=0:M%?5=0.....|
00015150  20 4a 25 3d 36 20 b8 20  31 33 20 88 32 0d 88 0e  | J%=6 . 13 .2...|
00015160  1b 4d 25 3f 4a 25 3d 9a  23 69 6e 25 3a 4d 25 3f  |.M%?J%=.#in%:M%?|
00015170  28 4a 25 2b 31 29 3d 30  0d 88 18 08 ed 20 4a 25  |(J%+1)=0..... J%|
00015180  0d 88 22 10 e3 20 4a 25  3d 31 34 20 b8 20 33 37  |..".. J%=14 . 37|
00015190  0d 88 2c 0b 4d 25 3f 4a  25 3d 30 0d 88 36 08 ed  |..,.M%?J%=0..6..|
000151a0  20 4a 25 0d 88 40 0f 4d  25 3f 32 32 3d 9a 23 69  | J%..@.M%?22=.#i|
000151b0  6e 25 0d 88 4a 0f 4d 25  3f 32 34 3d 9a 23 69 6e  |n%..J.M%?24=.#in|
000151c0  25 0d 88 54 10 e3 20 4a  25 3d 33 38 20 b8 20 37  |%..T.. J%=38 . 7|
000151d0  33 0d 88 5e 35 e7 20 28  4a 25 3c 34 32 20 84 20  |3..^5. (J%<42 . |
000151e0  4a 25 3d 34 36 20 84 20  4a 25 3d 34 37 29 20 8c  |J%=46 . J%=47) .|
000151f0  20 4d 25 3f 4a 25 3d 9a  23 69 6e 25 20 8b 20 4d  | M%?J%=.#in% . M|
00015200  25 3f 4a 25 3d 30 0d 88  68 08 ed 20 4a 25 0d 88  |%?J%=0..h.. J%..|
00015210  72 0d 4d 25 2b 3d 72 5f  6c 65 6e 0d 88 7c 08 ed  |r.M%+=r_len..|..|
00015220  20 49 25 0d 88 86 10 6c  61 73 74 5f 72 6f 6f 6d  | I%....last_room|
00015230  3d 52 25 0d 88 90 05 e1  0d 88 9a 04 0d 88 a4 13  |=R%.............|
00015240  dd 20 f2 73 61 76 65 5f  61 6c 6c 28 66 24 29 0d  |. .save_all(f$).|
00015250  88 ae 17 f4 20 66 24 3d  66 75 6c 6c 20 70 61 74  |.... f$=full pat|
00015260  68 20 6e 61 6d 65 0d 88  b8 71 e7 20 a7 66 24 2c  |h name...q. .f$,|
00015270  22 2e 22 29 3d 30 20 8c  20 85 20 31 2c 22 54 6f  |".")=0 . . 1,"To|
00015280  20 73 61 76 65 2c 20 64  72 61 67 20 74 68 65 20  | save, drag the |
00015290  66 69 6c 65 20 69 63 6f  6e 20 74 6f 20 61 20 64  |file icon to a d|
000152a0  69 72 65 63 74 6f 72 79  20 76 69 65 77 65 72 20  |irectory viewer |
000152b0  69 6e 20 77 68 69 63 68  20 74 68 65 72 65 20 69  |in which there i|
000152c0  73 20 61 6e 20 41 4c 50  53 20 64 69 72 65 63 74  |s an ALPS direct|
000152d0  6f 72 79 2e 22 3a e1 0d  88 c2 15 c8 99 20 22 48  |ory.":....... "H|
000152e0  6f 75 72 67 6c 61 73 73  5f 4f 6e 22 0d 88 cc 3b  |ourglass_On"...;|
000152f0  f2 63 6c 6f 73 65 28 74  65 78 74 68 61 6e 64 6c  |.close(texthandl|
00015300  65 29 3a f2 63 6c 6f 73  65 28 6f 62 6a 68 61 6e  |e):.close(objhan|
00015310  64 6c 65 29 3a f2 63 6c  6f 73 65 28 72 6f 6f 6d  |dle):.close(room|
00015320  68 61 6e 64 6c 65 29 0d  88 d6 1a 70 24 3d 66 24  |handle)....p$=f$|
00015330  3a 66 24 3d a4 6c 65 61  66 6e 61 6d 65 28 70 24  |:f$=.leafname(p$|
00015340  29 0d 88 e0 17 70 24 3d  c0 70 24 2c a9 28 70 24  |)....p$=.p$,.(p$|
00015350  29 2d a9 28 66 24 29 29  0d 88 ea 11 64 24 3d 70  |)-.(f$))....d$=p|
00015360  24 2b 22 41 6c 70 73 2e  22 0d 88 f4 1a ff 28 22  |$+"Alps.".....("|
00015370  53 45 54 20 41 6c 70 73  24 44 61 74 61 20 22 2b  |SET Alps$Data "+|
00015380  64 24 29 0d 88 fe 24 f2  73 61 76 65 5f 6f 62 6a  |d$)...$.save_obj|
00015390  73 28 22 3c 41 6c 70 73  24 44 61 74 61 3e 4f 62  |s("<Alps$Data>Ob|
000153a0  6a 65 63 74 73 22 29 0d  89 08 23 f2 73 61 76 65  |jects")...#.save|
000153b0  5f 72 6f 6f 6d 73 28 22  3c 41 6c 70 73 24 44 61  |_rooms("<Alps$Da|
000153c0  74 61 3e 52 6f 6f 6d 73  22 29 0d 89 12 23 f2 73  |ta>Rooms")...#.s|
000153d0  61 76 65 5f 66 6c 61 67  73 28 22 3c 41 6c 70 73  |ave_flags("<Alps|
000153e0  24 44 61 74 61 3e 46 6c  61 67 73 22 29 0d 89 1c  |$Data>Flags")...|
000153f0  24 f2 73 61 76 65 5f 70  69 78 28 22 3c 41 6c 70  |$.save_pix("<Alp|
00015400  73 24 44 61 74 61 3e 50  69 63 74 75 72 65 73 22  |s$Data>Pictures"|
00015410  29 0d 89 26 13 f2 73 61  76 65 5f 76 6f 63 61 62  |)..&..save_vocab|
00015420  28 66 24 29 0d 89 30 27  f2 73 61 76 65 5f 70 72  |(f$)..0'.save_pr|
00015430  6f 67 72 61 6d 28 22 3c  41 6c 70 73 24 44 61 74  |ogram("<Alps$Dat|
00015440  61 3e 50 72 6f 67 72 61  6d 22 29 0d 89 3a 21 f2  |a>Program")..:!.|
00015450  73 61 76 65 5f 74 65 78  74 28 22 3c 41 6c 70 73  |save_text("<Alps|
00015460  24 44 61 74 61 3e 54 65  78 74 22 29 0d 89 44 21  |$Data>Text")..D!|
00015470  f2 73 61 76 65 5f 64 69  63 74 28 22 3c 41 6c 70  |.save_dict("<Alp|
00015480  73 24 44 61 74 61 3e 44  69 63 74 22 29 0d 89 4e  |s$Data>Dict")..N|
00015490  24 f2 73 61 76 65 5f 70  61 6c 28 22 3c 41 6c 70  |$.save_pal("<Alp|
000154a0  73 24 44 61 74 61 3e 21  50 61 6c 65 74 74 65 22  |s$Data>!Palette"|
000154b0  29 0d 89 58 25 f2 73 61  76 65 5f 63 68 61 72 73  |)..X%.save_chars|
000154c0  28 22 3c 41 6c 70 73 24  44 61 74 61 3e 63 68 61  |("<Alps$Data>cha|
000154d0  72 73 65 74 22 29 0d 89  62 1d ff 28 22 43 52 45  |rset")..b..("CRE|
000154e0  41 54 45 20 22 2b 70 24  2b 66 24 2b 22 20 31 30  |ATE "+p$+f$+" 10|
000154f0  30 22 29 0d 89 6c 21 ff  28 22 53 45 54 54 59 50  |0")..l!.("SETTYP|
00015500  45 20 22 2b 70 24 2b 66  24 2b 22 20 22 2b 74 79  |E "+p$+f$+" "+ty|
00015510  70 65 24 29 0d 89 76 27  ff 28 22 43 52 45 41 54  |pe$)..v'.("CREAT|
00015520  45 20 3c 41 6c 70 73 24  44 61 74 61 3e 47 61 6d  |E <Alps$Data>Gam|
00015530  65 44 61 74 61 20 31 30  30 22 29 0d 89 80 21 6f  |eData 100")...!o|
00015540  75 74 25 3d ad 28 22 3c  41 6c 70 73 24 44 61 74  |ut%=.("<Alps$Dat|
00015550  61 3e 47 61 6d 65 44 61  74 61 22 29 0d 89 8a 10  |a>GameData")....|
00015560  d5 23 6f 75 74 25 2c 6d  6f 64 65 25 0d 89 94 0a  |.#out%,mode%....|
00015570  d9 23 6f 75 74 25 0d 89  9e 29 64 61 74 61 5f 73  |.#out%...)data_s|
00015580  61 76 65 64 3d b9 3a 6c  6f 61 64 65 64 24 3d 66  |aved=.:loaded$=f|
00015590  24 3a 24 66 69 6c 65 6e  61 6d 65 25 3d 66 24 0d  |$:$filename%=f$.|
000155a0  89 a8 12 c8 99 20 43 72  65 61 74 65 4d 2c 2c 2d  |..... CreateM,,-|
000155b0  31 0d 89 b2 16 c8 99 20  22 48 6f 75 72 67 6c 61  |1...... "Hourgla|
000155c0  73 73 5f 4f 66 66 22 0d  89 bc 05 e1 0d 89 c6 04  |ss_Off".........|
000155d0  0d 89 d0 16 dd 20 f2 73  61 76 65 5f 76 6f 63 61  |..... .save_voca|
000155e0  62 28 66 69 24 29 0d 89  da 0e e7 20 66 69 24 3d  |b(fi$)..... fi$=|
000155f0  22 22 20 8c 0d 89 e4 11  f2 65 72 72 6f 72 28 31  |"" ......error(1|
00015600  36 2c 22 22 29 0d 89 ee  05 cc 0d 89 f8 23 f2 73  |6,"")........#.s|
00015610  61 76 65 5f 6e 6f 75 6e  73 28 22 3c 41 6c 70 73  |ave_nouns("<Alps|
00015620  24 44 61 74 61 3e 4e 6f  75 6e 73 22 29 0d 8a 02  |$Data>Nouns")...|
00015630  23 f2 73 61 76 65 5f 76  65 72 62 73 28 22 3c 41  |#.save_verbs("<A|
00015640  6c 70 73 24 44 61 74 61  3e 56 65 72 62 73 22 29  |lps$Data>Verbs")|
00015650  0d 8a 0c 2a f2 73 61 76  65 5f 61 64 6a 65 63 74  |...*.save_adject|
00015660  73 28 22 3c 41 6c 70 73  24 44 61 74 61 3e 41 64  |s("<Alps$Data>Ad|
00015670  6a 65 63 74 69 76 65 73  22 29 0d 8a 16 24 f2 73  |jectives")...$.s|
00015680  61 76 65 5f 70 72 65 70  73 28 22 3c 41 6c 70 73  |ave_preps("<Alps|
00015690  24 44 61 74 61 3e 50 72  65 70 6f 73 22 29 0d 8a  |$Data>Prepos")..|
000156a0  20 24 f2 73 61 76 65 5f  63 6f 6e 6a 28 22 3c 41  | $.save_conj("<A|
000156b0  6c 70 73 24 44 61 74 61  3e 43 6f 6e 6a 75 6e 63  |lps$Data>Conjunc|
000156c0  22 29 0d 8a 2a 25 f2 73  61 76 65 5f 73 70 65 63  |")..*%.save_spec|
000156d0  28 22 3c 41 6c 70 73 24  44 61 74 61 3e 53 70 65  |("<Alps$Data>Spe|
000156e0  63 69 61 6c 73 22 29 0d  8a 34 23 f2 73 61 76 65  |cials")..4#.save|
000156f0  5f 6e 6f 69 73 65 28 22  3c 41 6c 70 73 24 44 61  |_noise("<Alps$Da|
00015700  74 61 3e 4e 6f 69 73 65  22 29 0d 8a 3e 22 f2 73  |ta>Noise")..>".s|
00015710  61 76 65 5f 6e 72 65 66  73 28 22 3c 41 6c 70 73  |ave_nrefs("<Alps|
00015720  24 44 61 74 61 3e 4e 72  65 66 22 29 0d 8a 48 22  |$Data>Nref")..H"|
00015730  f2 73 61 76 65 5f 61 72  65 66 73 28 22 3c 41 6c  |.save_arefs("<Al|
00015740  70 73 24 44 61 74 61 3e  41 72 65 66 22 29 0d 8a  |ps$Data>Aref")..|
00015750  52 27 f2 73 61 76 65 5f  76 74 79 70 65 73 28 22  |R'.save_vtypes("|
00015760  3c 41 6c 70 73 24 44 61  74 61 3e 56 65 72 62 54  |<Alps$Data>VerbT|
00015770  79 70 65 22 29 0d 8a 5c  05 cd 0d 8a 66 05 e1 0d  |ype")..\....f...|
00015780  8a 70 04 0d 8a 7a 16 dd  20 f2 73 61 76 65 5f 6e  |.p...z.. .save_n|
00015790  6f 75 6e 73 28 66 69 24  29 0d 8a 84 0e e7 20 66  |ouns(fi$)..... f|
000157a0  69 24 3d 22 22 20 8c 0d  8a 8e 11 f2 65 72 72 6f  |i$="" ......erro|
000157b0  72 28 31 36 2c 22 22 29  0d 8a 98 05 cc 0d 8a a2  |r(16,"")........|
000157c0  2e ff 20 22 53 41 56 45  20 22 2b 66 69 24 2b 22  |.. "SAVE "+fi$+"|
000157d0  20 22 2b c3 7e 6e 6f 75  6e 73 2b 22 20 22 2b c3  | "+.~nouns+" "+.|
000157e0  7e 28 6e 78 74 6f 62 6a  2b 31 29 0d 8a ac 1c ff  |~(nxtobj+1).....|
000157f0  20 22 53 45 54 54 59 50  45 20 22 2b 66 69 24 2b  | "SETTYPE "+fi$+|
00015800  22 20 44 61 74 61 22 0d  8a b6 05 cd 0d 8a c0 05  |" Data".........|
00015810  e1 0d 8a ca 04 0d 8a d4  16 dd 20 f2 73 61 76 65  |.......... .save|
00015820  5f 76 65 72 62 73 28 66  69 24 29 0d 8a de 0e e7  |_verbs(fi$).....|
00015830  20 66 69 24 3d 22 22 20  8c 0d 8a e8 11 f2 65 72  | fi$="" ......er|
00015840  72 6f 72 28 31 36 2c 22  22 29 0d 8a f2 05 cc 0d  |ror(16,"")......|
00015850  8a fc 2e ff 20 22 53 41  56 45 20 22 2b 66 69 24  |.... "SAVE "+fi$|
00015860  2b 22 20 22 2b c3 7e 76  65 72 62 73 2b 22 20 22  |+" "+.~verbs+" "|
00015870  2b c3 7e 28 6e 78 74 76  72 62 2b 31 29 0d 8b 06  |+.~(nxtvrb+1)...|
00015880  1c ff 20 22 53 45 54 54  59 50 45 20 22 2b 66 69  |.. "SETTYPE "+fi|
00015890  24 2b 22 20 44 61 74 61  22 0d 8b 10 05 cd 0d 8b  |$+" Data".......|
000158a0  1a 05 e1 0d 8b 24 04 0d  8b 2e 18 dd 20 f2 73 61  |.....$...... .sa|
000158b0  76 65 5f 61 64 6a 65 63  74 73 28 66 69 24 29 0d  |ve_adjects(fi$).|
000158c0  8b 38 0e e7 20 66 69 24  3d 22 22 20 8c 0d 8b 42  |.8.. fi$="" ...B|
000158d0  11 f2 65 72 72 6f 72 28  31 36 2c 22 22 29 0d 8b  |..error(16,"")..|
000158e0  4c 05 cc 0d 8b 56 30 ff  20 22 53 41 56 45 20 22  |L....V0. "SAVE "|
000158f0  2b 66 69 24 2b 22 20 22  2b c3 7e 61 64 6a 65 63  |+fi$+" "+.~adjec|
00015900  74 73 2b 22 20 22 2b c3  7e 28 6e 78 74 61 64 6a  |ts+" "+.~(nxtadj|
00015910  2b 31 29 0d 8b 60 1c ff  20 22 53 45 54 54 59 50  |+1)..`.. "SETTYP|
00015920  45 20 22 2b 66 69 24 2b  22 20 44 61 74 61 22 0d  |E "+fi$+" Data".|
00015930  8b 6a 05 cd 0d 8b 74 05  e1 0d 8b 7e 04 0d 8b 88  |.j....t....~....|
00015940  16 dd 20 f2 73 61 76 65  5f 70 72 65 70 73 28 66  |.. .save_preps(f|
00015950  69 24 29 0d 8b 92 0e e7  20 66 69 24 3d 22 22 20  |i$)..... fi$="" |
00015960  8c 0d 8b 9c 11 f2 65 72  72 6f 72 28 31 36 2c 22  |......error(16,"|
00015970  22 29 0d 8b a6 05 cc 0d  8b b0 2e ff 20 22 53 41  |").......... "SA|
00015980  56 45 20 22 2b 66 69 24  2b 22 20 22 2b c3 7e 70  |VE "+fi$+" "+.~p|
00015990  72 65 70 73 2b 22 20 22  2b c3 7e 28 6e 78 74 70  |reps+" "+.~(nxtp|
000159a0  72 70 2b 31 29 0d 8b ba  1c ff 20 22 53 45 54 54  |rp+1)..... "SETT|
000159b0  59 50 45 20 22 2b 66 69  24 2b 22 20 44 61 74 61  |YPE "+fi$+" Data|
000159c0  22 0d 8b c4 05 cd 0d 8b  ce 05 e1 0d 8b d8 04 0d  |"...............|
000159d0  8b e2 15 dd 20 f2 73 61  76 65 5f 63 6f 6e 6a 28  |.... .save_conj(|
000159e0  66 69 24 29 0d 8b ec 0e  e7 20 66 69 24 3d 22 22  |fi$)..... fi$=""|
000159f0  20 8c 0d 8b f6 11 f2 65  72 72 6f 72 28 31 36 2c  | ......error(16,|
00015a00  22 22 29 0d 8c 00 05 cc  0d 8c 0a 2e ff 20 22 53  |"").......... "S|
00015a10  41 56 45 20 22 2b 66 69  24 2b 22 20 22 2b c3 7e  |AVE "+fi$+" "+.~|
00015a20  63 6f 6e 6a 73 2b 22 20  22 2b c3 7e 28 6e 78 74  |conjs+" "+.~(nxt|
00015a30  63 6a 6e 2b 31 29 0d 8c  14 1c ff 20 22 53 45 54  |cjn+1)..... "SET|
00015a40  54 59 50 45 20 22 2b 66  69 24 2b 22 20 44 61 74  |TYPE "+fi$+" Dat|
00015a50  61 22 0d 8c 1e 05 cd 0d  8c 28 05 e1 0d 8c 32 04  |a".......(....2.|
00015a60  0d 8c 3c 15 dd 20 f2 73  61 76 65 5f 73 70 65 63  |..<.. .save_spec|
00015a70  28 66 69 24 29 0d 8c 46  0e e7 20 66 69 24 3d 22  |(fi$)..F.. fi$="|
00015a80  22 20 8c 0d 8c 50 11 f2  65 72 72 6f 72 28 31 36  |" ...P..error(16|
00015a90  2c 22 22 29 0d 8c 5a 05  cc 0d 8c 64 2e ff 20 22  |,"")..Z....d.. "|
00015aa0  53 41 56 45 20 22 2b 66  69 24 2b 22 20 22 2b c3  |SAVE "+fi$+" "+.|
00015ab0  7e 73 70 65 63 73 2b 22  20 22 2b c3 7e 28 6e 78  |~specs+" "+.~(nx|
00015ac0  74 73 70 6e 2b 31 29 0d  8c 6e 1c ff 20 22 53 45  |tspn+1)..n.. "SE|
00015ad0  54 54 59 50 45 20 22 2b  66 69 24 2b 22 20 44 61  |TTYPE "+fi$+" Da|
00015ae0  74 61 22 0d 8c 78 05 cd  0d 8c 82 05 e1 0d 8c 8c  |ta"..x..........|
00015af0  04 0d 8c 96 16 dd 20 f2  73 61 76 65 5f 6e 6f 69  |...... .save_noi|
00015b00  73 65 28 66 69 24 29 0d  8c a0 0e e7 20 66 69 24  |se(fi$)..... fi$|
00015b10  3d 22 22 20 8c 0d 8c aa  11 f2 65 72 72 6f 72 28  |="" ......error(|
00015b20  31 36 2c 22 22 29 0d 8c  b4 05 cc 0d 8c be 2e ff  |16,"")..........|
00015b30  20 22 53 41 56 45 20 22  2b 66 69 24 2b 22 20 22  | "SAVE "+fi$+" "|
00015b40  2b c3 7e 6e 6f 69 73 65  2b 22 20 22 2b c3 7e 28  |+.~noise+" "+.~(|
00015b50  6e 78 74 6e 73 6e 2b 31  29 0d 8c c8 1c ff 20 22  |nxtnsn+1)..... "|
00015b60  53 45 54 54 59 50 45 20  22 2b 66 69 24 2b 22 20  |SETTYPE "+fi$+" |
00015b70  44 61 74 61 22 0d 8c d2  05 cd 0d 8c dc 05 e1 0d  |Data"...........|
00015b80  8c e6 04 0d 8c f0 17 dd  20 f2 73 61 76 65 5f 76  |........ .save_v|
00015b90  74 79 70 65 73 28 66 69  24 29 0d 8c fa 0e e7 20  |types(fi$)..... |
00015ba0  66 69 24 3d 22 22 20 8c  0d 8d 04 11 f2 65 72 72  |fi$="" ......err|
00015bb0  6f 72 28 31 36 2c 22 22  29 0d 8d 0e 05 cc 0d 8d  |or(16,"").......|
00015bc0  18 36 ff 20 22 53 41 56  45 20 22 2b 66 69 24 2b  |.6. "SAVE "+fi$+|
00015bd0  22 20 22 2b c3 7e 76 65  72 62 5f 74 79 70 65 2b  |" "+.~verb_type+|
00015be0  22 2b 22 2b c3 7e 28 32  2a 28 6d 61 78 76 62 6e  |"+"+.~(2*(maxvbn|
00015bf0  2b 31 29 29 0d 8d 22 1c  ff 20 22 53 45 54 54 59  |+1))..".. "SETTY|
00015c00  50 45 20 22 2b 66 69 24  2b 22 20 44 61 74 61 22  |PE "+fi$+" Data"|
00015c10  0d 8d 2c 05 cd 0d 8d 36  05 e1 0d 8d 40 04 0d 8d  |..,....6....@...|
00015c20  4a 16 dd 20 f2 73 61 76  65 5f 61 72 65 66 73 28  |J.. .save_arefs(|
00015c30  66 69 24 29 0d 8d 54 0e  e7 20 66 69 24 3d 22 22  |fi$)..T.. fi$=""|
00015c40  20 8c 0d 8d 5e 11 f2 65  72 72 6f 72 28 31 36 2c  | ...^..error(16,|
00015c50  22 22 29 0d 8d 68 05 cc  0d 8d 72 2c ff 20 22 53  |"")..h....r,. "S|
00015c60  41 56 45 20 22 2b 66 69  24 2b 22 20 22 2b c3 7e  |AVE "+fi$+" "+.~|
00015c70  61 72 65 66 2b 22 2b 22  2b c3 7e 28 21 61 72 65  |aref+"+"+.~(!are|
00015c80  66 2b 31 29 0d 8d 7c 1c  ff 20 22 53 45 54 54 59  |f+1)..|.. "SETTY|
00015c90  50 45 20 22 2b 66 69 24  2b 22 20 44 61 74 61 22  |PE "+fi$+" Data"|
00015ca0  0d 8d 86 05 cd 0d 8d 90  05 e1 0d 8d 9a 04 0d 8d  |................|
00015cb0  a4 16 dd 20 f2 73 61 76  65 5f 6e 72 65 66 73 28  |... .save_nrefs(|
00015cc0  66 69 24 29 0d 8d ae 0e  e7 20 66 69 24 3d 22 22  |fi$)..... fi$=""|
00015cd0  20 8c 0d 8d b8 11 f2 65  72 72 6f 72 28 31 36 2c  | ......error(16,|
00015ce0  22 22 29 0d 8d c2 05 cc  0d 8d cc 2c ff 20 22 53  |"")........,. "S|
00015cf0  41 56 45 20 22 2b 66 69  24 2b 22 20 22 2b c3 7e  |AVE "+fi$+" "+.~|
00015d00  6e 72 65 66 2b 22 2b 22  2b c3 7e 28 21 6e 72 65  |nref+"+"+.~(!nre|
00015d10  66 2b 31 29 0d 8d d6 1c  ff 20 22 53 45 54 54 59  |f+1)..... "SETTY|
00015d20  50 45 20 22 2b 66 69 24  2b 22 20 44 61 74 61 22  |PE "+fi$+" Data"|
00015d30  0d 8d e0 05 cd 0d 8d ea  05 e1 0d 8d f4 04 0d 8d  |................|
00015d40  fe 15 dd 20 f2 73 61 76  65 5f 6f 62 6a 73 28 66  |... .save_objs(f|
00015d50  69 24 29 0d 8e 08 0e e7  20 66 69 24 3d 22 22 20  |i$)..... fi$="" |
00015d60  8c 0d 8e 12 11 f2 65 72  72 6f 72 28 31 36 2c 22  |......error(16,"|
00015d70  22 29 0d 8e 1c 05 cc 0d  8e 26 28 e7 20 ac 20 64  |").......&(. . d|
00015d80  61 74 61 76 61 6c 69 64  20 f2 73 77 61 70 5f 64  |atavalid .swap_d|
00015d90  61 74 61 3a 64 61 74 61  76 61 6c 69 64 3d b9 0d  |ata:datavalid=..|
00015da0  8e 30 28 6f 64 61 74 61  25 3f 31 34 3d 6f 70 74  |.0(odata%?14=opt|
00015db0  72 3a 6f 64 61 74 61 25  3f 31 35 3d 6c 61 73 74  |r:odata%?15=last|
00015dc0  5f 6f 62 6a 65 63 74 0d  8e 3a 3c ff 20 22 53 41  |_object..:<. "SA|
00015dd0  56 45 20 22 2b 66 69 24  2b 22 20 22 2b c3 7e 6f  |VE "+fi$+" "+.~o|
00015de0  64 61 74 61 25 2b 22 2b  22 2b c3 7e 28 6f 5f 6c  |data%+"+"+.~(o_l|
00015df0  65 6e 2a 28 6c 61 73 74  5f 6f 62 6a 65 63 74 2b  |en*(last_object+|
00015e00  31 29 29 0d 8e 44 1c ff  20 22 53 45 54 54 59 50  |1))..D.. "SETTYP|
00015e10  45 20 22 2b 66 69 24 2b  22 20 44 61 74 61 22 0d  |E "+fi$+" Data".|
00015e20  8e 4e 05 cd 0d 8e 58 05  e1 0d 8e 62 04 0d 8e 6c  |.N....X....b...l|
00015e30  16 dd 20 f2 73 61 76 65  5f 72 6f 6f 6d 73 28 66  |.. .save_rooms(f|
00015e40  69 24 29 0d 8e 76 0e e7  20 66 69 24 3d 22 22 20  |i$)..v.. fi$="" |
00015e50  8c 0d 8e 80 11 f2 65 72  72 6f 72 28 31 36 2c 22  |......error(16,"|
00015e60  22 29 0d 8e 8a 05 cc 0d  8e 94 28 e7 20 ac 20 64  |")........(. . d|
00015e70  61 74 61 76 61 6c 69 64  20 f2 73 77 61 70 5f 64  |atavalid .swap_d|
00015e80  61 74 61 3a 64 61 74 61  76 61 6c 69 64 3d b9 0d  |ata:datavalid=..|
00015e90  8e 9e 20 21 72 64 61 74  61 25 3d 72 70 74 72 2b  |.. !rdata%=rptr+|
00015ea0  28 6c 61 73 74 5f 72 6f  6f 6d 3c 3c 31 36 29 0d  |(last_room<<16).|
00015eb0  8e a8 3a ff 20 22 53 41  56 45 20 22 2b 66 69 24  |..:. "SAVE "+fi$|
00015ec0  2b 22 20 22 2b c3 7e 72  64 61 74 61 25 2b 22 2b  |+" "+.~rdata%+"+|
00015ed0  22 2b c3 7e 28 72 5f 6c  65 6e 2a 28 6c 61 73 74  |"+.~(r_len*(last|
00015ee0  5f 72 6f 6f 6d 2b 31 29  29 0d 8e b2 1c ff 20 22  |_room+1))..... "|
00015ef0  53 45 54 54 59 50 45 20  22 2b 66 69 24 2b 22 20  |SETTYPE "+fi$+" |
00015f00  44 61 74 61 22 0d 8e bc  05 cd 0d 8e c6 05 e1 0d  |Data"...........|
00015f10  8e d0 04 0d 8e da 16 dd  20 f2 73 61 76 65 5f 66  |........ .save_f|
00015f20  6c 61 67 73 28 66 69 24  29 0d 8e e4 0e e7 20 66  |lags(fi$)..... f|
00015f30  69 24 3d 22 22 20 8c 0d  8e ee 11 f2 65 72 72 6f  |i$="" ......erro|
00015f40  72 28 31 36 2c 22 22 29  0d 8e f8 05 cc 0d 8f 02  |r(16,"")........|
00015f50  0e 63 68 6e 25 3d ae 20  66 69 24 0d 8f 0c 0e e3  |.chn%=. fi$.....|
00015f60  20 66 25 3d 30 20 b8 20  37 0d 8f 16 1e 66 6c 61  | f%=0 . 7....fla|
00015f70  67 24 3d 24 28 6f 5f 66  6c 61 67 73 25 2b 66 25  |g$=$(o_flags%+f%|
00015f80  2a 6d 61 78 64 25 29 0d  8f 20 10 f1 23 63 68 6e  |*maxd%).. ..#chn|
00015f90  25 2c 66 6c 61 67 24 0d  8f 2a 05 ed 0d 8f 34 0e  |%,flag$..*....4.|
00015fa0  e3 20 66 25 3d 30 20 b8  20 37 0d 8f 3e 1e 66 6c  |. f%=0 . 7..>.fl|
00015fb0  61 67 24 3d 24 28 72 5f  66 6c 61 67 73 25 2b 66  |ag$=$(r_flags%+f|
00015fc0  25 2a 6d 61 78 64 25 29  0d 8f 48 10 f1 23 63 68  |%*maxd%)..H..#ch|
00015fd0  6e 25 2c 66 6c 61 67 24  0d 8f 52 05 ed 0d 8f 5c  |n%,flag$..R....\|
00015fe0  0a d9 23 63 68 6e 25 0d  8f 66 05 cd 0d 8f 70 05  |..#chn%..f....p.|
00015ff0  e1 0d 8f 7a 04 0d 8f 84  14 dd 20 f2 73 61 76 65  |...z...... .save|
00016000  5f 70 69 78 28 66 69 24  29 0d 8f 8e 0e e7 20 66  |_pix(fi$)..... f|
00016010  69 24 3d 22 22 20 8c 0d  8f 98 11 f2 65 72 72 6f  |i$="" ......erro|
00016020  72 28 31 36 2c 22 22 29  0d 8f a2 05 cc 0d 8f ac  |r(16,"")........|
00016030  2d ff 20 22 53 41 56 45  20 22 2b 66 69 24 2b 22  |-. "SAVE "+fi$+"|
00016040  20 22 2b c3 7e 70 69 78  73 2b 22 20 22 2b c3 7e  | "+.~pixs+" "+.~|
00016050  28 6e 78 74 70 78 6e 2b  31 29 0d 8f b6 1c ff 20  |(nxtpxn+1)..... |
00016060  22 53 45 54 54 59 50 45  20 22 2b 66 69 24 2b 22  |"SETTYPE "+fi$+"|
00016070  20 44 61 74 61 22 0d 8f  c0 05 cd 0d 8f ca 05 e1  | Data"..........|
00016080  0d 8f d4 04 0d 8f de 18  dd 20 f2 73 61 76 65 5f  |......... .save_|
00016090  70 72 6f 67 72 61 6d 28  66 69 24 29 0d 8f e8 0e  |program(fi$)....|
000160a0  e7 20 66 69 24 3d 22 22  20 8c 0d 8f f2 11 f2 65  |. fi$="" ......e|
000160b0  72 72 6f 72 28 31 36 2c  22 22 29 0d 8f fc 05 cc  |rror(16,"").....|
000160c0  0d 90 06 34 ff 20 22 53  41 56 45 20 22 2b 66 69  |...4. "SAVE "+fi|
000160d0  24 2b 22 20 22 2b c3 7e  70 72 6f 67 72 61 6d 25  |$+" "+.~program%|
000160e0  2b 22 2b 22 2b c3 7e 28  a4 70 72 67 6c 65 6e 2b  |+"+"+.~(.prglen+|
000160f0  34 2b 31 29 0d 90 10 1c  ff 20 22 53 45 54 54 59  |4+1)..... "SETTY|
00016100  50 45 20 22 2b 66 69 24  2b 22 20 44 61 74 61 22  |PE "+fi$+" Data"|
00016110  0d 90 1a 05 cd 0d 90 24  05 e1 0d 90 2e 04 0d 90  |.......$........|
00016120  38 15 dd 20 f2 73 61 76  65 5f 74 65 78 74 28 66  |8.. .save_text(f|
00016130  69 24 29 0d 90 42 0e e7  20 66 69 24 3d 22 22 20  |i$)..B.. fi$="" |
00016140  8c 0d 90 4c 11 f2 65 72  72 6f 72 28 31 36 2c 22  |...L..error(16,"|
00016150  22 29 0d 90 56 05 cc 0d  90 60 2d ff 20 22 53 41  |")..V....`-. "SA|
00016160  56 45 20 22 2b 66 69 24  2b 22 20 22 2b c3 7e 74  |VE "+fi$+" "+.~t|
00016170  65 78 74 25 2b 22 20 22  2b c3 7e a4 74 65 78 74  |ext%+" "+.~.text|
00016180  5f 65 6e 64 0d 90 6a 1c  ff 20 22 53 45 54 54 59  |_end..j.. "SETTY|
00016190  50 45 20 22 2b 66 69 24  2b 22 20 44 61 74 61 22  |PE "+fi$+" Data"|
000161a0  0d 90 74 05 cd 0d 90 7e  05 e1 0d 90 88 04 0d 90  |..t....~........|
000161b0  92 15 dd 20 f2 73 61 76  65 5f 64 69 63 74 28 66  |... .save_dict(f|
000161c0  69 24 29 0d 90 9c 0e e7  20 66 69 24 3d 22 22 20  |i$)..... fi$="" |
000161d0  8c 0d 90 a6 11 f2 65 72  72 6f 72 28 31 36 2c 22  |......error(16,"|
000161e0  22 29 0d 90 b0 05 cc 0d  90 ba 3e ff 20 22 53 41  |")........>. "SA|
000161f0  56 45 20 22 2b 66 69 24  2b 22 20 22 2b c3 7e 64  |VE "+fi$+" "+.~d|
00016200  69 63 74 25 2b 22 20 22  2b c3 7e 28 64 69 63 74  |ict%+" "+.~(dict|
00016210  25 2b 3f 64 69 63 74 25  2b 32 35 36 2a 64 69 63  |%+?dict%+256*dic|
00016220  74 25 3f 31 29 0d 90 c4  1c ff 20 22 53 45 54 54  |t%?1)..... "SETT|
00016230  59 50 45 20 22 2b 66 69  24 2b 22 20 44 61 74 61  |YPE "+fi$+" Data|
00016240  22 0d 90 ce 05 cd 0d 90  d8 05 e1 0d 90 e2 04 0d  |"...............|
00016250  90 ec 13 dd 20 f2 6c 6f  61 64 5f 61 6c 6c 28 66  |.... .load_all(f|
00016260  24 29 0d 90 f6 1d f4 20  66 24 20 69 73 20 74 68  |$)..... f$ is th|
00016270  65 20 66 75 6c 6c 20 70  61 74 68 6e 61 6d 65 0d  |e full pathname.|
00016280  91 00 15 c8 99 20 22 48  6f 75 72 67 6c 61 73 73  |..... "Hourglass|
00016290  5f 4f 6e 22 0d 91 0a 3b  f2 63 6c 6f 73 65 28 74  |_On"...;.close(t|
000162a0  65 78 74 68 61 6e 64 6c  65 29 3a f2 63 6c 6f 73  |exthandle):.clos|
000162b0  65 28 6f 62 6a 68 61 6e  64 6c 65 29 3a f2 63 6c  |e(objhandle):.cl|
000162c0  6f 73 65 28 72 6f 6f 6d  68 61 6e 64 6c 65 29 0d  |ose(roomhandle).|
000162d0  91 14 1a 70 24 3d 66 24  3a 66 24 3d a4 6c 65 61  |...p$=f$:f$=.lea|
000162e0  66 6e 61 6d 65 28 70 24  29 0d 91 1e 17 70 24 3d  |fname(p$)....p$=|
000162f0  c0 70 24 2c a9 28 70 24  29 2d a9 28 66 24 29 29  |.p$,.(p$)-.(f$))|
00016300  0d 91 28 11 64 24 3d 70  24 2b 22 41 6c 70 73 2e  |..(.d$=p$+"Alps.|
00016310  22 0d 91 32 15 72 24 3d  70 24 2b 22 52 65 73 6f  |"..2.r$=p$+"Reso|
00016320  75 72 63 65 73 22 0d 91  3c 20 ff 28 22 53 45 54  |urces"..< .("SET|
00016330  20 55 73 65 72 73 24 52  65 73 6f 75 72 63 65 73  | Users$Resources|
00016340  20 22 2b 72 24 29 0d 91  46 2a ff 28 22 53 45 54  | "+r$)..F*.("SET|
00016350  20 41 6c 70 73 24 50 69  63 74 75 72 65 73 20 22  | Alps$Pictures "|
00016360  2b 70 24 2b 22 50 69 63  74 75 72 65 73 2e 22 29  |+p$+"Pictures.")|
00016370  0d 91 50 1a ff 28 22 53  45 54 20 41 6c 70 73 24  |..P..("SET Alps$|
00016380  44 61 74 61 20 22 2b 64  24 29 0d 91 5a 24 f2 6c  |Data "+d$)..Z$.l|
00016390  6f 61 64 5f 6f 62 6a 73  28 22 3c 41 6c 70 73 24  |oad_objs("<Alps$|
000163a0  44 61 74 61 3e 4f 62 6a  65 63 74 73 22 29 0d 91  |Data>Objects")..|
000163b0  64 23 f2 6c 6f 61 64 5f  72 6f 6f 6d 73 28 22 3c  |d#.load_rooms("<|
000163c0  41 6c 70 73 24 44 61 74  61 3e 52 6f 6f 6d 73 22  |Alps$Data>Rooms"|
000163d0  29 0d 91 6e 23 f2 6c 6f  61 64 5f 66 6c 61 67 73  |)..n#.load_flags|
000163e0  28 22 3c 41 6c 70 73 24  44 61 74 61 3e 46 6c 61  |("<Alps$Data>Fla|
000163f0  67 73 22 29 0d 91 78 24  f2 6c 6f 61 64 5f 70 69  |gs")..x$.load_pi|
00016400  78 28 22 3c 41 6c 70 73  24 44 61 74 61 3e 50 69  |x("<Alps$Data>Pi|
00016410  63 74 75 72 65 73 22 29  0d 91 82 13 f2 6c 6f 61  |ctures").....loa|
00016420  64 5f 76 6f 63 61 62 28  66 24 29 0d 91 8c 27 f2  |d_vocab(f$)...'.|
00016430  6c 6f 61 64 5f 70 72 6f  67 72 61 6d 28 22 3c 41  |load_program("<A|
00016440  6c 70 73 24 44 61 74 61  3e 50 72 6f 67 72 61 6d  |lps$Data>Program|
00016450  22 29 0d 91 96 21 f2 6c  6f 61 64 5f 74 65 78 74  |")...!.load_text|
00016460  28 22 3c 41 6c 70 73 24  44 61 74 61 3e 54 65 78  |("<Alps$Data>Tex|
00016470  74 22 29 0d 91 a0 21 f2  6c 6f 61 64 5f 64 69 63  |t")...!.load_dic|
00016480  74 28 22 3c 41 6c 70 73  24 44 61 74 61 3e 44 69  |t("<Alps$Data>Di|
00016490  63 74 22 29 0d 91 aa 21  ff 28 22 50 52 49 4e 54  |ct")...!.("PRINT|
000164a0  20 3c 41 6c 70 73 24 44  61 74 61 3e 63 68 61 72  | <Alps$Data>char|
000164b0  73 65 74 22 29 0d 91 b4  29 64 61 74 61 5f 73 61  |set")...)data_sa|
000164c0  76 65 64 3d b9 3a 6c 6f  61 64 65 64 24 3d 66 24  |ved=.:loaded$=f$|
000164d0  3a 24 66 69 6c 65 6e 61  6d 65 25 3d 66 24 0d 91  |:$filename%=f$..|
000164e0  be 16 c8 99 20 22 48 6f  75 72 67 6c 61 73 73 5f  |.... "Hourglass_|
000164f0  4f 66 66 22 0d 91 c8 05  e1 0d 91 d2 04 0d 91 dc  |Off"............|
00016500  15 dd 20 f2 6c 6f 61 64  5f 76 6f 63 61 62 28 66  |.. .load_vocab(f|
00016510  24 29 0d 91 e6 0d e7 20  66 24 3d 22 22 20 8c 0d  |$)..... f$="" ..|
00016520  91 f0 11 f2 65 72 72 6f  72 28 31 36 2c 22 22 29  |....error(16,"")|
00016530  0d 91 fa 05 cc 0d 92 04  23 f2 6c 6f 61 64 5f 6e  |........#.load_n|
00016540  6f 75 6e 73 28 22 3c 41  6c 70 73 24 44 61 74 61  |ouns("<Alps$Data|
00016550  3e 4e 6f 75 6e 73 22 29  0d 92 0e 23 f2 6c 6f 61  |>Nouns")...#.loa|
00016560  64 5f 76 65 72 62 73 28  22 3c 41 6c 70 73 24 44  |d_verbs("<Alps$D|
00016570  61 74 61 3e 56 65 72 62  73 22 29 0d 92 18 2a f2  |ata>Verbs")...*.|
00016580  6c 6f 61 64 5f 61 64 6a  65 63 74 73 28 22 3c 41  |load_adjects("<A|
00016590  6c 70 73 24 44 61 74 61  3e 41 64 6a 65 63 74 69  |lps$Data>Adjecti|
000165a0  76 65 73 22 29 0d 92 22  24 f2 6c 6f 61 64 5f 70  |ves").."$.load_p|
000165b0  72 65 70 73 28 22 3c 41  6c 70 73 24 44 61 74 61  |reps("<Alps$Data|
000165c0  3e 50 72 65 70 6f 73 22  29 0d 92 2c 24 f2 6c 6f  |>Prepos")..,$.lo|
000165d0  61 64 5f 63 6f 6e 6a 28  22 3c 41 6c 70 73 24 44  |ad_conj("<Alps$D|
000165e0  61 74 61 3e 43 6f 6e 6a  75 6e 63 22 29 0d 92 36  |ata>Conjunc")..6|
000165f0  25 f2 6c 6f 61 64 5f 73  70 65 63 28 22 3c 41 6c  |%.load_spec("<Al|
00016600  70 73 24 44 61 74 61 3e  53 70 65 63 69 61 6c 73  |ps$Data>Specials|
00016610  22 29 0d 92 40 23 f2 6c  6f 61 64 5f 6e 6f 69 73  |")..@#.load_nois|
00016620  65 28 22 3c 41 6c 70 73  24 44 61 74 61 3e 4e 6f  |e("<Alps$Data>No|
00016630  69 73 65 22 29 0d 92 4a  27 f2 6c 6f 61 64 5f 76  |ise")..J'.load_v|
00016640  74 79 70 65 73 28 22 3c  41 6c 70 73 24 44 61 74  |types("<Alps$Dat|
00016650  61 3e 56 65 72 62 54 79  70 65 22 29 0d 92 54 22  |a>VerbType")..T"|
00016660  f2 6c 6f 61 64 5f 6e 72  65 66 73 28 22 3c 41 6c  |.load_nrefs("<Al|
00016670  70 73 24 44 61 74 61 3e  4e 72 65 66 22 29 0d 92  |ps$Data>Nref")..|
00016680  5e 22 f2 6c 6f 61 64 5f  61 72 65 66 73 28 22 3c  |^".load_arefs("<|
00016690  41 6c 70 73 24 44 61 74  61 3e 41 72 65 66 22 29  |Alps$Data>Aref")|
000166a0  0d 92 68 05 cd 0d 92 72  05 e1 0d 92 7c 04 0d 92  |..h....r....|...|
000166b0  86 16 dd 20 f2 6c 6f 61  64 5f 6e 6f 75 6e 73 28  |... .load_nouns(|
000166c0  66 69 24 29 0d 92 90 0e  e7 20 66 69 24 3d 22 22  |fi$)..... fi$=""|
000166d0  20 8c 0d 92 9a 11 f2 65  72 72 6f 72 28 31 36 2c  | ......error(16,|
000166e0  22 22 29 0d 92 a4 05 cc  0d 92 ae 1d ff 20 22 4c  |"").......... "L|
000166f0  4f 41 44 20 22 2b 66 69  24 2b 22 20 22 2b c3 7e  |OAD "+fi$+" "+.~|
00016700  6e 6f 75 6e 73 0d 92 b8  0e 6f 62 6e 3d 3f 6e 6f  |nouns....obn=?no|
00016710  75 6e 73 0d 92 c2 28 6e  78 74 6f 62 6a 3d 6e 6f  |uns...(nxtobj=no|
00016720  75 6e 73 2b 28 6e 6f 75  6e 73 3f 31 2b 32 35 36  |uns+(nouns?1+256|
00016730  2a 28 6e 6f 75 6e 73 3f  32 29 29 0d 92 cc 05 cd  |*(nouns?2)).....|
00016740  0d 92 d6 05 e1 0d 92 e0  04 0d 92 ea 16 dd 20 f2  |.............. .|
00016750  6c 6f 61 64 5f 76 65 72  62 73 28 66 69 24 29 0d  |load_verbs(fi$).|
00016760  92 f4 0e e7 20 66 69 24  3d 22 22 20 8c 0d 92 fe  |.... fi$="" ....|
00016770  11 f2 65 72 72 6f 72 28  31 36 2c 22 22 29 0d 93  |..error(16,"")..|
00016780  08 05 cc 0d 93 12 1d ff  20 22 4c 4f 41 44 20 22  |........ "LOAD "|
00016790  2b 66 69 24 2b 22 20 22  2b c3 7e 76 65 72 62 73  |+fi$+" "+.~verbs|
000167a0  0d 93 1c 0e 76 62 6e 3d  3f 76 65 72 62 73 0d 93  |....vbn=?verbs..|
000167b0  26 28 6e 78 74 76 72 62  3d 76 65 72 62 73 2b 28  |&(nxtvrb=verbs+(|
000167c0  76 65 72 62 73 3f 31 2b  32 35 36 2a 28 76 65 72  |verbs?1+256*(ver|
000167d0  62 73 3f 32 29 29 0d 93  30 05 cd 0d 93 3a 05 e1  |bs?2))..0....:..|
000167e0  0d 93 44 04 0d 93 4e 18  dd 20 f2 6c 6f 61 64 5f  |..D...N.. .load_|
000167f0  61 64 6a 65 63 74 73 28  66 69 24 29 0d 93 58 0e  |adjects(fi$)..X.|
00016800  e7 20 66 69 24 3d 22 22  20 8c 0d 93 62 11 f2 65  |. fi$="" ...b..e|
00016810  72 72 6f 72 28 31 36 2c  22 22 29 0d 93 6c 05 cc  |rror(16,"")..l..|
00016820  0d 93 76 1f ff 20 22 4c  4f 41 44 20 22 2b 66 69  |..v.. "LOAD "+fi|
00016830  24 2b 22 20 22 2b c3 7e  61 64 6a 65 63 74 73 0d  |$+" "+.~adjects.|
00016840  93 80 10 61 64 6e 3d 3f  61 64 6a 65 63 74 73 0d  |...adn=?adjects.|
00016850  93 8a 2e 6e 78 74 61 64  6a 3d 61 64 6a 65 63 74  |...nxtadj=adject|
00016860  73 2b 28 61 64 6a 65 63  74 73 3f 31 2b 32 35 36  |s+(adjects?1+256|
00016870  2a 28 61 64 6a 65 63 74  73 3f 32 29 29 0d 93 94  |*(adjects?2))...|
00016880  05 cd 0d 93 9e 05 e1 0d  93 a8 04 0d 93 b2 16 dd  |................|
00016890  20 f2 6c 6f 61 64 5f 70  72 65 70 73 28 66 69 24  | .load_preps(fi$|
000168a0  29 0d 93 bc 0e e7 20 66  69 24 3d 22 22 20 8c 0d  |)..... fi$="" ..|
000168b0  93 c6 11 f2 65 72 72 6f  72 28 31 36 2c 22 22 29  |....error(16,"")|
000168c0  0d 93 d0 05 cc 0d 93 da  1d ff 20 22 4c 4f 41 44  |.......... "LOAD|
000168d0  20 22 2b 66 69 24 2b 22  20 22 2b c3 7e 70 72 65  | "+fi$+" "+.~pre|
000168e0  70 73 0d 93 e4 0e 70 72  6e 3d 3f 70 72 65 70 73  |ps....prn=?preps|
000168f0  0d 93 ee 28 6e 78 74 70  72 70 3d 70 72 65 70 73  |...(nxtprp=preps|
00016900  2b 28 70 72 65 70 73 3f  31 2b 32 35 36 2a 28 70  |+(preps?1+256*(p|
00016910  72 65 70 73 3f 32 29 29  0d 93 f8 05 cd 0d 94 02  |reps?2))........|
00016920  05 e1 0d 94 0c 04 0d 94  16 15 dd 20 f2 6c 6f 61  |........... .loa|
00016930  64 5f 63 6f 6e 6a 28 66  69 24 29 0d 94 20 0e e7  |d_conj(fi$).. ..|
00016940  20 66 69 24 3d 22 22 20  8c 0d 94 2a 11 f2 65 72  | fi$="" ...*..er|
00016950  72 6f 72 28 31 36 2c 22  22 29 0d 94 34 05 cc 0d  |ror(16,"")..4...|
00016960  94 3e 1d ff 20 22 4c 4f  41 44 20 22 2b 66 69 24  |.>.. "LOAD "+fi$|
00016970  2b 22 20 22 2b c3 7e 63  6f 6e 6a 73 0d 94 48 0e  |+" "+.~conjs..H.|
00016980  63 6a 6e 3d 3f 63 6f 6e  6a 73 0d 94 52 28 6e 78  |cjn=?conjs..R(nx|
00016990  74 63 6a 6e 3d 63 6f 6e  6a 73 2b 28 63 6f 6e 6a  |tcjn=conjs+(conj|
000169a0  73 3f 31 2b 32 35 36 2a  28 63 6f 6e 6a 73 3f 32  |s?1+256*(conjs?2|
000169b0  29 29 0d 94 5c 05 cd 0d  94 66 05 e1 0d 94 70 04  |))..\....f....p.|
000169c0  0d 94 7a 15 dd 20 f2 6c  6f 61 64 5f 73 70 65 63  |..z.. .load_spec|
000169d0  28 66 69 24 29 0d 94 84  0e e7 20 66 69 24 3d 22  |(fi$)..... fi$="|
000169e0  22 20 8c 0d 94 8e 11 f2  65 72 72 6f 72 28 31 36  |" ......error(16|
000169f0  2c 22 22 29 0d 94 98 05  cc 0d 94 a2 1d ff 20 22  |,"").......... "|
00016a00  4c 4f 41 44 20 22 2b 66  69 24 2b 22 20 22 2b c3  |LOAD "+fi$+" "+.|
00016a10  7e 73 70 65 63 73 0d 94  ac 0e 73 70 6e 3d 3f 73  |~specs....spn=?s|
00016a20  70 65 63 73 0d 94 b6 28  6e 78 74 73 70 6e 3d 73  |pecs...(nxtspn=s|
00016a30  70 65 63 73 2b 28 73 70  65 63 73 3f 31 2b 32 35  |pecs+(specs?1+25|
00016a40  36 2a 28 73 70 65 63 73  3f 32 29 29 0d 94 c0 05  |6*(specs?2))....|
00016a50  cd 0d 94 ca 05 e1 0d 94  d4 04 0d 94 de 16 dd 20  |............... |
00016a60  f2 6c 6f 61 64 5f 6e 6f  69 73 65 28 66 69 24 29  |.load_noise(fi$)|
00016a70  0d 94 e8 0e e7 20 66 69  24 3d 22 22 20 8c 0d 94  |..... fi$="" ...|
00016a80  f2 11 f2 65 72 72 6f 72  28 31 36 2c 22 22 29 0d  |...error(16,"").|
00016a90  94 fc 05 cc 0d 95 06 1d  ff 20 22 4c 4f 41 44 20  |......... "LOAD |
00016aa0  22 2b 66 69 24 2b 22 20  22 2b c3 7e 6e 6f 69 73  |"+fi$+" "+.~nois|
00016ab0  65 0d 95 10 0e 6e 73 6e  3d 3f 6e 6f 69 73 65 0d  |e....nsn=?noise.|
00016ac0  95 1a 28 6e 78 74 6e 73  6e 3d 6e 6f 69 73 65 2b  |..(nxtnsn=noise+|
00016ad0  28 6e 6f 69 73 65 3f 31  2b 32 35 36 2a 28 6e 6f  |(noise?1+256*(no|
00016ae0  69 73 65 3f 32 29 29 0d  95 24 05 cd 0d 95 2e 05  |ise?2))..$......|
00016af0  e1 0d 95 38 04 0d 95 42  17 dd 20 f2 6c 6f 61 64  |...8...B.. .load|
00016b00  5f 76 74 79 70 65 73 28  66 69 24 29 0d 95 4c 0e  |_vtypes(fi$)..L.|
00016b10  e7 20 66 69 24 3d 22 22  20 8c 0d 95 56 11 f2 65  |. fi$="" ...V..e|
00016b20  72 72 6f 72 28 31 36 2c  22 22 29 0d 95 60 05 cc  |rror(16,"")..`..|
00016b30  0d 95 6a 21 ff 20 22 4c  4f 41 44 20 22 2b 66 69  |..j!. "LOAD "+fi|
00016b40  24 2b 22 20 22 2b c3 7e  76 65 72 62 5f 74 79 70  |$+" "+.~verb_typ|
00016b50  65 0d 95 74 05 cd 0d 95  7e 05 e1 0d 95 88 04 0d  |e..t....~.......|
00016b60  95 92 16 dd 20 f2 6c 6f  61 64 5f 61 72 65 66 73  |.... .load_arefs|
00016b70  28 66 69 24 29 0d 95 9c  0e e7 20 66 69 24 3d 22  |(fi$)..... fi$="|
00016b80  22 20 8c 0d 95 a6 11 f2  65 72 72 6f 72 28 31 36  |" ......error(16|
00016b90  2c 22 22 29 0d 95 b0 05  cc 0d 95 ba 1c ff 20 22  |,"").......... "|
00016ba0  4c 4f 41 44 20 22 2b 66  69 24 2b 22 20 22 2b c3  |LOAD "+fi$+" "+.|
00016bb0  7e 61 72 65 66 0d 95 c4  05 cd 0d 95 ce 05 e1 0d  |~aref...........|
00016bc0  95 d8 04 0d 95 e2 16 dd  20 f2 6c 6f 61 64 5f 6e  |........ .load_n|
00016bd0  72 65 66 73 28 66 69 24  29 0d 95 ec 0e e7 20 66  |refs(fi$)..... f|
00016be0  69 24 3d 22 22 20 8c 0d  95 f6 11 f2 65 72 72 6f  |i$="" ......erro|
00016bf0  72 28 31 36 2c 22 22 29  0d 96 00 05 cc 0d 96 0a  |r(16,"")........|
00016c00  1c ff 20 22 4c 4f 41 44  20 22 2b 66 69 24 2b 22  |.. "LOAD "+fi$+"|
00016c10  20 22 2b c3 7e 6e 72 65  66 0d 96 14 05 cd 0d 96  | "+.~nref.......|
00016c20  1e 05 e1 0d 96 28 04 0d  96 32 15 dd 20 f2 6c 6f  |.....(...2.. .lo|
00016c30  61 64 5f 6f 62 6a 73 28  66 69 24 29 0d 96 3c 0e  |ad_objs(fi$)..<.|
00016c40  e7 20 66 69 24 3d 22 22  20 8c 0d 96 46 11 f2 65  |. fi$="" ...F..e|
00016c50  72 72 6f 72 28 31 36 2c  22 22 29 0d 96 50 05 cc  |rror(16,"")..P..|
00016c60  0d 96 5a 1e ff 20 22 4c  4f 41 44 20 22 2b 66 69  |..Z.. "LOAD "+fi|
00016c70  24 2b 22 20 22 2b c3 7e  6f 64 61 74 61 25 0d 96  |$+" "+.~odata%..|
00016c80  64 12 6f 70 74 72 3d 6f  64 61 74 61 25 3f 31 34  |d.optr=odata%?14|
00016c90  0d 96 6e 19 6c 61 73 74  5f 6f 62 6a 65 63 74 3d  |..n.last_object=|
00016ca0  6f 64 61 74 61 25 3f 31  35 0d 96 78 05 cd 0d 96  |odata%?15..x....|
00016cb0  82 05 e1 0d 96 8c 04 0d  96 96 16 dd 20 f2 6c 6f  |............ .lo|
00016cc0  61 64 5f 72 6f 6f 6d 73  28 66 69 24 29 0d 96 a0  |ad_rooms(fi$)...|
00016cd0  0e e7 20 66 69 24 3d 22  22 20 8c 0d 96 aa 11 f2  |.. fi$="" ......|
00016ce0  65 72 72 6f 72 28 31 36  2c 22 22 29 0d 96 b4 05  |error(16,"")....|
00016cf0  cc 0d 96 be 1e ff 20 22  4c 4f 41 44 20 22 2b 66  |...... "LOAD "+f|
00016d00  69 24 2b 22 20 22 2b c3  7e 72 64 61 74 61 25 0d  |i$+" "+.~rdata%.|
00016d10  96 c8 18 72 70 74 72 3d  21 72 64 61 74 61 25 20  |...rptr=!rdata% |
00016d20  80 20 26 46 46 46 46 0d  96 d2 27 6c 61 73 74 5f  |. &FFFF...'last_|
00016d30  72 6f 6f 6d 3d 28 21 72  64 61 74 61 25 20 80 20  |room=(!rdata% . |
00016d40  26 46 46 46 46 30 30 30  30 29 3e 3e 31 36 0d 96  |&FFFF0000)>>16..|
00016d50  dc 05 cd 0d 96 e6 05 e1  0d 96 f0 04 0d 96 fa 16  |................|
00016d60  dd 20 f2 6c 6f 61 64 5f  66 6c 61 67 73 28 66 69  |. .load_flags(fi|
00016d70  24 29 0d 97 04 0e e7 20  66 69 24 3d 22 22 20 8c  |$)..... fi$="" .|
00016d80  0d 97 0e 11 f2 65 72 72  6f 72 28 31 36 2c 22 22  |.....error(16,""|
00016d90  29 0d 97 18 05 cc 0d 97  22 0e 63 68 6e 25 3d 8e  |).......".chn%=.|
00016da0  20 66 69 24 0d 97 2c 0e  e3 20 66 25 3d 30 20 b8  | fi$..,.. f%=0 .|
00016db0  20 37 0d 97 36 10 e8 23  63 68 6e 25 2c 66 6c 61  | 7..6..#chn%,fla|
00016dc0  67 24 0d 97 40 1e 24 28  6f 5f 66 6c 61 67 73 25  |g$..@.$(o_flags%|
00016dd0  2b 66 25 2a 6d 61 78 64  25 29 3d 66 6c 61 67 24  |+f%*maxd%)=flag$|
00016de0  0d 97 4a 05 ed 0d 97 54  04 0d 97 5e 0e e3 20 66  |..J....T...^.. f|
00016df0  25 3d 30 20 b8 20 37 0d  97 68 10 e8 23 63 68 6e  |%=0 . 7..h..#chn|
00016e00  25 2c 66 6c 61 67 24 0d  97 72 1e 24 28 72 5f 66  |%,flag$..r.$(r_f|
00016e10  6c 61 67 73 25 2b 66 25  2a 6d 61 78 64 25 29 3d  |lags%+f%*maxd%)=|
00016e20  66 6c 61 67 24 0d 97 7c  05 ed 0d 97 86 0a d9 23  |flag$..|.......#|
00016e30  63 68 6e 25 0d 97 90 05  cd 0d 97 9a 05 e1 0d 97  |chn%............|
00016e40  a4 04 0d 97 ae 14 dd 20  f2 6c 6f 61 64 5f 70 69  |....... .load_pi|
00016e50  78 28 66 69 24 29 0d 97  b8 0e e7 20 66 69 24 3d  |x(fi$)..... fi$=|
00016e60  22 22 20 8c 0d 97 c2 11  f2 65 72 72 6f 72 28 31  |"" ......error(1|
00016e70  36 2c 22 22 29 0d 97 cc  05 cc 0d 97 d6 1c ff 20  |6,"").......... |
00016e80  22 4c 4f 41 44 20 22 2b  66 69 24 2b 22 20 22 2b  |"LOAD "+fi$+" "+|
00016e90  c3 7e 70 69 78 73 0d 97  e0 0d 70 78 6e 3d 3f 70  |.~pixs....pxn=?p|
00016ea0  69 78 73 0d 97 ea 25 6e  78 74 70 78 6e 3d 70 69  |ixs...%nxtpxn=pi|
00016eb0  78 73 2b 28 70 69 78 73  3f 31 2b 32 35 36 2a 28  |xs+(pixs?1+256*(|
00016ec0  70 69 78 73 3f 32 29 29  0d 97 f4 05 cd 0d 97 fe  |pixs?2))........|
00016ed0  05 e1 0d 98 08 04 0d 98  12 18 dd 20 f2 6c 6f 61  |........... .loa|
00016ee0  64 5f 70 72 6f 67 72 61  6d 28 66 69 24 29 0d 98  |d_program(fi$)..|
00016ef0  1c 0e e7 20 66 69 24 3d  22 22 20 8c 0d 98 26 11  |... fi$="" ...&.|
00016f00  f2 65 72 72 6f 72 28 31  36 2c 22 22 29 0d 98 30  |.error(16,"")..0|
00016f10  05 cc 0d 98 3a 20 ff 20  22 4c 4f 41 44 20 22 2b  |....: . "LOAD "+|
00016f20  66 69 24 2b 22 20 22 2b  c3 7e 70 72 6f 67 72 61  |fi$+" "+.~progra|
00016f30  6d 25 0d 98 44 05 cd 0d  98 4e 05 e1 0d 98 58 04  |m%..D....N....X.|
00016f40  0d 98 62 15 dd 20 f2 6c  6f 61 64 5f 74 65 78 74  |..b.. .load_text|
00016f50  28 66 69 24 29 0d 98 6c  0e e7 20 66 69 24 3d 22  |(fi$)..l.. fi$="|
00016f60  22 20 8c 0d 98 76 11 f2  65 72 72 6f 72 28 31 36  |" ...v..error(16|
00016f70  2c 22 22 29 0d 98 80 05  cc 0d 98 8a 1d ff 20 22  |,"").......... "|
00016f80  4c 4f 41 44 20 22 2b 66  69 24 2b 22 20 22 2b c3  |LOAD "+fi$+" "+.|
00016f90  7e 74 65 78 74 25 0d 98  94 0a 6d 70 74 72 3d 31  |~text%....mptr=1|
00016fa0  0d 98 9e 05 cd 0d 98 a8  05 e1 0d 98 b2 04 0d 98  |................|
00016fb0  bc 15 dd 20 f2 6c 6f 61  64 5f 64 69 63 74 28 66  |... .load_dict(f|
00016fc0  69 24 29 0d 98 c6 0b ea  20 49 25 2c 4c 25 0d 98  |i$)..... I%,L%..|
00016fd0  d0 0e e7 20 66 69 24 3d  22 22 20 8c 0d 98 da 11  |... fi$="" .....|
00016fe0  f2 65 72 72 6f 72 28 31  36 2c 22 22 29 0d 98 e4  |.error(16,"")...|
00016ff0  05 cc 0d 98 ee 1d ff 20  22 4c 4f 41 44 20 22 2b  |....... "LOAD "+|
00017000  66 69 24 2b 22 20 22 2b  c3 7e 64 69 63 74 25 0d  |fi$+" "+.~dict%.|
00017010  98 f8 15 74 6f 6b 25 3d  64 69 63 74 25 3f 32 3a  |...tok%=dict%?2:|
00017020  4c 25 3d 30 0d 99 02 21  e7 20 74 6f 6b 25 3d 30  |L%=0...!. tok%=0|
00017030  20 74 6f 6b 25 3d 31 32  38 20 8b 20 74 6f 6b 25  | tok%=128 . tok%|
00017040  2d 3d 31 32 38 0d 99 0c  11 e3 20 49 25 3d 31 20  |-=128..... I%=1 |
00017050  b8 20 74 6f 6b 25 0d 99  16 1a 74 6f 6b 24 28 49  |. tok%....tok$(I|
00017060  25 29 3d 24 28 64 69 63  74 25 2b 33 2b 4c 25 29  |%)=$(dict%+3+L%)|
00017070  0d 99 20 13 4c 25 2b 3d  a9 74 6f 6b 24 28 49 25  |.. .L%+=.tok$(I%|
00017080  29 2b 31 0d 99 2a 05 ed  0d 99 34 05 cd 0d 99 3e  |)+1..*....4....>|
00017090  05 e1 0d 99 48 04 0d 99  52 15 dd 20 f2 73 65 74  |....H...R.. .set|
000170a0  75 70 5f 64 69 73 6b 28  53 25 29 0d 99 5c 1d f2  |up_disk(S%)..\..|
000170b0  67 65 74 77 28 73 65 74  75 70 68 29 3a f2 67 65  |getw(setuph):.ge|
000170c0  74 70 6f 69 6e 74 65 72  0d 99 66 34 f2 6f 70 65  |tpointer..f4.ope|
000170d0  6e 28 73 65 74 75 70 68  2c 6d 6f 75 73 65 78 25  |n(setuph,mousex%|
000170e0  2d 36 34 2c 6d 6f 75 73  65 79 25 2c 78 31 25 2d  |-64,mousey%,x1%-|
000170f0  78 30 25 2c 79 31 25 2d  79 30 25 29 0d 99 70 43  |x0%,y1%-y0%)..pC|
00017100  f2 73 79 73 5f 63 6c 61  69 6d 69 6e 70 75 74 66  |.sys_claiminputf|
00017110  6f 63 75 73 28 73 65 74  75 70 68 2c 32 2c 30 2c  |ocus(setuph,2,0,|
00017120  30 2c 2d 31 2c a9 28 a4  67 65 74 69 63 6f 6e 64  |0,-1,.(.geticond|
00017130  61 74 61 28 73 65 74 75  70 68 2c 32 29 29 29 0d  |ata(setuph,2))).|
00017140  99 7a 11 f2 67 65 74 77  28 73 65 74 75 70 68 29  |.z..getw(setuph)|
00017150  0d 99 84 21 c8 97 20 c8  93 20 78 30 25 2c 79 30  |...!.. .. x0%,y0|
00017160  25 2c 78 31 25 2d 78 30  25 2c 79 31 25 2d 79 30  |%,x1%-x0%,y1%-y0|
00017170  25 0d 99 8e 10 64 69 61  6c 6f 67 75 65 25 3d 53  |%....dialogue%=S|
00017180  25 0d 99 98 05 e1 0d 99  a2 04 0d 99 ac 0f dd 20  |%.............. |
00017190  f2 71 75 69 74 28 53 25  29 0d 99 b6 14 e7 20 ac  |.quit(S%)..... .|
000171a0  20 64 61 74 61 5f 73 61  76 65 64 20 8c 0d 99 c0  | data_saved ....|
000171b0  5e 61 6e 73 20 3d 20 a4  65 72 72 6f 72 62 6f 78  |^ans = .errorbox|
000171c0  28 22 54 68 65 72 65 20  69 73 20 75 6e 73 61 76  |("There is unsav|
000171d0  65 64 20 64 61 74 61 20  69 6e 20 74 68 65 20 6d  |ed data in the m|
000171e0  65 6d 6f 72 79 2e 20 44  6f 20 79 6f 75 20 72 65  |emory. Do you re|
000171f0  61 6c 6c 79 20 77 61 6e  74 20 74 6f 20 71 75 69  |ally want to qui|
00017200  74 3f 22 2c 30 2c 33 2c  53 25 29 0d 99 ca 05 cc  |t?",0,3,S%).....|
00017210  0d 99 d4 0b 71 75 69 74  25 3d b9 0d 99 de 05 cd  |....quit%=......|
00017220  0d 99 e8 05 e1 0d 99 f2  04 0d 99 fc 14 dd 20 f2  |.............. .|
00017230  65 6e 73 75 72 65 28 53  25 2c 54 24 29 0d 9a 06  |ensure(S%,T$)...|
00017240  22 64 69 61 6c 6f 67 75  65 25 3d a4 65 72 72 6f  |"dialogue%=.erro|
00017250  72 62 6f 78 28 54 24 2c  30 2c 33 2c 53 25 29 0d  |rbox(T$,0,3,S%).|
00017260  9a 10 05 e1 0d 9a 1a 04  0d 9a 24 04 0d 9a 2e 27  |..........$....'|
00017270  f4 20 2d 2d 2d 2d 2d 2d  20 56 6f 63 61 62 75 6c  |. ------ Vocabul|
00017280  61 72 79 20 72 6f 75 74  69 6e 65 73 20 2d 2d 2d  |ary routines ---|
00017290  2d 2d 2d 0d 9a 38 04 0d  9a 42 23 dd 20 f2 67 65  |---..8...B#. .ge|
000172a0  74 6f 62 6e 28 74 65 78  74 24 2c f8 20 6e 75 6d  |tobn(text$,. num|
000172b0  2c f8 20 66 6f 75 6e 64  24 29 0d 9a 4c 2f 73 70  |,. found$)..L/sp|
000172c0  74 72 3d 6e 6f 75 6e 73  2b 33 3a f2 73 65 61 72  |tr=nouns+3:.sear|
000172d0  63 68 28 73 70 74 72 2c  74 65 78 74 24 2c 6e 75  |ch(sptr,text$,nu|
000172e0  6d 2c 66 6f 75 6e 64 24  29 0d 9a 56 05 e1 0d 9a  |m,found$)..V....|
000172f0  60 04 0d 9a 6a 23 dd 20  f2 67 65 74 76 62 6e 28  |`...j#. .getvbn(|
00017300  74 65 78 74 24 2c f8 20  6e 75 6d 2c f8 20 66 6f  |text$,. num,. fo|
00017310  75 6e 64 24 29 0d 9a 74  2f 73 70 74 72 3d 76 65  |und$)..t/sptr=ve|
00017320  72 62 73 2b 33 3a f2 73  65 61 72 63 68 28 73 70  |rbs+3:.search(sp|
00017330  74 72 2c 74 65 78 74 24  2c 6e 75 6d 2c 66 6f 75  |tr,text$,num,fou|
00017340  6e 64 24 29 0d 9a 7e 05  e1 0d 9a 88 04 0d 9a 92  |nd$)..~.........|
00017350  23 dd 20 f2 67 65 74 61  64 6e 28 74 65 78 74 24  |#. .getadn(text$|
00017360  2c f8 20 6e 75 6d 2c f8  20 66 6f 75 6e 64 24 29  |,. num,. found$)|
00017370  0d 9a 9c 31 73 70 74 72  3d 61 64 6a 65 63 74 73  |...1sptr=adjects|
00017380  2b 33 3a f2 73 65 61 72  63 68 28 73 70 74 72 2c  |+3:.search(sptr,|
00017390  74 65 78 74 24 2c 6e 75  6d 2c 66 6f 75 6e 64 24  |text$,num,found$|
000173a0  29 0d 9a a6 05 e1 0d 9a  b0 04 0d 9a ba 23 dd 20  |)............#. |
000173b0  f2 67 65 74 70 72 6e 28  74 65 78 74 24 2c f8 20  |.getprn(text$,. |
000173c0  6e 75 6d 2c f8 20 66 6f  75 6e 64 24 29 0d 9a c4  |num,. found$)...|
000173d0  2f 73 70 74 72 3d 70 72  65 70 73 2b 33 3a f2 73  |/sptr=preps+3:.s|
000173e0  65 61 72 63 68 28 73 70  74 72 2c 74 65 78 74 24  |earch(sptr,text$|
000173f0  2c 6e 75 6d 2c 66 6f 75  6e 64 24 29 0d 9a ce 05  |,num,found$)....|
00017400  e1 0d 9a d8 04 0d 9a e2  23 dd 20 f2 67 65 74 63  |........#. .getc|
00017410  6a 6e 28 74 65 78 74 24  2c f8 20 6e 75 6d 2c f8  |jn(text$,. num,.|
00017420  20 66 6f 75 6e 64 24 29  0d 9a ec 2f 73 70 74 72  | found$).../sptr|
00017430  3d 63 6f 6e 6a 73 2b 33  3a f2 73 65 61 72 63 68  |=conjs+3:.search|
00017440  28 73 70 74 72 2c 74 65  78 74 24 2c 6e 75 6d 2c  |(sptr,text$,num,|
00017450  66 6f 75 6e 64 24 29 0d  9a f6 05 e1 0d 9b 00 04  |found$).........|
00017460  0d 9b 0a 23 dd 20 f2 67  65 74 73 70 6e 28 74 65  |...#. .getspn(te|
00017470  78 74 24 2c f8 20 6e 75  6d 2c f8 20 66 6f 75 6e  |xt$,. num,. foun|
00017480  64 24 29 0d 9b 14 2f 73  70 74 72 3d 73 70 65 63  |d$).../sptr=spec|
00017490  73 2b 33 3a f2 73 65 61  72 63 68 28 73 70 74 72  |s+3:.search(sptr|
000174a0  2c 74 65 78 74 24 2c 6e  75 6d 2c 66 6f 75 6e 64  |,text$,num,found|
000174b0  24 29 0d 9b 1e 05 e1 0d  9b 28 04 0d 9b 32 23 dd  |$).......(...2#.|
000174c0  20 f2 67 65 74 6e 73 6e  28 74 65 78 74 24 2c f8  | .getnsn(text$,.|
000174d0  20 6e 75 6d 2c f8 20 66  6f 75 6e 64 24 29 0d 9b  | num,. found$)..|
000174e0  3c 2f 73 70 74 72 3d 6e  6f 69 73 65 2b 33 3a f2  |</sptr=noise+3:.|
000174f0  73 65 61 72 63 68 28 73  70 74 72 2c 74 65 78 74  |search(sptr,text|
00017500  24 2c 6e 75 6d 2c 66 6f  75 6e 64 24 29 0d 9b 46  |$,num,found$)..F|
00017510  05 e1 0d 9b 50 04 0d 9b  5a 2c dd 20 f2 73 65 61  |....P...Z,. .sea|
00017520  72 63 68 28 73 70 74 72  2c 73 65 61 72 63 68 24  |rch(sptr,search$|
00017530  2c f8 20 6e 75 6d 62 65  72 2c f8 20 74 65 6d 70  |,. number,. temp|
00017540  24 29 0d 9b 64 11 ea 20  74 65 6d 70 24 2c 66 6f  |$)..d.. temp$,fo|
00017550  75 6e 64 0d 9b 6e 0c 6e  75 6d 62 65 72 3d 30 0d  |und..n.number=0.|
00017560  9b 78 48 46 25 3d 77 6f  72 6b 25 3a 42 25 3d 73  |.xHF%=work%:B%=s|
00017570  70 74 72 3a 24 28 77 6f  72 6b 25 2b 26 31 32 38  |ptr:$(work%+&128|
00017580  29 3d 73 65 61 72 63 68  24 3a f4 20 70 75 74 20  |)=search$:. put |
00017590  73 65 61 72 63 68 20 73  74 72 69 6e 67 20 69 6e  |search string in|
000175a0  20 27 74 65 78 74 27 0d  9b 82 0c d6 20 73 65 61  | 'text'..... sea|
000175b0  72 63 68 0d 9b 8c 18 6e  75 6d 62 65 72 3d 21 28  |rch....number=!(|
000175c0  77 6f 72 6b 25 2b 26 31  34 38 29 0d 9b 96 05 e1  |work%+&148).....|
000175d0  0d 9b a0 04 0d 9b aa 17  dd 20 f2 77 6f 72 64 28  |......... .word(|
000175e0  74 79 70 65 2c 6c 69 6e  65 24 29 0d 9b b4 31 f4  |type,line$)...1.|
000175f0  20 41 64 64 20 77 6f 72  64 73 20 74 6f 20 74 68  | Add words to th|
00017600  65 20 76 6f 63 61 62 75  6c 61 72 79 20 6f 72 20  |e vocabulary or |
00017610  70 69 63 74 75 72 65 20  6c 69 73 74 0d 9b be 3b  |picture list...;|
00017620  f4 20 77 6f 72 64 20 74  79 70 65 73 20 61 72 65  |. word types are|
00017630  20 2d 20 6e 6f 75 6e 73  20 3d 20 31 2c 20 76 65  | - nouns = 1, ve|
00017640  72 62 73 20 3d 20 32 2c  20 61 64 6a 65 63 74 69  |rbs = 2, adjecti|
00017650  76 65 73 20 3d 20 33 0d  9b c8 47 f4 20 20 20 20  |ves = 3...G.    |
00017660  20 20 20 20 20 20 20 20  20 20 20 20 20 20 70 72  |              pr|
00017670  65 70 6f 73 69 74 69 6f  6e 73 20 3d 20 34 2c 20  |epositions = 4, |
00017680  63 6f 6e 6a 75 6e 63 74  69 6f 6e 73 20 3d 20 35  |conjunctions = 5|
00017690  2c 20 73 70 65 63 69 61  6c 73 20 3d 20 36 0d 9b  |, specials = 6..|
000176a0  d2 29 f4 20 20 20 20 20  20 20 20 20 20 20 20 20  |.).             |
000176b0  20 20 20 20 20 70 69 63  74 75 72 65 20 6e 61 6d  |     picture nam|
000176c0  65 73 20 3d 20 31 30 0d  9b dc 21 ea 20 69 6e 64  |es = 10...!. ind|
000176d0  65 78 2c 70 74 72 2c 49  25 2c 6c 65 6e 2c 6c 65  |ex,ptr,I%,len,le|
000176e0  6e 32 2c 74 65 6d 70 24  0d 9b e6 04 0d 9b f0 12  |n2,temp$........|
000176f0  e7 20 6c 69 6e 65 24 3d  22 22 20 8c 20 e1 0d 9b  |. line$="" . ...|
00017700  fa 04 0d 9c 04 23 c8 95  20 a7 22 30 31 32 33 34  |.....#.. ."01234|
00017710  35 36 37 38 39 3d 22 2c  c0 6c 69 6e 65 24 2c 31  |56789=",.line$,1|
00017720  29 29 3c 3e 30 0d 9c 0e  13 6c 69 6e 65 24 3d c1  |))<>0....line$=.|
00017730  6c 69 6e 65 24 2c 32 29  0d 9c 18 05 ce 0d 9c 22  |line$,2)......."|
00017740  04 0d 9c 2c 14 c8 95 20  c0 6c 69 6e 65 24 2c 31  |...,... .line$,1|
00017750  29 3d 22 20 22 0d 9c 36  13 6c 69 6e 65 24 3d c1  |)=" "..6.line$=.|
00017760  6c 69 6e 65 24 2c 32 29  0d 9c 40 05 ce 0d 9c 4a  |line$,2)..@....J|
00017770  04 0d 9c 54 18 e7 20 74  79 70 65 3c 34 20 84 20  |...T.. type<4 . |
00017780  74 79 70 65 3d 31 30 20  8c 0d 9c 5e 37 65 6e 64  |type=10 ...^7end|
00017790  3d a7 6c 69 6e 65 24 2c  22 3c 22 29 3a e7 20 65  |=.line$,"<"):. e|
000177a0  6e 64 3d 30 20 8c 20 f2  65 72 72 6f 72 28 32 32  |nd=0 . .error(22|
000177b0  2c 22 22 29 3a 65 72 72  66 6c 61 67 3d b9 3a e1  |,""):errflag=.:.|
000177c0  0d 9c 68 2d 6e 75 6d 62  65 72 24 3d c1 6c 69 6e  |..h-number$=.lin|
000177d0  65 24 2c 65 6e 64 2b 31  29 3a 6c 69 6e 65 24 3d  |e$,end+1):line$=|
000177e0  c0 6c 69 6e 65 24 2c 65  6e 64 2d 31 29 0d 9c 72  |.line$,end-1)..r|
000177f0  34 e7 20 c2 6e 75 6d 62  65 72 24 2c 31 29 3d 22  |4. .number$,1)="|
00017800  3e 22 20 8c 20 6e 75 6d  62 65 72 24 3d c0 6e 75  |>" . number$=.nu|
00017810  6d 62 65 72 24 2c a9 6e  75 6d 62 65 72 24 2d 31  |mber$,.number$-1|
00017820  29 0d 9c 7c 05 cc 0d 9c  86 0e 6e 75 6d 62 65 72  |)..|......number|
00017830  24 3d 22 22 0d 9c 90 05  cd 0d 9c 9a 04 0d 9c a4  |$=""............|
00017840  12 e7 20 6e 75 6d 62 65  72 24 3d 22 22 20 8c 0d  |.. number$="" ..|
00017850  9c ae 0d c8 8e 20 74 79  70 65 20 ca 0d 9c b8 09  |..... type .....|
00017860  c9 20 31 2c 33 0d 9c c2  12 6e 75 6d 62 65 72 24  |. 1,3....number$|
00017870  3d c3 28 6f 62 6e 29 0d  9c cc 07 c9 20 32 0d 9c  |=.(obn)..... 2..|
00017880  d6 2b 6e 75 6d 62 65 72  24 3d 22 30 22 3a f4 20  |.+number$="0":. |
00017890  44 65 66 61 75 6c 74 20  76 65 72 62 20 74 79 70  |Default verb typ|
000178a0  65 20 69 73 20 7a 65 72  6f 0d 9c e0 05 7f 0d 9c  |e is zero.......|
000178b0  ea 0e 6e 75 6d 62 65 72  24 3d 22 22 0d 9c f4 05  |..number$=""....|
000178c0  cb 0d 9c fe 05 cd 0d 9d  08 04 0d 9d 12 0b 69 6e  |..............in|
000178d0  64 65 78 3d 30 0d 9d 1c  13 70 74 72 3d a7 6c 69  |dex=0....ptr=.li|
000178e0  6e 65 24 2c 22 2c 22 29  0d 9d 26 0d e7 20 70 74  |ne$,",")..&.. pt|
000178f0  72 3d 30 20 8c 0d 9d 30  21 61 5f 6c 69 73 74 24  |r=0 ...0!a_list$|
00017900  28 69 6e 64 65 78 29 3d  c0 6c 69 6e 65 24 2c 6d  |(index)=.line$,m|
00017910  61 78 6c 65 6e 29 0d 9d  3a 05 cc 0d 9d 44 18 c8  |axlen)..:....D..|
00017920  95 20 70 74 72 3c 3e 30  20 80 20 69 6e 64 65 78  |. ptr<>0 . index|
00017930  3c 31 31 0d 9d 4e 17 74  65 6d 70 24 3d c0 6c 69  |<11..N.temp$=.li|
00017940  6e 65 24 2c 70 74 72 2d  31 29 0d 9d 58 10 6c 65  |ne$,ptr-1)..X.le|
00017950  6e 3d a9 28 6c 69 6e 65  24 29 0d 9d 62 19 6c 69  |n=.(line$)..b.li|
00017960  6e 65 24 3d c2 6c 69 6e  65 24 2c 6c 65 6e 2d 70  |ne$=.line$,len-p|
00017970  74 72 29 0d 9d 6c 21 61  5f 6c 69 73 74 24 28 69  |tr)..l!a_list$(i|
00017980  6e 64 65 78 29 3d c0 74  65 6d 70 24 2c 6d 61 78  |ndex)=.temp$,max|
00017990  6c 65 6e 29 0d 9d 76 0c  69 6e 64 65 78 2b 3d 31  |len)..v.index+=1|
000179a0  0d 9d 80 13 70 74 72 3d  a7 6c 69 6e 65 24 2c 22  |....ptr=.line$,"|
000179b0  2c 22 29 0d 9d 8a 05 ce  0d 9d 94 21 61 5f 6c 69  |,")........!a_li|
000179c0  73 74 24 28 69 6e 64 65  78 29 3d c0 6c 69 6e 65  |st$(index)=.line|
000179d0  24 2c 6d 61 78 6c 65 6e  29 0d 9d 9e 05 cd 0d 9d  |$,maxlen).......|
000179e0  a8 04 0d 9d b2 0d c8 8e  20 74 79 70 65 20 ca 0d  |........ type ..|
000179f0  9d bc 04 0d 9d c6 07 c9  20 31 0d 9d d0 12 e7 20  |........ 1..... |
00017a00  6f 62 6e 3d 6d 61 78 6f  62 6e 20 8c 0d 9d da 29  |obn=maxobn ....)|
00017a10  f2 65 72 72 6f 72 28 31  37 2c 22 61 74 20 22 2b  |.error(17,"at "+|
00017a20  61 5f 6c 69 73 74 24 28  30 29 29 3a 65 72 72 66  |a_list$(0)):errf|
00017a30  6c 61 67 3d b9 0d 9d e4  05 cc 0d 9d ee 12 e3 20  |lag=........... |
00017a40  49 25 3d 30 20 b8 20 69  6e 64 65 78 0d 9d f8 18  |I%=0 . index....|
00017a50  20 20 6c 65 6e 32 3d a9  20 61 5f 6c 69 73 74 24  |  len2=. a_list$|
00017a60  28 49 25 29 0d 9e 02 10  20 20 e7 20 6c 65 6e 32  |(I%)....  . len2|
00017a70  3e 30 20 8c 0d 9e 0c 23  20 20 f2 67 65 74 6f 62  |>0 ....#  .getob|
00017a80  6e 28 61 5f 6c 69 73 74  24 28 49 25 29 2c 6e 75  |n(a_list$(I%),nu|
00017a90  6d 2c 66 6e 64 24 29 0d  9e 16 2e 20 20 e7 20 6e  |m,fnd$)....  . n|
00017aa0  75 6d 3c 3e 30 20 f2 65  72 72 6f 72 28 35 2c 61  |um<>0 .error(5,a|
00017ab0  5f 6c 69 73 74 24 28 49  25 29 29 3a 65 72 72 66  |_list$(I%)):errf|
00017ac0  6c 61 67 3d b9 0d 9e 20  3e 20 20 e7 20 6e 78 74  |lag=... >  . nxt|
00017ad0  6f 62 6a 2b 6c 65 6e 32  3e 6e 6f 75 6e 5f 65 6e  |obj+len2>noun_en|
00017ae0  64 2d 32 20 f2 65 72 72  6f 72 28 31 33 2c 65 72  |d-2 .error(13,er|
00017af0  72 6f 72 24 28 33 38 29  29 3a 65 72 72 66 6c 61  |ror$(38)):errfla|
00017b00  67 3d b9 0d 9e 2a 13 20  20 e7 20 ac 20 65 72 72  |g=...*.  . . err|
00017b10  66 6c 61 67 20 8c 0d 9e  34 43 20 20 20 20 24 6e  |flag ...4C    $n|
00017b20  78 74 6f 62 6a 3d 61 5f  6c 69 73 74 24 28 49 25  |xtobj=a_list$(I%|
00017b30  29 3a 3f 28 6e 78 74 6f  62 6a 2b 6c 65 6e 32 2d  |):?(nxtobj+len2-|
00017b40  31 29 3d 3f 28 6e 78 74  6f 62 6a 2b 6c 65 6e 32  |1)=?(nxtobj+len2|
00017b50  2d 31 29 20 84 20 31 32  38 0d 9e 3e 36 20 20 20  |-1) . 128..>6   |
00017b60  20 6e 78 74 6f 62 6a 2b  3d 6c 65 6e 32 3a 3f 6e  | nxtobj+=len2:?n|
00017b70  78 74 6f 62 6a 3d 6f 62  6e 3a 6e 78 74 6f 62 6a  |xtobj=obn:nxtobj|
00017b80  2b 3d 31 3a 3f 6e 78 74  6f 62 6a 3d 26 46 46 0d  |+=1:?nxtobj=&FF.|
00017b90  9e 48 07 20 20 cd 0d 9e  52 07 20 20 cd 0d 9e 5c  |.H.  ...R.  ...\|
00017ba0  08 ed 20 49 25 0d 9e 66  13 20 20 e7 20 ac 20 65  |.. I%..f.  . . e|
00017bb0  72 72 66 6c 61 67 20 8c  0d 9e 70 0e 20 20 20 20  |rrflag ...p.    |
00017bc0  6f 62 6e 2b 3d 31 0d 9e  7a 4c 20 20 20 20 3f 6e  |obn+=1..zL    ?n|
00017bd0  6f 75 6e 73 3d 6f 62 6e  3a 6e 6f 75 6e 73 3f 31  |ouns=obn:nouns?1|
00017be0  3d 28 6e 78 74 6f 62 6a  2d 6e 6f 75 6e 73 29 20  |=(nxtobj-nouns) |
00017bf0  83 20 32 35 36 3a 6e 6f  75 6e 73 3f 32 3d 28 6e  |. 256:nouns?2=(n|
00017c00  78 74 6f 62 6a 2d 6e 6f  75 6e 73 29 20 81 20 32  |xtobj-nouns) . 2|
00017c10  35 36 0d 9e 84 3e 20 20  20 20 70 74 72 3d 31 3a  |56...>    ptr=1:|
00017c20  6d 65 6d 70 74 72 3d 6e  72 65 66 2b 21 6e 72 65  |memptr=nref+!nre|
00017c30  66 3a 73 76 6d 70 74 72  3d 6d 65 6d 70 74 72 3a  |f:svmptr=memptr:|
00017c40  72 65 66 73 3d 30 3a 6d  65 6d 70 74 72 2b 3d 31  |refs=0:memptr+=1|
00017c50  0d 9e 8e 09 20 20 20 20  f5 0d 9e 98 30 20 20 20  |....    ....0   |
00017c60  20 f2 64 65 63 6f 64 65  5f 70 61 72 61 6d 65 74  | .decode_paramet|
00017c70  65 72 28 6e 75 6d 62 65  72 24 2c 70 74 72 2c 70  |er(number$,ptr,p|
00017c80  74 72 2c 76 61 6c 2c 30  29 0d 9e a2 33 20 20 20  |tr,val,0)...3   |
00017c90  20 e7 20 ac 20 65 72 72  66 6c 61 67 20 8c 20 3f  | . . errflag . ?|
00017ca0  6d 65 6d 70 74 72 3d 76  61 6c 3a 6d 65 6d 70 74  |memptr=val:mempt|
00017cb0  72 2b 3d 31 3a 72 65 66  73 2b 3d 31 0d 9e ac 20  |r+=1:refs+=1... |
00017cc0  20 20 20 20 fd 20 70 74  72 3e a9 6e 75 6d 62 65  |    . ptr>.numbe|
00017cd0  72 24 20 84 20 65 72 72  66 6c 61 67 0d 9e b6 24  |r$ . errflag...$|
00017ce0  20 20 20 20 3f 6d 65 6d  70 74 72 3d 30 3a 21 6e  |    ?memptr=0:!n|
00017cf0  72 65 66 3d 21 6e 72 65  66 2b 72 65 66 73 2b 31  |ref=!nref+refs+1|
00017d00  0d 9e c0 14 20 20 20 20  3f 73 76 6d 70 74 72 3d  |....    ?svmptr=|
00017d10  72 65 66 73 0d 9e ca 07  20 20 cd 0d 9e d4 05 cd  |refs....  ......|
00017d20  0d 9e de 07 c9 20 32 0d  9e e8 12 e7 20 76 62 6e  |..... 2..... vbn|
00017d30  3d 6d 61 78 76 62 6e 20  8c 0d 9e f2 29 f2 65 72  |=maxvbn ....).er|
00017d40  72 6f 72 28 31 38 2c 22  61 74 20 22 2b 61 5f 6c  |ror(18,"at "+a_l|
00017d50  69 73 74 24 28 30 29 29  3a 65 72 72 66 6c 61 67  |ist$(0)):errflag|
00017d60  3d b9 0d 9e fc 05 cc 0d  9f 06 12 e3 20 49 25 3d  |=........... I%=|
00017d70  30 20 b8 20 69 6e 64 65  78 0d 9f 10 18 20 20 6c  |0 . index....  l|
00017d80  65 6e 32 3d a9 20 61 5f  6c 69 73 74 24 28 49 25  |en2=. a_list$(I%|
00017d90  29 0d 9f 1a 10 20 20 e7  20 6c 65 6e 32 3e 30 20  |)....  . len2>0 |
00017da0  8c 0d 9f 24 23 20 20 f2  67 65 74 76 62 6e 28 61  |...$#  .getvbn(a|
00017db0  5f 6c 69 73 74 24 28 49  25 29 2c 6e 75 6d 2c 66  |_list$(I%),num,f|
00017dc0  6e 64 24 29 0d 9f 2e 2e  20 20 e7 20 6e 75 6d 3c  |nd$)....  . num<|
00017dd0  3e 30 20 f2 65 72 72 6f  72 28 38 2c 61 5f 6c 69  |>0 .error(8,a_li|
00017de0  73 74 24 28 49 25 29 29  3a 65 72 72 66 6c 61 67  |st$(I%)):errflag|
00017df0  3d b9 0d 9f 38 3e 20 20  e7 20 6e 78 74 76 72 62  |=...8>  . nxtvrb|
00017e00  2b 6c 65 6e 32 3e 76 65  72 62 5f 65 6e 64 2d 32  |+len2>verb_end-2|
00017e10  20 f2 65 72 72 6f 72 28  31 33 2c 65 72 72 6f 72  | .error(13,error|
00017e20  24 28 33 39 29 29 3a 65  72 72 66 6c 61 67 3d b9  |$(39)):errflag=.|
00017e30  0d 9f 42 13 20 20 e7 20  ac 20 65 72 72 66 6c 61  |..B.  . . errfla|
00017e40  67 20 8c 0d 9f 4c 43 20  20 20 20 24 6e 78 74 76  |g ...LC    $nxtv|
00017e50  72 62 3d 61 5f 6c 69 73  74 24 28 49 25 29 3a 3f  |rb=a_list$(I%):?|
00017e60  28 6e 78 74 76 72 62 2b  6c 65 6e 32 2d 31 29 3d  |(nxtvrb+len2-1)=|
00017e70  3f 28 6e 78 74 76 72 62  2b 6c 65 6e 32 2d 31 29  |?(nxtvrb+len2-1)|
00017e80  20 84 20 31 32 38 0d 9f  56 36 20 20 20 20 6e 78  | . 128..V6    nx|
00017e90  74 76 72 62 2b 3d 6c 65  6e 32 3a 3f 6e 78 74 76  |tvrb+=len2:?nxtv|
00017ea0  72 62 3d 76 62 6e 3a 6e  78 74 76 72 62 2b 3d 31  |rb=vbn:nxtvrb+=1|
00017eb0  3a 3f 6e 78 74 76 72 62  3d 26 46 46 0d 9f 60 07  |:?nxtvrb=&FF..`.|
00017ec0  20 20 cd 0d 9f 6a 07 20  20 cd 0d 9f 74 08 ed 20  |  ...j.  ...t.. |
00017ed0  49 25 0d 9f 7e 11 e7 20  ac 20 65 72 72 66 6c 61  |I%..~.. . errfla|
00017ee0  67 20 8c 0d 9f 88 09 70  74 72 3d 31 0d 9f 92 2c  |g .....ptr=1...,|
00017ef0  f2 64 65 63 6f 64 65 5f  70 61 72 61 6d 65 74 65  |.decode_paramete|
00017f00  72 28 6e 75 6d 62 65 72  24 2c 70 74 72 2c 70 74  |r(number$,ptr,pt|
00017f10  72 2c 76 61 6c 2c 30 29  0d 9f 9c 11 e7 20 ac 20  |r,val,0)..... . |
00017f20  65 72 72 66 6c 61 67 20  8c 0d 9f a6 19 76 65 72  |errflag .....ver|
00017f30  62 5f 74 79 70 65 3f 28  32 2a 76 62 6e 29 3d 76  |b_type?(2*vbn)=v|
00017f40  61 6c 0d 9f b0 23 6f 6c  6f 63 24 3d c1 6e 75 6d  |al...#oloc$=.num|
00017f50  62 65 72 24 2c 70 74 72  2b 31 29 3a 6f 6c 6f 63  |ber$,ptr+1):oloc|
00017f60  66 6c 67 3d 30 0d 9f ba  20 e7 20 a7 6f 6c 6f 63  |flg=0... . .oloc|
00017f70  24 2c 22 43 22 29 3c 3e  30 20 8c 20 6f 6c 6f 63  |$,"C")<>0 . oloc|
00017f80  66 6c 67 3d 31 0d 9f c4  2a e7 20 a7 6f 6c 6f 63  |flg=1...*. .oloc|
00017f90  24 2c 22 50 22 29 3c 3e  30 20 8c 20 6f 6c 6f 63  |$,"P")<>0 . oloc|
00017fa0  66 6c 67 3d 6f 6c 6f 63  66 6c 67 20 84 20 32 0d  |flg=olocflg . 2.|
00017fb0  9f ce 1f 76 65 72 62 5f  74 79 70 65 3f 28 32 2a  |...verb_type?(2*|
00017fc0  76 62 6e 2b 31 29 3d 6f  6c 6f 63 66 6c 67 0d 9f  |vbn+1)=olocflg..|
00017fd0  d8 0a 76 62 6e 2b 3d 31  0d 9f e2 48 3f 76 65 72  |..vbn+=1...H?ver|
00017fe0  62 73 3d 76 62 6e 3a 76  65 72 62 73 3f 31 3d 28  |bs=vbn:verbs?1=(|
00017ff0  6e 78 74 76 72 62 2d 76  65 72 62 73 29 20 83 20  |nxtvrb-verbs) . |
00018000  32 35 36 3a 76 65 72 62  73 3f 32 3d 28 6e 78 74  |256:verbs?2=(nxt|
00018010  76 72 62 2d 76 65 72 62  73 29 20 81 20 32 35 36  |vrb-verbs) . 256|
00018020  0d 9f ec 05 cd 0d 9f f6  05 cd 0d a0 00 05 cd 0d  |................|
00018030  a0 0a 07 c9 20 33 0d a0  14 12 e7 20 61 64 6e 3d  |.... 3..... adn=|
00018040  6d 61 78 61 64 6a 20 8c  0d a0 1e 29 f2 65 72 72  |maxadj ....).err|
00018050  6f 72 28 31 39 2c 22 61  74 20 22 2b 61 5f 6c 69  |or(19,"at "+a_li|
00018060  73 74 24 28 30 29 29 3a  65 72 72 66 6c 61 67 3d  |st$(0)):errflag=|
00018070  b9 0d a0 28 05 cc 0d a0  32 12 e3 20 49 25 3d 30  |...(....2.. I%=0|
00018080  20 b8 20 69 6e 64 65 78  0d a0 3c 18 20 20 6c 65  | . index..<.  le|
00018090  6e 32 3d a9 20 61 5f 6c  69 73 74 24 28 49 25 29  |n2=. a_list$(I%)|
000180a0  0d a0 46 10 20 20 e7 20  6c 65 6e 32 3e 30 20 8c  |..F.  . len2>0 .|
000180b0  0d a0 50 23 20 20 f2 67  65 74 61 64 6e 28 61 5f  |..P#  .getadn(a_|
000180c0  6c 69 73 74 24 28 49 25  29 2c 6e 75 6d 2c 66 6e  |list$(I%),num,fn|
000180d0  64 24 29 0d a0 5a 2e 20  20 e7 20 6e 75 6d 3c 3e  |d$)..Z.  . num<>|
000180e0  30 20 f2 65 72 72 6f 72  28 38 2c 61 5f 6c 69 73  |0 .error(8,a_lis|
000180f0  74 24 28 49 25 29 29 3a  65 72 72 66 6c 61 67 3d  |t$(I%)):errflag=|
00018100  b9 0d a0 64 3e 20 20 e7  20 6e 78 74 61 64 6a 2b  |...d>  . nxtadj+|
00018110  6c 65 6e 32 3e 61 64 6a  63 5f 65 6e 64 2d 32 20  |len2>adjc_end-2 |
00018120  f2 65 72 72 6f 72 28 31  33 2c 65 72 72 6f 72 24  |.error(13,error$|
00018130  28 34 30 29 29 3a 65 72  72 66 6c 61 67 3d b9 0d  |(40)):errflag=..|
00018140  a0 6e 13 20 20 e7 20 ac  20 65 72 72 66 6c 61 67  |.n.  . . errflag|
00018150  20 8c 0d a0 78 43 20 20  20 20 24 6e 78 74 61 64  | ...xC    $nxtad|
00018160  6a 3d 61 5f 6c 69 73 74  24 28 49 25 29 3a 3f 28  |j=a_list$(I%):?(|
00018170  6e 78 74 61 64 6a 2b 6c  65 6e 32 2d 31 29 3d 3f  |nxtadj+len2-1)=?|
00018180  28 6e 78 74 61 64 6a 2b  6c 65 6e 32 2d 31 29 20  |(nxtadj+len2-1) |
00018190  84 20 31 32 38 0d a0 82  36 20 20 20 20 6e 78 74  |. 128...6    nxt|
000181a0  61 64 6a 2b 3d 6c 65 6e  32 3a 3f 6e 78 74 61 64  |adj+=len2:?nxtad|
000181b0  6a 3d 61 64 6e 3a 6e 78  74 61 64 6a 2b 3d 31 3a  |j=adn:nxtadj+=1:|
000181c0  3f 6e 78 74 61 64 6a 3d  26 46 46 0d a0 8c 07 20  |?nxtadj=&FF.... |
000181d0  20 cd 0d a0 96 07 20 20  cd 0d a0 a0 08 ed 20 49  | .....  ...... I|
000181e0  25 0d a0 aa 13 20 20 e7  20 ac 20 65 72 72 66 6c  |%....  . . errfl|
000181f0  61 67 20 8c 0d a0 b4 0a  61 64 6e 2b 3d 31 0d a0  |ag .....adn+=1..|
00018200  be 52 3f 61 64 6a 65 63  74 73 3d 61 64 6e 3a 61  |.R?adjects=adn:a|
00018210  64 6a 65 63 74 73 3f 31  3d 28 6e 78 74 61 64 6a  |djects?1=(nxtadj|
00018220  2d 61 64 6a 65 63 74 73  29 20 83 20 32 35 36 3a  |-adjects) . 256:|
00018230  61 64 6a 65 63 74 73 3f  32 3d 28 6e 78 74 61 64  |adjects?2=(nxtad|
00018240  6a 2d 61 64 6a 65 63 74  73 29 20 81 20 32 35 36  |j-adjects) . 256|
00018250  0d a0 c8 3e 20 20 20 20  70 74 72 3d 31 3a 6d 65  |...>    ptr=1:me|
00018260  6d 70 74 72 3d 61 72 65  66 2b 21 61 72 65 66 3a  |mptr=aref+!aref:|
00018270  73 76 6d 70 74 72 3d 6d  65 6d 70 74 72 3a 72 65  |svmptr=memptr:re|
00018280  66 73 3d 30 3a 6d 65 6d  70 74 72 2b 3d 31 0d a0  |fs=0:memptr+=1..|
00018290  d2 09 20 20 20 20 f5 0d  a0 dc 30 20 20 20 20 f2  |..    ....0    .|
000182a0  64 65 63 6f 64 65 5f 70  61 72 61 6d 65 74 65 72  |decode_parameter|
000182b0  28 6e 75 6d 62 65 72 24  2c 70 74 72 2c 70 74 72  |(number$,ptr,ptr|
000182c0  2c 76 61 6c 2c 30 29 0d  a0 e6 33 20 20 20 20 e7  |,val,0)...3    .|
000182d0  20 ac 20 65 72 72 66 6c  61 67 20 8c 20 3f 6d 65  | . errflag . ?me|
000182e0  6d 70 74 72 3d 76 61 6c  3a 6d 65 6d 70 74 72 2b  |mptr=val:memptr+|
000182f0  3d 31 3a 72 65 66 73 2b  3d 31 0d a0 f0 20 20 20  |=1:refs+=1...   |
00018300  20 20 fd 20 70 74 72 3e  a9 6e 75 6d 62 65 72 24  |  . ptr>.number$|
00018310  20 84 20 65 72 72 66 6c  61 67 0d a0 fa 24 20 20  | . errflag...$  |
00018320  20 20 3f 6d 65 6d 70 74  72 3d 30 3a 21 61 72 65  |  ?memptr=0:!are|
00018330  66 3d 21 61 72 65 66 2b  72 65 66 73 2b 31 0d a1  |f=!aref+refs+1..|
00018340  04 14 20 20 20 20 3f 73  76 6d 70 74 72 3d 72 65  |..    ?svmptr=re|
00018350  66 73 0d a1 0e 07 20 20  cd 0d a1 18 05 cd 0d a1  |fs....  ........|
00018360  22 07 c9 20 34 0d a1 2c  13 e7 20 70 72 6e 3d 6d  |".. 4..,.. prn=m|
00018370  61 78 70 72 65 70 20 8c  0d a1 36 29 f2 65 72 72  |axprep ...6).err|
00018380  6f 72 28 32 30 2c 22 61  74 20 22 2b 61 5f 6c 69  |or(20,"at "+a_li|
00018390  73 74 24 28 30 29 29 3a  65 72 72 66 6c 61 67 3d  |st$(0)):errflag=|
000183a0  b9 0d a1 40 05 cc 0d a1  4a 12 e3 20 49 25 3d 30  |...@....J.. I%=0|
000183b0  20 b8 20 69 6e 64 65 78  0d a1 54 18 20 20 6c 65  | . index..T.  le|
000183c0  6e 32 3d a9 20 61 5f 6c  69 73 74 24 28 49 25 29  |n2=. a_list$(I%)|
000183d0  0d a1 5e 10 20 20 e7 20  6c 65 6e 32 3e 30 20 8c  |..^.  . len2>0 .|
000183e0  0d a1 68 23 20 20 f2 67  65 74 70 72 6e 28 61 5f  |..h#  .getprn(a_|
000183f0  6c 69 73 74 24 28 49 25  29 2c 6e 75 6d 2c 66 6e  |list$(I%),num,fn|
00018400  64 24 29 0d a1 72 2e 20  20 e7 20 6e 75 6d 3c 3e  |d$)..r.  . num<>|
00018410  30 20 f2 65 72 72 6f 72  28 38 2c 61 5f 6c 69 73  |0 .error(8,a_lis|
00018420  74 24 28 49 25 29 29 3a  65 72 72 66 6c 61 67 3d  |t$(I%)):errflag=|
00018430  b9 0d a1 7c 3e 20 20 e7  20 6e 78 74 70 72 70 2b  |...|>  . nxtprp+|
00018440  6c 65 6e 32 3e 70 72 65  70 5f 65 6e 64 2d 32 20  |len2>prep_end-2 |
00018450  f2 65 72 72 6f 72 28 31  33 2c 65 72 72 6f 72 24  |.error(13,error$|
00018460  28 34 31 29 29 3a 65 72  72 66 6c 61 67 3d b9 0d  |(41)):errflag=..|
00018470  a1 86 13 20 20 e7 20 ac  20 65 72 72 66 6c 61 67  |...  . . errflag|
00018480  20 8c 0d a1 90 43 20 20  20 20 24 6e 78 74 70 72  | ....C    $nxtpr|
00018490  70 3d 61 5f 6c 69 73 74  24 28 49 25 29 3a 3f 28  |p=a_list$(I%):?(|
000184a0  6e 78 74 70 72 70 2b 6c  65 6e 32 2d 31 29 3d 3f  |nxtprp+len2-1)=?|
000184b0  28 6e 78 74 70 72 70 2b  6c 65 6e 32 2d 31 29 20  |(nxtprp+len2-1) |
000184c0  84 20 31 32 38 0d a1 9a  36 20 20 20 20 6e 78 74  |. 128...6    nxt|
000184d0  70 72 70 2b 3d 6c 65 6e  32 3a 3f 6e 78 74 70 72  |prp+=len2:?nxtpr|
000184e0  70 3d 70 72 6e 3a 6e 78  74 70 72 70 2b 3d 31 3a  |p=prn:nxtprp+=1:|
000184f0  3f 6e 78 74 70 72 70 3d  26 46 46 0d a1 a4 07 20  |?nxtprp=&FF.... |
00018500  20 cd 0d a1 ae 07 20 20  cd 0d a1 b8 08 ed 20 49  | .....  ...... I|
00018510  25 0d a1 c2 13 20 20 e7  20 ac 20 65 72 72 66 6c  |%....  . . errfl|
00018520  61 67 20 8c 0d a1 cc 0e  20 20 20 20 70 72 6e 2b  |ag .....    prn+|
00018530  3d 31 0d a1 d6 4c 20 20  20 20 3f 70 72 65 70 73  |=1...L    ?preps|
00018540  3d 70 72 6e 3a 70 72 65  70 73 3f 31 3d 28 6e 78  |=prn:preps?1=(nx|
00018550  74 70 72 70 2d 70 72 65  70 73 29 20 83 20 32 35  |tprp-preps) . 25|
00018560  36 3a 70 72 65 70 73 3f  32 3d 28 6e 78 74 70 72  |6:preps?2=(nxtpr|
00018570  70 2d 70 72 65 70 73 29  20 81 20 32 35 36 0d a1  |p-preps) . 256..|
00018580  e0 07 20 20 cd 0d a1 ea  05 cd 0d a1 f4 07 c9 20  |..  ........... |
00018590  35 0d a1 fe 13 e7 20 63  6a 6e 3d 6d 61 78 63 6f  |5..... cjn=maxco|
000185a0  6e 6a 20 8c 0d a2 08 29  f2 65 72 72 6f 72 28 32  |nj ....).error(2|
000185b0  31 2c 22 61 74 20 22 2b  61 5f 6c 69 73 74 24 28  |1,"at "+a_list$(|
000185c0  30 29 29 3a 65 72 72 66  6c 61 67 3d b9 0d a2 12  |0)):errflag=....|
000185d0  05 cc 0d a2 1c 12 e3 20  49 25 3d 30 20 b8 20 69  |....... I%=0 . i|
000185e0  6e 64 65 78 0d a2 26 18  20 20 6c 65 6e 32 3d a9  |ndex..&.  len2=.|
000185f0  20 61 5f 6c 69 73 74 24  28 49 25 29 0d a2 30 10  | a_list$(I%)..0.|
00018600  20 20 e7 20 6c 65 6e 32  3e 30 20 8c 0d a2 3a 23  |  . len2>0 ...:#|
00018610  20 20 f2 67 65 74 63 6a  6e 28 61 5f 6c 69 73 74  |  .getcjn(a_list|
00018620  24 28 49 25 29 2c 6e 75  6d 2c 66 6e 64 24 29 0d  |$(I%),num,fnd$).|
00018630  a2 44 2e 20 20 e7 20 6e  75 6d 3c 3e 30 20 f2 65  |.D.  . num<>0 .e|
00018640  72 72 6f 72 28 38 2c 61  5f 6c 69 73 74 24 28 49  |rror(8,a_list$(I|
00018650  25 29 29 3a 65 72 72 66  6c 61 67 3d b9 0d a2 4e  |%)):errflag=...N|
00018660  3e 20 20 e7 20 6e 78 74  63 6a 6e 2b 6c 65 6e 32  |>  . nxtcjn+len2|
00018670  3e 63 6f 6e 6a 5f 65 6e  64 2d 32 20 f2 65 72 72  |>conj_end-2 .err|
00018680  6f 72 28 31 33 2c 65 72  72 6f 72 24 28 34 32 29  |or(13,error$(42)|
00018690  29 3a 65 72 72 66 6c 61  67 3d b9 0d a2 58 13 20  |):errflag=...X. |
000186a0  20 e7 20 ac 20 65 72 72  66 6c 61 67 20 8c 0d a2  | . . errflag ...|
000186b0  62 43 20 20 20 20 24 6e  78 74 63 6a 6e 3d 61 5f  |bC    $nxtcjn=a_|
000186c0  6c 69 73 74 24 28 49 25  29 3a 3f 28 6e 78 74 63  |list$(I%):?(nxtc|
000186d0  6a 6e 2b 6c 65 6e 32 2d  31 29 3d 3f 28 6e 78 74  |jn+len2-1)=?(nxt|
000186e0  63 6a 6e 2b 6c 65 6e 32  2d 31 29 20 84 20 31 32  |cjn+len2-1) . 12|
000186f0  38 0d a2 6c 36 20 20 20  20 6e 78 74 63 6a 6e 2b  |8..l6    nxtcjn+|
00018700  3d 6c 65 6e 32 3a 3f 6e  78 74 63 6a 6e 3d 63 6a  |=len2:?nxtcjn=cj|
00018710  6e 3a 6e 78 74 63 6a 6e  2b 3d 31 3a 3f 6e 78 74  |n:nxtcjn+=1:?nxt|
00018720  63 6a 6e 3d 26 46 46 0d  a2 76 07 20 20 cd 0d a2  |cjn=&FF..v.  ...|
00018730  80 07 20 20 cd 0d a2 8a  08 ed 20 49 25 0d a2 94  |..  ...... I%...|
00018740  13 20 20 e7 20 ac 20 65  72 72 66 6c 61 67 20 8c  |.  . . errflag .|
00018750  0d a2 9e 0e 20 20 20 20  63 6a 6e 2b 3d 31 0d a2  |....    cjn+=1..|
00018760  a8 4c 20 20 20 20 3f 63  6f 6e 6a 73 3d 63 6a 6e  |.L    ?conjs=cjn|
00018770  3a 63 6f 6e 6a 73 3f 31  3d 28 6e 78 74 63 6a 6e  |:conjs?1=(nxtcjn|
00018780  2d 63 6f 6e 6a 73 29 20  83 20 32 35 36 3a 63 6f  |-conjs) . 256:co|
00018790  6e 6a 73 3f 32 3d 28 6e  78 74 63 6a 6e 2d 63 6f  |njs?2=(nxtcjn-co|
000187a0  6e 6a 73 29 20 81 20 32  35 36 0d a2 b2 07 20 20  |njs) . 256....  |
000187b0  cd 0d a2 bc 05 cd 0d a2  c6 07 c9 20 36 0d a2 d0  |........... 6...|
000187c0  13 e7 20 73 70 6e 3d 6d  61 78 73 70 65 63 20 8c  |.. spn=maxspec .|
000187d0  0d a2 da 29 f2 65 72 72  6f 72 28 32 34 2c 22 61  |...).error(24,"a|
000187e0  74 20 22 2b 61 5f 6c 69  73 74 24 28 30 29 29 3a  |t "+a_list$(0)):|
000187f0  65 72 72 66 6c 61 67 3d  b9 0d a2 e4 05 cc 0d a2  |errflag=........|
00018800  ee 12 e3 20 49 25 3d 30  20 b8 20 69 6e 64 65 78  |... I%=0 . index|
00018810  0d a2 f8 18 20 20 6c 65  6e 32 3d a9 20 61 5f 6c  |....  len2=. a_l|
00018820  69 73 74 24 28 49 25 29  0d a3 02 10 20 20 e7 20  |ist$(I%)....  . |
00018830  6c 65 6e 32 3e 30 20 8c  0d a3 0c 23 20 20 f2 67  |len2>0 ....#  .g|
00018840  65 74 73 70 6e 28 61 5f  6c 69 73 74 24 28 49 25  |etspn(a_list$(I%|
00018850  29 2c 6e 75 6d 2c 66 6e  64 24 29 0d a3 16 2e 20  |),num,fnd$).... |
00018860  20 e7 20 6e 75 6d 3c 3e  30 20 f2 65 72 72 6f 72  | . num<>0 .error|
00018870  28 38 2c 61 5f 6c 69 73  74 24 28 49 25 29 29 3a  |(8,a_list$(I%)):|
00018880  65 72 72 66 6c 61 67 3d  b9 0d a3 20 3e 20 20 e7  |errflag=... >  .|
00018890  20 6e 78 74 73 70 6e 2b  6c 65 6e 32 3e 73 70 65  | nxtspn+len2>spe|
000188a0  63 5f 65 6e 64 2d 32 20  f2 65 72 72 6f 72 28 31  |c_end-2 .error(1|
000188b0  33 2c 65 72 72 6f 72 24  28 34 33 29 29 3a 65 72  |3,error$(43)):er|
000188c0  72 66 6c 61 67 3d b9 0d  a3 2a 13 20 20 e7 20 ac  |rflag=...*.  . .|
000188d0  20 65 72 72 66 6c 61 67  20 8c 0d a3 34 43 20 20  | errflag ...4C  |
000188e0  20 20 24 6e 78 74 73 70  6e 3d 61 5f 6c 69 73 74  |  $nxtspn=a_list|
000188f0  24 28 49 25 29 3a 3f 28  6e 78 74 73 70 6e 2b 6c  |$(I%):?(nxtspn+l|
00018900  65 6e 32 2d 31 29 3d 3f  28 6e 78 74 73 70 6e 2b  |en2-1)=?(nxtspn+|
00018910  6c 65 6e 32 2d 31 29 20  84 20 31 32 38 0d a3 3e  |len2-1) . 128..>|
00018920  36 20 20 20 20 6e 78 74  73 70 6e 2b 3d 6c 65 6e  |6    nxtspn+=len|
00018930  32 3a 3f 6e 78 74 73 70  6e 3d 73 70 6e 3a 6e 78  |2:?nxtspn=spn:nx|
00018940  74 73 70 6e 2b 3d 31 3a  3f 6e 78 74 73 70 6e 3d  |tspn+=1:?nxtspn=|
00018950  26 46 46 0d a3 48 07 20  20 cd 0d a3 52 07 20 20  |&FF..H.  ...R.  |
00018960  cd 0d a3 5c 08 ed 20 49  25 0d a3 66 13 20 20 e7  |...\.. I%..f.  .|
00018970  20 ac 20 65 72 72 66 6c  61 67 20 8c 0d a3 70 0e  | . errflag ...p.|
00018980  20 20 20 20 73 70 6e 2b  3d 31 0d a3 7a 4c 20 20  |    spn+=1..zL  |
00018990  20 20 3f 73 70 65 63 73  3d 73 70 6e 3a 73 70 65  |  ?specs=spn:spe|
000189a0  63 73 3f 31 3d 28 6e 78  74 73 70 6e 2d 73 70 65  |cs?1=(nxtspn-spe|
000189b0  63 73 29 20 83 20 32 35  36 3a 73 70 65 63 73 3f  |cs) . 256:specs?|
000189c0  32 3d 28 6e 78 74 73 70  6e 2d 73 70 65 63 73 29  |2=(nxtspn-specs)|
000189d0  20 81 20 32 35 36 0d a3  84 07 20 20 cd 0d a3 8e  | . 256....  ....|
000189e0  05 cd 0d a3 98 07 c9 20  37 0d a3 a2 14 e7 20 6e  |....... 7..... n|
000189f0  73 6e 3d 6d 61 78 6e 6f  69 73 65 20 8c 0d a3 ac  |sn=maxnoise ....|
00018a00  29 f2 65 72 72 6f 72 28  32 35 2c 22 61 74 20 22  |).error(25,"at "|
00018a10  2b 61 5f 6c 69 73 74 24  28 30 29 29 3a 65 72 72  |+a_list$(0)):err|
00018a20  66 6c 61 67 3d b9 0d a3  b6 05 cc 0d a3 c0 12 e3  |flag=...........|
00018a30  20 49 25 3d 30 20 b8 20  69 6e 64 65 78 0d a3 ca  | I%=0 . index...|
00018a40  18 20 20 6c 65 6e 32 3d  a9 20 61 5f 6c 69 73 74  |.  len2=. a_list|
00018a50  24 28 49 25 29 0d a3 d4  10 20 20 e7 20 6c 65 6e  |$(I%)....  . len|
00018a60  32 3e 30 20 8c 0d a3 de  23 20 20 f2 67 65 74 6e  |2>0 ....#  .getn|
00018a70  73 6e 28 61 5f 6c 69 73  74 24 28 49 25 29 2c 6e  |sn(a_list$(I%),n|
00018a80  75 6d 2c 66 6e 64 24 29  0d a3 e8 2e 20 20 e7 20  |um,fnd$)....  . |
00018a90  6e 75 6d 3c 3e 30 20 f2  65 72 72 6f 72 28 38 2c  |num<>0 .error(8,|
00018aa0  61 5f 6c 69 73 74 24 28  49 25 29 29 3a 65 72 72  |a_list$(I%)):err|
00018ab0  66 6c 61 67 3d b9 0d a3  f2 3f 20 20 e7 20 6e 78  |flag=....?  . nx|
00018ac0  74 6e 73 6e 2b 6c 65 6e  32 3e 6e 6f 69 73 65 5f  |tnsn+len2>noise_|
00018ad0  65 6e 64 2d 32 20 f2 65  72 72 6f 72 28 31 33 2c  |end-2 .error(13,|
00018ae0  65 72 72 6f 72 24 28 34  34 29 29 3a 65 72 72 66  |error$(44)):errf|
00018af0  6c 61 67 3d b9 0d a3 fc  13 20 20 e7 20 ac 20 65  |lag=.....  . . e|
00018b00  72 72 66 6c 61 67 20 8c  0d a4 06 43 20 20 20 20  |rrflag ....C    |
00018b10  24 6e 78 74 6e 73 6e 3d  61 5f 6c 69 73 74 24 28  |$nxtnsn=a_list$(|
00018b20  49 25 29 3a 3f 28 6e 78  74 6e 73 6e 2b 6c 65 6e  |I%):?(nxtnsn+len|
00018b30  32 2d 31 29 3d 3f 28 6e  78 74 6e 73 6e 2b 6c 65  |2-1)=?(nxtnsn+le|
00018b40  6e 32 2d 31 29 20 84 20  31 32 38 0d a4 10 36 20  |n2-1) . 128...6 |
00018b50  20 20 20 6e 78 74 6e 73  6e 2b 3d 6c 65 6e 32 3a  |   nxtnsn+=len2:|
00018b60  3f 6e 78 74 6e 73 6e 3d  6e 73 6e 3a 6e 78 74 6e  |?nxtnsn=nsn:nxtn|
00018b70  73 6e 2b 3d 31 3a 3f 6e  78 74 6e 73 6e 3d 26 46  |sn+=1:?nxtnsn=&F|
00018b80  46 0d a4 1a 07 20 20 cd  0d a4 24 07 20 20 cd 0d  |F....  ...$.  ..|
00018b90  a4 2e 08 ed 20 49 25 0d  a4 38 13 20 20 e7 20 ac  |.... I%..8.  . .|
00018ba0  20 65 72 72 66 6c 61 67  20 8c 0d a4 42 0e 20 20  | errflag ...B.  |
00018bb0  20 20 6e 73 6e 2b 3d 31  0d a4 4c 4c 20 20 20 20  |  nsn+=1..LL    |
00018bc0  3f 6e 6f 69 73 65 3d 6e  73 6e 3a 6e 6f 69 73 65  |?noise=nsn:noise|
00018bd0  3f 31 3d 28 6e 78 74 6e  73 6e 2d 6e 6f 69 73 65  |?1=(nxtnsn-noise|
00018be0  29 20 83 20 32 35 36 3a  6e 6f 69 73 65 3f 32 3d  |) . 256:noise?2=|
00018bf0  28 6e 78 74 6e 73 6e 2d  6e 6f 69 73 65 29 20 81  |(nxtnsn-noise) .|
00018c00  20 32 35 36 0d a4 56 07  20 20 cd 0d a4 60 05 cd  | 256..V.  ...`..|
00018c10  0d a4 6a 08 c9 20 31 30  0d a4 74 12 e7 20 70 78  |..j.. 10..t.. px|
00018c20  6e 3d 6d 61 78 70 69 78  20 8c 0d a4 7e 29 f2 65  |n=maxpix ...~).e|
00018c30  72 72 6f 72 28 32 36 2c  22 61 74 20 22 2b 61 5f  |rror(26,"at "+a_|
00018c40  6c 69 73 74 24 28 30 29  29 3a 65 72 72 66 6c 61  |list$(0)):errfla|
00018c50  67 3d b9 0d a4 88 05 cc  0d a4 92 12 e3 20 49 25  |g=........... I%|
00018c60  3d 30 20 b8 20 69 6e 64  65 78 0d a4 9c 18 20 20  |=0 . index....  |
00018c70  6c 65 6e 32 3d a9 20 61  5f 6c 69 73 74 24 28 49  |len2=. a_list$(I|
00018c80  25 29 0d a4 a6 10 20 20  e7 20 6c 65 6e 32 3e 30  |%)....  . len2>0|
00018c90  20 8c 0d a4 b0 3d 20 20  e7 20 6e 78 74 70 78 6e  | ....=  . nxtpxn|
00018ca0  2b 6c 65 6e 32 3e 70 69  78 5f 65 6e 64 2d 32 20  |+len2>pix_end-2 |
00018cb0  f2 65 72 72 6f 72 28 31  33 2c 65 72 72 6f 72 24  |.error(13,error$|
00018cc0  28 34 35 29 29 3a 65 72  72 66 6c 61 67 3d b9 0d  |(45)):errflag=..|
00018cd0  a4 ba 13 20 20 e7 20 ac  20 65 72 72 66 6c 61 67  |...  . . errflag|
00018ce0  20 8c 0d a4 c4 46 20 20  20 20 24 6e 78 74 70 78  | ....F    $nxtpx|
00018cf0  6e 3d 61 5f 6c 69 73 74  24 28 49 25 29 3a f4 20  |n=a_list$(I%):. |
00018d00  3f 28 6e 78 74 70 78 6e  2b 6c 65 6e 32 2d 31 29  |?(nxtpxn+len2-1)|
00018d10  3d 3f 28 6e 78 74 70 78  6e 2b 6c 65 6e 32 2d 31  |=?(nxtpxn+len2-1|
00018d20  29 20 4f 52 20 31 32 38  0d a4 ce 16 20 20 20 20  |) OR 128....    |
00018d30  6e 78 74 70 78 6e 2b 3d  6c 65 6e 32 2b 31 0d a4  |nxtpxn+=len2+1..|
00018d40  d8 07 20 20 cd 0d a4 e2  07 20 20 cd 0d a4 ec 08  |..  .....  .....|
00018d50  ed 20 49 25 0d a4 f6 13  20 20 e7 20 ac 20 65 72  |. I%....  . . er|
00018d60  72 66 6c 61 67 20 8c 0d  a5 00 18 20 20 20 20 6c  |rflag .....    l|
00018d70  6f 63 24 3d c1 6e 75 6d  62 65 72 24 2c 31 29 0d  |oc$=.number$,1).|
00018d80  a5 0a 14 20 20 20 20 e7  20 6c 6f 63 24 3c 3e 22  |...    . loc$<>"|
00018d90  22 20 8c 0d a5 14 3a 20  20 20 20 20 20 e7 20 a7  |" ....:      . .|
00018da0  22 54 42 4c 52 22 2c 6c  6f 63 24 29 3c 3e 30 20  |"TBLR",loc$)<>0 |
00018db0  8c 20 76 61 6c 3d a7 22  54 42 4c 52 22 2c 6c 6f  |. val=."TBLR",lo|
00018dc0  63 24 29 2d 31 20 8b 20  76 61 6c 3d 30 0d a5 1e  |c$)-1 . val=0...|
00018dd0  0f 20 20 20 20 cc 20 76  61 6c 3d 30 0d a5 28 09  |.    . val=0..(.|
00018de0  20 20 20 20 cd 0d a5 32  29 20 20 20 20 3f 6e 78  |    ...2)    ?nx|
00018df0  74 70 78 6e 3d 76 61 6c  3a 6e 78 74 70 78 6e 2b  |tpxn=val:nxtpxn+|
00018e00  3d 35 3a 3f 6e 78 74 70  78 6e 3d 26 46 46 0d a5  |=5:?nxtpxn=&FF..|
00018e10  3c 0e 20 20 20 20 70 78  6e 2b 3d 31 0d a5 46 47  |<.    pxn+=1..FG|
00018e20  20 20 20 20 3f 70 69 78  73 3d 70 78 6e 3a 70 69  |    ?pixs=pxn:pi|
00018e30  78 73 3f 31 3d 28 6e 78  74 70 78 6e 2d 70 69 78  |xs?1=(nxtpxn-pix|
00018e40  73 29 20 83 20 32 35 36  3a 70 69 78 73 3f 32 3d  |s) . 256:pixs?2=|
00018e50  28 6e 78 74 70 78 6e 2d  70 69 78 73 29 20 81 20  |(nxtpxn-pixs) . |
00018e60  32 35 36 0d a5 50 07 20  20 cd 0d a5 5a 05 cd 0d  |256..P.  ...Z...|
00018e70  a5 64 05 cb 0d a5 6e 05  e1 0d a5 78 04 0d a5 82  |.d....n....x....|
00018e80  2c dd 20 f2 67 65 74 73  74 72 28 74 65 73 74 24  |,. .getstr(test$|
00018e90  2c 70 6c 61 63 65 2c f8  20 70 6c 61 63 65 2c f8  |,place,. place,.|
00018ea0  20 72 65 73 75 6c 74 24  29 0d a5 8c 18 63 68 72  | result$)....chr|
00018eb0  24 3d c1 74 65 73 74 24  2c 70 6c 61 63 65 2c 31  |$=.test$,place,1|
00018ec0  29 0d a5 96 1d e7 20 63  68 72 24 3d bd 31 33 20  |)..... chr$=.13 |
00018ed0  8c 20 72 65 73 75 6c 74  24 3d 22 22 3a e1 0d a5  |. result$="":...|
00018ee0  a0 23 c8 95 20 63 68 72  24 3d 22 20 22 20 84 20  |.#.. chr$=" " . |
00018ef0  63 68 72 24 3d 22 2c 22  20 70 6c 61 63 65 2b 3d  |chr$="," place+=|
00018f00  31 0d a5 aa 18 63 68 72  24 3d c1 74 65 73 74 24  |1....chr$=.test$|
00018f10  2c 70 6c 61 63 65 2c 31  29 0d a5 b4 05 ce 0d a5  |,place,1).......|
00018f20  be 04 0d a5 c8 33 e7 20  63 68 72 24 3c 3e bd 20  |.....3. chr$<>. |
00018f30  33 34 20 f2 65 72 72 6f  72 28 36 2c 22 20 3a 20  |34 .error(6," : |
00018f40  22 2b 6c 69 6e 65 24 29  3a 72 65 73 75 6c 74 24  |"+line$):result$|
00018f50  3d 22 22 3a e1 0d a5 d2  0c 70 6c 61 63 65 2b 3d  |="":.....place+=|
00018f60  31 0d a5 dc 4e 70 6c 61  63 65 32 3d a7 6c 69 6e  |1...Nplace2=.lin|
00018f70  65 24 2c bd 33 34 2c 70  6c 61 63 65 29 3a e7 20  |e$,.34,place):. |
00018f80  70 6c 61 63 65 32 3c 70  6c 61 63 65 20 f2 65 72  |place2<place .er|
00018f90  72 6f 72 28 36 2c 22 20  3a 20 22 2b 6c 69 6e 65  |ror(6," : "+line|
00018fa0  24 29 3a 72 65 73 75 6c  74 24 3d 22 22 3a e1 0d  |$):result$="":..|
00018fb0  a5 e6 04 0d a5 f0 26 72  65 73 75 6c 74 24 3d c1  |......&result$=.|
00018fc0  6c 69 6e 65 24 2c 70 6c  61 63 65 2c 70 6c 61 63  |line$,place,plac|
00018fd0  65 32 2d 70 6c 61 63 65  29 0d a5 fa 12 70 6c 61  |e2-place)....pla|
00018fe0  63 65 3d 70 6c 61 63 65  32 2b 31 0d a6 04 05 e1  |ce=place2+1.....|
00018ff0  0d a6 0e 04 0d a6 18 10  dd 20 f2 6c 69 73 74 6e  |......... .listn|
00019000  6f 75 6e 73 0d a6 22 15  ea 20 6d 70 74 72 2c 49  |ouns..".. mptr,I|
00019010  25 2c 4a 25 2c 72 65 66  73 0d a6 2c 0f e7 20 6f  |%,J%,refs..,.. o|
00019020  62 6e 3d 31 20 8c 20 e1  0d a6 36 0f 6d 70 74 72  |bn=1 . ...6.mptr|
00019030  3d 6e 72 65 66 2b 34 0d  a6 40 12 e3 20 49 25 3d  |=nref+4..@.. I%=|
00019040  31 20 b8 20 6f 62 6e 2d  31 0d a6 4a 14 f2 70 75  |1 . obn-1..J..pu|
00019050  74 28 c3 28 49 25 29 2b  22 3d 20 22 29 0d a6 54  |t(.(I%)+"= ")..T|
00019060  1c f2 70 76 6f 6b 28 49  25 2c 31 2c b9 29 3a f2  |..pvok(I%,1,.):.|
00019070  70 75 74 28 22 2c 3c 22  29 0d a6 5e 0e 72 65 66  |put(",<")..^.ref|
00019080  73 3d 3f 6d 70 74 72 0d  a6 68 0e e7 20 72 65 66  |s=?mptr..h.. ref|
00019090  73 3e 30 20 8c 0d a6 72  11 e3 20 4a 25 3d 31 20  |s>0 ...r.. J%=1 |
000190a0  b8 20 72 65 66 73 0d a6  7c 14 f2 70 75 74 28 c3  |. refs..|..put(.|
000190b0  28 4a 25 3f 6d 70 74 72  29 29 0d a6 86 17 e7 20  |(J%?mptr))..... |
000190c0  4a 25 3c 72 65 66 73 20  f2 70 75 74 28 22 2c 22  |J%<refs .put(","|
000190d0  29 0d a6 90 05 ed 0d a6  9a 05 cd 0d a6 a4 10 6d  |)..............m|
000190e0  70 74 72 2b 3d 72 65 66  73 2b 31 0d a6 ae 11 f2  |ptr+=refs+1.....|
000190f0  70 75 74 28 22 3e 22 2b  bd 31 33 29 0d a6 b8 05  |put(">"+.13)....|
00019100  ed 0d a6 c2 0c f2 70 75  74 28 bd 30 29 0d a6 cc  |......put(.0)...|
00019110  05 e1 0d a6 d6 04 0d a6  e0 10 dd 20 f2 6c 69 73  |........... .lis|
00019120  74 76 65 72 62 73 0d a6  ea 0f e7 20 76 62 6e 3d  |tverbs..... vbn=|
00019130  31 20 8c 20 e1 0d a6 f4  12 e3 20 49 25 3d 31 20  |1 . ...... I%=1 |
00019140  b8 20 76 62 6e 2d 31 0d  a6 fe 14 f2 70 75 74 28  |. vbn-1.....put(|
00019150  c3 28 49 25 29 2b 22 3d  20 22 29 0d a7 08 1a 76  |.(I%)+"= ")....v|
00019160  74 79 70 65 3d 76 65 72  62 5f 74 79 70 65 3f 28  |type=verb_type?(|
00019170  32 2a 49 25 29 0d a7 12  25 f2 70 76 6f 6b 28 49  |2*I%)...%.pvok(I|
00019180  25 2c 30 2c b9 29 3a f2  70 75 74 28 22 2c 3c 22  |%,0,.):.put(",<"|
00019190  2b c3 28 76 74 79 70 65  29 29 0d a7 1c 25 6f 6c  |+.(vtype))...%ol|
000191a0  66 6c 67 3d 76 65 72 62  5f 74 79 70 65 3f 28 32  |flg=verb_type?(2|
000191b0  2a 49 25 2b 31 29 3a 6f  6c 6f 63 24 3d 22 22 0d  |*I%+1):oloc$="".|
000191c0  a7 26 0f e7 20 76 74 79  70 65 3e 30 20 8c 0d a7  |.&.. vtype>0 ...|
000191d0  30 21 e7 20 28 6f 6c 66  6c 67 20 80 20 31 29 3c  |0!. (olflg . 1)<|
000191e0  3e 30 20 8c 20 6f 6c 6f  63 24 2b 3d 22 43 22 0d  |>0 . oloc$+="C".|
000191f0  a7 3a 21 e7 20 28 6f 6c  66 6c 67 20 80 20 32 29  |.:!. (olflg . 2)|
00019200  3c 3e 30 20 8c 20 6f 6c  6f 63 24 2b 3d 22 50 22  |<>0 . oloc$+="P"|
00019210  0d a7 44 0d f2 70 75 74  28 22 2c 22 29 0d a7 4e  |..D..put(",")..N|
00019220  05 cd 0d a7 58 17 f2 70  75 74 28 6f 6c 6f 63 24  |....X..put(oloc$|
00019230  2b 22 3e 22 2b bd 31 33  29 0d a7 62 05 ed 0d a7  |+">"+.13)..b....|
00019240  6c 0c f2 70 75 74 28 bd  30 29 0d a7 76 05 e1 0d  |l..put(.0)..v...|
00019250  a7 80 04 0d a7 8a 0f dd  20 f2 6c 69 73 74 61 64  |........ .listad|
00019260  6a 73 0d a7 94 15 ea 20  6d 70 74 72 2c 49 25 2c  |js..... mptr,I%,|
00019270  4a 25 2c 72 65 66 73 0d  a7 9e 0f e7 20 61 64 6e  |J%,refs..... adn|
00019280  3d 31 20 8c 20 e1 0d a7  a8 0f 6d 70 74 72 3d 61  |=1 . .....mptr=a|
00019290  72 65 66 2b 34 0d a7 b2  12 e3 20 49 25 3d 31 20  |ref+4..... I%=1 |
000192a0  b8 20 61 64 6e 2d 31 0d  a7 bc 14 f2 70 75 74 28  |. adn-1.....put(|
000192b0  c3 28 49 25 29 2b 22 3d  20 22 29 0d a7 c6 1c f2  |.(I%)+"= ").....|
000192c0  70 76 6f 6b 28 49 25 2c  32 2c b9 29 3a f2 70 75  |pvok(I%,2,.):.pu|
000192d0  74 28 22 2c 3c 22 29 0d  a7 d0 0e 72 65 66 73 3d  |t(",<")....refs=|
000192e0  3f 6d 70 74 72 0d a7 da  0e e7 20 72 65 66 73 3e  |?mptr..... refs>|
000192f0  30 20 8c 0d a7 e4 11 e3  20 4a 25 3d 31 20 b8 20  |0 ...... J%=1 . |
00019300  72 65 66 73 0d a7 ee 14  f2 70 75 74 28 c3 28 4a  |refs.....put(.(J|
00019310  25 3f 6d 70 74 72 29 29  0d a7 f8 17 e7 20 4a 25  |%?mptr))..... J%|
00019320  3c 72 65 66 73 20 f2 70  75 74 28 22 2c 22 29 0d  |<refs .put(",").|
00019330  a8 02 05 ed 0d a8 0c 05  cd 0d a8 16 10 6d 70 74  |.............mpt|
00019340  72 2b 3d 72 65 66 73 2b  31 0d a8 20 11 f2 70 75  |r+=refs+1.. ..pu|
00019350  74 28 22 3e 22 2b bd 31  33 29 0d a8 2a 05 ed 0d  |t(">"+.13)..*...|
00019360  a8 34 0c f2 70 75 74 28  bd 30 29 0d a8 3e 05 e1  |.4..put(.0)..>..|
00019370  0d a8 48 04 0d a8 52 10  dd 20 f2 6c 69 73 74 70  |..H...R.. .listp|
00019380  72 65 70 73 0d a8 5c 0b  ea 20 49 25 2c 4a 25 0d  |reps..\.. I%,J%.|
00019390  a8 66 0f e7 20 70 72 6e  3d 31 20 8c 20 e1 0d a8  |.f.. prn=1 . ...|
000193a0  70 12 e3 20 49 25 3d 31  20 b8 20 70 72 6e 2d 31  |p.. I%=1 . prn-1|
000193b0  0d a8 7a 14 f2 70 75 74  28 c3 28 49 25 29 2b 22  |..z..put(.(I%)+"|
000193c0  3d 20 22 29 0d a8 84 1b  f2 70 76 6f 6b 28 49 25  |= ").....pvok(I%|
000193d0  2c 33 2c b9 29 3a f2 70  75 74 28 bd 31 33 29 0d  |,3,.):.put(.13).|
000193e0  a8 8e 05 ed 0d a8 98 0c  f2 70 75 74 28 bd 30 29  |.........put(.0)|
000193f0  0d a8 a2 05 e1 0d a8 ac  04 0d a8 b6 10 dd 20 f2  |.............. .|
00019400  6c 69 73 74 63 6f 6e 6a  73 0d a8 c0 0b ea 20 49  |listconjs..... I|
00019410  25 2c 4a 25 0d a8 ca 0f  e7 20 63 6a 6e 3d 31 20  |%,J%..... cjn=1 |
00019420  8c 20 e1 0d a8 d4 12 e3  20 49 25 3d 31 20 b8 20  |. ...... I%=1 . |
00019430  63 6a 6e 2d 31 0d a8 de  14 f2 70 75 74 28 c3 28  |cjn-1.....put(.(|
00019440  49 25 29 2b 22 3d 20 22  29 0d a8 e8 1b f2 70 76  |I%)+"= ").....pv|
00019450  6f 6b 28 49 25 2c 34 2c  b9 29 3a f2 70 75 74 28  |ok(I%,4,.):.put(|
00019460  bd 31 33 29 0d a8 f2 05  ed 0d a8 fc 0c f2 70 75  |.13)..........pu|
00019470  74 28 bd 30 29 0d a9 06  05 e1 0d a9 10 04 0d a9  |t(.0)...........|
00019480  1a 10 dd 20 f2 6c 69 73  74 73 70 65 63 73 0d a9  |... .listspecs..|
00019490  24 0b ea 20 49 25 2c 4a  25 0d a9 2e 0f e7 20 73  |$.. I%,J%..... s|
000194a0  70 6e 3d 31 20 8c 20 e1  0d a9 38 12 e3 20 49 25  |pn=1 . ...8.. I%|
000194b0  3d 31 20 b8 20 73 70 6e  2d 31 0d a9 42 14 f2 70  |=1 . spn-1..B..p|
000194c0  75 74 28 c3 28 49 25 29  2b 22 3d 20 22 29 0d a9  |ut(.(I%)+"= ")..|
000194d0  4c 1b f2 70 76 6f 6b 28  49 25 2c 35 2c b9 29 3a  |L..pvok(I%,5,.):|
000194e0  f2 70 75 74 28 bd 31 33  29 0d a9 56 05 ed 0d a9  |.put(.13)..V....|
000194f0  60 0c f2 70 75 74 28 bd  30 29 0d a9 6a 05 e1 0d  |`..put(.0)..j...|
00019500  a9 74 04 0d a9 7e 10 dd  20 f2 6c 69 73 74 6e 6f  |.t...~.. .listno|
00019510  69 73 65 0d a9 88 0b ea  20 49 25 2c 4a 25 0d a9  |ise..... I%,J%..|
00019520  92 0f e7 20 6e 73 6e 3d  31 20 8c 20 e1 0d a9 9c  |... nsn=1 . ....|
00019530  12 e3 20 49 25 3d 31 20  b8 20 6e 73 6e 2d 31 0d  |.. I%=1 . nsn-1.|
00019540  a9 a6 14 f2 70 75 74 28  c3 28 49 25 29 2b 22 3d  |....put(.(I%)+"=|
00019550  20 22 29 0d a9 b0 1b f2  70 76 6f 6b 28 49 25 2c  | ").....pvok(I%,|
00019560  36 2c b9 29 3a f2 70 75  74 28 bd 31 33 29 0d a9  |6,.):.put(.13)..|
00019570  ba 05 ed 0d a9 c4 0c f2  70 75 74 28 bd 30 29 0d  |........put(.0).|
00019580  a9 ce 05 e1 0d a9 d8 04  0d a9 e2 10 dd 20 f2 73  |............. .s|
00019590  74 6f 72 65 5f 70 69 78  0d a9 ec 15 c8 99 20 22  |tore_pix...... "|
000195a0  48 6f 75 72 67 6c 61 73  73 5f 4f 6e 22 0d a9 f6  |Hourglass_On"...|
000195b0  0d 65 72 72 66 6c 61 67  3d a3 0d aa 00 09 70 78  |.errflag=.....px|
000195c0  6e 3d 31 0d aa 0a 47 6e  78 74 70 78 6e 3d 70 69  |n=1...Gnxtpxn=pi|
000195d0  78 73 3a 3f 6e 78 74 70  78 6e 3d 70 78 6e 3a 6e  |xs:?nxtpxn=pxn:n|
000195e0  78 74 70 78 6e 3f 31 3d  33 3a 6e 78 74 70 78 6e  |xtpxn?1=3:nxtpxn|
000195f0  3f 32 3d 30 3a 6e 78 74  70 78 6e 2b 3d 33 3a 3f  |?2=0:nxtpxn+=3:?|
00019600  6e 78 74 70 78 6e 3d 26  46 46 0d aa 14 17 6c 61  |nxtpxn=&FF....la|
00019610  73 74 25 3d a4 66 69 6e  64 5f 6c 61 73 74 72 6f  |st%=.find_lastro|
00019620  77 0d aa 1e 12 e3 20 49  25 3d 30 20 b8 20 6c 61  |w..... I%=0 . la|
00019630  73 74 25 0d aa 28 22 e7  20 ac 20 65 72 72 66 6c  |st%..(". . errfl|
00019640  61 67 20 f2 77 6f 72 64  28 31 30 2c a4 72 6f 77  |ag .word(10,.row|
00019650  28 49 25 29 29 0d aa 32  05 ed 0d aa 3c 16 c8 99  |(I%))..2....<...|
00019660  20 22 48 6f 75 72 67 6c  61 73 73 5f 4f 66 66 22  | "Hourglass_Off"|
00019670  0d aa 46 04 0d aa 50 05  e1 0d aa 5a 04 0d aa 64  |..F...P....Z...d|
00019680  12 dd 20 f2 73 74 6f 72  65 5f 76 6f 63 61 62 0d  |.. .store_vocab.|
00019690  aa 6e 15 c8 99 20 22 48  6f 75 72 67 6c 61 73 73  |.n... "Hourglass|
000196a0  5f 4f 6e 22 0d aa 78 1d  65 72 72 66 6c 61 67 3d  |_On"..x.errflag=|
000196b0  a3 3a f2 72 65 6d 6f 76  65 5f 6d 61 72 6b 65 72  |.:.remove_marker|
000196c0  73 0d aa 82 04 0d aa 8c  12 c8 8e 20 76 6f 63 5f  |s.......... voc_|
000196d0  73 65 63 74 25 20 ca 0d  aa 96 07 c9 20 31 0d aa  |sect% ...... 1..|
000196e0  a0 09 6f 62 6e 3d 31 0d  aa aa 48 6e 78 74 6f 62  |..obn=1...Hnxtob|
000196f0  6a 3d 6e 6f 75 6e 73 3a  3f 6e 78 74 6f 62 6a 3d  |j=nouns:?nxtobj=|
00019700  6f 62 6e 3a 6e 78 74 6f  62 6a 3f 31 3d 33 3a 6e  |obn:nxtobj?1=3:n|
00019710  78 74 6f 62 6a 3f 32 3d  30 3a 6e 78 74 6f 62 6a  |xtobj?2=0:nxtobj|
00019720  2b 3d 33 3a 3f 6e 78 74  6f 62 6a 3d 26 46 46 0d  |+=3:?nxtobj=&FF.|
00019730  aa b4 0b 21 6e 72 65 66  3d 34 0d aa be 07 c9 20  |...!nref=4..... |
00019740  32 0d aa c8 09 76 62 6e  3d 31 0d aa d2 48 6e 78  |2....vbn=1...Hnx|
00019750  74 76 72 62 3d 76 65 72  62 73 3a 3f 6e 78 74 76  |tvrb=verbs:?nxtv|
00019760  72 62 3d 76 62 6e 3a 6e  78 74 76 72 62 3f 31 3d  |rb=vbn:nxtvrb?1=|
00019770  33 3a 6e 78 74 76 72 62  3f 32 3d 30 3a 6e 78 74  |3:nxtvrb?2=0:nxt|
00019780  76 72 62 2b 3d 33 3a 3f  6e 78 74 76 72 62 3d 26  |vrb+=3:?nxtvrb=&|
00019790  46 46 0d aa dc 07 c9 20  33 0d aa e6 09 61 64 6e  |FF..... 3....adn|
000197a0  3d 31 0d aa f0 4a 6e 78  74 61 64 6a 3d 61 64 6a  |=1...Jnxtadj=adj|
000197b0  65 63 74 73 3a 3f 6e 78  74 61 64 6a 3d 61 64 6e  |ects:?nxtadj=adn|
000197c0  3a 6e 78 74 61 64 6a 3f  31 3d 33 3a 6e 78 74 61  |:nxtadj?1=3:nxta|
000197d0  64 6a 3f 32 3d 30 3a 6e  78 74 61 64 6a 2b 3d 33  |dj?2=0:nxtadj+=3|
000197e0  3a 3f 6e 78 74 61 64 6a  3d 26 46 46 0d aa fa 0b  |:?nxtadj=&FF....|
000197f0  21 61 72 65 66 3d 34 0d  ab 04 07 c9 20 34 0d ab  |!aref=4..... 4..|
00019800  0e 09 70 72 6e 3d 31 0d  ab 18 48 6e 78 74 70 72  |..prn=1...Hnxtpr|
00019810  70 3d 70 72 65 70 73 3a  3f 6e 78 74 70 72 70 3d  |p=preps:?nxtprp=|
00019820  70 72 6e 3a 6e 78 74 70  72 70 3f 31 3d 33 3a 6e  |prn:nxtprp?1=3:n|
00019830  78 74 70 72 70 3f 32 3d  30 3a 6e 78 74 70 72 70  |xtprp?2=0:nxtprp|
00019840  2b 3d 33 3a 3f 6e 78 74  70 72 70 3d 26 46 46 0d  |+=3:?nxtprp=&FF.|
00019850  ab 22 07 c9 20 35 0d ab  2c 09 63 6a 6e 3d 31 0d  |.".. 5..,.cjn=1.|
00019860  ab 36 48 6e 78 74 63 6a  6e 3d 63 6f 6e 6a 73 3a  |.6Hnxtcjn=conjs:|
00019870  3f 6e 78 74 63 6a 6e 3d  63 6a 6e 3a 6e 78 74 63  |?nxtcjn=cjn:nxtc|
00019880  6a 6e 3f 31 3d 33 3a 6e  78 74 63 6a 6e 3f 32 3d  |jn?1=3:nxtcjn?2=|
00019890  30 3a 6e 78 74 63 6a 6e  2b 3d 33 3a 3f 6e 78 74  |0:nxtcjn+=3:?nxt|
000198a0  63 6a 6e 3d 26 46 46 0d  ab 40 07 c9 20 36 0d ab  |cjn=&FF..@.. 6..|
000198b0  4a 09 73 70 6e 3d 31 0d  ab 54 48 6e 78 74 73 70  |J.spn=1..THnxtsp|
000198c0  6e 3d 73 70 65 63 73 3a  3f 6e 78 74 73 70 6e 3d  |n=specs:?nxtspn=|
000198d0  73 70 6e 3a 6e 78 74 73  70 6e 3f 31 3d 33 3a 6e  |spn:nxtspn?1=3:n|
000198e0  78 74 73 70 6e 3f 32 3d  30 3a 6e 78 74 73 70 6e  |xtspn?2=0:nxtspn|
000198f0  2b 3d 33 3a 3f 6e 78 74  73 70 6e 3d 26 46 46 0d  |+=3:?nxtspn=&FF.|
00019900  ab 5e 07 c9 20 37 0d ab  68 09 6e 73 6e 3d 31 0d  |.^.. 7..h.nsn=1.|
00019910  ab 72 48 6e 78 74 6e 73  6e 3d 6e 6f 69 73 65 3a  |.rHnxtnsn=noise:|
00019920  3f 6e 78 74 6e 73 6e 3d  6e 73 6e 3a 6e 78 74 6e  |?nxtnsn=nsn:nxtn|
00019930  73 6e 3f 31 3d 33 3a 6e  78 74 6e 73 6e 3f 32 3d  |sn?1=3:nxtnsn?2=|
00019940  30 3a 6e 78 74 6e 73 6e  2b 3d 33 3a 3f 6e 78 74  |0:nxtnsn+=3:?nxt|
00019950  6e 73 6e 3d 26 46 46 0d  ab 7c 05 cb 0d ab 86 17  |nsn=&FF..|......|
00019960  6c 61 73 74 25 3d a4 66  69 6e 64 5f 6c 61 73 74  |last%=.find_last|
00019970  72 6f 77 0d ab 90 04 0d  ab 9a 12 e3 20 49 25 3d  |row......... I%=|
00019980  30 20 b8 20 6c 61 73 74  25 0d ab a4 2a 20 e7 20  |0 . last%...* . |
00019990  ac 20 65 72 72 66 6c 61  67 20 f2 77 6f 72 64 28  |. errflag .word(|
000199a0  76 6f 63 5f 73 65 63 74  25 2c a4 72 6f 77 28 49  |voc_sect%,.row(I|
000199b0  25 29 29 0d ab ae 05 ed  0d ab b8 19 e7 20 ac 20  |%)).......... . |
000199c0  65 72 72 66 6c 61 67 20  74 65 78 74 5f 6f 6b 3d  |errflag text_ok=|
000199d0  b9 0d ab c2 16 c8 99 20  22 48 6f 75 72 67 6c 61  |....... "Hourgla|
000199e0  73 73 5f 4f 66 66 22 0d  ab cc 05 e1 0d ab d6 04  |ss_Off".........|
000199f0  0d ab e0 19 dd 20 a4 66  69 6e 64 6e 6f 75 6e 28  |..... .findnoun(|
00019a00  6f 62 6a 2c f8 20 4a 25  29 0d ab ea 42 f4 20 46  |obj,. J%)...B. F|
00019a10  69 6e 64 73 20 74 68 65  20 6e 75 6d 62 65 72 20  |inds the number |
00019a20  6f 66 20 74 68 65 20 6e  6f 75 6e 20 72 65 66 65  |of the noun refe|
00019a30  72 72 69 6e 67 20 74 6f  20 61 20 73 70 65 63 69  |rring to a speci|
00019a40  66 69 65 64 20 6f 62 6a  65 63 74 0d ab f4 14 ea  |fied object.....|
00019a50  20 4d 25 2c 49 25 2c 4e  25 2c 66 6f 75 6e 64 0d  | M%,I%,N%,found.|
00019a60  ab fe 0d 4d 25 3d 6e 72  65 66 2b 34 0d ac 08 1f  |...M%=nref+4....|
00019a70  c8 95 20 4e 25 3c 6c 61  73 74 5f 6f 62 6a 65 63  |.. N%<last_objec|
00019a80  74 20 80 20 ac 20 66 6f  75 6e 64 0d ac 12 0a 4a  |t . . found....J|
00019a90  25 3d 3f 4d 25 0d ac 1c  0c e7 20 4a 25 3e 30 20  |%=?M%..... J%>0 |
00019aa0  8c 0d ac 26 0f e3 20 49  25 3d 31 20 b8 20 4a 25  |...&.. I%=1 . J%|
00019ab0  0d ac 30 19 e7 20 4d 25  3f 49 25 3d 6f 62 6a 20  |..0.. M%?I%=obj |
00019ac0  8c 20 66 6f 75 6e 64 3d  b9 0d ac 3a 05 ed 0d ac  |. found=...:....|
00019ad0  44 05 cd 0d ac 4e 0c 4d  25 2b 3d 4a 25 2b 31 0d  |D....N.M%+=J%+1.|
00019ae0  ac 58 09 4e 25 2b 3d 31  0d ac 62 05 ce 0d ac 6c  |.X.N%+=1..b....l|
00019af0  14 e7 20 66 6f 75 6e 64  20 8c 3d 4e 25 20 8b 3d  |.. found .=N% .=|
00019b00  30 0d ac 76 04 0d ac 80  04 0d ac 8a 1e dd 20 f2  |0..v.......... .|
00019b10  77 68 69 63 68 5f 6f 62  6a 28 4e 25 2c f8 20 56  |which_obj(N%,. V|
00019b20  24 2c f8 20 52 25 29 0d  ac 94 43 f4 20 52 65 74  |$,. R%)...C. Ret|
00019b30  75 72 6e 73 20 61 20 73  74 72 69 6e 67 20 63 6f  |urns a string co|
00019b40  6e 74 61 69 6e 69 6e 67  20 74 68 65 20 6f 62 6a  |ntaining the obj|
00019b50  65 63 74 73 20 72 65 66  65 72 65 6e 63 65 64 20  |ects referenced |
00019b60  62 79 20 6e 6f 75 6e 20  4e 25 0d ac 9e 25 f4 20  |by noun N%...%. |
00019b70  52 25 3d 6e 75 6d 62 65  72 20 6f 66 20 6f 62 6a  |R%=number of obj|
00019b80  65 63 74 73 20 72 65 66  65 72 65 6e 63 65 64 0d  |ects referenced.|
00019b90  ac a8 17 ea 20 4d 25 2c  66 6f 75 6e 64 2c 49 25  |.... M%,found,I%|
00019ba0  2c 4a 25 2c 4b 25 0d ac  b2 04 0d ac bc 0d 4d 25  |,J%,K%........M%|
00019bb0  3d 6e 72 65 66 2b 34 0d  ac c6 0c e7 20 4e 25 3e  |=nref+4..... N%>|
00019bc0  31 20 8c 0d ac d0 11 e3  20 4b 25 3d 31 20 b8 20  |1 ...... K%=1 . |
00019bd0  4e 25 2d 31 0d ac da 0b  20 4a 25 3d 3f 4d 25 0d  |N%-1.... J%=?M%.|
00019be0  ac e4 0d 20 4d 25 2b 3d  4a 25 2b 31 0d ac ee 05  |... M%+=J%+1....|
00019bf0  ed 0d ac f8 05 cd 0d ad  02 0a 4a 25 3d 3f 4d 25  |..........J%=?M%|
00019c00  0d ad 0c 0f 52 25 3d 4a  25 3a 56 24 3d 22 22 0d  |....R%=J%:V$="".|
00019c10  ad 16 0c e7 20 4a 25 3e  30 20 8c 0d ad 20 0f e3  |.... J%>0 ... ..|
00019c20  20 49 25 3d 31 20 b8 20  4a 25 0d ad 2a 15 20 56  | I%=1 . J%..*. V|
00019c30  24 2b 3d c3 28 49 25 3f  4d 25 29 2b 22 2c 22 0d  |$+=.(I%?M%)+",".|
00019c40  ad 34 05 ed 0d ad 3e 05  cd 0d ad 48 05 e1 0d ad  |.4....>....H....|
00019c50  52 04 0d ad 5c 19 dd 20  f2 70 76 6f 6b 28 6e 75  |R...\.. .pvok(nu|
00019c60  6d 2c 74 79 70 65 2c 61  6c 6c 29 0d ad 66 15 ea  |m,type,all)..f..|
00019c70  20 74 65 6d 70 24 2c 66  6f 75 6e 64 2c 63 74 72  | temp$,found,ctr|
00019c80  0d ad 70 0f e7 20 6e 75  6d 3d 30 20 8c 20 e1 0d  |..p.. num=0 . ..|
00019c90  ad 7a 04 0d ad 84 0d c8  8e 20 74 79 70 65 20 ca  |.z....... type .|
00019ca0  0d ad 8e 15 c9 20 30 3a  20 73 70 74 72 3d 76 65  |..... 0: sptr=ve|
00019cb0  72 62 73 2b 33 0d ad 98  15 c9 20 31 3a 20 73 70  |rbs+3..... 1: sp|
00019cc0  74 72 3d 6e 6f 75 6e 73  2b 33 0d ad a2 17 c9 20  |tr=nouns+3..... |
00019cd0  32 3a 20 73 70 74 72 3d  61 64 6a 65 63 74 73 2b  |2: sptr=adjects+|
00019ce0  33 0d ad ac 15 c9 20 33  3a 20 73 70 74 72 3d 70  |3..... 3: sptr=p|
00019cf0  72 65 70 73 2b 33 0d ad  b6 15 c9 20 34 3a 20 73  |reps+3..... 4: s|
00019d00  70 74 72 3d 63 6f 6e 6a  73 2b 33 0d ad c0 15 c9  |ptr=conjs+3.....|
00019d10  20 35 3a 20 73 70 74 72  3d 73 70 65 63 73 2b 33  | 5: sptr=specs+3|
00019d20  0d ad ca 15 c9 20 36 3a  20 73 70 74 72 3d 6e 6f  |..... 6: sptr=no|
00019d30  69 73 65 2b 33 0d ad d4  15 c9 20 31 30 3a 20 73  |ise+3..... 10: s|
00019d40  70 74 72 3d 70 69 78 73  2b 33 0d ad de 05 cb 0d  |ptr=pixs+3......|
00019d50  ad e8 04 0d ad f2 12 41  25 3d 6e 75 6d 3a 42 25  |.......A%=num:B%|
00019d60  3d 73 70 74 72 0d ad fc  0d e7 20 ac 20 61 6c 6c  |=sptr..... . all|
00019d70  20 8c 0d ae 06 2f d6 20  70 76 6f 6b 3a 74 65 6d  | ..../. pvok:tem|
00019d80  70 24 3d 24 61 74 65 78  74 3a e7 20 74 65 6d 70  |p$=$atext:. temp|
00019d90  24 3c 3e 22 22 20 f2 70  75 74 28 74 65 6d 70 24  |$<>"" .put(temp$|
00019da0  29 0d ae 10 05 cc 0d ae  1a 0f 3f 70 76 6f 6b 66  |).........?pvokf|
00019db0  6c 61 67 3d 30 0d ae 24  05 f5 0d ae 2e 0a d6 20  |lag=0..$....... |
00019dc0  70 76 6f 6b 0d ae 38 13  e7 20 3f 70 76 6f 6b 66  |pvok..8.. ?pvokf|
00019dd0  6c 61 67 3d 30 20 8c 0d  ae 42 17 e7 20 63 74 72  |lag=0 ...B.. ctr|
00019de0  3e 30 20 8c 20 f2 70 75  74 28 22 2c 22 29 0d ae  |>0 . .put(",")..|
00019df0  4c 28 74 65 6d 70 24 3d  24 61 74 65 78 74 3a e7  |L(temp$=$atext:.|
00019e00  20 74 65 6d 70 24 3c 3e  22 22 20 f2 70 75 74 28  | temp$<>"" .put(|
00019e10  74 65 6d 70 24 29 0d ae  56 16 63 74 72 2b 3d 31  |temp$)..V.ctr+=1|
00019e20  3a 42 25 3d 21 61 64 64  72 65 73 73 0d ae 60 05  |:B%=!address..`.|
00019e30  cd 0d ae 6a 11 fd 20 3f  70 76 6f 6b 66 6c 61 67  |...j.. ?pvokflag|
00019e40  3e 30 0d ae 74 05 cd 0d  ae 7e 05 e1 0d ae 88 04  |>0..t....~......|
00019e50  0d ae 92 28 dd 20 f2 6e  6f 6e 73 70 63 28 73 74  |...(. .nonspc(st|
00019e60  72 24 2c 70 6c 61 63 65  2c f8 20 70 6c 61 63 65  |r$,place,. place|
00019e70  2c f8 20 63 68 72 24 29  0d ae 9c 19 c8 95 20 c1  |,. chr$)...... .|
00019e80  73 74 72 24 2c 70 6c 61  63 65 2c 31 29 3d 22 20  |str$,place,1)=" |
00019e90  22 0d ae a6 0e 20 20 70  6c 61 63 65 2b 3d 31 0d  |"....  place+=1.|
00019ea0  ae b0 05 ce 0d ae ba 17  63 68 72 24 3d c1 73 74  |........chr$=.st|
00019eb0  72 24 2c 70 6c 61 63 65  2c 31 29 0d ae c4 05 e1  |r$,place,1).....|
00019ec0  0d ae ce 04 0d ae d8 0d  dd 20 f2 64 6f 64 65 66  |......... .dodef|
00019ed0  6e 0d ae e2 3b e7 20 76  62 6e 3d 6d 61 78 76 62  |n...;. vbn=maxvb|
00019ee0  6e 20 f2 65 72 72 6f 72  28 31 31 2c 22 3a 20 22  |n .error(11,": "|
00019ef0  2b c3 28 6d 61 78 76 62  6e 29 2b 22 20 22 2b 65  |+.(maxvbn)+" "+e|
00019f00  72 72 6f 72 24 28 34 36  29 29 3a e1 0d ae ec 1f  |rror$(46)):.....|
00019f10  3f 70 72 67 70 74 72 3d  64 65 66 5f 74 6f 6b 65  |?prgptr=def_toke|
00019f20  6e 3a 70 72 67 70 74 72  2b 3d 31 0d ae f6 04 0d  |n:prgptr+=1.....|
00019f30  af 00 27 f2 67 65 74 73  74 72 28 6c 69 6e 65 24  |..'.getstr(line$|
00019f40  2c 70 74 72 2c 70 74 72  2c 76 72 62 24 29 3a 69  |,ptr,ptr,vrb$):i|
00019f50  6e 64 65 78 3d 30 0d af  0a 11 e7 20 65 72 72 66  |ndex=0..... errf|
00019f60  6c 61 67 20 8c 20 e1 0d  af 14 21 f4 20 57 48 49  |lag . ....!. WHI|
00019f70  4c 45 20 76 72 62 24 3c  3e 22 22 20 41 4e 44 20  |LE vrb$<>"" AND |
00019f80  69 6e 64 65 78 3c 31 31  0d af 1e 20 61 5f 6c 69  |index<11... a_li|
00019f90  73 74 24 28 69 6e 64 65  78 29 3d 76 72 62 24 3a  |st$(index)=vrb$:|
00019fa0  69 6e 64 65 78 2b 3d 31  0d af 28 24 f4 20 50 52  |index+=1..($. PR|
00019fb0  4f 43 67 65 74 73 74 72  28 6c 69 6e 65 24 2c 70  |OCgetstr(line$,p|
00019fc0  74 72 2c 70 74 72 2c 76  72 62 24 29 0d af 32 0e  |tr,ptr,vrb$)..2.|
00019fd0  f4 20 45 4e 44 57 48 49  4c 45 0d af 3c 04 0d af  |. ENDWHILE..<...|
00019fe0  46 24 e7 20 76 72 62 24  3d 22 22 20 f2 65 72 72  |F$. vrb$="" .err|
00019ff0  6f 72 28 31 2c 65 72 72  6f 72 24 28 34 37 29 29  |or(1,error$(47))|
0001a000  3a e1 0d af 50 04 0d af  5a 11 e7 20 65 72 72 66  |:...P...Z.. errf|
0001a010  6c 61 67 20 8c 20 e1 0d  af 64 04 0d af 6e 13 66  |lag . ...d...n.f|
0001a020  6c 61 67 3d a3 3a 69 6e  64 65 78 2d 3d 31 0d af  |lag=.:index-=1..|
0001a030  78 12 e3 20 49 25 3d 30  20 b8 20 69 6e 64 65 78  |x.. I%=0 . index|
0001a040  0d af 82 23 20 20 f2 67  65 74 76 62 6e 28 61 5f  |...#  .getvbn(a_|
0001a050  6c 69 73 74 24 28 49 25  29 2c 6e 75 6d 2c 66 6e  |list$(I%),num,fn|
0001a060  64 24 29 0d af 8c 3d 20  20 e7 20 6e 75 6d 3c 3e  |d$)...=  . num<>|
0001a070  30 20 80 20 ac 20 65 78  69 73 74 69 6e 67 5f 76  |0 . . existing_v|
0001a080  65 72 62 20 f2 65 72 72  6f 72 28 38 2c 61 5f 6c  |erb .error(8,a_l|
0001a090  69 73 74 24 28 49 25 29  29 3a 66 6c 61 67 3d b9  |ist$(I%)):flag=.|
0001a0a0  0d af 96 10 20 20 6f 6c  64 76 62 6e 3d 6e 75 6d  |....  oldvbn=num|
0001a0b0  0d af a0 08 ed 20 49 25  0d af aa 04 0d af b4 20  |..... I%....... |
0001a0c0  e7 20 ac 20 66 6c 61 67  20 80 20 ac 20 65 78 69  |. . flag . . exi|
0001a0d0  73 74 69 6e 67 5f 76 65  72 62 20 8c 0d af be 14  |sting_verb .....|
0001a0e0  20 20 e3 20 49 25 3d 30  20 b8 20 69 6e 64 65 78  |  . I%=0 . index|
0001a0f0  0d af c8 1a 20 20 20 20  6c 65 6e 32 3d a9 20 61  |....    len2=. a|
0001a100  5f 6c 69 73 74 24 28 49  25 29 0d af d2 43 20 20  |_list$(I%)...C  |
0001a110  20 20 24 6e 78 74 76 72  62 3d 61 5f 6c 69 73 74  |  $nxtvrb=a_list|
0001a120  24 28 49 25 29 3a 3f 28  6e 78 74 76 72 62 2b 6c  |$(I%):?(nxtvrb+l|
0001a130  65 6e 32 2d 31 29 3d 3f  28 6e 78 74 76 72 62 2b  |en2-1)=?(nxtvrb+|
0001a140  6c 65 6e 32 2d 31 29 20  84 20 31 32 38 0d af dc  |len2-1) . 128...|
0001a150  2a 20 20 20 20 6e 78 74  76 72 62 2b 3d 6c 65 6e  |*    nxtvrb+=len|
0001a160  32 3a 3f 6e 78 74 76 72  62 3d 76 62 6e 3a 6e 78  |2:?nxtvrb=vbn:nx|
0001a170  74 76 72 62 2b 3d 31 0d  af e6 0a 20 20 ed 20 49  |tvrb+=1....  . I|
0001a180  25 0d af f0 2e 20 20 3f  70 72 67 70 74 72 3d 76  |%....  ?prgptr=v|
0001a190  62 6e 3a 70 72 67 70 74  72 2b 3d 31 3a 3f 6e 78  |bn:prgptr+=1:?nx|
0001a1a0  74 76 72 62 3d 26 46 46  3a 76 62 6e 2b 3d 31 0d  |tvrb=&FF:vbn+=1.|
0001a1b0  af fa 4a 20 20 3f 76 65  72 62 73 3d 76 62 6e 3a  |..J  ?verbs=vbn:|
0001a1c0  76 65 72 62 73 3f 31 3d  28 6e 78 74 76 72 62 2d  |verbs?1=(nxtvrb-|
0001a1d0  76 65 72 62 73 29 20 83  20 32 35 36 3a 76 65 72  |verbs) . 256:ver|
0001a1e0  62 73 3f 32 3d 28 6e 78  74 76 72 62 2d 76 65 72  |bs?2=(nxtvrb-ver|
0001a1f0  62 73 29 20 81 20 32 35  36 0d b0 04 04 0d b0 0e  |bs) . 256.......|
0001a200  05 cc 0d b0 18 2e e7 20  65 78 69 73 74 69 6e 67  |....... existing|
0001a210  5f 76 65 72 62 20 8c 20  3f 70 72 67 70 74 72 3d  |_verb . ?prgptr=|
0001a220  6f 6c 64 76 62 6e 3a 70  72 67 70 74 72 2b 3d 31  |oldvbn:prgptr+=1|
0001a230  0d b0 22 05 cd 0d b0 2c  04 0d b0 36 13 65 78 69  |.."....,...6.exi|
0001a240  73 74 69 6e 67 5f 76 65  72 62 3d b9 0d b0 40 05  |sting_verb=...@.|
0001a250  e1 0d b0 4a 04 0d b0 54  0d dd 20 f2 70 72 74 64  |...J...T.. .prtd|
0001a260  65 66 0d b0 5e 13 76 72  62 6e 75 6d 3d 3f 6c 69  |ef..^.vrbnum=?li|
0001a270  73 74 70 74 72 0d b0 68  2d f2 70 75 74 28 bd 33  |stptr..h-.put(.3|
0001a280  32 2b bd 33 34 29 3a f2  70 76 6f 6b 28 76 72 62  |2+.34):.pvok(vrb|
0001a290  6e 75 6d 2c 30 2c a3 29  3a f2 70 75 74 28 bd 33  |num,0,.):.put(.3|
0001a2a0  34 29 0d b0 72 05 e1 0d  b0 7c 04 0d b0 86 13 dd  |4)..r....|......|
0001a2b0  20 a4 66 6e 74 79 70 65  28 70 61 72 6d 29 0d b0  | .fntype(parm)..|
0001a2c0  90 0a ea 20 74 65 6d 70  0d b0 9a 31 e7 20 74 6f  |... temp...1. to|
0001a2d0  6b 65 6e 3d 70 72 65 70  5f 74 6f 6b 65 6e 20 84  |ken=prep_token .|
0001a2e0  20 74 6f 6b 65 6e 3d 6e  6f 74 70 72 65 70 5f 74  | token=notprep_t|
0001a2f0  6f 6b 65 6e 20 8c 20 3d  33 0d b0 a4 36 74 65 6d  |oken . =3...6tem|
0001a300  70 3d 70 61 72 6d 20 80  20 25 30 31 30 30 30 30  |p=parm . %010000|
0001a310  30 30 3a f4 20 63 68 65  63 6b 20 69 66 20 60 6f  |00:. check if `o|
0001a320  62 6a 65 63 74 60 20 66  75 6e 63 74 69 6f 6e 0d  |bject` function.|
0001a330  b0 ae 11 e7 20 74 65 6d  70 3c 3e 30 20 8c 3d 31  |.... temp<>0 .=1|
0001a340  0d b0 b8 34 74 65 6d 70  3d 70 61 72 6d 20 80 20  |...4temp=parm . |
0001a350  25 30 30 31 30 30 30 30  30 3a f4 20 63 68 65 63  |%00100000:. chec|
0001a360  6b 20 69 66 20 60 76 65  72 62 60 20 66 75 6e 63  |k if `verb` func|
0001a370  74 69 6f 6e 0d b0 c2 16  e7 20 74 65 6d 70 3c 3e  |tion..... temp<>|
0001a380  30 20 8c 3d 32 20 8b 20  3d 30 0d b0 cc 04 0d b0  |0 .=2 . =0......|
0001a390  d6 0e dd 20 f2 70 72 6e  74 6f 62 6a 0d b0 e0 09  |... .prntobj....|
0001a3a0  ea 20 6e 75 6d 0d b0 ea  13 6f 62 6a 6e 75 6d 3d  |. num....objnum=|
0001a3b0  3f 6c 69 73 74 70 74 72  0d b0 f4 1c e7 20 6f 62  |?listptr..... ob|
0001a3c0  6a 6e 75 6d 3e 6c 61 73  74 5f 6f 62 6a 65 63 74  |jnum>last_object|
0001a3d0  20 8c 20 e1 0d b0 fe 1e  6e 75 6d 3d a4 66 69 6e  | . .....num=.fin|
0001a3e0  64 6e 6f 75 6e 28 6f 62  6a 6e 75 6d 2c 72 65 66  |dnoun(objnum,ref|
0001a3f0  73 29 0d b1 08 0e e7 20  72 65 66 73 3d 31 20 8c  |s)..... refs=1 .|
0001a400  0d b1 12 26 f2 70 75 74  28 bd 33 34 29 3a f2 70  |...&.put(.34):.p|
0001a410  76 6f 6b 28 6e 75 6d 2c  31 2c a3 29 3a f2 70 75  |vok(num,1,.):.pu|
0001a420  74 28 bd 33 34 29 0d b1  1c 0c 64 6f 6e 65 69 74  |t(.34)....doneit|
0001a430  3d b9 0d b1 26 05 cd 0d  b1 30 05 e1 0d b1 3a 04  |=...&....0....:.|
0001a440  0d b1 44 0e dd 20 f2 70  72 6e 74 76 72 62 0d b1  |..D.. .prntvrb..|
0001a450  4e 13 76 72 62 6e 75 6d  3d 3f 6c 69 73 74 70 74  |N.vrbnum=?listpt|
0001a460  72 0d b1 58 15 e7 20 76  72 62 6e 75 6d 3e 3d 76  |r..X.. vrbnum>=v|
0001a470  62 6e 20 8c 20 e1 0d b1  62 29 f2 70 75 74 28 bd  |bn . ...b).put(.|
0001a480  33 34 29 3a f2 70 76 6f  6b 28 76 72 62 6e 75 6d  |34):.pvok(vrbnum|
0001a490  2c 30 2c a3 29 3a f2 70  75 74 28 bd 33 34 29 0d  |,0,.):.put(.34).|
0001a4a0  b1 6c 0c 64 6f 6e 65 69  74 3d b9 0d b1 76 05 e1  |.l.doneit=...v..|
0001a4b0  0d b1 80 04 0d b1 8a 10  dd 20 f2 70 72 69 6e 74  |......... .print|
0001a4c0  70 72 65 70 0d b1 94 09  ea 20 6e 75 6d 0d b1 9e  |prep..... num...|
0001a4d0  10 6e 75 6d 3d 3f 6c 69  73 74 70 74 72 0d b1 a8  |.num=?listptr...|
0001a4e0  12 e7 20 6e 75 6d 3e 3d  70 72 6e 20 8c 20 e1 0d  |.. num>=prn . ..|
0001a4f0  b1 b2 26 f2 70 75 74 28  bd 33 34 29 3a f2 70 76  |..&.put(.34):.pv|
0001a500  6f 6b 28 6e 75 6d 2c 33  2c a3 29 3a f2 70 75 74  |ok(num,3,.):.put|
0001a510  28 bd 33 34 29 0d b1 bc  0c 64 6f 6e 65 69 74 3d  |(.34)....doneit=|
0001a520  b9 0d b1 c6 05 e1 0d b1  d0 04 0d b1 da 17 dd 20  |............... |
0001a530  f2 63 6f 70 79 5f 66 72  6f 6d 5f 65 64 69 74 6f  |.copy_from_edito|
0001a540  72 0d b1 e4 1a ea 20 6c  64 70 74 72 2c 73 76 70  |r..... ldptr,svp|
0001a550  74 72 2c 4f 25 2c 49 25  2c 52 25 0d b1 ee 12 73  |tr,O%,I%,R%....s|
0001a560  76 70 74 72 3d 69 6e 69  74 73 61 76 65 0d b1 f8  |vptr=initsave...|
0001a570  1c e3 20 4f 25 3d 6c 61  73 74 5f 6f 62 6a 65 63  |.. O%=last_objec|
0001a580  74 20 b8 20 30 20 88 2d  31 0d b2 02 19 6c 64 70  |t . 0 .-1....ldp|
0001a590  74 72 3d 6f 64 61 74 61  25 2b 4f 25 2a 6f 5f 6c  |tr=odata%+O%*o_l|
0001a5a0  65 6e 0d b2 0c 1a 21 73  76 70 74 72 3d 21 6c 64  |en....!svptr=!ld|
0001a5b0  70 74 72 3a 73 76 70 74  72 2b 3d 34 0d b2 16 1c  |ptr:svptr+=4....|
0001a5c0  3f 73 76 70 74 72 3d 6c  64 70 74 72 3f 31 32 3a  |?svptr=ldptr?12:|
0001a5d0  73 76 70 74 72 2b 3d 31  0d b2 20 1c 3f 73 76 70  |svptr+=1.. .?svp|
0001a5e0  74 72 3d 6c 64 70 74 72  3f 31 34 3a 73 76 70 74  |tr=ldptr?14:svpt|
0001a5f0  72 2b 3d 31 0d b2 2a 1c  3f 73 76 70 74 72 3d 6c  |r+=1..*.?svptr=l|
0001a600  64 70 74 72 3f 31 35 3a  73 76 70 74 72 2b 3d 31  |dptr?15:svptr+=1|
0001a610  0d b2 34 05 ed 0d b2 3e  1a e3 20 52 25 3d 6c 61  |..4....>.. R%=la|
0001a620  73 74 5f 72 6f 6f 6d 20  b8 20 30 20 88 2d 31 0d  |st_room . 0 .-1.|
0001a630  b2 48 19 6c 64 70 74 72  3d 72 64 61 74 61 25 2b  |.H.ldptr=rdata%+|
0001a640  52 25 2a 72 5f 6c 65 6e  0d b2 52 2a 3f 73 76 70  |R%*r_len..R*?svp|
0001a650  74 72 3d 3f 6c 64 70 74  72 3a 73 76 70 74 72 3f  |tr=?ldptr:svptr?|
0001a660  31 3d 6c 64 70 74 72 3f  31 3a 73 76 70 74 72 2b  |1=ldptr?1:svptr+|
0001a670  3d 32 0d b2 5c 13 e3 20  49 25 3d 35 34 20 b8 20  |=2..\.. I%=54 . |
0001a680  37 33 20 88 34 0d b2 66  1c 21 73 76 70 74 72 3d  |73 .4..f.!svptr=|
0001a690  49 25 21 6c 64 70 74 72  3a 73 76 70 74 72 2b 3d  |I%!ldptr:svptr+=|
0001a6a0  34 0d b2 70 05 ed 0d b2  7a 05 ed 0d b2 84 05 e1  |4..p....z.......|
0001a6b0  0d b2 8e 04 0d b2 98 15  dd 20 f2 63 6f 70 79 5f  |......... .copy_|
0001a6c0  74 6f 5f 65 64 69 74 6f  72 0d b2 a2 1a ea 20 6c  |to_editor..... l|
0001a6d0  64 70 74 72 2c 73 76 70  74 72 2c 4f 25 2c 49 25  |dptr,svptr,O%,I%|
0001a6e0  2c 52 25 0d b2 ac 12 6c  64 70 74 72 3d 69 6e 69  |,R%....ldptr=ini|
0001a6f0  74 73 61 76 65 0d b2 b6  1c e3 20 4f 25 3d 6c 61  |tsave..... O%=la|
0001a700  73 74 5f 6f 62 6a 65 63  74 20 b8 20 30 20 88 2d  |st_object . 0 .-|
0001a710  31 0d b2 c0 19 73 76 70  74 72 3d 6f 64 61 74 61  |1....svptr=odata|
0001a720  25 2b 4f 25 2a 6f 5f 6c  65 6e 0d b2 ca 1a 21 73  |%+O%*o_len....!s|
0001a730  76 70 74 72 3d 21 6c 64  70 74 72 3a 6c 64 70 74  |vptr=!ldptr:ldpt|
0001a740  72 2b 3d 34 0d b2 d4 1c  73 76 70 74 72 3f 31 32  |r+=4....svptr?12|
0001a750  3d 3f 6c 64 70 74 72 3a  6c 64 70 74 72 2b 3d 31  |=?ldptr:ldptr+=1|
0001a760  0d b2 de 1c 73 76 70 74  72 3f 31 34 3d 3f 6c 64  |....svptr?14=?ld|
0001a770  70 74 72 3a 6c 64 70 74  72 2b 3d 31 0d b2 e8 1c  |ptr:ldptr+=1....|
0001a780  73 76 70 74 72 3f 31 35  3d 3f 6c 64 70 74 72 3a  |svptr?15=?ldptr:|
0001a790  6c 64 70 74 72 2b 3d 31  0d b2 f2 05 ed 0d b2 fc  |ldptr+=1........|
0001a7a0  1a e3 20 52 25 3d 6c 61  73 74 5f 72 6f 6f 6d 20  |.. R%=last_room |
0001a7b0  b8 20 30 20 88 2d 31 0d  b3 06 19 73 76 70 74 72  |. 0 .-1....svptr|
0001a7c0  3d 72 64 61 74 61 25 2b  52 25 2a 72 5f 6c 65 6e  |=rdata%+R%*r_len|
0001a7d0  0d b3 10 2a 3f 73 76 70  74 72 3d 3f 6c 64 70 74  |...*?svptr=?ldpt|
0001a7e0  72 3a 73 76 70 74 72 3f  31 3d 6c 64 70 74 72 3f  |r:svptr?1=ldptr?|
0001a7f0  31 3a 6c 64 70 74 72 2b  3d 32 0d b3 1a 13 e3 20  |1:ldptr+=2..... |
0001a800  49 25 3d 35 34 20 b8 20  37 33 20 88 34 0d b3 24  |I%=54 . 73 .4..$|
0001a810  1c 49 25 21 73 76 70 74  72 3d 21 6c 64 70 74 72  |.I%!svptr=!ldptr|
0001a820  3a 6c 64 70 74 72 2b 3d  34 0d b3 2e 05 ed 0d b3  |:ldptr+=4.......|
0001a830  38 05 ed 0d b3 42 05 e1  0d b3 4c 04 0d b3 56 10  |8....B....L...V.|
0001a840  dd 20 f2 73 77 61 70 5f  64 61 74 61 0d b3 60 1d  |. .swap_data..`.|
0001a850  ea 20 6c 64 70 74 72 2c  73 76 70 74 72 2c 4f 25  |. ldptr,svptr,O%|
0001a860  2c 49 25 2c 52 25 2c 54  25 0d b3 6a 12 6c 64 70  |,I%,R%,T%..j.ldp|
0001a870  74 72 3d 69 6e 69 74 73  61 76 65 0d b3 74 1c e3  |tr=initsave..t..|
0001a880  20 4f 25 3d 6c 61 73 74  5f 6f 62 6a 65 63 74 20  | O%=last_object |
0001a890  b8 20 30 20 88 2d 31 0d  b3 7e 19 73 76 70 74 72  |. 0 .-1..~.svptr|
0001a8a0  3d 6f 64 61 74 61 25 2b  4f 25 2a 6f 5f 6c 65 6e  |=odata%+O%*o_len|
0001a8b0  0d b3 88 0d 54 25 3d 21  73 76 70 74 72 0d b3 92  |....T%=!svptr...|
0001a8c0  24 21 73 76 70 74 72 3d  21 6c 64 70 74 72 3a 21  |$!svptr=!ldptr:!|
0001a8d0  6c 64 70 74 72 3d 54 25  3a 6c 64 70 74 72 2b 3d  |ldptr=T%:ldptr+=|
0001a8e0  34 0d b3 9c 0f 54 25 3d  73 76 70 74 72 3f 31 32  |4....T%=svptr?12|
0001a8f0  0d b3 a6 26 73 76 70 74  72 3f 31 32 3d 3f 6c 64  |...&svptr?12=?ld|
0001a900  70 74 72 3a 3f 6c 64 70  74 72 3d 54 25 3a 6c 64  |ptr:?ldptr=T%:ld|
0001a910  70 74 72 2b 3d 31 0d b3  b0 0f 54 25 3d 73 76 70  |ptr+=1....T%=svp|
0001a920  74 72 3f 31 34 0d b3 ba  26 73 76 70 74 72 3f 31  |tr?14...&svptr?1|
0001a930  34 3d 3f 6c 64 70 74 72  3a 3f 6c 64 70 74 72 3d  |4=?ldptr:?ldptr=|
0001a940  54 25 3a 6c 64 70 74 72  2b 3d 31 0d b3 c4 0f 54  |T%:ldptr+=1....T|
0001a950  25 3d 73 76 70 74 72 3f  31 35 0d b3 ce 26 73 76  |%=svptr?15...&sv|
0001a960  70 74 72 3f 31 35 3d 3f  6c 64 70 74 72 3a 3f 6c  |ptr?15=?ldptr:?l|
0001a970  64 70 74 72 3d 54 25 3a  6c 64 70 74 72 2b 3d 31  |dptr=T%:ldptr+=1|
0001a980  0d b3 d8 05 ed 0d b3 e2  1a e3 20 52 25 3d 6c 61  |.......... R%=la|
0001a990  73 74 5f 72 6f 6f 6d 20  b8 20 30 20 88 2d 31 0d  |st_room . 0 .-1.|
0001a9a0  b3 ec 19 73 76 70 74 72  3d 72 64 61 74 61 25 2b  |...svptr=rdata%+|
0001a9b0  52 25 2a 72 5f 6c 65 6e  0d b3 f6 54 54 25 3d 3f  |R%*r_len...TT%=?|
0001a9c0  73 76 70 74 72 3a 3f 73  76 70 74 72 3d 3f 6c 64  |svptr:?svptr=?ld|
0001a9d0  70 74 72 3a 3f 6c 64 70  74 72 3d 54 25 3a 54 25  |ptr:?ldptr=T%:T%|
0001a9e0  3d 73 76 70 74 72 3f 31  3a 73 76 70 74 72 3f 31  |=svptr?1:svptr?1|
0001a9f0  3d 6c 64 70 74 72 3f 31  3a 6c 64 70 74 72 3f 31  |=ldptr?1:ldptr?1|
0001aa00  3d 54 25 3a 6c 64 70 74  72 2b 3d 32 0d b4 00 13  |=T%:ldptr+=2....|
0001aa10  e3 20 49 25 3d 35 34 20  b8 20 37 33 20 88 34 0d  |. I%=54 . 73 .4.|
0001aa20  b4 0a 0f 54 25 3d 49 25  21 73 76 70 74 72 0d b4  |...T%=I%!svptr..|
0001aa30  14 26 49 25 21 73 76 70  74 72 3d 21 6c 64 70 74  |.&I%!svptr=!ldpt|
0001aa40  72 3a 21 6c 64 70 74 72  3d 54 25 3a 6c 64 70 74  |r:!ldptr=T%:ldpt|
0001aa50  72 2b 3d 34 0d b4 1e 05  ed 0d b4 28 05 ed 0d b4  |r+=4.......(....|
0001aa60  32 05 e1 0d b4 3c 04 0d  b4 46 30 dd 20 a4 65 72  |2....<...F0. .er|
0001aa70  72 6f 72 62 6f 78 28 65  72 72 24 2c 65 72 72 25  |rorbox(err$,err%|
0001aa80  2c 45 72 72 6f 72 66 6c  61 67 73 2c 66 72 6f 6d  |,Errorflags,from|
0001aa90  50 6c 61 63 65 25 29 0d  b4 50 12 c8 99 20 43 72  |Place%)..P... Cr|
0001aaa0  65 61 74 65 4d 2c 2c 2d  31 0d b4 5a 12 c8 99 20  |eateM,,-1..Z... |
0001aab0  50 6f 6c 6c 2c 2c 62 6c  6f 63 6b 0d b4 64 13 21  |Poll,,block..d.!|
0001aac0  6d 69 73 74 61 6b 65 20  3d 20 65 72 72 25 0d b4  |mistake = err%..|
0001aad0  6e 1b e7 20 ac 20 74 65  73 74 69 6e 67 20 80 20  |n.. . testing . |
0001aae0  65 72 72 25 3d 32 39 20  8c 0d b4 78 43 20 20 20  |err%=29 ...xC   |
0001aaf0  65 72 72 24 3d 22 53 6f  72 72 79 20 2d 20 6e 6f  |err$="Sorry - no|
0001ab00  74 20 69 6d 70 6c 65 6d  65 6e 74 65 64 20 69 6e  |t implemented in|
0001ab10  20 74 68 69 73 20 76 65  72 73 69 6f 6e 22 3a 20  | this version": |
0001ab20  45 72 72 6f 72 66 6c 61  67 73 3d 31 0d b4 82 05  |Errorflags=1....|
0001ab30  cd 0d b4 8c 2d e7 20 74  65 73 74 69 6e 67 20 65  |....-. testing e|
0001ab40  72 72 24 2b 3d 22 20 28  45 72 72 6f 72 20 63 6f  |rr$+=" (Error co|
0001ab50  64 65 3a 20 22 2b c3 28  9e 29 2b 22 29 22 0d b4  |de: "+.(.)+")"..|
0001ab60  96 55 e7 20 28 65 72 72  25 20 80 20 26 46 46 29  |.U. (err% . &FF)|
0001ab70  3d 26 43 37 20 65 72 72  24 3d 22 44 69 73 6b 20  |=&C7 err$="Disk |
0001ab80  6e 6f 74 20 66 6f 72 6d  61 74 74 65 64 2e 20 53  |not formatted. S|
0001ab90  68 61 6c 6c 20 49 20 66  6f 72 6d 61 74 20 69 74  |hall I format it|
0001aba0  20 6e 6f 77 3f 22 3a 45  72 72 6f 72 66 6c 61 67  | now?":Errorflag|
0001abb0  73 3d 33 0d b4 a0 1c 24  28 6d 69 73 74 61 6b 65  |s=3....$(mistake|
0001abc0  2b 34 29 20 3d 20 65 72  72 24 2b bd 28 30 29 0d  |+4) = err$+.(0).|
0001abd0  b4 aa 55 e7 20 66 72 6f  6d 50 6c 61 63 65 25 3c  |..U. fromPlace%<|
0001abe0  3e 2d 39 39 20 8c 20 45  72 72 6f 72 66 6c 61 67  |>-99 . Errorflag|
0001abf0  73 3d 45 72 72 6f 72 66  6c 61 67 73 20 84 20 31  |s=Errorflags . 1|
0001ac00  36 3a 74 24 3d 22 4d 65  73 73 61 67 65 20 66 72  |6:t$="Message fr|
0001ac10  6f 6d 20 41 4c 50 53 22  20 8b 20 74 24 3d 22 41  |om ALPS" . t$="A|
0001ac20  4c 50 53 22 0d b4 b4 3c  c8 99 20 22 57 69 6d 70  |LPS"...<.. "Wimp|
0001ac30  5f 52 65 70 6f 72 74 45  72 72 6f 72 22 2c 6d 69  |_ReportError",mi|
0001ac40  73 74 61 6b 65 2c 45 72  72 6f 72 66 6c 61 67 73  |stake,Errorflags|
0001ac50  2c 74 24 20 b8 20 2c 64  69 61 6c 6f 67 75 65 25  |,t$ . ,dialogue%|
0001ac60  0d b4 be 16 6f 6b 20 3d  20 28 64 69 61 6c 6f 67  |....ok = (dialog|
0001ac70  75 65 25 3d 31 29 0d b4  c8 04 0d b4 d2 1d e7 20  |ue%=1)......... |
0001ac80  28 65 72 72 25 20 80 20  26 46 46 29 3d 26 43 37  |(err% . &FF)=&C7|
0001ac90  20 80 20 6f 6b 20 8c 0d  b4 dc 14 20 20 20 2a 46  | . ok .....   *F|
0001aca0  4f 52 4d 41 54 20 30 20  45 20 59 0d b4 e6 42 20  |ORMAT 0 E Y...B |
0001acb0  20 20 f2 63 72 65 61 74  65 5f 64 69 72 73 28 a4  |  .create_dirs(.|
0001acc0  67 65 74 69 63 6f 6e 64  61 74 61 28 73 65 74 75  |geticondata(setu|
0001acd0  70 68 2c 32 29 2c a4 67  65 74 69 63 6f 6e 64 61  |ph,2),.geticonda|
0001ace0  74 61 28 73 65 74 75 70  68 2c 35 29 29 0d b4 f0  |ta(setuph,5))...|
0001acf0  05 cd 0d b4 fa 04 0d b5  04 13 c8 8e 20 66 72 6f  |............ fro|
0001ad00  6d 50 6c 61 63 65 25 20  ca 0d b5 0e 23 c9 20 2d  |mPlace% ....#. -|
0001ad10  39 39 3a 20 f4 20 2a 2a  2a 20 61 20 70 72 6f 70  |99: . *** a prop|
0001ad20  65 72 20 65 72 72 6f 72  20 2a 2a 2a 0d b5 18 1f  |er error ***....|
0001ad30  c9 20 30 3a e7 20 6f 6b  20 8c 20 f2 73 61 76 65  |. 0:. ok . .save|
0001ad40  5f 61 6c 6c 28 70 61 74  68 24 29 0d b5 22 3f c9  |_all(path$).."?.|
0001ad50  20 31 3a e7 20 6f 6b 20  8c 20 f2 6c 6f 61 64 5f  | 1:. ok . .load_|
0001ad60  61 6c 6c 28 70 61 74 68  24 29 3a f2 6f 70 65 6e  |all(path$):.open|
0001ad70  28 41 4c 50 53 6d 61 69  6e 2c 34 30 30 2c 38 30  |(ALPSmain,400,80|
0001ad80  30 2c 36 30 30 2c 36 30  30 29 0d b5 2c 1b c9 20  |0,600,600)..,.. |
0001ad90  32 3a e7 20 6f 6b 20 8c  20 f2 63 72 65 61 74 65  |2:. ok . .create|
0001ada0  5f 64 69 72 73 0d b5 36  0e c9 20 33 3a e7 20 6f  |_dirs..6.. 3:. o|
0001adb0  6b 20 8c 0d b5 40 0b 71  75 69 74 25 3d b9 0d b5  |k ...@.quit%=...|
0001adc0  4a 43 c8 99 20 22 57 69  6d 70 5f 47 65 74 43 61  |JC.. "Wimp_GetCa|
0001add0  72 65 74 50 6f 73 69 74  69 6f 6e 22 2c 2c 71 75  |retPosition",,qu|
0001ade0  69 74 62 6c 6b 2b 32 30  20 3a f4 20 46 69 6c 6c  |itblk+20 :. Fill|
0001adf0  20 75 70 20 66 69 72 73  74 20 35 20 77 6f 72 64  | up first 5 word|
0001ae00  73 0d b5 54 3d 71 75 69  74 62 6c 6b 21 34 34 3d  |s..T=quitblk!44=|
0001ae10  26 31 46 43 20 20 20 20  20 20 20 20 20 20 20 20  |&1FC            |
0001ae20  20 20 20 20 20 20 20 20  20 20 20 20 20 3a f4 20  |             :. |
0001ae30  43 54 52 4c 2d 53 48 49  46 54 2d 66 31 32 0d b5  |CTRL-SHIFT-f12..|
0001ae40  5e 44 21 71 75 69 74 62  6c 6b 3d 34 38 20 20 20  |^D!quitblk=48   |
0001ae50  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0001ae60  20 20 20 20 20 20 20 20  20 20 3a f4 20 53 69 7a  |          :. Siz|
0001ae70  65 20 6f 66 20 6d 65 73  73 61 67 65 20 62 6c 6f  |e of message blo|
0001ae80  63 6b 0d b5 68 10 71 75  69 74 62 6c 6b 21 31 32  |ck..h.quitblk!12|
0001ae90  3d 30 0d b5 72 47 71 75  69 74 62 6c 6b 21 31 36  |=0..rGquitblk!16|
0001aea0  3d 38 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |=8              |
0001aeb0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3a f4  |              :.|
0001aec0  20 53 65 6e 64 20 4b 65  79 5f 50 72 65 73 73 65  | Send Key_Presse|
0001aed0  64 20 6d 65 73 73 61 67  65 0d b5 7c 31 c8 99 20  |d message..|1.. |
0001aee0  22 57 69 6d 70 5f 53 65  6e 64 4d 65 73 73 61 67  |"Wimp_SendMessag|
0001aef0  65 22 2c 31 37 2c 71 75  69 74 62 6c 6b 2c 70 72  |e",17,quitblk,pr|
0001af00  65 71 75 69 74 74 61 73  6b 25 0d b5 86 05 cd 0d  |equittask%......|
0001af10  b5 90 16 c9 20 34 3a e7  20 6f 6b 20 8c 20 71 75  |.... 4:. ok . qu|
0001af20  69 74 25 3d b9 0d b5 9a  05 cb 0d b5 a4 0e 3d 64  |it%=..........=d|
0001af30  69 61 6c 6f 67 75 65 25  0d b5 ae 04 0d b5 b8 04  |ialogue%........|
0001af40  0d b5 c2 11 dd 20 a4 4f  53 5f 56 61 72 28 56 24  |..... .OS_Var(V$|
0001af50  29 0d b5 cc 2a c8 99 20  22 58 4f 53 5f 52 65 61  |)...*.. "XOS_Rea|
0001af60  64 56 61 72 56 61 6c 22  2c 56 24 2c 30 2c 2d 31  |dVarVal",V$,0,-1|
0001af70  20 b8 20 2c 2c 65 78 69  73 74 73 0d b5 d6 0b 3d  | . ,,exists....=|
0001af80  65 78 69 73 74 73 0d b5  e0 04 0d b5 ea 15 dd 20  |exists......... |
0001af90  a4 52 65 61 64 56 61 72  56 61 6c 28 56 24 29 0d  |.ReadVarVal(V$).|
0001afa0  b5 f4 0d de 20 76 62 6c  6b 20 33 32 0d b5 fe 2e  |.... vblk 32....|
0001afb0  c8 99 20 22 58 4f 53 5f  52 65 61 64 56 61 72 56  |.. "XOS_ReadVarV|
0001afc0  61 6c 22 2c 56 24 2c 76  62 6c 6b 2c 33 32 2c 2c  |al",V$,vblk,32,,|
0001afd0  30 2c 33 20 b8 20 2c 2c  4e 25 0d b6 08 0e 76 62  |0,3 . ,,N%....vb|
0001afe0  6c 6b 3f 4e 25 3d 31 33  0d b6 12 0a 3d 24 76 62  |lk?N%=13....=$vb|
0001aff0  6c 6b 0d b6 1c 05 20 0d  b6 26 26 dd 20 a4 69 63  |lk.... ..&&. .ic|
0001b000  6f 6e 62 61 72 28 73 70  72 42 6c 6b 2c 20 73 70  |onbar(sprBlk, sp|
0001b010  6e 61 6d 65 24 2c 20 78  78 2c 79 79 29 0d b6 30  |name$, xx,yy)..0|
0001b020  0d 21 71 42 6c 6b 25 3d  2d 31 0d b6 3a 33 71 42  |.!qBlk%=-1..:3qB|
0001b030  6c 6b 25 21 34 3d 30 3a  71 42 6c 6b 25 21 38 3d  |lk%!4=0:qBlk%!8=|
0001b040  30 3a 71 42 6c 6b 25 21  31 32 3d 78 78 2a 32 3a  |0:qBlk%!12=xx*2:|
0001b050  71 42 6c 6b 25 21 31 36  3d 79 79 2a 34 0d b6 44  |qBlk%!16=yy*4..D|
0001b060  12 71 42 6c 6b 25 21 32  30 3d 26 32 31 30 32 0d  |.qBlk%!20=&2102.|
0001b070  b6 4e 2f de 20 71 42 6c  6b 25 21 32 34 20 28 a9  |.N/. qBlk%!24 (.|
0001b080  73 70 6e 61 6d 65 24 2b  31 29 3a 24 28 71 42 6c  |spname$+1):$(qBl|
0001b090  6b 25 21 32 34 29 3d 73  70 6e 61 6d 65 24 0d b6  |k%!24)=spname$..|
0001b0a0  58 13 71 42 6c 6b 25 21  32 38 3d 73 70 72 42 6c  |X.qBlk%!28=sprBl|
0001b0b0  6b 0d b6 62 17 71 42 6c  6b 25 21 33 32 3d a9 73  |k..b.qBlk%!32=.s|
0001b0c0  70 6e 61 6d 65 24 2b 31  0d b6 6c 28 c8 99 20 22  |pname$+1..l(.. "|
0001b0d0  57 69 6d 70 5f 43 72 65  61 74 65 49 63 6f 6e 22  |Wimp_CreateIcon"|
0001b0e0  2c 2c 71 42 6c 6b 25 20  b8 20 74 68 65 49 63 25  |,,qBlk% . theIc%|
0001b0f0  0d b6 76 0b 3d 74 68 65  49 63 25 0d b6 80 05 20  |..v.=theIc%.... |
0001b100  0d b6 8a 05 20 0d b6 94  15 dd 20 f2 72 65 63 65  |.... ..... .rece|
0001b110  69 76 65 28 62 6c 6f 63  6b 29 0d b6 9e 10 72 65  |ive(block)....re|
0001b120  66 25 3d 62 6c 6f 63 6b  21 38 0d b6 a8 11 c8 8e  |f%=block!8......|
0001b130  20 62 6c 6f 63 6b 21 31  36 20 ca 0d b6 b2 14 20  | block!16 ..... |
0001b140  20 c9 20 30 20 20 20 3a  71 75 69 74 25 3d b9 0d  | . 0   :quit%=..|
0001b150  b6 bc 2e 20 20 c9 20 32  20 20 20 3a f4 20 53 61  |...  . 2   :. Sa|
0001b160  76 65 41 63 6b 20 66 72  6f 6d 20 46 69 6c 65 72  |veAck from Filer|
0001b170  2f 61 6e 6f 74 68 65 72  20 61 70 70 2e 0d b6 c6  |/another app....|
0001b180  25 20 20 20 20 20 20 20  20 20 20 20 20 70 61 74  |%            pat|
0001b190  68 24 3d a4 6e 61 6d 65  28 62 6c 6f 63 6b 2b 34  |h$=.name(block+4|
0001b1a0  34 29 0d b6 d0 20 20 20  20 20 20 20 20 20 20 20  |4)...           |
0001b1b0  20 20 f2 73 61 76 65 5f  61 6c 6c 28 70 61 74 68  |  .save_all(path|
0001b1c0  24 29 0d b6 da 35 20 20  20 20 20 20 20 20 20 20  |$)...5          |
0001b1d0  20 20 21 62 6c 6f 63 6b  3d 36 34 3a 62 6c 6f 63  |  !block=64:bloc|
0001b1e0  6b 21 31 32 3d 62 6c 6f  63 6b 21 38 3a 62 6c 6f  |k!12=block!8:blo|
0001b1f0  63 6b 21 31 36 3d 33 0d  b6 e4 40 20 20 20 20 20  |ck!16=3...@     |
0001b200  20 20 20 20 20 20 20 c8  99 20 22 57 69 6d 70 5f  |       .. "Wimp_|
0001b210  53 65 6e 64 4d 65 73 73  61 67 65 22 2c 31 37 2c  |SendMessage",17,|
0001b220  62 6c 6f 63 6b 2c 62 6c  6f 63 6b 21 32 30 2c 62  |block,block!20,b|
0001b230  6c 6f 63 6b 21 32 34 0d  b6 ee 19 20 20 c9 20 33  |lock!24....  . 3|
0001b240  2c 35 20 3a f2 6c 6f 61  64 28 62 6c 6f 63 6b 29  |,5 :.load(block)|
0001b250  0d b6 f8 16 20 20 c9 20  38 20 20 20 3a f4 20 50  |....  . 8   :. P|
0001b260  72 65 51 75 69 74 0d b7  02 18 20 20 20 20 e7 20  |reQuit....    . |
0001b270  ac 20 64 61 74 61 5f 73  61 76 65 64 20 8c 0d b7  |. data_saved ...|
0001b280  0c 1c 20 20 20 20 70 72  65 71 75 69 74 74 61 73  |..    prequittas|
0001b290  6b 25 3d 62 6c 6f 63 6b  21 34 0d b7 16 14 20 20  |k%=block!4....  |
0001b2a0  20 20 62 79 74 65 73 3d  21 62 6c 6f 63 6b 0d b7  |  bytes=!block..|
0001b2b0  20 16 20 20 20 20 e3 20  49 25 3d 30 20 b8 20 62  | .    . I%=0 . b|
0001b2c0  79 74 65 73 0d b7 2a 1b  20 20 20 20 71 75 69 74  |ytes..*.    quit|
0001b2d0  62 6c 6b 21 49 25 3d 62  6c 6f 63 6b 21 49 25 0d  |blk!I%=block!I%.|
0001b2e0  b7 34 09 20 20 20 20 ed  0d b7 3e 1c 20 20 20 20  |.4.    ...>.    |
0001b2f0  71 75 69 74 62 6c 6b 21  31 32 3d 71 75 69 74 62  |quitblk!12=quitb|
0001b300  6c 6b 21 38 0d b7 48 18  20 20 20 20 62 6c 6f 63  |lk!8..H.    bloc|
0001b310  6b 21 31 32 3d 62 6c 6f  63 6b 21 38 0d b7 52 26  |k!12=block!8..R&|
0001b320  20 20 20 20 c8 99 20 22  57 69 6d 70 5f 53 65 6e  |    .. "Wimp_Sen|
0001b330  64 4d 65 73 73 61 67 65  22 2c 31 39 2c 62 6c 6f  |dMessage",19,blo|
0001b340  63 6b 0d b7 5c 61 20 20  20 20 61 6e 73 20 3d 20  |ck..\a    ans = |
0001b350  a4 65 72 72 6f 72 62 6f  78 28 22 54 68 65 72 65  |.errorbox("There|
0001b360  20 69 73 20 75 6e 73 61  76 65 64 20 64 61 74 61  | is unsaved data|
0001b370  20 69 6e 20 74 68 65 20  6d 65 6d 6f 72 79 2e 20  | in the memory. |
0001b380  44 6f 20 79 6f 75 20 72  65 61 6c 6c 79 20 77 61  |Do you really wa|
0001b390  6e 74 20 74 6f 20 71 75  69 74 3f 22 2c 30 2c 33  |nt to quit?",0,3|
0001b3a0  2c 33 29 0d b7 66 09 20  20 20 20 cd 0d b7 70 2b  |,3)..f.    ...p+|
0001b3b0  20 20 c9 20 26 35 30 32  3a f2 68 65 6c 70 28 62  |  . &502:.help(b|
0001b3c0  6c 6f 63 6b 21 33 32 2c  62 6c 6f 63 6b 21 33 36  |lock!32,block!36|
0001b3d0  2c 62 6c 6f 63 6b 29 0d  b7 7a 1c 20 20 c9 20 26  |,block)..z.  . &|
0001b3e0  34 30 30 43 31 3a f4 20  6d 6f 64 65 20 63 68 61  |400C1:. mode cha|
0001b3f0  6e 67 65 0d b7 84 0e 20  20 20 6d 6f 64 65 25 3d  |nge....   mode%=|
0001b400  eb 0d b7 8e 13 20 20 20  f2 67 65 74 6d 6f 64 65  |.....   .getmode|
0001b410  69 6e 66 6f 0d b7 98 44  20 20 20 f2 61 73 73 65  |info...D   .asse|
0001b420  6d 62 6c 65 28 61 72 6d  63 6f 64 65 25 29 3a f4  |mble(armcode%):.|
0001b430  20 4e 65 65 64 20 74 6f  20 61 6c 6c 6f 77 20 66  | Need to allow f|
0001b440  6f 72 20 64 69 66 66 65  72 65 6e 74 20 73 63 72  |or different scr|
0001b450  65 65 6e 20 73 69 7a 65  0d b7 a2 c8 20 20 20 e7  |een size....   .|
0001b460  20 73 63 72 6e 73 69 7a  65 3e 6f 6c 64 73 69 7a  | scrnsize>oldsiz|
0001b470  65 20 8c 20 6e 75 6c 6c  3d a4 65 72 72 6f 72 62  |e . null=.errorb|
0001b480  6f 78 28 22 57 61 72 6e  69 6e 67 21 20 49 74 20  |ox("Warning! It |
0001b490  6d 61 79 20 6e 6f 74 20  62 65 20 70 6f 73 73 69  |may not be possi|
0001b4a0  62 6c 65 20 74 6f 20 64  69 73 70 6c 61 79 20 70  |ble to display p|
0001b4b0  69 63 74 75 72 65 73 20  69 6e 20 74 68 69 73 20  |ictures in this |
0001b4c0  6d 6f 64 65 20 64 75 65  20 74 6f 20 6d 65 6d 6f  |mode due to memo|
0001b4d0  72 79 20 72 65 73 74 72  69 63 74 69 6f 6e 73 2e  |ry restrictions.|
0001b4e0  20 54 6f 20 64 69 73 70  6c 61 79 20 70 69 63 74  | To display pict|
0001b4f0  75 72 65 73 20 71 75 69  74 20 41 4c 50 53 20 61  |ures quit ALPS a|
0001b500  6e 64 20 72 65 73 74 61  72 74 20 69 6e 20 74 68  |nd restart in th|
0001b510  69 73 20 6d 6f 64 65 2e  22 2c 30 2c 31 2c 35 29  |is mode.",0,1,5)|
0001b520  0d b7 ac 05 cb 0d b7 b6  05 e1 0d b7 c0 04 0d b7  |................|
0001b530  ca 0e dd 20 f2 6c 6f 61  64 28 62 29 0d b7 d4 18  |... .load(b)....|
0001b540  6f 75 72 74 79 70 65 3d  a0 28 22 26 22 2b 74 79  |ourtype=.("&"+ty|
0001b550  70 65 24 29 0d b7 de 16  e7 20 62 21 34 30 20 3d  |pe$)..... b!40 =|
0001b560  20 6f 75 72 74 79 70 65  20 8c 0d b7 e8 17 20 20  | ourtype .....  |
0001b570  70 61 74 68 24 3d a4 6e  61 6d 65 28 62 2b 34 34  |path$=.name(b+44|
0001b580  29 0d b7 f2 16 20 20 e7  20 ac 20 64 61 74 61 5f  |)....  . . data_|
0001b590  73 61 76 65 64 20 8c 0d  b7 fc 10 20 20 20 20 f2  |saved .....    .|
0001b5a0  4c 6f 61 64 41 63 6b 0d  b8 06 5c 20 20 20 20 f2  |LoadAck...\    .|
0001b5b0  65 6e 73 75 72 65 28 31  2c 22 55 6e 73 61 76 65  |ensure(1,"Unsave|
0001b5c0  64 20 64 61 74 61 20 69  6e 20 6d 65 6d 6f 72 79  |d data in memory|
0001b5d0  2e 20 50 6c 65 61 73 65  20 63 6f 6e 66 69 72 6d  |. Please confirm|
0001b5e0  20 74 68 61 74 20 79 6f  75 20 77 61 6e 74 20 74  | that you want t|
0001b5f0  6f 20 6c 6f 61 64 20 74  68 69 73 20 66 69 6c 65  |o load this file|
0001b600  2e 22 29 0d b8 10 09 20  20 20 20 cc 0d b8 1a 18  |.")....    .....|
0001b610  20 20 20 20 f2 6c 6f 61  64 5f 61 6c 6c 28 70 61  |    .load_all(pa|
0001b620  74 68 24 29 0d b8 24 10  20 20 20 20 f2 4c 6f 61  |th$)..$.    .Loa|
0001b630  64 41 63 6b 0d b8 2e 27  20 20 20 20 f2 6f 70 65  |dAck...'    .ope|
0001b640  6e 28 41 4c 50 53 6d 61  69 6e 2c 34 30 30 2c 38  |n(ALPSmain,400,8|
0001b650  30 30 2c 36 30 30 2c 36  30 30 29 0d b8 38 07 20  |00,600,600)..8. |
0001b660  20 cd 0d b8 42 05 cd 0d  b8 4c 05 e1 0d b8 56 04  | ...B....L....V.|
0001b670  0d b8 60 0e dd 20 f2 4c  6f 61 64 41 63 6b 0d b8  |..`.. .LoadAck..|
0001b680  6a 29 62 6c 6f 63 6b 21  31 32 3d 62 6c 6f 63 6b  |j)block!12=block|
0001b690  21 38 3a 62 6c 6f 63 6b  21 31 36 3d 34 3a 21 62  |!8:block!16=4:!b|
0001b6a0  6c 6f 63 6b 3d 36 34 0d  b8 74 2a c8 99 20 22 57  |lock=64..t*.. "W|
0001b6b0  69 6d 70 5f 53 65 6e 64  4d 65 73 73 61 67 65 22  |imp_SendMessage"|
0001b6c0  2c 31 37 2c 62 6c 6f 63  6b 2c 62 6c 6f 63 6b 21  |,17,block,block!|
0001b6d0  34 0d b8 7e 05 e1 0d b8  88 04 0d b8 92 0b dd 20  |4..~........... |
0001b6e0  f2 73 61 76 65 0d b8 9c  24 70 61 74 68 24 3d a4  |.save...$path$=.|
0001b6f0  67 65 74 69 63 6f 6e 64  61 74 61 28 73 61 76 65  |geticondata(save|
0001b700  68 61 6e 64 6c 65 2c 32  29 0d b8 a6 0f f2 67 65  |handle,2).....ge|
0001b710  74 70 6f 69 6e 74 65 72  0d b8 b0 34 62 6c 6f 63  |tpointer...4bloc|
0001b720  6b 21 32 30 3d 36 34 3a  62 6c 6f 63 6b 21 33 32  |k!20=64:block!32|
0001b730  3d 30 3a 62 6c 6f 63 6b  21 33 36 3d 31 3a f4 20  |=0:block!36=1:. |
0001b740  44 61 74 61 53 61 76 65  20 4d 53 47 0d b8 ba 45  |DataSave MSG...E|
0001b750  62 6c 6f 63 6b 21 34 30  3d 68 61 6e 64 6c 65 25  |block!40=handle%|
0001b760  3a 62 6c 6f 63 6b 21 34  34 3d 69 63 6f 6e 25 3a  |:block!44=icon%:|
0001b770  62 6c 6f 63 6b 21 34 38  3d 6d 6f 75 73 65 78 25  |block!48=mousex%|
0001b780  3a 62 6c 6f 63 6b 21 35  32 3d 6d 6f 75 73 65 79  |:block!52=mousey|
0001b790  25 0d b8 c4 2e 62 6c 6f  63 6b 21 35 36 3d 31 30  |%....block!56=10|
0001b7a0  30 30 30 3a f4 20 45 73  74 69 6d 61 74 65 64 20  |000:. Estimated |
0001b7b0  73 69 7a 65 20 6f 66 20  64 61 74 61 3f 3f 3f 0d  |size of data???.|
0001b7c0  b8 ce 25 62 6c 6f 63 6b  21 36 30 3d a0 28 22 26  |..%block!60=.("&|
0001b7d0  22 2b 74 79 70 65 24 29  3a f4 20 46 69 6c 65 20  |"+type$):. File |
0001b7e0  74 79 70 65 0d b8 d8 23  24 28 62 6c 6f 63 6b 2b  |type...#$(block+|
0001b7f0  36 34 29 3d a4 6c 65 61  66 6e 61 6d 65 28 70 61  |64)=.leafname(pa|
0001b800  74 68 24 29 2b bd 30 0d  b8 e2 33 c8 99 20 22 57  |th$)+.0...3.. "W|
0001b810  69 6d 70 5f 53 65 6e 64  4d 65 73 73 61 67 65 22  |imp_SendMessage"|
0001b820  2c 31 37 2c 62 6c 6f 63  6b 2b 32 30 2c 68 61 6e  |,17,block+20,han|
0001b830  64 6c 65 25 2c 69 63 6f  6e 25 0d b8 ec 05 e1 0d  |dle%,icon%......|
0001b840  b8 f6 04 0d b9 00 11 dd  20 a4 6e 61 6d 65 28 69  |........ .name(i|
0001b850  6e 64 78 29 0d b9 0a 0f  ea 20 66 24 2c 67 24 2c  |ndx)..... f$,g$,|
0001b860  70 2c 69 0d b9 14 04 0d  b9 1e 0f c8 95 20 3f 69  |p,i.......... ?i|
0001b870  6e 64 78 3c 3e 30 0d b9  28 18 66 24 2b 3d bd 28  |ndx<>0..(.f$+=.(|
0001b880  3f 69 6e 64 78 29 3a 69  6e 64 78 2b 3d 31 0d b9  |?indx):indx+=1..|
0001b890  32 05 ce 0d b9 3c 07 3d  66 24 0d b9 46 04 0d b9  |2....<.=f$..F...|
0001b8a0  50 13 dd 20 a4 6c 65 61  66 6e 61 6d 65 28 66 24  |P.. .leafname(f$|
0001b8b0  29 0d b9 5a 07 70 3d 31  0d b9 64 05 f5 0d b9 6e  |)..Z.p=1..d....n|
0001b8c0  28 69 3d a7 66 24 2c 22  2e 22 29 3a e7 20 69 3c  |(i=.f$,"."):. i<|
0001b8d0  3e 30 20 70 3d 69 2b 31  3a c1 66 24 2c 69 2c 31  |>0 p=i+1:.f$,i,1|
0001b8e0  29 3d 22 23 22 0d b9 78  09 fd 20 69 3d 30 0d b9  |)="#"..x.. i=0..|
0001b8f0  82 0d 66 24 3d c1 66 24  2c 70 29 0d b9 8c 07 3d  |..f$=.f$,p)....=|
0001b900  66 24 0d b9 96 04 0d b9  a0 14 dd 20 a4 74 69 63  |f$......... .tic|
0001b910  6b 5f 6f 62 6a 65 63 74  65 64 0d b9 aa 27 66 6c  |k_objected...'fl|
0001b920  61 67 73 25 3d bb 28 a4  67 65 74 69 63 6f 6e 64  |ags%=.(.geticond|
0001b930  61 74 61 28 6f 62 6a 68  61 6e 64 6c 65 2c 38 29  |ata(objhandle,8)|
0001b940  29 0d b9 b4 14 e3 20 66  6c 25 3d 37 20 b8 20 30  |)..... fl%=7 . 0|
0001b950  20 88 20 2d 31 0d b9 be  1a 20 20 66 6c 61 67 25  | . -1....  flag%|
0001b960  3d 66 6c 61 67 73 25 20  81 20 32 5e 66 6c 25 0d  |=flags% . 2^fl%.|
0001b970  b9 c8 1b 20 20 66 6c 61  67 73 25 3d 66 6c 61 67  |...  flags%=flag|
0001b980  73 25 20 83 20 32 5e 66  6c 25 0d b9 d2 23 20 20  |s% . 2^fl%...#  |
0001b990  70 74 72 3d 28 6d 5f 6f  62 6a 66 6c 61 67 2b 32  |ptr=(m_objflag+2|
0001b9a0  38 2b 28 37 2d 66 6c 25  29 2a 32 34 29 0d b9 dc  |8+(7-fl%)*24)...|
0001b9b0  11 20 20 e7 20 66 6c 61  67 25 3d 31 20 8c 0d b9  |.  . flag%=1 ...|
0001b9c0  e6 15 20 20 20 20 3f 70  74 72 3d 3f 70 74 72 20  |..    ?ptr=?ptr |
0001b9d0  84 20 31 0d b9 f0 1d 20  20 cc 20 3f 70 74 72 3d  |. 1....  . ?ptr=|
0001b9e0  3f 70 74 72 20 80 20 25  31 31 31 31 31 31 31 30  |?ptr . %11111110|
0001b9f0  0d b9 fa 07 20 20 cd 0d  ba 04 09 ed 20 66 6c 25  |....  ...... fl%|
0001ba00  0d ba 0e 06 3d 30 0d ba  18 04 0d ba 22 13 dd 20  |....=0......".. |
0001ba10  a4 74 69 63 6b 5f 6d 65  73 73 61 67 65 0d ba 2c  |.tick_message..,|
0001ba20  0b 20 20 70 74 72 3d 30  0d ba 36 15 20 20 e3 20  |.  ptr=0..6.  . |
0001ba30  49 25 3d 31 20 b8 20 6d  61 78 73 77 25 0d ba 40  |I%=1 . maxsw%..@|
0001ba40  29 20 20 20 20 24 28 73  77 64 61 74 61 25 2b 70  |)    $(swdata%+p|
0001ba50  74 72 29 3d c3 28 73 77  69 74 63 68 5f 76 61 6c  |tr)=.(switch_val|
0001ba60  73 28 49 25 29 29 0d ba  4a 0f 20 20 20 20 70 74  |s(I%))..J.    pt|
0001ba70  72 2b 3d 31 32 0d ba 54  1d 20 20 20 20 e7 20 49  |r+=12..T.    . I|
0001ba80  25 3e 73 77 69 74 63 68  5f 76 61 6c 73 28 30 29  |%>switch_vals(0)|
0001ba90  20 8c 0d ba 5e 3d 20 20  20 20 20 20 3f 28 6d 5f  | ...^=      ?(m_|
0001baa0  73 77 69 74 63 68 25 2b  32 38 2b 32 34 2a 49 25  |switch%+28+24*I%|
0001bab0  29 3d 28 3f 28 6d 5f 73  77 69 74 63 68 25 2b 32  |)=(?(m_switch%+2|
0001bac0  38 2b 32 34 2a 49 25 29  20 80 20 26 46 45 29 0d  |8+24*I%) . &FE).|
0001bad0  ba 68 09 20 20 20 20 cc  0d ba 72 3b 20 20 20 20  |.h.    ...r;    |
0001bae0  20 20 3f 28 6d 5f 73 77  69 74 63 68 25 2b 32 38  |  ?(m_switch%+28|
0001baf0  2b 32 34 2a 49 25 29 3d  28 3f 28 6d 5f 73 77 69  |+24*I%)=(?(m_swi|
0001bb00  74 63 68 25 2b 32 38 2b  32 34 2a 49 25 29 20 84  |tch%+28+24*I%) .|
0001bb10  20 31 29 0d ba 7c 09 20  20 20 20 cd 0d ba 86 07  | 1)..|.    .....|
0001bb20  20 20 ed 0d ba 90 1a 20  20 24 28 6d 5f 74 65 78  |  .....  $(m_tex|
0001bb30  74 25 2b 35 29 3d c3 28  6d 70 74 72 29 0d ba 9a  |t%+5)=.(mptr)...|
0001bb40  6b 20 20 e7 20 73 77 69  74 63 68 5f 76 61 6c 73  |k  . switch_vals|
0001bb50  28 30 29 3c 3e 30 20 8c  20 3f 28 6d 5f 73 77 69  |(0)<>0 . ?(m_swi|
0001bb60  74 63 68 25 2b 32 38 29  3d 28 3f 28 6d 5f 73 77  |tch%+28)=(?(m_sw|
0001bb70  69 74 63 68 25 2b 32 38  29 20 80 20 26 46 45 29  |itch%+28) . &FE)|
0001bb80  20 8b 20 3f 28 6d 5f 73  77 69 74 63 68 25 2b 32  | . ?(m_switch%+2|
0001bb90  38 29 3d 28 3f 28 6d 5f  73 77 69 74 63 68 25 2b  |8)=(?(m_switch%+|
0001bba0  32 38 29 20 84 20 31 29  0d ba a4 13 20 20 e7 20  |28) . 1)....  . |
0001bbb0  6f 76 65 72 77 72 69 74  65 20 8c 0d ba ae 2d 20  |overwrite ....- |
0001bbc0  20 20 20 3f 28 6d 5f 74  65 78 74 25 2b 32 38 2b  |   ?(m_text%+28+|
0001bbd0  32 34 29 3d 3f 28 6d 5f  74 65 78 74 25 2b 32 38  |24)=?(m_text%+28|
0001bbe0  2b 32 34 29 20 84 20 31  0d ba b8 29 20 20 20 20  |+24) . 1...)    |
0001bbf0  3f 28 6d 5f 74 65 78 74  25 2b 32 38 29 3d 3f 28  |?(m_text%+28)=?(|
0001bc00  6d 5f 74 65 78 74 25 2b  32 38 29 20 80 20 26 46  |m_text%+28) . &F|
0001bc10  45 0d ba c2 07 20 20 cc  0d ba cc 2f 20 20 20 20  |E....  ..../    |
0001bc20  3f 28 6d 5f 74 65 78 74  25 2b 32 38 2b 32 34 29  |?(m_text%+28+24)|
0001bc30  3d 3f 28 6d 5f 74 65 78  74 25 2b 32 38 2b 32 34  |=?(m_text%+28+24|
0001bc40  29 20 80 20 26 46 45 0d  ba d6 27 20 20 20 20 3f  |) . &FE...'    ?|
0001bc50  28 6d 5f 74 65 78 74 25  2b 32 38 29 3d 3f 28 6d  |(m_text%+28)=?(m|
0001bc60  5f 74 65 78 74 25 2b 32  38 29 20 84 20 31 0d ba  |_text%+28) . 1..|
0001bc70  e0 07 20 20 cd 0d ba ea  06 3d 30 0d ba f4 04 0d  |..  .....=0.....|
0001bc80  ba fe 13 dd 20 a4 74 69  63 6b 5f 70 72 6f 67 72  |.... .tick_progr|
0001bc90  61 6d 0d bb 08 13 20 20  e7 20 6f 76 65 72 77 72  |am....  . overwr|
0001bca0  69 74 65 20 8c 0d bb 12  2d 20 20 20 20 3f 28 6d  |ite ....-    ?(m|
0001bcb0  5f 70 72 6f 67 25 2b 32  38 2b 32 34 29 3d 3f 28  |_prog%+28+24)=?(|
0001bcc0  6d 5f 70 72 6f 67 25 2b  32 38 2b 32 34 29 20 84  |m_prog%+28+24) .|
0001bcd0  20 31 0d bb 1c 29 20 20  20 20 3f 28 6d 5f 70 72  | 1...)    ?(m_pr|
0001bce0  6f 67 25 2b 32 38 29 3d  3f 28 6d 5f 70 72 6f 67  |og%+28)=?(m_prog|
0001bcf0  25 2b 32 38 29 20 80 20  26 46 45 0d bb 26 07 20  |%+28) . &FE..&. |
0001bd00  20 cc 0d bb 30 2f 20 20  20 20 3f 28 6d 5f 70 72  | ...0/    ?(m_pr|
0001bd10  6f 67 25 2b 32 38 2b 32  34 29 3d 3f 28 6d 5f 70  |og%+28+24)=?(m_p|
0001bd20  72 6f 67 25 2b 32 38 2b  32 34 29 20 80 20 26 46  |rog%+28+24) . &F|
0001bd30  45 0d bb 3a 27 20 20 20  20 3f 28 6d 5f 70 72 6f  |E..:'    ?(m_pro|
0001bd40  67 25 2b 32 38 29 3d 3f  28 6d 5f 70 72 6f 67 25  |g%+28)=?(m_prog%|
0001bd50  2b 32 38 29 20 84 20 31  0d bb 44 07 20 20 cd 0d  |+28) . 1..D.  ..|
0001bd60  bb 4e 1f 20 20 e7 20 28  6c 69 73 74 6f 70 74 69  |.N.  . (listopti|
0001bd70  6f 6e 20 80 20 25 31 30  29 3c 3e 30 20 8c 0d bb  |on . %10)<>0 ...|
0001bd80  58 33 20 20 20 20 3f 28  6d 5f 6c 69 73 74 6f 70  |X3    ?(m_listop|
0001bd90  74 73 2b 32 38 2b 32 34  29 3d 3f 28 6d 5f 6c 69  |ts+28+24)=?(m_li|
0001bda0  73 74 6f 70 74 73 2b 32  38 2b 32 34 29 20 84 20  |stopts+28+24) . |
0001bdb0  31 0d bb 62 2f 20 20 20  20 3f 28 6d 5f 6c 69 73  |1..b/    ?(m_lis|
0001bdc0  74 6f 70 74 73 2b 32 38  29 3d 3f 28 6d 5f 6c 69  |topts+28)=?(m_li|
0001bdd0  73 74 6f 70 74 73 2b 32  38 29 20 80 20 26 46 45  |stopts+28) . &FE|
0001bde0  0d bb 6c 07 20 20 cc 0d  bb 76 35 20 20 20 20 3f  |..l.  ...v5    ?|
0001bdf0  28 6d 5f 6c 69 73 74 6f  70 74 73 2b 32 38 2b 32  |(m_listopts+28+2|
0001be00  34 29 3d 3f 28 6d 5f 6c  69 73 74 6f 70 74 73 2b  |4)=?(m_listopts+|
0001be10  32 38 2b 32 34 29 20 80  20 26 46 45 0d bb 80 2d  |28+24) . &FE...-|
0001be20  20 20 20 20 3f 28 6d 5f  6c 69 73 74 6f 70 74 73  |    ?(m_listopts|
0001be30  2b 32 38 29 3d 3f 28 6d  5f 6c 69 73 74 6f 70 74  |+28)=?(m_listopt|
0001be40  73 2b 32 38 29 20 84 20  31 0d bb 8a 07 20 20 cd  |s+28) . 1....  .|
0001be50  0d bb 94 06 3d 30 0d bb  9e 04 0d bb a8 11 dd 20  |....=0......... |
0001be60  a4 74 69 63 6b 5f 76 6f  63 61 62 0d bb b2 13 20  |.tick_vocab.... |
0001be70  20 e7 20 6f 76 65 72 77  72 69 74 65 20 8c 0d bb  | . overwrite ...|
0001be80  bc 2f 20 20 20 20 3f 28  6d 5f 76 6f 63 61 62 25  |./    ?(m_vocab%|
0001be90  2b 32 38 2b 32 34 29 3d  3f 28 6d 5f 76 6f 63 61  |+28+24)=?(m_voca|
0001bea0  62 25 2b 32 38 2b 32 34  29 20 84 20 31 0d bb c6  |b%+28+24) . 1...|
0001beb0  2b 20 20 20 20 3f 28 6d  5f 76 6f 63 61 62 25 2b  |+    ?(m_vocab%+|
0001bec0  32 38 29 3d 3f 28 6d 5f  76 6f 63 61 62 25 2b 32  |28)=?(m_vocab%+2|
0001bed0  38 29 20 80 20 26 46 45  0d bb d0 07 20 20 cc 0d  |8) . &FE....  ..|
0001bee0  bb da 31 20 20 20 20 3f  28 6d 5f 76 6f 63 61 62  |..1    ?(m_vocab|
0001bef0  25 2b 32 38 2b 32 34 29  3d 3f 28 6d 5f 76 6f 63  |%+28+24)=?(m_voc|
0001bf00  61 62 25 2b 32 38 2b 32  34 29 20 80 20 26 46 45  |ab%+28+24) . &FE|
0001bf10  0d bb e4 29 20 20 20 20  3f 28 6d 5f 76 6f 63 61  |...)    ?(m_voca|
0001bf20  62 25 2b 32 38 29 3d 3f  28 6d 5f 76 6f 63 61 62  |b%+28)=?(m_vocab|
0001bf30  25 2b 32 38 29 20 84 20  31 0d bb ee 07 20 20 cd  |%+28) . 1....  .|
0001bf40  0d bb f8 10 20 20 e3 20  49 25 3d 31 20 b8 20 37  |....  . I%=1 . 7|
0001bf50  0d bc 02 18 20 20 20 20  e7 20 49 25 3d 76 6f 63  |....    . I%=voc|
0001bf60  5f 73 65 63 74 25 20 8c  0d bc 0c 3f 20 20 20 20  |_sect% ....?    |
0001bf70  20 20 3f 28 6d 5f 76 6f  63 61 62 25 2b 32 38 2b  |  ?(m_vocab%+28+|
0001bf80  32 34 2a 28 49 25 2b 34  29 29 3d 3f 28 6d 5f 76  |24*(I%+4))=?(m_v|
0001bf90  6f 63 61 62 25 2b 32 38  2b 32 34 2a 28 49 25 2b  |ocab%+28+24*(I%+|
0001bfa0  34 29 29 20 84 20 31 0d  bc 16 09 20 20 20 20 cc  |4)) . 1....    .|
0001bfb0  0d bc 20 41 20 20 20 20  20 20 3f 28 6d 5f 76 6f  |.. A      ?(m_vo|
0001bfc0  63 61 62 25 2b 32 38 2b  32 34 2a 28 49 25 2b 34  |cab%+28+24*(I%+4|
0001bfd0  29 29 3d 3f 28 6d 5f 76  6f 63 61 62 25 2b 32 38  |))=?(m_vocab%+28|
0001bfe0  2b 32 34 2a 28 49 25 2b  34 29 29 20 80 20 26 46  |+24*(I%+4)) . &F|
0001bff0  45 0d bc 2a 09 20 20 20  20 cd 0d bc 34 0a 20 20  |E..*.    ...4.  |
0001c000  ed 20 49 25 0d bc 3e 06  3d 30 0d bc 48 04 0d bc  |. I%..>.=0..H...|
0001c010  52 04 0d bc 5c 0c dd 20  a4 74 69 63 6b 5f 0d bc  |R...\.. .tick_..|
0001c020  66 06 3d 30 0d bc 70 04  0d bc 7a 04 0d bc 84 14  |f.=0..p...z.....|
0001c030  dd 20 a4 74 69 63 6b 5f  72 6f 6f 6d 65 64 69 74  |. .tick_roomedit|
0001c040  0d bc 8e 32 f4 20 46 69  72 73 74 20 73 65 74 20  |...2. First set |
0001c050  74 68 65 20 27 74 69 63  6b 27 20 62 69 74 73 20  |the 'tick' bits |
0001c060  66 6f 72 20 65 61 63 68  20 6d 65 6e 75 20 69 74  |for each menu it|
0001c070  65 6d 0d bc 98 29 66 6c  61 67 73 25 3d bb 28 a4  |em...)flags%=.(.|
0001c080  67 65 74 69 63 6f 6e 64  61 74 61 28 72 6f 6f 6d  |geticondata(room|
0001c090  68 61 6e 64 6c 65 2c 33  34 29 29 0d bc a2 14 e3  |handle,34)).....|
0001c0a0  20 66 6c 25 3d 37 20 b8  20 30 20 88 20 2d 31 0d  | fl%=7 . 0 . -1.|
0001c0b0  bc ac 1a 20 20 66 6c 61  67 25 3d 66 6c 61 67 73  |...  flag%=flags|
0001c0c0  25 20 81 20 32 5e 66 6c  25 0d bc b6 1b 20 20 66  |% . 2^fl%....  f|
0001c0d0  6c 61 67 73 25 3d 66 6c  61 67 73 25 20 83 20 32  |lags%=flags% . 2|
0001c0e0  5e 66 6c 25 0d bc c0 22  20 20 70 74 72 3d 28 6d  |^fl%..."  ptr=(m|
0001c0f0  5f 72 6d 66 6c 61 67 2b  32 38 2b 28 37 2d 66 6c  |_rmflag+28+(7-fl|
0001c100  25 29 2a 32 34 29 0d bc  ca 11 20 20 e7 20 66 6c  |%)*24)....  . fl|
0001c110  61 67 25 3d 31 20 8c 0d  bc d4 15 20 20 20 20 3f  |ag%=1 .....    ?|
0001c120  70 74 72 3d 3f 70 74 72  20 84 20 31 0d bc de 1d  |ptr=?ptr . 1....|
0001c130  20 20 cc 20 3f 70 74 72  3d 3f 70 74 72 20 80 20  |  . ?ptr=?ptr . |
0001c140  25 31 31 31 31 31 31 31  30 0d bc e8 07 20 20 cd  |%11111110....  .|
0001c150  0d bc f2 09 ed 20 66 6c  25 0d bc fc 06 3d 30 0d  |..... fl%....=0.|
0001c160  bd 06 04 0d bd 10 04 0d  bd 1a 14 dd 20 a4 74 69  |............ .ti|
0001c170  63 6b 5f 65 78 69 74 65  64 69 74 0d bd 24 32 f4  |ck_exitedit..$2.|
0001c180  20 46 69 72 73 74 20 73  65 74 20 74 68 65 20 27  | First set the '|
0001c190  74 69 63 6b 27 20 62 69  74 73 20 66 6f 72 20 65  |tick' bits for e|
0001c1a0  61 63 68 20 6d 65 6e 75  20 69 74 65 6d 0d bd 2e  |ach menu item...|
0001c1b0  2a 66 6c 61 67 73 25 3d  3f 28 72 64 61 74 61 25  |*flags%=?(rdata%|
0001c1c0  2b 72 70 74 72 2a 72 5f  6c 65 6e 2b 6f 6c 64 72  |+rptr*r_len+oldr|
0001c1d0  6d 69 63 6f 6e 25 29 0d  bd 38 14 e3 20 66 6c 25  |micon%)..8.. fl%|
0001c1e0  3d 37 20 b8 20 30 20 88  20 2d 31 0d bd 42 1a 20  |=7 . 0 . -1..B. |
0001c1f0  20 66 6c 61 67 25 3d 66  6c 61 67 73 25 20 81 20  | flag%=flags% . |
0001c200  32 5e 66 6c 25 0d bd 4c  1b 20 20 66 6c 61 67 73  |2^fl%..L.  flags|
0001c210  25 3d 66 6c 61 67 73 25  20 83 20 32 5e 66 6c 25  |%=flags% . 2^fl%|
0001c220  0d bd 56 21 20 20 70 74  72 3d 28 6d 5f 65 78 69  |..V!  ptr=(m_exi|
0001c230  74 66 2b 32 38 2b 28 37  2d 66 6c 25 29 2a 32 34  |tf+28+(7-fl%)*24|
0001c240  29 0d bd 60 11 20 20 e7  20 66 6c 61 67 25 3d 31  |)..`.  . flag%=1|
0001c250  20 8c 0d bd 6a 15 20 20  20 20 3f 70 74 72 3d 3f  | ...j.    ?ptr=?|
0001c260  70 74 72 20 84 20 31 0d  bd 74 1d 20 20 cc 20 3f  |ptr . 1..t.  . ?|
0001c270  70 74 72 3d 3f 70 74 72  20 80 20 25 31 31 31 31  |ptr=?ptr . %1111|
0001c280  31 31 31 30 0d bd 7e 07  20 20 cd 0d bd 88 09 ed  |1110..~.  ......|
0001c290  20 66 6c 25 0d bd 92 06  3d 30 0d bd 9c 04 0d bd  | fl%....=0......|
0001c2a0  a6 04 0d bd b0 12 dd 20  a4 62 75 74 74 6f 6e 5f  |....... .button_|
0001c2b0  6d 69 73 63 0d bd ba 19  69 63 6f 6e 25 28 54 48  |misc....icon%(TH|
0001c2c0  45 6d 69 73 63 69 63 6f  6e 29 3d 2d 31 0d bd c4  |Emiscicon)=-1...|
0001c2d0  06 3d 30 0d bd ce 04 0d  bd d8 04 0d bd e2 10 dd  |.=0.............|
0001c2e0  20 a4 74 69 63 6b 5f 6d  69 73 63 0d bd ec 1b 20  | .tick_misc.... |
0001c2f0  20 20 70 74 72 3d 28 6d  69 73 63 6d 65 6e 75 2b  |  ptr=(miscmenu+|
0001c300  32 38 2b 34 38 29 0d bd  f6 14 20 20 20 e7 20 64  |28+48)....   . d|
0001c310  61 74 61 76 61 6c 69 64  20 8c 0d be 00 19 20 20  |atavalid .....  |
0001c320  20 20 20 20 3f 70 74 72  20 3d 20 3f 70 74 72 20  |    ?ptr = ?ptr |
0001c330  84 20 31 0d be 0a 08 20  20 20 cc 0d be 14 21 20  |. 1....   ....! |
0001c340  20 20 20 20 20 3f 70 74  72 20 3d 20 3f 70 74 72  |     ?ptr = ?ptr|
0001c350  20 80 20 25 31 31 31 31  31 31 31 30 0d be 1e 08  | . %11111110....|
0001c360  20 20 20 cd 0d be 28 06  3d 30 0d be 32 04 0d be  |   ...(.=0..2...|
0001c370  3c 04 0d be 46 12 dd 20  f2 68 65 6c 70 28 77 2c  |<...F.. .help(w,|
0001c380  68 2c 62 29 0d be 50 0b  ea 20 68 65 6c 70 24 0d  |h,b)..P.. help$.|
0001c390  be 5a 0a c8 8e 20 77 20  ca 0d be 64 96 c9 20 2d  |.Z... w ...d.. -|
0001c3a0  32 3a 68 65 6c 70 24 3d  22 54 68 69 73 20 69 73  |2:help$="This is|
0001c3b0  20 74 68 65 20 41 4c 50  53 20 69 63 6f 6e 2e 7c  | the ALPS icon.||
0001c3c0  4d 43 6c 69 63 6b 20 53  45 4c 45 43 54 20 74 6f  |MClick SELECT to|
0001c3d0  20 63 68 6f 6f 73 65 20  61 6e 20 65 64 69 74 6f  | choose an edito|
0001c3e0  72 2e 7c 4d 43 6c 69 63  6b 20 4d 45 4e 55 20 74  |r.|MClick MENU t|
0001c3f0  6f 20 71 75 69 74 2e 7c  4d 44 72 61 67 20 61 6e  |o quit.|MDrag an|
0001c400  20 27 41 6c 70 73 27 20  66 69 6c 65 20 69 63 6f  | 'Alps' file ico|
0001c410  6e 20 74 6f 20 74 68 65  20 41 4c 50 53 20 69 63  |n to the ALPS ic|
0001c420  6f 6e 20 74 6f 20 6c 6f  61 64 20 69 74 2e 22 0d  |on to load it.".|
0001c430  be 6e 0e c9 20 41 4c 50  53 6d 61 69 6e 0d be 78  |.n.. ALPSmain..x|
0001c440  25 68 65 6c 70 24 3d 22  43 6c 69 63 6b 20 53 45  |%help$="Click SE|
0001c450  4c 45 43 54 20 74 6f 20  6f 70 65 6e 20 74 68 65  |LECT to open the|
0001c460  20 22 0d be 82 0a c8 8e  20 68 20 ca 0d be 8c 4e  | "...... h ....N|
0001c470  c9 20 30 3a 68 65 6c 70  24 3d 22 43 6c 69 63 6b  |. 0:help$="Click|
0001c480  20 53 45 4c 45 43 54 20  74 6f 20 53 61 76 65 20  | SELECT to Save |
0001c490  66 69 6c 65 73 20 6f 72  20 53 65 74 20 75 70 20  |files or Set up |
0001c4a0  61 20 64 69 73 6b 20 66  6f 72 20 75 73 65 20 77  |a disk for use w|
0001c4b0  69 74 68 20 41 4c 50 53  2e 22 0d be 96 46 c9 20  |ith ALPS."...F. |
0001c4c0  31 3a 68 65 6c 70 24 3d  22 43 6c 69 63 6b 20 53  |1:help$="Click S|
0001c4d0  45 4c 45 43 54 20 74 6f  20 64 69 73 70 6c 61 79  |ELECT to display|
0001c4e0  20 74 68 65 20 41 4c 50  53 20 76 61 72 69 61 62  | the ALPS variab|
0001c4f0  6c 65 73 20 61 6e 64 20  73 74 61 74 75 73 2e 22  |les and status."|
0001c500  0d be a0 71 c9 20 32 3a  68 65 6c 70 24 2b 3d 22  |...q. 2:help$+="|
0001c510  52 6f 6f 6d 20 45 64 69  74 6f 72 20 61 6e 64 20  |Room Editor and |
0001c520  65 6e 74 65 72 20 79 6f  75 72 20 6d 61 70 20 64  |enter your map d|
0001c530  65 74 61 69 6c 73 2e 7c  4d 43 6c 69 63 6b 20 4d  |etails.|MClick M|
0001c540  45 4e 55 20 50 72 69 6e  74 20 74 68 65 20 72 6f  |ENU Print the ro|
0001c550  6f 6d 20 64 61 74 61 20  6f 72 20 49 6d 70 6f 72  |om data or Impor|
0001c560  74 20 42 42 43 20 72 6f  6f 6d 20 64 61 74 61 2e  |t BBC room data.|
0001c570  22 0d be aa 7f c9 20 33  3a 68 65 6c 70 24 2b 3d  |"..... 3:help$+=|
0001c580  22 4f 62 6a 65 63 74 20  45 64 69 74 6f 72 20 61  |"Object Editor a|
0001c590  6e 64 20 65 6e 74 65 72  20 79 6f 75 72 20 6f 62  |nd enter your ob|
0001c5a0  6a 65 63 74 20 64 65 74  61 69 6c 73 2e 7c 4d 43  |ject details.|MC|
0001c5b0  6c 69 63 6b 20 4d 45 4e  55 20 74 6f 20 50 72 69  |lick MENU to Pri|
0001c5c0  6e 74 20 74 68 65 20 6f  62 6a 65 63 74 73 20 64  |nt the objects d|
0001c5d0  61 74 61 20 6f 72 20 49  6d 70 6f 72 74 20 42 42  |ata or Import BB|
0001c5e0  43 20 6f 62 6a 65 63 74  73 20 64 61 74 61 2e 22  |C objects data."|
0001c5f0  0d be b4 5a c9 20 34 3a  68 65 6c 70 24 2b 3d 22  |...Z. 4:help$+="|
0001c600  4d 65 73 73 61 67 65 20  45 64 69 74 6f 72 2e 7c  |Message Editor.||
0001c610  4d 43 6c 69 63 6b 20 4d  45 4e 55 20 74 6f 20 50  |MClick MENU to P|
0001c620  72 69 6e 74 20 74 68 65  20 6d 65 73 73 61 67 65  |rint the message|
0001c630  73 20 6f 72 20 49 6d 70  6f 72 74 20 42 42 43 20  |s or Import BBC |
0001c640  6d 65 73 73 61 67 65 73  2e 22 0d be be 43 c9 20  |messages."...C. |
0001c650  35 3a 68 65 6c 70 24 3d  22 54 68 69 73 20 69 73  |5:help$="This is|
0001c660  20 74 68 65 20 41 6c 70  69 6e 65 20 53 6f 66 74  | the Alpine Soft|
0001c670  77 61 72 65 20 6c 6f 67  6f 2e 20 49 74 20 68 61  |ware logo. It ha|
0001c680  73 20 6e 6f 20 65 66 66  65 63 74 2e 22 0d be c8  |s no effect."...|
0001c690  83 c9 20 36 3a 68 65 6c  70 24 2b 3d 22 50 72 6f  |.. 6:help$+="Pro|
0001c6a0  67 72 61 6d 20 45 64 69  74 6f 72 20 61 6e 64 20  |gram Editor and |
0001c6b0  65 6e 74 65 72 20 74 68  65 20 67 61 6d 65 27 73  |enter the game's|
0001c6c0  20 6c 6f 67 69 63 2e 7c  4d 43 6c 69 63 6b 20 4d  | logic.|MClick M|
0001c6d0  45 4e 55 20 74 6f 20 50  72 69 6e 74 20 74 68 65  |ENU to Print the|
0001c6e0  20 70 72 6f 67 72 61 6d  2c 20 49 6d 70 6f 72 74  | program, Import|
0001c6f0  20 61 20 42 42 43 20 70  72 6f 67 72 61 6d 20 6f  | a BBC program o|
0001c700  72 20 52 75 6e 20 74 68  65 20 67 61 6d 65 2e 22  |r Run the game."|
0001c710  0d be d2 8d c9 20 37 3a  68 65 6c 70 24 2b 3d 22  |..... 7:help$+="|
0001c720  43 68 61 72 61 63 74 65  72 20 44 65 73 69 67 6e  |Character Design|
0001c730  65 72 2e 7c 4d 44 6f 75  62 6c 65 2d 63 6c 69 63  |er.|MDouble-clic|
0001c740  6b 20 61 20 27 42 42 43  20 66 6f 6e 74 27 20 66  |k a 'BBC font' f|
0001c750  69 6c 65 20 74 6f 20 4c  6f 61 64 20 61 20 63 68  |ile to Load a ch|
0001c760  61 72 61 63 74 65 72 20  73 65 74 2e 7c 4d 43 75  |aracter set.|MCu|
0001c770  72 72 65 6e 74 20 63 68  61 72 61 63 74 65 72 20  |rrent character |
0001c780  73 65 74 20 69 73 20 73  61 76 65 64 20 77 69 74  |set is saved wit|
0001c790  68 20 79 6f 75 72 20 67  61 6d 65 2e 22 0d be dc  |h your game."...|
0001c7a0  6f c9 20 38 3a 68 65 6c  70 24 2b 3d 22 56 6f 63  |o. 8:help$+="Voc|
0001c7b0  61 62 75 6c 61 72 79 20  45 64 69 74 6f 72 20 61  |abulary Editor a|
0001c7c0  6e 64 20 65 6e 74 65 72  20 6e 6f 75 6e 73 2c 20  |nd enter nouns, |
0001c7d0  76 65 72 62 73 2c 20 61  64 6a 65 63 74 69 76 65  |verbs, adjective|
0001c7e0  73 20 65 74 63 2e 7c 4d  43 6c 69 63 6b 20 4d 45  |s etc.|MClick ME|
0001c7f0  4e 55 20 74 6f 20 50 72  69 6e 74 20 74 68 65 20  |NU to Print the |
0001c800  76 6f 63 61 62 75 6c 61  72 79 2e 22 0d be e6 c3  |vocabulary."....|
0001c810  c9 20 39 3a 68 65 6c 70  24 3d 22 43 6c 69 63 6b  |. 9:help$="Click|
0001c820  20 53 45 4c 45 43 54 20  74 6f 20 73 77 61 70 20  | SELECT to swap |
0001c830  74 68 65 20 6f 72 69 67  69 6e 61 6c 20 64 61 74  |the original dat|
0001c840  61 20 69 6e 20 74 68 65  20 65 64 69 74 6f 72 73  |a in the editors|
0001c850  20 77 69 74 68 20 74 68  65 20 64 61 74 61 20 76  | with the data v|
0001c860  61 6c 75 65 73 20 6f 62  74 61 69 6e 65 64 20 64  |alues obtained d|
0001c870  75 72 69 6e 67 20 61 20  72 75 6e 20 6f 66 20 74  |uring a run of t|
0001c880  68 65 20 67 61 6d 65 2e  7c 4d 41 20 22 2b bd 31  |he game.|MA "+.1|
0001c890  32 38 2b 22 20 69 6e 64  69 63 61 74 65 73 20 64  |28+" indicates d|
0001c8a0  61 74 61 20 69 73 20 6f  72 69 67 69 6e 61 6c 2e  |ata is original.|
0001c8b0  20 41 6e 20 58 20 69 6e  64 69 63 61 74 65 73 20  | An X indicates |
0001c8c0  70 6f 73 74 2d 72 75 6e  20 64 61 74 61 2e 22 0d  |post-run data.".|
0001c8d0  be f0 67 c9 20 31 30 3a  68 65 6c 70 24 2b 3d 22  |..g. 10:help$+="|
0001c8e0  50 69 63 74 75 72 65 20  45 64 69 74 6f 72 20 61  |Picture Editor a|
0001c8f0  6e 64 20 65 64 69 74 20  74 68 65 20 70 69 63 74  |nd edit the pict|
0001c900  75 72 65 20 66 69 6c 65  6e 61 6d 65 73 2e 7c 4d  |ure filenames.|M|
0001c910  43 6c 69 63 6b 20 4d 45  4e 55 20 74 6f 20 50 72  |Click MENU to Pr|
0001c920  69 6e 74 20 74 68 65 20  50 69 63 74 75 72 65 20  |int the Picture |
0001c930  6c 69 73 74 2e 22 0d be  fa 66 7f 20 68 65 6c 70  |list."...f. help|
0001c940  24 3d 22 43 6c 69 63 6b  20 53 45 4c 45 43 54 20  |$="Click SELECT |
0001c950  74 6f 20 63 68 6f 6f 73  65 20 61 6e 20 65 64 69  |to choose an edi|
0001c960  74 6f 72 2e 7c 4d 54 6f  20 6c 6f 61 64 20 61 6e  |tor.|MTo load an|
0001c970  20 27 41 6c 70 73 27 20  66 69 6c 65 2c 20 64 72  | 'Alps' file, dr|
0001c980  61 67 20 69 74 73 20 69  63 6f 6e 20 74 6f 20 74  |ag its icon to t|
0001c990  68 69 73 20 77 69 6e 64  6f 77 2e 22 0d bf 04 05  |his window."....|
0001c9a0  cb 0d bf 0e 10 c9 20 72  6f 6f 6d 68 61 6e 64 6c  |...... roomhandl|
0001c9b0  65 0d bf 18 1c 68 65 6c  70 24 3d 22 43 6c 69 63  |e....help$="Clic|
0001c9c0  6b 20 53 45 4c 45 43 54  20 74 6f 20 22 0d bf 22  |k SELECT to ".."|
0001c9d0  0a c8 8e 20 68 20 ca 0d  bf 2c 28 20 c9 20 31 3a  |... h ...,( . 1:|
0001c9e0  68 65 6c 70 24 2b 3d 22  65 64 69 74 20 74 68 65  |help$+="edit the|
0001c9f0  20 72 6f 6f 6d 27 73 20  66 6c 61 67 73 2e 22 0d  | room's flags.".|
0001ca00  bf 36 30 20 c9 20 35 3a  68 65 6c 70 24 2b 3d 22  |.60 . 5:help$+="|
0001ca10  64 69 73 70 6c 61 79 20  74 68 65 20 66 69 72 73  |display the firs|
0001ca20  74 20 72 6f 6f 6d 27 73  20 64 61 74 61 2e 22 0d  |t room's data.".|
0001ca30  bf 40 2f 20 c9 20 36 3a  68 65 6c 70 24 2b 3d 22  |.@/ . 6:help$+="|
0001ca40  64 69 73 70 6c 61 79 20  74 68 65 20 6c 61 73 74  |display the last|
0001ca50  20 72 6f 6f 6d 27 73 20  64 61 74 61 2e 22 0d bf  | room's data."..|
0001ca60  4a 2f 20 c9 20 37 3a 68  65 6c 70 24 2b 3d 22 64  |J/ . 7:help$+="d|
0001ca70  69 73 70 6c 61 79 20 74  68 65 20 6e 65 78 74 20  |isplay the next |
0001ca80  72 6f 6f 6d 27 73 20 64  61 74 61 2e 22 0d bf 54  |room's data."..T|
0001ca90  33 20 c9 20 38 3a 68 65  6c 70 24 2b 3d 22 64 69  |3 . 8:help$+="di|
0001caa0  73 70 6c 61 79 20 74 68  65 20 70 72 65 76 69 6f  |splay the previo|
0001cab0  75 73 20 72 6f 6f 6d 27  73 20 64 61 74 61 2e 22  |us room's data."|
0001cac0  0d bf 5e 28 20 c9 20 39  3a 68 65 6c 70 24 2b 3d  |..^( . 9:help$+=|
0001cad0  22 6d 6f 76 65 20 66 6f  72 77 61 72 64 20 31 30  |"move forward 10|
0001cae0  20 72 6f 6f 6d 73 2e 22  0d bf 68 26 20 c9 20 31  | rooms."..h& . 1|
0001caf0  30 3a 68 65 6c 70 24 2b  3d 22 6d 6f 76 65 20 62  |0:help$+="move b|
0001cb00  61 63 6b 20 31 30 20 72  6f 6f 6d 73 2e 22 0d bf  |ack 10 rooms."..|
0001cb10  72 2c 20 c9 20 31 31 3a  68 65 6c 70 24 2b 3d 22  |r, . 11:help$+="|
0001cb20  65 6e 74 65 72 20 74 68  65 20 64 69 73 70 6c 61  |enter the displa|
0001cb30  79 65 64 20 64 61 74 61  2e 22 0d bf 7c 2b 20 c9  |yed data."..|+ .|
0001cb40  20 31 32 3a 68 65 6c 70  24 2b 3d 22 6d 61 6b 65  | 12:help$+="make|
0001cb50  20 74 68 69 73 20 74 68  65 20 6c 61 73 74 20 72  | this the last r|
0001cb60  6f 6f 6d 2e 22 0d bf 86  61 20 c9 20 35 34 2c 35  |oom."...a . 54,5|
0001cb70  35 2c 35 36 2c 35 37 2c  35 38 2c 35 39 2c 36 30  |5,56,57,58,59,60|
0001cb80  2c 36 31 2c 36 32 2c 36  33 2c 36 34 2c 36 35 2c  |,61,62,63,64,65,|
0001cb90  36 36 2c 36 37 2c 36 38  2c 36 39 3a 68 65 6c 70  |66,67,68,69:help|
0001cba0  24 3d 22 43 6c 69 63 6b  20 4d 45 4e 55 20 74 6f  |$="Click MENU to|
0001cbb0  20 65 64 69 74 20 74 68  65 20 65 78 69 74 20 66  | edit the exit f|
0001cbc0  6c 61 67 73 2e 22 0d bf  90 0f 20 7f 20 68 65 6c  |lags.".... . hel|
0001cbd0  70 24 3d 22 22 0d bf 9a  05 cb 0d bf a4 0f c9 20  |p$="".......... |
0001cbe0  6f 62 6a 68 61 6e 64 6c  65 0d bf ae 1d 20 68 65  |objhandle.... he|
0001cbf0  6c 70 24 3d 22 43 6c 69  63 6b 20 53 45 4c 45 43  |lp$="Click SELEC|
0001cc00  54 20 74 6f 20 22 0d bf  b8 0b 20 c8 8e 20 68 20  |T to ".... .. h |
0001cc10  ca 0d bf c2 2b 20 20 c9  20 30 3a 68 65 6c 70 24  |....+  . 0:help$|
0001cc20  2b 3d 22 65 64 69 74 20  74 68 65 20 6f 62 6a 65  |+="edit the obje|
0001cc30  63 74 27 73 20 66 6c 61  67 73 2e 22 0d bf cc 33  |ct's flags."...3|
0001cc40  20 20 c9 20 35 3a 68 65  6c 70 24 2b 3d 22 64 69  |  . 5:help$+="di|
0001cc50  73 70 6c 61 79 20 74 68  65 20 66 69 72 73 74 20  |splay the first |
0001cc60  6f 62 6a 65 63 74 27 73  20 64 61 74 61 2e 22 0d  |object's data.".|
0001cc70  bf d6 32 20 20 c9 20 36  3a 68 65 6c 70 24 2b 3d  |..2  . 6:help$+=|
0001cc80  22 64 69 73 70 6c 61 79  20 74 68 65 20 6c 61 73  |"display the las|
0001cc90  74 20 6f 62 6a 65 63 74  27 73 20 64 61 74 61 2e  |t object's data.|
0001cca0  22 0d bf e0 33 20 20 c9  20 32 37 3a 68 65 6c 70  |"...3  . 27:help|
0001ccb0  24 2b 3d 22 64 69 73 70  6c 61 79 20 74 68 65 20  |$+="display the |
0001ccc0  6e 65 78 74 20 6f 62 6a  65 63 74 27 73 20 64 61  |next object's da|
0001ccd0  74 61 2e 22 0d bf ea 37  20 20 c9 20 31 36 3a 68  |ta."...7  . 16:h|
0001cce0  65 6c 70 24 2b 3d 22 64  69 73 70 6c 61 79 20 74  |elp$+="display t|
0001ccf0  68 65 20 70 72 65 76 69  6f 75 73 20 6f 62 6a 65  |he previous obje|
0001cd00  63 74 27 73 20 64 61 74  61 2e 22 0d bf f4 2c 20  |ct's data."..., |
0001cd10  20 c9 20 32 30 3a 68 65  6c 70 24 2b 3d 22 6d 6f  | . 20:help$+="mo|
0001cd20  76 65 20 66 6f 72 77 61  72 64 20 31 30 20 6f 62  |ve forward 10 ob|
0001cd30  6a 65 63 74 73 2e 22 0d  bf fe 29 20 20 c9 20 32  |jects."...)  . 2|
0001cd40  31 3a 68 65 6c 70 24 2b  3d 22 6d 6f 76 65 20 62  |1:help$+="move b|
0001cd50  61 63 6b 20 31 30 20 6f  62 6a 65 63 74 73 2e 22  |ack 10 objects."|
0001cd60  0d c0 08 2d 20 20 c9 20  31 37 3a 68 65 6c 70 24  |...-  . 17:help$|
0001cd70  2b 3d 22 65 6e 74 65 72  20 74 68 65 20 64 69 73  |+="enter the dis|
0001cd80  70 6c 61 79 65 64 20 64  61 74 61 2e 22 0d c0 12  |played data."...|
0001cd90  2e 20 20 c9 20 32 32 3a  68 65 6c 70 24 2b 3d 22  |.  . 22:help$+="|
0001cda0  6d 61 6b 65 20 74 68 69  73 20 74 68 65 20 6c 61  |make this the la|
0001cdb0  73 74 20 6f 62 6a 65 63  74 2e 22 0d c0 1c 27 20  |st object."...' |
0001cdc0  20 c9 20 32 36 3a 68 65  6c 70 24 2b 3d 22 63 72  | . 26:help$+="cr|
0001cdd0  65 61 74 65 20 61 20 63  6f 6e 74 61 69 6e 65 72  |eate a container|
0001cde0  2e 22 0d c0 26 10 20 20  7f 20 68 65 6c 70 24 3d  |."..&.  . help$=|
0001cdf0  22 22 0d c0 30 06 20 cb  0d c0 3a 10 c9 20 74 65  |""..0. ...:.. te|
0001ce00  78 74 68 61 6e 64 6c 65  0d c0 44 6f 68 65 6c 70  |xthandle..Dohelp|
0001ce10  24 3d 22 43 6c 69 63 6b  20 53 45 4c 45 43 54 20  |$="Click SELECT |
0001ce20  74 6f 20 70 6f 73 69 74  69 6f 6e 20 74 68 65 20  |to position the |
0001ce30  63 61 72 65 74 2e 7c 4d  43 6c 69 63 6b 20 4d 45  |caret.|MClick ME|
0001ce40  4e 55 20 74 6f 20 70 6f  70 20 75 70 20 61 20 6d  |NU to pop up a m|
0001ce50  65 6e 75 2e 7c 4d 43 6c  69 63 6b 20 41 44 4a 55  |enu.|MClick ADJU|
0001ce60  53 54 20 74 6f 20 69 6e  73 65 72 74 20 61 20 6d  |ST to insert a m|
0001ce70  61 72 6b 65 72 2e 22 0d  c0 4e 0c c9 20 64 65 73  |arker."..N.. des|
0001ce80  69 67 6e 0d c0 58 1c 68  65 6c 70 24 3d 22 43 6c  |ign..X.help$="Cl|
0001ce90  69 63 6b 20 53 45 4c 45  43 54 20 74 6f 20 22 0d  |ick SELECT to ".|
0001cea0  c0 62 0a c8 8e 20 b9 20  ca 0d c0 6c 2c 20 c9 20  |.b... . ...l, . |
0001ceb0  68 3d 36 36 3a 68 65 6c  70 24 2b 3d 22 64 69 73  |h=66:help$+="dis|
0001cec0  70 6c 61 79 20 6e 65 78  74 20 63 68 61 72 61 63  |play next charac|
0001ced0  74 65 72 2e 22 0d c0 76  30 20 c9 20 68 3d 36 37  |ter."..v0 . h=67|
0001cee0  3a 68 65 6c 70 24 2b 3d  22 64 69 73 70 6c 61 79  |:help$+="display|
0001cef0  20 70 72 65 76 69 6f 75  73 20 63 68 61 72 61 63  | previous charac|
0001cf00  74 65 72 2e 22 0d c0 80  32 20 c9 20 68 3d 36 38  |ter."...2 . h=68|
0001cf10  3a 68 65 6c 70 24 2b 3d  22 63 68 6f 6f 73 65 20  |:help$+="choose |
0001cf20  61 20 64 69 66 66 65 72  65 6e 74 20 63 68 61 72  |a different char|
0001cf30  61 63 74 65 72 2e 22 0d  c0 8a 39 20 c9 20 68 3d  |acter."...9 . h=|
0001cf40  36 34 3a 68 65 6c 70 24  3d 22 54 68 69 73 20 73  |64:help$="This s|
0001cf50  68 6f 77 73 20 74 68 65  20 63 68 61 72 61 63 74  |hows the charact|
0001cf60  65 72 20 61 63 74 75 61  6c 20 73 69 7a 65 2e 22  |er actual size."|
0001cf70  0d c0 94 30 20 c9 20 28  68 3e 3d 30 20 80 20 68  |...0 . (h>=0 . h|
0001cf80  3c 36 34 29 3a 68 65 6c  70 24 2b 3d 22 74 6f 67  |<64):help$+="tog|
0001cf90  67 6c 65 20 74 68 69 73  20 62 6c 6f 63 6b 2e 22  |gle this block."|
0001cfa0  0d c0 9e 2e 20 7f 20 68  65 6c 70 24 3d 22 54 68  |.... . help$="Th|
0001cfb0  69 73 20 69 73 20 74 68  65 20 43 68 61 72 61 63  |is is the Charac|
0001cfc0  74 65 72 20 44 65 73 69  67 6e 65 72 2e 22 0d c0  |ter Designer."..|
0001cfd0  a8 05 cb 0d c0 b2 05 cb  0d c0 bc 1e 62 21 31 36  |............b!16|
0001cfe0  3d 26 35 30 33 3a f4 20  53 65 6e 64 20 61 20 6d  |=&503:. Send a m|
0001cff0  65 73 73 61 67 65 0d c0  c6 0d 62 21 31 32 3d 72  |essage....b!12=r|
0001d000  65 66 25 0d c0 d0 11 24  28 62 2b 32 30 29 3d 68  |ef%....$(b+20)=h|
0001d010  65 6c 70 24 0d c0 da 21  62 21 30 3d 28 28 28 32  |elp$...!b!0=(((2|
0001d020  30 2b a9 28 68 65 6c 70  24 29 2b 31 29 81 34 29  |0+.(help$)+1).4)|
0001d030  2a 34 29 2b 34 0d c0 e4  19 24 28 62 2b 32 31 2b  |*4)+4....$(b+21+|
0001d040  a9 28 68 65 6c 70 24 29  29 3d bd 28 30 29 0d c0  |.(help$))=.(0)..|
0001d050  ee 1e c8 99 20 22 57 69  6d 70 5f 53 65 6e 64 4d  |.... "Wimp_SendM|
0001d060  65 73 73 61 67 65 22 2c  31 37 2c 62 0d c0 f8 05  |essage",17,b....|
0001d070  e1 0d c1 02 04 0d c1 0c  12 dd 20 f2 72 65 61 64  |.......... .read|
0001d080  50 61 6c 65 74 74 65 0d  c1 16 10 e3 20 63 6f 6c  |Palette..... col|
0001d090  3d 30 20 b8 20 31 35 0d  c1 20 14 f2 72 65 61 64  |=0 . 15.. ..read|
0001d0a0  70 61 6c 28 63 6f 6c 2c  31 36 29 0d c1 2a 2d 72  |pal(col,16)..*-r|
0001d0b0  67 62 28 63 6f 6c 2c 31  29 3d 72 25 3a 72 67 62  |gb(col,1)=r%:rgb|
0001d0c0  28 63 6f 6c 2c 32 29 3d  67 25 3a 72 67 62 28 63  |(col,2)=g%:rgb(c|
0001d0d0  6f 6c 2c 33 29 3d 62 25  0d c1 34 05 ed 0d c1 3e  |ol,3)=b%..4....>|
0001d0e0  13 f2 72 65 61 64 70 61  6c 28 31 36 2c 32 34 29  |..readpal(16,24)|
0001d0f0  0d c1 48 2a 72 67 62 28  31 36 2c 31 29 3d 72 25  |..H*rgb(16,1)=r%|
0001d100  3a 72 67 62 28 31 36 2c  32 29 3d 67 25 3a 72 67  |:rgb(16,2)=g%:rg|
0001d110  62 28 31 36 2c 33 29 3d  62 25 0d c1 52 11 e3 20  |b(16,3)=b%..R.. |
0001d120  63 6f 6c 3d 31 37 20 b8  20 31 39 0d c1 5c 17 f2  |col=17 . 19..\..|
0001d130  72 65 61 64 70 61 6c 28  63 6f 6c 2d 31 36 2c 32  |readpal(col-16,2|
0001d140  35 29 0d c1 66 2d 72 67  62 28 63 6f 6c 2c 31 29  |5)..f-rgb(col,1)|
0001d150  3d 72 25 3a 72 67 62 28  63 6f 6c 2c 32 29 3d 67  |=r%:rgb(col,2)=g|
0001d160  25 3a 72 67 62 28 63 6f  6c 2c 33 29 3d 62 25 0d  |%:rgb(col,3)=b%.|
0001d170  c1 70 05 ed 0d c1 7a 05  e1 0d c1 84 04 0d c1 8e  |.p....z.........|
0001d180  15 dd 20 f2 72 65 61 64  70 61 6c 28 6c 25 2c 70  |.. .readpal(l%,p|
0001d190  25 29 0d c1 98 3b f4 20  52 65 61 64 20 74 68 65  |%)...;. Read the|
0001d1a0  20 72 67 62 20 76 61 6c  75 65 73 20 66 6f 72 20  | rgb values for |
0001d1b0  6c 6f 67 69 63 61 6c 2f  70 68 79 73 69 63 61 6c  |logical/physical|
0001d1c0  20 63 6f 6c 6f 75 72 20  6c 25 2c 70 25 0d c1 a2  | colour l%,p%...|
0001d1d0  25 c8 99 20 52 65 61 64  50 61 6c 2c 6c 25 2c 70  |%.. ReadPal,l%,p|
0001d1e0  25 20 b8 20 52 30 2c 52  31 2c 70 61 6c 65 74 74  |% . R0,R1,palett|
0001d1f0  65 25 0d c1 ac 19 72 25  3d 28 70 61 6c 65 74 74  |e%....r%=(palett|
0001d200  65 25 3e 3e 20 38 29 80  26 46 46 0d c1 b6 19 67  |e%>> 8).&FF....g|
0001d210  25 3d 28 70 61 6c 65 74  74 65 25 3e 3e 31 36 29  |%=(palette%>>16)|
0001d220  80 26 46 46 0d c1 c0 19  62 25 3d 28 70 61 6c 65  |.&FF....b%=(pale|
0001d230  74 74 65 25 3e 3e 32 34  29 80 26 46 46 0d c1 ca  |tte%>>24).&FF...|
0001d240  05 e1 0d ff                                       |....|
0001d244