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 ... 6, 7, 8 ... 31, 32, 33  Next
Author
Thread Post new topic Reply to topic
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 01 Jun 2006, 14:47
Post 01 Jun 2006, 14:47
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20299
Location: In your JS exploiting you and your system
revolution 01 Jun 2006, 15:38
vid wrote:
The core_data part was missing in imports
I am disappointed that this section is required, with x86 windows we can leave it out without any problem.

I did a quick script for the ordinals, see the attachment.


Last edited by revolution on 02 Jun 2006, 02:20; edited 1 time in total
Post 01 Jun 2006, 15:38
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 01 Jun 2006, 19:59
without it, it does nothing, no loader error message, no crash report, just nothing.

now you could make another script which deletes COREDLL_ lines, i think that means these are unsupported. Smile

(i should install vim already, i know...)
Post 01 Jun 2006, 19:59
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
sylwek32



Joined: 27 Apr 2006
Posts: 339
sylwek32 01 Jun 2006, 22:28
Do you know a assembler for windows ce sh3 machines ?
I need..
Can somebody help me ?
Please..
Got win CE 2.0 on my Jornada 620lx..

I can pay 10 euros if somebody makes a sh3 win ce version of fasm..



Have paypal!
Post 01 Jun 2006, 22:28
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 01 Jun 2006, 23:58
i don't have idea what SH3 is, but i have only seen SH4 mentioned in documentation. And commercially, rewriting assembler module would be surely worth more, and if somebody will do it, then for joy of it and not for money.

but maybe you could introduce SH3 technologies to us Wink
Post 01 Jun 2006, 23:58
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20299
Location: In your JS exploiting you and your system
revolution 02 Jun 2006, 01:38
sylwek32 wrote:
I can pay 10 euros if somebody makes a sh3 win ce version of fasm..
If you can offer MUCH more than that people will be happy to do it for you if they have the time. It takes a longer time than 10 EUROS will cover to develop this sort of thing. I think the Hitachi processors are not the future for WinCE products, better you keep your money and buy an ARM based product with it, you will get better support and a faster device.
Post 02 Jun 2006, 01:38
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: 20299
Location: In your JS exploiting you and your system
revolution 02 Jun 2006, 02:21
Something to try is to point to core_imports twice like this:
Code:
data import

        dw      RVA core_imports,0,0,RVA core_name,RVA core_imports
        dw      0,0,0,0,0

core_imports:
MessageBoxW     dw      0x8000035A
                dw      0

core_name       db      'COREDLL.DLL',0

                align   4

end data    
If it works that will save duplicating the import table.
vid wrote:
you could make another script which deletes COREDLL_ lines
Okay, easy, just sort by name and delete, I have updated the previous attachment.
Post 02 Jun 2006, 02:21
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 02 Jun 2006, 02:56
nice idea, it works!
Post 02 Jun 2006, 02:56
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20299
Location: In your JS exploiting you and your system
revolution 02 Jun 2006, 12:39
I have added the ARMPE example and COREDLL.INC to the download attachment at the head of this thread.
Post 02 Jun 2006, 12:39
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 04 Jun 2006, 15:06
played a little bit more with FASMARM, here are some of my suggestion:

1. why not add '!' as special symbol and so allow usual "sp!" instead of "sp,!" which DOES look a bit weird. anyway, i don't remember ever seeing "!" used inside name

2. wouldn't it be nice to allow [sp+4] (fasm style) to do same as [sp,4]? i am not sure, maybe there is some case when + wouldn't be clear, but for now i don't know of any.

plus one question: what is difference between "b" and "bx"?
Post 04 Jun 2006, 15:06
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20299
Location: In your JS exploiting you and your system
revolution 04 Jun 2006, 19:53
vid wrote:
allow usual "sp!" instead of "sp,!"
But you can (and should) use 'sp!'. I used it in the first template code I posted. Can you detail the problem you are having? 'sp,!' is not valid, where are you using that form?. Only the SRS instruction requires a comma, after the number and before the !.
vid wrote:
i don't remember ever seeing "!" used inside name
Check out the ARMv6.INC source code, I use it there Smile
vid wrote:
wouldn't it be nice to allow [sp+4]
Perhaps it would. But that is not the standard ARM syntax. For a person coming from heavy X86 assembly into ARM it feels natural to use the form you show, but that is only habit. I followed the ARM format to support my existing code base. For this one I may be convinced to allow the omission of the comma but then error checking suffers if the register name is a structure based value with non-zero offset, the problem arises with how to handle base register update operations.
Quote:
what is difference between "b" and "bx"?
BX & BLX forms allow switching between thumb and arm modes while branching. B & BL forms simply branch somewhare else without switching modes. Check out the ARM manual to read about thumb mode.
Post 04 Jun 2006, 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: 20299
Location: In your JS exploiting you and your system
revolution 09 Jun 2006, 11:12
I have updated the package at the head of this thread to v1.08


    - Fixed erroneous error with implicit r0 based addressing
    - Fixed priority of unary minus to match FASM v1.66 priority
    - Relaxed restrictions with register structure addresses when using zero offset
    - Enhanced MOV/MOVS to use ADD/SUB encoding when loading a register structure member
    - Generation of special encoding to allow user code to detect unencodable immediates and then select an alternate coding without causing assembly errors
    - Alignment bytes changed to 0xff to facilitate faster FLASH ROM updates
    - Added proc, apscall, import and literals macros to package, see each individual file for usage and special notes
    - STRUCT.INC and RESOURCE.INC converted from x86 to ARM format
    - COREDLL.INC converted to an imports definition file


