1 / 4

Hello World!

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 int 21h ;call DOS mov ax,4c00h ;exit

zoie
Download Presentation

Hello World!

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hello World!

  2. PC / MS-DOS code segment para assume cs:code,ds:code org 0100h start: movdx,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 lenequ $-msg ;string length section .text ;code section declaration global _start ;entry point _start: movedx,len ;string length movecx,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

More Related