; number.h ; Author: Douglas W. Jones ; Purpose: Definiton of the abstract class number ; all instances of subclasses of numbers ; begin with a pointer to the class descriptor ; For all methods of all subclasses of this class: ; linkage is always through R1 ; unless the method-specific documentation says otherwise, ; registers 3 to 7 may be destroyed by the call. ; the class descriptors of all subclasses of numbers ; are always structured as follows: NASSBIN = 0 ; pointer to int assign routine ; takes R3 = pointer to destination number object ; takes R4 = binary integer value to assign ; returns R3 = pointer to destination object ; this routine may have to convert from binary ; integer into the required numeric type NASSNUM = 4 ; pointer to number assign routine ; takes R3 = pointer to the destination number object ; takes R4 = pointer to the source number object ; returns R3 = pointer to destination object ; this routine may have to convert from one ; numeric type into the required numeric type NTOBIN = 8 ; pointer to number to binary routine ; takes R3 = pointer to the source number object ; returns R3 = corresponding binary integer value ; this routine may have to convert to binary integer NTODSP = 12 ; pointer to display number routine ; takes R3 = pointer to the source number object ; returns R3 = pointer to source object ; as a side effect, the number is displayed on the ; display screen. NADD = 16 ; pointer to number add routine ; takes R3 = pointer to the destination number object ; takes R4 = pointer to the source number object ; returns R3 = pointer to destination object ; add the source object's value to the destination; ; if they are the same type, do it the easy way, ; otherwise, do the necessary conversion. NSUB = 20 ; pointer to number subtract routine ; takes R3 = pointer to the destination number object ; takes R4 = pointer to the source number object ; returns R3 = pointer to destination object ; subtract the source object from the destination; ; if they are the same type, do it the easy way, ; otherwise, do the necessary conversion. NMUL = 24 ; pointer to number multiply routine ; takes R3 = pointer to the destination number object ; takes R4 = pointer to the source number object ; returns R3 = pointer to destination object ; multiply the source object by the destination; ; if they are the same type, do it the easy way, ; otherwise, do the necessary conversion. NDIV = 28 ; pointer to number divide routine ; takes R3 = pointer to the destination number object ; takes R4 = pointer to the source number object ; returns R3 = pointer to destination object ; divide the source object by the destination; ; if they are the same type, do it the easy way, ; otherwise, do the necessary conversion.