[A83] Re: cant get code to work


[Prev][Next][Index][Thread]

[A83] Re: cant get code to work




> The popping and pushing is no problem, since you pop two 
variables form
> the stack, modify the one that's not the return address, 
and push them
> back in the right order.

Simple. The problem is outside of the subroutine. There is 
only one thing I can think of: you want to increase BC by 
one. If you use "inc b", that increases the 16-bit number 
in BC by 256. Try using "inc c" instead, that changes the 
lower byte.

I know this is only a stupid guess, but as I don't know 
what the modified variable stands for, I can only suppose 
that increasing it with 256 makes the program crash. 
Besides, I really cannot think of an other source of error.

PG





Follow-Ups: References: