diff --git a/asm/solutions.md b/asm/solutions.md new file mode 100644 index 0000000..f8ff1ae --- /dev/null +++ b/asm/solutions.md @@ -0,0 +1,46 @@ +# zero + +``` +xor eax, eax +``` + +# one +``` +xor eax, eax +inc eax +``` + +# next +``` +inc ax +``` + +# prev +``` +dec ax +``` + +# sum +``` +mov dx, ax +add dx, bx +``` + +# sub +``` +mov rdx, rax +sub rdx, rbx +``` + +# imul +``` +imul bl +mov dx, ax +``` + +# idiv +``` +cwd +idiv bx +mov dx, ax +```