本文介绍了如何打印寄存器的内容在EMU8086?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
包括emu8086.inc
#make_com#组织100HS1 DW 50,60,70,80,90,100,120,130,140,160,170,190,190,220,250,270,300 MOV SI,0
MOV CX,16S2:
MOV AX,S1 [SI]S3:
INC SI
CMP AX,100
JBE S4
JA S5S4:
PRINTF AX
JMP S3S5:
CMP AX,200
JB S6
JA S7S6:
PRINTF AX
JMP S3S7:
PRINTF AX
JMP S3 结束
; printf的AX不工作,我想打印AX的内容
解决方案
You haven't shown us what PRINTf is supposed to do. So all of your PRINTf AX
macro calls could be OK.
But your program does have 2 errors that prevent it from executing correctly.
- A .COM program starts executing from the top but that's where you have placed your data. This must not be executed! So either place the data below the code or jump over the data.
- The data you use is word sized and thus you need to add 2 to the SI register when iterating over the data.
这篇关于如何打印寄存器的内容在EMU8086?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!