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

Recommended Answers

All 5 Replies

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.

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.

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

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.