12 Getting Started The next three steps in program creation are each satisfied with BASIC-executable statements.
Creation of a storage area for the object code for the program (which can be estimated at less than 40 words; there is essentially one word of object code per line of source) is accomplished by programming the statement - (The ICOM statement is fully discussed in the "Setting Aside Memory" section of this chapter.) This can be followed in the same program by an instruction to assemble the source code into object code - 290 IASSEMBlE Multipl ication (The IASSEMBLE statement is fully discussed in Chapter 4.) If the assembly is successful (and it will be in this example), then the routine can be called and used as desired.
A typical call looks like - 600 IeAll Multiply(Ind~x,Dim8~sion,Subscript) t5 :i.IJ fir,··t-·.::t.::} (~:::; i.At)S.C r"~ f)t ) ::=i' /:::i.ll)!::;' (The ICALL statement is fully discussed in Chapter 6.) Thus, the final result could easily be - 10 NAM Multipl ica~ion ! B~ginning ot module E::·::T Er-' (·C)r-~_.E:·>:: i t ~ C;E't =.).:-:a. 1 i .. ~E·, I i'-it ~::'!;~E' i'-·::::.: 1::::;::; ~~ ~:;t ()r-'.3,!;;iE' .:i.r-·E',3. f'Cir-' i r-j1:. E'i;!E'r-':=;. C f-'e'·3, t E'ci 40 ::;;OUF:CE :;:;O!...iF:CE Indicates Efitry point follows 60 :::;OUFCE 70 ';;;;Oi...iF.:CE Inpw.1: Ir·H I r-if:!t~t 2: I r'~1' Ciijt ~==t~t : I r·~-r C:~L:i ::;OUF.:CE '30 :;:;OUPCE 1 ~.:iU ::;OU F.:CE 1 .....
3.1 ue of the i nput. p3.r··.3.met.er-·~::. from BASIC and st.oring t.hE~ where t.he rout.ine can use t.hem 120 ::::;OUFCE L.DA =Int~';ie(·:::.+l 13(~ ::::;OUFCE i 40 ~:;CIL1F~C:E 15~:'i ::;OUPCE finally mult.ipl ies t.hem A check for overflc~ is performed arit.hmet.ic accumulat.or and and t.he routine is a~~rted