'**** HEADER ************************************************************
'EXDOS01.PF3 (release .02)
'Copyright (c) 1990-1991 Applied Resource Technologies, Inc.
'P.O. Box 64381, Dallas, Texas 75206 U.S.A. (214) 855-0449
'Description: Demonstrates chkbits()
'**** FUNCTION DECLARATIONS *********************************************
'library
external chkbits() getattrib()
'core
'**** VARIABLE DECLARATIONS *********************************************
'library
public ptstr
'core
'**** CODE **************************************************************

local reg

load "\smartii\poptools\lib\doslib.psl" in-memory

getattrib("\smartii\poptools\lib\doslib.psl")
' getattrib() is used, since the register must contain something first
if chkbits(ax,1) = 0
     reg = ptstr
     if left(right(reg,6),1) = "1"
          message "("|ptstr|")"&"<- bit 5 is set"
     else
          message "("|ptstr|")"&"<- bit 5 is clear"
     end if
else
     message "chkbits() failed"
end if

unload "doslib.psl"

