SCC131: weeks 13-18 Flashcards
(45 cards)
What does CISC stand for and what is it?
-complex instruction set computing
-a complex instruction set architecture
what are key features of a CISC architecture?
-complex instruction set
-one instruction executes multiple low-end operations
-parallel processing pipelines
-higher processor speed at lower clock rate
what does RISC stand for and what is it?
-reduced instruction set computing
-reduced complexity instruction set, small and optimised
what are key features of a RISC architecture?
-reduced instruction set
-simple pipeline, higher software complexity
-power/heat efficient
is ARM RISC or CISC?
-ARM is von neumann and RISC
Why are registers used in ARM assembly?
-ALU cannot directly process data from RAM, it needs to be loaded into the registers first.
How many registers does ARM utilise?
-16
-R0-R12
-SP (R3)
-LR (R4)
-PC (R5)
what is R13- SP?
-stack pointer
-keeps track of the lowest address occupied on the stack/ top value
what is R14- link register?
-holds the return address after a subroutine is completed
what is R15- program counter?
-holds the memory address of the instruction to be executed next
what does CPSR stand for and what does it do?
-current program status register
-ARM register that records the state of a program
-indicates when errors occur
What are the flags that the CPSR can show?
-N-bit: result was negative
-Z-bit: result was 0
-C-bit: instruction resulted in a bit being carried
-V-bit: result of calculation caused overflow
how can the program flow be influenced in Assembly?
-using branching
-manipulating the PC, changing which instruction will be executed next
how is conditional branching done with Assembly?
-using the compare, cmp opcode
-then a conditional branch
check memory arm
define a function
-a stored subroutine that performs a specific task based on parameters
-modularity
what are some function calling conventions in assembly?
-r0-r3 reserved for arguments and parameters
-r0 is reserved for a return value
-lr return address register, stores the address of the instruction to be returned to after execution of the function is finished
what are memory usage conventions for assembly?
preserved memory:
—r4–>r11
—SP, r13
—return address, LR or r14
—stack above SP
non-preserved memory:
—temp register, r12
—args register r0-r3
—status register
—stack below SP
what is register spilling?
-when more than 4 registers are needed, main memory can be used
-this involves using the stack
when MUSTregister spilling be used?
-when nested functions are used, to preserve the original return address, the contents of the lr must be pushed to the stack
-if this is not done, the original return address will be lost.
what are the arm opcodes for putting things onto/taking things off the stack?
-push {r4,r5,lr}
-pop {r4,r5,lr}
inline assembly
what is moore’s law?
the number of transistors on an integrated circuit doubles about every two years
what are the three types of MIPS machine code instructions?
-register type (R-type)
-Immediate type (I-type)
-Jump type (J-type)