Professional Documents
Culture Documents
In computer science, a flag is a value that acts as a signal for a function or process.
The value of the flag is used to determine the next step of a program. Flags are often
binary flags, which contain a boolean value (true or false). However, not all flags are
binary, meaning they can store a range of values.
This is a special register with individual bit positions assigned to show he status
of he
CPU or the results of arithmetic operations.
Each relevant bit is given a name and others are undefined.
Types:
Zero Flag (ZF)
If the result is zero, zero flag is set. Once a flag is set, it remains in that state until another
instruction that affects the flags is executed Not all instructions affect all status flags.
add and sub affect all six flags
inc and dec affect all but the carry flag
mov, push, and pop do not affect any flags
Indicates the sign of the result. Useful only when dealing with signed numbers
MOV AL,15
ADD AL,97
Clears the sign flag as sets the sign flag as the result is 112 (or 0111000 in binary)
MOV AL,15
SUB AL,97
sets the sign flag as the result is -82 (or 10101110 in binary)
Effective index:
Effective index is the ratio of the propagation constant in the waveguide to the free
space propagation constant. There can be more than one effective indices depending
on the modes that are excited in the waveguide.
Counter Register:
Registers and counters. ... In the simplest form, a flip-flop is a one-bit register.
Acounter is simply a register with combinational logic to implement counting that is it is
possible to retrieve the contents, add or subtract one to the contents, and then store it
back into the register in one operation.
IP (Instruction pointer):
IP register always works together with CS segment register and it points to
currently executing instruction .
MODEL directive
Specify how many code and data segments are necessary for the program. There are
many several types of memory small, compact, medium, large, etc.
For example
.model small
It shows that’s no more than 64 k memory for code and 64k for data.