计算如下四则运算,8+9*(6/(3-1)),结果放入内存
代码如下:
data segment sum dw 1 dup(0) ends code segment assume cs:code,ds:data start: mov ax,data mov ds,ax mov es,ax mov bx,3 sub bx,1 mov ax,6 div bx ;隐含商在ax,余数在dx mov cx,9 imul cx ;隐含结果低字节在ax,高字节在dx add ax,8 mov sum,ax mov ax,4c00h int 21h ends end start
运行结果:
结果以十六进制保存
文章来源: https://blog.csdn.net/qq_42768101/article/details/90729969