Prev: 13627 Up: Map Next: 13759
13724: THE 'STRING CONCATENATION' OPERATION (offset 23)
The address of this routine is found in the table of addresses. It is called indirectly via fp_calc_2.
This subroutine performs the binary operation 'A$+B$'. The parameters for these strings are fetched and the total length found. Sufficient room to hold both the strings is made available in the work space and the strings are copied over. The result of this subroutine is therefore to produce a temporary variable A$+B$ that resides in the work space.
strs_add 13724 CALL STK_FETCH The parameters of the second string are fetched and saved.
13727 PUSH DE
13728 PUSH BC
13729 CALL STK_FETCH The parameters of the first string are fetched.
13732 POP HL The lengths are now in HL and BC.
13733 PUSH HL
13734 PUSH DE The parameters of the first string are saved.
13735 PUSH BC
13736 ADD HL,BC The total length of the two strings is calculated and passed to BC.
13737 LD B,H
13738 LD C,L
13739 RST 48 Sufficient room is made available.
13740 CALL STK_STO The parameters of the new string are passed to the calculator stack.
13743 POP BC The parameters of the first string are retrieved and the string copied to the work space as long as it is not a null string.
13744 POP HL
13745 LD A,B
13746 OR C
13747 JR Z,OTHER_STR
13749 LDIR
OTHER_STR 13751 POP BC Exactly the same procedure is followed for the second string thereby giving 'A$+B$'.
13752 POP HL
13753 LD A,B
13754 OR C
13755 JR Z,STK_PNTRS
13757 LDIR
This routine continues into STK_PNTRS.
Prev: 13627 Up: Map Next: 13759