From: CT_Surveyor on
I am building a suite of Land Survey math utilities for the HP-49/50g,
and today ran into what appears to be a size limit of around 124K on
the
CRLIB command. I got an "insuffient memory" error when I tried to run
the command. The source files total about 150K, and there was about
96K available memory in HOME. By removing a couple of modules, I was
able to get CRLIB to run when HOME had 129K of available memory. I
assume that the limiting factor is that there has to be enough RAM in
HOME to hold the source files, config files, and the target library
file, so all of it has to total less than 240K.

So, is there a way to work around this issue? I had the idea that
maybe
CRLIB could be tricked into reading the source files from Port 2 or 3,
and only send the output to HOME? That way it seems that a Library
could be larger, maybe even the full 240K of a "clean" HOME directory?
I tried to implement this idea by tagging the names of the files in
the
$HIDDEN and $VISIBLE lists with the Port number, like this:
{ :2:filename1 :2:filename2 etc...} but got a syntax error from CRLIB.
Typing the list that way directly to stack Leval 1 and EVAL-ing it
actually works though; the program inside that object name would run,
so I know the syntax of the :2:filename isn't improper to the calc's
operating system. Anyway, CRLIB doesn't like it...is there any other
way
to do it?

I have one other question. I have also been trying to build this
Library
in Debug4X, but have not been able to get it to include all of the
source modules. My program consists of 15 SysRPL files (mostly
Informs), and 12 UserRPL files, which contain most of the I/O and
program flow control code. The Library that Debug4X outputs contains
only the SysRPL source files. The UserRPL files get sent to the
Emulator, and from there I cans ave them to hard disk or send them to
my calculator, but I haven't been able to figure out how to get
Debug4X to merge them into the library along with the SysRPL files. Am
I trying to get Debug4X to do something it isn't designed to do?

One other question about Debug4X: Is there a place to put the $Hidden
and $Visible configuration parameters, so that the output Library
works
the way it would if it had been created with CRLIB? I've perused the
Debug4x docs and can't seem to find any instructions on this.
From: Han on
You can always program the UserRPL using SysRPL syntax. Oftentimes,
conversion is as simply as:

<< DUP SWAP DROP >>

becomes

:: x<< xDUP xSWAP xDROP x>> ;

This can be easily done by taking the UserRPL programs in the HP49/
HP50 and uncompiling them into SysRPL. Then just use the INCLUDE
command to merge the UserRPL files (written in SysRPL). When you use
"INCLUDE filename.s", you do not need to have filename.s included in
your files list within Debug4x.


On Mar 5, 10:21 pm, CT_Surveyor <ctsurv0...(a)gmail.com> wrote:
> I am building a suite of Land Survey math utilities for the HP-49/50g,
> and today ran into what appears to be a size limit of around 124K on
> the
> CRLIB command. I got an "insuffient memory" error when I tried to run
> the command.  The source files total about 150K, and there was about
> 96K available memory in HOME. By removing a couple of modules, I was
> able to get CRLIB to run when HOME had 129K of available memory. I
> assume that the limiting factor is that there has to be enough RAM in
> HOME to hold the source files, config files, and the target library
> file, so all of it has to total less than 240K.
>
> So, is there a way to work around this issue? I had the idea that
> maybe
> CRLIB could be tricked into reading the source files from Port 2 or 3,
> and only send the output to HOME? That way it seems that a Library
> could be larger, maybe even the full 240K of a "clean" HOME directory?
> I tried to implement this idea by tagging the names of the files in
> the
> $HIDDEN and $VISIBLE lists with the Port number, like this:
> { :2:filename1 :2:filename2 etc...} but got a syntax error from CRLIB.
> Typing the list that way directly to stack Leval 1 and EVAL-ing it
> actually works though; the program inside that object name would run,
> so I know the syntax of the :2:filename isn't improper to the calc's
> operating system. Anyway, CRLIB doesn't like it...is there any other
> way
> to do it?
>
> I have one other question. I have also been trying to build this
> Library
> in Debug4X, but have not been able to get it to include all of the
> source modules. My program consists of 15 SysRPL files (mostly
> Informs), and 12 UserRPL files, which contain most of the I/O and
> program flow control code.  The Library that Debug4X outputs contains
> only the SysRPL source files. The UserRPL files get sent to the
> Emulator, and from there I cans ave them to hard disk or send them to
> my calculator, but I haven't been able to figure out how to get
> Debug4X to merge them into the library along with the SysRPL files. Am
> I trying to get Debug4X to do something it isn't designed to do?
>
> One other question about Debug4X: Is there a place to put the $Hidden
> and $Visible configuration parameters, so that the output Library
> works
> the way it would if it had been created with CRLIB? I've perused the
> Debug4x docs and can't seem to find any instructions on this.

From: TW on
> So, is there a way to work around this issue? I had the idea that
> maybe
> CRLIB could be tricked into reading the source files from Port 2 or 3,

Not really. You have definitely outgrown the built in tools for
several reasons by now. I'd highly recommend moving to debug4x.

> I have one other question. I have also been trying to build this
> Library
> in Debug4X, but have not been able to get it to include all of the
> source modules.

The easiest way to go about doing this is to write a little userRPL
program on your machine that reads your current directory, runs ->S2
on everything one by one and saves the files out to a directory on the
SD card. Make sure you have extable installed. Then the source files
on the sd can be easily pulled into debug4x.

You CAN use the INCLOB directive, but if your "modules" consist of
more than 1 userRPL program, it won't work the way you'd like. That is
really to include a single compiled object, such as a larger string,
or HPGCC program like this:

xNAME
INCLOB c:\my_help_file.txt

> One other question about Debug4X: Is there a place to put the $Hidden
> and $Visible configuration parameters, so that the output Library
> works

xNAME MY_ROUTINE_NAME <-- that's a visible command

NULLNAME MY_HIDDEN_NAME <-that's an invisible subroutine

Feel free to send me an email and I can work with you directly. I'd
even be happy to call you on the phone and walk you through the
process so you can get any questions answered directly. I know a thing
or two about surveying programs since I built one that is about 450kb
when fully compiled (that is with heavy compression which debug4x
makes quite easy to do :-) .

TW
From: Yann on
With such a large library to build,
maybe you could consider the use of compression ?

You can expect a typical 1.5 compression ratio, which would save
something in the range of 50K.
Not to bad, and enough to get below upper limit.

You could have a quick overview by simply compressing your directory
with a standard compression program.

Regards