You are on page 1of 2
ANSWERS TO REVIEW QUESTIONS SECTION 2.1: INSIDE THE 8051 1. MOV AJB4H MOV BJSFH ADD AB 2. MOV AI6H ADD AHOCDH MOV R2,A, 5 in decimal SECTION 2.2: INTRODUCTION TO 8051 ASSEMBLY PROGRAMMING 1. The real work is performed by instructions such as MOV and ADD. Pseudo instructions, also called assembly directives, instruct the assembler in doing its job, 2. The instruction mnemonics, pseudo-instructions 3. False 4, All except (c) 5. Assembler directive 6. True 2 © ‘SECTION 2.3: ASSEMBLING AND RUNNING AN 8051 PROGRAM i true 2. True 3.@) 4.(b) and (d) 5.2) SECTION 2.4: THE PROGRAM COUNTER AND ROM SPACE IN THE 805t 1, 16 2. True 3. 00001 4.2 5. With 8K bytes. we have 8192 (8 x 1024 = 8192) bytes, and the ROM space is 0000 to IFFFH. SECTION 2.5: $951 DATA TYP! S AND DIRECTIVES 1, DB 2.7 3, {f the value is to be changed later, it can be done once in one place instead of at every occur- rence. 4. @Abytes (b) 7 bytes 5. This places the ASCII values for each character in memory locations starting at 200H. Notice that all values are in hex. 200 = (41) CHAPTER 2: 8051 ASSEMBLY LANGUAGE PROGRAMMING 63 SECTION 2.6: 8051 FLAG BITS AND THE PSW REGISTER 1. PSW (program status register) 2.8 bits 3. DI and DS which are referred to as PSW.1 and PSW.5, respectively. 4 Hex binary FF qui 11 +o ae 190 10000 0000 This leads to CY=1 and AC=1 5. hex binary 2 1100 0010 + 3D + ool Lind FE qin 111 This leads to CY = 0 and AC = 0. “SECTION 2.7: 8051 REGISTER BANKS AND STACK 1. &bit 2.Incremented 3. Decremented 4. 08 5.0 60-7 7. Register bank 3 8. RAM locations 18H to IFH 08

You might also like