Discussion:
New machine language port
(too old to reply)
c***@gmail.com
2019-12-21 01:17:54 UTC
Permalink
Hello all,

I am porting a machine language program written for the HP-48 to the HP50g, and I encounter some problems with this. The mnemonics below are not recognized by MASD. Are there replacement mnemonics for this? This list is not the program itself, but the mnemonics from the program parts, with which I have problems, and are in a random order. Who can help me with this? Sincerely, Karel.

D1=A
D1=D1+ 5
DSRB.F A
C=C-CON A,5
B=C A
C=R3
B=B+A A
C=C+A A
C=C+CON A,16
D0=C
A=A&C A
A=C A
A=R4
D0=A
A=A+C A
D=C A
B=A A
CD0EX
A=DAT0 S
Joe Horn
2019-12-21 12:48:25 UTC
Permalink
The mnemonics you listed are valid for the 50g's ASM command. So if ASM is erroring, my guess is that you probably have a setting wrong somewhere. One setting which makes a difference is flag -92: Set means "MASD SysRPL mode" and clear means "MASD asm mode". Or you might have a syntax error (e.g. a missing final "@" in your source code string).

On the other hand, if you're using a non-HP assembler, you might need an HP<>AG translation table, such as the following:

http://holyjoe.net/hp/ROSETTA.TXT

For example, if you look up the D1=A mnemonic, you'll see that it's a valid HP mnemonic, whose AG equivalent is MOVE.A A,D1. Explanations are at the top of the file.

The HP 50g's built-in ASM command assembles the following (useless Code object) correctly in SysRPL mode (when flag -92 is set):

"CODE
D1=A
ENDCODE
@"

ASM assembles the following into the same (useless) Code object when flag -92 is clear (asm mode):

"D1=A
@"

Do not run that Code object; it's just an example of using one of the opcodes you listed.
Loading...