xlat指令...

;就是一个串str1, lea ebx, str1 然后我们ebx+1总是加上的是一个字节, 无论(串是word, byte, dword)
.386
.model flat
.stack 4096
include io.h
ExitProcess proto near32 stdcall, deExitCode:dword
cr equ 0dh
lf equ 0ah
.data
str1 byte 20 dup(?)
stringss byte "请输入一个数字并求其平方:",  cr, lf 
table dword 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100
.code
_start:
output stringss
input str1, 20
atod str1
lea ebx, table
add eax, eax;如果是dword的串,那么我们读取的第n个数据的值,那么首地址加上的值(到达该值中间的字节数)就是n*sizeof(dword)=n*4
add eax, eax;
xlat
;add eax, eax;模仿一下xlat的功能
;mov ax, word ptr [ebx+eax]
dtoa str1, eax
output str1
invoke ExitProcess, 0
public _start
end









本文转自 小眼儿 博客园博客,原文链接:http://www.cnblogs.com/hujunzheng/p/3807126.html,如需转载请自行联系原作者
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值