äK Š This program demonstrates a method by which BASICA's CALL statement0Š can be emulated (with parameter passing):G(€ Offset%,Segment% : Š Segment% MUST come directly after Offset%2:B<€ ‚ Call_A(Offset%,Segment%,PARM1%,PARM2%,DEST%) : Š etc...4F Š Each parameter must be pushed on the stack/P €& &B8, PARM1% : Š MOV AX,PARM1%(Z €& &50 : Š PUSH AX/d €& &B8, PARM2% : Š MOV AX,PARM2%(n €& &50 : Š PUSH AX0x €& &8B, &06, DEST% : Š MOV AX,[DEST%](‚ €& &50 : Š PUSH AXAŒ Š And then a FAR CALL must be performed to the subroutineD– €& &FF, &1E, Offset% : Š CALL [Offset%] ; intersegment call  € ‚ª:)´Š First, get the two numbers to add@¾€ "Enter two integers to add together (A%,B%) -> "; A%, B%<ÈŠ And then call the LONG FN to perform the actual CALLAÒ‚ Call_A(‚ ÿ", „C, A%, B%, „(C%)) : Š Add 'em together'Ü€1 C% : Š Print the stored resultæ€ð:MúŠ This machine language subroutine simply adds two variables and storesLŠ the result in a third. Addresses for all three variables are passedŠ on the stack.:3"€& &55 : Š PUSH BP ; Save BP=,€& &89, &E5 : Š MOV BP,SP ; Get frame pointerE6€& &8B,&76,&0A : Š MOV SI,[BP+10] ; Get address of first parmC@€& &8B,&04 : Š MOV AX,[SI] ; Get value of first parmAJ€& &8B,&76,&08 : Š MOV SI,[BP+8] ; Get address of parm 2?T€& &03,&04 : Š ADD AX,[SI] ; Add value to parm 1B^€& &8B,&7E,&06 : Š MOV DI,[BP+6] ; Get address for resultDh€& &89,&05 : Š MOV [DI],AX ; Store result of addition6r€& &5D : Š POP BP ; Restore BPL|€& &CA,&06,&00 : Š RETF 6 ; Far return, pop parms from stackÿÿ