How would one go about declaring LOCAL arrays? For string data, to be exact. Thanks.
Posted on 2001-11-09 13:20:01 by lackluster
you might do something like this:



STRING STRUCT
db 256 dup (?)
STRING ENDS

MyProc PROC
LOCAL MyVar: STRING
...
MyProc ENDP


but note that the stack might be misaligned when using structs whose size is not a multiple of 4 (at least TASM doesn't do it) -> win2k incompatibility.
Posted on 2001-11-09 13:26:42 by Tola
Take care also of the array's size. It might be bigger than your stack's size and KABOOM.
:)


Latigo
Posted on 2001-11-09 14:00:13 by latigo
thanky
Posted on 2001-11-10 16:02:15 by lackluster
Why not just use this?


...
LOCAL byteArray[256]:BYTE
...


Thomas
Posted on 2001-11-10 16:57:10 by Thomas
Ok :grin:
Posted on 2001-11-11 22:48:33 by lackluster