NASM Forum > Example Code

Hello World

<< < (2/2)

Structure:
rebuild:


--- Code: ---string: db "Hello World", 0
%macro print 1
    mov si, %1
    %%char_loop:
        mov cl, [si]
        inc si
        cmp cl, 0 
        je  %%exit_loop
        mov al, cl
        mov ah, 0x0e
        int 0x10
    call %%char_loop
  %%exit_loop:
%endmacro
print string
jmp $

--- End code ---

 8)

michaellongge:
cant run on win7

Frank Kotler:
No. int 0x10 is BIOS code.  It is 16 bit code.

If you want something for Windows, look into WriteFile.

Best,
Frank

Navigation

[0] Message Index

[*] Previous page

Go to full version