Re: HP50g -- first foray into assembly lang and sysrpl



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



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?

You can't! I think that every objects (from a sys-rpl program) are pushed on the TEMPOB (temporary objects) area. The solution is:
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.




.



Relevant Pages

  • HP50g -- first foray into assembly lang and sysrpl
    ... introduced myself to most of the user RPL commands, ... adding a few extensions to its Forth language. ... keeps track of possible candidates. ... How should I structure shared functions in assembly language? ...
    (comp.sys.hp48)
  • Re: programing with science jobs
    ... to program in assembly language, 'C', and possibly Fortran or Basic. ... execution of a single instruction cycle on the processor. ... Usually programming languages are platform and operating system ...
    (sci.physics)
  • Re: on our resident dorks.....
    ... >>>Assembler is a low-level programming language that is closest to ... >>>machine language, while machine language is the direct 'instruction ... >>>Definition of assembly language:>A programming language that is one step away from machine language. ... >Each assembly language statement is translated into one machine>instruction by the assembler. ...
    (uk.politics.misc)
  • Re: HP50g -- first foray into assembly lang and sysrpl
    ... NULLNAME is used for library entry that have no 'name'. ... adding a few extensions to its Forth language. ... keeps track of possible candidates. ...
    (comp.sys.hp48)
  • Re: HLA
    ... > Level Assembly language. ... HLA is almost totally proprietary. ... Mi certas ke miloj kaj miloj da popoloj scipovas la esperantan malgrau ...
    (alt.lang.asm)

Loading