TRSDOS 6.2 for the Model 4 - BASIC/OV1 Disassembled

Page Customization

Introduction/Summary

TRSDOS 6.2 BASIC/OV1 Disassembly (Model 4)

This page is the whole of BASIC/OV1, all 2560 bytes of it on 1478 rows, and it was the last file of the LS-DOS 6.3.1H disassembly to be written and is among the first of this one. No source for it survives in any of the five trees the project holds, so every row is read from the bytes. What it holds, in the order the file lays it out: the head and the five doors of the addition; the single precision addition with its normalise, its rounding and its right shift; the constants and the two coefficient tables of the logarithm; LOG with the logarithm to base two under it; the single precision multiplication and division; the exponent of a product or a quotient, the sign of a value, the accumulator moved four ways, the two mantissas unpacked and the three comparisons; CINT, CSNG, CDBL and the truncation; FIX, INT and the whole of the integer arithmetic; the double precision addition, normalise, rounding, multiplication and division with their shifts; and the reading of a number out of the line text with ten times and one tenth beside it. All 230 of the branches BASIC/CMD makes into this file have a row to land on, and this release has no BASIC/OV2 to branch into it at all: that file is MISOSYS's, added with the enhancement package of LS-DOS 6.3.

BASIC/OV1 is the arithmetic package of the Disk BASIC, and unlike BASIC/OV2 it is resident the whole time BASIC runs rather than loaded for one job and dropped. It is a load module of 2604 bytes, ten blocks of 256 and a tail, loading 2600H to 2FFFH with its transfer address at 2600H, and it is dated 1 July 1987 with BASIC/CMD. There is no source for it in any of the three trees: ls631rst\DISK8 carries basic.cmd and basic.ov2 but no basic.ov1, so the release file is the only witness and every row of this page is read from the bytes. BASIC itself reads the file back in at 7F1FH of module 1 when a DOS overlay has been loaded over it, and Can't load BASIC/OV1 at 7F3CH is what it shows when it cannot.

The first instruction of the file is a jump to 8048H, which is module 1's own OLDINIT and which the enhancement package wrote SVCUSR over, so nothing reaches 2600H any longer: the vector belongs to the unenhanced BASIC. The four bytes above it at 2603H are the two words 29F4H and 2A53H and nothing in the three images reads them either.

What the file holds, and how it is reached. Module 1 calls into it 233 times and keeps four tables of its addresses. The three operator tables at 6B5DH, 6B67H and 6B71H are five words each, the plus, the minus, the asterisk, the oblique stroke and the comparison, one table to a kind of number: double precision 2C88H, 2C81H, 2DB5H, 2E8CH and 29EDH; single precision 2622H, 261FH, 278BH, 27EDH and 2982H; integer 2B9EH, 2B93H, 2BBEH, module 1's own 74B2H and 29AFH. The type conversion table at 6B53H holds CDBL 2A96H, CINT 29F4H, the double precision comparison 2AB0H and CSNG 2A6AH. And the function address table at 685DH holds SGN 28FBH, INT 2AF5H, ABS 28E6H, LOG 2746H, CINT 29F4H, CSNG 2A6AH, CDBL 2A96H and FIX 2AE2H.

The accumulator is 72E8H to 72EFH in module 1's variable area, with a guard byte at each end, and a single precision value is its top four bytes: 72ECH and 72EDH the low two bytes of the mantissa, 72EEH the top byte with the sign in bit 7 and the leading one of the mantissa left out because it is always there, and 72EFH the exponent in excess of 128, which is 00H for a value of nothing. A double precision value adds the four bytes below. Out of memory those four bytes live in Register E, Register D, Register C and Register B in that order, which is the convention every routine of this file is written against, and a double precision value's second operand lives in the second accumulator at 72F5H to 72FCH. The two guard bytes are this file's own: 72F0H carries the sign of an answer while it is being worked out and 72E7H and 72F4H take the carries, and no instruction of module 1 or module 2 names any of the three.

What is written so far, in order. 2883H works out the exponent of a product or a quotient, which the multiplication and the division share and tell apart by a single byte in Register L, and 28ADH is ten times the accumulator in four instructions. 28C4H answers the sign of a value and has three entries, one for the whole test, one for a caller that already has the byte and one for a caller that already has the Carry Flag; 28E6H is ABS, 28EAH the negate, 28FBH is SGN. 2917H puts the accumulator on the stack underneath the caller's own return address, which is the single most called routine of the file, and 2924H, 2927H, 2932H, 2935H and 2946H put a value in and take it out. 2953H unpacks both mantissas for a multiplication. 2982H, 29AFH and 29C4H are the three comparisons, all three of which answer 01H when the accumulator holds the greater, 0FFH when the other value does and 00H when they are equal, and all three of which turn their answer round by returning through 28CDH. 29F4H is CINT, 2A6AH CSNG, 2A96H CDBL and 2AB7H the truncation they rest on.

The addition is the part of the file with the most doors and the longest shape. Five instructions stand in front of it: 2607H and 2614H add the constant one half, double precision and single, which is how the number formatter rounds a value at the digit it means to stop writing at; 2617H adds the four bytes a caller already has an address for, which is what FOR uses to add its step; 261CH takes the accumulator from those four bytes and is the one door that subtracts the other way about, ATN pushing it as a return address so that the arctangent of a reciprocal comes out of the quarter turn; and 261FH is the subtraction of the operator table, which turns the accumulator's sign bit over at 28F3H and falls into the addition. 2622H is the addition, and its shape is the shape of every floating point addition: the smaller of the two values is shifted right until the exponents agree, the twenty four bits are added at 26D1H or subtracted at 2660H according to whether the signs are alike, and what comes out is normalised at 2671H and rounded and packed at 26B2H. A difference of exponents of twenty five or more means the smaller value has nothing left to contribute and 263DH returns without doing any of it.

LOG is the only transcendental function in this file, the other six standing together in module 1 at 36D4H to 39E6H, and it is two routines. 2746H is the function table's entry at 686FH for token 0AH: it guards the argument, calls the logarithm to base two at 2758H and multiplies the answer by the natural logarithm of two, which it carries as four bytes in its own instructions at 2750H and 2753H rather than as a constant in store. 2758H is the separation every library makes: the exponent is taken off and kept as a signed byte, the mantissa is left standing as a value from one half to one, the two coefficient tables at 2724H and 2735H are worked out at it through module 1's series evaluator at 3856H and divided one by the other, and the exponent is turned back into a number at 28D3H and added to the quotient. The quotient of those two cubics agrees with the logarithm to base two of every value from one half to one to within 6.2 parts in a hundred million, which is finer than twenty four bits of mantissa can hold; it comes to exactly minus one at one half and to nothing at one.

The multiplication and the division both write their own operand into their own instructions, which is how each of them finds a register to spare. 2795H and 2799H put the three mantissa bytes of the multiplicand into the operand bytes of the instructions at 27C1H and 27BCH, so that the inner loop of the multiplication has a twenty four bit add it can do with one ADD HL,DE and one ADC A; 2802H, 2807H and 280CH do the same for the divisor at 281BH, 281FH and 2823H, and the division keeps the fourth and highest byte of its remainder in the operand byte of the LD A,00H at 2826H and nowhere else. The multiplication counts its three multiplier bytes with the stack: 27A4H pushes the normalise as the final return and 27A8H and 27A9H push the head of the byte loop twice, so that one RET serves both as the end of a byte and as the end of the routine. The division counts its places by the quotient filling up and keeps no counter at all, 2869H going round again while the twenty four bits are still nothing and 2871H bringing the exponent down one for every place shifted before the first bit of the quotient appears. What it hands the rounding at 284EH is a proper round to nearest: bit 7 the half, bit 6 the bit below it and bit 5 set when anything at all is left of the remainder.

FIX and INT differ in one value and FIX is written in terms of INT because of it. INT gives the whole number at or below its argument, which for a negative value with a fraction means away from nothing, and FIX throws the fraction away, which for the same value means towards nothing; so 2AE2H turns a negative argument's sign over, calls INT and turns the answer's sign back, and jumps straight into INT for a positive one. INT itself has a path for each type: an integer is whole already, a single precision value is made a sixteen bit integer when its whole part will fit in two bytes and truncated where it stands at 2B01H when it will not, and a double precision value goes to 2B1AH. The rounding of a negative value is done by taking one off the mantissa before the shift and putting one back after it, 2AC6H and 2AD1H for twenty four bits and 2B4FH and 2B60H for fifty six: a magnitude that is an exact whole number is unchanged by the pair and one with any fraction comes out one larger, which is the whole number below the value rather than above it.

The three integer operators share one plan for an answer that will not fit. Each works in sixteen bits and tests what came out; when it fits, 2A53H stores it and the type stays an integer, and when it does not, both operands are widened to single precision and the single precision routine is entered instead, so that 30000+30000 and 300*300 give answers rather than complaints. The addition's test is the neatest: 2BA0H and 2BA5H make a sign extension byte of each operand with an RLA and an SBC A,A, 2BA7H adds those two with the carry out of the sixteen bit sum, and 2BA8H and 2BA9H put bit 0 of the result against bit 7 of the sum's own top byte, which is the whole of the test for a signed overflow. The subtraction is the addition with one operand negated first, 2B9CH entering it at 2BA1H with the sign extension of the negated value already worked out. The division and MOD are one routine: 2C70H calls the division and keeps what it threw away, and because the loop runs one pass more than the sixteen bits of quotient the remainder comes out doubled, which is why 2C74H to 2C7AH halves it. MOD takes the sign of the dividend, which 2C7EH pops back for that purpose alone.

One magnitude in this arithmetic needs a different answer for each sign, and three places in the file deal with it. A signed sixteen bit integer runs from minus 32768 to plus 32767, so a magnitude of exactly 32768 fits for one sign and not for the other. 2C01H is the integer multiplication's case: the product is stored as an integer when the sign is negative and made a single precision value and then negated when it is positive. 2C5BH is the negate's case: negating minus 32768 gives 8000H back again, and 2C61H to 2C65H is the test for exactly that, after which the routine falls into 2C66H and makes a single precision value of 8000H read as an unsigned number, which is plus 32768. 2B1AH to 2B3BH is INT's case, and it is the one that costs the most: twelve instructions weigh all seven mantissa bytes of a double precision value to find out whether it is exactly minus 32768, and when it is, 2B35H and 2B38H store it as an integer and widen it straight back again.

Every number a user types becomes a value at 2F0FH, and the work is divided between this file and module 1 in a way worth seeing: the loop and all of the decisions are here, and the arithmetic of a digit is there. 2F3CH calls NXTCHAR at 5E93H and hands a digit to 300CH of module 1, which puts it into the value in whichever of the three precisions the number has grown to and comes back to 2F3CH at 303BH; the decimal point, the two forms of the exponent, the four letters of the long and quad forms and the four type suffixes are all tried here. The registers are the whole of the convention across that join. Register Pair HL is the pointer into the line, Register B counts the digits after the decimal point, Register C holds 0FFH until a decimal point is read and 00H after it, which is what lets one ADC A,C in module 1 count the right digits and test nothing, and Register E carries the exponent with Register D holding the count of minus signs in front of it. 2F99H settles the exponent against the digit count and walks the difference to nothing, 2F9DH multiplying by ten while it stands above nothing and 2FA0H dividing while it stands below, each of the two routines moving Register A one step towards nothing so that the loop needs no counter of its own.

The two entries of the number reader differ in one byte and what that byte decides is the type the number starts in. 2F0FH clears the accumulator and writes 08H into the type, so a number read for VAL, for an ASCII LOAD or for 6506H begins as a double precision value; 2F16H, which is the operand byte of the OR 0AFH at 2F15H standing as an XOR A, leaves the Zero Flag set so that 2F28H stores 0000H as an integer instead, and that is the entry the evaluator's term reader jumps to at 74C7H. So a constant written in a program line starts as an integer and grows into a single or a double precision value only as its own digits demand, which is why a percent sign after a number asks for nothing the reader has not done already: 2FC5H steps the pointer past it and makes no conversion at all, so a number too large for an integer keeps the wider type the digits gave it and no complaint is made. The manual gives the four type declaration characters for variable names and says nothing of them after a number, so this is a finding about the code and not a departure from anything promised.

The double precision arithmetic is the single precision arithmetic over again in fifty six bits, and two things are done differently because seven bytes will not fit in registers. The two values change places in store rather than in registers, 2CA3H exchanging all sixteen bytes when the accumulator is the smaller of the two; and the round byte lives in the guard byte at 72E7H where a single precision addition keeps it in Register B. The add and the subtract are one loop that writes its own instruction: 2D53H and 2D55H store an opcode into 2D62H, 8EH for ADC A,(HL) and 9EH for SBC A,(HL), so that seven bytes are added or taken away by the same seven instructions, and 3574H and 357CH of the number formatter hand that routine its opcode themselves. The multiplication at 2DB5H has nowhere to keep its two values either, so 2EE2H moves the accumulator's mantissa down to the third working area at 7318H and clears the accumulator to hold the running product; the division at 2E8CH uses the same area for its remainder.

Dividing a double precision value by ten is the neatest piece of arithmetic in the file, and it is written twice over. For a value whose exponent stands below 41H the tenth at 2DF0H is copied into the second accumulator and the multiplication is entered, which is quick and carries the error of a tenth that cannot be written in binary. For every other value 2E12H works out a series instead: a tenth is three quarters, times sixteen fifteenths, divided by eight, and sixteen fifteenths is one plus a sixteenth plus a sixteenth squared and so on without end, so fifteen passes of 2E3FH to 2E51H, each dividing a running term by sixteen and adding it in, give the whole of it to better than two to the minus sixty four. The three quarters is two halvings and an addition at 2E22H to 2E31H and the division by eight is the three decrements of the exponent at 2E53H, 2E56H and the fall into 2E59H. The exponent test at 2E03H is what keeps the series honest: each pass takes four powers of two off the running term and fifteen passes take sixty, so a value with an exponent below 41H would see its later terms underflow to nothing at 2E67H and come out too small. The series adds and never takes away, so a negative value is made positive first and 2E1EH pushes 28F3H to turn the answer's sign back.

The two constants at 2DF0H are both a ten, and the second is written so that the same bytes serve two precisions. 2DF0H to 2DF7H is one tenth in double precision. 2DF8H to 2DFFH is ten in double precision, and because a single precision value is the top four bytes of a double precision one, its top half at 2DFCH is ten in single precision as it stands, which is what 27E5H loads for the single precision division by ten: one constant written once and read at either width. Nothing reads the eight byte form, so 2DF8H to 2DFBH is the half of it no reader asks for.

The bytes are those of the TRSDOS 6.2.1 Level AR system diskette.

This file and LS-DOS 6.3.1H's are the same file. Not the same loaded image, the same file: all 2604 bytes of it, the load records and the copyright record included, with not one byte different, which no other file of either release can say. Whatever MISOSYS did to Disk BASIC it did in BASIC/CMD and in the two files it added, and the arithmetic package it left alone. So the LS-DOS 6.3.1 BASIC/OV1 page is this same disassembly under the later name, and there are no bugs in it to report under either.

The package reached this form at 6.2.1 and not before. Level AH's BASIC/OV1 differs from this one in 137 operands and 59 instructions that have no counterpart at all, so the arithmetic was still being worked on through the 6.2.0 sub-levels; Level AR settled it, and nothing touched it again in the seven years to LS-DOS 6.3.1H.

Notes

28CDH is an entry inside the operand of the compare at 28CCH. That compare does nothing whatever to the answer the sign test gives, the rotate below it replacing the Carry Flag and the subtraction replacing every other flag, and the reason it is there is that its operand byte is the CPL that 28CDH runs: the three comparisons push 28CDH as their own return address so that the answer comes back the other way about. The same trick stands at 2AABH, a load of Register Pair BC with 043EH that nothing reads, whose two operand bytes are the LD A,04H at 2AACH that four places call to set the type to single precision.

2945H and 2946H are chosen as return addresses to pick a direction. 2976H pushes one of them and then works out whether four bytes or eight are to be moved; 2945H is an EX DE,HL in front of the copy and so loads the accumulator from the caller's area, and 2946H is the copy alone and so stores it there. That is the whole of the difference between 296BH, which loads, and 2970H, which stores, and it is why 2945H is one byte long and is reached by nothing that branches.

Three short runs of the written part are reached by nothing. 28A0H to 28A4H decodes as a call of the sign test, a CPL and a POP HL, which is the overflow exit as it was written before 28A5H was put over it; 2A43H to 2A46H is a load of 587EH and a push of it, which is the Overflow error as 2A24H now gives it with a jump; and 2603H to 2606H is the two words 29F4H and 2A53H at the head of the file. For each of the three the instruction scan, a search of all three images for the address as a word and a scan of every relative jump of the image all came back with nothing.

The type of a value is the number of bytes it occupies, which is why 2946H can read the count straight out of 7142H: 02H for an integer, 04H for a single precision number and 08H for a double. 03H, a string, is the one type that is not a count, and 2AB0H is the routine that demands it.

The single precision and the double precision operators are handed their two operands the other way about. 7497H of module 1 leaves the left hand operand in the registers and the right in the accumulator, where 745DH leaves the right in the second accumulator and the left in the accumulator. That is why the fifth word of the double precision table is 29EDH and not 29C4H: the extra turn 29F0H gives the answer is what makes both tables answer 01H when the right hand operand is the greater.

Four bytes of the multiplication's inner loop can make no difference to any answer. The AND 10H at 27CBH is there to clear the Carry Flag before the rotate at the top of the loop, which is work the loop needs done and which an AND of anything at all would do; but the test it makes of bit 4 of the running product's top byte, and the SET 5,B at 27CFH it leads to, cannot reach the answer. Both mantissas carry their leading one, so each of them stands at one half or more and below one and their product stands at a quarter or more and below one, which means the normalise at 2671H shifts the product up by one place at the most. Bit 5 of the round byte can therefore reach bit 6 and no further, and the only bit of the round byte anything reads is bit 7, which 26B6H tests for the rounding. It is set down here and given no number: it costs nothing, it hurts nothing, and an instruction that did reach bit 7 would round the product up on a condition that has nothing to do with the half.

The restoring path of the division is carried inside an instruction that can never be taken. 2832H sets the Carry Flag and 2833H is a JP NC, so the jump is dead on every pass; its two operand bytes are the POP BC at 2834H and the POP HL at 2835H, which is where 282BH goes when the subtraction borrows and the remainder has to be given back. The same trick stands at 2878H, a load of Register L with 0AFH whose own effect is undone two instructions later and whose operand byte is the XOR A at 2879H that the double precision multiplication calls, 2876H and 2879H being the two doors of the double precision exponent and differing in that one byte and nothing else. With the CP 2FH at 28CCH, the LD BC,043EH at 2AABH, the LD BC,0E1C1H at 2BEFH, whose two operand bytes are the POP BC and POP HL the integer multiplication's two overflow jumps reach, the LD A,0E1H at 2C2EH, whose operand byte is the POP HL of the integer division's restoring path, and the OR 0AFH at 2F15H, whose operand byte is the XOR A the number reader's second entry runs, and the JP C,0412H at 2EBAH, whose two operand bytes are the LD (DE),A and INC B that the double precision division runs when a subtraction goes through, that makes eight places in this file where an instruction stands to carry an entry point in its operand, which is more than the whole of module 1's 21978 bytes holds. Three of the eight are a JP on a condition the instruction above it has just made impossible, which is how both divisions tell a quotient bit of one from a quotient bit of nothing without a test of their own.

One jump catches both the arguments a logarithm has no answer for. 28C4H leaves the sign of the accumulator in Register A as 0FFH, 00H or 01H, and 2749H and 274AH test the parity of it: 00H has no bits set and 0FFH has eight, both of them even, while 01H has one and is odd, so a single JP PE sends nothing and every negative value to FUNCERR at 5F95H and lets every positive one through.

261CH is reached as a pushed return address and by nothing else, which is why a trace that follows only branches cannot see it: 39BAH of ATN loads it into Register Pair HL, 39BDH pushes it, and 39C4H leaves the quarter turn at 3970H in Register Pair HL as its argument. Sixteen bytes of this part are reached by nothing at all, in five runs: 2600H to 2606H, which is the jump to the OLDINIT the enhancement package replaced with a table of the two words 29F4H and 2A53H under it; 2698H; 270FH to 2711H; 27D8H to 27DAH; and 2851H to 2854H. The last four runs decode as NOPs and none of the five is reached by a branch of this file or of either module of BASIC/CMD, by a word of the three images, or by a relative jump.

2917H gives one of the caller's two pairs back and not both. The exchange at 2917H puts the caller's Register Pair HL into Register Pair DE and the load at 2918H writes over the copy of the caller's Register Pair DE, so the exchange at 2922H brings Register Pair HL back as it was and leaves Register Pair DE holding the routine's own return address. Two callers of the written part turn on it: 2631H of the addition and 276CH of the logarithm each keep in Register Pair HL a word they will want in Register Pair DE, and each exchanges the pairs again when the call comes back.

2B41H answers to the Carry Flag it is called with and to nothing else. Reached from 2B40H the Carry Flag is set, because the compare above it is what let the path through, and 2B69H normalises the answer back into a double precision value at 2CEFH; called from 355EH of the number formatter the Carry Flag is clear, the XOR A at 355DH having cleared it, and 2B68H returns with the fifty six bit integer standing at 72E8H to 72EEH with an exponent of 0B8H above it, which is the form that formatter's seven byte subtractions want. Register A at entry is of no account: 2B41H pushes it and 2B67H pops it back, and the Carry Flag is what comes with it.

2B52H to 2B54H is three bytes of padding that are run through on every pass. They stand between the conditional call at 2B4FH and the load at 2B55H and decode as three NOPs, and unlike the other five dead runs of the file they are reached: every double precision INT and every call from the number formatter walks over them.

The last routine of this file does not end in it. 2FF9H divides the accumulator by ten and its four instructions run to 2FFFH, which is the highest byte BASIC/OV1 loads; the rest of it stands at 3000H to 300BH in module 1's own bytes, where the BASIC/CMD page carries it, the INC A at 300AH being this routine's tail. 2FE9H, which multiplies by ten, had room to keep its own tail and the DEC A at 2FF7H is it. The two pages have to agree about that join and they do: this page heads its last section at 2FF9H and the BASIC/CMD page heads its first at 3000H and says in its own title that the twelve bytes belong to the overlay.

2F22H puts 01H into 72F1H before a digit is read, which is the count of warnings an expression has already given, and it means a number that overflows while it is being read complains once and no more: 30D7H of module 1 writes nothing once that count stands at one. 2F24H and 2F25H are two bytes of padding that are run through on every number read, which with the three at 2B52H to 2B54H makes five reached NOPs in the file against sixteen bytes in five runs that nothing reaches at all.

2E49H is three bytes with no effect at all. It loads Register Pair HL with 72FBH and the routine it then calls loads Register Pair HL with 72FCH as its own third instruction, so the value is thrown away unread; nothing branches to 2E49H and no word of the three images holds its address, so it is not an entry point either. It is set down here and given no number: it costs three bytes and one load of a register pair on each of the fifteen passes of the series and changes nothing whatever about the answer.

Variables

Memory Used by BASIC/OV1

Address
Size
Contents
7142H
1 byte
The type of the accumulator (BASIC/CMD)
02H an integer, 03H a string, 04H single precision, 08H double precision, which is also the number of bytes the value occupies. Read at 2946H as a count; written by 2A58H for all three conversions.
72E7H
1 byte
The guard byte below the accumulator (BASIC/CMD)
Named by no instruction of module 1 or module 2. It takes the bits that fall below a double precision mantissa while it is being carried down.
72E8H-72EBH
4 bytes
The low half of the accumulator (BASIC/CMD)
The four bytes a double precision value adds below a single precision one, cleared by CDBL at 2AA3H and 2AA6H and read by CSNG at 2A83H for the rounding.
72ECH-72EFH
4 bytes
The accumulator (BASIC/CMD)
72ECH and 72EDH the low two bytes of the mantissa, 72EEH the top byte with the sign in bit 7, 72EFH the exponent in excess of 128. Read into the registers at 2932H, written from them at 2927H, and an integer is kept in 72ECH and 72EDH alone (2A53H).
72F0H
1 byte
The sign of an answer (BASIC/CMD)
Named by no instruction of module 1 or module 2. 295FH puts the complement of the accumulator's sign there and 289DH puts the sign of a product there, bit 7 set saying the two operands' signs are alike.
72F4H
1 byte
The guard byte below the second accumulator (BASIC/CMD)
Named by no instruction of module 1 or module 2. 2CBFH of the double precision addition clears it and 2CCFH reads it back: it takes the bits the shift at 2CC7H pushes off the bottom of the second accumulator's mantissa, which the rounding then wants in the accumulator's own guard byte at 72E7H.
72F5H-72FCH
8 bytes
The second accumulator (BASIC/CMD)
Where a double precision operator's right hand operand stands, 72FCH its exponent and 72FBH the top byte of its mantissa. Filled by 2970H, emptied by 2968H and read byte by byte by the comparison at 29E1H.
72F1H
1 byte
The count of warnings this expression has already given, which 30CFH of module 1 keeps and reads: 2F22H writes 01H into it before a digit of a typed number is read, so that a number which overflows while it is being read complains once and no more.
7318H-731FH
8 bytes
A third eight byte working area in module 1's variable store that only this file reaches. 2EE2H moves the accumulator's seven mantissa bytes into 7318H to 731EH so that the accumulator is free, which is what lets the double precision multiplication hold a running product and the double precision division a running remainder; 2EA8H clears 731FH as the byte above the remainder's fifty six bits and 2D4BH is the door of the seven byte add and subtract that works on it.
27BDH-27BEH, 27C2H
3 bytes
The three mantissa bytes of the multiplicand, written by 2799H and 2795H into the operand bytes of the instructions at 27BCH and 27C1H, which is how the inner loop of the multiplication has a register to spare.
281CH, 2820H, 2824H
3 bytes
The three mantissa bytes of the divisor, written by 280CH, 2807H and 2802H into the operand bytes of the subtractions at 281BH, 281FH and 2823H.
2827H
1 byte
The fourth and highest byte of the division's remainder, which lives in the operand byte of the LD A,00H at 2826H and nowhere else: 2815H clears it, 282DH writes the difference into it and 2863H shifts it up.

Routines of Other Files Called or Jumped To

AddressContents
30B9HThe Division by zero warning of module 1 (BASIC/CMD) by the door that takes the sign of the result from 72EEH: what the double precision division gives for a divisor of nothing (2E90H).
5E93HNXTCHAR (BASIC/CMD), which steps the pointer in Register Pair HL to the next character of the line that is not a space and sets the Carry Flag when it is a digit: the number reader calls it at 2F3CH, 2F4FH, 2F87H, 2F8DH, 2FC5H and 2FD5H.
300CH, 303BH, 307BH, 308BHThe digit and the exponent digit of a number being read in (BASIC/CMD), which are the other half of this file's reading loop: 2F3FH hands a digit to 300CH and 303BH comes back to 2F3CH, 2F90H hands an exponent digit to 307BH and 308BH comes back to 2F8DH.
7673H, 75A6H, 67B4HThe sign of an exponent, the ampersand constants and the address the reader pushes as its own way back (BASIC/CMD), reached from 2F8AH, 2F2FH and 2F17H.
3076HThe single precision addition reached with one value on the stack (BASIC/CMD), which pops it back into the operand registers and adds: where the integer addition and subtraction go when the sum will not fit in two bytes (2BBBH).
3C24HSubscript out of range (BASIC/CMD): what 2B76H gives on its own when the product of two subscript bounds will not hold in sixteen bits (2B81H, 2B8AH), which is the complaint an array wants and not the one an expression wants.
586FHError 11, Division by zero (BASIC/CMD): what the integer division gives for a divisor of nothing (2C11H), where the single precision division gives the warning at 30B3H and carries on.
3625H, 3629HThe double precision and single precision constants of one half (BASIC/CMD), which CINT adds to round (2A04H, and 2614H for the single).
5884HError 13, Type mismatch (BASIC/CMD): what every conversion gives for a string (28F0H, 2908H, 29FBH, 2A71H, 2A9AH, 2AB4H).
587EHError 6, Overflow (BASIC/CMD): a value of 32768 or more made an integer (2A24H).
308EH, 30A5H, 30ABH, 30ACHThe four doors of the Overflow warning of module 1 (BASIC/CMD), which carries on with the largest value there is and which differ only in where each takes the sign of the result from: the operand (27F9H, 27FDH, 28AAH), the accumulator (28B5H, 28C1H), one word thrown off the stack first (26CEH) and 72F0H turned over (2656H).
30B3HThe Division by zero warning of module 1 (BASIC/CMD) by the door that takes the sign of the result from Register B and Register C: what the single precision division gives for a divisor of nothing (27F0H).
3856HThe series evaluator of module 1 (BASIC/CMD), which takes a count byte and that many four byte coefficients with the highest power first: the logarithm calls it twice, once for each of its two tables (2768H, 2777H).
5F95HFUNCERR, Illegal function call (BASIC/CMD): what LOG gives for an argument of nothing and for every negative one, both of them caught by the one parity test (274AH).
8048HOLDINIT of module 1 (BASIC/CMD), the initialisation of the unenhanced Disk BASIC: the transfer address of this file jumps to it (2600H) and nothing in a running BASIC reaches that jump, the NEWB enhancement package having replaced OLDINIT with SVCUSR.
76A4HThe type test (BASIC/CMD), which eight instructions of the written part call: it answers the Sign Flag for an integer, the Zero Flag for a string, the Parity Flag odd for a single precision value and the Carry Flag clear for a double.

Disassembly

2600H - The Head, the Half Added and the Single Precision Addition (2600H-265FH)

The first instruction of the file is dead and the four bytes under it are dead with it: 2600H is the transfer address of the load module and it jumps to module 1's OLDINIT, which the NEWB enhancement package replaced with SVCUSR, so nothing in a running BASIC ever reaches it. What follows are the five doors of the addition. 2607H and 2614H add the constant one half, double precision and single, which is how the number formatter rounds a value at the digit it means to stop writing at; 2617H adds the four bytes a caller already has an address for; 261CH takes the accumulator from those four bytes, which is the one door that subtracts the other way about and which ATN pushes as a return address; and 261FH is the subtraction of the operator table, which turns the accumulator's sign bit over and falls into the addition. 2622H itself is the addition, six instructions of BASIC/CMD and one of this file calling it, and its shape is the shape of every floating point addition there is: line the two exponents up by shifting the smaller value right, add or subtract the twenty four bits according to whether the signs are alike, normalise what comes out and round it, and pack the sign back into the top byte on the way to 2927H.

2600
JP 8048H C3 48 80
The head of the file (2600H), which is the transfer address of its own load module and which nothing in a running BASIC reaches: jump to 8048H, module 1's OLDINIT, the initialisation of the unenhanced Disk BASIC that the NEWB enhancement package replaced with SVCUSR.
2603-2606
DEFW 29F4H, 2A53H F4 29 53 2A
Four bytes nothing reaches (2603H to 2606H), which stand as the two words 29F4H, CINT, and 2A53H, the store of an integer into the accumulator. No instruction of this file or of the two modules of BASIC/CMD branches to any of the four, no word of the three images holds one of their addresses and no relative jump reaches them: they are a table of the pair that turns a value into an integer and stores it, left where something once read it.
2607
One half added to a double precision value (2607H), which 3431H and 355AH of the number formatter call to round a value at the digit the writing stops at: call 2970H, which stores the accumulator into the second accumulator at 72F5H so that the constant below can be loaded over the top of it.
260A
LD HL,3625H 21 25 36
Load Register Pair HL with 3625H of module 1, the eight bytes of the double precision constant one half, which stand with the other constants of the number package.
260D
Call 296BH, which loads the eight bytes the address in Register Pair HL stands on into the accumulator, so that the accumulator holds one half and the second accumulator the value being rounded.
2610
Call 2C88H, the double precision addition, which adds the second accumulator to the one half in the accumulator and leaves the sum in the accumulator.
2613
RET C9
Return to the number formatter with the value rounded up by one half at the place its exponent was shifted to.
2614
LD HL,3629H 21 29 36
One half added to a single precision value (2614H), which 3429H and 3594H of the number formatter call and 2A12H of CINT: load Register Pair HL with 3629H of module 1, the four bytes of the single precision constant one half.
2617
Four bytes at Register Pair HL added (2617H), which 3896H of RND and 38EDH of COS call and 4572H of FOR for the step: call 2935H, which loads the four bytes the address in Register Pair HL stands on into Register E, Register D, Register C and Register B, the operand registers.
261A
Jump to 2622H, the addition below, which adds those four bytes to the accumulator and leaves the sum in the accumulator.
261C
Four bytes at Register Pair HL less the accumulator (261CH), which 39BDH of ATN pushes as a return address so that the arctangent of a reciprocal comes out of the quarter turn at 3970H: call 2935H, which loads the four bytes the address in Register Pair HL stands on into the operand registers.
261F
The single precision subtraction (261FH), the second word of the single precision operator table at 6B69H, which 37B0H of the power and 3917H of SIN also call: call 28F3H, which turns the sign bit of the accumulator over so that the addition below takes it from the operand.
2622
LD A,B 78
The single precision addition (2622H), the first word of the single precision operator table at 6B67H, which 3078H, 3870H, 392CH, 3935H, 3944H and 658BH of BASIC/CMD call and 28B9H of this file: load Register A from Register B, the exponent of the value in the operand registers.
2623
OR A B7
Set the flags from Register A with OR A, which gives Z when that exponent is 00H and the value in the operand registers is nothing at all.
2624
RET Z C8
Return with Z, the operand being nothing, which leaves the accumulator standing as the caller handed it, that being the sum already.
2625
LD A,(72EFH) 3A EF 72
Load Register A with the byte at 72EFH, the exponent of the accumulator, which is 00H when the accumulator holds nothing.
2628
OR A B7
Set the flags from Register A with OR A, which gives Z when the accumulator is nothing and the operand registers are the sum.
2629
Jump to 2927H on Z, the accumulator being nothing: that routine stores Register Pair DE and Register Pair BC into 72ECH and 72EEH and returns, which makes the operand the sum.
262C
SUB B 90
Subtract Register B from Register A, the operand's exponent from the accumulator's, which says which of the two values is the larger and by how many powers of two.
262D
Jump to 263BH on NC, the accumulator's exponent standing at or above the operand's, so that the operand is the one to be shifted down to meet it.
262F
CPL 2F
Complement Register A, every bit of it, the first half of turning that difference the other way about.
2630
INC A 3C
Increment Register A, which finishes the two's complement and leaves the difference of the exponents as a positive count of places again.
2631
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which puts the operand's low mantissa word into Register Pair HL: the call below gives Register Pair HL back as it found it and gives Register Pair DE back holding its own return address, so Register Pair HL is the only place the word is safe.
2632
Call 2917H, which puts the accumulator's four bytes on the stack underneath its own return address, Register B the exponent, Register C the top byte, Register D the middle and Register E the low.
2635
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which brings the operand's low mantissa word back into Register Pair DE where the store below looks for it.
2636
Call 2927H, which stores Register Pair DE and Register Pair BC into 72ECH and 72EEH, so that the smaller of the two values is now the accumulator and the larger is on the stack.
2639
POP BC C1
Pop Register Pair BC, the high word of the value 2632H put down, Register B its exponent and Register C the top byte of its mantissa.
263A
POP DE D1
Pop Register Pair DE, its low word, so that the larger value is in the operand registers and the two have changed places and the difference of the exponents is still in Register A.
263B
CP 19H FE 19
The difference judged (263BH), which 262DH reaches: compare Register A with 19H, twenty five, one more than the twenty four bits a single precision mantissa has.
263D
RET NC D0
Return with NC, the difference standing at twenty five or more, where every bit of the smaller value falls off the bottom of the mantissa and the larger value is the sum.
263E
PUSH AF F5
Push Register AF, the difference of the exponents, which the call below writes over and 2643H brings back.
263F
Call 2953H, which puts the implied leading one back into both mantissas, takes the sign out of each and leaves bit 7 of Register A set when the two signs are alike, with Register Pair HL on 72F0H.
2642
LD H,A 67
Load Register H from Register A, that byte, so that the answer about the signs is kept while the difference of the exponents comes back below.
2643
POP AF F1
Pop Register AF, the difference of the exponents 263EH put down, which the shift below counts in.
2644
Call 26F1H, which shifts the twenty four bits in Register C, Register D and Register E right by that many places and keeps what falls out of the bottom in Register B as the round byte.
2647
LD A,H 7C
Load Register A from Register H, the byte 2642H kept, whose bit 7 says whether the two signs are alike.
2648
OR A B7
Set the flags from Register A with OR A, which brings that bit 7 into the Sign Flag.
2649
LD HL,72ECH 21 EC 72
Load Register Pair HL with 72ECH, the low byte of the accumulator's mantissa, which is where both the add and the subtract below begin.
264C
Jump to 2660H on P, bit 7 being clear and the two signs differing, where the shifted value is subtracted from the accumulator instead of added to it.
264F
Call 26D1H, which adds the twenty four bits of the accumulator at 72ECH to Register E, Register D and Register C and leaves Register Pair HL on 72EEH and Register A holding the top byte.
2652
Jump to 26B2H on NC, nothing having carried out of the top of the mantissa, where the sum is rounded and packed as it stands.
2654
INC HL 23
Increment Register Pair HL to 72EFH, the exponent of the accumulator, which the carry out of the mantissa makes one larger.
2655
INC (HL) 34
Increment the byte Register Pair HL addresses, 72EFH, which is the exponent raised by one to make room for the bit that carried out.
2656
JP Z,30ACH CA AC 30
Jump to 30ACH on Z, that exponent having wrapped from 0FFH to 00H: the Overflow of module 1, which takes the sign of the result from 72F0H and turns it over, 72F0H holding the complement of the sign.
2659
LD L,01H 2E 01
Load Register L with 01H, one place, which is the count the shift below reads out of Register L and all the shift a carry out of the top needs.
265B
Call 2713H, which shifts Register C, Register D, Register E and Register B right one place with the Carry Flag still holding the bit that carried out, so that the bit comes in at the top of Register C.
265E
Jump to 26B2H, the round and the pack, with the mantissa shifted down into its twenty four bits and the exponent raised to match.

