This is of more use. You just want to know if that number is negative.
Here is FastSGN. Just needed is yesterday.
' P2 will be set to 1 in case SIGN of P1 is negative
MACRO SGN_LNG(P1,P2)
MACROTEMP POX
! MOV P2,0
! BT P1,31
! JNC POX
! MOV P2,1
POX:
END MACRO
ABS will normally be compiled from Powerbasic using Floating Point Mnemonics.
If you have a LONG value and just want to cut the Sign (http://www.jose.it-berater.org/smfforum/index.php?topic=1274.0), you can use this few lines.
MACRO ABS_LNG(P1)
MACROTEMP POS
! BT P1,31
! JNC POS
! NEG P1
POS:
END MACRO
;D
Works fine.