.TITLE TSTKDF .IDENT /1.03/ ; 18-JAN-1997 ; .LIST TTM .ENABL GBL .ENABL LC ; ; ; COPYRIGHT 1997 BY COMPUTER PROGRAMMING SERVICES ; ; Computer Programming Services ; 1925 W. Glenoaks Boulevard ; Glendale, CA 91201 (213) 849-4082 ; ; COMPUTER PROGRAMMING SERVICES DISCLAIMS ALL WARRANTIES ON ; THIS SOFTWARE AND SHALL NOT BE LIABLE FOR ANY LOSS OR DAMAGE, ; INCLUDING INCIDENTAL OR CONSEQUENTIAL DAMAGES, RESULTING FROM ; ITS USE. COMPUTER PROGRAMMING SERVICES ASSUMES NO ; RESPONSIBILITY OR COMMITMENT TO NOTIFY BUYERS OF ANY FUTURE ; CHANGES, UPDATES, AND/OR MODIFICATIONS MADE TO THIS SOFTWARE. ; ;********************************************************************** ;********************************************************************** ; ; TESTS LOOP TIMING OF DLA128 SUBROUTINE IN QTIMER-II QTUTIL.V52 ; ; RUN TIME SHOULD BE ABOUT 60 SECONDS FOR EACH PROGRAM ON TARGET CPU ; ; "TST83" TESTS 18 MHZ KDJ CPUSS (83, 93) ; ; "TSTKDJ" TESTS 15 MHZ KDJ CPUS (53, 73, 73B) ; ; "TSTKDF" TESTS KDF (11/23, 11/23+) ; ; "TSTLSI" TESTS LSI11 (11/2) ; ;********************************************************************** ;********************************************************************** ; ; FOR TIMING TESTS ; enter with R5 containing binary of speed of CPU (ie KDF = 23.) ; ; FOR USE - DELAY routine gets cpu speed via @#QPROC ; ;*********************************************************************** ; ; Actual DLA128 measured run time for 15 Mhz '73 is 23 seconds. ; ( 0.172 * 128 = 22.0 - not bad! ) ; ;********************************************************************** ;********************************************************************** ; CR = 15 LF = 12 BELL = 7 ; ;********************************************************************** ; .MCALL .PRINT .MCALL .EXIT ; ;********************************************************************** ; START:: MOV #BEGIN,R0 ; get starting message .PRINT ; MOV #23.,R5 ; 23 cpu speed into R5 for now MOV #3.,R4 ; do timing subroutine 3 times ; TAG: JSR PC,DLA128 ; do the 20 second subroutine DEC R4 ; same code for LSI (no SOB) BNE TAG ; MOV #DONE,R0 ; get ending message .PRINT .EXIT ; ; BEGIN: .ASCIZ /TSTKDF START TIMING/ DONE: .ASCIZ /END TIMING/ .EVEN ; ;********************************************************************** ;********************************************************************** ; DLA128: JSR PC,(PC) ; delay approx 128 * 172 msec = 22 sec DLA64: JSR PC,(PC) ; 64 * 172 msec = 11 sec DLA32: JSR PC,(PC) ; 32 * 172 msec = 5.5 sec DLA16: JSR PC,(PC) ; 16 * 172 msec = 2.75sec DLA8: JSR PC,(PC) ; 8 * 172 msec = 1.37 sec DLA4: JSR PC,(PC) ; 4 * 172 msec = .69 sec JSR PC,(PC) ; DLA1: MOV R1,-(SP) ; actual delay loop routine MOV R2,-(SP) CLR R2 ; zero loop to ZERO register ; test MOV @#QPROC,R1 ; get binary cpu speed value into R1 MOV R5,R1 ; JUST TO KEEP THE MOV INSIDE THE LOOP ; ; We configure DLA1 so that it can handle both existing Q-BUS CPU's ; and easily be fixed for faster CPU's. Actual DLA1 delay loop time ; for any Q-BUS cpu should be about 0.172 seconds. ; ; YES! Considerable ROM space could be saved by flipping the following ; code but by isolating the code for each type of cpu we made it very ; easy to dial in the loop length for consistant time delays. ; We have lots of space on this page so ... ; ; add code for an even FASTER cpu here ; CMP R1,#83. ; is this a 18 Mhz or faster CPU? BLT 10$ ; NO ==> slow KDJ or KDF or LSI SOB R2,. ; if here, this is 11/83 or 11/93 SOB R2,. MOV #26200.,R2 ; experimentally determined 5$: SOB R2,5$ ; should be 0.172 seconds total BR ALLOUT ; go do cleanup and return ; 10$: CMP R1,#53. ; Is it a 15 Mhz KDJ? BLT 20$ ; NO ==> KDF or LSI SOB R2,. ; if here 53, 73, 73B SOB R2,. ; 0.172 sec total on KDJ11-AB BR ALLOUT ; 20$: CMP R1,#23. ; Is it a KDF type? BLT 30$ ; NO ==> LSI SOB R2,. ; if here, 11/23 (+) MOV #3200.,R2 ; experimentally determined 25$: SOB R2,25$ ; should be about 0.172 seconds BR ALLOUT ; 30$: MOV #20500.,R2 ; must be LSI ( 11/2 ) 35$: DEC R2 ; 11/2 has NO SOB BNE 35$ ; total LSI delay is ??? seconds ; ALLOUT: MOV (SP)+,R2 ; just restore the stack MOV (SP)+,R1 RTS PC ; end of delay loop ; ;*********************************************************************** ;********************************************************************** ; .END START