Arm Assambler

Páginas: 3 (737 palabras) Publicado: 18 de octubre de 2012
Sistemas Embebidos

Tarea 2

1. What is the standard use of register r14? Register r13? Register r15?

R13 and R14 general purpose registers (banked registers). R15 is the PC register.
R13is normally used as a stack pointer, known as SP.
R14 can be used as Link Register. It receives a copy of R15 when a Branch with Link (BL) instruction is executed.
R15 is used to read en write theprogram counter (PC).
2. Which mode can assist in supporting operating systems and does share the same registers as the User mode?
System mode
3. Explain the current program state if the CPSR hadthe value 0xE00000D3. Is this a valid status?

Negative flag = 1. Zero flag = 1. Carry flag = 1. Overflow flag = 0. Saturation flag = 0.
J flag = 0 (No Java execution). I = 1 = IRQinterrupts disabled. F = 1 = FIQ interrupts disabled. Mode[4:0] bits = 10011 = supervisor mode.
It’s not a valid status, since it not possible to have a negative and a zero flag at the same time.This means the instruction will always be executed regardless of the CPSR condition codes

4. Describe the contents of register r13 after the following instructions complete, assuming that the memorycontains the values shown below. Register r0 contains 0x24 and the memory system is little-endian.
Address Contents
0x24 0x06 --0x0624
0x25 0xFC --0xFC25
0x26 0x03 --0x0326
0x27 0xFF--0xFF27

a. ldrsb r13,[r0]! --load register signed byte. R13 = 0x06
b. ldrsh r13,[r0, #2]! --load register signed halfword. R0+2 = 0x26. R13 = 0xFF03
c. ldr r13, [r0], #4 --loadregister word. R13 = 0xFF03FC06. R0 = R0+4 = 0x28
d. ldr r13, [r0] --load reg word. R13 = 0xFF03FC06.
5. Calculate the effective address of the following instructions if register r3=0x4000 andregister r4= 0x20

a. strh r9, [r3, r4] --store halfword. EA = r3+r4 = 0x4000+0x20 = 0x4020
b. ldrb r8, [r3, r4, LSL #4] --LSL = logical shift left. Shift 4 bits r4 to the left. R4 = 0010 0000 shifted...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Arquitectura arm
  • Historia Arm
  • Arquitectura Arm
  • procesador arm
  • Historia De Arm
  • arm v
  • Arm diab
  • HISTORI DE LOS ARM

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS