a5: Addition oder Substraktion

This commit is contained in:
Johannes Theiner 2018-12-20 10:50:51 +01:00
parent 590d4e18e7
commit 4c63a67fa9
1 changed files with 19 additions and 4 deletions

View File

@ -13,10 +13,25 @@ addsub:
mov [ebp-4], word 1
mov eax, 0
add ax, word [foo]
mov operation, word [ebp+16]
add ax, word [ebp+8]
add ax, word [ebp-4]
cmp operation, 0x2b
jne substract
add ax, word [ebp-12]
jmp return
substract: sub ax, word [ebp-12]
return:
mov esp, ebp
pop ebp
ret
section .data
operation dw 2