This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.386 | |
.model flat, stdcall | |
option casemap :none | |
include \masm32\include\windows.inc | |
include \masm32\include\kernel32.inc | |
include \masm32\include\masm32.inc | |
includelib \masm32\lib\kernel32.lib | |
includelib \masm32\lib\masm32.lib | |
.data | |
buffer DB 11 DUP(0) | |
;value DWORD 4294967295 | |
value DWORD 2147483647 | |
.code | |
start: | |
invoke dwtoa, value, addr buffer | |
invoke StdOut, addr buffer | |
invoke ExitProcess, 0 | |
end start |
Pre-requisite:
- Install MASM
To assemble:
\masm32\bin\ml /c /Zd /coff int2string.asm
To link:
\masm32\bin\Link /SUBSYSTEM:CONSOLE int2string.obj
2 comments:
This code does not even compile in VS2019!
I haven't tried this using Visual Studio at all. This compiles if using MASM, see this link http://www.masm32.com/
Post a Comment