Skip to content

Instantly share code, notes, and snippets.

@axayjha
Created September 14, 2018 16:02
Show Gist options
  • Save axayjha/c592499d033ba4a70014311c67ebe9ec to your computer and use it in GitHub Desktop.
Save axayjha/c592499d033ba4a70014311c67ebe9ec to your computer and use it in GitHub Desktop.
; 8086 code for Hello World
DATA SEGMENT
MSG DB "Hello, World!", "$"; DB: DEFINE BYTE
; $: terminates the string
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE, DS:DATA
; INIT SEGMENT REGS
START:
MOV AX, DATA
MOV DS, AX
MOV AH, 09H
LEA DX, MSG ; PRINT THE STRING
INT 21H
STOP:
MOV AX, 4C00H
INT 21H
CODE ENDS
END START
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment