Figure 3-45 NOP and HLT instructions.
Name | Mnemonic and Format | Description | ||
---|---|---|---|---|
No operation | NOP | Cause no action | ||
Halt | HLT | Cause the operation of the computer to cease | ||
Flags: No flags are affected. | ||||
Addressing modes: None. |
To attach the "branch to" label to an instruction that takes action as follows
JZ EXIT . . . EXIT: MOV AX,SUM[BX] |
JZ EXIT . . . EXIT: NOP MOV AX,SUM[BX] |
As we have seen, many instructions set or clear the flags depending on their results. Sometimes, however, it is necessary to have direct control of the flags.
Figure 3-46 Flag manipulation instructions.
Name | Mnemonic and Format | Description | ||
---|---|---|---|---|
Clear carry | CLC | CF0 | ||
Complement carry | CMC | CFNOT CF | ||
Set carry | STC | CF1 | ||
Clear direction | CLD | DF0 | ||
Set direction | STD | DF1 | ||
Clear interrupt | CLI | IF0 | ||
Set interrupt | STI | IF1 | ||
Load AH from flags* | LAHF | (AH)(Low-order byte of PSW) | ||
Store AH to flags* | SAHF | (Low-order byte of PSW)(AH) | ||
*Bits 0, 2, 4, 6, and 7 are transferred according to Fig. 2-8. Bits 1, 3, and 5 are indeterminate. | ||||
Flags: Only the indicated flags areŠ affected. | ||||
Addressing modes: None. |
This is page 37.