Skip to content

Commit

Permalink
float style
Browse files Browse the repository at this point in the history
  • Loading branch information
Hummel009 committed Jan 18, 2024
1 parent eaca397 commit 3ee657a
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions appAssemblyX86/src/Main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3ee657a

Please sign in to comment.