;
; emxaout2.asm
;
        .386
        .model  flat

        .code

        public  main
        extern  write:proc
        extern  strlen:proc

main:   lea     eax, msg + 2
        push    eax
        call    strlen
        add     esp, 1*4
        push    eax                     ; nbyte
        push    offset msg + 2          ; buf
        push    1                       ; handle
        call    mywrite + 1
        add     esp, 3*4
;
        xor     eax, eax
        ret

mywrite:ret
        jmp     write

        .data

msg     db      "**Hello, world!", 0dh, 0ah, 00h

        end