2660H - The Subtraction, the Normalise, the Round and the Pack (2660H-26D0H)

Two values of unlike sign are subtracted here and the answer has to be normalised afterwards, which is the one part of an addition that costs real work: 2660H takes the shifted value from the accumulator over all thirty two bits, the round byte included, and 266EH turns the answer round and turns the sign over with it when the subtraction borrowed. 2671H is the normalise, and it does the work in two stages, 2674H walking whole bytes up while the top byte is nothing and 2689H walking single bits up after that, counting down as it goes in Register B so that 26ACH can take the count straight off the exponent. The value is carried through it as Register C, Register D and the pair Register Pair HL, which lets 269AH shift sixteen bits with one ADD HL,HL. 26B2H rounds and packs, 26B7H carrying the mantissa up by one when bit 7 of the round byte is set and 26BDH putting the sign back into bit 7 of the top byte, which it takes from 72F0H and which stands there complemented, so that the XOR at 26BFH against the leading one gives the sign itself.

2660
XOR A AF
The subtraction of two unlike signs (2660H), which 264CH reaches with Register Pair HL on 72ECH: clear Register A with XOR A, which gives nothing to subtract the round byte from.
2661
SUB B 90
Subtract Register B from Register A, the round byte, which negates it and sets the Carry Flag whenever it was not nothing, so that the borrow runs into the three bytes above.
2662
LD B,A 47
Load Register B from Register A, the negated round byte, which is the bottom eight bits of the answer.
2663
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72ECH, the low byte of the accumulator's mantissa.
2664
SBC A,E 9B
Subtract Register E from Register A with the Carry Flag, the low byte of the shifted value, which carries the borrow out of the round byte in with it.
2665
LD E,A 5F
Load Register E from Register A, the low byte of the difference.
2666
INC HL 23
Increment Register Pair HL to 72EDH, the middle byte of the accumulator's mantissa.
2667
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72EDH, that middle byte.
2668
SBC A,D 9A
Subtract Register D from Register A with the Carry Flag, the middle byte of the shifted value.
2669
LD D,A 57
Load Register D from Register A, the middle byte of the difference.
266A
INC HL 23
Increment Register Pair HL to 72EEH, the top byte of the accumulator's mantissa, which carries its leading one and no sign, 2953H having unpacked it.
266B
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72EEH, that top byte.
266C
SBC A,C 99
Subtract Register C from Register A with the Carry Flag, the top byte of the shifted value.
266D
LD C,A 4F
Load Register C from Register A, the top byte of the difference.
266E
Call 26DDH on Carry, the subtraction having borrowed out of the top and the shifted value being the larger of the two: that routine negates all thirty two bits and turns the sign at 72F0H over with them.
2671
LD L,B 68
The normalise (2671H), which 38E7H of RND also calls: load Register L from Register B, the round byte, so that it is the low half of the pair the shifts below use.
2672
LD H,E 63
Load Register H from Register E, the low byte of the mantissa, so that Register Pair HL holds the bottom sixteen bits of the value and one ADD HL,HL shifts them both.
2673
XOR A AF
Clear Register A with XOR A, which is the count of places shifted so far and nothing yet.
2674
LD B,A 47
The whole bytes walked up (2674H): load Register B from Register A, the count of places shifted so far, which is kept in Register B while Register A is used for the test below.
2675
LD A,C 79
Load Register A from Register C, the top byte of the value.
2676
OR A B7
Set the flags from Register A with OR A, which gives Z when that top byte is nothing and leaves bit 7 of it in the Sign Flag.
2677
Jump to 26A0H on NZ, the top byte holding something, where the Sign Flag says whether the leading one is already in place or single bits have to be walked up.
2679
LD C,D 4A
Load Register C from Register D, the middle byte, which moves the whole value up one byte, eight places at a stroke.
267A
LD D,H 54
Load Register D from Register H, the low byte of the mantissa, the second step of that move.
267B
LD H,L 65
Load Register H from Register L, the round byte, the third step of it.
267C
LD L,A 6F
Load Register L from Register A, 00H, which brings nothing in at the bottom and finishes the byte move.
267D
LD A,B 78
Load Register A from Register B, the count of places shifted so far, which the subtraction below carries eight further down.
267E
SUB 08H D6 08
Subtract 08H from Register A, eight places, so that the count Register A holds is the negative of the number of places the value has come up.
2680
CP 0E0H FE E0
Compare Register A with 0E0H, thirty two places down, which is what the count reaches when all four bytes have been walked through and the value is nothing.
2682
Jump to 2674H on NZ, fewer than thirty two places having been walked, to look at the top byte again.
2684
XOR A AF
The accumulator set to nothing (2684H), which 37CDH of the power routine calls and eight instructions of this file reach, among them 26AEH, 2D0AH and 2DBDH: clear Register A with XOR A, the exponent that stands for no value at all.
2685
LD (72EFH),A 32 EF 72
The exponent set from Register A (2685H), which 36FCH of the power routine calls with the byte already in hand: store Register A into the byte at 72EFH, the exponent of the accumulator.
2688
RET C9
Return to the caller with the accumulator holding nothing, every path that underflows coming out here.
2689
LD A,H 7C
The single bits walked up (2689H), which 26A0H reaches: load Register A from Register H, the low byte of the mantissa.
268A
OR L B5
Or Register A with Register L, the round byte, which sets the Zero Flag only when both of the bottom two bytes are nothing.
268B
OR D B2
Or Register A with Register D, the middle byte, so that the Zero Flag stands for all three bytes below the top one.
268C
Jump to 2699H on NZ, something standing below the top byte, where all thirty two bits are shifted up a bit at a time.
268E
LD A,C 79
Load Register A from Register C, the top byte, which is the only byte with anything in it and can be shifted on its own.
268F
DEC B 05
The top byte alone shifted up (268FH): decrement Register B, the count of places, which goes one further down for the place about to be shifted.
2690
RLA 17
Rotate Register A left through the Carry Flag, which doubles the top byte and brings its bit 7 out into the Carry Flag.
2691
Jump to 268FH on NC, bit 7 having been clear and the leading one not yet in place, to shift the byte up again.
2693
INC B 04
Increment Register B, which gives back the place the shift below is about to give back with it.
2694
RRA 1F
Rotate Register A right through the Carry Flag, which brings the leading one back into bit 7 where the packed format wants it.
2695
LD C,A 4F
Load Register C from Register A, the top byte with its leading one in place.
2696
Jump to 26A3H, which takes the count of places off the exponent and rounds what is left.
2698
DEFB 00H 00
One byte nothing reaches (2698H), which stands between the jump at 2696H and the shift below it and decodes as a NOP. No instruction of this file or of the two modules of BASIC/CMD branches to it, no word of the three images holds its address and no relative jump reaches it: it is one byte of padding and no more.
2699
DEC B 05
All thirty two bits shifted up (2699H), which 268CH reaches: decrement Register B, the count of places, for the place about to be shifted.
269A
ADD HL,HL 29
Add Register Pair HL to itself, which doubles the bottom sixteen bits, the round byte and the low byte of the mantissa, and brings their top bit out into the Carry Flag.
269B
RL D CB 12
Rotate the byte in Register D left through the Carry Flag, the middle byte of the mantissa, which takes that bit in at the bottom and sends its own out.
269D
LD A,C 79
Load Register A from Register C, the top byte of the mantissa.
269E
ADC A,A 8F
Add Register A to itself with the Carry Flag, which doubles the top byte and takes in the bit that came out of the middle one.
269F
LD C,A 4F
Load Register C from Register A, the top byte doubled, so that all thirty two bits have come up one place.
26A0
The leading one looked for (26A0H), which 2677H reaches with the Sign Flag set from the top byte: jump to 2689H on P, bit 7 of that byte being clear and the leading one not yet in place.
26A3
LD A,B 78
The count taken off the exponent (26A3H), which 2696H reaches: load Register A from Register B, the count of places the value came up, which stands as a negative number.
26A4
LD E,H 5C
Load Register E from Register H, the low byte of the mantissa, which brings the pair the shifts used back into the register the pack wants it in.
26A5
LD B,L 45
Load Register B from Register L, the round byte, which finishes bringing the pair back.
26A6
OR A B7
Set the flags from Register A with OR A, which gives Z when the value needed no shifting at all.
26A7
Jump to 26B2H on Z, no place having been shifted, where the exponent stands as the addition left it and only the round and the pack are left.
26A9
LD HL,72EFH 21 EF 72
Load Register Pair HL with 72EFH, the exponent of the accumulator, which the count is to be taken off.
26AC
ADD A,(HL) 86
Add the byte Register Pair HL addresses to Register A, 72EFH, the exponent: the count being negative, this takes it off.
26AD
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, 72EFH, the exponent brought down by as many powers of two as the value came up.
26AE
Jump to 2684H on NC, the addition having borrowed and the exponent having gone below nothing: the value has underflowed and the accumulator is set to nothing without a word to the user.
26B0
Jump to 2684H on Z, the exponent having come to exactly 00H, which is the one value that stands for nothing and is the same underflow.
26B2
LD A,B 78
The round and the pack (26B2H), which 2652H, 265EH, 26A7H and 2A84H reach: load Register A from Register B, the round byte, the eight bits that fell below the mantissa.
26B3
LD HL,72EFH 21 EF 72
The same with the round byte in hand (26B3H), which 284EH of the division reaches with its own byte of bits made up: load Register Pair HL with 72EFH, the exponent of the accumulator.
26B6
OR A B7
Set the flags from Register A with OR A, which brings bit 7 of the round byte, the half, into the Sign Flag.
26B7
Call 26C4H on M, bit 7 of the round byte being set and the part thrown away standing at a half or more, which carries the mantissa up by one.
26BA
LD B,(HL) 46
Load Register B with the byte Register Pair HL addresses, 72EFH, the exponent of the answer, which is where the pack wants it.
26BB
INC HL 23
Increment Register Pair HL to 72F0H, the byte above the accumulator, which carries the complement of the sign of the answer.
26BC
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72F0H, that complemented sign.
26BD
AND 80H E6 80
And Register A with 80H, which throws every bit but bit 7 away and leaves the complement of the sign on its own.
26BF
XOR C A9
Exclusive Or Register A with Register C, the top byte of the mantissa, whose bit 7 is the leading one: one against the complement of the sign gives the sign itself, which is what the packed format wants in bit 7.
26C0
LD C,A 4F
Load Register C from Register A, the top byte packed, the sign in bit 7 and the leading one left out of it.
26C1
Jump to 2927H, which stores Register Pair DE and Register Pair BC into 72ECH and 72EEH and returns to the caller of the addition with the sum in the accumulator.
26C4
INC E 1C
The mantissa carried up by one (26C4H), which 26B7H calls and 2AD1H of the truncation: increment Register E, the low byte of the mantissa.
26C5
RET NZ C0
Return with NZ, that byte not having wrapped to 00H, the carry having gone no further than the bottom byte.
26C6
INC D 14
Increment Register D, the middle byte of the mantissa, the low byte having wrapped.
26C7
RET NZ C0
Return with NZ, the middle byte not having wrapped either.
26C8
INC C 0C
Increment Register C, the top byte of the mantissa, both the bytes below it having wrapped.
26C9
RET NZ C0
Return with NZ, the top byte not having wrapped, which is every carry but the one that runs out of the mantissa altogether.
26CA
LD C,80H 0E 80
Load Register C with 80H, the leading one on its own: all twenty four bits were ones and the mantissa has come up to exactly one half with one more power of two above it.
26CC
INC (HL) 34
Increment the byte Register Pair HL addresses, 72EFH, that one more power of two.
26CD
RET NZ C0
Return with NZ, the exponent not having wrapped to 00H, with the mantissa at one half and the exponent one larger.
26CE
JP 30ABH C3 AB 30
Jump to 30ABH, the Overflow of module 1 by the door that throws one word off the stack first, the exponent having wrapped from 0FFH to 00H and the caller of 26C4H having left its return address there.

26D1H - The Twenty Four Bits Added, Negated and Shifted Right (26D1H-271FH)

Three short routines the addition turns on. 26D1H adds the twenty four bits of the accumulator at 72ECH into Register C, Register D and Register E and is the whole of the work when two values of like sign are added, 35C3H of the number package calling it for its own sake. 26DDH negates all thirty two bits and turns the sign at 72F0H over with them, which is what a subtraction that borrowed wants, and 2AD6H of the truncation reaches it too. 26F1H is the shift right and it is written twice over for speed: whole bytes are moved down eight places at a time at 26F7H until fewer than eight places are left, and 26FEH then goes a bit at a time, with a second loop at 2707H that shifts the top byte alone while the three bytes below it are still nothing and jumps into the general loop the moment a one falls out of it. The count lives in Register L and is one more than the number of places, 271CH decrementing it before it tests, and the round byte in Register B takes everything that falls off the bottom.

26D1
LD A,(HL) 7E
The twenty four bits added (26D1H), which 264FH of the addition calls and 35C3H of the number package: load Register A with the byte Register Pair HL addresses, 72ECH, the low byte of the accumulator's mantissa.
26D2
ADD A,E 83
Add Register E to Register A, the low byte of the shifted value.
26D3
LD E,A 5F
Load Register E from Register A, the low byte of the sum.
26D4
INC HL 23
Increment Register Pair HL to 72EDH, the middle byte of the accumulator's mantissa.
26D5
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72EDH, that middle byte.
26D6
ADC A,D 8A
Add Register D to Register A with the Carry Flag, the middle byte of the shifted value, taking in the carry out of the bottom.
26D7
LD D,A 57
Load Register D from Register A, the middle byte of the sum.
26D8
INC HL 23
Increment Register Pair HL to 72EEH, the top byte of the accumulator's mantissa, which carries its leading one and no sign.
26D9
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72EEH, that top byte.
26DA
ADC A,C 89
Add Register C to Register A with the Carry Flag, the top byte of the shifted value.
26DB
LD C,A 4F
Load Register C from Register A, the top byte of the sum, which leaves Register A holding it as well.
26DC
RET C9
Return to the caller with the sum in Register C, Register D and Register E, Register Pair HL on 72EEH, Register A holding the top byte and the Carry Flag holding whatever ran out of the top.
26DD
LD HL,72F0H 21 F0 72
All thirty two bits negated and the sign turned over (26DDH), which 266EH of the subtraction calls and 2AD6H of the truncation: load Register Pair HL with 72F0H, the byte above the accumulator, which carries the complement of the sign of the answer.
26E0
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72F0H, that complemented sign.
26E1
CPL 2F
Complement Register A, every bit of it, which turns the sign of the answer the other way about: the value subtracted was the larger of the two and the answer takes its sign and not the accumulator's.
26E2
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, 72F0H, the sign of the answer turned over.
26E3
XOR A AF
Clear Register A with XOR A, nothing for the subtractions below to take each byte from.
26E4
LD L,A 6F
Load Register L from Register A, 00H, which keeps a nothing in Register L for the three subtractions below to load from and leaves Register Pair HL on 7200H, an address nothing reads.
26E5
SUB B 90
Subtract Register B from Register A, the round byte, which negates it and sets the Carry Flag whenever it held anything.
26E6
LD B,A 47
Load Register B from Register A, the negated round byte.
26E7
LD A,L 7D
Load Register A from Register L, 00H, nothing again for the next subtraction.
26E8
SBC A,E 9B
Subtract Register E from Register A with the Carry Flag, the low byte of the mantissa.
26E9
LD E,A 5F
Load Register E from Register A, that byte negated.
26EA
LD A,L 7D
Load Register A from Register L, 00H once more.
26EB
SBC A,D 9A
Subtract Register D from Register A with the Carry Flag, the middle byte of the mantissa.
26EC
LD D,A 57
Load Register D from Register A, that byte negated.
26ED
LD A,L 7D
Load Register A from Register L, 00H for the last of the four.
26EE
SBC A,C 99
Subtract Register C from Register A with the Carry Flag, the top byte of the mantissa.
26EF
LD C,A 4F
Load Register C from Register A, that byte negated, so that all thirty two bits are the two's complement of what they were.
26F0
RET C9
Return to the caller with the value negated and the sign at 72F0H turned over to match it.
26F1
LD B,00H 06 00
The shift right (26F1H), which 2644H of the addition calls and 2ACCH of CINT: load Register B with 00H, the round byte, which takes in everything the shift sends off the bottom of the mantissa.
26F3
SUB 08H D6 08
Whole bytes taken off the count (26F3H): subtract 08H from Register A, eight places, the count of places the value is to come down.
26F5
Jump to 26FEH on Carry, fewer than eight places being left, where the rest is shifted a bit at a time.
26F7
LD B,E 43
Load Register B from Register E, the low byte of the mantissa, which moves the value down a whole byte and makes that byte the round byte.
26F8
LD E,D 5A
Load Register E from Register D, the middle byte, the second step of the byte move.
26F9
LD D,C 51
Load Register D from Register C, the top byte, the third step of it.
26FA
LD C,00H 0E 00
Load Register C with 00H, which brings nothing in at the top and finishes the byte move.
26FC
Jump to 26F3H, which takes another eight places off the count and looks again.
26FE
ADD A,09H C6 09
The places left (26FEH), which 26F5H reaches with the count eight below nothing: add 09H to Register A, which brings the count back above nothing and leaves it one more than the number of places still to shift.
2700
LD L,A 6F
Load Register L from Register A, that count, which is where both of the loops below read it and 271CH decrements it.
2701
LD A,D 7A
Load Register A from Register D, the middle byte of the mantissa.
2702
OR E B3
Or Register A with Register E, the low byte, which sets the Zero Flag only when both are nothing.
2703
OR B B0
Or Register A with Register B, the round byte, so that the Zero Flag stands for all three bytes below the top one.
2704
Jump to 271BH on NZ, something standing below the top byte, where all four bytes are shifted a bit at a time.
2706
LD A,C 79
Load Register A from Register C, the top byte, which is the only byte with anything in it and can be shifted on its own while that holds.
2707
DEC L 2D
The top byte alone shifted down (2707H): decrement Register L, the count of places left, which is tested before any place is shifted.
2708
RET Z C8
Return with Z, every place having been shifted, with the value down where the exponents agree and the round byte holding what fell out.
2709
RRA 1F
Rotate Register A right through the Carry Flag, which halves the top byte and brings its bit 0 out into the Carry Flag.
270A
LD C,A 4F
Load Register C from Register A, the top byte halved.
270B
Jump to 2707H on NC, nothing having fallen out of the bottom of the top byte, so that the three bytes below it are still nothing and need no shifting.
270D
Jump to 2715H, the general loop below, a one having fallen out of the top byte: it is carried into the middle byte and every byte is in play from here on.
270F-2711
DEFB 00H, 00H, 00H 00 00 00
Three bytes nothing reaches (270FH to 2711H), which stand between the jump at 270DH and the loop below it and decode as three NOPs. No instruction of this file or of the two modules of BASIC/CMD branches to any of the three, no word of the three images holds one of their addresses and no relative jump reaches them: they are padding and no more.
2712
LD A,C 79
The general shift loop (2712H), which 271EH comes back to: load Register A from Register C, the top byte of the mantissa.
2713
RRA 1F
One place with the Carry Flag already set (2713H), which 265BH of the addition calls with the bit that carried out of the top of the mantissa standing in the Carry Flag and the top byte already in Register A: rotate Register A right through the Carry Flag, which halves the top byte and takes that bit in above it.
2714
LD C,A 4F
Load Register C from Register A, the top byte halved.
2715
RR D CB 1A
Rotate the byte in Register D right through the Carry Flag, the middle byte, which takes in what fell out of the top byte.
2717
RR E CB 1B
Rotate the byte in Register E right through the Carry Flag, the low byte, which takes in what fell out of the middle one.
2719
RR B CB 18
Rotate the byte in Register B right through the Carry Flag, the round byte, which takes in what fell out of the low byte and loses its own bit 0 for good.
271B
XOR A AF
The count counted down (271BH), which 2704H reaches: clear Register A with XOR A, which clears the Carry Flag so that the next place shifted brings a nothing in at the top.
271C
DEC L 2D
Decrement Register L, the count of places left to shift.
271D
RET Z C8
Return with Z, every place having been shifted, with the value down and the round byte holding what fell below it.
271E
Jump to 2712H, the top of the loop, which takes the top byte into Register A and shifts all four bytes another place down.

2720H - The Constant One and the Two Coefficient Tables of the Logarithm (2720H-2745H)

The largest block of constants in the file, and every byte of it is data. 2720H is the single precision one, which module 1 loads at 3804H for the running answer of a whole power and at 3893H for the range of RND, and it is the only one of the ten values here that anything outside this file reads. The thirty four bytes from 2724H are two tables for module 1's series evaluator at 3856H, each in the form that routine wants, a count byte and then that many four byte coefficients with the highest power first, and 2765H and 2774H of the logarithm are the only two instructions that address them. Between them they are a rational approximation of the logarithm to base two over the range a normalised mantissa lies in: the quotient of the first table's cubic by the second's agrees with the logarithm to base two of every value from one half to one to within 6.2 parts in a hundred million, which is finer than the twenty four bits of a single precision mantissa can hold, and it comes to exactly minus one at one half and to nothing at one. The second table's last coefficient is a quarter of the square root of two and its first is one, which is the only coefficient of either table that is a round number.

2720-2723
DEFB 00H, 00H, 00H, 81H 00 00 00 81
The single precision constant one (2720H to 2723H), which 3804H of the whole power and 3893H of RND load into Register Pair HL: the mantissa of 00H, 00H and 00H is the leading one and nothing else, and the exponent of 81H is one power of two above the half the format's mantissa stands for, which makes the value one exactly.
2724
DEFB 04H 04
The count of the first table's coefficients (2724H), which 2765H of the logarithm loads the address of and 3859H of the series evaluator reads: four coefficients stand below it, each of four bytes, and the evaluator takes the first as the running total and multiplies by the argument before each of the other three.
2725-2728
DEFB 9AH, 0F7H, 19H, 83H 9A F7 19 83
The first coefficient of the first table (2725H to 2728H), which is the one of the highest power and the one the evaluator starts from: 4.8114748, the cube's coefficient.
2729-272C
DEFB 24H, 63H, 43H, 83H 24 63 43 83
The second coefficient of the first table (2729H to 272CH): 6.10585213, the square's coefficient.
272D-2730
DEFB 75H, 0CDH, 8DH, 84H 75 CD 8D 84
The third coefficient of the first table (272DH to 2730H), the first of the ten values here whose bit 7 of the top mantissa byte is set and so the first that is negative: minus 8.86266041.
2731-2734
DEFB 0A9H, 7FH, 83H, 82H A9 7F 83 82
The fourth and last coefficient of the first table (2731H to 2734H), which the evaluator adds in without a multiplication after it: minus 2.05466676, the constant term.
2735
DEFB 04H 04
The count of the second table's coefficients (2735H), which 2774H of the logarithm loads the address of: four again, so that the two tables are a cubic over a cubic.
2736-2739
DEFB 00H, 00H, 00H, 81H 00 00 00 81
The first coefficient of the second table (2736H to 2739H), the cube's: one exactly, the same four bytes that stand at 2720H, which makes the quotient of the two polynomials come out as the ratio of the first table's cubic to a monic one.
273A-273D
DEFB 0E2H, 0B0H, 4DH, 83H E2 B0 4D 83
The second coefficient of the second table (273AH to 273DH): 6.42784214, the square's coefficient.
273E-2741
DEFB 0AH, 72H, 11H, 83H 0A 72 11 83
The third coefficient of the second table (273EH to 2741H): 4.54517078.
2742-2745
DEFB 0F4H, 04H, 35H, 7FH F4 04 35 7F
The fourth and last coefficient of the second table (2742H to 2745H), the constant term: 0.353553414, which is a quarter of the square root of two and the only one of the eight coefficients that stands below one.

2746H - LOG and the Logarithm to Base Two (2746H-278AH)

LOG is two routines and the second of them does the work. 2746H is the function table's entry at 686FH for token 0AH, and all it does is guard the argument, call the logarithm to base two below and multiply the answer by the natural logarithm of two, which it carries as four bytes in Register Pair BC and Register Pair DE rather than as a constant in store. The guard is the neatest instruction of the band: 28C4H answers the sign of the accumulator as 0FFH, 00H or 01H, and a single JP PE catches both the cases a logarithm has no answer for, because 00H has no bits set and 0FFH has eight and both leave the Parity Flag even while the one good answer, 01H, has one bit and leaves it odd. 2758H is the logarithm to base two and it is the classic separation: the exponent is taken off the value and kept, the mantissa is left standing as a value between one half and one, the two tables at 2724H and 2735H are worked out at it through module 1's series evaluator and divided one by the other, and the exponent is turned back into a number and added to the quotient. The exponent is kept as 72EFH exclusive or 80H, which is exactly the true exponent read as a signed byte, and 28D3H turns such a byte into a single precision value.

2746
LOG (2746H), which the function address table holds at 686FH for token 0AH and 3787H of the power routine calls for a base raised to a power that is not whole: call 28C4H, which answers the sign of the accumulator in Register A as 0FFH for a negative value, 00H for nothing and 01H for a positive one.
2749
OR A B7
Set the flags from Register A with OR A, which puts the number of bits set in that answer into the Parity Flag: none for 00H and eight for 0FFH, both even, and one for 01H, which is odd.
274A
JP PE,5F95H EA 95 5F
Jump to 5F95H on PE, the parity being even and the argument therefore nothing or negative, which is FUNCERR of module 1 and gives Illegal function call: one test catches both the cases the logarithm has no answer for.
274D
Call 2758H below, which leaves the logarithm of the argument to base two in the accumulator.
2750
LD BC,8031H 01 31 80
Load Register Pair BC with 8031H, Register B of 80H the exponent and Register C of 31H the top byte of the mantissa of the natural logarithm of two, which this routine carries in its own instructions and not in store.
2753
LD DE,7218H 11 18 72
Load Register Pair DE with 7218H, Register D of 72H the middle byte and Register E of 18H the low byte of that same constant, so that the four operand registers hold 0.69314718 to the twenty four bits the format has.
2756
Jump to 278BH, the single precision multiplication, which multiplies the logarithm to base two by the logarithm of two and so gives the logarithm to base e, and returns to the caller of LOG from there.
2758
The logarithm to base two (2758H), which 274DH above is the only instruction that calls: call 2932H, which loads the accumulator's four bytes into Register E, Register D, Register C and Register B, Register B being the exponent the logarithm needs taken off.
275B
LD A,80H 3E 80
Load Register A with 80H, the exponent that stands for no power of two at all.
275D
LD (72EFH),A 32 EF 72
Store Register A into the byte at 72EFH, the exponent of the accumulator, which leaves the accumulator holding the argument's mantissa as a value of one half or more and below one and nothing else.
2760
XOR B A8
Exclusive Or Register A with Register B, the argument's true exponent in excess of 128: turning bit 7 over gives the excess back as a signed byte, 00H for no power of two, 01H for one and 0FFH for one the other way.
2761
PUSH AF F5
Push Register AF, that signed exponent, which 277FH brings back once both polynomials and the division are out of the way.
2762
Call 2917H, which puts the accumulator's four bytes, the mantissa, on the stack underneath its own return address, so that the second polynomial can be worked out at the same value.
2765
LD HL,2724H 21 24 27
Load Register Pair HL with 2724H, the count and the four coefficients of the first of the two tables, which is the numerator.
2768
CALL 3856H CD 56 38
Call 3856H of module 1, the series evaluator, which works that cubic out at the mantissa in the accumulator and leaves the answer there.
276B
POP BC C1
Pop Register Pair BC, the high word of the mantissa 2762H put down, Register B its exponent and Register C its top byte.
276C
POP HL E1
Pop Register Pair HL, its low word, which is kept in Register Pair HL and not in Register Pair DE because the call below gives Register Pair HL back as it found it and gives Register Pair DE back holding its own return address.
276D
Call 2917H, which puts the numerator on the stack underneath its own return address, the mantissa being wanted in the accumulator again.
2770
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which brings the mantissa's low word into Register Pair DE where the store below looks for it.
2771
Call 2927H, which stores Register Pair DE and Register Pair BC into 72ECH and 72EEH and so puts the mantissa back in the accumulator with the numerator safe on the stack.
2774
LD HL,2735H 21 35 27
Load Register Pair HL with 2735H, the count and the four coefficients of the second of the two tables, which is the denominator.
2777
CALL 3856H CD 56 38
Call 3856H of module 1, the series evaluator again, which works that cubic out at the same mantissa and leaves the denominator in the accumulator.
277A
POP BC C1
Pop Register Pair BC, the high word of the numerator 276DH put down.
277B
POP DE D1
Pop Register Pair DE, its low word, so that the four operand registers hold the numerator and the accumulator the denominator.
277C
Call 27EDH, the single precision division, which divides the numerator in the operand registers by the denominator in the accumulator and leaves the logarithm of the mantissa to base two in the accumulator.
277F
POP AF F1
Pop Register AF, the signed exponent 2761H put down, which is the whole part of the answer.
2780
Call 2917H, which puts the quotient on the stack underneath its own return address so that the accumulator is free for the exponent.
2783
Call 28D3H, which turns the signed byte in Register A into a single precision value in the accumulator, the whole number of powers of two the argument stood above its mantissa.
2786
POP BC C1
Pop Register Pair BC, the high word of the quotient 2780H put down.
2787
POP DE D1
Pop Register Pair DE, its low word, so that the operand registers hold the logarithm of the mantissa and the accumulator the exponent.
2788
Jump to 2622H, the single precision addition, which adds the two and leaves the logarithm of the whole argument to base two in the accumulator, and returns to 274DH from there.

278BH - The Single Precision Multiplication (278BH-27E1H)

Nine instructions of BASIC/CMD call this and two of this file, which makes it the busiest arithmetic routine of the three modules. It is the schoolbook method done in binary and it writes its own multiplicand into its own instructions to save a register: 2795H puts the operand's top mantissa byte into the operand byte of the ADC A,00H at 27C1H and 2799H puts its low word into the operand of the LD DE,0000H at 27BCH, so that the inner loop has a twenty four bit add it can do with one ADD HL,DE and one ADC A. The multiplier is the accumulator's mantissa and it is taken a byte at a time, and the way the three bytes are counted is worth seeing: 27A4H pushes the normalise at 2671H as the final return and 27A8H and 27A9H push 27ADH twice, so that the RET at 27D7H brings the routine back to its own head for the second and third bytes and to the normalise after the third. A multiplier byte of nothing costs no loop at all, 27B0H sending it to 27DDH, which slides the running product down eight places and comes straight back. The product is carried as Register C, Register Pair HL and Register B, Register C the top eight bits, Register Pair HL the sixteen below them, which lets one RR H and RR L shift both, and Register B the eight bits that have fallen below the mantissa; 27D5H puts Register Pair HL back into Register Pair DE between bytes so that each byte begins and ends with the product in the four registers the rest of the file uses. Four bytes of the inner loop can make no difference to any answer. 27CBH's AND 10H is there to clear the Carry Flag before the RRA at the top of the loop, which is work the loop needs done; but the test it makes of bit 4 of the product's top byte, and the SET 5,B at 27CFH it leads to, cannot reach the answer. Both mantissas carry their leading one, so each stands at one half or more and below one and their product stands at a quarter or more and below one, which means the normalise at 2671H shifts the product up by one place at the most. Bit 5 of the round byte can therefore reach bit 6 and no further, and the only bit of the round byte anything ever reads is bit 7, which 26B6H tests for the rounding. No numbering is given to it: it costs nothing, it hurts nothing, and an instruction that did reach bit 7 would round up on a condition that has nothing to do with the half.

278B
The single precision multiplication (278BH), the third word of the single precision operator table at 6B6BH, which 378CH, 3795H, 37BEH, 381EH, 3835H, 3852H, 3868H and 3890H of BASIC/CMD call and 2BFEH and 2756H of this file: call 28C4H, which answers the sign of the accumulator and gives Z when it holds nothing.
278E
RET Z C8
Return with Z, the accumulator being nothing, which is the product already and wants no work.
278F
LD L,00H 2E 00
Load Register L with 00H, the byte 2887H reads to tell a product from a quotient, 00H standing for a product.
2791
Call 2883H, which adds the two exponents, gives Overflow if the sum is too large, puts the leading one back into both mantissas and leaves the sign of the product at 72F0H and Register Pair HL on 72EFH.
2794
LD A,C 79
Load Register A from Register C, the top byte of the operand's mantissa with its leading one in place and its sign taken out, which is the top eight bits of the multiplicand.
2795
LD (27C2H),A 32 C2 27
Store Register A into the byte at 27C2H, which is the operand byte of the ADC A,00H at 27C1H: the top byte of the multiplicand now stands inside the instruction that adds it.
2798
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which puts the low two bytes of the multiplicand into Register Pair HL for the store below and 72EFH into Register Pair DE, where nothing reads it again.
2799
LD (27BDH),HL 22 BD 27
Store Register Pair HL into the word at 27BDH, which is the operand of the LD DE,0000H at 27BCH: the low sixteen bits of the multiplicand now stand inside the instruction that loads them.
279C
LD BC,0000H 01 00 00
Load Register Pair BC with 0000H, which clears Register B, the round byte of the running product, and Register C, its top byte.
279F
LD D,B 50
Load Register D from Register B, 00H, the middle byte of the running product cleared with them.
27A0
LD E,B 58
Load Register E from Register B, 00H, the low byte of it, so that the running product is nothing in all four registers.
27A1
LD HL,2671H 21 71 26
Load Register Pair HL with 2671H, the normalise, which is where the three mantissa bytes finish.
27A4
PUSH HL E5
Push Register Pair HL, that address, so that it stands as the return underneath the two the pushes below put down.
27A5
LD HL,27ADH 21 AD 27
Load Register Pair HL with 27ADH, the head of the byte loop below, which is to be entered three times for the three bytes of the multiplier.
27A8
PUSH HL E5
Push Register Pair HL, that address, which the second byte comes back to.
27A9
PUSH HL E5
Push Register Pair HL a second time, which the third byte comes back to: the loop is entered by falling into it once and by returning to it twice.
27AA
LD HL,72ECH 21 EC 72
Load Register Pair HL with 72ECH, the low byte of the accumulator's mantissa, which is the multiplier and is taken from the bottom up.
27AD
LD A,(HL) 7E
One byte of the multiplier (27ADH), which 27D7H and 27E1H return to twice over: load Register A with the byte Register Pair HL addresses, the next byte of the multiplier.
27AE
INC HL 23
Increment Register Pair HL to the byte above it, which the next time round the loop reads.
27AF
OR A B7
Set the flags from Register A with OR A, which gives Z when that byte of the multiplier is nothing.
27B0
Jump to 27DDH on Z, the byte being nothing, which slides the running product down eight places without adding anything to it and is the whole of the work that byte wants.
27B2
PUSH HL E5
Push Register Pair HL, the pointer into the multiplier, which the inner loop writes over and 27D6H brings back.
27B3
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which puts the middle and low bytes of the running product into Register Pair HL, where one shift takes both of them.
27B4
LD E,08H 1E 08
Load Register E with 08H, the count of bits in the byte of the multiplier now in hand.
27B6
RRA 1F
One bit of the multiplier (27B6H), which 27D3H comes back to: rotate Register A right through the Carry Flag, which brings the lowest bit of the multiplier byte out into the Carry Flag.
27B7
LD D,A 57
Load Register D from Register A, the rest of the multiplier byte, which is kept in Register D while Register A carries the product's top byte through the add and the shift.
27B8
LD A,C 79
Load Register A from Register C, the top byte of the running product.
27B9
Jump to 27C3H on NC, the multiplier's bit having been clear, where the product is shifted down with nothing added to it.
27BB
PUSH DE D5
Push Register Pair DE, the rest of the multiplier byte in Register D and the count of bits in Register E, which the load below writes over.
27BC
LD DE,0000H 11 00 00
Load Register Pair DE with 0000H, which 2799H wrote the low sixteen bits of the multiplicand into: this instruction carries its own operand and is the reason the routine has a register to spare.
27BF
ADD HL,DE 19
Add Register Pair DE to Register Pair HL, which adds the low sixteen bits of the multiplicand to the middle and low bytes of the running product.
27C0
POP DE D1
Pop Register Pair DE, the multiplier byte and the count of bits 27BBH put down.
27C1
ADC A,00H CE 00
Add 00H to Register A with the Carry Flag, which 2795H wrote the top byte of the multiplicand into: this finishes the twenty four bit addition and leaves what runs out of the top in the Carry Flag.
27C3
RRA 1F
The product shifted down one place (27C3H), which 27B9H reaches: rotate Register A right through the Carry Flag, the top byte of the product, which takes in whatever ran out of the top of the addition.
27C4
LD C,A 4F
Load Register C from Register A, that top byte shifted down.
27C5
RR H CB 1C
Rotate the byte in Register H right through the Carry Flag, the middle byte of the product, which takes in what fell out of the top byte.
27C7
RR L CB 1D
Rotate the byte in Register L right through the Carry Flag, the low byte of the product.
27C9
RR B CB 18
Rotate the byte in Register B right through the Carry Flag, the round byte, which takes in what fell out of the low byte and loses its own bit 0.
27CB
AND 10H E6 10
And Register A with 10H, which clears the Carry Flag so that the rotate at the top of the loop brings nothing in above the multiplier, and tests bit 4 of the product's top byte on the way: Register A is loaded again at 27D2H and the value the test leaves in it is of no account.
27CD
Jump to 27D1H on Z, bit 4 of that top byte having been clear, past the one instruction below.
27CF
SET 5,B CB E8
Set bit 5 of Register B, the round byte: the product of two normalised mantissas stands at a quarter or more, so the normalise shifts it up one place at the most and this bit can reach bit 6 and no further, where nothing reads it, 26B6H reading bit 7 and nothing else.
27D1
DEC E 1D
The count of bits counted down (27D1H), which 27CDH reaches: decrement Register E, the count of bits left in this byte of the multiplier.
27D2
LD A,D 7A
Load Register A from Register D, the rest of the multiplier byte, which the rotate at the top of the loop takes the next bit out of.
27D3
Jump to 27B6H on NZ, bits being left in this byte of the multiplier.
27D5
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which puts the middle and low bytes of the product back into Register D and Register E, where the other routines of the file look for them.
27D6
POP HL E1
Pop Register Pair HL, the pointer into the multiplier 27B2H put down.
27D7
RET C9
Return to 27ADH for the next byte of the multiplier, or to the normalise at 2671H after the third of them, according to which of the three addresses 27A4H, 27A8H and 27A9H put down is now on top of the stack.
27D8-27DA
DEFB 00H, 00H, 00H 00 00 00
Three bytes nothing reaches (27D8H to 27DAH), which stand between the return above and the pair below and decode as three NOPs. No instruction of this file or of the two modules of BASIC/CMD branches to any of the three, no word of the three images holds one of their addresses and no relative jump reaches them: they are padding and no more.
27DB
POP HL E1
One word thrown off the stack (27DBH), which 2897H of the exponent jumps to when a product or a quotient comes out as nothing, which 3C1DH and 3EA8H of BASIC/CMD call for its own sake and which 2FB1H and 2FCAH load as an address: pop Register Pair HL, the word on top of the stack, which is the return address of the multiplication or the division and is thrown away so that its caller is returned to instead.
27DC
RET C9
Return to that caller, the accumulator holding nothing and the routine that was in the middle of working it out abandoned.
27DD
LD B,E 43
A multiplier byte of nothing (27DDH), which 27B0H reaches: load Register B from Register E, the low byte of the running product, which becomes the round byte and is the first step of sliding all four bytes down eight places.
27DE
LD E,D 5A
Load Register E from Register D, the middle byte, the second step of that slide.
27DF
LD D,C 51
Load Register D from Register C, the top byte, the third step of it.
27E0
LD C,A 4F
Load Register C from Register A, 00H, which brings nothing in at the top and finishes the slide, eight places costing four loads where the loop would have cost eight times round.
27E1
RET C9
Return to 27ADH for the next byte of the multiplier, or to the normalise at 2671H if that was the third of them.

27E2H - A Tenth, the Single Precision Division and the Double Precision Exponent (27E2H-2882H)

27E2H is the accumulator divided by ten and 3000H of the number package is the only instruction that calls it: it puts the value on the stack, loads the single precision ten that stands at 2DFCH among the double precision constants over the top of it, takes the value back into the operand registers and falls into the division, which divides the registers by the accumulator and so divides the value by ten. 27EBH is the same two pops on their own, which 399FH of ATN and 74BEH of the evaluator reach with the dividend already on the stack. 27EDH is the division, and like the multiplication it writes the divisor into its own instructions, 2802H, 2807H and 280CH putting the three mantissa bytes into the operand bytes of the SUB 00H at 281BH and the two SBC A,00H at 281FH and 2823H. It is restoring division done thirty two bits wide: 2818H subtracts the divisor from the remainder, 282BH gives the remainder back when the subtraction borrowed and 2855H shifts the quotient and the remainder up a place together, the fourth and highest byte of the remainder living in the operand byte of the LD A,00H at 2826H and being written there by 2815H, 282DH and 2863H. The restoring path is hidden inside an instruction: 2832H sets the Carry Flag and 2833H is a JP NC that can therefore never be taken, and its two operand bytes are the POP BC and POP HL that 282BH jumps to, so that the instruction which is never taken is the instruction that carries the path which is taken half the time. The loop ends when the quotient's top bit comes up, 2836H to 283AH reading bit 7 of the quotient's top byte through an INC A and a DEC A which set the Sign Flag and leave the Carry Flag holding the newest quotient bit; and 283EH to 284DH then builds a round byte out of that bit, bit 7 of the remainder and a bit that stands for a remainder of anything at all, which is a proper round to nearest. 2876H and 2879H are the two doors the double precision multiplication and division reach the exponent through, and 2878H is there only to carry the XOR A at 2879H in its operand byte, which is the same trick the CP 2FH at 28CCH plays for 28CDH.

27E2
The accumulator divided by ten (27E2H), which 3000H of the number package is the only instruction to call, and which is the single precision half of a routine whose other half is 2E00H: call 2917H, which puts the accumulator's four bytes on the stack underneath its own return address.
27E5
LD HL,2DFCH 21 FC 2D
Load Register Pair HL with 2DFCH, the four bytes of the single precision constant ten, which stand inside the block of constants at 2DF0H and are the only part of that block this file loads as a single precision value.
27E8
Call 2924H, which loads those four bytes into the operand registers and stores them into 72ECH and 72EEH, so that the accumulator holds ten and the value that was in it is on the stack: the division below divides the operand registers by the accumulator, which makes ten the divisor and the value the dividend.
27EB
POP BC C1
The dividend taken off the stack (27EBH), which 399FH of ATN and 74BEH of the evaluator reach with the dividend already put down: pop Register Pair BC, its high word, Register B the exponent and Register C the top byte of the mantissa.
27EC
POP DE D1
Pop Register Pair DE, its low word, Register D the middle byte and Register E the low byte, so that the operand registers hold the dividend and the accumulator the divisor.
27ED
The single precision division (27EDH), the fourth word of the single precision operator table at 6B6DH, which 3747H of the power and 39B7H of ATN call and 277CH of the logarithm: call 28C4H, which answers the sign of the accumulator and gives Z when the divisor is nothing.
27F0
JP Z,30B3H CA B3 30
Jump to 30B3H on Z, the divisor being nothing, which is the Division by zero of module 1 by the door that takes the sign of the result from Register B and Register C, the dividend's own.
27F3
LD L,0FFH 2E FF
Load Register L with 0FFH, the byte 2887H reads to tell a product from a quotient, 0FFH standing for a quotient and making the exponent a difference instead of a sum.
27F5
Call 2883H, which takes the divisor's exponent from the dividend's, gives Overflow if what comes out is too large, puts the leading one back into both mantissas and leaves the sign of the quotient at 72F0H and Register Pair HL on 72EFH.
27F8
INC (HL) 34
Increment the byte Register Pair HL addresses, 72EFH, the exponent of the quotient: the complement at 288BH leaves the difference one too small and the first of these two increments puts that right.
27F9
JP Z,308EH CA 8E 30
Jump to 308EH on Z, that exponent having wrapped from 0FFH to 00H, which is the Overflow of module 1 by the door that takes the sign of the result from the operand.
27FC
INC (HL) 34
Increment the byte Register Pair HL addresses, 72EFH, a second time, which is the one power of two the quotient of two normalised mantissas needs, both of them standing at one half or more and below one.
27FD
JP Z,308EH CA 8E 30
Jump to 308EH on Z, that exponent having wrapped on the second increment, the same Overflow.
2800
DEC HL 2B
Decrement Register Pair HL to 72EEH, the top byte of the divisor's mantissa with its leading one in place.
2801
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72EEH, that top byte.
2802
LD (2824H),A 32 24 28
Store Register A into the byte at 2824H, which is the operand byte of the SBC A,00H at 2823H: the top byte of the divisor now stands inside the instruction that subtracts it.
2805
DEC HL 2B
Decrement Register Pair HL to 72EDH, the middle byte of the divisor's mantissa.
2806
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72EDH, that middle byte.
2807
LD (2820H),A 32 20 28
Store Register A into the byte at 2820H, the operand byte of the SBC A,00H at 281FH.
280A
DEC HL 2B
Decrement Register Pair HL to 72ECH, the low byte of the divisor's mantissa.
280B
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72ECH, that low byte.
280C
LD (281CH),A 32 1C 28
Store Register A into the byte at 281CH, the operand byte of the SUB 00H at 281BH, which is the first of the four subtractions and the one that starts the borrow.
280F
LD B,C 41
Load Register B from Register C, the top byte of the dividend's mantissa, which makes Register B the top byte of the remainder.
2810
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which puts the dividend's low word into Register Pair HL, so that the remainder stands as Register B and Register Pair HL and the shift at 285CH takes sixteen of its bits at once.
2811
XOR A AF
Clear Register A with XOR A, nothing for the three registers of the quotient and the fourth byte of the remainder below.
2812
LD C,A 4F
Load Register C from Register A, 00H, the top byte of the quotient.
2813
LD D,A 57
Load Register D from Register A, 00H, its middle byte.
2814
LD E,A 5F
Load Register E from Register A, 00H, its low byte, so that the quotient is nothing in all three registers.
2815
LD (2827H),A 32 27 28
Store Register A into the byte at 2827H, which is the operand byte of the LD A,00H at 2826H and is where the fourth and highest byte of the remainder is kept: the remainder begins with nothing above its twenty four bits.
2818
PUSH HL E5
The divisor subtracted from the remainder (2818H), which 2869H and 2871H come back to: push Register Pair HL, the low sixteen bits of the remainder, which the subtraction writes over and 2835H gives back when it borrows.
2819
PUSH BC C5
Push Register Pair BC, the top byte of the remainder in Register B and the top byte of the quotient in Register C, for the same reason.
281A
LD A,L 7D
Load Register A from Register L, the low byte of the remainder.
281B
SUB 00H D6 00
Subtract 00H from Register A, which 280CH wrote the low byte of the divisor into: this instruction carries its own operand and starts the borrow that runs up through the three below it.
281D
LD L,A 6F
Load Register L from Register A, the low byte of the difference.
281E
LD A,H 7C
Load Register A from Register H, the middle byte of the remainder.
281F
SBC A,00H DE 00
Subtract 00H from Register A with the Carry Flag, which 2807H wrote the middle byte of the divisor into.
2821
LD H,A 67
Load Register H from Register A, the middle byte of the difference.
2822
LD A,B 78
Load Register A from Register B, the top byte of the remainder's twenty four bits.
2823
SBC A,00H DE 00
Subtract 00H from Register A with the Carry Flag, which 2802H wrote the top byte of the divisor into.
2825
LD B,A 47
Load Register B from Register A, the top byte of the difference.
2826
LD A,00H 3E 00
Load Register A with 00H, which is the fourth and highest byte of the remainder, written here by 2815H, 282DH and 2863H and kept nowhere else.
2828
SBC A,00H DE 00
Subtract 00H from Register A with the Carry Flag, nothing at all, which does no more than carry the borrow out of the twenty four bits into that fourth byte.
282A
CCF 3F
Complement the Carry Flag, which turns the borrow into its opposite, so that the Carry Flag now stands set when the subtraction went through and clear when it did not.
282B
Jump to 2834H on NC, the subtraction having borrowed and the divisor having been the larger: 2834H is the first of the two operand bytes of the instruction at 2833H and stands there as a POP BC, which with the POP HL below it gives the remainder back untouched.
282D
LD (2827H),A 32 27 28
Store Register A into the byte at 2827H, the fourth byte of the remainder, the subtraction having gone through and this being the part of the difference that is not in a register.
2830
POP AF F1
Pop Register AF, the word 2819H put down, which is thrown away: the difference stands as the new remainder and the old one is not wanted.
2831
POP AF F1
Pop Register AF a second time, the word 2818H put down, thrown away for the same reason, this being the cheapest pair of instructions that takes two words off the stack.
2832
SCF 37
Set the Carry Flag, which is the bit of the quotient this place has just worked out, the subtraction having gone through.
2833
JP NC,0E1C1H D2 C1 E1
Jump to 0E1C1H on NC, which can never be taken, the instruction above having set the Carry Flag: the two bytes of its address are the POP BC at 2834H and the POP HL at 2835H that 282BH jumps to, so that the restoring path is carried inside an instruction that is never used as one.
2836
LD A,C 79
The quotient looked at (2836H): load Register A from Register C, the top byte of the quotient so far.
2837
INC A 3C
Increment Register A, the first of two instructions that set the Sign Flag and the Zero Flag from that byte while leaving the Carry Flag alone, neither INC nor DEC touching it.
2838
DEC A 3D
Decrement Register A, which gives the byte back as it was with the Sign Flag now holding its bit 7 and the quotient bit still standing in the Carry Flag.
2839
RRA 1F
Rotate Register A right through the Carry Flag, which puts that quotient bit into bit 7 of Register A and leaves the Sign Flag as the instruction above set it, a rotate changing no sign.
283A
Jump to 2855H on P, bit 7 of the quotient's top byte being clear and the twenty four bits not yet full, where the quotient and the remainder are shifted up a place and another bit is worked out.
283D
RLA 17
Rotate Register A left through the Carry Flag, which puts the newest quotient bit back into the Carry Flag, the quotient being full and that bit being the one the rounding turns on.
283E
LD A,(2827H) 3A 27 28
Load Register A with the byte at 2827H, the fourth and highest byte of the remainder, a load changing no flag so that the quotient bit stays in the Carry Flag.
2841
RRA 1F
Rotate Register A right through the Carry Flag, which brings the quotient bit into bit 7 of Register A and the top bit of the remainder's fourth byte into bit 6 of it.
2842
AND 0C0H E6 C0
And Register A with 0C0H, which keeps those two bits and throws the rest away: bit 7 is the half and bit 6 is what stands just below it.
2844
PUSH AF F5
Push Register AF, Register A holding those two bits, which 284CH takes back into Register Pair HL so that Register H holds them and Register L the flags.
2845
LD A,B 78
Load Register A from Register B, the top byte of the remainder's twenty four bits.
2846
OR H B4
Or Register A with Register H, its middle byte, which sets the Zero Flag only when both are nothing.
2847
OR L B5
Or Register A with Register L, its low byte, so that the Zero Flag stands for the whole of the remainder below its fourth byte.
2848
Jump to 284CH on Z, nothing being left of the remainder, so that the division came out exact and no bit is set to say otherwise.
284A
LD A,20H 3E 20
Load Register A with 20H, bit 5 on its own, which says that something is left of the remainder and is the bit that makes a value just below a half round as a half does not.
284C
POP HL E1
Pop Register Pair HL, the word 2844H put down, which brings the two kept bits into Register H and the flags of that moment into Register L, where nothing reads them.
284D
OR H B4
Or Register A with Register H, those two bits, which gives the round byte entire: bit 7 the half, bit 6 the bit below it and bit 5 the rest of the remainder.
284E
Jump to 26B3H, the round and the pack of the addition, which carries the mantissa up by one when bit 7 of that byte is set and puts the sign of the quotient back into the top byte from 72F0H.
2851-2854
DEFB 00H, 00H, 00H, 00H 00 00 00 00
Four bytes nothing reaches (2851H to 2854H), which stand between the jump at 284EH and the shift below it and decode as four NOPs. No instruction of this file or of the two modules of BASIC/CMD branches to any of the four, no word of the three images holds one of their addresses and no relative jump reaches them: they are padding and no more.
2855
RLA 17
The quotient and the remainder shifted up (2855H), which 283AH reaches: rotate Register A left through the Carry Flag, which brings the newest quotient bit out of bit 7 of Register A and back into the Carry Flag.
2856
RL E CB 13
Rotate the byte in Register E left through the Carry Flag, the low byte of the quotient, which takes that bit in at the bottom where every quotient bit enters.
2858
RL D CB 12
Rotate the byte in Register D left through the Carry Flag, the middle byte of the quotient.
285A
RL C CB 11
Rotate the byte in Register C left through the Carry Flag, the top byte of the quotient, which finishes carrying the new bit up through all twenty four of them.
285C
ADD HL,HL 29
Add Register Pair HL to itself, which doubles the low sixteen bits of the remainder and sends their top bit out into the Carry Flag.
285D
RL B CB 10
Rotate the byte in Register B left through the Carry Flag, the top byte of the remainder's twenty four bits, which takes that bit in.
285F
LD A,(2827H) 3A 27 28
Load Register A with the byte at 2827H, the fourth and highest byte of the remainder.
2862
RLA 17
Rotate Register A left through the Carry Flag, which doubles that byte and takes in what came out of the twenty four bits below it.
2863
LD (2827H),A 32 27 28
Store Register A into the byte at 2827H, the fourth byte of the remainder doubled, so that the whole of the remainder has come up one place and the divisor can be tried against it again.
2866
LD A,C 79
Load Register A from Register C, the top byte of the quotient.
2867
OR D B2
Or Register A with Register D, its middle byte.
2868
OR E B3
Or Register A with Register E, its low byte, which sets the Zero Flag only when not one bit of the quotient has come up yet.
2869
Jump to 2818H on NZ, the quotient having something in it, so that the places are counted by the quotient filling up and no counter is needed at all.
286B
PUSH HL E5
Push Register Pair HL, the low sixteen bits of the remainder, across the two instructions below which want Register Pair HL for the exponent.
286C
LD HL,72EFH 21 EF 72
Load Register Pair HL with 72EFH, the exponent of the quotient, which comes down by one for every place shifted while the quotient still stands at nothing.
286F
DEC (HL) 35
Decrement the byte Register Pair HL addresses, 72EFH, that exponent, the divisor having been the larger of the two mantissas so far.
2870
POP HL E1
Pop Register Pair HL, the low sixteen bits of the remainder 286BH put down.
2871
Jump to 2818H on NZ, the exponent not having reached 00H, to try the divisor against the remainder again.
2873
Jump to 2684H, the accumulator set to nothing, the exponent having come down to 00H before any bit of the quotient appeared: the quotient has underflowed and is given as nothing without a word to the user.
2876
LD A,0FFH 3E FF
The exponent of a double precision quotient (2876H), which 2E9AH of the double precision division is the only instruction to call: load Register A with 0FFH, the mask that makes the exponent below a difference instead of a sum.
2878
LD L,0AFH 2E AF
Load Register L with 0AFH, which is of no account in itself, Register Pair HL being loaded again two instructions below: the instruction stands here to carry the XOR A at 2879H in its operand byte, which is the trick the CP 2FH at 28CCH plays for 28CDH.
287A
LD HL,72FBH 21 FB 72
The exponent of either (287AH), which both doors reach: load Register Pair HL with 72FBH, the top byte of the second accumulator's mantissa, which carries the sign of the right hand operand of a double precision operator.
287D
LD C,(HL) 4E
Load Register C with the byte Register Pair HL addresses, 72FBH, that top byte, which 2953H reads the sign out of once 2883H calls it.
287E
INC HL 23
Increment Register Pair HL to 72FCH, the exponent of the second accumulator.
287F
XOR (HL) AE
Exclusive Or Register A with the byte Register Pair HL addresses, 72FCH, that exponent: the mask leaves it alone for a product and complements it for a quotient, so that the addition at 288CH subtracts it.
2880
LD B,A 47
Load Register B from Register A, that exponent masked, which is where 2883H reads the right hand operand's exponent from.
2881
LD L,00H 2E 00
Load Register L with 00H, the byte 2887H reads to tell a product from a quotient: a double precision operator always says a product here, the complement having been applied to the other exponent instead, and the two doors differ in that one byte and nothing else.

2883H - The Exponent of a Product or a Quotient, the Overflow Exits and Ten Times (2883H-28C3H)

The multiplication and the division of two single precision values differ in two instructions and share everything else, and this is where the sharing is done. Both of them work the exponent of the answer out here, and both of them hand the routine a single byte in Register L that says which they are: 00H from 2791H for a product and 0FFH from 27F5H for a quotient, which the Exclusive Or at 288BH turns into the accumulator's exponent as it stands or the one's complement of it, so that one addition gives the sum of the exponents for a product and their difference less one for a quotient. The test at 288EH and 288FH is the standard one for an overflow out of a signed addition, the Exclusive Or of the carry into the top bit with the carry out of it, and the two answers go to 28A5H, which drops the caller's return address and either sets the accumulator to nothing or gives Overflow. 2953H does the other half of the work: it puts the implied leading one back into both mantissas, takes the signs out of them and leaves the sign of the answer in 72F0H, the byte standing above the accumulator which no instruction of module 1 ever touches. 28ADH is ten times the accumulator, and it is four instructions: the accumulator into the operand registers, two added to the operand's exponent, which is four times, the two added together, which is five times, and one added to the answer's exponent, which is ten.

2883
LD A,B 78
The exponent of a product or a quotient (2883H), which the multiplication calls at 2791H with Register L holding 00H and the division at 27F5H with Register L holding 0FFH: load Register A from Register B, the exponent of the value in the operand registers.
2884
OR A B7
Set the flags from Register A with OR A, which gives Z when that exponent is 00H and so the operand is nothing.
2885
Jump to 28A6H on Z, the operand being nothing, which drops the caller's return address and makes the answer nothing for a product and gives Division by zero for a quotient.
2887
LD A,L 7D
Load Register A from Register L, 00H for a product and 0FFH for a quotient, which is the mask the Exclusive Or below applies to the accumulator's exponent.
2888
LD HL,72EFH 21 EF 72
Load Register Pair HL with 72EFH, the exponent byte of the accumulator, which this routine reads and writes and which 289EH leaves Register Pair HL on.
288B
XOR (HL) AE
Exclusive Or Register A with the byte Register Pair HL addresses, the accumulator's exponent: the mask leaves it alone for a product and complements it for a quotient, so that the addition below subtracts.
288C
ADD A,B 80
Add Register B to Register A, the operand's exponent, which gives the sum of the two exponents for a product and their difference less one for a quotient, both still carrying the excess of 128 twice over or not at all.
288D
LD B,A 47
Load Register B from Register A, that sum, which the test below needs a second copy of.
288E
RRA 1F
Rotate Register A left through the Carry Flag, which brings the carry out of the addition into bit 0 and the top bit of the sum into the Carry Flag.
288F
XOR B A8
Exclusive Or Register A with Register B, the sum itself, which leaves bit 7 set when the carry into the top bit and the carry out of it differ, and that is the test for an overflow out of a signed addition.
2890
LD A,B 78
Load Register A from Register B, the sum again, a load changing no flag so that the Sign Flag of the test above stands for the jump below.
2891
Jump to 28A5H on P, the carries having agreed, so that no overflow and no underflow happened and the exponent below is right.
2894
ADD A,80H C6 80
Add 80H to Register A, which puts the excess of 128 back into the sum for a product and takes it out of the difference for a quotient, leaving the exponent of the answer.
2896
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, 72EFH, the exponent of the answer, which is 00H when the answer is nothing.
2897
Jump to 27DBH on Z, the exponent being 00H: that address is a POP HL and a RET, so the caller's return address is dropped and the multiplication or the division returns to its own caller with the accumulator holding nothing.
289A
Call 2953H, which puts the implied leading one back into the accumulator's mantissa and into Register C, takes the signs out of both and leaves bit 7 of Register A set when the two signs are alike, with Register Pair HL on 72F0H.
289D
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, 72F0H, the byte above the accumulator, whose bit 7 now says whether the answer is positive, no instruction of module 1 naming that address.
289E
DEC HL 2B
Register Pair HL stepped back (289EH), which 32F2H and 3476H of the number package also call for its own sake: decrement Register Pair HL to 72EFH, the exponent of the answer, which is where the multiplication and the division want it.
289F
RET C9
Return to the multiplication at 2794H or the division at 27F8H with Register Pair HL on 72EFH and the sign of the answer in bit 7 of 72F0H.
28A0-28A4
DEFB 0CDH, 0C4H, 28H, 2FH, 0E1H CD C4 28 2F E1
Five bytes nothing reaches (28A0H to 28A4H), which decode as a call of the sign test at 28C4H, a CPL and a POP HL. No instruction of this file or of the two modules of BASIC/CMD branches to any of the five, no word of the three images holds one of their addresses, and no relative jump reaches them: they are the overflow exit written once and left when 28A5H was written over the top of it.
28A5
OR A B7
The exits of the exponent test (28A5H), which 2891H reaches: set the flags from Register A with OR A, which puts the Sign Flag of the sum of the exponents into them, the Exclusive Or above having spoilt it.
28A6
POP HL E1
Pop Register Pair HL, the caller's return address, which throws the multiplication or the division away so that neither of the two jumps below comes back to it.
28A7
Jump to 2684H on P, the sum of the exponents having been positive and so too small once the excess is taken out: the accumulator is set to nothing and the answer is an underflow quietly given as zero.
28AA
JP 308EH C3 8E 30
Jump to 308EH, the Overflow of module 1, the sum having been negative and so too large, which prints the warning and carries on with the largest value there is.
28AD
Ten times the accumulator (28ADH), which 3052H of the number package calls and 2FEFH of the exponent reader: call 2932H, which loads the accumulator's four bytes into Register E, Register D, Register C and Register B.
28B0
LD A,B 78
Load Register A from Register B, the exponent of that copy, which is to be raised by two so that the copy is four times the accumulator.
28B1
OR A B7
Set the flags from Register A with OR A, which gives Z when the accumulator is nothing.
28B2
RET Z C8
Return with Z, the accumulator being nothing, which ten times over is still nothing.
28B3
ADD A,02H C6 02
Add 02H to Register A, two powers of two, so that the value in the operand registers becomes four times the accumulator.
28B5
JP C,30A5H DA A5 30
Jump to 30A5H on Carry, the exponent having run past 0FFH, which is the Overflow of module 1 entered with the accumulator left as it was.
28B8
LD B,A 47
Load Register B from Register A, the raised exponent, so that the operand registers hold four times the accumulator.
28B9
Call 2622H, the single precision addition, which adds the accumulator to four times itself and leaves five times it in the accumulator.
28BC
LD HL,72EFH 21 EF 72
Load Register Pair HL with 72EFH, the exponent of the answer, which one more power of two makes ten times the accumulator.
28BF
INC (HL) 34
Increment the byte Register Pair HL addresses, 72EFH, which doubles the answer and so makes it ten times what the accumulator held.
28C0
RET NZ C0
Return with NZ, the exponent not having wrapped to 00H, with ten times the value in the accumulator.
28C1
JP 30A5H C3 A5 30
Jump to 30A5H, the Overflow of module 1, the exponent having wrapped from 0FFH to 00H on that increment.

28C4H - The Sign of a Value, a Byte Made a Number, ABS, SGN and the Negate (28C4H-2904H)

Four of the tiniest routines in the file and three of them have more than one entry, which is why eighteen places call into these sixty-five bytes. 28C4H answers the sign of the accumulator as 0FFH, 00H or 01H in Register A with the flags to match, and it does it in three steps that each have a caller of their own: 28C4H for the whole test, 28CEH when the caller already has the byte whose bit 7 is the sign, and 28CFH when the caller already has that sign in the Carry Flag. The CP 2FH at 28CCH does nothing whatever to the answer, the RLA below it replacing the Carry Flag and the SBC A,A replacing every other flag, and that is the point of it: its operand byte is a CPL, and 28CDH is the address the two comparisons at 2987H and 29CCH push as their own return so that the answer comes back the other way about. 28D3H and 28D8H make a single precision value out of a byte, 28E6H is ABS, 28EAH and 28F3H are the negate, 28FBH is SGN and 28FEH turns a byte into an integer.

