Subroutines, almost just like C or BASIC...
Patater GBAGuy Mirror
We've seen labels before when we saw variables, except these labels that mark a location in
code have a color (':') after them, such as:
These labels can be accessed like variables also, and that's how self-modifying code works.
The CALL and RET Instructions
The CALL instruction calls a function specified by a label and a RET instruction returns
to the main program, such as the following:
ret ; returns to instruction after the CALL
int 21h ; note that since the program will exit, there's no need for a RET.
The above program will output Go in DOS.
This Day In Review
With what you know now, you can write a program to output the alphabet.
It'll be (very) long, but you can do it!
Tomorrow, Functions in assembly!
Intro - Day 6