home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1997
/
ARCHIVE_97.iso
/
text
/
hints
/
vol_04
/
issue_05
< prev
next >
Wrap
Text File
|
1995-02-16
|
24KB
|
561 lines
Hints and Tips
4.5
Å ANSI C v3 on a SCSI Hard Disc ù After some trial an error, I finally
managed to install ANSI C v3 correctly on my new Oak SCSI card with 45Mb
hard disc drive. Hereæs what I had to do:
4.5
First change line 3390 in the ÉInstallNetæ program which is on all three
of the ANSI C discs so that it reads:
4.5
3390 DATA öADFS::0.$ò,öNET:$ò,öSCSI::SCSIDisc4.$ò
4.5
Then run the öInstallHDò program from each disc and always answer ÉYæ on
the overwrite options (otherwise, the back up program would stop).
4.5
If you use the included !Cstart obey file, you should not É*Set
Run$Pathæ in your !boot file and you should remember to modify the
!Cstart file to work with SCSI and not ADFS i.e. c$loc SCSI::4.$
4.5
Atle Baardholt, Norway
4.5
Å Deskjet Plus ink cartridges, recharging Ö Further to Bill Grahamæs
note in Archive 4.2 p8, Iæve found that Quinx Permanent Black works well
and is probably cheaper than Art Pen Ink. You do need to be careful that
you donæt inject more ink than the sponge will absorb, otherwise the
mess is dreadful! Stuart Bell, Brighton.
4.5
Å DropShip passwords Ö Passwords for DropShip are Dahlia, Gaggle, Kaunda
and Nautch.
4.5
Å ExAllPlus Ö This is a non-Wimp program which was written in an attempt
to catalogue my discs. It was designed for use with a single ADFS Floppy
drive and a SCSI Hard disc together with a Star LC10 printer using
continuous paper. Other printers may require some alteration to the
coding.
4.5
Most existing öExAllò and öCatAllò programs invoke the *EX and *CAT
calls (!) which produce a lot of unnecessary and confusing duplication
of libraries, directories etc. (I have memories of the reams of paper
produced by an öExAllò print-out of the original Archimedes Welcome
disc.) To avoid this, these calls have been re-written so that, in
addition to other changes, the directory headings have been reduced to
path descriptions.
4.5
The program will produce both screen and printed listings of either the
full disc or the root directory. The various options are selected by a
series of key-strokes and a default screen öExAllò routine has been set-
up which can be easily customised.
4.5
Use can be made of the condensed print option to produce catalogue
listings eight entries wide as against the usual five. This rather
spoils the screen display in this mode but it was thought useful to
maintain a check on the output to the printer. When using this option to
produce öEXò listings the screen display is OK and the reverse feed
facility of the Star LC10 enables double column print-outs to be
obtained.
4.5
The öGetTypeò program is loaded in by the main öExAllPlusò code and
contains all the FileType codes I have been able to find but it can
easily be updated.
4.5
(The listing is far too long to put in the magazine. I have put it on
the monthly program disc. Ed.)
4.5
Doug Tuddenham
4.5
Å First Word Plus embedded commands Ö If you switch off the Word
Processor mode of FWP you can enter printer commands directly into the
text. Double bracket command codes e.g. ((n))n1 can be entered to
change the printer font and style. For example, with a Star LC24-200 in
the following effects can be achieved:
4.5
Font ((F))0 Times Roman
4.5
((F))1 Sans Serif
4.5
((F))2 Courier
4.5
((F))3 Prestige
4.5
((F))4 Script
4.5
((F))5 Draft
4.5
Size ((S))0 Standard
4.5
((S))1 Double Width
4.5
((S))2 Double Height
4.5
((S))3 Double Width and Height
4.5
Colour ((C))0 Black
4.5
((C))1 Red
4.5
((C))2 Blue
4.5
((C))3 Violet
4.5
((C))4 Yellow
4.5
((C))5 Orange
4.5
((C))6 Green
4.5
Peter Thomas, Leics
4.5
Å FWP Cut and Paste Ö It is possible to cut a marked block of text in a
First Word Plus document and then paste it into another document. Both
documents must be loaded first. This may be obvious but I have only
just found out ù the hard way. Dave Livsey, Devon
4.5
Å Impression hints & tips Ö Now that I am using Impression for the
magazine, there are likely to be a number of hints & tips forthcoming.
Some of these may be obvious to the more experienced Impression users,
but bear with me because some of us are only just beginning and, in
fact, the experiences of someone just starting to use an application can
often be very helpful to others going through the same hoop. Also, when
you have been using an application for a while, you build up the feeling
that you know how it works and there may be facilities which you never
realised were available which new users pick up. Anyway, here are the
first few...
4.5
Adding styles to titles Ö If you want to add a style to a title, be sure
to select the whole line including the carriage return. In other words
either put the cursor by the left hand margin and drag down to the next
line or triple-click somewhere on the line. (Iæm sure you all know that
double-click selects a word, triple-click selects a line and quadruple-
click (or <ctrl-@>) selects a whole paragraph.) The reason for selecting
in this way is that if you only select by dragging across the line, you
omit the carriage return which remains in the base style. The problem
with this is that if, as in the title lines in Archive, the added style
says öreduce the space after the paragraph to zeroò, the carriage return
still has the full space-after-paragraph so the paragraph spacing
remains unchanged.
4.5
Entering point sizes Ö If you want to change the size of some text, you
mark it and press <shift-ctrl-S>. If the dialogue box is empty, you can
type in a number, say 18, and it will assume you mean 18 point. If you
decide that you want it a bit bigger and press <shift-ctrl-S> again, it
comes up with ö18ptò in the box. If you then type in, say, 2 <return> it
will interpret the ö18pt2ò as (18+2)pt and will give you 20pt! (Well, it
works in version 2.05.) Unfortunately, if you press <-> to try to put,
say, -2, it seems to interpret it as an escape and closes the box.
4.5
Marking, deleting and re-typing Ö (This is something that is obvious to
people coming to Impression via the Mac but may have been missed by
people brought up through RISC-OS.) If some text is marked, by any
means, and you want to replace it by some text you are about to type in,
there is no need to delete the marked text first. As soon as you start
to type, the marked text is deleted and transferred to the scrap-pad and
your typing appears in place of it. The deleted text can be used
elsewhere by pasting it in with <ctrl-V>.
4.5
Quick searching Ö If you want to find something quickly, find/replace is
a good way to do it. Call it up with <ctrl-f4> and then, to delete the
text already in the dialogue box, press <ctrl-U>, then type in the word
you are looking for and press <return>. (This use of <ctrl-U> applies to
all dialogue boxes Ö useful when saving a document under a new name.)
Remember though that it searches from the cursor downwards, so add a
<ctrl-uparrow> before calling up the find/replace box. (In the version I
have, 2.05, the cursor is sometimes not re-displayed in its new position
after a find/replace has been executed. In other words, it appears to be
still where you left it but it may actually be further down the document
so itæs worth getting into the habit of using <ctrl-uparrow> anyway.)
Also, donæt get tripped up, as I just did. If you set the öcase
sensitiveò option, it stays set until you switch it off again. So, if
you canæt find a word that you know is in there somewhere, check that
you have not left it in the case-sensitive mode from the last time you
used it.
4.5
Replacing double spaces Ö I was trying to do a selective search and
replace to remove double spaces and replace them with single spaces.
When I told it to find the next one, it sometimes didnæt appear to mark
anything. Most peculiar! Eventually, I realised what was happening. The
text was fully justified and the double spaces (the same would apply to
finding single spaces) were between the last word on one line and the
first on the next line. Thus Impression was marking the infinitesimally
small space at the end of the line, i.e. was marking nothing at all.
Thereæs nothing you can do about it (apart from removing the full
justification) but at least if you are aware of the problem, you wonæt
be so baffled when it happens.
4.5
Searching for hyphens Ö In some versions of Impression, it is not
possible to search and replace hyphens. I discovered this because, for
ease of typing, I was using a double hyphen where I wanted a dash in the
text, the idea being to replace them later. Impression refused to find
any occurrences of hyphen-hyphen. Consultation with CC revealed that
improvements in automatic hyphenation have resulted in this problem. The
way round it is to search for ÿ and replace it with Ö. Note the spaces
after the backslash and before the 45.
4.5
Smart quotes Ö If you want smart quotes in a text, i.e. the curly ones
instead of the straight ones on the key next to the return key, you can
type them in using <ctrl-]> and <ctrl-\> for single quotes and <shift-
ctrl-]> and <shift-ctrl-\> for double quotes. However, if you think
thatæs a bit of a fag to remember, use the normal quotes and then,
before printing, save the file (just in case of operator error!), save
the text with styles (perhaps to a ram disc as itæs only temporary),
select the whole text (<ctrl-T>), delete it and finally drop the saved
text back into the document. As the text is re-loaded, quotes are
automatically Ésmartenedæ.
4.5
Switching styles on and off Ö Those of you brought up in the Mac world
may not have realised, as I didnæt until today(!) that if you want
something in, say, bold, all you have to do is press <f4> to switch it
on, type in the bit that is to be in bold and then press <f4> again.
Obvious? Yes, it may be to those who come new to Impression but for
those of us steeped in Mac techniques, it comes as a welcome surprise.
4.5
If there are things about using Impression that Écame as a surpriseæ to
you, send them in to us (preferably on disc) and weæll share them with
other Impression users. We may even need an Impression Column.
4.5
Å Rotor and other gamesæ passwords Ö One way to obtain the Rotor
passwords (and possibly other games) is to load each of the gameæs files
into !Edit and use the ÉFindæ option to look for the first password.
When the password is found, the remaining passwords should be in the
next couple of lines. Andrew Campbell, Devon
4.5
Å Sony TV / Monitor Ö I was told by Beebug that I couldnæt use my Sony
TV as a monitor with the A3000, but in fact this is quite easy to do.
The sony TV requires a signal on pin 16 (blanking input) of the Scart
plug, which can simply be connected to pin 20 (video input). Keith
Raven, Slough
4.5
Å Z88 file transfer Ö Here is a little utility for people who wish to
transfer files from the Archimedes straight into suspended memory on the
Z88. It saves having to break a file into smaller sections first and,
of course, there is always a memory overhead in having at least part of
the file held in the Z88 Filer. With this BASIC program, the filer is
by-passed altogether.
4.5
10 REM >Suspender
4.5
20 REM Transfer file from Arc to Z88 suspended memory
4.5
30 REM ** IMPORTANT: Set z88 receive baud rate at 2400 (in panel) **
4.5
40 *CAT
4.5
50 *FX 8,5
4.5
60 INPUT öSend file? òfile$
4.5
70 *FX 3,119
4.5
80 OSCLI(öType ò+file$)
4.5
90 FOR i%=1 TO 350
4.5
100 PRINT ö#ò
4.5
110 NEXT i% : REM these pad chars are need for certain types of file
4.5
120 *FX 3,0
4.5
To load a file into PipeDream, enter ö:COMò as the öName of file to
loadò in the files menu. Then run öSuspenderò and immediately press
<return> on the Z88. Finally, when the BASIC prompt reappears on the
Archimedes screen, press <esc> on the Z88.
4.5
It is kinder to your disc drive to copy the target file into the
Archimedesæ RAM filing system first.
4.5
Jonathan Barnes, Watford
4.5
The following Hints and Tips come from Hugh Eagle of the West Sussex
Archimedes User Group.
4.5
Å Disappearing paragraph spaces in FWP ù If, at the end of a paragraph,
you type a space immediately before the carriage return, the carriage
return will be deleted when you subsequently reformat the paragraph.
Believe it or not, this is a öfeatureò of First Word Plus (documented in
the version 1 manual on page 110)!
4.5
Å Loading sprite files ù When you double click on a sprite file icon,
sometimes it is displayed at the bottom left-hand corner of a blank
screen and sometimes in a !Paint window. This is because the action the
computer takes when you try to örunò a sprite file depends on the
contents of the system variable Alias$@RunType_FF9. This variable is
defined by default, when the Archimedes is switched on, as öScreenLoad
%0ò. The effect of this is that when you double click on a sprite file
(type &FF9) icon, the operating system executes the instruction
*ScreenLoad [filename]; this clears the screen and then displays the
first sprite in the file at the graphics origin. However, when the
Desktop Filer öseesò the !Paint application (i.e. when a directory
window is opened in which !Paint is included) it runs the !Paint.!Boot
file which, amongst other things, redefines Alias$@RunType_FF9 in such
a way that when a sprite file is örunò the !Paint application is started
up (that is if it is not already running) and the file is loaded in.
4.5
Å Listing the contents of your (hard) disk ù The operating system
command ö*Count :4.$.* RVò will catalogue the contents of the root
directory and every sub-directory. As explained on pages 279/280 of the
User Guide, the output from this command can be redirected to the
printer by adapting the command to ö*Count :4.$.* RV {printer: } ò
4.5
Note: the spaces around the curly brackets and the > sign are important.
4.5
This method will redirect the output to the printer without displaying
it on the screen. An alternative method will send all text that is
displayed on the screen to the printer as well: first press <ctrl-B>
(i.e. hold down the ctrl key and simultaneously type B), then issue the
command ö*Count :4.$.* RVò then, when the listing has finished, press
<ctrl-C>.
4.5
Å Removing PC Access ù The menu which appears when you click the menu
button over any of the PC Access icons on the icon bar has no Quit
option and the application doesnæt seem to appear in the Task Manager
window. In fact, the application does appear in the Task Manager window
... in the öModule Tasksò section. Clicking the menu button over the
applicationæs name there and moving to the Task ÉPC Accessæ sub-menu
gives a öQuitò option.
4.5
Å Printing via a PC ù For some time I have been perplexed to find that
when I try to print a file created by the Archimedes !PrinterLJ printer
driver to a LaserJet printer attached to a PC, the printout stops part
way down the page. At first I thought it must be because of limited
memory in the printer so I tried creating the file at a lower print
density but this made no difference to how much of the page was printed.
4.5
I think I have now hit on the answer, namely that, when using the MS-DOS
Copy command to print a file which includes control codes, it is a good
idea to use the /b öswitchò, using the syntax:
4.5
copy [filename]/b LPT1
4.5
The insertion of /b after the filename causes MS-DOS to copy in öbinaryò
mode: i.e. it copies as many bytes as there are in the file. Otherwise,
in text mode, copying will continue only until the first end-of-file
marker (Ctrl-Z or ASCII character 26) is reached whereupon it will stop.
It is of course highly likely that a graphic printfile of many thousands
of bytes will contain this character several times, so it is not
surprising that only part of the page is printed!
4.5
Å Viewing !Draw files ù The standard way to view a draw file is to load
it into !Draw. However, this has an irritating tendency to place the
part of the picture you want to see outside the visible window. There
are (at least) two convenient ways of avoiding this problem:
4.5
One is to load the file into the !Display application from Shareware 26.
The other is to load it into an Impression frame (or, presumably, a
frame in one of the other DTP applications). In either case, the drawing
is scaled to fit the frame (the aspect ratio is preserved, so the
picture fills either the height of the frame or the width). One
advantage of Impression is that the frame can very easily be resized and
the drawing thereby magnified; another is that it makes it very simple
to display a number of drawings on a page and create an illustrated
catalogue.
4.5
Å Floppy disc E format ù So far as I know, the detailed format of ADFS
discs has not been published either in any of the manuals or in Archive.
Having recently deleted some files by mistake and been forced into some
detective work in order to recover them, I thought it might be helpful
to write down what I have found out about öEò format floppy discs:ù
4.5
With two sides, 80 tracks on each side, 5 sectors on each track, the
disc has 800 sectors of 1024 (&400) bytes each. The sectors can be
thought of as being numbered from 0 to 799 in the following order:
4.5
Track Head Sector
4.5
0 0 0
4.5
0 0 1
4.5
0 0 2
4.5
0 0 3
4.5
0 0 4
4.5
0 1 0
4.5
. . .
4.5
0 1 4
4.5
1 0 0
4.5
. . .
4.5
. . .
4.5
79 1 4
4.5
Each byte on the disc has a ödisc addressò equal to the sector number,
as defined above, times &400 plus the number of bytes into the sector.
Put it another way:
4.5
the disc address = (((( track * 2 ) + head ) * 5 ) + sector ) *
&400 + bytes into sector
4.5
Map format Ö The first two sectors on the disc contain duplicate copies
of the disc map. The first 64 bytes of the map contain the following
information:
4.5
byte 0 a checksum byte
4.5
bytes 1/2 the number of bits to the place in the map which marks the
first free space on the disc, counting from the beginning of byte 1 (if
there is no free space this number will be zero); the top bit of the 16
is always set, so, for instance, the value &8310 in these two bytes
would indicate that the first free space in the map could be found &310
bits or &310 DIV 8 bytes from byte 1, i.e. at byte &63
4.5
byte 3 &FF
4.5
bytes 4-35 the ödisc recordò as described on pages 1012/3 of the PRM
containing various details about the disc size, etc. which are the same
on all öEò format discs, ending with the Disc ID at bytes 24/5 and the
disc name from byte 26 to byte 35.
4.5
bytes 36-63 reserved (all zero)
4.5
bytes 64-863 (800 bytes) ù the actual disc map.
4.5
Each byte in the map represents one disc sector and the contents of the
map indicate how the disc is divided up between the various objects
(directories and files) on it. Each portion of the map is at least 2
bytes long, it begins with an identifying number (max. 15 bits), ends
with a 1 in the top bit of the last byte and all the bits in between are
zero. Thus, for instance, if the file with the identifying number 7
occupies 3 sectors the relevant portion of the map reads as follows:
4.5
first byte &07
4.5
next byte &00
4.5
last byte &80 (1 in the top bit)
4.5
The lowest identifying number is 2 and is reserved for the four sectors
which are initialised when the disc is formatted and which comprise the
two map sectors followed by the two sectors containing the root
directory. Identifying numbers are then allocated, in order, as new
objects are created.
4.5
A file may be fragmented into several pieces, in which case several
portions of the map will contain the same identifying number.
4.5
The portions of the map indicating free space on the disc are linked
together by a chain of pointers. As mentioned above, bytes 1 and 2, at
the start of the map sector, point to the first free space in the map.
At that point there is a similar pointer to the next free space (if any)
and so on until the last free space is reached, where the pointer is
zero.
4.5
A defective sector on the disc is identified in the map by number 1.
4.5
Directory structure Ö Each directory takes up two sectors. As mentioned
above, the root directory occupies the third and fourth sectors on the
disc (from disc address &800 to &FFF). Any sub-directory can be located
by looking up the relevant entry in its parent directory, finding the
identifying number (in the manner described below) and looking up the
number in the disc map.
4.5
The first five bytes in a directory contain a checksum byte followed by
the string öNickò. Then there are up to 77 entries of 26 bytes each
representing the various objects (files and sub-directories) in the
directory.
4.5
The format of each of these entries is:
4.5
bytes 0-9 name of file or sub-directory
4.5
bytes 10-13 load address
4.5
bytes 14-17 execution address
4.5
bytes 18-21 file length
4.5
byte 22 sector offset (see below)
4.5
bytes 23-24 identifying number as used in the map
4.5
byte 25 file attributes.
4.5
If the top 12 bits of the load address are all set (i.e. are &FFF) this
means that the file is östampedò and the remainder of the load and
execution address fields are used to record the file type and date stamp
as follows:
4.5
load address FFFtttdd
4.5
execution addressdddddddd
4.5
(the bottom byte of the load address field being used for the top byte
of the 5-byte format date and time record).
4.5
Note: in a disc sector editor which shows the bytes in order with the
lowest byte of each word first, these 8 bytes will appear as ödd tt Ft
FF dd dd dd ddò.
4.5
If not all the top 12 bits are set, the load and execution addresses
will (as their names suggest) determine what the computer does when the
file is *LOADed or *RUN (or double-clicked from the Desktop).
4.5
The sector offset in byte 22 is used where two files are mapped into the
same portion of the disc. In such a case the files share the same
identifying number (in bytes 23/4) but byte 22 indicates how many
sectors into the portion each file starts.
4.5
A typical example of this would involve two small files each fitting
into one disc sector (they might for instance be !Boot, !Run or !Sprites
files within an application directory). Because the minimum size of a
map entry is 2 bytes representing 2 sectors on the disc, it would be
inefficient to give each file a separate map entry, so the two files
would be made to share. In this case, assuming the shared identifying
number is say 8, bytes 23 and 24 of the directory entries for both files
would be &08 and &00 but byte 22 would be &01 for the file that occupies
the first sector and &02 for the second.
4.5
In the usual situation where a file has a map entry to itself, byte 22
is zero.
4.5
The bits of byte 25 (the file attributes byte) are used as follows:
4.5
bit 0 object has read access for you
4.5
bit 1 object has write access for you
4.5
bit 2 undefined
4.5
bit 3 object is locked against deletion
4.5
bit 4 object has read access for others
4.5
bit 5 object has write access for others
4.5
bit 6 undefined
4.5
bit 7 undefined
4.5
Bits 4 and 5 only have meaning to the network filing system. Bits 2, 6
and 7 should be set to zero.
4.5
General note: If you want to explore disc maps and directories it is
very handy to have a disc sector editor such as the !DiscEdit appli
cation on Careware 2. Failing that it is reasonably easy to construct a
program to read from a disc sector by sector (rather than file by file)
and to display the contents. The key to such a program is the SWI call
öADFS_DiscOpò. For instance, the BASIC instruction:
4.5
SYS öADFS_DiscOpò,0,1,address%,buffer%,length%
4.5
will read starting at the ödisc addressò (as defined above) given in the
variable address%, the number of bytes given in length% (1024 for one
sector) into the address in RAM stored in buffer%. Obviously, a certain
amount of caution is advisable since a very similar command (replacing 1
with 2 for instance) could result in writing to and corrupting the
contents of a disc.
4.5
4.5
4.5
{4 .5
Å Caverns Ö A simple map and the passwords are given at the end of the
magazine on page 60. Neil Berry