The MASM Forum

General => The Campus => Topic started by: nerdek on January 19, 2013, 10:53:44 PM

Title: Displaying PSW content
Post by: nerdek on January 19, 2013, 10:53:44 PM
Hello, I'm beginner with ASM so don't be harsh. I'm wondering how to display the content of PSW on standard output. I mean every single bit i.e :
CF 0
PF 1
AF 0
and so on. Actually I need to display flag registers but my first thought was to display psw because it has all I need. I would be very gratefull for every tip (ofcourse scratch of code would be quite better :) )
Title: Re: Displaying PSW content
Post by: Magnum on January 19, 2013, 10:57:43 PM
What is PSW ?
Title: Re: Displaying PSW content
Post by: qWord on January 19, 2013, 11:21:11 PM
In the attachment a short example using the MASM32 SDK. For the flags, read up in AMD's or Intel's manuals.
Title: Re: Displaying PSW content
Post by: Gunther on January 19, 2013, 11:49:32 PM
Hi nerdek,

first things first: Welcome to the forum. Please check qWord's example and check the manuals. Flags are often used.

Gunther
Title: Re: Displaying PSW content
Post by: nerdek on January 20, 2013, 12:02:14 AM
Thank you very much ! Your example helped me a lot :) (PSW - program status word I thought it's common but I might be wrong)
Title: Re: Displaying PSW content
Post by: dedndave on January 20, 2013, 01:18:46 AM
we usually call it EFLAGS   :P
Title: Re: Displaying PSW content
Post by: Magnum on January 20, 2013, 02:30:07 AM
Thanks nerdek.

Grab a couch and get comfortable here.