home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Meeting Pearls 3
/
Meeting_Pearls_III.iso
/
Pearls
/
disk
/
Devs+Handler
/
MEM-Handler
/
MEM.Doc
< prev
next >
Wrap
Text File
|
1994-10-04
|
4KB
|
103 lines
MEM-Handler 37.1
(c) 1994 Peter Corlett. ALL RIGHTS RESERVED
***************************************************************************
"FULLY LIMITED WARRANTY" ['Borrowed' from Citadel]
"I warrant this product against defect in material and workmanship for a
period of 1/5 of a second or one (1) disk revolution, which ever occurs
first.
"During the warranty period we will replace, repair or ignore (at our
option) any defective item provided it has not been subjected to flagrant
abuse such as: inserting the disk in a disk drive; reading the instruction
manual, etc; or used in accordance with the directions supplied.
"No other warranties are expressed including the warranties of
merchantablity; fitness for a particular purpose; or delivery of product
ordered. Nothing in this statement shall be construed as a written
statement of warranty or guarantee including, but not limited to, this
sentence.
"This statement takes away specific legal rights and you may have other
rights taken away which may vary from state to state."
i.e. this is FREEWARE. If you wish to supply it with one of your own
programs (e.g. the assembler example below) then please contact me (at
least so I can give you the latest version.)
Public domain libraries and resellers may not sell this program, for more
than 2 UK pounds, or its equivalent in any other currency.
***************************************************************************
The original MEM-Handler (hereafter referred to as MEM:) was hacked
together in one hour, after a suggestion by Simon Goodwin that he missed
something similar from the QL. Since writing it, I have updated into
something that may even be useful to someone!
MEM: is a handler to access memory directly from DOS. Rather than RAM:,
which is a true filesystem, with real files and directories, MEM: just
accessed memory directly. It's a sort of raw mode for RAM:
MEM: requires Kickstart 2.04 or higher. Who uses 1.3 these days? Using
2.04 means I can reduce the size of the executable somewhat, by using ROM
routines.
To use MEM: you just Mount it, and then access the file
"MEM:<LENGTH>/<START>".
<LENGTH> is the (maximum) size of the memory area you want to access. MEM:
will not allow you to go outside the bounds of this length. On reading,
you will get an EOF when you have read <LENGTH> bytes. On writing, the
write will be truncated, and the program accessing MEM: will be told how
much was actually written (whether the program bothers to tell you is up to
it; most don't bother.) This number may be decimal (42), octal (042), or
hexadecimal (0x42).
<START> is the start address of the memory you want to access. MEM: does
NOT attempt to allocate the memory you refer to. Make sure that you know
what you are doing, especially when writing.
If you omit <START> then MEM: will allocate a clear bit of memory for you.
On closing the file it will free it again for you, and you can consider the
data lost.
Here are a few examples:
To look at the Kickstart ROM:
Type MEM:0x80000/0xf80000 HEX
To write a file to the middle of CHIP RAM (assuming 2Mb CHIP here): This
will only ever overwrite a maximum of 1000 bytes.
Copy <file> MEM:1000/0x100000
Silly usage:
Copy MEM:1000 MEM:1000/0x100000
; clear memory
Dir >MEM:1000/0x100000
; write directory to memory
Type MEM:1000/0x100000
; show directory
What is the use? Firstly, it can be used for debugging, and looking at
memory. Another use would be to present the memory of an editor to an
assembler, without having to write out an intermediate file. The errors
from the assembler can be written direct to memory, and looked at with the
editor.
If you need to contact me for any reason:
Snail Mail: Peter Corlett, 382 Slade Rd, Erdington, Birmingham, B32 7LG,
ENGLAND.
E-Mail: corlepnd@aston.ac.uk (if you're lucky...)