ASM Final

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 40

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

41 Terms

1

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.

New cards
2

When a floating point leads to an infinite decimal, the computer will ___.

Approximate

New cards
3

Mantissa

The actual number portion of scientific notation.

New cards
4

In a 32 bit scientific number, the exponent sign uses ___ bit(s).

1

New cards
5

In a 32 bit scientific number, the exponent uses ___ bit(s).

8

New cards
6

In a 32 bit scientific number, the mantissa uses ___ bit(s).

23

New cards
7

In a 32 bit scientific number, the mantissa’s sign will always be ___.

1

New cards
8

Floats are calculated using the FPU, which stands for ___.

Floating Point Unit

New cards
9

An ASM instruction will have an ___ in front of it to signify it is used with floating points.

F

New cards
10

There are ___ FPU registers.

8

New cards
11

___ loads a float onto the FPU stack.

fld [num]

New cards
12

fadd st0, st1 stores the result in ___.

st0

New cards
13

Before calling a subroutine, the caller should:

Save the contents of the caller-saved registers (EAX, ECX, EDX) to the stack.

New cards
14

Parameters should be pushed before a subroutine and in ___.

Reverse Order

New cards
15

Since the stack grows down, the last thing to be pushed onto the stack will always be the ___ address.

Lowest

New cards
16

After the subroutine returns, the caller should:

Remove the parameters from the stack.

New cards
17

The return value of a subroutine should always be stored in ___.

EAX

New cards
18

After the stack is restored, the caller should:

Pop the caller-saved registers off the stack.

New cards
19

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.

New cards
20

After pushing EBP, the callee should:

Make space on the stack by decrementing ESP. The amount depends on how many local variables are needed.

New cards
21

After allocating variable space, the callee should:

Push the values of callee-saved registers (EBX, EDI, ESI) to the stack.

New cards
22

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.

New cards
23

An ASM subroutine should be initialized in ASM as:

GLOBAL functionName

New cards
24

An ASM subroutine should be initialized in C as:

void functionName(args);

New cards
25

GCC will align structs in memory in ___ increments.

Doubleword

New cards
26

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))

New cards
27

A shared ASM variable should be initialized in ASM as:

GLOBAL num

New cards
28

A shared ASM variable should be initialized in C as:

extern int num;

New cards
29

When using a C function or variable in ASM:

Nothing special needs to be done in C.

New cards
30

A shared C variable/function should be initialized in ASM as:

EXTERN name

New cards
31

AND 1111, 0010 = ___.

0010

New cards
32

OR 1010, 0001 = ___.

1011

New cards
33

XOR 1010, 1001 = ___.

0011

New cards
34

NOT 1010 = ___.

0101

New cards
35

SHL 00001101, 4 = ___.

11010000

New cards
36

SHR 10011000, 5 = ___.

00000100

New cards
37

Logical Shift

Shifts the bits in a given direction, disregarding the sign.

New cards
38

Arithmetic Shift

Shifts the bits in a given direction, keeps the sign.

New cards
39

Rotation

Bitshift, but wraps the bits around instead of discarding them.

New cards
40

ROL 10011011, 4 = ___.

10111001

New cards
41

ROR 10011011, 3 = ___.

01110011

New cards

Explore top notes

note Note
studied byStudied by 56 people
145 days ago
5.0(2)
note Note
studied byStudied by 9 people
751 days ago
5.0(1)
note Note
studied byStudied by 51 people
758 days ago
5.0(2)
note Note
studied byStudied by 22 people
968 days ago
4.5(2)
note Note
studied byStudied by 7 people
569 days ago
5.0(1)
note Note
studied byStudied by 1 person
809 days ago
5.0(1)
note Note
studied byStudied by 36 people
720 days ago
5.0(1)
note Note
studied byStudied by 10144 people
699 days ago
4.6(60)

Explore top flashcards

flashcards Flashcard (27)
studied byStudied by 21 people
141 days ago
5.0(3)
flashcards Flashcard (97)
studied byStudied by 18 people
843 days ago
5.0(1)
flashcards Flashcard (61)
studied byStudied by 5 people
94 days ago
5.0(1)
flashcards Flashcard (75)
studied byStudied by 8 people
724 days ago
5.0(2)
flashcards Flashcard (20)
studied byStudied by 2 people
15 days ago
5.0(1)
flashcards Flashcard (32)
studied byStudied by 19 people
719 days ago
5.0(1)
flashcards Flashcard (48)
studied byStudied by 39 people
407 days ago
5.0(1)
flashcards Flashcard (278)
studied byStudied by 172 people
134 days ago
5.0(1)
robot