Question: b) For the following code fragment, indicate which parts are HCS12 instructions, which are assembler directives, which are comments, and which are labels (you can

b) For the following code fragment, indicate which parts are HCS12 instructions, which are assembler directives, which are comments, and which are labels (you can indicate which are which on the code itself if you wish). (5 points) org $4000 Idaa #0 staa $02 forever: Idab #10 Idaa #$0 continue: adda $00 decb bne continue ; (bne uses 2 bytes in memory, one for the instruction and one for the relative address) staa $2000 store result c) For each instruction other than bne, list the addressing mode and effective address, if any. (Note that the bne instruction uses two successive memory addresses and decb uses 1.) (Assume that the load and store instructions take two bytes each except for STAA $2000, which takes three.) (10 points) d) Which lines are executed during compilation and which at runtime? (5 points) e) Briefly describe what the code does (what does it do overall, not what each instruction does). (5 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