28C4
LD A,(72EFH) 3A EF 72
The sign of the accumulator (28C4H), which 336FH, 33EEH, 36EDH, 3938H, 39A2H, 5E04H, 657EH and 7FB5H of BASIC/CMD call and ten places of this file: load Register A with the byte at 72EFH, the accumulator's exponent.
28C7
OR A B7
Set the flags from Register A with OR A, which gives Z when the exponent is 00H and so the accumulator holds nothing.
28C8
RET Z C8
Return with Z and Register A holding 00H, the accumulator being nothing, which is the answer for a sign of nothing.
28C9
LD A,(72EEH) 3A EE 72
Load Register A with the byte at 72EEH, the top byte of the accumulator's mantissa, whose bit 7 is the sign of the value.
28CC
CP 2FH FE 2F
Compare Register A with 2FH, which changes no flag the three instructions below leave standing and so has no part in the answer: its operand byte is the CPL that 28CDH runs, and 2987H and 29CCH push 28CDH as a return address to turn the answer round.
28CE
RLA 17
The sign of a byte in Register A (28CEH), which 2915H and 29B2H reach with the byte in hand: rotate Register A left through the Carry Flag, which brings bit 7, the sign, into the Carry Flag.
28CF
SBC A,A 9F
The sign in the Carry Flag (28CFH), which 4611H of BASIC/CMD calls and 29BBH jumps to: subtract Register A from itself with the Carry Flag, which leaves Register A holding 00H when that flag was clear and 0FFH when it was set.
28D0
RET NZ C0
Return with NZ and Register A holding 0FFH, the sign having been set, which is the answer for a negative value.
28D1
INC A 3C
Increment Register A from 00H to 01H, the answer for a positive value, the subtraction above having given 00H.
28D2
RET C9
Return with NZ and Register A holding 01H, the value being positive.
28D3
LD B,88H 06 88
A byte made a single precision value (28D3H), which 3065H and 3073H of the number package call and 2783H of the multiplication: load Register B with 88H, the exponent for a value of eight bits, which is 128 and eight.
28D5
LD DE,0000H 11 00 00
Load Register Pair DE with 0000H, the two low bytes of the mantissa, a byte having none of its own.
28D8
LD HL,72EFH 21 EF 72
The same with the exponent given (28D8H), which 2A93H and 2C6DH reach with Register B already set: load Register Pair HL with 72EFH, the accumulator's exponent, which the two stores below fill.
28DB
LD C,A 4F
Load Register C from Register A, the byte that is to become the value, which is the top byte of the mantissa.
28DC
LD (HL),B 70
Store Register B into the byte Register Pair HL addresses, 72EFH, the exponent of the value being built.
28DD
LD B,00H 06 00
Load Register B with 00H, which the rounding at 266EH reads as no bits shifted out and so nothing to round.
28DF
INC HL 23
Increment Register Pair HL to 72F0H, the byte above the accumulator, which holds the sign of the answer.
28E0
LD (HL),80H 36 80
Store 80H into the byte Register Pair HL addresses, 72F0H, whose bit 7 set says that the value being built is positive.
28E2
RLA 17
Rotate Register A left through the Carry Flag, which brings bit 7 of the byte into the Carry Flag so that the rounding below can see whether the top bit is already in place.
28E3
Jump to 266EH, which carries the mantissa down until its top bit stands where the format wants it and rounds what falls off, leaving the value in the accumulator.
28E6
ABS (28E6H), which the function table holds at 6867H: call 2905H, which answers the sign of the accumulator for any numeric type, 0FFH, 00H or 01H in Register A with the flags to match.
28E9
RET P F0
Return with P, the value being nothing or positive, which is its own absolute value and wants no change.
28EA
CALL 76A4H CD A4 76
The negate (28EAH), which 315DH and 7582H of BASIC/CMD call, the latter for unary minus, and which 2AF2H and 2FA8H of this file reach: call 76A4H, which loads the type from 7142H, takes three off it and comes back with the Sign Flag set for an integer and the Zero Flag set for a string.
28ED
Jump to 2C5BH on M, the value being an integer, which negates the two bytes at 72ECH instead of turning a sign bit over.
28F0
JP Z,5884H CA 84 58
Jump to 5884H on Z, the value being a string, which gives error 13, Type mismatch.
28F3
LD HL,72EEH 21 EE 72
The sign bit turned over (28F3H), which 3782H, 393BH, 3947H and 39A8H of the number package call and 261FH, 2AECH and 2C0CH of this file: load Register Pair HL with 72EEH, the top byte of the accumulator's mantissa.
28F6
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, that top byte, whose bit 7 is the sign of the value.
28F7
XOR 80H EE 80
Exclusive Or Register A with 80H, which turns bit 7 over and leaves the mantissa alone, so that a positive value becomes negative and a negative one positive.
28F9
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, 72EEH, the mantissa with its sign the other way about.
28FA
RET C9
Return to the caller with the value in the accumulator negated and every other byte of it as it was, a value of nothing coming back as nothing because its exponent is not read.
28FB
SGN (28FBH), which the function table holds at 6863H: call 2905H, which answers the sign of the accumulator for any numeric type as 0FFH, 00H or 01H in Register A.
28FE
LD L,A 6F
A byte made an integer (28FEH), which 4F4FH and 768AH of BASIC/CMD call: load Register L from Register A, the byte, which is the low half of the integer being built.
28FF
RLA 17
Rotate Register A left through the Carry Flag, which brings bit 7 of the byte into the Carry Flag as its sign.
2900
SBC A,A 9F
Subtract Register A from itself with the Carry Flag, which leaves 00H for a positive byte and 0FFH for a negative one, the sign extended across a whole byte.
2901
LD H,A 67
Load Register H from Register A, that extension, so that Register Pair HL holds the byte as a signed sixteen bit value.
2902
Jump to 2A53H, which stores Register Pair HL into the accumulator at 72ECH and writes 02H into the type at 7142H, so that the answer is an integer.
2905
CALL 76A4H CD A4 76
The sign of any numeric type (2905H), which 3152H, 5312H and 61E0H of BASIC/CMD call and 28E6H and 28FBH reach: call 76A4H, which loads the type from 7142H, takes three off it and comes back with the Sign Flag set for an integer and the Zero Flag set for a string.
2908
JP Z,5884H CA 84 58
Jump to 5884H on Z, the value being a string, which gives error 13, Type mismatch: neither ABS nor SGN takes one.
290B
Jump to 28C4H on P, the value being single or double precision, whose sign is the bit 7 of 72EEH that routine reads.
290E
LD HL,(72ECH) 2A EC 72
Load Register Pair HL with the word at 72ECH, the value itself, an integer being kept in those two bytes and nowhere else.
2911
LD A,H 7C
The sign of the integer in Register Pair HL (2911H), which 5DE0H of BASIC/CMD calls: load Register A from Register H, the high half of the integer.
2912
OR L B5
Or Register A with Register L, the low half, which gives Z only when both halves are 00H and so the integer is nothing.
2913
RET Z C8
Return with Z and Register A holding 00H, the integer being nothing.
2914
LD A,H 7C
Load Register A from Register H, the high half again, whose bit 7 is the sign of the integer, the Or above having spoilt it.
2915
Jump to 28CEH, which brings that bit into the Carry Flag and answers 0FFH for a negative integer and 01H for a positive one.

2917H - The Accumulator Pushed, Stored, Loaded and Copied (2917H-2952H)

Sixty bytes, and more instructions of BASIC/CMD call into them than into any other part of this file. The accumulator is 72E8H to 72EFH with a guard byte at each end, and a single precision value is its top four bytes, 72ECH and 72EDH the low two bytes of the mantissa, 72EEH the top byte with the sign in bit 7, and 72EFH the exponent in excess of 128; the four bytes live in Register E, Register D, Register C and Register B in that order whenever they are out of memory, which is the convention every routine of this file is written against. 2917H puts those four bytes on the stack underneath the caller's own return address, which it manages with two EX (SP),HL and two PUSH and which leaves both Register Pair HL and Register Pair DE exactly as the caller had them, so that the caller gets them back with a POP BC and a POP DE and finds them in the registers the convention wants. 2924H and 2927H put a value into the accumulator, 2932H and 2935H take one out, and 2946H and 294AH are the byte by byte copy that moves four bytes for a single precision value and eight for a double. 293CH and 2945H are two bytes each and both are routines in their own right: 293CH is an INC HL and a RET that five instructions of BASIC/CMD call for that alone, and 2945H is an EX DE,HL that 2968H pushes as a return address so that 2946H is entered with the pairs the other way about.

2917
EX DE,HL EB
The accumulator pushed under the return address (2917H), which fifteen instructions of BASIC/CMD call, among them 3070H, 31CDH, 36D4H, 73EAH, 749FH and 74B8H, and seven of this file: exchange Register Pair DE with Register Pair HL, which puts the caller's Register Pair HL into Register Pair DE, the one of the two pairs this routine gives back.
2918
LD HL,(72ECH) 2A EC 72
Load Register Pair HL with the word at 72ECH, the low two bytes of the accumulator's mantissa.
291B
EX (SP),HL E3
Exchange Register Pair HL with the word the Stack Pointer addresses, which leaves that low word on the stack and brings the caller's return address into Register Pair HL.
291C
PUSH HL E5
Push Register Pair HL, the return address, back on to the stack above the low word.
291D
LD HL,(72EEH) 2A EE 72
Load Register Pair HL with the word at 72EEH, the top byte of the mantissa and the exponent.
2920
EX (SP),HL E3
Exchange Register Pair HL with the word the Stack Pointer addresses, which leaves that word on the stack above the low word and brings the return address back into Register Pair HL.
2921
PUSH HL E5
Push Register Pair HL, the return address, on to the stack a second time, so that the stack now holds the low word, the high word and the return in that order.
2922
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which gives the caller its own Register Pair HL back and leaves Register Pair DE holding this routine's return address: the caller's Register Pair DE was lost at 2918H and only Register Pair HL comes back, which is why 2631H of the addition and 276CH of the logarithm both keep a word they want in Register Pair HL across this call.
2923
RET C9
Return to the caller with the accumulator's four bytes on the stack below the return address, which a POP BC then a POP DE brings back as Register B the exponent, Register C the top byte, Register D the middle and Register E the low, Register Pair HL standing as the caller left it and Register Pair DE holding the address this instruction returns to.
2924
A single precision value at Register Pair HL put into the accumulator (2924H), which 358FH, 36DAH, 3807H, 385BH, 455DH and 456BH of BASIC/CMD call and 27E8H of this file: call 2935H, which loads the four bytes the address in Register Pair HL stands on into Register E, Register D, Register C and Register B.
2927
EX DE,HL EB
The operand registers put into the accumulator (2927H), which eight instructions of BASIC/CMD call, among them 3265H, 359CH, 35C7H and 746AH, and four of this file: exchange Register Pair DE with Register Pair HL, which puts the low two bytes into Register Pair HL to be stored and the caller's own Register Pair HL out of the way.
2928
LD (72ECH),HL 22 EC 72
Store Register Pair HL into the word at 72ECH, the low two bytes of the accumulator's mantissa.
292B
LD H,B 60
Load Register H from Register B, the exponent, so that it stands in the high half of the pair.
292C
LD L,C 69
Load Register L from Register C, the top byte of the mantissa, so that Register Pair HL is the word to be stored.
292D
LD (72EEH),HL 22 EE 72
Store Register Pair HL into the word at 72EEH, which puts the top byte of the mantissa and the exponent in place and finishes the accumulator.
2930
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which gives the caller its own Register Pair HL back and leaves Register Pair DE holding what Register Pair BC held.
2931
RET C9
Return to the caller with the value in the accumulator, Register Pair HL as it was given and Register Pair BC untouched.
2932
LD HL,72ECH 21 EC 72
The accumulator taken out into the operand registers (2932H), which eight instructions of BASIC/CMD call, among them 35ADH, 3704H, 5DE8H and 74A5H, and five of this file: load Register Pair HL with 72ECH, the first of the accumulator's four bytes.
2935
LD E,(HL) 5E
Four bytes at Register Pair HL taken into the operand registers (2935H), which 386CH, 457AH and 45BAH of BASIC/CMD call and 2617H and 2924H of this file: load Register E with the byte Register Pair HL addresses, the low byte of the mantissa.
2936
INC HL 23
Increment Register Pair HL to the middle byte of the mantissa.
2937
LD D,(HL) 56
The same from the middle byte (2937H), which 46ABH of BASIC/CMD calls with Register E already in hand: load Register D with the byte Register Pair HL addresses, the middle byte of the mantissa.
2938
INC HL 23
Increment Register Pair HL to the top byte of the mantissa.
2939
LD C,(HL) 4E
Load Register C with the byte Register Pair HL addresses, the top byte of the mantissa with the sign in its bit 7.
293A
INC HL 23
Increment Register Pair HL to the fourth and last of the four bytes, which is the exponent.
293B
LD B,(HL) 46
Load Register B with the byte Register Pair HL addresses, the exponent in excess of 128, which 00H makes the whole value nothing.
293C
INC HL 23
Register Pair HL stepped on (293CH), which 3299H, 32A7H, 347CH, 59BBH and 7BBAH of BASIC/CMD call for this one instruction and nothing else: increment Register Pair HL, which for the loader above leaves it one byte past the four it read.
293D
RET C9
Return to the caller with the four bytes in Register E, Register D, Register C and Register B and Register Pair HL one past them.
293E
LD DE,72ECH 11 EC 72
The accumulator copied to Register Pair HL (293EH), which 4576H and 5D7AH of BASIC/CMD call: load Register Pair DE with 72ECH, the first of the accumulator's four bytes, which is where the copy is read from.
2941
LD B,04H 06 04
Four bytes copied from Register Pair DE to Register Pair HL (2941H), which 30F9H and 3107H of the number package call: load Register B with 04H, the count of bytes, which is a single precision value whatever the type at 7142H says.
2943
Jump to 294AH, the copying loop, past the instructions that would read the count out of the type.
2945
DEFB 0EBH EB
An EX DE,HL in its own right (2945H), which 2968H and 296BH load into Register Pair DE and 2976H pushes as a return address: the two pairs are exchanged and the copy below is then entered, so that 296BH loads the accumulator from the area Register Pair HL addresses where 2970H stores it there. Nothing branches to 2945H, the address only ever reaching the stack.
2946
LD A,(7142H) 3A 42 71
As many bytes as the type wants copied from Register Pair DE to Register Pair HL (2946H), which 34ACH, 43FEH, 4428H, 442FH, 468FH, 49F2H and 60ECH of BASIC/CMD call and four places of this file: load Register A with the byte at 7142H, the type of the value in the accumulator, which is 04H for single precision and 08H for double.
2949
LD B,A 47
Load Register B from Register A, that type, which is the count of bytes to copy because the type of a number is the number of bytes it occupies.
294A
LD A,(DE) 1A
The copying loop (294AH), which 563BH and 5EF6H of BASIC/CMD call with Register B already set: load Register A with the byte Register Pair DE addresses, one byte of the value being copied.
294B
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, which puts that byte in its place.
294C
INC DE 13
Increment Register Pair DE to the next byte to be read.
294D
INC HL 23
Increment Register Pair HL to the next byte to be written.
294E
DEC B 05
Decrement Register B, one byte fewer left to copy.
294F
Jump back to 294AH while Register B is not 00H, which copies the whole of the value a byte at a time from the bottom up.
2952
RET C9
Return to the caller with the value copied, Register Pair DE and Register Pair HL both standing one byte past it and Register B holding 00H.

2953H - The Two Mantissas Unpacked and the Second Accumulator Loaded (2953H-2981H)

Two small routines that every multiplication and division of the file leans on. 2953H does to both operands what has to be done before their mantissas can be multiplied: it puts the implied leading one back into bit 7 of each, which the format leaves out because it is always there, takes the sign out of each to make room for it, and leaves the sign of the answer in bit 7 of Register A and in 72F0H, the byte standing above the accumulator which no instruction of module 1 or module 2 ever names. Bit 7 comes out set when the two signs are alike, which for a product or a quotient is a positive answer and for an addition means the two are to be added rather than subtracted. 2976H and its four entries fill or empty the second accumulator at 72F5H, and the trick they turn is that the direction is decided by the return address they push: 2945H, which is an EX DE,HL in front of the copy, loads the accumulator from the caller's area, and 2946H, which is the copy alone, stores it there. The type at 7142H decides whether four bytes are moved from 72ECH or eight from 72E8H, and 76A4H is what tells the two apart.

2953
LD HL,72EEH 21 EE 72
The two mantissas unpacked (2953H), which 263FH of the addition, 289AH of the exponent, 2A7DH, 2AC1H, 2B45H and 2CB6H all call: load Register Pair HL with 72EEH, the top byte of the accumulator's mantissa, which carries the sign in its bit 7.
2956
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, that top byte, the sign and the seven highest bits of the mantissa.
2957
RLCA 07
Rotate Register A left in a circle, which brings the sign out of bit 7 into bit 0 and into the Carry Flag and the seven mantissa bits up one place.
2958
SCF 37
Set the Carry Flag, which is the implied leading one of the mantissa about to be rotated into bit 7.
2959
RRA 1F
Rotate Register A right through the Carry Flag, which puts the seven bits back where they were with that leading one above them and brings the sign out into the Carry Flag again.
295A
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, 72EEH, so that the accumulator's mantissa now carries its leading one and no sign.
295B
CCF 3F
Complement the Carry Flag, which turns the accumulator's sign the other way about, so that the Exclusive Or at 2966H gives bit 7 set when the two signs are alike.
295C
RRA 1F
Rotate Register A right through the Carry Flag, which brings that complemented sign into bit 7 of Register A.
295D
INC HL 23
Increment Register Pair HL to 72EFH, the accumulator's exponent, the first of the two steps to the byte above it.
295E
INC HL 23
Increment Register Pair HL a second time, to 72F0H, the byte standing above the accumulator which only this file ever reads or writes.
295F
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, 72F0H, whose bit 7 now holds the complement of the accumulator's sign.
2960
LD A,C 79
Load Register A from Register C, the top byte of the operand's mantissa, which carries the operand's sign in its bit 7.
2961
RLCA 07
Rotate Register A left in a circle, which brings that sign into bit 0 and the Carry Flag and the seven mantissa bits up one place.
2962
SCF 37
Set the Carry Flag, the implied leading one of the operand's mantissa.
2963
RRA 1F
Rotate Register A right through the Carry Flag, which puts the leading one in bit 7 above the seven bits and brings the operand's sign into the Carry Flag.
2964
LD C,A 4F
Load Register C from Register A, so that the operand's mantissa in Register C now carries its leading one and no sign, which is what the multiplication wants.
2965
RRA 1F
Rotate Register A right through the Carry Flag, which brings the operand's sign into bit 7 of Register A, the mantissa bits below it being of no further use.
2966
XOR (HL) AE
Exclusive Or Register A with the byte Register Pair HL addresses, 72F0H, the complement of the accumulator's sign, which leaves bit 7 set when the two signs are alike.
2967
RET C9
Return to the caller with Register Pair HL on 72F0H, bit 7 of Register A saying whether the two signs are alike, and both mantissas carrying their leading one with no sign in the way.
2968
LD HL,72F5H 21 F5 72
The accumulator loaded from the second accumulator (2968H), which 2C96H of the double precision addition calls: load Register Pair HL with 72F5H, the first byte of the second accumulator, which is where the value comes from.
296B
LD DE,2945H 11 45 29
The accumulator loaded from Register Pair HL (296BH), which 3447H, 4AFAH, 536AH, 5F46H, 7592H and 780AH of BASIC/CMD call and 260DH and 2A07H of this file: load Register Pair DE with 2945H, the EX DE,HL that stands in front of the copy, which is what makes this entry load rather than store.
296E
Jump to 2976H, the part the four entries share, past the instructions that set the other direction.
2970
LD HL,72F5H 21 F5 72
The accumulator stored into the second accumulator (2970H), which 3061H, 745DH and 7483H of BASIC/CMD call and 2607H, 2A01H and 2EF7H of this file: load Register Pair HL with 72F5H, the first byte of the second accumulator, which is where the value goes.
2973
LD DE,2946H 11 46 29
The accumulator stored at Register Pair HL (2973H), which 3420H, 4ADAH and 77DEH of BASIC/CMD call: load Register Pair DE with 2946H, the copy with no exchange in front of it, which is what makes this entry store rather than load.
2976
PUSH DE D5
The part the four entries share (2976H): push Register Pair DE, 2945H or 2946H, which the return below enters and which is the whole of how the direction is chosen.
2977
LD DE,72ECH 11 EC 72
Load Register Pair DE with 72ECH, the first byte of the accumulator's single precision part, which is right for every type but a double precision one.
297A
CALL 76A4H CD A4 76
Call 76A4H, which loads the type from 7142H and comes back with the Carry Flag set for every type below 08H and clear for a double precision value alone.
297D
RET C D8
Return with Carry to the copy, the value being an integer or a single precision one, with Register Pair DE on 72ECH so that the type's own four bytes are the ones moved.
297E
LD DE,72E8H 11 E8 72
Load Register Pair DE with 72E8H, the first byte of the whole accumulator, the value being double precision and so eight bytes long.
2981
RET C9
Return to the copy with Register Pair DE on 72E8H, so that all eight bytes of the accumulator are the ones moved.

2982H - The Three Comparisons (2982H-29F3H)

One for each kind of number, and all three answer the same three values in Register A: 01H when the accumulator holds the greater, 0FFH when the value it is weighed against does, and 00H when the two are equal, with the Sign Flag and the Zero Flag to match. 2982H is the single precision one and takes its other value in the operand registers; 29AFH is the integer one and takes both values in registers; 29C4H is the double precision one and takes its other value in the second accumulator. The three of them turn their answer round by returning through 28CDH, which they push on the stack before they begin, and the equal case is the one that does not: it pops that address off again and comes back with 00H. 29EDH, which is the fifth word of the double precision operator table at 6B65H, turns 29C4H's answer round once more, and it has to: for a single precision operator 7497H leaves the left hand operand in the registers and the right in the accumulator, while for a double precision one 745DH leaves the right in the second accumulator and the left in the accumulator, so the two tables would answer opposite ways about without it.

2982
LD A,B 78
The single precision comparison (2982H), the fifth word of the single precision operator table at 6B6FH, which 304CH, 3367H, 34C7H, 34F4H, 3710H, 3723H, 3771H, 3920H and 457EH of BASIC/CMD also call: load Register A from Register B, the exponent of the value in the operand registers.
2983
OR A B7
Set the flags from Register A with OR A, which gives Z when that exponent is 00H and so the other value is nothing.
2984
Jump to 28C4H on Z, the other value being nothing, so that the sign of the accumulator is the whole of the answer and no turning round is wanted.
2987
LD HL,28CDH 21 CD 28
Load Register Pair HL with 28CDH, the CPL in the operand of the compare at 28CCH, which turns an answer round and returns it.
298A
PUSH HL E5
Push Register Pair HL, that address, so that every return below but the equal one comes back through it.
298B
Call 28C4H, which answers the sign of the accumulator as 0FFH, 00H or 01H in Register A with the flags to match.
298E
LD A,C 79
Load Register A from Register C, the top byte of the other value's mantissa, whose bit 7 is its sign, which is the answer when the accumulator is nothing.
298F
RET Z C8
Return with Z to 28CDH, the accumulator being nothing, which turns that sign round so that a positive other value makes the accumulator the smaller.
2990
LD HL,72EEH 21 EE 72
Load Register Pair HL with 72EEH, the top byte of the accumulator's mantissa, which carries its sign in bit 7.
2993
XOR (HL) AE
Exclusive Or Register A with the byte Register Pair HL addresses, which sets the Sign Flag when the two signs differ and clears it when they are alike.
2994
LD A,C 79
Load Register A from Register C, the other value's top byte again, a load changing no flag so that the Sign Flag of that test stands.
2995
RET M F8
Return with M to 28CDH, the two signs differing, so that the sign of the other value turned round is the answer and the magnitudes need not be looked at.
2996
Call 299CH, which compares the four bytes of the two values from the top down and comes back with the Carry Flag of the first pair that differ.
2999
RRA 1F
The magnitudes turned into an answer (2999H), which 29E3H of the double precision comparison also reaches: rotate Register A right through the Carry Flag, which brings that Carry Flag into bit 7 and so into the sign of the answer.
299A
XOR C A9
Exclusive Or Register A with Register C, whose bit 7 is the sign the two values share, which turns the answer round for two negative values.
299B
RET C9
Return to 28CDH, which turns the answer round once more and gives 01H when the accumulator holds the greater and 0FFH when the other value does.
299C
INC HL 23
The four bytes compared from the top down (299CH), which 2996H calls: increment Register Pair HL to 72EFH, the accumulator's exponent, which is the byte that decides first.
299D
LD A,B 78
Load Register A from Register B, the other value's exponent, which is the byte it is weighed against.
299E
CP (HL) BE
Compare Register A with the byte Register Pair HL addresses, 72EFH, which sets the Carry Flag when the accumulator's exponent is the larger.
299F
RET NZ C0
Return with NZ, the two exponents differing, so that the answer rests on them alone.
29A0
DEC HL 2B
Decrement Register Pair HL to 72EEH, the top byte of the accumulator's mantissa, the exponents having been equal.
29A1
LD A,C 79
Load Register A from Register C, the other value's top mantissa byte, whose sign bit the two share and so does not spoil the comparison.
29A2
CP (HL) BE
Compare Register A with the byte Register Pair HL addresses, which sets the Carry Flag when the accumulator's byte is the larger.
29A3
RET NZ C0
Return with NZ, the two top mantissa bytes differing, so that the answer rests on them and the two bytes below are not read.
29A4
DEC HL 2B
Decrement Register Pair HL to 72EDH, the middle byte of the accumulator's mantissa.
29A5
LD A,D 7A
Load Register A from Register D, the other value's middle byte.
29A6
CP (HL) BE
Compare Register A with the byte Register Pair HL addresses, which sets the Carry Flag when the accumulator's byte is the larger.
29A7
RET NZ C0
Return with NZ, the two middle bytes differing.
29A8
DEC HL 2B
Decrement Register Pair HL to 72ECH, the low byte of the accumulator's mantissa.
29A9
LD A,E 7B
Load Register A from Register E, the other value's low byte.
29AA
SUB (HL) 96
Subtract the byte Register Pair HL addresses from Register A, which leaves 00H when the two values are equal in every byte and sets the Carry Flag when the accumulator's byte is the larger.
29AB
RET NZ C0
Return with NZ, the two low bytes differing, which is the last chance of a difference.
29AC
POP HL E1
Pop Register Pair HL, the return into 2999H that 2996H left, the two values being equal in all four bytes.
29AD
POP HL E1
Pop Register Pair HL, the 28CDH that 298AH pushed, so that the answer is not turned round.
29AE
RET C9
Return to the caller of the comparison with Register A holding 00H and the Zero Flag set, which says the two values are equal.
29AF
LD A,D 7A
The integer comparison (29AFH), the fifth word of the integer operator table at 6B79H, which 45B4H of BASIC/CMD also calls with both values in registers: load Register A from Register D, the high half of the other value.
29B0
XOR H AC
Exclusive Or Register A with Register H, the high half of the accumulator's integer, which sets the Sign Flag when the two signs differ.
29B1
LD A,H 7C
Load Register A from Register H, the accumulator's high half, a load changing no flag so that the Sign Flag of that test stands.
29B2
Jump to 28CEH on M, the two signs differing, so that the sign of the accumulator's own high half is the whole of the answer.
29B5
CP D BA
Compare Register A with Register D, the other value's high half, which sets the Carry Flag when the accumulator's half is the smaller.
29B6
Jump to 29BBH on NZ, the two high halves differing, so that the answer rests on them.
29B8
LD A,L 7D
Load Register A from Register L, the low half of the accumulator's integer, the high halves having been equal.
29B9
SUB E 93
Subtract Register E from Register A, the other value's low half, which gives Z when the two integers are equal and sets the Carry Flag when the accumulator's is the smaller.
29BA
RET Z C8
Return with Z and Register A holding 00H, the two integers being equal.
29BB
Jump to 28CFH, which turns the Carry Flag into 0FFH when the accumulator holds the smaller and into 01H when it holds the greater.
29BE
LD HL,72F5H 21 F5 72
A value moved into the second accumulator and compared (29BEH), which 3350H, 34CFH and 34FCH of BASIC/CMD call with Register Pair DE on the value: load Register Pair HL with 72F5H, the first byte of the second accumulator.
29C1
Call 2946H, which copies as many bytes as the type at 7142H says from the area Register Pair DE addresses into the second accumulator.
29C4
LD DE,72FCH 11 FC 72
The double precision comparison (29C4H), which 29EDH calls: load Register Pair DE with 72FCH, the exponent of the second accumulator, which is the top of its eight bytes.
29C7
LD A,(DE) 1A
Load Register A with the byte Register Pair DE addresses, that exponent, which is 00H when the second accumulator holds nothing.
29C8
OR A B7
Set the flags from Register A with OR A, which gives Z for an exponent of 00H.
29C9
Jump to 28C4H on Z, the second accumulator being nothing, so that the sign of the accumulator is the whole of the answer.
29CC
LD HL,28CDH 21 CD 28
Load Register Pair HL with 28CDH, the CPL that turns an answer round and returns it.
29CF
PUSH HL E5
Push Register Pair HL, that address, so that every return below but the equal one comes back through it.
29D0
Call 28C4H, which answers the sign of the accumulator as 0FFH, 00H or 01H with the flags to match.
29D3
DEC DE 1B
Decrement Register Pair DE to 72FBH, the top byte of the second accumulator's mantissa, which carries its sign in bit 7.
29D4
LD A,(DE) 1A
Load Register A with the byte Register Pair DE addresses, that top byte.
29D5
LD C,A 4F
Load Register C from Register A, a second copy of it, which the answer at 2999H needs after the comparison below.
29D6
RET Z C8
Return with Z to 28CDH, the accumulator being nothing, which turns the second accumulator's sign round into the answer.
29D7
LD HL,72EEH 21 EE 72
Load Register Pair HL with 72EEH, the top byte of the accumulator's mantissa, which carries its sign.
29DA
XOR (HL) AE
Exclusive Or Register A with the byte Register Pair HL addresses, which sets the Sign Flag when the two signs differ.
29DB
LD A,C 79
Load Register A from Register C, the second accumulator's top byte again, a load changing no flag.
29DC
RET M F8
Return with M to 28CDH, the two signs differing, so that the sign turned round is the answer.
29DD
INC DE 13
Increment Register Pair DE back to 72FCH, the second accumulator's exponent, which is where the comparison starts.
29DE
INC HL 23
Increment Register Pair HL to 72EFH, the accumulator's exponent, the other end of the same comparison.
29DF
LD B,08H 06 08
Load Register B with 08H, eight bytes, which is the whole of a double precision value.
29E1
LD A,(DE) 1A
The eight bytes compared from the top down (29E1H): load Register A with the byte Register Pair DE addresses, one byte of the second accumulator.
29E2
SUB (HL) 96
Subtract the byte Register Pair HL addresses from Register A, the matching byte of the accumulator, which sets the Carry Flag when the accumulator's byte is the larger.
29E3
Jump to 2999H on NZ, the two bytes differing, which turns that Carry Flag into the answer.
29E5
DEC DE 1B
Decrement Register Pair DE to the next byte down of the second accumulator.
29E6
DEC HL 2B
Decrement Register Pair HL to the next byte down of the accumulator.
29E7
DEC B 05
Decrement Register B, one byte of the eight done.
29E8
Jump back to 29E1H while Register B is not 00H, which weighs all eight bytes when every pair agrees.
29EB
POP BC C1
Pop Register Pair BC, the 28CDH that 29CFH pushed, the two values being equal in all eight bytes, so that the answer is not turned round.
29EC
RET C9
Return to the caller with Register A holding 00H and the Zero Flag set, which says the two values are equal.
29ED
The double precision comparison for the evaluator (29EDH), the fifth word of the double precision operator table at 6B65H: call 29C4H, which answers 01H when the accumulator holds the greater.
29F0
Jump to 28CDH on NZ, which turns that answer round, because the accumulator holds the left hand operand of a double precision operator where it holds the right hand one of a single precision operator.
29F3
RET C9
Return with the Zero Flag set and Register A holding 00H, the two values being equal, which wants no turning round.

29F4H - CINT: a Number Made an Integer (29F4H-2A52H)

CINT rounds rather than truncates, and the whole of how it does it is that a half is added before the fraction is thrown away. A half of the right type: the double precision one at 3625H for a double precision value and the single precision one at 3629H for a single, both of them constants of module 1. An integer is already done and comes straight back; a string gives Type mismatch. Adding the half to the value signed and then taking the sign off is what makes the rounding come out right at both ends: for a negative value the magnitude of the sum is one less than the magnitude wanted, and the one's complement at 2A3AH is what puts that back, so that minus three and four tenths comes back as minus three and minus three and six tenths as minus four. The one case the straight reading gets wrong is minus one half, where the sum is exactly nothing and the sign byte says positive, and 2A31H is the three instructions that exist for it alone: an exponent of 00H after the truncation sends the answer through the complement whatever the sign said, so that minus a half rounds away from nothing to minus one as positive a half rounds to one. Anything from 32768 up gives error 6, Overflow.

29F4
CALL 76A4H CD A4 76
CINT (29F4H), the first word of the type conversion table at 6B57H, which 3876H, 5DD0H, 73F5H, 7694H, 76B6H and 7994H of BASIC/CMD call and 2FDEH of this file: call 76A4H, which loads the type from 7142H and comes back with the Sign Flag set for an integer, the Zero Flag set for a string and the Parity Flag odd for a single precision value.
29F7
LD HL,(72ECH) 2A EC 72
Load Register Pair HL with the word at 72ECH, the accumulator's low two bytes, which are the whole of an integer and which the return below hands back.
29FA
RET M F8
Return with M, the value being an integer already, with Register Pair HL holding it and nothing changed.
29FB
JP Z,5884H CA 84 58
Jump to 5884H on Z, the value being a string, which gives error 13, Type mismatch.
29FE
Jump to 2A12H on PO, the value being single precision, where the single precision half is added.
2A01
Call 2970H, the value being double precision, which copies the accumulator into the second accumulator at 72F5H where the addition wants its right hand operand.
2A04
LD HL,3625H 21 25 36
Load Register Pair HL with 3625H, the eight bytes of module 1's double precision one half, which is the constant the rounding adds.
2A07
Call 296BH, which loads those eight bytes into the accumulator, the value itself now standing in the second accumulator.
2A0A
Call 2C88H, the double precision addition, which adds the value to the half and leaves the sum in the accumulator.
2A0D
Call 2A74H, the part of CSNG below that narrows a double precision value to a single precision one, so that one path serves both types from here down.
2A10
Jump to 2A15H, past the single precision rounding, the sum already standing in the accumulator.
2A12
The single precision rounding (2A12H), which 29FEH reaches: call 2614H, which loads module 1's single precision one half at 3629H into the operand registers and adds it to the accumulator.
2A15
LD A,(72EEH) 3A EE 72
The sum weighed (2A15H), which 2A10H reaches: load Register A with the byte at 72EEH, the top byte of the sum's mantissa, whose bit 7 is its sign.
2A18
OR A B7
Set the flags from Register A with OR A, which sets the Sign Flag when the sum is negative and the Zero Flag when the sum is nothing at all.
2A19
PUSH AF F5
Push Register Pair AF, those flags, which are the only record of the sign once the store below has taken it out and which 2A31H and 2A35H pop back.
2A1A
AND 7FH E6 7F
And Register A with 7FH, which clears bit 7 and so leaves the magnitude of the sum with no sign in it.
2A1C
LD (72EEH),A 32 EE 72
Store Register A into the byte at 72EEH, so that the accumulator now holds the magnitude of the sum and the truncation below has no sign to think about.
2A1F
LD A,(72EFH) 3A EF 72
Load Register A with the byte at 72EFH, the exponent of that magnitude, which the truncation needs and which says how far the value is to be carried down.
2A22
CP 90H FE 90
Compare Register A with 90H, the exponent of 32768, which is one more than the largest integer there is room for.
2A24
JP NC,587EH D2 7E 58
Jump to 587EH on NC, the magnitude standing at 32768 or above, which gives error 6, Overflow: an integer holds 32767 at the most.
2A27
Call 2AB7H, which carries the mantissa down until the binary point stands at the bottom of it and leaves the whole part in Register C, Register D and Register E with the low sixteen bits in Register Pair DE.
2A2A
LD A,(72EFH) 3A EF 72
Load Register A with the byte at 72EFH, the exponent again, which the truncation left as it found it.
2A2D
OR A B7
Set the flags from Register A with OR A, which gives Z when the exponent is 00H and so the sum was exactly nothing.
2A2E
Jump to 2A35H on NZ, the sum having been something, where the sign that was pushed decides whether the answer is complemented.
2A31
POP AF F1
The sum of exactly nothing (2A31H), which is the value minus one half and nothing else: pop Register Pair AF, the sign of the sum, which says positive because the sign byte of nothing is 00H.
2A32
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which brings the 0000H the truncation gave into Register Pair HL.
2A33
Jump to 2A3AH, past the test of that sign, so that the answer is complemented whatever it said and minus one half comes back as minus one.
2A35
POP AF F1
The sign of the sum read back (2A35H), which 2A2EH reaches: pop Register Pair AF, the flags that 2A19H pushed, whose Sign Flag says whether the sum was negative.
2A36
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which brings the whole part the truncation gave into Register Pair HL.
2A37
Jump to 2A53H on P, the sum having been positive, so that the whole part is the answer and is stored as an integer.
2A3A
LD A,H 7C
The answer complemented (2A3AH), which 2A33H also reaches: load Register A from Register H, the high half of the whole part.
2A3B
CPL 2F
Complement Register A, which turns every bit of that half over.
2A3C
LD H,A 67
Load Register H from Register A, the complemented high half.
2A3D
LD A,L 7D
Load Register A from Register L, the low half of the whole part.
2A3E
CPL 2F
Complement Register A, which turns every bit of it over.
2A3F
LD L,A 6F
Load Register L from Register A, so that Register Pair HL holds the one's complement of the whole part, which is the negative of it less one and so the integer the rounding wanted.
2A40
Jump to 2A53H, which stores that integer and writes 02H into the type at 7142H.
2A43-2A46
DEFB 21H, 7EH, 58H, 0E5H 21 7E 58 E5
Four bytes nothing reaches (2A43H to 2A46H), which decode as a load of 587EH, the Overflow of module 1, into Register Pair HL and a push of it. No instruction of this file or of the two modules of BASIC/CMD branches to any of the four, no word of the three images holds one of their addresses and no relative jump reaches them: 2A24H gives that error with a jump of its own and these are what it was written as first.
2A47
LD A,(72EFH) 3A EF 72
The accumulator truncated to an integer (2A47H), which INT reaches at 2AFEH: load Register A with the byte at 72EFH, the exponent of the value in the accumulator.
2A4A
CP 90H FE 90
Compare Register A with 90H, the exponent of 32768, above which no whole part fits in two bytes.
2A4C
Jump to 2A5CH on NC, the magnitude standing at 32768 or above, where minus 32768 is let through as an integer and every other value of that magnitude, plus 32768 included, is left as it is.
2A4E
Call 2AB7H, which carries the mantissa down until the binary point is at the bottom and leaves the low sixteen bits of the whole part in Register Pair DE.
2A51
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which brings that whole part into Register Pair HL to be stored.
2A52
POP DE D1
The caller's return dropped (2A52H), which 2A68H also reaches: pop Register Pair DE, which takes this routine's own return address off the stack so that the store below answers to the caller's caller instead.

2A53H - The Integer Stored, CSNG, CDBL, a String Demanded and the Truncation (2A53H-2AE1H)

The type of a value in this interpreter is the number of bytes it occupies, and 2A53H, 2AACH and 2AA9H are the three instructions that write it. 2A53H stores an integer and says 02H, 2AACH says 04H for a single precision value and 2AA9H says 08H for a double, and the three of them share the one store at 2A58H. 2AACH stands inside the instruction at 2AABH: that instruction is a load of Register Pair BC with 043EH which nothing wants, and it is there because its two operand bytes read as the LD A,04H that four places call. CSNG 2A6AH narrows a double precision value by taking its top four bytes and rounding on the fifth, CDBL 2A96H widens a single by clearing the low four, and 2A8AH makes a signed integer into a single precision value, which is the conversion the evaluator reaches for oftenest. 2AB7H is the truncation every one of them rests on: given the exponent in Register A it carries the mantissa down until the binary point stands below its lowest bit and leaves the whole part in Register C, Register D and Register E, two's complemented when the value was negative. 2AB0H is the shortest routine in the file and demands that the value be a string.

2A53
LD (72ECH),HL 22 EC 72
An integer stored in the accumulator (2A53H), which 313DH, 4F88H, 753AH, 7623H and 770FH of BASIC/CMD call and nine places of this file: store Register Pair HL into the word at 72ECH, the two bytes an integer is kept in.
2A56
LD A,02H 3E 02
The type set to integer (2A56H), which 2C7BH reaches: load Register A with 02H, the type of an integer, which is also the number of bytes it occupies.
2A58
LD (7142H),A 32 42 71
The type stored (2A58H), which 2AAEH reaches with 08H in Register A and 2AACH with 04H: store Register A into the byte at 7142H, which is what every routine of both files reads to learn what the accumulator holds.
2A5B
RET C9
Return to the caller with the value in the accumulator and its type written, which is the whole of what a conversion has to leave behind.
2A5C
LD BC,9080H 01 80 90
The one value of that magnitude that still fits (2A5CH), which 2A4CH and 2FB5H reach: load Register Pair BC with 9080H, Register B the exponent 90H and Register C the top byte of the mantissa 80H, whose bit 7 is the sign, so that the constant is minus 32768 and not plus.
2A5F
LD DE,0000H 11 00 00
Load Register Pair DE with 0000H, the low two bytes of that constant's mantissa, which are nothing.
2A62
Call 2982H, the single precision comparison, which weighs sign against sign before mantissa against mantissa and answers 00H with the Zero Flag set only when the accumulator holds exactly minus 32768.
2A65
RET NZ C0
Return with NZ, the accumulator holding something other than minus 32768, so that the value is left as it was and no integer is made of it: every other magnitude of 32768 or above, plus 32768 included, has no integer form at all.
2A66
LD H,C 61
Load Register H from Register C, 80H, the high half of the integer to be stored, the accumulator having held exactly minus 32768.
2A67
LD L,D 6A
Load Register L from Register D, 00H, its low half, so that Register Pair HL holds 8000H, which as a signed integer is minus 32768.
2A68
Jump to 2A52H, which drops the caller's return address and stores that integer, so that minus 32768 comes back as an integer, it being the one value of that magnitude there is room for and the reason a signed sixteen bit range is not symmetrical.
2A6A
CALL 76A4H CD A4 76
CSNG (2A6AH), the second word of the type conversion table at 6B5BH, which 36DFH, 5DE5H, 5DFEH, 6582H, 73E7H, 7494H, 765DH and 7FB2H of BASIC/CMD call and 2FDEH of this file: call 76A4H, which comes back with the Parity Flag odd for a single precision value, the Sign Flag set for an integer and the Zero Flag set for a string.
2A6D
RET PO E0
Return with PO, the value being single precision already, with nothing changed and the type left as it was.
2A6E
Jump to 2A87H on M, the value being an integer, which is widened by the routine below rather than narrowed.
2A71
JP Z,5884H CA 84 58
Jump to 5884H on Z, the value being a string, which gives error 13, Type mismatch.
2A74
A double precision value narrowed (2A74H), which CINT reaches at 2A0DH: call 2932H, which loads the accumulator's top four bytes into Register E, Register D, Register C and Register B, which are the whole of a single precision value.
2A77
Call 2AACH, which writes 04H into the type at 7142H, so that the value is a single precision one from here on.
2A7A
LD A,B 78
Load Register A from Register B, the exponent of those four bytes, which is 00H when the value is nothing.
2A7B
OR A B7
Set the flags from Register A with OR A, which gives Z for an exponent of 00H.
2A7C
RET Z C8
Return with Z, the value being nothing, which is nothing in single precision too and wants no rounding.
2A7D
Call 2953H, which puts the implied leading one back into the mantissa in Register C and into 72EEH, takes the signs out and leaves Register Pair HL on 72F0H.
2A80
LD HL,72EBH 21 EB 72
Load Register Pair HL with 72EBH, the highest of the four bytes a single precision value throws away, which is the one the rounding reads.
2A83
LD B,(HL) 46
Load Register B with the byte Register Pair HL addresses, 72EBH, the bits that are being lost, which 26B2H adds in as a rounding.
2A84
Jump to 26B2H, the rounding and repacking of the addition, which carries the lost bits into the mantissa and puts the sign back from 72F0H.
2A87
LD HL,(72ECH) 2A EC 72
An integer widened to single precision (2A87H), which 3040H and 33E2H of BASIC/CMD call and 2A6EH and 2A9DH of this file: load Register Pair HL with the word at 72ECH, the two bytes the integer is kept in.
2A8A
The signed integer in Register Pair HL made a single precision value (2A8AH), which 388BH, 74A2H, 74B4H and 74BBH of BASIC/CMD call and four places of this file: call 2AACH, which writes 04H into the type at 7142H.
2A8D
LD A,H 7C
Load Register A from Register H, the high half of the integer, which is to be the top byte of the mantissa.
2A8E
LD D,L 55
Load Register D from Register L, its low half, which is to be the middle byte of the mantissa.
2A8F
LD E,00H 1E 00
Load Register E with 00H, the low byte of the mantissa, an integer having no bits below the ones.
2A91
LD B,90H 06 90
Load Register B with 90H, the exponent of a value of sixteen bits, which is 128 and sixteen.
2A93
Jump to 28D8H, which writes that exponent, puts the sign in 72F0H and carries the mantissa up until its top bit stands where the format wants it.
2A96
CALL 76A4H CD A4 76
CDBL (2A96H), the third word of the type conversion table at 6B53H, which 745AH and 746DH of BASIC/CMD call and 2B38H and 2FE2H of this file: call 76A4H, which comes back with the Carry Flag clear for a double precision value alone.
2A99
RET NC D0
Return with NC, the value being double precision already, with nothing changed.
2A9A
JP Z,5884H CA 84 58
Jump to 5884H on Z, the value being a string, which gives error 13, Type mismatch.
2A9D
Call 2A87H on M, the value being an integer, which makes a single precision value of it first, so that one path widens both of the narrower types.
2AA0
LD HL,0000H 21 00 00
The low four bytes cleared (2AA0H), which 305BH and 3068H of BASIC/CMD call: load Register Pair HL with 0000H, the value the four bytes below the single precision part are to be given.
2AA3
LD (72E8H),HL 22 E8 72
Store Register Pair HL into the word at 72E8H, the lowest two bytes of the accumulator, which a single precision value never carried.
2AA6
LD (72EAH),HL 22 EA 72
Store Register Pair HL into the word at 72EAH, the next two, so that all four of the added bytes are 00H and the value is exactly what it was.
2AA9
LD A,08H 3E 08
The type set to double precision (2AA9H), which 2F12H reaches: load Register A with 08H, the type of a double precision value and the number of bytes it occupies.
2AAB
LD BC,043EH 01 3E 04
Load Register Pair BC with 043EH, a value no instruction of either file ever reads: this load is here because its two operand bytes read as the LD A,04H at 2AACH, which 2A77H, 2A8AH, 2BAFH and 388BH reach to set the type to single precision.
2AAE
Jump to 2A58H, which stores the type in Register A into 7142H and returns to the caller.
2AB0
CALL 76A4H CD A4 76
A string demanded (2AB0H), which eleven instructions of BASIC/CMD call, among them 3F1BH of PRINT USING, 40A2H, 47DBH, 6369H and 7640H: call 76A4H, which comes back with the Zero Flag set when the type at 7142H is 03H and so the value is a string.
2AB3
RET Z C8
Return with Z, the value being a string, which is the answer every one of the eleven callers is asking for.
2AB4
JP 5884H C3 84 58
Jump to 5884H, which gives error 13, Type mismatch, the value being a number where a string was wanted.
2AB7
LD B,A 47
The accumulator truncated to a whole number (2AB7H), which 3599H, 37FBH and 7FC2H of BASIC/CMD call and 2A27H, 2A4EH and 2B0CH of this file, with the exponent in Register A: load Register B from Register A, that exponent, which says how far the mantissa has to come down.
2AB8
LD C,A 4F
Load Register C from Register A, the same byte, which is the top of the answer when the exponent is 00H and the answer is nothing.
2AB9
LD D,A 57
Load Register D from Register A, the same again, the middle byte of that nothing.
2ABA
LD E,A 5F
Load Register E from Register A, the same again, the low byte of that nothing.
2ABB
OR A B7
Set the flags from Register A with OR A, which gives Z when the exponent is 00H and so the accumulator holds nothing.
2ABC
RET Z C8
Return with Z and Register C, Register D and Register E all holding 00H, the accumulator being nothing, whose whole part is nothing.
2ABD
PUSH HL E5
Push Register Pair HL, the caller's own pair, which 2AD9H gives back and which the work below writes over.
2ABE
Call 2932H, which loads the accumulator's four bytes into Register E, Register D, Register C and Register B.
2AC1
Call 2953H, which puts the implied leading one back into the mantissa in Register C and leaves Register Pair HL on 72F0H with the sign of the accumulator complemented in its bit 7.
2AC4
XOR (HL) AE
Exclusive Or Register A with the byte Register Pair HL addresses, 72F0H, which turns that complement back and leaves bit 7 of Register A holding the accumulator's own sign, the value having been weighed against itself.
2AC5
LD H,A 67
Load Register H from Register A, that sign, which the two conditional calls below read and which the pair's other half is not wanted for.
2AC6
Call 2ADBH on M, the value being negative, which takes one off the mantissa so that the complement at 2AD6H gives a two's complement and not a one's.
2AC9
LD A,98H 3E 98
Load Register A with 98H, which is 128 and 24, the exponent at which the binary point stands below the lowest bit of a twenty four bit mantissa.
2ACB
SUB B 90
Subtract Register B from Register A, the value's own exponent, which leaves the number of places the mantissa has to be carried down for its binary point to reach the bottom.
2ACC
Call 26F1H, which carries the twenty four bits in Register C, Register D and Register E down that many places and leaves what falls off the bottom in Register B.
2ACF
LD A,H 7C
Load Register A from Register H, the sign that 2AC5H kept there.
2AD0
RLA 17
Rotate Register A left through the Carry Flag, which brings that sign into the Carry Flag for the two conditional calls below.
2AD1
Call 26C4H on Carry, the value being negative, which adds one to the twenty four bits, the other half of the two's complement.
2AD4
LD B,00H 06 00
Load Register B with 00H, which says that nothing was carried out of the shift, so that the complement below has no rounding to think about.
2AD6
Call 26DDH on Carry, the value being negative, which complements the twenty four bits and so finishes the negative whole part.
2AD9
POP HL E1
Pop Register Pair HL, the caller's own pair that 2ABDH pushed.
2ADA
RET C9
Return to the caller with the whole part in Register C, Register D and Register E, its low sixteen bits in Register Pair DE, and Register Pair HL as it was given.
2ADB
DEC DE 1B
One taken off the twenty four bits (2ADBH), which 2AC6H calls for a negative value: decrement Register Pair DE, the low sixteen bits of the mantissa.
2ADC
LD A,D 7A
Load Register A from Register D, the high half of what is left, which with the half below says whether the decrement borrowed.
2ADD
AND E A3
And Register A with Register E, the low half, which leaves 0FFH only when both halves are 0FFH and so the pair has wrapped from 0000H.
2ADE
INC A 3C
Increment Register A, which gives 00H and the Zero Flag set only in that case.
2ADF
RET NZ C0
Return with NZ, the pair not having wrapped, so that nothing need be taken off the byte above it.
2AE0
DEC BC 0B
Decrement Register Pair BC, which takes the borrow into Register C, the top byte of the mantissa, Register B being the exponent and of no use here.
2AE1
RET C9
Return to the caller with one taken off the whole twenty four bits.

2AE2H - FIX, INT and a Double Precision Value Made a Fifty Six Bit Integer (2AE2H-2B75H)

FIX and INT differ in one thing and FIX is written in terms of INT because of it. INT takes a value down to the whole number at or below it, which for a negative value with a fraction means away from nothing, and FIX throws the fraction away, which for the same value means towards nothing: so 2AE2H turns a negative value's sign over, calls INT, and turns the answer's sign back, and for a positive value it jumps straight into INT, the two being the same thing there. INT has three paths, one for each numeric type. An integer is whole already and 2AF8H returns at once; a single precision value goes to 2AFEH, which tries to make a sixteen bit integer of it and, when the whole part will not fit in two bytes, comes back to 2B01H to truncate it where it stands and leave it single precision; a double precision value goes to 2B1AH. 2B01H is the busiest entry of the three, five instructions of module 1 calling it directly for the whole part of an exponent, of a product, of a number of turns and of RND's range, and both of its paths leave Register A holding the low byte of the answer's mantissa, which is what 37A6H of the power routine reads. The rounding of a negative value is done by taking one off the mantissa before the shift and putting one back after it, which is what 2AC6H and 2AD1H do for a single precision value and what 2B4FH and 2B60H do for a double: a magnitude that is an exact whole number is unchanged by the pair, and one with any fraction at all comes out one larger, which is the whole number below the value and not above it. 2B41H answers to the Carry Flag it is called with and nothing else. Called from 2B40H the Carry Flag is set, because the compare above it is what let the path through, and the answer is normalised back into a double precision value at 2CEFH; called from 355EH of the number formatter the Carry Flag is clear, the XOR A at 355DH having cleared it, and 2B68H returns with the fifty six bit integer standing in 72E8H to 72EEH, which is the form the formatter's seven byte subtractions want.

2AE2
CALL 76A4H CD A4 76
FIX (2AE2H), which the function address table holds at 6899H for token 2DH: call 76A4H, which loads the type from 7142H, takes 03H off it and comes back with the Sign Flag set for an integer.
2AE5
RET M F8
Return with M, the value being an integer, which has no fraction to throw away.
2AE6
Call 28C4H, which answers the sign of the accumulator in Register A as 0FFH, 00H or 01H with the flags to match.
2AE9
Jump to 2AF5H on P, the value standing at nothing or above, where FIX and INT are the same thing and INT does the work.
2AEC
Call 28F3H, which turns the sign bit of the accumulator over and makes the value positive, the fraction of a negative value having to be thrown away towards nothing and not away from it.
2AEF
Call 2AF5H, INT below, which takes the whole number at or below that positive value, which is the whole part of the negative one.
2AF2
Jump to 28EAH, the negate, which turns the answer's sign back and returns to FIX's caller from there.
2AF5
CALL 76A4H CD A4 76
INT (2AF5H), which the function address table holds at 6865H for token 05H and which 2AE9H and 2AEFH of FIX reach: call 76A4H, which loads the type from 7142H and comes back with the Sign Flag set for an integer, the Zero Flag set for a string and the Carry Flag clear for a double precision value.
2AF8
RET M F8
Return with M, the value being an integer, which is a whole number already.
2AF9
Jump to 2B1AH on NC, the value being double precision, where fifty six bits of mantissa have to be dealt with instead of twenty four.
2AFB
JP Z,5884H CA 84 58
Jump to 5884H on Z, the value being a string, which gives error 13, Type mismatch.
2AFE
Call 2A47H, which makes a sixteen bit integer of the value when its whole part will fit in two bytes and returns to INT's own caller when it does: this call comes back only when the value stands at 32768 or above and is not exactly 32768.
2B01
LD HL,72EFH 21 EF 72
A single precision value truncated where it stands (2B01H), which 370AH, 376BH, 37A6H, 3899H and 3912H of BASIC/CMD call: load Register Pair HL with 72EFH, the exponent of the accumulator, which says where the binary point stands.
2B04
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72EFH, that exponent.
2B05
CP 98H FE 98
Compare Register A with 98H, which is 128 and 24 and is the exponent at which the binary point stands below the lowest bit of the mantissa.
2B07
LD A,(72ECH) 3A EC 72
Load Register A with the byte at 72ECH, the low byte of the mantissa, a load changing no flag so that the compare above still stands: this is the byte the caller is given in Register A.
2B0A
RET NC D0
Return with NC, the exponent standing at 98H or above, where every bit of the mantissa is a whole number already and there is nothing to throw away.
2B0B
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72EFH, the exponent again, which the truncation below wants in Register A.
2B0C
Call 2AB7H, which carries the twenty four bits down until the binary point is at the bottom and leaves the whole part in Register C, Register D and Register E, two's complemented when the value was negative, with Register B at 00H.
2B0F
LD (HL),98H 36 98
Store 98H into the byte Register Pair HL addresses, 72EFH, the exponent of a value whose binary point stands below its lowest bit, which is where the truncation has left it.
2B11
LD A,E 7B
Load Register A from Register E, the low byte of the whole part, which is the byte this routine's callers are given.
2B12
PUSH AF F5
Push Register AF, that byte with the flags, which the call below writes over and 2B18H brings back.
2B13
LD A,C 79
Load Register A from Register C, the top byte of the whole part, whose bit 7 is the sign the two's complement left in it.
2B14
RLA 17
Rotate Register A left through the Carry Flag, which brings that sign into the Carry Flag for the conditional call inside the routine below.
2B15
Call 266EH, which complements the twenty four bits again on Carry and turns the sign at 72F0H back with them, then normalises what is left, rounds it and packs it into the accumulator.
2B18
POP AF F1
Pop Register AF, the low byte of the whole part 2B12H put down, so that both paths of this routine answer with it in Register A.
2B19
RET C9
Return to the caller with the whole part in the accumulator as a single precision value and its low mantissa byte in Register A.
2B1A
LD HL,72EFH 21 EF 72
A double precision value (2B1AH), which 2AF9H reaches: load Register Pair HL with 72EFH, the exponent of the accumulator.
2B1D
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72EFH, that exponent.
2B1E
CP 90H FE 90
Compare Register A with 90H, which is 128 and 16 and is the exponent of 32768, the one magnitude that is too large for a sixteen bit integer by exactly one.
2B20
Jump to 2B3CH on NZ, the exponent being anything else, where the fifty six bits are dealt with in the general way.
2B22
LD C,A 4F
Load Register C from Register A, 90H, which is kept there in case the test below fails and the general path is wanted after all.
2B23
DEC HL 2B
Decrement Register Pair HL to 72EEH, the top byte of the mantissa, which carries the sign in its bit 7.
2B24
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72EEH, that top byte.
2B25
XOR 80H EE 80
Exclusive Or Register A with 80H, which leaves 00H only when the byte was exactly 80H, a sign of negative with no mantissa bits of its own.
2B27
LD B,06H 06 06
Load Register B with 06H, the six bytes of mantissa standing below that top one, which all have to be nothing for the value to be exactly minus 32768.
2B29
DEC HL 2B
The six bytes below gathered (2B29H): decrement Register Pair HL to the next byte down.
2B2A
OR (HL) B6
Or Register A with the byte Register Pair HL addresses, that byte of the mantissa, so that Register A stays 00H only while every byte so far has been nothing.
2B2B
DEC B 05
Decrement Register B, the count of bytes left to gather.
2B2C
Jump to 2B29H on NZ, bytes being left, so that all seven bytes of the mantissa are weighed together.
2B2F
OR A B7
Set the flags from Register A with OR A, which gives Z only when the value is exactly minus 32768.
2B30
LD HL,8000H 21 00 80
Load Register Pair HL with 8000H, which as a signed sixteen bit integer is minus 32768, the value this path is for.
2B33
Jump to 2B3BH on NZ, the value being something else, where the general path takes it.
2B35
Call 2A53H, which stores Register Pair HL into 72ECH and writes 02H into the type at 7142H, so that the accumulator holds minus 32768 as an integer.
2B38
Jump to 2A96H, CDBL, which widens that integer back into a double precision value and returns to INT's caller: minus 32768 is a whole number already and this is the shortest way to say so.
2B3B
LD A,C 79
Load Register A from Register C, 90H, the exponent 2B22H kept, the value not having been minus 32768 after all.
2B3C
OR A B7
The exponent weighed (2B3CH), which 2B20H reaches: set the flags from Register A with OR A, which gives Z when the exponent is 00H.
2B3D
RET Z C8
Return with Z, the accumulator holding nothing, whose whole part is nothing.
2B3E
CP 0B8H FE B8
Compare Register A with 0B8H, which is 128 and 56 and is the exponent at which the binary point stands below the lowest of the fifty six bits.
2B40
RET NC D0
Return with NC, the exponent standing at 0B8H or above, where every bit of the mantissa is a whole number already.
2B41
PUSH AF F5
The mantissa made a fifty six bit integer (2B41H), which 355EH of the number formatter calls with the Carry Flag clear, where 2B40H reaches it with the Carry Flag set: push Register AF, the exponent and that Carry Flag, which 2B67H brings back and which decides between the two answers.
2B42
Call 2932H, which loads 72ECH to 72EFH into Register E, Register D, Register C and Register B, so that Register B holds the exponent and Register C the top byte of the mantissa.
2B45
Call 2953H, which puts the implied leading one back into the top byte at 72EEH and into Register C, takes the sign out of both and leaves Register Pair HL on 72F0H with the complement of the sign in its bit 7.
2B48
XOR (HL) AE
Exclusive Or Register A with the byte Register Pair HL addresses, 72F0H: the value has been weighed against itself, so bit 7 of Register A was set for two signs alike, and turning the complement back leaves bit 7 holding the value's own sign.
2B49
DEC HL 2B
Decrement Register Pair HL to 72EFH, the exponent of the accumulator.
2B4A
LD (HL),0B8H 36 B8
Store 0B8H into the byte Register Pair HL addresses, 72EFH, the exponent of a value whose binary point stands below the lowest of its fifty six bits, which is where the shift below is to leave it.
2B4C
PUSH AF F5
Push Register AF, the sign in bit 7 of Register A, which 2B5FH brings back for the second half of the rounding.
2B4D
DEC HL 2B
Decrement Register Pair HL to 72EEH, the top byte of the mantissa.
2B4E
LD (HL),C 71
Store Register C into the byte Register Pair HL addresses, 72EEH, the top byte with its leading one in place and its sign taken out, which is what the shift works on.
2B4F
Call 2B6CH on M, the value being negative, which takes one off the fifty six bits so that the shift below rounds the magnitude up and the answer is the whole number below the value and not above it.
2B52
NOP 00
No operation, the first of three bytes of padding that stand here and are run through on every pass of this routine.
2B53
NOP 00
No operation, the second of those three bytes.
2B54
NOP 00
No operation, the third of them, after which the shift below is set up.
2B55
LD HL,72EEH 21 EE 72
Load Register Pair HL with 72EEH, the top byte of the mantissa, which the shift below is given in Register Pair HL.
2B58
LD C,(HL) 4E
Load Register C with the byte Register Pair HL addresses, 72EEH, that top byte, which 2D7DH writes back as its first instruction.
2B59
LD A,0B8H 3E B8
Load Register A with 0B8H, which is 128 and 56, the exponent the binary point is being brought down to.
2B5B
SUB B 90
Subtract Register B from Register A, the value's own exponent, which leaves the number of places the fifty six bits have to be carried down.
2B5C
Call 2D7DH, which carries the seven bytes at 72E8H to 72EEH down that many places, whole bytes first and single bits after.
2B5F
POP AF F1
Pop Register AF, the sign 2B4CH put down, which the conditional call below reads out of the Sign Flag.
2B60
Call 2D37H on M, the value being negative, which carries the fifty six bits up by one: with the one taken off at 2B4FH this leaves an exact whole number as it was and makes any value with a fraction one larger.
2B63
XOR A AF
Clear Register A with XOR A, the byte the guard below the accumulator is to be given.
2B64
LD (72E7H),A 32 E7 72
Store Register A into the byte at 72E7H, the guard byte below the accumulator, which the shift may have carried something into and which nothing is to read.
2B67
POP AF F1
Pop Register AF, the exponent and the Carry Flag 2B41H put down.
2B68
RET NC D0
Return with NC, the Carry Flag having been clear at entry, which is how 355EH of the number formatter calls this routine: the answer is left as a fifty six bit integer standing at 72E8H to 72EEH with the exponent of 0B8H above it.
2B69
Jump to 2CEFH, the double precision normalise, the Carry Flag having been set at entry, which is how 2B40H of INT reaches this routine: the fifty six bits are brought back up until the top byte holds something and the answer is a double precision value again.
2B6C
LD HL,72E8H 21 E8 72
One taken off the fifty six bits (2B6CH), which 2B4FH calls for a negative value: load Register Pair HL with 72E8H, the lowest byte of the mantissa, where the borrow begins.
2B6F
LD A,(HL) 7E
The borrow (2B6FH): load Register A with the byte Register Pair HL addresses, that byte of the mantissa, which is read before it is changed so that the test below can see what it was.
2B70
DEC (HL) 35
Decrement the byte Register Pair HL addresses, that byte, which takes one off it.
2B71
OR A B7
Set the flags from Register A with OR A, which gives Z when the byte was 00H before the decrement and so has wrapped to 0FFH and borrowed.
2B72
INC HL 23
Increment Register Pair HL to the next byte up, which the borrow runs into.
2B73
Jump to 2B6FH on Z, the byte having borrowed, to take one off the byte above it as well.
2B75
RET C9
Return to 2B4FH with one taken off the whole fifty six bits.

2B76H - A Subscript Multiplied, the Integer Addition, Subtraction and Multiplication (2B76H-2C0EH)

2B76H is the one routine here that is not an operator at all: 3C73H and 3CB5H of the array code call it to multiply two unsigned sixteen bit numbers, and it jumps to Subscript out of range at 3C24H itself the moment the product will not hold in sixteen bits, which is exactly the complaint an array wants and not the one an expression wants. The three integer operators share one overflow plan. Each of them works in sixteen bits and each of them tests what came out: when the answer fits, 2A53H stores it and the type stays an integer; when it does not, both operands are turned into single precision values and the single precision routine is entered instead, so that 30000+30000 and 300*300 both give an answer rather than a complaint. The addition's overflow test is the neatest of the three: 2BA0H and 2BA5H make a sign extension byte of each operand with RLA and SBC A,A, 2BA7H adds those two bytes with the carry out of the sixteen bit sum, and 2BA8H and 2BA9H then put bit 0 of that byte against bit 7 of the sum's own top byte, which is the whole of the test for a signed overflow. The subtraction is the addition with one operand negated first, 2B9CH jumping into it at 2BA1H with the sign extension already worked out. The multiplication keeps one special case: a product whose magnitude is exactly 32768 fits as an integer when it is negative and does not when it is positive, and 2C01H to 2C0EH is the four instructions that tell those two apart. 2BEFH is a load of Register Pair BC that nothing reads, and its two operand bytes are the POP BC at 2BF0H and the POP HL at 2BF1H that the two overflow jumps inside the multiplying loop reach, which is the same trick the CP 2FH at 28CCH plays for 28CDH.

