a5: Addition oder Substraktion

This commit is contained in:
Johannes Theiner 2018-12-20 10:50:51 +01:00
parent 590d4e18e7
commit 4c63a67fa9

View File

@ -12,11 +12,26 @@ addsub:
mov [ebp-4], word 1
mov eax,0
add ax, word [foo]
mov eax, 0
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
ret
section .data
operation dw 2