For a true first program, does this look ok?
Code:
; ------------------------
; Message.asm
;
; This program will print
; 3 messages to the screen
; ------------------------
.MODEL SMALL
.STACK
.DATA
MessageA db "This is a text message.", 13, 10, 13, 10, "$"
MessageB db "This is another text message.", 13, 10, "$"
MessageC db "This is yet another message.$"
.CODE
Main PROC
Call Message1
Call Message2
Call Message3
Call Exit
Message1 PROC
mov dx, OFFSET MessageA
mov ax, SEG MessageA
mov ds, ax
mov ah, 9
int 21h
Message1 ENDP
Message2 PROC
mov dx, OFFSET MessageB
mov ax, SEG MessageB
mov ds, ax
mov ah, 9
int 21h
Message2 END
Message3 PROC
mov dx, OFFSET MessageC
mov ax, SEG MessageC
mov ds, ax
mov ah, 9
int 21h
Message3 END
Exit PROC
mov ax, 4c00h
int 21h
Exit ENDP
Main ENDP
END
I was messing around with functions and positioning text with this program.
Positioning text isn't as easy as it is in C.
I'm going to start expanding more upon files, input, and output soon.