如何在装配中添加两个数字后打印输出 [英] How do I print the output after adding two number in assembly

查看:87
本文介绍了如何在装配中添加两个数字后打印输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试添加两个数字,因为添加结果是ASCII,我添加'AAA'来纠正结果,但是我无法打印在屏幕上存储在AL中的结果因为我需要中断21 - 服务9打印。然后我将AX复制到DX,但它不起作用..出了什么问题?



  ORG 100h 
OV AL 39h
MOV BL 35h
ADD AL BL
AAA
MOV DX AX
MOV AH 9
INT 21h
RET





谢谢,



-Rudy

解决方案

DX中没有字符串引用;你应该使用服务02h,如 http://spike.scu.edu.au/~barry所述/interrupts.html#ah02 [ ^ ]。

I am trying to add two number, because of the adding result is in ASCII, I added 'AAA' to correct the result, but i can't print the result which is store in AL on screen because I need Interrupt 21-service 9 to print. Then I copy AX to DX, but it doesn't work.. What's wrong?

ORG 100h
 OV AL,39h
MOV BL,35h
ADD AL,BL
AAA
MOV DX,AX
MOV AH,9
INT 21h
RET



Thanks,

-Rudy

解决方案

You do not have a string reference in DX; you should be using service 02h as described at http://spike.scu.edu.au/~barry/interrupts.html#ah02[^].


这篇关于如何在装配中添加两个数字后打印输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