Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 1st, 2008, 12:38 PM
Swerve1000 Swerve1000 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Location: U.K.
Posts: 4 Swerve1000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 58 m 7 sec
Reputation Power: 0
Assembly - Help with converting ASM instructions into machine code

Hi,

I am trying to convert the following line of code into machine code, but am stuck with one part.

The original instruction is:-

Quote:
MOVE.L #$D3A5, D2


Starting with:-

Quote:
0000 0000 0000 0000


I added the MOVE part, leaving:-

Quote:
0000 0000 0000 0000


I then added the .L, leaving:-

Quote:
0010 0000 0000 0000


Then I added the destination address (D2):-

Quote:
0010 0100 0000 0000


But now I am stuck, I have the answer which is:-

Quote:
0010 0100 0011 1100


My problem is that I don't see how the remaining L#$D3A5 fits into the answer. I understand that I am moving the data it'self in Hex format, but unfortunately this isn't bridging my gap in knowledge.

Thanks for any help!

Swerve.

P.S.

I have done an easier question shown below if that helps in any way.

Again, thanks!
Quote:

Original instruction :-

Quote:
MOVE.L D3, D1


So starting from :-
Quote:
0000 0000 0000 0000


I added the MOVE command:-

Quote:
0000 0000 0000 0000


Then added the .L :-

Quote:
0010 0000 0000 0000


Then added the source address ( D3):-
Quote:
0010 0000 0000 0011


Then added the destination address:-
Quote:
0010 0010 0000 0011


Which is the final answer.

Reply With Quote
  #2  
Old June 1st, 2008, 05:09 PM
Schol-R-LEA's Avatar
Schol-R-LEA Schol-R-LEA is offline
Commie Mutant Traitor
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Location: The People's Republic of Berkeley
Posts: 1,153 Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level)Schol-R-LEA User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 11 h 16 m
Reputation Power: 539
To begin with, can you tell us what processor this is for, and what assembler syntax it is matching? I'm assuming it is MC68K, but I'm not certain.
__________________
Rev First Speaker Schol-R-LEA;2 JAM LCF ELF KoR KCO BiWM TGIF
#define KINSEY (rand() % 7) λ Scheme is the Red Pill
Scheme in ShortUnderstanding the C/C++ Preprocessor
Taming PythonA Highly Opinionated Review of Programming Languages for the Novice, v1.1

FOR SALE: One ShapeSystem 2300 CMD, extensively modified for human use. Includes s/w for anthro, transgender, sex-appeal enhance, & Gillian Anderson and Jason D. Poit clone forms. Some wear. $4500 obo. tverres@et.ins.gov

Reply With Quote
  #3  
Old August 15th, 2008, 05:42 PM
xEchox xEchox is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Posts: 1 xEchox User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 36 sec
Reputation Power: 0
I assume x86 so the best way is to run some code through an assembler and look at that, you can modify the assembler to assemble anything, including invalid code.

-Echo

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Assembly - Help with converting ASM instructions into machine code


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway