??? 08/08/05 12:53 Read: times |
#98997 - why not Responding to: ???'s previous message |
hi,
Erik Malund said:
What is the purpose?
I fail to see where you would want to ncall a subroutine to save the registers. In one of projects we have several (about 20) huge subroutines which destroy contents of most registers. Indeed it is possible to push all needed registers to stack at the start of these subroutines and restore registers before return. During optimization we come to low free program memory and looking at the code found that each block of pushing/popping takes about 50 bytes in sum. So they "eats" about 1kb totally. Then I wrote two subroutines we talk about and it was enough. Later, anyhow other person tried to optimize the code once again and it stops working. When I took a look at his optimization I found the problem which is hidden in the puzzle now. Regards, Oleg |