??? 04/16/08 14:46 Read: times |
#153486 - How to get ABC Responding to: ???'s previous message |
Your assembler must calculate ABC.
Take the absolute value of the jump-to address, and isolate address bits a10, a9, and a8. These are abc. I presume that you have a two pass assembler. The first pass calculates the absolute addresses for the labels, and stores them in a table. If the destination is hard wired, it too should be stored in the table. You might consider assigning it a temporary name. On your second pass, isolate the destination address bits, and use them to create the opcode. You should also look for and flag the error of the jump being out of the current page. |