JL (JNGE) INSTRUCTION
Purpose: Conditional jump, and the sign is taken into account.
Syntax:
JL label
It jumps if it is less than or if it is not larger than or equal to.
The jump is done if SF is different than OF.
JLE (JNG) INSTRUCTION
Purpose: Conditional jump, and the sign is taken into account.
Syntax:
JLE label
It jumps if it is less than or equal to, or if it is not larger.
The jump is done if ZF = 1 or if SF is defferent than OF.
JC INSTRUCTION
Purpose: Conditional jump, and the flags are taken into account.
Syntax:
JC label
It jumps if there is cartage.
The jump is done if CF = 1
JNC INSTRUCTION
Purpose: Conditional jump, and the state of the flags is taken into account.
Syntax:
JNC label
It jumps if there is no cartage.
The jump is done if CF = 0. aysegul
09-22-2006, 12:18 AM
JNO INSTRUCTION
Purpose: Conditional jump, and the state of the flags is taken into account.
Syntax:
JNO label
It jumps if there is no overflow.
The jump is done if OF = 0.
JNP (JPO) INSTRUCTION
Purpose: Conditional jump, and the state of the flags is taken into account.
Syntax:
JNP label
It jumps if there is no parity or if the parity is uneven.
The jump is done if PF = 0.
JNS INSTRUCTION
Purpose: Conditional jump, and the state of the flags is taken into account.
Syntax:
JNP label
It jumps if the sign is deactivated.
The jump is done if SF = 0.
JO INSTRUCTION
Purpose: Conditional jump, and the state of the flags is taken into account.
Syntax:
JO label
It jumps if there is overflow.
The jump is done if OF = 1.
JP (JPE) INSTRUCTION
Purpose: Conditional jump, the state of the flags is taken into account.
Syntax:
JP label
It jumps if there is parity or if the parity is even.
The jump is done if PF = 1.
JS INSTRUCTION
Purpose: Conditional jump, and the state of the flags is taken into account.
Syntax:
JS label
It jumps if the sign is on.
The jump is done if SF = 1.
Instructions for cycles ( loops )
They transfer the process flow, conditionally or unconditionally, to a destiny, repeating this action until the counter is zero.
LOOP INSTRUCTION
Purpose: To generate a cycle in the program.
Syntax:
LOOP label
The loop instruction decreases CX on 1, and transfers the flow of the program to the label given as operator if CX is different than 1.
LOOPE INSTRUCTION
Purpose: To generate a cycle in the program considering the state of ZF.
Syntax:
LOOPE label
This instruction decreases CX by 1. If CX is different to zero and ZF is equal to 1, then the flow of the program is transferred to the label indicated as operator.
LOOPNE INSTRUCTION
Purpose: To generate a cycle in the program, considering the state of ZF.
Syntax:
LOOPNE label
This instruction decreases one from CX and transfers the flow of the program only if ZF is different to 0.
Counting instructions
They are used to decrease or increase the content of the counters.
DEC INSTRUCTION
Purpose: To decrease the operator.
Syntax:
DEC destiny
This operation subtracts 1 from the destiny operator and stores the new value in the same operator.
INC INSTRUCTION
Purpose: To increase the operator.
Syntax:
INC destiny The instruction adds 1 to the destiny operator and keeps the result in the same destiny operator.
Comparison instructions
They are used to compare operators, and they affect the content of the flags.
CMP INSTRUCTION
Purpose: To compare the operators.
Syntax:
CMP destiny, source
This instruction subtracts the source operator from the destiny operator but without this one storing the result of the operation, and it only affects the state of the flags.
CMPS (CMPSB) (CMPSW) INSTRUCTION
Purpose: To compare chains of a byte or a word.
Syntax:
CMP destiny, source
With this instruction the chain of source characters is subtracted from the destiny chain.
DI is used as an index for the extra segment of the source chain, and SI as an index of the destiny chain.
It only affects the content of the flags and DI as well as SI are incremented.
Flag instructions
They directly affect the content of the flags.
CLC INSTRUCTION
Purpose: To clean the cartage flag.
Syntax:
CLC
This instruction turns off the bit corresponding to the cartage flag, or in other words it puts it on zero.
CLD INSTRUCTION
Purpose: To clean the address flag.
Syntax:
CLD
This instruction turns off the corresponding bit to the address flag.
CLI INSTRUCTION
Purpose: To clean the interruption flag.
Syntax:
CLI
This instruction turns off the interruptions flag, disabling this way those maskarable interruptions.
A maskarable interruptions is that one whose functions are deactivated when IF=0.
CMC INSTRUCTION
Purpose: To complement the cartage flag.
Syntax:
CMC
This instruction complements the state of the CF flag, if CF = 0 the instructions equals it to 1, and if the instruction is 1 it equals it to 0.
We could say that it only "inverts" the value of the flag.
STC INSTRUCTION
Purpose: To activate the cartage flag.
Syntax:
STC
This instruction puts the CF flag in 1.
STD INSTRUCTION
Purpose: To activate the address flag.
Syntax:
STD
The STD instruction puts the DF flag in 1.
STI INSTRUCTION
Purpose: To activate the interruption flag.
Syntax:
STI
The instruction activates the IF flag, and this enables the maskarable external interruptions ( the ones which only function when IF = 1).
Interruptions and file managing
• Internal hardware interruptions
• External hardware interruptions
• Software interruptions
• Most Common interruptions
o Int 21H (DOS interruption) Multiple calls to DOS functions.
o Int 10H (BIOS interruption) Video input/output.
o Int 16H (BIOS interruption) Keyboard input/output.
o Int 17H (BIOS interruption) Printer input/output.
• Ways of working with Files
• FCB method
o Introduction
o Open files
o Create a new file
o Sequential writing
o Sequential reading
o Random reading and writing
o Close a file
• Channels of communication
o Working with handles
o Functions to use handles
_______________________________________ |