Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hello World!. PC / MS-DOS code segment para assume cs:code,ds:code org 0100h start: mov dx,offset message ;point to message mov ah,09h ;func# to printstring.

Similar presentations


Presentation on theme: "Hello World!. PC / MS-DOS code segment para assume cs:code,ds:code org 0100h start: mov dx,offset message ;point to message mov ah,09h ;func# to printstring."— Presentation transcript:

1 Hello World!

2 PC / MS-DOS code segment para assume cs:code,ds:code org 0100h start: mov dx,offset message ;point to message mov ah,09h ;func# to printstring int 21h ;call DOS mov ax,4c00h ;exit int 21h Message db 'Hello World!',13,10,'$' end start

3 PC / Linux section.data ;data section declaration msg db 'Hello World!',0AH len equ $-msg ;string length section.text ;code section declaration global _start ;entry point _start: mov edx,len ;string length mov ecx,msg ;string start mov ebx,1 ;file handle: stdout mov eax,4 ;sys_write int 80h ;kernel system call mov ebx,0 ;return value mov eax,1 ;sys_exit int 80h ;kernel system call

4 ARM / RISC-OS.start STMFD (sp!), {R0-R12, lr} ADR R0, message SWI OS_Write0 LDMFD (sp!), {R0-R12, pc}.message EQUS "Hello, world!" EQUB 0


Download ppt "Hello World!. PC / MS-DOS code segment para assume cs:code,ds:code org 0100h start: mov dx,offset message ;point to message mov ah,09h ;func# to printstring."

Similar presentations


Ads by Google