home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1996 / ARCHIVE_96.iso / text / hints / volume_3 < prev    next >
Text File  |  1995-06-25  |  140KB  |  4,097 lines

  1. Å   Acorn DTP fonts and print outs Ö P.J.Burn says that in order to
  2. print out Acorn DTP documents on an A310 you should select mode 11 as
  3. this releases 40k of memory. He also says that in order to increase the
  4. speed of the DTP screen update you should ensure that the font cache is
  5. 24k or larger.
  6. 3.1
  7. Å   Acorn DTP double spacing Ö Some readers have complained that when
  8. starting a new paragraph the Acorn DTP will always produce a double
  9. space. This can be solved by altering the space above setting of the
  10. paragraphæs style.
  11. 3.1
  12. Å   BASIC listings for !Edit Ö Mark Taylor says that it is easy to
  13. create an ASCII copy of a BASIC program. Just install !Edit in the
  14. normal way and then create a task window (this can be done by clicking
  15. the MENU button on the !Edit icon and selecting the ÉNew task windowæ
  16. item from the ÉCreateæ sub-menu). In this window start BASIC by typing
  17. *BASIC, then just LOAD the required program and LIST it. You can now
  18. save the contents of the window  as a normal ASCII file.
  19. 3.1
  20. Å   C operating system calls (issue 2.12 p 36 cont) Ö Ray Loades-Bannon
  21. says that to access OSCLI commands from C you should use either:
  22. 3.1
  23. system (öscreensave <pathname>òò)
  24. 3.1
  25. or:
  26. 3.1
  27. {3 .1
  28.    char *cptr;
  29. 3.1
  30.    strcpy (cptr,öscreensave ò);
  31. 3.1
  32.    strcat(cptr,pathnameptr);
  33. 3.1
  34.    system(cptr);
  35. 3.1
  36. }
  37. 3.1
  38. See the ÉCalling other programs from Cæ chapter in the C manual for
  39. further details.
  40. 3.1
  41. Å   Debugger BreakPoints Ö When stepping though code, it is useful to
  42. run the code up to a breakpoint, and then remove the breakpoint and
  43. reposition it further ahead. Here are three function keys defin-itions
  44. suggested by Robin Terry to help you do this:
  45. 3.1
  46. *Key1 öBreakClr PC|MBreakSet ò
  47. 3.1
  48. *Key2 öContinue|Mò
  49. 3.1
  50. *Key3 öMemoryI PC|Mò
  51. 3.1
  52. The first breakpoint is set by using *BreakSet, but subsequent break
  53. points can be set by pressing <f1> and typing in the address. Then press
  54. <f2> should be pressed to execute the code , and <f3> should be pressed
  55. to look at where youæve got to.
  56. 3.1
  57. Å   Droom under RISC-OS Ö A.H.Eagle says that when using Droom under
  58. RISC-OS the $.Data.Map program just caused the computer to freeze at
  59. line 820. This line reads 820 ?&CFF=L, and doesnæt seem to serve any
  60. purpose (perhaps it is a hang-over from the BBC version). He removed
  61. this line and the program now seems to work OK ( ... so far!).
  62. 3.1
  63. Å   Econet and the Desktop Ö A warning to all people using the desktop
  64. on the network: *commands are truncated to about 80 characters by the
  65. NetFiler, so for example, if you are several directories down and you
  66. rename a file, it could be renamed to something that you didnæt quite
  67. expect. More dangerous is the *Delete, in that you could want to *delete
  68. net#254:<pathname>.FredOld  but your good copy is deleted when the
  69. command is truncated to *delete net#254:<pathname>.Fred. Truncation
  70. occurs due to the Acorn fileservers only being able to cope with data
  71. packets of around 80 characters (although the SJ Research fileserver can
  72. handle packets up to 128 characters). Another interesting feature is
  73. that if the *command is over 128 characters, no truncation occurs and a
  74. Net error is generated.
  75. 3.1
  76. Å   Filer_OpenDir revisited (issue 2.12 p 6 cont) Ö A simpler way of
  77. using system variables with the *Filer_OpenDir command has been
  78. suggested by one of the Archive BBS callers:
  79. 3.1
  80. *Set Alias$temp Filer_OpenDir <system variable>|MUnset Alias$temp|M
  81. 3.1
  82. *temp
  83. 3.1
  84. This sets up a system variable, called Alias$temp, which is used to
  85. expand the system variable and then delete itself once called.
  86. 3.1
  87. Å   Hard Disc Backup program on Careware 3 Ö Terry Bromilow says: öThe
  88. program was originally written to run under Arthur OS using the D or L
  89. format discs. I put a new front end on it to make an application for
  90. RISC-OS and put in some lines to accommodate E format discs. It is now
  91. evident that the latter did not get tested.
  92. 3.1
  93. The BASIC program !Hdb_v200 in the !HDBackup directory should be amended
  94. as follows:-
  95. 3.1
  96. Interchange the adjacent lines 2140 and 2150 and put a new line between
  97. them: 2141 *DISMOUNT
  98. 3.1
  99. Å   Hard disc parking (2.11 p 13 cont) Ö Martyn Lovell says that
  100. although *bye from a non-adfs filing system wonæt park an adfs hard disc
  101. *adfs:bye will (SCSI hard drive owners should use *scsi:bye).
  102. 3.1
  103. Å   Keyboard condensation Ö One reader has noted that there is no
  104. lacquer on the top surface of the keyboard PCB. It is not unusual for
  105. people to blow dust, etc away from the keyboard, however, this will
  106. cause condensation onto the PCB and cause some minor corrosion. This can
  107. easily be wiped away.
  108. 3.1
  109. Å   Limited ADFS memory error Ö The ADFS module will remember the
  110. catalogues of any discs it sees (e.g. those that it *mounts). However,
  111. it is limited to the amount of memory it can allocate to Érememberingæ
  112. these catalogues. This is governed by the *Configure ADFSDirCache
  113. command. When the ADFS directory cache is full, the oldest catalogues
  114. should be discarded as new ones are encountered. Unfortunately, the 
  115. module has a bug, which prevents it from doing this properly. What makes
  116. this bug so serious is that it can cause the dreaded ÉFilecore in useæ
  117. error, which cannot be rectified, thereby making it impossible for you
  118. to save any data, etc that you might have been working on. (If Phil
  119. Colmer at Acorn, or whoever, could give us a clue on this one, that
  120. would be useful. Ed.)
  121. 3.1
  122. Å   Naming discs Ö You may already realise that you should not give
  123. discs the same name (using the *NameDisc command) as RISC-OS will only
  124. access one of the discs i.e. the one most recently *MOUNTed. David
  125. Leckie found that this also holds up for fileservers discs. He had two
  126. separate fileservers 254 and 245 both with hard disks called FS, as you
  127. can imagine this cause much confusion!
  128. 3.1
  129. Å   Obey module bug Ö öSpeak and I shall obey ... or maybe not.ò There
  130. is a bug in the obey module supplied in the ROMS (v0.07). If an
  131. environment variable is set to a string ending with the tilde character
  132. (~) then the string will magically acquire a few extra characters, or
  133. worse.
  134. 3.1
  135. Using Edit, create a new obey file containing the command:
  136. 3.1
  137. Set testvariable abcdef~
  138. 3.1
  139. or similar, ensuring that the <return> key is pressed immediately after
  140. the tilde (~). Save the file to a directory window and then double click
  141. on the file icon to run the file. This will create the variable
  142. ötestvariableò. Press <f12> to get a system prompt and type
  143. 3.1
  144. Show testvariable
  145. 3.1
  146. to display the variableæs value. It will show some-thing like
  147. 3.1
  148. testvariable : abcdef~~&æ
  149. 3.1
  150. i.e. it has acquired a few extra characters. (N.B. Iæve been unable to
  151. repeat (see below) this so the characters may be wrong Ö but I do know
  152. where they originate from so this is an educated guess)
  153. 3.1
  154. Worse is that depending on the exact situation when the file is run an
  155. öAbort on Data Transferò error may occur (!!) and the variable will not
  156. have been created.
  157. 3.1
  158. The problem is easily solved Ö donæt try and create a string ending with
  159. ~ in an obey file. If necessary a space can be placed after the tilde
  160. (~) and this will be enough to prevent the error. Clifford Hoggarth
  161. 3.1
  162. Å   RAM disc size Ö To read the size of a RAM disc, not *configured but
  163. set from within the desktop task manager you should use:
  164. 3.1
  165. SYS öOS_ReadRAMFsLimitsò TO A,B
  166. 3.1
  167. (B-A)/1024 gives the size of the the RAM disc in kbytes.
  168. 3.1
  169. To check if a *configured ram disc exists then try:
  170. 3.1
  171. SYS öOS_Byteò,161,144 To ,,ramdiscsize%
  172. 3.1
  173. The variable ramdiscsize% indicates the number of RAM pages to be
  174. allocated to the RAM disc e.g. 8k blocks for a 300 series.
  175. 3.1
  176. Å   Recursive directory copying Ö If you copy a directory into itself
  177. (as Clive Payne did with his library directory in issue 2.11 p 15) the
  178. computer will get into an infinite loop of copying directories inside of
  179. themselves. To stop the computer from using all your disc space up, you
  180. can press the escape key. The error can then be rectified by going into
  181. the parent directory and deleting its children i.e. you donæt have to
  182. reformat your disc!
  183. 3.1
  184. Å   ROM Speed Up Ö In several Archive issues (e.g. issue 2.11 p 8) we
  185. have pointed out that the speed at which the Archimedes runs its ROMs
  186. can be increased. Martyn Lovell advises us that this can cause RISC-OS
  187. to crash and so is not very reliable.
  188. 3.1
  189. Å   Squish Ö I am very pleased with Mike Harrisonæs öSQUISHò program (on
  190. Careware disc 2). It enables me to write meaningful, well laid out
  191. programs and then to gain processing speed following compression.
  192. Brilliant!
  193. 3.1
  194. I have, however, discovered a bug. This occurs whenever you use a
  195. statement such as:
  196. 3.1
  197. IF a=b c=d
  198. 3.1
  199. What actually happens is that it compresses to:
  200. 3.1
  201. IF a=bc=d
  202. 3.1
  203. The program then fails öUnknown or missing variableò. To circumvent
  204. this, the full construct IF ... THEN ... should be used. B.R.Wilson,
  205. Solihull
  206. 3.1
  207. Å   Uncluttering catalogues (2.11 p 13 cont) Ö If you close down an
  208. application using the ADJUST button the filer will (re)open the viewer
  209. containing the file you last accessed.
  210. 3.1
  211. Å   Using Sys$DateFormat (issue 2.12 p 19 cont) Ö Mark Taylor (along
  212. with several others) has answered a question which appeared in last
  213. monthæs Help!!! column.
  214. 3.1
  215. The system variable Sys$DateFormat is only used by the SWI call
  216. OS_ConvertStandardDate AndTime and not by the BASIC pseudo variable
  217. TIME$ (see pp 400-402 of the old PRM for further details).
  218. 3.1
  219.  10 REM >$.Convert
  220. 3.1
  221.  20 REM a program to convert TIME &
  222. 3.1
  223.  DATE in to a string,
  224. 3.1
  225.  30 REM in the format of the system
  226. 3.1
  227. variable Sys$DateFormat
  228. 3.1
  229.  40 :
  230. 3.1
  231.  50 REM some workspace for the time
  232. 3.1
  233.  & date SYS call
  234. 3.1
  235.  60 DIM block% 100
  236. 3.1
  237.  70 :
  238. 3.1
  239.  80 *Set Sys$DateFormat
  240. 3.1
  241. %yr%mn%dy%24%mi%se
  242. 3.1
  243.  90 string$=FNtime_date
  244. 3.1
  245. 100 PRINT öThe time is
  246. 3.1
  247. (YYMMDDHHMMSS) = ö;string$
  248. 3.1
  249. 110 END
  250. 3.1
  251. 120 :
  252. 3.1
  253. 130 DEFFNtime_date
  254. 3.1
  255. 140 REM first get 5 byte time code
  256. 3.1
  257. 150 REM using OS_Word &0E,3
  258. 3.1
  259. 160 SYS öOS_Wordò,&0E,3 TO r0,r1
  260. 3.1
  261. 170 :
  262. 3.1
  263. 180 REM get date & time string
  264. 3.1
  265. 190 SYS öOS_ConvertStandardDate
  266. 3.1
  267. AndTimeö,block%,block%+50,49
  268. 3.1
  269.  TO r0,r1,r2
  270. 3.1
  271. 200 :
  272. 3.1
  273. 210 REM extract string from data
  274. 3.1
  275.  block
  276. 3.1
  277. 220 date$=öò
  278. 3.1
  279. 230 FOR x%=0 TO (12-r2)
  280. 3.1
  281. 240 data$+=CHR$(r0?x%)
  282. 3.1
  283. 250 NEXT x%
  284. 3.1
  285. 260 =date$
  286. 3.1
  287.  
  288. 3.1
  289. Å   VIDC warning Ö Someone (Philip Green, I think) sent in a warning to
  290. say that you should NEVER connect and disconnect video and monitor
  291. connections with the computer switched on for fear of damaging the VIDC.
  292. 3.1
  293. I have been doing just that for two years now on several different
  294. Archimedes computers and have NEVER had any problems, so I wasnæt going
  295. to bother printing the warning Ö it seemed a little over cautious. This
  296. morning I connected up a brand new monitor, live as usual, and got a
  297. funny picture. öDratò, says I, öItæs a DOA and will have to go back to
  298. the distributor from whence it came!ò However, further fiddling and
  299. switching of monitors (live) between computers revealed that the
  300. computer was at fault Ö there were funny dark vertical lines down the
  301. display and the sound was a bit croaky (sound comes through VIDC). This
  302. is what you call learning the hard way or öPride comes before a fallò or
  303. something. Anyway, donæt say we didnæt warn you! Ed.
  304. 3.1
  305. Å   Hints & Tips printing error, Archive 2.12 p 7. The IF statement at
  306. line 750 is incorrect Ö a 7 has been cut off by the editor Ö Ékey% < 5æ
  307. should read Ékey% <57æ.
  308.  
  309. Å   *RMTidy and ADFS Ö If you perform a *RMTidy any discs will be
  310. dismounted and any directory settings (*DIR) will be lost. This is
  311. because this function re-initialises all the modules including the
  312. FileCore%ADFS and ADFS modules.
  313. 3.2
  314. Å   Acorn DTP Ö if you want to import text that has a return at the end
  315. of each line e.g. spooled BASIC programs, poetry, songs, etc then if you
  316. import them directly Acorn DTP will ignore the returns and give you a
  317. continuous block of text. There is a way around this problem:
  318. 3.2
  319. 1) In Acorn DTP define a new style say PROGRAM or SONG, etc
  320. 3.2
  321. 2) Set the space above parameter to 0
  322. 3.2
  323. 3) Load your text into !Edit
  324. 3.2
  325. 4) Select the find window of the !Edit menu i.e. press <f4>
  326. 3.2
  327. 5) Select the Émagic charactersæ option
  328. 3.2
  329. 6) Type: \x0A into the find box and /x0a/x0a in the replace box
  330. 3.2
  331. 7) Select the GO option and then select the Éreplace end of fileæ option
  332. 3.2
  333. The effect is that each line is treated as a new paragraph with its
  334. style defined as PROGRAM.
  335. 3.2
  336. Å   Alphabase RISC-OS compatible? I read Gerald Fittonæs tale of woe
  337. (Archive 2.12 p43) just two days after encountering exactly the same
  338. problem myself with Alphabase. The ÉReadmeæ file on the program disc
  339. states that hard disc installation can be done in Éthe usual RISC-OS
  340. manneræ rather that using the ÉInstallæ file. It seems to me that it
  341. must be done in the former way! Apart from messing up the configure
  342. settings as Gerald describes, ÉInstallæ fails to copy the !Alphabase
  343. application directory to drive 4 (it canæt, since the *COPY command
  344. issued at line 160 has no R option). Remedying this doesnæt help: the
  345. program still crashes with a Écanæt findæ message when you attempt to
  346. boot via the Library. After wasting many hours in debugging attempts, I
  347. scrubbed the lot and simply copied !Alphabase to :4.$, whence the
  348. program is run without problems by clicking on the desktop. Inciden
  349. tally, again contrary to what is said on the ÉReadmeæ file, the floppy
  350. disc stubbornly refused to boot on Shift-Break. Bill Templeton.
  351. 3.2
  352. Å   Archimedes Fans Ö Ray Maidstone of Norwich has been investigating
  353. Archimedes fans (the cooling kind). He says that if you plug in any
  354. extensions on to your Archimedes e.g. backplanes, RAM upgrades, etc then
  355. you really should be using a fan. This keeps the temperature of the
  356. Archimedes at an acceptable level, thereby extending the life of the
  357. components.
  358. 3.2
  359. Å   Binary-Chop Ö Michael Sawle sent in this routine which can be used
  360. for locating an item in an array Ö one of the beauties of this routine
  361. being that it only needs enough characters to uniquely identify the
  362. string being searched for. The routine requires data to be stored
  363. alphabetically in a matrix M$(1),M$(2),...,M(NR%) where NR% is the
  364. number of records currently stored. The routine returns the matrix
  365. element number of the desired record (or nearest available).
  366. 3.2
  367. DEFFNbinarychop(find$)
  368. 3.2
  369. LOCAL A%,B%,R%
  370. 3.2
  371. where=0 : A%=0 : B%=NR%
  372. 3.2
  373. REPEAT
  374. 3.2
  375. R%=INT((A%+B%)/2)
  376. 3.2
  377. IF M$(R%)>find$ THEN
  378. 3.2
  379. B%=R%
  380. 3.2
  381. ELSE
  382. 3.2
  383. IF M$(R%)<find$ THEN A%=R%
  384. 3.2
  385. ELSE
  386. 3.2
  387. where=R%
  388. 3.2
  389. ENDIF
  390. 3.2
  391. ENDIF
  392. 3.2
  393. UNTIL where>0 OR B%-A%=1
  394. 3.2
  395. IF where=0 THEN where=A%+1
  396. 3.2
  397. =where
  398. 3.2
  399. In fact this routine should be called a binary search routine. It chops
  400. the list of records in two and then checks which half of the data set
  401. the search string should appear. It then chops this half in two and so
  402. on until finds the string or it realises the string does not exist. This
  403. means that the computer can significantly reduce the number of checks it
  404. has to make before reaching a result e.g. if you have 32768 (i.e. 2^15)
  405. records then the computer will make a maximum of 15 checks. The price
  406. that must be paid for this efficiency is that the data set must be
  407. sorted in some recognisable order e.g. alphabetically, numerically,
  408. ASCII, etc. The best versions of this technique are usually recursive.
  409. (Perhaps someone might like to have a go at writing one?)
  410. 3.2
  411. Å   Colour TVæs as monitors Ö Several times in Hints & Tips, connection
  412. of the Archimedes to colour TVæs has been mentioned. I have succeeded in
  413. doing just this. In Archive 2.7 p11, Oliver Cornes says that plugging
  414. the Archimedesæ SCART into a video recorder doesnæt work Ö this is
  415. because a VCR only deals with composite signals, not RGB. However, if
  416. your TV has a SCART socket, and many new ones do, then connection may
  417. well be possible direct to the TV. You will have to tell the TV to use
  418. RGB input, not the composite (it only uses composite then for timing).
  419. There may be (indeed, it would be odd if there wasnæt) a way of doing
  420. this with the TV controls. My TV has two sockets and if you tell it to
  421. use socket 0 it uses socket one with RGB.
  422. 3.2
  423. However, I didnæt find this out until I found out that one of the pins
  424. on the SCART standard is for just this type of use Ö pin 16 must be
  425. between +1V and +3V with respect to pin 18 (i.e. connect a 1.5V battery
  426. between them Ö the Öve end to pin 18, the +ve end to pin 16). The TV
  427. then automatically switches to SCART RGB input. Note that this overrides
  428. any channel selection made, so you should put a switch in line so you
  429. can switch the signal off, otherwise you canæt watch TV. Connection to
  430. the SCART plug is often maligned as difficult, but it is only a case of
  431. knowing how to do it. The proper way is to remove the pin you wish to
  432. make connection to, connect it up and then put it back. The pins have
  433. barbs to prevent them from falling out, so use a pair of narrow pliers
  434. to squeeze the barb back and push the pin out through the rear of the
  435. plug. Also make sure that you re-insert the pin the right way round Ö
  436. just copy the other pins. They only go in properly one way round anyway.
  437. Kevin Quinn
  438. 3.2
  439. Å   FileCore in use remedy Ö If the Archimedes Éseesæ too many ADFS
  440. directories then a ÉFilecore in useæ error may occur and you will be
  441. unable to save any data in your machine. You can overcome this by typing
  442. the following four lines after the error has occurred:
  443. 3.2
  444. *RmReInit FileCore (this will fail giving a Bad number error)
  445. 3.2
  446. *RmReInit FileCore
  447. 3.2
  448. *RmReInit ADFS
  449. 3.2
  450. *RmReInit HardDisc (A300æs and A3000æs only)
  451. 3.2
  452. Å   MaxGammon update Ö The MaxGammon game on Careware 2 cannot be played
  453. in mode 15. In order to over come this you should:
  454. 3.2
  455. 1) Load in the BASIC !RunImage file in the !MaxGammon directory.
  456. 3.2
  457. 2) Type the following:
  458. 3.2
  459. 10840colour%=FNmg_Colour(mg_red
  460. 3.2
  461. _player%)
  462. 3.2
  463. 11230tc%=mgc_grey_point%
  464. 3.2
  465. 3) Save the program.
  466. 3.2
  467. Å   Oak MS-DOS SCSI as Drive D Ö I use the PC emulator occasionally for
  468. my work. It therefore did not take very long to use up all 10M of the
  469. MS-DOS drive C partition on my 47M SCSI drive. The obvious thing to do
  470. would be to create another MS-DOS partition for drive D. However on the
  471. version of the PC emulator that I am using (Emulate121) the Archimedes
  472. hard discs 4 and 5 are mapped to MS-DOS discs C and D. Therefore drive C
  473. and D cannot both exist on the same hard disc (on the emulator) and two
  474. hard disc drives are required for two partitions.
  475. 3.2
  476. On the OAK SCSIFS each winchester drive has the following information:-
  477. 3.2
  478. a) filing system drive number (e.g. :4 or :5)
  479. 3.2
  480. b) SCSI hardware address (each device on the SCSI bus has a unique
  481. address)
  482. 3.2
  483. c) logical unit number (SCSI Ésoftwareæ address)
  484. 3.2
  485. If you are lucky enough to have an OAK SCSI (::SCSIDisk4) with an MS-DOS
  486. partition (Drive _C) then hereæs how to create MS-DOS drive D.
  487. 3.2
  488. 1. Run ÉSCSIFormæ
  489. 3.2
  490. 2. Note that drive :4 is SCSI ID = 0, LUN = 0
  491. 3.2
  492. 3. Add drive 5 with SCSI with SCSI ID = 0, LUN = 0 (same as drive :4)
  493. 3.2
  494. 4. Exit SCSIForm and enter the desktop. There should be an additional
  495. hard disc icon ÉSCSI 5æ
  496. 3.2
  497. 5. Start up the PC emulator (version 1.20 or greater?)
  498. 3.2
  499. 6. Type FDISK. An extra option should appear (5 Ö select next fixed disc
  500. drive). Select this and the disc drive should now become number 2. Then
  501. select option 1 ÉCreate DOS Partitionæ
  502. 3.2
  503. 7. Type Format D:
  504. 3.2
  505. 8. Type CHKDSK D: (this checks partition is OK)
  506. 3.2
  507. 9. When using the desktop always us SCSIFS::SCSIDisc4. Ignore disc 5
  508. 3.2
  509. Ralph Barrett
  510. 3.2
  511. (We have not had a chance to try this out yet, so you follow these
  512. suggestions at your own peril. Ed)
  513. 3.2
  514. Å   Recursive directory move bug Ö one reader noted that while in the
  515. desktop, if you moved a directory into itself (by holding the shift
  516. button down while copying) the files in the directory will be moved
  517. further and further down a directory tree until your whole disc has been
  518. filled with directories! The problem with this bug is that you canæt
  519. move your files back to their original position because the disc is
  520. already full. You must copy the other files onto another disc and then
  521. remove the offending directory.
  522. 3.2
  523. Å   To scroll or not to scroll? The strange behaviour mentioned in the
  524. BASIC V Forum (Archive 3.1 p36) is actually caused by the *Configure
  525. Scroll or *Configure NoScroll setting. This setting allows us to control
  526. the behaviour of the ends of lines. *Configure Scroll should be used for
  527. compatibility with earlier machines. The RISC-OS desktop, however, has a
  528. habit of countermanding the configured values and in this case it
  529. decides that it prefers NoScroll. If you have a program which relies on
  530. the behaviour of the ends of lines, then you can execute VDU 23,16,&FE,1
  531. || to temporarily obtain the Scroll option, or VDU 23,16,&FE,0 || to
  532. obtain NoScroll behaviour.
  533. 3.2
  534.  
  535. Å   AutoCAD to !Draw conversion Ö The RISC-OS application !Draw can
  536. accept input from a DXF (Drawing Interchange Format) file. These files
  537. can be produced by packages such as ÉAutoSketchæ and ÉAutoCADæ. To get a
  538. file from a IBM PC running the ÉAutoCADæ package to !Draw the following
  539. procedure should be used.
  540. On the IBM PC:
  541. 1.   Do a ÉDXFOUTæ command from within Auto-CAD to output the current
  542. file in DXF format.
  543. 2.   This file should be copied to a IBM format 5.25ö or 3.5ò disc.
  544. On the Archimedes:
  545. 3.   Start the PC emulator on the Archimedes.
  546. 3.3
  547. 4.   Perform a Éputfile MS_DOS_Name.dxf ADFS_Nameæ from within the
  548. emulator to transfer the file from MS-DOS to RISC-OS.
  549. 3.3
  550. 5.   From within RISC-OS set the file type of your file to &DEA
  551. (*SETTYPE ADFSName DEA).
  552. 3.3
  553. 6.   Start !Draw and drag the DXF file to its icon or into a !Draw
  554. window.
  555. 3.3
  556. !Draw will ask you a question about the Éunitsæ (scale) before redrawing
  557. the image in the window. This may require some thought to get the
  558. required effect. !Draw appears to get confused with some entries in DXF
  559. files and refuse to load the file. Deleting the text in the original
  560. picture may cure the problem. AutoSketch on the Archimedes can also
  561. produce DXF type files for input into !Draw.
  562. 3.3
  563. Å   ÉCæ Operating System calls (contæd) Ö The following example program
  564. shows how system commands can be invoked from a C-program. It was tested
  565. under Acorn ANSI C version 2. The use of the function Ésystemæ is part
  566. of the proposed ANSI standard for C, although its exact implement-ation
  567. is left up to the individual versions of C. The Acorn ÉANSI Cæ library
  568. function Ésystemæ returns a zero value if the command executes success
  569. fully and non-zero if it fails. Problems will occur if the command being
  570. executed over-writes the C-prog-ram (for example if the command starts
  571. up a second C-program), but in the example both commands are Ébuilt-inæ
  572. and therefore do not overwrite the invok-ing program. In theory, the
  573. *RMLoad command fails if there is not enough RMA, but in testing the
  574. example, it worked even when the free RMA was configured to 0k.
  575. 3.3
  576. /* > c.systest */
  577. 3.3
  578. #include <stdlib.h>   /* General
  579. 3.3
  580.  utilities  */
  581. 3.3
  582. #include <stdio.h>   /* Input/output  
  583. 3.3
  584. */
  585. 3.3
  586. int main ()
  587. 3.3
  588. {3 .3
  589. static char rmload[]=örmload
  590. 3.3
  591. system:modules.memallocö;
  592. 3.3
  593. static char screensave[]=
  594. 3.3
  595.  öscreensave screenfileò;
  596. 3.3
  597. int result1,result2;
  598. 3.3
  599. result1=system(rmload);
  600. 3.3
  601. result2=system(screensave);
  602. 3.3
  603. printf(öResult1=%d, Result2=%d\nò
  604. 3.3
  605. ,result1,result2);
  606. 3.3
  607. return(0);
  608. 3.3
  609. }
  610. 3.3
  611. Å   Dead modules Ö If you install a module which claims a vector and
  612. then press the reset button, something very strange happens when you
  613. want to *RMKill the module. Because the vector canæt be released, the
  614. module isnæt killed properly. To let you know about this, RISC-OS puts
  615. the dummy address DEADDEAD where you would expect the workspace address:
  616. 3.3
  617. *rmkill printkill
  618. 3.3
  619. Bad vector release
  620. 3.3
  621. *modules
  622. 3.3
  623. No   Position   Workspace Name
  624. 3.3
  625. 1   0380873C   00000000   UtilityModule
  626. 3.3
  627. 2   0381FB94   01800014   FileSwitch
  628. 3.3
  629. ...
  630. 3.3
  631. 27   0387EA48   00000000   SpriteUtils
  632. 3.3
  633. 28   01813BC4   DEADDEAD   PrintKey
  634. 3.3
  635. etc
  636. 3.3
  637. Å   Definitive modem connections? The following connections work with
  638. ArcTerm601, Hearsay and the Archive BBS for the WS3000 and SM2400
  639. modems:
  640. 3.3
  641. Arc RX (2) to Modem TX (3)
  642. 3.3
  643. Arc TX (3) to Modem RX (2)
  644. 3.3
  645. Arc GND (5) to Modem GND (7, not 1)
  646. 3.3
  647. Arc RI (9) to Modem DCD (8)
  648. 3.3
  649. Arc CTS (8), DCD (1), and DTR(4) to Modem DTR (20)
  650. 3.3
  651. Arc RTS (7) to Modem RTS (4)
  652. 3.3
  653. Arc DSR (6) to Modem CTS (5)
  654. 3.3
  655. Å   Digitisers? Who needs one, anyway ? We recently faced the problem of
  656. how to get the company logo into a DRAW file, and came up with a
  657. solution which may be useful to other people. It is most applicable to
  658. images bounded largely by straight lines.
  659. 3.3
  660. First take the image and enlarge it repeatedly using a photocopier until
  661. it fills more than a third of the screen of the monitor you are using.
  662. Then make one more enlargement, onto the transparent acetate sheets used
  663. for overhead projector foils. If you do not have a copier you will find
  664. most high street copier services can do all this for you, probably for
  665. less than a pound. Our copier will enlarge to 145% at a time.
  666. 3.3
  667. Now cut out the piece of acetate showing the image, and put it on your
  668. monitor screen. You will find it sticks most satisfyingly. Enter DRAW
  669. and register the coordinates of the corners of the image. You may want
  670. to have a grid on the screen to ensure you line up the acetate image
  671. with the edges of the screen. You can also check alignment by reading
  672. the coordinates of points which should be the same distance from an edge
  673. of the screen and adjusting them as necessary.
  674. 3.3
  675. We found this was much easier than transcribing even simple shapes by
  676. eye, as it was hard to get the proportions right that way. It was also
  677. much quicker than drawing a grid and transcribing coordinates from that.
  678. Laurie van Someren, Aleph One Ltd
  679. 3.3
  680. Å   Interdictor Flight Recorder! Ö It is possible to fly the plane on
  681. your own, run or even record a demo flight. This can be done by altering
  682. the !Run file in the !Interdictor directory. On the bottom line of this
  683. directory is the Éflyæ command. Its permutations are as follows:
  684. 3.3
  685. fly       (just fly the plane as usual)
  686. 3.3
  687. fly playback <filename>   (replay a demo flight from a file)
  688. 3.3
  689. fly record <filename>      (record the flight to a file)
  690. 3.3
  691. If you want an example of how this works, you can look at the !RunDemo
  692. file in the Interdictor direct-ory. This file runs the demo file call
  693. DemoFlight.
  694. 3.3
  695. Å   Low Batteries? One reader noticed that after 15 months, his
  696. Archimedesæ configuration settings began to change inexplicably e.g. the
  697. loss of all disc drive icons in the desktop. Eventually, after various
  698. problems (e.g. the Beebug Serial Link buffer setting kept changing) the
  699. whole system finally froze. However, the problem was fully resolved by
  700. replac-ing the batteries. So be warned. (Acorn recommend replacement
  701. every 12 months.)
  702. 3.3
  703. Å   MS-DOS Hard Disc Partitions Ö The easiest way of getting two hard
  704. disc partitions for the PC Emulator is to get version 1.33, which can be
  705. downloaded from the Archive BBS or SID. Alternatively send us a donation
  706. to our charity pot along with an 800k formatted 3.5ö disc.
  707. 3.3
  708. Å   Multi-tasking First Word Plus? If you rename the !Run file in the
  709. !1stWord+ directory to !Boot then First Word Plus becomes multitasking.
  710. Unfortunately, you cannot reach the disc, palette or task icons.
  711. 3.3
  712. Å   Noisy Fans 1 Ö If you have a fan in your Archim-edes, you should not
  713. disconnect it. The reason for this is that the fan will then be blocking
  714. up the air vent and so the computeræs PSU will operate at too high a
  715. temperature. If you want to reduce the noise of the fan, you should
  716. either completely remove the fan or refer to the following hint.
  717. 3.3
  718. Å   Noisy Fans 2 Ö I have looked at the physical design of the Archi
  719. medes PSU and done a few temperature measurements and it is my belief
  720. that you ought to have a fan fitted and working. So, what can you do to
  721. reduce the annoying noise of the fans? Well, we have several Archimidi
  722. here and the noise drove us to distraction so, being hardware oriented,
  723. I looked at the infernal (sic) fan. Yes, I have found a way of shutting
  724. it up, but before you get too excited, allow me to explain a little
  725. more.
  726. 3.3
  727. These fans are most certainly not your average Scalectrix car 12volt
  728. motor with a set of plastic blades stuck on the front! In fact, we
  729. couldnæt have wished for a better headache Ö these fans (of which weæve
  730. even found two different manufacturers so far) consist of a transistor
  731. circuit driving a coil assembly that is alternately fluxing a permanent
  732. magnet within the plastic rotor. At the same time, the rotor is having
  733. its rotational speed monitored by a hall effect switch, busily counting
  734. the revolutions! How are we going to slow that down? The answer we came
  735. up with was a small transistor circuit of our own that takes the 12v
  736. D.C. input and feeds to the fan a suitably pulsed supply that allows the
  737. fan to start but not reach full speed. Cunning, eh?!
  738. 3.3
  739. Yes, we had to make two slightly different versions of our circuit, as
  740. the fans were not the same electrically. Weæll let you know how they get
  741. on as weære still testing them, but there no problems so far. Ray
  742. Maidstone.
  743. 3.3
  744. If you want more technical info, drop Ray a line via the Archive office.
  745. Ed.
  746. 3.3
  747. Å   Presenter II Stacked Bar option Ö If one of the data sets (columns)
  748. contains several NULL (0 or zero) entries then on the display, some of
  749. the stack-ed bar may be displaced vertically downwards. This is easily
  750. corrected by replacing the NULL entry with a very small value. E.g., if
  751. the data maximum is 100 then a value of 0.1 or 0.05 will do the trick.
  752. 3.3
  753. Å   Second floppy disk drive Ö If you want a second disc drive and donæt
  754. need the a new front fascia for two drives, you can install an NEC 1036A
  755. into the Archimedes, which can be obtained for around ú50.
  756. 3.3
  757. You will also need to buy some ribbon cable, power leads and extra plugs
  758. for the leads. Donæt forget to set the drive to operate as drive 1 and
  759. to *Configure Floppies 2 on the Archimedes.
  760. 3.3
  761.  
  762. Å 80k of RMA and rising!  RMA stands for Relocatable Module Area.  In
  763. English, this is the area of memory which some parts of the operating
  764. system (modules) use as work space.  This is why when you first
  765. initialise your computer you will find that your RMA takes over 80k of
  766. memory.  For those of you who are curious, here is a guide to the memory
  767. each module claims on power up:
  768. 3.04
  769.    Module      Workspace (bytes)
  770. 3.04
  771.    FileSwitch      2400
  772. 3.04
  773.    Desktop      528
  774. 3.04
  775.    SystemDevices   288
  776. 3.04
  777.    BBCEconet      80
  778. 3.04
  779.    InternationalKeyboard   528
  780. 3.04
  781.    Debugger      448
  782. 3.04
  783.    SoundChannels   8464
  784. 3.04
  785.    Sound Scheduler   8208
  786. 3.04
  787.    WaveSynth      1760
  788. 3.04
  789.    StringLib      8576
  790. 3.04
  791.    Perussion      8800
  792. 3.04
  793.    SpriteExtend   1296
  794. 3.04
  795.    Draw      272
  796. 3.04
  797.    FontManager   2832
  798. 3.04
  799.    WindowManager   7920
  800. 3.04
  801.    NetStatus      16
  802. 3.04
  803.    Podule      208
  804. 3.04
  805.    ADFS      656
  806. 3.04
  807.    FileCore%ADFS   12,464
  808. 3.04
  809.    HourGlass      1952
  810. 3.04
  811.    TaskManager   3760
  812. 3.04
  813.    PaletteUtil      3632
  814. 3.04
  815.    Filer      4993
  816. 3.04
  817.    ADFSFiler      2336
  818. 3.04
  819.    ShellCLI      1872
  820. 3.04
  821.    Total      84308
  822. 3.04
  823. RMA is also used to contain WIMP sprites (especially application icons
  824. stored in their !Sprite files) and relocatable modules, which add extra
  825. facilities to the ROM based operating system e.g. 65Tube provides BBC
  826. emulation.  This means that as the Archimedes Éseesæ and loads more
  827. applications/modules the memory acquired by the RMA grows and can quite
  828. easily reach 300k plus!
  829. 3.04
  830. Since there are several uses for the RMA, there are several ways of
  831. reducing the memory it requires:
  832. 3.04
  833. a) Remove individual modules using the *RMKill command e.g. *RMKill
  834. Percussion Ö this will only temporarily remove the facilities provided
  835. by a module.
  836. 3.04
  837. b) Unplug unwanted modules using the *RMUnplug command e.g. *RMUnplug
  838. BBCEconet Ö this will permanently remove the facilities provided by an
  839. operating system ROM module Ö so if you donæt have Econet or donæt use
  840. the Debugger then you can unplug the relevant modules and release their
  841. workspace.  Note, you can reinvoke the facilities of a module by using
  842. the *RMReInit command.
  843. 3.04
  844. c) Use the following BASIC V program to clear the RMA sprite area:
  845. 3.04
  846.    program segment missing
  847. 3.04
  848. d) If you have finished processing and saved all your work you could
  849. press <ctrl-break> but this is rather drastic.
  850. 3.04
  851. Å ArcTerm update Ö Hugo Fiennes has updated ArcTerm v6.01 so that it
  852. works properly with the CET and CET+ standards.  An upgrade can be
  853. obtained direct from Hugo Fiennes free of charge.
  854. 3.04
  855. Å Arthur desktop Ö If any of you have changed over to RISC-OS but are
  856. pining for the old Arthur desktop (!) then see if you can get hold of a
  857. copy of Brainsoftæs Disk Transfer program.  This provides a modified ram
  858. copy of the desktop with extra features added.  You will then be able to
  859. access your old desktop diaries, etc.  Dave Woods.
  860. 3.04
  861. Å ASCII BASIC programs Ö BASIC V can load and renumber an untokenised
  862. text file with the *BASIC -load <filename> command (the same applies
  863. with the -chain option).  Thus you donæt really need a BASIC to ASCII
  864. convertor; you could just keep all your BASIC programs in ASCII, at
  865. least while you develop them, and still be able to edit them using a
  866. text editor, e.g. TWIN or !Edit.
  867. 3.04
  868. Å Auto-booting applications Ö If you want a RISC-OS application to load
  869. or run as soon as the disc is inserted then you should modify the !Boot
  870. file in the application to execute the !Run file i.e. add the command
  871. *Run <Obey$Dir>.!Run in the !Boot file.  This technique could be used,
  872. for example, to automatically load the BASIC Editor when a development
  873. disc is inserted.
  874. 3.04
  875. Å Break key action Ö You can set the action of the <break> key using the
  876. *FX 247,<n> command.  The value byte <n> alters <break> and modifiers of
  877. it as follows:
  878. 3.04
  879.    Bits   Key Combination
  880. 3.04
  881.    0.1   <break>
  882. 3.04
  883.    2.3   <shift-break>
  884. 3.04
  885.    4.5   <ctrl-break>
  886. 3.04
  887.    6.7   <ctrl-shift-break>
  888. 3.04
  889. Each two bit number may take on one of these values:
  890. 3.04
  891.    Value   Effect
  892. 3.04
  893.    00   Act as <reset> key
  894. 3.04
  895.    01   Act as <escape> key
  896. 3.04
  897.    10   No effect
  898. 3.04
  899.    11   Undefined
  900. 3.04
  901. The default is *FX 247,1 which makes <break> act as if it were <escape>
  902. and all other combinations cause a reset.
  903. 3.04
  904. Å Desktop grey scale?  If you modify colours 0 or 7 (white or black)
  905. using the desktop palette utility then the palette application will
  906. attempt to interpolate the colours in between i.e. colours 1-6.  Try it
  907. and see!
  908. 3.04
  909. Å Donæt move your mouse!  Whilst waiting for a program to complete a
  910. lengthy process (e.g. when the hourglass is on) it is best not to move
  911. the mouse as keeping track of the mouse movements takes up processor
  912. time.
  913. 3.04
  914. Å Faster BASIC SWIæs Ö When using the SYS command within a BASIC V
  915. program, it is quicker to use a number instead of a string.  e.g. SYS6
  916. instead of SYS öOS_Byteò.  However, the best way to obtain the number
  917. values is to use a BASIC variable and öOS_SWINumberFromStringò.  This
  918. increases speed while maintaining machine independence and readability. 
  919. For example:
  920. 3.04
  921.    program segment missing
  922. 3.04
  923. Å Insert/overwrite with !Edit Ö It is possible to toggle between insert
  924. and overwrite mode in Edit by pressing <shift-f1>.
  925. 3.04
  926. Å Mouse step Ö you can set the sensitivity of your mouse by using the
  927. BASIC V MOUSE STEP command e.g. MOUSE STEP 4 means that the pointer will
  928. move 4 O.S. pixels for every mouse pulse.  The Ésensitivity parameteræ
  929. can take a zero or even a negative value, so that you can freeze the
  930. mouse or even invert it!
  931. 3.04
  932. Å Multiple entry PROCæs and FNs Ö You can have multiple entries to
  933. procedures and functions, although it may not be good programming style. 
  934. This is because lines beginning with DEF are not executed, so you can
  935. have further DEFs within the body of a procedure/function, and enter at
  936. these points with an appropriate call Ö this might be particularly
  937. useful to have a first entry, set up some default parameters, and then
  938. have entry to override them:
  939. 3.04
  940.    program segment missing
  941. 3.04
  942. Å O.S. case sensitivity Ö Contrary to what has been said in the past,
  943. the operating system is almost entirely case-insensitive, unlike BASIC,
  944. and although the case of filenames and variable names is preserved it is
  945. not significant.  Quotes are also generally unnecessary except when
  946. including a space in a parameter.
  947. 3.04
  948. Å Removing recursive directories (contæd) Ö If you accidentally copy a
  949. directory into itself then the best way to tidy the disc up is to create
  950. a RAM disc and move the unwanted files into it (you can move a file by
  951. dragging it into the filer window while holding the <shift> button
  952. down).
  953. 3.04
  954. Å Time for function keys Ö Function key strings are just treated as OS
  955. variables called Key$<n>, where <n> is the key number.  This means that
  956. all the commands relate to system variables can be used with function
  957. keys e.g. *ShowKey$ will display key definitions.  *SetMacro Key$0
  958. <Sys$Time> will make <f0> display the time and so on.
  959. 3.04
  960. Å Using *GOS Ö You can use the *GOS command from the desktop to prevent
  961. returning if you accidentally hit the <return> key.  Once you have
  962. finished typing your *commands you can use the ÅQuit command to go back
  963. to the desktop.
  964. 3.04
  965.  
  966. Å   Window resizing bugs/errors Ö The bug in Interactive help Archive
  967. 2.11 page 8 is not a bug but a result of !Help setting a window work
  968. area extent in less than a multiple of four. The program is in C so I
  969. canæt edit it. I discovered this when writing my own software. When a
  970. window was stretched to its full extent it would not grow smaller in the
  971. y direction until you moved in to the left. R.D.
  972.  
  973. Å   *WIPE with mouse Ö In BASIC, (or at the operating system prompt for
  974. that matter. Ed.) if you have the pointer ON (*POINTER) and do *WIPE *,
  975. a mouse pointer appears enabling you to use <se-lect> to delete the file
  976. and <menu> or <adjust> to keep the file.
  977. 3.5
  978. Å   Alerion cheat  Ö For those who have the RISC-OS version of Alerion,
  979. you can select the wave you wish to play by pressing the letters <A> to
  980. <O> while on the title screen.
  981. 3.5
  982. Å   BASIC Editor bugs Ö There is a bug or two in the Basic Editor v1.00
  983. that comes on the Applications Disc 2. If you exactly fill the first
  984. line so that the cursor jumps to the next line, and then press return,
  985. the screen looks something like this:
  986. 3.5
  987. 10 REM This is meant to be right over to the edge
  988. 3.5
  989. 11 C
  990. 3.5
  991. 20 xxxxxxxxxxxx
  992. 3.5
  993. 30 xxxx
  994. 3.5
  995. If you then press the <page down> key, the comp-uter will freeze.
  996. 3.5
  997. Another bug, whose circumstances cannot be so readily repeated, occurs
  998. when pressing the <cursor down> key causing the program to shoot off the
  999. top of the screen, and nothing will bring it back again.
  1000. 3.5
  1001. Both of these are Émildæ bugs because pressing <reset> followed by
  1002. typing *BASIC and OLD and EDIT restores everything back to it original
  1003. state.
  1004. 3.5
  1005. Å   BASIC first please Ö If you want your computer to start up in BASIC
  1006. instead of the desktop, use *CON. LAN. 4 and then do a <ctrl-break>.
  1007. This also means that the full computer memory is available to your
  1008. program. If you go to BASIC with <f12> to get a star command and then
  1009. typing BASIC, you only get the memory available that has been allocated
  1010. to the next application under the task display (651516 bytes). The
  1011. reason for this is that BASIC is being run as the next task within the
  1012. desktop environment. This can be seen by typing QUIT which will drop you
  1013. back into the desktop with everything as it was before.
  1014. 3.5
  1015. The other way to get the full memory available is to press <shift-ctrl-
  1016. f12> which will drop you out of the desktop completely, closing all
  1017. tasks. This drops you into the operating system, so typing BASIC and
  1018. then QUIT brings you back to the operating system prompt, not into the
  1019. desktop.
  1020. 3.5
  1021. (This is one of those things which, according to Adrian is öobviousò,
  1022. but to those of us who never reads manuals, it is news! So, the next
  1023. time you discover something which someone else thinks is öobviousò, send
  1024. it in to us as an H&T. Ed.)
  1025. 3.5
  1026. Å   CTRLing VDU scrolling Ö You can use the <scroll lock> key on the
  1027. Archimedes to stop the computer printing (either to the screen or
  1028. printer). Another method of doing this is to hold down the <shift> and
  1029. <ctrl> keys. However, if you just hold the <ctrl> key down then you can
  1030. slow down the speed of printing to about a 20th of it original speed. 
  1031. 3.5
  1032. Å   Database routine Ö If youæve written a database in BASIC e.g. an
  1033. address book, it can be difficult to find a name unless you stick to a
  1034. format where all entries are in upper case, or lower case apart from the
  1035. initial letters. This little routine which uses 104 bytes is the
  1036. solution. As well as accepting upper or lower case it also will accept
  1037. the character ö#ò as a single character wildcard .
  1038. 3.5
  1039. It is identical to the BASIC command.
  1040. 3.5
  1041. INSTR(string,substring,start of search)
  1042. 3.5
  1043. Except the variables A%, $B% and $C% are declared before X=USR(code) is
  1044. called, i.e.
  1045. 3.5
  1046. $B%=ömain stringò
  1047. 3.5
  1048. $C%=ösubstringò
  1049. 3.5
  1050. A%=start of search
  1051. 3.5
  1052. X=USR(code)
  1053. 3.5
  1054. There is an example program with the listing.
  1055. 3.5
  1056. 160 DEFPROCass
  1057. 3.5
  1058. 170 FORopt=0TO3 STEP3
  1059. 3.5
  1060. 180    P%=code
  1061. 3.5
  1062. 190   [ OPT opt
  1063. 3.5
  1064. 200   STMFD R13!,{r1-r12 ,R14} ;store
  1065. 3.5
  1066.  registers. not R0
  1067. 3.5
  1068. 210   MOV R5,R0      ;start of search
  1069. 3.5
  1070. 220   MOV R0,#0    ;reset R0 (A%) for
  1071. 3.5
  1072.  return
  1073. 3.5
  1074. 230   LDRB R7,[R2,#0] ;load R7 with
  1075. 3.5
  1076.  first byte of $C%
  1077. 3.5
  1078. 240   CMP R7,#13   ;is it a CR?
  1079. 3.5
  1080. 250   BEQ end      ;i.e. null sub-
  1081. 3.5
  1082. string. exit to BASIC
  1083. 3.5
  1084. 260
  1085. 3.5
  1086. 270   .nomatch
  1087. 3.5
  1088. 280   MOV R4,#0  ;initialise counters
  1089. 3.5
  1090. 290   MOV R3,#0
  1091. 3.5
  1092. 300   .nextchar
  1093. 3.5
  1094. 310   LDRB R6,[R1,R5]  ;get byte of
  1095. 3.5
  1096.  string
  1097. 3.5
  1098. 320   CMP R6,#13   ;is it CR ie end
  1099. 3.5
  1100.  of string
  1101. 3.5
  1102. 330   BEQ end      ;if yes, substring
  1103. 3.5
  1104.  not found. exit
  1105. 3.5
  1106. 340   AND R6,R6,#95   ;AND to ignore
  1107. 3.5
  1108.  case
  1109. 3.5
  1110. 350   LDRB R7,[R2,R4] ;first byte of
  1111. 3.5
  1112.  substring
  1113. 3.5
  1114. 360   CMP R7,#13      ;is it a CR?
  1115. 3.5
  1116. 370   SUBEQ R0,R5,R3  ;yes i.e. end
  1117. 3.5
  1118.  of substring
  1119. 3.5
  1120. 380                   ;R5-R3 gives
  1121. 3.5
  1122.  position in string
  1123. 3.5
  1124. 390   ADDEQ R0,R0,#1  ;plus 1. First
  1125. 3.5
  1126.  char=0
  1127. 3.5
  1128. 400   BEQ end         ; and exit
  1129. 3.5
  1130. 410                  
  1131. 3.5
  1132. 420   AND R7,R7,#95   ;AND to ignore
  1133. 3.5
  1134.  case
  1135. 3.5
  1136. 430   ADD R5,R5,#1    ;increment
  1137. 3.5
  1138.  counters for next chars
  1139. 3.5
  1140. 440   ADD R4,R4,#1
  1141. 3.5
  1142. 450   CMP R7,#3       ;is it a hash?
  1143. 3.5
  1144.  If so make equal
  1145. 3.5
  1146. 460   MOVEQ R6,R7
  1147. 3.5
  1148. 470   CMP R6,R7      ;ARE bytes equal
  1149. 3.5
  1150. 480   ADDEQ R3,R3,#1  ;yes Ö get next
  1151. 3.5
  1152.  sub string char
  1153. 3.5
  1154. 490   BEQ nextchar
  1155. 3.5
  1156. 500   BNE nomatch     ;no try next
  1157. 3.5
  1158.  string char
  1159. 3.5
  1160. 510   .end
  1161. 3.5
  1162. 520   LDMFD R13!,{r1-r12 ,R15};restore
  1163. 3.5
  1164. registers. R0 has INSTR
  1165. 3.5
  1166. 530   ]
  1167. 3.5
  1168. 540 NEXT
  1169. 3.5
  1170. 550 ENDPROC
  1171. 3.5
  1172. Å   Disappearing menus Ö After selecting an option on a menu, the menu
  1173. disappears. To prevent this: instead of using <select> to select option,
  1174. use <adjust>, and the menu will then stay on the screen.
  1175. 3.5
  1176. Å   Drawing with Outline fonts - If you possess Acorn DTP, you can use
  1177. the !FontEd public domain program to create !Draw paths of the
  1178. individual letters. This is done by dragging the character in the main
  1179. !FontEd window into the !Draw document window. Once transferred, the
  1180. letter can be manip-ulated just like any other drawing e.g. rotated,
  1181. stret-ched, filled, etc. With a little patience, some very effective
  1182. titles can be created.
  1183. 3.5
  1184. Å   DTP memory Ö A couple of hints to give extra memory when using Acorn
  1185. DTP with a 1M machine: load the printer driver first and then quit
  1186. before entering DTP. Only the modules are used for printing, which are
  1187. left installed after you quit. Secondly, the use of screen mode 1 uses
  1188. only 24k of memory and since it is a four colour mode, it gives a better
  1189. grey scale than Mode 0.
  1190. 3.5
  1191. Å   E-Type bug Ö There is a bug in ÉAll Tracksæ option of E-Type. If you
  1192. press hard on the brakes when the time reaches 0:01 the program
  1193. sometimes goes bonkers and when you are placed on the new track, your
  1194. Trip Score increases.
  1195. 3.5
  1196. Å   External ST506 drives Ö If you add an external hard drive to an old
  1197. 440 or 310, you may find that the whole system dies completely for no
  1198. apparent reason. The problem is that if the external drive is powered up
  1199. before the computer, a small voltage can be produced within the computer
  1200. so when the power suplly on the computer tries to power up, it sees this
  1201. voltage, panics and shuts down again! The simple solution is to power up
  1202. the computer first and then the external drive.
  1203. 3.5
  1204. When switching off, work on the ölast in, first outò principle and
  1205. switch off the drive first. This is good practice since, if the drive is
  1206. left switched on, as the computer powers down, extraneous signals on the
  1207. driveæs data and control lines could conceivably be interpreted as
  1208. something nasty like, ö Please wipe track 0, sector 0ò and you end up
  1209. with a öBad Free Space Mapò! (Iæm sure that is Somebodyæs Law.)
  1210. 3.5
  1211. Å   Interdictor Cheat Ö It is possible to alter your landing pad in
  1212. Interdictor. Edit StateSave via !Edit. Go down to the 10th number and
  1213. alter it. Note that Landing pad 2 is actually Landing pad 1 and so alter
  1214. the 10th number to a 1 and so on. Also note that there are 7 runways,
  1215. the 7th being known as the number 6. This might sound confusing but
  1216. really itæs not!
  1217. 3.5
  1218. Å   Large hard drives on A410/1? Ö Someone asked us to find out whether
  1219. it was possible to put hard drives with more than 8 heads onto an A410/
  1220. 1. All we have been able to find out is that, to get the extra head
  1221. select line, you need to change links LK12 and LK13. Whether the
  1222. software will cope, we do not know. If anyone has any success with it,
  1223. perhaps they would let us know.
  1224. 3.5
  1225. Å   Virus protection Ö If you are passing discs around, especially PD
  1226. discs, guard yourself against the virus. When you receive or pass on a
  1227. disc, you run the risk of your machine picking or up a virus or logic
  1228. bomb.
  1229. 3.5
  1230. Passing on files: Format an unused disc and copy only the files you wish
  1231. to send. Alternatively, wipe the disc (*Wipe * FR~C), copy the files and
  1232. run my disc wiping program (see below). This is needed because deleting
  1233. a file does not erase the data on the disc; it just causes the computer
  1234. to forget about it. The data can be retrieved by anyone with a disc
  1235. sector editor, so run the program if you want to thoroughly scrub the
  1236. unused parts of the disc.
  1237. 3.5
  1238. Receiving files: Copy across only those files which you need. Try not to
  1239. use the desktop as some logic bombs can sit in an applicationæs !Boot
  1240. file and spring out at you when you open their directory viewer.* After
  1241. copying, the original disc should be cleared by reformatting.
  1242. 3.5
  1243.  10 REM >Eradicate
  1244. 3.5
  1245.  20 REM Guards against the Virus and
  1246. 3.5
  1247.  accidental giveaways of data
  1248. 3.5
  1249.  30 REM Erases totally the unused parts
  1250. 3.5
  1251.  of a disc
  1252. 3.5
  1253.  40 REM PUBLIC DOMAIN by Sandie Goh
  1254. 3.5
  1255.  50 REM Version 1.21 (20-Sep-1989)
  1256. 3.5
  1257.  60 :
  1258. 3.5
  1259.  70 MODE 3:OFF:DIM blankspace 409600
  1260. 3.5
  1261.  80 PRINTöDisc Eradicatorò
  1262. 3.5
  1263.  90 PRINTö===============òÉ
  1264. 3.5
  1265. 100 PRINTöPUBLIC DOMAIN by Sandie Goh,
  1266. 3.5
  1267. Version 1.21 (20-Sep-1989)öÉ
  1268. 3.5
  1269. 110 PRINTöErases totally the unused
  1270. 3.5
  1271.  parts of a disc.ö
  1272. 3.5
  1273. 120 PRINTöHELPS guard against viruses,
  1274. 3.5
  1275.  logic bombs etc.öÉ
  1276. 3.5
  1277. 130 PRINTöInsert disc to be cleaned in
  1278. 3.5
  1279.  drive 0 and press a key.öÉ
  1280. 3.5
  1281. 140 *FX 15,1
  1282. 3.5
  1283. 150 IF GET
  1284. 3.5
  1285. 160 PRINTöCompacting, to collect free
  1286. 3.5
  1287.  space into a single block.ö
  1288. 3.5
  1289. 170 REPEAT
  1290. 3.5
  1291. 180   *COMPACT 0
  1292. 3.5
  1293. 190   SYSöADFS_FreeSpaceò,ö0ò TO total,
  1294. 3.5
  1295.  biggest
  1296. 3.5
  1297. 200 UNTIL biggest=total
  1298. 3.5
  1299. 210 PRINTöSaving dummy files into the
  1300. 3.5
  1301.  free space to wipe anything there.ö
  1302. 3.5
  1303. 220 REM Use unlikely filenames to avoid
  1304. 3.5
  1305.  clashes
  1306. 3.5
  1307. 230 IF biggest>409600 THEN
  1308. 3.5
  1309. 240   OSCLI (öSAVE ZZDelONN12 ò+STR$~
  1310. 3.5
  1311. blankspace+ö +64000ò)
  1312. 3.5
  1313. 250   biggest=biggest-409600
  1314. 3.5
  1315. 260 ENDIF
  1316. 3.5
  1317. 270 OSCLI (öSAVE XXDelONN12 ò+STR$~
  1318. 3.5
  1319. blankspace+ö +ò+STR$~biggest)
  1320. 3.5
  1321. 280 PRINTöDeleting the dummy files to
  1322. 3.5
  1323.  release the space.öÉ
  1324. 3.5
  1325. 290 *REMOVE ZZDelONN12
  1326. 3.5
  1327. 300 *DELETE XXDelONN12
  1328. 3.5
  1329. 310 PRINTöI now pronounce this disc
  1330. 3.5
  1331.  clean.ö
  1332. 3.5
  1333. *If you donæt believe me, I was myself the victim of a booby-trapped
  1334. disc. After mounting a disc I picked up from a friend, I copied its
  1335. contents across to my hard disc, only to find that it (the winchester)
  1336. was now blank! Believing the problem to be a bug in the desktop or
  1337. chance disc failure, I restored the hard disc and tried again Ö the same
  1338. thing happened again, but this time when I did a *Compact 4.
  1339. 3.5
  1340. I tried everything and was just about to give up and complain to Acorn
  1341. when a friend phoned me with the same problem. It turns out that he too
  1342. had a copy of the disc I had picked up and I immediately became
  1343. suspicious. Further research showed that the disc contained an invisible
  1344. program which sat in the machine waiting for an opportune moment, then
  1345. zapped the Winchester with a *Wipe :4.* FR~C.
  1346. 3.5
  1347. The subtlety of the program makes it even more deadly Ö the öerrorò
  1348. occurs when you write to the hard disc using the desktop, so you are
  1349. lead to think (as I was) that a bug or disc error is responsible. So be
  1350. warned. Guard against the virus.
  1351. 3.5
  1352.  
  1353. Å   !chars Ö which is available as !1stchars with FWPlus version 2 and
  1354. is also available on SID + Archive BBS + various PD discs, can be used
  1355. for ömousingò text into !Draw applications.
  1356. 3.6
  1357. Å   !Draw Ö You can use the cursor keys for fine positioning when
  1358. drawing Bezier curves or lines.
  1359. 3.6
  1360. Å   !Madness Ö I was always very disappointed with this Demo Ö until I
  1361. looked at the !RunImage file and found a variable called madspeed% Ö
  1362. guess what changing it to 1 does? Rob Davison
  1363. 3.6
  1364. Å   !system on floppies Ö Those of you without hard discs will have
  1365. !system on various of your floppies. The trouble is that when you change
  1366. to other discs, even if they have !system on them, you will be asked to
  1367. insert the disc containing !system that the com-puter saw first of all.
  1368. To get round this, double click on !system on the current disc before
  1369. trying to launch applications from the disc.
  1370. 3.6
  1371. Å   Art Nouveau Ö Fills approximating to graduated, logarithmic,
  1372. circular etc can easily be Édesignedæ and saved to disc. For example:
  1373. 3.6
  1374. Approx circle fill Ö Set a small grid size and switch it on. Draw
  1375. several concentric filled circles, selecting each shade as you go. Smear
  1376. the edges with Écolour mergeæ if you donæt want the bands of colour to
  1377. show. Pick it up as a brush and use with: brush, effects1, distort x (or
  1378. y). Some of the effect that Pro-Artisan and Atelier have as features can
  1379. be cobbled together with a little effort using Art Nouveau (at half the
  1380. price!). D P Allen.
  1381. 3.6
  1382. Å   Beware the SUM! Ö If you rely on indentation in your programs to
  1383. keep a check on the structure of the various loops, beware that SUM(A())
  1384. will cause an extra indent. Is there any way round this? Fred Hartley,
  1385. Hayes.
  1386. 3.6
  1387. Å   Booting Ö When booting the Archimedes up it is tempting to just
  1388. refer to applications assuming their path starts at the root ($). e.g.
  1389. !Edit Ö can be installed on the desktop using just !Edit in a boot file.
  1390. 3.6
  1391. However, this will not ensure the appropriate system variable is set up
  1392. with the full pathname. Again using !Edit as example, you would get just
  1393. Ö Edit$Dir = !Edit
  1394. 3.6
  1395. To avoid this put the full name in the desktop boot file, e.g.
  1396. 3.6
  1397. *Run adfs:HardDisc.$.!Edit
  1398. 3.6
  1399. Only of much use if, like me, you decide to set the directory yourself
  1400. while using Desktop (despite what Acorn advise!). Ian Pollock
  1401. 3.6
  1402. Å   Graph-Box Ö superb program but I find it very annoying that it
  1403. Édiesæ when you close the window. The following changes will give
  1404. Graphbox an icon on the iconbar. It will only Édieæ when you click
  1405. <menu> followed by Équitæ as Edit and Draw etc. This lets you clear some
  1406. valuable desktop space to write a letter or whatever. while still having
  1407. Graphbox available on the icon bar.
  1408. 3.6
  1409. *BASIC
  1410. 3.6
  1411. LOAD ö!GraphBox.!RunImageò
  1412. 3.6
  1413.  220 WHEN 3:PROCclosew(!q%):IF!q%=
  1414. 3.6
  1415. w_graphbox% THEN mainclosed%=TRUE
  1416. 3.6
  1417.  560 quit%=FALSE:mainclosed%=FALSE
  1418. 3.6
  1419. 4590 WHEN0:PROCclosew(w_graphbox%)
  1420. 3.6
  1421. :quit%=TRUE
  1422. 3.6
  1423. 5291 Icon%=sprites%:!Icon%=TRUE:
  1424. 3.6
  1425. DIM Spritename% 14:$Spritename%=
  1426. 3.6
  1427. ö!graphboxò:Icon%!4=0:Icon%!8=0:
  1428. 3.6
  1429. Icon%!12=64:Icon%!16=68:Icon%!20=
  1430. 3.6
  1431. (&311A OR (7<<28))
  1432. 3.6
  1433. 5292 Icon%!24=Spritename%:Icon%!28=1:
  1434. 3.6
  1435. Icon%!32=12:SYS öWimp_CreateIconò
  1436. 3.6
  1437. ,,Icon% TO graph_iconbar%
  1438. 3.6
  1439. 5445 READ t$:m_iconbar%=FNcrmenu(t$)
  1440. 3.6
  1441. 5447 DATA ö#Graphbox,Info>w_pinfo%,
  1442. 3.6
  1443. Quitö
  1444. 3.6
  1445. 5710 REM quit%=TRUE
  1446. 3.6
  1447. 6395 IF mh%=-2 AND mb%=4 OR mb%=1024
  1448. 3.6
  1449.  AND mi%=graph_icnbar% THEN PROCgetw
  1450. 3.6
  1451. (w_graphbox%):PROCfront(w_graphbox%
  1452. 3.6
  1453. ,420,150):mainclosed%=FALSE
  1454. 3.6
  1455. 7375 WHEN-2:IFmi%=graph_icnbar% THEN
  1456. 3.6
  1457.  PROCpop(m_iconbar%,-1)
  1458. 3.6
  1459. 8219 IF menu%=m_iconbar% my%+=64
  1460. 3.6
  1461. 8545 WHEN m_iconbar%:IF !mlist%=1
  1462. 3.6
  1463.  THEN quit%=TRUE
  1464. 3.6
  1465. 16505 IFmainclosed%=TRUE PROCfront
  1466. 3.6
  1467. (w_graphbox%,420,150):
  1468. 3.6
  1469. mainclosed%=FALSE
  1470. 3.6
  1471. SAVE ö!GraphBox.!RunImageò
  1472. 3.6
  1473. NOTE: Graphbox claims what you have in your next slot up to a max of
  1474. 640k but as the program needs only a minimum of around 200k to run,
  1475. thereæs space for a very big graph! Before loading Graphbox, drag the
  1476. Énextæ slot down to about 330k to free some more space. You can edit the
  1477. !run file and change the -max to reconfigure it more permanently. Rob
  1478. Davison
  1479. 3.6
  1480. Å   Installing Alerion Ö Here are the steps you must take in order to
  1481. install RISC-OS Alerion onto your hard disc:
  1482. 3.6
  1483. (i) create a RAM disc with at least 432k
  1484. 3.6
  1485. (ii) copy the !Alerion directory into the RAM disc
  1486. 3.6
  1487. (iii) alter the RAM disc !Boot file in the !Alerion directory so that it
  1488. reads:
  1489. 3.6
  1490. IconSprites <Obey$Dir>.!Sprites
  1491. 3.6
  1492. (iv) also alter the !Run file so that reads:
  1493. 3.6
  1494. Set Alerion$Dir <Obey$Dir>
  1495. 3.6
  1496. RMClear
  1497. 3.6
  1498. RMLoad MemAlloc
  1499. 3.6
  1500. RMSize 320k
  1501. 3.6
  1502. ScreenSize 160k
  1503. 3.6
  1504. RMKill MemAlloc
  1505. 3.6
  1506. Run <Alerion$Dir>.!RunImage
  1507. 3.6
  1508. (v) copy the !Alerion directory from the RAM disc to your hard disc.
  1509. 3.6
  1510. Å   Rounding Errors Ö Try typing P.STR$(0.6) in BASIC. If you are
  1511. putting the string of a variable into a writeable menu option when
  1512. programming a wimp system and this rounding error comes up, the
  1513. resulting string can overwrite some of the data structure for your menu.
  1514. The result is often an öAbort on data transferò! This can be quite hard
  1515. to track down so be careful. DIMming the block to 5 bytes will stop a
  1516. crash but will leave the user with a 0.6666666669 to edit instead of
  1517. 0.6. This can be a bit disconcerting. To solve it, set @% to round to
  1518. e.g. 2 decimal places before doing the STR$ and reset @% afterwards Ö
  1519. see 400 series BASIC Guide pp277-278 for details. Rob Davison
  1520. 3.6
  1521. Å   Screen modes & memory claiming Ö If your program has a proper RISC-
  1522. OS front end, it can change modes without worrying about screen memory.
  1523. If there is enough in Éfreeæ and Énextæ it will be shunted to screen
  1524. memory and the mode selected. Rob Davison
  1525. 3.6
  1526. Å   Synthesiser MIDI modes Ö The answer to Gerald Fittonæs problem
  1527. (issue 2.12 p 18) that his Korg synthesiser plays all channels no matter
  1528. what he does, is that his synthesiser is not in the correct MIDI mode.
  1529. 3.6
  1530. All MIDI devices operate under modes. These are as below:
  1531. 3.6
  1532.    MIDI mode 1:   OMNI On/Poly
  1533. 3.6
  1534.    MIDI mode 2:   OMNI On/Mono
  1535. 3.6
  1536.    MIDI mode 3:   OMNI Off/Poly
  1537. 3.6
  1538.    MIDI mode 4:   OMNI Off/Mono
  1539. 3.6
  1540. OMNI On/Off selects whether the device receives on all MIDI channels
  1541. (OMNI On) or only on one MIDI channel (OMNI Off). Poly means that the
  1542. device will be able to play two or more notes at the same time and Mono
  1543. means that it will only be able to play one at a time. The Korg will
  1544. almost certainly be in MIDI mode 1, which is how most synthesisers are
  1545. set up when they are sent from the shop. The answer is to change the
  1546. MIDI mode to 3 or 4 and to set the Korg to receive on the same MIDI
  1547. channel as Maestro is sending.
  1548. 3.6
  1549. Å   Wimp Resizing Ö I have written a program which needs a large area of
  1550. memory as store for data. The program works in the desktop and claims
  1551. memory via SYS öWimp_SlotSizeò. Initially, I used the BASIC statement
  1552. öEND=HIMEM + value%ò but this also changes the address of HIMEM. Loops,
  1553. procedures and local variables are stored just below HIMEM so my data
  1554. was being overwritten. I tried lowering HIMEM immediately afterwards but
  1555. things still went wrong so I use öWimp_SlotSizeò directly. BASIC is
  1556. ignorant of the new memory area and it can therefore be safely used as a
  1557. store. Use a variable öClaimer%æ and exit the Wimp_Poll loop if itæs not
  1558. zero then call Wimp_SlotSize. R.D.
  1559. 3.6
  1560.  
  1561. Å   !Draw Ö I used to find it difficult to get to grips with !Draw
  1562. because I couldnæt visualise the final layout. However, if you use the
  1563. Énew viewæ option together with Ézoomæ you can get a WYSIWYG view. Not
  1564. only this, but it is possible to manipulate the major view from the
  1565. minor view. L Kennedy.
  1566. Å   Acorn DTP Ö This may seem obvious but I only just figured it out! 
  1567. When printing documents from Acorn DTP, I found that footers (in
  1568. particular) wouldnæt print.  I spent ages looking through the DTP manual
  1569. trying to figure out why. I suddenly occurred to me that it might be the
  1570. printer driver and sure enough, it was.  The page size for A4 paper has
  1571. margins set all round, in particular a bottom margin of 20 mm is set,
  1572. and it is this which is Éclippingæ out the footers.  Set this to 0 (say)
  1573. and the problem is solved. Kevin Quinn
  1574. 3.7
  1575. Å   BASIC programs from !Edit Ö When in !Edit you can actually run BASIC
  1576. programs etc from within the desktop without pressing <f12>. I happened
  1577. to come across this accidentally. Press <menu> on the Edit icon and
  1578. click on New Task Window. This will produce a task window on the screen
  1579. and will allow you to execute the BASIC environment without leaving the
  1580. desktop and allow you to format disks also allowing you to nearly multi-
  1581. task formatting disks, you can suspend the task get on with something
  1582. then resume the task and the formatter will continue where it left off!
  1583. Press-ing <menu> from within the task window will give a list of
  1584. commands (anyone know what link/unlink does??) Graham Bisset
  1585. 3.7
  1586. Å   Changing your batteries and keeping your CMOS RAM settings intact.
  1587. If you connect a 100 microfarads capacitor in series with a 100 ohm
  1588. resistor and clip them across the battery connec-tions, (+ve of the
  1589. capacitor to +ve of the battery) you will have about 70-100 seconds to
  1590. change your batteries without losing your CMOS settings. The computer
  1591. should be kept switched off throughout the operation. J W E Jones
  1592. 3.7
  1593. Å   Current directory path Ö With reference to Richard Skempæs query in
  1594. Archive 3.5 p43 about getting the full pathname of the current direc
  1595. tory, the Éeasiest on your fingersæ method uses system variables. It was
  1596. difficult to implement and required a fair amount of digging in the
  1597. manuals but it does demonstrate the use of *Set, *SetMacro and *SetEval,
  1598. so here it is:
  1599. 3.7
  1600. Place the following two lines into an Obey file, either via *Build or by
  1601. using !Edit. Save it in the library directory of your current disc as
  1602. öPathò and set the filetype to be an Obey file (*SetType %.Path Obey).
  1603. Execute it with *Path. Subsequent use of *Path will have other effects Ö
  1604. see later.
  1605. 3.7
  1606. Set Path$ $
  1607. 3.7
  1608. SetMacro Alias$Path Dir %%0||mIf ö%%0ò = öò Then Set Path$ $ Else If
  1609. ö%%0òLEFT1 = ö$ò Then Set Path$ %%0 Else SetEval Path$ Path$ + ö.%%0ò
  1610. 3.7
  1611. How it works: öSet Path$ $ò sets up a system variable called öPath$ò and
  1612. assigns to it the string value ö$ò, which you will recognise as being
  1613. the name of the root directory.
  1614. 3.7
  1615. öSetMacro Alias$Path ╔ò creates a macro system variable called öPathò.
  1616. 3.7
  1617. When ö*Path [<directory path>]ò is executed, the macro first selects the
  1618. directory specified in <dir-ectory path> by way of the old *Dir command.
  1619. 3.7
  1620. If no directory path is specified, the old *Dir selects the root
  1621. directory. The macro examines <directory path> and, if it is a null
  1622. string (öò), it sets Path$ to ö$ò.
  1623. 3.7
  1624. If the leftmost character of <directory path> is ö$ò, the macro replaces
  1625. Path$ with <directory path>.
  1626. 3.7
  1627. If <directory path> is not null and does not have ö$ò as its leftmost
  1628. character, the macro appends a full stop and the string specified in
  1629. <directory path> to whatever Path$ contains.
  1630. 3.7
  1631. Path$ thus always contains the full pathname of the currently selected
  1632. directory (CSD).
  1633. 3.7
  1634. You can actually redefine *Dir itself to do this, so that you donæt have
  1635. to remember to use *Path ins-tead of *Dir. In other words, it becomes
  1636. transparent.
  1637. 3.7
  1638. All you do is to change the first occurrence of Path (in öAlias$Pathò)
  1639. to Dir (i.e. öAlias$Dirò) and change the öDir %%0ò to ö%Dir %%0ò. The
  1640. extra % sign in front of Dir is to enable the original version of Dir to
  1641. be used (FORTH programmers will recognise this as smudging). I have not
  1642. actually tried this, but it should work!!
  1643. 3.7
  1644. How to use it:
  1645. 3.7
  1646. Use öPathò wherever you would use öDirò. In fact, do not use öDirò at
  1647. all (more on this later). Also use full pathnames, as opposed to
  1648. wildcarded path-names. This is not really necessary, but it looks
  1649. neater.
  1650. 3.7
  1651. The command ö*Path Basic.Games.Adventureò, executed from the root
  1652. directory, would set sub-directory öAdventureò as the CSD, exactly in
  1653. the same way as ö*Dir Basic.Games.Adventureò would do.
  1654. 3.7
  1655. Notes:
  1656. 3.7
  1657. 1. No leading asterisks. You may enter them, but they are superfluous,
  1658. as these lines are sent direct to the CLI.
  1659. 3.7
  1660. 2. The use of two double bar characters in ||m. This is so that Obey
  1661. will insert it in the macro variable as |m, instead of as ASCII 13.
  1662. 3.7
  1663.    Alias$Path is a multi-line (well, a 2-line) com-mand. This is quite
  1664. acceptable, provided each line is separated by a carriage return (ASCII
  1665. 13, or |m).
  1666. 3.7
  1667.    Note that the (*)Dir command is at the start of the macro. Putting it
  1668. at the end causes errors related to the (*)If╔Then╔Else construct.
  1669. 3.7
  1670. 3. Double percentage character in %%0. This is so that Obey will insert
  1671. it in the macro variable as %0, instead of attempting to evaluate a
  1672. (non-existent) parameter when the command *SetMacro is executed.
  1673. 3.7
  1674. 4. Double quote marks where the parameter is to be evaluated as a
  1675. string. This is so that string evaluation will proceed correctly.
  1676. 3.7
  1677. 5. Use of upper and lower case. In general they are interchangeable at
  1678. will.
  1679. 3.7
  1680. (*)Eval supports a number of operators (see p.394 in the Archimedes User
  1681. Guide). Some are in the form of ordinary words, such as LEFT, MOD, AND,
  1682. OR, etc, and others are symbols, such as *, +, >>, etc. The ordinary
  1683. words must be in UPPER CASE, otherwise they are not recognised.
  1684. 3.7
  1685. Disc-related commands seem to be quite happy when offered system
  1686. variables as pathnames. If an application sets up its own pathname as,
  1687. say, öApplication$Dirò, you can make the first line of a BASIC program.
  1688. 3.7
  1689. 10 REM > <Application$Dir>.Program
  1690. 3.7
  1691. and be confident that the BASIC command SAVE will put it in the right
  1692. place, as the Filer (I think) evaluates <Application$Dir> correctly.
  1693. Also *Eval Application$Dir (without the <>) also returns the value of
  1694. the variable.
  1695. 3.7
  1696. You can get the value of the system variable into a BASIC variable with
  1697. the following FN:
  1698. 3.7
  1699. buffer_length%=255
  1700. 3.7
  1701. DIM buffer% buffer_length%
  1702. 3.7
  1703. PRINT FNevalOS(öApplication$Dirò) : REM NB!! no < >
  1704. 3.7
  1705. END
  1706. 3.7
  1707.  
  1708. 3.7
  1709. DEF FNevalOS(A$) LOCAL T%,L%
  1710. 3.7
  1711. SYS öOS_EvaluateExpressionò, A$,buffer%,buffer_length% TO ,T%,L%
  1712. 3.7
  1713. IF T%=0 THEN = L% : REM integer result
  1714. 3.7
  1715. buffer%?L%=13
  1716. 3.7
  1717. =$buffer%     : REM string result
  1718. 3.7
  1719. Anton Mans, Durban
  1720. 3.7
  1721. Å   Double height in Fortran Ö The following short FORTRAN routine can
  1722. be used for the Archimedes to Étart upæ screen output. It is a routine
  1723. for printing text in double height on the screen and uses OS_Word call
  1724. 10 to read the system font bit pattern. A VDU23 call is used to define a
  1725. pair of characters consisting of the upper and lower halves of the input
  1726. character. These two characters are then printed, one above the other,
  1727. giving a double-height character. Itæs very useful for printing headings
  1728. in screen output and doesnæt require messing about with special fonts
  1729. (Iæm going to go on to that next!).
  1730. 3.7
  1731. I claim no originality for the overall method. A routine in BBC BASIC to
  1732. do this was published in Beebug some years ago (I forget who the author
  1733. was), but I thought it was worth publicising a FORTRAN version of it in
  1734. Archive because I donæt think the translation is immediately obvious and
  1735. readers may not have been aware of the technique anyway. It should be
  1736. easily extendible to double width, quadruple height, etc.
  1737. 3.7
  1738. Rather than just give the bare routine, I have produced a short program
  1739. incorporating it, that writes out a couple of strings. Much use is made
  1740. of the É$æ format to suppress CRLF when characters are being sent to the
  1741. VDU driver. The routine is more complex than the BASIC equivalent for
  1742. two reasons. Firstly, although there is a word ÉLENæ in FORTRAN, it only
  1743. seems to give the maximum length of any given string, i.e. the length
  1744. that it is originally declared to be (e.g. CHARACTER*78 TXT; LEN(TXT)
  1745. gives 78). So in SUBROUTINE DOUBLE, there are a few lines to find the
  1746. length of the string passed to it by counting backwards from the maximum
  1747. length until a non-space character is reached. N.B. this will fail if
  1748. the string is put into the argument list, e.g. CALL DOUBLE(10,20,ÉHi
  1749. thereæ). Secondly, since individual bytes in memory are not accessible
  1750. to FORTRAN, you have to get the result back as three (4-byte) integers,
  1751. and use IAND with ISHFT to gain access to the bytes.
  1752. 3.7
  1753.      PROGRAM DHTEST
  1754. 3.7
  1755. C    *******************************
  1756. 3.7
  1757. C    A DEMONSTRATION PROGRAM FOR
  1758. 3.7
  1759.  PRINTING DOUBLE HEIGHT
  1760. 3.7
  1761. C    TEXT IN ANY MODE (NOT 7) ON THE
  1762. 3.7
  1763.  ACORN ARCHIMEDES,
  1764. 3.7
  1765. C    IN ACORNSOFT FORTRAN. USES ACORN
  1766. 3.7
  1767.  EXTENSIONS: OSWORD, ISHFT, IAND
  1768. 3.7
  1769. C    BY R.D.WRIGHT
  1770. 3.7
  1771. C    *******************************
  1772. 3.7
  1773.      CHARACTER*78 TXT
  1774. 3.7
  1775.      WRITE(6,æ($,2A)æ)CHAR(22)
  1776. 3.7
  1777. ,CHAR(12)
  1778. 3.7
  1779.      WRITE(6,*)æDOUBLE HEIGHT TESTæ
  1780. 3.7
  1781.      TXT=æTHIS IS A VERY LONG TEST
  1782. 3.7
  1783.  STRINGæ
  1784. 3.7
  1785.      CALL DOUBLE(10,20,TXT)
  1786. 3.7
  1787.      TXT=ÉAND MOREæ
  1788. 3.7
  1789.      CALL DOUBLE(10,23,TXT)
  1790. 3.7
  1791.      STOP ÉEND OF DEMOæ
  1792. 3.7
  1793.      END
  1794. 3.7
  1795.      SUBROUTINE DOUBLE(ICOL,IROW,TXT)
  1796. 3.7
  1797.      CHARACTER*78 TXT
  1798. 3.7
  1799.      INTEGER BLOCK(0:2)
  1800. 3.7
  1801.      INTEGER B(0:8)
  1802. 3.7
  1803.      N=79
  1804. 3.7
  1805.   10 N=N-1
  1806. 3.7
  1807.      IF (TXT(N:N).EQ.É æ) GO TO 10
  1808. 3.7
  1809.      DO 20 I=1,N
  1810. 3.7
  1811.      BLOCK(0)=ICHAR(TXT(I:I))
  1812. 3.7
  1813.      CALL OSWORD(10,BLOCK)
  1814. 3.7
  1815.      DO 2010 J=1,3
  1816. 3.7
  1817.      BLOCK(0)=ISHFT(BLOCK(0),-8)
  1818. 3.7
  1819.      B(J)=IAND(BLOCK(0),?IFF)
  1820. 3.7
  1821. 2010 CONTINUE
  1822. 3.7
  1823.      B(4)=IAND(BLOCK(1),?IFF)
  1824. 3.7
  1825.      DO 2020 J=5,7
  1826. 3.7
  1827.      BLOCK(1)=ISHFT(BLOCK(1),-8)
  1828. 3.7
  1829.      B(J)=IAND(BLOCK(1),?IFF)
  1830. 3.7
  1831. 2020 CONTINUE
  1832. 3.7
  1833.      B(8)=IAND(BLOCK(2),?IFF)    
  1834. 3.7
  1835.      WRITE(6,É($,10A)æ)CHAR(23),CHAR(
  1836. 3.7
  1837. 240),CHAR(B(1)),CHAR(B(1))
  1838. 3.7
  1839.      +,CHAR(B(2)),CHAR(B(2)),CHAR(B(3
  1840. 3.7
  1841. )),CHAR(B(3)),
  1842. 3.7
  1843.      +CHAR(B(4)),CHAR(B(4))
  1844. 3.7
  1845.      WRITE(6,É($,10A)æ)CHAR(23),CHAR(
  1846. 3.7
  1847. 241),CHAR(B(5)),CHAR(B(5))
  1848. 3.7
  1849.      +,CHAR(B(6)),CHAR(B(6)),CHAR(B(7
  1850. 3.7
  1851. )),CHAR(B(7))
  1852. 3.7
  1853.      +,CHAR(B(8)),CHAR(B(8))
  1854. 3.7
  1855.      IX=ICOL+I-1
  1856. 3.7
  1857.      IYU=IROW
  1858. 3.7
  1859.      IYL=IROW+1
  1860. 3.7
  1861.      WRITE(6,É($,8A)æ)CHAR(31),CHAR(
  1862. 3.7
  1863. IX),CHAR(IYU),CHAR(240)
  1864. 3.7
  1865.      +,CHAR(31),CHAR(IX),CHAR(IYL)
  1866. 3.7
  1867. ,CHAR(241)
  1868. 3.7
  1869.   20 CONTINUE
  1870. 3.7
  1871.      RETURN
  1872. 3.7
  1873.      END
  1874. 3.7
  1875. R.D.Wright
  1876. 3.7
  1877. Å   Easy ÉCæ Compilation I Ö While working on a C program it can become
  1878. quite tedious to type in the same parameters every time you want to
  1879. compile the latest version of your program. One way to get around this
  1880. is to use something like öC-Frontò from Mitre which allows you to
  1881. compile directly from the desktop. A simpler and cheaper way is to use
  1882. an ÉObeyæ file which will do the job for you. Below is an example that
  1883. has been written to make the compilation of C (Release 3) programs
  1884. easier. Using this method, you can still work from the desktop editing
  1885. your text in !Edit, saving it, then pressing <f12>. You can then use the
  1886. following command:
  1887. 3.7
  1888. *c <inputname> [outputname]
  1889. 3.7
  1890. It will then automatically Compile and Link your new masterpiece!
  1891. 3.7
  1892. The program has been fully commented to aid understanding. It should be
  1893. saved as an ÉObeyæ file in the ÉLibraryæ directory under the name öCò.
  1894. Obviously it should be customised to suit your own directory layout and
  1895. preferred compiler options.
  1896. 3.7
  1897. | ÉCæ Obey file, Compiler & Linker -
  1898. 3.7
  1899.  16/02/90 Mark Taylor
  1900. 3.7
  1901. | Syntax : ö*C <inputname> [output
  1902. 3.7
  1903. name]ö
  1904. 3.7
  1905. | Where Éinputnameæ is the name of
  1906. 3.7
  1907.  the file to be compiled
  1908. 3.7
  1909. | and Éoutputnameæ is the name of the
  1910. 3.7
  1911.  output file, e.g. !RunImage, etc.
  1912. 3.7
  1913. |
  1914. 3.7
  1915. | Check for parameters. If none
  1916. 3.7
  1917.  present then error and output
  1918. 3.7
  1919.  a message.
  1920. 3.7
  1921. if ö%0ò = öò then error 0 Error in
  1922. 3.7
  1923.  ÉCæ Compiler & Linker. Syntax : *C |<inputname|> [outputname]
  1924. 3.7
  1925. |
  1926. 3.7
  1927. | Set system variable Éipname$æ to
  1928. 3.7
  1929.  first parameter after the öcò.
  1930. 3.7
  1931. Set ipname$ %0
  1932. 3.7
  1933. |
  1934. 3.7
  1935. | Check for a second and if there is
  1936. 3.7
  1937.  one set Éopname$æ to that
  1938. 3.7
  1939.  variable,
  1940. 3.7
  1941. | else set Éopname$æ equal Éipname$æ.
  1942. 3.7
  1943. If ö%1ò > öò then Set opname$ %1 else
  1944. 3.7
  1945.  Set opname$ %0
  1946. 3.7
  1947. |
  1948. 3.7
  1949. | Compile with Éipname$æ, do NOT Link
  1950. 3.7
  1951.  (-c). ANSI 3 Standard method.
  1952. 3.7
  1953. cc -c <ipname$> -I$.RISC-OSLib
  1954. 3.7
  1955. |
  1956. 3.7
  1957. | Link Éipname$æ with standard lib-
  1958. 3.7
  1959. raries and output as Éopname$æ.
  1960. 3.7
  1961. link -o <opname$> o.<ipname$> $.RISC
  1962. 3.7
  1963. -OSLib.o.RISC-OSLib $.CLib.o.Stubs
  1964. 3.7
  1965. |
  1966. 3.7
  1967. | Echo finishing message.
  1968. 3.7
  1969. Echo File É<ipname$>æ successfully
  1970. 3.7
  1971.  compiled as É<opname$>æ.
  1972. 3.7
  1973. | Unset the temporary variables.
  1974. 3.7
  1975. Unset ipname$
  1976. 3.7
  1977. Unset opname$
  1978. 3.7
  1979. Below is a cut down version that is not quite as sophisticated but is
  1980. easier to understand.
  1981. 3.7
  1982. | ÉCæ Obey file, Compiler & Linker -
  1983. 3.7
  1984.  16/02/90 Mark Taylor
  1985. 3.7
  1986. | Syntax : ö*C nameò Where Énameæ is
  1987. 3.7
  1988.  the name of the file to be
  1989. 3.7
  1990.  compiled.
  1991. 3.7
  1992. cc -c %0 -I$.RISC-OSLib
  1993. 3.7
  1994. link -o %0 o.%0 $.RISC-OSLib.o.RISC
  1995. 3.7
  1996. -OSLib $.CLib.o.Stubs
  1997. 3.7
  1998. Echo File É%0æ successfully compiled.
  1999. 3.7
  2000.  
  2001. 3.7
  2002. Å   Easy ÉCæ Compilation II Ö This is not a new idea but it is still
  2003. worth mentioning. To speed up the compilation of ÉCæ programs it is a
  2004. good idea to copy the necessary files to a RAM disc. I have written an
  2005. Obey file to achieve this. It is best saved into the Library directory
  2006. so that it may be called from the star (*) prompt any time. The way the
  2007. file is set up at the moment means that it will copy files from the hard
  2008. disc to a RAM disc of some 1.5M. The RAM disc is set up using the
  2009. öMemAllocò module (this can be found in the !Lander directory on the
  2010. Apps2 disc of RISC-OS). It should be copied in the mod-ules directory of
  2011. the !System folder. The directory layout reflects a fairly standard
  2012. system under release 3 of Acornæs ANSI C.
  2013. 3.7
  2014. Important!
  2015. 3.7
  2016. You must remember to copy the files you have changed during your session
  2017. back to disc before switching off!
  2018. 3.7
  2019. | Obey file to set up RAM disc as the
  2020. 3.7
  2021.  working disc for ÉCæ 18/1/90
  2022. 3.7
  2023. |
  2024. 3.7
  2025. | First create large RAM disc: 1.5MB!
  2026. 3.7
  2027. RMensure MemAlloc 0.11 RMload :4.$.
  2028. 3.7
  2029. !System.modules.memalloc
  2030. 3.7
  2031. RAMFSSize 1500
  2032. 3.7
  2033. RMensure SharedClibrary 3.50 RMload
  2034. 3.7
  2035. :4.$.!System.modules.clib
  2036. 3.7
  2037. RMensure FPEmulator 2.80 RMload :4.$.
  2038. 3.7
  2039. !System.modules.FPE280
  2040. 3.7
  2041. |
  2042. 3.7
  2043. CDir RAM:$.RISC-OSlib
  2044. 3.7
  2045. CDir RAM:$.Clib
  2046. 3.7
  2047. CDir RAM:$.User
  2048. 3.7
  2049. Copy ADFS:$.RISC-OSlib.* RAM:$.RISC-
  2050. 3.7
  2051. OSlib.* ~cr~v
  2052. 3.7
  2053. Copy ADFS:$.CLib.* RAM:$.Clib.* ~cr~v
  2054. 3.7
  2055. Copy ADFS:$.User.* RAM:$.User.* ~cr~v
  2056. 3.7
  2057. CDir RAM:$.Library
  2058. 3.7
  2059. Copy ADFS:$.Library.link RAM:$.Library.* ~c~v
  2060. 3.7
  2061. Copy ADFS:$.Library.cc RAM:$.Library.* ~c~v
  2062. 3.7
  2063. Copy ADFS:$.Library.squeeze RAM:$.Library.* ~c~v
  2064. 3.7
  2065. | Copy my single letter Obey file ÉCæ.
  2066. 3.7
  2067. Copy ADFS:$.Library.c RAM:$.Library
  2068. 3.7
  2069. .* ~c~v
  2070. 3.7
  2071. |
  2072. 3.7
  2073. |Define function keys.
  2074. 3.7
  2075. k.1c
  2076. 3.7
  2077. k.2cc -c
  2078. 3.7
  2079. k.3-I$.RISC-OSLib
  2080. 3.7
  2081. k.4link -o
  2082. 3.7
  2083. k.5$.RISC-OSLib.o.RISC-OSLib
  2084. 3.7
  2085. k.6$.CLib.o.Stubs
  2086. 3.7
  2087. k.7Squeeze -v
  2088. 3.7
  2089. | Delete all unwanted object files!
  2090. 3.7
  2091. k.12wipe o.* ~c
  2092. 3.7
  2093. |Perform *RAM at the end!
  2094. 3.7
  2095. RAM
  2096. 3.7
  2097. |Select $.User directory!
  2098. 3.7
  2099. Dir $.User
  2100. 3.7
  2101. Echo RAM Disc now setup correctly
  2102. 3.7
  2103.  (DIR=$.User)
  2104. 3.7
  2105. Echo
  2106. 3.7
  2107. free
  2108. 3.7
  2109. Filer_OpenDir RAM:$.User.c
  2110. 3.7
  2111. Å   Music Maestro please! Ö The !Maestro applic-ation provided by Acorn
  2112. is very powerful, if very complex. However, it still has a number of
  2113. short-comings relative to the old Island Logicæs öMusic Systemò for the
  2114. BBC micro. These include the inability to delete whole bars or several
  2115. bars; the inability to handle triplets; the inability to change Tempo
  2116. within a passage. Also, entering scores by dragging icons is extremely
  2117. slow and laborious and finally, öMusic Systemò counted notes in a bar
  2118. and, when the right time had been used, automatically entered a bar-
  2119. line. This not only saved an operation, it also provided a cross-check
  2120. on typing accuracy: the unexpected appearance of a bar-line indicated a
  2121. mistake somewhere.
  2122. 3.7
  2123. !Maestroæs !RunImage file has been modified to permit changing of the
  2124. Tempo during a passage. This required a new sprite, placed in the space
  2125. in the top right corner, next to the hemi-demi-semi-quaver rest; ÉMæ for
  2126. Metronome seemed to be a reasonable choice. This sprite can be picked
  2127. up, just like the others, and placed above the appropriate bar-line.
  2128. When it is Éclickedæ to fix it in position, it changes into the crotchet
  2129. symbol followed by ö=<num>ò, where <num> is a number from 40 to 210,
  2130. representing the Tempo as selected by the Tempo sub-menu from the main
  2131. Maestro menu. The numbers (of beats per minute) are given on page 1810
  2132. of the Programmeræs Reference Manual.
  2133. 3.7
  2134. During these investigations, a few small errors were noticed in the
  2135. Programmeræs Reference Manual (RISC-OS Edition). In Vol.4, under Music
  2136. Files:
  2137. 3.7
  2138. p.1809 öMaestroò is followed by öLine-feedò, &0A (not &0D)
  2139. 3.7
  2140. Music Data: Not ö4*8 length of queue of notes╔ò but ö5*8ò because the
  2141. length is written to file as an integer variable, FINE%(C%) (as in DC al
  2142. fine!), so it consists of one byte (&40:integer) followed by 4 bytes
  2143. (value).
  2144. 3.7
  2145. p.1811 Attributes: Clef Bit 5 is unused Bits 6 & 7 are (StaveÖ1), range
  2146. 0Ö3. The attributes as defined in !Maestro. !RunImage lines 28900Ö29020
  2147. agree with those obtained by a *DUMP of a Music file. Alan Quayle
  2148. 3.7
  2149. Å   Shift Caps Lock will give you capitals normally but will enable
  2150. lower case characters to be typed by holding down the shift key Ö very
  2151. useful when writing BASIC programs. Fred Lee
  2152. 3.7
  2153. Å   SID Ö There is a mail-server on the SID database and so if you can
  2154. use E-MAIL (e.g. if you are a student at University, like me) then you
  2155. can mail it at SIDInfo@uk.co.acorn with a message contain-ing the word
  2156. Éhelpæ and it will mail you a file telling you how to download stuff. 
  2157. It only has the free PD stuff though (obviously). The advantages of this
  2158. service work both ways Ö the SID machine can schedule the replies in
  2159. non-peak times and you are not using lots of on-line time down-loading.
  2160. Kevin F. Quinn
  2161. 3.7
  2162. Å   TinyDirs Ö it may be obvious to most of you but╔ The TinyDirs
  2163. program not only allows directories to be installed on the icon bar but
  2164. allows applications to be as well. After all they are only directories
  2165. really. The application can then be run by clicking on the icon on the
  2166. icon bar in just the same way as any other application. This means you
  2167. can have your favourite programs on the icon bar without having to worry
  2168. about how to install them there. The TinyDirs program will also cope
  2169. with more than one directory. (A friend was running a new copy of
  2170. TinyDirs each time he wanted a new directory installed.) If you just
  2171. drag the icon for the directory you want installed onto one of those
  2172. already there it will be added to the list. Andrew Ling.
  2173. 3.7
  2174. Å   Turkish Éiæ Ö There is a minute error in the char-acter set supplied
  2175. as öLatin3ò on the Archimedes which, according to Acornæs manual,
  2176. corresponds to ISO 8859/3 covering German, Spanish, Turkish etc.
  2177. Character 185 is supposed to be the Turkish lower case Éiæ, i.e. like
  2178. the English Éiæ but without the dot. (The Mac has let me down for once Ö
  2179. no Turkish Éiæ! Ed.) Instead, it replicates the standard Latin Éiæ.
  2180. 3.7
  2181. To overcome this, insert the following in a boot file:
  2182. 3.7
  2183. *echo <23><185><0><0><56><24><24>
  2184. 3.7
  2185. <24><60><0>
  2186. 3.7
  2187. John Morgan
  2188. 3.7
  2189. Å   Working on a 1Mbyte machine Ö When loading applications within the
  2190. desktop especially on a 1Mb machine, always call up the task display and
  2191. reduce the size of the next slot to as low as the machine will allow,
  2192. some applications will allow you to set it to 8k and they will just grab
  2193. as much memory as they need, however some will report ÉApp need XXXk to
  2194. startæ so change the slot to about XXX+20k for workspace. If you do this
  2195. then the application can only grab as much memory as it needs. However,
  2196. if you leave say 640k in the next and you click on an application then
  2197. its likely that the application will grab about 600k or so leaving
  2198. precious little for other programs, data etc Users of 2Mb+ machines
  2199. donæt have the problem, but they still need to be careful of memory
  2200. grabbing applications!  Graham Bisset
  2201. 3.7
  2202.  
  2203. Å   Auto-Booting on Startup Ö The following tip is of particular use to
  2204. users of hard disks.
  2205. 3.8
  2206. With so many extensions to RISC-OS being avail-able, most notably the
  2207. Outline Font Manager, it can be inconvenient if your applications canæt
  2208. find them and even worse if the first !System directory that is seen is
  2209. on a floppy.
  2210. 3.8
  2211. The simplest solution to this is to put !Fonts and !System in the root
  2212. directory of your hard disk and then open the root directory as your
  2213. first action.
  2214. 3.8
  2215. However, if the same action has to be performed repeatedly, then the
  2216. computer must be able to do it for you and it can.
  2217. 3.8
  2218. First you should create a command file called !Boot in Edit. This should
  2219. contain something like:
  2220. 3.8
  2221. adfs::4.$.!System
  2222. 3.8
  2223. adfs::4.$.!Fonts
  2224. 3.8
  2225. DESKTOP
  2226. 3.8
  2227. This will then initialise the system and font paths before starting the
  2228. desktop. To make it run on startup, you must configure the system to
  2229. execute the !boot file, this is done from an operating system * prompt
  2230. by:
  2231. 3.8
  2232. *configure boot
  2233. 3.8
  2234. *configure drive 4
  2235. 3.8
  2236. *opt 4,3
  2237. 3.8
  2238. The last option sets the current drive to execute the !boot file, rather
  2239. than attempting to run it as a BASIC program.
  2240. 3.8
  2241. This is not the end of the startup. When you invoke the desktop, it is
  2242. possible have one or more applications run automatically. To run a
  2243. single application, just append the application path on the end of the
  2244. DESKTOP command, for example:
  2245. 3.8
  2246. DESKTOP adfs::4.$.!Edit
  2247. 3.8
  2248. This will startup the desktop with Edit on the menu bar. To initialise
  2249. more than one application, you specify a text file which lists all the
  2250. applications that you wish to start.
  2251. 3.8
  2252. DESKTOP -File adfs::4.$.Startup
  2253. 3.8
  2254. The file Startup might contain the following list of files:
  2255. 3.8
  2256. adfs::4.$.!Draw
  2257. 3.8
  2258. adfs::4.$.!Edit
  2259. 3.8
  2260. adfs::4.$.!Paint
  2261. 3.8
  2262. This will then enter the desktop and start Draw, Edit and Paint
  2263. automatically. One word of warning, if you are limited to 1 Mb, be
  2264. careful as it would be very easy to use up all the available memory.
  2265. 3.8
  2266. Further customisation could be had by adding RMload commands to the !Run
  2267. file of !System to automatically load modules (such as NewModes) and
  2268. Filer_OpenDir pathname to the !Run files of applications in the startup
  2269. file to automatically open directory viewers. Phil Kitching
  2270. 3.8
  2271. Å   BasicEdit Ö For users of the Data Store !Basic-Edit application:
  2272. Because this application uses the DSUtil module to alter the operation
  2273. of the mouse pointer it is not possible to run desktop programs
  2274. successfully from Edit without returning to the desktop first. This,
  2275. however, has the disadvantage that programs are more difficult to debug:
  2276. when a program ends it returns to the desktop and all the variables are
  2277. lost. A few simple changes to the !BasicEdit.!RunImage program, however,
  2278. seem to provide a satisfactory remedy. Insert near the start of the
  2279. program the following function key definitions:
  2280. 3.8
  2281. *KEY 2 *BEUtilOff|M*BASIC|MOLD|M
  2282. 3.8
  2283. RUN|M
  2284. 3.8
  2285. *KEY 3 *BEUtilOn|MEDIT .|M
  2286. 3.8
  2287. Then to run any program from the Edit screen simply press <f1> once and
  2288. <f2> once. If the prog-ram uses the Wimp, the desktop will reappear as
  2289. it was before you ran !BasicEdit with the new program running as well.
  2290. After the program ends, a öcommand windowò will appear where you can use
  2291. LVAR or any other BASIC commands. To return to the Edit screen where you
  2292. left it, simply press <f3>. Hugh Eagle
  2293. 3.8
  2294. Å   Battery changing Ö You donæt have to bother with adding capacitors
  2295. etc as mentioned last month. All you need to do is leave the computer
  2296. switched on while changing the batteries (but mind your fingers on the
  2297. fan!). There is no danger involved, as the mains is totally enclosed,
  2298. and it will not harm the machine. Mike Harrison.
  2299. 3.8
  2300. Å   C programming Ö When writing desktop applications, put ÿDATEÿ in the
  2301. version string. So, if you forget to update the version number when
  2302. modifying the source files, it doesnæt really matter because when the
  2303. info is given from the menu, you can then find out what date the file
  2304. was compiled. R Bunnett.
  2305. 3.8
  2306. Å   Closing the Edit window using <adjust> (instead of <select>) the
  2307. source directory is opened after the window has been closed. Holding the
  2308. <shift> key down simultaneously, will cause the directory viewer to be
  2309. opened without closing the Edit window (this allows you to drag-save the
  2310. file into the same directory, but with a different name). This is also
  2311. true for Draw and Paint.
  2312. 3.8
  2313. Å   Double clicking problems Ö Double clicking on an application
  2314. installed on the icon bar by !TinyDirs can result in the application
  2315. running twice. This can have the confusing result that when you quit the
  2316. application a second copy of it immediately appears in its place.
  2317. 3.8
  2318. I have found a somewhat cumbersome solution to this problem which is to
  2319. include the following code in the WimpPoll loop:
  2320. 3.8
  2321. WHEN 17 : IF block%!4<>TaskId% AND block%!16=&400C2 THEN
  2322. 3.8
  2323. PROCInsertCR(block%+28)
  2324. 3.8
  2325. dummy$=$(block%+28)
  2326. 3.8
  2327. IF dummy$=TaskName$ THEN
  2328. 3.8
  2329. quit%=TRUE
  2330. 3.8
  2331. ENDIF
  2332. 3.8
  2333. ENDIF
  2334. 3.8
  2335.    .
  2336. 3.8
  2337.    .
  2338. 3.8
  2339. DEF PROCInsertCR(mem%)
  2340. 3.8
  2341. LOCAL I%
  2342. 3.8
  2343. I%=mem%
  2344. 3.8
  2345. REPEAT
  2346. 3.8
  2347. I%+=1
  2348. 3.8
  2349. UNTIL ?I%=0
  2350. 3.8
  2351. ?I%=13
  2352. 3.8
  2353. ENDPROC
  2354. 3.8
  2355. When the first application receives the message that is broadcast when a
  2356. new application starts (i.e. it receives reason code 17 with
  2357. block%!16=&400C2) and it finds that the new task has the same name
  2358. (TaskName$) as itself, it sets quit%=TRUE which makes the application
  2359. quit at the end of the poll loop.
  2360. 3.8
  2361. Note that when each application starts, it receives the message
  2362. broadcast by itself, hence the com-parison of block%!4 (which holds the
  2363. handle of the sender of the message) with TaskId% to prevent the task
  2364. from shutting itself down!
  2365. 3.8
  2366. Note also that the little procedure PROCInsertCR seems to be necessary
  2367. to convert the string at block%+28 from a zero terminated string to a
  2368. normal &0D terminated one. (Can anyone explain please RISC-OSæs
  2369. infatuation with these wretched zero-terminated strings ... and to say
  2370. that itæs because C or Unix, or whatever, uses them is no answer!) Hugh
  2371. Eagle
  2372. 3.8
  2373. Å   Filer_OpenDir Ö The command ÉFiler_Open Diræ may be used for any
  2374. file path. This includes Éfiling systemsæ created using a system
  2375. variable (e.g. System$Path) may be referred to as the filing system
  2376. Ésystem:æ. Some Éfiling systemsæ are one direction only (e.g. printer:).
  2377. The command can also use SystemDevicesæ own Éfiling systemsæ:
  2378. 3.8
  2379.    kbd: / rawkd:   the keyboard
  2380. 3.8
  2381.    null:   the Énull deviceæ
  2382. 3.8
  2383.    printer:   the printer
  2384. 3.8
  2385.    serial:   the serial port
  2386. 3.8
  2387.    vdu: / rawvdu:   the screen
  2388. 3.8
  2389.    netprint:   the network printer
  2390. 3.8
  2391. Examples: dragging a file onto the view opened by:
  2392. 3.8
  2393. *Filer_OpenDir printer: will spool it to the printer
  2394. 3.8
  2395. *Filer_OpenDir vdu: will send it to the vdu driver (try it with a text
  2396. file)
  2397. 3.8
  2398. *Filer_OpenDir null: <shift> dragging will Émoveæ a file to null: i.e.
  2399. delete it
  2400. 3.8
  2401. Å   FormEd Update Ö Users who have downloaded the !FormEd template
  2402. editor from Acornæs SID board (also available on shareware disc 20)
  2403. might like to know how to put back the Ésprite routinesæ.
  2404. 3.8
  2405. The version of !FormEd refered to has a !Help file stating a date of 16-
  2406. May-89, and a ReadMe file stating version 1.00, but shows version 1.01
  2407. and date of 23-May-89 in its Info window. The ReadMe file shows that
  2408. this is an unsupported Acorn application.
  2409. 3.8
  2410. The !Help file states ÉSome previous versions of FormEd used to provide
  2411. facilities for editing sprites. These are now provided only in the
  2412. !Paint applicationæ, also that when a sprite file is dragged onto the
  2413. FormEd icon on the iconbar, a window will display the sprites. In the
  2414. supplied state, no window is opened and you do not know what your sprite
  2415. names are, or even if you have loaded the correct file, until you define
  2416. an icon as a named sprite which you hope is in the file!
  2417. 3.8
  2418. I was having problems with not enough memory on a 1Meg machine for
  2419. !Paint, !FormEd, the sprite files and the templates being built. (It IS
  2420. possible with very careful setting of the æFreeæ and ÉNextæ bars in the
  2421. Task Manager, but you canæt have any printer drivers etc). An examina
  2422. tion of the !FormEd reveal-ed that by removing the REM statements from
  2423. just 2 lines the sprite routines were again available.
  2424. 3.8
  2425. Load the !RunImage for !FormEd and LIST lines 2270 and 3080. Edit those
  2426. lines to remove the REM before PROCspriteinfo in each, so that the lines
  2427. are as shown below:
  2428. 3.8
  2429. 2270 WHEN &FF9:PROCloadsprites (f$)
  2430. 3.8
  2431.  :PROCspriteinfo
  2432. 3.8
  2433. 3080 PROCloadsprites(FNstring0(q%
  2434. 3.8
  2435. +44)):PROCspriteinfo
  2436. 3.8
  2437. Save the file back to the disk. When a sprite file is dragged to the
  2438. FormEd icon, a sprite window is shown and the sprite editing routines
  2439. appear to work OK (although !Paint is more powerful). Douglas Potter
  2440. 3.8
  2441. Å   GraphBox Ö Maybe this is an obvious point to some users but it took
  2442. me a while to discover. Graphs imported into !Draw can be disassembled
  2443. to a remarkable degree (using ungroup) right down to facets of
  2444. individual 3D bars. This allows extensive re-orienting, re-colouring
  2445. options which can avoid some of the problems with dark colours and
  2446. overlaps when colour printing on a dot matrix printer. John Wann
  2447. 3.8
  2448. Å   Hardware developeræs tool Ö On the monthly program disk is a utility
  2449. (ÉSVCBASæ) which is very useful for hardware developers. It patches
  2450. BASIC so that memory indirection operators (? and !) operate in
  2451. supervisor mode. This allows quick Étweakingæ of hardware devices while
  2452. testing. Documentation is minimal, since those who are likely to need it
  2453. should not need any! Mike Harrison.
  2454. 3.8
  2455. Å   Maestro Ö There are (I think!) several errors in the description of
  2456. the !Maestro file format on pages 1809 to 1813 of the PRM:
  2457. 3.8
  2458. a)   in the ÉMusic dataæ the number of bytes of gate data is given, not
  2459. the number of gates as the PRM says
  2460. 3.8
  2461. b)   the number of bytes of gate data is preceded by &40
  2462. 3.8
  2463. c)   each of the next eight words (which give the length in bytes of the
  2464. queues of note/rest data for the eight channels) is also preceded by &40
  2465. 3.8
  2466. d)   in the ÉStave dataæ, the number of music staves is reduced by 1
  2467. (i.e. if there are 4 music staves this is recorded as 3)
  2468. 3.8
  2469. e)   in the descriptions of the ÉGate Attributesæ, the binary represen
  2470. tations of the bottom few bits of each byte are given with the least
  2471. significant bit first. Thus where the ÉClefæ description says öBits 0 Ö
  2472. 2 : 001 binaryò it means that bits 0 and 1 are 0 and bit 2 is 1.
  2473. 3.8
  2474. f)   within the ÉClefæ attribute data, the stave number (minus 1) is
  2475. given in bits 6 and 7, not bits 5 and 6. Hugh Eagle
  2476. 3.8
  2477. Å   Problems with an Epson LQ1050? When printing from Impression, !Draw,
  2478. etc using the !PrinterDM application, the 360 x 360 dpi mode may cause
  2479. spurious characters to be printed, which results in a poor quality
  2480. printout. The reason for this is that the firmware in the Epson printer
  2481. does not support the [Esc]+ control sequence which is nec-essary to set
  2482. a line feed of 1/360th of an inch. In order to get this option working
  2483. you will need a new version of the printeræs ROM. This can be purch-ased
  2484. from Applied Technology Ltd. David Crofts
  2485. 3.8
  2486. Å   Re-inking your ink-cartridge Ö It is possible to re-ink an ink-
  2487. cartridge for an HP-Deskjet Plus printer and probably other inkjet
  2488. printers by buying one of the inks listed below and then using a syringe
  2489. to insert the ink through a hole on the top of the cartridge. (a)
  2490. Fountain pen ink (Pelikan), (b) Diadye ink (photo-shop), (c) Rotring
  2491. air-brush ink. Tony Hopstaken
  2492. 3.8
  2493. Å   Rotor passwords Ö Lee Thake has sent in the passwords for Rotor, but
  2494. in case you would rather not know, here they are in very simple coded
  2495. form so that once you have the first password, you will be able to work
  2496. out the others. QJU, HBH, MJQ, TMZ, NFX, BXF, UOU, FOE.
  2497. 3.8
  2498. Å   Sparkplug Ö We have a lot of questions about how to decompress
  2499. programs such as PCDir which appear on our program and Shareware discs.
  2500. Let me try to explain in more detail.
  2501. 3.8
  2502. The reason the programs are compacted is that there would not be enough
  2503. room on the disc for the uncompacted version. Thus, if you are to uncom-
  2504. pact them, you need to do so onto another (prefer-ably blank) disc. If
  2505. you have two drives or a hard disc on your computer, the job is easier
  2506. then if you are trying to do it on a single drive, so I will do it the
  2507. hard way first.
  2508. 3.8
  2509. Insert a blank disc in the drive and open its filer window. Remove this
  2510. disc and insert the Program Disc (or Shareware disc, or whatever) in the
  2511. drive and open its filer window. If you have not already done so,
  2512. install !sparkplug onto the icon bar by double-clicking on it. Drag the
  2513. icon of the program to be decompacted onto the !sparkplug icon on the
  2514. icon bar. A pseudo-filer window opens. Drag the icon or icons from there
  2515. into the filer window of the blank disc. You will be prompted to insert
  2516. that disc into the drive and will probably then have to keep swapping
  2517. the discs over as prompted until all of the compacted files and folders
  2518. have been uncom-pacted and copied across onto the other disc. This may
  2519. actually require quite a number of repetitions, so it may be better to
  2520. create as large a ram disc as possible and drag the files from the
  2521. !Sparkplug filer window onto the ram disc then change discs and copy
  2522. back from the ram disc to the blank disc. This, of course, will not work
  2523. if you cannot make a ram disc big enough to accommodate the uncompacted
  2524. files.
  2525. 3.8
  2526. If you have two discs, simply put the program disc in one drive and the
  2527. blank disc in the other. Proceed as above, except that you will not be
  2528. prompted to change discs since both are accessible to the computer at
  2529. the same time.
  2530. 3.8
  2531. Å   Too many fonts Ö If you have too many anti-aliased fonts, !Edit will
  2532. crash with a ÉFatal internal error type=5æ. So those of you who are
  2533. purchasing the new onslaught of outline fonts should not put them all
  2534. into one !Fonts directory.
  2535. 3.8
  2536. Å   VIDC parameters Ö On the monthly program disk is a text file of all
  2537. the VIDC and VDU para-meters for the standard screen modes. This makes
  2538. life a lot easier when defining your own modes, especially without the
  2539. aid of an oscilloscope to monitor the video waveform, and a VIDC data-
  2540. sheet. Itæs much easier to tweak the existing num-bers than to work them
  2541. out from scratch! Mike Harrison.
  2542. 3.8
  2543. Å   Wimp programming Ö If you get unexpected messages such as öToo many
  2544. nested structuresò when running a BASIC program in a Desktop application
  2545. it may be simply because you have failed to allocate a large enough
  2546. Wimpslot. Hugh Eagle
  2547. 3.8
  2548. Å   Z88 file transfer Ö The Z88 can save files to disc. Ranger sell a
  2549. battery powered disc drive which reads and writes 3.5ö discs in 720k
  2550. MSDOS format. The trouble is it costs as much as the Z88.
  2551. 3.8
  2552. The Z88 does not insist on sending a line feed, see Printered.
  2553. 3.8
  2554. Since the Z88 serial port uses XOn/XOff by default, a three wire serial
  2555. lead will suffice if the Archim-edes is using similar software. Be sure
  2556. to short other handshaking lines. The simplest method of sending data to
  2557. the Archimedes is to use:
  2558. 3.8
  2559. *SPOOL file
  2560. 3.8
  2561. *FX21,1
  2562. 3.8
  2563. *FX2,1
  2564. 3.8
  2565. and just print from the Z88. Make sure the last lines in the file being
  2566. printed have *SPOOL *FX 2,0.
  2567. 3.8
  2568. The next stage up is to use a communications pack-age such as Hearsay
  2569. and the Filer to send or receive files. There is a nice routine on the
  2570. Data Store utilities disc which does the job using the Filer.
  2571. 3.8
  2572. Lastly the best way of transferring data is to use the PCLink ROM and
  2573. the Z88 filer that comes with Pipedream. Unfortunately PCLink comes with
  2574. a Z88 to PC cable so some soldering is still required. Data transfer
  2575. with PCLink is unnecessarily slow, a version of Kermit would have been
  2576. more use and faster. Bruce Edelsten
  2577. 3.8
  2578. (How about using the Archimedes-Z88 link that we supply for ú35? Ed.)
  2579. 3.8
  2580.  
  2581. 3.9
  2582. Å   Clear a line Ö To clear a text input in an editable field, press
  2583. <ctrl-U>. For example, you can use this to clear the filename before
  2584. typing a new entry. Philip Armstrong
  2585. 3.9
  2586. Å   !Draw Ö Someone mentioned converting sprite images to object
  2587. orientated !Draw images. I have used a graph program and converted the
  2588. sprite it created to a !Draw file by zooming up and drawing over the
  2589. sprite. If you keep to, say, the bottom left of each pixel, it works OK
  2590. and gives a much better printed image.
  2591. 3.9
  2592. To get vertical and horizontal lines, use the edit coordinated facility.
  2593. Get one end correct then note its x or y location and then edit the
  2594. other end to match it.
  2595. 3.9
  2596. If you have typed some incorrect text into a draw file, for example ÉFig
  2597. 4.5æ needs to be changed to ÉFig 4.6æ, then you would normally have to
  2598. re-type the line and be careful to locate it in the same place. If
  2599. characters are changed leaving the string length the same then you could
  2600. use !Edit to search and replace the text, once the draw file has been
  2601. dragged onto the !Edit icon. Strings could also be padded out with
  2602. spaces if a shorter replace string is required, but for a longer string
  2603. it is usually easier to re-type in !Draw. Philip Armstrong
  2604. 3.9
  2605. Å   DXF files Ö Inclusion of a 41 group in TEXT entities permits
  2606. characters with varying aspect ratios. A value of 0.5 matches the system
  2607. fonts. Jim Markland.
  2608. 3.9
  2609. Å   Elektor sound sampler Ö In Decemberæs issue of the Netherlands
  2610. edition of Elektor (November in the U.K. edition) they published a
  2611. D.I.Y. sound sampler podule. This podule has been built freq-uently but
  2612. there is one small problem. There are no commands provided to use the
  2613. sampler so it is difficult to use it in your own software. I decided
  2614. therefore to write a module.
  2615. 3.9
  2616. The module makes use of a timer within the 6522 on the board. This
  2617. results in a very accurate sample-time. To make use of the module, you
  2618. need to set a jumper on the podule which connects the 6522-IRQ-line to
  2619. the FIQ-line of the Archimedes.
  2620. 3.9
  2621. Holding the podule with the 64-way-connector towards you and the print
  2622. header at the right, you can place the jumper vertically at the right
  2623. bottom of the print header.
  2624. 3.9
  2625. Now you can use the module. There is a SWI included:
  2626. 3.9
  2627. ElektorSampler_Sample (&500)
  2628. 3.9
  2629. R0 = Start address of the sample buffer
  2630. 3.9
  2631. R1 = End address of the sample buffer
  2632. 3.9
  2633. R2 = Sample time in ╡s
  2634. 3.9
  2635. R3 = Minimum level to start sampling
  2636. 3.9
  2637. R4 : bit 0: This bit defines the quality of the sample. Low quality
  2638. sampling must be used unless you are prepared to allow the screen to be
  2639. disabled. 0 = high quality sampling, 1 = low quality sampling.
  2640. 3.9
  2641.    bit 1: This bit defines whether the low order byte of the address
  2642. where the sample is written to, must be placed on the userport or not.
  2643. This enables you to take multi-channel samples (e.g. stereo) using an
  2644. analogue multiplexer (e.g. HEF 4051). When youære not using this option,
  2645. leave the bit É0æ. 0 = no output to the userport, 1 = output to the
  2646. userport
  2647. 3.9
  2648.    Leave unused bits É0æ for upward compatibility
  2649. 3.9
  2650. After calling this SWI, the screen will be disabled during the sampling.
  2651. While waiting for the minimum level, the border will be coloured yellow
  2652. Ö whilst sampling, the border will be red. As long as the border is
  2653. yellow, you can quit by pressing <escape>. The buffer will be filled
  2654. with linear 8-bit signed numbers.
  2655. 3.9
  2656. The minimum sample-time that can be used on a normal Archimedes is about
  2657. 9 ╡s. The minimum sample-time that can be used with the ZN427 (the ADC)
  2658. is approx. 12 ╡s.
  2659. 3.9
  2660. The module could be used with the Armadeus sampler if Armadeus software
  2661. were suitably modified. Since Armadeus is written in BASIC this should
  2662. be possible.
  2663. 3.9
  2664. As far as Iæm concerned this module may be copied freely provided that
  2665. my name, as author, remains within the software.
  2666. 3.9
  2667. Questions or suggestions? You can contact me via Archive.
  2668. 3.9
  2669. To conserve space, we have stripped the comments out of this listing.
  2670. The full commented listing is available on the monthly program disc.
  2671. 3.9
  2672.  10 REM >SamplerSrc
  2673. 3.9
  2674.  20 REM Written by J.P.Hendrix
  2675. 3.9
  2676.  30 start=4:end=10:speed=9:ioc=8
  2677. 3.9
  2678. :rd427=5:wr427=6:bs6522=7:level=11
  2679. 3.9
  2680. :flags=12
  2681. 3.9
  2682.  40 DIM Code 1000
  2683. 3.9
  2684.  50 FOR Pass=4 TO 7 STEP 3
  2685. 3.9
  2686.  60 P%=0
  2687. 3.9
  2688.  70 O%=Code
  2689. 3.9
  2690.  80 [   OPT   Pass
  2691. 3.9
  2692.  90     EQUD  0
  2693. 3.9
  2694. 100     EQUD  0
  2695. 3.9
  2696. 110     EQUD  0
  2697. 3.9
  2698. 120     EQUD  0
  2699. 3.9
  2700. 130     EQUD  Title
  2701. 3.9
  2702. 140     EQUD  Help
  2703. 3.9
  2704. 150     EQUD  0
  2705. 3.9
  2706. 160     EQUD  &500
  2707. 3.9
  2708. 170     EQUD  Handler
  2709. 3.9
  2710. 180     EQUD  Table
  2711. 3.9
  2712. 190     EQUD  0
  2713. 3.9
  2714. 200
  2715. 3.9
  2716. 210     EQUS  öElektor Sampler
  2717. 3.9
  2718.  Module 1.03  (c) copyright
  2719. 3.9
  2720. 22 Apr 1990 by J.P. Hendrixö
  2721. 3.9
  2722. 220
  2723. 3.9
  2724. 230 .YelBorder
  2725. 3.9
  2726. 240     EQUB  0
  2727. 3.9
  2728. 250     EQUB  24
  2729. 3.9
  2730. 260     EQUB  255
  2731. 3.9
  2732. 270     EQUB  255
  2733. 3.9
  2734. 280     EQUB  0
  2735. 3.9
  2736. 290     ALIGN
  2737. 3.9
  2738. 300
  2739. 3.9
  2740. 310
  2741. 3.9
  2742. 320 .Handler
  2743. 3.9
  2744. 330     STMFD R13!,{r0-r12 ,R14}
  2745. 3.9
  2746. 340     CMP   R11,#&00
  2747. 3.9
  2748. 350     BNE   UnknownSWI
  2749. 3.9
  2750. 360     MOV   flags,R4
  2751. 3.9
  2752. 370     MOV   start,R0
  2753. 3.9
  2754. 380     MOV   end,R1
  2755. 3.9
  2756. 390     MOV   speed,R2,LSL #1
  2757. 3.9
  2758.  400     SUB   speed,speed,#2
  2759. 3.9
  2760.  410     AND   level,R3,#&7F
  2761. 3.9
  2762.  420     STMFD R13!,*{t ,end,speed}
  2763. 3.9
  2764.  430     SWI   öI/O_Podule_Hardwareò
  2765. 3.9
  2766.  440     BIC   R0,R1,#&00FF0000
  2767. 3.9
  2768.  450     ORR   wr427,R0,#%000<<11
  2769. 3.9
  2770.  460     ORR   rd427,R0,#%010<<11
  2771. 3.9
  2772.  470     ORR   bs6522,R1,#%101<<11
  2773. 3.9
  2774.  480     MOV   ioc,#&3200000
  2775. 3.9
  2776.  490     STMFD R13!,{wr427 ,rd427,
  2777. 3.9
  2778. bs6522,ioc}
  2779. 3.9
  2780.  500
  2781. 3.9
  2782.  510     MOV   R0,#0
  2783. 3.9
  2784.  520     MOV   R1,#3072
  2785. 3.9
  2786.  530     TST   flags,#1
  2787. 3.9
  2788.  540     SWIEQ öXOS_UpdateMEMCò
  2789. 3.9
  2790.  550
  2791. 3.9
  2792.  560     MOV   R0,#0
  2793. 3.9
  2794.  570     MOV   R1,#24
  2795. 3.9
  2796.  580     SWI   öOS_ReadPaletteò
  2797. 3.9
  2798.  590     ADR   R0,OrgColour
  2799. 3.9
  2800.  600     MOV   R2,R2,LSR #8
  2801. 3.9
  2802.  610     STRB  R2,[R0,#2]!
  2803. 3.9
  2804.  620     MOV   R2,R2,LSR #8
  2805. 3.9
  2806.  630     STRB  R2,[R0,#1]!
  2807. 3.9
  2808.  640     MOV   R2,R2,LSR #8
  2809. 3.9
  2810.  650     STRB  R2,[R0,#1]!
  2811. 3.9
  2812.  660
  2813. 3.9
  2814.  670     MOV   R0,#12
  2815. 3.9
  2816.  680     ADR   R1,YelBorder
  2817. 3.9
  2818.  690     SWIEQ öOS_Wordò
  2819. 3.9
  2820.  700
  2821. 3.9
  2822.  710     MOV   R1,#&0C
  2823. 3.9
  2824.  720     SWI   öOS_ServiceCallò
  2825. 3.9
  2826.  730
  2827. 3.9
  2828.  740     LDMFD R13!,{wr427 ,rd427,
  2829. 3.9
  2830. bs6522,ioc}
  2831. 3.9
  2832.  750
  2833. 3.9
  2834.  760     MOV   R0,#&00
  2835. 3.9
  2836.  770     STRB  R0,[ioc,#&38]
  2837. 3.9
  2838.  780
  2839. 3.9
  2840.  790
  2841. 3.9
  2842.  800     MOV   R0,#SamplerEnd-
  2843. 3.9
  2844. SamplerBegin
  2845. 3.9
  2846.  810     MOV   R1,#&1C
  2847. 3.9
  2848.  820     ADR   R2,SamplerBegin
  2849. 3.9
  2850.  830 .PokeLoop
  2851. 3.9
  2852.  840     LDR   R3,[R2,R0]
  2853. 3.9
  2854.  850     STR   R3,[R1,R0]
  2855. 3.9
  2856.  860     SUBS  R0,R0,#4
  2857. 3.9
  2858.  870     BPL   PokeLoop
  2859. 3.9
  2860.  880
  2861. 3.9
  2862.  890     LDMFD R13!,*{t ,end,speed}
  2863. 3.9
  2864.  900
  2865. 3.9
  2866.  910
  2867. 3.9
  2868.  920     TST   flags,#2
  2869. 3.9
  2870.  930     MOV   R0,#255
  2871. 3.9
  2872.  940     MOVEQ R0,#0
  2873. 3.9
  2874.  950     STRB  R0,[bs6522,#02*4]
  2875. 3.9
  2876.  960     AND   R0,speed,#&FF
  2877. 3.9
  2878.  970     STRB  R0,[bs6522,#06*4]
  2879. 3.9
  2880.  980     MOV   R0,speed,LSR #8
  2881. 3.9
  2882.  990     STRB  R0,[bs6522,#07*4]
  2883. 3.9
  2884. 1000     MOV   R0,#&40
  2885. 3.9
  2886. 1010     STRB  R0,[bs6522,#11*4]
  2887. 3.9
  2888. 1020     MOV   R0,#&00
  2889. 3.9
  2890. 1030     STRB  R0,[bs6522,#13*4]
  2891. 3.9
  2892. 1040     MOV   R0,#&C0
  2893. 3.9
  2894. 1050     STRB  R0,[bs6522,#14*4]
  2895. 3.9
  2896. 1060     AND   R0,speed,#&FF
  2897. 3.9
  2898. 1070     STRB  R0,[bs6522,#04*4]
  2899. 3.9
  2900. 1080
  2901. 3.9
  2902. 1090     STRB  R0,[wr427]
  2903. 3.9
  2904. 1100 .WaitLevel
  2905. 3.9
  2906. 1110     SWI   öOS_ReadEscapeStateò
  2907. 3.9
  2908. 1120     BCS   Exit
  2909. 3.9
  2910. 1130
  2911. 3.9
  2912. 1140     LDRB  R0,[rd427]
  2913. 3.9
  2914. 1150     STRB  R0,[wr427]
  2915. 3.9
  2916. 1160     TST   R0,#&80
  2917. 3.9
  2918. 1170     RSBEQ R0,R0,#&100
  2919. 3.9
  2920. 1180     AND   R0,R0,#&7F
  2921. 3.9
  2922. 1190     CMP   level,R0
  2923. 3.9
  2924. 1200     BHI   WaitLevel
  2925. 3.9
  2926. 1210     STRB  R0,[wr427]
  2927. 3.9
  2928. 1220
  2929. 3.9
  2930. 1230     SWI   öOS_IntOffò
  2931. 3.9
  2932. 1240
  2933. 3.9
  2934. 1250     TST   flags,#1
  2935. 3.9
  2936. 1260     MOV   R0,#12
  2937. 3.9
  2938. 1270     ADR   R1,RedBorder
  2939. 3.9
  2940. 1280     SWIEQ öOS_Wordò
  2941. 3.9
  2942. 1290
  2943. 3.9
  2944. 1300     MOV   R0,speed,LSR #8
  2945. 3.9
  2946. 1310     STRB  R0,[bs6522,#05*4]
  2947. 3.9
  2948. 1320
  2949. 3.9
  2950. 1330     MOV   R0,#&40
  2951. 3.9
  2952. 1340     STRB  R0,[ioc,#&38]
  2953. 3.9
  2954. 1350 .SampleLoop
  2955. 3.9
  2956. 1360     CMP   end,start
  2957. 3.9
  2958. 1370     BPL   SampleLoop
  2959. 3.9
  2960. 1380
  2961. 3.9
  2962. 1390     MOV   R0,#&00
  2963. 3.9
  2964. 1400     STRB  R0,[ioc,#&38]
  2965. 3.9
  2966. 1410 .Exit
  2967. 3.9
  2968. 1420     MOV   R0,#&7F
  2969. 3.9
  2970. 1430     STRB  R0,[bs6522,#14*4]
  2971. 3.9
  2972. 1440     MOV   R0,#&00
  2973. 3.9
  2974. 1450     STRB  R0,[bs6522,#13*4]
  2975. 3.9
  2976. 1460
  2977. 3.9
  2978. 1470     MOV   R1,#&0B
  2979. 3.9
  2980. 1480     SWI   öOS_ServiceCallò
  2981. 3.9
  2982. 1490     SWI   öOS_IntOnò
  2983. 3.9
  2984. 1500
  2985. 3.9
  2986. 1510     MOV   R0,#0
  2987. 3.9
  2988. 1520     STRB  R0,[bs6522,#02*4]
  2989. 3.9
  2990. 1530
  2991. 3.9
  2992. 1540     MOV   R0,#3072
  2993. 3.9
  2994. 1550     MOV   R1,#3072
  2995. 3.9
  2996. 1560     TST   flags,#1
  2997. 3.9
  2998. 1570     SWIEQ öOS_UpdateMEMCò
  2999. 3.9
  3000. 1580
  3001. 3.9
  3002. 1590     MOV   R0,#12
  3003. 3.9
  3004. 1600     ADR   R1,OrgColour
  3005. 3.9
  3006. 1610     SWIEQ öOS_Wordò
  3007. 3.9
  3008. 1620
  3009. 3.9
  3010. 1630     MOV   R0,#124
  3011. 3.9
  3012. 1640     SWI   öOS_Byteò
  3013. 3.9
  3014. 1650
  3015. 3.9
  3016. 1660     LDMFD R13!,{r0-r12 ,PC}^
  3017. 3.9
  3018. 1670
  3019. 3.9
  3020. 1680 .UnknownSWI
  3021. 3.9
  3022. 1690     LDMFD R13!,{r0-r12 ,R14}
  3023. 3.9
  3024. 1700     ADR   R0,Error
  3025. 3.9
  3026. 1710     ORRS  PC,R14,#2^28
  3027. 3.9
  3028. 1720
  3029. 3.9
  3030. 1730 .SamplerBegin
  3031. 3.9
  3032. 1740     STRB  start,[bs6522,#00*4]
  3033. 3.9
  3034. 1750     LDRB  R0,[rd427]
  3035. 3.9
  3036. 1760     EOR   R0,R0,#&80
  3037. 3.9
  3038. 1770     STRB  R0,[start],#1
  3039. 3.9
  3040. 1780     MOV   R0,#&C0
  3041. 3.9
  3042. 1790     STRB  R0,[bs6522,#13*4]
  3043. 3.9
  3044. 1800     STRB  R0,[wr427]
  3045. 3.9
  3046. 1810     SUBS  PC,R14,#4
  3047. 3.9
  3048. 1820 .SamplerEnd
  3049. 3.9
  3050. 1830
  3051. 3.9
  3052. 1840 .OrgColour
  3053. 3.9
  3054. 1850     EQUB  0
  3055. 3.9
  3056. 1860     EQUB  24
  3057. 3.9
  3058. 1870     EQUB  0
  3059. 3.9
  3060. 1880     EQUB  0
  3061. 3.9
  3062. 1890     EQUB  0
  3063. 3.9
  3064. 1900 .RedBorder
  3065. 3.9
  3066. 1910     EQUB  0
  3067. 3.9
  3068. 1920     EQUB  24
  3069. 3.9
  3070. 1930     EQUB  255
  3071. 3.9
  3072. 1940     EQUB  0
  3073. 3.9
  3074. 1950     EQUB  0
  3075. 3.9
  3076. 1960
  3077. 3.9
  3078. 1970 .Table
  3079. 3.9
  3080. 1980 .Title   EQUS  öElektorSamplerò
  3081. 3.9
  3082. +CHR$(0)
  3083. 3.9
  3084. 1990     EQUS  öSampleò+CHR$(0)
  3085. 3.9
  3086. +CHR$(0)
  3087. 3.9
  3088. 2000 .Help
  3089. 3.9
  3090. 2010     EQUS  öElektor Samplerò+CHR$
  3091. 3.9
  3092. (9)+ö1.03 (22 Apr 1990)ò+CHR$(0)
  3093. 3.9
  3094. 2020 .Error
  3095. 3.9
  3096. 2030     EQUD  1
  3097. 3.9
  3098. 2040     EQUS  öUnknown Sampler SWIò
  3099. 3.9
  3100. +CHR$(0)
  3101. 3.9
  3102. 2050 ]
  3103. 3.9
  3104. 2060 NEXT
  3105. 3.9
  3106. 2070
  3107. 3.9
  3108. 2080 SYS öOS_Fileò,10,öElektorSamò
  3109. 3.9
  3110. ,&FFA,,Code,O%
  3111. 3.9
  3112. Å   Extra Speed in high res modes Ö You can use SWI öOS_UpdateMEMCò to
  3113. deny VIDC DMA access to the video RAM, which returns to the processor
  3114. the bus bandwidth that was being used by the video system. Turning off
  3115. VIDCæs access to the memory blanks the screen but makes the machine go
  3116. faster even than in MODE 0. To kill VIDCæs access to memory: SYS
  3117. öOS_UpdateMEMCò,0, 1024 To re-enable access use SYS öOS_Update
  3118. MEMCò,1024,1024.
  3119. 3.9
  3120. While the screen is thus disabled, you can still write to it as normal
  3121. and the results will be there when it is switched back on. This short
  3122. program shows the enormous speed gains possible (49% in MODE 15, 120% in
  3123. MODE 24) Ö it can reduce by a third, the time taken for a MODE 15 ray
  3124. trace. Sean Kelly
  3125. 3.9
  3126.  10 mode=MODE
  3127. 3.9
  3128.  20 MODE 0
  3129. 3.9
  3130.  30 I%=0: T%=TIME
  3131. 3.9
  3132.  40 REPEAT: I%+=1: UNTIL TIME>=T%+100
  3133. 3.9
  3134.  50 MODE mode
  3135. 3.9
  3136.  60 J%=0: T%=TIME
  3137. 3.9
  3138.  70 REPEAT: J%+=1: UNTIL TIME>=T%+100
  3139. 3.9
  3140.  80 SYS öOS_UpdateMEMCò,0,1<<10
  3141. 3.9
  3142.  90 K%=0: T%=TIME
  3143. 3.9
  3144. 100 REPEAT: K%+=1: UNTIL TIME>=T%+100
  3145. 3.9
  3146. 110 SYS öOS_UpdateMEMCò,1<<10,1<<10
  3147. 3.9
  3148. 120 PRINTÉöLoops per second:òæ
  3149. 3.9
  3150. 130 PRINTöNormal mode 0 ò;I%
  3151. 3.9
  3152. 140 PRINTöNormal mode ò;mode;ö ò;J%
  3153. 3.9
  3154. 150 PRINTöBlanked mode ò;mode;ö ò;K%
  3155. 3.9
  3156. 160 PRINTöSpeed up ò;(K%-J%)/J%*100
  3157. 3.9
  3158. ;ö%ò
  3159. 3.9
  3160. Å   FormEd Ö I was very interested to see the tip on !FormEd in the May
  3161. issue of Archive which really does make it easier to use. However, there
  3162. is a slight snag with it as published as it is possible to close the
  3163. sprite viewing window which cannot then be re-opened. Also, it is
  3164. possible to activate the ÉToolæ window which allows editing of the
  3165. sprites if the following changes are made to the !RunImage file.
  3166. 3.9
  3167. 1890   DATA öLoad templates>m_templates%
  3168. 3.9
  3169. ,Save templates>m_Savetemp%, Show Sprites, Show Toolbox#, Quitö
  3170. 3.9
  3171. 3090   ELSE PROCmergesprites (FNstring0
  3172. 3.9
  3173. (q%+44)):PROCspriteinfo
  3174. 3.9
  3175. 9781   WHEN 4 : PROCspriteinfo
  3176. 3.9
  3177. 9782   WHEN 5 : PROCencodepal (0,15) :
  3178. 3.9
  3179.  PROCfront (palette%) : PROChtpal
  3180. 3.9
  3181. 9790   WHEN 6 : PROCfinish : END
  3182. 3.9
  3183. Line 1890 adds two new options to the iconbar menu (ÉShow Spritesæ and
  3184. ÉShow Toolboxæ). Line 3090 has the REM removed which allows merging of
  3185. sprite files. Lines 9781 and 9782 are new and implement the opening of
  3186. the sprite and tool win-dows. Line 9790 needs changing as ÉQuitæ is now
  3187. the sixth item on the menu.
  3188. 3.9
  3189. Some of the sprite editing routines seem to be miss-ing from the
  3190. !RunImage file (such as the Éspray canæ) so I just created a new blank
  3191. sprite and altered the template file so that the non-working options
  3192. donæt appear!
  3193. 3.9
  3194. As noted in the magazine, !Paint is better for creating sprites but
  3195. these simple changes make !FormEd much more useful. One benefit is that
  3196. the sprites edited in !FormEd are displayed in the windows where they
  3197. will actually appear when the application runs. Paul Hobbs
  3198. 3.9
  3199. Å   Function key strips Ö In the past, many have tried to write a
  3200. program which generates one or more function key-strips. In most cases,
  3201. the graph-ics were not quite satisfying. When using MS-DOS software, the
  3202. problem arises that you really need four rows (instead of the standard
  3203. three) to cater for all possibilities: F-key, <shift-F-key>, <ctrl-F-
  3204. key> and <alt-F-key>. To solve this problem I have made two draw-files,
  3205. one for a 3-row function key-strip and one for a 4-row function key-
  3206. strip.
  3207. 3.9
  3208. Both files require the presence of the font ÉHom-erton.Mediumæ.
  3209. 3.9
  3210. As an example, I have made a function key-strip for the MS-DOS program
  3211. WordPerfect version 4.2. This file also requires the presence of the
  3212. font ÉCor-pus.Mediumæ.
  3213. 3.9
  3214. From where I stand, I find the result of the Drawfiles better than what
  3215. Iæve seen so far. (Available on the monthly program disc.) Maurice
  3216. Hendrix
  3217. 3.9
  3218. Å   Hard disc and memory usage Ö I was interested to read about module
  3219. killing in your First Word Plus column. I have a 1Mb machine and need
  3220. all the memory I can get, so I have already experimented with simple
  3221. module killing routines.
  3222. 3.9
  3223. Firstly, I altered all my !run files to keep track of Clib, FPE and the
  3224. other common modules and kill them if they are no longer needed. This
  3225. used a sys-tem variable for each module that stored the number of
  3226. applications using it. This worked but had several drawbacks. The
  3227. changing of all !run files did take a lot of work and each application
  3228. left open its !run file until it was quit. As a result, I decided that
  3229. man-ual module killing or Resetting is a better solution. One interest
  3230. ing point highlighted by this, is that !Edit suffers a fatal error and
  3231. all work is lost if the FPE is killed even though it does not need it!
  3232. 3.9
  3233. The one thing that I have found extremely useful is the setting up of a
  3234. good hard disc structure and a !boot file. This has saved memory both on
  3235. the disc due to duplication and when loading applications due to fewer
  3236. icons needed to be loaded. It has also given me quicker and easier
  3237. access to programs via the new task option.
  3238. 3.9
  3239. One thing that should be noted by hard disc users is that although
  3240. directories allow a nice structure, they do use memory and also slow the
  3241. access to certain parts of the disc, so donæt go overboard creating
  3242. directories for everything.
  3243. 3.9
  3244. I will try to explain the structure of my hard disc. I have in my root
  3245. directory the following directories and a !boot file.
  3246. 3.9
  3247. !fonts   Outline Fonts
  3248. 3.9
  3249. !system   System Modules
  3250. 3.9
  3251. Art   Artisan, !Paint etc
  3252. 3.9
  3253. Cad   !Draw etc
  3254. 3.9
  3255. Games   !Triv etc
  3256. 3.9
  3257. Library   Command line programs
  3258. 3.9
  3259. Misc   My working directory
  3260. 3.9
  3261. Text/DTP   !Edit, !Impress, !PrinterDM etc
  3262. 3.9
  3263. Utilities   !FormEd, !Hand, !Configure etc
  3264. 3.9
  3265. Others could include Sound, spreadsheets and lang-uages etc. Try to keep
  3266. associated programs together but donæt have directories with lots of
  3267. applications as all the icons are loaded and waste memory. Keep commonly
  3268. used programs one level down and others in sub directories. This is
  3269. especially true for the utilities directory.
  3270. 3.9
  3271. The next stage is to move all the commonly used modules into the
  3272. !system.modules directory. This avoids duplication, ensures a module
  3273. update is used by all programs and also simplifies things. The most
  3274. common modules found are FPEmulator and Clib. Well-written programs will
  3275. already use !System but some donæt and they will need their !run files
  3276. mod-ified. The rmload commands need to load from :4.$. !system.modules.
  3277. If the !run file does not contain the rmload commands it is probably
  3278. best to leave its modules where they are unless you know what you are
  3279. doing. Finding modules can be done using simple utilities such as !hand
  3280. (helping hand) from the Data Store to search for the file type &FFA.
  3281. 3.9
  3282. Probably the most important part of a good hard disc setup is its !boot
  3283. file. This gives the user an ideal chance to customise their system. My
  3284. !boot file shown below sets up various system variables that perform a
  3285. range of functions.
  3286. 3.9
  3287. | !Boot file for hard disc
  3288. 3.9
  3289. | Set variables for directory abbrevs
  3290. 3.9
  3291. Set r adfs::BigHardNo1.$.
  3292. 3.9
  3293. SetMacro u <r>Utilities.
  3294. 3.9
  3295. SetMacro a <r>ART.
  3296. 3.9
  3297. SetMacro d <r>Text/DTP.
  3298. 3.9
  3299. SetMacro g <r>GAMES.
  3300. 3.9
  3301. SetMacro System$Path <r>!System.
  3302. 3.9
  3303. SetMacro sm <r>!System.Modules
  3304. 3.9
  3305. | Set Alias to emulate two common
  3306. 3.9
  3307.  Unix commands
  3308. 3.9
  3309. Set Alias$LS Cat %0
  3310. 3.9
  3311. Set Alias$CD Dir %0
  3312. 3.9
  3313. | Setup directories to be searched
  3314. 3.9
  3315.  for a run command (using abbreviations to keep line
  3316. 3.9
  3317.  to <255 chars )
  3318. 3.9
  3319. SetMacro Run$Path ,%.,<sm>.,<r>L*.,
  3320. 3.9
  3321. <d>1*.,<r>CA*.,<a>,<d>,<r>M*.,
  3322. 3.9
  3323. <d>PI*.,<r>PC.,<u>,<u>CT*.,<u>F*.,
  3324. 3.9
  3325. <u>A*.,<u>B*.,<u>C*.,<u>D*.,
  3326. 3.9
  3327. <u>FO*.,<u>L*.,<u>T*.,<u>M*.,<r>T*.,
  3328. 3.9
  3329. <r>S*.,<g>I*.,<g>B*.,<g>A*.,<d>!i*.
  3330. 3.9
  3331. | Setup directories to be searched
  3332. 3.9
  3333.  for a load command (using abbreviations to keep line
  3334. 3.9
  3335.  to <255 chars )
  3336. 3.9
  3337. Setmacro File$Path ,%.,<sm>.,
  3338. 3.9
  3339. <r>Library.,<u>L*.,<d>!i*.
  3340. 3.9
  3341. | run common applications !boot files
  3342. 3.9
  3343.  to emulate the system seeing the application without cluttering
  3344. 3.9
  3345.  the $ dir.
  3346. 3.9
  3347. <a>!Draw.!Boot
  3348. 3.9
  3349. <a>!Paint.!Boot
  3350. 3.9
  3351. <d>!Edit.!Boot
  3352. 3.9
  3353. <d>!Impress.!Boot
  3354. 3.9
  3355. <u>FILES.!SPARK.!BOOT
  3356. 3.9
  3357. | set any commonly used key strings
  3358. 3.9
  3359. Key 1 *DESKTOP|M
  3360. 3.9
  3361. Key 2 EDIT|M
  3362. 3.9
  3363. | run desktop and display root directory
  3364. 3.9
  3365. Desktop Filer_OpenDir adfs::BigHardNo1.$
  3366. 3.9
  3367. The !boot file starts by defining a series of system variables that are
  3368. to be used throughout the file. They include abbreviated variables to
  3369. represent commonly used pathnames. System$Path is also defined here.
  3370. 3.9
  3371. The next section defines two aliasæs that emulate common Unix system
  3372. commands. This is only of use if you switch operating systems commonly
  3373. and tend to accidentally type in the wrong commands. A similar set could
  3374. also be set up for PC users although a clash of the ödirò command would
  3375. occur.
  3376. 3.9
  3377. The next two sections are similar and set up the vari-ables Run$Path and
  3378. File$Path. Firstly, Run$Path can be used to define all the directories
  3379. that you wish to be searched when a run program command is issued.
  3380. Similarly File$Path does the same for loading files. They both include
  3381. the first path which refers to the current directory.
  3382. 3.9
  3383. The system variables defined at the start have been used extensively and
  3384. the * wildcard to keep the line shorter than the 255 character maximum.
  3385. Be careful when using wildcards because a new directory could also match
  3386. the search instead of the intended directory. As an alternative to this,
  3387. a series of paths could be placed into system variables i.e. Run1$ Path,
  3388. Run2$Path etc and then added together to give the complete Run$Path. Be
  3389. careful when using sys-tem variables to get the correct punctuation.
  3390. Each path must end with a full stop ö.ò although this can been included
  3391. at the end of the system variables.
  3392. 3.9
  3393. The main reason for doing this is to allow the user to use the öNew
  3394. Taskò option of the task menu. If all the directories are correctly
  3395. listed in this section, you will be able to enter ö!Editò into the öNew
  3396. Taskò option and the program will install itself onto the icon bar. This
  3397. eliminates the need to know where in the directory structure it is. The
  3398. same goes for loading a program or module. You can now tuck away those
  3399. little used programs and still call them up as long as you know their
  3400. name. The general effect is the same as if everything is in the library
  3401. although loading commands can also be used.
  3402. 3.9
  3403. I have found it useful to emulate the system seeing commonly used
  3404. applications such as !Draw, !Paint and !Edit. To do this all you must do
  3405. is run each applicationæs !boot file. This will setup all the icons and
  3406. system variables. This means that, for example, a draw file can be
  3407. loaded without the application having being seen.
  3408. 3.9
  3409. A Hard disc !boot file is also the ideal place to set up any commonly
  3410. used key strings as well as loading any important modules.
  3411. 3.9
  3412. Finally, the desktop can be called and I find it useful to open up the
  3413. root directory. This can be done by the Filer_OpenDir command. Alterna
  3414. tively, another obey file can be run after the desktop has been entered
  3415. by the use of the -file option. If this is the case, it may be useful to
  3416. create an application called !boot and rename the !boot file to !run.
  3417. The second obey file can then be hidden inside this directory.
  3418. 3.9
  3419. To create and set up the !boot file╔ (1) Run !Edit (2) Create obey file
  3420. (icon menu) (3) Type in !boot data (See above) (4) Save as !boot (in
  3421. root directory) (5) Press <f12> and type
  3422. 3.9
  3423. OPT4,2
  3424. 3.9
  3425. Configure drive 4
  3426. 3.9
  3427. Configure boot
  3428. 3.9
  3429. Philip Armstrong
  3430. 3.9
  3431. Å   Hourglass Ö A quick hint for those writing a BASIC program using the
  3432. Hourglass. Often, if an error is generated from BASIC when the hourglass
  3433. is being used, it stays on the screen. This can be cured by
  3434. SYSöHourglass_Smashò or, if you have already done your error checking,
  3435. SYSöò causes a system error which has the same effect. Philip Armstrong
  3436. 3.9
  3437. Å   INKEY problems Ö If you have a loop which executes continuously and
  3438. rapidly, you might want to use:
  3439. 3.9
  3440. key%=INKEY(0):IF key%=64
  3441. 3.9
  3442. PROC_Fred ELSE IF
  3443. 3.9
  3444. key%=65 PROC_Edith
  3445. 3.9
  3446. to detect a keypress. However, remember that you should have only one
  3447. such INKEY statement in the loop even if you want to cater for many
  3448. different key presses because a single keypress can only be det-ected by
  3449. one INKEY(0) instruction. Steve Kirkby.
  3450. 3.9
  3451. Å   Keyboard cleaning (A300/400 series) Ö The keyboard that is supplied
  3452. with the computer is of the open Printed Circuit Board type. That is, a
  3453. conduc-tive film on the base of each key makes contact with large solder
  3454. plated areas called lands on the main PCB. This makes for a cheap and
  3455. reliable keyboard but it does have its problems because of its exposure
  3456. to the air in that dust can and does get in.
  3457. 3.9
  3458. Iæve had my Archimedes A310 for over 2 years now and my wife lets it
  3459. live in the living room with us. I suppose I should keep the keyboard
  3460. covered with something when not in use but Iæve never got round to doing
  3461. this. Consequently, the keyboard has had to put up with me eating
  3462. biscuits, sandwiches and other unmentionables while typing. I suppose
  3463. the inevitable had to happen and one day the keyboard rebelled! I had
  3464. began to noticed over a period of several days that the space bar and
  3465. left cursor key where playing up until they refused to work at all. Of
  3466. course, this happened a week after the guarantee had run out!
  3467. 3.9
  3468. Visions of massive bills loomed before me so I decided to undertake the
  3469. task of opening the keyboard case and having a look! I first switched
  3470. off the Archimedes and unplugged the keyboard cord from the computer. I
  3471. removed the mouse and turned the keyboard face down with the Reset
  3472. button towards me. I noted that eight large, long hex screws held the
  3473. back section of the keyboard case on. After removing these I just lifted
  3474. the back section away and placed it somewhere safe. The Reset button
  3475. looked slight delicate so I removed it by simply pulling it off. I made
  3476. a mental note of which way round it came off.
  3477. 3.9
  3478. I had a good look and there were seven large, short hex screws holding
  3479. the top keyboard casing to the main PCB frame. I removed these screws
  3480. and lifted the PCB off, putting the top casing away to another safe
  3481. place. I was half expecting the key tops and switches to try and escape
  3482. at this point but they are firmly attached to a metal frame!
  3483. 3.9
  3484. Biscuit supply Ö Turning the PCB over and looking at the top surface
  3485. between the key tops I was amazed to see a surprising amount of dust and
  3486. what looked like a secret supply of Burtons biscuits! I duly removed
  3487. this with a dry paper towel and again placed the board face down after I
  3488. had a good look at the electronics on the board, but I resisted the
  3489. temptation to touch (I suggest you do the same).
  3490. 3.9
  3491. All that now remained to do was remove the twenty small hex screws
  3492. holding the PCB to the switches. I started with the black screw at S94
  3493. position (this is written on the PCB) and noted that this was the only
  3494. small screw not actually threaded on to a switch. I removed the other
  3495. nineteen screws and gently lifted the PCB off the metal frame holding
  3496. the keys on.
  3497. 3.9
  3498. The contact plates of all the key switches where now exposed and they
  3499. consisted of thin silver discs which when pressed make contact with the
  3500. PCB lands and therefore closed the contacts. These plates looked
  3501. extremely fragile but clean so I left them well alone!
  3502. 3.9
  3503. Cleaning Ö The PCB lands were dirty, especially around the Space and
  3504. Left Cursor key positions and, being very careful not to put any grease
  3505. from my paws onto the board, I wiped the entire PCB with a dry paper
  3506. towel. Reassembling the keyboard was easy. I just placed the PCB face
  3507. down on to the metal frame holding the keys and lined up the small
  3508. screws positions. A good tip in reassembling something like this is to
  3509. begin placing the screws in from opposite ends and not to tighten up any
  3510. of the screws until they are all in place.
  3511. 3.9
  3512. Once that was done, making sure that the black screw was in the correct
  3513. position, I placed the top section face down on the work table and
  3514. positioned the assembly down onto it, again fitting the seven large
  3515. short hex screws in place. I refitted the Reset moulding into place with
  3516. a resounding click and finished off by screwing down the last eight
  3517. large long hex screws into place. I turned the complete keyboard over
  3518. and plugged it back into the Archimedes and Iæm glad to say it works a
  3519. treat! Stuart Halliday
  3520. 3.9
  3521. Å   OsSys module Ö Shortly after the release of the OsSys module, I was
  3522. told that one couldnæt use SWIæs that needed a pointer to a buffer
  3523. because no such facilities where made available. I argued that this was
  3524. very easily implemented and changed the module accordingly. When doing
  3525. this, I also noticed a minor bug in the module. When a string longer
  3526. than 300 characters is passed, the module is supposed to generate an
  3527. error. This works fine but, due to a problem during the development, I
  3528. mistakenly thought that the pipeline was playing up when generating this
  3529. error. (Not all of the error text was displayed: the first 4 characters
  3530. were missing). I solved this by adding 4 to the PC when generating the
  3531. error. Quite wrong of course. I discovered that not the pipeline but I
  3532. was to blame. I had forgotten to put the error number (4 bytes) in
  3533. before the error message.
  3534. 3.9
  3535. To upgrade the OsSys module to version 1.8, load the source code into
  3536. BASIC V and change/add the following lines:
  3537. 3.9
  3538. 10 REM >OsSysSrc18
  3539. 3.9
  3540. 350 EQUS ö1.80 (05 Apr 1990)ò
  3541. 3.9
  3542. 600 MOV R3,#500
  3543. 3.9
  3544. 610 SWI öOS_Moduleò
  3545. 3.9
  3546. 611 ;By claiming a larger workarea than required by the
  3547. 3.9
  3548. 612 ;the module, you can use the top of the work area to
  3549. 3.9
  3550. 613 ;create workspace for SWI calls that require pointers to
  3551. 3.9
  3552. 614 ;such a workspace. Eg. calls to WIMP or VDU.
  3553. 3.9
  3554. 650 EQUS öOsSWICalls v1.80 by M. Hendrix => Installedò
  3555. 3.9
  3556. 2510 REM remove this line. Itæs incorrect
  3557. 3.9
  3558. 3180 EQUD &01 ;Error number
  3559. 3.9
  3560. Save and run the program.
  3561. 3.9
  3562. The new module will claim more workspace than it actually needs. The top
  3563. 200 bytes can thus be used for SWI buffers. You can use *MEMORYA to edit
  3564. the buffer(s). If you need more space for a buffer just change the value
  3565. #500 in line 600 to your desired amount of memory. (Donæt forget to add
  3566. 300 bytes for the module itself!) Maurice Hendrix
  3567. 3.9
  3568. Å   Random number generator Ö If you use the use the random number
  3569. generator (RND in BASIC), it must be initialised with something really
  3570. random, such as the current time. Otherwise, the same num-bers will be
  3571. produced every time the program is run. The otherwise excellent game
  3572. !Yahtzee on Care-ware 4 suffers from this problem but it can easily be
  3573. solved: insert the line 123 Junk = RND(-TIME) and then every game is
  3574. different. Jonathan Puttock
  3575. 3.9
  3576. Å   The Dreaded CLI! Ö One of the nicest aspects about the Archimedes is
  3577. the Configure command. This command is often forgotten about as it lies
  3578. in that terrible place called the Command Line Interpreter (CLI)
  3579. accessed by pressing the dreaded function 12 key. One of the many things
  3580. that the Configure command does and seems to get lain aside is the
  3581. WimpFlags options. This very useful command determines the action of all
  3582. the windows used by RISC-OS in as far as it controls the two types of
  3583. window movement, resizing and scrolling. What two types?, I hear you
  3584. ask.
  3585. 3.9
  3586. Status Ö Well if youæve never used the WimpFlags command before then you
  3587. have probably put up with the kind of windows which, when you change
  3588. their size or move them, all you get is a large dotted outline which
  3589. turns into a solid window when you release <select> or <adjust>. Now you
  3590. have an alternative. If you first press F12 from the Desktop and type in
  3591. *STATUS <return> youæll get a large list of items and near the end is a
  3592. line Wimpflags x, this x number (it may be 0) is actually the decimal
  3593. representative of a binary pattern of this number which switches on or
  3594. off the various options under this command.
  3595. 3.9
  3596. If you type in *HELP WimpFlags <return> then the following should
  3597. appear:
  3598. 3.9
  3599. *HELP WimpFlags
  3600. 3.9
  3601. ==> Help on keyword WimpFlags
  3602. 3.9
  3603. *Configure WimpFlags sets the
  3604. 3.9
  3605.  default actions when dragging
  3606. 3.9
  3607. windows, as follows:
  3608. 3.9
  3609. bit 0 set: continuous window movement
  3610. 3.9
  3611. bit 1 set: continuous window resizing
  3612. 3.9
  3613. bit 2 set: continuous horizontal scroll
  3614. 3.9
  3615. bit 3 set: continuous vertical scroll
  3616. 3.9
  3617. bit 4 set: donæt beep when error box
  3618. 3.9
  3619.  appears
  3620. 3.9
  3621. Syntax: *Configure WimpFlags <number>
  3622. 3.9
  3623. Simply put, if you where to type in say:
  3624. 3.9
  3625. *CONFIGURE WimpFlags 1 <return>
  3626. 3.9
  3627. and press <ctrl-break> (you need to do this each time you enter new
  3628. values to actually change the values!) youæll see that if you move any
  3629. window it will be instant! If you want to try some more Éconfiguringæ
  3630. try changing the WimpFlags to 2 to see only instant window resizing or 3
  3631. for both. (Donæt forget to press <ctrl-break> afterwards!) If you do not
  3632. like this new look, simply change Wimpflags back to 0. The next two
  3633. options concern the scroll bars and these are really useful. If you
  3634. change WimpFlags to 8 youæll see that by dragging the pointer up and
  3635. down the vertical bar youæll get a smooth scroll effect, much better
  3636. than constantly clicking the arrow icons! Try WimpFlags set to 4 for
  3637. horizontal scroll or even 12 for them both at the same time.
  3638. 3.9
  3639. Error Ö The last option just stops the error box beeping at you. Try
  3640. WimpFlags set to 16 and then Select an empty disc drive. Remember you
  3641. can combine any of these together by simply adding their numbers
  3642. together and configuring the WimpFlags. Try WimpFlags set to 31, this is
  3643. my favourite! Stuart Halliday
  3644. 3.9
  3645.  
  3646. Å Arthur Fonts Ö when using the FontDes program supplied with Arthur
  3647. operating system, it is possible to vary the thickness of one or both
  3648. ends of the line.  This is achieved by using the adjust button when the
  3649. mouse is positioned over a line in a öchar fullò window (this then
  3650. highlights the line) and then pressing the menu button at either end of
  3651. the line.  This will bring up a Épen ratioæ window which allows you to
  3652. alter the percentage ratio of the pen at that point, the ratio is set by
  3653. clicking on the percentage windowæs quit box.
  3654. 3.10
  3655.  
  3656. 3.10
  3657. Å Extra Brushes for !Paint Ö you can add your own brushes to the !Paint
  3658. package by including the desired shapes in the ÉSpritesæ file i.e.
  3659. 3.10
  3660. (i) Open up the !Paint directory by double clicking on !Paint while
  3661. holding the shift button down
  3662. 3.10
  3663. (ii) Load the ÉSpritesæ file into !Paint
  3664. 3.10
  3665. (iii) Create the brush shapes you want in this file
  3666. 3.10
  3667. (iv) Save the ÉSpritesæ file
  3668. 3.10
  3669. Donæt forget to make a note of the names of the brushes you created so
  3670. that you can access them from the tools menu.  David Parker
  3671. 3.10
  3672.  
  3673. 3.10
  3674. Å Hard Spaces can be entered using the <alt> key and typing <1><6><0> on
  3675. the numeric keypad but a much quicker way is just to type <alt><space>. 
  3676. Charles Moire
  3677. 3.10
  3678.  
  3679. 3.10
  3680. Å Lightning strikes Ö Be warned!  Donæt leave your modem connected to
  3681. the phone line when there is an electrical storm.  I did and the spikes
  3682. that came up the phone line killed a new V22bis modem and the RS423 port
  3683. on the Archimedes!  David Leckie.
  3684. 3.10
  3685.  
  3686. 3.10
  3687. Å Memory Saving Ö It is worth remembering that sprites with masks take
  3688. up twice as much room as those without.  If all sprites are altered with
  3689. !Paint to remove the mask, a considerable amount of memory can be saved. 
  3690. Ian Hamilton.
  3691. 3.10
  3692.  
  3693. 3.10
  3694. Å Printing with 1M Ö when using Draw, Paint, Impression, Acorn DTP, etc
  3695. you can quit !PrinterDM (or  whatever printer driver you use) to reclaim
  3696. about 80k of RAM.  It would appear that these applications only need the
  3697. modules that remain in the RMA area after the !PrinterDM application has
  3698. been quit so all the print options are still available.  R J Denison
  3699. 3.10
  3700.  
  3701. 3.10
  3702. Å Wimp Window Drawing Ö The usual construction for defining a graphic
  3703. window and drawing into it would look something like this:
  3704. 3.10
  3705.    DEFPROCgraphic_window
  3706. 3.10
  3707.    VDU26,5,24,graphicsbx%;graphicsby%;graphicstx%;graphicsty%
  3708. 3.10
  3709.    ORIGIN reportbx%-scrollx%,reportty%-scrolly%
  3710. 3.10
  3711.    ENDPROC
  3712. 3.10
  3713.  
  3714. 3.10
  3715.    DEFPROCdraw_text (x%,y%,text$)
  3716. 3.10
  3717.    MOVE x%,y% : PRINT text$
  3718. 3.10
  3719.    ENDPROC
  3720. 3.10
  3721.  
  3722. 3.10
  3723. This will work okay until the values in the origin statement exceed
  3724. 32767.  I found that I had blank screens in the middle of large reports. 
  3725. The following changes cured the problem:
  3726. 3.10
  3727.    DEFPROCgraphic_window
  3728. 3.10
  3729.    VDU26,5,24,graphicsbx%;graphicsby%;graphicstx%;graphicsty%
  3730. 3.10
  3731.    y%=reportty%-scrolly% : compensationy%=0
  3732. 3.10
  3733.    REPEAT
  3734. 3.10
  3735.    IF y%>32000 THEN y%-=32000 : compensationy%+=32000
  3736. 3.10
  3737.    UNTIL y%<=32000
  3738. 3.10
  3739.    ORIGIN reportbx%-scrollx%,y%
  3740. 3.10
  3741.    ENDPROC
  3742. 3.10
  3743.  
  3744. 3.10
  3745.    DEFPROCdraw_text (x%,y%,text$)
  3746. 3.10
  3747.    MOVE x%, y%+compensationy%: PRINT text$
  3748. 3.10
  3749.    ENDPROC
  3750. 3.10
  3751. Although you would have a problem in the x-direction, it is unlikely
  3752. that a window would be that wide.  A similar change could be applied if
  3753. this was necessary.  Ian Hamilton.
  3754. 3.10
  3755.  
  3756. Å Blanking discs Ö (Iæm sure weæve had this before, but not everyong has
  3757. picked it up and I couldnæt find a reference to it in the Archive
  3758. database.)  If you have a disc that has lots of files on it and you try
  3759. to clear them all off by deleting them, it can take ages Ö it would be
  3760. quicker to reformat the disc.  Even quicker though is to get an existing
  3761. blank disc and do a backup from that to the disc to be blanked Ö it
  3762. takes just a couple of seconds.
  3763. 3.11
  3764. Å ChkSpr Ö In answer to Ray Dawsonæs plea for help about !ChkSpr
  3765. supplied on shareware disc 19:  if you open up the !ChkSpr directory,
  3766. amongst the files you will find one called Échkspræ and one called
  3767. !BootÉ.  If these two files are copied into any Impression document
  3768. directory and if you then rename the document directory, instead of the
  3769. Impression sprite not appearing because the name no longer corresponds
  3770. to the document name (as normally happens) it will appear correctly. 
  3771. This is because the chkspr utility, when run by the new !Boot file,
  3772. checks the name of the first sprite in the sprite file and changes it if
  3773. the name is not the same as that of the document.  This utility can also
  3774. be used to keep the correct sprites for applications.  For example, when
  3775. developing an application, different versions may be kept, all with the
  3776. right sprite file.  Simon Burrows and Emmet Spier.
  3777. 3.11
  3778. Å ColourTrans module Ö I have noticed that each of the printer drivers
  3779. on the RISC OS extras disc contain their own copy of the Colours module! 
  3780. This is at odds with the policy of storing all shared modules in the
  3781. !System directory (you will probably already have a copy of the Colours
  3782. module there Ö many applications use it).
  3783. 3.11
  3784. To avoid wasting disc space (though Colours uses little) you can remove
  3785. this module from within each printer driversæ directory and edit the
  3786. !Run file for each driver to call Colours from the !System folder.
  3787. 3.11
  3788. i.e. in each !Run file the line
  3789. 3.11
  3790.    RMEnsure ColourTrans 0.52 RMLoad <PDriver$Dir>.Colours
  3791. 3.11
  3792. should be replaced with
  3793. 3.11
  3794.    RMEnsure ColourTrans 0.52 System:Modules.Colours
  3795. 3.11
  3796. To be even more correct two extra lines should also be added (e.g. like
  3797. the !Spark and !Draw applications).  The above on its own relies on the
  3798. desktop having already seen your !System directory, you should therefore
  3799. put the line
  3800. 3.11
  3801.    Ifö<System$Path>ò = öò Then Error 0 System resources cannot be found
  3802. 3.11
  3803. before the changed line above to check that this is the case.  You
  3804. should also put the line
  3805. 3.11
  3806.    RMEnsure ColourTrans 0.52 Error You need ColourTrans 0.52 or later
  3807. 3.11
  3808. after the changed line Ö this will check that the module has been loaded
  3809. satisfactorily.
  3810. 3.11
  3811. The Printer Drivers on the original RISC-OS Application Disc I did not
  3812. load the Colours module when they were installed and so do not have this
  3813. problem.  Simon Butler.
  3814. 3.11
  3815. Å Debugger/Dissassemble returns an incorrect length for SWI instructions
  3816. Ö it returns the length as one too many Ö you get an extra null
  3817. character on these instructions.  As all returned strings are null
  3818. terminated, I found it easier to scan for the null in order to find the
  3819. length.  The zero makes no difference to screen or printing, but if
  3820. written to a text file looks ugly in !Edit.  Kevin Quinn.
  3821. 3.11
  3822. Å Desktop bug Ö There appears to be a fatal bug in the Window Manager of
  3823. RISC-OS 2.00.  It occurs when you drag a menu, and whilst you are
  3824. dragging it, press the <escape> key to remove it.  If you then stop
  3825. dragging the menu, the system will report an ÉAddress exception at
  3826. &386BCICæ, the application which created the menu will die fatally and
  3827. most often, all the other applications will die as well, resulting in
  3828. the computer Ébombing outæ of the desktop into the CLI.  Tom Lakofski.
  3829. 3.11
  3830. Å DXF files Ö Users of DXF files which are comprised only of BLOCKS and
  3831. ENTITIES (or maybe just ENTITIES alone) will find that !Draw does not
  3832. enable the use of its facility for specifying font types when the DXF
  3833. file is just loaded.
  3834. 3.11
  3835. The inclusion of the code below (i.e. a TABLES section) appears to solve
  3836. this problem.  Of course !Draw must have previously Éseenæ the relevant
  3837. !Fonts directory.  The full sequences for the sections, if all are
  3838. present is HEADER followed by TABLES, then BLOCKS + ENTITIES.  Jim
  3839. Markland.
  3840. 3.11
  3841.    0
  3842. 3.11
  3843.    SECTION
  3844. 3.11
  3845.    2
  3846. 3.11
  3847.    TABLES
  3848. 3.11
  3849.    0
  3850. 3.11
  3851.    TABLE
  3852. 3.11
  3853.    2
  3854. 3.11
  3855.    STYLE
  3856. 3.11
  3857.    70
  3858. 3.11
  3859.    20
  3860. 3.11
  3861.    40
  3862. 3.11
  3863.    0
  3864. 3.11
  3865.    41
  3866. 3.11
  3867.    1
  3868. 3.11
  3869.    50
  3870. 3.11
  3871.    0
  3872. 3.11
  3873.    71
  3874. 3.11
  3875.    0
  3876. 3.11
  3877.    3
  3878. 3.11
  3879.    STANDARD
  3880. 3.11
  3881.    0
  3882. 3.11
  3883.    ENDTAB
  3884. 3.11
  3885.    0
  3886. 3.11
  3887.    ENDSEC
  3888. 3.11
  3889. Å Greek3 re-caching Ö To stop the Greek3 outline font supplied with
  3890. Impression from recaching itself too often all you have to do is rename
  3891. it from ÉGreek3æ to ÉGreekæ.  Michael Ben-Gershon.
  3892. 3.11
  3893. Å On/Off icons, for example option icons in windows, are implemented by
  3894. using the ÉSæ command in the validation string of an icon with
  3895. indirected text and sprites on.  FormEd will allow you to set these up Ö
  3896. switch on indirected stuff, put text (if any) into the text item, and
  3897. select sprite Ö donæt put anything in the sprite sub-menu writeable icon
  3898. and put the sprite name(s) in the indirected validation string, e.g.
  3899. Ésopton,optoffæ.  Then by inverting the iconæs inverted bit it will swap
  3900. over the icons Ö see the calls Wimp_SetIconState and Wimp_GetIconState
  3901. (pages 1211-1213 of PRM).  Details of validation strings are on pages
  3902. 1184-1187 of the PRM.  Kevin Quinn.
  3903. 3.11
  3904. Å OS_Heap Ö While trying to use the Heap facility in RISC-OS, we found
  3905. that OS_Heap 6, which returns the size of a heap block, returns the size
  3906. including the word at the start containing length.  This is unexpected
  3907. given the Abstract Data Type philosophy that appears to have been used
  3908. for the rest of the system and means that the user knows where the
  3909. length of a block is stored and can read it without using OS_Heap 6 Ö
  3910. and incidentally, means Acorn canæt rewrite their Heap manager unless
  3911. this word is left in the same place.  James Chong.
  3912. 3.11
  3913. Å RenderBender on SCSI hard disc drives.  As you will know, you cannot
  3914. access the hard drive, by using the HARD 4 icon.  Some of you may have
  3915. already tried unsuccessfully to alter the program, by altering the
  3916. variable HD% to 1, to try to force the program into recognising the hard
  3917. drive.  The following alterations should be made to the !Runfile, Render
  3918. and Anirout in the utilities directory.  The code will save all pictures
  3919. to the specified directory if you have not put the Render Bender
  3920. directory in $...
  3921. 3.11
  3922. For the Render program :
  3923. 3.11
  3924.    15 *SET RendHard1 SCSIFS::4.$.!Render
  3925. 3.11
  3926.    40 curd$=ö4ò:moder%=FALSE
  3927. 3.11
  3928.    15890 A%=32
  3929. 3.11
  3930.    15940 IF A%=32 AND HA%>0 GOTO 15920
  3931. 3.11
  3932.    16020 IF A%=32 THEN curd$=ö4ò:*SET REdrive SCSIFS::4.$.!Render
  3933. 3.11
  3934. For the Anirout program:
  3935. 3.11
  3936.    6800 IF A%=BE% THEN *SET REdrive SCSIFS::4.$.!Render
  3937. 3.11
  3938. You should then use the edit program to alter the !Run file as follows:
  3939. 3.11
  3940. The line that begins *IF obey$dir... should be changed to...
  3941. 3.11
  3942.    *IFobey$dir=öadfs::Render.$.!Renderò THEN *SET RendHard1 SCSIFS::4.
  3943. 3.11
  3944.    $.!Render ELSE *SET RendHard1<Obey$Dir>
  3945. 3.11
  3946. The previous code may seem a bit long winded but I have unfortunately
  3947. not been able to get the *KILLADFS command to work with my version. 
  3948. Neil Berry.
  3949. 3.11
  3950. Å Screen size Ö The screen size in O.S. co-ordinates may be found using
  3951. OS_ReadVduVariables and variable numbers 4 (XEigFactor),5(YEigFactor),11
  3952. (XWindLimit) and 12 (YWindLimit).  The last two are hidden over the page
  3953. and for a while I missed them (pages 345-348 and 350-352).  There is
  3954. also a message that the Wimp broadcasts when the user changes mode,
  3955. enabling your task to keep uptodate on screen sizes Ö important for drag
  3956. boxes amongst other things.  See page 1259.  Kevin Quinn.
  3957. 3.11
  3958. Å System Variables for Filer Module Ö This little routine enables you to
  3959. use RISC-OS variables with the Filer_OpenDir and Filer_CloseDir
  3960. commands.  This means that you can do commands such as öFiler_OpenDir
  3961. <Obey$Dir>.DataFilesò and make programs totally independent of where
  3962. they are on the disc.  The module requires about 14k of free memory in
  3963. the RMA.  The program has been written in such a way that it should work
  3964. with all future versions of the Filer.
  3965. 3.11
  3966. REM >Filer
  3967. 3.11
  3968. *RMKill Filer
  3969. 3.11
  3970. *RMReInit Filer
  3971. 3.11
  3972. *RMFaster Filer
  3973. 3.11
  3974. SYS öXOS_Moduleò,18,öFiler%Baseò TO ,,,CodeBase%
  3975. 3.11
  3976. TableBase%=CodeBase%+CodeBase%!ñ18
  3977. 3.11
  3978. Info%=FN_LookupInfo(öFiler_OpenDirò)
  3979. 3.11
  3980. TableBase%!Info%=TableBase%!Info% OR &00000100
  3981. 3.11
  3982. Info%=FN_LookupInfo(öFiler_CloseDirò)
  3983. 3.11
  3984. TableBase%!Info%=TableBase%!Info% OR &00000100
  3985. 3.11
  3986. END
  3987. 3.11
  3988. :
  3989. 3.11
  3990. DEF FN_LookInfo(Text$)
  3991. 3.11
  3992. LOCAL Offset%,Command$
  3993. 3.11
  3994. Offset%=0
  3995. 3.11
  3996. REPEAT
  3997. 3.11
  3998. Command$=öò
  3999. 3.11
  4000. REPEAT
  4001. 3.11
  4002. Command$+=CHR$(TableBase%?Offset%)
  4003. 3.11
  4004. Offset%+=1
  4005. 3.11
  4006. UNTIL TableBase%?Offset%=0
  4007. 3.11
  4008. Offset%=(Offset%+16+3) AND NOT 3
  4009. 3.11
  4010. UNTIL Command$=Text$ OR TableBase%? Offset%=0
  4011. 3.11
  4012. IF Command$=Text$ THEN =Offset-12 ERROR 0, öI canæt find ò+Text$
  4013. 3.11
  4014. There is one slight problem with this routine due to the way that RISC-
  4015. OS implements the *RMFaster command by re-initialising the module.  This
  4016. means that the Filer icon disappears from the Desktop and cannot be
  4017. recovered without restarting the desktop so the routine is probably best
  4018. placed in a boot routine that subsequently starts up the desktop.  Simon
  4019. Callan.
  4020. 3.11
  4021. Å TWIN 8000 Ö If you load TWIN at an address other than hex 8000 the
  4022. <f10> key functions (goto, newtime, etc) do not work.  It caused me no
  4023. end of problems and phone calls to Acorn before I realised this.
  4024. 3.11
  4025.  
  4026. Å Greek3 outline font problem Ö I was very interested to read, in
  4027. Archive 3.11, about solving the problem of the slowness of the Computer
  4028. Concepts Greek3 font.  The root of the problem was that the internal and
  4029. external names should be the same, and the article suggests that you can
  4030. simply rename the !Fonts.Greek3 directory to !Fonts.Greek, which is very
  4031. quick and easy.  However, if you do this then any existing !Draw files,
  4032. etc containing the Greek3 font will not display with ordinary system
  4033. font characters.  It seems desirable to retain the external name Greek3.
  4034. 3.12
  4035. I think that the best course of action is to change the internal name
  4036. from Greek to Greek3, using the Acorn !FontEd application.  The article
  4037. mentions this without saying HOW to do it; it was all GREEK to me!  So
  4038. after I found out the hard way, here is an idiots guide...
  4039. 3.12
  4040. Install !FontEd on the iconbar, open up the !Fonts.Greek3 directory, and
  4041. you will see the IntMetrics and Outlines files.  Drag the Outlines file
  4042. onto the !FontEd icon on the iconbar.  A window will then open showing
  4043. all the Greek characters.  After a pause, you will hear a beep to show
  4044. that the operation is complete.  Now click <menu> over this window and
  4045. use the Alter->Font name option to change it from Greek to Greek3.  Now
  4046. choose the Save->Outlines and Save->Metrics options in turn; just click
  4047. on the OK boxes, as the file and path names are fine as they are.  Be
  4048. very careful not to change anything else!  Richard Stery (Wakefield BBC
  4049. Micro User Group)
  4050. 3.12
  4051. Make sure you take a backup before you try this as you risk losing the
  4052. font if you get it wrong.  Donæt say we didnæt warn you!  Ed.
  4053. 3.12
  4054. Å Recovering deleted files Ö If you accidentally delete a file you can
  4055. still recover it so long as you take the following steps:
  4056. 3.12
  4057. (i) Do NOT write any data on the disk.
  4058. 3.12
  4059. (ii) Use the !DiscEdit program on Careware 2 and look for your file on
  4060. the disc and note the address (in hex) of the start and end of the file.
  4061. 3.12
  4062. (iii) Now you can use these addresses with the file recoverer program on
  4063. Shareware 9 to extract the file from the disc.  Dirk Schafer.
  4064. 3.12
  4065. Å RenderBender on SCSI Ö In the hint last month, Neil Berry was
  4066. obviously using an early version of Oakæs SCSI interface software in
  4067. which the filing system was referred to as SCSIFS, so all references to
  4068. öSCSIFS::ò should be replaced by öSCSI::ò.
  4069. 3.12
  4070. Å SWIöOS_PrettyPrintò works in VDU 5 mode (print text at graphics
  4071. cursor) as well as VDU 4 mode (print text at text cursor).  It formats
  4072. the text according to the current graphics clipping window (set by VDU
  4073. 24).  For more details on OS_PrettyPrint see Archive 1.7 p9.  Paul
  4074. Witheridge.
  4075. 3.12
  4076. Å System variables for the Filer Module (revisited) Ö Here is a simpler
  4077. solution to the problem of not being able to use system variables with
  4078. the *Filer_OpenDir and *Filer_CloseDir commands than was suggested in
  4079. Archive 3.11 p7.
  4080. 3.12
  4081.    *SetMacro Alias$Filer_OpenDir Set Alias%Foo %Filer_OpenDir
  4082. %0|Mfoo|MUnset Alias%foo|M
  4083. 3.12
  4084. *SetMacro Alias$Filer_CloseDir Set
  4085. Alias$foo%Filer_CloseDir%0|Mfoo|Munset Alias%foo|M
  4086. 3.12
  4087. Once these two lines have been typed, *Filer_OpenDir and *Filer_CloseDir
  4088. can then be used with system variables.  Michael Ben-Gershon.
  4089. 3.12
  4090. Å !Edit functions keys Ö Two more undocumented function key actions for
  4091. EDIT (in addition to <shift><f1> as described in Archive 3.4 p5).  These
  4092. are: <Ctrl><f2> which is equivalent to clicking on the window close icon
  4093. and <ctrl><f7> which toggles between the current caret position and the
  4094. beginning of a marked block.  Paul Witheridge.
  4095. 3.12
  4096.  
  4097.