|
-
Mar 24th, 2006, 08:03 PM
#1
Thread Starter
Frenzied Member
string manipulation
is there any equivalent functions in assembly like the vb mid() left() split() etc etc?
-
Mar 25th, 2006, 02:10 AM
#2
Re: string manipulation
There are no library functions in assembly 
If you're using MASM there might be macros for it.
-
Mar 25th, 2006, 02:42 AM
#3
Addicted Member
Re: string manipulation
Hutch's MASM package i think includes some similar functions - but you have to include them into your program. Check the m32lib directory in the MASM package. - Yeah its there - SZLEFT.asm, SZMID.asm etc. then you just include them in your program.
However, these were written for compatibility and some i believe quite some time ago - so they are not fully inefficient
-
Mar 25th, 2006, 07:40 AM
#4
Thread Starter
Frenzied Member
Re: string manipulation
thanks I found the SZLEFT.asm, im trying to include it in the program, im not actually trying to call the proc yet, only including it, heres my code:
Code:
.486
.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib ; calls to functions
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
;left function !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
include \masm32\m32lib\SZLEFT.asm
.DATA
Message db "This is the message",0
Caption db "This is the Caption",0
.CODE
start:
invoke MessageBox, NULL, addr Message, addr Caption, MB_OK
invoke ExitProcess, NULL
end start
it just says 'make errors occured' btw that is the correct path to the file
BTW this is MASM
also...
could someone give an example of how to call it with an if statement so the pseudo code would be:
Code:
if left(addr Message, 3) == "abc"
;the first 3 chars are abc
else
;the first 3 chars are not abc
end if
thanks
-
Mar 27th, 2006, 09:45 AM
#5
Addicted Member
Re: string manipulation
ummmmm...... i don't use masm....but I'll have a look sometime
Cheers.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|