flat assembler
Message board for the users of flat assembler.

Index > Non-x86 architectures > FASMARM v1.44 - Cross assembler for ARM CPUs

Goto page Previous  1, 2, 3 ... 23, 24, 25 ... 31, 32, 33  Next
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 16 Sep 2013, 01:49
Beta release docs for the upcoming v8 architecture.

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0487a/index.html

I do plan to update fasmarm for v8, but as there is no hardware available yet it might take a while.
Post 16 Sep 2013, 01:49
View user's profile Send private message Visit poster's website Reply with quote
den_po



Joined: 17 Jul 2006
Posts: 23
Location: Russia, Cheboksary
den_po 19 Dec 2013, 20:40
fasmarm doesn't work correctly with long filenames

Code:
format ELF dwarf executable
nop    


Quote:
C:\13_12_20>FASMARM.EXE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.asm
flat assembler for ARM version 1.71.13 (1141440 kilobytes memory)
error: Fatal: Failure when processing line numbers.
Post 19 Dec 2013, 20:40
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 20 Dec 2013, 02:06
den_po wrote:
fasmarm doesn't work correctly with long filenames

Code:
format ELF dwarf executable
nop    


Quote:
C:\13_12_20>FASMARM.EXE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.asm
flat assembler for ARM version 1.71.13 (1141440 kilobytes memory)
error: Fatal: Failure when processing line numbers.
Thanks for the report. I will look into this when I am back at my desk next week.
Post 20 Dec 2013, 02:06
View user's profile Send private message Visit poster's website Reply with quote
farwayer



Joined: 28 Jan 2014
Posts: 2
farwayer 28 Jan 2014, 12:43
Hi revolution! Thx for great work! But I have some troubles with elf format and external C function. Can you explain is this a bug or am I doing something wrong?

Code:
format elf
thumb

STACK_TOP = 0x20002000

macro vector handler {
    dw (handler + 1)
}

section ".text"
dw STACK_TOP
vector start ; reset

start:
    bl main
hang:
    b hang

extrn main    


arm-none-eabi-readelf -a out/debug/vectors.o
Code:
Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .text             PROGBITS        00000000 000034 00000e 00   A  0   0  4
  [ 2] .rel.text         REL             00000000 000042 000008 08      3   1  4
  [ 3] .symtab           SYMTAB          00000000 00004a 000030 10      4   2  4
  [ 4] .strtab           STRTAB          00000000 00007a 000020 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

There are no section groups in this file.

There are no program headers in this file.

Relocation section '.rel.text' at offset 0x42 contains 1 entries:
 Offset     Info    Type            Sym.Value  Sym. Name
00000004  00000101 R_ARM_PC24        00000000   .text

There are no unwind sections in this file.

Symbol table '.symtab' contains 3 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 00000000     0 SECTION LOCAL  DEFAULT    1 .text
     2: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND main

No version information found in this file.    


Relocation section '.rel.text' does not contain 'main' symbol. And then after linking 'bl main' jmp to wrong address
Code:
Disassembly of section .text:

00000000 <main-0x10>:
   0:   2000            movs    r0, #0
   2:   2000            movs    r0, #0
   4:   0008            movs    r0, r1
   6:   0000            movs    r0, r0
   8:   f7ff fffa       bl      0 <main-0x10>
   c:   e7fe            b.n     c <main-0x4>
        ...

00000010 <main>:
  10:   2000            movs    r0, #0
  12:   4770            bx      lr    
Post 28 Jan 2014, 12:43
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 28 Jan 2014, 13:02
As shown in the ReadMe.txt file in the download:
ReadMe.txt wrote:
Relocations for ELF and PE are not supported at this time. Although, one user has reported that relocations are working correctly with PE format, use at your own risk, I have not tested them yet.
Also I forgot about the long filename report above Embarassed I'll look into that.
Post 28 Jan 2014, 13:02
View user's profile Send private message Visit poster's website Reply with quote
farwayer



Joined: 28 Jan 2014
Posts: 2
farwayer 28 Jan 2014, 13:27
revolution wrote:
Relocations for ELF and PE are not supported at this time. Although, one user has reported that relocations are working correctly with PE format, use at your own risk, I have not tested them yet.


Oh, look like I missed this. So, at the moment there is no way to mix fasm and C code? Sad
Post 28 Jan 2014, 13:27
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 28 Jan 2014, 13:45
farwayer wrote:
So, at the moment there is no way to mix fasm and C code? Sad
Not at this time. I have no system available to test such things as C, linking, and other HLL concepts.
Post 28 Jan 2014, 13:45
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 29 Jan 2014, 02:10
Version 1.31 now available:
Quote:
v1.31 2014-Jan-29
  • Fixed long file names error during line number processing
This has been compiled against fasm v1.71.17 and thus adds the postpone functionality.
Post 29 Jan 2014, 02:10
View user's profile Send private message Visit poster's website Reply with quote
aralf



