--- In AVR-Chat@yahoogroups.com, fireweaver <firewevr@...> wrote: > So I should write: > subi ZL,0xFF-low(X_actions) > lpm ZL,Z ;<--- > ijmp Yes, if you want to load the value from the table entry into ZL. Also, I suspect that the instruction preceding the lpm should actually be subi ZL,0-low(X_actions) This subtracts the negative of the low byte of the X_actions address, effectively adding the low byte of the X_actions address. I thought you said (or perhaps I inferred) that this code was working. It doesn't seem that that is so. Don Kinzer ZBasic Microcontrollers http://www.zbasic.net
Message
Re: Mixing C and assembly with special requirements.
2012-03-27 by Don Kinzer