Index of /ukdwk_archive/ukncbtlwebcomplekt/Other/form_CL

[ICO]NameSizeDescription
[PARENTDIR]Parent Directory -  
[   ]CL.MAC5.4K 
[IMG]cl.png2.3K 
[   ]CL.SYS1.5K 

Модуль CL.SYS (CL.MAC - исходник) для УК-НЦ (ОС RT-11), CL V02.00 (c) 1990, 2011 by Oleg Safiullin

.MCALL .MODULE .MODULE CL,VERSION=02,COMMENT=,AUDIT=YES $SYPTR = 54 $CNFG1 = 300 CLK50$ = 40 $SYSGE = 372 H.GEN = 60 CR = 15 LF = 12 .MCALL .DRDEF,.GTIM,.PRINT .DRDEF CL,366,0,0,176640,0 .DRPTR FETCH=CLLOAD,LOAD=CLLOAD,UNLOAD=CLUNLO,RELEASE=CLUNLO .DRINS CL NOP TST (PC)+ BFLAG: .WORD 0 BNE O.GOOD JSR R0,PRINT .ASCII /CL V02.00 (c) 1990, 2011 by / .ASCIZ /Oleg Safiullin / .EVEN PRINT: TST (SP)+ .PRINT O.GOOD: TST (PC)+ O.BAD: SEC RETURN .DRSET BANNER,1,O.BANR,NO .DRSET SYSGEN,$SYSGE,O.SYSG O.BANR: MOV #0,R3 MOV R3,BFLAG BR O.GOOD O.SYSG: ADD @#$SYPTR,R3 MOVB @R3,H.GEN BR O.GOOD .DRBEG CL MOV CLCQE,R4 BIS #HDERR$,@-(R4) CLFIN: .DRFIN CL RETURN CLINT: DEC (PC)+ ;COUNT A TICK CLCNT: .WORD 60. ;TICK COUNT BNE CLJMP ;NE -> DONE MOV TICKS,CLCNT ;RESET TICK COUNT INC CLSEC ;UPDATE TIME CMP #60.,CLSEC ; BGT 10$ ; CLR CLSEC ; INC CLMIN ; CMP #60.,CLMIN ; BGT 10$ ; CLR CLMIN ; INC CLHRS ; CMP #24.,CLHRS ; BGT 10$ ; CLR CLHRS ; 10$: CALL PUTTIM CLJMP: MTPS @#102 ;RESET PSW JMP @(PC)+ ;JUMP TO SYSTEM TIMER ISR CL100: .WORD 0 ;SAVED VECTOR 100 CLHRS: .WORD 0 ;HOURS CLMIN: .WORD 0 ;MINUTES CLSEC: .WORD 0 ;SECONDS TICKS: .WORD 60. ;TECKS PER SECOND PUTTIM: MOV R0,-(SP) MOV R1,-(SP) MOV R2,-(SP) MOV R3,-(SP) MOV R4,-(SP) MOV R5,-(SP) MOV @#CL$CSR,-(SP) MOV #10.,R3 MOV #32.,R1 MOV CLHRS,R5 CALL PUTVAL MOV R3,R0 CALL PUTCHR MOV CLMIN,R5 CALL PUTVAL MOV R3,R0 CALL PUTCHR MOV CLSEC,R5 CALL PUTVAL MOV (SP)+,@#CL$CSR MOV (SP)+,R5 MOV (SP)+,R4 MOV (SP)+,R3 MOV (SP)+,R2 MOV (SP)+,R1 MOV (SP)+,R0 RETURN PUTVAL: CLR R4 DIV #10.,R4 MOV R4,R0 CALL PUTCHR MOV R5,R0 PUTCHR: MOV R0,-(SP) MOV R1,-(SP) MOV R2,-(SP) MOV R3,-(SP) MOV R0,R2 ASL R0 ASL R0 ASL R0 ADD R2,R0 ADD (PC)+,R0 CLFNTP: .WORD CLFONT-CLLQE ADD #176640,R1 MOV #9.,R2 10$: MOV R1,@#CL$CSR ADD #40.,R1 CLR R3 BISB @R0,R3 SWAB R3 BISB (R0)+,R3 MOV R3,@#CL$CSR+2 SOB R2,10$ MOV (SP)+,R3 MOV (SP)+,R2 MOV (SP)+,R1 MOV (SP)+,R0 INC R1 RETURN CLFONT: .BYTE ^B00111110 .BYTE ^B01000001 .BYTE ^B01100001 .BYTE ^B01010001 .BYTE ^B01001001 .BYTE ^B01000101 .BYTE ^B01000011 .BYTE ^B01000001 .BYTE ^B00111110 .BYTE ^B00001000 .BYTE ^B00001100 .BYTE ^B00001010 .BYTE ^B00001000 .BYTE ^B00001000 .BYTE ^B00001000 .BYTE ^B00001000 .BYTE ^B00001000 .BYTE ^B00111110 .BYTE ^B00111110 .BYTE ^B01000001 .BYTE ^B01000000 .BYTE ^B00100000 .BYTE ^B00010000 .BYTE ^B00001000 .BYTE ^B00000100 .BYTE ^B01000010 .BYTE ^B01111111 .BYTE ^B00111110 .BYTE ^B01000001 .BYTE ^B01000000 .BYTE ^B01000000 .BYTE ^B00111100 .BYTE ^B01000000 .BYTE ^B01000000 .BYTE ^B01000001 .BYTE ^B00111110 .BYTE ^B01000001 .BYTE ^B01000001 .BYTE ^B01000001 .BYTE ^B01000001 .BYTE ^B01111110 .BYTE ^B01000000 .BYTE ^B01000000 .BYTE ^B01000000 .BYTE ^B01000000 .BYTE ^B01111111 .BYTE ^B00000001 .BYTE ^B00000001 .BYTE ^B00000001 .BYTE ^B00111110 .BYTE ^B01000000 .BYTE ^B01000000 .BYTE ^B01000001 .BYTE ^B00111110 .BYTE ^B00111110 .BYTE ^B01000001 .BYTE ^B00000001 .BYTE ^B00000001 .BYTE ^B00111111 .BYTE ^B01000001 .BYTE ^B01000001 .BYTE ^B01000001 .BYTE ^B00111110 .BYTE ^B01111111 .BYTE ^B01000000 .BYTE ^B00100000 .BYTE ^B00010000 .BYTE ^B00001000 .BYTE ^B00000100 .BYTE ^B00000010 .BYTE ^B00000001 .BYTE ^B00000001 .BYTE ^B00111110 .BYTE ^B01000001 .BYTE ^B01000001 .BYTE ^B01000001 .BYTE ^B00111110 .BYTE ^B01000001 .BYTE ^B01000001 .BYTE ^B01000001 .BYTE ^B00111110 .BYTE ^B00111110 .BYTE ^B01000001 .BYTE ^B01000001 .BYTE ^B01000001 .BYTE ^B01111110 .BYTE ^B01000000 .BYTE ^B01000000 .BYTE ^B01000001 .BYTE ^B00111110 .BYTE ^B00000000 .BYTE ^B00000000 .BYTE ^B00001000 .BYTE ^B00000000 .BYTE ^B00000000 .BYTE ^B00000000 .BYTE ^B00001000 .BYTE ^B00000000 .BYTE ^B00000000 .EVEN .DREND CL CLUNLO: MOV @R5,R5 ;POINT TO CLLQE MOV CL100-CLLQE(R5),@#100 ;RESTORE TIMER VECTOR MOV #8.,R1 10$: MOV #9.,R2 MOV #176640+31.,R0 ;XXX POSITION ADD R1,R0 20$: MOV R0,@#CL$CSR ADD #40.,R0 CLR @#CL$CSR+2 SOB R2,20$ SOB R1,10$ BR CLRETN ;RETURN CLLOAD: MOV @R5,R5 ;POINT TO CLLQE MOV @#$SYPTR,R4 ;POINT TO RMON BASE MOV #60.*60.,R3 ;ASSUME 60-HZ CLOCK MOV #60.,TICKS-CLLQE(R5) ; BIT #CLK50$,$CNFG1(R4) ;USING 50-HZ CLOCK? BEQ 10$ ;EQ -> NO MOV #50.*60.,R3 ;YES MOV #50.,TICKS-CLLQE(R5) ; 10$: MOV TICKS-CLLQE(R5),CLCNT-CLLQE(R5) ; CMP -(SP),-(SP) ;RESERVE SPACE FOR GTIM EMT AREA MOV SP,R1 ; CMP -(SP),-(SP) ;RESERVE SPACE FOR SYSTEM TIME .GTIM R1,SP ;GET SYSTEM TIME MOV (SP)+,R0 ;GET TICK COUNT (HI) MOV (SP)+,R1 ;GET TICK COUNT (LO) CMP (SP)+,(SP)+ ; DIV R3,R0 ;CONVERT TO H,M,S MOV R1,R3 ; CLR R2 ; DIV TICKS-CLLQE(R5),R2 ; MOV R2,CLSEC-CLLQE(R5) ;STORE SECONDS MOV R0,R1 ; CLR R0 ; DIV #60.,R0 ; MOV R1,CLMIN-CLLQE(R5) ;STORE MINUTES MOV R0,CLHRS-CLLQE(R5) ;STORE HOURS ADD R5,CLFNTP-CLLQE(R5) ;ADJUST FONT POINTER CALL PUTTIM-CLLQE(R5) ;PRINT TIME MOV @#100,CL100-CLLQE(R5) ;SAVE TIMER VECTOR ADD #CLINT-CLLQE,R5 ;SETUP TIMER VECTOR MOV R5,@#100 ; CLRETN: CLC ;CLEAR CARRY RETURN ;RETURN TO MONITOR .END