Re: HP50g -- first foray into assembly lang and sysrpl
- From: Tanguy Briancon <briancon_tanguy@xxxxxxxxxxxxxx>
- Date: Wed, 21 May 2008 23:20:53 +0200
Robert Swan wrote:
Having become reasonably familiar with my new hp50g, and at least
introduced myself to most of the user RPL commands, I thought I should
finally bite the bullet and have a go at some System RPL.
Oddly enough, I was was already fairly familar with Saturn assembly
language; I have owned an HP-71B since about '85 (IIRC) and enjoyed
adding a few extensions to its Forth language. I thought sysrpl
should be fairly easy in comparison. Not so sure now.
Do you know this:
http://www.hpcalc.org/details.php?id=5142
You can't! I think that every objects (from a sys-rpl program) are pushed on the TEMPOB (temporary objects) area. The solution is:
Well, enough of my background. On to the background of my questions.
I thought an interesting first challenge would be the old Mastermind
style game, "Cows and Bulls". The vanilla flavour of this game
wouldn't require great speed, but I have a variant where the computer
keeps track of possible candidates. After each of your guesses,
besides telling you so many cows and bulls, it goes through the set
of remaining candidates, eliminating those which wouldn't match this
result and tells you how many candidates remain. For example:
Guesses C B
1274 0 1 3579 1 1 6978 0 1 Possible: 3
(FYI, the remaining candidates are: 1538 3258 6534)
There is clearly quite a bit of processing early on when all 3024
candidates are still valid and a combination of sysrpl and assembly
language seemed to be called for (of course it would be cheating to
use C or ARM!).
At long last, down to my questions:
1. How should I structure shared functions in assembly language?
only one ASM program which pop on the stack a number which says
what the ASM program have to do.
2. Where is there a clear summary of the syntax differences in the
flavours (HP, MASD, others?) of sysrpl and of assembly language?
No I don't think so.
I was used to HP's Saturn instruction set and have been using
Debug4x as a development environment for this exercise, but I
would like to get away from the PC (Windows in particular)
and MASD is right there on the calculator.
Besides this, I have been confused from time to time when
tutorials downloaded from hpcalc.org were referring to a
syntax that wasn't available in the other environment. IIRC,
I couldn't find an MASD equivalent of HP's NULLNAME, but I bet
it has one. Also took me a while to work out the need for
FEXTERNAL for entry points introduced by "^".
Do you know this:
http://staff.science.uva.nl/~dominik/hpcalc/
If you read french http://www.courbis.fr/spip.php?rubrique8
regardez voyage au centre de la hp 48g.
If you can't read french:
http://www.courbis.fr/spip.php?rubrique9
you will find a translation for hp48s(x).
Of course hp48s,49g,50g are not the same but
mostly they are still very intersting books on hp48
models.
.
- References:
- HP50g -- first foray into assembly lang and sysrpl
- From: Robert Swan
- HP50g -- first foray into assembly lang and sysrpl
- Prev by Date: Re: UserRPL is really slow on the49G
- Next by Date: Re: UserRPL is really slow on the49G
- Previous by thread: Re: HP50g -- first foray into assembly lang and sysrpl
- Next by thread: Xlib error running HPtide
- Index(es):
Relevant Pages
|
Loading