From 056cd7a9a15b78172b7add7d354816805d162e80 Mon Sep 17 00:00:00 2001 From: Rairii <2650838+Wack0@users.noreply.github.com> Date: Fri, 11 Apr 2025 12:05:47 +0100 Subject: [PATCH] tests: add test for extended floating point variables --- IFPSLib.Tests/CompiledCode_float80.bin | Bin 0 -> 6476 bytes IFPSLib.Tests/CompiledCode_float80.txt | 820 ++++++++++++++++++ IFPSLib.Tests/IFPSLib.Tests.csproj | 4 + .../Properties/Resources.Designer.cs | 385 ++++---- IFPSLib.Tests/Properties/Resources.resx | 6 + IFPSLib.Tests/ScriptTest.cs | 12 + 6 files changed, 1054 insertions(+), 173 deletions(-) create mode 100644 IFPSLib.Tests/CompiledCode_float80.bin create mode 100644 IFPSLib.Tests/CompiledCode_float80.txt diff --git a/IFPSLib.Tests/CompiledCode_float80.bin b/IFPSLib.Tests/CompiledCode_float80.bin new file mode 100644 index 0000000000000000000000000000000000000000..eccae2bcca6c3047827d33ab6f50bf683c7192ac GIT binary patch literal 6476 zcmcIo%WoV>8LxhMGdscAWW)OvC(8_S!>a$!lkA z!-YYD8xkiD99CR7A})x-N=W<}T=-LXZutGas_H5Cv^NIC$X#9a)%Si?wX?Od`m9pw zn|R*9j2G!u27j=qQJ}Be$v=2t)UrEZSi$YS=+1mHhhv3RB>zUjrVmxD) zMDg!JJEjo*y|Ni+IoZ9n8mQ}d@9yv4eY(4M`_{KGQ|r@{Wcs7Mo#|-%*)c;4xCwcsv@VWt}F{jSK+~r;fO~D9t8Mqs2`v%l{on zBV+t%lE!uFc+?o*XN|_4AtEpEGkcg(gf(gu(axQX;MBb_4Tj9B;SCG{5BVly!wv&xaucyO!ti3Ko;1#E)#25Wpl*|75zzzNCQ7WDSxOI1Qrkx#6sRZ3c~$Zrq3;#8jo=rbdBF z6R>)lh}0pH+tZp8)-nq(3(yO%P%)kB+6X~;7eK?6WJ+^I7B%dIk1CE?sV1_v-dRFEBmUo-OXryT1yxN0czM-n>so@2)2P2` zOE_WF2sl7HB;(4tJYx4YoU|ifl7;~8Jy1BtRn^I!VU;k%w z=23FZVe$8wL-_g43A*O^%tJzDBG$@G@BnZ0hD4Q1ZM1f0TQ)e-o|_KWhLH>mjGbOW z`-eFUCr877moz54_yS;`wyoM&LyyV4_M{y2fF(*$ zf=H+6sn0c~J4+%O1?3Ra*qr(tG(D7^ie@f2K$12fZRP@6ie7s!X)rGd7k*1p zVu?lO@DcqO33F^R|8Q#h`byY_gbYKm%hVD%UJ@-X>wXtrA?eZvggD-ot7+HMPJF4n z#PaQ4PvaidM5uM`=>_MKS|lvX@!#hzDvmpVm`QGe2wAQFa2F6O!z;Y{Im zFmw%C77|~ajcsR%6@J2;()2~)3|F)Lp5^MLKjNxos71O~Qcv5Qq*d)nVZ8hTk4p1% zs)Jc;a)%*pTf)}?b@N0_(s?2*&?gv_r5i86<2?s>1NoG23xmAm{${>=AOMJ$B%GIJ zwAZs&|AH;%41YK^m1d()FS7BNdFJ=ikH2S5WCZz)9iX4F!)D&)1}Edkz9@Hf8a`Hg zY6l-v2kIE3T#(Jzk6ig!emG}%QH%KHjr*ehkm9auGw-{)hhV&F>|(l`D>!VG@;5Gm ztwg`-4YUX33sPKVNQfWtUkf3!nhUsaK!-7JTs7%6`=!ZtW7G_UDB@SNx#PM-bf_f~ z2HG~G91{tb8uUP*iBcwgwU#6R1`QK|2HkVfJN88Umz&k&bmE#o!bdt(?ne-kRDEmuHik1@IMM(V^LI3PREVAPPDIR + pop ; StackCount = 2 + pop ; StackCount = 1 + ne RetVal, Var1, UnicodeString_3("") + ret + +.function(import) external internal returnsval WIZARDFORM() + +.function(import) external class(TWIZARDFORM, PREVAPPDIR) __pascal void TWIZARDFORM->PREVAPPDIR(__in __unknown,__in __unknown) + +.function(export) BOOLEAN ISPORTABLE() + pushtype UnicodeString_2 ; StackCount = 1 + pushtype UnicodeString_2 ; StackCount = 2 + assign Var2, UnicodeString_3("{param:portable|0}") + pushvar Var1 ; StackCount = 3 + call EXPANDCONSTANT + pop ; StackCount = 2 + pop ; StackCount = 1 + eq RetVal, Var1, WideChar_2("1") + pop ; StackCount = 0 + ret + +.function(import) external internal returnsval EXPANDCONSTANT(__in __unknown) + +.function(export) BOOLEAN SELECTPRINTER(__out Type30 Arg1) + pushtype S32 ; StackCount = 1 + pushtype Type30 ; StackCount = 2 + assign Var2, Arg1 + pushvar Var1 ; StackCount = 3 + call SIZEOF + pop ; StackCount = 2 + pop ; StackCount = 1 + assign Arg1[0], Var1 + pop ; StackCount = 0 + pushtype TWIZARDFORM ; StackCount = 1 + pushvar Var1 ; StackCount = 2 + call WIZARDFORM + pop ; StackCount = 1 + pushvar Arg1[1] ; StackCount = 2 + call TWINCONTROL->HANDLE + pop ; StackCount = 1 + pop ; StackCount = 0 + assign Arg1[2], S32(0) + assign Arg1[3], S32(0) + assign Arg1[4], S32(0) + assign Arg1[5], S32(262404) + assign Arg1[6], S32(0) + assign Arg1[7], S32(0) + assign Arg1[8], S32(0) + assign Arg1[9], S32(0) + assign Arg1[10], S32(0) + assign Arg1[11], S32(0) + assign Arg1[12], S32(0) + assign Arg1[13], S32(0) + assign Arg1[14], S32(0) + assign Arg1[15], UnicodeString_3("") + assign Arg1[16], UnicodeString_3("") + assign Arg1[17], S32(0) + assign Arg1[18], S32(0) + pushtype Pointer ; StackCount = 1 + setptr Var1, Arg1 + pushvar RetVal ; StackCount = 2 + call comdlg32.dll!PrintDlgA + pop ; StackCount = 1 + pop ; StackCount = 0 + ret + +.function(import) external internal returnsval SIZEOF() + +.function(import) external class(TWINCONTROL, HANDLE) __pascal void TWINCONTROL->HANDLE(__in __unknown,__in __unknown) + +.function(export) BOOLEAN PRINTRICHEDIT(__in Type30 Arg1,__in TRICHEDITVIEWER Arg2,__in UnicodeString_2 Arg3,__in Double Arg4,__in Double Arg5,__in Double Arg6,__in Double Arg7) + pushtype Type31 ; StackCount = 1 + pushtype Type34 ; StackCount = 2 + pushtype U32_2 ; StackCount = 3 + pushtype S32 ; StackCount = 4 + pushtype S32 ; StackCount = 5 + pushtype S32 ; StackCount = 6 + pushtype S32 ; StackCount = 7 + pushtype S32 ; StackCount = 8 + pushtype S32 ; StackCount = 9 + pushtype S32 ; StackCount = 10 + pushtype S32 ; StackCount = 11 + pushtype S32 ; StackCount = 12 + pushtype S32 ; StackCount = 13 + pushtype S32 ; StackCount = 14 + assign Var3, Arg1[4] + pushtype TRICHEDITVIEWER ; StackCount = 15 + assign Var15, Arg2 + pushvar Var4 ; StackCount = 16 + call TWINCONTROL->HANDLE + pop ; StackCount = 15 + pop ; StackCount = 14 + pushtype Type31 ; StackCount = 15 + assign Var15, Var1 + pushvar Var1[0] ; StackCount = 16 + call SIZEOF + pop ; StackCount = 15 + pop ; StackCount = 14 + assign Var1[1], Arg3 + assign Var1[2], UnicodeString_3("") + assign Var1[3], UnicodeString_3("") + assign Var1[4], S32(0) + pushtype BOOLEAN ; StackCount = 15 + pushtype S32 ; StackCount = 16 + pushtype Type31 ; StackCount = 17 + assign Var17, Var1 + pushtype U32_2 ; StackCount = 18 + assign Var18, Var3 + pushvar Var16 ; StackCount = 19 + call gdi32.dll!StartDocA + pop ; StackCount = 18 + pop ; StackCount = 17 + pop ; StackCount = 16 + le Var15, Var16, S32(0) + pop ; StackCount = 15 + sfz Var15 + pop ; StackCount = 14 + jf loc_137 + ret +loc_137: + pushtype S32 ; StackCount = 15 + assign Var15, S32(88) + pushtype U32_2 ; StackCount = 16 + assign Var16, Var3 + pushvar Var8 ; StackCount = 17 + call gdi32.dll!GetDeviceCaps + pop ; StackCount = 16 + pop ; StackCount = 15 + pop ; StackCount = 14 + pushtype S32 ; StackCount = 15 + assign Var15, S32(90) + pushtype U32_2 ; StackCount = 16 + assign Var16, Var3 + pushvar Var9 ; StackCount = 17 + call gdi32.dll!GetDeviceCaps + pop ; StackCount = 16 + pop ; StackCount = 15 + pop ; StackCount = 14 + pushtype S32 ; StackCount = 15 + assign Var15, S32(8) + pushtype U32_2 ; StackCount = 16 + assign Var16, Var3 + pushvar Var6 ; StackCount = 17 + call gdi32.dll!GetDeviceCaps + pop ; StackCount = 16 + pop ; StackCount = 15 + pop ; StackCount = 14 + mul Var6, S32(1440) + div Var6, Var8 + pushtype S32 ; StackCount = 15 + assign Var15, S32(10) + pushtype U32_2 ; StackCount = 16 + assign Var16, Var3 + pushvar Var7 ; StackCount = 17 + call gdi32.dll!GetDeviceCaps + pop ; StackCount = 16 + pop ; StackCount = 15 + pop ; StackCount = 14 + mul Var7, S32(1440) + div Var7, Var9 + pushtype S32 ; StackCount = 15 + assign Var15, S32(110) + pushtype U32_2 ; StackCount = 16 + assign Var16, Var3 + pushvar Var10 ; StackCount = 17 + call gdi32.dll!GetDeviceCaps + pop ; StackCount = 16 + pop ; StackCount = 15 + pop ; StackCount = 14 + mul Var10, S32(1440) + div Var10, Var8 + pushtype S32 ; StackCount = 15 + assign Var15, S32(111) + pushtype U32_2 ; StackCount = 16 + assign Var16, Var3 + pushvar Var11 ; StackCount = 17 + call gdi32.dll!GetDeviceCaps + pop ; StackCount = 16 + pop ; StackCount = 15 + pop ; StackCount = 14 + mul Var11, S32(1440) + div Var11, Var9 + pushtype S32 ; StackCount = 15 + assign Var15, S32(112) + pushtype U32_2 ; StackCount = 16 + assign Var16, Var3 + pushvar Var12 ; StackCount = 17 + call gdi32.dll!GetDeviceCaps + pop ; StackCount = 16 + pop ; StackCount = 15 + pop ; StackCount = 14 + mul Var12, S32(1440) + div Var12, Var8 + pushtype S32 ; StackCount = 15 + assign Var15, S32(113) + pushtype U32_2 ; StackCount = 16 + assign Var16, Var3 + pushvar Var13 ; StackCount = 17 + call gdi32.dll!GetDeviceCaps + pop ; StackCount = 16 + pop ; StackCount = 15 + pop ; StackCount = 14 + mul Var13, S32(1440) + div Var13, Var9 + pushtype Extended ; StackCount = 15 + pushtype Double ; StackCount = 16 + assign Var16, Arg4 + mul Var16, S32(1440) + assign Var15, Var16 + pop ; StackCount = 15 + pushvar Var5 ; StackCount = 16 + call ROUND + pop ; StackCount = 15 + pop ; StackCount = 14 + sub Var5, Var12 + pushtype BOOLEAN ; StackCount = 15 + lt Var15, Var5, S32(0) + sfz Var15 + pop ; StackCount = 14 + jf loc_3ef + assign Var5, S32(0) +loc_3ef: + pushtype Pointer ; StackCount = 15 + setptr Var15, Var2 + setptr Var15, Var15[2] + setptr Var15, Var15[0] + assign Var15, Var5 + pop ; StackCount = 14 + pushtype Extended ; StackCount = 15 + pushtype Double ; StackCount = 16 + assign Var16, Arg5 + mul Var16, S32(1440) + assign Var15, Var16 + pop ; StackCount = 15 + pushvar Var5 ; StackCount = 16 + call ROUND + pop ; StackCount = 15 + pop ; StackCount = 14 + sub Var5, Var13 + pushtype BOOLEAN ; StackCount = 15 + lt Var15, Var5, S32(0) + sfz Var15 + pop ; StackCount = 14 + jf loc_4a9 + assign Var5, S32(0) +loc_4a9: + pushtype Pointer ; StackCount = 15 + setptr Var15, Var2 + setptr Var15, Var15[2] + setptr Var15, Var15[1] + assign Var15, Var5 + pop ; StackCount = 14 + assign Var5, Var10 + pushtype S32 ; StackCount = 15 + pushtype Extended ; StackCount = 16 + pushtype Double ; StackCount = 17 + assign Var17, Arg6 + mul Var17, S32(1440) + assign Var16, Var17 + pop ; StackCount = 16 + pushvar Var15 ; StackCount = 17 + call ROUND + pop ; StackCount = 16 + pop ; StackCount = 15 + sub Var5, Var15 + pop ; StackCount = 14 + sub Var5, Var12 + pushtype BOOLEAN ; StackCount = 15 + gt Var15, Var5, Var6 + sfz Var15 + pop ; StackCount = 14 + jf loc_578 + assign Var5, Var6 +loc_578: + pushtype Pointer ; StackCount = 15 + setptr Var15, Var2 + setptr Var15, Var15[2] + setptr Var15, Var15[2] + assign Var15, Var5 + pop ; StackCount = 14 + assign Var5, Var11 + pushtype S32 ; StackCount = 15 + pushtype Extended ; StackCount = 16 + pushtype Double ; StackCount = 17 + assign Var17, Arg7 + mul Var17, S32(1440) + assign Var16, Var17 + pop ; StackCount = 16 + pushvar Var15 ; StackCount = 17 + call ROUND + pop ; StackCount = 16 + pop ; StackCount = 15 + sub Var5, Var15 + pop ; StackCount = 14 + sub Var5, Var13 + pushtype BOOLEAN ; StackCount = 15 + gt Var15, Var5, Var7 + sfz Var15 + pop ; StackCount = 14 + jf loc_647 + assign Var5, Var7 +loc_647: + pushtype Pointer ; StackCount = 15 + setptr Var15, Var2 + setptr Var15, Var15[2] + setptr Var15, Var15[3] + assign Var15, Var5 + pop ; StackCount = 14 + assign Var2[3], Var2[2] + assign Var2[0], Var3 + assign Var2[1], Var3 + pushtype S32 ; StackCount = 15 + pushtype S32 ; StackCount = 16 + assign Var16, S32(-1) + pushtype S32 ; StackCount = 17 + assign Var17, S32(0) + pushtype S32 ; StackCount = 18 + assign Var18, S32(177) + pushtype S32 ; StackCount = 19 + assign Var19, Var4 + pushvar Var15 ; StackCount = 20 + call SENDMESSAGE + pop ; StackCount = 19 + pop ; StackCount = 18 + pop ; StackCount = 17 + pop ; StackCount = 16 + pop ; StackCount = 15 + pop ; StackCount = 14 + pushtype S32 ; StackCount = 15 + pushtype Pointer ; StackCount = 16 + setptr Var16, Var2[4] + pushtype S32 ; StackCount = 17 + assign Var17, S32(0) + pushtype S32 ; StackCount = 18 + assign Var18, S32(1076) + pushtype S32 ; StackCount = 19 + assign Var19, Var4 + pushvar Var15 ; StackCount = 20 + call user32.dll!SendMessageA + pop ; StackCount = 19 + pop ; StackCount = 18 + pop ; StackCount = 17 + pop ; StackCount = 16 + pop ; StackCount = 15 + pop ; StackCount = 14 + assign RetVal, BOOLEAN(1) + pushtype BOOLEAN ; StackCount = 15 +loc_787: + pushtype BOOLEAN ; StackCount = 16 + pushtype Pointer ; StackCount = 17 + setptr Var17, Var2 + setptr Var17, Var17[4] + setptr Var17, Var17[0] + pushtype Pointer ; StackCount = 18 + setptr Var18, Var2 + setptr Var18, Var18[4] + setptr Var18, Var18[1] + lt Var16, Var17, Var18 + pop ; StackCount = 17 + pop ; StackCount = 16 + assign Var15, Var16 + pop ; StackCount = 15 + jz loc_81d, Var15 + and Var15, RetVal +loc_81d: + jz loc_9cf, Var15 + pushtype S32 ; StackCount = 16 + pushtype U32_2 ; StackCount = 17 + assign Var17, Var3 + pushvar Var16 ; StackCount = 18 + call gdi32.dll!StartPage + pop ; StackCount = 17 + pop ; StackCount = 16 + gt RetVal, Var16, S32(0) + pop ; StackCount = 15 + pushtype BOOLEAN ; StackCount = 16 + assign Var16, RetVal + setz Var16 + sfz Var16 + pop ; StackCount = 15 + jf loc_887 + jump loc_9cf +loc_887: + pushtype Pointer ; StackCount = 16 + setptr Var16, Var2 + pushtype S32 ; StackCount = 17 + assign Var17, S32(-1) + pushtype S32 ; StackCount = 18 + assign Var18, S32(1081) + pushtype S32 ; StackCount = 19 + assign Var19, Var4 + pushvar Var14 ; StackCount = 20 + call user32.dll!SendMessageA_2 + pop ; StackCount = 19 + pop ; StackCount = 18 + pop ; StackCount = 17 + pop ; StackCount = 16 + pop ; StackCount = 15 + pushtype BOOLEAN ; StackCount = 16 + pushtype BOOLEAN ; StackCount = 17 + pushtype Pointer ; StackCount = 18 + setptr Var18, Var2 + setptr Var18, Var18[4] + setptr Var18, Var18[0] + le Var17, Var14, Var18 + pop ; StackCount = 17 + assign Var16, Var17 + pop ; StackCount = 16 + sfz Var16 + pop ; StackCount = 15 + jf loc_958 + assign RetVal, BOOLEAN(0) + jump loc_9cf + jump loc_9ca +loc_958: + pushtype Pointer ; StackCount = 16 + setptr Var16, Var2 + setptr Var16, Var16[4] + setptr Var16, Var16[0] + assign Var16, Var14 + pop ; StackCount = 15 + pushtype S32 ; StackCount = 16 + pushtype U32_2 ; StackCount = 17 + assign Var17, Var3 + pushvar Var16 ; StackCount = 18 + call gdi32.dll!EndPage + pop ; StackCount = 17 + pop ; StackCount = 16 + gt RetVal, Var16, S32(0) + pop ; StackCount = 15 +loc_9ca: + jump loc_787 +loc_9cf: + pop ; StackCount = 14 + pushtype S32 ; StackCount = 15 + pushtype S32 ; StackCount = 16 + assign Var16, S32(0) + pushtype S32 ; StackCount = 17 + assign Var17, S32(0) + pushtype S32 ; StackCount = 18 + assign Var18, S32(1081) + pushtype S32 ; StackCount = 19 + assign Var19, Var4 + pushvar Var15 ; StackCount = 20 + call SENDMESSAGE + pop ; StackCount = 19 + pop ; StackCount = 18 + pop ; StackCount = 17 + pop ; StackCount = 16 + pop ; StackCount = 15 + pop ; StackCount = 14 + pushtype BOOLEAN ; StackCount = 15 + assign Var15, RetVal + sfz Var15 + pop ; StackCount = 14 + jf loc_a77 + pushtype S32 ; StackCount = 15 + pushtype U32_2 ; StackCount = 16 + assign Var16, Var3 + pushvar Var15 ; StackCount = 17 + call gdi32.dll!EndDoc + pop ; StackCount = 16 + pop ; StackCount = 15 + pop ; StackCount = 14 + jump loc_a9a +loc_a77: + pushtype S32 ; StackCount = 15 + pushtype U32_2 ; StackCount = 16 + assign Var16, Var3 + pushvar Var15 ; StackCount = 17 + call gdi32.dll!AbortDoc + pop ; StackCount = 16 + pop ; StackCount = 15 + pop ; StackCount = 14 +loc_a9a: + ret + +.function(import) external internal returnsval ROUND(__in __unknown) + +.function(import) external internal returnsval SENDMESSAGE(__in __unknown,__in __unknown,__in __unknown,__in __unknown) + +.function(export) void PRINTBUTTONCLICK(__in TOBJECT Arg1) + pushtype Type30 ; StackCount = 1 + pushtype BOOLEAN ; StackCount = 2 + pushtype Pointer ; StackCount = 3 + setptr Var3, Var1 + pushvar Var2 ; StackCount = 4 + call SELECTPRINTER + pop ; StackCount = 3 + pop ; StackCount = 2 + setz Var2 + sfz Var2 + pop ; StackCount = 1 + jf loc_3b + ret +loc_3b: + starteh loc_124, null, null, loc_14d + pushtype BOOLEAN ; StackCount = 2 + pushtype Double ; StackCount = 3 + assign Var3, Extended(0.50) + pushtype Double ; StackCount = 4 + assign Var4, Extended(0.50) + pushtype Double ; StackCount = 5 + assign Var5, Extended(0.50) + pushtype Double ; StackCount = 6 + assign Var6, Extended(0.50) + pushtype UnicodeString_2 ; StackCount = 7 + assign Var7, UnicodeString_3("License") + pushtype TRICHEDITVIEWER ; StackCount = 8 + pushtype TWIZARDFORM ; StackCount = 9 + pushvar Var9 ; StackCount = 10 + call WIZARDFORM + pop ; StackCount = 9 + pushvar Var8 ; StackCount = 10 + call TWIZARDFORM->LICENSEMEMO + pop ; StackCount = 9 + pop ; StackCount = 8 + pushtype Type30 ; StackCount = 9 + assign Var9, Var1 + pushvar Var2 ; StackCount = 10 + call PRINTRICHEDIT + pop ; StackCount = 9 + pop ; StackCount = 8 + pop ; StackCount = 7 + pop ; StackCount = 6 + pop ; StackCount = 5 + pop ; StackCount = 4 + pop ; StackCount = 3 + pop ; StackCount = 2 + pop ; StackCount = 1 + endtry +loc_124: + pushtype BOOLEAN ; StackCount = 2 + pushtype U32_2 ; StackCount = 3 + assign Var3, Var1[4] + pushvar Var2 ; StackCount = 4 + call gdi32.dll!DeleteDC + pop ; StackCount = 3 + pop ; StackCount = 2 + pop ; StackCount = 1 + endfinally +loc_14d: + ret + +.function(import) external class(TWIZARDFORM, LICENSEMEMO) __pascal void TWIZARDFORM->LICENSEMEMO(__in __unknown,__in __unknown) + +.function(export) void ADJUSTPRINTBUTTON() + pushtype BOOLEAN ; StackCount = 1 + pushtype TBUTTON ; StackCount = 2 + assign Var2, Global0 + pushvar Var1 ; StackCount = 3 + call !ASSIGNED + pop ; StackCount = 2 + pop ; StackCount = 1 + sfz Var1 + pop ; StackCount = 0 + jf loc_138 + pushtype S32 ; StackCount = 1 + pushtype TRICHEDITVIEWER ; StackCount = 2 + pushtype TWIZARDFORM ; StackCount = 3 + pushvar Var3 ; StackCount = 4 + call WIZARDFORM + pop ; StackCount = 3 + pushvar Var2 ; StackCount = 4 + call TWIZARDFORM->LICENSEMEMO + pop ; StackCount = 3 + pop ; StackCount = 2 + pushvar Var1 ; StackCount = 3 + call TCONTROL->LEFT + pop ; StackCount = 2 + pop ; StackCount = 1 + pushtype S32 ; StackCount = 2 + pushtype TRICHEDITVIEWER ; StackCount = 3 + pushtype TWIZARDFORM ; StackCount = 4 + pushvar Var4 ; StackCount = 5 + call WIZARDFORM + pop ; StackCount = 4 + pushvar Var3 ; StackCount = 5 + call TWIZARDFORM->LICENSEMEMO + pop ; StackCount = 4 + pop ; StackCount = 3 + pushvar Var2 ; StackCount = 4 + call TCONTROL->WIDTH + pop ; StackCount = 3 + pop ; StackCount = 2 + add Var1, Var2 + pop ; StackCount = 1 + pushtype S32 ; StackCount = 2 + pushtype TBUTTON ; StackCount = 3 + assign Var3, Global0 + pushvar Var2 ; StackCount = 4 + call TCONTROL->WIDTH + pop ; StackCount = 3 + pop ; StackCount = 2 + sub Var1, Var2 + pop ; StackCount = 1 + pushtype TBUTTON ; StackCount = 2 + assign Var2, Global0 + call TCONTROL->LEFT_2 + pop ; StackCount = 1 + pop ; StackCount = 0 + pushtype S32 ; StackCount = 1 + pushtype TNEWRADIOBUTTON ; StackCount = 2 + pushtype TWIZARDFORM ; StackCount = 3 + pushvar Var3 ; StackCount = 4 + call WIZARDFORM + pop ; StackCount = 3 + pushvar Var2 ; StackCount = 4 + call TWIZARDFORM->LICENSEACCEPTEDRADIO + pop ; StackCount = 3 + pop ; StackCount = 2 + pushvar Var1 ; StackCount = 3 + call TCONTROL->TOP + pop ; StackCount = 2 + pop ; StackCount = 1 + pushtype TBUTTON ; StackCount = 2 + assign Var2, Global0 + call TCONTROL->TOP_2 + pop ; StackCount = 1 + pop ; StackCount = 0 +loc_138: + ret + +.function(import) external internal returnsval !ASSIGNED(__in __unknown) + +.function(import) external class(TCONTROL, LEFT) __pascal void TCONTROL->LEFT(__in __unknown,__in __unknown) + +.function(import) external class(TCONTROL, WIDTH) __pascal void TCONTROL->WIDTH(__in __unknown,__in __unknown) + +.function(import) external class(TCONTROL, LEFT, property) __pascal void TCONTROL->LEFT_2(__in __unknown,__in __unknown) + +.function(import) external class(TWIZARDFORM, LICENSEACCEPTEDRADIO) __pascal void TWIZARDFORM->LICENSEACCEPTEDRADIO(__in __unknown,__in __unknown) + +.function(import) external class(TCONTROL, TOP) __pascal void TCONTROL->TOP(__in __unknown,__in __unknown) + +.function(import) external class(TCONTROL, TOP, property) __pascal void TCONTROL->TOP_2(__in __unknown,__in __unknown) + +.function(export) void CREATEPRINTBUTTON() + pushtype TCOMPONENT ; StackCount = 1 + pushtype TNEWNOTEBOOKPAGE ; StackCount = 2 + pushtype TWIZARDFORM ; StackCount = 3 + pushvar Var3 ; StackCount = 4 + call WIZARDFORM + pop ; StackCount = 3 + pushvar Var2 ; StackCount = 4 + call TWIZARDFORM->LICENSEPAGE + pop ; StackCount = 3 + pop ; StackCount = 2 + assign Var1, Var2 + pop ; StackCount = 1 + pushtype U32_2 ; StackCount = 2 + assign Var2, U32_2(29) + pushvar Global0 ; StackCount = 3 + call TCONTROL->CREATE + pop ; StackCount = 2 + pop ; StackCount = 1 + pop ; StackCount = 0 + pushtype UnicodeString_2 ; StackCount = 1 + assign Var1, UnicodeString_3("&Print") + pushtype TBUTTON ; StackCount = 2 + assign Var2, Global0 + call TBUTTON->CAPTION + pop ; StackCount = 1 + pop ; StackCount = 0 + pushtype TNOTIFYEVENT ; StackCount = 1 + assign Var1, TNOTIFYEVENT(PRINTBUTTONCLICK) + pushtype TBUTTON ; StackCount = 2 + assign Var2, Global0 + call TBUTTON->ONCLICK + pop ; StackCount = 1 + pop ; StackCount = 0 + pushtype TWINCONTROL ; StackCount = 1 + pushtype TNEWRADIOBUTTON ; StackCount = 2 + pushtype TWIZARDFORM ; StackCount = 3 + pushvar Var3 ; StackCount = 4 + call WIZARDFORM + pop ; StackCount = 3 + pushvar Var2 ; StackCount = 4 + call TWIZARDFORM->LICENSEACCEPTEDRADIO + pop ; StackCount = 3 + pop ; StackCount = 2 + pushvar Var1 ; StackCount = 3 + call TCONTROL->PARENT + pop ; StackCount = 2 + pop ; StackCount = 1 + pushtype TBUTTON ; StackCount = 2 + assign Var2, Global0 + call TCONTROL->PARENT_2 + pop ; StackCount = 1 + pop ; StackCount = 0 + ret + +.function(import) external class(TCONTROL, CREATE) __fastcall returnsval TCONTROL->CREATE(__in __unknown) + +.function(import) external class(TWIZARDFORM, LICENSEPAGE) __pascal void TWIZARDFORM->LICENSEPAGE(__in __unknown,__in __unknown) + +.function(import) external class(TBUTTON, CAPTION, property) __pascal void TBUTTON->CAPTION(__in __unknown,__in __unknown) + +.function(import) external class(TBUTTON, ONCLICK, property) __pascal void TBUTTON->ONCLICK(__in __unknown,__in __unknown) + +.function(import) external class(TCONTROL, PARENT) __pascal void TCONTROL->PARENT(__in __unknown,__in __unknown) + +.function(import) external class(TCONTROL, PARENT, property) __pascal void TCONTROL->PARENT_2(__in __unknown,__in __unknown) + +.function(export) void INITIALIZEWIZARD() + call CREATEPRINTBUTTON + ret + +.function(export) void CURPAGECHANGED(__in S32 Arg1) + call ADJUSTPRINTBUTTON + ret + +.function(export) BOOLEAN SHOULDSKIPPAGE(__in S32 Arg1) + assign RetVal, BOOLEAN(0) + pushtype BOOLEAN ; StackCount = 1 + pushvar Var1 ; StackCount = 2 + call ISUPGRADE + pop ; StackCount = 1 + sfz Var1 + pop ; StackCount = 0 + jf loc_90 + pushtype BOOLEAN ; StackCount = 1 + eq Var1, Arg1, S32(6) + sfz Var1 + pop ; StackCount = 0 + jf loc_5d + assign RetVal, BOOLEAN(1) +loc_5d: + pushtype BOOLEAN ; StackCount = 1 + eq Var1, Arg1, S32(8) + sfz Var1 + pop ; StackCount = 0 + jf loc_90 + assign RetVal, BOOLEAN(1) +loc_90: + ret + + diff --git a/IFPSLib.Tests/IFPSLib.Tests.csproj b/IFPSLib.Tests/IFPSLib.Tests.csproj index 648af62..b7166c7 100644 --- a/IFPSLib.Tests/IFPSLib.Tests.csproj +++ b/IFPSLib.Tests/IFPSLib.Tests.csproj @@ -51,6 +51,7 @@ + @@ -92,6 +93,9 @@ 2.0.3 + + + \ No newline at end of file diff --git a/IFPSLib.Tests/Properties/Resources.Designer.cs b/IFPSLib.Tests/Properties/Resources.Designer.cs index 2f1b7c7..128ea9e 100644 --- a/IFPSLib.Tests/Properties/Resources.Designer.cs +++ b/IFPSLib.Tests/Properties/Resources.Designer.cs @@ -1,173 +1,212 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace IFPSLib.Tests.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IFPSLib.Tests.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized resource of type System.Byte[]. - /// - internal static byte[] CompiledCode { - get { - object obj = ResourceManager.GetObject("CompiledCode", resourceCulture); - return ((byte[])(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Byte[]. - /// - internal static byte[] CompiledCode_v22 { - get { - object obj = ResourceManager.GetObject("CompiledCode_v22", resourceCulture); - return ((byte[])(obj)); - } - } - - /// - /// Looks up a localized string similar to .version 23 - /// - ///.entry !MAIN - /// - ///.type primitive(Pointer) Pointer - ///.type primitive(U32) U32 - ///.type primitive(Variant) Variant - ///.type primitive(PChar) PChar - ///.type primitive(Currency) Currency - ///.type primitive(Extended) Extended - ///.type primitive(Double) Double - ///.type primitive(Single) Single - ///.type primitive(S64) S64 - ///.type primitive(String) String - ///.type primitive(U32) U32_2 - ///.type primitive(S32) S32 - ///.type primitive(S16) S16 - ///.type primitive(U16) U16 - ///.type primitive(S8) S8 - ///.type(export) funcptr(void()) ANY [rest of string was truncated]";. - /// - internal static string CompiledCodeDisasm { - get { - return ResourceManager.GetString("CompiledCodeDisasm", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to .version 23 - /// - ///.entry !MAIN - /// - ///.type primitive(Pointer) Pointer - ///.type primitive(U32) U32 - ///.type primitive(Variant) Variant - ///.type primitive(PChar) PChar - ///.type primitive(Currency) Currency - ///.type primitive(Extended) Extended - ///.type primitive(Double) Double - ///.type primitive(Single) Single - ///.type primitive(S64) S64 - ///.type primitive(String) String - ///.type primitive(U32) U32_2 - ///.type primitive(S32) S32 - ///.type primitive(S16) S16 - ///.type primitive(U16) U16 - ///.type primitive(S8) S8 - ///.type(export) funcptr(void()) ANY [rest of string was truncated]";. - /// - internal static string CompiledCodeDisasm_v22 { - get { - return ResourceManager.GetString("CompiledCodeDisasm_v22", resourceCulture); - } - } - - /// - /// Looks up a localized resource of type System.Byte[]. - /// - internal static byte[] TestIsInsn { - get { - object obj = ResourceManager.GetObject("TestIsInsn", resourceCulture); - return ((byte[])(obj)); - } - } - - /// - /// Looks up a localized string similar to .version 23 - /// - ///.type primitive(Pointer) Pointer - ///.type primitive(S32) S32 - ///.type primitive(U32) U32 - ///.type primitive(U8) U8 - /// - ///.function(export) U8 INITIALIZEUNINSTALL() - /// pushtype U32 ; StackCount = 1 - /// pushtype U32 ; StackCount = 2 - /// is Var1, Var2, S32 - /// is Var1, Var2, Var1 - /// ret - /// - /// - ///. - /// - internal static string TestIsInsnDisasm { - get { - return ResourceManager.GetString("TestIsInsnDisasm", resourceCulture); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace IFPSLib.Tests.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IFPSLib.Tests.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] CompiledCode { + get { + object obj = ResourceManager.GetObject("CompiledCode", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] CompiledCode_float80 { + get { + object obj = ResourceManager.GetObject("CompiledCode_float80", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] CompiledCode_v22 { + get { + object obj = ResourceManager.GetObject("CompiledCode_v22", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized string similar to .version 23 + /// + ///.entry !MAIN + /// + ///.type primitive(Pointer) Pointer + ///.type primitive(U32) U32 + ///.type primitive(Variant) Variant + ///.type primitive(PChar) PChar + ///.type primitive(Currency) Currency + ///.type primitive(Extended) Extended + ///.type primitive(Double) Double + ///.type primitive(Single) Single + ///.type primitive(S64) S64 + ///.type primitive(String) String + ///.type primitive(U32) U32_2 + ///.type primitive(S32) S32 + ///.type primitive(S16) S16 + ///.type primitive(U16) U16 + ///.type primitive(S8) S8 + ///.type(export) funcptr(void()) ANY [rest of string was truncated]";. + /// + internal static string CompiledCodeDisasm { + get { + return ResourceManager.GetString("CompiledCodeDisasm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .version 23 + /// + ///.entry !MAIN + /// + ///.type primitive(Pointer) Pointer + ///.type primitive(U32) U32 + ///.type primitive(Variant) Variant + ///.type primitive(PChar) PChar + ///.type primitive(Currency) Currency + ///.type primitive(Extended) Extended + ///.type primitive(Double) Double + ///.type primitive(Single) Single + ///.type primitive(S64) S64 + ///.type primitive(String) String + ///.type primitive(U32) U32_2 + ///.type primitive(S32) S32 + ///.type primitive(S16) S16 + ///.type primitive(U16) U16 + ///.type primitive(S8) S8 + ///.type primitive(String) String_2 /// [rest of string was truncated]";. + /// + internal static string CompiledCodeDisasm_float80 { + get { + return ResourceManager.GetString("CompiledCodeDisasm_float80", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .version 22 + /// + ///.entry !MAIN + /// + ///.type primitive(Pointer) Pointer + ///.type primitive(U32) U32 + ///.type primitive(Variant) Variant + ///.type primitive(PChar) PChar + ///.type primitive(Currency) Currency + ///.type primitive(Extended) Extended + ///.type primitive(Double) Double + ///.type primitive(Single) Single + ///.type primitive(String) String + ///.type primitive(U32) U32_2 + ///.type primitive(S32) S32 + ///.type primitive(S16) S16 + ///.type primitive(U16) U16 + ///.type primitive(S8) S8 + ///.type primitive(Char) Char + ///.type primitive(U32) U32_3 + ///.ty [rest of string was truncated]";. + /// + internal static string CompiledCodeDisasm_v22 { + get { + return ResourceManager.GetString("CompiledCodeDisasm_v22", resourceCulture); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] TestIsInsn { + get { + object obj = ResourceManager.GetObject("TestIsInsn", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized string similar to .version 23 + /// + ///.type primitive(Pointer) Pointer + ///.type primitive(S32) S32 + ///.type primitive(U32) U32 + ///.type primitive(U8) U8 + /// + ///.function(export) U8 INITIALIZEUNINSTALL() + /// pushtype U32 ; StackCount = 1 + /// pushtype U32 ; StackCount = 2 + /// is Var1, Var2, S32 + /// is Var1, Var2, Var1 + /// ret + /// + /// + ///. + /// + internal static string TestIsInsnDisasm { + get { + return ResourceManager.GetString("TestIsInsnDisasm", resourceCulture); + } + } + } +} diff --git a/IFPSLib.Tests/Properties/Resources.resx b/IFPSLib.Tests/Properties/Resources.resx index 4cee6e7..2f82a59 100644 --- a/IFPSLib.Tests/Properties/Resources.resx +++ b/IFPSLib.Tests/Properties/Resources.resx @@ -124,9 +124,15 @@ ..\CompiledCode.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + + ..\CompiledCode_float80.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + ..\CompiledCode_v22.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + + ..\CompiledCode_float80.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + ..\CompiledCode_v22.bin;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 diff --git a/IFPSLib.Tests/ScriptTest.cs b/IFPSLib.Tests/ScriptTest.cs index 6e880d3..fed0b26 100644 --- a/IFPSLib.Tests/ScriptTest.cs +++ b/IFPSLib.Tests/ScriptTest.cs @@ -79,5 +79,17 @@ namespace IFPSLib.Tests { TestAsmImpl(Resources.TestIsInsnDisasm, Resources.TestIsInsn); } + + [TestMethod] + public void TestLoadSaveFloat80() + { + TestLoadSaveImpl(Resources.CompiledCode_float80); + } + + [TestMethod] + public void TestAsmFloat80() + { + TestAsmImpl(Resources.CompiledCodeDisasm_float80, Resources.CompiledCode_float80); + } } }