News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

No understand Instruction JA

Started by RHL, January 10, 2012, 05:13:28 PM

Previous topic - Next topic

RHL

HEllo All!
I have problem for understand the instruction JA
read information and even I do not understand, could someone please help me to understand how it works  :(

qWord

CMP A,B
jump if A above B (unsigned compare).
FPU in a trice: SmplMath
It's that simple!


RHL

@qWord:
Very Thanks man!

@dedndave:
WoW! very goood!  :cheekygreen:

jj2007

Many jxx instructions can be used via .if Zero? etc high level constructs. But there is no .if SignOrZero?, unfortunately.
The SignOrZero? equate below works but uses 4 bytes where 2 would be enough.

include \masm32\include\masm32rt.inc
SignOrZero? equ <Sign? || Zero?> ; 4 bytes, should be 2...
; SignOrZero? equ <!(!Sign? && !Zero?)>  ; doesn't work, Masm bug??
.code
start:
mov eax, 0
cmp eax, 0
; int 3
.if SignOrZero?
print str$(eax), "  SZ", 13, 10
.elseif !SignOrZero?
print str$(eax), "  Not SZ", 13, 10
.else
print str$(eax), "  Other", 13, 10
.endif
mov eax, -1
cmp eax, 0
.if SignOrZero?
print str$(eax), "  SZ", 13, 10
.elseif !SignOrZero?
print str$(eax), "  Not SZ", 13, 10
.else
print str$(eax), "  Other", 13, 10
.endif
mov eax, 1
cmp eax, 0
.if SignOrZero?
print str$(eax), "  SZ", 13, 10
.elseif !SignOrZero?
print str$(eax), "  Not SZ", 13, 10
.else
print str$(eax), "  Other", 13, 10
.endif
inkey "ok"
exit
end start

RHL