Question : Create a Windows based hello world example with Pelle's macro assembler Poasm.
ChatGPT's output :
; Program to print "Hello, World!" to the console in Windows
format PE console
entry start
section '.data' data readable writeable
message db 'Hello, World!', 0
section '.text' code readable executable
start:
; Print the message to the console
push dword -11
call [GetStdHandle]
mov dword [handle], eax
push dword 0
push dword message
push dword 13
push dword [handle]
call [WriteConsoleA]
; Exit the program
push dword 0
call [ExitProcess]
section '.idata' import data readable
library kernel32, 'kernel32.dll',\
user32, 'user32.dll'
import kernel32,\
ExitProcess, 'ExitProcess',\
GetStdHandle, 'GetStdHandle',\
WriteConsoleA, 'WriteConsoleA'
section '.data' data readable writeable
handle dd ?
Naturally, this is the syntax of the Flat Assembler and not Poasm.