Thread View: comp.sys.acorn.tech
3 messages
3 total messages
Started by Trygve R|ste
Mon, 14 Dec 1992 12:37
ObjAsm: Conditional includes
Author: Trygve R|ste
Date: Mon, 14 Dec 1992 12:37
Date: Mon, 14 Dec 1992 12:37
62 lines
1248 bytes
1248 bytes
#ifndef _objasm_problem #define _objasm_problem A problem with ObjAsm is the that the headerfile containg the register names, only can be included once. If it is included more than one time, you get an error saying that the registername is already defined. Here is an example: ; >h.regs r0 RN 0 r1 RN 1 ... END ; >h.someinclude GET h.regs ... END ; >s.some objasm file GET h.regs GET h.someinclude ... END Now h.regs. will be included twice, resulting in an error. In Ansi-C, this is cured in an elegant way: /* >h.include1 #ifndef _h_include1 #define _h_include1 /* body of includefile: */ void function a(); void function b(); struct ... ... #endif Now, the body of the includefile is only inserted once. Is something like this possible in ObjAsm/AAsm? -Trygve #endif
Re: ObjAsm: Conditional includes
Author: George Taylor
Date: Fri, 18 Dec 1992 13:52
Date: Fri, 18 Dec 1992 13:52
11 lines
759 bytes
759 bytes
Ah, good someone else who realises this problem actually exists. I haven't found any way round this yet, I've just setup my headers carefully and included them once and only once in the 's' file in the correct order. Perhaps write a tool which handle #include directives and ignores everything else? -- George
Re: ObjAsm: Conditional includes
Author: mckay_g
Date: Sun, 20 Dec 1992 06:42
Date: Sun, 20 Dec 1992 06:42
26 lines
868 bytes
868 bytes
If you want to do conditional includes in objasm/aasm you need to do someting
like the following (can't be too sure if the is exactly right because my
manuals are on the other side of the world!)
; File to define register names
[ :NOT::DEF:regs
GBLL regs
r0 RN 0
r1 RN 1
.
:
; <stuff to include>
]
END
I seem to recall that this does the trick.
Rob
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads