Invaild verification of Max.asm

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Invaild verification of Max.asm

aexpert999
from the output of your assembler I can see the following problem:
In line 5(@OUTPUT_FIRST) the machine code you produce is:
000000000000001010
but the instruction after the (OUTPUT_FIRST) command counts to 11 (1011 in binary).
Then for the symbol @OUTPUT_D the machine code is:
000000000000001100
which corresponds to the line which contains the instruction: D=M.(Which is before (OUTPUT_D)!)
(counting from 0)
Is there a problem?

 
Reply | Threaded
Open this post in threaded view
|

Re: Invaild verification of Max.asm

aexpert999
figured it out!
Reply | Threaded
Open this post in threaded view
|

Re: Invaild verification of Max.asm

cadet1620
Administrator
In reply to this post by aexpert999
Labels don't require any memory.
   0;JMP            // goto output_d
(OUTPUT_FIRST)
   @0
The 0;JMP is stored at ROM address 9 (0000 1001) and the @0 at 10 (0000 1010). The symbol OUTPUT_FIRST is given value 10, so @OUTPUT_FIRST generates machine code 0000 0000 0000 1010.

--Mark