Ok, i have just been fiddling around with asm just seeing what there is.
I found a way that lists all strings in your program with just a few lines of code.
If a string is done something like: For n = 1 to 10 : n$ + "h" : next n then it won't work but here is the code:
Code: Select all
String$ = "hello"
String$ = "world"
Message$ = "Hello"
Message$ = "in"
Goto EnumerateStrings
channel$ = "#purebasic!"
End
EnumerateStrings:
!MOV edx,_S1
!MOV edx,dword _S1
!MOV [v_value],edx
If PeekS(value) = ""
Debug "Strings have not been initiated yet!"
End
EndIf
Repeat
Debug CString$
CString$ = PeekS(value + totallen)
totallen + Len(CString$) + 1
Until CString$ = Chr(255)+Chr(255)+Chr(255)+Chr(255)
EDIT: Ahh Fred said it was because the debugger adds a lot of stuff, thats why you get all the extra stuff if you let it keep going
