Subroutines are groups of instructions that are performed frequently with different data at several stages in a program. As mentioned earlier, the addition of two 2-byte numbers can require six separate instructions occupying 18 locations in store. More complicated functions, such as multiplication, division and trigonometrical ratios, use many more instructions. It is thus highly desirable for commonly used programs for such functions to be written in such a way that it is not necessary to rewrite them in full each time they are needed.
Unable to display preview. Download preview PDF.