; program to print hello world in middle of screen
title hello world screen
.model small
.stack small
.data
greetings db 'Hello World!$'
.code
; macros
  include mac/mac.asm
; macro to initialize ds
  init_ds
; select display mode (+ clear screen)
  mov ah,0
  mov ah,3
  int 10h
; move cursor to center of screen (actually, slightly off center)
  mov ah,2
  xor bh,bh	; page 0
  mov dx,0C22h	; row=12 (=0Ch), col=34 (=22h)
  int 10h
; display hello world
  mov ah,9	; display char
  mov cx,1	; display once
  mov bl,14h	; red char on blue background
  lea si,greetings	; text to be displayed
  mov bx,12
again:
  mov al,[si]	; char to print
  int 10h
  dec bx
  jnz again
; dos return
  dos_rtn 0
main endp
  end main
	

