I really need to look at the helper. A bug, probably only known to me is
that all the files need to end in ".h" and that the headers need to be in
their separate folder to work. The toolbox helper looks at every file in
the input (header) folder. If there is a file in the folder that is not a
header, the helper *will* choke.
The first thing the helper does is to find out what the largest header file
is in the folder and makes a buffer for it, so handles do not need to be
resized everytime a source file is encountered. If there was a 1 meg source
file, there shouldnt be a problem as long as there is enough memory to
create the handle.
Unfortunately, the documentation is weak. Hopefully, I'll work on better
documentation when I start upgraded its capabilities, which is what I was
thinking about last weekend.
W.
-----Original Message-----
From: Brian J. Hughes [mailto:BrianHughes@...]
Sent: Monday, April 03, 2000 8:03 PM
To: futurebasic@...
Subject: RE: [FB] LowMem accessors (was Gestalt question)
At 7:13 PM -0400 on 4/3/00, Edwards, Waverly wrote:
>I havent used codewarrior in some time. I think the older versions have a
>file call lowmem.h that has an implementation to access most if not all the
>low memory addresses. If someone has that file, it would be most
beneficial
>to the group if we translated it, getting everyone up to date on how to
>access these memory address the not so new way.
>
It's funny you should mention that. I used your example program
Toolbox Helper to convert the Universal Headers files that I have
with my copy of CodeWarrior. It produced the file LowMem.tlbx with
this for the rom function:
TOOLBOX FN LMGetROMBase () = Ptr `0x2EB8,0x02AE
TOOLBOX LMSetROMBase (Ptr) `0x21DF,0x02AE
I had recently downloaded the latest Universal Headers and found that
the ToolBox Helper choked on a few files. It terminated on files
larger than ~200k in size. I tried increasing memory but it didn't
help.
I didn't need to use them though. I tried Bill Michael's System info
program, he had asked for volunteers to try on their machines. I
found that he had commented out this code. I uncommented it,
compiled in FB^3 and it worked fine as is:
--------
LONG IF gestaltResponse& = 406 'was 512
PRINT "ROM Subversion =";
PRINT HEX$({[_romBase] + &H12})
'below for FB^3
toolbox FN LMGetROMBase = pointer ` 0x2EB8, 0x02AE
DIM romSubVersion as unsigned short
romSubVersion = {FN LMGetROMBase + 0x12}
PRINT "ROM subversion: " HEX$(romSubVersion)
'
PRINT "(Original G3 is V4.0 F2, Blue & White V4.5 F1, iMacs V4,5 F2.)"
END IF
---------
Only works with FB^3, I'd guess. You can't add ToolBox functions to
FBII can you?
Brian Hughes
--
To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>