??? 09/24/05 10:35 Read: times |
#101482 - experience Responding to: ???'s previous message |
One never knows how long a project will live and such "nonstandard" shortcut kicks back when one needs it least. My story: I used this trick in a similar manner - a routine which was called from many places in main loop checked a keypress, and if did not happen it returned, otherwise executed a task and and jumped to the beginning of main loop (after popping the return address). I was aware of the possible problems and clearly labelled the routine - call from main loop ONLY. It was OK for years, couple (tens) of revisions, even porting to a different processor. Later, this functionality was not required any more - even the button was removed. Then, the application grew so big that a paging scheme has to be implemented, storing now extra bytes (return page) on the stack on each subroutine call. Now for a new customer the button was restored - and the stack filled up slowly, leading to spurious crashes after days even weeks of operation... Jan Waclawek |
Topic | Author | Date |
RET to a different address | 01/01/70 00:00 | |
here is how pseudocode | 01/01/70 00:00 | |
RET to a different address | 01/01/70 00:00 | |
no flaw, but 1.000.000 gotchas | 01/01/70 00:00 | |
That's what I wanted to know | 01/01/70 00:00 | |
Yes | 01/01/70 00:00 | |
"clever" | 01/01/70 00:00 | |
OT: my wife | 01/01/70 00:00 | |
no flaw, but seriously not recommended | 01/01/70 00:00 | |
experience | 01/01/70 00:00 | |
reload SP | 01/01/70 00:00 | |
restoring stack | 01/01/70 00:00 | |
Recognisable string![]() | 01/01/70 00:00 | |
named return value | 01/01/70 00:00 | |
Bad Practice | 01/01/70 00:00 | |
Well phrased | 01/01/70 00:00 | |
What I am doing with it | 01/01/70 00:00 | |
try...catch | 01/01/70 00:00 | |
setjmp / longjmp | 01/01/70 00:00 | |
when to try ... catch | 01/01/70 00:00 | |
the borderline | 01/01/70 00:00 | |
Promises | 01/01/70 00:00 | |
who cares if an exceptiom is "acceptable | 01/01/70 00:00 | |
Parsing input data | 01/01/70 00:00 |