flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Non-x86 architectures > [arm] Bad instruction error

Author
Thread Post new topic Reply to topic
ahmadi86



Joined: 04 Aug 2013
Posts: 1
[arm] Bad instruction error
Hi

I want to assemble the following:

---------------------------------------------------------------------
IMPORT _main ; C entrypoint for Steppingstone loader.
AREA |C$$code|, CODE, READONLY
global Start

Start
b _main

DCB "ABCDabcd"
END
---------------------------------------------------------------------

which is part of an example for S3C6410 (ARM1176JZF-S).
but i got bad instruction error.

Cloud you please help me find a solution?
Thanks Smile
Post 04 Aug 2013, 13:50
View user's profile Send private message AIM Address Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 12125
Location: Another plane of existence
I don't know what you intend to link with in your code. But if you are trying to use fasmarm to assemble code you can try with the ELF example.

Code:
        format ELF executable
        entry start

        segment readable executable

start:  mov     r0,0
        add     r1,pc,hello-$-8
        mov     r2,hello_len
        swi     0x900004
        mov     r0,6
        swi     0x900001

hello:  db      'Hello world',10
hello_len=$-hello

        ;dummy section for bss, see http://board.flatassembler.net/topic.php?t=3689
        segment writeable

Or the DWARF example which is also included in the fasmarm download.
Post 04 Aug 2013, 14:08
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:  


< 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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2013, Tomasz Grysztar.