|
||||||
| General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
I have been working with assembly (TASM32) for a few months now and have ran into a problem which I cannot fix. Here's a working example written in C++ which needs to be converted to assembly.
Code:
#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;
}
Code:
.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 MAIN Sorry for my English. Thank you, Stefan Kendrick |
| Sponsored Links |
|
|
|
|||||
|
|
|
|||
|
Fasm is an excellent, highly portable ( I ported to my os in under 3 hours ) assembler that makes me leap with joy. I'd recommend it any day over tasm.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Free Assembly Tutorials | Jordan | General Programming | 39 | 10-05-2008 05:40 PM |
| Peculiar UI Problem Needs Tackling | adriyel | C# Programming | 2 | 04-06-2008 08:46 AM |
| Problem read pwd protected Access2K dbase - CR9 & VB6 | mrbar | Visual Basic Programming | 2 | 03-10-2008 05:50 AM |
| How to tackle a programming problem? | TcM | General Programming | 10 | 01-07-2008 12:29 PM |
| C++ to assembly conversion | Kaishain | C and C++ | 4 | 12-10-2007 05:07 AM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |
Goal: 100,000 Posts
Complete: 98%