/*-------------------------------------------------------------------+ | NAME: LOAD.H | | LANGUAGE: C | | PURPOSE: Provide minimal C versions of the LOAD and DELETE macros. | | USAGE: _ PROTOTYPE CALL | | rc = LOAD(name,ep,size); | | -ARG- -DCL--------- -DESCRIPTION- | | name char * Name of the module to load | | ep __asm (*)() entry point address where loaded | | size int size of loaded module in doublewords | | rc int 0 = no errors | | otherwise error | | | | rc = DELETE(name); | | -ARG- -DCL--------- -DESCRIPTION- | | name char * Name of the module to delete from mem| | rc int 0 = no errors | | otherwise error | | | +-------------------------------------------------------------------*/ #include #include #include #define LOAD(name,ep,size) /* LOAD Macro -- SVC 8 */\ (_ldregs(R0,name), /* L R0,NAME */\ SR(1,1), /* SR 1,1 Show DCB not given */\ _ossvc(8), /* SVC 8 */\ (int)_stregs(R0+R1+R15,ep,size))/* ST R0,EP */\ /* ST R1,SIZE */\ /* ST R15,RC */ #define DELETE(name) /* DELETE Macro -- SVC 9 */\ (_ldregs(R0,name), /* L R0,NAME */\ _ossvc(9), /* SVC 9 */\ (int) _stregs(R15)) /* ST 15,RC */