home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1996
/
ARCHIVE_96.iso
/
text
/
hints
/
volume_1
< prev
next >
Wrap
Text File
|
1995-06-25
|
140KB
|
3,630 lines
Hints and Tips
1.1
Using Electrohome Monitors
1.1
Ian Nicholls of Kidderminster says that the öElectrohomeò colour
monitor, as sold by Opus, works OK on the Archimedes. All you have to do
is make up the appropriate connector. (Or purchase one from CJE Micros
or somesuch.) The pin connections for the Archimedes are given on the
inside back cover.
1.1
Using Modes 18 - 20
1.1
Whilst on the subject of monitors, let me clear up the confusion there
seems to be in the computer press about the high resolution modes and
the extra video hardware which the 400 series machines are said to have.
This extra hardware is NOT for driving modes 18 - 20. Even on the 300
series, there is all the hardware needed to run these modes on a multi-
sync monitor.
1.1
The extra hardware in the 400 series is actually for even higher
resolution graphics Ö it will go up to 1280 by 976 pixels in monochrome
(160 characters by 122 lines of text) and, as with modes 18 - 20, it
requires a special monitor. There is no industry standard for such
monitors, and Acorn are still looking into providing a suitable monitor
with their own badge on it. This extra high resolution is of course
aimed at the CAD (computer aided design) market, and it is said that
AutoCAD is being translated onto the Archimedes.
1.1
Using a Multi-sync Monitor
1.1
If you have a multi-sync monitor and want to get it working on the 300
series, all you need to do is to switch the computer on whilst holding
down the <R> key. This resets the CMOS RAM settings (so if, like me, you
had changed them, you will have to re-configure again!) and it changes
the configuration of the RGB output to run in multi-sync mode. It then
allows you to access the extra screen modes that had been previously
forbidden to those of us who only have standard monitors. If you should
want to change the machine back again to run a standard monitor, you
have to do another <R-power-up> which switches it back again (and re-
sets the CMOS RAM settings AGAIN!). In other words each time you do an
<R-power-up> it toggles between the two monitor settings.
1.1
Using View
1.1
Gerald Jones of Northampton tells us that only those of you who have
gone from a Master Compact to an Archimedes will be able to get View
going Ö for the time being, at least, because the ROM versions of VIEW
will not work under the emulator. If you do have a disc version of View,
Acorn tell us that the way to get it going is to copy 65ARTHUR from the
MODULES directory on the Archimedes Welcome disc onto another disc and
VIEW from the Compact Welcome disc and then use *BUILD !BOOT to create
a boot file which consists of:
1.1
*65ARTHUR
1.1
*GO F800
1.1
*LOAD VIEW 8000
1.1
*GO 8000
1.1
and then remember to type *OPT 4,3 to set it up so that it will execute
the boot file on <shift-break>. All you have to do then is to chop up
your VIEW keystrip and stick it together in the Archimedes keyboard
format remembering that the f0 key functions are now on the <print> key!
1.1
Attaching a 5.25ö drive
1.1
Have you tried to get a 5.25ö disc drive linked up to the Archimedes?
Presumably, you did the obvious thing and removed the cable from the
p.c.b. to the 3.5ò drive and plugged in the cable from the 5.25ö drive.
And you too found that it didnæt work! Well, the official answer is that
it is possible to connect a 5.25ò drive but that there are ödifferent
connectionsò. Actually, it seems that the only difference is that they
have put the connector in the opposite way round!
1.1
Unfortunately, you canæt just turn the connector round because of the
location lug on the side of it. The solution is either to file the notch
off the side of the connector so that it will go in either way round, or
buy a new 34-way insulation displacement connector which you can crimp
onto the end of your disc cable, the opposite way round from the
existing one, or buy a disc extension cable from a supplier such as CJE
Micros (ú15 + ú1 p&p Ö address in Fact-File at the back of the
magazine). The advantage of doing it that way is that the extension
cable is long enough to stick out at the back of the computer through
the podule connection slot so that you can connect and disconnect the
extra drive without taking the lid on and off.
1.1
You can, if you want, put a single 5.25ö drive as drive 1 or a pair of
drives as drives 1 and 2. The extra drives must, of course, have their
own power supply units and you need to type *CONFIGURE FLOPPIES 2 (or 3)
so that the ADFS knows how many drives there are. You will also need to
get inside the 5.25ò drives in order to change the link settings to
configure them as drives 1 (and 2) and you should also, theoretically,
remove the terminating resistors Ö usually a set of resistors (dual-in-
line or single-in-line) near the drive-select setting links. This is
because there are already terminating resistors in the internal 3.5ö
drive and you should not have two sets. If you have a dual drive where
they are on top of one another rather than side by side, you may find it
difficult to get at the second drive in order to change the link
selection. If so, the easiest solution is to make the top drive 2 and
just remember that the lower drive is drive 1.
1.1
One problem you may still find (which Acorn havenæt yet managed to
explain) is that if you switch on the power to the disc drive before or
at the same time as the computer, the computer seems unable to start up
Ö you just get a blank screen. All you have to do though is to make sure
you switch the computer on first and then the disc drive. You will also
find that the desk-top program does not recognise the third drive Ö even
if you have typed *CONFIGURE FLOPPIES 3, it only displays two disc icons
on the screen. (If anyone works out how to modify the program to
recognise all three, let me know.)
1.1
ADFS bugs
1.1
There are one or two bugs in the ADFS, though they are apparently
reasonably obscure. The only one I have found myself is that if you try
to *BUILD a !BOOT file onto a disc that already has a !BOOT file and you
have left the disc write-protected, when you press <escape>, the system
hangs up and you have to press <ctrl-break> or reset to escape. Some of
the bugs have been corrected on the 0.03 version of the ADFS that you
will find in the MODULES directory on your Welcome disc. This version
will have to be *RMLOADæed, then to check that you have got the right
version installed, type *HELP MODULES which gives you the current
version numbers of all modules. It should say ADFS 0.03 (17 Jun 1987)
instead of ADFS 0.02 (05 Jun 1987). Incidentally, the file name on the
Welcome disc is Adfs0-03, not Adfs0_03 as you might tend to expect, so
if you get a file not found error, check that you have typed it
correctly.
1.1
Have you discovered╔?
1.1
Iæd like this to be a regular feature. It consists of the sort of things
that may be obvious to some people, but perhaps that youæve noticed from
reading the User Guide (or the Programmersæ Reference Manual when it
becomes available). If you find something that you thought, öWell, I
didnæt realise that!æ, let us know. Iæll start it off this month with
things that were new to me.
1.1
Å The pad character ö|ò which is the shifted back-slash character (the
key just above the return key) can be used to öpadò out those incredibly
long VDU codes that end with lots of zeros. For example, to switch off
the cursor, you can use VDU23,1,0,0,0,0,0,0,0,0,0 which can admittedly
be shortened to VDU23,1,0;0;0;0; can now be reduced to VDU23,1| which
has the extra advantage that you donæt have to try to remember exactly
how many zeros it needs to complete the command.
1.1
Å Instead of saying value=value+extra, you can use the new operator
ö+=ò and say value+=extra which is a significant saving if, like me, you
tend to use long variable names; likewise with Ö=extra. (Well with
ö604412 bytes remainingò, it may not be worth worrying about memory
space, but it does save on printer ribbons!)
1.1
Å DANGER! Å BEWARE! Å WARNING!!!!!
1.1
Newcomers to ADFS beware! If you have been using *WIPE * and looking
through and saying öyesò or önoò to each, Donæt try it on ADFS! You will
find that *WIPE * deletes ALL the un-locked files in the current
directory. Itæs like *DESTROY * but without even displaying a list of
all the files it was about to delete and asking for confirmation. I
discovered this Énastyæ the hard way Ö I lost about 10 programs at a
stroke.It wasnæt too bad though as I had copied them across from DFS and
only modified one or two.
1.1
What you should say is *WIPE * C where the C stands for öConfirmò Ö then
it asks you about each file in turn. Ö You have been warned!!!!
Hints and Tips
RGB Connector
Hugh Nolan, of Old Roan, Liverpool, writes, öThe pinout for the RGB
connector on page 18 of Archive 1.1 indicates that it follows that of an
IBM PGA rather than the more common EGA standard. If anybody has a
monitor supplied with a lead for use with an EGA and wishes to build a
new cable they should note that the EGA pinouts are as follows:
1.2
1.2
1 Ground 6 Secondary Green/Intensity
1.2
2 Secondary Red
1.2
3 Red 7 Secondary Blue/Mono
1.2
4 Green 8 Horizontal Retrace
1.2
5 Blue 9 Vertical Retrace
1.2
I am currently using such a monitor with my BBC model B and the
connections are fairly straightforward except that the BBCæs connector
does not have separate vertical and horizontal syncs, so I have wired
the composite sync to pin 9 (Vertical Retrace) of the monitor.ò
1.2
Using a multi-sync monitor
1.2
A much easier way to change to a multi-sync monitor is to use:
1.2
*CONFIGURE MONITORTYPE 1 and
1.2
*CONFIGURE MONITORTYPE 0 to switch back to the normal monitor.
1.2
Epson screen-dumps
1.2
No doubt you have discovered the modules called HardCopyFX, MX and RX,
and you too have discovered that they donæt work! Gerrald Fitton has the
answer for us. His bug-fix has been passed on to Acorn who are also
circulating it. The recipe is as follows:
1.2
*LOAD Modules.HardCopyFX 10000 (thatæs four noughts - beware of using
three!)
1.2
!&104E0=&E59C1020
1.2
!&104E4=&E20100FF
1.2
(now replace the disc for the one onto which you want to put the hard-
copy module)
1.2
*SAVE HardCopyFX 10000 + 700
1.2
*SETTYPE HardCopyFX &FFA
1.2
*STAMP HardCopyFX
1.2
To use the module, *RMLOAD HardCopyFX (or just *HardCopyFX will do) and
then call it with *HardCopyFX plus various parameters Ö *HELP HardCopyFX
will show you what all the parameters are. Has anyone been experiment
ing with it? What do all the parameters mean and what are their ranges?
(Landscape, XScale, YScale, Margin and Threshold)
1.2
Avoiding constant use of *MOUNT
1.2
If you, like me, have a number of different discs and you canæt remember
what is on which, you will probably be fed up of having to type *MOUNT
each time you change the disc before you can get a catalogue. Try
*CONFIGURE NODIR and <ctrl-break> and you will find that as long as you
havenæt gone down to lower directories, you can just change the disc and
do a *CAT (or *. works as on the BBC micro) and it will re-catalogue the
disc in the drive. For more details, see James Lynnæs article about
*CONFIGURE.
1.2
File copying problems
1.2
There are one or two problems with the *COPY command under the 0.2 and
0.3 operating systems but, not being used to using ADFS myself, I am
never sure when it is a bug and when it is me being stupid. One thing
you will find though is that when doing a *COPY from disc to disc using
a single drive, it seems to hang up when it should be saying öEnter
source disc and press the space barò but donæt panic, itæs probably
still OK and itæs just that the prompt has not been printed. Replace the
disc you were expecting to put in next and press <space> and I think you
will find that it carries on OK. If you havenæt discovered how to do
disc to disc copying on one drive, see the öHave you discoveredò
section.
1.2
File transfer problems
1.2
If you are still having problems getting files across from other
computers to the Archimedes, we have received one or two programs from
subscribers. There is not enough space to print them in this issue, but
if you drop us a line, we could send you a listing.
1.2
Attaching a 5.25ö disc drive
1.2
Acorn have told us that they would not recommend us to do this as the
disc drive hardware in the computer is only designed to drive 3.5ö
drives with low control line loading and that if you want to attach a
5.25ò drive, you should have suitable buffer circuitry added. The
feedback we are getting for subscribers is that most of you are having
success with this, though one person said that one drive he attached
would not work whilst another one did and another person actually blew
up the driver chip in the Archimedes. So, itæs up to you, but in the
light of these comments from Acorn, it would clearly be a good idea to
remove the pull-up resistors on the auxilliary drive.
1.2
(For an alternative, check the öHardware Availableò section to see what
Brainsoft have done to get round the problem.)
1.2
Three floppies on the desktop
1.2
In order to get three floppies on the desktop, i.e. assuming you have
added a double 5.25ö disc drive, Gerrald Fitton again comes to our
rescue. öIn the BASIC library program called
$.desktop.accessory.filehandlr you will find that lines 130 and 140
accept the first and second floppies, so you will need an extra line:
1.2
145 IF floppies%>2 THEN PROCsys _addtoiconbar_left(öfloppy2ò,╔
1.2
etc as per lines 130 and 140 and you will have to make a further copy of
lines 290 to 420 (which refer to floppy 0) emulating the changes made to
generate lines 430 to 560 which refer to floppy 1 by inserting ö2ò in
the appropriate places.
1.2
Fortran 77
1.2
Tom Fortescue warns potential purchasers of Fortran77 that (a) it needs
at least 1Mbyte and is therefore unusable on the A305 (I havenæt been
able to check this with Acornsoft.) and (b) it does not come with an
editor, so unless youæve got View or Wordwise or Inter-Word or somesuch,
you wonæt get very far with it!
1.2
Stereo speakers
1.2
Enoch Mayer says that he has bought, for around ú25, a couple of
öRealisiticò (Tandy) amplified speakers designed for use with personal
stereo radio/tape players. (Model: Minimus-0.6 amplified speaker system
Cat N╝ 40-1259E) Although they run off two sets of four size-C bat
teries, they can easily be adapted to run off small battery eliminators.
They tone in nicely with the Archimedes, but the best thing is that when
no sound signal is received they automatically shut off, thus eliminat
ing the öfuzzò!
Å RAM upgrades Ö If you want to up-grade the ram yourself, rather than
trying to remove the main p.c.b. to get at the sockets where the new
chips are to go, you can remove the front fascia. To do this, remove the
lid, then disconnect the wires that go to the speaker and the Épower onæ
LED by pulling the four-pin socket off the pins on the board. The tongue
at the front of this socket is a clip that holds the socket in place, so
ease this forwards and the socket should slip off easily. Then you can
remove the fascia itself by undoing the five screws, three underneath
and one at each side. Care should be taken with the eject button on the
disc drive as this can break off fairly easily if roughly handled. (Some
say, will inevitably break off, but a bit of super-glue or the like is
all you need to stick it back in place.) You will then have to remove
the bridge that supports the disc drive(s). This can be done by removing
one screw underneath the computer (do this first) then two screws at the
side. Plug in the chips and reverse the process, again being careful of
the disc eject button.
1.3
Å Fitting a second drive is supposed to be a Édealer onlyæ upgrade,
but as long as you know a bit about electronics and vaguely what happens
inside computers, it is not too difficult to fit it yourself. However,
you should watch out that the front fascia plate is not too high. If it
is, it will bear on the disc and may cause an error when you try to
access the disc. I discovered this when I found that the drives worked
OK until I put the new two-hole fascia in place. My solution, when this
happened, was öbrute force and ignoranceò! The metal bracket on which
the drive is supported has a little bit of ögiveò in it Ö enough to
raise the front of the drive by the couple of millimetres necessary to
lift it away from the fascia.
1.3
The other important thing to know is that to configure your second drive
as drive 1 you need to move the tiny black slider switch at the side of
the drive. It is a four position switch and usually comes in position 0,
so one click will move it to position 1.
1.3
Å Anti-Buzz Fix Ö There are, apparently, two different buzzes. One is
what occurs after you have pressed <escape> or <break> and the other a
much more annoying buzz which not all computers seem to have. The first
buzz is a software problem which is fixed in the 1.2 Arthur, so I am
told, but the other requires a hardware fix which is supposed to be done
by dealers as a free modification, but if you are deft with a soldering
iron and are willing to risk your warranty, hereæs what to do╔
1.3
The solution, according to Acornæs technical services department is╔
1.3
öSolder a 100╡F, 10 volt electrolytic capacitor across pins 7 (positive)
and 4 (negative) of IC68. The capacitor should be kept as close to the
p.c.b. as possible and should be secured to the board with glue or hot
wax.ò
1.3
The bad news is that IC 68 is underneath the bar that supports the disc
drive(s)! The easiest way to get at it is actually, (1) take off the
lid, (2) unplug the lead that goes to the speaker and power-on LED
(beware, the socket on the ends of the cable has a lip that locks it
onto the pins on the board Ö ease the lip forward before trying to pull
the socket off), (3) take off the front fascia (one screw at each side
and three under the front edge) and (4) unscrew the drive-support bridge
(one screw underneath and two at the side).
1.3
Å Problems with monitors Ö Some folk are having problems with certain
monitors. If the problem is lack of contrast, use an oscilloscope to
check the voltage output levels from the Archimedes. If they are less
than 0.7 volts peak-to-peak you may need to change the values of the
output resistors. Acorn have changed resistors R20, R41 and R59 from 68
ohms to 43 ohms, so if you want to increase the output voltage, you
could either change the resistors or solder a 120 ohm resistor in
parallel with each.
1.3
The other problem with some monitors, especially the NEC and Fujitsu
multisync monitors, is of getting a greenish tinge on white areas. This
comes about because Acorn put the sync signal onto the green line which
is apparently what certain monitors expect. To remove this sync signal,
simply remove resistor R39 Ö a quick snip with a good pair of side-
cutters should do it, but make sure you get the right resistor!
1.3
(When I tried to do these modifications, I found it wasnæt too easy to
decide which resistor was which because the numbers are actually
underneath the resistors. If you look at the line of resistors coming
away from the video output socket you will see that they are: R1, R3,
R18, R20 (68R), R35, R37, R39 (1k2), R41 (68R), R45, R50, R52, R59
(68R), R60, R63 and R67.)
1.3
Å Archimedes on Econet Ö As far as we can gather, the Econet hardware
to be added to the basic 305 or 310 is just the same as the module which
you would purchase for the Master or Compact Ö certainly, the part
supplied by Acorn to one of our readers had the same part number as the
Master equivalent. One problem which Econet users may find on earlier
systems is that even if you only want to use the disc system, you still
have to have a clock signal available, otherwise the computer hangs up!
Presumably this will be corrected in the 1.2 operating system! If you
are used to using !BOOT files on the network, you will need to change
them all to !ARMBOOT as well as having !BOOT files for the BBC. The
Archimedes will work quite well on a Level 3 server but there are no net
utilities like VIEW, REMOTE, NOTIFY, ROFF etc. The only one provided is
an enhanced FREE which includes RDFREE with it. Acorn have öno plansò
for providing these utilities. This, for schools, is quite a problem as
you cannot get to see what is going on around the net. However, software
transfer around the net is very easy. (These comments were kindly
provided by Mr V Smith of King Edwards School, Lytham.)
1.3
Å Control key abbreviations Ö Lazy typists like me will like to know
that if you want to type, say, MODE12 perhaps to list a program that was
running in different screen mode or within a window, you can be
abbreviate it to <ctrl-V><ctrl-L>. What you are doing is the equivalent
of VDU22,12. On the BBC micro this was not a good idea because BASIC was
unaware of the change of mode and would start to over-write screen
memory with variables, but it is OK on the Archimedes because the screen
memory is protected by having configured a certain amount of screen RAM.
If you try it and then type PRINT MODE, it knows it is in mode 12. Other
mode numbers can be worked out Ö mode 0 would be <cvtrl-V><ctrl-@>, 1 is
A, 2-B, 3-C, 4-D, 5-E, 6-F, 7-G, 8-H, 9-I, 10-J, 11-K, 12-L, 13-M, 14-N,
15-O, 16-P, 17-Q, 18-R, 19-S, 20-T, 21-U.
1.3
This can be extended to things like changing background colour, say to
blue, with <ctrl-S><ctrl-@><ctrl-D><ctrl-@><ctrl-@><ctrl-@> (where
<ctrl-@> is actually done with <ctrl-shift-2>) but there comes a limit
where it is quicker to type in the command rather than remembering the
control codes. You can even do all the plotting functions in this way Ö
try, for example, <ctrl-Y><e><ctrl-C><ctrl-C><ctrl-C><ctrl-C>. (Thatæs a
lower case öeò, not <ctrl-e> so switch caps lock off and just press <e>.
If nothing happens, do a mode change first to a graphics mode, say MODE
12, then try it.)
1.3
To change mode when in the Arthur Supervisor, you could use, say, ECHO
|| V || L or ECHO || S || @ || D || @ || @ || @ or you could use ECHO
<19><0><4><0><0><0> but you can again just type in the <ctrl> sequences
as mentioned above.
1.3
Å Special effects in View Ö You can use *ECHO or use the control key
sequences mentioned above when you are using View. Also, if you want to
put the Éformat blockæ, Émove blockæ and Édelete blockæ commands onto
function keys 10 to 12 (instead of using the <print> key) you can use:
1.3
*KEY 10 || ! || L
1.3
*KEY 11 || ! || \
1.3
*KEY 12 || ! ,
1.3
Despite what it says in the User Guide about the pageup and pagedown
keys not being used, they seem to work in View and they do actually move
you a page at a time up and down.
1.3
Å *RMtidy Ö Beware that on the 0.20 Arthur, this can cause the machine
to crash whenm you subsequently try to us *RMLOAD.
1.3
Å There is apparently another undocumented screen mode which will be
available on Arthur 1.2 Ö mode 21 which is 640 x 512 in 256 colours,
though it will obviously only be usable on a multi-sync monitor and uses
320k of RAM! Also, on the 400 series there will be two extra high
resolution monochrome modes for 64kHz monitors Ö mode 22 which is 160 x
122 text with 1280 x 976 graphics and mode 23 which is text only at 144
x 54. These use the extra hardware that is on the 400 series boards
though it looks as if there should be space for the chips on the 300
boards if you are prepared to risk fitting them yourself. There are no
sockets, so you would have to solder-suck all the holes first, and itæs
a multi-layer board.
1.3
Å Delete on keypad Ö If you compare the keypads of the Master and the
Archimedes, you will see that where the Archimedes has a fullstop, the
Master has a delete key. If you think it would be useful to have the
delete function on the keypad, turn the num lock LED off and try
pressing the fullstop key!
1.3
Å Function key definitions Ö If you want to know what the current key
definitions are, *SHOW K* will print them on the screen. The only slight
confusion is that they appear in alphabetic order Ö KEY$0, KEY$1,
KEY$10, KEY$11, KEY$12, KEY$13, KEY$14, KEY$15, KEY$2, KEY$3 etc!
1.3
Function key 0, as you probably know by now, is put onto the PRINT key,
but where are the other function keys Ö 13, 14 and 15? The only one I
have found is 13 which is on the INSERT key The other thing to watch is
that although there is a separate key for function key 10 (the break key
on the BBC micro), when you press <break>, KEY$10 is expanded as it was
on the BBC micro! (That was on 0.2. Has it changed in later versions of
the OS?)
1.3
Å Diary & notepad Ö The diary and notepad can be saved onto disc by
putting the pointer on the pad or the calendar and clicking the middle
button. It then asks for confirmation that you want to save it. The
notepad is saved as önotepadò and the diary as öDiary87ò (or whatever
year it is for). To load them back in again later, you have to open up
the disc and click on the required file before clicking on the diary or
notepad with the middle button and selecting LOAD. When saving, the name
is fixed by the desktop program, but once it has been saved, you can
rename the file if you want to save more than one, though obviously this
applies more to the note-pad as I know that some of you are still having
to use the notepad as a word-processor! Having said all that, I have to
admit that when I was trying this out, I had problems saving the
calendar Ö I kept getting öDisc fullò or öDisc in need of compactionò
errors. Any offers of explanation?
1.3
Å The SYSTEMDEVS module is a set of logical device drivers that can be
used from Arthur. They make the device appear to the programmer as if
they were a file system. In Arthur 0.20 you have to load the module from
the Welcome disc, but in 0.30 onwards it should be in ROM. They include
LPT:, KEYBD:, PRINTER:, VDU and RAWVDU: so a simple command to copy a
file to screen would be *COPY FILE VDU: and any non-printing characters
appear in the format used to program the function keys, i.e. using pad
characters so that, for example, ASCII 12 comes out as || L.
1.3
What is the point of these facilities? Well, you can use them to
redirect the flow of data into or out of a program or relating to an
Arthur command. Thus you can say *EX {>info } which sends the output
from the EX command to a file called öinfoò and *CAT {>>info } will then
ADD the catalogue information onto the end of the info file, or *CAT
{printer: } would print out the catalogue. *BASIC {<data } PROG would
run the BASIC program PROG and take it input information from the DATA
file rather than from the keyboard. Another possible application is for
debugging a program that is sending data to a disc file. Rather than
stopping the program and examining the disc file periodically, you could
change the line in the program where you set up the file for output and
use instead X% = OPENOUT öPRINT:ò then subsequent PRINT#X%æs or
BPUT#X%æs would go to the printer. If the output is un-printable (or do
I mean non-printing?!) characters then you could set the printer into a
hex dump format which many dot matrix printers have these days. Then a
final suggestion for an application would be when using network and
ADFS. To avoid switching between the two, you could say X%=OPENOUT
öADFS:$.TESTò. This means that you could presumably have files open on
both the network and the disk at the same time, but not having a network
for my solitary Archimedes, I cannot check this!
1.3
(These comments were derived from an article in öEurekaò the Auckland
BBC User Groupsæ Archimedes Newsletter. Many thanks to the editor, Tony
Krzyzewski. Write to him if you want more details of Eureka c/o Barsons
Computers, P O Box 26287, Epsom, Auckland, New Zealand.)
1.3
Å ROMs that work under the emulator.
1.3
Acornsoftæs Comal, Prolog and Lisp seem at first look to be OK, and one
reader comments that Logotronæs Logo is OK but that the graphics are
öfunnyò Ö whatever that means.
1.3
Damon Hoggett reckons that to get the View series ROMæs to work, you
need to *LOAD them at &10000 and then poke the following addresses to
&EA (a NOP instruction) as explained last month. View B3.0: &128A2,
ViewSheet B1.0: &10690, 691 and 692 and ViewStore 1.0: &12BCE, BCF and
BD0 then you *SAVE filename 10000+4000 8000 8000. We made a mistake with
the mention last month of Viewstore 1.1 (page 23). The poke should be
?&12BE2=&EA, not 1ABE2 and you should also poke the next two bytes,
&12BE3 and E4.
1.3
BBCSoftæs Monitor ROM seems to work OK with the emulator. You can
apparently assemble, disassemble and single-step through 6502 machine
code without problems.
1.3
Some folk are saying the Inter-Chart works under the emulator, though
not option 9 to import data.
1.3
Å BASIC editor on 0.20 OS Ö If you are in BASIC and you type EDIT,
BASIC issues a *ARMBE command, so if that module is not already loaded
into memory, it will look in the operating system ROM and then in the
current directory on the current drive for the ARMBE module. If it is
not there, it will come up with öBad commandò. However, if it finds it,
it will load it into memory. Then to enter the editor, you just type
EDIT again. So, until you get your 1.2 OS(!) it is a good idea to copy
the ARMBE module into the directory in which you keep your BASIC
programs so that it is ready to use at any time.
1.3
Å No room in RMA Ö If you are in BASIC and try to *RMLOAD a module,
you may get öNo room in RMAò even if the configuration is set to allow
enough space for that particular module. But if you QUIT first into the
Arthur supervisor you can do the RMLOAD and then go back into BASIC and
OLD to get your program back. However, I think I would tend to save the
program first just in case!
1.3
Å BASIC V tips from Colin Dean, author of ÉAdvanced BASICæ (Tubelinkæs
BASIC V look-alike for the BBC & Master)
1.3
In the LIST IF command, if you put a space between the IF and the
<string> that follows it, you get a different effect. For example if you
have two lines:
1.3
10RECTANGLE 1,2,3,4
1.3
20 RECTANGLE 5,6,7,8
1.3
Then öLIST IF RECTANGLEò shows line 20 only, whereas öLIST IFRECTANGLEò
shows both.
1.3
A neat way to test more than one expression at once, without having to
use heavily nested IFæs is to use öCASE TRUE OFò. For example,
1.3
CASE TRUE OF
1.3
WHEN X=3 AND Y=4:PRINTöX=3 and Y=4ò
1.3
WHEN X>7, Z=0:PRINTöX>7 OR Z=0ò
1.3
ENDCASE
1.3
However, you should beware of mixing numerics and logicals in CASE
expressions. For example,
1.3
X = 6
1.3
CASE X OF
1.3
WHEN TRUE : PRINT öTRUEò
1.3
WHEN FALSE : PRINT öFALSEò
1.3
OTHERWISE PRINT öSPURIOUSò
1.3
ENDCASE
1.3
this prints öSPURIOUSò because É6æ is neither true (Ö1) or false (0).
1.3
Å Improved boot file for WWPlus Ö The !BOOT file on the Archimedes
Wordwise Plus discs is a BASIC program which checks whether the 6502
emulator is installed and if not loads it off the Welcome disc. If
instead you copy 65arthur onto your Wordwise Plus discs you can use a
simpler boot file which just says:
1.3
QUIT
1.3
65ARTHUR
1.3
WW+
1.3
and then do a *OPT 4 3 so that the computer EXECæs the boot file instead
of running it. If you are using the disc version of CP-ROM, just add
1.3
:SELECT SEGMENT 8
1.3
:LOAD TEXT ö$.CP-ROM.CPstartò
1.3
*FX138,0,152
1.3
to the boot file and it will start up the CP-ROM as well.
1.3
Å Have you seen the whale?! Ö When playing Zarch, one or two folk have
discovered a whale that appears in the sea (or is it a shark or a sea-
monster?). You get 1000 points if you exterminate it and sometimes it
öbeachesò itself and becomes a much easier target. By the way, how are
the scores going? Iæve just about managed to avoid being called a wet
lettuce or a stuffed aubergine, but one reader, Malcolm Roberts says his
son has reached 53,291.
1.3
(STOP PRESS! Iæve just seen it too Ö very fleetingly. It was bluish with
a zig-zag fin on its back!)
1.3
Å 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.
Å Text files for BASIC. I always used to write my BASIC programs in
Wordwise and put an AUTO command as the top line then go into BASIC and
NEW and then *EXEC <filename>. But I╒ve just discovered (what I╒m sure
you all knew already) that BASIC can do it for me. You don╒t have to put
AUTO at the top you just say *BASIC -LOAD <filename> and it will load
the text version of the program and put line numbers onto it. However,
as with the *EXEC technique, you cannot use long multi-statement lines
or you will get the öLine too longò error.
1.05
(One reader, who was using Arthur 0.2, found that text files longer than
32k got corrupted, but I tried it on my system with BASIC 1.02 and
Arthur 1.2 and it seemed OK.)
1.05
Å Fast screen save. This is obviously something which a number of you
have been thinking about. I got a lot of response to my pleas for help.
Several of you gave ways of *SAVEing the screen information from the
appropriate bit of RAM and re-loading it there, though this obviously
will not bring with it the palette information or the correct mode. For
example:
1.05
DEF PROCscreensave(filename$)
1.05
LOCAL K%
1.05
CASE MODE OF
1.05
WHEN 0,1,4,5,6 : K%=20
1.05
WHEN 2,3,8,9,11,18 : K%=40
1.05
WHEN 7,10,12,13,14,19 : K%=80
1.05
WHEN 16,17 : K%=132
1.05
WHEN 15,20 : K%=160
1.05
ENDCASE
1.05
!&80=149:!&84=-1
1.05
SYS 49,&80,&88 : REM OS_ReadVduVariables
1.05
OSCLIöSAVE ò+filename$+ö ò+STR$
1.05
~(!&88)+ö +ò+STR$~(K%*1024)
1.05
ENDPROC
1.05
This takes only a second or two to save the screen. It can be reloaded
by typing *LOAD filename. The program saves the whole screen, not just
the graphics window. You must not have scrolled the screen prior to
saving or re-loading, but a CLS before re-loading will cancel the
scrolling. Also, you must be in the right mode for the screen you are
about to load and you need to have the same screen colour definitions
set up.
1.05
What we have been promised though is a module, which we hope to publish
next month, which will give you legal *commands (or SWIs) for loading
and saving screen information including palette and mode and you will
find that it is several times faster than the existing SCREENSAVE
routines.
1.05
Å Extra help on BASIC╔ (OS1.2) If you type *BASIC -help<return> you
get a bit more help information about BASIC. (But does anyone know what
the last two bits refer to? i.e. what is an öin-coreò program? Does it
mean you can have more than one program in memory?)
1.05
Å ADFS: If you name all your discs with *NAMEDISC, the Archimedes will
remember the previously mounted discs. So, for example, if you put in a
disc called TESTING and you *MOUNT it and then put in a disc called
BASICPROGS and *MOUNT that, you can then see the directory of TESTING
without putting the disc back in again. All you do is type *MOUNT
TESTING and you can *CAT it. If you then want to look at the disc that
is in the drive, you will of course have to *MOUNT again. The only
problem occurs when you have backup discs because they will have the
same name ÿ this gives öAmbiguous disc nameò.
1.05
Å Sprite Editor. öTo create a new sprite╔ò It took me ages to find out
how to create a new sprite. The manual tells you to click on the
öCreateò box and öyou are then prompted for a name and a modeò. I was
expecting a prompt something like: öPlease enter name:ò. I saw the words
öCreate spriteò appear at the bottom of the screen and assumed it wanted
some sort of confirmation that that was what I wanted to do, but
whatever I did, the words disappeared again! In fact that is the actual
prompt that the manual was referring to! All you do is type in the new
name and press <return>. You would have thought they could have put in a
more obvious prompt than that ÿ or maybe just switched on the cursor to
indicate that it was time to type something rather than click on the
mouse buttons, but perhaps I have been spoiled by using the Apple Mac
where prompts are rather more obvious and logical! Huhh!
1.05
Å Reading the catalogue. An easier way to read the contents of a
catalogue, rather than reading it off the screen (see Gus Gem╒s article
last month) is to use SYS öOS_GBPBò as follows╔
1.05
DIM C% 999
1.05
!&80=&2A00
1.05
SYS öOS_GBPBò,9,&80,C%,999,0,
1.05
999 TO ,,,ENTRIES
1.05
This stores the filenames and sub-directories of the current directory
at the address C%, in alphabetical order and each terminated by a zero
byte. The number of entries is stored in the BASIC variable ENTRIES.
1.05
Å Neater than OSCLI╔ SYS 6 (equivalent of FX calls) is much neater
than using OSCLIs: e.g. Matthew Treagus╒ screen bank switching would
look neater if, instead of using OSCLI (öFX112,ò+STR$N%) he had used SYS
6,112,N%. If you don╒t like the anonymity of SYS 6, you can use SYS
öOS_Byteò,112,N%. (See Gerald╒s article on page 12.)
1.05
Å Beebug╒s Masterfile can be made to work on the Archimedes without
using the emulator ÿ it just needs a very few modifications ÿ contact
Dr╩╩Peter Catermole at Winchester College, Kingsgate Road, Winchester,
SO23 9PG.
1.05
Å BBC ROMs ÿ Continuing the saga of poking various bytes to get BBC
ROMs to work under the emulator, View B3.0 should apparently have A8A1,
2 and 3 poked to &EA and Viewspell 1.0, &820F, 8210 and 8211 likewise.
1.05
Å When setting the clock, the setting box sometimes covers the face of
the clock, so point at the bottom right hand corner of the clock box and
then press the middle mouse button.
1.05
Å Plugging modules in and out. It╒s all very well to have lots of
modules in the 1.2 ROM but, at power up, several of these modules are
installed into ram which cuts down your available memory. Exactly which
ones are installed is set by various bytes in the CMOS ram. To find out
what all the modules are and whether they are actually active, type
*ROMModules. (or just *ROM. for short.) You can öunplugò the modules by
using *UNPLUG <modulename> and it stays unplugged until you öinsertò it
again with *RMREINIT <modulename>. It seems that the extra space does
not become available until you press <ctrl-break>. If you type *UNPLUG
without a module name it tells you which modules are currently
unplugged.
1.05
Å How╒s this for a screen dump? (sent in by Ken Yeardley) It is for
mode 0, it works on the NEC PC8023, it can be put on a function key and
it only takes 118 seconds.
1.05
VDU2,1,27,84,1,&31,1,&36: FOR
1.05
A%=&1FDCFB0 TO &1FDCFFF:VDU2,
1.05
1,27,83,1,&30,1,&35,1,&31,1,&32:
1.05
FOR B%=A% TO A%-20400 STEP-&50:
1.05
VDU1,?B%,1,?B%: NEXT: VDU1,10:
1.05
NEXT: VDU3
1.05
The reason it is so short is that the NEC printer has the MSB and LSB of
the byte that defines which pins hit the paper, the opposite way round
from Epson printers. (See page 9 for a sample screendump.
1.05
Å Beware the microwave! One reader was having problems with data
corruption on the RS423 but it turned out to be only when his wife was
using the microwave oven four yards away, the other side of a brick
wall!
1.05
Å Here╒s a little routine sent in by Mike Hobart which uses the
debugger module for disassembly and memory dumps. It doesn╒t quite rival
Toolkit, but it╒s a bit cheaper!
1.05
INPUTöDisassembly or Memory dump? (D/M)ò,R$
1.05
CASE R$ OF
1.05
WHEN ödò,öDò : N%=FNi:REPEAT PROCx(öIò,N%,ö +10ò):UNTIL FALSE
1.05
WHEN ömò,öMò : N%=FNi:REPEAT PROCx(öò,N%,ö +FFò):UNTIL FALSE
1.05
ENDCASE
1.05
END
1.05
DEFPROCx(S$,M%,L$)
1.05
WHILE INKEY(-99)
1.05
OS_CLI(öMEMORYò+S$+ö ò+
1.05
STR$~(N%)+L$)
1.05
N%=N%+100
1.05
ENDWHILE
1.05
ENDPROC
1.05
DEFFNi
1.05
INPUTöFrom(Address &nnnnnn)òÉN$
1.05
PRINTöPress <space> to scrollò
1.05
IF ASCN$<>ASCö&òTHEN N$=ö&ò+N$
1.05
=EVAL N$
1.05
Å Desktop on 1.2. (All the remaining H & T are based on material sent
in by Bruce Roberts.) As an alternative to double clicking on <select>
to open a file or run an application, try a single click on the adjust
button ÿ it has the same effect.
1.05
The quick way to open a diary (or notepad), rather than opening the
diary window first and then pressing <menu>, is to double click on the
diary icon on the disk directory ÿ the window opens automatically.
1.05
You can now save diaries and notepads with whatever name you like and
you can also click, or move with the cursor keys, and put text anywhere
in the window.
1.05
The following keys can now be used on diary and notepad:
1.05
<insert> Insert single character
1.05
<copy> Delete character to the right of
1.05
the cursor
1.05
<ctrl-insert> Insert a line above the cursor
1.05
<ctrl-copy> Delete a line
1.05
<shift-left/right> Move 4 characters sideways
1.05
<ctrl-left/right> Move to the end of the line
1.05
Notepads can be created from within View by saving a file (up to 100
lines, 78 characters wide) and then doing a *SETTYPE <filename> &FEE.
Existing notepads can be edited with View provided you use READ
<filename> instead of LOADing it and WRITE <filename> instead of SAVEing
it.
1.05
Å After using the desktop, the function keys do not produce the normal
programmable strings or ASCII values. It seems that this is because
Acorn have not stuck to their own rules (see Programmers╒ Reference
Manual, page 488) because they do not call SWI Wimp_ CloseDown. The
öfixò published elsewhere of typing *FX225,1 is fine if you only want to
restore the strings to f0 - f9. To get f10 - f12 back, you need *FX221,1
but the simplest thing seems to be to make sure that everything is back
to its default setting by using a program, perhaps called QUIT, which
you can run from the desktop instead of clicking on the exit icon. To
set the default of all the combinations of <ctrl> and <shift> with all
the function keys, you need:
1.05
*FX225,1
1.05
*FX226,&80
1.05
*FX227,&90
1.05
*FX228,0
1.05
*FX221,1
1.05
*FX222,&D0
1.05
*FX223,&E0
1.05
*FX224,&F0
1.05
MODE 0
1.05
*BASIC
1.05
If you don╒t put in a MODE statement, you╒ll find yourself typing
invisibly! The *BASIC means you come out into BASIC but with no program
in memory.
1.05
As an alternative, you could miss out the call to BASIC and put:
1.05
W%=GET
1.05
*MOUNT
1.05
*!BOOT
1.05
The idea would be that you would click on this program, change to the
disc you want to boot up, and press a key. You may want to include a
prompt to the user to öreplace disc and press space barò or somesuch.
The use of *!BOOT means that it doesn╒t matter if the boot file should
be *EXECed or *RUN ÿ either will be done by the *!BOOT according to the
file type.
1.05
Å Avoiding the desktop. If you donæt want to go into the desktop every
time you switch on or press <ctrl-break>, do a *CONFIGURE LANGUAGE 4 and
press <ctrl-break>. When you want to go into the desktop, type *DESKTOP
or *DES. for short. If you change your mind, *CON. LANG. 3 will bring
you into desktop at switch on or LANG. 0 will start you in the super
visor mode.
1.05
Å View boot file. Here is a more sophisticated boot file than the one
we gave originally:
1.05
*ECHO<22><3>
1.05
*| selects mode 3
1.05
*GOS
1.05
*65ARTHUR
1.05
*GO F800
1.05
*LOAD VIEW 8000
1.05
*GO 8000
1.05
*ECHO<19><0><16><48><48><240>
1.05
*| sets background colour
1.05
*ECHO<19><1><16><240><240><208>
1.05
*| sets foreground colour
1.05
*ECHO<19><2><24><240><128><0>
1.05
*| sets border/line colour
1.05
SET FI
1.05
*| sets Format and Insert modes
1.05
NEW
1.05
Å Avoiding *MOUNT. To avoid typing *MOUNT each time you put a new disc
in the drive, you can set an alias with, for example, *SET ALIAS$? MOUNT
| M CAT so that when you type *?<return> it does the mount and the
catalogue all in one.
1.05
Å Centronics GLP screendump. The *HardCopyMX nearly works because the
printer is Epson-compatible-ish! All you need to do is issue, from
BASIC, the following codes:
1.05
VDU2,1,27,1,65,1,8,1,27,1,50,3
Å (1.2 OS) If you want to look at the desktop manager programs and
perhaps modify them and run them from disk, the following information
may be of use:
1.6
The DESKTOP has its own filing system activated by *DESKFS. If you do a
*CAT, you will get: DeskTopMgr
1.6
DeskTopMgr2
1.6
&.!palette
1.6
Icons.Desktop
1.6
Icons.Calculator
1.6
Icons22.Desktop
1.6
Icons22.Calculator
1.6
You can then LOAD the DeskTopMgr2 program and LIST it. (DeskTopMgr╩is
just the 5-line startup program that gets left in BASIC when you exit
the desktop.)
1.6
If you change back to *ADFS, you can then save the program. To copy the
palette and/or the Icons, you have to use commands such as:
1.6
*COPY DESKFS:I*.Desktop $.I*.Desktop
1.6
(assuming you are in ADFS and have created a directory called Icons)
1.6
To run the program from disk, you need the icon and palette files to be
copied across then if you fancy tackling 76k of öcrunchedò BASIC
program, you can try editing it!
1.6
Å If you are using the decrement or increment (+= or Ö=) in a BASIC
program and you get a öMistakeò error on that line, the chances are that
you have forgotten to initialise the variable. Try typing X=X+1:PRINT X
and it will give the value 1 but if you type Y+=1 it will say öMistakeò.
What it really should say is öUnknown or missing variableò, but still,
good programmers wonæt get the problem because we always remember to
initialise all our variables, donæt we? (We do?)
1.6
Å Testing multi-sync output without a multi-sync monitor! If you are
writing software and hoping to sell enough of it to be able to afford a
multi-sync monitor(!) you have the problem of testing your software in
modes 18 to 20. If you use *Configure MonitorType 1, modes 0 to 17 are
still displayed as normal then when you select modes 18 to 20 and
generate the screen output, you can use a screendump (such as Gerald
Fittonæs minidump or *HardCopyFX) to look at what youæve got. If youære
worried about damaging the monitor, switch it off before changing mode.
1.6
Å Using large printer buffers etc. If youære using a buffer thatæs
larger than 64 kbytes, itæs no use trying to use ADVAL with a negative
number (e.g. PRINT ADVAL(-4) for the printer buffer) Ö it only returns
the least two significant bytes. Instead, use SYS öOS_Byteò, &80, &FC TO
, X%, Y% : bytes_free%= X%+256*Y% where &FC is the Ö 4 value. (Actually,
instead of working out that Ö 4 is the equivalent of &FC you can, it
seems, be lazy and use Ö 4 in the SYS command. Ed.)
1.6
Å Easy loading of modules: To enable you to load the emulator and fast
BASIC easily, you can create some library programs on your Welcome disc
(or better still, a copy of your Welcome disc!). This is what you do for
fast BASIC:
1.6
*BUILD LIBRARY.FAST
1.6
*FX225,1|M
1.6
*KEY1 QUIT||M*MODULES.RAMBASIC
1.6
||M*KEY1||MCLS||MHELP||M
1.6
*FX138,0,129
1.6
<escape>
1.6
and then change it into a BASIC program with
1.6
*SETTYPE LIB*.FAST &FFB<return>.
1.6
Note that there are double pad characters before each ÉMæ in order that
when the program line is run, each double pad character is interpreted
as a single pad character for the actual key definition.
1.6
The bits after calling the module are optional. The first is to clear
key1 again in case you press it accidentally. The second is to clear the
screen and the third is to give a help message to show that you are
actually in RAM_BASIC. (See below).
1.6
Once this is set up, to get into fast BASIC all you do is type
*FAST<return>.
1.6
For the 6502 emulator, use the name LIB*.6502 and donæt put the HELP
command in because that does not work on BASIC IV.
1.6
Å Tidying up after ArcWriter! You can do a similar thing to the above
hint in order to tidy up after using ArcWriter.
1.6
*BUILD LIBRARY.RESET
1.6
*FX225,1|M
1.6
*KEY1 QUIT||M*CONFIGURE FONTSIZE
1.6
2||M*RMREINIT FONTMANAGER||M
1.6
*RMTIDY||M*BASIC||M
1.6
*KEY1||MHELP||M
1.6
*FX138,0,129
1.6
<escape>
1.6
Typing *RESET will do the tidy-up for you.
1.6
Å Identifying RAMBASIC. To get RAM_ BASIC to tell you that it actually
IS the RAM version and not the ROM version, you can change a few bytes
so that it prints out ÉRAM BBC BASICæ instead of ÉARM BBC BASICæ on the
startup and HELP messages. To do this, proceed as follows:
1.6
*LOAD MO*.RAM* 20000
1.6
?&202B0=ASCöRò
1.6
?&202B1=ASCöAò
1.6
?&23F78=ASCöRò
1.6
?&23F79=ASCöAò
1.6
*SAVE MO*.RAM_BASIC 20000 +E434
1.6
*SETTYPE MO*.RA* &FFA
1.6
Å Reversing the CAPS lock. If you hold down the shift key when you put
the CAPS lock light on, you will find that the shift key now has the
opposite effect, i.e. letters typed without pressing shift come up as
uppercase letters, but when you press the shift key you get lower case
letters. This can be useful if you are programming and mostly work in
upper case but with occasional use of lower case.
1.6
Å Displaying screens in different modes. If you have a screen that has
been SCREENSAVEæd, you can display it in another mode. (e.g. Artisan
screens in 256 colour modes!) Assuming you have configured spritesize to
at least 11, proceed as follows:
1.6
MODE 13
1.6
*SLOAD filename \ NOT
1.6
*SCREENLOAD
1.6
*SCHOOSE screendump
1.6
PLOT &ED,0,0
1.6
You will note that the palette has changed and that it is a lower
resolution, however, it will still be quite decent and you will have all
those lovely colours to play around with!
1.6
If you choose mode 15, you will get the same picture displayed in 256
colours but squeezed into only half the screen width.
1.6
If you want to change the colours you will have to load it into the
sprite editor (SEDIT) and change the colours manually.
1.6
Å Using the View Series. You will find that after coming from the
desktop, TAB does not work. The solution is to type *FX219,9.
1.6
ViewProfessional works fine if you use the second processor version Ö
the VP file on the 5.25ö disk Ö however it should be *LOADæed at 4000
(not 8000) and called with *GO 4000. (See page 5, Archive 1.1)
1.6
Å Diary/Notepad problems. Beware: If you are printing something from
notepad or diary, check that an active printer is on-line before
starting to print otherwise the system may hang up and the only way out
is to press <ctrl-break> Ö frustrating if you havenæt saved the text
first!
1.6
Å Slower listings. I know this is obvious to ex-BBC users, but Iæve
not seen mentioned anywhere the fact that holding <ctrl> and <shift>
keys down together will stop the screen scrolling. Archimedes lists
programs so quickly that even if you use <ctrl-N> to get a paged
listing, you may well get two pages instead of one if you hesitate on
pressing the shift key, so using <ctrl> and <shift> allows you to
control the listing yourself.
1.6
Å File transfer between wordprocessors. If you have Wordwise Plus or
View files and you want to import them into GraphicWriter, use *SETTYPE
filename &FFF to ensure that GraphicWriter sees them as text files.
(Actually it should already see Wordwise Plus files as text because of
the save address that Wordwise Plus uses Ö check by doing *INFO *.) Then
you can simply load the files into GraphicWriter using the file menu. To
transfer the files back to View or Wordwise, you need to save them as
ASCII files. This is done by opening the file menu then clicking on the
word öTEXTò with the ADJUST button, typing in a filename and pressing
<return>.
1.6
(I tried to do the same sort of thing with ArcWriter but it kept
crashing each time I tried to load a file, so I gave up!)
1.6
Å Smart ON ERROR routine. If your ON ERROR routine includes the
following, you get the usual error message and then, if you press any
key other than <escape> it will drop into the ARM BASIC editor at the
offending line. So if you do not want to go into the editor, press
<escape> instead.
1.6
ON ERROR OFF
1.6
PRINT REPORT$+ö at line ò;ERL
1.6
dummy%=GET
1.6
SYS 5,(öKEY0 EDIT ò+STR$(ERL)
1.6
+ö|Mò)
1.6
SYS 6,138,0,128
1.6
END
1.6
If you prefer to move into EDIT a few lines above the offending line,
use STR$(ERLÖ50) or whatever.
1.6
Å Dual purpose boot files. It is quite possible to have a boot file
that will work equally well from within the desktop or as a conventional
boot file operated with <shift-break>. What you do is *BUILD the file as
usual but then *settype <filename> &FFB which gives it a link to BASIC.
If you then double-click on it in the desktop, it adds line numbers to
it and runs it as a BASIC program. However, it will only work with
<shift-break> if the machine is configured to start up in BASIC, not in
the desktop (i.e. *CON. Language 4, not 3).
1.6
Å With the PC emulator you can get more space than Mark Sealey
reckoned in his review last month by *unplugging various of the modules.
On reader reckons to get almost 590,000 bytes free (= 576k).
1.6
Å Disabling Modules. Archive no.5 explains how *Unplug can be used to
disable Modules, but this method needs a <ctrl-break>. An alternative is
to use *RMKill and *RMTidy from the operating system *-prompt (not from
BASIC), e.g.
1.6
*RMKill FontManager
1.6
*RMKill StringLib
1.6
*RMKill Percussion
1.6
*RMKill ARMBasicEditor
1.6
*RMKill WindowManager
1.6
*RMTidy
1.6
This typically releases 96 Kbytes of memory on an A310 machine and
doesnæt need a <ctrl-break>. It is particularly useful if youære short
of space in BASIC, Pascal or FORTRAN, etc and arenæt using fancy sound,
the WIMP environment or the BASIC editor. Each module can be reinstated
by using *RMReinit <Module name>, or all can be restarted by <ctrl-
break>.
1.6
Å GW BASIC on the PC Emulator. There is an undocumented way to get
back into the MS-DOS operating system after using GW BASIC. Try pressing
function key f-11.
1.6
Å PC Emulator. Version 1.09 (which existing users can get by sending
back their old disc plus ú15 to Acorn) runs, amongst other things,
Ability Plus, dBase 3 Plus, Kermit, Word Perfect, LTS NewsMaster (see
separate review). (Can anyone add to this list?)
1.6
Å RS423╔ yet again! If you have the 1.2 operating system and if you
have the version of the serial chip that is made by GTE (itæs the 28 pin
IC at the back left of the pcb) and if you change over from using the
CTS line at the Archimedes end to using the DSR line (i.e. link 1, 4 and
8 and join pin 6 to the RTS line from the other machine) then Acorn have
a fix which you load in as a module. Send a blank disc to Customer
Services to get a copy. The version they sent me didnæt work the first
time I tried it with some data transfer software so I pressed <escape>
and tried again and it worked perfectly at 19,200 baud. Then I tried
again and it wouldnæt send anything, pressed <escape> and away it went!
Still, when you do get it going it sends and receives at 19,200 baud in
both directions without any data corruption. I left it running for a
couple of hours and there was no corruption at all.
1.6
Å After the desktop╔ simpler than the list of FX commands that we gave
last month is to call SYSöWimp_CloseDownò (which is what Acorn should
have put in their desktop program in the first place!!!) but if you
donæt fancy trying to type that every time, getting upper and lower case
exactly correct, you can create a one line BASIC program with 10
SYSöWimp_Close Downò and save it on your disk as $.library. undesk and
then just type *undesk (or whatever abbreviation you can get away with)
and all will be restored to normal.
1.6
Å Using the Seikosha 250X printer is a bit of a problem. When you plug
it into the Archimedes, all power is lost. This seems to be because of
the +5.0 volts on lines 18 and 36 of the printer connector Ö these are
earthed at the Archimedes end and so have to be disconnected somehow.
One reader, Adrian Moreton, has succeeded but it is too complicated to
explain here. If you want the information, send us an s.a.e. and weæll
send you a photocopy of his letter and the excellent diagrams he has
drawn.
1.6
Å ADFS wildcards. Had you gathered that ADFS will take * or #
wildcards anywhere in a filename? On the BBC, you could only put them at
the end of the filename. So, for example, if youæve got PROGRAM1,
PROGRAM2, PROGRAM3 etc you only need to say something like LOAD öPR*2ò
or even LOAD ö*2ò if none of the other files have numeric endings. That
makes life much easier, doesnæt it?! (Thanks to Benjamin Finn for
pointing that out. The next hint is his, too.)
1.6
Å Errors in library procedures. If an error occurs in a PROC or FN
that is installed using LIBRARY or INSTALL, the correct error message is
given but the line number quoted is the last number in the main program.
Although we cannot get a line number pointer to the error, we can at
least find out from which procedure in the main program the library
routine was called when the error occurred.
1.6
At the beginning of each definition of a PROC or FN you should put
something like:
1.6
DEF PROCdosomething
1.6
LOCAL ERROR
1.6
ON ERROR LOCAL PRINT REPORT$
1.6
ö in PROCdosomethingò:END
1.6
.
1.6
.
1.6
ENDPROC
1.6
Å Help with Econet is offered by Michael Ryan of XOB, Balkeerie,
Eassie, By Forfar, Angus, DD8 1SR. Michael says, öHere are some comments
about Archimedes on Econet in response to comments in Archive 1.3, page
8.
1.6
öRDFREE is part of the Econet filing system module and hence not a disc-
based utility as with the BBC version. Issued with a user identity as
parameter, it gives the total disc free space and that useræs allocated
portion of it. Issued with no parameter, it returns the useræs own free
space and the total free space.
1.6
öAcorn are supplying a number of other utilities including SETFREE,
SETSTAT, USERS, PROT and UNPROT, though they have not yet made it clear
how they are to be distributed, so donæt hold your breath.
1.6
öThough it is very unlikely that they will supply the more sophisticated
utilities (VIEW, REMOTE, NOTIFY etc) all is not lost. XOB already have a
wide range of utilities for the BBC/Master series and have already
implemented several of them on the Archimedes. More details from us on
0307Ö84364.ò
Å Most of the keys on the numeric pad have secondary functions if used
with the Num Lock off. In BASIC, 1 gives copy, 2 and 3 are both cursor
down, 4 is cursor left, 5 doesnæt seem to do anything, 6 is cursor
right, 7 is Écursor homeæ and 8 and 9 and cursor up. In View, the single
cursor movements are 2, 4, 6 and 8 while 3 and 9 are page down and page
up respectively.
Å GETfile and PUTfile on the MS-DOS emulator are difficult to use if
you only have a single drive. However, if you configure a RAM disc with
MS-DOS you can then copy MS-DOS files onto it and then form the ADFS
files on the physical drive and vice versa to take ADFS files in to the
MS-DOS file system.
1.7
Å Programs that work under the PC-emulator. Iæve had lots of informa
tion about MS-DOS software that does work, but has anyone found any
software that does NOT work under the PC-emulator?
1.7
Å With version 1.09 of the PC emulator, if you do the following╔
1.7
*LOAD PC.Emulate 10000
1.7
?&137C8=0
1.7
*SAVE PC.Emulate2 10000
1.7
you will find that the memory isnæt cleared when you press the reset
button.
1.7
Å One good book to help new MS-DOSæers (sorry!) is öQuick Reference
Guide to MS-DOSò by Van Wolverton, published by Microsoft Press,
obtainable via Watford Electronics at ú3.95. (ISBN 1-55615-025-3)
1.7
Å From various reports, it seems that CHKDSK does work properly though
it has to be used with care. It can be used to repair the File Allo
cation Table (FAT) and repair errors in directories. Files are not
necessarily stored contiguously on an MS-DOS disc, so if part of a file
is lost then CHKDSK can be used to convert lost chains to files (i.e.
write to a disc directory). Generally, CHKDSK by itself is safe. CHKDSK
*.* /V is usually safe, but CHKDSK *.* /F is dangerous if you donæt know
what you are doing!
1.7
Å One reader says he has solved the problem of öTo linefeed or not to
linefeedɕ by adding a single pole switch in parallel with the contact
on the printer dip-switch that sets the auto-linefeed on and off,
leaving the dip-switch in the open position, of course. Donæt forget
though that most printers only look at the dip-switch settings at power-
up, though some do so when you do a software reset with 27,64.
1.7
Å With Arc-Writer, to get it not to double space on a Panasonic
printer, use the AW_PCedit program, select the RX80D and change the
number of steps per 100 units vertically from 21600 to 600.
1.7
Å View 3 works under the emulator if you poke locations A8A1, A8A2 and
A8A3 with &EA.
1.7
Å Acornsoft ISO Pascal, Comal, Prolog and LISP all work under the
emulator says one reader.
1.7
Å Share Analyser (Synergy Software) works perfectly under the 6502
emulator.
1.7
Å Four floppies on 1.2 OS. If you try *con. floppies 4, you will find
that it tells you the number is too big, but if you use *FX162,135,4 and
do a <ctrl-break>, you will finds that *STATUS tells you that you have
four floppies.
1.7
Å Booting other drives. In contrast with the BBC micros, you can, on
Archimedes, *MOUNT 1 and then <shift-break> to boot the disc in drive 1.
1.7
Å WIMP Manager. Be aware that the first time Wimp_poll is called, it
clears the screen.
1.7
Å Fitting the backplane: It is an awkward job to fit the backplane
because two plastic spacers are used into which self-tapping screws have
to be inserted. This is best done in a vice to avoid stripping screw
heads and/or sticking screwdrivers through your fingers!
1.7
Å ÉUnknown IRQ at &00000000æ. If you get this error message (and
possibly find that the machine hangs up on you) check whether your RS423
lead is properly screened, if at all. If it is not screened, it seems to
be able to pick up interference (remember the micro-wave problems
mentioned in issue 5, page 8?) and this generates spurious interrupts.
1.7
Å More ideas on the black art of RS423 communication! Here is one
readeræs recipe for succesful RS423 transfer, though it may not work for
everyone╔ Try using the Éfixæ module (Archive 1.6 program disc) with
pins 1,4,8 and 9 linked together and 6 (DSR) and 7 (RTS) as the control
lines.
1.7
Å Running more than one BASIC program. If you have a BASIC program you
want to run while you are working on another program in memory, you can
program a couple of keys with:
1.7
*KEY 4 P%=PAGE : PAGE=&30000
1.7
: CHAIN ötestprogò|M
1.7
*KEY 5 PAGE=P% : OLD|M
1.7
Å System Delta Plus: If you have trouble loading newly formed
databases and get öNo Roomò when you know there is plenty of room, add a
.D to the filename when loading, i.e. type in the filename as, say,
öRECORDS.Dò.
1.7
Å Inter-Word: If you have come from the desktop, you will find that
the tab key does not work. This can be corrected with *FX219,9.
1.7
If you want the ú sign, you will find it is produced by the ` key (far
top left key).
1.7
If you want the ` sign╔ tough! (The ú sign duplicates the öinsert rulerò
function!)
1.7
Å Stuck in a black hole? If you find yourself typing in black on
black, try typing MODE MODE<return>. It allows you to type again, but
maintains the mode you were in.
1.7
Å SystemDevs module. The redirection commands, some of which we said
didnæt seem to work, are sensitive to spacing. The correct forms are as
follows where the spaces are represented by bullets (Å):
1.7
*CATÅ{Å>ÅinfoÅ }
1.7
Spools catalogue to file öinfoò
1.7
*CATÅ{Å>>ÅinfoÅ }
1.7
Adds catalogue to file öinfoò
1.7
*BASICÅ{Å<ÅdataÅ }ÅPROG
1.7
Runs öPROGò and uses information in file ödataò for input.
1.7
Å Using the Acorn ROM Podule: No links are available for the RAM
sockets, although you can configure the sockets by software for 8k, 32k
or 128k RAM chips. Using HM6264LP-15 ram in the sockets and configuring
them as 8k does not immediately work. However if you configure them as
32k chip and apply an offset of &2000 when loading i.e.:
1.7
*RMLoad <podule number>
1.7
<socket> <filename> 2000
1.7
then your data will load correctly. This is because the Chip Select (CS)
on the 8k chips is on the pin Address 13 (pin 26) on the 32k and 128k.
This causes the 8k chip to be mapped into 8-16k and 24-32k hence the
offset of 8k. The inverted CS on pin 20 is common to all three devices.
(Without configuring them as 32k, the operating system reports that the
device is not big enough for an 8k offset.)
1.7
Å Concerning Acornsoft C and TWIN: ÉConcurrencyæ (keeping text in one
window and compiling a program in the other) does not work. The compiler
(v1.5A) has a bug in it that prevents it from working. Acorn said that
it used to work OK on the pre-release version! However, compiler output
can be sent to a file called tmp.temp if the -spool option is used.
1.7
It may be necessary to relocate TWIN in order to compile programs. My
version of TWIN loaded at &60000 but needed to be relocated to &80000 to
allow the compiler enough space. (See below.) If the compiler crashes,
try increasing the SystemSize using *configure.
1.7
The two compiler messages, ÉFatal I/O erroræ and ÉBinary output erroræ,
simply mean that your disc is full!
1.7
Å More about TWIN. Twin is an editor which seems to have one or two
hidden features; firstly it is a relocatable program, and consequently
can be loaded anywhere where RAM exists (barring overwriting OS
workspace etc.). I have created a version which I call LoTwin which
loads at &10000; this leaves space for BASIC programs only 256 bytes
fewer than are available on a BBC Master using Shadow RAM, and yet it
allows me considerably more work space than the standard Twin.
1.7
To create a version of Twin called ÉMYTWINæ which loads and runs other
than at the Énormalæ address, perform the following actions:
1.7
*DIR <diræry_containing _Twin>
1.7
*LOAD TWIN <new_load_address>
1.7
*EX
1.7
*SAVE MYTWIN <new_load_
1.7
address> +<size>
1.7
<size> is obtained from the 3rd column of hex data after the É*EXæ.
1.7
Then, to invoke the new version, type
1.7
*MYTWIN
1.7
and it will run. Pressing <shift-f5> followed by <T> after entering
MYTWIN will show the load address on the top line immediately to the
left of the time.I have yet to see mentioned in print the Éwarm startæ
for TWIN. If something nasty happens and your Archimedes locks up just
as you have spent a couple of hours typing in something using TWIN, and
you have no option but to press <ctrl-break>, or even <ctrl-reset>, do
not despair, simply type:
1.7
*GO <twin_start_address> -WARM
1.7
and you will find yourself back in TWIN exactly as you were when the
Énastyæ happened, barring any corruption caused by the Énastyæ. Donæt
forget the É-æ preceding the öWARMæ! I have found myself in this
position after a momentary power cut, and although the warm start did
not restore TWIN as a fully functional editor (due to corruption), it
restored Twinæs ability to save text, so I saved what I had done, and
was then able to reload Twin, and then reload my text.
1.7
Å Iso Pascal: Be warned before you buy Iso Pascal, it has NO support
for Arthur Ö otherwise, says one reader, it is an excellent implementa
tion. Also (in common with C) it comes with a very thin manual, so a
copy of TWIN and a book about the language (see the mini-review on page
25) will be needed for most people.
1.7
(More information about other languages was sent in, but this was all I
could digest with my limited knowledge of languages other than BASIC.
Would anyone be prepared to receive all the öother languagesò informa
tion and knock it up into a special section each month?)
1.7
Using the Computer Concepts ROM Podule
1.7
How many times have you had to press <ctrl-break> and muttered under
your breath because youæve lost your function key definitions? That need
never happen again if you have Computer Conceptsæs ROM podule with some
battery-backed RAM on it. All you do is configure the system to start up
in the RFS instead of the ADFS and also configure it to auto-boot. Then
in the RFS, you put a boot file something like:
1.7
REM > RFS:!BOOT
1.7
*SET Run$Path ,ADFS:$.,RFS:$.%.
1.7
*ADFS
1.7
*FX255,8
1.7
PRINT öAcorn ADFSòÉ
1.7
*KEY 0 These are
1.7
*KEY 1 my favourite
1.7
*KEY 2 key definitions
1.7
*SET ALIAS$> Cat
1.7
*SET ALIAS$? HELP etc
1.7
*BASIC
1.7
(You will notice that the Run$Path uses É$æ instead of É%æ as stated on
page 28 of the Computer Concepts manual.)
1.7
Å To get the Inter series software to boot up with a simple call such
as *ISHEET, copy 65Arthur into the RAM area using *COPY
ADFS:Modules.65Arthur RFS:65Arthur and, providing you have set up the
Run$Path as above, *ISHEET, *IWORD and *ICHART will automatically load
the emulator and then the appropriate software.
1.7
Å Installing Wordwise Plus. If you copy the Archimedes version of
Wordwise Plus from Computer Conceptsæs disc (filename öWW+ò) into the
RFS calling it, say, WWIMAGE, you can modify the BASIC program öISHEETò
and save it as öWW+ò so that, as above, you can just type *WW+ and it
will auto-load the emulator and run the software. The modifications are
to change the references to öISIMAGEò at lines 130 and 270 into
öWWIMAGEò.
1.7
Å If you want to modify any of the programs in a ROM, all you do is
either LOAD it, edit it and SAVE it or, if you have the modified version
on disc, just *COPY it. If you tell it to SAVE a file with a name that
exists in ROM it gives the ram version precedence over the ROM version.
1.7
To find out whether a particular file is in ROM or RAM, use the *INFO
<filename> command. If it comes up with a ö*ò before the final figure of
the information, the file is in the RAM area. To get the ROM version
back, you either have to do a <ctrl-break> or type *RMREINIT RFS
<return> because *delete filename removes all trace of it so that even
the ROM version is inaccessible.
1.7
Thanks to Adrian Look for all the following hints and tips.
1.7
Å X-SWIæs. When using SWIæs if you put an X before the name then the
SYS call from BASIC will not generate an error. For example:
1.7
SYS öXOS_CLIò,block
1.7
Å Modes & drawing speed. The VIDC receives the video data down the
data bus lines of the ARM processor. While this is happening the RISC
chip cannot perform any processing. This means that the screen modes
using higher memory will be slower. Try timing a FOR-NEXT loop of
1,000,000! So, if speed is of the essence, it may be better to go into
mode 0, do the calculations and save them in an array and then go into
mode whatever to plot the results.
1.7
However, there is a compensating factor. The lower memory modes use one
byte to represent several pixels, thus addressing pixels requires extra
calculation Ö whereas the higher memory modes use only one byte to
represent a pixel so addressing pixels is much quicker. This means that
graphics will be quicker in higher modes.
1.7
Mode F/N loop Draw Mem. Colours
1.7
(secs) (secs) (k)
1.7
0 14.9 51 20 2
1.7
1 14.9 38 20 4
1.7
2 15.6 34 40 16
1.7
3 15.6 Ö 40 Text
1.7
4 14.9 38 20 2
1.7
5 14.9 32 20 4
1.7
6 14.9 Ö 20 Text
1.7
7 15.6 Ö 80 T-Text
1.7
8 15.6 54 40 4
1.7
9 15.6 40 40 16
1.7
10 17.1 39 80 256
1.7
11 15.6 Ö 40 Text
1.7
12 17.1 61 80 16
1.7
13 17.1 45 80 256
1.7
14 17.1 Ö 80 Text
1.7
15 21.3 79 160 256
1.7
16 19.6 Ö 132 Text
1.7
17 19.5 Ö 132 Text
1.7
18 15.4 70 40 2
1.7
19 16.9 77 80 4
1.7
20 21.0 98 160 16
1.7
Å OS_Pretty Print. Have you ever wondered how the operating system
manages to display all its messages without any of the words getting
split at the end of a screen line, no matter what mode it is in? Well,
the answer is ÉOS_ PrettyPrintæ.
1.7
If you print all your strings using this call it will stop any words
going over the end-of-line boundary. This call recognises the following
control characters in a special way:
1.7
Ö CR (CHR$(13)) causes not just a carriage return but also a newline.
1.7
Ö TAB (CHR$(9)) causes a tabulation to the next multiple of eight
columns.
1.7
Ö CHR$(31) is a Épad characteræ, that is, the procedure will print a
space when this code occurs but it will not break the string up at this
point.
1.7
Example:
1.7
A$=öHello my name is...ò
1.7
SYS öOS_PrettyPrintò,A$
1.7
Å The QUICK option When you use the (Q)uick option in the *COPY and
*BACKUP commands, the OS will use all available memory. This means that
if you are in high memory screen modes then you will have less memory to
use. So if you want even quicker *COPYing or *BACKUPs then try it in a
mode which uses less memory.
1.7
Å Run$Path and File$Path. The FileSwitch uses two system variables
called Run$Path and File$Path. You can see their values by typing
either:
1.7
*SHOW File$Path <return> and/or
1.7
*SHOW Run$Path <return>
1.7
You will probably get the following results:
1.7
File$Path : type String, value :
1.7
Run$Path : type String, value : ,%.
1.7
These are the default settings. The values stored in the File$Path and
Run$Path variables are actually a list of directory filenames separated
by commas and terminated with dots.
1.7
When the FileSwitch is told to read a file it will look at File$Path
variable and search for the file in each of the directories listed until
it finds a match. Similarly the FileSwitch will do the same when it is
told to execute a file, only it will use the Run$Path variable as the
list of directories. For example:
1.7
*SET File$Path RFS:%.,,%.
1.7
This would cause the FileSwitch to search for the file first in the RFS
filing systemæs library directory, then in the current filing systemæs
current directory (hence the ö,,ò which means donæt add anything to the
filename as entered), and finally in the current filing systemæs library
directory.
1.7
Here is a list of all the possible directory prefixes (although you can
actually specify any directory by name Ö wildcards may be used):
1.7
* Ö all
1.7
$ Ö root
1.7
& Ö user
1.7
@ Ö current
1.7
^ Ö parent
1.7
% Ö library
1.7
} Ö previous
1.7
Å Flushing the Mouse. You may have noticed that the mouse has a buffer
of its own. This means that the Arc stores all the mouse movements and
clicks just as it stores the keyboard entries. How many of you play
around with the mouse when a program is Éthinkingæ or waiting for a
screen to load? This will leave a whole load of mouse positions and
clicks in the buffer, so any subsequent MOUSE X,Y,B readings will not
reflect the true position of the mouse but the positions stored in the
buffer!!! So how do you clear the buffer? To flush all the buffers,
type:
1.7
*FX 15 <return>
1.7
to flush just the mouse buffer, type:
1.7
*FX 21,9 <return>
1.7
Å Local DATA statements. (Based on an idea sent in by C.R.Fitch) In
answer to the query last month, it is possible to have DATA statements
in a program that does not rely on line numbers. What you can do is to
use the error handler to pin-point a line number just before the local
data statements. For every data set you want to access, just use the
following format:
1.7
DEFPROCdata_set
1.7
LOCAL ERROR
1.7
ON ERROR LOCAL RESTORE ERL
1.7
IF ERL=0 THEN ERROR 1,öget line
1.7
numberö
1.7
RESTORE ERROR
1.7
DATA 1,2,3,4,5 : REM put your
1.7
own data here
1.7
ENDPROC
1.7
Then if you want to use the data set, just call the procedure, as for
example:
1.7
PROCdata_set
1.7
FOR i=1 TO 5
1.7
READ data:PRINT data
1.7
NEXT i
1.7
The procedure leaves everything exactly as it was (except the data
pointer) so it does not affect the program at all. The only snag is that
we donæt know where the old data pointer was so we canæt continue
reading data from where we left off! Any ideas??
1.7
(The remaining information in this section is about using the MS-DOS
emulator. More information than this was sent in, but this was all I
could digest with my limited knowledge of MS-DOS. Would anyone be
prepared to receive all such information and knock it up into a special
MS-DOS section each month?)
1.7
Å Colour TV output for Archimedes? If you havenæt got a colour monitor
and want to use a TV to look at the output from the Archimedes in
colour, you can feed the signal from the video output into the Évideo
inæ on a video recorder (always assuming youæve got one!) and connect
the ÉRF outæ from the recorder to the TV.
1.08
Å Drive lights on external 5.25ö drives. One reader suggested that to
avoid the external drive light coming on when I accessed the interal
drive(s) I should remove all links except DS1 (I use DS2 to make it
drive2), TO, RR and MS. I followed his advice and it seems to be OK
now.
1.08
Å 400 or 300? If a piece of software wants to find out if it is running
in a 300 series machine or a 400 series it can read the MEMC to find the
size of page being used, thus:
1.08
program segment missing
1.08
Å More buzzing. One reader noticed that the buzzing from the speaker
gets worse when you upgrade from a 305 to a 310. Other readers have
found that the buzz gets to an intolerable level with certain software
such as ArcWriter. In any case, this is now recognised by Acorn as a
field change, so your local dealer should be able to sort it out for
you. If your local dealer is not within easy reach then the öcapacitor
fixò mentioned in issue 3, page 7, is easy enough to do as long as you
are reasonably competent at soldering.
1.08
1.08
Å Printer Acknowledge Line. The IOC (Input Output Controller) has a
printer acknowledge line which can be read from the ARM supervisor mode.
However, it is not advisable to Éplay aroundæ in this area, unless you
know what you are doing, because some locations are read only and
attempting to write to them could damage your IOC chip. Here is an
example program that reads the printer acknowledge line.
1.08
program segment missing
1.08
Å *TypeFile Command. One reader tried to define an alias which types
out a file on the printer and then switches the printer off again, but
he found that it was easier said than done. I set Adrian Look onto it
and he has managed to find a way of doing it (albeit rather tortuous!):
1.08
program segment missing
1.08
then to print out the file, you do a *TypeFile<filename>. The <60> and
<62> are the ASCII codes for ö<É and ö>ò.
1.08
It sounds a bit long-winded, but what you are trying to do is generate
ASCII codes <2> and <3> to switch the printer on and off again. When
you do a *SHOW, it gives the definition of TypeFile as ECHO |<2>|M TYPE
%0|M ECHO |<3>|M.
1.08
Å öWhatæs the time, Arthur??ò Ö If you wanted to change the prompt
which Arthur gives, you could try, for example:
1.08
*Set CLI$PROMPT >>>
1.08
and you would get a question mark instead of the star prompt. Then, if
you want Arthur to tell you time at each prompt, use:
1.08
*SETMACRO CLI$PROMPT <SYS$TIME>*
1.08
This prints out the time and then prints the star prompt. The reason
you use SETMACRO rather than just SET is that it needs to be a variable
which is up-dated each time the command is used. If you donæt like the
seconds figure to be included, try:
1.08
<SYS$TIME><127><127><127>*
1.08
This prints out the time but then generates three delete characters
which remove the seconds figures and the colon.
Å View B3.0. Following on from the hint about View B3.0, John Phelan
writes thÅ öMore articles about the basics, pleaseò, said a number of
folk at the Micro User Show. We╒ve had something on using ADFS and are
starting assembler for beginners but can anyone say specifically what
they want information on and can anyone offer to write any öbasicò
articles, please? In particular╔
1.09
Å Article on ARMBE. We really do need someone to write a very
practical guide to using the ARM BASIC Editor. For example, I╒ve only
just realised that <insert> toggles between insert and over-write mode
and so you don╒t have to go through the preferences menu. I suspect a
lot of people are not using ARMBE simply because they are familiar with
BASIC╒s own line editor and haven╒t got time to learn ARMBE even though
it would save them time in the long run. Please write to us if you would
like to have a go at this. Thanks.
1.09
Å BASIC V utility library. If you have worked out some neat utilities
like the one in Hints & Tips about aligning decimal points, why not send
them in to us. Clifford Hoggarth has offered to edit the section, so
either send your contributions to us or direct to him at 20 Pinfold
Drive, Eccleston Mere, St Helens, WA10 5BT.
1.09
Å Education articles. I╒m getting requests for articles relevant to
education, but no-one is offering such articles. Can anyone help?!
1.09
Å Hard Disc users. One reader, who has a 440 on order, wants to know
if there are any do╒s and don╒t╒s with a hard disc. Are there any hard-
disc users who want to comment?
1.09
Å View B3.0. Following on from the hint about View B3.0, John Phelan
writes that there is still a problem with the pound key. On the
Archimedes, this key returns ASCII 163. Is this redefinable?
1.09
Å Calculating ╣ and e. Brian Cowan asks if anyone knows the way that
pi and/or e may be calculated digit by digit on a computer. Presum-ably
they must be all integer algorithms(?)
1.09
Å Taxan KP-810 on ArcWriter. Has anyone worked out how to get a
printer driver working for this combination? Drop a line to E. Clinks
cales, 68 Wyvis Drive, Nairn, IV12 4TP.
1.09
Å Video-titling. Is there any software, says M Davies of Cardigan, for
video-titling? Wild Vision do the hardware for Genlock and Video
Overlay, but where is the software?
1.09
Also, he asks, is there any software, preferably ROM based, to give NLQ
print on his Epson RX80 and also desktop publishing?
1.09
Help Answers
1.09
Å Label printer for cassette tapes╔ Try the June issue of Micro User,
page 39.
1.09
1.09
Å View B3.0. In order to get View B3.0 working properly under the 6502
emulator, as well as poking the three bytes at &A8A1 to &EA you have to
poke &80C2 ÿ 4 to &EA otherwise, the emulator tries to run it as a
second processor ROM image ÿ without any success. With this patch, the
address space from &B328 to &BFFF is effectively free for patching.
Perhaps some enterprising programmer could use this space for extra
routines ÿ e.g. a resident printer-driver.
1.09
Å Special characters. If you want to generate special characters on-
screen, try pressing <ctrl-shift-alt> and then one of the ordinary keys
and you will find that you can get all sorts of alternative characters
such as ⌐ and ¿ and the half, quarter and three-quarter signs (which I
haven╒t even got on the Apple Mac!). What is more, if you are using Arc-
Writer, it will actually print some of the symbols, such as the
fractions, on the printer!
1.09
Å PSU for external 5.25ö drives. If you have an external 5.25ò disc
drive that does not have its own power supply, you can take the power
from the power supply for the hard disc but you will need a special
cable and connector. Those who have bought interfaces from Dudley Micro
Supplies might be able to get help from them. (Or try the ArcDFS
interface mentioned in Hardware & Software Available section.)
1.09
Å Aligning decimal points. If you are trying to print out various
figures and want the decimal points to line up above one another, you
can use the öfixed formatò. (See the explanation of the @% variable
under the section in the User Guide about the PRINT command.) However,
the fixed format prints out trailing zeros, e.g. it prints 234.0000
instead of 234.
1.09
The bad news: One reader wanted to avoid this and so was trying to write
a BASIC routine to do the aligning and discovered some nasties (presum
ably due to rounding errors) that gave the value of LOG100 as 2 but
INT(LOG100) as 1! Also he found that LEN(STR$3.3) was given as 3, but
LEN(STR$4.3) was given as 11!
1.09
The good news: You can do a STR$, use INSTR to find the position of the
decimal point and then use PRINT TAB( to position it correctly as in the
following example. (Thanks, APL!)
1.09
10 REM >$.AlignDP
1.09
20
1.09
30 REM ***************************
1.09
40 REM * Aligning your decimals *
1.09
50 REM * by Adrian Philip Look *
1.09
60 REM * 28th April 1988 *
1.09
70 REM ***************************
1.09
80
1.09
90 REPEAT
1.09
100 random=RND(10000)-RND(1)*(RND
1.09
(1)<.7)
1.09
110 PROCalign(20,random)
1.09
120 UNTIL FALSE
1.09
130 END
1.09
140
1.09
150 DEFPROCalign(x,number)
1.09
:REM x = position of DP
1.09
160 number$=STR$(number)
1.09
170 dot=INSTR(number$,ö.ò)
1.09
180 IF dot=0 dot=LEN(number$)+1
1.09
:REM i.e. no DP
1.09
190 IF dot=1 dot=0:REM leads with DP
1.09
200 PRINT TAB(x-dot);number
1.09
:REM beware of (x-dot)<0
1.09
210 ENDPROC
1.09
STOP PRESS. The original enquirer about this, Peter Trigg, has just come
back with:
1.09
DEFPROCalign(x%,number)
1.09
:REM x% = position of DP
1.09
LOCAL length%
1.09
length%=LEN(STR$(INT(number)))
1.09
PRINT TAB(x%-length%);number
1.09
ENDPROC
1.09
This is somewhat neater and it seems to work OK. (This just emphasises
the need for sharing ideas ÿ which is why we are setting up our öBASIC
utilitiesò section ÿ see Help!!! section.)
1.09
Å Music Editor. If you have a number of tunes that were prepared using
the Music Editor on the 0.2 or 0.3 Welcome discs. You will probably find
that all the voices are wrong ÿ usually that the main tune was being
played on the percussion! The reason is that the Music Editor refers to
the voices by number only, so if the modules are in a different order,
the voices are likewise in a different order. It is however possible to
change the order of the modules by *RMKILLing the one which is higher in
the *ROMMODULES list then doing a *RMTIDY and then *RMREINITing the
module which you had just killed.
1.09
Å Beware &36D! Some BBC software (Apollo Mission for example) pokes
!877=0 (or !&36D=0). If you transfer this to the Archimedes you will
find that the system locks up and neither <ctrl-break> nor <reset> has
any effect. Even switching off is ineffective. The only way out is an
<R>-power-up. (Do it twice to restore the correct monitor-type setting.)
1.09
Å File copying on a single drive. Are you having difficulty copying
files from one disk to another using just one disk drive? Is it that
when using the *COPY command with the Prompt option, the system prompts
for insertion of the destination disk but never recognises it? If so,
issue the command *NODIR first. The system will then read the disk
directory every time it attempts to access a disk rather than storing
the directory in memory so that disks no longer need *MOUNTing. It is
possible to make the change permanent by doing *Configure NODIR.
1.09
Å Boot files that work from desktop or with <shift-break> ÿ set *OPT
4,2 (Run) and create a BASIC program called !BOOT. You can then <shift-
break> if configured as language 3 or 4 (desktop or BASIC) or double
click the !boot icon from desktop.
1.09
If necessary the !BOOT file can contain a line such as: 10*EXEC !BOOT1
1.09
!BOOT1 contains tasks such as loading modules that need to be done from
supervisor mode.
1.09
Å To run Master software, use *Alphabet Master and *Keyboard Master.
1.09
Å *TypeFile again. After the ideas given last month, I knew there
should be an easier way╔ Clifford Hoggarth has come up with:
1.09
*Alias$TypeFile Echo ||B|M Type %0|M Echo ||C|M
1.09
The point is that on first interpretation, || is turned into | so that
it become Echo |B which gives the ASCII 2 (ctrl-B) to turn on the
printer and Echo |C to do the reverse.
1.09
Å System Delta Plus ÿ The section in the manual on printer control
codes is not very clear. The following points may make it clearer: (1)
Clicking on <menu> on the printer control icon brings up a sub-menu
giving options for Bold, Compressed or Reset. (2) To select multiple
escape sequences, click <select> on the printer control icon, select the
Escape icon and enter the first code in the sequence, then press
<return>, enter the second code and again press <return>. Repeat this if
necessary and click on the OK icon when you have finished. E.g. to get
NLQ on an Epson , you want ESC120,1. So use: <select> Escape icon, type
120, press <return>, type 1, press <return>, <select> OK icon.
1.09
One limitation of the System Delta Plus package, as it stands, is that
you can only create four numeric total fields when producing a öListò.
The solution, according to Minerva Systems will be to purchase their
öReporterò software ÿ when it becomes available!
1.09
Å Taxan Kaga printer (or the Canon equiv-alent) ÿ there is a fairly
simple way of being able to switch the auto-line feed on and off, to
avoid problems with software that may or may not require the printer to
auto-line feed.
1.09
All you do is to place a switch between two pins of the printer
connector. The pins to connect are pin 14 (auto-line feed) and any GND
line. When they are connected an auto-line is not performed.
1.09
Å Ambiguous *-commands. If you have two modules loaded into the
Archimedes that use the same *-command name, you can call the command
required by: *<module name>: <command> <....> So, for example, if you
had two modules, ╘Utility╒ and ╘Toolkit╒ both of which have a CATALL
command, you can use either *Utility:CATALL or *Toolkit:CATALL to
differentiate between them.
1.09
Å BASIC Editor. If you type öEDIT.ò instead of just öEDITò, it gets
you back into the editor at the same place you left it. This can be very
useful when editing long programs. It even seems to work if you load and
save other programs in the interim as long as you get the original
program back into memory. Also, you can say EDIT Fred and it will take
you to the first occurrence of the word öFredò in the file. So, with
judicious use of REM statements, you can jump into the program at just
the right place every time. If you want to find DEFPROCfred, EDIT fred
will probably bring you to PROCfred rather than the definition itself,
but REM !FRED above the top of the procedure would allow you to type
EDIT !FRED (note, all uppercase, which is easier to type) to drop you
straight to the desired place in the program.
1.10
Å Artisan ÿ fast load and save. If you have typed in the Fastload/Save
module from the March issue of Archive, *COPY FastRm onto the Artisan
disk and then LOAD öART3ò, list line 270 and add *RMLOAD FastRm|M and
then re-save it. Now LOAD öART5ò change line 2540 to OSCLIöFastLoad ò+f$
and line 2620 to OSCLIòFastSave ö+f$. Then re-save it. You now have a
new and improved disc facility for Artisan.
1.10
Å 305, 310, 410 or 440? Following on from the hint in the May issue
(page 7) it╒s all very well to know what the page size is, 8k or 32k,
but to differentiate between a 305 and a 310 or between a 410 and a 440,
you need to know how much memory is available. One way of doing this is
to set up a local error trap and do a *Configure Spritesize 128. If the
machine has 1 Mbyte or less it will generate a öConfigure parameter too
bigò error. If it still generates an error when you use *Configure
Spritesize 64 then the software knows it is running in a 305. We have
not had chance to check this on a 305 or a 410, so please will someone
let us know if it does not work.
1.10
Å System DeltaPlus. If you want to use two drives, issue the following
two commands from the card index:
1.10
*dir :1
1.10
*set Delta$WPPrefix :0.$
1.10
Then don╒t specify the drive number in the data file name.
1.10
Å View 3 & Viewstore 1.1. Various folk are still having problems with
these. If so, try the following as suggested by Sean Kelly ÿ thanks.
1.10
Viewstore 1.1. Locations &ABE2, &ABE3 and &ABE4 should all be set to the
value &EA.
1.10
View 3. Set locations &A8D6, &A8D7 and &A8D8 to the value &EA. Also,
there are four places where you get LDA#&82, JSR Osbyte (i.e. &A9, &82,
&20, &F4, &FF). This is used to check for the second processor on the
BBC. So to fool it, you have to change each of these to: LDX#&FF,
LDY#&FF, NOP. You can either do this by poking &A2, &FF, &A0, &FF, &EA
into each of the sets of locations: &8834 to &8838, &88D8 to &88DC,
&895C to &8960 and &AF8D to &AF91. (I checked these locations against
the B3.0 version in the Master 128╒s and it bore no resemblance to it.
Apparently it refers to the A3.0 version. Ed.)
1.10
Å Improved sound. If you have the colour monitor that comes with the
Archimedes, you can use the Audio Input at the back of the monitor (a
phono socket) to take a signal from the Headphones output (3.5 mm stereo
jack) from the Archimedes. Just use one of the channels or combine them
with 100R resistors. (If you╒re not quite sure how to do this, we╒ll try
to give more details next month.) This give a much better sound and
provides you with a volume control.
1.10
Next two hints are from Peter Kiggins╔
1.10
Å When using a SWI from BASIC which either takes or returns a string,
it is not necessary to use pointers to strings. The SYS command knows
that a pointer has been returned by the SWI and copies the relevant text
into the string. For example, instead of
1.10
$TxtPtr%=Number$
1.10
SYSöOS_ReadUnsignedò,FromBase%,TextPtr% TO ,,Decimal%
1.10
you can use the more readable and easier
1.10
SYSöOS_ReadUnsignedò,FromBase%,Number$ TO ,,Decimal%
1.10
And to read the command line which started the program, all thatæs
required is
1.10
SYS öOS_GetEnvò TO Command_line$
1.10
Å BASIC commands TWIN and TWINO can be used without Acornæs (editor)
TWIN. How? When TWIN is executed, BASIC first converts the current
program from internal tokenised format to plain text format; then it
calls TWIN with the location of the text as a command line string. So
all that is required is a program called TWIN which reads the command
line and saves the relevant chunk of memory:-
1.10
10 REM >twin
1.10
20 REM*** fails with very short pieces of text ***
1.10
30 SYS öOS_GetEnvò TO command_line$
1.10
40 posat%=INSTR(command_line$,ö@ò)
1.10
50 poscomma%=INSTR(command_line$,ö,ò,posat%)
1.10
60 possemic%=INSTR(command_line$,ö;ò,poscomma%)
1.10
70 start$=ö&ò+MID$(command_line$,posat%+1,poscomma%-(posat%+1))
1.10
80 finish$=ö&ò+MID$(command_line$,poscomma%+1,possemic%-(poscomma%+1))
1.10
90 INPUTöEnter file name: ò file$
1.10
100 OSCLI(ösave ò+file$+ö ò+start$+ö ò+finish$)
1.10
110 OSCLI(ösettype ò+file$+ö &FFFò)
1.10
The point of all this is that the BASIC Editor can now be used to
produce text files ÿ for wordprocessing, compiling, etc.
1.10
Å Auto-Booting ÿ some of the commercial auto-boot programs donæt take
into account the filing system! This can be very annoying if you have a
ROM podule and your system is set to start up in the RFS. The answer is
(i) the software developers should produce proper auto-boot programs; or
(ii) if you already have bought a program ÿ put *CON.FILE.ADFS in auto-
boot program!
1.10
Hard Disc Auto-Booting ÿ some readers are lucky enough to have hard
discs. However, life with a hard disc is not all a bed of roses! Having
copied your application programs to the hard disc, you run into problems
with the auto-booting routines. Here is a one of many possible solu
tions. Indeed this program could be used for those of us with floppies,
who have more than one application on a disc.
1.10
10 REM >$.!BOOT
1.10
20 REM **************************
1.10
30 REM * Multiple Auto-Booting *
1.10
40 REM * written by Adrian Look *
1.10
50 REM * 22nd June 1988 *
1.10
60 REM **************************
1.10
70
1.10
80 SYS öOS_Byteò,161,16 TO ,,misc_flags
1.10
90 auto_boot=(misc_flags AND %10000)
1.10
100 file$=öbootò
1.10
110 file=OPENIN(file$):CLOSE #file
1.10
120 IF file=0 THEN PROCmenu
1.10
130 file=OPENIN(file$)
1.10
140 INPUT #file,boot$
1.10
150 CLOSE #file
1.10
160 IF auto_boot THEN OSCLI(öREMOVE ò+file$)
1.10
170 OSCLI(öRUN ò+file$)
1.10
180 END
1.10
190
1.10
200 DEFPROCmenu
1.10
210 REM **** your own code ****
1.10
220 REM
1.10
230 REM should exit with file$
1.10
240 REM containing the filename
1.10
250 REM of the program to be run.
1.10
260 REM
1.10
270 REM e.g. PRINT #file,filename$
1.10
280 ENDPROC
1.10
The program checks whether a file (file$) is on the disk. If it is, then
the program reads the filename contained in file$ and runs it! Other
wise, the program should create file$ ÿ as indicated.
1.10
This method also allows you to write library programs which will: create
file$ and then run the boot program. Thus by running these library files
you can also initiate your application programs ÿ without the need for a
menu!
1.10
Å Quazer Fix. If you are using Quasar 1.40, here is a cheat, (for
those who like such things!) which allows you to keep going a bit
longer. Firstly, *LOAD QuazCode 9000 and then rename Quazcode as, say,
OldCode. Now if you want to set the number of lives, you need to change
location &3D058. It should currently contain 2, so to change the number
of lives to, say 10, put ?&3D058=10. Now if you want to avoid being
killed when you collide, change the contents of location &3D90B from &E2
to &F2 by puting ?&3D90B=&F2. Finally, *SAVE QuazCode 9000 +36520.
1.10
ÅPasswords if you want them. Quazer Passwords: 2 Lizards, 3 Spiders, 4
Pedantic, 5 Analysis, 6 Larkin, 7 Company, 8 Manual,9 Trading
1.10
Hoverbod passwords: 2 Minervas, 3 SirBarry, 4 ZotyBlob, 5 Flumpies, 6
Squidgee, 7 Wobblies, 8 Posskett
1.10
1.10
The following Hints & Tips were sent in by Mike Harrison (of Watford
Digitiser fame). He╒s also sent us various other bits of information
which appear elsewhere in this issue and the next issue. Many thanks
Mike.
1.10
Writing modules
1.10
(Ref. issue 5, page 45) SWIs in modules must always use the ÉXæ version
of the SWI and, where appropriate, check for an error and exit,
preserving the value of r0 returned by the SWI (i.e. donæt restore the
old value of R0 if it had been saved). e.g.
1.10
.a_module_routine
1.10
STMFD R13!,{r0-2 ,14} \or however many registers you need to save
1.10
SWI öXOS_SomethingOrOtherò
1.10
STRVS R0,[R13] \overwrite old r0 with error pointer
1.10
LDMVSFD R13!,{r0-2 ,PC}
1.10
\ the last 2 statements could alternatively have been :
1.10
\
1.10
\ ADDVS R13,R13,#4 : LDMVSFD R13!,{r1-2 ,PC}
1.10
For short routines, or where several SWIs are used, the following is
neater..
1.10
.a_short_routine
1.10
STMFD R13!,{r0-5 ,14}
1.10
SWI öXOS_SomeSwiò
1.10
SWIVC öXOS_SomethingElseò
1.10
SWIVC öXOS_YetAnotherSwiò
1.10
STRVS R0,[R13]
1.10
LDMFD R13!,{r0-5 ,PC}
1.10
In this example, all code after first SWI should be conditional on V
clear, so if any SWI gives an error, the code will Édrop throughæ to the
end.
1.10
Remember that some SWIs may return errors you donæt expect ÿ e.g.
OS_WriteC could return an error when output is *Spooled, setting the
screen mode could give ÉBad Modeæ etc. ÿ some thought is required to
ensure that module code will be reliable in all environments.
1.10
When setting up offsets in headers and command tables, it is much easier
to specify them when using offset assembly (OPT 4/6/7) ÿ set O% to the
code buffer, and P% to 0. Offsets can then be included directly with
EQUD (e.g. EQUD moduletitle). Warning ÿ if you are still using Basic
1.00, there is a bug in ALIGN when using offset assembly. Version 1.02
is OK.
1.10
The following assembler macro is useful when building keyword tables in
modules (it assumes the use of offset assembly, as described above):
1.10
DEF FNcommand(I%,A$)
1.10
[ OPTpass : EQUS A$ : EQUB0 :
1.10
ALIGN
1.10
EQUD EVAL(A$)
1.10
EQUD I%
1.10
EQUD EVAL(A$+ösyntaxò)
1.10
EQUD EVAL(A$+öhelpò)
1.10
]:=pass
1.10
OPT FNcommand(öNewCmdò,N) will create a table entry, using the labels
.NewCmd .NewCmdhelp and .NewCmdsyntax (N is the information word).
1.10
Note that Épassæ is the name of the pass variable ÿ change this if you
use a different name.
1.10
Podule manager/Clock slowdown
1.10
(Ref. issue 7, page 44) The problem here is that SWIs are passed to
modules with interrupts disabled, so if the SWI takes a significant
amount of time to complete, the clock will slow down (the mouse pointer
will also become sluggish). I canæt see why the podule manager should
need interrupts off, so itæs probably an unintended Éfeatureæ ÿ SWI code
which takes time to execute SHOULD enable interrupts, unless they have
to be off. (The digitiser module only runs with interrupts off when
absolutely necessary!) When interrupts have been disabled for signifi
cant amounts of time, the seconds count of the real-time clock gets out
of step with the minutes, which then donæt roll over at 59 secs ÿ this
looks weird if you donæt know about it!
1.10
System Devices
1.10
(Ref. issue 6, page 41) There is a very interesting feature, which I
havenæt seen documented, concerning device oriented filing systems. When
you set the printer type using *FX5,n where n is greater than 2, the OS
looks for a system variable called printertype$n ÿ n being the value
used for FX5. This variable holds the name of the output file or device
to which printer output should be sent. The Econet module, NetPrint,
uses this to set printer type 4 to önetprint:ò. What happens is that
when you do <ctrl-B>, a file is opened, with the name given in this
system variable, and <ctrl-C> closes the file. While this would normally
send output to a hardware device, it can also use the name of a normal
file; e.g.
1.10
*set printertype$5 outfile
1.10
*fx5 5
1.10
Will cause subsequent printer output to be written to the file öoutfileò
ÿ handy for debugging, and for saving data to print on other machines.
Note that this will only work if a program does VDU2, sends ALL its
output, then does VDU3. If it keeps turning the printer on and off all
the time with VDU2/3, only the last part of the output will be in the
file, as VDU2 re-opens the file, discarding its previous contents.
(Econet users know only too well the problems caused by software not
handling the printer correctly!)
1.10
Just for fun, try :
1.10
*set printertype$5 vdu:
1.10
*fx5 5
1.10
<Ctrl-B>
1.10
All vdu output will appear ttwwiiccee!! ÿ once via the normal route, and
again via the printer stream.
1.10
Use of SYS
1.10
(Ref. issue 9, page 47) The following is a bomb-proof version of OSCLI
in BASIC, which will report errors without entering BASICs error handler
(it can also be used for other SWIs ÿ e.g. OS_File to trap filing errors
neatly)
1.10
DEFPROCoscli(OS$)
1.10
LOCAL flag%,error%
1.10
SYSöXOS_CLIò,OS$ TO error% ; flag%
1.10
IF flag% AND 1 THEN P.öError : ò;:SYSöOS_Write0ò,error%+4
1.10
REM the error number can be read using !error%
1.10
ENDPROC
1.10
It works by reading back the V flag and error pointer returned by the X
version of the SWI
1.10
TWIN
1.10
(Ref. issue 7, page 7) You can warm start Twin using *Twin -warm, using
the same version of Twin, of course ÿ *GO may cause problems if the code
has been corrupted, (or youæve forgotten the address!). There is a bug
in all the versions of Twin Iæve seen (Iæm not sure what version has
been released), which means that when exiting from TWIN to BASIC, the
event vector is messed up, so if you overwrite the address where Twin
was run, and enable events, the machine crashes. This can be avoided by
doing QUIT, *BASIC, and OLD.
1.10
In one issue, there was a tip for entering ARMBE automatically at the
line in error ÿ hereæs a similar routine if you prefer using TWIN to
edit BASIC programs ÿ It uses the TWINO8 option to strip line numbers
(which you donæt need to use, DO YOU!!). If the error wasnæt Escape,
pressing <Y> will enter TWIN at the line where the error occurred. Note
that it assumes lines are numbered in 10s ÿ this will be the case if the
program has been edited in TWIN without line numbers, but not if lines
have been inserted/deleted from the BASIC prompt ÿ in this case, enter
TWIN, and exit again, or do RENUMBER.
1.10
ON ERROR PROCERR
1.10
...
1.10
...
1.10
DEFPROCERR
1.10
REPORT:PRINTö at line òERL
1.10
IF ERR=17 END
1.10
PRINTöEDIT ?ò:IF GET$=öYò ELSE END
1.10
*FX138 0 129
1.10
*FX138 0 128
1.10
FORA%=1 TO LEN(STR$(ERL DIV10))
1.10
SYS 6,138,,ASC(MID$(STR$(ERL DIV10),A%,1))
1.10
NEXT:*FX138 0 13
1.10
END
1.10
Hidden software
1.10
(Ref. issue 9, page 4) Take a close look at the digitiser module!
1.10
Hints & Tips
1.11
Å *COMPACT Ö The User Guide says that *COMPACT ömoves files around on
the disc, collecting all the free space into a continuous blockò.
However, if you have a disc that has several gaps you will find that you
need several compactions. One disc which had 5 gaps in the FS map had to
be compacted eight times before the map showed only a single gap. (See
review of R.A.Engineeringæs Utilities, page ?????)
1.11
Å *COPY Ö When copying multiple files using wildcards, you must ONLY
specify the directory into which to copy and not try to specify the
actual file name in any way e.g. if you want to copy files PROGA, PROGB,
PROGC etc from the öBASICò directory into the öBACKUPò directory, use
*COPY $.BASIC.PROG* $.BACKUP.* but if you try to use *COPY $.BASIC.PROG*
$.BACKUP.PROG* it wonæt work. This is not desperately clear in the User
Guide and Iæve only just worked out why 90% of my attempts to do
wildcard copies have not worked!
1.11
Å CAPS LOCK Ö Another thing which is obvious if you know about it is
that you can set up the keyboard to print upper case normally but then
go into lower case when you press <shift>. This can be done either by
*Configure SHCAPS if you want it to start up in that mode (or CAPS or
NOCAPS if you donæt) or by holding the shift key down and pressing and
releasing the Caps Lock key.
1.11
Å CHAINing programs Ö In response to our complaint in last monthæs Bug
or Feature that programs chaining one another cannot be called from
drive 1 using the desktop, Philip Colmer of Acornæs Customer Support
Department tells us that it is definitely a feature. There are a number
of ways of avoiding the problem. Firstly, you could reference files by
disc name, so we could CHAINö:ProgDisc.$.Progs.Nextprogò or whatever.
Alternatively, you could use the fact that when you run a BASIC program
in drive 1 from the desktop, it generates a command something like
*basic Öquit öADFS::1.$.Progs.FirstProgò. You could then use OS_GetEnv
to read the command string and find out where the program has been
called from. Thridly, have a look at PC.PC from the 1.20 version of the
PC emulator to see an intelligent (incredibly so!) boot-up program which
has been very carefully commented to enable you to modify it for your
own use.
1.11
Å Auto-booting Ö Again from Philip Colmer comes the suggestion that
you should use the PC.PC program to boot up applications from within
directories on the hard disc. The program uses legal OS calls instead of
re-configuring. It does a *DIR and then runs the program specified. The
only restriction on it is that it cannot change the system sprite size
but, he points out, if programs were written properly, they would not be
using the system sprite area!
1.11
Å System Devices Ö You can treat devices as files, e.g.
C%=OPENOUT(öNETPRINT:ò). This is particularly useful in the example
given on page 9 last month because you can now open a channel to the
network printer, send some stuff to it when you are ready (using BPUT
#C%) and when everything is done, close the Éfileæ (CLOSE#0) and it will
then be printed! (This also came from Philip Colmer Ö Thanks PC! Ö
Funny, you know, I always thought that PC stood for Personal Computer!
Ed.)
1.11
The following Hints were prepared by Adrian Look╔
1.11
Å Smooth Scrolling Ö Using VDU 23,7 you can scroll the current text
window up, down, left, or right. Horizontally, the picture can be
scrolled by one byte, but vertically it can only be scrolled by one
character cell. This can produce a smooth scroll by placing a WAIT (for
the vertical sync pulse) command before the VDU 23,7. If any further
delay is implemented then the picture shudders as it scrolls. This means
that a slow smooth scroll cannot be used. The answer is to redefine the
screen base address manually (as we used to do on the BBC). This is done
using ÉOS_Wordæ &16.
1.11
DIM block% 4
1.11
:
1.11
block%?0=type
1.11
block%!1=offset
1.11
WAIT
1.11
SYS öOS_Wordò,&16,block%
1.11
ötypeò : when 1 Ö base used by VDU drivers (i.e. screen updated)
1.11
: when 2 Ö base used by hardware (i.e. screen displayed)
1.11
öoffsetò : from the address of the base of the screen buffer to the
start of the screen display.
1.11
The following example program should help to make it clearer.
1.11
10 REM >scrolling
1.11
20
1.11
30 REM **************************
1.11
40 REM * Scrolling Screens?? *
1.11
50 REM * written by Adrian Look *
1.11
60 REM * 21st July 1988 *
1.11
70 REM **************************
1.11
80
1.11
90 MODE 0:OFF
1.11
100 DIM block% &10
1.11
110 count=0
1.11
120
1.11
130 PRINTTAB(3,15);öSome textò
1.11
140
1.11
150 REPEAT
1.11
160 PROCscroll(1)
1.11
170 UNTIL 0
1.11
180 END
1.11
190
1.11
200 DEFPROCscroll(speed)
1.11
210 PROCinfo
1.11
220 add=x/m
1.11
230 IF SGN(count)>0 THEN speed=-speed
1.11
240 REPEAT
1.11
250 block%?0=2
1.11
260 block%!1=add*count
1.11
270 WAIT
1.11
280 SYS öOS_Wordò,22,block%
1.11
290 count+=speed
1.11
300 UNTIL add*count>x*y/m+4160 OR count<0
1.11
310 ENDPROC
1.11
320
1.11
330 DEFPROCinfo
1.11
340 SYS öOS_ReadModeVariableò,MODE,4 TO ,,x
1.11
350 x=4-x:x=8*(2^x)*10
1.11
360 SYS öOS_ReadModeVariableò,MODE,5 TO ,,y
1.11
370 y=3-y:y=y*256
1.11
380 SYS öOS_ReadModeVariableò,MODE,3 TO ,,c
1.11
390 CASE c OF
1.11
400 WHEN 1 : m=8
1.11
410 WHEN 3 : m=4
1.11
420 WHEN 15 : m=2
1.11
430 WHEN 63 : m=1
1.11
440 ENDCASE
1.11
450 ENDPROC
1.11
1.11
Å Desktop Utilities Ö The desktop is essentially a skeleton program
which allows the programmer to install his/her own icons, windows,
menus, commands, etc, which the DeskTop will then operate. This is done
with a very clever set of FNæs. for example:
1.11
PROCinstall(öadrianò)
1.11
:
1.11
DEFPROCinstall(file$)
1.11
INSTALL file$
1.11
void=EVAL(öFNinstall_file_ò+file$)
1.11
ENDPROC
1.11
This means that by EVALuating a string the DeskTop can call any file-
specific function. In the case above, FNinstall_file_adrian will be
called. By using this system, any command can be Éinstalledæ or even
replaced. Explaining or even listing the functions and procedures
available in the DeskTop program is not really possible in the magazine.
However, bearing in mind the methods used, you will find before long you
can write some very useful tools for the DeskTop. It should even
possible to completely re-write the it! As an example, here is a program
which will allow you to use star commands. Donæt forget to *SETTYPE
Éfilenameæ FE0 to indicate that the program is a desktop utility (We
have included several other utilities on the program disk).
1.11
10 REM >star
1.11
20
1.11
30 REM *******************************
1.11
40 REM * Star Commands for Desk Top *
1.11
50 REM * written by Adrian Look *
1.11
60 REM * original idea Denis Howlett *
1.11
70 REM *******************************
1.11
80
1.11
90 DEFFNinstall_file_star
1.11
100 file=OPENIN(filehandler_path$+ö.istarò):CLOSE #file
1.11
110 IF file=0 THEN ERROR 1,öCanæt find icon file Éistaræò
1.11
120 OSCLI(öSMERGE ò+filehandler_path$+ö.istarò)
1.11
130
PROCsys_addtoiconbar(östarò,öcommandò,&301A,icon_fgcol,icon_bgcol,48)
1.11
140 SYS öWimp_ForceRedrawò,-1,0,0,1279,100
1.11
150 =0
1.11
160
1.11
170 DEFFNaction_star
1.11
180 PROCstar_command(5,5,75,25,2,1)
1.11
190 =0
1.11
200
1.11
210 DEFPROCstar_command(x0,y0,x1,y1,bx,by)
1.11
220 *POINTER 0
1.11
230 VDU 26,4,28,x0,y1,x1,y0
1.11
240 y0=31-y0:y1=31-y1
1.11
250 gx=x0*16-bx*8:dx=(x1-x0)*16+bx*16+16
1.11
260 gy=y1*32-by*16:dy=(y0-y1)*32+by*32+32
1.11
270 GCOL 0,&4:RECTANGLE FILL gx-4,gy-4,dx+8,dy+8
1.11
280 GCOL 0,&0:RECTANGLE FILL gx,gy,dx,dy
1.11
290 LOCAL ERROR
1.11
300 REPEAT
1.11
310 ON ERROR LOCAL PRINT REPORT$
1.11
320 *FX 4,0
1.11
330 INPUTö*òstar$
1.11
340 *FX 4,1
1.11
350 OSCLI(star$)
1.11
360 UNTIL star$=öò
1.11
370 RESTORE ERROR
1.11
380 SYS öWimp_ForceRedrawò,-1,gx-4,gy-4,gx+dx+8,gy+dy+8
1.11
390 VDU 26,5
1.11
400 *FX 21,9
1.11
410 *POINTER
1.11
420 ENDPROC
1.11
N.B. (i) You will need a STAR shaped icon called Écommandæ, saved as
Éistaræ. However, if you want to test the program before designing an
icon, skip lines 100-120 and change öcommandò in line 130 to öunknownò.
1.11
(ii) Because the DeskTop uses the filename of the utility as a Éseedæ,
it important that the utilityæs filename be consistent with its
procedure names. For example: if you rename Éstaræ to Écommandæ then the
DeskTop will look for FNaction_command instead of FNaction_star, so you
will get an error!
1.11
Å Making the Print Key Save Ö Last month it was suggested in Neil
Strongæs article about making the print key print that a slight
modification of the program could make it save screen shots to the disc
using SCREENSAVE ö$.picò instead of HARDCOPYFX. However, this limits you
to one screen shot at a time (otherwise you will overwrite your last
one). If we use the system variables and update the Éprint keyæ program
we can get it to save a screen called É$.scr0æ, followed by, É$.scr1æ,
É$.scr2æ..etc!
1.11
871 adr r0,command1
1.11
872 swi öOS_CLIò
1.11
920 equs öScreenSave scr<file>ò ; FastSave even!#?
1.11
941 .command1
1.11
942 equs öSetEval file file+1ò
1.11
943 EQUB 0
1.11
944 ALIGN
1.11
1020 OSCLI(öSetEval file 0ò)
1.11
1030 END
1.11
If you wish to (re)set the Éfile countæ to n, then just type:
1.11
*SETEVAL file n
1.11
Å SpellMaster Browse in Wordwise Plus Ö If you have Spell-Master and
Wordwise Plus you can very easily write a two line segment program which
will call the browse window. i.e.
1.11
*BROWSE
1.11
DISPLAY
1.11
Thus if the program were in segment zero you could press <shift><print>
while editing your text and check your spelling using the browse window.
This obviously opens up all sorts of possibilities for Wordwise Plus to
use Spell Masteræs facilities.
1.11
Å PipeDream Ö For those who have not used View etc and who have
therefore not had to fight printer drivers, the following may be useful:
1.12
The printer driver is loaded on initialisation and when <Alt><P><D> is
used, but NOT when a document is printed, so any changes made to a
printer driver are not acted upon until either of these events. Itæs
obvious really, but if you havenæt registered the fact, it could cause a
lot of confusion.
1.12
For those who wish to use bold throughout a document, (e.g. for
producing something on a dot-matrix printer that will go through a Fax
machine) it would seem an obvious solution to put markers at the
beginning and end of the document and make it all bold highlight.
However, this is not a good idea because your printer will have to cope
with double printing each word, one word at a time! Instead, change the
printer driver so that the bold highlight is NOT cancelled at the end of
a line. i.e. change the Y to an N and either send the necessary ESC
sequence in the PON line or put a highlight 2 at the very start of your
text.
1.12
Å Transferring character definitions Ö If you have files produced by
the CHARDES program from the Master Welcome disc (mentioned last month,
page 34) here is a little BASIC program to run the files on the
Archimedes:
1.12
10 REM >ThinChar
1.12
20 CLS : INPUT öFileName ò;A$
1.12
30 OSCLI (öLOAD ò+A$+ö 12800ò)
1.12
40 FOR I=127 TO 32 STEP -1
1.12
50 VDU23,I
1.12
60 VDU(?(&12844+I-32))
1.12
70 VDU(?(&128A4+I-32))
1.12
80 VDU(?(&12904+I-32))
1.12
90 VDU(?(&12964+I-32))
1.12
100 VDU(?(&129C4+I-32))
1.12
110 VDU(?(&12A24+I-32))
1.12
120 VDU(?(&12A84+I-32))
1.12
130 VDU(?(&12AE4+I-32))
1.12
140 NEXT
1.12
Å Quazer (again). The fix for Quazer 1.42 is ?&3D090=N╝ of lives,
?&3D98F=&F2, *SAVE Quazcode 9000 +365AC, *settype Quazcode FF8. Å
Printing in binary Ö PRINT ~number% prints number% in hexadecimal but
there isnæt an equivalent for printing in binary. However, there are SYS
commands that will do it for you. The following program illustrates the
use of SYS &E0 which converts a number to a four byte binary number
string (SYSæs &DF, DE and DD convert to 3, 2 and 1 byte binary numbers).
1.12
The only other point of interest in the program is the way that the
leading zeros are stripped off by lines 190, 200 (which can be omitted,
of course, if you want the leading zeros!). The INSTR command finds the
position of the first ö1ò starting from the left hand end of the string,
take off one to give the number of zeros to be removed. The LEFT$
command at line 200 turns those zero characters into the character set
by pad$. (This illustrates the fact that you can use string functions on
the left hand side of an assignment.) If pad$ is a space character, the
binary numbers produced will all be the same length and so will be right
justified but if you want the strings left justified, you can set pad$
to CHR$0. (An alternative for left justification would be to use
numb$=RIGHT$(numb$,32-n%).)
1.12
10 REM > BinPrint
1.12
20
1.12
30 pad$=CHR$0 :REM left justifæn
1.12
40 pad$=ö ò : REM right justifæn
1.12
50 OS_ConvertBinary4=&E0
1.12
60
1.12
70 REPEAT
1.12
80 INPUT öNumber? ònumber$
1.12
90 number%=EVAL(number$)
1.12
100 A$=FNbinconvert(number%)
1.12
110 PRINT A$
1.12
120 UNTIL0
1.12
130
1.12
140 DEF FNbinconvert(numb%)
1.12
150 LOCAL numb$,n%
1.12
160
1.12
170 SYS OS_ConvertBinary4,numb%,
1.12
32,numb$ TO numb$
1.12
180
1.12
190 n%=INSTR(numb$,ö1ò)-1
1.12
200 LEFT$(numb$,n%)=STRING$(n%
1.12
,pad$)
1.12
210 =numb$
1.12
Å Hard Disc Head Parking Ö Donæt forget that if the RFS is selected,
it will accept the *BYE command but it will not park the heads on the
drive. You have to be in ADFS.
1.12
Å Screenload/save Ö It is interesting to compare the time taken to
save and load screens using *screensave and *screenload with the time
taken to define the whole screen as a sprite and save it using *Ssave or
load it with *Sload. In all modes there is considerable saving e.g.
1.12
Mode1 Mode12 Mode 15
1.12
*Screensave(load) 7(4) 25(18) 52(38)
1.12
*Ssave(load) 1(<1) 3(3) 7(6)
1.12
Å Libraries and *mount╔ If you *mount a disc, the library from the
previous disc remains in memory. For those with a single drive, this may
seem a nuisance but the reason the library is not changed is that you
can have a library on one drive and shove discs in and out of the other
drive without losing the library Ö particularly important with hard
discs. Obviously you could reselect the library with *library $.Library
but it is much easier to use *bye. That way, you donæt even have to use
*mount.
1.12
Å Reliable RS423 transfer from BBCæs. This is mostly just reiterating
what has gone before, but to transfer reliably from BBC to Archimedes at
9,600 baud you need to [1] use the 1.24 serial patch (on Archive program
disc 7) [2] Set *Configure DATA 5 (i.e. 8 data bits and 1 stop bit which
is the default on the BBC) and [3] connect the BBCæs RTS output to the
Archimedesæ DSR input (pin 6) instead of the CTS input (pin 8) and link
pins 1, 4 and 8 together.
1.12
Å View A3.0 Further to the patches given in July issue (Vol. 1.10 page
6) Richard House reckons that instead of using &FFæs in the various
locations you should use &00æs. (If someone has a working version of
A3.0, please send it in so that we can add it to our collection of
working patches!)
1.12
Å Viewstore 1.1 Ö Following on from the July Hints & Tips, not that
not only should &ABE2, 3 and 4 be set to &EA, but also, the LDA #&82,
JSR OSBYTE (&A9, &82, &20, &F4, &FF) routines need to be altered as with
View A3.0. These occur at locations &A256 Ö A25A, &AA22 Ö AA26 and &AB98
Ö AB9C. The code required in each of these locations is &A2, &00, &A0,
&00, &EA. (LDX #&00, LDY #&00, NOP). (If you canæt cope with these
technicalities, send us a disc with Viewstore 1.1 on it and weæll modify
it for you.)
1.12
Å Correct Nesting? To check that the nesting of loops, IFæs and CASEæs
is correct within a program, use LISTO2 and LIST the program. If at the
end of the program, the final line has two or more spaces after the line
number, youæve got an incorrect nesting somewhere. To check through,
there should be no spaces between line numbers and DEFPROCæs, DEFFNæs or
ENDPROCæs.
1.12
Å Marconi Trackerball. Archimedesæ mouseæs tail can apparently be
removed, so says Mr T A Doncaster, and plugged into an identical
connector within the Marconi RB2/PC-1 tracker ball and all works without
any further fiddling about. Watch that the supply polarity is correct
though.
1.12
Å Readable zeros. In InterSheet in particular, I find the slashed-
zeros misleading Ö they can easily be mistaken for eights. If you re-
program the zero character using a VDU23 command you can avoid the
confusion. It does increase the possibility of confusion with a capital-
O but that is far less important in spreadsheet work than confusion with
8. So, I store the following program in the RAM on the RFS and call it
up with *IS<return>:
1.12
10 REM >RFS:IS
1.12
20 VDU23,48,60,102,102,102,102,
1.12
102,60,0
1.12
30 CHAIN öRFS:ISHEETò
1.12
No doubt you could modify this program if you wanted to use the same re-
programmed zero character with other spreadsheet software.
1.12
Å Computer salutions. R.E.Boldero, in the July edition, asked for a
way of getting his computer to greet him each time he switched on. The
next hint shows a partial solution.
1.12
Å RFS Boot file Ö If you use a ROM podule with battery backup, you can
create a boot file that runs in the RFS and sets up all sorts of
goodies. I used to have a BASIC program called !BOOT which set up all
sorts of things on power-up or <ctrl-break> but if you are developing a
BASIC program, get stuck and press <ctrl-break>, you lose the program
because it is replaced by the boot program!!!!! After Adrian had fallen
into this trap a few times when using my computer, he developed the
following rather ingenious (not to say devious) EXECable boot program.
(*Configure Filesystem RFS, *Configure Boot and *OPT 4,3 in the RFS.)
1.12
We have since added a facility for making Arthur talk to you a bit more
politely, from an idea sent in by Chris Hayes.
1.12
To create the boot file, I start with the following Wordwise Plus file
which is then spooled as öRFS:!BOOTò. (The line numbers are purely for
discussion purposes.)
1.12
1 <gr>LL160<gr>PC ö~ò
1.12
2 VDU21
1.12
3 VDU6,11,32,32,32,32,32,32,21
1.12
4 VDU6,19,0,4,0,0,0,21
1.12
5 VDU6,19,1,0,0,0,0,21
1.12
6 VDU6,13,11,11,11,11,11,21
1.12
7 VDU6:COLOUR 6:VDU21
1.12
8 VDU6:PRINTöN o r w i c h C o
1.12
m p u t e r S e r v i c e sö
1.12
:VDU21
1.12
9 VDU6:COLOUR 7:VDU21
1.12
1.12
10 *SETCLI$PROMPT <13><10>Good
1.12
Morning! *
1.12
11 *IF SYS$TIME LEFT 2>11 THEN SET
1.12
CLI$PROMPT <13><10>Good Afternoon! *
1.12
12 *IF SYS$TIME LEFT 2>18 THEN SET
1.12
CLI$PROMPT <13><10>Good
1.12
Evening! *
1.12
1.12
13 *KEY0 *MOUNT 0|M*FREE|M*CAT|M
1.12
14 *KEY1 etc...
1.12
20 *KEY12 *FORMAT 0 D|M
1.12
1.12
21 *SET Run$Path ,ADFS:$.,RFS:$.
1.12
,%.
1.12
22 *SET Alias$> CAT
1.12
1.12
23 *FX255,8
1.12
24 *ADFS
1.12
25 *BASIC<gr>OC6
1.12
The LL160 command (1) ensures that the command lines are not split up
and the PC command ensures that the pad characters are sent when
spooling the file. (2) switches off the screen display, but since this
actual command appears on the screen, (3) moves up and wipes it out
again! (4) and (5) change foreground and background colours (6) moves
the cursor back up the screen, before printing out a welcome message in
a different colour, (7 & 8) and switching back to white (9). The IF
SYS$TIME commands then sets up the Arthurian prompt (normally a star on
its own) to be something a bit more timely. (This doesnæt automatically
change the greeting as the time of day changes, it gives you the
greeting that was appropriate last time you pressed <ctrl-break>.) The
function keys are then programmed, the runpath is set up etc (21 Ö 24)
(See Archive 1.7, page 8) before BASIC is invoked with an OC6 to re-
enable the screen.
1.12
(You could create it by making it a BASIC program that started...
1.12
*SPOOL RFS:!BOOT
1.12
PRINTöVDU21ò
1.12
and ended╔
1.12
PRINTö*BASICò;CHR$(6);
1.12
*SPOOL
1.12
I havenæt tried this BASIC version, but I presume it would work.)
1.12
Å Keyboard repeat speed. You may have noticed with First Word Plus or
other wordprocessors that when pressing <return> on auto-repeat it
cannot keep up and, when you take your finger off the key, it goes on
spewing out returns until the keyboard buffer is empty. You can avoid
this by reducing the auto-repeat speed with, say, *Configure repeat 15
(instead of the default of 8) and then pressing <ctrl-break>. (It should
really be called the auto repeat time as the number is the time in
centi-seconds between repeats.) Instead of changing the configuration,
you may prefer to could add a *FX12,15 command into the !BOOT file and
then press <ctrl-break> after your WP session to restore the default
repeat speed.
1.12
Å Disappearing cursor in EDIT. Have you noticed that if you hold the
cursor key down in the BASIC editor, the cursor disappears so that you
canæt see where it is on the line? Try changing the auto repeat speed as
mentioned in the hint above Ö doesnæt always work, but it seems to make
it better if you have a faster speed (smaller number in the command).
1.12
Å Auto indenting in EDIT. Some people like to put the indenting into
the program itself to show the structure (as opposed to using LISTO3 to
show the structure when you list it). If you are using the ARM BASIC
editor, you can add the spaces automatically as you type in the program.
What happens is that if you put a number of spaces at the beginning of
one program line then, when you press <return>, the new line has the
same number of leading spaces as the line before, so until you reach a
REPEAT or UNTIL or FOR or NEXT etc, you just press <return> and type the
next line without thinking about the indenting.
1.12
Å Disappearing programs in EDIT!! On the BASIC editor, if you edit a
line that occupies more than one screen line and make it shorter, it may
leave a blank line on the screen (no problem Ö this disappears as soon
as you move the cursor away from that line). If you then press <return>
to create a new line, the new line goes in the gap left by the editing
(still, apparently, no problem). However as soon as you try to use any
of the move, delete, or copy functions, all the line numbers go wrong
and cursor movement becomes rather unpredictable. Indeed, if you move
down the program, you will find that when the line that was edited moves
off the top of the screen, the scrolling continues and the program
disappears into oblivion! (Reset and OLD will recover your program
intact.)
1.12
The solution is, if you get a line gap, either re-number (which happens
automatically if the line numbers were already consecutive) or move down
a line then back up again before pressing <return>.
1.12
Å Pencil for Artisan. If you want to add a Épencilæ facility to
Artisan, the joined-lines function can be made to provide this in the
following way. (1) Using a copy (not the original!!) of the Artisan
disc, enter the BASIC editor and load ART5. (2) Use Search and Edit to
find DEFPROCKB. (3) Alter the procedure so that it looks like this:-
1.12
DEFPROCKB
1.12
LOCAL X%, Y%, B%
1.12
IF J%=6 AND CLARE%=-1 THEN
1.12
MOUSE X%,Y%,B% :ENDPROC
1.12
ELSE
1.12
REPEAT:MOUSE X%,Y%,B%:UNTIL B%<>BB%:ENDPROC
1.12
ENDIF
1.12
(4) Save this as ART5. (5) For completeness, use the Welcome utility,
SEDIT, to change the joined-lines icon into a pencil icon. (6) Now, with
the joined-lines function selected, holding down <select> draws a
continuous line. On releasing <select>, the normal rubber band line
appears, but it can be released by pressing <adjust> once. Pressing
<adjust> again carries out the UNDO function.
1.12
(While on the subject of modifying Artisan, note the short addition in
Acorn User, April æ88 which adds an airbrush effect.)
1.12
Å Star LC24-10. If you are having problems with getting a Star LC24-10
to accept output from First Word Plus or Graphic Writer, check the EPROM
chip in the printer next to the dip switches. If it has a label on it
showing version 1.0, contact Star Micronics and they will supply a free
up-grade.
1.12
Å Moving menus. If you find that your menus keep moving about, drag
the box down to the extreme bottom right corner of the screen until you
can go no further. This makes them a little more secure Ö simple, but
soothing!
1.12
Å Programming for speed. Programs like EMRæs SoundSynth and Minervaæs
Hoverbod and Missile Control are actually written in BASIC, with calls
to ARM assembly language routines where extra speed is really necessary.
1.12
If you thought professional quality programs demanded assembly language
only, think again! Perhaps there is a program you had thought of
writing, but did not feel could be written in BASIC; the speed of the
Archimedes has changed all of that.
1.12
Your strategy should be to write the whole program in BASIC first and
then see which routines need replacing with assembly language in order
to provide the right response times.
1.12
Mike Ginnsæ recent book from DABS Press, öArchimedes Assembly Languageò,
contains a large number of assembly language counterparts for BASIC
statements (he calls them ötemplatesò), and would be of great value if
you want to try your hand at this sort of approach. Although the book
has rather a large number of grammatical errors and is not quite as
fully comprehensive as it claims to be, but is still a good buy at
ú14.95. (Ian Nicholls)
1.12
First Word Plus Hints
1.12
Å Using PCæs Ö If you have access to a PC and a PC version of First
Word Plus, you may be interested to know that you can transfer files
between the two using the Getfile and Putfile utilities of the PC
Emulator. You can even transfer supplementary dictionaries the same way.
1.12
Å Adding printer drivers Ö It may not be very obvious how you add the
extra printer drivers that weæve provided on the program discs, onto
your First Word Plus disc. Suppose you want the Kaga Taxan driver. Put
in the program disc and type
1.12
*copy 1WP.cfg.Kaga_Taxan 1WP.cfg.* P
1.12
then change discs and press <space> as prompted. (Or use dual drives if
you have them.)
1.12
Å Default printer driver Ö If you want to make, say the Juki driver,
the default so that it comes up with that as the driver when you boot up
the disc, use:
1.12
*copy $.1WP.cfg.Juki $.Res*.
1.12
1WP.1wp_print F
1.12
The F in the copy command makes it over-write the existing default
driver.
1.12
Å Paging problems. You can now get a version of First Word Plus that
obeys the command in the printer driver to stop at the end of a page to
allow you to change the paper. Brian Carroll writes╔ öI returned my disc
to Acorn and had it back by return of post with a clear and helpful
letter. It seems that Acorn are at last getting the message about
customer support. There are only two modified files: $.resources.1WP.1WP
and $.resources.1WP. 1ML, so for anyone who has done some work to
configure their working master disc it would be simpler just to copy
these two files across than to start again from scratch. The bug-fix
works OK, so the printer drivers that I sent for Canon PW-1080A (program
disc number 10) will work properly.ò
1.12
Å LQ1050 Ö You can add double height to the printer driver merely by
using Search and Replace, changing 57 for 77 (double width for double
height). It works fine Ö the only thing to remember is to set the line
spacing to 2 in the ruler when choosing expanded pitch.
1.12
Å Large documents. Beware when you are printing long documents (30
pages+) as FWP can get a bit confused and print the wrong pages.