home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1997
/
ARCHIVE_97.iso
/
text
/
hints
/
vol_03
/
issue_05
< prev
next >
Wrap
Text File
|
1995-02-16
|
12KB
|
387 lines
Å Window resizing bugs/errors Ö The bug in Interactive help Archive
2.11 page 8 is not a bug but a result of !Help setting a window work
area extent in less than a multiple of four. The program is in C so I
canæt edit it. I discovered this when writing my own software. When a
window was stretched to its full extent it would not grow smaller in the
y direction until you moved in to the left. R.D.
Å *WIPE with mouse Ö In BASIC, (or at the operating system prompt for
that matter. Ed.) if you have the pointer ON (*POINTER) and do *WIPE *,
a mouse pointer appears enabling you to use <se-lect> to delete the file
and <menu> or <adjust> to keep the file.
3.5
Å Alerion cheat Ö For those who have the RISC-OS version of Alerion,
you can select the wave you wish to play by pressing the letters <A> to
<O> while on the title screen.
3.5
Å BASIC Editor bugs Ö There is a bug or two in the Basic Editor v1.00
that comes on the Applications Disc 2. If you exactly fill the first
line so that the cursor jumps to the next line, and then press return,
the screen looks something like this:
3.5
10 REM This is meant to be right over to the edge
3.5
11 C
3.5
20 xxxxxxxxxxxx
3.5
30 xxxx
3.5
If you then press the <page down> key, the comp-uter will freeze.
3.5
Another bug, whose circumstances cannot be so readily repeated, occurs
when pressing the <cursor down> key causing the program to shoot off the
top of the screen, and nothing will bring it back again.
3.5
Both of these are Émildæ bugs because pressing <reset> followed by
typing *BASIC and OLD and EDIT restores everything back to it original
state.
3.5
Å BASIC first please Ö If you want your computer to start up in BASIC
instead of the desktop, use *CON. LAN. 4 and then do a <ctrl-break>.
This also means that the full computer memory is available to your
program. If you go to BASIC with <f12> to get a star command and then
typing BASIC, you only get the memory available that has been allocated
to the next application under the task display (651516 bytes). The
reason for this is that BASIC is being run as the next task within the
desktop environment. This can be seen by typing QUIT which will drop you
back into the desktop with everything as it was before.
3.5
The other way to get the full memory available is to press <shift-ctrl-
f12> which will drop you out of the desktop completely, closing all
tasks. This drops you into the operating system, so typing BASIC and
then QUIT brings you back to the operating system prompt, not into the
desktop.
3.5
(This is one of those things which, according to Adrian is öobviousò,
but to those of us who never reads manuals, it is news! So, the next
time you discover something which someone else thinks is öobviousò, send
it in to us as an H&T. Ed.)
3.5
Å CTRLing VDU scrolling Ö You can use the <scroll lock> key on the
Archimedes to stop the computer printing (either to the screen or
printer). Another method of doing this is to hold down the <shift> and
<ctrl> keys. However, if you just hold the <ctrl> key down then you can
slow down the speed of printing to about a 20th of it original speed.
3.5
Å Database routine Ö If youæve written a database in BASIC e.g. an
address book, it can be difficult to find a name unless you stick to a
format where all entries are in upper case, or lower case apart from the
initial letters. This little routine which uses 104 bytes is the
solution. As well as accepting upper or lower case it also will accept
the character ö#ò as a single character wildcard .
3.5
It is identical to the BASIC command.
3.5
INSTR(string,substring,start of search)
3.5
Except the variables A%, $B% and $C% are declared before X=USR(code) is
called, i.e.
3.5
$B%=ömain stringò
3.5
$C%=ösubstringò
3.5
A%=start of search
3.5
X=USR(code)
3.5
There is an example program with the listing.
3.5
160 DEFPROCass
3.5
170 FORopt=0TO3 STEP3
3.5
180 P%=code
3.5
190 [ OPT opt
3.5
200 STMFD R13!,{r1-r12 ,R14} ;store
3.5
registers. not R0
3.5
210 MOV R5,R0 ;start of search
3.5
220 MOV R0,#0 ;reset R0 (A%) for
3.5
return
3.5
230 LDRB R7,[R2,#0] ;load R7 with
3.5
first byte of $C%
3.5
240 CMP R7,#13 ;is it a CR?
3.5
250 BEQ end ;i.e. null sub-
3.5
string. exit to BASIC
3.5
260
3.5
270 .nomatch
3.5
280 MOV R4,#0 ;initialise counters
3.5
290 MOV R3,#0
3.5
300 .nextchar
3.5
310 LDRB R6,[R1,R5] ;get byte of
3.5
string
3.5
320 CMP R6,#13 ;is it CR ie end
3.5
of string
3.5
330 BEQ end ;if yes, substring
3.5
not found. exit
3.5
340 AND R6,R6,#95 ;AND to ignore
3.5
case
3.5
350 LDRB R7,[R2,R4] ;first byte of
3.5
substring
3.5
360 CMP R7,#13 ;is it a CR?
3.5
370 SUBEQ R0,R5,R3 ;yes i.e. end
3.5
of substring
3.5
380 ;R5-R3 gives
3.5
position in string
3.5
390 ADDEQ R0,R0,#1 ;plus 1. First
3.5
char=0
3.5
400 BEQ end ; and exit
3.5
410
3.5
420 AND R7,R7,#95 ;AND to ignore
3.5
case
3.5
430 ADD R5,R5,#1 ;increment
3.5
counters for next chars
3.5
440 ADD R4,R4,#1
3.5
450 CMP R7,#3 ;is it a hash?
3.5
If so make equal
3.5
460 MOVEQ R6,R7
3.5
470 CMP R6,R7 ;ARE bytes equal
3.5
480 ADDEQ R3,R3,#1 ;yes Ö get next
3.5
sub string char
3.5
490 BEQ nextchar
3.5
500 BNE nomatch ;no try next
3.5
string char
3.5
510 .end
3.5
520 LDMFD R13!,{r1-r12 ,R15};restore
3.5
registers. R0 has INSTR
3.5
530 ]
3.5
540 NEXT
3.5
550 ENDPROC
3.5
Å Disappearing menus Ö After selecting an option on a menu, the menu
disappears. To prevent this: instead of using <select> to select option,
use <adjust>, and the menu will then stay on the screen.
3.5
Å Drawing with Outline fonts - If you possess Acorn DTP, you can use
the !FontEd public domain program to create !Draw paths of the
individual letters. This is done by dragging the character in the main
!FontEd window into the !Draw document window. Once transferred, the
letter can be manip-ulated just like any other drawing e.g. rotated,
stret-ched, filled, etc. With a little patience, some very effective
titles can be created.
3.5
Å DTP memory Ö A couple of hints to give extra memory when using Acorn
DTP with a 1M machine: load the printer driver first and then quit
before entering DTP. Only the modules are used for printing, which are
left installed after you quit. Secondly, the use of screen mode 1 uses
only 24k of memory and since it is a four colour mode, it gives a better
grey scale than Mode 0.
3.5
Å E-Type bug Ö There is a bug in ÉAll Tracksæ option of E-Type. If you
press hard on the brakes when the time reaches 0:01 the program
sometimes goes bonkers and when you are placed on the new track, your
Trip Score increases.
3.5
Å External ST506 drives Ö If you add an external hard drive to an old
440 or 310, you may find that the whole system dies completely for no
apparent reason. The problem is that if the external drive is powered up
before the computer, a small voltage can be produced within the computer
so when the power suplly on the computer tries to power up, it sees this
voltage, panics and shuts down again! The simple solution is to power up
the computer first and then the external drive.
3.5
When switching off, work on the ölast in, first outò principle and
switch off the drive first. This is good practice since, if the drive is
left switched on, as the computer powers down, extraneous signals on the
driveæs data and control lines could conceivably be interpreted as
something nasty like, ö Please wipe track 0, sector 0ò and you end up
with a öBad Free Space Mapò! (Iæm sure that is Somebodyæs Law.)
3.5
Å Interdictor Cheat Ö It is possible to alter your landing pad in
Interdictor. Edit StateSave via !Edit. Go down to the 10th number and
alter it. Note that Landing pad 2 is actually Landing pad 1 and so alter
the 10th number to a 1 and so on. Also note that there are 7 runways,
the 7th being known as the number 6. This might sound confusing but
really itæs not!
3.5
Å Large hard drives on A410/1? Ö Someone asked us to find out whether
it was possible to put hard drives with more than 8 heads onto an A410/
1. All we have been able to find out is that, to get the extra head
select line, you need to change links LK12 and LK13. Whether the
software will cope, we do not know. If anyone has any success with it,
perhaps they would let us know.
3.5
Å Virus protection Ö If you are passing discs around, especially PD
discs, guard yourself against the virus. When you receive or pass on a
disc, you run the risk of your machine picking or up a virus or logic
bomb.
3.5
Passing on files: Format an unused disc and copy only the files you wish
to send. Alternatively, wipe the disc (*Wipe * FR~C), copy the files and
run my disc wiping program (see below). This is needed because deleting
a file does not erase the data on the disc; it just causes the computer
to forget about it. The data can be retrieved by anyone with a disc
sector editor, so run the program if you want to thoroughly scrub the
unused parts of the disc.
3.5
Receiving files: Copy across only those files which you need. Try not to
use the desktop as some logic bombs can sit in an applicationæs !Boot
file and spring out at you when you open their directory viewer.* After
copying, the original disc should be cleared by reformatting.
3.5
10 REM >Eradicate
3.5
20 REM Guards against the Virus and
3.5
accidental giveaways of data
3.5
30 REM Erases totally the unused parts
3.5
of a disc
3.5
40 REM PUBLIC DOMAIN by Sandie Goh
3.5
50 REM Version 1.21 (20-Sep-1989)
3.5
60 :
3.5
70 MODE 3:OFF:DIM blankspace 409600
3.5
80 PRINTöDisc Eradicatorò
3.5
90 PRINTö===============òÉ
3.5
100 PRINTöPUBLIC DOMAIN by Sandie Goh,
3.5
Version 1.21 (20-Sep-1989)öÉ
3.5
110 PRINTöErases totally the unused
3.5
parts of a disc.ö
3.5
120 PRINTöHELPS guard against viruses,
3.5
logic bombs etc.öÉ
3.5
130 PRINTöInsert disc to be cleaned in
3.5
drive 0 and press a key.öÉ
3.5
140 *FX 15,1
3.5
150 IF GET
3.5
160 PRINTöCompacting, to collect free
3.5
space into a single block.ö
3.5
170 REPEAT
3.5
180 *COMPACT 0
3.5
190 SYSöADFS_FreeSpaceò,ö0ò TO total,
3.5
biggest
3.5
200 UNTIL biggest=total
3.5
210 PRINTöSaving dummy files into the
3.5
free space to wipe anything there.ö
3.5
220 REM Use unlikely filenames to avoid
3.5
clashes
3.5
230 IF biggest>409600 THEN
3.5
240 OSCLI (öSAVE ZZDelONN12 ò+STR$~
3.5
blankspace+ö +64000ò)
3.5
250 biggest=biggest-409600
3.5
260 ENDIF
3.5
270 OSCLI (öSAVE XXDelONN12 ò+STR$~
3.5
blankspace+ö +ò+STR$~biggest)
3.5
280 PRINTöDeleting the dummy files to
3.5
release the space.öÉ
3.5
290 *REMOVE ZZDelONN12
3.5
300 *DELETE XXDelONN12
3.5
310 PRINTöI now pronounce this disc
3.5
clean.ö
3.5
*If you donæt believe me, I was myself the victim of a booby-trapped
disc. After mounting a disc I picked up from a friend, I copied its
contents across to my hard disc, only to find that it (the winchester)
was now blank! Believing the problem to be a bug in the desktop or
chance disc failure, I restored the hard disc and tried again Ö the same
thing happened again, but this time when I did a *Compact 4.
3.5
I tried everything and was just about to give up and complain to Acorn
when a friend phoned me with the same problem. It turns out that he too
had a copy of the disc I had picked up and I immediately became
suspicious. Further research showed that the disc contained an invisible
program which sat in the machine waiting for an opportune moment, then
zapped the Winchester with a *Wipe :4.* FR~C.
3.5
The subtlety of the program makes it even more deadly Ö the öerrorò
occurs when you write to the hard disc using the desktop, so you are
lead to think (as I was) that a bug or disc error is responsible. So be
warned. Guard against the virus.
3.5