Run this prog :

.386
.MODEL FLAT,STDCALL
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib

.DATA
titre db "damn !",0
positif db "-1 > 0",0
negatif db "-1 < 0",0

.CODE
start:
mov ax, -1
.if ax < 0
mov eax, offset negatif
.else
mov eax, offset positif
.endif
invoke MessageBox, 0, eax, ADDR titre, 0
invoke ExitProcess, 0
end start

In the future, i will always use cmp !!!

(s)
Posted on 2001-08-21 08:56:12 by (scalp)
When you do signed comparison use

.IF ( SWORD PTR ax )
Posted on 2001-08-21 09:37:37 by Dr. Manhattan
SWORD.... didn't see that before !

thanx

(s)
Posted on 2001-08-21 11:09:45 by (scalp)
Hmm since we are here, (and too lazy to check it out myself :rolleyes: ), is there also a SDWORD and SBYTE ?

NaN
Posted on 2001-08-21 13:21:47 by NaN
Nan,

Yep.
Posted on 2001-08-21 22:32:03 by Ernie