Also I have added three other PE examples to showcase the use of macros. You can now code things like:
Code:
proc Start uses [lr]
    apscall MessageBoxW, 0, *'Hello ArmCE world', *'ARM example HLI macros', 0
    ret
endp
    
"apscall" is the ARM Procedure Standard calling convention. Also note the use of a "*" character preceding the strings to override the default of ASCII and place Unicode characters.

So now it is much easier for you to get some APP's running on your WinCE ARM devices.
Post 09 Jun 2006, 11:12
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 13 Jun 2006, 15:24
idea: make some new default extension, other than ".asm"

and, i 've read ARM can work with both big and little endian. How?

thanks
Post 13 Jun 2006, 15:24
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20299
Location: In your JS exploiting you and your system
revolution 13 Jun 2006, 15:59
vid wrote:
idea: make some new default extension, other than ".asm"
Why? What do you suggest as an extension?
vid wrote:
ARM can work with both big and little endian. How?
It is just a setting in the memory bus interface that inverts the lower bit(s) when you access hword or byte locations. It is very easy to do with hardware. The memory system attached must also use big endian addressing or you will get a mess when you run your software.
Post 13 Jun 2006, 15:59
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 13 Jun 2006, 18:28
revolution wrote:
vid wrote:
idea: make some new default extension, other than ".asm"
Why? What do you suggest as an extension?

Because i have x86 version of FASMW associated with .asm files, and i use to open them just by running them. This also opens ARM files with x86 fasm. and one more thing - there is no seeable difference, at least give it other name, like Flat Assembler for ARM, or just FASM-ARM etc.

maybe just ".arm"? Smile
but i am sure this one is already used for something.
i like ".fam", its something from "FASM ARM Assembly.
or ".ars" (arm assembler)

it will probably need a thread where people can suggest some ideas, (but too few people are into ARM on this board Sad )and then poll to choose best...
Post 13 Jun 2006, 18:28
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20299
Location: In your JS exploiting you and your system
revolution 14 Jun 2006, 04:24
You would need to edit the FASMW.ASM file to change the title and default extension. "_caption" and "_asm_extension" can be changed to suit. But editing that file leaves you vulnerable to having to edit it for each new update. To do it nicely would require co-operation with Tomasz Grysztar to move those two lines to another file like FASM.INC. Tomasz if you are reading this, can you help out vid here to separate the caption and extension strings?

The normal extension used by most ARM tools is ".s". Although other tools for x86 also use ".s". It is really just a matter of personal preference.
Post 14 Jun 2006, 04:24
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: 20299
Location: In your JS exploiting you and your system
revolution 14 Jun 2006, 13:17
Add this note to above: You may also want to change "asm_filter" in FASMW.ASM.

vid wrote:
maybe just ".arm"? but i am sure this one is already used for something.
I just chacked my system here. Even with all the tools from ARM installed there are no files "*.arm" and no registered extension of that name. If it is used then it must be for something else.
Post 14 Jun 2006, 13:17
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 14 Jun 2006, 17:08
why, YOU can change fasmw.asm in your distribution (in fasmarm). And fasmw isn't updated often, so i don't see that as problem.

anyhow, thanks for advice.

but i still like "ars", "frs", or even break 3-char extension and use "farm".
Post 14 Jun 2006, 17:08
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20299
Location: In your JS exploiting you and your system
revolution 15 Jun 2006, 00:51
Quote:
why, YOU can change fasmw.asm in your distribution
Oh no, I don't want to be in the situation of having to update the fasmarm package eveytime there is a change in the fasmw.asm file. The original intention for my project was not to have to replace files used in fasm. Except for the "fasmarm.asm" files, no other files have been diplicated. Having two nearly identical copies of the same file is wasteful and exposes oneself to having mismatched versions that have to be kept in sync. The only time there was a 'forced' update was going from v1.64 to v1.66 because of the change in internal format used. The existing format of my package allows people to automatically take advantage of bug fixes and extensions made to the fasm package by Tomasz Grysztar by simply recompiling with the new files.
Quote:
fasmw isn't updated often
Actually, I think fasmw.asm is one of the most updated files in the package. It seems that Tomasz is continually making small tweaks here and there, but they are not normally announced in the same way changes to the main assembler are advertised.

However, it would be possible to make some type of auto-patch utility that makes changes on-the-fly. Essentially I am thinking of some sort of textual search and replace utility to make a new copy of whatever files need altering during the compilation phase. Like this: Search for X and replace with Y, assemble, delete temporary files.
Post 15 Jun 2006, 00:51
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 15 Jun 2006, 09:02
revolution wrote:
However, it would be possible to make some type of auto-patch utility that makes changes on-the-fly. Essentially I am thinking of some sort of textual search and replace utility to make a new copy of whatever files need altering during the compilation phase. Like this: Search for X and replace with Y, assemble, delete temporary files.


someone already got that idea Wink
http://board.flatassembler.net/topic.php?t=5244
Post 15 Jun 2006, 09:02
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3 ... 6, 7, 8 ... 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.