User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 391,668 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,976 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser:
Views: 1888 | Replies: 2
Reply
Join Date: May 2007
Posts: 2
Reputation: cool dude is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
cool dude cool dude is offline Offline
Newbie Poster

8085 Assembly.

  #1  
May 4th, 2007
Hello. This is my first time posting and i hope i'm not going against any rules. I got an assignment where i had to translate High level programming language (Turing) to low level language (Assembly). The following was the Turing code:

  1. var x, y : array 1 .. 20 of int
  2. for i : 1 .. 20
  3. y (i) := x (i)
  4. end for
  5.  

Just assume x,y are initialized 0

So i converted it but i think i may have done some things incorrectly. Here is what i did. Please tell me if its right or wrong and if its wrong please point out whats wrong with it. Thank you

  1. 0100 MVI A 00
  2. 0102 STA 1008
  3. 0105 LXI B 10FF
  4. 0108 LXI D 15FF
  5. 010B LDAX B
  6. 010C STAX D
  7. 010D INX B
  8. 010E INX D
  9. 010F LDA 1008
  10. 0112 DCR A
  11. 0113 STA 1008
  12. 0116 JNZ 010B
  13. 0119 HLT
Last edited by Ancient Dragon : May 5th, 2007 at 9:26 pm. Reason: removed color/font tags
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 10,548
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 36
Solved Threads: 860
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: 8085 Assembly.

  #2  
May 5th, 2007
what assembler are you using? I don't recognize some of those assembly instructions. See complete listing of 8085 instruction set here.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Reply With Quote  
Join Date: May 2007
Posts: 2
Reputation: cool dude is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
cool dude cool dude is offline Offline
Newbie Poster

Re: 8085 Assembly.

  #3  
May 5th, 2007
I just started assembly so i don't know much. but from the link you provided it says x86 instruction listings. The one i'm using is 8085. All the instructions i provided are correct. i just don't know if the program itself is correct. If you do not get one of the instructions i can easily explain to you what it does. I'm just not sure if my logic is correct in this program.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

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

 

DaniWeb Assembly Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Assembly Forum

All times are GMT -4. The time now is 2:00 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC