Masm32 SDK description, downloads and other helpful links
Started by HSE, February 09, 2019, 02:03:27 AM
fInt macro sub xsp, @WordSize ;;Reserve stack place for one word fstcw WORD ptr [xsp] ;;Store FPU control word >>>> push QWORD ptr [xsp] ;;Duplicate value BitSet WORD ptr [xsp], (BIT10 or BIT11) ;;Modify the control word, int(x) = Truncate (toward 0) fldcw WORD ptr [xsp] ;;Restore modified FPU control word frndint ;;Round down fldcw WORD ptr[xsp + @WordSize] ;;Restore previous FPU control word add rsp, 2*@WordSize <<<<<<<< ;;Restore stack. Don't use pop eax. We wan't destroy itendm
add xsp, 2*@WordSize ;;Restore stack. Don't use pop xax. We'll not destroy it.
Quote from: HSE on February 13, 2019, 09:40:18 PMOnly problem I see using AsmC are 2 or 3 ".elseif macro something" that I changed to ".elseif OA_something"
Quote from: jj2007 on February 13, 2019, 10:16:23 PMRemember the old late expansion problem when using .elseif somemac(arg)==123
% .elseif [xbx].$Obj(XMenuItem).dType == MENU_TYPE_SIDEBAR
Quote from: Biterider on February 13, 2019, 10:50:01 PMSince the goal was to write code that can be compiled for x86 and x64
Quote from: HSE on February 14, 2019, 12:22:05 AMThanks JJ. It's that.Forcing expansion solve the AsmC problem (in XMenu.inc):Code Select Expand % .elseif [xbx].$Obj(XMenuItem).dType == MENU_TYPE_SIDEBAR
include \masm32\include\masm32rt.inc.codestart: mov eax, 1 .if eax==12345678h print "never" % .elseif len("test")>3 print "Len gt 3" .else print "you are screwed, my friend" .endif exitend start