does somebody have a link to a tutorial for this?
like WORD > string etc.
like WORD > string etc.
you mean to convert a 16 bit number to a string ?
There are many routines already written.
api wsprintf is one of these. Take a look to the api help. If you don't have it you can download it from Iczelion site.
There are many routines already written.
api wsprintf is one of these. Take a look to the api help. If you don't have it you can download it from Iczelion site.
There are two very useful routine in the lastest version of Hutchs Masm32 package for this, note that both use dword values not words.
for example the following code demonstrats the use of the two.
.data
dwMem dw 123456
.data?
Buffer db 64 dup (?)
.code
invoke dwtoa, dwMem, addr Buffer
invoke dw2hex, dwMem, addr Buffer
These two would fill the string buffer with the ascii decimal and ascii hexadecimal representation of 12345.
Note that both will take registers eg. eax, as well.
for example the following code demonstrats the use of the two.
.data
dwMem dw 123456
.data?
Buffer db 64 dup (?)
.code
invoke dwtoa, dwMem, addr Buffer
invoke dw2hex, dwMem, addr Buffer
These two would fill the string buffer with the ascii decimal and ascii hexadecimal representation of 12345.
Note that both will take registers eg. eax, as well.