Pages: [1]   Go Down
Author Topic: Is ASM possible with Arduino?  (Read 960 times)
0 Members and 1 Guest are viewing this topic.
Virginia
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
Professional Botter
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just heard a rumor on another form that Assembler was possible with Arduino.

Back in the day I was a heck of an Assembler programmer (for the PC that is).

Buddy
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 594
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.nongnu.org/avr-libc/user-manual/inline_asm.html

or you can just start writing everything in .S files and use the assembler through command-line
« Last Edit: August 30, 2012, 10:15:33 pm by frank26080115 » Logged

Freelance engineer, consultant, contractor. Graduated from UW in 2013.

Virginia
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
Professional Botter
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Frank!

Something to read this weekend.

Buddy
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you know how to write assembler files, the simplest method to include those ".S" files in your project is the "iard" method.

You must use the GCC assembler syntax that is a bit different from the AVR assembler syntax. 

A minor problem is that the ". S" files should be placed in a subdirectory of "libraries". "\arduino-1.0.1\libraries\AssemblerFiles" for example. You can use as many assembler libraries subdirectories as you wish but must reside in "libraries" directory, not in your projects/sketches directory.

http://arduino.cc/forum/index.php/topic,37588.0.html

Note: the syntax, general estructure and philosophy of inline assembly, asm(), __asm__(), and so on, is a real nightmare  designed by sadists computer scientists
Logged

Pages: [1]   Go Up
Jump to: