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

⟦f74830150⟧ TextFile

    Length: 6409 (0x1909)
    Types: TextFile
    Names: »ADAROOT_SEQ_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 "ADAROOT_SEQUENTIAL"

        .include    "^standard_assembler_include_file"
        .include    "^Common.Runtime_Definitions"
        .include    "^Common.Os2000_Definitions"    
        comp_unit  Runtime_Compunit
        .sect   ADA_RUNTIME_CODE,code,relocatable,alignment:=2

;
;   Defines the runtime entry points for Start, Middle, and Finish
;   of sequential programs.
;

        .gbl.l  __start_sequential
        .ext.l  _.start_sequential
        .gbl.l  __finish_sequential
        .ext.l  _.finish_sequential

        .gbl.l  __debug.seq_root_creation
        .gbl.l  __debug.seq_root_termination

        .ext.l  __debug.raise
        .ext.l  __defined_heap_size
        .ext.l  __Main_Priority
        .ext.l  __Data_Area_Size

        .ext.l  __Main_Code_Start_Var
        .ext.l  __Main_Code_Start_Copy
        .ext.l  __Heap_Size_Var
        .ext.l  __Main_Priority_Var
        .ext.l  __Data_Size_Var

        .ext.l  __Root_Create_Return
        .ext.l  __Root_Finish_Return
        .ext.l  __Task_Finish_Return
        .ext.w  __Finish_Entry_Offset
        .ext.l  __Propagate_Exception_Branch

        .ext.l  __Runtime_Entry_Pointer

        .ext.l  __Put_Error_Msg_And_Exit

        .ext.l  __Runtime_Compatibility_Value
        
        .ext.l  __Ada_Init_Values_Begin
        .ext.l  __Ada_Init_Values_End
        .ext.l  __Ada_Init_Data_Begin

;
;   References to insure that necessary stuff does not get eliminated
;   by link time dead code elimination.
;

;
;  Initial entry point from the program after fork; the
;  return address to the program is passed in A0.  All other
;  registers except D4, D7, A2, and A4 contain information
;  about the fork which is used in subsequent code.
;

        subprogram sp_rt,sp.internal,linkage.none
__start_sequential:
        move.l  d0,d4                   ; save process id in d4
;
;   Setup global data pointer
;
        movea.l a5,a2                   ; save parameter pointer in temp
        suba.l  d6,a1                   ; get base address for globals
        movea.l a1,a5                   ; setup global base register
;
;   Move data from ADA_INIT_VALUES section to ADA_INIT_DATA section.
;
        movem.l d7/a2/a4,-(a7)          ; Save working regs
        lea.l   (__Ada_Init_Values_Begin,pc),a2 ; Get source of move
        lea.l   (__Ada_Init_Values_End,pc),a4   ; Compute length of move
        move.l  a4,d7
        sub.l   a2,d7
        beq.s   $no_copy                        ; -> Nothing to move
        
        lea.l   (__Ada_Init_Data_Begin,a5),a4   ; Get destination of move
        addq.l  #3,d7                           ; Round up to 4 byte multiple
        lsr.l   #2,d7                           ; Convert to count of 4 byte objects
        move.l  d7,d4                           ; Make copy of count
        swap    d4                              ; LSW of d4 is MSW of d7
        bra.s   $enter_loop                     ; -> Begin loop
              
; Assertion: source and dest sections were 32 bit aligned, so a
; 32-bit-at-a-time copy is correct.
$copy:  move.l  (a2)+,(a4)+                     ; Move a byte
$enter_loop:
        dbra    d7,$copy                        ; -> Loop on copy
        dbra    d4,$copy                        ; -> Loop on large copy

$no_copy:
        movem.l (a7)+,d7/a2/a4                  ; Restore working regs

;
;   Store address for return to user code and
;   shared runtime offset for Finish 
;
        move.l  a0,(__main_code_start_var,a5)   ; save code start
        move.l  a0,(__main_code_start_copy,a5)  ; save code start for debugger
;
;   Store values associated with current code segment
;
        lea     (__debug.raise,PC), a0          ; compute address for raise brk
        move.l  a0,(__propagate_exception_branch,a5) ; store for branch from rt
        lea     (root_create_break_seq,pc),a0   ; compute address for create
        move.l  a0,(__root_create_return,a5)    ; store for branch from rt
        lea     (__debug.seq_root_termination,PC),a0 ; compute address for term
        move.l  a0,(__Task_Finish_Return,a5)    ; store for ^E handler

        move.l  #__main_priority,(__main_priority_var,a5)
        move.l  (__defined_heap_size,pc),(__heap_size_var,a5)
        move.l  #__data_area_size,(__data_size_var,a5)
        move.b  #compatibility_version,(__runtime_compatibility_value,a5)
;
;   Setup pointer to runtime entry point table
;
        move.l  sp,d7                           ; get current stack pointer
        andi.l  #(-a32_size),d7                 ; mask for high order bits
        movea.l ((cct_start + pi_cpt),d7),a0    ; get CPT address

        move.l  (cpt_ada_runtime_ptr,a0),d7     ; get runtime table pointer
        beq.b   $no_runtimes                    ; if Zero, then no runtime
        move.l  d7,(__runtime_entry_pointer,a5) ; store table pointer

        bsr.l   _.start_sequential

__debug.seq_root_creation:
root_create_break_seq:
        jmp     ([__main_code_start_var,a5])    ; jump to program start
;
;   Runtime table pointer was zero
;
$no_runtimes:
        move.w  #no$runtime$ferror,d1              ; load error code
        bra.w   __put_error_msg_and_exit           ; give message and die
;
;   Finish calls from user program
;
        subprogram sp_rt,sp.internal,linkage.simple
__finish_sequential:
        bsr.l   _.finish_sequential
;
;   Return from shared runtime Finish call
;
__debug.seq_root_termination:
        moveq.l #no$error,d1
        trap    #os9_call
        .dc.w   f$exit

        end_subprograms

        .end