HLA输出数组

来源:互联网 发布:云计算的典型应用案例 编辑:程序博客网 时间:2024/05/22 02:00
program yang;#include ( "stdlib.hhf" )static     i:  int32; @nostorage;        int32 0, 2, 4, 6;var    index:  int32;    tmp:    int32;begin yang;        mov(&i, eax);    mov(0, esi);    for ( mov(0, index); index<4; add(1, index) ) do        mov([eax + esi*4], tmp);        stdout.put( "i[", index, "] = ", tmp, nl);        stdout.put( "eax = ", eax, " and esi = ", esi, nl, nl);        add(1, esi);    endfor;                end yang;


二:

program yang;#include ( "stdlib.hhf" )static    myarray:  int8; @nostorage;            byte 0, 2, 4, 6, 8;begin yang;       lea(eax, myarray);    for( mov(0, ecx); ecx<5; inc(ecx) ) do        stdout.put("array[", ecx, "] = ", (type byte [eax+ecx]) ,nl);    endfor;    end yang;


原创粉丝点击