首页 > 解决方案 > 使用 32 位汇编打印一组字母/数字

问题描述

 litere times 255 db 0 ;letters array
 dim_sir_litere db 0 ;this will tell me how many letters i have in my array

mov [dim_sir_litere],EDI   ; the length of letters array

; 试图打印数组中的所有字母,但它不工作

mov ECX,[dim_sir_litere] ;this will have the lenght of my letters array

mov ESI,0  ;this will be the index that i will use 

;在这个循环中,我想打印 litere 数组中的所有字符

       afisare_litere:
                   push ECX ;keep ECX value
                   mov EAX,dword [litere+ESI] ;put in EAX the value from ESI index 
                   inc ESI ;mov index to the next position
                   push dword EAX  
                   push dword format_caracter ;the format is %c
                   call [printf]
                   add esp,4*2
                   pop ECX
         loop afisare_litere

实际的问题是,在我运行代码后它没有打印任何东西,也没有打印任何东西我使用这个代码将字母放入数组中:

mov [litere+EBX],AL

标签: assemblyx86printfollydbg

解决方案


推荐阅读