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

⟦a9cc1de8c⟧ TextFile

    Length: 4623 (0x120f)
    Types: TextFile
    Names: »XLBMT_ASSEMBLER«

Derivation

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

TextFile

        .case_sensitive
        .module "Xlib_Asm_Hooks"
        
        .gbl.a  __Xlbmt_In_Invoke_Procedure
        .gbl.a  __Xlbmt_InOut_Invoke_Procedure
        .gbl.a  __Xlbmt_InOut_Invoke_Function
        .gbl.a  __Xlbmt_Get_A7
        .gbl.a  __Xlbmt_Get_A1
        
                                                                 
        .sect   ADA_CODE,CODE,READONLY,CONCATENATE,ALIGNMENT:=2
__Xlbmt_In_Invoke_Procedure:
__Xlbmt_InOut_Invoke_Procedure:
        $static_link        equ     16
        $routine_addr       equ     12

        pea.l   (0:16)                      ; establish no exception handler
        link    A6, #-4                     ; establish stack frame and
                                            ; create one word on stack
        
        movea.l (A6), A0                    ; get frame pointer of generic
        lea.l   (16, A0), A0                ; compute first param address
        movea.l A0, A1                      ; A1 points to first param addr
        subi.l  #16, (20, A6)               ; adjust offset
        adda.l  (20, A6), A1                ; adjust A1 to top of frame

$copy_loop_one:
        move.l  -(A1), -(A7)                ; make copy of parameters
        cmpa.l  A0, A1                      ; done ?
        bhi.s   $copy_loop_one              ; -> no
        
        move.l  A7, (-4, A6)                ; save the stack pointer
        
        movea.l ($static_link, A6), A1      ; establish static link
        jsr.l   ([$routine_addr, A6])       ; -> call subroutine
        
        cmpa.l  (-4, A6), A7                ; Has the stack pointer changed ?
        bne.s   $done                       ; -> yes

        movea.l (A6), A0                    ; get frame pointer of generic
        lea.l   (16, A0), A0                ; compute first param address
        movea.l A0, A1                      ; A1 points to first param addr
        adda.l  (20, A6), A1                ; adjust A1 to top of frame
        
$copy_back_loop:
        move.l  (A7)+, (A0)+                ; copy back the parameters 
        cmpa.l  A1, A0                      ; done ?
        blo.s   $copy_back_loop             ; -> no
        
$done:
        unlk    A6                          ; remove Subprogram's frame
        unlk    A6                          ; remove Call's (my) frame
        addq.l  #4, A7                      ; remove exception handler
        rts                                 ; return


__Xlbmt_InOut_Invoke_Function:
        pea.l   (0:16)                      ; establish no exception handler
        link    A6, #-4                     ; establish stack frame 
        
        move.l  A7, (-4, A6)                ; save top of stack; 

        movea.l (A6), A0                    ; get frame pointer of generic
        lea.l   (16, A0), A0                ; compute first param address
        lea.l   (4, A0), A1                 ; adjust for dope vector reference
        subi.l  #16, (20, A6)               ; adjust offset
        adda.l  (20, A6), A1                ; adjust A1 to top of frame
        
$copy_loop_two:
        move.l  -(A1), -(A7)                ; make copy of parameters
        cmpa.l  A0, A1                      ; done ?
        bhi.s   $copy_loop_two              ; -> no

        movea.l ($static_link, A6), A1      ; establish static link
        jsr.l   ([$routine_addr, A6])       ; -> call subroutine
        
        cmpa.l  (-4, A6), A7                ; Has top of stack changed ?
        bne.s   $unconstrained_result       ; -> yes
        
        movea.l (20, A6), A0                ; get offset
        movea.l (A6), A6                    ; adjust frame pointer
        adda.l  A6, A0                      ; adjust A0 
        adda.l  #16, A0
        movea.l (8, A6), A1
        movea.l (A6), A6
        movea.l A0, A7
        move.l  A1, -(A7)
        rts

$unconstrained_result:
        movea.l (A6), A6                    ; adjust frame pointer
        movea.l (8, A6), A1                 ; put return addr of caller of
                                            ; Call in A1
        movea.l (A6), A6                    ; adjust frame pointer
        move.l  A1, -(A7)                   ; push return addr of caller
                                            ; of Call on top of stack
        rts                                 ; return


__Xlbmt_Get_A7:
        move.l  A7, D0                      ; return top of stack
        rts                                  


__Xlbmt_Get_A1:
        move.l  A1, D0                      ; return static link
        rts