2B76
PUSH HL E5
Two unsigned sixteen bit numbers multiplied (2B76H), which 3C73H and 3CB5H of the array code call to work out the place of an element: push Register Pair HL, the caller's own pair, which 2B91H gives back.
2B77
LD HL,0000H 21 00 00
Load Register Pair HL with 0000H, the running product, which is nothing to begin with.
2B7A
LD A,B 78
Load Register A from Register B, the high half of one of the two numbers.
2B7B
OR C B1
Or Register A with Register C, its low half, which sets the Zero Flag only when the whole of Register Pair BC is nothing.
2B7C
Jump to 2B90H on Z, Register Pair BC being nothing, so that the product is nothing and no loop is wanted.
2B7E
LD A,10H 3E 10
Load Register A with 10H, sixteen, the count of bits in the other number.
2B80
ADD HL,HL 29
One bit of the multiplier (2B80H): add Register Pair HL to itself, which doubles the running product and sends its top bit out into the Carry Flag.
2B81
JP C,3C24H DA 24 3C
Jump to 3C24H on Carry, a bit having been carried out of sixteen: that is Subscript out of range of module 1, which is the complaint an array subscript wants and which this routine gives on its own rather than leaving it to the caller.
2B84
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which brings the multiplier into Register Pair HL to be doubled.
2B85
ADD HL,HL 29
Add Register Pair HL to itself, which doubles the multiplier and sends its top bit out into the Carry Flag.
2B86
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which puts the running product back into Register Pair HL and the doubled multiplier into Register Pair DE.
2B87
Jump to 2B8DH on NC, the multiplier's top bit having been clear, where nothing is added this time round.
2B89
ADD HL,BC 09
Add Register Pair BC to Register Pair HL, the multiplicand, the multiplier's top bit having been set.
2B8A
JP C,3C24H DA 24 3C
Jump to 3C24H on Carry, the sum having run out of sixteen bits, which is Subscript out of range again.
2B8D
DEC A 3D
The count counted down (2B8DH), which 2B87H reaches: decrement Register A, the count of bits left.
2B8E
Jump to 2B80H on NZ, bits being left in the multiplier.
2B90
EX DE,HL EB
The product given back (2B90H), which 2B7CH reaches: exchange Register Pair DE with Register Pair HL, which puts the product into Register Pair DE, where both callers look for it.
2B91
POP HL E1
Pop Register Pair HL, the caller's own pair 2B76H put down.
2B92
RET C9
Return to the array code with the product in Register Pair DE and nothing else disturbed.
2B93
LD A,H 7C
The integer subtraction (2B93H), the second word of the integer operator table at 6B73H: load Register A from Register H, the high half of the value in Register Pair HL, which is the one to be taken away.
2B94
RLA 17
Rotate Register A left through the Carry Flag, which brings bit 7 of that half, the sign, into the Carry Flag.
2B95
SBC A,A 9F
Subtract Register A from itself with the Carry Flag, which leaves 00H for a positive value and 0FFH for a negative one: that is the sign extension of Register Pair HL into a third byte.
2B96
LD B,A 47
Load Register B from Register A, that sign extension, which the second half of the subtraction below turns round.
2B97
Call 2C51H, which negates Register Pair HL, stores it into 72ECH as an integer, and leaves Register C at 00H and the Carry Flag set unless Register Pair HL was 0000H.
2B9A
LD A,C 79
Load Register A from Register C, 00H, which the negation below takes the sign extension from.
2B9B
SBC A,B 98
Subtract Register B from Register A with the Carry Flag, the old sign extension and the borrow out of the negation, which leaves the sign extension of the negated value: 0FFH where it was 00H and 00H where it was 0FFH or where the value was nothing.
2B9C
Jump to 2BA1H, the addition below, entered past its own sign extension so that the negated value is added instead of taken away.
2B9E
LD A,H 7C
The integer addition (2B9EH), the first word of the integer operator table at 6B71H, which 459DH of NEXT also calls to add a step: load Register A from Register H, the high half of the value in Register Pair HL.
2B9F
RLA 17
Rotate Register A left through the Carry Flag, which brings the sign of that value into the Carry Flag.
2BA0
SBC A,A 9F
Subtract Register A from itself with the Carry Flag, which leaves the sign extension of Register Pair HL, 00H or 0FFH.
2BA1
LD B,A 47
The sign extension taken (2BA1H), which 2B9CH of the subtraction reaches: load Register B from Register A, the sign extension of the value in Register Pair HL.
2BA2
PUSH HL E5
Push Register Pair HL, that value, which the sum below writes over and 2BB3H brings back for the overflow path.
2BA3
LD A,D 7A
Load Register A from Register D, the high half of the value in Register Pair DE, the other operand.
2BA4
RLA 17
Rotate Register A left through the Carry Flag, which brings the sign of that value into the Carry Flag.
2BA5
SBC A,A 9F
Subtract Register A from itself with the Carry Flag, which leaves its sign extension in Register A, 00H or 0FFH.
2BA6
ADD HL,DE 19
Add Register Pair DE to Register Pair HL, the two operands, which leaves the low sixteen bits of the sum in Register Pair HL and what ran out of them in the Carry Flag.
2BA7
ADC A,B 88
Add Register B to Register A with the Carry Flag, the two sign extensions and that carry, which is the seventeenth bit of the sum and the eight bits above it.
2BA8
RRCA 0F
Rotate Register A right in a circle, which brings bit 0 of that byte, the seventeenth bit of the sum, round into bit 7.
2BA9
XOR H AC
Exclusive Or Register A with Register H, the top byte of the sixteen bit sum: bit 7 of what comes out is set only when the seventeenth bit of the sum and the sign of the sixteen bit answer disagree, which is the whole of the test for a signed overflow.
2BAA
Jump to 2A52H on P, the two bits having agreed and the sum fitting in two bytes: 2A52H drops this routine's return address and stores Register Pair HL as an integer, so that the answer goes back to the caller of the operator.
2BAD
PUSH BC C5
Push Register Pair BC, Register B holding the sign extension of the first operand, which 2BB2H takes back into Register AF.
2BAE
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which brings the second operand into Register Pair HL for the widening below and puts the sum that overflowed into Register Pair DE, where nothing reads it again.
2BAF
Call 2A8AH, which makes a single precision value of the signed integer in Register Pair HL and writes 04H into the type at 7142H.
2BB2
POP AF F1
Pop Register AF, the word 2BADH put down, which brings the sign extension of the first operand into Register A.
2BB3
POP HL E1
Pop Register Pair HL, the first operand 2BA2H put down.
2BB4
Call 2917H, which puts the four bytes of the widened second operand on the stack underneath its own return address.
2BB7
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which puts the first operand into Register Pair DE, the two low bytes of the mantissa the widening below builds.
2BB8
Call 2C6BH, which loads Register B with 98H and builds a single precision value out of Register A as the top byte of the mantissa and Register Pair DE as the two below it: the sign extension above the sixteen bits is exactly what a twenty four bit mantissa wants over them.
2BBB
JP 3076H C3 76 30
Jump to 3076H of module 1, which pops the widened second operand back into the operand registers and adds the two single precision values, answering to the caller of the operator.
2BBE
LD A,H 7C
The integer multiplication (2BBEH), the third word of the integer operator table at 6B75H: load Register A from Register H, the high half of the value in Register Pair HL.
2BBF
OR L B5
Or Register A with Register L, its low half, which sets the Zero Flag only when the whole of Register Pair HL is nothing.
2BC0
Jump to 2A53H on Z, that operand being nothing, so that the product is nothing and Register Pair HL is stored as an integer just as it stands.
2BC3
PUSH HL E5
Push Register Pair HL, the first operand, which 2BF1H or 2BF5H brings back for the overflow path.
2BC4
PUSH DE D5
Push Register Pair DE, the second operand, which 2BF0H or 2BDFH brings back.
2BC5
Call 2C45H, which leaves the sign of the product in bit 7 of Register B and makes both operands positive, storing each of them into 72ECH on the way.
2BC8
PUSH BC C5
Push Register Pair BC, that sign, which 2BDEH or 2BF0H takes back.
2BC9
LD B,H 44
Load Register B from Register H, the high half of the multiplicand, which the loop below adds in.
2BCA
LD C,L 4D
Load Register C from Register L, its low half, so that Register Pair BC holds the multiplicand.
2BCB
LD HL,0000H 21 00 00
Load Register Pair HL with 0000H, the running product, nothing to begin with.
2BCE
LD A,10H 3E 10
Load Register A with 10H, sixteen, the count of bits in the multiplier.
2BD0
ADD HL,HL 29
One bit of the multiplier (2BD0H): add Register Pair HL to itself, which doubles the running product and sends its top bit out into the Carry Flag.
2BD1
Jump to 2BF0H on Carry, a bit having been carried out of sixteen: 2BF0H is the first operand byte of the load at 2BEFH and stands there as a POP BC, which with the POP HL under it begins the single precision path.
2BD3
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which brings the multiplier into Register Pair HL to be doubled.
2BD4
ADD HL,HL 29
Add Register Pair HL to itself, which doubles the multiplier and sends its top bit into the Carry Flag.
2BD5
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which puts the running product back into Register Pair HL.
2BD6
Jump to 2BDBH on NC, the multiplier's top bit having been clear, where nothing is added this time round.
2BD8
ADD HL,BC 09
Add Register Pair BC to Register Pair HL, the multiplicand, that bit having been set.
2BD9
Jump to 2BF0H on Carry, the sum having run out of sixteen bits, which takes the single precision path as above.
2BDB
DEC A 3D
The count counted down (2BDBH), which 2BD6H reaches: decrement Register A, the count of bits left in the multiplier.
2BDC
Jump to 2BD0H on NZ, bits being left in the multiplier, so that all sixteen of them are taken in turn.
2BDE
POP BC C1
Pop Register Pair BC, the sign of the product 2BC8H put down.
2BDF
POP DE D1
Pop Register Pair DE, the second operand 2BC4H put down, which the single precision path below wants and which this path does not.
2BE0
LD A,H 7C
The answer weighed against the integer range (2BE0H), which 2C3FH of the division reaches: load Register A from Register H, the top byte of the magnitude that came out.
2BE1
OR A B7
Set the flags from Register A with OR A, which brings bit 7 of that byte into the Sign Flag.
2BE2
Jump to 2BE9H on M, bit 7 being set and the magnitude standing at 32768 or above, which is one too large for a signed integer unless it is exactly 32768 and negative.
2BE5
POP DE D1
Pop Register Pair DE, the first operand 2BC3H put down for the multiplication, or the remainder 2C3EH put down for the division, which this path does not want.
2BE6
LD A,B 78
Load Register A from Register B, the sign of the answer, which the store below reads out of its bit 7.
2BE7
Jump to 2C4DH, which stores Register Pair HL as an integer for a positive answer and negates it first for a negative one.
2BE9
XOR 80H EE 80
The magnitude of 32768 or above (2BE9H), which 2BE2H reaches: exclusive or Register A with 80H, which leaves 00H only when the top byte was exactly 80H.
2BEB
OR L B5
Or Register A with Register L, the low byte of the magnitude, so that the Zero Flag is set only when the magnitude is exactly 32768.
2BEC
Jump to 2C01H on Z, the magnitude being exactly 32768, where the sign decides whether an integer will hold it.
2BEE
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which brings the second operand into Register Pair HL for the widening below and puts the product that overflowed into Register Pair DE.
2BEF
LD BC,0E1C1H 01 C1 E1
Load Register Pair BC with 0E1C1H, a value no instruction of either file reads: this load stands here because its two operand bytes read as the POP BC at 2BF0H and the POP HL at 2BF1H that 2BD1H and 2BD9H jump to, and the two paths differ only in the three words still on the stack when they arrive.
2BF2
The second operand widened (2BF2H): call 2A8AH, which makes a single precision value of the signed integer in Register Pair HL and writes 04H into the type at 7142H.
2BF5
POP HL E1
Pop Register Pair HL, the first operand 2BC3H put down.
2BF6
Call 2917H, which puts the four bytes of the widened second operand on the stack underneath its own return address.
2BF9
Call 2A8AH, which makes a single precision value of the first operand in Register Pair HL, so that both operands are now single precision and the accumulator holds this one.
2BFC
POP BC C1
Two words popped and the multiplication entered (2BFCH), which 384AH of module 1 loads as an address so that a series is multiplied by its argument on the way out: pop Register Pair BC, the high word of the value on the stack.
2BFD
POP DE D1
Pop Register Pair DE, its low word, so that the operand registers hold that value and the accumulator the other.
2BFE
Jump to 278BH, the single precision multiplication, which answers to the caller of the operator or to whoever pushed 2BFCH as a return.
2C01
LD A,B 78
The magnitude of exactly 32768 (2C01H), which 2BECH reaches with Register Pair HL holding 8000H: load Register A from Register B, the sign of the answer.
2C02
OR A B7
Set the flags from Register A with OR A, which brings bit 7 of that sign into the Sign Flag.
2C03
POP BC C1
Pop Register Pair BC, the first operand 2BC3H put down, which neither of the two paths below wants.
2C04
Jump to 2A53H on M, the answer being negative: 8000H read as a signed integer is minus 32768, which is exactly the answer, so it is stored as an integer and the type stays an integer.
2C07
PUSH DE D5
Push Register Pair DE, the caller's own pair, which the widening below writes over and 2C0BH brings back.
2C08
Call 2A8AH, which makes a single precision value of 8000H read as a signed integer, which is minus 32768.
2C0B
POP DE D1
Pop Register Pair DE, the caller's own pair 2C07H put down.
2C0C
Jump to 28F3H, which turns the sign bit of that value over and leaves plus 32768 in the accumulator, the one magnitude that needs a single precision value for one sign and not for the other.

2C0FH - The Integer Division, MOD, the Sign Helpers, the Negate and the Unsigned Widening (2C0FH-2C87H)

2C0FH is the backslash operator and 2C70H is MOD, and they are one routine: MOD calls the division and keeps what the division threw away. The division is restoring division in sixteen bits with the dividend shifted up into Register Pair DE as the quotient comes down into it, seventeen passes giving sixteen quotient bits, and the divisor is held negated in Register Pair BC so that each pass can subtract with an ADD HL,BC. The restoring path is hidden in an operand byte again: 2C2EH is a load of Register A with 0E1H that nothing reads, and its operand byte at 2C2FH is the POP HL that 2C2AH jumps to when the subtraction borrowed. Because the loop runs one pass more than the sixteen bits of quotient, the remainder comes out doubled, which is why 2C74H to 2C7AH of MOD shifts Register Pair DE right one place before it stores it. MOD takes the sign of the dividend, 2C7EH popping the dividend's own high byte back and handing it to 2C4DH. 2C45H, 2C4CH and 2C51H are the three sign helpers every integer operator uses: 2C45H leaves the sign of an answer in bit 7 of Register B and makes both operands positive, 2C4CH makes one operand positive and 2C51H negates Register Pair HL and stores it. 2C5BH and 2C66H are the two ways out of the one magnitude that will not fit. Negating an integer of minus 32768 gives 8000H back again, and 2C61H to 2C65H is the test for exactly that: when it happens the routine falls into 2C66H, which makes a single precision value of Register Pair HL read as an unsigned sixteen bit number and so gives plus 32768. 5F29H, 750DH and 7700H of module 1 call 2C66H for its own sake, a line number of 40000 and a count above 32767 both wanting to be positive. 2C81H is the double precision subtraction and it is four instructions that turn the sign of the second accumulator over before falling into the double precision addition at 2C88H, which is the first address of the part still to be written.

