您的位置:首页 > 其它

HLA取出字符串中的每一个字符

2012-09-19 21:56 169 查看
program yang;
#include ( "stdlib.hhf" )
static
Astring:    string  := "yangzhiyong";

begin yang;

mov(Astring, eax);
mov(0, dl);

mov( (type str.strRec [eax]).length, ecx);

for ( mov(0, esi); esi<ecx; inc(esi) ) do
mov( [eax+esi], dl);
stdout.put("Astring[", (type uns32 esi), "] = ", (type char dl), nl);

endfor;

end yang;


二:

program yang;
#include ( "stdlib.hhf" )
static
Astring: string := "yangzhiyong";
Bstring: string := "ljy520zhiyong";

begin yang;

mov(Bstring, ebx);
mov(0, dl);

str.length( ebx );
mov(eax, ecx);

for ( mov(0, esi); esi<ecx; inc(esi) ) do
mov( [ebx+esi], dl);
stdout.put("Astring[", (type uns32 esi), "] = ", (type char dl), nl);

endfor;

end yang;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  string
相关文章推荐