|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 4453 (0x1165) Types: TextFile Notes: R1k Text-file segment
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦e1897b4d4⟧ └─⟦this⟧
.set R0,0 .set SP,1 .set R2,2 .set R3,3 .set R4,4 .set R5,5 .set R11,11 .set R12,12 .set R19,19 .set R20,20 .set R29,29 # On entry, # R3 -> Ada 'subprogram value (not C callable) # R4 -> output parameter area # # On return, R3 -> "C" function descriptor that can be called # from C, and will call the Ada program described by the # input parameter; .csect .ada_to_c{pr},3 .globl .ada_to_c{pr} # # Create the C callable function descriptor from the Ada subprogram # value. # l R5,T001(R2) # get entry point of assembly bridge st R2,4(R4) # save toc into output parm st R5,0(R4) # set into output param st R3,8(R4) # save Ada subprogram value cal R3,0(R4) # R3 := R4 br .csect .ada_to_c_bridge{pr},3 .globl .ada_to_c_bridge{pr} # # R11 -> ada subprogram_value # mflr R12 cal SP,-128(SP) ai R0,R11,0 # preserve R11 mfcr R11 stm R11,36(SP) # save important stuff, so we can call Ada ai R11,R0,0 # restore R11 l R12,0(R11) # R12 = ada entry point mtlr R12 l R29,8(R11) # load static link cal R20,0(0) # stack top is infinite.... brl ai R3,R19,0 # move function return to C register lm R11,36(SP) # restore important stuff mtcr R11 mtlr R12 cal SP,128(SP) br .toc T001: .tc T001{tc},.ada_to_c_bridge{pr}