The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

ARM Assembler Help Requested...
Message #1 Posted by Bill Zimmerly on 12 May 2010, 4:31 p.m.

I copied the listing from this post...

Re: confused about ARM

...and made the modification to Claudio Lapilli's code suggested by Cyrille de Brébisson.

The problem is, every time I put it on the stack and execute the ASM command, it aborts with "asm Error: Invalid File".

(Note: it ends with <CR><CR>@ as it should AND it fails like this whether I use either of the ASM or asm commands.)

Does anyone see anything wrong with the listing?

      
Re: ARM Assembler Help Requested...
Message #2 Posted by BruceH on 13 May 2010, 7:06 a.m.,
in response to message #1 by Bill Zimmerly

I think it should end <nl>@ not <cr>

            
Re: ARM Assembler Help Requested...
Message #3 Posted by Bill Zimmerly on 14 May 2010, 2:18 a.m.,
in response to message #2 by BruceH

Quote:
I think it should end <nl>@ not <cr>

Hi Bruce!

Either way, the code I meant was produced on the HP-50G with the Right-Shift-Period key combination. ;)

      
Re: ARM Assembler Help Requested...
Message #4 Posted by cyrille de Brébisson on 13 May 2010, 8:17 a.m.,
in response to message #1 by Bill Zimmerly

hello,

can you post the exact string that you are trying to compile?

cyrille

            
Re: ARM Assembler Help Requested...
Message #5 Posted by Bill Zimmerly on 13 May 2010, 2:20 p.m.,
in response to message #4 by cyrille de Brébisson

Hi Cyrille!

Here is the exact string:

"CODE

% SMALL ARM LAUNCHER SAVE

GOSUB SKIPCODE % INSERT ARM CODE HERE !ARM % TEST CODE - RETURN ONLY MOV PC,LR !ASM *SKIPCODE A=PC A=A-4.A C=RSTK ACEX.A D0=C % END OF BLOCK C=C-A.A % NIBBLES TO COPY D1=(2) 0 % ALIGN MOVEUP CD1EX ARMSAT LOADRPL ENDCODE

@"

(Everything between the double-quote marks.)

Also, Cyrille, do you know of any ARM code more advanced than the simple examples presented in the AUR Manual? I would really like to know how to do I/O with the keyboard, display, and serial port with ARM code - but haven't been able to find anything at all on this.

- Bill

                  
Re: ARM Assembler Help Requested...
Message #6 Posted by Han on 13 May 2010, 10:12 p.m.,
in response to message #5 by Bill Zimmerly

CODE ... ENDCODE is a SysRPL object. Perhaps you need to incude:

!NO CODE
!RPL

Either include that at the top of your source code, or make sure to have flag -92 set (so that MASD assumes SysRPL mode). The other possibility is to remove 'CODE' and 'ENDCODE'

Han

Edited: 13 May 2010, 10:12 p.m.

                        
Re: ARM Assembler Help Requested...
Message #7 Posted by Bill Zimmerly on 14 May 2010, 2:16 a.m.,
in response to message #6 by Han

Quote:
CODE ... ENDCODE is a SysRPL object. Perhaps you need to incude:

!NO CODE
!RPL

Either include that at the top of your source code, or make sure to have flag -92 set (so that MASD assumes SysRPL mode). The other possibility is to remove 'CODE' and 'ENDCODE'

Han


Hi Han!

Per your instructions, I did each of those steps and still got the same error each time. :( It's very puzzling...

                  
Re: ARM Assembler Help Requested...
Message #8 Posted by BruceH on 14 May 2010, 8:31 a.m.,
in response to message #5 by Bill Zimmerly

Hi Bill,

This code that you have posted works just fine for me provided flag -92 is set. If not then it gives the invalid file error that you have been seeing.

In case there is something else, my flags are: { # 205010FF0h # 0h # 801000000A000000h # 0h }

Version HP50-C Revision #2,08

                        
Re: ARM Assembler Help Requested...
Message #9 Posted by Bill Zimmerly on 14 May 2010, 2:04 p.m.,
in response to message #8 by BruceH

BruceH and Han,

It works now when I set flag -92. Thanks for your help!

(Han - I don't know why it didn't work before when I was doing what you said to do, but I re-entered the program, set flag -92 and it assembled to a "Code" object. Possibly a character I didn't see?)

Anyway - it works and I'm grateful for everyone's help. :)

Sincerely, - Bill

Quote:
Bill,

Rather than coding in ARM assembly, consider coding in C with HPGCC instead. This will compile into native ARM code and it's really fast. Libraries let you access the keyboard and display, though I'm not sure about the serial port.


Hi David!

Since my goal is to port my ARM zForth system to the HP50G, I prefer to stick to ARM assembler exclusively. But I do agree with what you wrote about HPGCC - it's fast and quite useful! ;)

- Bill

                  
Re: ARM Assembler Help Requested...
Message #10 Posted by David Hayden on 14 May 2010, 9:35 a.m.,
in response to message #5 by Bill Zimmerly

Bill,

Rather than coding in ARM assembly, consider coding in C with HPGCC instead. This will compile into native ARM code and it's really fast. Libraries let you access the keyboard and display, though I'm not sure about the serial port.

                  
Re: ARM Assembler Help Requested...
Message #11 Posted by Bill Zimmerly on 14 May 2010, 5:18 p.m.,
in response to message #5 by Bill Zimmerly

Quote:
Also, Cyrille, do you know of any ARM code more advanced than the simple examples presented in the AUR Manual? I would really like to know how to do I/O with the keyboard, display, and serial port with ARM code - but haven't been able to find anything at all on this.
I don't know why I missed this before, but the HPGCC source modules have a lot of good stuff to study in there. Cool!


[ Return to Index | Top of Index ]

Go back to the main exhibit hall