home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1997
/
ARCHIVE_97.iso
/
text
/
hints
/
vol_01
/
issue_04
< prev
next >
Wrap
Text File
|
1995-02-16
|
9KB
|
232 lines
Å Having asked last time about function keys 14 and 15, it seems that
they are only available when the cursor editing is switched off by doing
a *FX4,2 after which, cursor right, down and up give definitions 13, 14
and 15. (Remember that 13 is normally available on the insert key
anyway.)
1.4
Å Word-Perfect does not work under the PC-Emulator at present. This is
due to a bug in the emulator which is being fixed Ö a new version will
be available öshortlyò.
1.4
Å If you want to read the mouse when using the 6502-emulator, this can
be done in BASIC IV by using ADVAL 7 and 8 to return the X and Y co-
ordinates respectively. 6502 machine code programs can be modified to
use OS_Byte 128 with X=7 to give the X value and X=8 to give the Y
value. The co-ordinates are returned in the X and Y registers, X being
the low byte and y the high byte.
1.4
If you want to read the mouse buttons from BASIC IV, use INKEY(-n) where
n=10, 11 and 12 for select, menu and adjust respectively and in machine
code use OS_Byte 129 with X containing the -n number (&F6, &F5 and &F4)
and Y containing &FF.
1.4
Å Users of the Acorn colour monitors may not have realised that there
is a switch inside the control panel at the front of the monitor which
switches off all but the green gun. Depressing this switch makes the
display slightly easier to read, especially if you are trying to use a
132 column mode.
1.4
Å Setting the ö*TIMEò format Ö The output format used by *TIME can be
changed via a É*SET Sys$DateFormatæ command. The following is a list of
the valid parameters and the result they will return:
1.4
%am Display Éamæ or Épmæ depending on the time.
1.4
%pm Display Éamæ or Épmæ depending on the time.
1.4
%ce Current century
1.4
%cs (Centiseconds) Hundredths of a second
1.4
%dn Day number (001 = 1st January)
1.4
%dy Day of the month
1.4
%mi Minutes
1.4
%mn Month number
1.4
%mo Current month (e.g. ÉJanuaryæ)
1.4
%m3 Current month abbreviated to 3 characters (e.g. ÉJanæ)
1.4
%se Seconds
1.4
%st Day of the month trailer (i.e. Éstæ, Éndæ, Érdæ or Éthæ)
1.4
%we Weekday (e.g. ÉWednesdayæ)
1.4
%w3 Weekday abbreviated to 3 characters (e.g. ÉWedæ)
1.4
%wk Week number (since start of year)
1.4
%wn Weekday number (1 = Sunday, 7 = Saturday)
1.4
%yr Current year (e.g. 87)
1.4
%12 Hours on 12 hour clock
1.4
%24 Hours on 24 hour clock
1.4
Note that changing the format does not affect the TIME$ format as used
in BASIC V.
1.4
The default setting, which is: %w3,%dy %m3 %ce%yr.%24:%mi:%se, can be
seen by typing *SHOW S*.
1.4
If the date or the year is changed, the day of the week is automatically
recalculated, so no errors occur. (See competition results on page 46.)
1.4
Other characters may also be inserted into the definition of the *TIME
format. For example,
1.4
*SET Sys$DateFormat %we, %dy%st %mo, %ce%yr. Time: %24:%mi [%se seconds]
1.4
will produce output in the form: öMonday, 07th December, 1987. Time:
12:07 [45 seconds]ò.
1.4
If you want to strip off the leading zero on the %dy output, use %zdy%st
which will produce ö7th Decemberò. If you want, for some reason to have
the character É%æ as part of the format, use ö%%ò.
1.4
If you want to split the string into several zero-terminated strings,
you can use É%0æ which will insert a zero byte into the string.
1.4
New time formats in BASIC Ö If all you want to do is print out the value
of time within a BASIC program you can simply use the star command *TIME
as a line within the program. If however you want to pick up the time as
an actual string, you need to use the following function:
1.4
DEF FNnewtime
1.4
LOCAL Workarea, Time$
1.4
DIM Workarea 256
1.4
?Workarea = 3
1.4
SYS öOS_Wordò,14,Workarea,256
1.4
SYS öOS_ConvertStandardDateAnd Timeò,Workarea,Workarea,256 TO Time$
1.4
=Time$
1.4
Help!!! The format which the system uses to record time and date is a 40
bit number (as used to store the datestamp of a file) but we have not as
yet found a system routine to convert any date into this format. Has
anyone found such a routine or written anything of the sort?
1.4
Å Break/escape effects Ö To control the effects of <escape> and
<break> with various combinations of <ctrl> and <shift>, you can use
*FX247,n where n is a binary number whose eight bits control the various
effects as follows:
1.4
Bits 7 and 6 control action of <shift-ctrl-break>
1.4
7 6
1.4
0 0 Ö öNormal actionò (= hard reset + boot drive 0)
1.4
0 1 Ö Acts like <escape>
1.4
1 0 Ö Disables <shift-ctrl-break>
1.4
Bits 5 and 4 control action of <ctrl-break>
1.4
5 4
1.4
0 0 Ö Hard reset
1.4
0 1 Ö Acts like <escape>
1.4
1 0 Ö Disables <ctrl-break>
1.4
Bits 3 and 2 control action of <shift-break>
1.4
0 0 Ö Boots disc in drive 0
1.4
0 1 Ö Acts like <escape>
1.4
1 0 Ö Disables <shift-break>
1.4
Bits 1 and 0 control action of <break>
1.4
0 0 Ö Soft reset
1.4
0 1 Ö Acts like <escape>
1.4
1 0 Ö Disables <break>
1.4
The default setting (on 0.20 OS) seems to be *FX247,1 so that all works
öas normalò except that the break key has been turned into another
escape key. Typing *FX247,0 or just *FX247 turns the break key into the
old öproperò break key that BBC owners will remember, i.e. it does a
soft reset, as does the reset button on the back of the keyboard.
1.4
Å When you re-load a picture created by the ARM-Paint program, you
sometimes find that certain of the colours are flashing. To avoid this,
add a line to the PAINTING program:
1.4
18165 *FX9
1.4
which should fix the problem. It actually flashes while the picture is
being loaded but then the flashing stops when this line is executed.
1.4
Å Long printer cables. Those of you who have been using very long
printer cables on the BBC micro will find that the Archimedesæ printer
output has not got sufficient drive to cope with more than about 2
metres of cable. The only way to get round this would be to use a
printer buffer that had a higher output drive capability.
1.4
Å For an interesting sound effect (on 0.30 Arthur), type in
ö*Configure Sounddefault 1 7 7ò followed by <ctrl-break>. This alters
the bell sound as produced by VDU7. To return to normal, set Soundde
fault 1 7 1.
1.4
Å For those who still havenæt got a word-processor (you did fill in
your registration form, didnæt you?!?) and are wanting to use the BASIC
editor as a wordprocessor, type *KEY0 L.O8||ML.||B||M||A||?||A||?||C and
you will find that the Éprintæ key lives up to its name.
1.4
Å ROMs that work under the emulator. The second processor version of
ISO Pascal (files Dpascal and Dcomp on the disc that comes with the two-
ROM set) works fine under the emulator though the compilation time is a
little slower than on the Beeb.
1.4
Anyone who has the EDIT software from the BBC Master can transfer it to
the Archimedes and it seems to work OK. There appears to be a strange
message when the software is called and if the function key help screen
is selected, it looks a bit peculiar. If you only want to process small
amounts of text (about 30k) then use EDIT Ö itæs much cheaper than
buying TWIN for ú30.
1.4
Å The default values of the parameters in the HardcopyFX module are
0,1,1,0,1 which gives, in order, landscape (i.e. sideways Ö to get
portrait, use 1), X and Y scale factors of 1 (no limit, it seems, but
you canæt use fractions), the margin which is measured in 1/72 nds of an
inch with a maximum of 576 and finally the threshold (the colour number
which determines whether a dot is printed or not, I presume) which can
take values up to 255. There is a clever öPrinter Time Outò error built
into the code in case the printer is not connected.
1.4
Å Switching off the desktop on Arthur 1.2.
1.4
If, having changed from operating system 0.2 to 1.2, you donæt like
going into the desktop every time you switch on, you can *CONFIGURE
Language 4 and <ctrl-break> and you will be brought into BASIC instead.
The desktop can then be called up with *DESKTOP at any time. If you
decide to go back to initialising into the desktop, *CONFIGURE Language
3 should do the trick.
1.4
Do keep the hints & tips coming. They are one of the most useful parts
of the magazine Ö do you agree? We could do with more feedback about
what you like and what you donæt.
1.4
The trouble is that you remember that you read something but cannot
remember in which issue or on which page so weære hoping to do a full
Archive index Ö anyone like to start it off for us? Would you like just
a paper index or one on database? Let me know what you think.
1.4
Watch out too for a binder for your Archive magazine. More details next
month.