March 2016
Beginner to intermediate
296 pages
6h 34m
English
Under certain circumstances, a jump table provides a very efficient way of implementing a C language switch statement block. We can define a jump table as a list of unconditional branch instructions—each referencing a different procedure or subroutine. We branch to one of the subroutines by loading the program counter with the address of the unconditional branch that is stored in the jump table. The effective addresses of items in the jump table are formed using a base + offset addressing mode. Base + offset addressing is commonly used to access data items stored in arrays, and a jump table is effectively just an array of address items.
To illustrate a jump table, we'll develop a recipe called asmJumpTable_c4v0 ...
Read now
Unlock full access