News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Strings array question

Started by Ghirai, January 02, 2006, 11:17:37 AM

Previous topic - Next topic

Ghirai

Hey, i'd like some opinions/suggestions.

I have an array of say 3 strings, and another array with 3 dwords.
The strings in the array have different lenghts.

What would be the best way to extract pairs (2nd string and 2nd dword)?

I was thinking of declaring the string array something like aaa db 4,"Blah",9,"Something",5,Hello" (each string len is known at compile time).

What do you think? How do you suggest i do this?

Thanks.
MASM32 Project/RadASM mirror - http://ghirai.com/hutch/mmi.html

ramguru

Hi, I like your idea, so I've coded it. Don't know is it fast or not, have a look at attachment... BTW there is a limitation string can't exceed 0ffh characters, but of course it's piece of cake to set the limit to 0ffffh characters...

[attachment deleted by admin]

hutch--


.data
  st1 db "string1",0
  st2 db "string2",0
  st3 db "string3",0

  pstr dd st1,st2,st3  ; string array.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Ghirai

MASM32 Project/RadASM mirror - http://ghirai.com/hutch/mmi.html