I was trying to work with the hval, sval,uval, val macros and I could not get any of them to work..
I have a string named op1 that holds the characters "5" and is zero terminated, yet all the above conversion macros yeild only 0
what is the correct syntax for these macros?
Try the "atodw" proc.
Include C:\masm32\m32lib\atodw.asm
Just open that file in notpad, and read the proc instructions.
-Ic3D4ne
Here is an example (as a console app):
; ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
.486 ; create 32 bit code
.model flat, stdcall ; 32 bit memory model
option casemap :none ; case sensitive
include \masm32\include\windows.inc
include \masm32\include\masm32.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\kernel32.lib
include \masm32\macros\macros.asm
; ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
.data
string db "12345",0
.code
; ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
start:
; ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
mov eax, uval(ADDR string)
add eax, 1
print ustr$(eax)
mov eax, input(13,10,"Press enter to exit...")
exit
; ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
end start
i had found the problem.
I did not use ADDR
Rain Dog,
Take a look at also,"Iczelion Tutorials ch.31"
String2Dword procedure.