Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

x86 register flag abbreviations

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?

like image 657
Thor Avatar asked Aug 23 '17 06:08

Thor


2 Answers

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

like image 57
Sami Kuhmonen Avatar answered Oct 20 '22 07:10

Sami Kuhmonen


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.

like image 20
Anas Hameed Avatar answered Oct 20 '22 08:10

Anas Hameed