Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Will this set and clear the zero and sign flags?

Status
Not open for further replies.

joblaise

Technical User
Jan 29, 2005
1
0
0
US

.data
.386
.model flat, stdcall
option casemap :none ; case sensitive
.code
main PROC

mov cl,1 ; CL=1
sub cl,1 ; CL=0, SF=0, ZF=1
call DumpRegs

sub cl,1 ; CL=-1, SF=1, ZF=0
call DumpRegs

add ch,1 ; CH=0, SF=0, ZF=1
call DumpRegs

add ch,1 ; CH=1, SF=0, ZF=0
call DumpRegs

exit
main ENDP
END main
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top