home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1995 / ARCHIVE95.iso / text / hints / volume_02 / issue_08 < prev    next >
Text File  |  1995-02-16  |  27KB  |  816 lines

  1.  
  2. Å   Floppy programs on hard discs Ö Hereæs the best method Iæve come
  3. across of getting floppy programs to run on a HD machine. You need two
  4. FFF type files (or Obey if you want) One called ÉFloppyæ should contain:
  5. 2.8
  6. *CON. Drive 0
  7. 2.8
  8. *CON. NoBoot
  9. 2.8
  10. The other called Hard should be:
  11. 2.8
  12. *CON. Drive 4
  13. 2.8
  14. *CON. Boot
  15. 2.8
  16. If you put these in the library you can then
  17. 2.8
  18. *Floppy
  19. 2.8
  20. <ctrl-break>
  21. 2.8
  22. <shift-break>
  23. 2.8
  24. do whatever else
  25. 2.8
  26. <ctrl-break>
  27. 2.8
  28. *DIR :4
  29. 2.8
  30. *hard
  31. 2.8
  32. <ctrl-break>
  33. 2.8
  34. (This assumes you have a !Boot on your hard disc.) Martyn Lovell
  35. 2.8
  36. Å   Head alignment problems? Ö If you are getting disc errors and
  37. suspect that the problem might be head alignment, one way of confirming
  38. this is to use the disc copier program that you will find on Share-ware
  39. N╝2. The program does a check of the whole disc to find bad sectors. If
  40. one of the heads is misal-igned, you will probably find that all the bad
  41. sectors reported are on one or other of the heads. Then itæs time to
  42. take it off to your local dealer for repair.
  43. 2.8
  44. Å   Hearsay Ö If you need to change modem baud rates with ATB3 or ATB0
  45. after calling one remote system and before calling another, you can do
  46. so by using a dial prefix in the modem driver edit screen by putting
  47. öATB3Dò or öATB0Dò as appropriate.
  48. 2.8
  49. Å   Matrix Procedures and Functions Ö This was prompted by Steve Drainæs
  50. article in Archive 2.1 p.17 where he stated that a numerical method for
  51. the inverse of a square matrix needs a good guess of the inverse and
  52. uses the transposed matrix as a starting point. His excellent program
  53. has been timed to invert a 20 x 20 matrix to 1 part in 10^9 in approx-
  54. imately 10 seconds.
  55. 2.8
  56. A good guess or even a desirable result can be ob-tained by a procedure
  57. described below. It calculates an inverse of 20x20 matrix in about 280
  58. centisec-onds giving an error in the non-diagonal elements of the
  59. identity matrix of less than 1 part in 10^6.
  60. 2.8
  61. The method used is based on the following. The matrix M to be inverted
  62. is premultiplied by its transposed MÉ, giving MæM. The result is
  63. decomposed in a lower triangular matrix L satisfying the identity
  64. LLæ=MæM. Then I, which is the inverse of L, can be determined in a
  65. straight forward way. Matrix IæI thus equals the inverse of MæM, and
  66. finally IæIMÉ gives the result wanted. This is correct as can be seen
  67. when premultiplying a vector x by M giving a vector v, and solving for
  68. x.
  69. 2.8
  70. Mx=v ==> MæMx=Mæv==> LLæx=Mæv ==> IæILLæx=IæIMæv ==> x=IæIMæv
  71. 2.8
  72. In fact, this is the least square solution for vector x, i.e. r
  73. equations with c unknown variables ( r>=c ) are solved using the
  74. criterium that the sum of the squares of the deviations to a solution of
  75. vector x obtains a minimal value.
  76. 2.8
  77. The program presented below uses PROC lst_sq_inv to determine the
  78. Éinverseæ Mi of any matrix M. If M is a square matrix then MiM = E and
  79. also MMi = E, E being the identity matrix. As an Éextraæ, the determi
  80. nant of the square matrix M can easily be calculated. To my knowledge
  81. the method is numerically very stable.
  82. 2.8
  83.  10 REM >Matrix_Inv
  84. 2.8
  85.  20 :
  86. 2.8
  87.  30 *********************************
  88. 2.8
  89.  40 REM Inverting an arbitrary matrix
  90. 2.8
  91.  50 REM E.D. Engelhardt, March 1989 
  92. 2.8
  93.  60 *********************************
  94. 2.8
  95.  70 :
  96. 2.8
  97.  80 REM *** Generate random matrix M,
  98. 2.8
  99.  col% columns and row% rows
  100. 2.8
  101.  90 CLS
  102. 2.8
  103. 100 PRINTÉö Inverting an arbitrary
  104. 2.8
  105.  matrixöÉ
  106. 2.8
  107. 110 REPEAT:INPUTö Rows            :
  108. 2.8
  109.  örow%:UNTIL row%>0
  110. 2.8
  111. 120 REPEAT:INPUTö Columns <= rows :
  112. 2.8
  113.  öcol%:UNTIL col%<=row% AND col%>0
  114. 2.8
  115. 130 CLS:PRINTÉö Rows    : òSTR$row%
  116. 2.8
  117. Éö Columns : òSTR$col%
  118. 2.8
  119. 140 row%-=1:col%-=1
  120. 2.8
  121. 150 DIM M(row%,col%)
  122. 2.8
  123. 160 FOR r%=0TOrow%:FOR c%=0TOcol%:
  124. 2.8
  125. M(r%,c%)=RND(1)*SGN(0.5-RND(1)) :NEXT:NEXT
  126. 2.8
  127. 170 :
  128. 2.8
  129. 180 start%=TIME
  130. 2.8
  131. 190 :
  132. 2.8
  133. 200 REM Determine the Éleast squareæ
  134. 2.8
  135.  inverse Mi of M. Result : Mi.M is equal to the identity matrix E.
  136. 2.8
  137.  If rows = cols also M.Mi = E.
  138. 2.8
  139. 210 :
  140. 2.8
  141. 220 DIM Mi(col%,row%):PROClst_sq_inv
  142. 2.8
  143. (M(),Mi())
  144. 2.8
  145. 230 end%=TIME
  146. 2.8
  147. 240 :
  148. 2.8
  149. 250 PRINTÉö Time(centisecs) : ò;
  150. 2.8
  151. STR$(end%-start%)Éæ
  152. 2.8
  153. 260 :
  154. 2.8
  155. 270 PROCprint
  156. 2.8
  157. 280 END
  158. 2.8
  159. 290 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-300 DEFPROClst_sq_inv(R(),Ri())
  160. 2.8
  161. 310 REM Ri is Éleast squareæ inverse
  162. 2.8
  163.  of R, i.e. Ri.R = E (identity                matrix). If rows = cols
  164. also
  165. 2.8
  166.  R.Ri = E.
  167. 2.8
  168. 320 REM Dimensions R(v%,h%),Ri(h%,v%)
  169. 2.8
  170.  ==> v% : rows , h% : columns
  171. 2.8
  172. 330 REM E.D. Engelhardt, March 1989
  173. 2.8
  174. 340   :
  175. 2.8
  176. 350 LOCAL RtR(),L(),I(),v%,h%,c%,r%,t%
  177. 2.8
  178. 360 v%=DIM(R(),1):h%=DIM(R(),2)
  179. 2.8
  180. 370 DIM RtR(h%,h%),L(h%,h%),I(h%,h%)
  181. 2.8
  182. 380 :
  183. 2.8
  184. 390 REM Determine transpose of R
  185. 2.8
  186. 400 FOR r%=0 TO v%:FOR c%=0 TO h%:
  187. 2.8
  188. Ri(c%,r%)=R(r%,c%):NEXT:NEXT
  189. 2.8
  190. 410 :
  191. 2.8
  192. 420 REM Calculate square matrix to be
  193. 2.8
  194.  inverted
  195. 2.8
  196. 430 RtR()=Ri().R()
  197. 2.8
  198. 440 :
  199. 2.8
  200. 450 REM Calc lower triangle L of RtR
  201. 2.8
  202. 460 FOR c%=0 TO h%:FOR r%=c% TO h%
  203. 2.8
  204. 470   L(r%,c%)=RtR(r%,c%):t%=c%-1
  205. 2.8
  206. 480   IF t%>=0 FOR t%=t%TO0STEP-1:
  207. 2.8
  208. L(r%,c%)=L(r%,c%)-L(r%,t%)*
  209. 2.8
  210. L(c%,t%):NEXT
  211. 2.8
  212. 490   IF r%>c% THEN L(r%,c%)=L(r%,c%)
  213. 2.8
  214. /L(c%,c%) ELSE L(r%,c%)=SQR L(r%,c%)
  215. 2.8
  216. 500 NEXT:NEXT
  217. 2.8
  218. 510 :
  219. 2.8
  220. 520 REM If R is square (rows = cols)
  221. 2.8
  222.  its determinant equals the product of the diagonal elements of L. The
  223. determinant of RtR equals the
  224. 2.8
  225.  square of the determinant of L.
  226. 2.8
  227. 530 :
  228. 2.8
  229. 540 REM Invert triang matrix L to I
  230. 2.8
  231. 550 FOR c%=0 TO h%:FOR r%=c% TO h%
  232. 2.8
  233. 560   FOR t%=c% TO r%-1:I(r%,c%)=
  234. 2.8
  235. I(r%,c%)-L(r%,t%)*I(t%,c%):NEXT
  236. 2.8
  237. 570   IF r%>c% THEN I(r%,c%)=I(r%,c%)
  238. 2.8
  239. /L(r%,r%) ELSE I(r%,c%)=1/L(r%,r%)
  240. 2.8
  241. 580 NEXT:NEXT
  242. 2.8
  243. 590 :
  244. 2.8
  245. 600 REM Determine transpose L of
  246. 2.8
  247.  inverse triangle I
  248. 2.8
  249. 610 FOR r%=0 TO h%:FOR c%=0 TO
  250. 2.8
  251.  h%:L(c%,r%)=I(r%,c%):NEXT:NEXT
  252. 2.8
  253. 620 :
  254. 2.8
  255. 630 REM Inverse matrix of R is Ri
  256. 2.8
  257. 640 RtR()=L().I():Ri()=RtR().Ri()
  258. 2.8
  259. 650 :
  260. 2.8
  261. 660 ENDPROC
  262. 2.8
  263. 670 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-680 DEFPROCprint
  264. 2.8
  265. 690 VDU 14
  266. 2.8
  267. 700 PRINTö ******** Elements MatrixòÉ
  268. 2.8
  269. 710 FOR r%=0 TO row%:FOR c%=0 TO
  270. 2.8
  271.  col%:PRINT M(r%,c%):NEXT:PRINT:NEXT
  272. 2.8
  273. 720 PRINTö ******** Elements inverse
  274. 2.8
  275.  MatrixöÉ
  276. 2.8
  277. 730 FOR r%=0 TO col%:FOR c%=0 TO row%
  278. 2.8
  279. :PRINT Mi(r%,c%):NEXT:PRINT:NEXT
  280. 2.8
  281. 740 DIM E(col%,col%)
  282. 2.8
  283. 750 E()=Mi().M()
  284. 2.8
  285. 760 PRINTö ******** Elements of
  286. 2.8
  287.  Inverse_Matrix.MatrixöÉ
  288. 2.8
  289. 770 FOR r%=0 TO col%:FOR c%=0 TO col%
  290. 2.8
  291. :PRINT E(r%,c%):NEXT:PRINT :NEXT
  292. 2.8
  293. 780 VDU 15
  294. 2.8
  295. 790 ENDPROC
  296. 2.8
  297. Å   Repton 3 Ö There is a bug in screen E of WORK, so to get past it,
  298. you will need to know the next password which is COUNTER.
  299. 2.8
  300. Å   Three floppies under Arthur Ö Here is a solution to the problem of
  301. three floppies on the desktop (Archive 2.7.12). Enter the following in a
  302. file called ÉDesktopæ in the library directory, use *BUILD or a text
  303. editor such as Twin to enter it.
  304. 2.8
  305. *BASIC
  306. 2.8
  307. LOAD öDESKFS:DeskTopMgr2ò
  308. 2.8
  309. 11 OSCLI öDESKFSò
  310. 2.8
  311. 12291 IFfloppies%>2 THEN PROCsys_
  312. 2.8
  313. addtoiconbar_left(öfloppy2ò,
  314. 2.8
  315. ödisc3.5ò,&301A,icon_fgcol,
  316. 2.8
  317. icon_bgcol, icon_width%)
  318. 2.8
  319. 28600 DEFFNselect_floppy2
  320. 2.8
  321. 28610 =0
  322. 2.8
  323. 28620 DEFFNmenu_floppy2
  324. 2.8
  325. 28630 PROCsys_definetextmenu
  326. 2.8
  327. (öfloppy2ò,öfloppy :2ò,öFormatò)
  328. 2.8
  329. 28640 =0
  330. 2.8
  331. 28650 DEFFNaction_floppy2
  332. 2.8
  333. 28660 =FNfilehandler_open_dir
  334. 2.8
  335. (ö-adfs-:2ò,öFloppy :2ò,0)
  336. 2.8
  337. 28670 DEFFNmenuselect_floppy2
  338. 2.8
  339. 28680 CASEitem0% OF
  340. 2.8
  341. 28690 WHEN0: PROCfilehandler_
  342. 2.8
  343. formatfloppy(ö2ò)
  344. 2.8
  345. 28700 ENDCASE
  346. 2.8
  347. 28710 =0
  348. 2.8
  349. RUN
  350. 2.8
  351. When you wish to use the three floppy version of the desktop, instead of
  352. typing *DeskTop, enter */DeskTop, this will ensure that the upgrade
  353. program in the library directory is run instead of activating the
  354. desktop in the normal way.
  355. 2.8
  356. Unfortunately, there is no way of permanently updating the desktop so
  357. that you can power up into the desktop with three floppies since it is
  358. held in ROM which obviously cannot be changed.
  359. 2.8
  360. If you wish to power up in the desktop with three floppies then you
  361. could do the following:
  362. 2.8
  363. *Configure Boot
  364. 2.8
  365. *Configure Language 0
  366. 2.8
  367. and setup a !Boot file as follows:
  368. 2.8
  369. */Desktop
  370. 2.8
  371. ensure that when you switch the computer on, your boot disc is in drive
  372. 0 (or your default drive as configured with *Configure Drive) and the
  373. desk top will appear after a short delay.
  374. 2.8
  375. N.B. No damage will be caused to the disc in powering up with the disc
  376. in the drive since the latch will be across the disc surface and the
  377. disc heads not in contact with the disc surface.
  378. 2.8
  379. The other solution is to upgrade to RISC-OS which can support up to four
  380. floppies! Darren Jackson
  381. 2.8
  382. Å   Zarch Ö To put Zarch onto a hard disk, use....
  383. 2.8
  384. *UNPLUG SoundChannels
  385. 2.8
  386. *ZARCH
  387. 2.8
  388. When error occurs type the following,
  389. 2.8
  390. *RMREINIT SoundChannels
  391. 2.8
  392. *SAVE :4.ZARCHcopy 8000+20800
  393. 2.8
  394. *BUILD :4.ZARCHgo
  395. 2.8
  396. LOAD ZARCHcopy
  397. 2.8
  398. MEMORYA E1AC E1A0F00E
  399. 2.8
  400. CHANNELVOICE 1 6
  401. 2.8
  402. CHANNELVOICE 2 7
  403. 2.8
  404. CHANNELVOICE 3 8
  405. 2.8
  406. CHANNELVOICE 4 9
  407. 2.8
  408. GO 1FF30
  409. 2.8
  410. Then press <escape>. Type ZARCHgo to run the copy from hard disk. Tony
  411. Porter
  412. 2.8
  413.  
  414. 2.8
  415. First Word Plus Extended Dictionary
  416. 2.8
  417. I was asked to review the First Word Plus Extended Dictionary which is
  418. available from Science Frontiers. It seems unfair to review it in only
  419. one paragraph, but Paulæs maxim is, öSpace in Archive is at a premium,
  420. so say what is worth saying as briefly as possible, then shut up!ò
  421. (Well, thatæs the jist of what I say! Ed.)
  422. 2.8
  423. First Word Plus Extended Dictionary comprises an 80,000 word dictionary
  424. which replaces that in the Acorn package, and three specialized
  425. supplementary dictionaries covering computer terms, geographical
  426. locations and Christian names. It is an entirely competent package,
  427. though necessarily not the most fascinating in content. If you need more
  428. words in your dictionary, buy it, but if you need to work with large
  429. documents, do not load it, as bigger dictionaries do take up more space.
  430. 2.8
  431. FWP Extended Dictionary costs ú6.95 (ú6.50 from Archive) and is produced
  432. by Science Frontiers.
  433. 2.8
  434. From FWP to DTP?
  435. 2.8
  436. Although it is not strictly the business of the First Word Plus column,
  437. I took a good look at the Desktop Publishing program when visiting the
  438. Acorn stand at the Which Computer? Show. It should be available a few
  439. weeks after RISC-OS and is reported to be öfinishedò and about to go
  440. into production. However, it was apparently not the öfinishedò version
  441. at the show. My informant assures me that the production version will be
  442. even better, which should certainly be good indeed. Even the present
  443. version has a Ésecretæ feature which is quite impressive and even Apple
  444. cannot match it.
  445. 2.8
  446. <ctrlÖA> Solution?
  447. 2.8
  448. I have discovered why my ö<ctrl-a> makes a bleepò modules reported in
  449. Archive 2.5 p. 18 absolutely refused to work: the answer is on the top
  450. of page 34 of the Programmeræs Reference Manual: never use OS_WriteC
  451. routines when you have intercepted an interrupt. The solution (but donæt
  452. hold your breath) is to insert a <ctrl-g> into the input buffer. This
  453. works absolutely perfectly Ö except in FWP, where it is interpreted as a
  454. call to read the ruler!!
  455. 2.8
  456. No-one else has produced a solution which actually works, so the small
  457. prize is still unclaimed.
  458. 2.8
  459. Shareware disk N╝6
  460. 2.8
  461. We get a lot of enquiries about printer drivers. The problem is that we
  462. do not have that many different kinds of printer, so cannot help much.
  463. Besides, printer drivers are (however necessary and satisfactory a
  464. solution they may be) a pain and a bore, except when they are to drive
  465. the printer you use. I am trying to compile a disk of all the contrib
  466. uted ögoodiesò, especially printer drivers and related information and
  467. ideas. If you have a contribution, please let me have it in the next
  468. couple of weeks. We have printer drivers for: Taxan-Kaga KP810 = Canon
  469. PW 1080; Citizen 120; Epson LX800 and LQ500; Star LC10 and NL10;
  470. Panasonic KXP1080; H-P DeskJet. Quite a few of these have interesting
  471. variants and associated ideas which may be useful for doing the special
  472. things you want to do with your printer.
  473. 2.8
  474. Once the shareware disk is available, printer driver enquiries will be
  475. at the bottom of the pile!
  476. 2.8
  477. (Mike sent me a pre-release version of this which I published as
  478. Shareware N╝6, thinking it was the finished article. Ooops! We will
  479. continue to supply N╝6 as it is and then offer free up-grades when the
  480. final version is ready. Sorry about that! Ed.)
  481. 2.8
  482. Two related matters
  483. 2.8
  484. Å   If you get the monthly disk, you will probably have installed the
  485. IntModule from Steve Hoare (Archive 2.6, p. 44), and you will agree with
  486. me that it is quite the best thing that has happened to First Word Plus
  487. since its launch! I am sure that my life-expectancy has been increased
  488. by being able to access the ö*ò commands we all love (and hate). If you
  489. have not installed it, copy the IntModule to your 1st Word startup disk,
  490. then modify !boot by adding lines 23 and 26 as follows:
  491. 2.8
  492. 23 *rmrun IntModule
  493. 2.8
  494. 26 *Interrupt 15
  495. 2.8
  496. Now if you press <ctrl-o>, the screen goes bright blue and gives you a *
  497. prompt. Create your directories, mount disks or whatever, then just *
  498. <return> and you are back. Wonderful. If you do not get the disks, more
  499. fool you, this one was worth a yearæs subscription, but it will be on
  500. the proposed ösharewareò disk.
  501. 2.8
  502. Å   Just who do you think we are? Not very different from you is the
  503. answer, I guess. I suspect that most of the contributors to Archive are
  504. either people who enjoy computers as a hobby which can be useful, people
  505. who use computers as part of their work, but are not professionals in
  506. computing, or students or teachers of computing. I am actually a vet.
  507. who does human genetics and immunology research, approaching fifty, bald
  508. and paunchy! The point is, please do not expect too much from us/me. I
  509. actually took this column on when a broken collar-bone got in the way of
  510. decorating! Sadly, bones heal╔
  511. 2.8
  512. Two quickies
  513. 2.8
  514. Å   If you have more than one sprite in a file, FWP only loads the first
  515. sprite.
  516. 2.8
  517. Å   There is a funny bug in the spelling list : FABRICATION is flagged
  518. as wrong, but it appears when you browse. To add confusion, when you ask
  519. to guess, it comes up with faArication, which is unbrowsable!! Thanks to
  520. Colin Garlick. A review of letters received earlier reveals that the
  521. problem is more widespread than this: Kenneth Gardner rep-orts that the
  522. same (?) bug affects fable, fabric, -ate, -ated, -ation, fabulous, -ly,
  523. fab, haar, maar, nascelle, oaf, zag. Kenneth provides more data on
  524. making merged supplementary dictionaries, but the problem is obviously a
  525. bug. Over to you Acorn!
  526. 2.8
  527. FWP and RISC-OS╔
  528. 2.8
  529. The support disk which comes with RISC-OS has the necessary instructions
  530. for conversion and the files. It is in the Acorn directory.
  531. 2.8
  532. It may be easier to have Edit installed and the mode set to 0 before you
  533. start. Then you can have a decent RAMfs space for the copied files
  534. (assuming you do not have two drives). You can keep the instructions in
  535. sight this way.
  536. 2.8
  537. ╔and the IntModule
  538. 2.8
  539. It is all quite smooth, but if you want the splendid IntModule facility
  540. to give you access to the OS, it is a bit more complicated. Edit has no
  541. öloadò command. You load things by grabbing their icons and dropping
  542. them on the installed Edit icon. But it is not obvious how to get at the
  543. öObeyò files in the !1stWord+ directory from the desktop. The secret is
  544. to hold down shift while clicking on the !1stWord+ directory. You should
  545. be a bit careful about what you do, so make a backup before mucking
  546. about. Now edit it as follows:
  547. 2.8
  548. a)   (This is most important.) Rename the !Run file you got from the
  549. Support Disc as, e.g. !RunAcorn.
  550. 2.8
  551. b)   Insert tthree lines before that beginning örunò (next to last) (the
  552. third line is optional Ö it turns the caps lock off)
  553. 2.8
  554. rmload $.intmodule
  555. 2.8
  556. interrupt 15
  557. 2.8
  558. fx202,48 REM
  559. 2.8
  560. c)   Save as !Run
  561. 2.8
  562. d)   Check that the file type is obey. If not, get an OS prompt by
  563. pressing f12 on the desktop and öSetfiletype !run obeyò.
  564. 2.8
  565. e)   Remember to copy IntModule onto the disk in directory $.
  566. 2.8
  567. It should work, accessing the OS when <ctrl-O> is pressed, though I get
  568. a white border around the top and right after going to the OS but it
  569. seems to go away, though.
  570. 2.8
  571. I suspect there are a few missing twiddly bits about ensuring that the
  572. correct directory names are used, so I still have some reading to do.
  573. More next month!
  574. 2.8
  575. It also happens that you can edit obey files in FWP, and further, FWP is
  576. not squeemish about loading the öObeyò files from an application
  577. directory. If you do this you will certainly have to set the filetype.
  578. 2.8
  579. First Mail
  580. 2.8
  581. Here are a couple more tips on 1st Mail from Glyn Emery:
  582. 2.8
  583. Mail merging normally means sending the same, or very slightly differ
  584. ent, letters to a number of recipients. I recently had occasion to turn
  585. this process on its head and send several different letters to the same
  586. recipient; but I found 1st Mail up to the task. The occasion was that I
  587. had to write reports on a batch of candidates, which, for the conveni
  588. ence of his filing system, I prepared in the form of a batch of separate
  589. letters all addressed to the administrator involved. To print them I
  590. prepared a ömerge fromò file as follows:
  591. 2.8
  592. read text
  593. 2.8
  594. display ötext letter startedò
  595. 2.8
  596. includefile letterhead
  597. 2.8
  598. includefile dat.administrator
  599. 2.8
  600. Dear Mr Administrator
  601. 2.8
  602. includefile doc.text
  603. 2.8
  604. Yours sincerely
  605. 2.8
  606. display öletter finishedò
  607. 2.8
  608. repeat
  609. 2.8
  610. ötextò here is used as a 1st Mail keyword. The file öletterheadò
  611. incorporates the date. I put a hard page break just before the repeat
  612. command to make the sheet-feeder on my printer pick up the next piece of
  613. A4. The ödisplayò commands were put in during development and proved to
  614. be too confidence-giving to be deleted. The file dat.administrator is
  615. the administratoræs address.
  616. 2.8
  617. The reports, together with a covering letter were prepared as separate
  618. files; and a datafile was prepared listing the file names. This was
  619. saved in the dat. directory, not forgetting to switch off WP mode before
  620. saving it. If you donæt switch off WP mode the merge tends to öhangò. I
  621. donæt know why.
  622. 2.8
  623. The second point is that I have incorporated Steve Hoareæs IntModule
  624. (Archive 2,6 p44) into the libraries of my letter-writing discs.
  625. Unfortunately Steveæs suggestion to use <ctrl-@> does not quite work for
  626. me, because the ú key seems to return ASCII 0 in the First Word Plus
  627. context, presumably in order that different codes for ú can be included
  628. to satisfy different printers. Steve, being in America, probably had no
  629. occasion to notice this. What I did in the end was to include
  630. 2.8
  631. *RMLoad %.IntModule
  632. 2.8
  633. *Interrupt 205 1stMail
  634. 2.8
  635. into the startup program for First Word Plus, and
  636. 2.8
  637. *RMLoad %.IntModule
  638. 2.8
  639. *Interrupt 205 1stWord+
  640. 2.8
  641. into the startup program for 1stMail. I can then use the öinsertò key to
  642. toggle between the two, and save quite a lot of keystrokes in doing so.
  643. Notice that I had to use % in the RMLoad command but not in the
  644. Interrupt command because % appears in my Run$Path but not in my
  645. File$Path.
  646. 2.8
  647. An interesting application for FWP
  648. 2.8
  649. Dave Livsey
  650. 2.8
  651. Those of you who, like me, have to report on the progress of large
  652. numbers of individuals of various levels of ability (i.e. teachers!) and
  653. are the proud possessors of an Archimedes and First Word Plus now have
  654. the means to reduce the increasingly onerous task of reporting, imposed
  655. by the introduction of Érecords of achievementæ (ROA). (If you do not
  656. have First Word Plus, or something better, you deserve all the hard work
  657. you have to do!) Using First Word Plus, it is fairly easy to set up a
  658. ÉMail mergeæ which will print out the documents required for the ROA.
  659. 2.8
  660. The clue to doing this lies in the example mail-merge letter on the
  661. First Word Plus disk. As with most problems, there are probably many
  662. (or, at least, a few) different solutions Ö this is one. I hope it will
  663. help reduce your load as much as it has mine!
  664. 2.8
  665. In all that follows, the underlined words below are supposed to be in
  666. light type which I am unable to print in Elite type. The page numbers
  667. refer to the First Word Plus handbook.
  668. 2.8
  669. In outline, you will need to set up four files: a command file, a data
  670. file, a file containing the com-ment bank and the Émainæ file (which
  671. corresponds to the letter in the mail-merge example).
  672. 2.8
  673. The command file (called Écommandæ): This needs to contain the informa
  674. tion which indicates the location of the data file (see below), any
  675. individual input to the ROA document (Éinputæ typed in Élightæ type
  676. p.165 Ö 169 ) and a reference to the basic form as an Éincludefileæ
  677. statement. The WP mode can be left switched on when creating this file
  678. and saving it.
  679. 2.8
  680. The data file (Éformdataæ) must be created in the dat. directory and
  681. contains only the data you wish to be inserted into the final document
  682. as it is printed and is simply a list of names (firstname, secondname),
  683. sex (He/She), tutor group (or Form, or whatever cockeyed system your
  684. educational establishment has decided to inflict on you), date and any
  685. other required information. As pointed out in the handbook, each item of
  686. data must be separated from the next by a comma. There is also a problem
  687. of commas in an item of data but this is catered for by enclosing them,
  688. as explained on p.165. A specimen layout could be as shown :
  689. Fred,Bloggs,He,4Z,Nov 1988,Swahili
  690. 2.8
  691. Note that the data fields are comma separated fields and may include
  692. spaces (p.165). This file must be created in non-WP mode and the mode
  693. left switched off when saving; ignore the pop-up reminder which appears
  694. when you try to save the file.
  695. 2.8
  696. The comment bank file (ÉROAæ), obviously, contains all the comments
  697. which you may wish to make about any group of students. Each comment is
  698. prefixed by a suitable identifier e.g. K1. In order to be able to use
  699. these comments, each identifier must be set up as a keyword (p.163) by
  700. preceding it with Ésetvalæ in light type e.g.
  701. 2.8
  702. setval K1, öname1 is a complete idiot when it comes to practical work.
  703. sex is a complete liability as sex has 11 thumbs on two left hands.ò
  704. 2.8
  705. Note the <,> and the <ö>. I found that it was easier to type the comment
  706. with the WP mode switched on and then to switch the WP mode off and move
  707. all the text onto one line. The WP mode was then switched on again as
  708. the document does not print out correctly otherwise.
  709. 2.8
  710. The setval definition seems to need all the text on one line but as this
  711. can be 160 characters long, that is not too much of a problem. These
  712. definitions can also contain key words, in light type, for insertions
  713. from the data file into the final document. This is useful as it means
  714. that you can specify he or she along with the name in the data file.
  715. N.B. Changing the ruler turns off the Élightæ type causing the defini
  716. tions and insertions to be ignored in the final print-out.
  717. 2.8
  718. The final file (called Éformæ); the document you are going to print,
  719. contains very little other than keywords spaced out as is appropriate
  720. for your ROA. The first line must be a read statement which, being a
  721. keyword is in light type. Following this is a list of fields in ordinary
  722. type and in the same order as in the data file. The rest of the file is
  723. mainly spaces preceded by a keyword placed where you want your printing
  724. to be done. Eg.
  725. 2.8
  726. read name1,name2,sex,date,tutor, subject (reads from Éformdataæ)
  727. 2.8
  728. name1, name2 tutor subject date
  729. 2.8
  730. includefile ROA (this reads in the comment bank)
  731. 2.8
  732. name1 K1 (prints öFred is an idiot .....ò)
  733. 2.8
  734. sex C3 (prints in the comment on comprehension)
  735. 2.8
  736. sex I1 (prints in the comment on intelligence) etc.
  737. 2.8
  738. This file will, of course, need the WP mode swit-ched on in order to
  739. retain all the formatting infor-mation which is necessary for the
  740. automatic form-atter to work when insertions are made in the text.
  741. 2.8
  742. The ROA is printed out by clicking on Éformæ and Éformdataæ (from the
  743. doc. directory) using the mail-merge facility on the First Word Plus
  744. disc. Full details of this are given in the Handbook.
  745. 2.8
  746. Font Fiddling on First Word Plus
  747. 2.8
  748. Reg Dalton (& Steve Bass)
  749. 2.8
  750. Reg tells us the saga of creating character sets for First Word Plus and
  751. his NEC P2200. A sample printout is shown opposite, and the programs and
  752. printer drivers are on the program disc and downloadable from Eureka II.
  753. 2.8
  754. In an earlier edition of Archive (1.12 p 7) was printed a short routine
  755. to convert the extra fonts, supplied on the Master Welcome disc, from
  756. BBC to Archimedes format. On the face of it, this looked as if it would
  757. be a useful little routine but there was a problem; only half of the
  758. character set was defined. i.e. characters 32 to 126. My friend Steve,
  759. in his wisdom, decided that one of the fonts (7by8) looked very good
  760. with First Word Plus and decided to redefine the rest of the characters
  761. to match the ones already done.
  762. 2.8
  763. The next step in the story was when I foolishly mentioned that it would
  764. be quite simple to set up First Word Plus to utilise the IBM graphics
  765. available in one of the alternative character sets within the printer we
  766. both had (NEC P2200). We then decided that redesigning the fonts using
  767. the Master was not the way to do this, mainly because the fonts would
  768. then have to be converted to Archimedes, so we converted the CHARDES
  769. program, which was mainly in BASIC, to a form that would save fonts in
  770. the correct format and also run with the Archimedes mouse.
  771. 2.8
  772. The problem of modifying the program to work on the Archimedes was not
  773. too difficult by even an amateur programmeræs standards but to make it
  774. save the font in its correct form for the Archimedes proved more
  775. problematical. A number of abortive attempts were made to rewrite the
  776. save font routine but each time nothing was achieved except making the
  777. computeræs character set look like hieroglyphics. Eventually, it all
  778. fell into place and we had a working program.
  779. 2.8
  780. We then decided that a program for transposing characters within the
  781. character set itself might not be a bad idea. This was written fairly
  782. speedily, but then the next task was to create the printer driver for
  783. First Word Plus. This marathon is usually achieved by modifying an
  784. existing wordprocessor/printer driver file, which involves changing the
  785. relevant values for the various functions listed within the file, e.g.
  786. superscript, subscript, nlq etc. After this fairly simple part comes the
  787. task of entering all the codes to achieve the extra characters which
  788. cannot enter from the keyboard. For characters 32 to 127 this was
  789. obviously quite simple as all that was needed in this instance was each
  790. characteræs number, but it was soon noticed by both of us that the
  791. characters between &80 and &9F (decimal 128 to 159) were not defined by
  792. the existing list. After an abortive attempt to define these characters,
  793. and failing to get them to install, it was decided that we would have to
  794. discard 32 (yes a whole 32) of the characters so lovingly designed by
  795. Steve.
  796. 2.8
  797. Notes on the font fiddling programs
  798. 2.8
  799. (These refer to programs on the monthly disc.)
  800. 2.8
  801. 1   !BOOT is the program for interchanging the position of the
  802. characters.
  803. 2.8
  804. 2   After running the above program, the Acorn Character Designer
  805. Program (modified for use on the Archimedes), Chardes_C, can be entered
  806. and 1 above repeated as many times as necessary.
  807. 2.8
  808. 3   The modified Printer driver for 1WP is in the CFG directory.
  809. 2.8
  810. 4   The modified Printer driver hex file for 1wp is in the HEX
  811. directory.
  812. 2.8
  813. 5   Before booting the disc, the font style to be modified must first be
  814. loaded e.g. by using *NEC_Afont.
  815. 2.8
  816.