Re: Getting started on the HP49g+



Hi Rod,

SystemRPL cannot be executed directly by the calc, it has to be
compiled first.

You should have the extable library installed in your calc, if you
want, as I suppose, to work with symbolic names instead of system
addresses. Get it from hpcalc.org, either the original HP extable lib
from http://www.hpcalc.org/details.php?id=3245 or the enhanced one
extable2 lib from http://www.hpcalc.org/details.php?id=3940. Please,
ask again if you have any problem installing (attaching) libraries.

To make things easier, if you are mainly going to code in SysRPL and
not in machine code, set the system flag 92 (-92 SF). Then attach the
system library 256 (256 ATTACH), if you did not do it yet. Now, you
should be able to access the "Development lib" throught the APPS key
or just entering 256 MENU. Then make sure that you save your SysRPL
program as a string (enclosed in double quotes). Use the following
template:

"
::
YOUR_CODE
;
@"

Note that there should not be any newline after the "@" char. Finally
compile the string with ASM (listed in the development lib menu,
available after attaching the system lib 256). Once compiled, use the
command ->S2 to decompile the program and be able to edit it. It should
work now as you expect.

I hope I could help you. Best regards,

Alexis

PS: consult the appendices in Kalinowski's and Dominik's book, they
explain everything much clearer.

blueScreen wrote:
> Hello
>
> Can somebody help me get started with the HP49g+ System RPL
> programming.
>
> I assume that I have to type in the program code, store it as a
> variable in the Home directory, then use the ASM or ASM2 command to
> assemble the code into an executable. I've not seen this stated
> anywhere but it seems to be a fair bet. So I decided to try the example
> program on page 4 of 'Programming in System RPL' by Kalinowski and
> Dominik. These are the very frustrating results:
>
> 1. Typed in the program from page 4 which calculates the area of a
> circle:-
>
> ::
> CK1NOLASTWD
> CK&DISPATCH1
> BINT1 ::
> %2 %^
> %PI
> %*
> ;
> ;
>
> 2. Pressed the ENTER button and received an 'Invalid Syntax' message
> pointing to %^.
>
> 3. Changed %^ to % ^ (also had to change %* to % *)
>
> 4. Pressed the Enter button again and the whole code disappeared, not
> in the stack or in memory.
>
>
>
> After a bit of head scratching I them tried the following:
>
> 1. Created a variable called 'AREA' in the Home directory by using the
> 'New' soft menu key when in the file manager. This produced a variable
> called 'Area' of type 'Prog' and size 5.
>
> 2. Selected 'AREA' in the File Manager and pressed the 'Edit' soft menu
> key which gave me a blank screen.
>
> 3. I typed in the code as before.
>
> 4. Pressed the ENTER button and received the message 'Too Few
> Arguments'.
>
> 5. The variable 'AREA' was still size 5 and contained nothing.
>
> I'm obviously doing something wrong but I've not been able to find any
> documentation that tells me exactly how to enter and assemble code
> (i.e. the sequence of key strokes) on a HP49g+.
>
> The program works fine in Debug4x but I also need to know how to
> program the calculator directly.
>
> Any help to get me started would be much appreciated.
>
> Best Regards
> Rod

.