DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ F T ┃
Length: 9182 (0x23de) Types: TextFile Names: »FLOAT_OPS_ASM«
└─⟦afbc8121e⟧ Bits:30000532 8mm tape, Rational 1000, MC68020_OS2000 7_2_2 └─ ⟦77aa8350c⟧ »DATA« └─⟦f794ecd1d⟧ └─⟦24d1ddd49⟧ └─⟦this⟧
; The use of this system is subject to the software license terms and ; conditions agreed upon between Rational and the Customer. ; ; Copyright 1987, 1988, 1989 by Rational. ; ; RESTRICTED RIGHTS LEGEND ; ; Use, duplication, or disclosure by the Government is subject to ; restrictions as set forth in subdivision (b)(3)(ii) of the Rights in ; Technical Data and Computer Software clause at 52.227-7013. ; ; ; Rational ; 3320 Scott Boulevard ; Santa Clara, California 95054 ; ; PROPRIETARY AND CONFIDENTIAL INFORMATION OF RATIONAL; ; USE OR COPYING WITHOUT EXPRESS WRITTEN AUTHORIZATION ; IS STRICTLY PROHIBITED. THIS MATERIAL IS PROTECTED AS ; AN UNPUBLISHED WORK UNDER THE U.S. COPYRIGHT ACT OF ; 1976. CREATED 1987, 1988, 1989. ALL RIGHTS RESERVED. ; ; .module "FLOAT_OPERATIONS" .include "^standard_assembler_include_file" .include "^common.runtime_definitions" comp_unit runtime_compunit .sect ada_runtime_code,code,readonly,relocatable,alignment:=2 .gbl.l __single_to_extended .gbl.l __double_to_extended .gbl.l __extended_to_single .gbl.l __extended_to_double .gbl.l __single_to_packed .gbl.l __double_to_packed .gbl.l __integer_to_packed .gbl.l __packed_to_single .gbl.l __packed_to_double .gbl.l __extended_to_packed .gbl.l __packed_to_extended .gbl.l __integer_to_extended .gbl.l __accumulate_digit .gbl.l __binary_exponentiate .gbl.l __based_exponentiate .gbl.l __packed_exponentiate ; ; procedure Single_To_Extended (Source : Single_Float; ; Target : out Extended_Float); subprogram sp_rt,sp.internal,linkage.simple __single_to_extended: .local $source'offset equ 4 $target'offset equ 8 fmove.s ($source'offset,sp),fp0 fmove.x fp0,([$target'offset,sp]) rtd #8 ; ; function Extended_To_Single (F : Extended_Float) return Single_Float; ; subprogram sp_rt,sp.internal,linkage.simple __extended_to_single: .local $f'offset equ 4 fmove.x ([$f'offset,sp]),fp0 rtd #4 ; ; procedure Double_To_Extended (Source : Double_Float; ; Target : out Extended_Float); subprogram sp_rt,sp.internal,linkage.simple __double_to_extended: .local $source'offset equ 4 $target'offset equ 12 fmove.d ($source'offset,sp),fp0 fmove.x fp0,([$target'offset,sp]) rtd #12 ; ; function Extended_To_Double (F : Extended_Float) return Double_Float; ; subprogram sp_rt,sp.internal,linkage.simple __extended_to_double: .local $f'offset equ 4 fmove.x ([$f'offset,sp]),fp0 rtd #4 ; ; procedure Single_To_Packed (Source : Single_Float; ; Target : out Packed_Float; ; K : K_Factor); subprogram sp_rt,sp.internal,linkage.simple __single_to_packed: .local $source'offset equ 4 $target'offset equ 8 $k_factor'offset equ 12 fmove.s ($source'offset,sp),fp0 ; load single precision value move.l ($k_factor'offset,sp),d0 ; get k-factor fmove.p fp0,([$target'offset,sp]){d0} ; store to out parameter rtd #12 ; ; function Packed_To_Single (F : Packed_Float) return Single_Float; ; subprogram sp_rt,sp.internal,linkage.simple __packed_to_single: .local $f'offset equ 4 fmove.p ([$f'offset,sp]),fp0 rtd #4 ; ; procedure Integer_To_Packed (Source : Integer; ; Target : out Packed_Float; ; K : K_Factor); ; subprogram sp_rt,sp.internal,linkage.simple __integer_to_packed: .local $source'offset equ 4 $target'offset equ 8 $k_factor'offset equ 12 fmove.l ($source'offset,sp),fp0 move.l ($k_factor'offset,sp),d0 fmove.p fp0,([$target'offset,sp]){d0} rtd #12 ; ; procedure Double_To_Packed (Source : Double_Float; ; Target : out Packed_Float; ; K : K_Factor); subprogram sp_rt,sp.internal,linkage.simple __double_to_packed: .local $source'offset equ 4 $target'offset equ 12 $k_factor'offset equ 16 fmove.d ($source'offset,sp),fp0 move.l ($k_factor'offset,sp),d0 fmove.p fp0,([$target'offset,sp]){d0} rtd #16 ; ; function Packed_To_Double (F : Packed_Float) return Double_Float; ; subprogram sp_rt,sp.internal,linkage.simple __packed_to_double: .local $f'offset equ 4 fmove.p ([$f'offset,sp]),fp0 rtd #4 ; ; procedure Extended_To_Packed (Source : Extended_Float; ; Target : out Packed_Float; ; K : K_Factor := K_Factor'Last); subprogram sp_rt,sp.internal,linkage.simple __extended_to_packed: .local $source'offset equ 4 $target'offset equ 8 $k_factor'offset equ 12 fmove.x ([$source'offset,sp]),fp0 move.l ($k_factor'offset,sp),d0 fmove.p fp0,([$target'offset,sp]){d0} rtd #12 ; ; procedure Packed_To_Extended (Source : Packed_Float; ; Target : out Extended_Float); ; subprogram sp_rt,sp.internal,linkage.simple __Packed_To_Extended: .local $source'offset equ 4 $target'offset equ 8 fmove.p ([$source'offset,sp]),fp0 fmove.x fp0,([$target'offset,sp]) rtd #8 ; ; ; procedure Integer_To_Extended (Value : Integer; ; Result : out Extended_Float; ; ; subprogram sp_rt,sp.internal,linkage.simple __integer_to_extended: .local $value'offset equ 4 $result'offset equ 8 fint.l ($value'offset,sp),fp0 fmove.x fp0,([$result'offset,sp]) rtd #8 ; ; procedure Accumulate_Digit (Digit : Natural; ; Fbase : Extended_Float; ; Value : in out Extended_Float); ; ; Value := (Value * Fbase) + Float (Digit) ; subprogram sp_rt,sp.internal,linkage.simple __Accumulate_Digit: .local $digit'offset equ 4 $fbase'offset equ 8 $value'offset equ 12 fmove.x ([$fbase'offset,sp]),fp0 fmul.x ([$value'offset,sp]),fp0 fadd.l ($digit'offset,sp),fp0 fmove.x fp0,([$value'offset,sp]) rtd #12 ; ; procedure Binary_Exponentiate (Exponent : Integer; ; Value : in out Extended_Float); ; ; Value := Value * (2 ** Exponent) ; ; subprogram sp_rt,sp.internal,linkage.simple __binary_exponentiate: .local $exponent'offset equ 4 $value'offset equ 8 fmove.x ([$value'offset,sp]),fp0 fscale.l ($exponent'offset,sp),fp0 fmove.x fp0, ([$value'offset,sp]) rtd #8 ; ; procedure Based_Exponentiate (Exponent : Integer; ; Ebase : Extended_Float; ; Value : in out Extended_Float); ; ; Value := Value * (Ebase ** Exponent) ; ; subprogram sp_rt,sp.internal,linkage.simple __based_exponentiate: .local $exponent'offset equ 4 $ebase'offset equ 8 $value'offset equ 12 flogn.x ([$ebase'offset,sp]),fp0 fmul.l ($exponent'offset,sp),fp0 fetox.x fp0,fp0 fmul.x ([$value'offset,sp]),fp0 fmove.x fp0,([$value'offset,sp]) rtd #12 ; ; procedure Packed_Exponentiate (Exponent : Integer; ; Value : Packed_Float; ; Result : out Extended_Float); ; ; Result := Value * (10 ** Exponent) ; ; subprogram sp_rt,sp.internal,linkage.simple __packed_exponentiate: .local $exponent'offset equ 4 $value'offset equ 8 $result'offset equ 12 ftentox.l ($exponent'offset,sp),fp0 fmul.p ([$value'offset,sp]),fp0 fmove.x fp0,([$result'offset,sp]) rtd #12 end_subprograms .end