Exam #1 Review Flashcards
man command
manual
who command
shows whose logged in
ld command
linker-loader
cat command
concatenates one file to another
pull command
fetches and downloads remote repository and immediately updates local repository to match the content
bit
smallest unit of data
byte
8 bits
word
2 bytes
ALU
arithmetic logic unit
CU
control unit
IP
instruction pointer
registers
hold data in CPU (looks normal)
How many bytes are AH and AL
1 byte
How many bytes are AX
2 bytes
How many bytes are EAX
4 bytes
How many bytes are RAX
8 bytes
What do we use to make an executable?
nasm and ld
what is the .data assembly section used for?
data variables (DB, DW, DD)
what is the .bss assembly section used for?
uninitialized data
what is the .text assembly section used for?
where the main code goes
how to declare a variable in assembly
in the .data section:
variable: datatype value
ex: var1: DB 1
mov purpose and usage
moves data into register
mov reg, data
ex: mov AX, var1
add purpose and usage
adds data into register
add ____, ____
inc purpose and usage
increments register by 1
inc register
ex. inc AX
dec purpose and usage
decrements register by 1
dec register
ex. dec AX
sub purpose and usage
subtracts data into register
sub ____, ____
fetch/execute cycle
1) get next instruction from RAM (current IP)
2) Update IP
3) Decode and run
Permissions
rwx rwx rwx
owner, group, world
set these to binary to give read, write, execute to desired ppl