Joined: 04 Feb 2014
Posts: 2
aralf 04 Feb 2014, 15:36
Is there a way to force fasmarm to encode an instruction as thumb-2 32bit?
Post 04 Feb 2014, 15:36
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 05 Feb 2014, 01:30
aralf wrote:
Is there a way to force fasmarm to encode an instruction as thumb-2 32bit?
Put it into THUMB mode and use the wide (.w) modifier.
Code:
thumb
b.w $           ;<--- wide (32-bit) instruction
adds.w r0,r0,r1 ;<--- wide (32-bit) instruction

b.n $           ;<--- narrow (16-bit) instruction or an error if it doesn't fit
adds.n r0,r0,r1 ;<--- narrow (16-bit) instruction or an error if it doesn't fit

b $             ;<--- auto sized, narrow is preferred, wide if necessary
adds r0,r0,r1   ;<--- auto sized, narrow is preferred, wide if necessary    
Disassembles to:
Code:
00000000: F7FFBFFE 7M     b     0x0
00000004: EB100001 7M     adds  r0,r0,r1
00000008:     E7FE V4T    b     0x8
0000000A:     1840 V4T    adds  r0,r0,r1
0000000C:     E7FE V4T    b     0xC
0000000E:     1840 V4T    adds  r0,r0,r1    
Post 05 Feb 2014, 01:30
View user's profile Send private message Visit poster's website Reply with quote
aralf



Joined: 04 Feb 2014
Posts: 2
aralf 11 Feb 2014, 13:58
thank you, works!
Post 11 Feb 2014, 13:58
View user's profile Send private message Reply with quote
alorent



Joined: 05 Dec 2005
Posts: 221
alorent 22 Mar 2014, 10:25
I have just downloaded FASMARM! It's a great project!

Is it possible for compile FASMARM as DLL using the "FASM as DLL" source code from Tomasz?

I'm interested in compiling it as a DLL to generate some basic opcodes "on the fly".

Thanks!
Post 22 Mar 2014, 10:25
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 22 Mar 2014, 14:36
alorent wrote:
Is it possible for compile FASMARM as DLL using the "FASM as DLL" source code from Tomasz?
Sure. It should be possible. I've never tried it. If I get some time then maybe I will see how it goes. If you can get some success then let us know.
Post 22 Mar 2014, 14:36
View user's profile Send private message Visit poster's website Reply with quote
uor99



Joined: 04 Dec 2014
Posts: 42
uor99 06 Dec 2014, 00:42
revolution, how great your work is !
Post 06 Dec 2014, 00:42
View user's profile Send private message ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 06 Dec 2014, 12:32
It still needs updating for the new 64-bit instruction set. But that will have to wait until next year at the earliest.
Post 06 Dec 2014, 12:32
View user's profile Send private message Visit poster's website Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1166
Location: Overflow
Matrix 06 Dec 2014, 19:53
revolution wrote:
farwayer wrote:
So, at the moment there is no way to mix fasm and C code? Sad
Not at this time. I have no system available to test such things as C, linking, and other HLL concepts.


I suggest these, in this order:

A20-OLinuXino-MICRO-4GB_integrated_nand_flash
A20-OLinuXino-MICRO
Beaglebone Black
raspberrypi
Post 06 Dec 2014, 19:53
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 21 Dec 2014, 09:42
Version 1.32 now available:
Quote:
v1.32 2014-Dec-21
  • Update with all fasm changes as at 1.71.31
  • Change the format of the undocumented CRC32 directive.
This has been compiled against fasm v1.71.31 and thus gains some extra functionality such as:
  • Additional preprocessor directive irpv
  • Additional "bsf" and "bsr" operators for numerical expressions
  • In the definition of macroinstructions the last argument can now be followed by "&" character to indicate that the argument can be filled with all the remaining contents of line that called the macro
Post 21 Dec 2014, 09:42
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 21 Dec 2014, 13:42
Matrix wrote:
revolution wrote:
I have no system available to test such things as C, linking, and other HLL concepts.


I suggest these, in this order:

A20-OLinuXino-MICRO-4GB_integrated_nand_flash
A20-OLinuXino-MICRO
Beaglebone Black
raspberrypi
Thanks for the suggestion, but access to hardware is not the issue (we make our own). It is more the lack of motivation on my part to deal with HLLs and fighting the compilers: Header files, command line switches, compilers, linkers, make files, object files, bloat, more bloat, extra files, temporary files, pre-compiles files, etc. makes me want run far away.
Post 21 Dec 2014, 13:42
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 22 Dec 2014, 04:31
revolution wrote:
... the lack of motivation on my part to deal with HLLs and fighting the compilers ...
This is the kind of thing I would like to avoid: link. Ugh, that kind of stupidity, and the SWITCH/CASE fall though default, and forced prototypes to stop complaints, etc.

Why we humans are so dumb as to produce, and use, languages like that I might never know.

[/rant]
Post 22 Dec 2014, 04:31
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1392
Location: Piraeus, Greece
Picnic 16 Mar 2015, 12:16
revolution wrote:
farwayer wrote:
So, at the moment there is no way to mix fasm and C code? Sad
Not at this time. I have no system available to test such things as C, linking, and other HLL concepts.


Any plans for high-level control structures such as IF, WHILE, REPEAT, etc ?
Post 16 Mar 2015, 12:16
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3 ... 23, 24, 25 ... 31, 32, 33  Next

< 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.