Vijay99 wrote
I resolved it. Why was it giving the error at line 33, should it not refer to line 34?
It may count lines starting with zero.
It may just return a line counter's current value and it doesn't increment until it moves onto the next line.
Several possible reasons. In general, whenever a tool says line N, it's a good idea to look at the lines immediately above and below if it isn't obvious that the problem is on the indicated line.
Vijay99 wrote
WBahn wrote
The author's assembler will accept D+M and M+D, though I would prefer it didn't as it reinforces the very confusion you are falling prey to.
I take it to mean that D-8192 was confusing. Or is there some other confusion?
In totality, do you think it is a satisfactory solution to the problem?
Do I think what is a satisfactory solution? What change did you make to solve the problem (of having an unknown expression in your code)?
D-8192 is NOT an instruction mnemonic.
The assembler has to convert each assembly instruction into exactly one 16-bit opcode. What opcode would it convert the instruction D=D-8192 into?