Homework

Only available on StudyMode
  • Topic: Addressing mode, Instruction set, Computer program
  • Pages : 2 (343 words )
  • Download(s) : 124
  • Published : May 28, 2013
Open Document
Text Preview
1. HCS12 is a(n) _____-bit microcontroller.
8-bit or 16-bit
3. The immediate value in “LDAA #value” is _______ bits wide.
8
6. What is the result of the following code and where is it kept? LDAA #$15
ADDA #$13
7. Which of the following instructions is (are) illegal?
(a) LDAA #500 (b) LDAA #50 (c) LDAA #00
(d) LDAA #$255 (e) LDAA #$25 (f) LDAA #$F5
(g) ADDA mybyte, #$50
9. What is the result of the following code and where is it kept? LDAA #$25
ADDA #$1F
14. True or false. Register space in HCS12 starts at address 0000. 15. True or false. The registers are part of the RAM memory space. 20. What is the difference between the EEPROM and data RAM space in the HCS12? 28. Show a simple code to load values 30H and 97H into locations 805H and 806H, respectively. 32. Identify the addressing mode for each of the following:

(a) STAA PORTB (b) LDAA #$50 (c) STAA $800
(d) LDAA #0 (e) CLRA (f) ABA
49. Find the C flag value after each of the following codes: (a) LDAA #$54 (b) LDAA #00 (c) LDAA #$FF
ADDA #$0C4ADDA #$FFADDA #05

51. State the value (in hex) used for each of the following data: MYDAT_1 EQU 55
MYDAT_2 EQU98
MYDAT_3 EQU'G'
MYDAT _ 4 EQU$50
MYDAT_5 EQU200
MYDAT _6 EQU' A'
MYDAT_7 EQU $AA
MYDAT _8 EQU255
MYDAT_9 EQU %10010000
MYDAT _10 EQU %01111110
MYDAT _ 11 EQU 10
MYDAT_12 EQU 15

56. Which program produces the o file?
57. True or false. The source file has the extension "asm".
58. Which file provides the listing of error messages?

SECTION 2.8: STACK AND DATA TRANSFER INSTRUCTIONS

68. In the HCS12, the stack pointer (SP) points to _____________ (the last used, next available) location of the stack. 69. With each PSHY instruction, the stack pointer register, SP, is _______________ (incremented, decremented) by _______. 70. With each PULY instruction, the SP is _______________ (incremented, decremented) by _______.
tracking img