6
votes

I'm currently studying assembly language.

In Microsoft visual studio 2017, I wanted to check the current status of the register flags.

enter image description here

I wanted to know what each register flag abbreviation stands for, so I checkout the wiki page on x86 register flags.

enter image description here

But as you can see, the register flag abbreviations shown in Visual studio do not match the abbreviations in the wiki page.

For the register flags in the visual studio, how can I find out what they stand for?

2
@SamiKuhmonen, thank you so much for the link! It is exactly what I'm looking for. But at the top of the page, it says This documentation is archived and is not being maintained. And clicking on the recommended version produces a content retired page. So I was wondering, if there is an newer version of the documentation? - Thor
I noticed the same. Not sure if there is a current version since this came up with searches first and has all the regs shown - Sami Kuhmonen
And I can guess source some of them: OVerflow, Enable Interrupt, ZeRo, Aux..Carry, Parity Even (1=true), CarrY. | On contrary: UP = no idea, if it's like "up", then it's going up when UP=0, which makes as much sense as many other MS things. The PL is another mystery to me, again if it is PLus, then PL=0 is non-negative value, so ... /me left scratching head. - Ped7g
GDB uses the same 2-letter codes as Intel's documentation. e.g. ZF, SF. (See the bottom of the x86 tag wiki for tips on using GDB for asm.) - Peter Cordes

2 Answers

8
votes

Microsoft seems to use slightly different abbreviations for the flags, they can be found in older Visual Studio documentation:

OV: Overflow
UP: Direction
EI: Interrupt
PL: Sign
ZR: Zero
AC: Auxiliary carry
PE: Parity
CY: Carry

1
votes

Overflow flag(OV): Set to 1, when given instruction is for e.g of 32bit and resultant value is of 33bit.

Direction flag(UP): Used for operations on strings like lodsb. If set to 1, the acess is from higher memory location to lower memory location else the acess is from loower memory location to higher memory location.

Interrupt flag(EI): Help cpu to identify external interrupt. If set to 1 then microprocessor will recognize interupt request. Else it will ignore the interupt request.

Sign(PL): Set to 1, when most significient bit is 1.

Zero(ZR): set to 1, if result is zero after instruction excuetion.

Auxiliary carry(AE): Bocome 1, if 4th bit generate carry.

Parity(PE): Become 1, if number of 1 bits in the low byte of the result is even.

Carry (CY): set to 1, if carry is generated after a operation.