Author Topic: Displaying PSW content  (Read 2945 times)

nerdek

  • Guest
Displaying PSW content
« 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 :) )

Magnum

  • Member
  • *****
  • Posts: 2308
Re: Displaying PSW content
« Reply #1 on: January 19, 2013, 10:57:43 PM »
What is PSW ?
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

qWord

  • Member
  • *****
  • Posts: 1473
  • The base type of a type is the type itself
    • SmplMath macros
Re: Displaying PSW content
« Reply #2 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.
MREAL macros - when you need floating point arithmetic while assembling!

Gunther

  • Member
  • *****
  • Posts: 3585
  • Forgive your enemies, but never forget their names
Re: Displaying PSW content
« Reply #3 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
Get your facts first, and then you can distort them.

nerdek

  • Guest
Re: Displaying PSW content
« Reply #4 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)

dedndave

  • Member
  • *****
  • Posts: 8825
  • Still using Abacus 2.0
    • DednDave
Re: Displaying PSW content
« Reply #5 on: January 20, 2013, 01:18:46 AM »
we usually call it EFLAGS   :P

Magnum

  • Member
  • *****
  • Posts: 2308
Re: Displaying PSW content
« Reply #6 on: January 20, 2013, 02:30:07 AM »
Thanks nerdek.

Grab a couch and get comfortable here.

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org