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

calculatrice.asm

this is a code to make a calculator but it doesn't work i didn't find the error:@

Attachments CALCul.txt (0.77KB)
bassem
Newbie Poster
3 posts since May 2007
Reputation Points: 10
Solved Threads: 0
 

Does it assemble?
If not, what error messages do you get, which assembler are you using?

Does it run?
Do you run it by double-clicking on the executable (does the DOS box disappear before you get a chance to read anything), or do you run it from a command prompt?

What input do you type in?

What result(s) do you get (if any). How do those differ from what you expect.

Don't just dump your code on a message board and order people to fix it.

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

It is difficult to know what to make of it. For example, what is this supposed to do:

JNE saisie
saisie:POP AX ;  vider la valeur 010D
    POP BX



Apart from jumping to the very next instruction, which seems a bit pointless, you pop two registers, but as far as I can see you have only ever pushed one.

mathematician
Junior Poster
161 posts since Nov 2006
Reputation Points: 14
Solved Threads: 7
 

sorry salem u have reason. i work on 8086 with tasm and it compiles then it assemble but it doesn't make tests to verify if it's a number or not and it doesn't return a result

bassem
Newbie Poster
3 posts since May 2007
Reputation Points: 10
Solved Threads: 0
 

pop ax is to extract '0Dh' from the stack and then to make our test for the rest of values

bassem
Newbie Poster
3 posts since May 2007
Reputation Points: 10
Solved Threads: 0
 
pop ax is to extract '0Dh' from the stack and then to make our test for the rest of values

But what does "pop bx" do? You do not appear to have pushed anything which corresponds with that pop.

mathematician
Junior Poster
161 posts since Nov 2006
Reputation Points: 14
Solved Threads: 7
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You