For example, at the end of the previous example programs, there was a INT 20xH instruction. This calls a procedure in DOS which terminates the program and removes it from memory.
I have compiled a list of all the procedures which can be called using interrupts (up to DOS 3.3 anyway). Click here for it in HTML format, or here for plain text format.
As an example, we'll look at DOS function 9, which displays some text to the screen. This function requires that the address of the data is stored in the DX register. (The DS register must also be set, but in these simple programs it will always be set correctly anyway). Here is a code extract to show the use of this function.
Message DB "Hello! This is a test.$" ... mov ah,9 mov dx,offset Message int 21xH ...There are a few new things in this code extract. The first is the text following the DB command. You may already know that all text in computers is actually stored as numbers. Every letter, punctuation mark, etc is stored as a byte of data.