??? 08/08/05 15:31 Read: times |
#99005 - Still not convinced Responding to: ???'s previous message |
Jan Waclawek said:
... to use this kind of stack manipulation, even if an interrupt breaks in. Think of it - you should be able to do what you want under current sp, as no other routine including interrupts should corrupt that area. This fact is heavily used on processors with not so restricted stack as the '51, where high level compilers place local variables onto stack and mannipulate them happily... Yes but they don't do it as a subroutine but as in line code within a subroutine so they do not manipulate the stack contents to move the return address. I still think this is too dangerous - I am with Erik on this one. That its limited to a single register bank (not necessarily 0) was indirectly mentioned by Oleg and I think is no drawback in majority o programs. I have no problem with it being limited to a single register bank. But as soon as another part of the program uses a different register bank elsewhere then this routine will walk all over its R0. Ian |