#include <windows.h>
int main(){
char *name_list[5] = {"Micheal", "Stefan", "Judy", "William", "Lora"};
for(int i = 0; i < 5; i++){
MessageBox(0, name_list[i], name_list[i], 0);
}
return 0;
}
Here's the assembly version I've written. It goes through the five names fine, after the names, it brings up a message box with random characters..386 .model flat EXTRN MessageBoxA : PROC EXTRN ExitProcess : PROC .DATA dd ? ; TASM gayness .CODE MAIN: pushad call lblNames db "Micheal", 0 db "Stefan", 0 db "Judy", 0 db "William", 0 db "Lora", 0 lblNames: pop esi ; esi = current name push 5 ; 5 names pop ecx ; ecx = counter lblNameLoop: push 0 push esi push esi push 0 call MessageBoxA lblNextChar: lodsb test al, al jnz lblNextChar pop ecx loop lblNameLoop popad push 0 call ExitProcess END MAINDoes anyone know what the problem is, or have any suggestions for me? This seems much more complicated than it should be...
Sorry for my English.
Thank you,
Stefan Kendrick


Sign In
Create Account

Back to top









