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: ┃ T X

⟦fa146044e⟧ TextFile

    Length: 3461 (0xd85)
    Types: TextFile
    Names: »XLBMT_LOGICAL_32_68K_UNIX_S«

Derivation

└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00
    └─ ⟦0c20f784e⟧ »DATA« 
        └─⟦1abbe589f⟧ 
            └─⟦059497ac5⟧ 
                └─⟦this⟧ 

TextFile

|---For use with TeleGen2 on 68K Unix
|
|------------------------------------------------------------------------------
|-- Copyright 1990 - 1991 by Rational, Santa Clara, California.
|--
|--                  All Rights Reserved.
|--
|-- Permission to use, copy, modify, and distribute this software and its
|-- documentation for any purpose and without fee is hereby granted,
|-- provided that the above copyright notice(s) appear in all copies and that
|-- both that copyright notice(s) and this permission notice appear in
|-- supporting documentation, and that the name of Rational not be used in
|-- advertising or publicity pertaining to distribution of the software
|-- without specific, written prior permission.
|--
|-- Rational disclaims all warranties with regard to this software, including
|-- all implied warranties of merchantability and fitness, in no event shall
|-- Rational be liable for any special, indirect or consequential damages or
|-- any damages whatsoever resulting from loss of use, data or profits, whether
|-- in an action of contract, negligence or other tortious action, arising out
|-- of or in connection with the use or performance of this software.
|------------------------------------------------------------------------------
|
| Logical operations for signed or unsigned 32-bit data.

        .data
        .text
        .proc

|---Usage:
|       A := Xlbmt_And_32( A,B : S_Long );
|       A := Xlbmt_Or_32 ( A,B : S_Long );
|       A := Xlbmt_Xor_32( A,B : S_Long );
|       A := Xlbmt_Not_32( A   : S_Long );
|       A := Xlbmt_Shift_32( A : S_Long; B : Natural );

        .globl  _Xlbmt_And_32
_Xlbmt_And_32:
        movl    a6@(12),d0          | Get argument A
        andl    a6@(8),d0           | AND argument B
        rts                         | Return result

        .globl  _Xlbmt_Or_32
_Xlbmt_Or_32:
        movl    a6@(12),d0          | Get argument A
        orl     a6@(8),d0           | OR argument B
        rts                         | Return result

        .globl  _Xlbmt_Xor_32
_Xlbmt_Xor_32:
        movl    a6@(12),d0          | Get argument A
        movl    a6@(8),d1           | Get argument B
        eorl    d1,d0               | XOR arguments
        rts                         | Return result

        .globl  _Xlbmt_Not_32
_Xlbmt_Not_32:
        movl    a6@(8),d0           | Get argument A
        notl    d0                  | NOT argument A
        rts                         | Return result

|---Note: Abs shift amount > 32 results in 0; this is the required behavior!

        .globl  _Xlbmt_Shift_32
_Xlbmt_Shift_32:
        movl    a6@(10),d0          | Get argument A
        clrl    d1                  | Zero upper part of register
        movw    a6@(8),d1           | Get argument B (word)
        jlt     L40                 | Jump for negative shift amount
        cmpw    #32,d1              | Shift amount more than 32?
        jge     L41                 | Yes, return 0
        lsll    d1,d0               | Shift to the left for positive
        rts                         | Return result
L40:    negw    d1                  | Make shift amount positive
        cmpw    #32,d1              | Shift amount more than 32?
        jge     L41                 | Yes, return 0
        lsrl    d1,d0               |  and now shift to the right
        rts                         | Return result
L41:    clrl    d0                  | Return 0
        rts

        .data