.title Local Job Number ; DECUS C Calling Format ; ; jsr r5,csv$ ;save r2,r3, and r4 ; ;r5 is parameter base ; ;c$pmtr(r5) is first argument ; ;c$pmtr+2(r5) is second argument ; ;... ; ;return args in r0 ; ... ; user code ; ... ; ; jmp cret$ ;restore r2-r5 and return ; rts pc ;does the same (cret$ follows csv$) ; ; csv$ and cret$ need be used only if arguments are used ; .include "os.mac" ; Get Job Number of Us ; ; int lcljob() ; ; = job number .psect c$code lcljob:: mov #lclj01,r0 emt 375 ; get local job number .if ne rt$sys ; rt-11 specific mov gtjb,r0 inc r0 ; offset jobnum .endc rts pc .psect c$data .if ne ts$sys ; tsx-plus specific lclj01: .byte 0,34 ; .gval .word -2 ; job number .endc .if ne rt$sys ; rt-11 specific lclj01: .byte 1,20 ; .gtjb .word gtjb .word -1 gtjb: .blkw 12. ; job stats .endc .end