DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ F T

⟦c8ec17a35⟧ TextFile

    Length: 3211 (0xc8b)
    Types: TextFile
    Names: »FIXED_ATTRIBUTES_ASM«

Derivation

└─⟦afbc8121e⟧ Bits:30000532 8mm tape, Rational 1000, MC68020_OS2000 7_2_2
    └─ ⟦77aa8350c⟧ »DATA« 
        └─⟦f794ecd1d⟧ 
            └─⟦24d1ddd49⟧ 
                └─⟦this⟧ 

TextFile

;    The use of this system is subject to the software license terms and
;    conditions agreed upon between Rational and the Customer.
;
;                Copyright 1988 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-3197
;
;   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 1988.  ALL RIGHTS RESERVED.
;
;

        .module "FIXED ATTRIBUTES"

        .include "^^standard_assembler_include_file"
        .include "^^common.runtime_definitions"

        comp_unit  runtime_compunit

        .sect ada_runtime_code,code,relocatable,alignment:=2

        .gbl.a  __mantissa
        .gbl.a  __large
        
;
;       function mantissa (l : integer;
;                          h : integer) return integer;
;
        subprogram sp_rt,sp.mantissa,linkage.simple
__mantissa:

        .local

        $l'offset       equ 4
        $h'offset       equ 8

        moveq.l #0,d0                           ; assume null range
        move.l  ($l'offset,sp),d1               ; d1 := l
        movea.l ($h'offset,sp),a1               ; a1 := h
        cmp.l   a1,d1                           ; compare l to h
        bgt.s   $done                           ; if l > h range is null

        tst.l   d1
        bgt.s   $l_ok
        neg.l   d1
$l_ok:  exg.l   d1,a1

        tst.l   d1
        bgt.s   $h_ok
        neg.l   d1
$h_ok:  cmp.l   a1,d1
        bhi.s   $d1_is_max
        move.l  a1,d1

$d1_is_max:
        subq.l  #1,d1
        ble.s   $done                           ; range was 0..0 or 0..1
        bfffo   d1{0:32},d1                     ; d1 := bit # of 1st set bit
        moveq.l #32,d0
        sub.l   d1,d0                           ; compute 'manitssa
$done:  rtd     #8
;
;       function large (L : integer;
;                       H : integer;
;                       S : integer) return integer;
;
        subprogram sp_rt,sp.large,linkage.simple
__large:

        .local
        $l'offset       equ 4
        $h'offset       equ 8
        $s'offset       equ 12
        
        move.l  ($h'offset,sp),-(sp)            ; push h
        statement      0,0,1
        move.l  ($l'offset+4,sp),-(sp)          ; push l
        statement      0,0,2
        bsr.s   __mantissa                      ; find 'mantissa (l, h)
        statement      0,0,0        
        moveq.l #-1,d1                          ; d1 := -1 (all ones)
        bfextu  d1{0:d0},d0                     ; d0 lsbs of d0 = 1 others = 0
        add.l   ($s'offset,sp),d1               ; d1 := 'small - 1
        eor.l   d1,d0                           ; d0 := d0 xor 'small - 1
        rtd     #12                             ; result is in d0

        end_subprograms
        
        .end