diff options
-rw-r--r-- | build.bat | 4 | ||||
-rw-r--r-- | pasmgen-win.asm | 35 |
2 files changed, 39 insertions, 0 deletions
diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..9c8d76b --- /dev/null +++ b/build.bat @@ -0,0 +1,4 @@ +set FASMDIR=C:\Tools\fasm
+
+set INCLUDE=%FASMDIR%\INCLUDE
+%FASMDIR%\fasm .\pasmgen-win.asm
diff --git a/pasmgen-win.asm b/pasmgen-win.asm new file mode 100644 index 0000000..c65c47b --- /dev/null +++ b/pasmgen-win.asm @@ -0,0 +1,35 @@ +format PE64 console + +include 'win64a.inc' + + +section '.text' code readable executable + +entry main +main: + mov r8, qword 3 + mov r9, qword 2 + mov r10, qword 3 + + jmp generate + +ok: + invoke GetStdHandle, STD_OUTPUT_HANDLE + invoke WriteConsole, rax, out_buf, rsi, 0, 0 + invoke ExitProcess, 0 + +include 'pasmgen.inc' + + +;; win32 imports +section '.idata' import data readable + +library kernel32,'kernel32.dll' +include 'api/kernel32.inc' + + +section '.data' data readable writeable + +include 'constants.inc' + +out_buf rb 64 |