2C0F
LD A,H 7C
The integer division (2C0FH), the backslash operator, which 76C2H of the evaluator jumps to and 7DD5H of ROW calls, with the dividend in Register Pair DE and the divisor in Register Pair HL: load Register A from Register H, the high half of the divisor.
2C10
OR L B5
Or Register A with Register L, its low half, which sets the Zero Flag only when the whole of the divisor is nothing.
2C11
JP Z,586FH CA 6F 58
Jump to 586FH on Z, the divisor being nothing, which is error 11, Division by zero, of module 1.
2C14
Call 2C45H, which leaves the sign of the quotient in bit 7 of Register B and makes both operands positive, leaving the dividend in Register Pair HL and the divisor in Register Pair DE.
2C17
PUSH BC C5
Push Register Pair BC, that sign, which 2C3DH takes back once the loop has finished.
2C18
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which puts the divisor into Register Pair HL to be negated and the dividend into Register Pair DE, where the loop shifts it up.
2C19
Call 2C51H, which negates Register Pair HL, the divisor, and stores it into 72ECH as an integer on the way, which is of no account here.
2C1C
LD B,H 44
Load Register B from Register H, the high half of the negated divisor, so that each pass of the loop can take the divisor off with an addition.
2C1D
LD C,L 4D
Load Register C from Register L, its low half, which finishes putting the negated divisor into Register Pair BC.
2C1E
LD HL,0000H 21 00 00
Load Register Pair HL with 0000H, the running remainder, which the dividend is shifted up into a bit at a time.
2C21
LD A,11H 3E 11
Load Register A with 11H, seventeen, which is one more than the sixteen bits of quotient: the first pass shifts the dividend up without subtracting anything and the other sixteen each give a bit.
2C23
PUSH AF F5
Push Register AF, that count, which 2C38H brings back at the foot of the loop.
2C24
OR A B7
Set the flags from Register A with OR A, which clears the Carry Flag so that the first pass shifts a quotient bit of nothing in.
2C25
Jump to 2C30H, the shift at the foot of the loop, which is where the first pass begins, no subtraction being wanted before the dividend has been shifted up at all.
2C27
PUSH AF F5
The divisor tried against the remainder (2C27H), which 2C3AH comes back to: push Register AF, the count of passes left.
2C28
PUSH HL E5
Push Register Pair HL, the running remainder, which 2C2FH gives back when the subtraction borrows.
2C29
ADD HL,BC 09
Add Register Pair BC to Register Pair HL, the negated divisor, which takes the divisor off the remainder and sets the Carry Flag when it went through.
2C2A
Jump to 2C2FH on NC, the subtraction having borrowed and the divisor having been the larger: 2C2FH is the operand byte of the load at 2C2EH and stands there as a POP HL, which gives the remainder back with the Carry Flag still clear so that a quotient bit of nothing is shifted in.
2C2C
POP AF F1
Pop Register AF, the remainder 2C28H put down, which is thrown away into Register AF: the difference stands as the new remainder and the old one is not wanted.
2C2D
SCF 37
Set the Carry Flag, the quotient bit this pass has worked out, the subtraction having gone through.
2C2E
LD A,0E1H 3E E1
Load Register A with 0E1H, a value nothing reads and a load that changes no flag, so that the Carry Flag set above still stands: this instruction is here because its operand byte at 2C2FH reads as the POP HL of the restoring path.
2C30
RL E CB 13
The dividend and the quotient shifted up (2C30H), which 2C25H reaches on the first pass: rotate the byte in Register E left through the Carry Flag, the low byte of Register Pair DE, which takes the quotient bit in at the bottom.
2C32
RL D CB 12
Rotate the byte in Register D left through the Carry Flag, the high byte of Register Pair DE, which sends the dividend's top bit out into the Carry Flag.
2C34
RL L CB 15
Rotate the byte in Register L left through the Carry Flag, the low byte of the remainder, which takes that bit of the dividend in.
2C36
RL H CB 14
Rotate the byte in Register H left through the Carry Flag, the high byte of the remainder, so that the thirty two bits of Register Pair DE and Register Pair HL have all come up one place together.
2C38
POP AF F1
Pop Register AF, the count of passes 2C23H or 2C27H put down.
2C39
DEC A 3D
Decrement Register A, the count of passes left.
2C3A
Jump to 2C27H on NZ, passes being left, to try the divisor against the remainder again.
2C3C
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which puts the quotient into Register Pair HL and the remainder into Register Pair DE.
2C3D
POP BC C1
Pop Register Pair BC, the sign of the quotient 2C17H put down.
2C3E
PUSH DE D5
Push Register Pair DE, the remainder, which 2BE5H pops for the division and which MOD at 2C71H wants left in Register Pair DE.
2C3F
Jump to 2BE0H, the tail the integer multiplication uses as well, which weighs the magnitude against the integer range and gives it the sign in Register B.
2C41-2C44
DEFB 00H, 00H, 00H, 00H 00 00 00 00
Four bytes nothing reaches (2C41H to 2C44H), which stand between the jump at 2C3FH and the sign helper below it and decode as four NOPs. No instruction of this file or of the two modules of BASIC/CMD branches to any of the four, no word of the three images holds one of their addresses and no relative jump reaches them: they are padding and no more.
2C45
LD A,H 7C
The sign of an answer and both operands made positive (2C45H), which 2BC5H of the multiplication and 2C14H of the division call: load Register A from Register H, the high half of the value in Register Pair HL.
2C46
XOR D AA
Exclusive Or Register A with Register D, the high half of the value in Register Pair DE, which leaves bit 7 set only when the two operands differ in sign, and that is the sign of a product or a quotient.
2C47
LD B,A 47
Load Register B from Register A, that sign, which both callers keep across their loops and hand to 2C4DH at the end.
2C48
Call 2C4CH below, which makes the value in Register Pair HL positive and stores it into 72ECH as an integer, coming back here whichever sign it had.
2C4B
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which brings the other operand into Register Pair HL to be made positive and puts the first one into Register Pair DE.
2C4C
LD A,H 7C
One operand made positive (2C4CH), which 2C48H calls and which 2C4BH falls into for the second operand, the fall answering to 2C45H's own caller: load Register A from Register H, the high half of the value in Register Pair HL.
2C4D
OR A B7
The value stored with its sign (2C4DH), which 2BE7H of the multiplication and 2C7FH of MOD reach with the sign in Register A: set the flags from Register A with OR A, which brings bit 7 of that byte into the Sign Flag.
2C4E
Jump to 2A53H on P, the sign being positive: Register Pair HL is stored into 72ECH as an integer and 02H written into the type at 7142H.
2C51
XOR A AF
Register Pair HL negated and stored (2C51H), which 2B97H of the subtraction, 2C19H of the division and 2C5EH of the negate all call: clear Register A with XOR A, nothing for the subtraction below to take the low half from.
2C52
LD C,A 4F
Load Register C from Register A, 00H, which is the byte 2B9AH of the subtraction reads back when this routine returns.
2C53
SUB L 95
Subtract Register L from Register A, the low half of the value, which negates it and sets the Carry Flag whenever it held anything.
2C54
LD L,A 6F
Load Register L from Register A, the negated low half.
2C55
LD A,C 79
Load Register A from Register C, 00H again, for the half above.
2C56
SBC A,H 9C
Subtract Register H from Register A with the Carry Flag, the high half of the value, which finishes the two's complement and leaves the Carry Flag set unless the whole of the value was nothing.
2C57
LD H,A 67
Load Register H from Register A, the negated high half.
2C58
Jump to 2A53H, which stores Register Pair HL into 72ECH as an integer and writes 02H into the type, and returns to this routine's caller from there with the Carry Flag as the negation left it.
2C5B
LD HL,(72ECH) 2A EC 72
An integer negated in the accumulator (2C5BH), which 28EDH of the negate jumps to for an integer: load Register Pair HL with the word at 72ECH, the two bytes an integer is kept in.
2C5E
Call 2C51H, which negates that integer and stores it back into 72ECH, the type standing at an integer already.
2C61
LD A,H 7C
Load Register A from Register H, the high half of the negated value.
2C62
XOR 80H EE 80
Exclusive Or Register A with 80H, which leaves 00H only when that half was exactly 80H.
2C64
OR L B5
Or Register A with Register L, the low half, so that the Zero Flag is set only when the negated value is 8000H, which happens for the one integer whose negative will not fit: minus 32768.
2C65
RET NZ C0
Return with NZ, the negation having fitted, with the answer standing in the accumulator as an integer.
2C66
EX DE,HL EB
An unsigned sixteen bit value made single precision (2C66H), which 5F29H and 7700H of module 1 jump to and 750DH calls, a line number of 40000 and a count above 32767 both wanting to come out positive, and which 2C65H falls into for minus 32768 negated: exchange Register Pair DE with Register Pair HL, which puts the value into Register Pair DE, the two low bytes of the mantissa.
2C67
Call 2AACH, which writes 04H into the type at 7142H, the value becoming single precision.
2C6A
XOR A AF
Clear Register A with XOR A, 00H, the top byte of the mantissa: nothing above the sixteen bits is what makes this widening unsigned where 2A8AH's is signed.
2C6B
LD B,98H 06 98
The same with the top byte given (2C6BH), which 2BB8H of the integer addition reaches with a sign extension byte in Register A: load Register B with 98H, which is 128 and 24, the exponent of a value whose binary point stands below the lowest of twenty four bits.
2C6D
Jump to 28D8H, which writes that exponent, puts the sign in 72F0H and carries the mantissa up until its top bit stands where the format wants it, answering to this routine's caller.
2C70
PUSH DE D5
MOD (2C70H), which 76BDH of the evaluator jumps to, 62FEH of TAB( calls so that a column past the end of the line wraps round, and 7DDCH of ROW calls: push Register Pair DE, the dividend, which 2C7EH brings back for its sign alone.
2C71
Call 2C0FH above, the division, which leaves the quotient in the accumulator and the remainder of the two magnitudes in Register Pair DE, doubled, the loop having run one pass more than the sixteen bits of quotient.
2C74
XOR A AF
Clear Register A with XOR A, nothing to add the high half of the remainder to, which also clears the Carry Flag so that the shift below brings a nothing in at the top.
2C75
ADD A,D 82
Add Register D to Register A, the high half of the doubled remainder, which leaves it in Register A with the Carry Flag clear.
2C76
RRA 1F
Rotate Register A right through the Carry Flag, which halves that half and sends its bit 0 out into the Carry Flag.
2C77
LD H,A 67
Load Register H from Register A, the halved high half of the remainder.
2C78
LD A,E 7B
Load Register A from Register E, the low half of the doubled remainder.
2C79
RRA 1F
Rotate Register A right through the Carry Flag, which halves it and takes in the bit that fell out of the half above.
2C7A
LD L,A 6F
Load Register L from Register A, the halved low half, so that Register Pair HL holds the true remainder.
2C7B
Call 2A56H, which loads Register A with 02H and writes it into the type at 7142H, so that the answer is an integer.
2C7E
POP AF F1
Pop Register AF, the dividend 2C70H put down, which brings its high half into Register A: MOD takes the sign of the dividend and not the sign of the quotient.
2C7F
Jump to 2C4DH, which stores Register Pair HL as an integer for a positive dividend and negates it first for a negative one.
2C81
LD HL,72FBH 21 FB 72
The double precision subtraction (2C81H), the second word of the double precision operator table at 6B5FH: load Register Pair HL with 72FBH, the top byte of the second accumulator's mantissa, which carries the sign of the right hand operand.
2C84
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72FBH, that top byte.
2C85
XOR 80H EE 80
Exclusive Or Register A with 80H, which turns bit 7 over and so turns the sign of the right hand operand over.
2C87
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, 72FBH, that top byte with its sign turned over, and fall into the double precision addition at 2C88H, which adds the second accumulator to the accumulator and is the first address of the part of this file still to be written.

2C88H - The Double Precision Addition, the Normalise, the Round and the Pack (2C88H-2D7CH)

The double precision addition is the single precision one over again in fifty six bits instead of twenty four, and every step of it has a counterpart at 2622H: the exponents are lined up, the smaller value is shifted right, the mantissas are added or taken one from the other, what comes out is normalised, rounded and packed. Two things are done differently because seven bytes will not fit in registers. The two values change places in store and not in registers, 2CA3H to 2CABH exchanging all eight bytes of the accumulator with all eight of the second accumulator when the accumulator is the smaller, which costs sixteen loads and leaves the registers free. And the add and the subtract are one loop that writes its own instruction: 2D53H and 2D55H store an opcode into 2D62H, 8EH for ADC A,(HL) and 9EH for SBC A,(HL), so that seven bytes are added or taken away by the same seven instructions. 3574H and 357CH of the number formatter hand that routine its opcode themselves, which is the clearest proof of what the patch is for. The round byte of a double precision value is the guard byte at 72E7H, where a single precision value keeps it in Register B: 2CC0H clears it, 2CCFH and 2CD2H carry into it what the shift pushed out of the second accumulator, and 2D28H reads its bit 7 for the rounding. The normalise at 2CEFH walks whole bytes up at 2CF7H and single bits at 2D0DH, as 2671H does, and stops at a count of thirty two bytes' worth of places with the answer set to nothing.

2C88
LD HL,72FCH 21 FC 72
The double precision addition (2C88H), the first word of the double precision operator table at 6B5DH, which 306BH of the number reader calls and 2610H, 2A0AH, 2E31H, 2E46H and 2F06H of this file: load Register Pair HL with 72FCH, the exponent of the second accumulator, where the right hand operand of every double precision operator stands.
2C8B
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72FCH, that exponent.
2C8C
OR A B7
Set the flags from Register A with OR A, which gives Z when the right hand operand is nothing.
2C8D
RET Z C8
Return with Z, that operand being nothing, which leaves the accumulator standing as the sum already.
2C8E
LD B,A 47
Load Register B from Register A, that exponent, which the difference below is taken with.
2C8F
DEC HL 2B
Decrement Register Pair HL to 72FBH, the top byte of the second accumulator's mantissa, which carries its sign in bit 7.
2C90
LD C,(HL) 4E
Load Register C with the byte Register Pair HL addresses, 72FBH, that top byte, which 2953H reads the sign out of and gives its leading one back to.
2C91
LD DE,72EFH 11 EF 72
Load Register Pair DE with 72EFH, the exponent of the accumulator, which the exchange below walks down from.
2C94
LD A,(DE) 1A
Load Register A with the byte Register Pair DE addresses, 72EFH, the accumulator's exponent.
2C95
OR A B7
Set the flags from Register A with OR A, which gives Z when the accumulator is nothing.
2C96
Jump to 2968H on Z, the accumulator being nothing: that routine loads it from the second accumulator, which is the sum, and returns to this routine's caller.
2C99
SUB B 90
Subtract Register B from Register A, the second accumulator's exponent from the accumulator's, which says which of the two is the larger and by how many powers of two.
2C9A
Jump to 2CB2H on NC, the accumulator standing at or above the second accumulator, so that the second accumulator is the one to be shifted down.
2C9C
CPL 2F
Complement Register A, every bit of it, the first half of turning that difference the other way about.
2C9D
INC A 3C
Increment Register A, which finishes the two's complement and leaves the difference as a count of places again.
2C9E
PUSH AF F5
Push Register AF, that count, which 2CB1H brings back once the two values have changed places.
2C9F
LD C,08H 0E 08
Load Register C with 08H, the eight bytes of a double precision value, which the exchange below counts down.
2CA1
INC HL 23
Increment Register Pair HL to 72FCH, the exponent of the second accumulator, so that both pointers stand on the top byte of their own value.
2CA2
PUSH HL E5
Push Register Pair HL, 72FCH, which 2CADH brings back once the exchange has walked both pointers down.
2CA3
LD A,(DE) 1A
The two values exchanged (2CA3H): load Register A with the byte Register Pair DE addresses, one byte of the accumulator.
2CA4
LD B,(HL) 46
Load Register B with the byte Register Pair HL addresses, the byte of the second accumulator standing at the same place in it.
2CA5
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, which puts the accumulator's byte into the second accumulator.
2CA6
LD A,B 78
Load Register A from Register B, the second accumulator's own byte.
2CA7
LD (DE),A 12
Store Register A into the byte Register Pair DE addresses, which puts it into the accumulator and completes the exchange of that one byte.
2CA8
DEC DE 1B
Decrement Register Pair DE to the next byte of the accumulator down.
2CA9
DEC HL 2B
Decrement Register Pair HL to the next byte of the second accumulator down.
2CAA
DEC C 0D
Decrement Register C, one byte fewer left to exchange.
2CAB
Jump to 2CA3H on NZ, bytes being left, so that all eight of each are exchanged and the larger value is now the accumulator.
2CAD
POP HL E1
Pop Register Pair HL, 72FCH, the exponent of the second accumulator 2CA2H put down.
2CAE
LD B,(HL) 46
Load Register B with the byte Register Pair HL addresses, 72FCH, which is now the exponent of the smaller of the two values.
2CAF
DEC HL 2B
Decrement Register Pair HL to 72FBH, the top byte of its mantissa.
2CB0
LD C,(HL) 4E
Load Register C with the byte Register Pair HL addresses, 72FBH, that top byte, which 2953H wants in Register C.
2CB1
POP AF F1
Pop Register AF, the count of places 2C9EH put down.
2CB2
CP 39H FE 39
The difference judged (2CB2H), which 2C9AH reaches: compare Register A with 39H, fifty seven, one more than the fifty six bits a double precision mantissa has.
2CB4
RET NC D0
Return with NC, the difference standing at fifty seven or more, where every bit of the smaller value falls off the bottom of the mantissa and the larger value is the sum.
2CB5
PUSH AF F5
Push Register AF, the count of places, which the call below writes over and 2CC3H brings back.
2CB6
Call 2953H, which puts the implied leading one back into the top byte at 72EEH and into Register C, takes the sign out of both and leaves bit 7 of Register A set when the two signs are alike, with Register Pair HL on 72F0H.
2CB9
LD HL,72F4H 21 F4 72
Load Register Pair HL with 72F4H, the guard byte standing below the second accumulator, which the shift pushes the bits that fall out of its mantissa into.
2CBC
LD B,A 47
Load Register B from Register A, the byte whose bit 7 says whether the two signs are alike, which 2CCAH reads back.
2CBD
LD A,00H 3E 00
Load Register A with 00H, the byte both of the guards below are to be given.
2CBF
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, 72F4H, so that the second accumulator's guard byte starts at nothing.
2CC0
LD (72E7H),A 32 E7 72
Store Register A into the byte at 72E7H, the guard byte below the accumulator, which is where a double precision addition keeps its round byte where a single precision one keeps it in Register B.
2CC3
POP AF F1
Pop Register AF, the count of places 2CB5H put down, which the shift below is given in Register A.
2CC4
LD HL,72FBH 21 FB 72
Load Register Pair HL with 72FBH, the top byte of the second accumulator's mantissa, which the shift is given in Register Pair HL.
2CC7
Call 2D7DH, which writes Register C back into that top byte and then carries the second accumulator's eight bytes down the count of places in Register A, whole bytes first and single bits after.
2CCA
LD A,B 78
Load Register A from Register B, the byte 2CBCH kept, whose bit 7 says whether the two signs are alike.
2CCB
OR A B7
Set the flags from Register A with OR A, which brings that bit into the Sign Flag.
2CCC
Jump to 2CE4H on P, bit 7 being clear and the two signs differing, where the shifted value is taken from the accumulator instead of added to it.
2CCF
LD A,(72F4H) 3A F4 72
Load Register A with the byte at 72F4H, the second accumulator's guard byte, which holds the bits the shift pushed off the bottom of its mantissa.
2CD2
LD (72E7H),A 32 E7 72
Store Register A into the byte at 72E7H, the accumulator's guard byte, so that the bits the smaller value lost stand where the rounding at 2D28H reads them.
2CD5
Call 2D53H, which loads Register A with 8EH, the opcode of ADC A,(HL), writes it into its own instruction at 2D62H and adds the second accumulator's seven mantissa bytes into the accumulator's.
2CD8
Jump to 2D25H on NC, nothing having carried out of the top of the fifty six bits, where the sum is rounded and packed as it stands.
2CDA
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which brings 72EFH, the accumulator's exponent, into Register Pair HL: 2D53H left Register Pair DE one byte past the seven it wrote.
2CDB
INC (HL) 34
Increment the byte Register Pair HL addresses, 72EFH, the exponent raised by one to make room for the bit that carried out of the mantissa.
2CDC
JP Z,30ACH CA AC 30
Jump to 30ACH on Z, that exponent having wrapped from 0FFH to 00H: the Overflow of module 1 by the door that takes the sign from 72F0H and turns it over, 72F0H holding the complement of the sign.
2CDF
Call 2DA4H, which carries the accumulator's eight bytes down one place so that the bit which carried out stands inside the mantissa again.
2CE2
Jump to 2D25H, the round and the pack, with the mantissa shifted down and the exponent raised to match.
2CE4
LD A,9EH 3E 9E
The subtraction of two unlike signs (2CE4H), which 2CCCH reaches: load Register A with 9EH, the opcode of SBC A,(HL).
2CE6
Call 2D55H, which writes that opcode into 2D62H and takes the second accumulator's seven mantissa bytes from the accumulator's, leaving the borrow out of the top in the Carry Flag.
2CE9
LD HL,72F0H 21 F0 72
Load Register Pair HL with 72F0H, the byte above the accumulator, which carries the complement of the sign of the answer.
2CEC
Call 2D6AH on Carry, the subtraction having borrowed and the shifted value having been the larger: that routine negates all eight bytes and turns the sign at 72F0H over with them.
2CEF
XOR A AF
The double precision normalise (2CEFH), which 2B69H of INT and 2DE5H of the multiplication jump to: clear Register A with XOR A, the count of places shifted so far and the byte the byte shift below brings in at the bottom.
2CF0
LD B,A 47
The whole bytes walked up (2CF0H), which 2D08H comes back to: load Register B from Register A, the count of places shifted so far, which is kept in Register B while Register A is used for the test below.
2CF1
LD A,(72EEH) 3A EE 72
Load Register A with the byte at 72EEH, the top byte of the accumulator's mantissa.
2CF4
OR A B7
Set the flags from Register A with OR A, which gives Z when that byte is nothing and leaves its bit 7 in the Sign Flag.
2CF5
Jump to 2D15H on NZ, the top byte holding something, where the Sign Flag says whether the leading one is already in place or single bits have to be walked up.
2CF7
LD HL,72E7H 21 E7 72
Load Register Pair HL with 72E7H, the guard byte below the accumulator, which the byte shift below walks up from.
2CFA
LD C,08H 0E 08
Load Register C with 08H, the eight bytes the guard byte and the mantissa make between them.
2CFC
LD D,(HL) 56
The byte shift (2CFCH): load Register D with the byte Register Pair HL addresses, the byte about to be moved up one place.
2CFD
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, which is the byte that came from the place below, 00H on the first time round.
2CFE
LD A,D 7A
Load Register A from Register D, the byte just taken, which the next time round writes one place up.
2CFF
INC HL 23
Increment Register Pair HL to the next byte up.
2D00
DEC C 0D
Decrement Register C, one byte fewer left to move.
2D01
Jump to 2CFCH on NZ, bytes being left, so that all eight come up one byte and nothing comes in at the bottom.
2D03
LD A,B 78
Load Register A from Register B, the count of places shifted so far.
2D04
SUB 08H D6 08
Subtract 08H from Register A, eight places, so that the count stands as the negative of how far the value has come up.
2D06
CP 0C0H FE C0
Compare Register A with 0C0H, sixty four places down, which is what the count reaches when all eight bytes have been walked through and the value is nothing.
2D08
Jump to 2CF0H on NZ, fewer than sixty four places having been walked, to look at the top byte again.
2D0A
Jump to 2684H, which sets the accumulator to nothing by writing 00H into its exponent: every bit of the mantissa was nothing.
2D0D
DEC B 05
The single bits walked up (2D0DH), which 2D15H reaches: decrement Register B, the count of places, for the place about to be shifted.
2D0E
LD HL,72E7H 21 E7 72
Load Register Pair HL with 72E7H, the guard byte below the accumulator, which the shift below walks up from.
2D11
Call 2DABH, which carries the eight bytes from that address up one place through the Carry Flag and leaves Register A holding the top one.
2D14
OR A B7
Set the flags from Register A with OR A, which brings bit 7 of the top byte into the Sign Flag.
2D15
The leading one looked for (2D15H), which 2CF5H reaches: jump to 2D0DH on P, bit 7 of the top byte being clear and the leading one not yet in place.
2D18
LD A,B 78
Load Register A from Register B, the count of places the value came up, which stands as a negative number.
2D19
OR A B7
Set the flags from Register A with OR A, which gives Z when the value needed no shifting at all.
2D1A
Jump to 2D25H on Z, no place having been shifted, where the exponent stands as the addition left it.
2D1C
LD HL,72EFH 21 EF 72
Load Register Pair HL with 72EFH, the exponent of the accumulator, which the count is to be taken off.
2D1F
ADD A,(HL) 86
Add the byte Register Pair HL addresses to Register A, 72EFH, the exponent: the count being negative, this takes it off.
2D20
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, 72EFH, the exponent brought down by as many powers of two as the value came up.
2D21
Jump to 2684H on NC, the addition having borrowed and the exponent having gone below nothing, which sets the accumulator to nothing without a word to the user.
2D24
RET Z C8
Return with Z, the exponent having come to exactly 00H, which is the same underflow and the one value that stands for nothing.
2D25
LD A,(72E7H) 3A E7 72
The round and the pack (2D25H), which 2CD8H, 2CE2H and 2D1AH reach: load Register A with the byte at 72E7H, the guard byte, which holds the bits that fell below the mantissa.
2D28
OR A B7
The same with the round byte in hand (2D28H), which 2EC3H of the division reaches: set the flags from Register A with OR A, which brings bit 7 of that byte, the half, into the Sign Flag.
2D29
Call 2D37H on M, bit 7 of the guard byte being set and the part thrown away standing at a half or more, which carries the fifty six bits up by one.
2D2C
LD HL,72F0H 21 F0 72
Load Register Pair HL with 72F0H, the byte above the accumulator, which carries the complement of the sign of the answer.
2D2F
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72F0H, that complemented sign.
2D30
AND 80H E6 80
And Register A with 80H, which throws every bit but bit 7 away and leaves the complement of the sign on its own.
2D32
DEC HL 2B
Decrement Register Pair HL to 72EFH, the exponent of the answer, the first of the two steps down to the top byte of the mantissa.
2D33
DEC HL 2B
Decrement Register Pair HL a second time, to 72EEH, that top byte, whose bit 7 is the leading one.
2D34
XOR (HL) AE
Exclusive Or Register A with the byte Register Pair HL addresses, 72EEH: one against the complement of the sign gives the sign itself, which is what the packed format wants in bit 7.
2D35
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, 72EEH, the top byte packed, the sign in bit 7 and the leading one left out of it.
2D36
RET C9
Return to the caller with the answer in the accumulator.
2D37
LD HL,72E8H 21 E8 72
The fifty six bits carried up by one (2D37H), which 2D29H calls for the rounding and 2B60H of INT for the second half of its negative rounding: load Register Pair HL with 72E8H, the lowest byte of the mantissa, where the carry begins.
2D3A
LD B,07H 06 07
Load Register B with 07H, the seven bytes of the mantissa.
2D3C
INC (HL) 34
The carry (2D3CH): increment the byte Register Pair HL addresses, that byte of the mantissa.
2D3D
RET NZ C0
Return with NZ, the byte not having wrapped to 00H, the carry having gone no further than it.
2D3E
INC HL 23
Increment Register Pair HL to the next byte up, which the carry runs into.
2D3F
DEC B 05
Decrement Register B, one byte fewer left of the seven the mantissa has.
2D40
Jump to 2D3CH on NZ, bytes being left of the seven.
2D43
INC (HL) 34
Increment the byte Register Pair HL addresses, 72EFH, the exponent: all fifty six bits were ones and the mantissa has come up to exactly one half with one more power of two above it.
2D44
JP Z,30ACH CA AC 30
Jump to 30ACH on Z, that exponent having wrapped from 0FFH to 00H, which is the Overflow of module 1.
2D47
DEC HL 2B
Decrement Register Pair HL to 72EEH, the top byte of the mantissa.
2D48
LD (HL),80H 36 80
Store 80H into the byte Register Pair HL addresses, 72EEH, the leading one on its own, which with the exponent one larger is the value the carry out of the mantissa wants.
2D4A
RET C9
Return to the caller with the mantissa carried up.
2D4B
LD DE,7318H 11 18 73
The seven bytes run against the third working area (2D4BH), which 2EACH and 2EB6H of the division call with the opcode already in Register A: load Register Pair DE with 7318H, the lowest byte of the eight byte area at 7318H to 731FH that only this file uses, which is where the division keeps its remainder.
2D4E
LD HL,72F5H 21 F5 72
Load Register Pair HL with 72F5H, the lowest byte of the second accumulator's mantissa, which holds the divisor.
2D51
Jump to 2D5BH, the count and the patch below, past the two loads that set the other pair of addresses.
2D53
LD A,8EH 3E 8E
The seven bytes added (2D53H), which 2CD5H of the addition calls and 2DD5H of the multiplication: load Register A with 8EH, the opcode of ADC A,(HL), which is the instruction this routine writes into itself.
2D55
LD HL,72F5H 21 F5 72
The same with the opcode given (2D55H), which 2CE6H of the addition calls with 9EH in Register A for a subtraction: load Register Pair HL with 72F5H, the lowest byte of the second accumulator's mantissa.
2D58
LD DE,72E8H 11 E8 72
The same with Register Pair HL given (2D58H), which 3576H and 357EH of the number formatter call with the address of a seven byte power of ten in Register Pair HL and the opcode in Register A: load Register Pair DE with 72E8H, the lowest byte of the accumulator's mantissa, which is the value worked on.
2D5B
LD C,07H 0E 07
The count and the patch (2D5BH), which 2D51H reaches: load Register C with 07H, the seven bytes of a double precision mantissa.
2D5D
LD (2D62H),A 32 62 2D
Store Register A into the byte at 2D62H, which is the instruction in the middle of the loop below: the opcode written there is 8EH for an addition and 9EH for a subtraction, and that one byte is the whole of the difference between the two.
2D60
XOR A AF
Clear Register A with XOR A, which clears the Carry Flag so that the first of the seven bytes is added or taken with no carry or borrow coming in.
2D61
LD A,(DE) 1A
The loop (2D61H): load Register A with the byte Register Pair DE addresses, one byte of the value being worked on.
2D62
ADC A,(HL) 8E
Add the byte Register Pair HL addresses to Register A with the Carry Flag, or take it away with the Carry Flag, according to the opcode 2D5DH wrote into this very instruction.
2D63
LD (DE),A 12
Store Register A into the byte Register Pair DE addresses, that byte of the answer.
2D64
INC DE 13
Increment Register Pair DE to the next byte of the value up.
2D65
INC HL 23
Increment Register Pair HL to the next byte of the other value up.
2D66
DEC C 0D
Decrement Register C, one byte fewer left of the seven.
2D67
Jump to 2D61H on NZ, bytes being left of the seven, so that the whole mantissa is run through.
2D69
RET C9
Return to the caller with the seven bytes added or taken away, Register Pair DE one byte past the answer and the carry or the borrow out of the top in the Carry Flag.
2D6A
LD A,(HL) 7E
All eight bytes negated and the sign turned over (2D6AH), which 2CECH of the addition calls with Register Pair HL on 72F0H: load Register A with the byte Register Pair HL addresses, 72F0H, the complement of the sign of the answer.
2D6B
CPL 2F
Complement Register A, every bit of it, which turns the sign of the answer the other way about, the value taken away having been the larger of the two.
2D6C
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, 72F0H, the sign of the answer turned over.
2D6D
LD HL,72E7H 21 E7 72
Load Register Pair HL with 72E7H, the guard byte below the accumulator, the lowest of the eight bytes to be negated.
2D70
LD B,08H 06 08
Load Register B with 08H, those eight bytes, the guard byte and the seven of the mantissa.
2D72
XOR A AF
Clear Register A with XOR A, which clears the Carry Flag so that the lowest byte is taken from nothing with no borrow coming in.
2D73
LD C,A 4F
Load Register C from Register A, 00H, which keeps a nothing for the loop below to load from.
2D74
LD A,C 79
The loop (2D74H): load Register A from Register C, 00H, nothing for this byte to be taken from.
2D75
SBC A,(HL) 9E
Subtract the byte Register Pair HL addresses from Register A with the Carry Flag, that byte of the value, which negates it and carries the borrow on.
2D76
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, that byte negated.
2D77
INC HL 23
Increment Register Pair HL to the next byte up.
2D78
DEC B 05
Decrement Register B, one byte fewer left of the eight.
2D79
Jump to 2D74H on NZ, bytes being left, so that all eight are the two's complement of what they were.
2D7C
RET C9
Return to the caller with the value negated and the sign at 72F0H turned over to match it.

2D7DH - The Shifts and the Double Precision Multiplication (2D7DH-2DEFH)

Three shifts and the multiplication that uses them all. 2D7DH carries eight bytes down by a count in Register A, whole bytes at 2D84H and single bits at 2D98H, exactly as 26F1H does for twenty four bits; 2DA4H is the one place entry the addition and the multiplication both want; 2DABH carries eight bytes up one place and 2DADH is the same with the count already in Register C, which the division calls with seven. The multiplication at 2DB5H has nowhere to keep the two values but store, so 2EE2H moves the accumulator's seven mantissa bytes down to the third working area at 7318H and clears the accumulator to hold the running product, leaving the other operand in the second accumulator to be added in. The multiplier is then read a byte at a time out of 7318H and a bit at a time out of Register A, the second accumulator added at 2DD5H whenever a bit is set and the product carried down one place at 2DD8H every time round, which is fifty six adds and fifty six shifts at worst. A multiplier byte of nothing costs one shift instead of eight, 2DCEH sending it to 2DE8H, which carries the product down a whole byte through 2D84H and comes straight back. The normalise at 2CEFH is reached by a jump at 2DE5H and answers to the multiplication's own caller.

2D7D
LD (HL),C 71
Eight bytes carried down (2D7DH), which 2CC7H of the addition calls with Register Pair HL on 72FBH and 2B5CH of INT with it on 72EEH, the count of places standing in Register A: store Register C into the byte Register Pair HL addresses, the top byte of the mantissa with its leading one in place, which 2953H left in Register C.
2D7E
PUSH HL E5
Push Register Pair HL, that top byte's address, which the two loops below take back each time round.
2D7F
SUB 08H D6 08
Whole bytes taken off the count (2D7FH), which 2D8FH comes back to: subtract 08H from Register A, eight places.
2D81
Jump to 2D91H on Carry, fewer than eight places being left, where the rest is carried down a bit at a time.
2D83
POP HL E1
Pop Register Pair HL, the top byte's address, so that the byte move below begins at the top of the value.
2D84
PUSH HL E5
The byte move (2D84H), which 2DEBH of the multiplication calls on its own: push Register Pair HL, the top byte's address, which 2D83H or 2D95H takes back.
2D85
LD DE,0800H 11 00 08
Load Register Pair DE with 0800H, Register D the count of eight bytes and Register E the 00H that comes in at the top where nothing stands above the value.
2D88
LD C,(HL) 4E
One byte moved (2D88H): load Register C with the byte Register Pair HL addresses, the byte standing there now.
2D89
LD (HL),E 73
Store Register E into the byte Register Pair HL addresses, the byte that stood one place above it, or 00H at the top of the value.
2D8A
LD E,C 59
Load Register E from Register C, the byte just taken, which the next time round writes one place down.
2D8B
DEC HL 2B
Decrement Register Pair HL to the next byte down.
2D8C
DEC D 15
Decrement Register D, one byte fewer left of the eight.
2D8D
Jump to 2D88H on NZ, bytes being left, so that all eight come down one byte and the lowest falls out of the value altogether.
2D8F
Jump to 2D7FH, which takes another eight places off the count and looks again.
2D91
ADD A,09H C6 09
The places left (2D91H), which 2D81H reaches with the count eight below nothing: add 09H to Register A, which brings it back above nothing and leaves it one more than the number of places still to carry.
2D93
LD D,A 57
Load Register D from Register A, that count, which the bit loop below counts down.
2D94
XOR A AF
The count counted down (2D94H), which 2DA2H comes back to: clear Register A with XOR A, which clears the Carry Flag so that the next place brings a nothing in at the top.
2D95
POP HL E1
Pop Register Pair HL, the top byte's address, so that the bit shift below begins at the top of the value.
2D96
DEC D 15
Decrement Register D, the count of places left to shift.
2D97
RET Z C8
Return with Z, every place having been shifted, with the value carried down where the exponents agree.
2D98
PUSH HL E5
One bit of all eight bytes (2D98H), which 2DA9H reaches: push Register Pair HL, the top byte's address, which 2D95H takes back.
2D99
LD E,08H 1E 08
Load Register E with 08H, the eight bytes the shift runs through.
2D9B
LD A,(HL) 7E
One byte shifted (2D9BH): load Register A with the byte Register Pair HL addresses, that byte of the value.
2D9C
RRA 1F
Rotate Register A right through the Carry Flag, which halves it and takes in the bit that fell out of the byte above.
2D9D
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, that byte halved.
2D9E
DEC HL 2B
Decrement Register Pair HL to the next byte down.
2D9F
DEC E 1D
Decrement Register E, one byte fewer left of the eight.
2DA0
Jump to 2D9BH on NZ, bytes being left, so that the whole value comes down one place and the bit that falls out of the lowest byte is lost.
2DA2
Jump to 2D94H, which takes one off the count of places and goes round again.
2DA4
LD HL,72EEH 21 EE 72
One place only (2DA4H), which 2CDFH of the addition calls when the mantissa carries out of its top and 2DD8H of the multiplication every time round its loop: load Register Pair HL with 72EEH, the top byte of the accumulator's mantissa.
2DA7
LD D,01H 16 01
Load Register D with 01H, one place, which the bit loop below decrements once and finds nothing.
2DA9
Jump to 2D98H, the bit shift above, which carries all eight bytes of the accumulator down one place.
2DAB
LD C,08H 0E 08
Eight bytes carried up one place (2DABH), which 2D11H of the normalise calls and 2ED2H of the division: load Register C with 08H, the eight bytes the shift runs through.
2DAD
LD A,(HL) 7E
The same with the count given (2DADH), which 2ECCH of the division calls with 07H in Register C, the quotient having no guard byte to shift: load Register A with the byte Register Pair HL addresses, one byte of the value.
2DAE
RLA 17
Rotate Register A left through the Carry Flag, which doubles it and takes in the bit that fell out of the byte below.
2DAF
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, that byte doubled.
2DB0
INC HL 23
Increment Register Pair HL to the next byte up.
2DB1
DEC C 0D
Decrement Register C, one byte fewer left to shift.
2DB2
Jump to 2DADH on NZ, bytes being left, so that the whole value goes up one place with Register A holding the top byte at the end of it.
2DB4
RET C9
Return to the caller with the value doubled and what fell out of its top byte standing in the Carry Flag.
2DB5
The double precision multiplication (2DB5H), the third word of the double precision operator table at 6B61H, which 34AFH of the number formatter calls and 2E10H of the division by ten reaches: call 28C4H, which answers the sign of the accumulator and gives Z when it holds nothing.
2DB8
RET Z C8
Return with Z, the accumulator being nothing, which is the product already.
2DB9
LD A,(72FCH) 3A FC 72
Load Register A with the byte at 72FCH, the exponent of the second accumulator, where the right hand operand stands.
2DBC
OR A B7
Set the flags from Register A with OR A, which gives Z when that operand is nothing.
2DBD
Jump to 2684H on Z, the right hand operand being nothing, which sets the accumulator to nothing: the product of anything and nothing is nothing.
2DC0
Call 2879H, the exponent of a double precision product, which adds the two exponents, gives Overflow if the sum is too large, puts the leading one back into both mantissas, leaves the sign of the product at 72F0H and comes back with Register Pair HL on 72EFH and Register C holding the second accumulator's top byte.
2DC3
Call 2EE2H, which writes Register C back into 72FBH, moves the accumulator's seven mantissa bytes down to 7318H to 731EH, clears the seven it moved them from and comes back with Register Pair HL on 72E7H and Register Pair DE on 7317H.
2DC6
LD (HL),C 71
Store Register C into the byte Register Pair HL addresses, 72E7H, 00H: that is the guard byte below the accumulator, which the running product needs clear because every shift of the loop carries bits down into it.
2DC7
INC DE 13
Increment Register Pair DE to 7318H, the lowest byte of the multiplier, which the loop reads from the bottom up.
2DC8
LD B,07H 06 07
Load Register B with 07H, the seven bytes of the multiplier.
2DCA
LD A,(DE) 1A
One byte of the multiplier (2DCAH), which 2DE2H comes back to: load Register A with the byte Register Pair DE addresses, that byte of the multiplier.
2DCB
INC DE 13
Increment Register Pair DE to the next byte of the multiplier up, which the next time round reads.
2DCC
OR A B7
Set the flags from Register A with OR A, which gives Z when that byte is nothing.
2DCD
PUSH DE D5
Push Register Pair DE, the pointer into the multiplier, which the additions below write over and 2DE0H brings back.
2DCE
Jump to 2DE8H on Z, the byte being nothing, which carries the running product down a whole byte without adding anything to it and is the whole of the work that byte wants.
2DD0
LD C,08H 0E 08
Load Register C with 08H, the eight bits of this byte of the multiplier.
2DD2
PUSH BC C5
One bit of the multiplier (2DD2H), which 2DDEH comes back to: push Register Pair BC, Register B the count of bytes left and Register C the count of bits left, which the addition below writes over.
2DD3
RRA 1F
Rotate Register A right through the Carry Flag, which brings the lowest bit of the multiplier byte out into the Carry Flag.
2DD4
LD B,A 47
Load Register B from Register A, the rest of the multiplier byte, which 2DDBH brings back after the two calls below have written over Register A.
2DD5
Call 2D53H on Carry, the multiplier's bit having been set, which writes the ADC A,(HL) opcode into 2D62H and adds the second accumulator's seven mantissa bytes into the running product.
2DD8
Call 2DA4H, which carries all eight bytes of the running product down one place, so that the next bit of the multiplier weighs twice as much as this one did.
2DDB
LD A,B 78
Load Register A from Register B, the rest of the multiplier byte 2DD4H kept.
2DDC
POP BC C1
Pop Register Pair BC, the two counts 2DD2H put down.
2DDD
DEC C 0D
Decrement Register C, one bit fewer left of the eight.
2DDE
Jump to 2DD2H on NZ, bits being left in this byte of the multiplier.
2DE0
POP DE D1
The byte finished (2DE0H), which 2DEEH reaches: pop Register Pair DE, the pointer into the multiplier 2DCDH put down.
2DE1
DEC B 05
Decrement Register B, one byte fewer left of the seven.
2DE2
Jump to 2DCAH on NZ, bytes being left in the multiplier.
2DE5
Jump to 2CEFH, the double precision normalise, which brings the product up until its top bit stands where the format wants it, rounds it, packs the sign in from 72F0H and answers to this routine's caller.
2DE8
LD HL,72EEH 21 EE 72
A multiplier byte of nothing (2DE8H), which 2DCEH reaches: load Register Pair HL with 72EEH, the top byte of the running product, which the byte move below begins at.
2DEB
Call 2D84H, which carries all eight bytes of the running product down one whole byte, eight places costing one call where the bit loop would have cost eight times round.
2DEE
Jump to 2DE0H, the foot of the byte loop, which takes the pointer back and goes on to the next byte of the multiplier.

2DF0H - The Two Constants of a Division by Ten (2DF0H-2DFFH)

Sixteen bytes and both of them are a ten, one as its reciprocal and one as itself, and the second of them is written so that the same bytes serve two precisions. 2DF0H to 2DF7H is one tenth in double precision, which 2E07H copies into the second accumulator and multiplies by when the value it is dividing is too small for the series below it. 2DF8H to 2DFFH is ten in double precision, and because a single precision value is the top four bytes of a double precision one, its top half at 2DFCH is ten in single precision as it stands, which is what 27E5H loads: one constant written once and read at either width. The four bytes at 2DF8H to 2DFBH are the part only the double precision form has and nothing in this file or in either module of BASIC/CMD reads the eight byte form, so those four bytes are the lowest half of a constant written in full and used by halves. These two are the only constants in the file outside the block at 2720H.

2DF0-2DF7
DEFB 0CDH, 0CCH, 0CCH, 0CCH, 0CCH, 0CCH, 4CH, 7DH CD CC CC CC CC CC 4C 7D
One tenth in double precision (2DF0H to 2DF7H), which 2E07H of the division by ten loads into Register Pair DE: the seven mantissa bytes run from the lowest at 2DF0H to the top at 2DF6H, whose bit 7 is the sign and is clear, so that with its leading one the mantissa is four fifths exactly to fifty six bits, and the exponent of 7DH at 2DF7H is three powers of two below one, which makes the value a tenth. The repeating 0CCH bytes and the 0CDH at the bottom are what a tenth looks like in binary: a fifth of a byte of ones, rounded up in its last place.
2DF8-2DFB
DEFB 00H, 00H, 00H, 00H 00 00 00 00
The lowest four bytes of ten in double precision (2DF8H to 2DFBH), which are nothing: the eight bytes from 2DF8H to 2DFFH are ten written out at the full width, and nothing in this file or in either module of BASIC/CMD loads that address, so these four are the half of the constant no reader asks for. They are not padding, their four neighbours above them being read at every division of a single precision value by ten.
2DFC-2DFF
DEFB 00H, 00H, 20H, 84H 00 00 20 84
Ten in single precision, and the top half of ten in double precision (2DFCH to 2DFFH), which 27E5H of the division by ten loads into Register Pair HL: the mantissa of 00H, 00H and 20H is five eighths once its leading one is put back, bit 7 of the 20H being the sign and clear, and the exponent of 84H is four powers of two above one, which makes the value ten exactly at either width.

2E00H - A Tenth, the Double Precision Division and the Mantissa Moved (2E00H-2EF6H)

2E00H divides by ten and it does it twice over, by two different methods, and which one it takes turns on the exponent alone. For a value whose exponent stands below 41H the second accumulator is loaded with the tenth at 2DF0H and the multiplication is entered, which is quick and carries the error of a tenth that cannot be written in binary. For every other value a series is worked out instead, and it is the neatest thing in the file: a tenth is three quarters, times sixteen fifteenths, divided by eight, and sixteen fifteenths is one plus a sixteenth plus a sixteenth squared and so on without end, so fifteen passes of 2E3FH to 2E51H, each of them dividing a running term by sixteen and adding it in, give the whole of it to better than two to the minus sixty four, which is finer than fifty six bits of mantissa can hold. The three quarters is made by two halvings and an addition at 2E22H to 2E31H, and the division by eight is the three decrements of the exponent at 2E53H, 2E56H and the fall into 2E59H. The series is additions only, so a negative value is made positive first and 2E1EH pushes 28F3H to turn the answer's sign back. The exponent test is what keeps the series honest: each pass takes four powers of two off the running term and fifteen passes take sixty, so a value whose exponent stands below 41H would see its later terms underflow to nothing at 2E67H and come out too small, and that is the value the constant is there for. 2E8CH is the double precision division, restoring division in fifty six bits with the remainder in the third working area at 7318H and the divisor in the second accumulator, and its restoring path is carried in an operand byte once more: 2EB9H clears the Carry Flag so that the JP C at 2EBAH can never be taken, and that jump's two operand bytes stand as the LD (DE),A at 2EBBH and the INC B at 2EBCH that 2EB2H reaches when the subtraction goes through. 2EE2H is what makes both the multiplication and the division possible: it moves the accumulator's seven mantissa bytes down to 7318H and clears the seven it took them from, so that the accumulator is free to hold a running product or a running quotient.

2E00
LD A,(72EFH) 3A EF 72
A double precision value divided by ten (2E00H), which 3004H of module 1 calls on PE, the single precision half of the same routine being 27E2H: load Register A with the byte at 72EFH, the exponent of the accumulator.
2E03
CP 41H FE 41
Compare Register A with 41H, sixty five, which is the smallest exponent the series below has room to work in: fifteen passes take sixty powers of two off the running term and the four halvings of the value itself take four more.
2E05
Jump to 2E12H on NC, the exponent standing at 41H or above, where the series gives the answer to the last bit the format holds.
2E07
LD DE,2DF0H 11 F0 2D
Load Register Pair DE with 2DF0H, the eight bytes of the double precision tenth, the value being too small for the series to work in.
2E0A
LD HL,72F5H 21 F5 72
Load Register Pair HL with 72F5H, the first byte of the second accumulator, where the right hand operand of a double precision operator stands.
2E0D
Call 2946H, which copies as many bytes as the type at 7142H asks for from Register Pair DE to Register Pair HL, which for a double precision value is all eight of them.
2E10
Jump to 2DB5H, the double precision multiplication, which multiplies the accumulator by that tenth and answers to this routine's caller: the answer carries the error of a tenth that cannot be written exactly in binary, and for a value this small that is better than letting the series underflow.
2E12
LD A,(72EEH) 3A EE 72
The series (2E12H), which 2E05H reaches: load Register A with the byte at 72EEH, the top byte of the accumulator's mantissa, whose bit 7 is the sign.
2E15
OR A B7
Set the flags from Register A with OR A, which brings that sign into the Sign Flag.
2E16
Jump to 2E22H on P, the value standing above nothing, which the series can be worked at as it is.
2E19
AND 7FH E6 7F
And Register A with 7FH, which throws the sign bit away and leaves the magnitude's own top seven bits.
2E1B
LD (72EEH),A 32 EE 72
Store Register A into the byte at 72EEH, the top byte with its sign taken off, so that the value is positive: the series adds and never takes away, and a negative value would have it adding magnitudes the wrong way about.
2E1E
LD HL,28F3H 21 F3 28
Load Register Pair HL with 28F3H, which turns the sign bit of the accumulator over.
2E21
PUSH HL E5
Push Register Pair HL, that address, so that it stands as the return of the whole series and the answer comes back negative, which is what a negative value divided by ten is.
2E22
Three quarters of the value (2E22H), which 2E16H reaches: call 2E59H, which takes one off the exponent and so halves the value.
2E25
LD DE,72E8H 11 E8 72
Load Register Pair DE with 72E8H, the first byte of the accumulator, which holds half the value.
2E28
LD HL,72F5H 21 F5 72
Load Register Pair HL with 72F5H, the first byte of the second accumulator, where that half is to be kept.
2E2B
Call 2946H, which copies all eight bytes of the accumulator into the second accumulator, so that both of them hold half the value.
2E2E
Call 2E59H, which takes one more off the accumulator's exponent and leaves a quarter of the value in it.
2E31
Call 2C88H, the double precision addition, which adds the half in the second accumulator to the quarter in the accumulator and leaves three quarters of the value there.
2E34
LD DE,72E8H 11 E8 72
Load Register Pair DE with 72E8H, the first byte of the accumulator, which holds those three quarters.
2E37
LD HL,72F5H 21 F5 72
Load Register Pair HL with 72F5H, the first byte of the second accumulator, where the running term of the series is kept.
2E3A
Call 2946H, which copies all eight bytes across, so that the running term begins as three quarters of the value and the running total holds the same.
2E3D
LD A,0FH 3E 0F
Load Register A with 0FH, fifteen, the number of terms of the series that are worked out: the sixteenth would be below two to the minus sixty four and no mantissa of fifty six bits can hold it.
2E3F
PUSH AF F5
One term (2E3FH), which 2E51H comes back to: push Register AF, the count of terms left, which the four calls below write over and 2E4FH brings back.
2E40
Call 2E61H, which takes four off the exponent of the second accumulator and so divides the running term by sixteen, returning early if the exponent reaches 00H.
2E43
Call 2E6CH, which puts the second accumulator's eight bytes on the stack as four words underneath its own return address, the addition below being about to write over it.
2E46
Call 2C88H, the double precision addition, which adds the running term to the running total in the accumulator.
2E49
LD HL,72FBH 21 FB 72
Load Register Pair HL with 72FBH, the top byte of the second accumulator's mantissa, which is of no account: the routine below loads Register Pair HL with 72FCH as its third instruction, so these three bytes change nothing and nothing reaches them on their own.
2E4C
Call 2E7CH, which takes those four words back off the stack into the second accumulator, so that the running term stands there for the next pass.
2E4F
POP AF F1
Pop Register AF, the count of terms left 2E3FH put down.
2E50
DEC A 3D
Decrement Register A, one term fewer left of the fifteen.
2E51
Jump to 2E3FH on NZ, terms being left, so that the running total comes to three quarters of the value times sixteen fifteenths.
2E53
Call 2E59H, which takes one off the exponent and halves the total, the first of the three halvings that divide by eight.
2E56
Call 2E59H, which halves the running total a second time, the third halving being the fall into that routine below.
2E59
LD HL,72EFH 21 EF 72
The exponent brought down one (2E59H), which 2E22H, 2E2EH, 2E53H and 2E56H call and which the fall from 2E56H runs a third time for the division by eight: load Register Pair HL with 72EFH, the exponent of the accumulator.
2E5C
DEC (HL) 35
Decrement the byte Register Pair HL addresses, 72EFH, that exponent, which halves the value.
2E5D
RET NZ C0
Return with NZ, the exponent not having reached 00H, with the value halved: entered by the fall from 2E56H this return goes to the caller of the division by ten, or to the 28F3H 2E21H pushed for a negative value.
2E5E
Jump to 2684H, which sets the accumulator to nothing, the exponent having come down to 00H and the value having underflowed.
2E61
LD HL,72FCH 21 FC 72
The running term divided by sixteen (2E61H), which 2E40H is the only instruction to call: load Register Pair HL with 72FCH, the exponent of the second accumulator.
2E64
LD A,04H 3E 04
Load Register A with 04H, four powers of two, which is a sixteenth.
2E66
DEC (HL) 35
The loop (2E66H): decrement the byte Register Pair HL addresses, 72FCH, that exponent.
2E67
RET Z C8
Return with Z, the exponent having reached 00H and the term having underflowed to nothing, which leaves the addition at 2E46H with nothing to add and is why 2E03H keeps small values away from the series.
2E68
DEC A 3D
Decrement Register A, one power of two fewer left of the four.
2E69
Jump to 2E66H on NZ, powers of two being left.
2E6B
RET C9
Return to the caller with the running term a sixteenth of what it was.
2E6C
POP DE D1
The second accumulator put on the stack (2E6CH), which 2E43H is the only instruction to call: pop Register Pair DE, this routine's own return address, which has to come off before the eight bytes go on and 2E7AH puts back.
2E6D
LD A,04H 3E 04
Load Register A with 04H, the four words the eight bytes make.
2E6F
LD HL,72F5H 21 F5 72
Load Register Pair HL with 72F5H, the first byte of the second accumulator, which the loop below reads upward from.
2E72
LD C,(HL) 4E
One word taken (2E72H): load Register C with the byte Register Pair HL addresses, the low half of this word.
2E73
INC HL 23
Increment Register Pair HL to the byte above it.
2E74
LD B,(HL) 46
Load Register B with the byte Register Pair HL addresses, the high half of this word.
2E75
INC HL 23
Increment Register Pair HL to the first byte of the next word.
2E76
PUSH BC C5
Push Register Pair BC, that word, on to the stack.
2E77
DEC A 3D
Decrement Register A, one word fewer left of the four.
2E78
Jump to 2E72H on NZ, words being left of the four the eight bytes make.
2E7A
PUSH DE D5
Push Register Pair DE, this routine's own return address, back on top of the four words it has just put down.
2E7B
RET C9
Return to the caller with the second accumulator standing on the stack and the second accumulator itself free to be written over.
2E7C
POP DE D1
The second accumulator taken off the stack (2E7CH), which 2E4CH is the only instruction to call: pop Register Pair DE, this routine's own return address, which stands above the four words.
2E7D
LD A,04H 3E 04
Load Register A with 04H, the four words the eight bytes of the second accumulator make between them.
2E7F
LD HL,72FCH 21 FC 72
Load Register Pair HL with 72FCH, the exponent of the second accumulator, the top of the eight bytes, which the loop below writes downward from.
2E82
POP BC C1
One word put back (2E82H): pop Register Pair BC, the word 2E76H put down, Register B its high half and Register C its low half.
2E83
LD (HL),B 70
Store Register B into the byte Register Pair HL addresses, the high half of this word of the second accumulator.
2E84
DEC HL 2B
Decrement Register Pair HL to the byte below it.
2E85
LD (HL),C 71
Store Register C into the byte Register Pair HL addresses, its low half.
2E86
DEC HL 2B
Decrement Register Pair HL to the top byte of the next word down.
2E87
DEC A 3D
Decrement Register A, one word fewer left of the four.
2E88
Jump to 2E82H on NZ, words being left of the four that stand on the stack.
2E8A
PUSH DE D5
Push Register Pair DE, this routine's own return address, back on to the stack now that the four words are off it.
2E8B
RET C9
Return to the caller with the second accumulator holding what it held before the addition wrote over it.
2E8C
LD A,(72FCH) 3A FC 72
The double precision division (2E8CH), the fourth word of the double precision operator table at 6B63H: load Register A with the byte at 72FCH, the exponent of the second accumulator, which holds the divisor.
2E8F
OR A B7
Set the flags from Register A with OR A, which gives Z when the divisor is nothing.
2E90
JP Z,30B9H CA B9 30
Jump to 30B9H on Z, the divisor being nothing, which is the Division by zero of module 1 by the door that takes the sign of the result from 72EEH.
2E93
LD A,(72EFH) 3A EF 72
Load Register A with the byte at 72EFH, the exponent of the accumulator, which holds the dividend.
2E96
OR A B7
Set the flags from Register A with OR A, which gives Z when the dividend is nothing.
2E97
Jump to 2684H on Z, the dividend being nothing, which sets the accumulator to nothing: nothing divided by anything is nothing.
2E9A
Call 2876H, the exponent of a double precision quotient, which takes the divisor's exponent from the dividend's, gives Overflow if what comes out is too large, puts the leading one back into both mantissas, leaves the sign of the quotient at 72F0H and comes back with Register Pair HL on 72EFH and Register C holding the divisor's top byte.
2E9D
INC (HL) 34
Increment the byte Register Pair HL addresses, 72EFH, the exponent of the quotient: the complement at 288BH leaves the difference one too small and this increment puts that right.
2E9E
INC (HL) 34
Increment the byte Register Pair HL addresses, 72EFH, a second time, which is the one power of two the quotient of two normalised mantissas needs, both of them standing at one half or more and below one.
2E9F
JP Z,30ACH CA AC 30
Jump to 30ACH on Z, that exponent having wrapped from 0FFH to 00H on either increment, which is the Overflow of module 1.
2EA2
Call 2EE2H, which writes Register C back into 72FBH, moves the dividend's seven mantissa bytes down to 7318H to 731EH where the remainder is to be worked on, and clears the accumulator's seven to hold the running quotient.
2EA5
LD HL,731FH 21 1F 73
Load Register Pair HL with 731FH, the eighth and highest byte of that working area, which stands above the seven the dividend was moved into.
2EA8
LD (HL),C 71
Store Register C into the byte Register Pair HL addresses, 731FH, 00H, so that the remainder begins with nothing above its fifty six bits.
2EA9
LD B,C 41
Load Register B from Register C, 00H, which is the count of quotient bits that have come up and stays at nothing until the first of them does.
2EAA
LD A,9EH 3E 9E
The divisor tried against the remainder (2EAAH), which 2ED7H and 2EDDH come back to: load Register A with 9EH, the opcode of SBC A,(HL), which is what the routine below writes into itself.
2EAC
Call 2D4BH, which takes the divisor's seven mantissa bytes at 72F5H from the remainder's seven at 7318H and comes back with Register Pair DE on 731FH and the borrow out of the top in the Carry Flag.
2EAF
LD A,(DE) 1A
Load Register A with the byte Register Pair DE addresses, 731FH, the eighth byte of the remainder, which the borrow runs into.
2EB0
SBC A,C 99
Subtract Register C from Register A with the Carry Flag, 00H, which does no more than carry that borrow into the eighth byte.
2EB1
CCF 3F
Complement the Carry Flag, which turns the borrow into its opposite, so that the Carry Flag now stands set when the subtraction went through.
2EB2
Jump to 2EBBH on Carry, the subtraction having gone through: 2EBBH is the first of the two operand bytes of the instruction at 2EBAH and stands there as a LD (DE),A, with an INC B at 2EBCH under it.
2EB4
LD A,8EH 3E 8E
Load Register A with 8EH, the opcode of ADC A,(HL), the subtraction having borrowed and the divisor having been the larger.
2EB6
Call 2D4BH, which writes that opcode into 2D62H and adds the divisor's seven bytes back into the remainder's, giving the remainder back as it was.
2EB9
XOR A AF
Clear Register A with XOR A, which is the eighth byte of the restored remainder and which clears the Carry Flag so that a quotient bit of nothing is shifted in.
2EBA
JP C,0412H DA 12 04
Jump to 0412H on Carry, which can never be taken, the instruction above having cleared the Carry Flag: the two bytes of its address are the LD (DE),A at 2EBBH and the INC B at 2EBCH that 2EB2H reaches, so the restoring path walks past them and the successful path runs them, which is the whole of how one quotient bit is told from the other.
2EBD
LD A,(72EEH) 3A EE 72
The quotient looked at (2EBDH): load Register A with the byte at 72EEH, the top byte of the running quotient.
2EC0
INC A 3C
Increment Register A, the first of two instructions that set the Sign Flag from that byte while leaving the Carry Flag alone, neither INC nor DEC touching it.
2EC1
DEC A 3D
Decrement Register A, which gives the byte back as it was with the Sign Flag holding its bit 7 and the quotient bit still standing in the Carry Flag.
2EC2
RRA 1F
Rotate Register A right through the Carry Flag, which puts that quotient bit into bit 7 of Register A and leaves the Sign Flag as the instruction above set it.
2EC3
Jump to 2D28H on M, bit 7 of the quotient's top byte being set and the fifty six bits being full: that is the round and the pack of the addition, entered with the eighth byte of the quotient standing at 72E7H as the round byte.
2EC6
RLA 17
Rotate Register A left through the Carry Flag, which puts the newest quotient bit back into the Carry Flag, the quotient not yet being full.
2EC7
LD HL,72E8H 21 E8 72
Load Register Pair HL with 72E8H, the lowest byte of the running quotient, which the shift below walks up from.
2ECA
LD C,07H 0E 07
Load Register C with 07H, the seven bytes of the quotient's mantissa, the guard byte below it being no part of this shift.
2ECC
Call 2DADH, which carries those seven bytes up one place and takes the quotient bit in at the bottom.
2ECF
LD HL,7318H 21 18 73
Load Register Pair HL with 7318H, the lowest byte of the remainder, which its own shift walks up from.
2ED2
Call 2DABH, which carries all eight bytes of the remainder up one place, so that the divisor can be tried against it again.
2ED5
LD A,B 78
Load Register A from Register B, the count of quotient bits that have come up.
2ED6
OR A B7
Set the flags from Register A with OR A, which gives Z only while the quotient still stands at nothing.
2ED7
Jump to 2EAAH on NZ, the quotient having something in it, so that the places are counted by the quotient filling up and no counter is needed at all.
2ED9
LD HL,72EFH 21 EF 72
Load Register Pair HL with 72EFH, the exponent of the quotient, which comes down by one for every place shifted while the quotient stands at nothing.
2EDC
DEC (HL) 35
Decrement the byte Register Pair HL addresses, 72EFH, that exponent.
2EDD
Jump to 2EAAH on NZ, the exponent not having reached 00H, to try the divisor against the remainder again.
2EDF
Jump to 2684H, which sets the accumulator to nothing: the exponent came down to 00H before any bit of the quotient appeared and the quotient has underflowed.
2EE2
LD A,C 79
The mantissa moved to the third working area (2EE2H), which 2DC3H of the multiplication and 2EA2H of the division call with Register Pair HL on 72EFH and Register C holding the second accumulator's top byte: load Register A from Register C, that top byte with its leading one in place and its sign taken out.
2EE3
LD (72FBH),A 32 FB 72
Store Register A into the byte at 72FBH, the top byte of the second accumulator's mantissa, which 2953H left in Register C and never wrote back.
2EE6
DEC HL 2B
Decrement Register Pair HL to 72EEH, the top byte of the accumulator's mantissa, which the loop below reads downward from.
2EE7
LD DE,731EH 11 1E 73
Load Register Pair DE with 731EH, the seventh byte of the eight byte area at 7318H to 731FH that only this file uses, which the loop writes downward from.
2EEA
LD BC,0700H 01 00 07
Load Register Pair BC with 0700H, Register B the seven bytes of the mantissa and Register C the 00H the loop clears each byte with.
2EED
LD A,(HL) 7E
One byte moved (2EEDH): load Register A with the byte Register Pair HL addresses, that byte of the accumulator's mantissa.
2EEE
LD (DE),A 12
Store Register A into the byte Register Pair DE addresses, which puts it into the working area.
2EEF
LD (HL),C 71
Store Register C into the byte Register Pair HL addresses, 00H, which clears the byte it came from, so that the accumulator is left at nothing to hold a running product or a running quotient.
2EF0
DEC DE 1B
Decrement Register Pair DE to the next byte of the working area down.
2EF1
DEC HL 2B
Decrement Register Pair HL to the next byte of the mantissa down.
2EF2
Decrement Register B and jump to 2EEDH while it is not 00H, which moves all seven bytes.
2EF4
RET C9
Return to the caller with the mantissa standing at 7318H to 731EH, the accumulator clear, Register Pair HL on 72E7H and Register Pair DE on 7317H.
2EF5-2EF6
DEFB 00H, 00H 00 00
Two bytes nothing reaches (2EF5H to 2EF6H), which stand between the return above and 2EF7H and decode as two NOPs. No instruction of this file or of the two modules of BASIC/CMD branches to either, no word of the three images holds their address and no relative jump reaches them: they are the last two bytes of padding in the file.

2EF7H - Ten Times a Double Precision Value (2EF7H-2F0EH)

Ten times a value in four instructions and one addition, and the only reason it is not three is that the second accumulator has to be loaded first. 2970H copies the accumulator into the second accumulator and comes back with Register Pair HL one byte past the copy and Register Pair DE one byte past the original, so the exchange and the decrement at 2EFAH and 2EFBH leave Register Pair HL on 72EFH, the accumulator's own exponent. Two added to that exponent is four times the value, the addition at 2F06H then gives five times it, and the increment at 2F0AH gives ten. Both of the places the exponent could run past 0FFH are tested. 305EH of the number reader is the one instruction of module 1 that calls it, and 2FF3H of this file calls it for a double precision value where it calls 28ADH for a single precision one.

2EF7
Ten times a double precision value (2EF7H), which 305EH of the number reader calls and 2FF3H of this file: call 2970H, which copies the accumulator into the second accumulator at 72F5H and comes back with Register Pair DE on 72F0H, one byte past the eight it copied from.
2EFA
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which brings 72F0H into Register Pair HL, the byte standing one above the accumulator's exponent.
2EFB
DEC HL 2B
Decrement Register Pair HL to 72EFH, the exponent of the accumulator itself.
2EFC
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, 72EFH, that exponent.
2EFD
OR A B7
Set the flags from Register A with OR A, which gives Z when the accumulator holds nothing.
2EFE
RET Z C8
Return with Z, the accumulator being nothing, which ten times over is still nothing.
2EFF
ADD A,02H C6 02
Add 02H to Register A, two powers of two, which makes the value four times what it was.
2F01
JP C,30ACH DA AC 30
Jump to 30ACH on Carry, the exponent having run past 0FFH, which is the Overflow of module 1 by the door that takes the sign of the result from 72F0H and turns it over.
2F04
LD (HL),A 77
Store Register A into the byte Register Pair HL addresses, 72EFH, so that the accumulator now holds four times the value and the second accumulator holds it as it was.
2F05
PUSH HL E5
Push Register Pair HL, 72EFH, which the addition below writes over and 2F09H brings back.
2F06
Call 2C88H, the double precision addition, which adds the second accumulator to the accumulator and so leaves five times the value in it.
2F09
POP HL E1
Pop Register Pair HL, 72EFH, the exponent of the answer.
2F0A
INC (HL) 34
Increment the byte Register Pair HL addresses, 72EFH, which doubles five times the value and makes it ten times what the routine was given.
2F0B
RET NZ C0
Return with NZ, the exponent not having wrapped to 00H on that increment, with ten times the value in the accumulator.
2F0C
JP 30ACH C3 AC 30
Jump to 30ACH, the Overflow of module 1, the exponent having wrapped from 0FFH to 00H.

2F0FH - A Number Read In From the Line Text (2F0FH-2FD9H)

This is where every number a user types becomes a value, and both of its entries are in use: 4928H of VAL and 4C07H of an ASCII LOAD call 2F0FH, 6506H jumps to it, and 74C7H of the evaluator's term reader jumps to 2F16H, which is the operand byte of the OR 0AFH at 2F15H standing as an XOR A. The one byte of difference between the two entries is the Zero Flag at 2F28H, and what it decides is the type the number starts in: 2F0FH comes in through 2684H and 2AA9H and leaves the accumulator nothing and double precision with the Zero Flag clear, so the store at 2F28H is skipped, while 2F16H leaves Register A at 00H and the Zero Flag set, so 2F28H stores the 0000H that 2F26H and 2F27H built and the number starts as an integer. The loop itself lives in module 1 and the decisions live here. 2F3CH calls NXTCHAR at 5E93H and 2F3FH hands a digit to 300CH, which comes back at 303BH; the decimal point, the exponent and the four type suffixes are all dealt with here. The registers are shared across the join and are the whole of the convention: Register Pair HL is the pointer into the line, Register B counts the digits after the decimal point, Register C holds 0FFH until a decimal point is read and 00H after it so that one ADC A,C in module 1 counts the right digits and no test is needed, Register E carries the exponent and Register D the count of minus signs in it. 2F99H is where the exponent and the digit count are settled against each other: the difference is walked to nothing by multiplying or dividing by ten, one of the two conditional calls being taken each time round and each of them bringing Register A one step closer. And the one value that needs the most care comes last. A single precision value of exactly minus 32768 is the only value of that magnitude an integer can hold, so 2FB5H weighs the answer against it and stores it as an integer when it matches, both paths coming home through the POP HL and RET at 27DBH.

2F0F
A number read in, starting double precision (2F0FH), which 4928H of VAL and 4C07H of an ASCII LOAD call and 6506H jumps to: call 2684H, which sets the accumulator to nothing by writing 00H into its exponent at 72EFH.
2F12
Call 2AA9H, which loads Register A with 08H and writes it into the type at 7142H, so that the number begins as a double precision value and never has to be widened.
2F15
OR 0AFH F6 AF
Or Register A with 0AFH, which leaves Register A at 0AFH and the Zero Flag clear, so that the store at 2F28H is passed over: this instruction is also here because its operand byte at 2F16H reads as the XOR A that the other entry runs.
2F17
LD BC,67B4H 01 B4 67
Load Register Pair BC with 67B4H, an address of module 1, Register B being 67H and Register C 0B4H, both of which are written over four instructions below.
2F1A
PUSH BC C5
Push Register Pair BC, that address, which stands on the stack underneath everything this routine pushes and is where module 1's own code expects a number reader to return.
2F1B
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which puts the caller's pointer into the line text into Register Pair DE while Register Pair HL is wanted for the two stores below.
2F1C
LD BC,00FFH 01 FF 00
Load Register Pair BC with 00FFH, Register B the count of digits after the decimal point and Register C the byte that says a decimal point has not been read yet, 0FFH being what makes module 1's ADC A,C at 300EH decline to count a digit.
2F1F
LD HL,72F1H 21 F1 72
Load Register Pair HL with 72F1H, the count of warnings this expression has already given.
2F22
LD (HL),01H 36 01
Store 01H into the byte Register Pair HL addresses, 72F1H, which says one warning has been given already: 30D7H of module 1 writes nothing once the count stands at one, so a number that overflows while it is being read complains once and no more.
2F24
NOP 00
No operation, the first of two bytes of padding that stand here and are run through on every number read.
2F25
NOP 00
No operation, the second of those two bytes, after which Register Pair HL is built for the store below.
2F26
LD H,B 60
Load Register H from Register B, 00H, the high half of the value the other entry stores.
2F27
LD L,B 68
Load Register L from Register B, 00H as well, so that Register Pair HL holds 0000H.
2F28
Call 2A53H on Z, which happens only for the 2F16H entry: 0000H is stored into 72ECH and 02H written into the type at 7142H, so that the number begins as the integer nothing and grows into a single or a double precision value only as its digits demand.
2F2B
EX DE,HL EB
Exchange Register Pair DE with Register Pair HL, which brings the pointer into the line text back into Register Pair HL and leaves 0000H in Register Pair DE, Register D the count of minus signs in the exponent and Register E the exponent itself, both nothing.
2F2C
LD A,(HL) 7E
Load Register A with the byte Register Pair HL addresses, the first character of the number as it stands in the line.
2F2D
CP 26H FE 26
Compare Register A with 26H, an ampersand, which is how a hexadecimal or an octal constant is written.
2F2F
JP Z,75A6H CA A6 75
Jump to 75A6H on Z, the ampersand constants of module 1, which read the letter and the digits themselves and leave the value in the accumulator.
2F32
CP 2DH FE 2D
Compare Register A with 2DH, a minus sign, the Zero Flag of which is the whole of how the sign of the number is remembered.
2F34
PUSH AF F5
Push Register AF, that character and that Zero Flag, which 2FA6H or 2FC8H brings back once the digits are in and the negate at 2FA8H reads.
2F35
Jump to 2F3CH on Z, the character having been a minus sign, which is passed over and the next one read.
2F37
CP 2BH FE 2B
Compare Register A with 2BH, a plus sign, which a number may be written with and which changes nothing about it.
2F39
Jump to 2F3CH on Z, the character having been a plus sign, which is passed over in the same way.
2F3B
DEC HL 2B
Decrement Register Pair HL, the character having been neither sign, so that NXTCHAR below reads this same character and not the one after it.
2F3C
CALL 5E93H CD 93 5E
The loop (2F3CH), which 303BH of module 1 comes back to for every digit and which 2FC2H reaches after a decimal point: call 5E93H, NXTCHAR of module 1, which steps Register Pair HL to the next character of the line that is not a space and leaves it in Register A with the Carry Flag set when it is a digit.
2F3F
JP C,300CH DA 0C 30
Jump to 300CH on Carry, the character being a digit, which is module 1's digit routine: it puts the digit into the value in whichever of the three precisions the number has grown to and comes back to 2F3CH at 303BH.
2F42
CP 2EH FE 2E
Compare Register A with 2EH, a decimal point.
2F44
Jump to 2FB9H on Z, the character being a decimal point, where the digit counter is started and the type widened.
2F46
CP 65H FE 65
Compare Register A with 65H, a lower case e, which begins an exponent and asks for single precision.
2F48
Jump to 2F4CH on Z, which is the JR NZ below and is not taken with the Zero Flag set, so that a lower case e falls through to the test for the long and the quad forms.
2F4A
CP 45H FE 45
Compare Register A with 45H, a capital E, the other way of writing the same exponent.
2F4C
Neither form of E (2F4CH), which 2F48H reaches with the Zero Flag set and which is passed over there: jump to 2F6FH on NZ, the character being neither a lower case nor a capital E, where the four type suffixes are tried.
2F4E
PUSH HL E5
Push Register Pair HL, the pointer into the line, which 2F60H brings back: the character after the E is read and put back if it turns out not to be one of the four letters below.
2F4F
CALL 5E93H CD 93 5E
Call 5E93H, NXTCHAR of module 1, which reads the character standing after the E.
2F52
CP 6CH FE 6C
Compare Register A with 6CH, a lower case l, which with the three letters below makes the long and quad forms of an exponent.
2F54
Jump to 2F60H on Z, the character having been a lower case l.
2F56
CP 4CH FE 4C
Compare Register A with 4CH, a capital L, the second of the four letters the long and quad forms are written with.
2F58
Jump to 2F60H on Z, the character having been a capital L.
2F5A
CP 71H FE 71
Compare Register A with 71H, a lower case q, the third of those four letters.
2F5C
Jump to 2F60H on Z, the character having been a lower case q.
2F5E
CP 51H FE 51
Compare Register A with 51H, a capital Q, the last of the four and the one whose own Zero Flag is read below.
2F60
POP HL E1
The pointer put back (2F60H), which the three jumps above reach: pop Register Pair HL, the pointer into the line 2F4EH put down, which stands on the E itself.
2F61
Jump to 2F6EH on Z, the character after the E having been one of the four letters, which reads the character the pointer now stands on and tries it against the type suffixes.
2F63
LD A,(7142H) 3A 42 71
Load Register A with the byte at 7142H, the type the number has grown to so far.
2F66
CP 08H FE 08
Compare Register A with 08H, the type of a double precision value.
2F68
Jump to 2F83H on Z, the number being double precision already, where 2FDAH is entered with the Zero Flag clear and CDBL leaves it as it is.
2F6A
LD A,00H 3E 00
Load Register A with 00H, which makes the Zero Flag set at 2F83H below and so makes 2FDAH call CSNG: an E exponent on a number that has not grown past single precision keeps it single precision.
2F6C
Jump to 2F83H, the widening and the exponent below, with that 00H in Register A.
2F6E
LD A,(HL) 7E
The character the pointer stands on (2F6EH), which 2F61H reaches: load Register A with the byte Register Pair HL addresses, which is the E the long or quad form stood after.
2F6F
CP 25H FE 25
The type suffixes (2F6FH), which 2F4CH reaches: compare Register A with 25H, a percent sign, which asks for an integer.
2F71
Jump to 2FC5H on Z, the character having been a percent sign, which is passed over and no conversion made.
2F73
CP 23H FE 23
Compare Register A with 23H, a number sign, which asks for a double precision value.
2F75
Jump to 2FD1H on Z, the character having been a number sign.
2F77
CP 21H FE 21
Compare Register A with 21H, an exclamation mark, which asks for a single precision value.
2F79
Jump to 2FD2H on Z, the character having been an exclamation mark, and with the Zero Flag still set, which is what makes 2FDAH call CSNG and not CDBL.
2F7B
CP 64H FE 64
Compare Register A with 64H, a lower case d, which begins an exponent and asks for double precision.
2F7D
Jump to 2F83H on Z, the character having been a lower case d, and with Register A holding 64H so that 2F83H leaves the Zero Flag clear and 2FDAH calls CDBL.
2F7F
CP 44H FE 44
Compare Register A with 44H, a capital D, the other way of writing that exponent.
2F81
Jump to 2F99H on NZ, the character having been none of the eight this routine knows, so that the number is finished and the character is left for the caller.
2F83
OR A B7
The exponent read (2F83H), which 2F68H, 2F6CH and 2F7DH all reach: set the flags from Register A with OR A, which gives Z only for the 00H that 2F6AH loaded and so chooses between CSNG and CDBL below.
2F84
Call 2FDAH, which widens the number to single precision on Z and to double precision on NZ, keeping all three register pairs across the conversion.
2F87
CALL 5E93H CD 93 5E
Call 5E93H, NXTCHAR of module 1, which reads the character standing after the E or the D.
2F8A
CALL 7673H CD 73 76
Call 7673H of module 1, the sign of an exponent, which decrements Register D on the chance that this character is a minus sign and puts it back if it is not, so that Register D holds 0FFH for a minus sign and 00H for anything else.
2F8D
CALL 5E93H CD 93 5E
The exponent loop (2F8DH), which 308BH of module 1 comes back to for every digit of the exponent: call 5E93H, NXTCHAR of module 1, which reads the next character and sets the Carry Flag when it is a digit.
2F90
JP C,307BH DA 7B 30
Jump to 307BH on Carry, the character being a digit, which is module 1's exponent routine: it reads the digit into Register E, clamps the exponent at 127 and comes back to 2F8DH.
2F93
INC D 14
Increment Register D, the count of minus signs, which gives 00H and the Zero Flag set when 7673H found one and left 0FFH there.
2F94
Jump to 2F99H on NZ, no minus sign having stood in front of the exponent, so that the exponent counts upward as it was read.
2F96
XOR A AF
Clear Register A with XOR A, nothing for the exponent to be taken from.
2F97
SUB E 93
Subtract Register E from Register A, the exponent as it was read, which negates it.
2F98
LD E,A 5F
Load Register E from Register A, the negated exponent, so that an E followed by a minus sign divides where it would otherwise multiply.
2F99
PUSH HL E5
The number settled (2F99H), which 2F81H, 2F94H, 2FBDH, 2FCFH and 2FD8H all reach: push Register Pair HL, the pointer into the line, which the arithmetic below writes over and 2FA5H brings back.
2F9A
LD A,E 7B
Load Register A from Register E, the exponent the number was written with.
2F9B
SUB B 90
Subtract Register B from Register A, the count of digits read after the decimal point, which leaves the net number of powers of ten the digits have to be moved by.
2F9C
LD E,A 5F
Load Register E from Register A, that net power, which is of no further use and is kept only because the register was free.
2F9D
The powers of ten walked off (2F9DH), which 2FA3H comes back to: call 2FE9H on P, the net power standing above nothing, which multiplies the value by ten and comes back with Register A one lower.
2FA0
Call 2FF9H on M, the net power standing below nothing, which divides the value by ten and comes back with Register A one higher: exactly one of these two calls is made each time round.
2FA3
Jump to 2F9DH on NZ, Register A not having reached 00H, so that the loop walks the net power to nothing from whichever side it began on.
2FA5
POP HL E1
Pop Register Pair HL, the pointer into the line 2F99H put down.
2FA6
POP AF F1
Pop Register AF, the first character of the number and its Zero Flag, put down at 2F34H: the Zero Flag is set only when that character was a minus sign.
2FA7
PUSH HL E5
Push Register Pair HL, the pointer into the line again, which the negate below writes over and 2FABH brings back.
2FA8
Call 28EAH on Z, the number having been written with a minus sign in front of it, which turns the sign of whichever type the accumulator now holds.
2FAB
POP HL E1
Pop Register Pair HL, the pointer into the line 2FA7H put down, which stands on the character that ended the number.
2FAC
CALL 76A4H CD A4 76
Call 76A4H, which loads the type from 7142H, takes 03H off it and comes back with the Parity Flag odd for a single precision value alone.
2FAF
RET PE E8
Return with PE, the number having come out an integer or a double precision value, either of which is the answer as it stands.
2FB0
PUSH HL E5
Push Register Pair HL, the pointer into the line, which the two instructions below put a return address on top of.
2FB1
LD HL,27DBH 21 DB 27
Load Register Pair HL with 27DBH, which is a POP HL and a RET and is used here as the way back: it takes the pointer above off the stack and returns to the caller.
2FB4
PUSH HL E5
Push Register Pair HL, that address, so that it stands as the return of the call below however the call chooses to leave the stack.
2FB5
Call 2A5CH, which weighs the accumulator against minus 32768, the one value of that magnitude an integer can hold, and stores it as an integer when the two are equal, dropping its own return address to do it.
2FB8
RET C9
Return to the 27DBH 2FB4H put down, the accumulator having held something else and having been left as the single precision value it is.
2FB9
CALL 76A4H CD A4 76
A decimal point (2FB9H), which 2F44H reaches: call 76A4H, which comes back with the Carry Flag set for every type below 08H and clear for a double precision value.
2FBC
INC C 0C
Increment Register C, the byte that says whether a decimal point has been read, which takes it from 0FFH to 00H and sets the Zero Flag: from here on module 1's ADC A,C at 300EH counts every digit into Register B.
2FBD
Jump to 2F99H on NZ, Register C having stood at 00H already and this being a second decimal point, which ends the number and leaves the point for the caller.
2FBF
Call 2FDAH on Carry, the number not being double precision yet, which widens it to single precision, the Zero Flag standing set from the increment above.
2FC2
Jump to 2F3CH, the loop, which reads the digits standing after the decimal point.
2FC5
CALL 5E93H CD 93 5E
A percent sign (2FC5H), which 2F71H reaches: call 5E93H, NXTCHAR of module 1, which steps the pointer past the percent sign so that the caller does not see it.
2FC8
POP AF F1
Pop Register AF, the first character of the number and its Zero Flag, put down at 2F34H, which is put back below with two words underneath it.
2FC9
PUSH HL E5
Push Register Pair HL, the pointer into the line as it now stands, past the percent sign.
2FCA
LD HL,27DBH 21 DB 27
Load Register Pair HL with 27DBH, which is a POP HL and a RET.
2FCD
PUSH HL E5
Push Register Pair HL, that address, so that the routine returns through it and the pointer above is popped back into Register Pair HL on the way out.
2FCE
PUSH AF F5
Push Register AF, the first character and its Zero Flag again, now standing above those two words, so that 2FA6H finds it where it expects it.
2FCF
Jump to 2F99H, the settling above, no conversion having been made: the number began as an integer at 2F28H and grew out of that type only if its own digits made it, so a percent sign asks for nothing the reader has not done already and narrows nothing that has grown.
2FD1
OR A B7
A number sign (2FD1H), which 2F75H reaches: set the flags from Register A with OR A, which clears the Zero Flag so that the conversion below is CDBL and not CSNG.
2FD2
An exclamation mark (2FD2H), which 2F79H reaches with the Zero Flag set: call 2FDAH, which widens the number to single precision on Z and to double precision on NZ.
2FD5
CALL 5E93H CD 93 5E
Call 5E93H, NXTCHAR of module 1, which steps the pointer past the suffix so that the caller does not see it.
2FD8
Jump to 2F99H, the settling above, with the type the suffix asked for.

2FDAH - The Type Widened, Ten Times and One Tenth (2FDAH-2FFFH)

Three small routines the number reader and the number formatter share. 2FDAH widens the accumulator and keeps every register pair across it, which is what lets the reader call it in the middle of a loop that is carrying a pointer, a digit count and a decimal point flag in its registers; the Zero Flag it is called with chooses between CSNG and CDBL, and the four places that call it each set that flag in a different way. 2FE9H and 2FF9H are ten times and one tenth, and they are written to be used in pairs: each of them tests the type for itself, each calls the right one of the single and double precision routines, and each leaves Register A one step nearer nothing, 2FE9H counting down and 2FF9H counting up, so that 2F9DH of the reader and 3413H, 3438H and 34DDH of the formatter can walk a power of ten off without counting anything themselves. 2FF9H does not end in this file. Its four instructions run to 2FFFH, which is the last byte of the overlay, and the rest of it stands at 3000H to 300BH in module 1's own bytes, where the BASIC/CMD page carries it: the INC A at 300AH is this routine's tail and the DEC A at 2FF7H is the matching tail of 2FE9H, which had room to keep its own.

2FDA
PUSH HL E5
The type widened with every register kept (2FDAH), which 2F84H, 2FBFH and 2FD2H of the reader call, each of them with the Zero Flag set its own way: push Register Pair HL, the pointer into the line text, which the conversions below write over.
2FDB
PUSH DE D5
Push Register Pair DE, Register D the count of minus signs in the exponent and Register E the exponent itself.
2FDC
PUSH BC C5
Push Register Pair BC, Register B the count of digits after the decimal point and Register C the decimal point flag.
2FDD
PUSH AF F5
Push Register AF, the character and the Zero Flag the caller chose the conversion with, which 2FE1H brings back for the second of the two calls.
2FDE
Call 2A6AH on Z, CSNG, which makes the accumulator a single precision value and writes 04H into the type at 7142H.
2FE1
POP AF F1
Pop Register AF, the character and that Zero Flag, so that the call below reads the same flag the call above did.
2FE2
Call 2A96H on NZ, CDBL, which makes the accumulator a double precision value and writes 08H into the type: exactly one of these two calls is made.
2FE5
POP BC C1
Pop Register Pair BC, the digit count and the decimal point flag 2FDCH put down.
2FE6
POP DE D1
Pop Register Pair DE, the exponent and its count of minus signs 2FDBH put down.
2FE7
POP HL E1
Pop Register Pair HL, the pointer into the line text 2FDAH put down.
2FE8
RET C9
Return to the caller with the type widened and all three register pairs standing as they were, which is the whole of why this routine exists.
2FE9
RET Z C8
Ten times the accumulator (2FE9H), which 2F9DH of the reader calls on P and 34D6H of the formatter calls outright: return with Z, Register A standing at 00H and no power of ten left to take off.
2FEA
PUSH AF F5
The same without that test (2FEAH), which 34D6H of the number formatter calls: push Register AF, the count of powers of ten left, which 2FF2H and 2FF6H bring back.
2FEB
CALL 76A4H CD A4 76
Call 76A4H, which loads the type from 7142H, takes 03H off it and comes back with the Parity Flag odd for a single precision value and even for a double one.
2FEE
PUSH AF F5
Push Register AF, that parity, which 2FF2H pops so that the second conditional call below reads the same flag the first did.
2FEF
Call 28ADH on PO, the value being single precision, which is ten times the accumulator in four instructions and an addition.
2FF2
POP AF F1
Pop Register AF, the parity 2FEEH put down, so that the call below reads the same flag the call above did.
2FF3
Call 2EF7H on PE, the value being double precision, which is ten times the accumulator in that precision.
2FF6
POP AF F1
Pop Register AF, the count of powers of ten 2FEAH put down.
2FF7
DEC A 3D
One taken off the count (2FF7H), which 3397H and 33FBH of the number formatter call on NZ so that a place goes to the decimal point itself: decrement Register A, the count.
2FF8
RET C9
Return to the caller with the value ten times what it was and Register A one lower, which is what lets 2F9DH of the reader walk a positive power of ten off without a counter of its own.
2FF9
PUSH DE D5
One tenth of the accumulator (2FF9H), which 2FA0H of the reader calls on M and which 33A1H, 3413H, 3438H, 3453H and 34DDH of the number formatter call, and whose last four instructions stand at 3000H to 300BH in module 1's own bytes, this file having run out of room at 2FFFH: push Register Pair DE, the caller's own pair, which 3009H gives back.
2FFA
PUSH HL E5
Push Register Pair HL, the caller's own pair, which 3008H gives back.
2FFB
PUSH AF F5
Push Register AF, the caller's count of powers of ten, which 3007H gives back and 300AH then raises by one.
2FFC
CALL 76A4H CD A4 76
Call 76A4H, which loads the type from 7142H, takes 03H off it and comes back with the Parity Flag odd for a single precision value and even for a double one.
2FFF
PUSH AF F5
Push Register AF, that parity, which 3003H of module 1 pops so that the second of the two divisions reads the same flag the first did: this is the last byte of BASIC/OV1 and the routine goes on at 3000H, which the BASIC/CMD page carries.