English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 24 October 2010, 20:15   #1
Joe Maroni
Moderator
 
Joe Maroni's Avatar
 
Join Date: Feb 2003
Location: Germany
Age: 44
Posts: 1,303
Send a message via MSN to Joe Maroni
general questions about assembler

i know there are many dissassembler for the amiga, but is a tool existing to convert ASM Code to HEX values and backward ??

the disassemblers i know just convert (disassemble) from binary code to mnenomics.

and how much different commands/hex values are able on an Amiga machine ???
Joe Maroni is offline  
Old 24 October 2010, 20:59   #2
absence
Registered User
 
Join Date: Mar 2009
Location: moon
Posts: 373
I don't know, but you can always hex edit the binary file.
absence is offline  
Old 24 October 2010, 21:27   #3
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,162
commands have addressing modes, hence a lot more hex values than operands.

for the commands, try this: http://aminet.net/search?query=68000+guide
jotd is offline  
Old 24 October 2010, 22:44   #4
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,182
Not quite sure what you're trying to achieve but in the program Resource you can set the datatype to longwords, words etc and just dump any type of file back to dc.l type statements, or set a start and end point, and save the file as binary etc.

For ASM to hex, you can just assemble the file and then use the above to output it as hex values.
Codetapper is offline  
Old 24 October 2010, 23:27   #5
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
Quote:
Originally Posted by Joe Maroni View Post
i know there are many dissassembler for the amiga, but is a tool existing to convert ASM Code to HEX values and backward ??

the disassemblers i know just convert (disassemble) from binary code to mnenomics.

and how much different commands/hex values are able on an Amiga machine ???

If you are trying to convert assembler mnemonics to HEX then good luck. It is a project I tried starting a few months back and found no software that does it. There are plenty of people around that can convert the binary/HEX code to the mnemonics though.

The closest you can get to getting the HEX versions of the code is either:

a) See attached document
b) Add garbage to the end of the mnemonic in Devpac 2 & assemble it. Devpac will halt with an error, but displays the HEX code on the left (after line number and some other number).


Regards,
Lonewolf10
Attached Files
File Type: pdf M68kOpcodes.pdf (164.4 KB, 1895 views)
Lonewolf10 is offline  
Old 25 October 2010, 07:11   #6
matthey
Banned
 
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
Quote:
Originally Posted by Lonewolf10 View Post
If you are trying to convert assembler mnemonics to HEX then good luck. It is a project I tried starting a few months back and found no software that does it. There are plenty of people around that can convert the binary/HEX code to the mnemonics though.

The closest you can get to getting the HEX versions of the code is either:
Use the -a option of the newest ADis or IRA...

http://www.heywheel.com/matthey/Amiga/ADis.lha
http://aminet.net/dev/asm/ira.lha

For example with ADis -m -a test

MC68060


SECTION hunk_0,CODE

lab_0:
lea (lab_14c0,pc),a0 ; 0 : 41fa 6
moveq #0,d0 ; 4 : 7000
rts ; 6 : 4e75

The formatting starting at the comment is...

; relocatable offset in hex : hex value of instruction

IRA does the same except it doesn't seperate each word. Resource works a little different but can do it also by marking the code as data as Codetapper points out.

Last edited by matthey; 25 October 2010 at 07:16.
matthey is offline  
Old 25 October 2010, 22:28   #7
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
Quote:
Originally Posted by matthey View Post
Thanks for those links. Clearly I didn't search hard enough (or use the right keywords).


Regards,
Lonewolf10
Lonewolf10 is offline  
Old 09 November 2010, 22:07   #8
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
Didn't quite understand the original question, but asm to binary uses an assembler like asm-one. When you have the binary file, you can convert it to .hex (f.ex. for burning EPROMs) with lots of different software.

Me, I use an EPROM burner that can burn binary files and convert every .hex file to binary. It seems kind of strange to me to have a binary file as a text file. If I want to change the binary file I use any hex editor like an assembler or monitor, or for example HexEdit (softpedia.com) if it's PC. But actually it's simpler to open the .bin file in WinUAE and use AsmOne.

This is just a general comment on hex/bin/edit stuff, if you phrase your post differently maybe I'll know what you want to achieve.
Photon is offline  
Old 10 November 2010, 12:39   #9
dazies leaped
 
Posts: n/a
Quote:
Originally Posted by Joe Maroni View Post
i know there are many dissassembler for the amiga, but is a tool existing to convert ASM Code to HEX values and backward ??
----------------
I'm not sure if it is what you need, but try John Fielden's programming pages in the online commodore enthusiasts magazine.
www.commodorefree.com

Last edited by Graham Humphrey; 10 November 2010 at 14:23. Reason: Quote tag fixed
 
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help a n00b with some general questions devnull support.Hardware 4 13 July 2012 03:32
General OS3.9 Questions Marcuz support.Apps 9 05 September 2008 11:29
A few general Amiga questions. Hougham support.Hardware 6 30 April 2008 22:13
Two general questions about HOL Tim Janssen HOL suggestions and feedback 3 25 March 2003 10:10
Some general newbie questions Pixel New to Emulation or Amiga scene 10 14 March 2002 18:35

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:51.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10950 seconds with 14 queries