Computer Architecture Pre Finals

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/46

encourage image

There's no tags or description

Looks like no tags are added yet.

47 Terms

1
New cards

Procedures

Considered the most important innovation in the development of programming languages.

2
New cards

Subroutines

Procedures are also known as subroutines.

3
New cards

Reentrant procedure

A reentrant procedure is a procedure that can be implemented in such a way that more than one process can execute it at the same time without any conflict.

4
New cards

Call instruction (CALL)

This branches from the present location to the procedure.

5
New cards

Near CALL

  A Near CALL is an instruction to call a procedure that is in the same code segment as the CALL instruction that calls it, while the Far CALL is used to call a procedure from a different segment.

6
New cards

Return instruction (RET

This returns the control to the place from which a procedure was called. Thus, it is the last instruction in any procedure.

7
New cards

CALL Address

This instruction pushes the current IP value onto the stack and causes a jump to the entry point of the procedure by placing the address of the entry point in the IP. This basically calls a procedure of a function.

8
New cards

CALL Label (Near)

This instruction pushes the content of the IP onto the stack and jumps to the offset address in the current code segment.

9
New cards

CALL Label (Far)

This instruction pushes the content of the IP onto the stack and jumps to the offset address in any memory location.

10
New cards

CALL Memory (Near)

This instruction pushes the content of the IP onto the stack and jumps to the offset address in the memory register of the current code segment.

11
New cards

CALL Memory (Far)

This instruction pushes the content of the IP onto the stack and jumps to the offset address of the register at any memory location.

12
New cards

RET

This instruction returns the address from a near procedure.

13
New cards

RETF

This instruction returns the address from a far procedure.

14
New cards

Conditional branches

These branch instructions may or may not cause branching, depending on some specified conditions.

15
New cards

Branch instruction

A branch instruction contains the address of the next instruction to be executed as one of its operands (Stallings, 2019).

16
New cards

Direct

The instruction contains the target address.

17
New cards

Indirect

The instruction specifies where the target address is to be found.

18
New cards

Relative

The instruction specifies the differences between the current and the target address.

19
New cards

Branch

In computer organization, a branch may also refer to the act of switching execution to a different instruction sequence as a result of executing a branch instruction.

20
New cards

Forward

Instructions with higher addresses

21
New cards

Backward

Instructions with lower addresses

22
New cards

Unconditional branches

These instructions always result in branching.

23
New cards

Jump instructions

Jump instructions facilitate the transfer of the program sequence to the memory address given in the operand, based on the specified flag.

24
New cards

Unconditional Jump Instructions

These are used to jump on a particular location unconditionally. Thus, there is no specific condition that needs to be satisfied for the jump to take place.

25
New cards

Near JMP

This procedure targets memory location within the same code segment (intra-segment).

26
New cards

Short JMP

This procedure targets memory location within the same code segment (intra-segment), but the offset is 1byte long.

27
New cards

Far JMP

This procedure targets memory location that is outside the segment (inter-segment), and the size of the instruction pointer is a double word.

28
New cards

Conditional Jump Instructions

In implementing conditional jumps, the processor must check for a specific condition for the jump to take place. Each status flag, or a combination of the status flags, is tested for a conditional jump.

29
New cards

Status flags

C – carry flag, P – parity flag, A – auxiliary carry flag, Z – zero flag, S – sign flag, and O – overflow flag.

30
New cards

JA Label

Short jump if the 1st operand is above the 2nd operand (as set by the CMP instruction); Unsigned

31
New cards

JAE Label

Short jump if the 1st operand is above or equal to the 2nd operand (as set by the CMP instruction); Unsigned

32
New cards

JB Label

Short jump if 1st operand is below the 2nd operand (as set by the CMP instruction); Unsigned

33
New cards

JBE Label

Short jump if 1st operand is below or equal to the 2nd operand (as set by CMP instruction); Unsigned

34
New cards

JC Label

Short jump if carry flag is set to 1

35
New cards

JE Label

Short jump if 1st operand is equal to 2nd operand (as set by the CMP instruction); Either signed or unsigned

36
New cards

JG Label

Short jump if 1st operand is greater than the 2nd operand (as set by the CMP instruction); Signed

37
New cards

JMP Label

Unconditional jump; Transfers control to another part of the program; 4byte address may be entered in the form: 1234h:5678h, where the 1st value is a segment and the 2nd value is an offset

38
New cards

JNP Label

Short jump if no parity (odd); Only the 8 low bits of the result are checked; Set by the CMP, SUB, ADD, TEST, AND, OR, or XORinstructions

39
New cards

JP Label

Short jump if parity (even); Only the 8 low bits of the result are checked; Set by the CMP, SUB, ADD, TEST, AND, OR,or XOR instructions

40
New cards

JNS Label

Short jump if not signed (if positive); SetbyCMP, SUB,ADD, TEST, AND, OR, or XOR instructions.

41
New cards

JS Label

Short jump is signed (if negative); Set by CMP, SUB, ADD, TEST, AND, OR, or XOR instructions.

42
New cards

JO Label

Short jump if overflow

43
New cards

Loop

Block of statements that are repeatedly executed until a specific condition is satisfied.lock of statements that are repeatedly executed until a specific condition is satisfied.

44
New cards

LOOP Label

Decreases the CX; Jump to label if CX is not zero.

45
New cards

LOOPE/LOOPZ Label

Decrease the CX; Jump to label if CX is not zero and the value of Z is one (equal).

46
New cards

LOOPNE/LOOPNZ Label

Decrease the CX; Jump to label if CX is not zero and the value of Z is zero (not equal).

47
New cards

JCXZ Label

Short jump if CX register is 0.