+; Prints a null terminated string of your choice.
+; Arguments:
+; CS:DI - pointer to the string you want to print
+print:
+ pusha
+ mov ah, 0Eh ; teletype print
+.write2:
+ mov al, [CURRENT_ADDR] ; get current char and put it in al
+ cmp al, 0 ; check if al is null (string terminator)
+ je .done ; if it is, start a new line
+ int 10h ; otherwise write the char
+ inc di ; increment pointer to string
+ jmp .write2 ; jump back to this section
+.done:
+ mov al, 0Dh ; carriage return
+ int 10h
+ mov al, 0Ah ; line feed
+ int 10h
+ popa
+ ret ; return
+
+; Prints a word (16-bit value) in hex format.
+; Arguments:
+; DX - word to print