------------------------------------------------------------------------------
MC logo
Hello, World!
[^] 386 Assembler Language
------------------------------------------------------------------------------
[Chapter 1: Introduction] [Chapter 2: Data Representation] [Chapter 3: Boolean Algebra and Digital Logic] [Chapter 4: MARIE: A Very Simple Architecture] [386 Assembler Language] [Chapter 5: Real-World Architectures] [Chapter 6: Memory Systems] [Chapter 7: I/O Systems] [Chapter 9: Alternative Architecture] [Chapter 11: Performance Measurement]
[Hello, World!] [Counter] [Max of Three]
hello.s
; ----------------------------------------------------------------------------
; From: http://cs.lmu.edu/~ray/notes/nasmexamples/
;
; helloworld.asm
;
; This is a Win32 console program that writes "Hello, World" on one line and
; then exits.  It needs to be linked with a C library.
; ----------------------------------------------------------------------------

        global  main
        extern  printf

        section .text
main:
        push    message
        call    printf
        add     esp, 4
        ret

        section .data
message:
        db      'Hello, World', 10, 0