unit 2 Assembly Language Flashcards
what is architecture?
the programmer’s view of a computer
what is architecture defined by?
instructions set (language) and operand locations(registers and memory)
what are instructions?
the words in a computer’s language
what is an instruction set?
the computer’s vocabulary
where might operands come from?
memory, registers, or from the instruction itself
how does the ARM architecture represent each instruction?
as a 32-bit word
microarchitecture is?
the specific arrangement of registers, memories, ALUs, and other building blocks to form a microprocessor
what is assembly language?
the human-readable representation of the computer’s native language.
what do assembly language instructions specify?
the operation to perform and the operands on which to operate
what is a mnemonic?
a symbolic name for a single executable machine language instruction
what is a source operand?
the variables the operation is being performed on
what is the destination operand?
the operand the result is written to
what is an example of ARM assembly code for subtraction?
SUB a, b, c
what is an example of ARM assembly code for addition?
ADD a,b,c
what does an instruction operate on?
operands
In ADD a,b,c what are the variables?
operands
where can operands be stored?
registers, memory, or in the instruction itself
what is the register set or register file?
the 16 registers used by the ARM architecture
The fewer the registers the___?
faster they can be accessed
contents are called Immediate operands because?
their values are immediately available from the instruction and do not require a register or memory access
what is the move instruction (MOV) useful for?
initializing register values small or large
what is the difference between memory and register file?
memory is larger and slower
what variables are kept in the register?
frequently used variables
ARM architecture instructions operate exclusively on?
registers, so data stored in memory must be moved to before it can be processed
Most significant byte (MSB) is?
on the left
least significant byte (LSB) is?
on the right
the 32-bit word address and data value are given in what number system?
hexadecimal
what does the loader register instruction(LDR) do?
allows you to read a data word from memory into a register
how big is a each data word?
4 bytes
how much bigger is a word address than a word number?
4 times
how is a memory address formed?
adding the contents of the base register and the offset
what does # represent?
the immediate
what is the store register instruction (STR) used for?
to write a data word from a register into memory
how are byte-addressable memories organized?
in a big-endian or little-endian fashion
In both big-endian and little-endian the most significant by (MSB) is where?
on the left and the LSB is on the right
how are bytes numbered in big-endian?
starting with o at the big(most significant) end (left end).
how are bytes numbered in little-endian?
starting with 0 at the little(least significant) end (right end).
What is an example of a Register?
R0 “ register 0)
what are the saved registers?
R4-R11
what do R4-R11 hold?
variables
what are the temporary registers?
R0-R3 and R12
what do R0-R3 and R12 hold?
intermediate values
how many bits of precision must a constant have?
< 8
how many registers can MOV use?
2 registers
each data byte has a unique?
address
how many bytes does a 32-bit word equal?
4 bytes
a word address increments by?
4
address of memory word must be multiplied by?
4, 2x4 = 8
AND and BIC are useful For?
masking bits
how would AND or BIC mask 0xF234012F (AND or BIC) 0x000000FF ?
0x0000002F
what is ORR useful for?
combining bit fields
how would ORR combine 0xF2340000 with 0x00012BC?
0xF23412BC
what is the conditional flag N?
negative, instruction result is negative
what is the conditional flag Z?
zero, instruction results in zero
what is the conditional flag C?
Carry, instruction causes an unsigned carry
what is the conditional flag V?
Overflow, instruction causes an overflow
where can Conditional Mnuemonics be added to Mnuemonic like SUB?
the end
what does a branch allow you to do?
enable out of sequence instruction execution
what are the types of branches?
Branch(B) and Branch and link(BL)
what do branches point to?
labels
what is a Label?
an instruction location
do branches have to be conditional?
no, they can be unconditional