954,479 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

8085 Assembly.

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:

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


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

0100 MVI A 00
0102 STA 1008
0105 LXI B 10FF
0108 LXI D 15FF
010B LDAX B
010C STAX D
010D INX B
010E INX D
010F LDA 1008
0112 DCR A
0113 STA 1008
0116 JNZ 010B
0119 HLT
cool dude
Newbie Poster
2 posts since May 2007
Reputation Points: 10
Solved Threads: 0
 

what assembler are you using? I don't recognize some of those assembly instructions. See complete listing of 8085 instruction set here .

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

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.

cool dude
Newbie Poster
2 posts since May 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You