一 用汇编实现加减乘除法,并用之前的函数打印
%include "functions.asm"
SECTION .text
global main
main:
mov rax, 90
mov rbx, 9
add rax, rbx;加法,最终结果存放在rax
call iprintLF
mov rax, 90
mov rbx, 9
sub rax, rbx; 减法 最终结果存储在rax
call iprintLF
mov rax, 90
mov rbx, 9
mul rbx;乘法, rax = rax * rbx
call iprintLF
mov rax, 90
mov rsi, 9
idiv rsi; 除法,rax = rax/rsi. 余数rdx = rax%rsi
call iprintLF
call quit