Assembler maps two variables to the same address?

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

Assembler maps two variables to the same address?

dfaulken
My assembler script passes for add and max. For rect, I have a comparison failure which is confusing me.

The provided Assembler maps @counter to 10000 (16), since this is where the variable space starts. Then it encounters @address, a new variable, but I'm not sure why it maps this to 10000 (16) also. Hasn't that memory address already been allocated to @counter?

My script maps new variables to new memory locations, so it places @address at 10001 (17). Is this wrong? If so, I must be missing something about the language specification.

Loving the course so far. Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Assembler maps two variables to the same address?

dfaulken
Hmm, turns out that behind the scenes, the provided Assembler was throwing an ArrayOutOfBoundsException.

I restarted and it compiled fine. My output matches now.