finish day 1
This commit is contained in:
25
day_01/helloos.asm
Normal file
25
day_01/helloos.asm
Normal file
@@ -0,0 +1,25 @@
|
||||
; Hello World Program in 16-bit Assembly
|
||||
; This code is intended to run on a DOS system.
|
||||
|
||||
.model small
|
||||
.stack 100h
|
||||
|
||||
.data
|
||||
helloMessage db 'Hello, World!$'
|
||||
|
||||
.code
|
||||
start:
|
||||
; Initialize the data segment
|
||||
mov ax, @data
|
||||
mov ds, ax
|
||||
|
||||
; Display the message
|
||||
mov ah, 09h ; AH = 09h for displaying a string in DOS
|
||||
lea dx, helloMessage ; Load the address of the message into DX
|
||||
int 21h ; Call DOS interrupt
|
||||
|
||||
; Terminate the program
|
||||
mov ax, 4C00h ; Terminate program
|
||||
int 21h
|
||||
|
||||
end start
|
||||
Reference in New Issue
Block a user