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

23 lines
517 B
Text
Raw Permalink Normal View History

2017-09-23 10:01:46 +02:00
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