Home » Archimedes archive » Archimedes World » archimedes_world_volume_15_issue_1_scp.adf » !ProFiler_ProFiler » !ProFiler/Dox/Service
!ProFiler/Dox/Service
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/Service |
Read OK: | ✔ |
File size: | 252B bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
<html><head><title>ProFiler Service calls</title></head> <body> <h1><center><u>ProFiler Service calls</u></center></h1> <h2><a name="300">Service_FilerSpriteInfo (&300)</a></h2> <pre>On entry: R0 Desired sprite size (0=34�34, 1=18�18) R1 &300 R2 Viewer description R3 Object description R4 Extended object type On exit: R0 Result code: 0 If the object needs booting before deciding the sprite. R3->Sprite to use until object has been booted. (e.g. file_wait) 1 If the sprite needs to be generated. R3->Sprite to use until called back with <a href="#308">Service_FilerMakeSprite</a>. Unless you've got a good reason not to, use "wait_tttt", where tttt is the type you claimed. 2 If a suitable sprite is already in the wimp pool. R3->Sprite name. R1 0 if claimed, otherwise all regs preserved R3 Pointer to sprite name, depending on R0. All other regs preserved </pre> <p>If someone can supply a sprite to use for the object, say so now. If an 18�18 sprite is wanted, you can still supply a 34�34 one, which then will be shown at half size. If the sprite is already in the wimp pool, return the name of it. <p>If you can supply a sprite but it will take time to generate, you can do one of 3 things: <ol> <li>Do not claim this service.<br> This will give other clients that might be able to supply the sprite quickly a chance to do that. If nobody can the default client will supply sprites for most objects. <li>Return R0=0, R1=0, R3->Temporary sprite.<br> This will make the filer use the given sprite, and call you later through <a href="#304">Service_FilerSprite</a> to get the real one. This will also prevent the default client from supplying a sprite which would mean you wouldn't be called again. <li>Return R0=1, R1=0, R3->Temporary sprite.<br> This is like R0=0, but you will later be called with <a href="#308">Service_FilerMakeSprite</a> to generate the sprite. </ol> <p>Whether you should use 2 or 3 depends on what kind of sprite it is. If the sprite depends on the contents of the file (e.g. a picture thumbnail), you should use choice 3. Using the filer's pool instead of the wimp pool has certain advantages: <ul> <li>The size of the pool is kept below a user-defined maximum as long as invisible sprites exist in it. <li>If a sprite is needed, it may already be in the pool. The filer will use this sprite immediately, without calling <a href="#308">Service_FilerMakeSprite</a>. </ul> <p>On the other hand, if the sprite is going to be used for several objects you should use choice 2. Otherwise there will be a separate sprite for each object even if they look the same. <p>Identical files will almost always use the same sprite from the Filer pool. The Filer looks at certain characteristics in order to decide whether two files are the same, without actually having to look at the file contents. This means that if you let some of the ignored file data affect the sprite, you should always use choice 2 above.<br> The data not considered is the leafname and the attributes. <h2><a name="304">Service_FilerSprite (&304)</a></h2> <pre>On entry: R0 Desired sprite height (0=68 osu, 1=36 osu) R1 &304 R2 Viewer description R3 Object description R4 Extended object type On exit: R0 Null terminated name of sprite to use R1 0 if claimed, otherwise all regs preserved All other regs preserved </pre> <p>The object has been booted, and you should check if a suitable sprite is in the wimp pool. If you still can't find the sprite you want, return without claiming the call. This will make the default client find a sprite. <p>If R0=0 on entry you must return a sprite that has a maximum height of 68 os-units. If R0=1 on entry, the height should be max 36 if you can find one, but you can return a larger one if you can't. The height should still not exceed 72 os-units. In both cases the width can theoretically be anything, but it is recommended to keep it under 128 os-units to ensure a sensible size of directory viewers. This is not an Amiga! <h2><a name="308">Service_FilerMakeSprite (&308)</a></h2> <pre>On entry: R0 Sprite name R1 &308 R2 Viewer description R3 Object description R4 Extended object type R5 If you return with R0=2, this is the desired sprite height (0=68 osu, 1=36 osu) R6 Maximum width of sprite (osu), it is possible to exceed this, but you'll annoy the user. On exit: R0 0 if sprite successfully drawn 1 if background process has been started 2 if there's a suitable sprite in the wimp pool after all Otherwise a pointer to an error block R1 0 if claimed, otherwise all regs preserved R2 Pointer to sprite name if R0=1 or 2. If R0=1, this sprite will be used while drawing the real one in the background. If R0=2, the sprite is in the wimp pool All other regs preserved </pre> This is a request to make a sprite of the given name. This should be done by calling <a href="./SWIs#CreateSprite">Filer_CreateSprite</a>, and filling it out with a relevant image. You can get at the disc object by calling <a href="./SWIs#ObjectName">Filer_ObjectName</a>. If something goes wrong, you can return an error. Depending on what goes wrong, it might be preferable to return a default sprite which is already in the wimp pool. In this case, the best size to return is given by R5, but you have the same possibilities as mentioned under <a href="#304">Service_FilerSprite</a>. The best way to make an original sprite is something like: <pre> ADR R1,spritemode SWI XFiler_CreateSprite ; Create a sprite BVS returnwitherror MOV R3,#0 MOV R0,#&23C SWI XOS_SpriteOp ; Switch output to sprite BVS returnwitherror STMFD R13!,{R0-R3} ;Do normal plot calls etc. into the sprite LDMFD R13!,{R0-R3} SWI XOS_SpriteOp ; Switch output back to screen BVS aargh MOV R0,#0 ; Sprite ok .returnwitherror MOV R1,#0 ; Claim call .spritemode EQUD 1 ; Format always 1 EQUD 34:EQUD34 ; Size in pixels EQUD 4 ; log2bpp, ie. 32K colours EQUD -1 ; No frequency EQUD -1 ; No modevars </pre> <p>If the generation of the image is going to take more than a second or so, you might consider running the process in the background (e.g. using OS_CallEvery). In this case use <a href="./SWIs#ObjectName">Filer_ObjectName</a> to obtain a copy of the pathname and return with R0 pointing to the name of a sprite in the wimp pool, and R1=0. Don't use <a href="./SWIs#CreateSprite">Filer_CreateSprite</a> as the memory used to hold these sprites is not always accessible. Instead make your own sprite somewhere, (e.g. in RMA). When you are done call <a href="./SWIs#CopySprite">Filer_CopySprite</a>. The filer will take a copy of your sprite and use it and you can discard your copy. Then use <a href="./SWIs#SetSprite">Filer_SetSprite</a> with the name and the sprite will be shown in the viewer.<br> Don't attempt to call Wimp_Poll, that will fail horribly. You can start your own wimptask if you want and poll while you draw in the background. If an error occurs return with R0->errorblock and R1=0. The error text will be used in the Info box, and the object will get the 'file_err' sprite.<br> If an error occurs in a background process, you can either report it as normal (if you are a wimp task) or you can call <a href="./SWIs#SetSprite">Filer_SetSprite</a> as described below, which will give the same effect as an error in the Service code. <h2><a name="30C">Service_FilerOpenClose (&30C)</a></h2> <pre>On entry: R0 Object name R1 &30C On exit: All regs preserved (don't claim) </pre> <p>This is a message to all programs displaying disc objects (e.g. Pinboard). <br>It is given when a viewer is opened or closed. When receiving this call, you can check if the object is one you are displaying. If it is, you should call <a href="./SWIs#Sprite">Filer_Sprite</a> to get the correct sprite for the object, which may now have changed. The object name is the name of the viewer that was opened/closed. <h2><a name="310">Service_FilerEnumerateClients (&310)</a></h2> <pre>On entry: R0 0 or 1, see below R1 &310 On exit: Registers preserved to pass on. If claimed: R0 Module title R1 0 R2 Pointer to description block </pre> <p>This call is made when making a list of the various Filer clients running. <br>Each client should have a flag somewhere. When receiving this call: <br>If R0=0: Clear the flag and return without claiming the call. <br>If R0=1: If the flag is set, return without claiming. If it is clear, set it, and return with R0 pointing to the module title, R1=0 and R2 pointing to the description block. <br>Here's a code example of how it could work: <pre>.FilerEnumerate ; R0=0 to reset, 1 to claim TEQ R0,#0 STREQ R0,DoneIt MOVEQS PC,R14 STMFD R13!,{R14} LDR R14,DoneIt TEQ R14,#0 LDMNEFD R13!,{PC}^ ADR R0,TitleString STR R0,DoneIt MOV R1,#0 ADR R2,DescBlock LDMFD R13!,{PC}^ .DoneIt EQUD 0 ; Initial state doesn't matter </pre> See <a href="./External">External</a> about the format of the description block. <h2><a name="314">Service_FilerNewChoices (&314)</a></h2> <pre>On entry: R0 Pointer to module name R1 &310 On exit: R1 0 or preserved </pre> <p>When the user changes the choices for a client, this service call is made. It means that the choices list has been updated with new values. If you don't need to take special action (e.g. if you use the values directly from the choices list), you can ignore this call. <br>Otherwise you should check if it is your module name given in R0. If it is, take appropriate action, then claim the call. </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 65 72 76 |le>ProFiler Serv| 00000020 69 63 65 20 63 61 6c 6c 73 3c 2f 74 69 74 6c 65 |ice calls</title| 00000030 3e 3c 2f 68 65 61 64 3e 0a 0a 3c 62 6f 64 79 3e |></head>..<body>| 00000040 0a 3c 68 31 3e 3c 63 65 6e 74 65 72 3e 3c 75 3e |.<h1><center><u>| 00000050 50 72 6f 46 69 6c 65 72 20 53 65 72 76 69 63 65 |ProFiler Service| 00000060 20 63 61 6c 6c 73 3c 2f 75 3e 3c 2f 63 65 6e 74 | calls</u></cent| 00000070 65 72 3e 3c 2f 68 31 3e 0a 0a 3c 68 32 3e 3c 61 |er></h1>..<h2><a| 00000080 20 6e 61 6d 65 3d 22 33 30 30 22 3e 53 65 72 76 | name="300">Serv| 00000090 69 63 65 5f 46 69 6c 65 72 53 70 72 69 74 65 49 |ice_FilerSpriteI| 000000a0 6e 66 6f 20 28 26 33 30 30 29 3c 2f 61 3e 3c 2f |nfo (&300)</a></| 000000b0 68 32 3e 0a 0a 3c 70 72 65 3e 4f 6e 20 65 6e 74 |h2>..<pre>On ent| 000000c0 72 79 3a 0a 52 30 09 44 65 73 69 72 65 64 20 73 |ry:.R0.Desired s| 000000d0 70 72 69 74 65 20 73 69 7a 65 20 28 30 3d 33 34 |prite size (0=34| 000000e0 d7 33 34 2c 20 31 3d 31 38 d7 31 38 29 0a 52 31 |.34, 1=18.18).R1| 000000f0 09 26 33 30 30 0a 52 32 09 56 69 65 77 65 72 20 |.&300.R2.Viewer | 00000100 64 65 73 63 72 69 70 74 69 6f 6e 0a 52 33 09 4f |description.R3.O| 00000110 62 6a 65 63 74 20 64 65 73 63 72 69 70 74 69 6f |bject descriptio| 00000120 6e 0a 52 34 09 45 78 74 65 6e 64 65 64 20 6f 62 |n.R4.Extended ob| 00000130 6a 65 63 74 20 74 79 70 65 0a 4f 6e 20 65 78 69 |ject type.On exi| 00000140 74 3a 0a 52 30 09 52 65 73 75 6c 74 20 63 6f 64 |t:.R0.Result cod| 00000150 65 3a 0a 09 30 20 49 66 20 74 68 65 20 6f 62 6a |e:..0 If the obj| 00000160 65 63 74 20 6e 65 65 64 73 20 62 6f 6f 74 69 6e |ect needs bootin| 00000170 67 20 62 65 66 6f 72 65 20 64 65 63 69 64 69 6e |g before decidin| 00000180 67 20 74 68 65 20 73 70 72 69 74 65 2e 0a 09 20 |g the sprite... | 00000190 20 52 33 2d 3e 53 70 72 69 74 65 20 74 6f 20 75 | R3->Sprite to u| 000001a0 73 65 20 75 6e 74 69 6c 20 6f 62 6a 65 63 74 20 |se until object | 000001b0 68 61 73 20 62 65 65 6e 20 62 6f 6f 74 65 64 2e |has been booted.| 000001c0 20 28 65 2e 67 2e 20 66 69 6c 65 5f 77 61 69 74 | (e.g. file_wait| 000001d0 29 0a 09 31 20 49 66 20 74 68 65 20 73 70 72 69 |)..1 If the spri| 000001e0 74 65 20 6e 65 65 64 73 20 74 6f 20 62 65 20 67 |te needs to be g| 000001f0 65 6e 65 72 61 74 65 64 2e 0a 09 20 20 52 33 2d |enerated... R3-| 00000200 3e 53 70 72 69 74 65 20 74 6f 20 75 73 65 20 75 |>Sprite to use u| 00000210 6e 74 69 6c 20 63 61 6c 6c 65 64 20 62 61 63 6b |ntil called back| 00000220 20 77 69 74 68 20 3c 61 20 68 72 65 66 3d 22 23 | with <a href="#| 00000230 33 30 38 22 3e 53 65 72 76 69 63 65 5f 46 69 6c |308">Service_Fil| 00000240 65 72 4d 61 6b 65 53 70 72 69 74 65 3c 2f 61 3e |erMakeSprite</a>| 00000250 2e 0a 09 20 20 20 20 20 20 55 6e 6c 65 73 73 20 |... Unless | 00000260 79 6f 75 27 76 65 20 67 6f 74 20 61 20 67 6f 6f |you've got a goo| 00000270 64 20 72 65 61 73 6f 6e 20 6e 6f 74 20 74 6f 2c |d reason not to,| 00000280 20 75 73 65 20 22 77 61 69 74 5f 74 74 74 74 22 | use "wait_tttt"| 00000290 2c 20 77 68 65 72 65 0a 09 20 20 20 20 20 20 74 |, where.. t| 000002a0 74 74 74 20 69 73 20 74 68 65 20 74 79 70 65 20 |ttt is the type | 000002b0 79 6f 75 20 63 6c 61 69 6d 65 64 2e 0a 09 32 20 |you claimed...2 | 000002c0 49 66 20 61 20 73 75 69 74 61 62 6c 65 20 73 70 |If a suitable sp| 000002d0 72 69 74 65 20 69 73 20 61 6c 72 65 61 64 79 20 |rite is already | 000002e0 69 6e 20 74 68 65 20 77 69 6d 70 20 70 6f 6f 6c |in the wimp pool| 000002f0 2e 0a 09 20 20 52 33 2d 3e 53 70 72 69 74 65 20 |... R3->Sprite | 00000300 6e 61 6d 65 2e 0a 52 31 09 30 20 69 66 20 63 6c |name..R1.0 if cl| 00000310 61 69 6d 65 64 2c 20 6f 74 68 65 72 77 69 73 65 |aimed, otherwise| 00000320 20 61 6c 6c 20 72 65 67 73 20 70 72 65 73 65 72 | all regs preser| 00000330 76 65 64 0a 52 33 09 50 6f 69 6e 74 65 72 20 74 |ved.R3.Pointer t| 00000340 6f 20 73 70 72 69 74 65 20 6e 61 6d 65 2c 20 64 |o sprite name, d| 00000350 65 70 65 6e 64 69 6e 67 20 6f 6e 20 52 30 2e 0a |epending on R0..| 00000360 41 6c 6c 20 6f 74 68 65 72 20 72 65 67 73 20 70 |All other regs p| 00000370 72 65 73 65 72 76 65 64 0a 3c 2f 70 72 65 3e 0a |reserved.</pre>.| 00000380 0a 3c 70 3e 49 66 20 73 6f 6d 65 6f 6e 65 20 63 |.<p>If someone c| 00000390 61 6e 20 73 75 70 70 6c 79 20 61 20 73 70 72 69 |an supply a spri| 000003a0 74 65 20 74 6f 20 75 73 65 20 66 6f 72 20 74 68 |te to use for th| 000003b0 65 20 6f 62 6a 65 63 74 2c 20 73 61 79 20 73 6f |e object, say so| 000003c0 20 6e 6f 77 2e 20 49 66 20 61 6e 20 31 38 d7 31 | now. If an 18.1| 000003d0 38 0a 73 70 72 69 74 65 20 69 73 20 77 61 6e 74 |8.sprite is want| 000003e0 65 64 2c 20 79 6f 75 20 63 61 6e 20 73 74 69 6c |ed, you can stil| 000003f0 6c 20 73 75 70 70 6c 79 20 61 20 33 34 d7 33 34 |l supply a 34.34| 00000400 20 6f 6e 65 2c 20 77 68 69 63 68 20 74 68 65 6e | one, which then| 00000410 20 77 69 6c 6c 20 62 65 20 73 68 6f 77 6e 20 61 | will be shown a| 00000420 74 0a 68 61 6c 66 20 73 69 7a 65 2e 20 49 66 20 |t.half size. If | 00000430 74 68 65 20 73 70 72 69 74 65 20 69 73 20 61 6c |the sprite is al| 00000440 72 65 61 64 79 20 69 6e 20 74 68 65 20 77 69 6d |ready in the wim| 00000450 70 20 70 6f 6f 6c 2c 20 72 65 74 75 72 6e 20 74 |p pool, return t| 00000460 68 65 20 6e 61 6d 65 20 6f 66 20 69 74 2e 0a 3c |he name of it..<| 00000470 70 3e 49 66 20 79 6f 75 20 63 61 6e 20 73 75 70 |p>If you can sup| 00000480 70 6c 79 20 61 20 73 70 72 69 74 65 20 62 75 74 |ply a sprite but| 00000490 20 69 74 20 77 69 6c 6c 20 74 61 6b 65 20 74 69 | it will take ti| 000004a0 6d 65 20 74 6f 20 67 65 6e 65 72 61 74 65 2c 20 |me to generate, | 000004b0 79 6f 75 20 63 61 6e 20 64 6f 20 6f 6e 65 20 6f |you can do one o| 000004c0 66 20 33 20 74 68 69 6e 67 73 3a 0a 0a 3c 6f 6c |f 3 things:..<ol| 000004d0 3e 0a 3c 6c 69 3e 44 6f 20 6e 6f 74 20 63 6c 61 |>.<li>Do not cla| 000004e0 69 6d 20 74 68 69 73 20 73 65 72 76 69 63 65 2e |im this service.| 000004f0 3c 62 72 3e 0a 54 68 69 73 20 77 69 6c 6c 20 67 |<br>.This will g| 00000500 69 76 65 20 6f 74 68 65 72 20 63 6c 69 65 6e 74 |ive other client| 00000510 73 20 74 68 61 74 20 6d 69 67 68 74 20 62 65 20 |s that might be | 00000520 61 62 6c 65 20 74 6f 20 73 75 70 70 6c 79 20 74 |able to supply t| 00000530 68 65 20 73 70 72 69 74 65 20 71 75 69 63 6b 6c |he sprite quickl| 00000540 79 20 61 20 63 68 61 6e 63 65 20 74 6f 20 64 6f |y a chance to do| 00000550 20 74 68 61 74 2e 20 49 66 20 6e 6f 62 6f 64 79 | that. If nobody| 00000560 20 63 61 6e 20 74 68 65 20 64 65 66 61 75 6c 74 | can the default| 00000570 20 63 6c 69 65 6e 74 20 77 69 6c 6c 20 73 75 70 | client will sup| 00000580 70 6c 79 20 73 70 72 69 74 65 73 20 66 6f 72 20 |ply sprites for | 00000590 6d 6f 73 74 20 6f 62 6a 65 63 74 73 2e 0a 3c 6c |most objects..<l| 000005a0 69 3e 52 65 74 75 72 6e 20 52 30 3d 30 2c 20 52 |i>Return R0=0, R| 000005b0 31 3d 30 2c 20 52 33 2d 3e 54 65 6d 70 6f 72 61 |1=0, R3->Tempora| 000005c0 72 79 20 73 70 72 69 74 65 2e 3c 62 72 3e 0a 54 |ry sprite.<br>.T| 000005d0 68 69 73 20 77 69 6c 6c 20 6d 61 6b 65 20 74 68 |his will make th| 000005e0 65 20 66 69 6c 65 72 20 75 73 65 20 74 68 65 20 |e filer use the | 000005f0 67 69 76 65 6e 20 73 70 72 69 74 65 2c 20 61 6e |given sprite, an| 00000600 64 20 63 61 6c 6c 20 79 6f 75 20 6c 61 74 65 72 |d call you later| 00000610 20 74 68 72 6f 75 67 68 20 3c 61 20 68 72 65 66 | through <a href| 00000620 3d 22 23 33 30 34 22 3e 53 65 72 76 69 63 65 5f |="#304">Service_| 00000630 46 69 6c 65 72 53 70 72 69 74 65 3c 2f 61 3e 20 |FilerSprite</a> | 00000640 74 6f 20 67 65 74 20 74 68 65 20 72 65 61 6c 20 |to get the real | 00000650 6f 6e 65 2e 20 54 68 69 73 20 77 69 6c 6c 20 61 |one. This will a| 00000660 6c 73 6f 20 70 72 65 76 65 6e 74 20 74 68 65 20 |lso prevent the | 00000670 64 65 66 61 75 6c 74 20 63 6c 69 65 6e 74 20 66 |default client f| 00000680 72 6f 6d 20 73 75 70 70 6c 79 69 6e 67 20 61 20 |rom supplying a | 00000690 73 70 72 69 74 65 20 77 68 69 63 68 20 77 6f 75 |sprite which wou| 000006a0 6c 64 20 6d 65 61 6e 20 79 6f 75 20 77 6f 75 6c |ld mean you woul| 000006b0 64 6e 27 74 20 62 65 20 63 61 6c 6c 65 64 20 61 |dn't be called a| 000006c0 67 61 69 6e 2e 0a 3c 6c 69 3e 52 65 74 75 72 6e |gain..<li>Return| 000006d0 20 52 30 3d 31 2c 20 52 31 3d 30 2c 20 52 33 2d | R0=1, R1=0, R3-| 000006e0 3e 54 65 6d 70 6f 72 61 72 79 20 73 70 72 69 74 |>Temporary sprit| 000006f0 65 2e 3c 62 72 3e 0a 54 68 69 73 20 69 73 20 6c |e.<br>.This is l| 00000700 69 6b 65 20 52 30 3d 30 2c 20 62 75 74 20 79 6f |ike R0=0, but yo| 00000710 75 20 77 69 6c 6c 20 6c 61 74 65 72 20 62 65 20 |u will later be | 00000720 63 61 6c 6c 65 64 20 77 69 74 68 20 3c 61 20 68 |called with <a h| 00000730 72 65 66 3d 22 23 33 30 38 22 3e 53 65 72 76 69 |ref="#308">Servi| 00000740 63 65 5f 46 69 6c 65 72 4d 61 6b 65 53 70 72 69 |ce_FilerMakeSpri| 00000750 74 65 3c 2f 61 3e 20 74 6f 20 67 65 6e 65 72 61 |te</a> to genera| 00000760 74 65 20 74 68 65 20 73 70 72 69 74 65 2e 0a 3c |te the sprite..<| 00000770 2f 6f 6c 3e 0a 0a 3c 70 3e 57 68 65 74 68 65 72 |/ol>..<p>Whether| 00000780 20 79 6f 75 20 73 68 6f 75 6c 64 20 75 73 65 20 | you should use | 00000790 32 20 6f 72 20 33 20 64 65 70 65 6e 64 73 20 6f |2 or 3 depends o| 000007a0 6e 20 77 68 61 74 20 6b 69 6e 64 20 6f 66 20 73 |n what kind of s| 000007b0 70 72 69 74 65 20 69 74 20 69 73 2e 20 49 66 20 |prite it is. If | 000007c0 74 68 65 20 0a 73 70 72 69 74 65 20 64 65 70 65 |the .sprite depe| 000007d0 6e 64 73 20 6f 6e 20 74 68 65 20 63 6f 6e 74 65 |nds on the conte| 000007e0 6e 74 73 20 6f 66 20 74 68 65 20 66 69 6c 65 20 |nts of the file | 000007f0 28 65 2e 67 2e 20 61 20 70 69 63 74 75 72 65 20 |(e.g. a picture | 00000800 74 68 75 6d 62 6e 61 69 6c 29 2c 20 79 6f 75 0a |thumbnail), you.| 00000810 73 68 6f 75 6c 64 20 75 73 65 20 63 68 6f 69 63 |should use choic| 00000820 65 20 33 2e 20 55 73 69 6e 67 20 74 68 65 20 66 |e 3. Using the f| 00000830 69 6c 65 72 27 73 20 70 6f 6f 6c 20 69 6e 73 74 |iler's pool inst| 00000840 65 61 64 20 6f 66 20 74 68 65 20 77 69 6d 70 20 |ead of the wimp | 00000850 70 6f 6f 6c 20 68 61 73 0a 63 65 72 74 61 69 6e |pool has.certain| 00000860 20 61 64 76 61 6e 74 61 67 65 73 3a 0a 3c 75 6c | advantages:.<ul| 00000870 3e 0a 3c 6c 69 3e 54 68 65 20 73 69 7a 65 20 6f |>.<li>The size o| 00000880 66 20 74 68 65 20 70 6f 6f 6c 20 69 73 20 6b 65 |f the pool is ke| 00000890 70 74 20 62 65 6c 6f 77 20 61 20 75 73 65 72 2d |pt below a user-| 000008a0 64 65 66 69 6e 65 64 20 6d 61 78 69 6d 75 6d 20 |defined maximum | 000008b0 61 73 20 6c 6f 6e 67 20 61 73 20 69 6e 76 69 73 |as long as invis| 000008c0 69 62 6c 65 20 73 70 72 69 74 65 73 20 65 78 69 |ible sprites exi| 000008d0 73 74 20 69 6e 20 69 74 2e 0a 3c 6c 69 3e 49 66 |st in it..<li>If| 000008e0 20 61 20 73 70 72 69 74 65 20 69 73 20 6e 65 65 | a sprite is nee| 000008f0 64 65 64 2c 20 69 74 20 6d 61 79 20 61 6c 72 65 |ded, it may alre| 00000900 61 64 79 20 62 65 20 69 6e 20 74 68 65 20 70 6f |ady be in the po| 00000910 6f 6c 2e 20 54 68 65 20 66 69 6c 65 72 20 77 69 |ol. The filer wi| 00000920 6c 6c 20 75 73 65 20 74 68 69 73 20 73 70 72 69 |ll use this spri| 00000930 74 65 20 69 6d 6d 65 64 69 61 74 65 6c 79 2c 20 |te immediately, | 00000940 77 69 74 68 6f 75 74 20 63 61 6c 6c 69 6e 67 20 |without calling | 00000950 3c 61 20 68 72 65 66 3d 22 23 33 30 38 22 3e 53 |<a href="#308">S| 00000960 65 72 76 69 63 65 5f 46 69 6c 65 72 4d 61 6b 65 |ervice_FilerMake| 00000970 53 70 72 69 74 65 3c 2f 61 3e 2e 0a 3c 2f 75 6c |Sprite</a>..</ul| 00000980 3e 0a 0a 3c 70 3e 4f 6e 20 74 68 65 20 6f 74 68 |>..<p>On the oth| 00000990 65 72 20 68 61 6e 64 2c 20 69 66 20 74 68 65 20 |er hand, if the | 000009a0 73 70 72 69 74 65 20 69 73 20 67 6f 69 6e 67 20 |sprite is going | 000009b0 74 6f 20 62 65 20 75 73 65 64 20 66 6f 72 20 73 |to be used for s| 000009c0 65 76 65 72 61 6c 20 6f 62 6a 65 63 74 73 20 79 |everal objects y| 000009d0 6f 75 0a 73 68 6f 75 6c 64 20 75 73 65 20 63 68 |ou.should use ch| 000009e0 6f 69 63 65 20 32 2e 20 4f 74 68 65 72 77 69 73 |oice 2. Otherwis| 000009f0 65 20 74 68 65 72 65 20 77 69 6c 6c 20 62 65 20 |e there will be | 00000a00 61 20 73 65 70 61 72 61 74 65 20 73 70 72 69 74 |a separate sprit| 00000a10 65 20 66 6f 72 20 65 61 63 68 20 6f 62 6a 65 63 |e for each objec| 00000a20 74 0a 65 76 65 6e 20 69 66 20 74 68 65 79 20 6c |t.even if they l| 00000a30 6f 6f 6b 20 74 68 65 20 73 61 6d 65 2e 0a 0a 3c |ook the same...<| 00000a40 70 3e 49 64 65 6e 74 69 63 61 6c 20 66 69 6c 65 |p>Identical file| 00000a50 73 20 77 69 6c 6c 20 61 6c 6d 6f 73 74 20 61 6c |s will almost al| 00000a60 77 61 79 73 20 75 73 65 20 74 68 65 20 73 61 6d |ways use the sam| 00000a70 65 20 73 70 72 69 74 65 20 66 72 6f 6d 20 74 68 |e sprite from th| 00000a80 65 20 46 69 6c 65 72 20 70 6f 6f 6c 2e 0a 54 68 |e Filer pool..Th| 00000a90 65 20 46 69 6c 65 72 20 6c 6f 6f 6b 73 20 61 74 |e Filer looks at| 00000aa0 20 63 65 72 74 61 69 6e 20 63 68 61 72 61 63 74 | certain charact| 00000ab0 65 72 69 73 74 69 63 73 20 69 6e 20 6f 72 64 65 |eristics in orde| 00000ac0 72 20 74 6f 20 64 65 63 69 64 65 20 77 68 65 74 |r to decide whet| 00000ad0 68 65 72 20 74 77 6f 0a 66 69 6c 65 73 20 61 72 |her two.files ar| 00000ae0 65 20 74 68 65 20 73 61 6d 65 2c 20 77 69 74 68 |e the same, with| 00000af0 6f 75 74 20 61 63 74 75 61 6c 6c 79 20 68 61 76 |out actually hav| 00000b00 69 6e 67 20 74 6f 20 6c 6f 6f 6b 20 61 74 20 74 |ing to look at t| 00000b10 68 65 20 66 69 6c 65 20 63 6f 6e 74 65 6e 74 73 |he file contents| 00000b20 2e 0a 54 68 69 73 20 6d 65 61 6e 73 20 74 68 61 |..This means tha| 00000b30 74 20 69 66 20 79 6f 75 20 6c 65 74 20 73 6f 6d |t if you let som| 00000b40 65 20 6f 66 20 74 68 65 20 69 67 6e 6f 72 65 64 |e of the ignored| 00000b50 20 66 69 6c 65 20 64 61 74 61 20 61 66 66 65 63 | file data affec| 00000b60 74 20 74 68 65 20 73 70 72 69 74 65 2c 0a 79 6f |t the sprite,.yo| 00000b70 75 20 73 68 6f 75 6c 64 20 61 6c 77 61 79 73 20 |u should always | 00000b80 75 73 65 20 63 68 6f 69 63 65 20 32 20 61 62 6f |use choice 2 abo| 00000b90 76 65 2e 3c 62 72 3e 0a 54 68 65 20 64 61 74 61 |ve.<br>.The data| 00000ba0 20 6e 6f 74 20 63 6f 6e 73 69 64 65 72 65 64 20 | not considered | 00000bb0 69 73 20 74 68 65 20 6c 65 61 66 6e 61 6d 65 20 |is the leafname | 00000bc0 61 6e 64 20 74 68 65 20 61 74 74 72 69 62 75 74 |and the attribut| 00000bd0 65 73 2e 0a 0a 0a 3c 68 32 3e 3c 61 20 6e 61 6d |es....<h2><a nam| 00000be0 65 3d 22 33 30 34 22 3e 53 65 72 76 69 63 65 5f |e="304">Service_| 00000bf0 46 69 6c 65 72 53 70 72 69 74 65 20 28 26 33 30 |FilerSprite (&30| 00000c00 34 29 3c 2f 61 3e 3c 2f 68 32 3e 0a 0a 3c 70 72 |4)</a></h2>..<pr| 00000c10 65 3e 4f 6e 20 65 6e 74 72 79 3a 0a 52 30 09 44 |e>On entry:.R0.D| 00000c20 65 73 69 72 65 64 20 73 70 72 69 74 65 20 68 65 |esired sprite he| 00000c30 69 67 68 74 20 28 30 3d 36 38 20 6f 73 75 2c 20 |ight (0=68 osu, | 00000c40 31 3d 33 36 20 6f 73 75 29 0a 52 31 09 26 33 30 |1=36 osu).R1.&30| 00000c50 34 0a 52 32 09 56 69 65 77 65 72 20 64 65 73 63 |4.R2.Viewer desc| 00000c60 72 69 70 74 69 6f 6e 0a 52 33 09 4f 62 6a 65 63 |ription.R3.Objec| 00000c70 74 20 64 65 73 63 72 69 70 74 69 6f 6e 0a 52 34 |t description.R4| 00000c80 09 45 78 74 65 6e 64 65 64 20 6f 62 6a 65 63 74 |.Extended object| 00000c90 20 74 79 70 65 0a 4f 6e 20 65 78 69 74 3a 0a 52 | type.On exit:.R| 00000ca0 30 09 4e 75 6c 6c 20 74 65 72 6d 69 6e 61 74 65 |0.Null terminate| 00000cb0 64 20 6e 61 6d 65 20 6f 66 20 73 70 72 69 74 65 |d name of sprite| 00000cc0 20 74 6f 20 75 73 65 0a 52 31 09 30 20 69 66 20 | to use.R1.0 if | 00000cd0 63 6c 61 69 6d 65 64 2c 20 6f 74 68 65 72 77 69 |claimed, otherwi| 00000ce0 73 65 20 61 6c 6c 20 72 65 67 73 20 70 72 65 73 |se all regs pres| 00000cf0 65 72 76 65 64 0a 41 6c 6c 20 6f 74 68 65 72 20 |erved.All other | 00000d00 72 65 67 73 20 70 72 65 73 65 72 76 65 64 0a 3c |regs preserved.<| 00000d10 2f 70 72 65 3e 0a 0a 3c 70 3e 54 68 65 20 6f 62 |/pre>..<p>The ob| 00000d20 6a 65 63 74 20 68 61 73 20 62 65 65 6e 20 62 6f |ject has been bo| 00000d30 6f 74 65 64 2c 20 61 6e 64 20 79 6f 75 20 73 68 |oted, and you sh| 00000d40 6f 75 6c 64 20 63 68 65 63 6b 20 69 66 20 61 20 |ould check if a | 00000d50 73 75 69 74 61 62 6c 65 20 73 70 72 69 74 65 20 |suitable sprite | 00000d60 69 73 20 69 6e 0a 74 68 65 20 77 69 6d 70 20 70 |is in.the wimp p| 00000d70 6f 6f 6c 2e 20 49 66 20 79 6f 75 20 73 74 69 6c |ool. If you stil| 00000d80 6c 20 63 61 6e 27 74 20 66 69 6e 64 20 74 68 65 |l can't find the| 00000d90 20 73 70 72 69 74 65 20 79 6f 75 20 77 61 6e 74 | sprite you want| 00000da0 2c 20 72 65 74 75 72 6e 20 77 69 74 68 6f 75 74 |, return without| 00000db0 0a 63 6c 61 69 6d 69 6e 67 20 74 68 65 20 63 61 |.claiming the ca| 00000dc0 6c 6c 2e 20 54 68 69 73 20 77 69 6c 6c 20 6d 61 |ll. This will ma| 00000dd0 6b 65 20 74 68 65 20 64 65 66 61 75 6c 74 20 63 |ke the default c| 00000de0 6c 69 65 6e 74 20 66 69 6e 64 20 61 20 73 70 72 |lient find a spr| 00000df0 69 74 65 2e 0a 3c 70 3e 49 66 20 52 30 3d 30 20 |ite..<p>If R0=0 | 00000e00 6f 6e 20 65 6e 74 72 79 20 79 6f 75 20 6d 75 73 |on entry you mus| 00000e10 74 20 72 65 74 75 72 6e 20 61 20 73 70 72 69 74 |t return a sprit| 00000e20 65 20 74 68 61 74 20 68 61 73 20 61 20 6d 61 78 |e that has a max| 00000e30 69 6d 75 6d 20 68 65 69 67 68 74 20 6f 66 20 36 |imum height of 6| 00000e40 38 0a 6f 73 2d 75 6e 69 74 73 2e 20 49 66 20 52 |8.os-units. If R| 00000e50 30 3d 31 20 6f 6e 20 65 6e 74 72 79 2c 20 74 68 |0=1 on entry, th| 00000e60 65 20 68 65 69 67 68 74 20 73 68 6f 75 6c 64 20 |e height should | 00000e70 62 65 20 6d 61 78 20 33 36 20 69 66 20 79 6f 75 |be max 36 if you| 00000e80 20 63 61 6e 20 66 69 6e 64 20 6f 6e 65 2c 0a 62 | can find one,.b| 00000e90 75 74 20 79 6f 75 20 63 61 6e 20 72 65 74 75 72 |ut you can retur| 00000ea0 6e 20 61 20 6c 61 72 67 65 72 20 6f 6e 65 20 69 |n a larger one i| 00000eb0 66 20 79 6f 75 20 63 61 6e 27 74 2e 20 54 68 65 |f you can't. The| 00000ec0 20 68 65 69 67 68 74 20 73 68 6f 75 6c 64 20 73 | height should s| 00000ed0 74 69 6c 6c 20 6e 6f 74 0a 65 78 63 65 65 64 20 |till not.exceed | 00000ee0 37 32 20 6f 73 2d 75 6e 69 74 73 2e 20 49 6e 20 |72 os-units. In | 00000ef0 62 6f 74 68 20 63 61 73 65 73 20 74 68 65 20 77 |both cases the w| 00000f00 69 64 74 68 20 63 61 6e 20 74 68 65 6f 72 65 74 |idth can theoret| 00000f10 69 63 61 6c 6c 79 20 62 65 20 61 6e 79 74 68 69 |ically be anythi| 00000f20 6e 67 2c 0a 62 75 74 20 69 74 20 69 73 20 72 65 |ng,.but it is re| 00000f30 63 6f 6d 6d 65 6e 64 65 64 20 74 6f 20 6b 65 65 |commended to kee| 00000f40 70 20 69 74 20 75 6e 64 65 72 20 31 32 38 20 6f |p it under 128 o| 00000f50 73 2d 75 6e 69 74 73 20 74 6f 20 65 6e 73 75 72 |s-units to ensur| 00000f60 65 20 61 20 73 65 6e 73 69 62 6c 65 20 73 69 7a |e a sensible siz| 00000f70 65 0a 6f 66 20 64 69 72 65 63 74 6f 72 79 20 76 |e.of directory v| 00000f80 69 65 77 65 72 73 2e 20 54 68 69 73 20 69 73 20 |iewers. This is | 00000f90 6e 6f 74 20 61 6e 20 41 6d 69 67 61 21 0a 0a 0a |not an Amiga!...| 00000fa0 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 33 30 38 |<h2><a name="308| 00000fb0 22 3e 53 65 72 76 69 63 65 5f 46 69 6c 65 72 4d |">Service_FilerM| 00000fc0 61 6b 65 53 70 72 69 74 65 20 28 26 33 30 38 29 |akeSprite (&308)| 00000fd0 3c 2f 61 3e 3c 2f 68 32 3e 0a 0a 3c 70 72 65 3e |</a></h2>..<pre>| 00000fe0 4f 6e 20 65 6e 74 72 79 3a 0a 52 30 09 53 70 72 |On entry:.R0.Spr| 00000ff0 69 74 65 20 6e 61 6d 65 0a 52 31 09 26 33 30 38 |ite name.R1.&308| 00001000 0a 52 32 09 56 69 65 77 65 72 20 64 65 73 63 72 |.R2.Viewer descr| 00001010 69 70 74 69 6f 6e 0a 52 33 09 4f 62 6a 65 63 74 |iption.R3.Object| 00001020 20 64 65 73 63 72 69 70 74 69 6f 6e 0a 52 34 09 | description.R4.| 00001030 45 78 74 65 6e 64 65 64 20 6f 62 6a 65 63 74 20 |Extended object | 00001040 74 79 70 65 0a 52 35 09 49 66 20 79 6f 75 20 72 |type.R5.If you r| 00001050 65 74 75 72 6e 20 77 69 74 68 20 52 30 3d 32 2c |eturn with R0=2,| 00001060 20 74 68 69 73 20 69 73 20 74 68 65 20 64 65 73 | this is the des| 00001070 69 72 65 64 20 73 70 72 69 74 65 20 68 65 69 67 |ired sprite heig| 00001080 68 74 20 28 30 3d 36 38 20 6f 73 75 2c 0a 09 31 |ht (0=68 osu,..1| 00001090 3d 33 36 20 6f 73 75 29 0a 52 36 09 4d 61 78 69 |=36 osu).R6.Maxi| 000010a0 6d 75 6d 20 77 69 64 74 68 20 6f 66 20 73 70 72 |mum width of spr| 000010b0 69 74 65 20 28 6f 73 75 29 2c 20 69 74 20 69 73 |ite (osu), it is| 000010c0 20 70 6f 73 73 69 62 6c 65 20 74 6f 20 65 78 63 | possible to exc| 000010d0 65 65 64 20 74 68 69 73 2c 20 62 75 74 0a 09 79 |eed this, but..y| 000010e0 6f 75 27 6c 6c 20 61 6e 6e 6f 79 20 74 68 65 20 |ou'll annoy the | 000010f0 75 73 65 72 2e 0a 4f 6e 20 65 78 69 74 3a 0a 52 |user..On exit:.R| 00001100 30 09 30 20 69 66 20 73 70 72 69 74 65 20 73 75 |0.0 if sprite su| 00001110 63 63 65 73 73 66 75 6c 6c 79 20 64 72 61 77 6e |ccessfully drawn| 00001120 0a 09 31 20 69 66 20 62 61 63 6b 67 72 6f 75 6e |..1 if backgroun| 00001130 64 20 70 72 6f 63 65 73 73 20 68 61 73 20 62 65 |d process has be| 00001140 65 6e 20 73 74 61 72 74 65 64 0a 09 32 20 69 66 |en started..2 if| 00001150 20 74 68 65 72 65 27 73 20 61 20 73 75 69 74 61 | there's a suita| 00001160 62 6c 65 20 73 70 72 69 74 65 20 69 6e 20 74 68 |ble sprite in th| 00001170 65 20 77 69 6d 70 20 70 6f 6f 6c 20 61 66 74 65 |e wimp pool afte| 00001180 72 20 61 6c 6c 0a 09 4f 74 68 65 72 77 69 73 65 |r all..Otherwise| 00001190 20 61 20 70 6f 69 6e 74 65 72 20 74 6f 20 61 6e | a pointer to an| 000011a0 20 65 72 72 6f 72 20 62 6c 6f 63 6b 0a 52 31 09 | error block.R1.| 000011b0 30 20 69 66 20 63 6c 61 69 6d 65 64 2c 20 6f 74 |0 if claimed, ot| 000011c0 68 65 72 77 69 73 65 20 61 6c 6c 20 72 65 67 73 |herwise all regs| 000011d0 20 70 72 65 73 65 72 76 65 64 0a 52 32 09 50 6f | preserved.R2.Po| 000011e0 69 6e 74 65 72 20 74 6f 20 73 70 72 69 74 65 20 |inter to sprite | 000011f0 6e 61 6d 65 20 69 66 20 52 30 3d 31 20 6f 72 20 |name if R0=1 or | 00001200 32 2e 0a 09 49 66 20 52 30 3d 31 2c 20 74 68 69 |2...If R0=1, thi| 00001210 73 20 73 70 72 69 74 65 20 77 69 6c 6c 20 62 65 |s sprite will be| 00001220 20 75 73 65 64 20 77 68 69 6c 65 20 64 72 61 77 | used while draw| 00001230 69 6e 67 20 74 68 65 20 72 65 61 6c 20 6f 6e 65 |ing the real one| 00001240 20 69 6e 20 74 68 65 0a 09 62 61 63 6b 67 72 6f | in the..backgro| 00001250 75 6e 64 2e 0a 09 49 66 20 52 30 3d 32 2c 20 74 |und...If R0=2, t| 00001260 68 65 20 73 70 72 69 74 65 20 69 73 20 69 6e 20 |he sprite is in | 00001270 74 68 65 20 77 69 6d 70 20 70 6f 6f 6c 0a 41 6c |the wimp pool.Al| 00001280 6c 20 6f 74 68 65 72 20 72 65 67 73 20 70 72 65 |l other regs pre| 00001290 73 65 72 76 65 64 0a 3c 2f 70 72 65 3e 0a 0a 54 |served.</pre>..T| 000012a0 68 69 73 20 69 73 20 61 20 72 65 71 75 65 73 74 |his is a request| 000012b0 20 74 6f 20 6d 61 6b 65 20 61 20 73 70 72 69 74 | to make a sprit| 000012c0 65 20 6f 66 20 74 68 65 20 67 69 76 65 6e 20 6e |e of the given n| 000012d0 61 6d 65 2e 20 54 68 69 73 20 73 68 6f 75 6c 64 |ame. This should| 000012e0 20 62 65 20 64 6f 6e 65 20 62 79 0a 63 61 6c 6c | be done by.call| 000012f0 69 6e 67 20 3c 61 20 68 72 65 66 3d 22 2e 2f 53 |ing <a href="./S| 00001300 57 49 73 23 43 72 65 61 74 65 53 70 72 69 74 65 |WIs#CreateSprite| 00001310 22 3e 46 69 6c 65 72 5f 43 72 65 61 74 65 53 70 |">Filer_CreateSp| 00001320 72 69 74 65 3c 2f 61 3e 2c 20 61 6e 64 20 66 69 |rite</a>, and fi| 00001330 6c 6c 69 6e 67 20 69 74 20 6f 75 74 20 77 69 74 |lling it out wit| 00001340 68 20 61 20 72 65 6c 65 76 61 6e 74 20 69 6d 61 |h a relevant ima| 00001350 67 65 2e 20 59 6f 75 20 63 61 6e 20 67 65 74 20 |ge. You can get | 00001360 61 74 20 74 68 65 20 64 69 73 63 20 6f 62 6a 65 |at the disc obje| 00001370 63 74 20 62 79 20 63 61 6c 6c 69 6e 67 20 3c 61 |ct by calling <a| 00001380 20 68 72 65 66 3d 22 2e 2f 53 57 49 73 23 4f 62 | href="./SWIs#Ob| 00001390 6a 65 63 74 4e 61 6d 65 22 3e 46 69 6c 65 72 5f |jectName">Filer_| 000013a0 4f 62 6a 65 63 74 4e 61 6d 65 3c 2f 61 3e 2e 20 |ObjectName</a>. | 000013b0 49 66 20 73 6f 6d 65 74 68 69 6e 67 20 67 6f 65 |If something goe| 000013c0 73 20 77 72 6f 6e 67 2c 20 79 6f 75 20 63 61 6e |s wrong, you can| 000013d0 20 72 65 74 75 72 6e 20 61 6e 20 65 72 72 6f 72 | return an error| 000013e0 2e 20 44 65 70 65 6e 64 69 6e 67 20 6f 6e 20 77 |. Depending on w| 000013f0 68 61 74 20 67 6f 65 73 20 77 72 6f 6e 67 2c 20 |hat goes wrong, | 00001400 69 74 20 6d 69 67 68 74 20 62 65 20 70 72 65 66 |it might be pref| 00001410 65 72 61 62 6c 65 20 74 6f 20 72 65 74 75 72 6e |erable to return| 00001420 20 61 20 64 65 66 61 75 6c 74 20 73 70 72 69 74 | a default sprit| 00001430 65 20 77 68 69 63 68 20 69 73 20 61 6c 72 65 61 |e which is alrea| 00001440 64 79 20 69 6e 20 74 68 65 20 77 69 6d 70 20 70 |dy in the wimp p| 00001450 6f 6f 6c 2e 20 49 6e 20 74 68 69 73 20 63 61 73 |ool. In this cas| 00001460 65 2c 20 74 68 65 20 62 65 73 74 20 73 69 7a 65 |e, the best size| 00001470 20 74 6f 20 72 65 74 75 72 6e 20 69 73 20 67 69 | to return is gi| 00001480 76 65 6e 20 62 79 20 52 35 2c 20 62 75 74 20 79 |ven by R5, but y| 00001490 6f 75 20 68 61 76 65 20 74 68 65 20 73 61 6d 65 |ou have the same| 000014a0 20 70 6f 73 73 69 62 69 6c 69 74 69 65 73 20 61 | possibilities a| 000014b0 73 20 6d 65 6e 74 69 6f 6e 65 64 20 75 6e 64 65 |s mentioned unde| 000014c0 72 20 3c 61 20 68 72 65 66 3d 22 23 33 30 34 22 |r <a href="#304"| 000014d0 3e 53 65 72 76 69 63 65 5f 46 69 6c 65 72 53 70 |>Service_FilerSp| 000014e0 72 69 74 65 3c 2f 61 3e 2e 0a 0a 54 68 65 20 62 |rite</a>...The b| 000014f0 65 73 74 20 77 61 79 20 74 6f 20 6d 61 6b 65 20 |est way to make | 00001500 61 6e 20 6f 72 69 67 69 6e 61 6c 20 73 70 72 69 |an original spri| 00001510 74 65 20 69 73 20 73 6f 6d 65 74 68 69 6e 67 20 |te is something | 00001520 6c 69 6b 65 3a 0a 0a 3c 70 72 65 3e 0a 41 44 52 |like:..<pre>.ADR| 00001530 20 52 31 2c 73 70 72 69 74 65 6d 6f 64 65 0a 53 | R1,spritemode.S| 00001540 57 49 20 58 46 69 6c 65 72 5f 43 72 65 61 74 65 |WI XFiler_Create| 00001550 53 70 72 69 74 65 20 3b 20 43 72 65 61 74 65 20 |Sprite ; Create | 00001560 61 20 73 70 72 69 74 65 0a 42 56 53 20 72 65 74 |a sprite.BVS ret| 00001570 75 72 6e 77 69 74 68 65 72 72 6f 72 0a 4d 4f 56 |urnwitherror.MOV| 00001580 20 52 33 2c 23 30 0a 4d 4f 56 20 52 30 2c 23 26 | R3,#0.MOV R0,#&| 00001590 32 33 43 0a 53 57 49 20 58 4f 53 5f 53 70 72 69 |23C.SWI XOS_Spri| 000015a0 74 65 4f 70 20 20 20 20 20 20 20 20 3b 20 53 77 |teOp ; Sw| 000015b0 69 74 63 68 20 6f 75 74 70 75 74 20 74 6f 20 73 |itch output to s| 000015c0 70 72 69 74 65 0a 42 56 53 20 72 65 74 75 72 6e |prite.BVS return| 000015d0 77 69 74 68 65 72 72 6f 72 0a 53 54 4d 46 44 20 |witherror.STMFD | 000015e0 52 31 33 21 2c 7b 52 30 2d 52 33 7d 0a 3b 44 6f |R13!,{R0-R3}.;Do| 000015f0 20 6e 6f 72 6d 61 6c 20 70 6c 6f 74 20 63 61 6c | normal plot cal| 00001600 6c 73 20 65 74 63 2e 20 69 6e 74 6f 20 74 68 65 |ls etc. into the| 00001610 20 73 70 72 69 74 65 0a 4c 44 4d 46 44 20 52 31 | sprite.LDMFD R1| 00001620 33 21 2c 7b 52 30 2d 52 33 7d 0a 53 57 49 20 58 |3!,{R0-R3}.SWI X| 00001630 4f 53 5f 53 70 72 69 74 65 4f 70 20 20 20 20 20 |OS_SpriteOp | 00001640 20 20 20 3b 20 53 77 69 74 63 68 20 6f 75 74 70 | ; Switch outp| 00001650 75 74 20 62 61 63 6b 20 74 6f 20 73 63 72 65 65 |ut back to scree| 00001660 6e 0a 42 56 53 20 61 61 72 67 68 0a 4d 4f 56 20 |n.BVS aargh.MOV | 00001670 52 30 2c 23 30 20 20 20 20 20 20 20 20 20 20 20 |R0,#0 | 00001680 20 20 20 20 3b 20 53 70 72 69 74 65 20 6f 6b 0a | ; Sprite ok.| 00001690 2e 72 65 74 75 72 6e 77 69 74 68 65 72 72 6f 72 |.returnwitherror| 000016a0 0a 4d 4f 56 20 52 31 2c 23 30 20 20 20 20 20 20 |.MOV R1,#0 | 000016b0 20 20 20 20 20 20 20 20 20 3b 20 43 6c 61 69 6d | ; Claim| 000016c0 20 63 61 6c 6c 0a 0a 2e 73 70 72 69 74 65 6d 6f | call...spritemo| 000016d0 64 65 0a 45 51 55 44 20 31 20 20 20 20 20 20 20 |de.EQUD 1 | 000016e0 20 20 3b 20 46 6f 72 6d 61 74 20 61 6c 77 61 79 | ; Format alway| 000016f0 73 20 31 0a 45 51 55 44 20 33 34 3a 45 51 55 44 |s 1.EQUD 34:EQUD| 00001700 33 34 20 3b 20 53 69 7a 65 20 69 6e 20 70 69 78 |34 ; Size in pix| 00001710 65 6c 73 0a 45 51 55 44 20 34 20 20 20 20 20 20 |els.EQUD 4 | 00001720 20 20 20 3b 20 6c 6f 67 32 62 70 70 2c 20 69 65 | ; log2bpp, ie| 00001730 2e 20 33 32 4b 20 63 6f 6c 6f 75 72 73 0a 45 51 |. 32K colours.EQ| 00001740 55 44 20 2d 31 20 20 20 20 20 20 20 20 3b 20 4e |UD -1 ; N| 00001750 6f 20 66 72 65 71 75 65 6e 63 79 0a 45 51 55 44 |o frequency.EQUD| 00001760 20 2d 31 20 20 20 20 20 20 20 20 3b 20 4e 6f 20 | -1 ; No | 00001770 6d 6f 64 65 76 61 72 73 0a 3c 2f 70 72 65 3e 0a |modevars.</pre>.| 00001780 0a 3c 70 3e 49 66 20 74 68 65 20 67 65 6e 65 72 |.<p>If the gener| 00001790 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 69 6d 61 |ation of the ima| 000017a0 67 65 20 69 73 20 67 6f 69 6e 67 20 74 6f 20 74 |ge is going to t| 000017b0 61 6b 65 20 6d 6f 72 65 20 74 68 61 6e 20 61 20 |ake more than a | 000017c0 73 65 63 6f 6e 64 20 6f 72 20 73 6f 2c 20 79 6f |second or so, yo| 000017d0 75 0a 6d 69 67 68 74 20 63 6f 6e 73 69 64 65 72 |u.might consider| 000017e0 20 72 75 6e 6e 69 6e 67 20 74 68 65 20 70 72 6f | running the pro| 000017f0 63 65 73 73 20 69 6e 20 74 68 65 20 62 61 63 6b |cess in the back| 00001800 67 72 6f 75 6e 64 20 28 65 2e 67 2e 20 75 73 69 |ground (e.g. usi| 00001810 6e 67 20 4f 53 5f 43 61 6c 6c 45 76 65 72 79 29 |ng OS_CallEvery)| 00001820 2e 0a 49 6e 20 74 68 69 73 20 63 61 73 65 20 75 |..In this case u| 00001830 73 65 20 3c 61 20 68 72 65 66 3d 22 2e 2f 53 57 |se <a href="./SW| 00001840 49 73 23 4f 62 6a 65 63 74 4e 61 6d 65 22 3e 46 |Is#ObjectName">F| 00001850 69 6c 65 72 5f 4f 62 6a 65 63 74 4e 61 6d 65 3c |iler_ObjectName<| 00001860 2f 61 3e 20 74 6f 20 6f 62 74 61 69 6e 20 61 20 |/a> to obtain a | 00001870 63 6f 70 79 20 6f 66 20 74 68 65 20 70 61 74 68 |copy of the path| 00001880 6e 61 6d 65 20 61 6e 64 20 72 65 74 75 72 6e 0a |name and return.| 00001890 77 69 74 68 20 52 30 20 70 6f 69 6e 74 69 6e 67 |with R0 pointing| 000018a0 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 | to the name of | 000018b0 61 20 73 70 72 69 74 65 20 69 6e 20 74 68 65 20 |a sprite in the | 000018c0 77 69 6d 70 20 70 6f 6f 6c 2c 20 61 6e 64 20 52 |wimp pool, and R| 000018d0 31 3d 30 2e 20 44 6f 6e 27 74 20 75 73 65 0a 3c |1=0. Don't use.<| 000018e0 61 20 68 72 65 66 3d 22 2e 2f 53 57 49 73 23 43 |a href="./SWIs#C| 000018f0 72 65 61 74 65 53 70 72 69 74 65 22 3e 46 69 6c |reateSprite">Fil| 00001900 65 72 5f 43 72 65 61 74 65 53 70 72 69 74 65 3c |er_CreateSprite<| 00001910 2f 61 3e 20 61 73 20 74 68 65 20 6d 65 6d 6f 72 |/a> as the memor| 00001920 79 20 75 73 65 64 20 74 6f 20 68 6f 6c 64 20 74 |y used to hold t| 00001930 68 65 73 65 20 73 70 72 69 74 65 73 20 69 73 20 |hese sprites is | 00001940 6e 6f 74 20 61 6c 77 61 79 73 0a 61 63 63 65 73 |not always.acces| 00001950 73 69 62 6c 65 2e 20 49 6e 73 74 65 61 64 20 6d |sible. Instead m| 00001960 61 6b 65 20 79 6f 75 72 20 6f 77 6e 20 73 70 72 |ake your own spr| 00001970 69 74 65 20 73 6f 6d 65 77 68 65 72 65 2c 20 28 |ite somewhere, (| 00001980 65 2e 67 2e 20 69 6e 20 52 4d 41 29 2e 20 57 68 |e.g. in RMA). Wh| 00001990 65 6e 20 79 6f 75 20 61 72 65 0a 64 6f 6e 65 20 |en you are.done | 000019a0 63 61 6c 6c 20 3c 61 20 68 72 65 66 3d 22 2e 2f |call <a href="./| 000019b0 53 57 49 73 23 43 6f 70 79 53 70 72 69 74 65 22 |SWIs#CopySprite"| 000019c0 3e 46 69 6c 65 72 5f 43 6f 70 79 53 70 72 69 74 |>Filer_CopySprit| 000019d0 65 3c 2f 61 3e 2e 20 54 68 65 20 66 69 6c 65 72 |e</a>. The filer| 000019e0 20 77 69 6c 6c 20 74 61 6b 65 20 61 20 63 6f 70 | will take a cop| 000019f0 79 20 6f 66 20 79 6f 75 72 20 73 70 72 69 74 65 |y of your sprite| 00001a00 20 61 6e 64 20 75 73 65 0a 69 74 20 61 6e 64 20 | and use.it and | 00001a10 79 6f 75 20 63 61 6e 20 64 69 73 63 61 72 64 20 |you can discard | 00001a20 79 6f 75 72 20 63 6f 70 79 2e 20 54 68 65 6e 20 |your copy. Then | 00001a30 75 73 65 20 3c 61 20 68 72 65 66 3d 22 2e 2f 53 |use <a href="./S| 00001a40 57 49 73 23 53 65 74 53 70 72 69 74 65 22 3e 46 |WIs#SetSprite">F| 00001a50 69 6c 65 72 5f 53 65 74 53 70 72 69 74 65 3c 2f |iler_SetSprite</| 00001a60 61 3e 20 77 69 74 68 20 74 68 65 20 6e 61 6d 65 |a> with the name| 00001a70 20 61 6e 64 0a 74 68 65 20 73 70 72 69 74 65 20 | and.the sprite | 00001a80 77 69 6c 6c 20 62 65 20 73 68 6f 77 6e 20 69 6e |will be shown in| 00001a90 20 74 68 65 20 76 69 65 77 65 72 2e 3c 62 72 3e | the viewer.<br>| 00001aa0 0a 44 6f 6e 27 74 20 61 74 74 65 6d 70 74 20 74 |.Don't attempt t| 00001ab0 6f 20 63 61 6c 6c 20 57 69 6d 70 5f 50 6f 6c 6c |o call Wimp_Poll| 00001ac0 2c 20 74 68 61 74 20 77 69 6c 6c 20 66 61 69 6c |, that will fail| 00001ad0 20 68 6f 72 72 69 62 6c 79 2e 20 59 6f 75 20 63 | horribly. You c| 00001ae0 61 6e 20 73 74 61 72 74 20 79 6f 75 72 0a 6f 77 |an start your.ow| 00001af0 6e 20 77 69 6d 70 74 61 73 6b 20 69 66 20 79 6f |n wimptask if yo| 00001b00 75 20 77 61 6e 74 20 61 6e 64 20 70 6f 6c 6c 20 |u want and poll | 00001b10 77 68 69 6c 65 20 79 6f 75 20 64 72 61 77 20 69 |while you draw i| 00001b20 6e 20 74 68 65 20 62 61 63 6b 67 72 6f 75 6e 64 |n the background| 00001b30 2e 20 49 66 20 61 6e 20 65 72 72 6f 72 0a 6f 63 |. If an error.oc| 00001b40 63 75 72 73 20 72 65 74 75 72 6e 20 77 69 74 68 |curs return with| 00001b50 20 52 30 2d 3e 65 72 72 6f 72 62 6c 6f 63 6b 20 | R0->errorblock | 00001b60 61 6e 64 20 52 31 3d 30 2e 20 54 68 65 20 65 72 |and R1=0. The er| 00001b70 72 6f 72 20 74 65 78 74 20 77 69 6c 6c 20 62 65 |ror text will be| 00001b80 0a 75 73 65 64 20 69 6e 20 74 68 65 20 49 6e 66 |.used in the Inf| 00001b90 6f 20 62 6f 78 2c 20 61 6e 64 20 74 68 65 20 6f |o box, and the o| 00001ba0 62 6a 65 63 74 20 77 69 6c 6c 20 67 65 74 20 74 |bject will get t| 00001bb0 68 65 20 27 66 69 6c 65 5f 65 72 72 27 20 73 70 |he 'file_err' sp| 00001bc0 72 69 74 65 2e 3c 62 72 3e 0a 49 66 20 61 6e 20 |rite.<br>.If an | 00001bd0 65 72 72 6f 72 20 6f 63 63 75 72 73 20 69 6e 20 |error occurs in | 00001be0 61 20 62 61 63 6b 67 72 6f 75 6e 64 20 70 72 6f |a background pro| 00001bf0 63 65 73 73 2c 20 79 6f 75 20 63 61 6e 20 65 69 |cess, you can ei| 00001c00 74 68 65 72 20 72 65 70 6f 72 74 20 69 74 20 61 |ther report it a| 00001c10 73 20 6e 6f 72 6d 61 6c 0a 28 69 66 20 79 6f 75 |s normal.(if you| 00001c20 20 61 72 65 20 61 20 77 69 6d 70 20 74 61 73 6b | are a wimp task| 00001c30 29 20 6f 72 20 79 6f 75 20 63 61 6e 20 63 61 6c |) or you can cal| 00001c40 6c 20 3c 61 20 68 72 65 66 3d 22 2e 2f 53 57 49 |l <a href="./SWI| 00001c50 73 23 53 65 74 53 70 72 69 74 65 22 3e 46 69 6c |s#SetSprite">Fil| 00001c60 65 72 5f 53 65 74 53 70 72 69 74 65 3c 2f 61 3e |er_SetSprite</a>| 00001c70 20 61 73 20 64 65 73 63 72 69 62 65 64 20 62 65 | as described be| 00001c80 6c 6f 77 2c 0a 77 68 69 63 68 20 77 69 6c 6c 20 |low,.which will | 00001c90 67 69 76 65 20 74 68 65 20 73 61 6d 65 20 65 66 |give the same ef| 00001ca0 66 65 63 74 20 61 73 20 61 6e 20 65 72 72 6f 72 |fect as an error| 00001cb0 20 69 6e 20 74 68 65 20 53 65 72 76 69 63 65 20 | in the Service | 00001cc0 63 6f 64 65 2e 0a 0a 0a 3c 68 32 3e 3c 61 20 6e |code....<h2><a n| 00001cd0 61 6d 65 3d 22 33 30 43 22 3e 53 65 72 76 69 63 |ame="30C">Servic| 00001ce0 65 5f 46 69 6c 65 72 4f 70 65 6e 43 6c 6f 73 65 |e_FilerOpenClose| 00001cf0 20 28 26 33 30 43 29 3c 2f 61 3e 3c 2f 68 32 3e | (&30C)</a></h2>| 00001d00 0a 0a 3c 70 72 65 3e 4f 6e 20 65 6e 74 72 79 3a |..<pre>On entry:| 00001d10 0a 52 30 09 4f 62 6a 65 63 74 20 6e 61 6d 65 0a |.R0.Object name.| 00001d20 52 31 09 26 33 30 43 0a 4f 6e 20 65 78 69 74 3a |R1.&30C.On exit:| 00001d30 0a 41 6c 6c 20 72 65 67 73 20 70 72 65 73 65 72 |.All regs preser| 00001d40 76 65 64 20 28 64 6f 6e 27 74 20 63 6c 61 69 6d |ved (don't claim| 00001d50 29 0a 3c 2f 70 72 65 3e 0a 0a 3c 70 3e 54 68 69 |).</pre>..<p>Thi| 00001d60 73 20 69 73 20 61 20 6d 65 73 73 61 67 65 20 74 |s is a message t| 00001d70 6f 20 61 6c 6c 20 70 72 6f 67 72 61 6d 73 20 64 |o all programs d| 00001d80 69 73 70 6c 61 79 69 6e 67 20 64 69 73 63 20 6f |isplaying disc o| 00001d90 62 6a 65 63 74 73 20 28 65 2e 67 2e 20 50 69 6e |bjects (e.g. Pin| 00001da0 62 6f 61 72 64 29 2e 0a 3c 62 72 3e 49 74 20 69 |board)..<br>It i| 00001db0 73 20 67 69 76 65 6e 20 77 68 65 6e 20 61 20 76 |s given when a v| 00001dc0 69 65 77 65 72 20 69 73 20 6f 70 65 6e 65 64 20 |iewer is opened | 00001dd0 6f 72 20 63 6c 6f 73 65 64 2e 20 57 68 65 6e 20 |or closed. When | 00001de0 72 65 63 65 69 76 69 6e 67 20 74 68 69 73 20 63 |receiving this c| 00001df0 61 6c 6c 2c 20 79 6f 75 0a 63 61 6e 20 63 68 65 |all, you.can che| 00001e00 63 6b 20 69 66 20 74 68 65 20 6f 62 6a 65 63 74 |ck if the object| 00001e10 20 69 73 20 6f 6e 65 20 79 6f 75 20 61 72 65 20 | is one you are | 00001e20 64 69 73 70 6c 61 79 69 6e 67 2e 20 49 66 20 69 |displaying. If i| 00001e30 74 20 69 73 2c 20 79 6f 75 20 73 68 6f 75 6c 64 |t is, you should| 00001e40 20 63 61 6c 6c 0a 3c 61 20 68 72 65 66 3d 22 2e | call.<a href=".| 00001e50 2f 53 57 49 73 23 53 70 72 69 74 65 22 3e 46 69 |/SWIs#Sprite">Fi| 00001e60 6c 65 72 5f 53 70 72 69 74 65 3c 2f 61 3e 20 74 |ler_Sprite</a> t| 00001e70 6f 20 67 65 74 20 74 68 65 20 63 6f 72 72 65 63 |o get the correc| 00001e80 74 20 73 70 72 69 74 65 20 66 6f 72 20 74 68 65 |t sprite for the| 00001e90 20 6f 62 6a 65 63 74 2c 20 77 68 69 63 68 20 6d | object, which m| 00001ea0 61 79 20 6e 6f 77 20 68 61 76 65 20 63 68 61 6e |ay now have chan| 00001eb0 67 65 64 2e 20 54 68 65 20 6f 62 6a 65 63 74 20 |ged. The object | 00001ec0 6e 61 6d 65 20 69 73 20 74 68 65 20 6e 61 6d 65 |name is the name| 00001ed0 20 6f 66 20 74 68 65 20 76 69 65 77 65 72 20 74 | of the viewer t| 00001ee0 68 61 74 20 77 61 73 20 6f 70 65 6e 65 64 2f 63 |hat was opened/c| 00001ef0 6c 6f 73 65 64 2e 0a 0a 0a 3c 68 32 3e 3c 61 20 |losed....<h2><a | 00001f00 6e 61 6d 65 3d 22 33 31 30 22 3e 53 65 72 76 69 |name="310">Servi| 00001f10 63 65 5f 46 69 6c 65 72 45 6e 75 6d 65 72 61 74 |ce_FilerEnumerat| 00001f20 65 43 6c 69 65 6e 74 73 20 28 26 33 31 30 29 3c |eClients (&310)<| 00001f30 2f 61 3e 3c 2f 68 32 3e 0a 0a 3c 70 72 65 3e 4f |/a></h2>..<pre>O| 00001f40 6e 20 65 6e 74 72 79 3a 0a 52 30 09 30 20 6f 72 |n entry:.R0.0 or| 00001f50 20 31 2c 20 73 65 65 20 62 65 6c 6f 77 0a 52 31 | 1, see below.R1| 00001f60 09 26 33 31 30 0a 4f 6e 20 65 78 69 74 3a 0a 52 |.&310.On exit:.R| 00001f70 65 67 69 73 74 65 72 73 20 70 72 65 73 65 72 76 |egisters preserv| 00001f80 65 64 20 74 6f 20 70 61 73 73 20 6f 6e 2e 0a 49 |ed to pass on..I| 00001f90 66 20 63 6c 61 69 6d 65 64 3a 0a 52 30 09 4d 6f |f claimed:.R0.Mo| 00001fa0 64 75 6c 65 20 74 69 74 6c 65 0a 52 31 09 30 0a |dule title.R1.0.| 00001fb0 52 32 09 50 6f 69 6e 74 65 72 20 74 6f 20 64 65 |R2.Pointer to de| 00001fc0 73 63 72 69 70 74 69 6f 6e 20 62 6c 6f 63 6b 0a |scription block.| 00001fd0 3c 2f 70 72 65 3e 0a 0a 3c 70 3e 54 68 69 73 20 |</pre>..<p>This | 00001fe0 63 61 6c 6c 20 69 73 20 6d 61 64 65 20 77 68 65 |call is made whe| 00001ff0 6e 20 6d 61 6b 69 6e 67 20 61 20 6c 69 73 74 20 |n making a list | 00002000 6f 66 20 74 68 65 20 76 61 72 69 6f 75 73 20 46 |of the various F| 00002010 69 6c 65 72 20 63 6c 69 65 6e 74 73 20 72 75 6e |iler clients run| 00002020 6e 69 6e 67 2e 0a 3c 62 72 3e 45 61 63 68 20 63 |ning..<br>Each c| 00002030 6c 69 65 6e 74 20 73 68 6f 75 6c 64 20 68 61 76 |lient should hav| 00002040 65 20 61 20 66 6c 61 67 20 73 6f 6d 65 77 68 65 |e a flag somewhe| 00002050 72 65 2e 20 57 68 65 6e 20 72 65 63 65 69 76 69 |re. When receivi| 00002060 6e 67 20 74 68 69 73 20 63 61 6c 6c 3a 0a 3c 62 |ng this call:.<b| 00002070 72 3e 49 66 20 52 30 3d 30 3a 20 43 6c 65 61 72 |r>If R0=0: Clear| 00002080 20 74 68 65 20 66 6c 61 67 20 61 6e 64 20 72 65 | the flag and re| 00002090 74 75 72 6e 20 77 69 74 68 6f 75 74 20 63 6c 61 |turn without cla| 000020a0 69 6d 69 6e 67 20 74 68 65 20 63 61 6c 6c 2e 0a |iming the call..| 000020b0 3c 62 72 3e 49 66 20 52 30 3d 31 3a 20 49 66 20 |<br>If R0=1: If | 000020c0 74 68 65 20 66 6c 61 67 20 69 73 20 73 65 74 2c |the flag is set,| 000020d0 20 72 65 74 75 72 6e 20 77 69 74 68 6f 75 74 20 | return without | 000020e0 63 6c 61 69 6d 69 6e 67 2e 20 49 66 20 69 74 20 |claiming. If it | 000020f0 69 73 20 63 6c 65 61 72 2c 20 73 65 74 20 69 74 |is clear, set it| 00002100 2c 20 61 6e 64 20 72 65 74 75 72 6e 20 77 69 74 |, and return wit| 00002110 68 20 52 30 20 70 6f 69 6e 74 69 6e 67 20 74 6f |h R0 pointing to| 00002120 20 74 68 65 20 6d 6f 64 75 6c 65 20 74 69 74 6c | the module titl| 00002130 65 2c 20 52 31 3d 30 20 61 6e 64 20 52 32 20 70 |e, R1=0 and R2 p| 00002140 6f 69 6e 74 69 6e 67 20 74 6f 20 74 68 65 20 64 |ointing to the d| 00002150 65 73 63 72 69 70 74 69 6f 6e 20 62 6c 6f 63 6b |escription block| 00002160 2e 0a 3c 62 72 3e 48 65 72 65 27 73 20 61 20 63 |..<br>Here's a c| 00002170 6f 64 65 20 65 78 61 6d 70 6c 65 20 6f 66 20 68 |ode example of h| 00002180 6f 77 20 69 74 20 63 6f 75 6c 64 20 77 6f 72 6b |ow it could work| 00002190 3a 0a 0a 3c 70 72 65 3e 2e 46 69 6c 65 72 45 6e |:..<pre>.FilerEn| 000021a0 75 6d 65 72 61 74 65 20 3b 20 52 30 3d 30 20 74 |umerate ; R0=0 t| 000021b0 6f 20 72 65 73 65 74 2c 20 31 20 74 6f 20 63 6c |o reset, 1 to cl| 000021c0 61 69 6d 0a 54 45 51 20 52 30 2c 23 30 0a 53 54 |aim.TEQ R0,#0.ST| 000021d0 52 45 51 20 52 30 2c 44 6f 6e 65 49 74 0a 4d 4f |REQ R0,DoneIt.MO| 000021e0 56 45 51 53 20 50 43 2c 52 31 34 0a 53 54 4d 46 |VEQS PC,R14.STMF| 000021f0 44 20 52 31 33 21 2c 7b 52 31 34 7d 0a 4c 44 52 |D R13!,{R14}.LDR| 00002200 20 52 31 34 2c 44 6f 6e 65 49 74 0a 54 45 51 20 | R14,DoneIt.TEQ | 00002210 52 31 34 2c 23 30 0a 4c 44 4d 4e 45 46 44 20 52 |R14,#0.LDMNEFD R| 00002220 31 33 21 2c 7b 50 43 7d 5e 0a 41 44 52 20 52 30 |13!,{PC}^.ADR R0| 00002230 2c 54 69 74 6c 65 53 74 72 69 6e 67 0a 53 54 52 |,TitleString.STR| 00002240 20 52 30 2c 44 6f 6e 65 49 74 0a 4d 4f 56 20 52 | R0,DoneIt.MOV R| 00002250 31 2c 23 30 0a 41 44 52 20 52 32 2c 44 65 73 63 |1,#0.ADR R2,Desc| 00002260 42 6c 6f 63 6b 0a 4c 44 4d 46 44 20 52 31 33 21 |Block.LDMFD R13!| 00002270 2c 7b 50 43 7d 5e 0a 0a 2e 44 6f 6e 65 49 74 20 |,{PC}^...DoneIt | 00002280 45 51 55 44 20 30 20 3b 20 49 6e 69 74 69 61 6c |EQUD 0 ; Initial| 00002290 20 73 74 61 74 65 20 64 6f 65 73 6e 27 74 20 6d | state doesn't m| 000022a0 61 74 74 65 72 0a 3c 2f 70 72 65 3e 0a 53 65 65 |atter.</pre>.See| 000022b0 20 3c 61 20 68 72 65 66 3d 22 2e 2f 45 78 74 65 | <a href="./Exte| 000022c0 72 6e 61 6c 22 3e 45 78 74 65 72 6e 61 6c 3c 2f |rnal">External</| 000022d0 61 3e 20 61 62 6f 75 74 20 74 68 65 20 66 6f 72 |a> about the for| 000022e0 6d 61 74 20 6f 66 20 74 68 65 20 64 65 73 63 72 |mat of the descr| 000022f0 69 70 74 69 6f 6e 20 62 6c 6f 63 6b 2e 0a 0a 0a |iption block....| 00002300 3c 68 32 3e 3c 61 20 6e 61 6d 65 3d 22 33 31 34 |<h2><a name="314| 00002310 22 3e 53 65 72 76 69 63 65 5f 46 69 6c 65 72 4e |">Service_FilerN| 00002320 65 77 43 68 6f 69 63 65 73 20 28 26 33 31 34 29 |ewChoices (&314)| 00002330 3c 2f 61 3e 3c 2f 68 32 3e 0a 0a 3c 70 72 65 3e |</a></h2>..<pre>| 00002340 4f 6e 20 65 6e 74 72 79 3a 0a 52 30 09 50 6f 69 |On entry:.R0.Poi| 00002350 6e 74 65 72 20 74 6f 20 6d 6f 64 75 6c 65 20 6e |nter to module n| 00002360 61 6d 65 0a 52 31 09 26 33 31 30 0a 4f 6e 20 65 |ame.R1.&310.On e| 00002370 78 69 74 3a 0a 52 31 09 30 20 6f 72 20 70 72 65 |xit:.R1.0 or pre| 00002380 73 65 72 76 65 64 0a 3c 2f 70 72 65 3e 0a 0a 3c |served.</pre>..<| 00002390 70 3e 57 68 65 6e 20 74 68 65 20 75 73 65 72 20 |p>When the user | 000023a0 63 68 61 6e 67 65 73 20 74 68 65 20 63 68 6f 69 |changes the choi| 000023b0 63 65 73 20 66 6f 72 20 61 20 63 6c 69 65 6e 74 |ces for a client| 000023c0 2c 20 74 68 69 73 20 73 65 72 76 69 63 65 20 63 |, this service c| 000023d0 61 6c 6c 20 69 73 20 6d 61 64 65 2e 20 49 74 20 |all is made. It | 000023e0 6d 65 61 6e 73 20 74 68 61 74 20 74 68 65 20 63 |means that the c| 000023f0 68 6f 69 63 65 73 20 6c 69 73 74 20 68 61 73 20 |hoices list has | 00002400 62 65 65 6e 20 75 70 64 61 74 65 64 20 77 69 74 |been updated wit| 00002410 68 20 6e 65 77 20 76 61 6c 75 65 73 2e 20 49 66 |h new values. If| 00002420 20 79 6f 75 20 64 6f 6e 27 74 20 6e 65 65 64 20 | you don't need | 00002430 74 6f 20 74 61 6b 65 20 73 70 65 63 69 61 6c 20 |to take special | 00002440 61 63 74 69 6f 6e 20 28 65 2e 67 2e 20 69 66 20 |action (e.g. if | 00002450 79 6f 75 20 75 73 65 20 74 68 65 20 76 61 6c 75 |you use the valu| 00002460 65 73 20 64 69 72 65 63 74 6c 79 20 66 72 6f 6d |es directly from| 00002470 20 74 68 65 20 63 68 6f 69 63 65 73 20 6c 69 73 | the choices lis| 00002480 74 29 2c 20 79 6f 75 20 63 61 6e 20 69 67 6e 6f |t), you can igno| 00002490 72 65 20 74 68 69 73 20 63 61 6c 6c 2e 0a 3c 62 |re this call..<b| 000024a0 72 3e 4f 74 68 65 72 77 69 73 65 20 79 6f 75 20 |r>Otherwise you | 000024b0 73 68 6f 75 6c 64 20 63 68 65 63 6b 20 69 66 20 |should check if | 000024c0 69 74 20 69 73 20 79 6f 75 72 20 6d 6f 64 75 6c |it is your modul| 000024d0 65 20 6e 61 6d 65 20 67 69 76 65 6e 20 69 6e 20 |e name given in | 000024e0 52 30 2e 20 49 66 20 69 74 20 69 73 2c 20 74 61 |R0. If it is, ta| 000024f0 6b 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 61 |ke appropriate a| 00002500 63 74 69 6f 6e 2c 20 74 68 65 6e 20 63 6c 61 69 |ction, then clai| 00002510 6d 20 74 68 65 20 63 61 6c 6c 2e 0a 3c 2f 62 6f |m the call..</bo| 00002520 64 79 3e 3c 2f 68 74 6d 6c 3e 0a |dy></html>.| 0000252b