Assembler assignment

Ok so I don't really expect anyone to know the language in question here, since it's made for the book we use. Anyway, the program is just supposed to perform this equation: D=A-(B-C) and output the values of all variables. Anyway, wrote this program out on paper first and it looked good, did the same logic in a quick little C++ program and it worked, but I'm getting 2 errors and the damn program doesn't even hint as to where or what they are, and I'm lost now. Anyway, here is my little code snippet I'm trying to get to work.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Org 100
Input
Store B
Input
Store C
Load B
Subt C
Store tmp
Input
Store A
Load A
Subt tmp
Store D
Load A
Output
Load B
Output
Load C
Output
Load D
Output
Halt
A, Hex C8
B, Hex D2
C, Hex DC
D, Hex E6
Tmp, Hex F0


Most of the commands should be self-explanatory, but org just tells the assembler what memory location to start at. Labels are declared at the bottom. Everything goes through the AC, so in order to work with a variable you have to load it, and then store it again when done. Do you see any logical errors or any errors at all that could be giving me issues?
What are the errors? It has to at least say what the problem is, right?
I wish. It literally says this

C:\Users\****\Documents\****S12.mas 2 errors found.


*Placeholder for my name. Don't feel like posting my name online
Well just looking at what you've written and making assumptions, it seems fine to me. What I might do here is just cut out parts of code and see if you can isolate the portion that is failing.
Assuming its this http://www.cse.yorku.ca/~jeff/notes/compiler/Marie/DocumentationFromWeb/MarieGuide.pdf you are using, can you post the assembly listing?

EDIT: It's a typo
1
2
3
Store tmp
...
Subt tmp

Tmp, Hex F0
Last edited on
^^ What he said.

I don't really see the point of noddy languages.
I really think if you want to start from first principles - then assembly is the way to go..

Just my 0.02.
Oh wow! It was a typo /facepalm. And @guest, I agree. I'm not sure why we're using this fake assembly language as opposed to just something like x86. Just what the professor told us to do
Topic archived. No new replies allowed.