Ave populus
ho trovato questo listato su una guida di un sito
codice:
; This is a simple program which displays "Hello World!"
; on the screen.
 
.model small
.stack 
.data 

Message db "Hello World!$" 	; message to be display

.code 

mov dx,OFFSET Message 	; offset of Message is in DX 
mov ax,SEG Message 	; segment of Message is in AX
mov ds,ax 		; DS:DX points to string 

mov ah,9 		; function 9 - display string 
int 21h 		; call dos service 
mov ax,4c00h 		; return to dos DOS 
int 21h 

END start 		;end here
ma quando vado a compilarlo (compilo con GNU as) mi dā tutti questi errori:
d:\hello.asm: Assembler messages:
d:\hello.asm:1: Error: no such instruction: `this is a simple program which disp
lays "Hello World!"'
d:\hello.asm:2: Error: no such instruction: `on the screen.'
d:\hello.asm:4: Error: unknown pseudo-op: `.model'
d:\hello.asm:5: Error: unknown pseudo-op: `.stack'
d:\hello.asm:8: Error: no such instruction: `message db "Hello World!$"'
d:\hello.asm:8: Error: no such instruction: `message to be display'
d:\hello.asm:10: Error: unknown pseudo-op: `.code'
d:\hello.asm:12: Error: too many memory references for `mov'
d:\hello.asm:12: Error: no such instruction: `offset of Message is in DX'
d:\hello.asm:13: Error: too many memory references for `mov'
d:\hello.asm:13: Error: no such instruction: `segment of Message is in AX'
d:\hello.asm:14: Error: too many memory references for `mov'
d:\hello.asm:14: Error: no such instruction: `dx points to string'
d:\hello.asm:16: Error: too many memory references for `mov'
d:\hello.asm:16: Error: no such instruction: `function 9 - display string'
d:\hello.asm:17: Error: junk `h' after expression
d:\hello.asm:17: Error: suffix or operands invalid for `int'
d:\hello.asm:17: Error: junk `service' after expression
d:\hello.asm:18: Error: too many memory references for `mov'
d:\hello.asm:18: Error: no such instruction: `return to dos DOS'
d:\hello.asm:19: Error: junk `h' after expression
d:\hello.asm:19: Error: suffix or operands invalid for `int'
d:\hello.asm:21: Error: no such instruction: `end start'
d:\hello.asm:21: Error: no such instruction: `end here'
come mai?