2 Replies - 736 Views - Last Post: 08 January 2015 - 08:45 PM

#1 Hermoso   User is offline

  • New D.I.C Head

Reputation: -3
  • View blog
  • Posts: 24
  • Joined: 13-April 14

Flag bit register

Posted 07 January 2015 - 07:10 PM

Good day everyone!

I'm working in Assembly language in using a Mov command,
mov AX, 30
mov BX, 40
add AX, BX

. How can I see its flag bit; carry, overflow, parity and zero flag.

Thanks!
Is This A Good Question/Topic? 0
  • +

Replies To: Flag bit register

#2 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12691
  • View blog
  • Posts: 45,879
  • Joined: 27-December 08

Re: Flag bit register

Posted 07 January 2015 - 07:12 PM

Moved to Assembly. The Site Questions/Support forum is for questions on using the site, not with programming help.
Was This Post Helpful? 0
  • +
  • -

#3 GunnerInc   User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 918
  • View blog
  • Posts: 2,358
  • Joined: 28-March 11

Re: Flag bit register

Posted 08 January 2015 - 08:45 PM

mov does not modify the FLAGS register, only add does.

You could view the value of the FLAGS register one of two ways:

1. use LAHF to load the Carry, Zero, Parity, Overflow, and Axillary Flags into AH, then it is a matter of testing bits to check the values.

2. push the FLAGS register onto the stack with PUSHF, then pop it into a register and test the bits to check the values.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1