Assembly Language Flashcards
Mnemonics
Opcodes, like mov, add and inc
Registers
Given names like eax, ebx for example.
Labels
Used to represent memory addresses, like num1 for eaxmple
Give an example of a line of assembly code that uses a mnemonic, register and memory address
mov eax, num
EAX
Accumulator register - store calculations
EBX
Base register - store a location
ECX
Counter register - for loops purposes
EDX
Data register - for random data
How can you transfer data from one memory location to another?
You cannot move something directly from memory to memory -> has to be through registers.
CF
Carry flag -> previous operation had a carry from the most significant bit.
ZF
Zero flag -> previous operation had zero results.
SF
Sign flag -> previous operation was positive (0) or negative (1)
OF
Overflow flag -> previous operation was too big to fit in memory
Jumps
Essentially calling a certain part of the code; allows loops (obsidian for examples).
Mutual Recursion
-> sub1 calls sub2, sub2 calls sub1