.TITLE DEVCOMMAC .IDENT /811124/ ; DEVCOMMAC.MAC JFH 24-NOV-81 ; James F. Harrison, MP-1, MS 828, Los Alamos National Lab, ; Los Alamos, NM 87545 (505) 667-5688 ; This module consists of routines to start and stop the programmable ; clock. Note: the line frequency clock is turned off when the ; programmable clock is turned on and the line frequency clock is ; turned on when the programmable clock is turned off. .GLOBL START,STOP ; entry points ; Define registers in the I/O page ; Programmable clock registers .PSECT IOPAGE,GBL,D,OVR CSR =.+12540 ; control and status (17772540) CSB =.+12542 ; count set buffer CTR =.+12544 ; counter ; Line frequency clock register LKS =.+17546 ; control and status (17777546) .PSECT ; Start up the programmable clock for timing test START:: CLR @#LKS ; turn off line frequency clock CLR @#CSB ; clear count set buffer MOV #21,@#CSR ; count up, 100KHZ, start programmable clock RTS PC ; Stop the programmable clock and return the time STOP:: BIC #1,@#CSR ; stop programmable clock BIS #100,@#LKS ; restart the line frequency clock MOV @#CTR,@2(R5) ; return the time from the programmable clock RTS PC .END