ARM tool (assembler, disassembler, emulator) developing - page 2 - DSLR Hack development - CHDK Forum

ARM tool (assembler, disassembler, emulator) developing

  • 39 Replies
  • 37638 Views
Re: ARM tool (assembler, disassembler, emulator) developing
« Reply #10 on: 30 / April / 2010, 12:53:06 »
Advertisements
In my opinion the nicest way for the user is to have each line use as much bytes as needed for the item at that line's address. For example, 4 bytes for instructions, n(+1) bytes for strings of length n and 1 byte for an stray character or minimal padding.

If you're really fixed on the 4 bytes per line, you could also insert an extra line for offset items. Taking my previous example:

ffd29420 | 4.He |              DCD 0x65481234
ffd29422 |      | sHelloWorld                  ; "Hello world\n"
ffd29424 | llo  |              DCD 0x206f6c6c
ffd29428 | worl |              DCD 0x6c726f77
ffd2942c | d..Q |              DCD 0x51000a64


Both obviously have all kinds of consequences, but I'm afraid that's unavoidable.

Re: ARM tool (assembler, disassembler, emulator) developing
« Reply #11 on: 30 / April / 2010, 13:51:05 »
Thanks.
The 4 bytes per line and even the number of the lines is fixed...
My questions is:
Is it worth to find the strings at any place or only at word aligned position?
I can make both version, but the code can not address it if not aligned.
As I saw IDA finds strings at aligned position... but I don' like that.

Re: ARM tool (assembler, disassembler, emulator) developing
« Reply #12 on: 30 / April / 2010, 14:35:58 »
Fact is, the firmwares have plenty of strings at unaligned addresses. Code can access them just fine.

I agree that finding strings only at aligned positions while cutting of some bytes isn't really useful.

*

Offline reyalp

  • ******
  • 12075
Re: ARM tool (assembler, disassembler, emulator) developing
« Reply #13 on: 01 / May / 2010, 01:47:50 »
I can make both version, but the code can not address it if not aligned.
As mweerden says, this is not correct, and the firmware has many unaligned strings. Instructions that operate on words need to be word aligned, but ones that operate on bytes do not.
Don't forget what the H stands for.


Re: ARM tool (assembler, disassembler, emulator) developing
« Reply #14 on: 01 / May / 2010, 16:41:31 »
Yes, it's right.

First release
« Reply #15 on: 26 / May / 2010, 14:45:38 »
I've published the first release.
It's buggy of course, but you can see how it works.
Comments and any feedback would be much appreciated.

You can start here: http://pel.hu/armu
« Last Edit: 04 / June / 2010, 10:25:56 by Pelican »

New version 0.11
« Reply #16 on: 04 / June / 2010, 10:25:14 »
New snapshot is available.

Re: ARM tool (assembler, disassembler, emulator) developing
« Reply #17 on: 14 / July / 2010, 04:24:02 »
Very useful tools? Thank you?


Re: ARM tool (assembler, disassembler, emulator) developing
« Reply #18 on: 14 / July / 2010, 10:10:43 »
Hi Pelican,how can i load binfile to a specfic start address ,not 0x00000000? thanks

Re: ARM tool (assembler, disassembler, emulator) developing
« Reply #19 on: 14 / July / 2010, 12:08:58 »
1. Load binary and change the segment address.
2. Make a .prj file where you can describe the loading address.

 

Related Topics