.386

INCLUDELIB CRTDLL.LIB

EXTERN __imp__printf:PROC
EXTERN __imp__exit:PROC

PUBLIC _start

_TEXT SEGMENT DWORD EXECUTE READ FLAT ALIAS('.text') 'CODE'
ASSUME CS:FLAT, DS:FLAT, ES:FLAT, SS:FLAT

format DB 'hello, world!', 13, 10, 0

_start:
    PUSH    OFFSET format             ; format = "hello, world!\n"
    CALL    DWORD PTR [__imp__printf] ; printf("hello, world!\n")
    PUSH    BYTE PTR 0                ; status = 0
    CALL    DWORD PTR [__imp__exit]   ; exit(0)

_TEXT ENDS

END _start