This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to create jump-tables in Armv8 Arm32 assembly language?

I've been learning Arm32 assembly on my Raspberry Pi recently and all is going well but I would like to create a jump table and have no idea how. The bl (branch and link) instruction needs an address label, but I would like to simulate a switch statement by creating a jump table of addresses that can be jumped to but I don't know how to do this. As I'm emulating an 8-bit computer with 256 possible opcodes I need to be able to define 256 opcode handlers and set up a jump table containing the address of these handlers so I can bl to them based on the opcode as an index. How may I accomplish this task?

Many thanks in advance!

Parents Reply Children