arm assembly Flashcards
instruction set architecture
the view of the processor as seen by other programs
stores cpu instructions
what are the 2 architecture paradigms
cisc; complex instruction set computer
risc; reduced instruction set computer
cisc
complex instruction set computer
loads the architecture itself
improved speed at a lower clock rate fur to parallel crossing pipeline
rich isa; a single instruction excesses several low level operations
risc
reduced instruction set computer eg arm
small organised instruction set
simple pipeline and complex software
what are some of the fundamentals of the arm instruction set
simple design
doesn’t read the cpu but reads the architecture and sends it to the cpu
can remove capabilities from the cpu so its smaller and more efficient
32 bit architecture
assembler hides details
how many registers does the arm cpu have
16
what are the 4 special registers in arm
stack pointer; points to the last value pushed onto the stack
link; used by functions
pc; next instruction
cpsr(current program status register); result of the last instruction/maintains the state of the cpu
what is an instruction
the most basic part of a program
assembler
translates assembly into binary
what are directives and what are some examples of what they do
assembler instructions that take actions/change settings
e.g. defines symbols dara regions; controls flows; generates reports; defines assemble parameters
what are the different flags in the 4 most significant bits in the cpsr
n bit; negative flag
z bit; zero
c bit; carry
v bit; overflow
what type of memory system does arm use
memory mapped
stack and heap
dynamic data
text
stores machine code programs
heap
stores data allocated during runtime
how long is a word
4 bytes/32 bits
what are the 3 different addressing modes
reg + const; registed + constant used to compute the r/w addresses
reg + reg; eg ldr r0, [r1, r2]
reg + reg «_space;scale; shift the 2nd register parameter and add the first register
what are the 4 parts of memory layout/directives
bss; global variables that aren’t initialised
data; initialised static variables
text; executable instructions
rodata; contains constants
what is pipelining
a way of exploiting inherent parallelism inside the control unit to speed up the fde cycle