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

⟦b540a8660⟧ TextFile

    Length: 3448 (0xd78)
    Types: TextFile
    Names: »XLBMT_LOGICAL_16_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 unsigned 16-bit data.  TeleGen2 passess unsigned
| 16-bit data as signed 32-bit words.

        .data
        .text
        .proc

|---Usage:
|       A := Xlbmt_And_16( A,B : U_Short );
|       A := Xlbmt_Or_16 ( A,B : U_Short );
|       A := Xlbmt_Xor_16( A,B : U_Short );
|       A := Xlbmt_Not_16( A   : U_Short );
|       A := Xlbmt_Shift_16( A : U_Short; B : Natural );

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

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

        .globl  _Xlbmt_Xor_16
_Xlbmt_Xor_16:
        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_16
_Xlbmt_Not_16:
        movl    a6@(8),d0           | Get argument A
        notw    d0                  | NOT argument A
        rts                         | Return result

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

        .globl  _Xlbmt_Shift_16
_Xlbmt_Shift_16:
        movl    a6@(10),d0          | Get argument A
        movw    a6@(8),d1           | Get argument B
        jlt     L40                 | Jump for negative shift amount
        cmpw    #16,d1              | Shift amount more than 16?
        jge     L41                 | Yes, return 0
        lslw    d1,d0               | Shift to the left for positive
        rts                         | Return result
L40:    negw    d1                  | Make shift amount positive
        cmpw    #16,d1              | Shift amount more than 16?
        jge     L41                 | Yes, return 0
        lsrw    d1,d0               |  and now shift to the right
        rts                         | Return result
L41:    clrl    d0                  | Return 0
        rts

        .data