flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > AVR assembly macros for FASM

Author
Thread Post new topic Reply to topic
El Tangas



Joined: 11 Oct 2003
Posts: 120
Location: Sunset Empire
El Tangas 20 Jul 2015, 11:28
I've been playing a bit with some AVR programming, using Atmel Studio 6, which IMHO is overbloated and slow.
So I thought: why not make AVR instruction macros and assemble with FASM?
After working on it for almost a week, I finished a more or less working version yesterday, only to find out about the existence of this new fasm g thing (actually been around for several months and I didn't notice) already with an AVR module Embarassed

It's better than what I made in almost every aspect: generates hex output, mine only binary; optimizes jumps; is case insensitive. And error checking, mine mostly trusts the programmer Wink

So duuuhh Sad all this work almost for nothing.

But anyway, my version as a strong point: it accepts more flexible operand forms for adiw, sbiw and movw 16 bit instructions:

Code:
;16 bit operand aliases
r26:r27
r27:r26
x
xl:xh
xh:xl
r26
xl    


All these forms are synonymous, I copied this behavior from the AtmelStudio assembler.

So, now I go to read the manual for fasm g and leave you with my version of the AVR coding example from fasm g (using my fasm macros). I'm sure my macros have some bugs, so if anyone has some AVR code to test, I'll be thankful.


Description:
Download
Filename: fasm_avr.zip
Filesize: 9.1 KB
Downloaded: 574 Time(s)

Post 20 Jul 2015, 11:28
View user's profile Send private message Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 20 Jul 2015, 19:29
Code:
flat assembler g  version 0.90.1436376581
avr_asm.inc [4] 
Error: invalid argument.
    

your code has fasm syntax, not fasmg

i have no m16 project, only m8/tn13/tn2313/tn26, but there is need to convert def files Rolling Eyes

_________________
UNICODE forever!
Post 20 Jul 2015, 19:29
View user's profile Send private message Visit poster's website Reply with quote
El Tangas



Joined: 11 Oct 2003
Posts: 120
Location: Sunset Empire
El Tangas 20 Jul 2015, 22:10
shoorick wrote:

your code has fasm syntax, not fasmg

i have no m16 project, only m8/tn13/tn2313/tn26, but there is need to convert def files Rolling Eyes


Yes, I know. I guess I will just improve on the fasm g version when I understand the language.
Post 20 Jul 2015, 22:10
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.