RosettaCodeData/Task/Arithmetic-Integer/X86-Assembly/arithmetic-integer.x86

23 lines
517 B
Plaintext

arithm: mov cx, a
mov bx, b
xor dx, dx
mov ax, cx
add ax, bx
mov sum, ax
mov ax, cx
imul bx
mov product, ax
mov ax, cx
sub ax, bx
mov difference, ax
mov ax, cx
idiv bx
mov quotient, ax
mov remainder, dx
ret