ObjAsm Macro's
04/01/2018 10:19
Where do 'Macro' get put - in a program file.

At the front - or at the end of a file (before or after 'END')? Have been trying to get the following 'macro' to work with 'ObjAsm'.

It is for encluding a 'signature' in the code.

When I try it - I get the error 'Invalid line start' ;begin of program MACRO $label SIGNATURE ALIGN 4 = $label,0 ALIGN   4 DCD &FF000000+(:LEN:$label+4):AND::NOT:3 $label MEND ;********** Code etc |First_Symbol| SIGNATURE More Code Thanks -- Colin Ferris Cornwall UK

Source is Usenet: comp.sys.acorn.programmer
Sign in to add a comment

Answer score: 5
04/01/2018 10:19 - As cferris@freeRemoveuk.com.invalid wrote on 5 Jul 2007: [snip: ObjAsm macro definition causing 'Invalide line start'] Congratulations. So the trouble was caused by simple pasting or typing errors. That solves a lot of mystery.

This sounds perfectly sensible. As I mentioned before, the macro definition has to be seen before it can be used.

In both cases, ObjAsm will interpret it as a label definition. It does not matter that this label is identical to a pseudo-opcode. The first time it is simply accepted. The second time is a re-definition of the same label, an gives an error. In neither case does it work as an ALIGN directive.

Remember that Assembly language and it's syntax is ancient (1950s). It predates allmost every other computer language. It most definitly predates sensible and systematic language definitions (the first one was ALGOL 60, from 1960).

And though the specific version of assembly for the ARM processor was constructed more recently, it still inherits quirks from the early days.

Furthermore it seems that anyone who wants to write code in assembly is expected to know beforehand what the general structure of assembly code is. For example: I've been looking through the Acorn Assembler manual to find details about the MACRO pseudo-opcode and how it should be used, but the information is very terse. In particular, it does not answer your question if it is possible to put a macro definition at the bottom of a file.

Maybe you can find some information on the general structure of assembly code on the internet. Or try to read the Acorn manual from cover to cover. Good luck.

-- Erik G http://www.xs4all.nl/~erikgrnh == See web site for email address

Source is Usenet: comp.sys.acorn.programmer
Sign in to add a comment

Answer score: 5
04/01/2018 10:19 - In message <baebe2fc4e.root@vertus.xs4all.nl> Erik G <erikgspm@no-use.invalid> wrote: I ended up re-typing it in - I thought perhaps when I pasted the Macro in - some control codes were copied over.

When I had it working - it seems 'ObjAsm' will take a 'Macro' from a external file - and a 'Macro' at the top of the file - but not at the end.

I did notice that 'ALIGN' could be at the start of a line - and no error was given - unless you did it twice :-| Using a fairly old version of 'Zap' - code looked ok but two lines were missing from the assembled !RunImage.

It turned out that two lines had - with fair bit of info on the line had wrapped around - extending the 'line' width showed it up.

I wonder if anyone wrote some tips on using 'ObjAsm'? Thanks -- Colin Ferris Cornwall UK

Source is Usenet: comp.sys.acorn.programmer
Sign in to add a comment

Answer score: 5
04/01/2018 10:19 - As cferris@freeRemoveuk.com.invalid wrote on 2 Jul 2007: Off the top of my head, I'd say a macro definition has to appear in the source before it is used.

For some strange reason ObjAsm seems to object against multiple spaces between ALIGN and its parameter. Try just one space.

-- Erik G http://www.xs4all.nl/~erikgrnh == See web site for email address

Source is Usenet: comp.sys.acorn.programmer
Sign in to add a comment

eDiscover
Helpforce eDiscover provides technical articles updated each dayHelpforce eDiscover RSS feed contains the latest technical articles in RSS
Click the logo to go back to the main page
Search eDiscover
  
Categories

Click an icon to go to that category

Helpforce eDiscover contains articles about Microsoft Windows Helpforce eDiscover contains articles about Apple products and MacOS Helpforce eDiscover contains articles about Linux and POSIX operating systems Helpforce eDiscover contains articles about Helpforce Helpforce has a large variety of technical information and articles for you to read Helpforce eDiscover contains articles about databases, MYSQL, SQL Server Oracle Helpforce eDiscover contains articles about Java, JVM and the JRE Helpforce eDiscover contains articles about the QNX operating system Helpforce eDiscover contains articles about Oracle Solaris and Open Solaris Helpforce eDiscover contains articles about RISC OS, Acorn and the BBC Micro Helpforce eDiscover contains articles about Amiga and AmigaOS

Type your comment into the box below