home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 1
/
ARM_CLUB_CD.iso
/
contents
/
education
/
a
/
marks
/
!YMarks
/
!YMarks
(
.txt
)
< prev
next >
Wrap
RISC OS BBC BASIC V Source
|
1994-02-25
|
66KB
|
2,250 lines
> <YMarks$Dir>.!YMarks
Squished by Lofty's !Shrink vsn 3.02 on 25-Feb-94
&406C2:
" at line: ";
&406C0:
&400EC,-1,-1
progsize%:pagesize%=1<<&A:freespace%=&8000+progsize%:
=freespace%+pagesize%:
=freespace%:
shell_HeapManagerInit("<Obey$Dir>.",freespace%):
shell_Init:task%=
shell_WimpInit_I(&C8,"YMarks"):
shell_ResourcesInit:
app_init
+_closedown%=
:changed%=
shell_Error
&406C1:
shell_Action(
shell_Poll_I(0,task%)):
_closedown%:
shell_Exit:
app_init:
initvar:
SetUp_Menus:
SetUp_Windows:
SetUp_IconBar:
shell_AttachDataLoad(-1,-1,512,"_DataLoad",
shell_AttachDataLoad(mainw%,-1,512,"_DataLoad",
initvar:file$="File":my_filetype%=512:num%=1:C%=0:nums%=-1:
a$(&C8),b$(&C8,16),B$(&C8):text%=
SetUp_Menus:
void%:MenuHandle_IconBar%=
shell_MenuNew(
shell_MessageNoArgs("MTIBar")):MenuItem_Info%=
shell_MenuAdd(0,
shell_MessageNoArgs("Info"),""):void%=
shell_MenuAdd(0,
shell_MessageNoArgs("Quit"),"_MenuSelect_Quit")
shell_AttachMenuDBox(MenuItem_Info%,"progInfo","_PreOpenInfo",""):MenuHandle_Main%=
shell_MenuNew("Main Menu"):MenuItem_Info%=
shell_MenuAdd(0,
shell_MessageNoArgs("Info"),""):MenuItem_save%=
shell_MenuAdd(0,"Save","MenuHandle_save%")
MenuItem_search%=
shell_MenuAdd(0,"Search",""):MenuItem_sort%=
shell_MenuAdd(0,"Sort","MenuHandle_sort%"):void%=
shell_MenuAdd(0,
shell_MessageNoArgs("Quit"),"_MenuSelect_Quit"):
shell_AttachMenuDBox(MenuItem_Info%,"progInfo","_PreOpenInfo","")
MenuHandle_sort%=
shell_MenuNew("Sort"):MenuItem_name%=
shell_MenuAdd(0,"By Name","_sortn"):MenuItem_pos%=
shell_MenuAdd(0,"By Position","_sortp"):MenuHandle_save%=
shell_MenuNew("Save"):MenuItem_tex%=
shell_MenuAdd(0,"Text","_savetex")
MenuItem_tex%=
shell_MenuAdd(0,"CSV","_savecsv"):
shell_CreateWindowStatic("xfer_send",xfer%):
shell_CreateWindowStatic("xfert",xfert%):
shell_CreateWindow("search",search%):
shell_AttachSubMenu(MenuItem_search%,search%,"")
shell_AttachSubMenu(MenuItem_sort%,MenuHandle_sort%,""):
shell_AttachSubMenu(MenuItem_save%,MenuHandle_save%,""):
SetUp_Windows:
shell_CreateWindowStatic("mainw",mainw%):
shell_AttachClickSelect(mainw%,-1,"_ClickSelect_Mainw"):
shell_AttachBumpHandler(mainw%,16,17,18,1,&C8,1,
,"",""):
shell_AttachMenu(mainw%,-1,MenuHandle_Main%,0,0,0)
shell_AttachClickSelect(search%,-1,"_ClickSelect_Search"):
shell_AttachHotKey("F3",
,"xfert",xfert%,"",""):
shell_AttachDataSave(xfert%,1,&C8,&FFF,2,"_dosave"):
shell_AttachDataSave(xfer%,3,&C8,&DFE,2,"_dosaveCSV")
shell_IconPutData(xfert%,2,file$,
shell_IconPutData(xfer%,2,file$,
shell_AttachHelpTag(mainw%,A%,"classes"):
shell_AttachHelpTag(mainw%,20,"search"):
shell_AttachHelpTag(mainw%,21,"sortp"):
shell_AttachHelpTag(mainw%,22,"save")
shell_AttachHelpTag(mainw%,23,"print"):
shell_AttachHelpTag(mainw%,24,"sortn"):
SetUp_IconBar:sicon=
shell_Iconbar(-1,"!"+
shell_GetAppName,"",&78,MenuHandle_IconBar%,0,0,0):
shell_AttachHelpTag(-1,sicon,"iconbar"):
shell_AttachClickSelect(-1,sicon,"_ClickSelect_IconBar"):
_PreOpenInfo(wh%):
shell_IconPutData(wh%,1,
shell_MessageNoArgs("progInfo0"),0):
shell_IconPutData(wh%,2,
shell_MessageNoArgs("progInfo1"),0):
shell_IconPutData(wh%,3,
shell_MessageNoArgs("progInfo2"),0)
shell_IconPutData(wh%,4,
shell_MessageNoArgs("progInfo3"),0):=0
_savetex(blk%):
shell_OpenWindowStatic(xfert%):=0
_savecsv(blk%):
shell_OpenWindowStatic(xfer%):=0
_sortn(blk%):
sortn:
redraw:=0
_sortp(blk%):
sortp:
redraw:=0
_ClickSelect_IconBar(wh%,icon%):
shell_OpenWindowStatic(mainw%):=0
_ClickSelect_Mainw(wh%,icon%):
clickmainw:=0
_ClickSelect_Search(wh%,icon%):
clicksearch:=0
_MenuSelect_Quit(blk%):_closedown%=
_dosave(file$):
savefile(file$):=0
_dosaveCSV(file$):
savefilecsv(file$)
_DataLoad(loc%,file%,FileP$,Siz%):
loadfile(FileP$):
shell_OpenWindowStatic(mainw%):=0
loadfile(File$):C%+=1:file$=
shell_Leaf(File$):
&406C0:X=
(File$):
:nums%+=1:
#X,a$(nums%):a$(nums%)=
_swop(a$(nums%)):
#X,b$(nums%,B%):
a$(nums%)="Totals: Test"
nums%>2nums%-=1
a$(nums%)="":nums%-=1:
mean:
NSort:
sortn:
redraw:
shell_IconPutData(xfert%,2,file$,
shell_IconPutData(xfer%,2,file$,
&406C1:
mean:@%=&2020104:
nums%:X%=0:R%=0:H%=0:
&D:R%+=1:
(b$(A%,B%))<0.002
b$(A%,B%)="0.001":R%-=1:H%=0
(b$(A%,B%))
:X%=X%+H%:
R%<>0b$(A%,&E)=
(X%/R%)
b$(A%,&E)="P"
:@%=&20004:
NSort:Q%=1:
:MAX$="0":
nums%:
(b$(A%,&E))>
(MAX$)
MAX$=b$(A%,&E)
:P%=0:
nums%:
(b$(A%,&E))=
(MAX$)
R@%=&20004:b$(A%,&F)=
(Q%)):@%=&2020104:P%+=1:B$(A%)=b$(A%,&E):b$(A%,&E)="-1"
:Q%=Q%+P%:
Q%>nums%:
nums%:@%=&20004:
b$(A%,&E)>"0"b$(A%,&F)=
(Q%))
b$(A%,&E)=B$(A%):
sortp:
&406C0:
nums%:
(b$(A%,&E))<
(b$(A%+1,&E))
kX$=a$(A%):a$(A%)=a$(A%+1):a$(A%+1)=X$:
&F:b$=b$(A%,B%):b$(A%,B%)=b$(A%+1,B%):b$(A%+1,B%)=b$:f%=
&406C1:
sortn:
nums%:
a$(A%+1)=""a$(A%+1)="ZZ"
a$(A%)>a$(A%+1)
kX$=a$(A%):a$(A%)=a$(A%+1):a$(A%+1)=X$:
&F:b$=b$(A%,B%):b$(A%,B%)=b$(A%+1,B%):b$(A%+1,B%)=b$:
a$(A%)="ZZ"a$(A%)=""
clickmainw:num%=
shell_IconGetData(mainw%,16)):
a$(num%)="ZZ"a$(num%)=""
icon%=23
print
icon%=20
search
icon%=21
sortp
icon%=22
shell_OpenWindowStatic(xfert%)
icon%=24
sortn
redraw:
redraw:
shell_IconPutData(mainw%,2+C%,file$,
_swop(a$(num%)):
shell_IconPutData(mainw%,&A,c$,
shell_IconPutData(mainw%,&D,b$(num%,&E),
shell_IconPutData(mainw%,&E,b$(num%,&F),
print:
"Name ",32);"Average ";"Position";
nums%:
_swop(a$(A%))+" ",25);
" "+b$(A%,&E),4)+" ";
b$(A%,&F)+" ",3);
(&A);
(&D);:
savefile(File$):*FX3,2
"SPOOL "+File$:
"Name ",32);"Average ";"Position";
nums%:
_swop(a$(A%))+" ",25);
" "+b$(A%,&E),4)+" ";
b$(A%,&F)+" ",3);
(&A);:
:*SPOOL
("SetType "+File$+" &FFF"):*FX3,0
savefilecsv(File$):*FX3,2
"SPOOL "+File$:
""""+"Name"+""""+","+""""+"Average"+""""+","+""""+"Position"+"""":
nums%:
""""+
_swop(a$(A%))+""""+","+""""+b$(A%,&E)+""""+","+""""+b$(A%,&F)+"""":
:*SPOOL
("SetType "+File$+" &DFE"):*FX3,0
search:
shell_OpenWindowDynamic(search%,1,1):
clicksearch:
sortn:
icon%=0
Bxa$=
shell_IconGetData(search%,2):a$=
_swop(a$):pupil%=
shell_BinarySearch(a$,"_GetTerm","_Comp",1,nums%):
pupil%=-1
shell_IconPutData(mainw%,&A,"No such pupil",
shell_IconPutData(mainw%,&D,"",
shell_IconPutData(mainw%,&E,"",
):pupil%=num%
_swop(a$(pupil%)):
shell_IconPutData(mainw%,&A,c$,
shell_IconPutData(mainw%,&D,b$(pupil%,&E),
shell_IconPutData(mainw%,&E,b$(pupil%,&F),
shell_IconPutData(mainw%,16,
(pupil%),
):a$=
_swop(a$)
_GetTerm(D%):=a$(D%)
_Comp(term1$,term2$):
term2$>term1$
_swop(A$):A$=A$+" ":L%=
(A$):
A$,L%-1)+
A$,1):
A$,1)=" ":A$=
A$,L%-1):=A$
shell_IconGetFlags(b%,g%):
j%,a%:a%=
shell_HeapBlockFetch(50):a%!0=b%:a%!4=g%:
&400CE,,a%:j%=a%!24:
shell_HeapBlockReturn(a%):=j%
shell_HeapManagerInit(path$,space%):
heap_code%900:
("LOAD "+path$+"heapcode "+
~heap_code%):
heap_code%+0,space%:
shell_Init:
elist%,loop%,temp%,cmdline$:
OSVarBuff%,shell_AppDir$,shell_AppName$:
_U%330,_shell_blk%260:_Q%=
shell_HeapBlockFetch(&BB8):elist%=
shell_HeapBlockFetch(48):elist%!0=0:elist%!4=0:elist%!8=0:elist%!&C=0:elist%!16=0:elist%!20=0:elist%!24=0
elist%!28=0:elist%!32=0:elist%!36=0:elist%!40=0:elist%!44=0:_U%!0=0:_U%!4=0:_U%!8=0:_U%!&C=elist%:_U%!16=1:_U%!20=0:_U%!24=0:_U%!28=0:_U%!32=0:_U%!36=0:_U%!40=0:_U%!44=-1:_U%!48=0:_U%!52=0:_U%!56=0:_U%!60=0:_U%!64=0:_U%!68=0:_U%!72=0
_U%!76=
shell_HeapBlockFetch(256):_U%!80=0:_U%!84=-1:_U%!88=0:_U%!92=0:_U%!96=0:_U%!&64=0:_U%!&68=0:_U%!&6C=-1:_U%!&70=-1:_U%!&74=-1:_U%!&78=-1:_U%!&7C=-1:_U%!&80=0:_U%!&84=0:_U%!&88=-1:_U%!&8C=-1:_U%!&90=-1:_U%!&94=0:_U%!&98=0:_U%!&9C=0:_U%!&A0=0
_U%!&A4=0:_U%!&A8=0:_U%!&AC=0:_U%!&B0=0:_U%!&B4=0:_U%!&B8=0:_U%!&BC=0:_U%!&C0=0:_U%!&C4=0:_U%!&C8=0:_U%!&CC=0:_U%!&D0=-1:_U%!&D4=-1:_U%!&D8=0:_U%!&DC=0:_U%!&E0=0:_U%!&E4=0:_U%!&E8=
shell_HeapBlockFetch(256):_U%!&EC=
shell_HeapBlockFetch(256)
_U%!&F0=-1:_U%!&F4=0:_U%!&F8=0:_U%!&FC=0:_U%!256=0:_U%!260=1:_U%!264=0:_U%!268=0:_U%!272=0:_U%!276=0:_U%!280=0:_U%!284=0:_U%!288=-1:_U%!292=-1:_U%!296=-1:_U%!300=0:_U%!304=0:_U%!308=0:_U%!312=0:_U%!316=0:_U%!320=0:_U%!324=0
shell_MemFill(_U%!&E8,256,0):
shell_MemFill(_U%!&EC,256,0):OSVarBuff%=
shell_HeapBlockFetch(256):shell_AppDir$=
shell_OSVarGetVal(OSVarBuff%,256,"Obey$Dir",1):
shell_HeapBlockReturn(OSVarBuff%):shell_AppName$=
shell_Leaf(shell_AppDir$),2)
_U%!&BC=
shell_HeapBlockFetch((
shell_AppDir$)+1):_U%!&C4=
shell_HeapBlockFetch((
shell_AppName$)+1):temp%=_U%!&BC:$temp%=shell_AppDir$:temp%=_U%!&C4:$temp%=shell_AppName$:cmdline$=
shell_OSReadCommandArg(1):
cmdline$<>""
a_U%!&64=_U%!&64
1<<5:temp%=
shell_HeapBlockFetch(
cmdline$+1):$(temp%)=cmdline$:_U%!324=temp%
shell_WimpInit_I(Version%,TaskName$):
&400C0,Version%,&4B534154,TaskName$
Version%,Taskid%:_U%!&94=Taskid%:
&81682,Taskid%:=Taskid%
shell_ResourcesInit:
shell_AppDataDir$,temp%,shell_AppName$,shell_AppDir$:
OSVarBuff%,YEigFactor%,XEigFactor%:shell_AppName$=
shell_GetAppName:shell_AppDir$=
shell_GetAppDir:OSVarBuff%=
shell_HeapBlockFetch(256)
shell_OSVarExists(OSVarBuff%,shell_AppName$+"Res$Path")
_U%!&64=_U%!&64
shell_OSVarExists(OSVarBuff%,shell_AppName$+"Data$Dir")
shell_AppDataDir$=
shell_OSVarGetVal(OSVarBuff%,256,shell_AppName$+"Data$Dir",1):_U%!&C0=
shell_HeapBlockFetch((
shell_AppDataDir$)+1):temp%=_U%!&C0:$temp%=shell_AppDataDir$
_U%!&C0=
shell_HeapBlockFetch((
shell_AppDir$)+1):temp%=_U%!&C0:$temp%=shell_AppDir$
_U%!&64
shell_FileExists(shell_AppName$+"Res:Messages")
shell_MessagesInit(shell_AppName$+"Res:Messages",_U%!68,_U%!64)
shell_FileExists(shell_AppName$+"Res:ShellMsgs")
shell_MessagesInit(shell_AppName$+"Res:ShellMsgs",_U%!280,_U%!284)
shell_MessagesInit("ShellSysRes:ShellMsgs",_U%!280,_U%!284)
&20035,-1,4
,,XEigFactor%:
&20035,-1,5
,,YEigFactor%:
YEigFactor%=1
shell_FileExists(shell_AppName$+"Res:Sprites22")
@_U%!16=
shell_SpriteAreaLoad(shell_AppName$+"Res:Sprites22")
shell_FileExists(shell_AppName$+"Res:Sprites")
>_U%!16=
shell_SpriteAreaLoad(shell_AppName$+"Res:Sprites")
_U%!16=1
shell_FileExists(shell_AppName$+"Res:Templates")
shell_TemplatesInit(shell_AppName$+"Res:Templates")
shell_FileExists(shell_AppDir$+".Messages")
shell_MessagesInit(shell_AppDir$+".Messages",_U%!68,_U%!64)
shell_FileExists(shell_AppDir$+".ShellMsgs")
shell_MessagesInit(shell_AppDir$+".ShellMsgs",_U%!280,_U%!284)
shell_MessagesInit("ShellSysRes:ShellMsgs",_U%!280,_U%!284)
&20035,-1,4
,,XEigFactor%:
&20035,-1,5
,,YEigFactor%:
YEigFactor%=1
shell_FileExists(shell_AppDir$+".Sprites22")
0<_U%!16=
shell_SpriteAreaLoad(shell_AppDir$+".Sprites22")
shell_FileExists(shell_AppDir$+".Sprites")
3:_U%!16=
shell_SpriteAreaLoad(shell_AppDir$+".Sprites")
_U%!16=1
shell_FileExists(shell_AppDir$+".Templates")
shell_TemplatesInit(shell_AppDir$+".Templates")
&45BC0:
shell_HeapBlockReturn(_Q%):_Q%=
shell_HeapBlockFetch(&400):
shell_HeapBlockReturn(OSVarBuff%):
shell_Error:
pos%,report$:
<>&D00
<>&903
&606C2:
shell_OSCheckVersion(3)
shell_FileExists("Resources:$.Resources.Edit.ThrowBack")
shell_Exit:
("Set Basic$File <"+
shell_GetAppName+"$BasicFile>"):
"Edit:ThrowBack"
shell_ErrorBox("Unexpected error:- "+
$+" Internal error code "+
pos%=
$,"in "+
34+"EvntShellSystem:ShellLib"):
pos%>0
report$=
$,pos%-1)
shell_ErrorBox(report$)
&606C2:
shell_Action(evnt%):
fn$,menu%,menu$,select$,menu_buffer%,mx%,my%,claimed%:
wh%,ih%,void%,_temp28%,_temp32%,_temp24%,_temp%,fontmenuflag%:
CheckSelect%,offset%:
evnt%
shell_RedrawWindow(_Q%!0)
shell_OpenWindow(_Q%!0,
shell_CloseWindow(_Q%!0)
6:_U%!28=_Q%!&C:_U%!32=_Q%!16:mx%=_Q%!0:my%=_Q%!4:_U%!272=_Q%!0:_U%!276=_Q%!4:_U%!320=_Q%!8:_temp28%=_Q%!&C:_temp32%=_Q%!16:ih%=_Q%!16:
_Q%!&C=_U%!288
_Q%!16=_U%!292
shell_HandleBumpIcons(_U%!296,_Q%!&C,_Q%!16,_Q%!8)
_U%!288=-1:_U%!292=-1:_U%!296=-1:
_Q%!16>=0
offset%=
shell_GetEventListOffset(_Q%!&C,_Q%!16,_U%+&68,16,0):
offset%>=0
shell_HandleBumpIcons(offset%,_Q%!&C,_Q%!16,_Q%!8)
(_Q%!8=64)
t;result%=
shell_IconIsDraggable(_Q%!&C,_Q%!16):
result%
v?mess$="Icon is draggable":
shell_IconDragBox(_Q%!&C,_Q%!16)
mess$="Icon is not draggable"
shell_Tracef0("Action:"+mess$)
_Q%!8
shell_ActionSelectButton
shell_ActionMenuButton
shell_ActionAdjustButton
_U%!&64
&42401:_U%!&64=_U%!&64
:_U%!&80=0:fn$=
shell_GetEventHandler(_U%!28,_U%!32,6):
fn$<>""
shell_Tracef0("Action:Drag event detected - function is "+fn$):void%=
("FN"+fn$+"(_temp28%,_temp32%)")
shell_Tracef0("Action:Drag event detected - no handler function"):
shell_SendDataSave(_U%!28,_U%!32)
shell_Tracef0("Action:keypress is="+
_Q%!24):
_Q%!24
&D,394,398,399,410:claimed%=
shell_WritableIconHandler(_Q%!0,_Q%!4,_Q%!24)
claimed%=
shell_HotKeyProcess(_Q%!24)
claimed%
shell_Tracef0("Action:Keypress not claimed, passing it on"):
&400DC,_Q%!24
shell_Tracef0("Action:Keypress claimed by this application")
shell_ActionMenuSelect(_Q%)
17,18:
shell_Receive(_Q%)
shell_UserMessageAcknowledge(_Q%)
shell_Poll_I(mask%,task%):
&400C7,mask%,_Q%
&81686,a%,,task%:=a%
shell_Exit:
ms_desc%:ms_desc%=_U%!68:
&61504,ms_desc%:
&2001E,7,,ms_desc%:
shell_TraceExit:
&606C2:
&600D0,,-1:
shell_WimpCloseDown_I(_U%!&94):
shell_AttachDataLoad(wh%,ih%,type%,fn$,no_load%):
blk%,temp%,offset%,cmdline$:
shell_Tracef0("AttachDataLoad:Attaching DataLoad Handler"):
wh%=-1
wh%=-2
no_load%
type%=type%
1<<31
boffset%=
shell_GetEventListOffset(wh%,ih%,_U%+96,16,
):blk%=_U%!96+offset%:
blk%!0=0
blk%!4=0
shell_Tracef0("AttachDataLoad:This is the first DataLoad Event..."):blk%!0=wh%:blk%!4=ih%:blk%!8=
shell_HeapBlockFetch(8):temp%=blk%!8:temp%!0=type%:temp%!4=-1:blk%!&C=
shell_HeapBlockFetch(8):temp%=blk%!&C:temp%!0=
shell_HeapBlockFetch(
(fn$)+1)
'temp%!4=-1:temp%=temp%!0:$temp%=fn$
shell_Tracef0("AttachDataLoad:This is another DataLoad Event..."):blk%!8=
shell_HeapBlockExtend(blk%!8,4):blk%!&C=
shell_HeapBlockExtend(blk%!&C,4):ctr%=0:temp%=blk%!8:
temp%!ctr%<>-1:ctr%+=4:
:temp%!ctr%=type%:temp%!(ctr%+4)=-1:temp%=blk%!&C
Htemp%!ctr%=
shell_HeapBlockFetch(
fn$+1):temp%=temp%!ctr%:$temp%=fn$
:cmdline$=
shell_GetCmdLineArgs:
cmdline$<>""
wh%<0
(_U%!&64
1<<5)
type%
1<<31
temp%=type%
1<<31
temp%=type%
shell_FileType(cmdline$)=temp%
shell_MessageSendDataLoad(temp%,cmdline$):_U%!&64=_U%!&64
(1<<5)
shell_MenuNew(title$):
handle%:
&45BC1,,title$
handle%:=handle%
shell_MessageNoArgs(tag$):=
shell_MessageLookup(tag$,"","")
shell_MenuAdd(handle%,item$,sel_fn$):
ret_handle%:
sel_fn$<>""
&45BC2,handle%,item$,sel_fn$
ret_handle%
&45BC2,handle%,item$
ret_handle%
:=ret_handle%
shell_AttachMenuDBox(item%,window$,preopenfn$,postopenfn$):
blk%,temp%,addr%:
shell_WindowLoaded(window$)
shell_MessageOneArg("SHELLMSG03",window$)
blk%=
shell_HeapBlockFetch(&C):blk%!0=
shell_HeapBlockFetch(
window$+1):temp%=blk%!0:$temp%=window$:blk%!4=
shell_HeapBlockFetch(
preopenfn$+1):temp%=blk%!4:$temp%=preopenfn$:blk%!8=
shell_HeapBlockFetch(
postopenfn$+1):temp%=blk%!8:$temp%=postopenfn$
&45BCE,item%,blk%:
&45BCC,,
shell_CreateWindowStatic(ident$,
handle%):
wb_ptr%,w_list%,temp%,offset%:wb_ptr%=
shell_GetWB(ident$):wb_ptr%!64=_U%!16:
&400C1,,wb_ptr%
handle%:w_list%=_U%!&B8:
w_list%=0
!S_U%!&B8=
shell_HeapBlockFetch(8):w_list%=_U%!&B8:w_list%!0=handle%:w_list%!4=-1
offset%=
shell_SearchStatic(_U%!&B8,handle%):
offset%=-1
)7offset%=
shell_SearchStatic(_U%!&B8,0):
offset%=-1
+actr%=0:
w_list%!ctr%<>-1:ctr%+=4:
:_U%!&B8=
shell_HeapBlockExtend(_U%!&B8,4):w_list%=_U%!&B8
ctr%=offset%
:temp%=w_list%+ctr%:temp%!0=handle%:temp%!4=-1
shell_CreateWindow(ident$,
handle%):
wb_ptr%:wb_ptr%=
shell_GetWB(ident$):wb_ptr%!64=_U%!16:
&400C1,,wb_ptr%
handle%:
shell_AttachSubMenu(item%,submenu%,warn_fn$):
&45BCE,item%,submenu%:
warn_fn$<>""
&45BCC,,
shell_EventListMenuWarn(item%,submenu%,warn_fn$,"")
shell_AttachClickSelect(wh%,ic%,fn$):
shell_EventAdd(wh%,ic%,2,0,fn$):
shell_AttachBumpHandler(wh%,ih%,incr%,decr%,l_limit%,u_limit%,step%,wrap%,disp_fn$,decode_fn$):
e_blk%,offset%,temp%,temp2%,bump_info_blk%:offset%=
shell_GetEventListOffset(wh%,incr%,_U%+&68,16,
):e_blk%=_U%!&68+offset%
e_blk%!0=wh%:e_blk%!4=incr%:e_blk%!8=step%:e_blk%!&C=
shell_HeapBlockFetch(24):bump_info_blk%=e_blk%!&C:bump_info_blk%!0=ih%:bump_info_blk%!4=l_limit%:bump_info_blk%!8=u_limit%:
disp_fn$>0
ldbump_info_blk%!&C=
shell_HeapBlockFetch((
disp_fn$)+1):temp2%=bump_info_blk%!&C:$temp2%=disp_fn$
bump_info_blk%!&C=0
decode_fn$>0
rhbump_info_blk%!16=
shell_HeapBlockFetch((
decode_fn$)+1):temp2%=bump_info_blk%!16:$temp2%=decode_fn$
bump_info_blk%!16=0
wrap%=-1
bump_info_blk%!20=1
bump_info_blk%!20=0
offset%=
shell_GetEventListOffset(wh%,decr%,_U%+&68,16,
):e_blk%=_U%!&68+offset%:e_blk%!0=wh%:e_blk%!4=decr%:e_blk%!8=step%*(-1):e_blk%!&C=bump_info_blk%:
shell_AttachMenu(wh%,ic%,menu%,shift%,ctrl%,alt%):
offset%:
wh%>0
ic%>=0
shell_IconSetButtonType(wh%,ic%,3)
shell_EventAdd(wh%,ic%,0,menu%,""):
shell_AttachHotKey(key$,shift%,ctrl%,alt%,window$,wh%,fn1$,fn2$):
e_list%,offset%,temp%,temp2%,key%,f_key%:f_key%=
_U%!60=0
8_U%!60=
shell_HeapBlockFetch(24):offset%=0:_U%!&B4=1
offset%=_U%!&B4*24:_U%!60=
shell_HeapBlockExtend(_U%!60,24):_U%!&B4=(_U%!&B4)+1
:e_list%=_U%!60:
"F1":key%=385
"F2":key%=386
"F3":key%=387
"F4":key%=388
"F5":key%=389
"F6":key%=390
"F7":key%=391
"F8":key%=392
"F9":key%=393
"F10":key%=458
"F11":key%=459
key%=(
key$)-64:f_key%=
f_key%
shift%
key%+=16
ctrl%
key%+=32
:temp%=e_list%+offset%:temp%!0=key%:temp%?4=shift%:temp%?5=ctrl%:temp%?6=alt%:temp%!8=
shell_HeapBlockFetch(
window$+1):temp2%=temp%!8:$temp2%=window$:
wh%>0
_offset%=
shell_SearchStatic(_U%!&B8,wh%):
offset%=-1
shell_MessageNoArgs("SHELLMSG09")
:temp%!&C=wh%:temp%!16=
shell_HeapBlockFetch(
fn1$+1):temp2%=temp%!16:$temp2%=fn1$:temp%!20=
shell_HeapBlockFetch(
fn2$+1):temp2%=temp%!20:$temp2%=fn2$:
shell_AttachDataSave(wh%,ih%,address%,type%,name_ic%,fn$):
blk%,temp%,offset%:
shell_IconIsSprite(wh%,ih%)
shell_OK(
shell_MessageNoArgs("SHELLMSG29"))
shell_IconSetButtonType(wh%,ih%,6):
address%=0
address%=&64
offset%=
shell_GetEventListOffset(wh%,ih%,_U%+72,24,
):blk%=_U%!72+offset%:blk%!0=wh%:blk%!4=ih%:blk%!8=address%:blk%!&C=type%:blk%!16=name_ic%:blk%!20=
shell_HeapBlockFetch(
(fn$)+1):temp%=blk%!20:$temp%=fn$:
type%
&FF9:
address%>&8000
,_U%!&88=
shell_HeapBlockInfo(address%)-8
_U%!&88=address%
address%>&8000
,_U%!&88=
shell_HeapBlockInfo(address%)-4
_U%!&88=address%
:_U%!&8C=type%:_U%!&90=address%:
shell_IconPutData(whandle%,ihandle%,data$,redraw):
blk%,old_str$:old_str$=
shell_IconGetData(whandle%,ihandle%):
data$<>old_str$
gblk%=
shell_HeapBlockFetch(40):blk%!0=whandle%:blk%!4=ihandle%:
&400CE,,blk%:
(blk%!24
(1<<8))<>0
data$>blk%!36
shell_MessageNoArgs("SHELLMSG12")
$(blk%!28)=data$
$(blk%+28)=
data$,&B)
redraw<>0
%blk%!8=0:blk%!&C=0:
&400CD,,blk%
shell_HeapBlockReturn(blk%)
shell_AttachHelpTag(wh%,ic%,tag$):
shell_EventAdd(wh%,ic%,8,0,tag$):
shell_Iconbar(pos%,sname$,text$,w%,menu%,shift%,ctrl%,alt%):
handle%:
text$=""
O!_Q%=pos%:_Q%!4=0:_Q%!8=0:_Q%!&C=70:_Q%!16=70:_Q%!20=&301A:$(_Q%+24)=sname$
!_Q%=pos%:_Q%!4=0:_Q%!8=-16:_Q%!&C=w%:_Q%!16=90:_Q%!20=&1700210B:
_Q%!24&C:
_Q%!28
(sname$)+2:$(_Q%!24)=text$:$(_Q%!28)="S"+sname$:_Q%!32=&C
&400C2,,_Q%
handle%:
shell_AttachMenu(-2,handle%,menu%,shift%,ctrl%,alt%):=handle%
shell_GetAppName:
temp%:temp%=_U%!&C4:=$temp%
shell_OpenWindowStatic(handle%):
shell_SearchStatic(_U%!&B8,handle%)>-1
shell_OpenWindow(handle%,0,-1)
shell_Leaf(path$):
path$,"."):path$=
path$,
path$,".")+1):
:=path$
shell_IconGetData(whandle%,ihandle%):
result$,icon_blk%:icon_blk%=
shell_HeapBlockFetch(40):icon_blk%!0=whandle%:icon_blk%!4=ihandle%:
&400CE,,icon_blk%:
(icon_blk%!24
(1<<8))<>0
result$=$(icon_blk%!28)
result$=$(icon_blk%+28)
shell_HeapBlockReturn(icon_blk%):=result$
shell_OpenWindowDynamic(wh%,x_off%,y_off%):
void%,ptr_blk%:ptr_blk%=
shell_HeapBlockFetch(20):_U%!20=wh%:
&400CF,,ptr_blk%:
&400D4,,wh%,ptr_blk%!0+x_off%,ptr_blk%!4+y_off%:
shell_HeapBlockReturn(ptr_blk%):
shell_BinarySearch(_search_term$,get_termFN$,comp_FN$,lo%,hi%):
_pos%,m%,_wp$,off%,p%,hipos%,lopos%,lp2%,found%,missing%:hi%+=1:missing%=
:found%=
:m%=hi%:off%=0:_pos%=m%
2:lopos%=lo%-1:hipos%=hi%:
:_wp$=
("FN"+get_termFN$+"(_pos%)"):lastpos%=_pos%
_search_term$=_wp$
found%=
("FN"+comp_FN$+"(_search_term$,_wp$)")
@0hipos%=_pos%:m%=_pos%-lopos%:_pos%=m%
2+off%
lopos%=_pos%:off%=_pos%:m%=hipos%-_pos%:_pos%=m%
2+off%
lp2%=lastpos%
missing%=
L9lp2%=lastpos%:
found%
missing%:
found%
=lastpos%
shell_HeapBlockFetch(a%):
addr%:
heap_code%+4,addr%,a%:=addr%
shell_MemFill(start%,nr_bytes%,value%):
I%,nr_words%,remainder%:nr_words%=nr_bytes%
4:remainder%=nr_bytes%
nr_words%>0
(nr_words%*4)
4:start%!(I%-1)=value%:
remainder%>0
^Gstart%=start%+(nr_words%*4):
remainder%-1:start%?I%=value%:
shell_OSVarGetVal(buffer%,size%,varname$,expand):
value$,nr_bytes,nameptr%:
&20023,varname$,buffer%,size%,0,-3*(expand=
,,nr_bytes,nameptr%,type%:
loop%=0
nr_bytes-1:value$=value$+
(buffer%?loop%):
loop%:=value$
shell_HeapBlockReturn(
shell_HeapBlockExists(a%)
heap_code%+8,a%
a%=0:
shell_OSReadCommandArg(opt):
pointer%,command$,offset%:command$="":offset%=0:
pointer%:
pointer%?offset%<>0:command$+=
(pointer%?offset%):offset%+=1:
1:command$=
command$,
command$,
34)+1):command$=
command$,
command$,
34)+2)
:=command$
shell_GetAppDir:
temp%:temp%=_U%!&BC:=$temp%
shell_OSVarExists(buffer%,varname$):
nr_bytes:
&20023,varname$,buffer%,-1,0,0
,,nr_bytes:
nr_bytes<0
shell_FileExists(object$):
shell_CatInfoRead(object$)="Not Found":=
shell_MessagesInit(filename$,
m_filedesc%,
m_buffer%):
size%,flags%:
3,"Cannot open message file '"+filename$+"'"
&41500,,filename$
flags%,,size%:
flags%
m_buffer%=0
m_buffer%=
shell_HeapBlockFetch(size%)
30,6,,,17+
(filename$)
,,m_filedesc%:$(m_filedesc%+16)=filename$:
&41501,m_filedesc%,m_filedesc%+16:
shell_SpriteAreaLoad(filename$):
sp%,S%,T%:S%=
(filename$):T%=
#S%+16:
#S%:sp%=
shell_HeapBlockFetch(T%):!sp%=T%:sp%!4=0:sp%!8=16:sp%!&C=16:
46,521,sp%:
46,522,sp%,filename$:=sp%
shell_TemplatesInit(filename$):
TemplatePtr%,IndirectPtr%,IndirectEnd%,X%,ptr%:
filelen%,pos%,name_buffer%,name$,nr_templates%:
file_offset%,data_size%,entry_type%,char%,identifier$,buff%:
indirected_size%,nr_icons%,total_indirsize%,j%,largest_def%
name_buffer%20:
(name_buffer%
4):name_buffer%+=1:
:pos%=0:nr_templates%=0:total_indirsize%=0:largest_def%=0:filelen%=
shell_FileLength(filename$):buff%=
shell_HeapBlockFetch(&D):X%=
(filename$):
#X%=16:
:identifier$="":
&C,4,X%,buff%,4
gfile_offset%=!buff%:
shell_Tracef0("TemplatesInit:file offset% = "+
file_offset%):
file_offset%>0
nr_templates%+=1:indirected_size%=0:
&C,4,X%,buff%,4:data_size%=!buff%:
shell_Tracef0("TemplatesInit:data_size% = "+
data_size%):
&C,4,X%,buff%,4:entry_type%=!buff%:
&C,4,X%,buff%,&C:ctr%=0:
:char%=buff%?ctr%:
char%>31
identifier$+=
char%
ctr%+=1:
char%<32:old_ptr%=
#X%=file_offset%+56:
&C,4,X%,buff%,4:flags%=!buff%:
#X%=file_offset%+72:
&C,4,X%,buff%,&C:indirected_size%+=
shell_IconIndirSize(file_offset%,flags%,buff%):
#X%=file_offset%+84:
&C,4,X%,buff%,4:nr_icons%=!buff%
shell_Tracef0("TemplatesInit:nr icons = "+
nr_icons%):
nr_icons%>0
nr_icons%-1:
#X%=file_offset%+88+(j%*32)+16:
&C,4,X%,buff%,4:flags%=!buff%:
#X%=file_offset%+88+(j%*32)+20:
&C,4,X%,buff%,&C:indirected_size%+=
shell_IconIndirSize(file_offset%,flags%,buff%):
#X%=old_ptr%:
shell_Tracef0("TemplatesInit:entry_type% = "+
entry_type%):
shell_Tracef0("TemplatesInit:identifier$ = "+identifier$):
shell_Tracef0("TemplatesInit:indirected size = "+
indirected_size%):
shell_Tracef0(" ")
itotal_indirsize%+=indirected_size%:
(88+(nr_icons%*32))>largest_def%
largest_def%=(88+(nr_icons%*32))
file_offset%=0:
shell_HeapBlockReturn(buff%):
shell_Tracef0("TemplatesInit:total indirected= "+
total_indirsize%):TemplateBlk%=
shell_HeapBlockFetch(filelen%):TemplatePtr%=TemplateBlk%:_U%!4=
shell_HeapBlockFetch(20*nr_templates%)
IndirectBlk%=
shell_HeapBlockFetch(largest_def%+total_indirsize%):IndirectPtr%=IndirectBlk%:IndirectEnd%=IndirectBlk%+(largest_def%+total_indirsize%):nr_templates%=0:
&400D9,,filename$:
:$name_buffer%="*"
&400DB,,TemplatePtr%,IndirectPtr%,IndirectEnd%,_U%!&E8,name_buffer%,pos%
,,IndirectPtr%,,,name$,pos%:
pos%<>0
!((_U%!4)+(16*nr_templates%))=TemplatePtr%:$(((_U%!4)+(16*nr_templates%))+4)=name$:TemplatePtr%+=(88+(TemplatePtr%!84)*32):nr_templates%+=1
pos%=0:
&400DA:_U%!0=nr_templates%:
shell_OSCheckVersion(version%):=
shell_OSModuleCheckVersion("UtilityModule",version%)
shell_ErrorBox(r$):
r%,err_blk%:err_blk%=_shell_blk%:!err_blk%=
:$(err_blk%+4)=r$+
=&D00
=&903
&600DF,err_blk%,17,"Message from "+
shell_GetAppName
&600DF,err_blk%,1,
shell_GetAppName
shell_RedrawWindow(handle%):
more%,fn$,x0%,y0%,blk%,i_blk%:i_blk%=
shell_HeapBlockFetch(&C):
&400D6,handle%,i_blk%,&3F0000,&D<<16:
!i_blk%<>-1
+fn$=
shell_IconGetData(handle%,!i_blk%)
shell_HeapBlockReturn(i_blk%):blk%=
shell_HeapBlockFetch(&64):
fn$=""
$,fn$=
shell_GetEventHandler(handle%,-1,4)
:blk%!0=handle%:
&400C8,,blk%
more%:x0%=blk%!4-blk%!20:y0%=blk%!16-blk%!24:
more%:
&81681,,blk%:
fn$<>""
void%=
("FN"+fn$+"("+
blk%+","+
x0%+","+
y0%+")")
&400CA,,blk%
more%:
shell_HeapBlockReturn(blk%):
shell_OpenWindow(wh%,full%,front%):
offset%,blk%,paneblk%,ctr%,first_pane%,behind%,height%,width%:
flag%,toggle%,t%,last_pane%,prev_pane%,res%:offset%=
shell_GetEventListOffset(wh%,-1,_U%+304,&C,
offset%>=0
6Cblk%=_U%!304+offset%:temp%=blk%!8:res%=
("FN"+$temp%):
res%=0
:toggle%=
shell_HeapBlockFetch(&64):t%!0=wh%:
&400CB,,t%:
(t%!32
&80000)=&80000
toggle%=
toggle%=
shell_HeapBlockReturn(t%):_Q%!0=wh%:
full%
&400CB,,_Q%
toggle%
&400C5,,_Q%
:offset%=
shell_GetEventListOffset(wh%,-1,_U%+92,24,
offset%>-1
blk%=(_U%!92)+offset%:ptr8%=blk%!8:ptr12%=blk%!&C:ptr16%=blk%!16:ptr20%=blk%!20:_Q%!0=wh%:
front%
behind%=-1
behind%=_Q%!28
full%
&400C5,,_Q%:
&400CB,,_Q%:
&400C6,,_Q%
:paneblk%=
shell_HeapBlockFetch(&400):ctr%=0:
ptr8%!ctr%<>-1:paneblk%!0=ptr8%!ctr%:
first_pane%=0
first_pane%=paneblk%!0
WGlast_pane%=paneblk%!0:
&400CB,,paneblk%:flag%=ptr12%!ctr%:
flag%
0,1:height%=paneblk%!16-paneblk%!8:width%=paneblk%!&C-paneblk%!4:paneblk%!4=_Q%!4+ptr16%!ctr%:paneblk%!&C=paneblk%!4+width%:paneblk%!16=_Q%!16+ptr20%!ctr%:paneblk%!8=paneblk%!16-height%
2:height%=paneblk%!16-paneblk%!8:width%=_Q%!&C-_Q%!4:paneblk%!4=_Q%!4+ptr16%!ctr%:paneblk%!&C=_Q%!&C:paneblk%!16=_Q%!16+ptr20%!ctr%:paneblk%!8=paneblk%!16-height%
3:height%=_Q%!16-_Q%!8:width%=paneblk%!&C-paneblk%!4:paneblk%!4=_Q%!4+ptr16%!ctr%:paneblk%!&C=paneblk%!4+width%:paneblk%!16=_Q%!16:paneblk%!8=_Q%!8+ptr20%!ctr%
4:height%=paneblk%!16-paneblk%!8:width%=_Q%!&C-_Q%!4:paneblk%!4=_Q%!4+ptr16%!ctr%:paneblk%!&C=_Q%!&C:paneblk%!16=_Q%!8+height%+ptr20%!ctr%:paneblk%!8=paneblk%!16+height%
5:height%=_Q%!16-_Q%!8:width%=paneblk%!&C-paneblk%!4:paneblk%!4=_Q%!&C-width%+ptr16%!ctr%:paneblk%!&C=paneblk%!4+width%:paneblk%!16=_Q%!16:paneblk%!8=_Q%!8
ctr%=0
paneblk%!28=behind%
paneblk%!28=prev_pane%
&400C5,,paneblk%:prev_pane%=paneblk%!0:ctr%+=4:
toggle%
#_Q%!28=last_pane%:
&400C5,,_Q%
shell_HeapBlockReturn(paneblk%)
_Q%!0=wh%:
full%
&400CB,,_Q%
behind%=-2
_Q%!28=-2
front%=-1
_Q%!28=-1
&400C5,,_Q%
shell_CloseWindow(wh%):
offset%,blk%,ptr8%,ptr12%,ptr16%,ptr20%,win_blk%,res%:offset%=
shell_GetEventListOffset(wh%,-1,_U%+308,&C,
offset%>=0
Cblk%=_U%!308+offset%:temp%=blk%!8:res%=
("FN"+$temp%):
res%=0
:win_blk%=
shell_HeapBlockFetch(60):
wh%>0
Foffset%=
shell_GetEventListOffset(wh%,-1,_U%+92,24,
offset%>-1
blk%=(_U%!92)+offset%:ptr12%=blk%!&C:ptr16%=blk%!16:ptr20%=blk%!20:ctr%=0:ptr8%=blk%!8:
ptr8%!ctr%<>-1:win_blk%!0=ptr8%!ctr%:
&400C6,,win_blk%:ctr%+=4:
:win_blk%!0=wh%:
&400C6,,win_blk%
shell_HeapBlockReturn(win_blk%):
shell_HandleBumpIcons(offset%,wh%,ih%,_button%):
display_ih%,info_blk%,e_blk%,curr_val%,_temp$,fn2%:
new_val%,fn%:
_button%<>2
re_blk%=_U%!&68+offset%:_U%!288=wh%:_U%!292=ih%:_U%!296=offset%:info_blk%=e_blk%!&C:fn2%=info_blk%!16:
fn2%<>0
Q_temp$=
shell_IconGetData(wh%,info_blk%!0):curr_val%=
("FN"+$fn2%+"(_temp$)")
curr_val%=
shell_IconGetData(wh%,info_blk%!0))
_button%=1
)_new_val%=curr_val%+((e_blk%!8)*(-1))
_new_val%=curr_val%+e_blk%!8
info_blk%!20=0
_new_val%>info_blk%!8
_new_val%=info_blk%!8
_new_val%<info_blk%!4
_new_val%=info_blk%!4
_new_val%>info_blk%!8
_new_val%=info_blk%!4
_new_val%<info_blk%!4
_new_val%=info_blk%!8
:fn%=info_blk%!&C:
fn%<>0
1_new_val$=
("FN"+$fn%+"(_new_val%,_button%)")
_new_val$=
_new_val%
_new_val%<>curr_val%
shell_IconPutData(wh%,info_blk%!0,_new_val$,-1)
shell_GetEventListOffset(wh%,ih%,event_list%,rec_size%,add%):
list_size%,ptr%,found%,offset%,empty%,temp%:
(!event_list%=0
add%=
(!event_list%=0)
[!event_list%=
shell_HeapBlockFetch(rec_size%):temp%=!event_list%:temp%!0=0:temp%!4=0:=0
:list_size%=
shell_HeapBlockInfo(!event_list%)-8:ptr%=0:found%=
:offset%=-1:empty%=-1:temp%=!event_list%:
empty%<0
(temp%!ptr%=0
temp%!ptr%+4=0)
empty%=ptr%
(temp%!ptr%=wh%)
ih%=-1
offset%=ptr%:found%=
temp%!(ptr%+4)=ih%
offset%=ptr%:found%=
ptr%+=rec_size%
ptr%+=rec_size%
((ptr%>=list_size%)
found%):
found%
(offset%=-1
add%)
empty%<0
offset%=list_size%:!event_list%=
shell_HeapBlockExtend(!event_list%,rec_size%):temp%=!event_list%:temp%+=offset%:temp%!0=0:temp%!4=0
offset%=empty%
:=offset%
shell_IconIsDraggable(wh%,ih%):
flags%:flags%=
shell_IconGetFlags(wh%,ih%):temp%=(flags%
&6000):
temp%=&6000=
shell_IconDragBox(wh%,ih%):
blk%,wex,wey,e_offset%,flags%,f%,DragASprite%,spr_area%,valid%,spr$:
name_ic%,name$:e_offset%=
shell_GetEventListOffset(wh%,ih%,_U%+72,24,
e_offset%>=0
blk%=_U%!72+e_offset%:name_ic%=blk%!16:name$=
shell_IconGetData(wh%,name_ic%):
name$=""
shell_OK(
shell_MessageNoArgs("SHELLMSG28"))
blk%=
shell_HeapBlockFetch(6000):!blk%=wh%:
&400CC,,blk%:wex=blk%!4-blk%!20:wey=blk%!16-blk%!24:spr_area%=blk%!68:blk%!4=ih%:
&400CE,,blk%:!blk%=wh%:blk%!4=5:flags%=blk%!24:valid%=blk%!32:blk%!8=blk%!8+wex:blk%!&C=blk%!&C+wey:blk%!16=blk%!16+wex
blk%!20=blk%!20+wey:blk%!24=0:blk%!28=0:blk%!32=&7FFFFFFF:blk%!36=&7FFFFFFF:
6,&A1,28
,,f%:DragASprite%=((f%
2)=2):
DragASprite%
f%=flags%:
S*spr$=
shell_IconGetCommand(valid%,"s")
shell_OK(
shell_MessageNoArgs("SHELLMSG19"))
spr$<>""
&42400,&85,spr_area%,spr$,blk%+8:_U%!&64=_U%!&64
&400D0,,blk%
&400D0,,blk%
shell_HeapBlockReturn(blk%)
shell_Tracef0("IconDragBox:WARNING! no drag handler registered for this icon!")
shell_Tracef0(a$):
shell_TraceIsOn)
_U%!44<>-1
f%=_U%!44:
#f%,a$
_U%!&94>0
shell_BroadcastMessage(&43B00,"ShellDBug:Trace "+a$)
shell_ActionSelectButton:
shell_HandleAttachedMenu(_Q%,_U%!28,_U%!32):fn$=
shell_GetEventHandler(_U%!28,_U%!32,2):
_U%!32=0
shell_DataSaveCheckName(_U%!28,_U%!32)
fn$<>""
shell_IconSlab(4,_U%!28,_U%!32):void%=
("FN"+fn$+"(_temp28%,_temp32%)")
_U%!32=0
_U%!28=_U%!20
&400D4,,-1
shell_ActionMenuButton:
temp%,menu%,popup%:popup%=
:temp%=
temp%=
shiftmenuclick(_Q%!&C,_Q%!16)
temp%
Zmenu%=
shell_GetEventMenu(_Q%!8,_Q%!&C,_Q%!16):
(menu%<>0
_Q%!&C>0
_Q%!16>=0)
popup%=
menu%=0
.menu%=
shell_GetEventMenu(_Q%!8,_Q%!&C,-1)
menu%<>0
shell_HandleMenuOpen(_Q%,menu%,_Q%!&C,_Q%!16,popup%)
shell_ActionAdjustButton:
flags%,fn$,void%,sel_blk%,ctr%:sel_blk%=
shell_HeapBlockFetch(&64):
shell_Tracef0("Action:Mouse Button was ADJUST"):
&400D6,_U%!28,sel_blk%,&F000,&B000:ctr%=0:
sel_blk%!ctr%<>-1
sel_blk%!ctr%=_U%!32
shell_IconSet(_U%!28,_U%!32,1)
Cctr%+=4:
:fn$=
shell_GetEventHandler(_U%!28,_U%!32,3):
fn$<>""
shell_IconSlab(1,_U%!28,_U%!32):void%=
("FN"+fn$+"(_temp28%,_temp32%)")
shell_HeapBlockReturn(sel_blk%):
shell_GetEventHandler(wh%,ic%,e_type%):
ptr%,event_list%,found%,list_size%,fn$:
wh%=-1
wh%=-2
rlist_size%=
shell_HeapBlockInfo(_U%!&C)-8:ptr%=0:found%=
:event_list%=_U%!&C:fn$="":
(event_list%!ptr%=wh%)
event_list%!(ptr%+4)
event_list%!(ptr%+(&C+(e_type%*4)))>&8000
7fn$=$(event_list%!(ptr%+(&C+(e_type%*4)))):found%=
ptr%+=48
event_list%!(ptr%+4)=ic%
event_list%!(ptr%+(&C+(e_type%*4)))>&8000
7fn$=$(event_list%!(ptr%+(&C+(e_type%*4)))):found%=
ptr%+=48
ptr%+=48
ptr%+=48
((ptr%>=list_size%)
found%):=fn$
shell_SendDataSave(wh%,ih%):
blk%,msgblk%,tmpblk%,offset%,FileSize%,void%:tmpblk%=
shell_HeapBlockFetch(30):
&400CF,,tmpblk%:offset%=
shell_GetEventListOffset(wh%,ih%,_U%+72,24,
offset%=-1
offset%=-2
gvoid%=
shell_MessageWindow(
shell_MessageNoArgs("SHELLMSG13"),0,"",
shell_MessageNoArgs("warning"))
blk%=(_U%!72)+offset%:
blk%!8>&8000
,FileSize%=
shell_HeapBlockInfo(blk%!8)-4
FileSize%=blk%!8
:msgblk%=_U%!76:msgblk%!0=256:msgblk%!&C=0:msgblk%!16=1:msgblk%!20=tmpblk%!&C:msgblk%!24=tmpblk%!16:msgblk%!28=tmpblk%!0:msgblk%!32=tmpblk%!4:msgblk%!36=FileSize%:msgblk%!40=blk%!&C:$(msgblk%+44)=
shell_Leaf(
shell_IconGetData(wh%,blk%!16))
&400E7,18,msgblk%,msgblk%!20,msgblk%!24:_U%!&78=_Q%!8:_U%!&88=FileSize%:_U%!&8C=blk%!&C:_U%!&90=blk%!8:_U%!&9C=blk%!4:_U%!&C8=msgblk%!20:_U%!&CC=msgblk%!24
shell_HeapBlockReturn(tmpblk%):
shell_WritableIconHandler(wh%,ih%,key%):
nr_icons%,first_write%,last_write%,ctr%:
before%,after%,index%,mx%,my%,temp_blk%,caret_blk%:caret_blk%=
shell_HeapBlockFetch(&400):
&400D3,,caret_blk%:
caret_blk%!0=-1
shell_HeapBlockReturn(caret_blk%):=
&400D6,wh%,caret_blk%,&40E000,&E000:first_write%=caret_blk%!0:ctr%=0:
caret_blk%!ctr%=ih%
:before%=caret_blk%!(ctr%-4):after%=caret_blk%!(ctr%+4)
:ctr%+=4:
caret_blk%!ctr%=-1:last_write%=caret_blk%!(ctr%-4):
shell_FakeMouseClick(wh%,0,4)
398,394:
ih%=last_write%
&400D2,wh%,first_write%,-1,-1,-1,
shell_IconGetData(wh%,first_write%))
&400D2,wh%,after%,-1,-1,-1,
shell_IconGetData(wh%,after%))
399,410:
ih%=first_write%
&400D2,wh%,last_write%,-1,-1,-1,
shell_IconGetData(wh%,last_write%))
&400D2,wh%,before%,-1,-1,-1,
shell_IconGetData(wh%,before%))
shell_HeapBlockReturn(caret_blk%):=
shell_HotKeyProcess(key%):
e_list%,list_size%,found%,ptr%,h%,win$,fn1$,fn2$:
ctrl%,shift%,alt%,x_off%,y_off%,flag%,key_flags%,offset%:
result%,win_blk%:e_list%=_U%!60:list_size%=_U%!&B4*24:found%=
:ptr%=0:
e_list%!ptr%=key%
found%=
ptr%+=24
found%
ptr%>=list_size%:
found%
E>temp%=e_list%+ptr%:win$=$(temp%!8):
(win$<>""
temp%!&C=0)
shell_CreateWindow(win$,h%):win_blk%=
shell_HeapBlockFetch(36):win_blk%!0=h%:
&400CB,,win_blk%:x_off%=(win_blk%!4-win_blk%!&C)/2:y_off%=(win_blk%!16-win_blk%!8)/2:
shell_HeapBlockReturn(win_blk%)
:fn1$=$(temp%!16):
fn1$<>""
temp%!&C>0
U(void%=
("FN"+fn1$+"("+
temp%!&C+")")
void%=
("FN"+fn1$+"("+
h%+")")
:offset%=
shell_SearchStatic(_U%!&B8,temp%!&C):
offset%>-1
shell_OpenWindowStatic(temp%!&C)
temp%!&C>0
shell_MessageNoArgs("SHELLMSG09")
shell_OpenWindowDynamic(h%,x_off%,y_off%)
:fn2$=$(temp%!20):
fn2$<>""
temp%!&C>0
k(void%=
("FN"+fn1$+"("+
temp%!&C+")")
void%=
("FN"+fn2$+"("+
h%+")")
:result%=
win$="":fn1$="":fn2$="":result%=
:=result%
shell_ActionMenuSelect(_Q%):
handler%,menu_buffer%,CheckSelect%,fontmenuflag%,void%,h_blk%:h_blk%=
shell_HeapBlockFetch(256):
&400CF,,_shell_blk%:
_U%!264=0
&45BC4,_U%!24,_Q%
handler%,,h_blk%:
handler%
shell_MenuCallHandler(handler%,h_blk%)
_shell_blk%!8=1
shell_HeapBlockExists(_U%!&E0)
_temp%=_U%!&E0:
$_temp%<>""
+void%=
("FN"+$_temp%+"(_U%!52,_U%!56)")
shell_OpenMenu(_U%!36,_U%!40,_U%!24)
_shell_FontMenuSelFN$=""
shell_HeapBlockReturn(h_blk%):
shell_Receive(_Q%):
temp%,void%:
_Q%!16
shell_Exit:
shell_DataSave(_Q%)
shell_DataSaveAck(_Q%)
shell_DataLoad(_Q%,
shell_DataLoadAck(_Q%)
shell_DataLoad(_Q%,
shell_RAMFetch(_Q%)
shell_RAMTransmit(_Q%)
shell_Message_PreQuit(_Q%)
_U%!&A4>0
&temp%=_U%!&A4:void%=
("FN"+$temp%)
shell_Message_SaveDesktop(_Q%)
shell_Message_Shutdown(_Q%)
&502:
shell_InteractiveHelp(_Q%)
&400C0:
shell_MenuWarning(_Q%)
&400C1:
shell_Message_ModeChange(_Q%)
&400C2:
_U%!&A8>0
\temp%=_U%!&A8:void%=
("FN"+$temp%+"("+
(_Q%!4)+","+
shell_GetString(_Q%+28)+
34+")")
_U%!&D0=-1
shell_GetString(_Q%+28)="StrongHelp"
_U%!&D0=_Q%!4:
shell_StrongHlpMsg("Help_Install -DieWithTask "+
shell_GetAppDir+"."+
shell_GetAppName):temp%=_U%!&D8:
$temp%<>""
shell_HelpWord($temp%):
shell_HeapBlockReturn(_U%!&D8):_U%!&D8=0
&400C3:
_U%!&AC>0
&temp%=_U%!&AC:void%=
("FN"+$temp%)
_Q%!4=_U%!&D0
_U%!&D0=-1
&400C7:
shell_GetString(_Q%+28)="StrongHelp"
_U%!&D0=_Q%!20
shell_ScanForHelp
shell_HandleUnknownMessage2(_Q%)
shell_UserMessageAcknowledge(_Q%):
_Q%!16
shell_AckDataLoad(_Q%)
shell_AckRAMFetch(_Q%)
shell_TraceExit:
_U%!44<>-1
#(_U%!44):_U%!44=-1
shell_WimpCloseDown_I(Taskid%):
shell_LoseFonts:
&600DD,Taskid%,&4B534154:
&A1683,Taskid%:
_U%!&64
"XImpulse_CloseDown",_U%!&94
shell_HeapBlockExtend(a%,b%):
heap_code%+&C,a%,b%:=a%
shell_GetCmdLineArgs:
cmdline$:
_U%!324<>0
cmdline$=$(_U%!324)
:=cmdline$
shell_FileType(object$):
type%:
8,5,object$
,,type%:type%=(type%
&FFF00)>>>8:=type%
shell_MessageSendDataLoad(type%,name$):
m_blk%:m_blk%=
shell_HeapBlockFetch(256):m_blk%!0=256:m_blk%!4=0:m_blk%!16=5:m_blk%!20=0:m_blk%!28=0:m_blk%!32=0:m_blk%!36=0:m_blk%!40=type%:$(m_blk%+44)=name$+
&400E7,17,m_blk%,0
shell_HeapBlockReturn(m_blk%):
shell_MessageLookup(tag$,arg1$,arg2$):
flags%,L%,m$,ms_text%,ms_desc%:
tag$,8)="SHELLMSG"
%ms_text%=_U%!284:ms_desc%=_U%!280
ms_text%=_U%!64:ms_desc%=_U%!68
&61502,ms_desc%,tag$,ms_text%,256,arg1$,arg2$
,,,L%;flags%:
flags%
ms_text%?L%=&D:m$=$(ms_text%)
shell_WindowLoaded(window$):
loop%,found%:
(window$)>&C
shell_MessageOneArg("SHELLMSG02",window$)
Cfound%=
loop%=0
(_U%!0)-1:
$(((_U%!4)+(16*loop%))+4)=window$
found%=
:loop%=(_U%!0)-1
loop%:=found%
shell_MessageOneArg(tag$,arg1$):=
shell_MessageLookup(tag$,arg1$,"")
shell_GetWB(window$):
loop%,found%:
(window$)>&C
shell_MessageOneArg("SHELLMSG02",window$)
Dfound%=-1:
loop%=0
(_U%!0)-1:
$(((_U%!4)+(16*loop%))+4)=window$
found%=loop%:loop%=(_U%!0)-1
loop%:
found%>-1
=!((_U%!4)+(16*found%))
shell_MessageOneArg("SHELLMSG03",window$)
shell_SearchStatic(w_list%,handle%):
found%,ctr%:found%=-1:ctr%=0:
w_list%<>0
w_list%!ctr%<>-1:
w_list%!ctr%=handle%
found%=ctr%:=found%
:ctr%+=4:
:=found%
shell_EventListMenuWarn(item%,submenu_ptr%,warn_fn$,sel_fn$):
temp%,temp2%,ctr%,e_list%:
_U%!&DC=0
_U%!&DC=
shell_HeapBlockFetch(32):temp%=_U%!&DC:temp%!0=item%:temp%!4=
shell_HeapBlockFetch(
warn_fn$+1):$(temp%!4)=warn_fn$:temp%!8=submenu_ptr%:temp%!&C=
shell_HeapBlockFetch(
sel_fn$+1):$(temp%!&C)=sel_fn$
D3temp%!16=-1:temp%!20=-1:temp%!24=-1:temp%!28=-1
e_list%=
shell_HeapBlockExtend(_U%!&DC,32):_U%!&DC=e_list%:ctr%=0:
:ctr%+=16:
e_list%!ctr%=-1:temp%=_U%!&DC:temp%!ctr%=item%:temp%!(ctr%+4)=
shell_HeapBlockFetch(
warn_fn$+1):temp2%=temp%!(ctr%+4):$(temp2%)=warn_fn$:temp%!(ctr%+8)=submenu_ptr%
temp%!(ctr%+&C)=
shell_HeapBlockFetch(
sel_fn$+1):temp2%=temp%!(ctr%+&C):$(temp2%)=sel_fn$:temp%!(ctr%+16)=-1:temp%!(ctr%+20)=-1:temp%!(ctr%+24)=-1:temp%!(ctr%+28)=-1
shell_EventAdd(wh%,ic%,e_type%,menu%,fn$):
ptr%,fn%,event_list%,list_size%,found%:
fn_addr%:ptr%=0:found%=
wh%=-1
wh%=-2
][list_size%=
shell_HeapBlockInfo(_U%!&C)-8:event_list%=_U%!&C:
(event_list%!ptr%=wh%)
event_list%!(ptr%+4)=ic%
found%=
ptr%+=48
ptr%+=48
(ptr%>=list_size%
found%):
found%=
n>ptr%=0:
(event_list%!ptr%<>0):ptr%+=48:
ptr%>=list_size%
_U%!&C=
shell_HeapBlockExtend(_U%!&C,48):event_list%=_U%!&C:event_list%!(ptr%+0)=0:event_list%!(ptr%+4)=0:event_list%!(ptr%+8)=0:event_list%!(ptr%+&C)=0:event_list%!(ptr%+16)=0:event_list%!(ptr%+20)=0:event_list%!(ptr%+24)=0:event_list%!(ptr%+28)=0
|cevent_list%!(ptr%+32)=0:event_list%!(ptr%+36)=0:event_list%!(ptr%+40)=0:event_list%!(ptr%+44)=0
:event_list%!(ptr%+0)=wh%:event_list%!(ptr%+4)=ic%:
menu%<>0
event_list%!(ptr%+8)=menu%
:fn_addr%=ptr%+(&C+(e_type%*4)):
event_list%!fn_addr%<>0
shell_HeapBlockReturn(event_list%!fn_addr%)
:fn%=
shell_HeapBlockFetch(
fn$+1):$fn%=fn$:event_list%!fn_addr%=fn%:
shell_IconSetButtonType(wh%,ih%,button_type%):
button_type%=&C
button_type%=&D
shell_MessageOneArg("SHELLMSG23","PROCshell_IconSetButtonType")
button_type%<0
button_type%>&F
shell_MessageOneArg("SHELLMSG22","PROCshell_IconSetButtonType")
shell_IconSetState(wh%,ih%,button_type%<<&C,&F000):
shell_IconIsSprite(wh%,ih%):
flags%,temp%:flags%=
shell_IconGetFlags(wh%,ih%):temp%=(flags%
1<<1):
temp%=(1<<1)
shell_OK(e$):
&D00,e$
shell_HeapBlockInfo(a%):
29,6,!(heap_code%+28),a%
,,,r3:=r3
shell_HeapBlockExists(addr%):
void%:
addr%<&8000
99,"No heapblock defined at this address"
+void%=
shell_HeapBlockInfo(addr%):
shell_CatInfoRead(object$):
type%,load_addr%,exec_addr%,length%,atts%,string$:
8,5,object$
type%,,load_addr%,exec_addr%,length%,atts%:
type%=0
="Not Found"
atts%=51
string$+="WR "
atts%=&BB
string$+="LWR"
atts%=&88
string$+="DL "
string$+=" "+
shell_StringPadLeading(
~load_addr%,"0",8):string$+=" "+
shell_StringPadLeading(
~exec_addr%,"0",8):string$+=" "+
shell_StringPadLeading(
~length%,"0",8):=string$
shell_FileLength(object$):
type%,load_addr%,exec_addr%,length%,atts%,string$:
8,5,object$
type%,,load_addr%,exec_addr%,length%,atts%:=length%
shell_IconIndirSize(file_offset%,flags%,data%):
size%,valid_offset%,valid_buff%,ctr%,char%:
(flags%
&800100)=256
,size%=data%!8:
(flags%
(data%!4<>-1)
valid_offset%=data%!4:valid_buff%=
shell_HeapBlockFetch(256):
#X%=file_offset%+valid_offset%:
&C,4,X%,valid_buff%,512:ctr%=0:
:char%=valid_buff%?ctr%:ctr%+=1:
char%<32:size%=size%+ctr%:
shell_HeapBlockReturn(valid_buff%)
size%=0
:=size%
shell_OSModuleCheckVersion(module$,version%):
blk%,len%:blk%=
shell_HeapBlockFetch(256):
("Set AppName$RISCOS Y"):
("RMEnsure "+module$+" "+
version%+" Set AppName$RISCOS N"):
&20023,"AppName$RISCOS",blk%,256,0,0
,,len%:blk%?len%=&D
("Unset AppName$RISCOS"):
shell_HeapBlockReturn(blk%):
$blk%="N"
shell_IconGetFlags(file_offset%,wh%,ih%):
flags%,blk%:blk%=
shell_HeapBlockFetch(50):blk%!0=wh%:blk%!4=ih%:
&400CE,,blk%:flags%=blk%!24:
shell_HeapBlockReturn(blk%):=flags%
shell_IconGetCommand(v%,c$):
I%,result$:
v%<=0
result$=""
shell_StringUpperCase($v%),";"+
shell_StringUpperCase(c$)):
result$=""
result$=
$(v%+I%),
$(v%+I%)+";",";")-1)
:=result$
shell_TraceIsOn:=_U%!48
shell_BroadcastMessage(reason_code%,msg$):
m_blk%,m_len%:m_len%=(
msg$+30)
3:m_blk%=
shell_HeapBlockFetch(m_len%):m_blk%!&C=0:m_blk%!16=reason_code%:$(m_blk%+20)=msg$+
(0):m_blk%!0=m_len%:
&600E7,17,m_blk%,0:
shell_HeapBlockReturn(m_blk%):
shell_HandleAttachedMenu(_Q%,wh%,ih%):
menu%:
ih%<>-1
wh%>-1
7menu%=
shell_GetEventMenu(_Q%!8,wh%,ih%):
menu%<>0
shell_HandleMenuOpen(_Q%,menu%,wh%,ih%,
shell_DataSaveCheckName(wh%,ih%):
offset%,blk%,list_size%:blk%=_U%!72:offset%=0:
blk%<>0
Clist_size%=
shell_HeapBlockInfo(blk%)-8:
!(blk%+offset%)=wh%
%hname$=
shell_IconGetData(!blk%,blk%!16):
name$,".")=0
shell_OK(
shell_MessageNoArgs("SHELLMSG01"))
offset%=list_size%
:offset%+=24:
offset%>=list_size%
shell_IconSlab(button%,wh%,ih%):
blk%:blk%=
shell_HeapBlockFetch(50):blk%!8=button%:blk%!&C=wh%:blk%!16=ih%:
&81680,,blk%:blk%!8=0:
&81680,,blk%:
shell_HeapBlockReturn(blk%):
shiftmenuclick(wh%,ih%):=
shell_GetEventMenu(button%,wh%,ic%):
ptr%,event_list%,found%,list_size%,menu%:
wh%=-1
wh%=-2
>rlist_size%=
shell_HeapBlockInfo(_U%!&C)-8:ptr%=0:found%=
:event_list%=_U%!&C:fn$="":
(event_list%!ptr%=wh%)
shell_Tracef0("GetEventMenu:window handle matched.."):
event_list%!(ptr%+4)=ic%
L6menu%=event_list%!(ptr%+8):
menu%=-2
menu%=_U%!&FC
found%=
:ptr%+=48:
(ptr%>=list_size%
found%):=menu%
shell_HandleMenuOpen(_Q%,menu%,wh%,ih%,popup%):
i_blk%,w_blk%:
popup%=
shell_OpenMenu(_Q%!0,_Q%!4,menu%)
i_blk%=
shell_HeapBlockFetch(50):w_blk%=
shell_HeapBlockFetch(36):i_blk%!0=wh%:i_blk%!4=ih%:
&400CE,,i_blk%:w_blk%!0=wh%:
&400CB,,w_blk%:
shell_OpenMenu(w_blk%!4+i_blk%!16+64,_Q%!4,menu%):
w_blk%!4+i_blk%!16+64,_Q%!4
shell_HeapBlockReturn(i_blk%):
shell_HeapBlockReturn(w_blk%)
shell_IconSet(wh%,ih%,state%):
state%=0
shell_IconDeselect(wh%,ih%)
shell_IconSelect(wh%,ih%)
shell_MessageWindow(text$,cancel%,progname$,head$):
keys%,err_blk%:err_blk%=
shell_HeapBlockFetch(260):!err_blk%=0:$(err_blk%+4)=text$+
head$=""
head$="Message from "+progname$
cancel%
&400DF,err_blk%,19,head$
,keys%
&400DF,err_blk%,17,head$
,keys%
shell_HeapBlockReturn(err_blk%):=keys%
shell_FakeMouseClick(wh%,ih%,button%):
6,&F,1:_Q%!8=button%:_Q%!&C=wh%:_Q%!16=ih%:
shell_Action(6):
shell_MenuCallHandler(h%,_h_blk%):
("FN"+$h%+"(_h_blk%)")
shell_OpenMenu(x%,y%,m%):
fn$:fn$=
shell_GetEventHandler(_U%!28,_U%!32,1):
fn$<>""
'void%=
("FN"+fn$+"(_U%!28,_U%!32)")
shell_Tracef0("OpenMenu:no menumaker function registered")
m%<>_U%!24
shell_HeapBlockExists(_U%!256)
shell_HeapBlockReturn(_U%!256):_U%!256=0
shell_HeapBlockExists(_U%!&F4)
shell_HeapBlockReturn(_U%!&F4):_U%!&F4=0
m%=_U%!&FC
&400D4,,m%,x%-64,y%:_U%!264=1
_Q%!0=x%:_Q%!4=y%:
&45BC5,m%,_Q%:_U%!264=0
:_U%!24=m%:_U%!36=x%:_U%!40=y%:_U%!52=_U%!28:_U%!56=_U%!32:
shell_DataSave(_Q%):
temp%,offset%,blk%,loop%:
_Q%!4<>_U%!&94
Moffset%=
shell_GetEventListOffset(_Q%!20,_Q%!24,_U%+96,16,
offset%>-1
;blk%=_U%!96+offset%:
shell_CheckType(_Q%!40,blk%!8,
shell_TopBitLoadInProgress
n_Q%!0=256:_Q%!&C=_Q%!8:_Q%!36=-1:_Q%!16=2:$(_Q%+44)=
shell_GetAppDir+".ScrapFile"+
&400E7,18,_Q%,_Q%!4
shell_HeapBlockReturn(_U%!&9C):_U%!&9C=
shell_HeapBlockFetch((_Q%!0)+8):temp%=_U%!&9C:
loop%=0
_Q%!0
4:temp%!loop%=_Q%!loop%:
loop%:_U%!28=_Q%!20:_U%!32=_Q%!24:_U%!&80=0:_U%!&84=_Q%!36:_U%!&98=
shell_HeapBlockFetch(_Q%!36):_Q%!0=28:_Q%!&C=_Q%!8
V_Q%!16=6:_Q%!20=_U%!&98+_U%!&80:_Q%!24=_U%!&84:
&400E7,18,_Q%,_Q%!4:_U%!&70=_Q%!8
shell_DataSaveAck(_Q%):
_fullname$,a%,b%,blk%,temp%,void%:a%=0:b%=_Q%?(44+a%):
b%<>0:_fullname$+=
(b%):a%+=1:b%=_Q%?(44+a%):
:offset%=
shell_GetEventListOffset(_U%!28,_U%!32,_U%+72,24,
offset%=-1
offset%=-2
shell_MessageNoArgs("SHELLMSG05")
4blk%=(_U%!72)+offset%:temp%=blk%!20:
$temp%<>""
'void%=
("FN"+$temp%+"(_fullname$)")
shell_HeapBlockExists(blk%!8)
8,&A,_fullname$,blk%!&C,,blk%!8,blk%!8+
shell_HeapBlockInfo(blk%!8)+1
shell_MessageNoArgs("SHELLMSG21")
_Q%!36>-1
_U%!80<>0
shell_HeapBlockReturn(_U%!80)
N_U%!80=
shell_HeapBlockFetch(
_fullname$+1):temp%=_U%!80:$temp%=_fullname$
:_Q%!16=3:!_Q%=256:_Q%!20=_U%!&C8:_Q%!24=_U%!&CC:_Q%!40=_U%!&8C:_Q%!36=
shell_FileLength(_fullname$):_Q%!&C=_Q%!8:$(_Q%+44)=_fullname$+
(0):_U%!84=_Q%!8:
&400E7,18,_Q%,_Q%!20,_Q%!24:
_U%!28<>_U%!20
shell_CloseWindow(_U%!28)
&400D4,,-1:
shell_DataLoad(_Q%,DataOpen%):
reference%,offset%,blk%,_temp%,type_list%,type%,fname$:type%=_Q%!40:fname$=
shell_GetString(_Q%+44):
DataOpen%
_U%!96<>0
offset%=0
offset%=-1
offset%=
shell_GetEventListOffset(_Q%!20,_Q%!24,_U%+96,16,
offset%=-1
:<offset%=
shell_GetEventListOffset(_Q%!20,-1,_U%+96,16,
offset%>-1
?Cblk%=_U%!96+offset%:
shell_CheckType(_Q%!40,blk%!8,DataOpen%)
BPReference%=_Q%!&C:_Q%!&C=_Q%!8:_Q%!16=4:
&400E7,18,_Q%,_Q%!4:
_U%!&64
G$loadloc%=-1:_U%!&64=_U%!&64
loadloc%=
shell_LoadFile(Reference%=_U%!&6C)
shell_UserFNLoadFile(type%,loadloc%,blk%!8,fname$,_Q%!36,blk%):
_U%!&9C<>0
shell_HeapBlockReturn(_U%!&9C):_U%!&9C=0
shell_DataLoadAck(_Q%):
shell_RAMFetch(_Q%):
RAMFetch_buffer%,len_data%,done%:done%=
_U%!&90>&8000
e:_Q%!&C=_Q%!8:_Q%!16=7:len_data%=_U%!&88:
_U%!&8C=&FF9
_U%!&90+=4
(len_data%-_U%!&80)<_Q%!24
r$_Q%!24=len_data%-_U%!&80:done%=
&400F1,_U%!&94,_U%!&90+_U%!&80,_Q%!4,_Q%!20,_Q%!24:
&400E7,17,_Q%,_Q%!4:_U%!&78=_Q%!8:_U%!&80+=_Q%!24:
done%
_U%!&80=0
shell_RAMTransmit(_Q%):
offset%,blk%,f_name$,temp%:
_Q%!&C=_U%!&70
$_U%!&80+=_Q%!24:
_Q%!24<_U%!&84
offset%=
shell_GetEventListOffset(_U%!28,_U%!32,_U%+96,16,
):blk%=_U%!96+offset%:temp%=_U%!&9C:f_name$=
shell_GetString(temp%+44):
shell_UserFNLoadFile(temp%!40,_U%!&98,blk%!8,f_name$,_U%!&84,blk%)
_U%!&80>_U%!&84
;_U%!&98=
shell_HeapBlockExtend(_U%!&98,_U%!&80,_U%!&84)
:_Q%!&C=_Q%!8:_Q%!16=6:_Q%!20=_U%!&98+_U%!&80:_Q%!24=_U%!&84:
&400E7,18,_Q%,_Q%!4:_U%!&70=_Q%!8
shell_HeapBlockReturn(_U%!&98):_U%!&98=0:
shell_OK(
shell_MessageNoArgs("SHELLMSG15"))
shell_Message_PreQuit(_Q%):
temp%,quitsender%,blk%,loop%,flagword%:
_U%!300>0
blk%=
shell_HeapBlockFetch(256):
loop%=0
_Q%!0
4:blk%!loop%=_Q%!loop%:
loop%:temp%=_U%!300:quitsender%=blk%!4:
!blk%<24
flagword%=0
flagword%=blk%!20
Cblk%!&C=blk%!8:
&400E7,19,blk%,quitsender%:
("FN"+$temp%)<>0
flagword%
_closedown%=
!blk%=24:blk%!24=508:
&400E7,8,blk%,quitsender%:_closedown%=
shell_HeapBlockReturn(blk%)
shell_Message_SaveDesktop(Q%):
boot$:boot$="Run "+
shell_GetAppDir+
&C,2,Q%!20,boot$,
boot$:
shell_Message_Shutdown(_Q%):
_U%!312>0
shell_Tracef0("Message_Shutdown:Shutdown message received"):temp%=_U%!312:void%=
("FN"+$temp%)
shell_InteractiveHelp(_Q%):
tag$,mess$,validation$,pos1%,pos2%,help$,i_blk%:i_blk%=
shell_HeapBlockFetch(&C):
&400D6,_Q%!32,i_blk%,&3F0000,&C<<16:
!i_blk%<>-1
+tag$=
shell_IconGetData(_Q%!32,!i_blk%)
shell_HeapBlockReturn(i_blk%):
tag$=""
tag$=
shell_GetEventHandler(_Q%!32,_Q%!36,8)
Ivalidation$=
shell_IconGetValidation(_Q%!32,_Q%!36):
validation$<>""
shell_StringUpperCase(
validation$,1))="I"
%pos1%=
validation$,";"):
pos1%=0
tag$=
validation$,2)
tag$=
validation$,2,pos1%-2)
pos1%=
shell_StringUpperCase(validation$),
shell_StringUpperCase(";i")):pos2%=
shell_StringUpperCase(validation$),
shell_StringUpperCase(";"),pos1%+1):
pos1%>0
pos2%>0
,tag$=
validation$,pos1%+2,pos2%-pos1%-2)
tag$=
validation$,pos1%+2)
tag$<>""
_Q%!16=&503:_Q%!&C=_Q%!8:mess$=
shell_MessageLookup(tag$,"",""):mess$=
shell_MessageExpand(mess$):$(_Q%+20)=mess$:!_Q%=(
mess$+25)
&400E7,17,_Q%,_Q%!4
shell_MenuWarning(_Q%):
fn$,menu_buffer%,x%,y%,void%,_temp%,a%,warn_fn$,item_addr%,blk%:x%=_Q%!24:y%=_Q%!28:_U%!264=0:
_U%!20<>0
%void%=
shell_DeleteWindow(_U%!20)
_Q%!20
_U%!&E4:
shell_WindowRetitle(_U%!&E4,
shell_MessageNoArgs("warning")):
shell_IconPutData(_U%!&E4,1,
shell_MessageNoArgs("SHELLMSG07"),0):
&400E8,,_U%!&E4,x%,y%
item_addr%=
shell_MenuGetItemAddress(_U%!24,_Q%+32):
shell_HeapBlockExists(item_addr%!4)
shell_MenuWarnDBox(item_addr%,x%,y%)
blk%=
shell_HeapBlockFetch(32):
&45BC4,_U%!24,_Q%+32
,,blk%:
shell_FindMenuWarnEvent(blk%!8,warn_fn$,sel_fn$):
shell_HeapBlockReturn(blk%):
shell_MenuWarnSubMenu(_Q%!20,x%,y%,warn_fn$,sel_fn$)
shell_Message_ModeChange(_Q%):
offset%,ctr%,sw_list%,w_blk%:sw_list%=_U%!&B8:
_U%!&A0>0
shell_Tracef0("Message_ModeChange:ModeChange message received"):temp%=_U%!&A0:void%=
("FN"+$temp%)
:w_blk%=
shell_HeapBlockFetch(&64):
sw_list%<>0
sw_list%!ctr%<>-1:offset%=
shell_GetEventListOffset(sw_list%!ctr%,-1,_U%+92,24,
offset%>-1
shell_WindowIsOpen(sw_list%!ctr%)
0P!w_blk%=sw_list%!ctr%:
&400C6,,w_blk%:
shell_OpenWindow(sw_list%!ctr%,0,-1)
:ctr%+=4:
shell_HeapBlockReturn(w_blk%):
shell_GetString(Address%):
String$,Len%:
((Address%?Len%)>31
Len%<&FF):String$+=
(Address%?Len%):Len%+=1:
:=String$
shell_StrongHlpMsg(msg$):
shell_BroadcastMessage(&43B00,msg$):
shell_HelpWord(word$):
read%,temp%,buff%:buff%=
shell_HeapBlockFetch(512):
_U%!&D0=-1
shell_OSVarExists(buff%,"StrongHelp$Dir")
&600DE,"<StrongHelp$Dir>":
_U%!&D8<>0
shell_HeapBlockReturn(_U%!&D8)
PF_U%!&D8=
shell_HeapBlockFetch(
word$+1):temp%=_U%!&D8:$temp%=word$
shell_HeapBlockReturn(buff%):
shell_OK(
shell_MessageNoArgs("SHELLMSG11"))
shell_StrongHlpMsg("Help_Word "+word$)
shell_HeapBlockReturn(buff%):
shell_ScanForHelp:
wrk%,owner_taskhandle%:wrk%=
shell_HeapBlockFetch(256):
:wrk%!&C=0:
&400E7,19,wrk%,-2,_U%!&D4
,,owner_taskhandle%:_U%!&D4=_U%!&D4+1:
owner_taskhandle%<>-1
(_U%!&D4)>64:
owner_taskhandle%<>-1
sSwrk%!0=24:wrk%!&C=0:wrk%!16=&400C6:wrk%!20=owner_taskhandle%:
&400E7,17,wrk%,0
shell_HeapBlockReturn(wrk%):
shell_HandleUnknownMessage2(_Q%):
message$:
_Q%!16
&43B00:message$=$(_Q%+20):
message$,30)="EvntShellLib:ShellDBug started"
_U%!&64
r_U%!&64=(_U%!&64
1<<4):
shell_BroadcastMessage(&43B00,"ShellDBug:Init Debug messages from "+
shell_GetAppName)
message$,25)="EvntShellLib:TraceInitAck"
_U%!&64=(_U%!&64
1<<4)
message$,20)="EvntShellLib:TraceOn"
shell_TraceOn
message$,21)="EvntShellLib:TraceOff"
shell_TraceOff
message$,28)="EvntShellLib:ListClickSelect"
shell_ListClickSelect
message$,28)="EvntShellLib:ListClickAdjust"
shell_ListClickAdjust
message$,25)="EvntShellLib:ListHelpTags"
shell_ListHelpTags
shell_HandleUnknownMessage(_Q%):
shell_AckDataLoad(_Q%):
_Q%!&C<>_U%!84
&20008,6,"<Wimp$Scrap>":
&FF,"Data Transfer failed: Receiver died"
shell_AckRAMFetch(_Q%):
Exist%,temp%:temp%=_U%!&9C:
_Q%!&C<>_U%!&70
_U%!&80=0
&20023,"Wimp$Scrap",,-1,0,3
,,Exist%:
Exist%<>0
$(temp%+44)="<Wimp$Scrap>"+
(0):temp%!0=(49+
shell_GetString(temp%+44)))
3:temp%!&C=temp%!8:temp%!16=2:temp%!36=-1:
&400E7,18,temp%,temp%!4:_U%!&6C=temp%!8
shell_OK(
shell_MessageNoArgs("SHELLMSG14"))
shell_HeapBlockReturn(_U%!&98):_U%!&98=0:
shell_OK("SHELLMSG06")
shell_LoseFonts:
loop%,temp%:temp%=_U%!&E8:
loop%=0
temp%?loop%>0:
&40082,loop%:temp%?loop%-=1:
loop%:
shell_IconSetState(WindowHandle%,IconHandle%,EorWord%,ClearWord%):
icon_blk%:icon_blk%=
shell_HeapBlockFetch(16):!icon_blk%=WindowHandle%:icon_blk%!4=IconHandle%:icon_blk%!8=EorWord%:icon_blk%!&C=ClearWord%:
&400CD,,icon_blk%
shell_HeapBlockReturn(icon_blk%):
shell_StringPadLeading(string$,char$,length%):
(string$)<length%:string$=
length%-
(string$),char$)+string$:
:=string$
shell_StringUpperCase(string$):
loop%:
(string$)>0
loop%=1
(string$):
string$,loop%,1)>="a"
string$,loop%,1)<="z"
string$,loop%,1)=
string$,loop%,1))
loop%
:=string$
shell_IconDeselect(WindowHandle%,IconHandle%):
shell_IconSetState(WindowHandle%,IconHandle%,0,&200000):
shell_IconSelect(WindowHandle%,IconHandle%):
shell_IconSetState(WindowHandle%,IconHandle%,&200000,&200000):
shell_CheckType(type%,type_list%,DataOpen%):
Ok%,ctr%,found%,temp%,topbit_load%:ctr%=0:found%=-1:topbit_load%=
_U%!&64
_U%!&64=_U%!&64
type_list%!ctr%<>-1:temp%=type_list%!ctr%:
temp%
1<<31
$temp%=temp%
1<<31:topbit_load%=
topbit_load%=
temp%=type%
found%=ctr%:
topbit_load%
_U%!&64=_U%!&64
:ctr%+=4:
DataOpen%
(type%>=4096)
found%=-1
found%<>-1
shell_TopBitLoadInProgress:
_U%!&64
shell_LoadFile(Scrap%):
Name$,FileSize%,Flags%,loadloc%:Name$=
shell_GetString(_Q%+44):FileSize%=
shell_FileLength(Name$):
FileSize%<0
shell_OK(
shell_MessageNoArgs("SHELLMSG16"))
iloadloc%=
shell_HeapBlockFetch(FileSize%):
&20008,16,Name$,loadloc%,0
;Flags%:
shell_VFlag(Flags%)
shell_HeapBlockReturn(loadloc%):
shell_OK(
shell_MessageNoArgs("SHELLMSG17"))
:=loadloc%
shell_UserFNLoadFile(type%,loadloc%,type_list%,_filename$,_file_size%,blk%):
ctr%,found%,temp%,void%:ctr%=0:found%=-1:
type_list%!ctr%<>-1:temp%=type_list%!ctr%:
temp%
1<<31
temp%=temp%
1<<31
temp%=type%
found%=ctr%
7tctr%+=4:
:temp%=blk%!&C:void%=
("FN"+$(temp%!found%)+"("+
loadloc%+","+
type%+",_filename$,"+
_file_size%+")"):
shell_IconGetValidation(wh%,ih%):
blk%,validation$,flags%:
ih%=-1
@svalidation$="":blk%=
shell_HeapBlockFetch(&64):blk%!0=wh%:blk%!4=ih%:
&400CE,,blk%:flags%=blk%!24:
flags%
blk%!32>0
validation$=$(blk%!32)
shell_HeapBlockReturn(blk%):=validation$
shell_MessageExpand(h$):
s$,m$,index%:s$="":
h$,"\")>0:index%=
h$,"\"):s$+=
h$,index%-1):m$=
h$,index%+1,1):h$=
h$,index%+2):
"A":s$+="Click ADJUST to"
"a":s$+="ADJUST"
"D":s$+="Drag with SELECT to"
"d":s$+="Drag with ADJUST to"
"G":s$+="This option is greyed out because"
"R":s$+="Move the pointer right"
"S":s$+="Click SELECT to"
"s":s$+="SELECT"
"T":s$+="This is the"
"W":s$+="This window is"
"w":s$+="window"
s$+="\"+m$
:=s$+h$
shell_DeleteWindow(handle%):
win_blk%:win_blk%=
shell_HeapBlockFetch(20):
handle%<>0
oktodeletew(handle%)
shell_EventDeleteAll(handle%):
handle%=_U%!20
_U%!20=0
p=offset%=
shell_SearchStatic(_U%!&B8,handle%):
offset%>-1
r#temp%=_U%!&B8+offset%:temp%!0=0
:win_blk%!0=handle%:
&400C3,,win_blk%:handle%=0
shell_HeapBlockReturn(win_blk%):=handle%
shell_WindowRetitle(
whandle%,title$):
temp%,win_blk%,handle%,t_buffer_len%:win_blk%=
shell_HeapBlockFetch(6000):win_blk%!0=whandle%:
&400CC,,win_blk%:
((win_blk%!60)
256)=0
ltemp%=win_blk%+76:$temp%=
title$,&B):
&400C3,,win_blk%:
&400C1,,win_blk%+4
handle%:
handle%<>whandle%
shell_UpdateWindowHandle(whandle%,handle%):whandle%=handle%
t_buffer_len%=win_blk%!84:$(!(win_blk%+76))=
title$,t_buffer_len%-1):
((win_blk%!32)
(1<<16))<>0
&400D1,-1,win_blk%!4,win_blk%!16,win_blk%!&C,win_blk%!16+44
shell_HeapBlockReturn(win_blk%)
shell_MenuGetItemAddress(menu%,selection%):
ctr%,item_addr%:
&45BC7,menu%
menu%:
:item_addr%=menu%+28+((selection%!ctr%)*24):menu%=item_addr%!4:ctr%+=4:
selection%!ctr%=-1:=item_addr%
shell_MenuWarnDBox(addr%,x%,y%):
temp%,h%,void%:
Dtemp%=addr%!4:
shell_CreateWindow($temp%!0,h%):
$temp%!4<>""
&void%=
("FN"+$temp%!4+"("+
h%+")")
$temp%!8<>""
&void%=
("FN"+$temp%!8+"("+
h%+")")
&400E8,,h%,x%,y%:_U%!20=h%:
shell_FindMenuWarnEvent(item_handle%,
warn_fn$,
sel_fn$):
result%,e_list%,temp%,offset%,found%,list_size%,temp2%,ctr%:
submenu%:submenu%=0:e_list%=_U%!&DC:offset%=0:found%=
:warn_fn$="":submenu%=0:
shell_HeapBlockExists(e_list%)
:ctr%+=4:
e_list%!ctr%=-1:list_size%=ctr%:ctr%=0:
:temp%=!(e_list%+offset%+0):
temp%<>-1
temp%=item_handle%
found%=
:temp2%=e_list%!(offset%+4):warn_fn$=$temp2%:submenu%=e_list%!(offset%+8):temp2%=e_list%!(offset%+&C):sel_fn$=$temp2%
:offset%+=16
offset%=list_size%
found%
offset%>=list_size%
warn_fn$="":sel_fn$=""
shell_MenuWarnSubMenu(s_menu%,x%,y%,warn_fn$,sel_fn$):
void%,temp%,f_menu%,ctr%:_shell_FontMenuSelFN$=sel_fn$:
shell_HeapBlockExists(_U%!&E0)
shell_HeapBlockReturn(_U%!&E0)
[_U%!&E0=
shell_HeapBlockFetch(
warn_fn$+1):temp%=_U%!&E0:$temp%=warn_fn$:
warn_fn$<>""
,void%=
("FN"+warn_fn$+"(_U%!52,_U%!56)")
&400E8,,s_menu%,x%,y%:
shell_WindowIsOpen(wh%):=(
shell_WindowGetFlags(wh%)
1<<16)
shell_TraceOn:_U%!48=
shell_BroadcastMessage(&43B00,"ShellDBug:TraceOn"):
shell_TraceOff:_U%!48=
shell_BroadcastMessage(&43B00,"ShellDBug:TraceOff"):
shell_ListClickSelect:
e_list%,ptr%,list_size%,temp%,temp2%:e_list%=_U%!&C:list_size%=
shell_HeapBlockInfo(e_list%):ptr%=0:
:temp%=e_list%!(ptr%+20):temp2%=e_list%+ptr%:
shell_HeapBlockExists(temp%)
$temp%<>""
:ptr%+=48:
(ptr%>=list_size%):
shell_ListClickAdjust:
e_list%,ptr%,list_size%,temp%,temp2%:e_list%=_U%!&C:list_size%=
shell_HeapBlockInfo(e_list%):ptr%=0:
:temp%=e_list%!(ptr%+24):temp2%=e_list%+ptr%:
shell_HeapBlockExists(temp%)
$temp%<>""
:ptr%+=48:
(ptr%>=list_size%):
shell_ListHelpTags:
e_list%,ptr%,list_size%,temp%,temp2%:e_list%=_U%!&C:list_size%=
shell_HeapBlockInfo(e_list%):ptr%=0:
:temp%=e_list%!(ptr%+44):temp2%=e_list%+ptr%:
shell_HeapBlockExists(temp%)
$temp%<>""
:ptr%+=48:
(ptr%>=list_size%):
shell_HandleUnknownMessage(_Q%):
shell_VFlag(Flags%):=((Flags%
1)=1)
oktodeletew(handle%):=-1
shell_EventDeleteAll(wh%):
ptr%,menu%,found%,list_size%,event_list%,loop%:ptr%=0:menu%=0:found%=
wh%=-1
wh%=-2
'[list_size%=
shell_HeapBlockInfo(_U%!&C)-8:event_list%=_U%!&C:
(event_list%!ptr%=wh%)
found%=
ptr%+=48
(ptr%>=list_size%
found%):
found%
1uevent_list%!(ptr%+0)=0:event_list%!(ptr%+4)=0:event_list%!(ptr%+8)=0:
loop%=&C
event_list%!(ptr%+loop%)<>0
shell_HeapBlockReturn(event_list%!(ptr%+loop%)):event_list%!(ptr%+loop%)=0
loop%
shell_Tracef0("EventDeleteAll:wh%=&"+
~wh%):
shell_DeleteEventDataSave(wh%,-1):
shell_DeleteEventBump(wh%,-1):
shell_UpdateWindowHandle(old_handle%,new_handle%):
new_handle%<>old_handle%
_U%!28=old_handle%
_U%!28=new_handle%
shell_FixEventBlock(old_handle%,new_handle%,_U%!&C,48):
shell_FixEventBlock(old_handle%,new_handle%,_U%!96,16):
shell_FixEventBlock(old_handle%,new_handle%,_U%!72,24):
shell_FixEventBlock(old_handle%,new_handle%,_U%!92,24)
shell_FixEventBlock(old_handle%,new_handle%,_U%!&68,16):
shell_UpdateStaticWindows(old_handle%,new_handle%)
shell_WindowGetFlags(wh%):
flags%,blk%:blk%=
shell_HeapBlockFetch(36):blk%!0=wh%:
&400CB,,blk%:flags%=blk%!32:
shell_HeapBlockReturn(blk%):=flags%
shell_DeleteEventDataSave(wh%,ih%):
offset%,blk%,list_size%:
:offset%=
shell_GetEventListOffset(wh%,ih%,_U%+72,24,
offset%>=0
ih%=-1
shell_Tracef0("DeleteEventDataSave:Deleting DataSave Event (all events for window handle &"+
~wh%+")")
shell_Tracef0("DeleteEventDataSave:Deleting DataSave Event (window handle was &"+
~wh%+" icon handle was "+
ih%+")")
:list_size%=
shell_HeapBlockInfo(_U%!72)-8:
offset%=list_size%-24
offset%=0
shell_HeapBlockReturn(_U%!72):_U%!72=0
_U%!72=
shell_HeapBlockExtend(_U%!72,-24)
blk%=event_list%+offset%:blk%!0=0:blk%!4=0:blk%!8=0:blk%!&C=0:blk%!16=0:
shell_HeapBlockReturn(blk%!20):blk%!20=0
offset%<0:
shell_DeleteEventBump(wh%,ih%):
offset%,blk%,list_size%,event_list%,temp%:event_list%=_U%!&68:
:offset%=
shell_GetEventListOffset(wh%,ih%,_U%+&68,16,
shell_Tracef0("DeleteEventBump:offset%="+
offset%):
offset%>=0
ih%=-1
shell_Tracef0("DeleteEventBump:Deleting Bump Event (all events for window handle &"+
~wh%+")")
shell_Tracef0("DeleteEventBump:Deleting Bump Event (window handle was &"+
~wh%+" icon handle was "+
ih%+")")
:list_size%=
shell_HeapBlockInfo(_U%!&68)-8:
offset%=list_size%-16
offset%=0
info_blk%=event_list%!&C:temp%=info_blk%!&C:
shell_HeapBlockReturn(temp%!&C):
shell_HeapBlockReturn(temp%!16):
shell_HeapBlockReturn(temp%):
shell_HeapBlockReturn(_U%!&68):_U%!&68=0:
shell_Tracef0("DeleteEventDataSave:No Bump events now registered")
_U%!&68=
shell_HeapBlockExtend(_U%!&68,-16)
blk%=event_list%+offset%:blk%!0=0:blk%!4=0:blk%!8=0:info_blk%=blk%!&C:
shell_HeapBlockReturn(info_blk%!&C):
shell_HeapBlockReturn(info_blk%!16):
shell_HeapBlockReturn(info_blk%)
offset%<0:
shell_FixEventBlock(old_handle%,new_handle%,event_list%,offset%):
ptr%,list_size%:
shell_HeapBlockExists(event_list%)
Ulist_size%=
shell_HeapBlockInfo(event_list%)-8:
(event_list%!ptr%=old_handle%)
event_list%!ptr%=new_handle%
:ptr%+=offset%:
(ptr%>=list_size%)
shell_UpdateStaticWindows(old_handle%,new_handle%):
offset%,w_list%:w_list%=_U%!&B8:offset%=
shell_SearchStatic(_U%!&B8,old_handle%):w_list%!offset%=new_handle%: