Board index » delphi » Flags in DOS.Registers

Flags in DOS.Registers

Make it short:

Which bits represents Carry, Zero, etc in DOS unit registers.flags?

Thanks

 

Re:Flags in DOS.Registers


Quote
In article <31FF51D4.2...@melsa.net.id> Yusup Budiasa wrote:

>Make it short:

>Which bits represents Carry, Zero, etc in DOS unit registers.flags?

The DOS unit defines FCarry, FParity, FAuxiliary, FZero, FSign and
FOverflow.

15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
xx xx xx xx OF DF IF TF SF ZF xx AF xx PF xx CF
             |  |  |  |  |  |     |     |     + Carry
             |  |  |  |  |  |     |     +--- -- Paritty
             |  |  |  |  |  |     +------------ Auxiliary Carry
             |  |  |  |  |  +------------------ Zero
             |  |  |  |  +--------------------- Sign
             |  |  |  +------------------------ Trap
             |  |  +--------------------------- Interrupt Enable
             |  + ----------------------------- Direction
             +--------------------------------- Overflow

ASM documentation on LAHF and SAHF usually list the 8080 compatible
flags (from high to low): SF ZF xx AF xx PF xx CF which corresponds
with the above lower 8-bits.

   ...red

Re:Flags in DOS.Registers


Quote
Yusup Budiasa wrote:

> Make it short:

> Which bits represents Carry, Zero, etc in DOS unit registers.flags?

> Thanks

8086:
Bit #
11      overflow
10      direction
9       interrupt
8       trap
7       sign
6       zero
4       auxiliary
2       parity
0       carry
80386+ extensions
Bit#
1       1
5       0
12,13   IO privilege level
14      nested
15      0
16      resume
17      virtual 8086 mode

Ben

Other Threads