hmmm it seems some kind of strange to me, I can handle things like pipes or something like this without any problems. But I I get stuck during such simple things like a string array. Is there a chance to do this in asm? to do something like:

myString  db  "First Line",0,
              "Secnd Line",0
and then access it like this?

invoke MessageBox,hWin,ADDR myString[0],ADDR caption,MB_OK
I know the above code is wrong, but how can i declare some kind of String array and use it later on in the program? sign CyBerian
Posted on 2001-03-04 06:09:00 by CyBerian
in my opinion you should use the following method: lea esi,teststring add esi,charcteridentifier invoke MessageBox,hWin,esi,addr title,0 i didn't test it, but it should work. perhaps you can write a macro or something like that.
Posted on 2001-03-04 08:52:00 by [SaFc0n]
Just some useless code showing you what you can do:

   myString db "My not so long line",0

   mov al, myString[5]                    ; al = "t"
   mov al, byte ptr    ; same as the above

   mov al, myString                  ; the following two
   mov al, byte ptr  ; lines are the same

   ; to show the string in a msg box:

   invoke MessageBox,hWin,ADDR myString,ADDR caption,MB_OK
That helps?
Posted on 2001-03-04 08:59:00 by Zynaps
Or maybe you mean like this?

   string_table   dd offset string_1
                  dd offset string_2
                  dd offset string_3

   string_1   db "My first string",0
   string_2   db "Another string",0
   string_3   db "All your base are belong to us :)",0

   invoke MessageBox, hWin, string_table[0], ADDR caption, MB_OK
   invoke MessageBox, hWin, string_table[4], ADDR caption, MB_OK
   invoke MessageBox, hWin, string_table[8], ADDR caption, MB_OK
Posted on 2001-03-04 09:15:00 by Zynaps