home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1996 / ARCHIVE_96.iso / text / hints / volume_03 / issue_05 < prev    next >
Text File  |  1995-02-16  |  12KB  |  387 lines

  1. Å   Window resizing bugs/errors Ö The bug in Interactive help Archive
  2. 2.11 page 8 is not a bug but a result of !Help setting a window work
  3. area extent in less than a multiple of four. The program is in C so I
  4. canæt edit it. I discovered this when writing my own software. When a
  5. window was stretched to its full extent it would not grow smaller in the
  6. y direction until you moved in to the left. R.D.
  7.  
  8. Å   *WIPE with mouse Ö In BASIC, (or at the operating system prompt for
  9. that matter. Ed.) if you have the pointer ON (*POINTER) and do *WIPE *,
  10. a mouse pointer appears enabling you to use <se-lect> to delete the file
  11. and <menu> or <adjust> to keep the file.
  12. 3.5
  13. Å   Alerion cheat  Ö For those who have the RISC-OS version of Alerion,
  14. you can select the wave you wish to play by pressing the letters <A> to
  15. <O> while on the title screen.
  16. 3.5
  17. Å   BASIC Editor bugs Ö There is a bug or two in the Basic Editor v1.00
  18. that comes on the Applications Disc 2. If you exactly fill the first
  19. line so that the cursor jumps to the next line, and then press return,
  20. the screen looks something like this:
  21. 3.5
  22. 10 REM This is meant to be right over to the edge
  23. 3.5
  24. 11 C
  25. 3.5
  26. 20 xxxxxxxxxxxx
  27. 3.5
  28. 30 xxxx
  29. 3.5
  30. If you then press the <page down> key, the comp-uter will freeze.
  31. 3.5
  32. Another bug, whose circumstances cannot be so readily repeated, occurs
  33. when pressing the <cursor down> key causing the program to shoot off the
  34. top of the screen, and nothing will bring it back again.
  35. 3.5
  36. Both of these are Émildæ bugs because pressing <reset> followed by
  37. typing *BASIC and OLD and EDIT restores everything back to it original
  38. state.
  39. 3.5
  40. Å   BASIC first please Ö If you want your computer to start up in BASIC
  41. instead of the desktop, use *CON. LAN. 4 and then do a <ctrl-break>.
  42. This also means that the full computer memory is available to your
  43. program. If you go to BASIC with <f12> to get a star command and then
  44. typing BASIC, you only get the memory available that has been allocated
  45. to the next application under the task display (651516 bytes). The
  46. reason for this is that BASIC is being run as the next task within the
  47. desktop environment. This can be seen by typing QUIT which will drop you
  48. back into the desktop with everything as it was before.
  49. 3.5
  50. The other way to get the full memory available is to press <shift-ctrl-
  51. f12> which will drop you out of the desktop completely, closing all
  52. tasks. This drops you into the operating system, so typing BASIC and
  53. then QUIT brings you back to the operating system prompt, not into the
  54. desktop.
  55. 3.5
  56. (This is one of those things which, according to Adrian is öobviousò,
  57. but to those of us who never reads manuals, it is news! So, the next
  58. time you discover something which someone else thinks is öobviousò, send
  59. it in to us as an H&T. Ed.)
  60. 3.5
  61. Å   CTRLing VDU scrolling Ö You can use the <scroll lock> key on the
  62. Archimedes to stop the computer printing (either to the screen or
  63. printer). Another method of doing this is to hold down the <shift> and
  64. <ctrl> keys. However, if you just hold the <ctrl> key down then you can
  65. slow down the speed of printing to about a 20th of it original speed. 
  66. 3.5
  67. Å   Database routine Ö If youæve written a database in BASIC e.g. an
  68. address book, it can be difficult to find a name unless you stick to a
  69. format where all entries are in upper case, or lower case apart from the
  70. initial letters. This little routine which uses 104 bytes is the
  71. solution. As well as accepting upper or lower case it also will accept
  72. the character ö#ò as a single character wildcard .
  73. 3.5
  74. It is identical to the BASIC command.
  75. 3.5
  76. INSTR(string,substring,start of search)
  77. 3.5
  78. Except the variables A%, $B% and $C% are declared before X=USR(code) is
  79. called, i.e.
  80. 3.5
  81. $B%=ömain stringò
  82. 3.5
  83. $C%=ösubstringò
  84. 3.5
  85. A%=start of search
  86. 3.5
  87. X=USR(code)
  88. 3.5
  89. There is an example program with the listing.
  90. 3.5
  91. 160 DEFPROCass
  92. 3.5
  93. 170 FORopt=0TO3 STEP3
  94. 3.5
  95. 180    P%=code
  96. 3.5
  97. 190   [ OPT opt
  98. 3.5
  99. 200   STMFD R13!,{r1-r12 ,R14} ;store
  100. 3.5
  101.  registers. not R0
  102. 3.5
  103. 210   MOV R5,R0      ;start of search
  104. 3.5
  105. 220   MOV R0,#0    ;reset R0 (A%) for
  106. 3.5
  107.  return
  108. 3.5
  109. 230   LDRB R7,[R2,#0] ;load R7 with
  110. 3.5
  111.  first byte of $C%
  112. 3.5
  113. 240   CMP R7,#13   ;is it a CR?
  114. 3.5
  115. 250   BEQ end      ;i.e. null sub-
  116. 3.5
  117. string. exit to BASIC
  118. 3.5
  119. 260
  120. 3.5
  121. 270   .nomatch
  122. 3.5
  123. 280   MOV R4,#0  ;initialise counters
  124. 3.5
  125. 290   MOV R3,#0
  126. 3.5
  127. 300   .nextchar
  128. 3.5
  129. 310   LDRB R6,[R1,R5]  ;get byte of
  130. 3.5
  131.  string
  132. 3.5
  133. 320   CMP R6,#13   ;is it CR ie end
  134. 3.5
  135.  of string
  136. 3.5
  137. 330   BEQ end      ;if yes, substring
  138. 3.5
  139.  not found. exit
  140. 3.5
  141. 340   AND R6,R6,#95   ;AND to ignore
  142. 3.5
  143.  case
  144. 3.5
  145. 350   LDRB R7,[R2,R4] ;first byte of
  146. 3.5
  147.  substring
  148. 3.5
  149. 360   CMP R7,#13      ;is it a CR?
  150. 3.5
  151. 370   SUBEQ R0,R5,R3  ;yes i.e. end
  152. 3.5
  153.  of substring
  154. 3.5
  155. 380                   ;R5-R3 gives
  156. 3.5
  157.  position in string
  158. 3.5
  159. 390   ADDEQ R0,R0,#1  ;plus 1. First
  160. 3.5
  161.  char=0
  162. 3.5
  163. 400   BEQ end         ; and exit
  164. 3.5
  165. 410                  
  166. 3.5
  167. 420   AND R7,R7,#95   ;AND to ignore
  168. 3.5
  169.  case
  170. 3.5
  171. 430   ADD R5,R5,#1    ;increment
  172. 3.5
  173.  counters for next chars
  174. 3.5
  175. 440   ADD R4,R4,#1
  176. 3.5
  177. 450   CMP R7,#3       ;is it a hash?
  178. 3.5
  179.  If so make equal
  180. 3.5
  181. 460   MOVEQ R6,R7
  182. 3.5
  183. 470   CMP R6,R7      ;ARE bytes equal
  184. 3.5
  185. 480   ADDEQ R3,R3,#1  ;yes Ö get next
  186. 3.5
  187.  sub string char
  188. 3.5
  189. 490   BEQ nextchar
  190. 3.5
  191. 500   BNE nomatch     ;no try next
  192. 3.5
  193.  string char
  194. 3.5
  195. 510   .end
  196. 3.5
  197. 520   LDMFD R13!,{r1-r12 ,R15};restore
  198. 3.5
  199. registers. R0 has INSTR
  200. 3.5
  201. 530   ]
  202. 3.5
  203. 540 NEXT
  204. 3.5
  205. 550 ENDPROC
  206. 3.5
  207. Å   Disappearing menus Ö After selecting an option on a menu, the menu
  208. disappears. To prevent this: instead of using <select> to select option,
  209. use <adjust>, and the menu will then stay on the screen.
  210. 3.5
  211. Å   Drawing with Outline fonts - If you possess Acorn DTP, you can use
  212. the !FontEd public domain program to create !Draw paths of the
  213. individual letters. This is done by dragging the character in the main
  214. !FontEd window into the !Draw document window. Once transferred, the
  215. letter can be manip-ulated just like any other drawing e.g. rotated,
  216. stret-ched, filled, etc. With a little patience, some very effective
  217. titles can be created.
  218. 3.5
  219. Å   DTP memory Ö A couple of hints to give extra memory when using Acorn
  220. DTP with a 1M machine: load the printer driver first and then quit
  221. before entering DTP. Only the modules are used for printing, which are
  222. left installed after you quit. Secondly, the use of screen mode 1 uses
  223. only 24k of memory and since it is a four colour mode, it gives a better
  224. grey scale than Mode 0.
  225. 3.5
  226. Å   E-Type bug Ö There is a bug in ÉAll Tracksæ option of E-Type. If you
  227. press hard on the brakes when the time reaches 0:01 the program
  228. sometimes goes bonkers and when you are placed on the new track, your
  229. Trip Score increases.
  230. 3.5
  231. Å   External ST506 drives Ö If you add an external hard drive to an old
  232. 440 or 310, you may find that the whole system dies completely for no
  233. apparent reason. The problem is that if the external drive is powered up
  234. before the computer, a small voltage can be produced within the computer
  235. so when the power suplly on the computer tries to power up, it sees this
  236. voltage, panics and shuts down again! The simple solution is to power up
  237. the computer first and then the external drive.
  238. 3.5
  239. When switching off, work on the ölast in, first outò principle and
  240. switch off the drive first. This is good practice since, if the drive is
  241. left switched on, as the computer powers down, extraneous signals on the
  242. driveæs data and control lines could conceivably be interpreted as
  243. something nasty like, ö Please wipe track 0, sector 0ò and you end up
  244. with a öBad Free Space Mapò! (Iæm sure that is Somebodyæs Law.)
  245. 3.5
  246. Å   Interdictor Cheat Ö It is possible to alter your landing pad in
  247. Interdictor. Edit StateSave via !Edit. Go down to the 10th number and
  248. alter it. Note that Landing pad 2 is actually Landing pad 1 and so alter
  249. the 10th number to a 1 and so on. Also note that there are 7 runways,
  250. the 7th being known as the number 6. This might sound confusing but
  251. really itæs not!
  252. 3.5
  253. Å   Large hard drives on A410/1? Ö Someone asked us to find out whether
  254. it was possible to put hard drives with more than 8 heads onto an A410/
  255. 1. All we have been able to find out is that, to get the extra head
  256. select line, you need to change links LK12 and LK13. Whether the
  257. software will cope, we do not know. If anyone has any success with it,
  258. perhaps they would let us know.
  259. 3.5
  260. Å   Virus protection Ö If you are passing discs around, especially PD
  261. discs, guard yourself against the virus. When you receive or pass on a
  262. disc, you run the risk of your machine picking or up a virus or logic
  263. bomb.
  264. 3.5
  265. Passing on files: Format an unused disc and copy only the files you wish
  266. to send. Alternatively, wipe the disc (*Wipe * FR~C), copy the files and
  267. run my disc wiping program (see below). This is needed because deleting
  268. a file does not erase the data on the disc; it just causes the computer
  269. to forget about it. The data can be retrieved by anyone with a disc
  270. sector editor, so run the program if you want to thoroughly scrub the
  271. unused parts of the disc.
  272. 3.5
  273. Receiving files: Copy across only those files which you need. Try not to
  274. use the desktop as some logic bombs can sit in an applicationæs !Boot
  275. file and spring out at you when you open their directory viewer.* After
  276. copying, the original disc should be cleared by reformatting.
  277. 3.5
  278.  10 REM >Eradicate
  279. 3.5
  280.  20 REM Guards against the Virus and
  281. 3.5
  282.  accidental giveaways of data
  283. 3.5
  284.  30 REM Erases totally the unused parts
  285. 3.5
  286.  of a disc
  287. 3.5
  288.  40 REM PUBLIC DOMAIN by Sandie Goh
  289. 3.5
  290.  50 REM Version 1.21 (20-Sep-1989)
  291. 3.5
  292.  60 :
  293. 3.5
  294.  70 MODE 3:OFF:DIM blankspace 409600
  295. 3.5
  296.  80 PRINTöDisc Eradicatorò
  297. 3.5
  298.  90 PRINTö===============òÉ
  299. 3.5
  300. 100 PRINTöPUBLIC DOMAIN by Sandie Goh,
  301. 3.5
  302. Version 1.21 (20-Sep-1989)öÉ
  303. 3.5
  304. 110 PRINTöErases totally the unused
  305. 3.5
  306.  parts of a disc.ö
  307. 3.5
  308. 120 PRINTöHELPS guard against viruses,
  309. 3.5
  310.  logic bombs etc.öÉ
  311. 3.5
  312. 130 PRINTöInsert disc to be cleaned in
  313. 3.5
  314.  drive 0 and press a key.öÉ
  315. 3.5
  316. 140 *FX 15,1
  317. 3.5
  318. 150 IF GET
  319. 3.5
  320. 160 PRINTöCompacting, to collect free
  321. 3.5
  322.  space into a single block.ö
  323. 3.5
  324. 170 REPEAT
  325. 3.5
  326. 180   *COMPACT 0
  327. 3.5
  328. 190   SYSöADFS_FreeSpaceò,ö0ò TO total,
  329. 3.5
  330.  biggest
  331. 3.5
  332. 200 UNTIL biggest=total
  333. 3.5
  334. 210 PRINTöSaving dummy files into the
  335. 3.5
  336.  free space to wipe anything there.ö
  337. 3.5
  338. 220 REM Use unlikely filenames to avoid
  339. 3.5
  340.  clashes
  341. 3.5
  342. 230 IF biggest>409600 THEN
  343. 3.5
  344. 240   OSCLI (öSAVE ZZDelONN12 ò+STR$~
  345. 3.5
  346. blankspace+ö +64000ò)
  347. 3.5
  348. 250   biggest=biggest-409600
  349. 3.5
  350. 260 ENDIF
  351. 3.5
  352. 270 OSCLI (öSAVE XXDelONN12 ò+STR$~
  353. 3.5
  354. blankspace+ö +ò+STR$~biggest)
  355. 3.5
  356. 280 PRINTöDeleting the dummy files to
  357. 3.5
  358.  release the space.öÉ
  359. 3.5
  360. 290 *REMOVE ZZDelONN12
  361. 3.5
  362. 300 *DELETE XXDelONN12
  363. 3.5
  364. 310 PRINTöI now pronounce this disc
  365. 3.5
  366.  clean.ö
  367. 3.5
  368. *If you donæt believe me, I was myself the victim of a booby-trapped
  369. disc. After mounting a disc I picked up from a friend, I copied its
  370. contents across to my hard disc, only to find that it (the winchester)
  371. was now blank! Believing the problem to be a bug in the desktop or
  372. chance disc failure, I restored the hard disc and tried again Ö the same
  373. thing happened again, but this time when I did a *Compact 4.
  374. 3.5
  375. I tried everything and was just about to give up and complain to Acorn
  376. when a friend phoned me with the same problem. It turns out that he too
  377. had a copy of the disc I had picked up and I immediately became
  378. suspicious. Further research showed that the disc contained an invisible
  379. program which sat in the machine waiting for an opportune moment, then
  380. zapped the Winchester with a *Wipe :4.* FR~C.
  381. 3.5
  382. The subtlety of the program makes it even more deadly Ö the öerrorò
  383. occurs when you write to the hard disc using the desktop, so you are
  384. lead to think (as I was) that a bug or disc error is responsible. So be
  385. warned. Guard against the virus.
  386. 3.5
  387.