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

⟦5fcd23fef⟧ TextFile

    Length: 3165 (0xc5d)
    Types: TextFile
    Names: »XLBMT_MEM_COPY_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.
|------------------------------------------------------------------------------
|
| Copy memory, a byte at a time, from one place to another.  We watch out for
| overlapping to/from spaces and we "do the right thing".

        .data
        .text
        .proc

|---Usage:
|       Xlbmt_Mem_Copy( To : System.Address;
|                       From : System.Address;
|                       Bytes : Long_Integer );

        .globl  _Xlbmt_Mem_Copy
_Xlbmt_Mem_Copy:

|---Standard Ada prologue

        link    a6,#-4
        moveml  #0x00C0,sp@-
        movl    sp,a6@(-4)

|---Get the first argument in a0, then get second argument in a1, and then
|   get the third argument in d0.

        movl    a6@(16),a0              | Get 1st argument
        movl    a6@(12),a1              | Get 2nd argument
        movl    a6@(8),d0               | Get 3rd argument
        jeq     L20                     | 0 means nothing to copy

|---If our arguments do not overlap then we can just copy starting at the
|   'First of the data.  We can also copy that way if they overlap thei
|   right way.

        cmpl    a0,a1                   | Compare To and From
        jge     L10                     | No overlap (or it's ok)

|---We will play safe and copy starting at the end of the data.

        addl    d0,a0                   | One past the end of destination
        addl    d0,a1                   | One past the end of source
L5:     movb    a1@-,a0@-               | Copy one byte
        subl    #1,d0                   | Decrement counter
        jne     L5                      | Loop until done (0)
        jmp     L20                     | Return to caller
        
|---Simple copy loop.

L10:    movb    a1@+,a0@+               | Copy one byte
        subl    #1,d0                   | Decrement counter
        jne     L10                     | Loop until done (0)

|---Standard Ada epilogue

L20:
        moveml  sp@+,#0x0300
        unlk    a6
        rts

        .data