Looks like no one added any tags here yet for you.
When converting from floating point to binary decimal point ___.
You take the decimal and multiply it by 2, drop the whole number, and repeat until you get a remainder of 0. Drop the leading 1 on the mantissa.
When a floating point leads to an infinite decimal, the computer will ___.
Approximate
Mantissa
The actual number portion of scientific notation.
In a 32 bit scientific number, the exponent sign uses ___ bit(s).
1
In a 32 bit scientific number, the exponent uses ___ bit(s).
8
In a 32 bit scientific number, the mantissa uses ___ bit(s).
23
In a 32 bit scientific number, the mantissa’s sign will always be ___.
1
Floats are calculated using the FPU, which stands for ___.
Floating Point Unit
An ASM instruction will have an ___ in front of it to signify it is used with floating points.
F
There are ___ FPU registers.
8
___ loads a float onto the FPU stack.
fld [num]
fadd st0, st1
stores the result in ___.
st0
Before calling a subroutine, the caller should:
Save the contents of the caller-saved registers (EAX, ECX, EDX) to the stack.
Parameters should be pushed before a subroutine and in ___.
Reverse Order
Since the stack grows down, the last thing to be pushed onto the stack will always be the ___ address.
Lowest
After the subroutine returns, the caller should:
Remove the parameters from the stack.
The return value of a subroutine should always be stored in ___.
EAX
After the stack is restored, the caller should:
Pop the caller-saved registers off the stack.
At the beginning of a subroutine, the callee should:
Push the value of EBP onto the stack, then copy the value of ESP into EBP.
After pushing EBP, the callee should:
Make space on the stack by decrementing ESP. The amount depends on how many local variables are needed.
After allocating variable space, the callee should:
Push the values of callee-saved registers (EBX, EDI, ESI) to the stack.
Before returning from a subroutine, the callee should:
Restore callee-saved registers, move the value of EBP into ESP, and pop EBP off the stack.
An ASM subroutine should be initialized in ASM as:
GLOBAL functionName
An ASM subroutine should be initialized in C as:
void functionName(args);
GCC will align structs in memory in ___ increments.
Doubleword
Given the struct:
struct node{
int id;
char name[20];
struct node *next;
}[FILL];
What command in [FILL]
would keep it from being doubleword aligned in memory?
__attribute__((packed))
A shared ASM variable should be initialized in ASM as:
GLOBAL num
A shared ASM variable should be initialized in C as:
extern int num;
When using a C function or variable in ASM:
Nothing special needs to be done in C.
A shared C variable/function should be initialized in ASM as:
EXTERN name
AND 1111, 0010 = ___.
0010
OR 1010, 0001 = ___.
1011
XOR 1010, 1001 = ___.
0011
NOT 1010 = ___.
0101
SHL 00001101, 4 = ___.
11010000
SHR 10011000, 5 = ___.
00000100
Logical Shift
Shifts the bits in a given direction, disregarding the sign.
Arithmetic Shift
Shifts the bits in a given direction, keeps the sign.
Rotation
Bitshift, but wraps the bits around instead of discarding them.
ROL 10011011, 4 = ___.
10111001
ROR 10011011, 3 = ___.
01110011