| ??? 01/09/01 19:25 Read: times |
#8039 - RE: [ACCESSING TABLES] |
If I'm going to use a call for an immediate table reference, I write the subroutine to pop the CALL's return address as the table pointer. Loading pointers consume a lot of time.
Example: . call sendthis . db "Serial Link Test.",0h . jmp somethingelse After stepping through the table's data, the pointer is pointing to the proper return address. Usually a traversal ends one increment past the 00h terminator but you don't need that increment because returning to the 00h byte will be interpreted as a NOP. Since the pops have restored the call pushes, you can merely JMP to the pointer address as a flat return. Most feel more comfortable pushing the new return address and then issuing a RET, and I admit I do this to improve readability though it wastes run time. Note that these techniques would probably sabotage disassemblers, code checkers, and maybe simulators. I can live with that. :) aka j |
| Topic | Author | Date |
| [ACCESSING TABLES] | 01/01/70 00:00 | |
| RE: [ACCESSING TABLES] | 01/01/70 00:00 | |
| RE: [ACCESSING TABLES] | 01/01/70 00:00 | |
| RE: [ACCESSING TABLES] | 01/01/70 00:00 | |
RE: [ACCESSING TABLES] | 01/01/70 00:00 |



