From 3ee657a7089daf9beb389eebeceacdb9d13ffa2d Mon Sep 17 00:00:00 2001 From: Hummel009 <60618853+Hummel009@users.noreply.github.com> Date: Thu, 18 Jan 2024 16:43:32 +0300 Subject: [PATCH] float style --- appAssemblyX86/src/Main.asm | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/appAssemblyX86/src/Main.asm b/appAssemblyX86/src/Main.asm index d8b46d2..d5cbb9b 100644 --- a/appAssemblyX86/src/Main.asm +++ b/appAssemblyX86/src/Main.asm @@ -267,8 +267,18 @@ proc CalculateWrapper jmp .resetData -.twoOperandAction: - ; TODO +.twoOperandAction: + invoke lstrlen, buffer + stdcall CountSymbol, eax, '.' + cmp [quantity], 0 + jne .pushAsIs + + invoke lstrcat, buffer, float + +.pushAsIs: + stdcall PushItem, buffer + + invoke SetWindowText, [field], data2 jmp .resetData .oneOperandAction: @@ -416,7 +426,15 @@ proc PushOperation, operation invoke GetWindowText, [field], buffer, 255 cmp [dataPresence0], 0 jne .error - + + invoke lstrlen, buffer + stdcall CountSymbol, eax, '.' + cmp [quantity], 0 + jne .pushAsIs + + invoke lstrcat, buffer, float + +.pushAsIs: stdcall PushItem, buffer stdcall PushItem, [operation] invoke SetWindowText, [field], empty @@ -525,7 +543,9 @@ section '.data' data readable writeable data2 db 255 dup(?) dataPresence0 db 0 dataPresence1 db 0 - dataPresence2 db 0 + dataPresence2 db 0 + + float db '.0', 0 buttonId dw 0