a5: Addition oder Substraktion
This commit is contained in:
parent
590d4e18e7
commit
4c63a67fa9
|
@ -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
|
Loading…
Reference in New Issue