.title CTICKS routine ; ; CTICKS returns the number of ticks past 24:00. ; ; ticks = cticks((long) &rticks); ; ; if ((long) &rticks) == NULL then the ; return value is only placed in r0/r1. ; ; 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 ; .psect c$code cticks:: mov #rtime,r1 ;returned time mov #gtim,r0 ;.gtim argument block emt 375 mov 2(sp),r0 ;cticks((long) &return); beq 1$ ;NULL - skip mov (r1),(r0)+ ;long result mov 2(r1),(r0) 1$: mov (r1)+,r0 ;ticks = cticks(0); mov (r1),r1 rts pc ;exit .psect c$data gtim: .byte 0,21 ;.gtim .word rtime rtime: .word 0,0 ;returned time .end