这些线在装配中起什么作用?
我对装配很陌生。我总是对数字感到困惑 有人可以帮我吗?我正在使用 TASM...所以 8066 汇编器 有什么好的参考资料可供我使用吗?
SCREEN_CLEARER:
mov ax,1720h
mov cx,2000
mov bx,0
L2:
mov es:[bx],ax
add bx,2
loop L2
ret
我不太明白1720h、2000是什么。我也不太清楚如何阅读 move es:[bx],ax
非常感谢
I am quite new to assembly. I am always confused by the numbers
Can someone please help me ? I am using TASM... so 8066 assembler
Is there any good reference that I can use?
SCREEN_CLEARER:
mov ax,1720h
mov cx,2000
mov bx,0
L2:
mov es:[bx],ax
add bx,2
loop L2
ret
I don't really get what 1720h, 2000 are. I also not quite sure how to read move es:[bx],ax
Thank you very much
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来像 DOS 代码,试图填充(文本)屏幕缓冲区左右...,IIRC
ax
将是字符(0x20 == ' ' == space)与文本属性(0x17 ==前景色/背景色)。2000 将是 80x25 ;)
为此,
es
将指向屏幕缓冲区。将字符和属性(在
ax
中)移动到es:[0]
中的每个单词中,持续 2000 个单词(== 2 个字节),直到cx
变为 0(这就是loop
操作码的含义)。Looks like DOS-code, trying to fill the (text) screen buffer or so ..., IIRC
ax
would be character (0x20 == ' ' == space) combined with the text attributes (0x17 == foreground/background color).The 2000 would be 80x25 ;)
es
would for this purpose point to the screen buffer.moves the character and attribute (in
ax
) into each word fromes:[0]
for 2000 words (== 2 bytes) untilcx
becomes 0 (that's the meaning of theloop
opcode).