Question: 3. a) Write a short program in HCS12 assembly to add the numbers in memory locations $2000 and $2001 and place the result in memory

 3. a) Write a short program in HCS12 assembly to add

3. a) Write a short program in HCS12 assembly to add the numbers in memory locations $2000 and $2001 and place the result in memory location $2002. Use any instructions you wish. (10 points) b) Write an HCS12 instruction that loads Accumulator B from the memory address that is three more than the value in Index register X. (Do not change X.) (5 points) c) Shown below is the memory map for the HCS12. Indicate on the figure which addresses would typically be used to store code and constants, and which would be used to store variables. (5 points) $0000 $0400 30000 REGISTERS (Mappable to any 2k Block he first 32K) $03FF 50000 4K Bytes EEPROM (Mappable to any 4K Block) within the $1000 $4000 SOFFF $1000 12K Bytes RAM (Mappable to any 16K and alignable to top of bottom $3FFF $4000 16K Fixed Flash Page $3E-62 (This is dependant on the state of the ROMHM bit) $7FFF $8000 $8000 16K Page Window 16 x 16K Flash EEPROM pages $BFFF SC000 SC000 16K Fixed Flash Page $3F = 63 SFFFF SFF00 BDM (if active) SEFFE SFF00 SFFFF VECTORS NORMAL SINGLE CHIP 3. a) Write a short program in HCS12 assembly to add the numbers in memory locations $2000 and $2001 and place the result in memory location $2002. Use any instructions you wish. (10 points) b) Write an HCS12 instruction that loads Accumulator B from the memory address that is three more than the value in Index register X. (Do not change X.) (5 points) c) Shown below is the memory map for the HCS12. Indicate on the figure which addresses would typically be used to store code and constants, and which would be used to store variables. (5 points) $0000 $0400 30000 REGISTERS (Mappable to any 2k Block he first 32K) $03FF 50000 4K Bytes EEPROM (Mappable to any 4K Block) within the $1000 $4000 SOFFF $1000 12K Bytes RAM (Mappable to any 16K and alignable to top of bottom $3FFF $4000 16K Fixed Flash Page $3E-62 (This is dependant on the state of the ROMHM bit) $7FFF $8000 $8000 16K Page Window 16 x 16K Flash EEPROM pages $BFFF SC000 SC000 16K Fixed Flash Page $3F = 63 SFFFF SFF00 BDM (if active) SEFFE SFF00 SFFFF VECTORS NORMAL SINGLE CHIP

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!