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

来源:互联网 发布:mediainfo for mac 编辑:程序博客网 时间:2024/06/09 22:59
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;