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

⟦055a349ee⟧ TextFile

    Length: 3477 (0xd95)
    Types: TextFile
    Names: »XLBMT_IN_INVOKE_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.
|------------------------------------------------------------------------------
|
| Used to invoke a procedure variable (procedure or function) that has only
| IN parameters.  There must not be any OUT or IN OUT parameters.  This
| cannot be used with functions that return unconstrained results as those
| are implemented as under-the-floor OUT parameters.

        .data
        .text
        .proc

|---Usage:
|       Xlbmt_In_Invoke_Procedure( Subprogram'Address,
|                                  Subprogram_A4,
|                                  First_Argument'Address )
|
| Note: Must have at least 1 argument!

        .globl  _Xlbmt_In_Invoke_Procedure
_Xlbmt_In_Invoke_Procedure:

|---Standard Ada prologue

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

|---Sometimes the argument list is not on a 32 bit boundary.  Adjust our
|   argument address to be on a 32 bit boundary.

        addl    #2,a6@(8)               | Add 2 to the address
        andl    #-4,a6@(8)              | Modulo-4; 32 bit boundary

|---Get address of the first argument in a0, then get address of 1st location
|   past the last argument in a1.

        movl    a6@(8),a0               | Get address of 1st argument
        movl    a6@,a1                  | Get caller's A6 register
        addql   #8,a1                   | Get addr of last word in Nth argument

|---Sometimes the end of the list is not on a 32 bit boundary.  Adjust our
|   starting address to have the same offset; we know we are pasing words.

        movl    a1,d0                   | Get our ending address
        andl    #3,d0                   | Keep the bottom 2 bits
        addl    d0,a0                   | Add that offset to the starting addr

|---Push our arguments onto the stack again so that we can call the subprogram
|   and he can access them.  Loop until a0==a1.

        cmpl    a0,a1
        jge     L17
L16:
        movl    a0@-,sp@-
        cmpl    a0,a1
        jlt     L16
L17:

|---Set A4 for our subroutine and then call him.  A routine with all IN
|   parameters will pop them all off himself.

        movl    a6@(12),a4
        movl    a6@(16),a0
        jsr     a0@

|---Standard Ada epilogue

        moveml  sp@+,#0x1300
        unlk    a6
        rts

        .data