ARM Assembler Help Requested...



#2

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?


#3

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


#4

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. ;)

#5

hello,

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

cyrille


#6

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


#7

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.


#8

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...

#9

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


#10

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

#11

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.

#12

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!

Possibly Related Threads...
Thread Author Replies Views Last Post
  WP-34S assembler & constants Marcel Samek 8 1,044 06-27-2013, 12:27 PM
Last Post: Marcel Samek
  Patch for wp34s assembler Marcel Samek 0 357 06-26-2013, 05:35 PM
Last Post: Marcel Samek
  HP 71b Assembler Michael Fehlhammer 2 555 09-06-2012, 08:20 AM
Last Post: Michael Fehlhammer
  Homemade ARM-based Calculator Programming Cable Katie Wasserman 18 2,864 08-27-2012, 11:25 PM
Last Post: Katie Wasserman
  [WP34s] Assembler question fhub 6 849 05-14-2012, 03:08 PM
Last Post: Marcus von Cube, Germany
  WP 34S: Simplification to the Assembler Marcus von Cube, Germany 2 546 05-06-2012, 02:41 AM
Last Post: Marcus von Cube, Germany
  HP-41 NUT Assembler question MichaelG 6 850 02-14-2012, 03:35 AM
Last Post: MichaelG
  HP-41 MCode Assembler/Linker 32-bit version MichaelG 19 1,892 01-22-2012, 12:44 PM
Last Post: MichaelG
  [WP34s] Assembler problem fhub 2 569 01-19-2012, 07:32 PM
Last Post: Neil Hamilton (Ottawa)
  Different keyboards on ARM 12c Jose Gonzalez Divasson 6 912 10-17-2011, 01:52 PM
Last Post: Paulo MO

Forum Jump: