;====================================================================
;This displays the status of the VERIFY flag.  Although
;you can do this by typing 'VERIFY' at the DOS prompt,
;this program shows you can your program can find the status of the
;flag.
;Compile this into a .COM file!
;====================================================================

TITLE   Verify status info program.

.MODEL TINY	     ;Tiny memory model for .COM file
.8086		     ;Use 8086 code for compatibility.	No need for anthing more.
.CODE		     ;Only one segment here, it is a .COM file.
.STARTUP	     ;Let assembler put necessary startup code, i.e. ORG100h

START:
        MOV     DX,OFFSET AUTHOR
	MOV	AX,0900h
	INT	21h	      ;Print my name
        MOV     DX,OFFSET MESSAGE
	INT	21h	      ;Print message
	MOV	AX,5400h
	INT	21h	      ;Check for status of Verify flag
	CMP	AL,0

	JNE	VERON	      ;Jump to on if set
        MOV     DX,OFFSET OFF        ;Print that it is off
	JMP	ENDPR
VERON:
        MOV     DX,OFFSET ON         ;Set message offset to ON string

ENDPR:
	MOV	AX,0900h
	INT	21h		;Print message
	MOV	AX,4C00h
	INT	21H		;Exit program

AUTHOR		DB	"Verstat by Dennis Katsonis",0Ah,0Ah,0Dh,24h
MESSAGE		DB	"STATUS OF VERIFY FLAG  : ",24h
ON		DB	"ON",0Ah,0Dh,24h
OFF		DB	"OFF",0Ah,0Dh,024h

END			; Set end of program
