Home » Archimedes archive » Archimedes World » archimedes_world_volume_15_issue_1_scp.adf » !ProFiler_ProFiler » !ProFiler/Dox/SWIs
!ProFiler/Dox/SWIs
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 » Archimedes archive » Archimedes World » archimedes_world_volume_15_issue_1_scp.adf » !ProFiler_ProFiler |
Filename: | !ProFiler/Dox/SWIs |
Read OK: | ✔ |
File size: | 2003 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
<html><head><title>ProFiler SWI calls</title></head> <body> <h1><center><u>ProFiler SWI calls</u></center></h1> <p>As no SWI chunk has been allocated yet, ProFiler uses a temporary one. It is likely that the chunk will be &400, but that remains to be seen. Until then, use only the names of the SWIs, not the numbers. <h2><a name="ObjectDesc">Filer_ObjectDesc</a></h2> <pre>On entry: R0 Object name (will be canonicalised) On exit: R2 Viewer description or 0 if viewer not visible R3 Object description or 0 if object not visible </pre> This will return pointers to descriptions of the object and the viewer containing it if it is currently visible. If the viewer that should have contained the object is visible, but the object is not, R3 will be 0 on exit and R2 will point to the viewer description. <h2><a name="ObjectName">Filer_ObjectName</a></h2> <pre>On entry: R0 Buffer for returned name (min 256 bytes) R2 Viewer description R3 Object description On exit: All regs preserved </pre> This will generate a full pathname for the file defined by R2 and R3. <h2><a name="CreateSprite">Filer_CreateSprite</a></h2> <pre>On entry: R0 Sprite name R1 Sprite mode (normal mode desciption block) On exit: R1 Sprite area R2 Sprite </pre> This will create a sprite in the Filer's sprite pool. <h2><a name="SetSprite">Filer_SetSprite</a></h2> <pre>On entry: R0 S+Spritename or error block R1 Full pathname On exit: All regs preserved </pre> This will use the given sprite for the object given in R1. If the directory is still open, the sprite will replace the one currently used, which will usually be 'file_wait'. If the object is not visible, nothing will happen. You can also report an error with this SWI. The sprite will change to 'file_err', and the text will be shown in the infobox. The error number should have bits 24-30 clear in order to be recognised as such. <h2><a name="CopySprite">Filer_CopySprite <i>(Not implemented yet)</i></a></h2> <pre>On entry: R0 Sprite On exit: All regs preserved </pre> This will take a copy of the sprite and put it in the Filer's sprite pool. You should call this after completing your background process of drawing the sprite. After calling this SWI you can dispose of the sprite and call <a href="#SetSprite">Filer_SetSprite</a>. <h2><a name="ReadChoices">Filer_ReadChoices</a></h2> <i>Currently only for internal use.</i> <h2><a name="NewChoices">Filer_NewChoices</a></h2> <i>Currently only for internal use.</i> <h2><a name="KeyName">Filer_KeyName</a></h2> <pre>On entry: R0 Key code On exit: R0 Key name </pre> This SWI should really have been provided by the Toolbox, but since it isn't, I've put it in ProFiler. The reason for this SWI is to get a consistent naming of keys. It returns the name of the given key code. <h2><a name="ViewerDesc">Filer_ViewerDesc</a></h2> <pre>On entry: R0 Canonical directory name On exit: R2 Viewer (or 0 if not open) </pre> Converts a name to a viewer description. You need to know the format of the descriptor block to make use of it, and as that format can still change, it has not been documented here. At the moment is can be used to determine if the viewer is open. <h2><a name="Boot">Filer_Boot</a></h2> <pre>On entry: R0 Canonical directory name </pre> Does exactly the same as the *Filer_Boot command. <h2><a name="Select">Filer_Select</a></h2> <pre>On entry: R0 Reason code: 0 Select file (only) R1->filename to select 1 Add file to selection R1->filename to add 16 Read current viewer On exit: R1->Viewer name, or 0 if no current viewer 17 Read one selected file R1->Viewer name, of 0 for current viewer On exit: R1->Object name, or 0 if none selected 18 Read multiple selected files R1->Viewer name, or 0 for current viewer R3=0 for first file, or preserved from last call On exit: R1->Object name, or 0 if R3=0 R3= Context pointer for getting next object, 0 if finished </pre> This call can be used to read or control the selection. It is used by the variable Filer$Selected among other things. The 'current viewer' in this context means the one that has the input focus. <h2><a name="Sprite">Filer_Sprite</a></h2> <pre>On entry: R0 Desired sprite height (0=68 osu, 1=36 osu) R1 Object name R2 Task handle to send reply to (or 0 for a broadcast) On exit: R0 Optional sprite to use while waiting for the message </pre> This call is the main interface to binding sprites to disc objects. Unlike earlier days where every application had its own view of these things, the filer provides this SWI to keep it in one place. The filer can be extended with programs like the Sprite Clients, and these extentions will also be considered when this SWI is called. <p> After calling this SWI, a message (see <a href="./Messages#410">Message_FilerSpriteIs</a>) will be sent when the sprite has been found. Finding the sprite may mean that apps are booted and many other things, so there is no maximum reply delay. Indeed, if the object doesn't exist, there will be no reply at all. This issue may be addressed in later versions. <h2><a name="Scale">Filer_Scale</a></h2> <pre>On entry: R3 Original width R4 Original height R5 Maximum height R6 Maximum width On exit: R0 Scale factor (16.16) R3 Scaled width R4 Scaled height F0-F5 Corrupted </pre> This call can save some code in Sprite Clients. When dealing with the <a href="./Service#308">Filer_MakeSprite</a> service call, you need to scale the input so it doesn't exceed the maximum width or height. This call will calculate the scale factor, preserving the aspect ratio. <p>Normally you will call this SWI with: <br>R3,R4=Size of your picture, whatever it is, in os-units. <br>R5=68 os-units, which is the normal height of sprites. <br>R6=R6 on entry to the service code. <p>Note that there are no units on the entry/exit values. The unit passed in will also be returned. <h2><a name="LoadChoices">Filer_LoadChoices</a></h2> <pre>On entry: R0 Pointer to client title (module title or directory name) R1 Pointer to SCM choices list On exit: The choices block is updated </pre> This call is for External Utilities and Sprite Clients, that use the SC_Manager to maintain their choices. It is used when the utility starts up, to override the default choices with the user's preferences. <br>Even though it seems reasonable, Service_FilerNewChoices is <i>not</i> called after updating the choices in this SWI. The SWI is usually called from the module's init code, so it wouldn't be passed to the relevant module anyway. <h2><a name="TypeToString">Filer_ConvertTypeToString</a></h2> <pre>On entry: R0 Pointer to buffer R1 XType On exit: The buffer contains zero-terminated text. </pre> <h2><a name="StringToType">Filer_ConvertStringToType</a></h2> <pre>On entry: R0 Which types to accept 0 None 1 Directory types 2 Application types 4 File and image types R1 Pointer to textual type On exit: R0 Old 12bit type, or -1 if unknown R1 Completed type string </pre> <h2><a name="RegisterUtility">Filer_RegisterUtility</a></h2> <pre>On entry: R0 Pointer to module base R1 Offset (from R0) to function list or 0 to deregister </pre> This call is for External Utilities that exist in a module. It should be used in the module's initialisation and finalisation code, to tell the Filer whether the functions are available or not. <br>This SWI is only used by 'real' utilities with functions in them, not Sprite Clients, Generic converters, or anything that isn't a full utility. <h2><a name="ReadDescription">Filer_ReadDescription</a></h2> <pre>On entry: R0 Function handle R1 Type of description to read 0 Key shortcut action On exit: R1 Pointer to description, or 0 if not found R2 Key code (bit0-15), and button number (bit16-23) 1 Utility and function ID On exit: R4 Pointer to utility name, or 0 if not found R5 Pointer to function name if R4<>0 </pre> <h2><a name="EnumerateFunctions">Filer_EnumerateFunctions</a></h2> <pre>On entry: R0 0 to start, or preserved from last call On exit: R0 0 if no more functions, else context pointer for next call R1 Function handle R4 Pointer to utility name R5 Pointer to Function ID R1,R4,R5 corrupted if R0=0 </pre> </body></html>
00000000 3c 68 74 6d 6c 3e 3c 68 65 61 64 3e 3c 74 69 74 |<html><head><tit| 00000010 6c 65 3e 50 72 6f 46 69 6c 65 72 20 53 57 49 20 |le>ProFiler SWI | 00000020 63 61 6c 6c 73 3c 2f 74 69 74 6c 65 3e 3c 2f 68 |calls</title></h| 00000030 65 61 64 3e 0a 0a 3c 62 6f 64 79 3e 0a 3c 68 31 |ead>..<body>.<h1| 00000040 3e 3c 63 65 6e 74 65 72 3e 3c 75 3e 50 72 6f 46 |><center><u>ProF| 00000050 69 6c 65 72 20 53 57 49 20 63 61 6c 6c 73 3c 2f |iler SWI calls</| 00000060 75 3e 3c 2f 63 65 6e 74 65 72 3e 3c 2f 68 31 3e |u></center></h1>| 00000070 0a 0a 3c 70 3e 41 73 20 6e 6f 20 53 57 49 20 63 |..<p>As no SWI c| 00000080 68 75 6e 6b 20 68 61 73 20 62 65 65 6e 20 61 6c |hunk has been al| 00000090 6c 6f 63 61 74 65 64 20 79 65 74 2c 20 50 72 6f |located yet, Pro| 000000a0 46 69 6c 65 72 20 75 73 65 73 20 61 20 74 65 6d |Filer uses a tem| 000000b0 70 6f 72 61 72 79 20 6f 6e 65 2e 20 49 74 20 69 |porary one. It i| 000000c0 73 20 6c 69 6b 65 6c 79 20 74 68 61 74 20 74 68 |s likely that th| 000000d0 65 20 63 68 75 6e 6b 20 77 69 6c 6c 20 62 65 20 |e chunk will be | 000000e0 26 34 30 30 2c 20 62 75 74 20 74 68 61 74 20 72 |&400, but that r| 000000f0 65 6d 61 69 6e 73 20 74 6f 20 62 65 20 73 65 65 |emains to be see| 00000100 6e 2e 20 55 6e 74 69 6c 20 74 68 65 6e 2c 20 75 |n. Until then, u| 00000110 73 65 20 6f 6e 6c 79 20 74 68 65 20 6e 61 6d 65 |se only the name| 00000120 73 20 6f 66 20 74 68 65 20 53 57 49 73 2c 20 6e |s of the SWIs, n| 00000130 6f 74 20 74 68 65 20 6e 75 6d 62 65 72 73 2e 0a |ot the numbers..| 00000140 0a 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 4f 62 |.<h2><a name="Ob| 00000150 6a 65 63 74 44 65 73 63 22 3e 46 69 6c 65 72 5f |jectDesc">Filer_| 00000160 4f 62 6a 65 63 74 44 65 73 63 3c 2f 61 3e 3c 2f |ObjectDesc</a></| 00000170 68 32 3e 0a 3c 70 72 65 3e 4f 6e 20 65 6e 74 72 |h2>.<pre>On entr| 00000180 79 3a 0a 52 30 09 4f 62 6a 65 63 74 20 6e 61 6d |y:.R0.Object nam| 00000190 65 20 28 77 69 6c 6c 20 62 65 20 63 61 6e 6f 6e |e (will be canon| 000001a0 69 63 61 6c 69 73 65 64 29 0a 4f 6e 20 65 78 69 |icalised).On exi| 000001b0 74 3a 0a 52 32 09 56 69 65 77 65 72 20 64 65 73 |t:.R2.Viewer des| 000001c0 63 72 69 70 74 69 6f 6e 20 6f 72 20 30 20 69 66 |cription or 0 if| 000001d0 20 76 69 65 77 65 72 20 6e 6f 74 20 76 69 73 69 | viewer not visi| 000001e0 62 6c 65 0a 52 33 09 4f 62 6a 65 63 74 20 64 65 |ble.R3.Object de| 000001f0 73 63 72 69 70 74 69 6f 6e 20 6f 72 20 30 20 69 |scription or 0 i| 00000200 66 20 6f 62 6a 65 63 74 20 6e 6f 74 20 76 69 73 |f object not vis| 00000210 69 62 6c 65 0a 3c 2f 70 72 65 3e 0a 0a 54 68 69 |ible.</pre>..Thi| 00000220 73 20 77 69 6c 6c 20 72 65 74 75 72 6e 20 70 6f |s will return po| 00000230 69 6e 74 65 72 73 20 74 6f 20 64 65 73 63 72 69 |inters to descri| 00000240 70 74 69 6f 6e 73 20 6f 66 20 74 68 65 20 6f 62 |ptions of the ob| 00000250 6a 65 63 74 20 61 6e 64 20 74 68 65 20 76 69 65 |ject and the vie| 00000260 77 65 72 0a 63 6f 6e 74 61 69 6e 69 6e 67 20 69 |wer.containing i| 00000270 74 20 69 66 20 69 74 20 69 73 20 63 75 72 72 65 |t if it is curre| 00000280 6e 74 6c 79 20 76 69 73 69 62 6c 65 2e 20 49 66 |ntly visible. If| 00000290 20 74 68 65 20 76 69 65 77 65 72 20 74 68 61 74 | the viewer that| 000002a0 20 73 68 6f 75 6c 64 20 68 61 76 65 0a 63 6f 6e | should have.con| 000002b0 74 61 69 6e 65 64 20 74 68 65 20 6f 62 6a 65 63 |tained the objec| 000002c0 74 20 69 73 20 76 69 73 69 62 6c 65 2c 20 62 75 |t is visible, bu| 000002d0 74 20 74 68 65 20 6f 62 6a 65 63 74 20 69 73 20 |t the object is | 000002e0 6e 6f 74 2c 20 52 33 20 77 69 6c 6c 20 62 65 20 |not, R3 will be | 000002f0 30 20 6f 6e 20 65 78 69 74 0a 61 6e 64 20 52 32 |0 on exit.and R2| 00000300 20 77 69 6c 6c 20 70 6f 69 6e 74 20 74 6f 20 74 | will point to t| 00000310 68 65 20 76 69 65 77 65 72 20 64 65 73 63 72 69 |he viewer descri| 00000320 70 74 69 6f 6e 2e 0a 0a 0a 3c 68 32 3e 3c 61 20 |ption....<h2><a | 00000330 6e 61 6d 65 3d 22 4f 62 6a 65 63 74 4e 61 6d 65 |name="ObjectName| 00000340 22 3e 46 69 6c 65 72 5f 4f 62 6a 65 63 74 4e 61 |">Filer_ObjectNa| 00000350 6d 65 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 72 65 |me</a></h2>.<pre| 00000360 3e 4f 6e 20 65 6e 74 72 79 3a 0a 52 30 09 42 75 |>On entry:.R0.Bu| 00000370 66 66 65 72 20 66 6f 72 20 72 65 74 75 72 6e 65 |ffer for returne| 00000380 64 20 6e 61 6d 65 20 28 6d 69 6e 20 32 35 36 20 |d name (min 256 | 00000390 62 79 74 65 73 29 0a 52 32 09 56 69 65 77 65 72 |bytes).R2.Viewer| 000003a0 20 64 65 73 63 72 69 70 74 69 6f 6e 0a 52 33 09 | description.R3.| 000003b0 4f 62 6a 65 63 74 20 64 65 73 63 72 69 70 74 69 |Object descripti| 000003c0 6f 6e 0a 4f 6e 20 65 78 69 74 3a 0a 41 6c 6c 20 |on.On exit:.All | 000003d0 72 65 67 73 20 70 72 65 73 65 72 76 65 64 0a 3c |regs preserved.<| 000003e0 2f 70 72 65 3e 0a 0a 54 68 69 73 20 77 69 6c 6c |/pre>..This will| 000003f0 20 67 65 6e 65 72 61 74 65 20 61 20 66 75 6c 6c | generate a full| 00000400 20 70 61 74 68 6e 61 6d 65 20 66 6f 72 20 74 68 | pathname for th| 00000410 65 20 66 69 6c 65 20 64 65 66 69 6e 65 64 20 62 |e file defined b| 00000420 79 20 52 32 20 61 6e 64 20 52 33 2e 0a 0a 0a 3c |y R2 and R3....<| 00000430 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 43 72 65 61 |h2><a name="Crea| 00000440 74 65 53 70 72 69 74 65 22 3e 46 69 6c 65 72 5f |teSprite">Filer_| 00000450 43 72 65 61 74 65 53 70 72 69 74 65 3c 2f 61 3e |CreateSprite</a>| 00000460 3c 2f 68 32 3e 0a 3c 70 72 65 3e 4f 6e 20 65 6e |</h2>.<pre>On en| 00000470 74 72 79 3a 0a 52 30 09 53 70 72 69 74 65 20 6e |try:.R0.Sprite n| 00000480 61 6d 65 0a 52 31 09 53 70 72 69 74 65 20 6d 6f |ame.R1.Sprite mo| 00000490 64 65 20 28 6e 6f 72 6d 61 6c 20 6d 6f 64 65 20 |de (normal mode | 000004a0 64 65 73 63 69 70 74 69 6f 6e 20 62 6c 6f 63 6b |desciption block| 000004b0 29 0a 4f 6e 20 65 78 69 74 3a 0a 52 31 09 53 70 |).On exit:.R1.Sp| 000004c0 72 69 74 65 20 61 72 65 61 0a 52 32 09 53 70 72 |rite area.R2.Spr| 000004d0 69 74 65 0a 3c 2f 70 72 65 3e 0a 0a 54 68 69 73 |ite.</pre>..This| 000004e0 20 77 69 6c 6c 20 63 72 65 61 74 65 20 61 20 73 | will create a s| 000004f0 70 72 69 74 65 20 69 6e 20 74 68 65 20 46 69 6c |prite in the Fil| 00000500 65 72 27 73 20 73 70 72 69 74 65 20 70 6f 6f 6c |er's sprite pool| 00000510 2e 0a 0a 0a 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d |....<h2><a name=| 00000520 22 53 65 74 53 70 72 69 74 65 22 3e 46 69 6c 65 |"SetSprite">File| 00000530 72 5f 53 65 74 53 70 72 69 74 65 3c 2f 61 3e 3c |r_SetSprite</a><| 00000540 2f 68 32 3e 0a 3c 70 72 65 3e 4f 6e 20 65 6e 74 |/h2>.<pre>On ent| 00000550 72 79 3a 0a 52 30 09 53 2b 53 70 72 69 74 65 6e |ry:.R0.S+Spriten| 00000560 61 6d 65 20 6f 72 20 65 72 72 6f 72 20 62 6c 6f |ame or error blo| 00000570 63 6b 0a 52 31 09 46 75 6c 6c 20 70 61 74 68 6e |ck.R1.Full pathn| 00000580 61 6d 65 0a 4f 6e 20 65 78 69 74 3a 0a 41 6c 6c |ame.On exit:.All| 00000590 20 72 65 67 73 20 70 72 65 73 65 72 76 65 64 0a | regs preserved.| 000005a0 3c 2f 70 72 65 3e 0a 0a 54 68 69 73 20 77 69 6c |</pre>..This wil| 000005b0 6c 20 75 73 65 20 74 68 65 20 67 69 76 65 6e 20 |l use the given | 000005c0 73 70 72 69 74 65 20 66 6f 72 20 74 68 65 20 6f |sprite for the o| 000005d0 62 6a 65 63 74 20 67 69 76 65 6e 20 69 6e 20 52 |bject given in R| 000005e0 31 2e 20 49 66 20 74 68 65 0a 64 69 72 65 63 74 |1. If the.direct| 000005f0 6f 72 79 20 69 73 20 73 74 69 6c 6c 20 6f 70 65 |ory is still ope| 00000600 6e 2c 20 74 68 65 20 73 70 72 69 74 65 20 77 69 |n, the sprite wi| 00000610 6c 6c 20 72 65 70 6c 61 63 65 20 74 68 65 20 6f |ll replace the o| 00000620 6e 65 20 63 75 72 72 65 6e 74 6c 79 20 75 73 65 |ne currently use| 00000630 64 2c 20 77 68 69 63 68 0a 77 69 6c 6c 20 75 73 |d, which.will us| 00000640 75 61 6c 6c 79 20 62 65 20 27 66 69 6c 65 5f 77 |ually be 'file_w| 00000650 61 69 74 27 2e 20 49 66 20 74 68 65 20 6f 62 6a |ait'. If the obj| 00000660 65 63 74 20 69 73 20 6e 6f 74 20 76 69 73 69 62 |ect is not visib| 00000670 6c 65 2c 20 6e 6f 74 68 69 6e 67 20 77 69 6c 6c |le, nothing will| 00000680 20 68 61 70 70 65 6e 2e 0a 59 6f 75 20 63 61 6e | happen..You can| 00000690 20 61 6c 73 6f 20 72 65 70 6f 72 74 20 61 6e 20 | also report an | 000006a0 65 72 72 6f 72 20 77 69 74 68 20 74 68 69 73 20 |error with this | 000006b0 53 57 49 2e 20 54 68 65 20 73 70 72 69 74 65 20 |SWI. The sprite | 000006c0 77 69 6c 6c 20 63 68 61 6e 67 65 20 74 6f 0a 27 |will change to.'| 000006d0 66 69 6c 65 5f 65 72 72 27 2c 20 61 6e 64 20 74 |file_err', and t| 000006e0 68 65 20 74 65 78 74 20 77 69 6c 6c 20 62 65 20 |he text will be | 000006f0 73 68 6f 77 6e 20 69 6e 20 74 68 65 20 69 6e 66 |shown in the inf| 00000700 6f 62 6f 78 2e 20 54 68 65 20 65 72 72 6f 72 20 |obox. The error | 00000710 6e 75 6d 62 65 72 20 73 68 6f 75 6c 64 0a 68 61 |number should.ha| 00000720 76 65 20 62 69 74 73 20 32 34 2d 33 30 20 63 6c |ve bits 24-30 cl| 00000730 65 61 72 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 |ear in order to | 00000740 62 65 20 72 65 63 6f 67 6e 69 73 65 64 20 61 73 |be recognised as| 00000750 20 73 75 63 68 2e 0a 0a 0a 3c 68 32 3e 3c 61 20 | such....<h2><a | 00000760 6e 61 6d 65 3d 22 43 6f 70 79 53 70 72 69 74 65 |name="CopySprite| 00000770 22 3e 46 69 6c 65 72 5f 43 6f 70 79 53 70 72 69 |">Filer_CopySpri| 00000780 74 65 20 3c 69 3e 28 4e 6f 74 20 69 6d 70 6c 65 |te <i>(Not imple| 00000790 6d 65 6e 74 65 64 20 79 65 74 29 3c 2f 69 3e 3c |mented yet)</i><| 000007a0 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 72 65 3e 4f 6e |/a></h2>.<pre>On| 000007b0 20 65 6e 74 72 79 3a 0a 52 30 09 53 70 72 69 74 | entry:.R0.Sprit| 000007c0 65 0a 4f 6e 20 65 78 69 74 3a 0a 41 6c 6c 20 72 |e.On exit:.All r| 000007d0 65 67 73 20 70 72 65 73 65 72 76 65 64 0a 3c 2f |egs preserved.</| 000007e0 70 72 65 3e 0a 0a 54 68 69 73 20 77 69 6c 6c 20 |pre>..This will | 000007f0 74 61 6b 65 20 61 20 63 6f 70 79 20 6f 66 20 74 |take a copy of t| 00000800 68 65 20 73 70 72 69 74 65 20 61 6e 64 20 70 75 |he sprite and pu| 00000810 74 20 69 74 20 69 6e 20 74 68 65 20 46 69 6c 65 |t it in the File| 00000820 72 27 73 20 73 70 72 69 74 65 20 70 6f 6f 6c 2e |r's sprite pool.| 00000830 20 59 6f 75 20 73 68 6f 75 6c 64 20 63 61 6c 6c | You should call| 00000840 20 74 68 69 73 20 61 66 74 65 72 20 63 6f 6d 70 | this after comp| 00000850 6c 65 74 69 6e 67 20 79 6f 75 72 20 62 61 63 6b |leting your back| 00000860 67 72 6f 75 6e 64 20 70 72 6f 63 65 73 73 20 6f |ground process o| 00000870 66 20 64 72 61 77 69 6e 67 20 74 68 65 20 73 70 |f drawing the sp| 00000880 72 69 74 65 2e 20 41 66 74 65 72 20 63 61 6c 6c |rite. After call| 00000890 69 6e 67 20 74 68 69 73 20 53 57 49 20 79 6f 75 |ing this SWI you| 000008a0 20 63 61 6e 20 64 69 73 70 6f 73 65 20 6f 66 20 | can dispose of | 000008b0 74 68 65 20 73 70 72 69 74 65 20 61 6e 64 20 63 |the sprite and c| 000008c0 61 6c 6c 20 3c 61 20 68 72 65 66 3d 22 23 53 65 |all <a href="#Se| 000008d0 74 53 70 72 69 74 65 22 3e 46 69 6c 65 72 5f 53 |tSprite">Filer_S| 000008e0 65 74 53 70 72 69 74 65 3c 2f 61 3e 2e 0a 0a 0a |etSprite</a>....| 000008f0 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 52 65 61 |<h2><a name="Rea| 00000900 64 43 68 6f 69 63 65 73 22 3e 46 69 6c 65 72 5f |dChoices">Filer_| 00000910 52 65 61 64 43 68 6f 69 63 65 73 3c 2f 61 3e 3c |ReadChoices</a><| 00000920 2f 68 32 3e 0a 3c 69 3e 43 75 72 72 65 6e 74 6c |/h2>.<i>Currentl| 00000930 79 20 6f 6e 6c 79 20 66 6f 72 20 69 6e 74 65 72 |y only for inter| 00000940 6e 61 6c 20 75 73 65 2e 3c 2f 69 3e 0a 3c 68 32 |nal use.</i>.<h2| 00000950 3e 3c 61 20 6e 61 6d 65 3d 22 4e 65 77 43 68 6f |><a name="NewCho| 00000960 69 63 65 73 22 3e 46 69 6c 65 72 5f 4e 65 77 43 |ices">Filer_NewC| 00000970 68 6f 69 63 65 73 3c 2f 61 3e 3c 2f 68 32 3e 0a |hoices</a></h2>.| 00000980 3c 69 3e 43 75 72 72 65 6e 74 6c 79 20 6f 6e 6c |<i>Currently onl| 00000990 79 20 66 6f 72 20 69 6e 74 65 72 6e 61 6c 20 75 |y for internal u| 000009a0 73 65 2e 3c 2f 69 3e 0a 0a 0a 3c 68 32 3e 3c 61 |se.</i>...<h2><a| 000009b0 20 6e 61 6d 65 3d 22 4b 65 79 4e 61 6d 65 22 3e | name="KeyName">| 000009c0 46 69 6c 65 72 5f 4b 65 79 4e 61 6d 65 3c 2f 61 |Filer_KeyName</a| 000009d0 3e 3c 2f 68 32 3e 0a 3c 70 72 65 3e 4f 6e 20 65 |></h2>.<pre>On e| 000009e0 6e 74 72 79 3a 0a 52 30 09 4b 65 79 20 63 6f 64 |ntry:.R0.Key cod| 000009f0 65 0a 4f 6e 20 65 78 69 74 3a 0a 52 30 09 4b 65 |e.On exit:.R0.Ke| 00000a00 79 20 6e 61 6d 65 0a 3c 2f 70 72 65 3e 0a 0a 54 |y name.</pre>..T| 00000a10 68 69 73 20 53 57 49 20 73 68 6f 75 6c 64 20 72 |his SWI should r| 00000a20 65 61 6c 6c 79 20 68 61 76 65 20 62 65 65 6e 20 |eally have been | 00000a30 70 72 6f 76 69 64 65 64 20 62 79 20 74 68 65 20 |provided by the | 00000a40 54 6f 6f 6c 62 6f 78 2c 20 62 75 74 20 73 69 6e |Toolbox, but sin| 00000a50 63 65 20 69 74 20 69 73 6e 27 74 2c 20 49 27 76 |ce it isn't, I'v| 00000a60 65 20 70 75 74 20 69 74 20 69 6e 20 50 72 6f 46 |e put it in ProF| 00000a70 69 6c 65 72 2e 20 54 68 65 20 72 65 61 73 6f 6e |iler. The reason| 00000a80 20 66 6f 72 20 74 68 69 73 20 53 57 49 20 69 73 | for this SWI is| 00000a90 20 74 6f 20 67 65 74 20 61 20 63 6f 6e 73 69 73 | to get a consis| 00000aa0 74 65 6e 74 20 6e 61 6d 69 6e 67 20 6f 66 20 6b |tent naming of k| 00000ab0 65 79 73 2e 20 49 74 20 72 65 74 75 72 6e 73 20 |eys. It returns | 00000ac0 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 |the name of the | 00000ad0 67 69 76 65 6e 20 6b 65 79 20 63 6f 64 65 2e 0a |given key code..| 00000ae0 0a 0a 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 56 |..<h2><a name="V| 00000af0 69 65 77 65 72 44 65 73 63 22 3e 46 69 6c 65 72 |iewerDesc">Filer| 00000b00 5f 56 69 65 77 65 72 44 65 73 63 3c 2f 61 3e 3c |_ViewerDesc</a><| 00000b10 2f 68 32 3e 0a 3c 70 72 65 3e 4f 6e 20 65 6e 74 |/h2>.<pre>On ent| 00000b20 72 79 3a 0a 52 30 09 43 61 6e 6f 6e 69 63 61 6c |ry:.R0.Canonical| 00000b30 20 64 69 72 65 63 74 6f 72 79 20 6e 61 6d 65 0a | directory name.| 00000b40 4f 6e 20 65 78 69 74 3a 0a 52 32 09 56 69 65 77 |On exit:.R2.View| 00000b50 65 72 20 28 6f 72 20 30 20 69 66 20 6e 6f 74 20 |er (or 0 if not | 00000b60 6f 70 65 6e 29 0a 3c 2f 70 72 65 3e 0a 0a 43 6f |open).</pre>..Co| 00000b70 6e 76 65 72 74 73 20 61 20 6e 61 6d 65 20 74 6f |nverts a name to| 00000b80 20 61 20 76 69 65 77 65 72 20 64 65 73 63 72 69 | a viewer descri| 00000b90 70 74 69 6f 6e 2e 20 59 6f 75 20 6e 65 65 64 20 |ption. You need | 00000ba0 74 6f 20 6b 6e 6f 77 20 74 68 65 20 66 6f 72 6d |to know the form| 00000bb0 61 74 20 6f 66 20 74 68 65 0a 64 65 73 63 72 69 |at of the.descri| 00000bc0 70 74 6f 72 20 62 6c 6f 63 6b 20 74 6f 20 6d 61 |ptor block to ma| 00000bd0 6b 65 20 75 73 65 20 6f 66 20 69 74 2c 20 61 6e |ke use of it, an| 00000be0 64 20 61 73 20 74 68 61 74 20 66 6f 72 6d 61 74 |d as that format| 00000bf0 20 63 61 6e 20 73 74 69 6c 6c 20 63 68 61 6e 67 | can still chang| 00000c00 65 2c 20 69 74 0a 68 61 73 20 6e 6f 74 20 62 65 |e, it.has not be| 00000c10 65 6e 20 64 6f 63 75 6d 65 6e 74 65 64 20 68 65 |en documented he| 00000c20 72 65 2e 20 41 74 20 74 68 65 20 6d 6f 6d 65 6e |re. At the momen| 00000c30 74 20 69 73 20 63 61 6e 20 62 65 20 75 73 65 64 |t is can be used| 00000c40 20 74 6f 20 64 65 74 65 72 6d 69 6e 65 20 69 66 | to determine if| 00000c50 20 74 68 65 0a 76 69 65 77 65 72 20 69 73 20 6f | the.viewer is o| 00000c60 70 65 6e 2e 0a 0a 0a 3c 68 32 3e 3c 61 20 6e 61 |pen....<h2><a na| 00000c70 6d 65 3d 22 42 6f 6f 74 22 3e 46 69 6c 65 72 5f |me="Boot">Filer_| 00000c80 42 6f 6f 74 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 |Boot</a></h2>.<p| 00000c90 72 65 3e 4f 6e 20 65 6e 74 72 79 3a 0a 52 30 09 |re>On entry:.R0.| 00000ca0 43 61 6e 6f 6e 69 63 61 6c 20 64 69 72 65 63 74 |Canonical direct| 00000cb0 6f 72 79 20 6e 61 6d 65 0a 3c 2f 70 72 65 3e 0a |ory name.</pre>.| 00000cc0 0a 44 6f 65 73 20 65 78 61 63 74 6c 79 20 74 68 |.Does exactly th| 00000cd0 65 20 73 61 6d 65 20 61 73 20 74 68 65 20 2a 46 |e same as the *F| 00000ce0 69 6c 65 72 5f 42 6f 6f 74 20 63 6f 6d 6d 61 6e |iler_Boot comman| 00000cf0 64 2e 0a 0a 0a 3c 68 32 3e 3c 61 20 6e 61 6d 65 |d....<h2><a name| 00000d00 3d 22 53 65 6c 65 63 74 22 3e 46 69 6c 65 72 5f |="Select">Filer_| 00000d10 53 65 6c 65 63 74 3c 2f 61 3e 3c 2f 68 32 3e 0a |Select</a></h2>.| 00000d20 3c 70 72 65 3e 4f 6e 20 65 6e 74 72 79 3a 0a 52 |<pre>On entry:.R| 00000d30 30 09 52 65 61 73 6f 6e 20 63 6f 64 65 3a 0a 09 |0.Reason code:..| 00000d40 30 09 53 65 6c 65 63 74 20 66 69 6c 65 20 28 6f |0.Select file (o| 00000d50 6e 6c 79 29 0a 09 09 52 31 2d 3e 66 69 6c 65 6e |nly)...R1->filen| 00000d60 61 6d 65 20 74 6f 20 73 65 6c 65 63 74 0a 09 31 |ame to select..1| 00000d70 09 41 64 64 20 66 69 6c 65 20 74 6f 20 73 65 6c |.Add file to sel| 00000d80 65 63 74 69 6f 6e 0a 09 09 52 31 2d 3e 66 69 6c |ection...R1->fil| 00000d90 65 6e 61 6d 65 20 74 6f 20 61 64 64 0a 09 31 36 |ename to add..16| 00000da0 09 52 65 61 64 20 63 75 72 72 65 6e 74 20 76 69 |.Read current vi| 00000db0 65 77 65 72 0a 09 09 4f 6e 20 65 78 69 74 3a 0a |ewer...On exit:.| 00000dc0 09 09 52 31 2d 3e 56 69 65 77 65 72 20 6e 61 6d |..R1->Viewer nam| 00000dd0 65 2c 20 6f 72 20 30 20 69 66 20 6e 6f 20 63 75 |e, or 0 if no cu| 00000de0 72 72 65 6e 74 20 76 69 65 77 65 72 0a 09 31 37 |rrent viewer..17| 00000df0 09 52 65 61 64 20 6f 6e 65 20 73 65 6c 65 63 74 |.Read one select| 00000e00 65 64 20 66 69 6c 65 0a 09 09 52 31 2d 3e 56 69 |ed file...R1->Vi| 00000e10 65 77 65 72 20 6e 61 6d 65 2c 20 6f 66 20 30 20 |ewer name, of 0 | 00000e20 66 6f 72 20 63 75 72 72 65 6e 74 20 76 69 65 77 |for current view| 00000e30 65 72 0a 09 09 4f 6e 20 65 78 69 74 3a 0a 09 09 |er...On exit:...| 00000e40 52 31 2d 3e 4f 62 6a 65 63 74 20 6e 61 6d 65 2c |R1->Object name,| 00000e50 20 6f 72 20 30 20 69 66 20 6e 6f 6e 65 20 73 65 | or 0 if none se| 00000e60 6c 65 63 74 65 64 0a 09 31 38 09 52 65 61 64 20 |lected..18.Read | 00000e70 6d 75 6c 74 69 70 6c 65 20 73 65 6c 65 63 74 65 |multiple selecte| 00000e80 64 20 66 69 6c 65 73 0a 09 09 52 31 2d 3e 56 69 |d files...R1->Vi| 00000e90 65 77 65 72 20 6e 61 6d 65 2c 20 6f 72 20 30 20 |ewer name, or 0 | 00000ea0 66 6f 72 20 63 75 72 72 65 6e 74 20 76 69 65 77 |for current view| 00000eb0 65 72 0a 09 09 52 33 3d 30 20 66 6f 72 20 66 69 |er...R3=0 for fi| 00000ec0 72 73 74 20 66 69 6c 65 2c 20 6f 72 20 70 72 65 |rst file, or pre| 00000ed0 73 65 72 76 65 64 20 66 72 6f 6d 20 6c 61 73 74 |served from last| 00000ee0 20 63 61 6c 6c 0a 09 09 4f 6e 20 65 78 69 74 3a | call...On exit:| 00000ef0 0a 09 09 52 31 2d 3e 4f 62 6a 65 63 74 20 6e 61 |...R1->Object na| 00000f00 6d 65 2c 20 6f 72 20 30 20 69 66 20 52 33 3d 30 |me, or 0 if R3=0| 00000f10 0a 09 09 52 33 3d 20 43 6f 6e 74 65 78 74 20 70 |...R3= Context p| 00000f20 6f 69 6e 74 65 72 20 66 6f 72 20 67 65 74 74 69 |ointer for getti| 00000f30 6e 67 20 6e 65 78 74 20 6f 62 6a 65 63 74 2c 20 |ng next object, | 00000f40 30 20 69 66 20 66 69 6e 69 73 68 65 64 0a 3c 2f |0 if finished.</| 00000f50 70 72 65 3e 0a 0a 54 68 69 73 20 63 61 6c 6c 20 |pre>..This call | 00000f60 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 72 |can be used to r| 00000f70 65 61 64 20 6f 72 20 63 6f 6e 74 72 6f 6c 20 74 |ead or control t| 00000f80 68 65 20 73 65 6c 65 63 74 69 6f 6e 2e 20 49 74 |he selection. It| 00000f90 20 69 73 20 75 73 65 64 20 62 79 20 74 68 65 0a | is used by the.| 00000fa0 76 61 72 69 61 62 6c 65 20 46 69 6c 65 72 24 53 |variable Filer$S| 00000fb0 65 6c 65 63 74 65 64 20 61 6d 6f 6e 67 20 6f 74 |elected among ot| 00000fc0 68 65 72 20 74 68 69 6e 67 73 2e 0a 54 68 65 20 |her things..The | 00000fd0 27 63 75 72 72 65 6e 74 20 76 69 65 77 65 72 27 |'current viewer'| 00000fe0 20 69 6e 20 74 68 69 73 20 63 6f 6e 74 65 78 74 | in this context| 00000ff0 20 6d 65 61 6e 73 20 74 68 65 20 6f 6e 65 20 74 | means the one t| 00001000 68 61 74 20 68 61 73 20 74 68 65 20 69 6e 70 75 |hat has the inpu| 00001010 74 20 66 6f 63 75 73 2e 0a 0a 0a 3c 68 32 3e 3c |t focus....<h2><| 00001020 61 20 6e 61 6d 65 3d 22 53 70 72 69 74 65 22 3e |a name="Sprite">| 00001030 46 69 6c 65 72 5f 53 70 72 69 74 65 3c 2f 61 3e |Filer_Sprite</a>| 00001040 3c 2f 68 32 3e 0a 3c 70 72 65 3e 4f 6e 20 65 6e |</h2>.<pre>On en| 00001050 74 72 79 3a 0a 52 30 09 44 65 73 69 72 65 64 20 |try:.R0.Desired | 00001060 73 70 72 69 74 65 20 68 65 69 67 68 74 20 28 30 |sprite height (0| 00001070 3d 36 38 20 6f 73 75 2c 20 31 3d 33 36 20 6f 73 |=68 osu, 1=36 os| 00001080 75 29 0a 52 31 09 4f 62 6a 65 63 74 20 6e 61 6d |u).R1.Object nam| 00001090 65 0a 52 32 09 54 61 73 6b 20 68 61 6e 64 6c 65 |e.R2.Task handle| 000010a0 20 74 6f 20 73 65 6e 64 20 72 65 70 6c 79 20 74 | to send reply t| 000010b0 6f 20 28 6f 72 20 30 20 66 6f 72 20 61 20 62 72 |o (or 0 for a br| 000010c0 6f 61 64 63 61 73 74 29 0a 4f 6e 20 65 78 69 74 |oadcast).On exit| 000010d0 3a 0a 52 30 09 4f 70 74 69 6f 6e 61 6c 20 73 70 |:.R0.Optional sp| 000010e0 72 69 74 65 20 74 6f 20 75 73 65 20 77 68 69 6c |rite to use whil| 000010f0 65 20 77 61 69 74 69 6e 67 20 66 6f 72 20 74 68 |e waiting for th| 00001100 65 20 6d 65 73 73 61 67 65 0a 3c 2f 70 72 65 3e |e message.</pre>| 00001110 0a 0a 54 68 69 73 20 63 61 6c 6c 20 69 73 20 74 |..This call is t| 00001120 68 65 20 6d 61 69 6e 20 69 6e 74 65 72 66 61 63 |he main interfac| 00001130 65 20 74 6f 20 62 69 6e 64 69 6e 67 20 73 70 72 |e to binding spr| 00001140 69 74 65 73 20 74 6f 20 64 69 73 63 20 6f 62 6a |ites to disc obj| 00001150 65 63 74 73 2e 20 55 6e 6c 69 6b 65 0a 65 61 72 |ects. Unlike.ear| 00001160 6c 69 65 72 20 64 61 79 73 20 77 68 65 72 65 20 |lier days where | 00001170 65 76 65 72 79 20 61 70 70 6c 69 63 61 74 69 6f |every applicatio| 00001180 6e 20 68 61 64 20 69 74 73 20 6f 77 6e 20 76 69 |n had its own vi| 00001190 65 77 20 6f 66 20 74 68 65 73 65 20 74 68 69 6e |ew of these thin| 000011a0 67 73 2c 20 74 68 65 0a 66 69 6c 65 72 20 70 72 |gs, the.filer pr| 000011b0 6f 76 69 64 65 73 20 74 68 69 73 20 53 57 49 20 |ovides this SWI | 000011c0 74 6f 20 6b 65 65 70 20 69 74 20 69 6e 20 6f 6e |to keep it in on| 000011d0 65 20 70 6c 61 63 65 2e 20 54 68 65 20 66 69 6c |e place. The fil| 000011e0 65 72 20 63 61 6e 20 62 65 20 65 78 74 65 6e 64 |er can be extend| 000011f0 65 64 0a 77 69 74 68 20 70 72 6f 67 72 61 6d 73 |ed.with programs| 00001200 20 6c 69 6b 65 20 74 68 65 20 53 70 72 69 74 65 | like the Sprite| 00001210 20 43 6c 69 65 6e 74 73 2c 20 61 6e 64 20 74 68 | Clients, and th| 00001220 65 73 65 20 65 78 74 65 6e 74 69 6f 6e 73 20 77 |ese extentions w| 00001230 69 6c 6c 20 61 6c 73 6f 20 62 65 0a 63 6f 6e 73 |ill also be.cons| 00001240 69 64 65 72 65 64 20 77 68 65 6e 20 74 68 69 73 |idered when this| 00001250 20 53 57 49 20 69 73 20 63 61 6c 6c 65 64 2e 0a | SWI is called..| 00001260 3c 70 3e 0a 41 66 74 65 72 20 63 61 6c 6c 69 6e |<p>.After callin| 00001270 67 20 74 68 69 73 20 53 57 49 2c 20 61 20 6d 65 |g this SWI, a me| 00001280 73 73 61 67 65 20 28 73 65 65 20 3c 61 20 68 72 |ssage (see <a hr| 00001290 65 66 3d 22 2e 2f 4d 65 73 73 61 67 65 73 23 34 |ef="./Messages#4| 000012a0 31 30 22 3e 4d 65 73 73 61 67 65 5f 46 69 6c 65 |10">Message_File| 000012b0 72 53 70 72 69 74 65 49 73 3c 2f 61 3e 29 20 77 |rSpriteIs</a>) w| 000012c0 69 6c 6c 20 62 65 20 73 65 6e 74 20 77 68 65 6e |ill be sent when| 000012d0 20 74 68 65 20 73 70 72 69 74 65 20 68 61 73 20 | the sprite has | 000012e0 62 65 65 6e 20 66 6f 75 6e 64 2e 0a 46 69 6e 64 |been found..Find| 000012f0 69 6e 67 20 74 68 65 20 73 70 72 69 74 65 20 6d |ing the sprite m| 00001300 61 79 20 6d 65 61 6e 20 74 68 61 74 20 61 70 70 |ay mean that app| 00001310 73 20 61 72 65 20 62 6f 6f 74 65 64 20 61 6e 64 |s are booted and| 00001320 20 6d 61 6e 79 20 6f 74 68 65 72 20 74 68 69 6e | many other thin| 00001330 67 73 2c 20 73 6f 0a 74 68 65 72 65 20 69 73 20 |gs, so.there is | 00001340 6e 6f 20 6d 61 78 69 6d 75 6d 20 72 65 70 6c 79 |no maximum reply| 00001350 20 64 65 6c 61 79 2e 20 49 6e 64 65 65 64 2c 20 | delay. Indeed, | 00001360 69 66 20 74 68 65 20 6f 62 6a 65 63 74 20 64 6f |if the object do| 00001370 65 73 6e 27 74 20 65 78 69 73 74 2c 20 74 68 65 |esn't exist, the| 00001380 72 65 0a 77 69 6c 6c 20 62 65 20 6e 6f 20 72 65 |re.will be no re| 00001390 70 6c 79 20 61 74 20 61 6c 6c 2e 20 54 68 69 73 |ply at all. This| 000013a0 20 69 73 73 75 65 20 6d 61 79 20 62 65 20 61 64 | issue may be ad| 000013b0 64 72 65 73 73 65 64 20 69 6e 20 6c 61 74 65 72 |dressed in later| 000013c0 20 76 65 72 73 69 6f 6e 73 2e 0a 0a 0a 3c 68 32 | versions....<h2| 000013d0 3e 3c 61 20 6e 61 6d 65 3d 22 53 63 61 6c 65 22 |><a name="Scale"| 000013e0 3e 46 69 6c 65 72 5f 53 63 61 6c 65 3c 2f 61 3e |>Filer_Scale</a>| 000013f0 3c 2f 68 32 3e 0a 3c 70 72 65 3e 4f 6e 20 65 6e |</h2>.<pre>On en| 00001400 74 72 79 3a 0a 52 33 09 4f 72 69 67 69 6e 61 6c |try:.R3.Original| 00001410 20 77 69 64 74 68 0a 52 34 09 4f 72 69 67 69 6e | width.R4.Origin| 00001420 61 6c 20 68 65 69 67 68 74 0a 52 35 09 4d 61 78 |al height.R5.Max| 00001430 69 6d 75 6d 20 68 65 69 67 68 74 0a 52 36 09 4d |imum height.R6.M| 00001440 61 78 69 6d 75 6d 20 77 69 64 74 68 0a 4f 6e 20 |aximum width.On | 00001450 65 78 69 74 3a 0a 52 30 09 53 63 61 6c 65 20 66 |exit:.R0.Scale f| 00001460 61 63 74 6f 72 20 28 31 36 2e 31 36 29 0a 52 33 |actor (16.16).R3| 00001470 09 53 63 61 6c 65 64 20 77 69 64 74 68 0a 52 34 |.Scaled width.R4| 00001480 09 53 63 61 6c 65 64 20 68 65 69 67 68 74 0a 46 |.Scaled height.F| 00001490 30 2d 46 35 09 43 6f 72 72 75 70 74 65 64 0a 3c |0-F5.Corrupted.<| 000014a0 2f 70 72 65 3e 0a 0a 54 68 69 73 20 63 61 6c 6c |/pre>..This call| 000014b0 20 63 61 6e 20 73 61 76 65 20 73 6f 6d 65 20 63 | can save some c| 000014c0 6f 64 65 20 69 6e 20 53 70 72 69 74 65 20 43 6c |ode in Sprite Cl| 000014d0 69 65 6e 74 73 2e 20 57 68 65 6e 20 64 65 61 6c |ients. When deal| 000014e0 69 6e 67 20 77 69 74 68 20 74 68 65 0a 3c 61 20 |ing with the.<a | 000014f0 68 72 65 66 3d 22 2e 2f 53 65 72 76 69 63 65 23 |href="./Service#| 00001500 33 30 38 22 3e 46 69 6c 65 72 5f 4d 61 6b 65 53 |308">Filer_MakeS| 00001510 70 72 69 74 65 3c 2f 61 3e 20 73 65 72 76 69 63 |prite</a> servic| 00001520 65 20 63 61 6c 6c 2c 20 79 6f 75 20 6e 65 65 64 |e call, you need| 00001530 20 74 6f 20 73 63 61 6c 65 0a 74 68 65 20 69 6e | to scale.the in| 00001540 70 75 74 20 73 6f 20 69 74 20 64 6f 65 73 6e 27 |put so it doesn'| 00001550 74 20 65 78 63 65 65 64 20 74 68 65 20 6d 61 78 |t exceed the max| 00001560 69 6d 75 6d 20 77 69 64 74 68 20 6f 72 20 68 65 |imum width or he| 00001570 69 67 68 74 2e 20 54 68 69 73 20 63 61 6c 6c 20 |ight. This call | 00001580 77 69 6c 6c 20 63 61 6c 63 75 6c 61 74 65 20 74 |will calculate t| 00001590 68 65 20 73 63 61 6c 65 20 66 61 63 74 6f 72 2c |he scale factor,| 000015a0 20 70 72 65 73 65 72 76 69 6e 67 20 74 68 65 20 | preserving the | 000015b0 61 73 70 65 63 74 20 72 61 74 69 6f 2e 0a 3c 70 |aspect ratio..<p| 000015c0 3e 4e 6f 72 6d 61 6c 6c 79 20 79 6f 75 20 77 69 |>Normally you wi| 000015d0 6c 6c 20 63 61 6c 6c 20 74 68 69 73 20 53 57 49 |ll call this SWI| 000015e0 20 77 69 74 68 3a 0a 3c 62 72 3e 52 33 2c 52 34 | with:.<br>R3,R4| 000015f0 3d 53 69 7a 65 20 6f 66 20 79 6f 75 72 20 70 69 |=Size of your pi| 00001600 63 74 75 72 65 2c 20 77 68 61 74 65 76 65 72 20 |cture, whatever | 00001610 69 74 20 69 73 2c 20 69 6e 20 6f 73 2d 75 6e 69 |it is, in os-uni| 00001620 74 73 2e 0a 3c 62 72 3e 52 35 3d 36 38 20 6f 73 |ts..<br>R5=68 os| 00001630 2d 75 6e 69 74 73 2c 20 77 68 69 63 68 20 69 73 |-units, which is| 00001640 20 74 68 65 20 6e 6f 72 6d 61 6c 20 68 65 69 67 | the normal heig| 00001650 68 74 20 6f 66 20 73 70 72 69 74 65 73 2e 0a 3c |ht of sprites..<| 00001660 62 72 3e 52 36 3d 52 36 20 6f 6e 20 65 6e 74 72 |br>R6=R6 on entr| 00001670 79 20 74 6f 20 74 68 65 20 73 65 72 76 69 63 65 |y to the service| 00001680 20 63 6f 64 65 2e 0a 3c 70 3e 4e 6f 74 65 20 74 | code..<p>Note t| 00001690 68 61 74 20 74 68 65 72 65 20 61 72 65 20 6e 6f |hat there are no| 000016a0 20 75 6e 69 74 73 20 6f 6e 20 74 68 65 20 65 6e | units on the en| 000016b0 74 72 79 2f 65 78 69 74 20 76 61 6c 75 65 73 2e |try/exit values.| 000016c0 20 54 68 65 20 75 6e 69 74 20 70 61 73 73 65 64 | The unit passed| 000016d0 20 69 6e 20 77 69 6c 6c 20 61 6c 73 6f 20 62 65 | in will also be| 000016e0 20 72 65 74 75 72 6e 65 64 2e 0a 0a 0a 3c 68 32 | returned....<h2| 000016f0 3e 3c 61 20 6e 61 6d 65 3d 22 4c 6f 61 64 43 68 |><a name="LoadCh| 00001700 6f 69 63 65 73 22 3e 46 69 6c 65 72 5f 4c 6f 61 |oices">Filer_Loa| 00001710 64 43 68 6f 69 63 65 73 3c 2f 61 3e 3c 2f 68 32 |dChoices</a></h2| 00001720 3e 0a 3c 70 72 65 3e 4f 6e 20 65 6e 74 72 79 3a |>.<pre>On entry:| 00001730 0a 52 30 09 50 6f 69 6e 74 65 72 20 74 6f 20 63 |.R0.Pointer to c| 00001740 6c 69 65 6e 74 20 74 69 74 6c 65 20 28 6d 6f 64 |lient title (mod| 00001750 75 6c 65 20 74 69 74 6c 65 20 6f 72 20 64 69 72 |ule title or dir| 00001760 65 63 74 6f 72 79 20 6e 61 6d 65 29 0a 52 31 09 |ectory name).R1.| 00001770 50 6f 69 6e 74 65 72 20 74 6f 20 53 43 4d 20 63 |Pointer to SCM c| 00001780 68 6f 69 63 65 73 20 6c 69 73 74 0a 4f 6e 20 65 |hoices list.On e| 00001790 78 69 74 3a 0a 09 54 68 65 20 63 68 6f 69 63 65 |xit:..The choice| 000017a0 73 20 62 6c 6f 63 6b 20 69 73 20 75 70 64 61 74 |s block is updat| 000017b0 65 64 0a 3c 2f 70 72 65 3e 0a 0a 54 68 69 73 20 |ed.</pre>..This | 000017c0 63 61 6c 6c 20 69 73 20 66 6f 72 20 45 78 74 65 |call is for Exte| 000017d0 72 6e 61 6c 20 55 74 69 6c 69 74 69 65 73 20 61 |rnal Utilities a| 000017e0 6e 64 20 53 70 72 69 74 65 20 43 6c 69 65 6e 74 |nd Sprite Client| 000017f0 73 2c 20 74 68 61 74 20 75 73 65 20 74 68 65 20 |s, that use the | 00001800 53 43 5f 4d 61 6e 61 67 65 72 20 74 6f 20 6d 61 |SC_Manager to ma| 00001810 69 6e 74 61 69 6e 20 74 68 65 69 72 20 63 68 6f |intain their cho| 00001820 69 63 65 73 2e 20 49 74 20 69 73 20 75 73 65 64 |ices. It is used| 00001830 20 77 68 65 6e 20 74 68 65 20 75 74 69 6c 69 74 | when the utilit| 00001840 79 20 73 74 61 72 74 73 20 75 70 2c 20 74 6f 20 |y starts up, to | 00001850 6f 76 65 72 72 69 64 65 20 74 68 65 20 64 65 66 |override the def| 00001860 61 75 6c 74 20 63 68 6f 69 63 65 73 20 77 69 74 |ault choices wit| 00001870 68 20 74 68 65 20 75 73 65 72 27 73 20 70 72 65 |h the user's pre| 00001880 66 65 72 65 6e 63 65 73 2e 0a 3c 62 72 3e 45 76 |ferences..<br>Ev| 00001890 65 6e 20 74 68 6f 75 67 68 20 69 74 20 73 65 65 |en though it see| 000018a0 6d 73 20 72 65 61 73 6f 6e 61 62 6c 65 2c 20 53 |ms reasonable, S| 000018b0 65 72 76 69 63 65 5f 46 69 6c 65 72 4e 65 77 43 |ervice_FilerNewC| 000018c0 68 6f 69 63 65 73 20 69 73 20 3c 69 3e 6e 6f 74 |hoices is <i>not| 000018d0 3c 2f 69 3e 20 63 61 6c 6c 65 64 20 61 66 74 65 |</i> called afte| 000018e0 72 20 75 70 64 61 74 69 6e 67 20 74 68 65 20 63 |r updating the c| 000018f0 68 6f 69 63 65 73 20 69 6e 20 74 68 69 73 20 53 |hoices in this S| 00001900 57 49 2e 20 54 68 65 20 53 57 49 20 69 73 20 75 |WI. The SWI is u| 00001910 73 75 61 6c 6c 79 20 63 61 6c 6c 65 64 20 66 72 |sually called fr| 00001920 6f 6d 20 74 68 65 20 6d 6f 64 75 6c 65 27 73 20 |om the module's | 00001930 69 6e 69 74 20 63 6f 64 65 2c 20 73 6f 20 69 74 |init code, so it| 00001940 20 77 6f 75 6c 64 6e 27 74 20 62 65 20 70 61 73 | wouldn't be pas| 00001950 73 65 64 20 74 6f 20 74 68 65 20 72 65 6c 65 76 |sed to the relev| 00001960 61 6e 74 20 6d 6f 64 75 6c 65 20 61 6e 79 77 61 |ant module anywa| 00001970 79 2e 0a 0a 0a 3c 68 32 3e 3c 61 20 6e 61 6d 65 |y....<h2><a name| 00001980 3d 22 54 79 70 65 54 6f 53 74 72 69 6e 67 22 3e |="TypeToString">| 00001990 46 69 6c 65 72 5f 43 6f 6e 76 65 72 74 54 79 70 |Filer_ConvertTyp| 000019a0 65 54 6f 53 74 72 69 6e 67 3c 2f 61 3e 3c 2f 68 |eToString</a></h| 000019b0 32 3e 0a 3c 70 72 65 3e 4f 6e 20 65 6e 74 72 79 |2>.<pre>On entry| 000019c0 3a 0a 52 30 09 50 6f 69 6e 74 65 72 20 74 6f 20 |:.R0.Pointer to | 000019d0 62 75 66 66 65 72 0a 52 31 09 58 54 79 70 65 0a |buffer.R1.XType.| 000019e0 4f 6e 20 65 78 69 74 3a 0a 09 54 68 65 20 62 75 |On exit:..The bu| 000019f0 66 66 65 72 20 63 6f 6e 74 61 69 6e 73 20 7a 65 |ffer contains ze| 00001a00 72 6f 2d 74 65 72 6d 69 6e 61 74 65 64 20 74 65 |ro-terminated te| 00001a10 78 74 2e 0a 3c 2f 70 72 65 3e 0a 0a 0a 3c 68 32 |xt..</pre>...<h2| 00001a20 3e 3c 61 20 6e 61 6d 65 3d 22 53 74 72 69 6e 67 |><a name="String| 00001a30 54 6f 54 79 70 65 22 3e 46 69 6c 65 72 5f 43 6f |ToType">Filer_Co| 00001a40 6e 76 65 72 74 53 74 72 69 6e 67 54 6f 54 79 70 |nvertStringToTyp| 00001a50 65 3c 2f 61 3e 3c 2f 68 32 3e 0a 3c 70 72 65 3e |e</a></h2>.<pre>| 00001a60 4f 6e 20 65 6e 74 72 79 3a 0a 52 30 09 57 68 69 |On entry:.R0.Whi| 00001a70 63 68 20 74 79 70 65 73 20 74 6f 20 61 63 63 65 |ch types to acce| 00001a80 70 74 0a 09 30 09 4e 6f 6e 65 0a 09 31 09 44 69 |pt..0.None..1.Di| 00001a90 72 65 63 74 6f 72 79 20 74 79 70 65 73 0a 09 32 |rectory types..2| 00001aa0 09 41 70 70 6c 69 63 61 74 69 6f 6e 20 74 79 70 |.Application typ| 00001ab0 65 73 0a 09 34 09 46 69 6c 65 20 61 6e 64 20 69 |es..4.File and i| 00001ac0 6d 61 67 65 20 74 79 70 65 73 0a 52 31 09 50 6f |mage types.R1.Po| 00001ad0 69 6e 74 65 72 20 74 6f 20 74 65 78 74 75 61 6c |inter to textual| 00001ae0 20 74 79 70 65 0a 4f 6e 20 65 78 69 74 3a 0a 52 | type.On exit:.R| 00001af0 30 09 4f 6c 64 20 31 32 62 69 74 20 74 79 70 65 |0.Old 12bit type| 00001b00 2c 20 6f 72 20 2d 31 20 69 66 20 75 6e 6b 6e 6f |, or -1 if unkno| 00001b10 77 6e 0a 52 31 09 43 6f 6d 70 6c 65 74 65 64 20 |wn.R1.Completed | 00001b20 74 79 70 65 20 73 74 72 69 6e 67 0a 3c 2f 70 72 |type string.</pr| 00001b30 65 3e 0a 0a 0a 3c 68 32 3e 3c 61 20 6e 61 6d 65 |e>...<h2><a name| 00001b40 3d 22 52 65 67 69 73 74 65 72 55 74 69 6c 69 74 |="RegisterUtilit| 00001b50 79 22 3e 46 69 6c 65 72 5f 52 65 67 69 73 74 65 |y">Filer_Registe| 00001b60 72 55 74 69 6c 69 74 79 3c 2f 61 3e 3c 2f 68 32 |rUtility</a></h2| 00001b70 3e 0a 3c 70 72 65 3e 4f 6e 20 65 6e 74 72 79 3a |>.<pre>On entry:| 00001b80 0a 52 30 09 50 6f 69 6e 74 65 72 20 74 6f 20 6d |.R0.Pointer to m| 00001b90 6f 64 75 6c 65 20 62 61 73 65 0a 52 31 09 4f 66 |odule base.R1.Of| 00001ba0 66 73 65 74 20 28 66 72 6f 6d 20 52 30 29 20 74 |fset (from R0) t| 00001bb0 6f 20 66 75 6e 63 74 69 6f 6e 20 6c 69 73 74 20 |o function list | 00001bc0 6f 72 20 30 20 74 6f 20 64 65 72 65 67 69 73 74 |or 0 to deregist| 00001bd0 65 72 0a 3c 2f 70 72 65 3e 0a 0a 54 68 69 73 20 |er.</pre>..This | 00001be0 63 61 6c 6c 20 69 73 20 66 6f 72 20 45 78 74 65 |call is for Exte| 00001bf0 72 6e 61 6c 20 55 74 69 6c 69 74 69 65 73 20 74 |rnal Utilities t| 00001c00 68 61 74 20 65 78 69 73 74 20 69 6e 20 61 20 6d |hat exist in a m| 00001c10 6f 64 75 6c 65 2e 20 49 74 20 73 68 6f 75 6c 64 |odule. It should| 00001c20 20 62 65 20 75 73 65 64 20 69 6e 20 74 68 65 20 | be used in the | 00001c30 6d 6f 64 75 6c 65 27 73 20 69 6e 69 74 69 61 6c |module's initial| 00001c40 69 73 61 74 69 6f 6e 20 61 6e 64 20 66 69 6e 61 |isation and fina| 00001c50 6c 69 73 61 74 69 6f 6e 20 63 6f 64 65 2c 20 74 |lisation code, t| 00001c60 6f 20 74 65 6c 6c 20 74 68 65 20 46 69 6c 65 72 |o tell the Filer| 00001c70 20 77 68 65 74 68 65 72 20 74 68 65 20 66 75 6e | whether the fun| 00001c80 63 74 69 6f 6e 73 20 61 72 65 20 61 76 61 69 6c |ctions are avail| 00001c90 61 62 6c 65 20 6f 72 20 6e 6f 74 2e 0a 3c 62 72 |able or not..<br| 00001ca0 3e 54 68 69 73 20 53 57 49 20 69 73 20 6f 6e 6c |>This SWI is onl| 00001cb0 79 20 75 73 65 64 20 62 79 20 27 72 65 61 6c 27 |y used by 'real'| 00001cc0 20 75 74 69 6c 69 74 69 65 73 20 77 69 74 68 20 | utilities with | 00001cd0 66 75 6e 63 74 69 6f 6e 73 20 69 6e 20 74 68 65 |functions in the| 00001ce0 6d 2c 20 6e 6f 74 20 53 70 72 69 74 65 20 43 6c |m, not Sprite Cl| 00001cf0 69 65 6e 74 73 2c 20 47 65 6e 65 72 69 63 20 63 |ients, Generic c| 00001d00 6f 6e 76 65 72 74 65 72 73 2c 20 6f 72 20 61 6e |onverters, or an| 00001d10 79 74 68 69 6e 67 20 74 68 61 74 20 69 73 6e 27 |ything that isn'| 00001d20 74 20 61 20 66 75 6c 6c 20 75 74 69 6c 69 74 79 |t a full utility| 00001d30 2e 0a 0a 0a 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d |....<h2><a name=| 00001d40 22 52 65 61 64 44 65 73 63 72 69 70 74 69 6f 6e |"ReadDescription| 00001d50 22 3e 46 69 6c 65 72 5f 52 65 61 64 44 65 73 63 |">Filer_ReadDesc| 00001d60 72 69 70 74 69 6f 6e 3c 2f 61 3e 3c 2f 68 32 3e |ription</a></h2>| 00001d70 0a 3c 70 72 65 3e 4f 6e 20 65 6e 74 72 79 3a 0a |.<pre>On entry:.| 00001d80 52 30 09 46 75 6e 63 74 69 6f 6e 20 68 61 6e 64 |R0.Function hand| 00001d90 6c 65 0a 52 31 09 54 79 70 65 20 6f 66 20 64 65 |le.R1.Type of de| 00001da0 73 63 72 69 70 74 69 6f 6e 20 74 6f 20 72 65 61 |scription to rea| 00001db0 64 0a 09 30 09 4b 65 79 20 73 68 6f 72 74 63 75 |d..0.Key shortcu| 00001dc0 74 20 61 63 74 69 6f 6e 0a 09 09 4f 6e 20 65 78 |t action...On ex| 00001dd0 69 74 3a 0a 09 09 52 31 09 50 6f 69 6e 74 65 72 |it:...R1.Pointer| 00001de0 20 74 6f 20 64 65 73 63 72 69 70 74 69 6f 6e 2c | to description,| 00001df0 20 6f 72 20 30 20 69 66 20 6e 6f 74 20 66 6f 75 | or 0 if not fou| 00001e00 6e 64 0a 09 09 52 32 09 4b 65 79 20 63 6f 64 65 |nd...R2.Key code| 00001e10 20 28 62 69 74 30 2d 31 35 29 2c 20 61 6e 64 20 | (bit0-15), and | 00001e20 62 75 74 74 6f 6e 20 6e 75 6d 62 65 72 20 28 62 |button number (b| 00001e30 69 74 31 36 2d 32 33 29 0a 09 31 09 55 74 69 6c |it16-23)..1.Util| 00001e40 69 74 79 20 61 6e 64 20 66 75 6e 63 74 69 6f 6e |ity and function| 00001e50 20 49 44 0a 09 09 4f 6e 20 65 78 69 74 3a 0a 09 | ID...On exit:..| 00001e60 09 52 34 09 50 6f 69 6e 74 65 72 20 74 6f 20 75 |.R4.Pointer to u| 00001e70 74 69 6c 69 74 79 20 6e 61 6d 65 2c 20 6f 72 20 |tility name, or | 00001e80 30 20 69 66 20 6e 6f 74 20 66 6f 75 6e 64 0a 09 |0 if not found..| 00001e90 09 52 35 09 50 6f 69 6e 74 65 72 20 74 6f 20 66 |.R5.Pointer to f| 00001ea0 75 6e 63 74 69 6f 6e 20 6e 61 6d 65 20 69 66 20 |unction name if | 00001eb0 52 34 26 6c 74 3b 26 67 74 3b 30 0a 3c 2f 70 72 |R4<>0.</pr| 00001ec0 65 3e 0a 0a 0a 3c 68 32 3e 3c 61 20 6e 61 6d 65 |e>...<h2><a name| 00001ed0 3d 22 45 6e 75 6d 65 72 61 74 65 46 75 6e 63 74 |="EnumerateFunct| 00001ee0 69 6f 6e 73 22 3e 46 69 6c 65 72 5f 45 6e 75 6d |ions">Filer_Enum| 00001ef0 65 72 61 74 65 46 75 6e 63 74 69 6f 6e 73 3c 2f |erateFunctions</| 00001f00 61 3e 3c 2f 68 32 3e 0a 3c 70 72 65 3e 4f 6e 20 |a></h2>.<pre>On | 00001f10 65 6e 74 72 79 3a 0a 52 30 09 30 20 74 6f 20 73 |entry:.R0.0 to s| 00001f20 74 61 72 74 2c 20 6f 72 20 70 72 65 73 65 72 76 |tart, or preserv| 00001f30 65 64 20 66 72 6f 6d 20 6c 61 73 74 20 63 61 6c |ed from last cal| 00001f40 6c 0a 4f 6e 20 65 78 69 74 3a 0a 52 30 09 30 20 |l.On exit:.R0.0 | 00001f50 69 66 20 6e 6f 20 6d 6f 72 65 20 66 75 6e 63 74 |if no more funct| 00001f60 69 6f 6e 73 2c 20 65 6c 73 65 20 63 6f 6e 74 65 |ions, else conte| 00001f70 78 74 20 70 6f 69 6e 74 65 72 20 66 6f 72 20 6e |xt pointer for n| 00001f80 65 78 74 20 63 61 6c 6c 0a 52 31 09 46 75 6e 63 |ext call.R1.Func| 00001f90 74 69 6f 6e 20 68 61 6e 64 6c 65 0a 52 34 09 50 |tion handle.R4.P| 00001fa0 6f 69 6e 74 65 72 20 74 6f 20 75 74 69 6c 69 74 |ointer to utilit| 00001fb0 79 20 6e 61 6d 65 0a 52 35 09 50 6f 69 6e 74 65 |y name.R5.Pointe| 00001fc0 72 20 74 6f 20 46 75 6e 63 74 69 6f 6e 20 49 44 |r to Function ID| 00001fd0 0a 52 31 2c 52 34 2c 52 35 20 63 6f 72 72 75 70 |.R1,R4,R5 corrup| 00001fe0 74 65 64 20 69 66 20 52 30 3d 30 0a 3c 2f 70 72 |ted if R0=0.</pr| 00001ff0 65 3e 0a 0a 3c 2f 62 6f 64 79 3e 3c 2f 68 74 6d |e>..</body></htm| 00002000 6c 3e 0a |l>.| 00002003