home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1996 / ARCHIVE_96.iso / text / hints / volume_05 / issue_11 < prev    next >
Text File  |  1995-02-16  |  24KB  |  636 lines

  1. Hints and Tips
  2. 5.11
  3. Å   A5000 hard disc replacement Ö One drawback with the A5000 is that the
  4. 40M hard disc quickly fills up. Being in this position, I decided to
  5. replace mine with a larger one.
  6. 5.11
  7. Researching prices, I found that IDE drives bought direct from suppliers
  8. advertising in magazines such as Personal Computer World are much
  9. cheaper than the same drives advertised in the specialist Acorn
  10. magazines. Would any IDE drive work? A friend told me that Seagate IDE
  11. drives did not work correctly on A5000s but Connor (as already fitted to
  12. my A5000) and Maxtor (as fitted to another A5000 I know of) should be
  13. OK, as well as Quantum. Another friend recently bought and fitted an NEC
  14. drive to his A5000.
  15. 5.11
  16. I bought a 120M cached Quantum drive (the GM120AT). The drive, from SMC
  17. who advertise in PCW, arrived the day after I ordered it.
  18. 5.11
  19. The fitting was extremely simple. After a backup and power off I removed
  20. the cables, undid the four screws under the old drive (it is necessary
  21. to remove all the drive cables and lift out the metal bracket to which
  22. the drives are fastened) to release it and slotted in the new one Ö no
  23. problems! The drive was already low-level formatted and, although the
  24. hard disc formatter supplied with RISC-OS 3 didnæt recognise the disc
  25. shape, I just selected ÉInitialiseæ and that was it. The drive worked a
  26. few seconds after switching on.
  27. 5.11
  28. In use, the drive feels very fast. I have measured a data transfer rate
  29. of 1060k/sec, compared to 800k/sec for the original drive and an average
  30. access time of 7ms(!) as compared to 18ms.
  31. 5.11
  32. Similar drives advertised specifically for the A5000 in the Acorn press
  33. are ú50¡ú100 more. Some of these include splitter cables, allowing the
  34. old drive to remain (there are already mounting holes for a second drive
  35. on the A5000, drilled in the case below the floppy disc drive). I intend
  36. to make my own in the next few days Ö it will cost about ú10.
  37. 5.11
  38. So I would recommend anyone wishing to upgrade their A5000æs internal
  39. disc drive to do it themselves. Just obey the following rules:
  40. 5.11
  41. ÖááShop around for the best deal in the general computer and PC press.
  42. 5.11
  43. ÖááBuy a low profile 3╜ö AT IDE drive made by Quantum, Conner, Maxtor or
  44. NEC.
  45. 5.11
  46. ÖááMake a backup of your old hard disc before commencing the changeover.
  47. 5.11
  48. ÖááUse the RISC-OS 3 hard disc formatter to initialise the new disc, no
  49. need to format.
  50. 5.11
  51. ÖááIf you want to use both drives, Maplin Electronics sell everything
  52. you need to make the splitter cables.
  53. 5.11
  54. Perhaps a list of known A5000-friendly IDE drives could be compiled?á
  55. Seßn Kelly, Leighton Buzzard
  56. 5.11
  57. Å   Acorn SCSI card Ö If you buy the CDFS/FSCSI upgrade for the Acorn SCSI
  58. card, there is a link change to be made on the AKA31 version of the card
  59. but if you have one of the older AKA30 cards, it is slightly more
  60. complicated.
  61. 5.11
  62. The upgrade consists of putting a 27512 EPROM in place of the existing
  63. 27256 EPROM. To enable the extra address lines, hardware modifications
  64. are needed. Links 1, 3, 4 and 5 remain unchanged but link LK2 was open
  65. and has to be closed and link LK12 was closed and has to be opened. On
  66. the AKA31 boards, these changes can be made by moving a link but on the
  67. AKA31, this will involve cutting a track on LK12 and soldering a link on
  68. LK2. This should not be attempted unless you are competent to make such
  69. a modification and it will, in any case, invalidate the warranty on the
  70. board. Acorn dealers should do the modification for you although there
  71. may be a charge unless you buy the upgrade from them. Tudor Jones,
  72. Barnet.
  73. 5.11
  74. Å   Automatic kerning and RISC-OS 3 Ö The font manager has this facility.
  75. Currently it is only available with the standard ROM fonts (Trinity,
  76. etc.). Presumably, EFF will update their fonts to include kerning pairs.
  77. To use auto-kerning, simply set bit 9 of R2 in all calls to SYS
  78. öFont_Paintò.
  79. 5.11
  80. 10 REM >KernDemo
  81. 5.11
  82. 20 REM Example of automatic kerning
  83. 5.11
  84. 30 REM For RISC-OS 3 ROM fonts only
  85. 5.11
  86. 40 MODE 15:OFF
  87. 5.11
  88. 50 SYS öColourTrans_SetFontColoursò,0,0,
  89. 5.11
  90. &F0F00000,14
  91. 5.11
  92. 60 SYS öFont_FindFontò,,öTrinity. Mediumò,50*16,50*16 TO hdl%
  93. 5.11
  94. 70 SYS öFont_SetFontò,hdl%
  95. 5.11
  96. 80 REM Kerning off first
  97. 5.11
  98. 90 SYS öFont_Paintò,,öWAWA no
  99. 5.11
  100. kerning here!ö,%0000010000,10,500
  101. 5.11
  102. 100 REM Kerning on now
  103. 5.11
  104. 110 REM Set bit 9 in R2
  105. 5.11
  106. 120 SYS öFont_Paintò,,öWAWA this is kerned.ò,%1000010000,10,300
  107. 5.11
  108. 130 SYSöFont_LoseFontò,hdl%
  109. 5.11
  110. The ease with which this can be done leads me to wonder why CC havenæt
  111. provided it as an option in Impression.
  112. 5.11
  113. To rotate fonts, set bit seven of R2 in öFont_ Paintò and pass the (draw
  114. style) transformation matrix in R7. Note that old style calls to
  115. öFont_StringWidthò, etc donæt take account of kerning or transformation.
  116. A new SWI öFont_ ScanStringò is used to do this. Rob Davison, New
  117. Zealand
  118. 5.11
  119. Å   Basic 1.05 Bug Ö A really annoying bug exists in all versions of Basic
  120. except the floating point version supplied on the RISC-OS 3 application
  121. discs.
  122. 5.11
  123. Consider the following two statements (type them in if you feel like
  124. it.)
  125. 5.11
  126. a=210
  127. 5.11
  128. b=2.10*100
  129. 5.11
  130. These two variables should hold the same value. They seem to be the
  131. same, as you can check with:
  132. 5.11
  133. PRINT a,b
  134. 5.11
  135. IF a=b PRINT öSAMEò
  136. 5.11
  137. etc.
  138. 5.11
  139. If you have RISC-OS 2 then both the above checks will say that they are
  140. the same. RISC-OS 3 Basic 1.05 will not print ÉSAMEæ in the second test.
  141. The reason for this can be revealed by trying the following:
  142. 5.11
  143. PRINT INT(a),INT(b)
  144. 5.11
  145. PRINT STR$(a),STR$(b)
  146. 5.11
  147. These problems seem to occur because of the limited accuracy of floating
  148. point numbers in Basic. My program stored times at centisecond resolu
  149. tion internally and I wanted to scale these times to seconds for the
  150. user. I did a usertime=centitime/100 but ran into problems when I tried
  151. converting the usertime variable back into a string with STR$(usertime)
  152. 5.11
  153. My solution (and Iæm not saying itæs a good one) is as follows:
  154. 5.11
  155. A short ARM code routine intercepts the WRCHV vector and stores
  156. characters printed in a buffer. The routine is linked in just before a
  157. PRINT realvar statement and killed off just afterwards. You can then
  158. extract the string from the buffer via normal means. An example program
  159. follows:
  160. 5.11
  161. 10 REM >string
  162. 5.11
  163. 20 REM provides a STR$( function
  164. 5.11
  165. 25 REM that avoids some floating
  166. 5.11
  167. 30 REM point problems in Basic
  168. 5.11
  169. 40 REM By Rob Davison, May 1992
  170. 5.11
  171. 50 REM Public Domain
  172. 5.11
  173. 60 REM
  174. 5.11
  175. 70 PROCassy
  176. 5.11
  177. 80 PRINT öFirst the old way -ò
  178. 5.11
  179. 90 PRINT STR$(2.10*100)
  180. 5.11
  181. 100 PRINT öShould be ò;FNstr(2.10 *100)
  182. 5.11
  183. 110 PRINTæöAnother exampleò
  184. 5.11
  185. 120 PRINT STR$(0.6)
  186. 5.11
  187. 130 PRINT öShould be ò;FNstr(0.6)
  188. 5.11
  189. 140 PRINTæöBye now.ò
  190. 5.11
  191. 150 END
  192. 5.11
  193. 160 DEFPROCassy
  194. 5.11
  195. 170 DIM code% &100
  196. 5.11
  197. 180 REM æpossyæ is a buffer. Can be scratch space but MUST
  198. 5.11
  199.  be big enough.
  200. 5.11
  201. 190 DIM possy &100
  202. 5.11
  203. 200 FOR opt=0 TO 2 STEP2
  204. 5.11
  205. 210 P%=code%
  206. 5.11
  207. 220 [OPT opt
  208. 5.11
  209. 230 .intercept
  210. 5.11
  211. 240 STMFD R13!,{r0-r3 }
  212. 5.11
  213. 250 LDR R1,posaddr
  214. 5.11
  215. 260 STRB R0,[R1]
  216. 5.11
  217. 270 ADD R1,R1,#1
  218. 5.11
  219. 280 STR R1,posaddr
  220. 5.11
  221. 290 LDMFD R13!,{r0-r3 ,PC}
  222. 5.11
  223. 300 .posaddr EQUD possy
  224. 5.11
  225. 310 ]
  226. 5.11
  227. 320 NEXT
  228. 5.11
  229. 330 ENDPROC
  230. 5.11
  231. 340 REM this is the string function
  232. 5.11
  233. 350 DEFFNstr(number)
  234. 5.11
  235. 360 LOCAL ERROR
  236. 5.11
  237. 370 ON ERROR LOCAL SYS öXOS_Releaseò ,3,intercept,0:REPORT:PRINT ERL:END
  238. 5.11
  239. 380 !posaddr=possy:REM reset pointer to start of buffer
  240. 5.11
  241. 390 SYS öXOS_Claimò,3,intercept,0 :REM claim the vector
  242. 5.11
  243. 400  PRINT number
  244. 5.11
  245. 410 SYS öXOS_Releaseò,3,intercept,0 :REM and release it immediately
  246. 5.11
  247. 420 REM Extract the string and get rid of leading/trailing rubbish
  248. 5.11
  249. 430 str$=$possy:WHILE LEFT$(str$,1)= CHR$32:str$=RIGHT$(str$,
  250. 5.11
  251. LEN(str$)-1):ENDWHILE
  252. 5.11
  253. 440 WHILE ASC(RIGHT$(str$,1))<32: str$=LEFT$(str$,LEN(str$)-1)
  254. 5.11
  255. :ENDWHILE
  256. 5.11
  257. 450 =str$
  258. 5.11
  259. Rob Davison, New Zealand
  260. 5.11
  261. Å   Basic V rounding errors Ö Last month, (Archive 5.10 p19) Mr E. Hollox
  262. asked for help with the STR$ rounding. I hope that the following will
  263. help solve his problem. No actual specifics were given on his problem,
  264. so Iæve assumed that heæs working with monetary units (i.e. two decimal
  265. places). This may not be correct in this instance, but will probably be
  266. relevant to a large number of users and should provide Mr Hollox with a
  267. starting point for the solution he wants.
  268. 5.11
  269. In simple terms, the solution is to avoid decimals; to work only with
  270. integer variables. At first glance this may sound like an odd solution
  271. when a number of decimal places are required, but itæs not as strange as
  272. you may think.
  273. 5.11
  274. Firstly, the use of integer variables does not restrict you to the use
  275. of integer numbers Ö not when you are making use of STR$, anyway.
  276. 5.11
  277. Secondly, integers make for faster programs, as Iæm sure everyone
  278. realises (unless they program an Atari ST in GFA or Atari Basic!)
  279. 5.11
  280. Thirdly, and more importantly, integers are far more accurate than real
  281. numbers due to the way in which they are stored. The method of storage
  282. does have a negative effect, however, in that your range of numbers is
  283. restricted Ö though the range available should be enough for most
  284. peopleæs needs. Page 21 of the Archimedesæ BBC Basic Guide details this.
  285. Remember that the more decimal places you require, the lower the range
  286. becomes.
  287. 5.11
  288. So, onto the solution to the problem...
  289. 5.11
  290. Your Érealæ number must be stored as an integer 100 (for 2 dp users)
  291. times as big. Whenever any output is required, a routine must be used to
  292. convert it to a string and insert a decimal point at the correct place.
  293. For inputting, the reverse is required; the decimal point must be
  294. removed.
  295. 5.11
  296. The function FN_Int_To_Str carries out the decimalisation of your
  297. integer number:
  298. 5.11
  299. DEF FN_Int_To_Str(Int%)
  300. 5.11
  301. LOCAL Real$
  302. 5.11
  303. Int%=ABS(Int%)
  304. 5.11
  305. IF Int%<10 THEN Real$=
  306. 5.11
  307. ö      00ò+STR$(Int%)
  308. 5.11
  309. IF Int%>=10 AND Int%<100 THEN Real$=ö      0ò+STR$(Int%)
  310. 5.11
  311. IF Int%>=100 THEN Real$=RIGHT$
  312. 5.11
  313. (ö        ò+STR$(Int%),9)
  314. 5.11
  315. Real$=LEFT$(Real$,7)+ö.ò+
  316. 5.11
  317. RIGHT$(Real$,2)
  318. 5.11
  319. =Real$
  320. 5.11
  321. You must call the function with string$=FN_Int_ To_Str(number%) where
  322. string$ is your variable to hold the decimalised string and number% is
  323. your variable holding the stored number. The routine returns the number
  324. as a string with two decimal places, and right justified (in a ten
  325. character field).
  326. 5.11
  327. The minus symbol ruins the simplicity of the routine, so an absolute
  328. value is taken of the number. Minus numbers arenæt difficult to cope
  329. with but, as they werenæt part of the problem....
  330. 5.11
  331. The function works by converting the integer number to a string and then
  332. adding spaces to the left in order to right align it. This is done by
  333. the three IF statements and, possibly, is the more complex part of the
  334. routine.
  335. 5.11
  336. In the first case, the number is lower than ten (i.e. 0 to 9) so the
  337. final figure will be of the form öáááááá0.0xò Ö hence six spaces and two
  338. zeros are added.
  339. 5.11
  340. In the second case, the number is in the range 10 to 99, so the figure
  341. will be ö      0.xxò Ö six spaces and one zero are added.
  342. 5.11
  343. In the third case, the number is over 100 (over 1.00). In this case,
  344. rather than add the correct number of spaces for its size (6 for 100 to
  345. 999, 5 for 1000 to 9999, etc.) we add the maximum required and truncate
  346. the resulting string to its rightmost nine characters.
  347. 5.11
  348. The result, in all three cases, is a right aligned integer number in a
  349. nine character string.
  350. 5.11
  351. Then we have the easy bit. The first seven characters of the string are
  352. taken, a decimal point added, then the last two digits Ö problem solved.
  353. 5.11
  354. The reverse function is even simpler:
  355. 5.11
  356. DEF FN_Str_To_Int(Real$)
  357. 5.11
  358. LOCAL Int%
  359. 5.11
  360. Real$=FN_FormatNumber(Real$)
  361. 5.11
  362. Int%=VAL(LEFT$(Real$,7))*100+
  363. 5.11
  364. VAL(RIGHT$(Real$,2))
  365. 5.11
  366. =Int%
  367. 5.11
  368. This function is called with number%=FN_Str_ To_Int(string$) where
  369. string$ is your variable containing the string and number% is the
  370. variable that will contain the integer number.
  371. 5.11
  372. The first thing the function does is to pass the string to another
  373. function in order to ensure it is of the correct format before convert
  374. ing it to a number. This is dealt with below.
  375. 5.11
  376. The function then calculates the integer part of the number (positions 1
  377. to 7 within the string), multiplies this by 100, and adds the fractional
  378. part of the number (positions 9 to 10 Ö after the decimal point.) The
  379. result, an integer number 100 times the real number, is returned to the
  380. calling routine.
  381. 5.11
  382. I could have simply used Int%=VAL(Real$)*100, making the routine much
  383. simpler. Then the inaccuracy of real numbers is risked once more. In
  384. between Real$ and Int%, the number is stored as real until it is
  385. multiplied by 100 and put in the integer variable. The method Iæve used
  386. circumvents this risk, but introduces another factor. The format of the
  387. number within the string must be correct. For the above conversion to
  388. work, this must be a two decimal place number, with the decimal point as
  389. the eighth character of the string. This is where the third formula
  390. comes in:-
  391. 5.11
  392. DEF FN_FormatNumber(Number$)
  393. 5.11
  394. LOCAL Length%,Point%
  395. 5.11
  396. Length%=LEN(Number$)
  397. 5.11
  398. Point%=INSTR(Number$,ö.ò)
  399. 5.11
  400. IF (Point%=Length%-1) AND
  401. 5.11
  402. (Point%>0) THEN Number$=Number$+ö0ò
  403. 5.11
  404. IF (Point%=Length%) AND (Point%>0) THEN Number$=Number$+ö00ò
  405. 5.11
  406. IF Length%=0 THEN Number$=ö0ò
  407. 5.11
  408. IF Point%=0 THEN Number$=Number$+ ö.00ò
  409. 5.11
  410. IF Point%=1 THEN Number$=ö0ò+ Number$
  411. 5.11
  412. Number$=RIGHT$(ö       ò+Number$ ,10)
  413. 5.11
  414. =Number$
  415. 5.11
  416. This routine looks far more complicated than it actually is. The second
  417. routine, above, passes its Real$ to this function which formats it to
  418. two decimal places and ensures that the final string is 10 characters
  419. long.
  420. 5.11
  421. In this sense, it is a routine that can be used independently of the
  422. other two; by calling it with New$=FN_FormatNumber(Old$) where Old$ is
  423. the unformatted number and New$ is the result.
  424. 5.11
  425. It works by determining first the length of the string, then the
  426. position of the decimal point within the string. With a two decimal
  427. place number, the position of the point would be 2 less than the length
  428. of the string.
  429. 5.11
  430. The first IF statement adds a single zero if the position of the point
  431. is 1 less than the stringæs length but only if the decimal pointæs
  432. position is larger than zero Ö in which case the number is an integer
  433. and would have been accidentally multiplied by ten.
  434. 5.11
  435. The second IF adds a double zero if the point is at the end of the
  436. string. This is not done if the position of the point is zero, in which
  437. case the string is null and represents nothing.
  438. 5.11
  439. The third makes the string equal to ö0ò if it is found to be null.
  440. 5.11
  441. The fourth adds ö.00ò to the end of the string if there is no decimal
  442. point Ö i.e. if the number is an integer.
  443. 5.11
  444. The combination of the third and fourth IFæs result in the null string
  445. (öò) becoming ö0.00ò
  446. 5.11
  447. The fifth IF adds a zero to the string if the decimal point is at the
  448. very beginning Ö if the number is lower than one and is lacking the
  449. leading zero.
  450. 5.11
  451. Finally, before returning the result, a number of spaces are added to
  452. the left of the number which is then truncated to the rightmost ten
  453. characters. Hey presto, a nicely formatted number.
  454. 5.11
  455. The three routines are on the enclosed disk, in the form of a procedure
  456. library Ö details of how to use such are on page 92 of the BBC Basic
  457. Guide.
  458. 5.11
  459. Though the routines, as given, are for numbers with two decimal places Ö
  460. and with a field width of ten Ö it shouldnæt be too difficult to alter
  461. them for other requirements. Unfortunately, the higher the number of
  462. decimal places, the more (and more complicated) IFæs are required. It
  463. shouldnæt be too difficult to write routines that accept the number for
  464. conversion, together with the number of decimal places and the field
  465. width but, as I said before, this was just intended to provide Mr Hollox
  466. with a starting point for his solution. Vince Hudd, Soft Rock Software.
  467. 5.11
  468. Å   Bible Master with RISC-OS 3 Ö Having found a list of verses or cross
  469. references, it is possible to import the text into an Archimedes word
  470. processing (or DTP) package.
  471. 5.11
  472. (i) Load the PC text into !Edit and then
  473. 5.11
  474. (ii) Use the wildcard search and replace option searching for %[ $x76-
  475. xFF] (note that the square brackets start with a space) and replacing
  476. with a space.
  477. 5.11
  478. This will remove all the screen control characters and multiple spaces. 
  479. The resulting text can then be saved and/or loaded into most word
  480. processors.  S Wright, Basingstoke
  481. 5.11
  482. Å   Deskjet 500C and RISC-OS 3 Ö Recent contributors on the subject of the
  483. HP Deskjet 500C have tended to concentrate on the best type of paper to
  484. use. I will not attempt to further that debate, but rather recount my
  485. efforts to produce envelopes to match the quality of their contents.
  486. This turned out to be less straightforward than I had expected but I
  487. eventually succeeded. Most of my printing is from Impression Junior, so
  488. the following will apply to Impression II users and, although I am using
  489. an A5000,  the RISC-OS 2  drivers are not crucially different.
  490. 5.11
  491. Using the Alter Pages sub-menu in Junior, create a custom page the same
  492. size as the envelope. A standard A4 envelope seems to be 218mm by 110mm.
  493. Create a suitable frame for the name and address and save the file as
  494. Éenvelopeæ. Load the !Printers application and create a custom page of
  495. the same size, also called Éenvelopeæ. I have used margins of 10mm all
  496. round which show up unambiguously in the Junior window. Click on <Save
  497. Settings> in the page set-up menu and <Save Choices> from the main menu.
  498. Go to the Éconfigureæ option from the printer control menu, select the
  499. new Éenvelopeæ option and click on OK. The printer margins will now be
  500. visible in the Junior window. Insert an envelope face down in the out-
  501. tray of the printer, sliding it into the guide slots provided and
  502. keeping the right hand edge against the edge of the tray. At this point,
  503. the HP manual is misleading. Do NOT press the envelope button on the
  504. printer. Simply press <Print> on the computer and then <Return>. The
  505. envelope will now be properly printed. If the envelope button on the
  506. printer has been pressed, the envelope will be passed disdainfully
  507. through the printer and the address will appear on the next sheet of
  508. paper from the in-tray.
  509. 5.11
  510. In the prison where I work, I have recently been involved in running an
  511. Anger Control Programme which required a couple of dozen overhead
  512. projector transparencies. These can be produced to a high standard on
  513. the 500C and, of course, in full colour. The transparencies used must be
  514. designed for use with inkjet printers since they require a special
  515. material to absorb the ink. There is, however, one major problem Ö the
  516. appropriate material is rather expensive. Hewlett Packardæs own
  517. transparencies cost about ú75 inc. VAT for a box of 100. For me, this is
  518. too many and far too much money. Eventually, I found that NOBO produce a
  519. box of 50 for a slightly lower price per transparency and these should
  520. be available from a good office supplies firm. The inadequate black
  521. produced by the colour cartridge on the 500C is particularly noticeable
  522. on an OHP and I found that a more satisfactory result could be obtained
  523. by printing each transparency twice; once for black and once for the
  524. coloured areas. Registration seems not to be a problem for the bold text
  525. and graphics which are the norm for this kind of presentation. This
  526. technique also saved an awful lot of expensive, coloured ink.
  527. 5.11
  528. Incidentally, the UNDO facility on RISC-OS3 !Draw(or in !DrawPlus) was a
  529. considerable help in creating the colour Éseparationsæ for this process.
  530. I could delete either the black or the coloured areas of the image
  531. before printing and restore them by pressing <F8>.  A Trout, Lancs.
  532. 5.11
  533. Å   Deskjet 500 DIP switches Ö For those just buying Deskjet 500 printers,
  534. it may be worth knowing that the default setting of the DIP switches is
  535. not too helpful. Try the following settings instead...
  536. 5.11
  537.            Bank A                         Bank B
  538. 5.11
  539. 1 2 3 4 5 6 7 8   1 2 3 4 5 6 7
  540. 5.11
  541. »  »  ¡  ¡  »  ¡  »  ¡áá      »  ¡  »  »  »  »  »
  542. 5.11
  543. This seems to work OK Ö it sets things like skip-over-perforation OFF
  544. and A4 paper instead of some US size.á Steve Hutchinson, Gloucester.
  545. 5.11
  546. Å   Dragging solid sprites Ö RISC-OS 3 has, built in, the ability to solid
  547. drag sprites from save dialog boxes. The solid drag option is stored in
  548. CMOS in a Éhiddenæ location on bit 1 of byte 28. The following commands
  549. will set bit 1 without disturbing anything else in this byte.
  550. 5.11
  551. *Basic
  552. 5.11
  553. SYS öOS_Byteò,161,28 TO ,,v%
  554. 5.11
  555. v%=v% OR %10
  556. 5.11
  557. SYS öOS_Byteò,162,28,v%
  558. 5.11
  559. Now try saving a file from Draw/Edit/Paint, etc.
  560. 5.11
  561. (Comparing the A5000 to an A440/1+30Mhz ARM3, the 440 runs at about the
  562. same speed as the A5000 in mode 12, but at about 1/3 of the speed in
  563. mode 28.)  Rob Davison, New Zealand
  564. 5.11
  565. Å   Personalised application templates Ö Many users may not have realised
  566. that it is often possible to alter the windows and templates used by an
  567. application. Most programmers use the FormEd application or one of its
  568. derivatives to create a Template file which contains the window
  569. definitions used by the program and this can often be seen in the
  570. application directory normally called, not surprisingly, Templates.
  571. 5.11
  572. If you have a copy of FormEd, which is supplied with all Acornæs
  573. compilers but is also available from most PD libraries (Shareware Disc
  574. 20, Ed), you can load these templates and alter them to suit your own
  575. ideas and preferences. What you must not do is change the number of any
  576. of the icons or the program wonæt behave properly. You must also be
  577. careful if you create any extra icons that they donæt overlay any
  578. existing button icons since the Wimp doesnæt report clicks on icons
  579. which are hidden behind others with a higher number.
  580. 5.11
  581. As an illustration, I have included a set of modified windows for Edit.
  582. Since some of these now use sprites there is also a sprite file and you
  583. must insert a line to load these in the !Run file or the windows will
  584. look rather bare. For simplicity, I have included a !Run file with the
  585. extra line in it.
  586. 5.11
  587. Rename your existing !Run and Templates files something else (in case
  588. you donæt like mine) and copy the files !Run, Templates and sprites2
  589. into the !Edit application directory. Now when you run Edit the new
  590. windows will be used.
  591. 5.11
  592. Note that the main text window is also changed. When Edit opens a new
  593. file the main text window opens in whatever form the template was
  594. created. Just load the Templates file into FormEd and drag the text
  595. window around the screen and resize it until you are satisfied. Then
  596. save the templates. Next time you open an Edit window, that is the size
  597. and position it will assume.
  598. 5.11
  599. I donæt claim that these examples are particularly brilliant but they
  600. are certainly an improvement on the original and will help to show how
  601. you can customise standard programs. David Holden, Sydenham.
  602. 5.11
  603. Å   Pinboard problems Ö Several people (well, at least two anyway!) appear
  604. to have had problems with Pinboard running under RISC-OS 3. It would
  605. seem that the Pinboard module is automatically UNPLUGged following an
  606. exit from the desktop. One solution involves using an alias to re-
  607. initialise the Pinboard. If you have a desktop !Boot file then, before
  608. the Pinboard command (if there is one), insert something like the
  609. following:
  610. 5.11
  611. Set Alias$NewDesktop %RMreinit Pinboard |m %Desktop |m
  612. 5.11
  613. Obviously, in place of NewDesktop you can use any name that you like
  614. (note that abbreviations still work so, in this case, you could use New.
  615. to carry this out.)  If you wish to re-run the !Boot file on exiting
  616. from command line mode, add -F !Boot after the %Desktop command.  If you
  617. do not have a desktop !Boot file, use the Desktop Boot function from the
  618. Acorn menu on the iconbar.
  619. 5.11
  620. From now on, to get back from the command line (after using the Exit
  621. option), type New.  (or your appropriate alias) rather than Desktop.
  622. 5.11
  623. Simon Moy, Norwich Computer Services.
  624. 5.11
  625. Å   Truncated filenames and RISC-OS 3 Ö It took me a long time to discover
  626. that you type *Configure Truncate off  to stop the O.S. automatically
  627. truncating filenames when saving and therefore (possibly) overwriting an
  628. old version of a file which I wanted to keep!ááA
  629. 5.11
  630. 5.11
  631. Colton
  632. 5.11
  633. From 5.10 page 20
  634. 5.11
  635. 5.11
  636.