Chapter 13 Flashcards

1
Q

What is bubble sort

A

It can sort almost anything in computer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is execution thread

A

Step by step instructions connected to each other

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is rbt command

A

come back where we start diversion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is int and iret

A
int = instruction
iret = return from instruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is temporary division

A

There are roundabouts on roads as well that take us back from where we started after having traveled on the boundary of the round. This is the concept of a temporary diversion.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are 2 types of instructions diversion

A

temporary

permanently

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What instructions are for permanent diversion

A

jump

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What instructions are for temporary diversion

A

call

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is RET

A

It is return. It takes no arguments and transfers control back to the instruction following the CALL that took us in this subroutine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What register is used for the top of stack

A

Stack pointer (SP)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How we can get the physical address of stack

A

SS:SP combination

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the behavior of SP when stack is pushed

A

decremented by two

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Can we push or pop single byte in stack

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the difference between push and call in stack

A

Regarding the stack, the operation of PUSH is similar to CALL however with a register other than the instruction pointer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the behavior of SP when stack is pop

A

incremented by two

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What register is not modified during sub routine

A

BX

17
Q

Does operand of PUSH is called a source and operand of POP called destination

A

Yes

18
Q

What is role of SP in direct call

A

SP decremented by two

19
Q

What is the role of SP in RET

A

incremented by two

20
Q

What is the maximum number of parameters a sub-routine can receive

A

seven

21
Q

Can we use stack pointer in effective address

A

No

22
Q

Stack should be clear by caller or callee

A

callee

23
Q

What is stack overflow

A

If the stack is not cleared or is partially cleared the stack will eventually become full, SP will reach 0, and thereafter wraparound producing unexpected results. This is called stack overflow.

24
Q

What is unit of stack operation

A

word

25
Q

What is local variable

A

Another important role of the stack is in the creation of local variables that are only needed while the subroutine is in execution and not afterwards. They should not take permanent space like global variables. Local variables should be created when the subroutine is called and discarded afterwards. So that the spaced used by them can be reused for the local variables of another subroutine. They only have meaning inside the subroutine and no meaning outside it.
The most convenient place to store these variables is the stack. The swapflag we have declared as a word occupying space permanently is only needed by the bubble sort subroutine and should be a local variable. The stack pointer will be decremented by an extra two bytes thereby producing a gap in which a word can reside. This gap will be used for our temporary, local, or automatic variable. mov and push command can start the process of such sub routine.