flat assembler
Message board for the users of flat assembler.
Index
> Non-x86 architectures > [AVR] fasmg assembles with error(s) |
Author |
|
tomi 08 Nov 2017, 15:15
I tried to assemble a lil project that correctly assembles with avrasm2.exe but fasmg throws error(s). Is there a better add-on for fasmg available?
|
|||
08 Nov 2017, 15:15 |
|
revolution 08 Nov 2017, 16:00
Can you show the source code, or the line(s) that give(s) an error?
|
|||
08 Nov 2017, 16:00 |
|
revolution 08 Nov 2017, 16:53
".include" is not fasm syntax. fasm uses "include" without the dot (.) character. fasmg follows this convention also. You can change the source code and remove the leading dot.
Note that all assemblers are different. In general you usually can't assemble unchanged source code from one assembler on another assembler, unless you take specific steps to support it and the assemblers are very similar. |
|||
08 Nov 2017, 16:53 |
|
tomi 08 Nov 2017, 17:02
Thanks for explanation. I'll see if I can make fasmg to accept .include as well, because changing my sources is not an option, I code in asm almost every day and there is tons of code there.
|
|||
08 Nov 2017, 17:02 |
|
Tomasz Grysztar 08 Nov 2017, 20:26
At the end of AVR.INC that comes as an example with fasmg you may find a macro that already adds support for some directives starting with dot:
Code: macro ? line& match =BREAK?, line _BREAK else match .=ORG? addr, line if ~ DSEG? org (addr) shl 1 else org addr end if else match .=EQU? name == value, line name? = value else match .=DSEG?, line if ~ DSEG? virtual at DSEG?.$ DSEG? = 1 end if else match .=CSEG?, line if DSEG? DSEG?.$ = $ end virtual DSEG? = 0 end if else line end match end macro Code: else match .=INCLUDE? file, line include file |
|||
08 Nov 2017, 20:26 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.