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;