home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1995 / ARCHIVE95.iso / text / hints / volume_01 / issue_04 < prev    next >
Text File  |  1995-02-16  |  9KB  |  232 lines

  1. Å   Having asked last time about function keys 14 and 15, it seems that
  2. they are only available when the cursor editing is switched off by doing
  3. a *FX4,2 after which, cursor right, down and up give definitions 13, 14
  4. and 15. (Remember that 13 is normally available on the insert key
  5. anyway.)
  6. 1.4
  7. Å   Word-Perfect does not work under the PC-Emulator at present. This is
  8. due to a bug in the emulator which is being fixed Ö a new version will
  9. be available öshortlyò.
  10. 1.4
  11. Å   If you want to read the mouse when using the 6502-emulator, this can
  12. be done in BASIC IV by using ADVAL 7 and 8 to return the X and Y co-
  13. ordinates respectively. 6502 machine code programs can be modified to
  14. use OS_Byte 128 with X=7 to give the X value and X=8 to give the Y
  15. value. The co-ordinates are returned in the X and Y registers, X being
  16. the low byte and y the high byte.
  17. 1.4
  18. If you want to read the mouse buttons from BASIC IV, use INKEY(-n) where
  19. n=10, 11 and 12 for select, menu and adjust respectively and in machine
  20. code use OS_Byte 129 with X containing the -n number (&F6, &F5 and &F4)
  21. and Y containing &FF.
  22. 1.4
  23. Å   Users of the Acorn colour monitors may not have realised that there
  24. is a switch inside the control panel at the front of the monitor which
  25. switches off all but the green gun. Depressing this switch makes the
  26. display slightly easier to read, especially if you are trying to use a
  27. 132 column mode.
  28. 1.4
  29. Å   Setting the ö*TIMEò format Ö The output format used by *TIME can be
  30. changed via a É*SET Sys$DateFormatæ command. The following is a list of
  31. the valid parameters and the result they will return:
  32. 1.4
  33. %am   Display Éamæ or Épmæ depending on the time.
  34. 1.4
  35. %pm   Display Éamæ or Épmæ depending on the time.
  36. 1.4
  37. %ce   Current century
  38. 1.4
  39. %cs   (Centiseconds) Hundredths of a second
  40. 1.4
  41. %dn   Day number (001 = 1st January)
  42. 1.4
  43. %dy   Day of the month
  44. 1.4
  45. %mi   Minutes
  46. 1.4
  47. %mn   Month number
  48. 1.4
  49. %mo   Current month (e.g. ÉJanuaryæ)
  50. 1.4
  51. %m3   Current month abbreviated to 3 characters (e.g. ÉJanæ)
  52. 1.4
  53. %se   Seconds
  54. 1.4
  55. %st   Day of the month trailer (i.e. Éstæ, Éndæ, Érdæ or Éthæ)
  56. 1.4
  57. %we   Weekday (e.g. ÉWednesdayæ)
  58. 1.4
  59. %w3   Weekday abbreviated to 3 characters (e.g. ÉWedæ)
  60. 1.4
  61. %wk   Week number (since start of year)
  62. 1.4
  63. %wn   Weekday number (1 = Sunday, 7 = Saturday)
  64. 1.4
  65. %yr   Current year (e.g. 87)
  66. 1.4
  67. %12   Hours on 12 hour clock
  68. 1.4
  69. %24   Hours on 24 hour clock
  70. 1.4
  71. Note that changing the format does not affect the TIME$ format as used
  72. in BASIC V.
  73. 1.4
  74. The default setting, which is: %w3,%dy %m3 %ce%yr.%24:%mi:%se, can be
  75. seen by typing *SHOW S*.
  76. 1.4
  77. If the date or the year is changed, the day of the week is automatically
  78. recalculated, so no errors occur. (See competition results on page 46.)
  79. 1.4
  80. Other characters may also be inserted into the definition of the *TIME
  81. format. For example,
  82. 1.4
  83. *SET Sys$DateFormat %we, %dy%st %mo, %ce%yr. Time: %24:%mi [%se seconds]
  84. 1.4
  85. will produce output in the form: öMonday, 07th December, 1987. Time:
  86. 12:07 [45 seconds]ò.
  87. 1.4
  88. If you want to strip off the leading zero on the %dy output, use %zdy%st
  89. which will produce ö7th Decemberò. If you want, for some reason to have
  90. the character É%æ as part of the format, use ö%%ò.
  91. 1.4
  92. If you want to split the string into several zero-terminated strings,
  93. you can use É%0æ which will insert a zero byte into the string.
  94. 1.4
  95. New time formats in BASIC Ö If all you want to do is print out the value
  96. of time within a BASIC program you can simply use the star command *TIME
  97. as a line within the program. If however you want to pick up the time as
  98. an actual string, you need to use the following function:
  99. 1.4
  100. DEF FNnewtime
  101. 1.4
  102. LOCAL Workarea, Time$
  103. 1.4
  104. DIM Workarea 256
  105. 1.4
  106. ?Workarea = 3
  107. 1.4
  108. SYS öOS_Wordò,14,Workarea,256
  109. 1.4
  110. SYS öOS_ConvertStandardDateAnd Timeò,Workarea,Workarea,256 TO Time$
  111. 1.4
  112. =Time$
  113. 1.4
  114. Help!!! The format which the system uses to record time and date is a 40
  115. bit number (as used to store the datestamp of a file) but we have not as
  116. yet found a system routine to convert any date into this format. Has
  117. anyone found such a routine or written anything of the sort?
  118. 1.4
  119. Å   Break/escape effects Ö To control the effects of <escape> and
  120. <break> with various combinations of <ctrl> and <shift>, you can use
  121. *FX247,n where n is a binary number whose eight bits control the various
  122. effects as follows:
  123. 1.4
  124. Bits 7 and 6 control action of <shift-ctrl-break>
  125. 1.4
  126.    7   6
  127. 1.4
  128.    0   0   Ö   öNormal actionò (= hard reset + boot drive 0)
  129. 1.4
  130.    0   1   Ö   Acts like <escape>
  131. 1.4
  132.    1   0   Ö   Disables <shift-ctrl-break>
  133. 1.4
  134. Bits 5 and 4 control action of <ctrl-break>
  135. 1.4
  136.    5   4
  137. 1.4
  138.    0   0   Ö   Hard reset
  139. 1.4
  140.    0   1   Ö   Acts like <escape>
  141. 1.4
  142.    1   0   Ö   Disables <ctrl-break>
  143. 1.4
  144. Bits 3 and 2 control action of <shift-break>
  145. 1.4
  146.    0   0   Ö   Boots disc in drive 0
  147. 1.4
  148.    0   1   Ö   Acts like <escape>
  149. 1.4
  150.    1   0   Ö   Disables <shift-break>
  151. 1.4
  152. Bits 1 and 0 control action of <break>
  153. 1.4
  154.    0   0   Ö   Soft reset
  155. 1.4
  156.    0   1   Ö   Acts like <escape>
  157. 1.4
  158.    1   0   Ö   Disables <break>
  159. 1.4
  160. The default setting (on 0.20 OS) seems to be *FX247,1 so that all works
  161. öas normalò except that the break key has been turned into another
  162. escape key. Typing *FX247,0 or just *FX247 turns the break key into the
  163. old öproperò break key that BBC owners will remember, i.e. it does a
  164. soft reset, as does the reset button on the back of the keyboard.
  165. 1.4
  166. Å   When you re-load a picture created by the ARM-Paint program, you
  167. sometimes find that certain of the colours are flashing. To avoid this,
  168. add a line to the PAINTING program:
  169. 1.4
  170. 18165 *FX9
  171. 1.4
  172. which should fix the problem. It actually flashes while the picture is
  173. being loaded but then the flashing stops when this line is executed.
  174. 1.4
  175. Å   Long printer cables. Those of you who have been using very long
  176. printer cables on the BBC micro will find that the Archimedesæ printer
  177. output has not got sufficient drive to cope with more than about 2
  178. metres of cable. The only way to get round this would be to use a
  179. printer buffer that had a higher output drive capability.
  180. 1.4
  181. Å   For an interesting sound effect (on 0.30 Arthur), type in
  182. ö*Configure Sounddefault 1 7 7ò followed by <ctrl-break>. This alters
  183. the bell sound as produced by VDU7. To return to normal, set Soundde
  184. fault 1 7 1.
  185. 1.4
  186. Å   For those who still havenæt got a word-processor (you did fill in
  187. your registration form, didnæt you?!?) and are wanting to use the BASIC
  188. editor as a wordprocessor, type *KEY0 L.O8||ML.||B||M||A||?||A||?||C and
  189. you will find that the Éprintæ key lives up to its name.
  190. 1.4
  191. Å   ROMs that work under the emulator. The second processor version of
  192. ISO Pascal (files Dpascal and Dcomp on the disc that comes with the two-
  193. ROM set) works fine under the emulator though the compilation time is a
  194. little slower than on the Beeb.
  195. 1.4
  196. Anyone who has the EDIT software from the BBC Master can transfer it to
  197. the Archimedes and it seems to work OK. There appears to be a strange
  198. message when the software is called and if the function key help screen
  199. is selected, it looks a bit peculiar. If you only want to process small
  200. amounts of text (about 30k) then use EDIT Ö itæs much cheaper than
  201. buying TWIN for ú30.
  202. 1.4
  203. Å   The default values of the parameters in the HardcopyFX module are
  204. 0,1,1,0,1 which gives, in order, landscape (i.e. sideways Ö to get
  205. portrait, use 1), X and Y scale factors of 1 (no limit, it seems, but
  206. you canæt use fractions), the margin which is measured in 1/72 nds of an
  207. inch with a maximum of 576 and finally the threshold (the colour number
  208. which determines whether a dot is printed or not, I presume) which can
  209. take values up to 255. There is a clever öPrinter Time Outò error built
  210. into the code in case the printer is not connected.
  211. 1.4
  212. Å   Switching off the desktop on Arthur 1.2.
  213. 1.4
  214. If, having changed from operating system 0.2 to 1.2, you donæt like
  215. going into the desktop every time you switch on, you can *CONFIGURE
  216. Language 4 and <ctrl-break> and you will be brought into BASIC instead.
  217. The desktop can then be called up with *DESKTOP at any time. If you
  218. decide to go back to initialising into the desktop, *CONFIGURE Language
  219. 3 should do the trick.
  220. 1.4
  221. Do keep the hints & tips coming. They are one of the most useful parts
  222. of the magazine Ö do you agree? We could do with more feedback about
  223. what you like and what you donæt.
  224. 1.4
  225. The trouble is that you remember that you read something but cannot
  226. remember in which issue or on which page so weære hoping to do a full
  227. Archive index Ö anyone like to start it off for us? Would you like just
  228. a paper index or one on database? Let me know what you think.
  229. 1.4
  230. Watch out too for a binder for your Archive magazine. More details next
  231. month.
  232.