Chapter 6 - (๐˜ฃ๐˜บ ๐˜‘๐˜ฆ๐˜ง๐˜งโ€‹) Flashcards

1
Q

o Allows programmer to skip sections of program

A
  • Jump (JMP)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

o Allows programmer to make decisions based upon numerical tests

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

3 Unconditional Jumps

A

Short
Near
Far

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

๏‚ง 2-byte instruction that allows jumps within +127 and -128 bytes from the address

A

o Short jump

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

๏‚ง 3-byte instruction that allows jumps within +32k bytes from instruction

A

o Near jump

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

๏‚ง 5-byte instruction that allows jumps to any memory location within the real memory system

A

o Far jump

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

o Relative jumps

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

o Moved with related software to any location in code segment without a change

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

๏‚ง Follows the opcode

A

o Distance/Displacement

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

o Similar to short jump, only farther

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

o Also relocatable

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

o +- 2G in 80386

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

๏‚ง Denotes relocatable jump address

A

o Letter R

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

o Obtains a new segment and offset address to accomplish the jump

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

๏‚ง Obtain a far jump from label

A

o Far label

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

๏‚ง Appear in programs that contain more than one program file

A

o External labels

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

o Sets up instruction as indirect jump
o Address of jump is in register

A
  • Jumps with Register Operands
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

o Double indirect jump

A

Indirect Jumps Using an Index

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

o Always short jumps

A
  • Conditional jump
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Conditional jump tests the following flag bits

A

๏‚ง Sign
๏‚ง Zero
๏‚ง Carry
๏‚ง Parity
๏‚ง Overflow

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

o Conditions tested by conditional jumps

A
  • Conditional Set Instructions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

o Set byte to 01H or clear a byte to 00H

A
  • Conditional Set Instructions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q
  • Combination of decrement CX and JNZ conditional jump
A

LOOP

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

Two Conditional LOOPs

A

LOOPE and LOOPNE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
LOOPE
๏‚ง Loop while equal
26
๏‚ง Jumps if cx!=0 while an equal condition exists ๏‚ง Exits if condition is not equal or cx = 0
o LOOPE
27
o LOOPNE
๏‚ง Loop while not equal
28
๏‚ง Jumps if cx!=0 while a not-equal condition exists ๏‚ง Exits if condition is equal or if cx = 0
o LOOPNE
29
o Do not function when using Visual C++ inline assembler
* Dot commands
30
Two Dot commands
o .REPEAT-.UNTIL and .WHILE-.ENDW
31
o Causes all assembler generated statements to be listed
* .LISTALL
32
o Generates label @startup
* .STARTUP
33
o Used with a condition to begin the loop
* .WHILE
34
o Ends the loop
* .ENDW
35
* Series of instructions is repeated until some condition occurs
REPEAT-UNTIL Loops
36
o Defines start of loop
* .REPEAT
37
o End of loop which contains condition
* .UNTIL
38
* Subroutine, method, or function
PROCEDURE
39
three terms associated with PROCEDURE
* Subroutine, method, or function
40
* Group of instruction that performs one task
PROCEDURE
41
* Reusable section of the software
PROCEDURE
42
o Links to the procedure
* CALL
43
o Pushes the address of the instruction following the CALL(return address) on the stack
* CALL
44
o Returns from the procedure
* RET
45
o Removes an address from the stack so the program returns to the instruction following the call
* RET
46
o Procedures used by all software
* Global
47
o Far procedures
* Global
48
o Procedures used by a given task
* Local
49
o Near procedures
* Local
50
* Transfers flow of program to the procedure
CALL
51
o 3 bytes long
* Near Call
52
o First byte โ€“ opcode o Second and third โ€“ displacement ๏‚ง +- 32k
* Near Call
53
o Like a far jump
* Far Call
54
o Call a procedure stored in any memory location in the system
* Far Call
55
o 5-byte instruction o Opcode โ€“ IP (2 & 3) and CS (4 & 5)
* Far Call
56
* often keyed with a number that addresses a CALL address in a lookup table
CALLs with Indirect Memory Addresses
57
* return instruction
RET
58
o removes a 16-bit number from the stack and places it into IP o removes a 32-bit number and places it into IP and CS
RET
59
o externally derived from hardware signal
* hardware-generated CALL
60
o execution of instruction
* software-generated CALL
61
two types of INTERRUPT
hardware-generated CALL software-generated CALL
62
also called "exception"
INTERRUPT
63
* 4-byte number stored in the first 1024 bytes of memory when the microprocessor operates in the real mode
Interrupt Vectors
64
o 256 different software interrupt instructions
* INTs
65
o Address of interrupt vector is determined by multiplying the interrupt number by __
4
66
๏‚ง Used to call system procedures because the address of the system function need not be known
o Software interrupts
67
๏‚ง Used only with software or hardware interrupt service procedures ๏‚ง Pop stack data back into the IP ๏‚ง Pop stack data back into CS ๏‚ง Pop stack data back into the flag register
o Interrupt Return instruction
68
๏‚ง 80386 through Core2 ๏‚ง Return from an interrupt service that is called in the protected mode
o IRETD
69
๏‚ง Pops 32-bit pointer from the stack
o IRETD
70
Interrupt operated in Real Mode
o Interrupt Return instruction (IRET)
71
Interrupt operated in Protected Mode
o IRETD
72
o Function as breakpoint o 1-byte instruction
* INT 3
73
o Interrupt an overflow
* INTO
74
o Software that adds or subtracts signed binary numbers
* INTO
75
o Ends with IRET instead of RET, contents of flag register are saved on the stack
* Interrupt Service Procedure
76
๏‚ง Set interrupt flag ๏‚ง Places 1 into I flag bit
o STI
77
๏‚ง Clear interrupt flag ๏‚ง Places 0 into I flag bit
o CLI
78
๏‚ง Retrieves 8-byte return address ๏‚ง Retrieves the 32-bit EFLAG
o IRETQ
79
o STC
๏‚ง Set carry
80
o CLC
๏‚ง Clear carry
81
o CMC
๏‚ง Complement carry
82
o Monitors the hardware BUSY pin on the 80286 and 80386 and the TEST pin on the 8086/8088
* WAIT
83
* HLT
o Halt
84
o Stops the execution of software
* HLT
85
o THREE WAYS TO EXIT A HALT
๏‚ง By interrupt ๏‚ง By hardware reset ๏‚ง During a DMA operation
86
* NOP
o No operation
87
Appends an instruction and causes the LOCK pin to become logic 0
* LOCK Prefix
88
* ESC
o Escape
89
o Passes instructions to the floating-point coprocessor from the microprocessor
* ESC
90
o Comparison instruction that may cause an interrupt
* BOUND
91
o Compares the contents of any 16-bit or 32-bit register against the contents of two words of memory
* BOUND
92
๏‚ง Creates a stack frame by pushing BP onto the stack and then loading BP with the uppermost address of the stack frame
o ENTER
93
๏‚ง Reverses the process by reloading both SP and BP with their prior values
o LEAVE