|
DataMuseum.dkPresents historical artifacts from the history of: RegneCentralen RC850 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RegneCentralen RC850 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1536 (0x600) Types: TextFile Names: »RTCDRV.MAC«
└─⟦9f46c4107⟧ Bits:30005988 Sources for TurboDOS ver. 1.30 device drivers └─⟦this⟧ »RTCDRV.MAC«
.Z80 TITLE REAL TIME CLOCK DRIVER FOR RC 850 / 855 (CTC) SUBTTL Copyright by ASE GmbH, Altenstadt, version 6.1.84 ; NAME ('RTCDRV') ;MODULE ID ; INCLUDE RCEQUATE.MAC ; ; COMMON /?INIT?/ ;LOCATE IN INITIALIZATION AREA ; RTCNIT::LD HL,RTCISR ;INITIALIZE INTERRUPT VECTOR LD (SIO3V##+2),HL ; LD A,1 ;select register 1 OUT (SIO3C),A ; LD A,1DH ;enable external status interupt OUT (SIO3C),A ; RET ;INITIALIZE DONE ; CSEG ;LOCATE IN PROGRAM AREA ; ; ; real time clock service routine ; tick is initiated by 25 Hz pulse at CTS-pin on chanal B ; (25Hz uses high and low transition i.e. interupt occurs ; every 20ms) ; RTCISR:: DI LD (INTSP##),SP ; LD SP,INTSTK## ; PUSH AF ;SAVE PSW PUSH BC ; PUSH DE ; PUSH HL ; LD A,10H ;RESET EXT. INTERRUPT OUT (SIO3C),A ; CALL DLYTIC## ;SERVICE DISPATCHER DELAY MGR. L▶c4◀ HL,RTCCN▶d4◀ ;GE▶d4◀ DIVIDE-BY-5▶b0◀ COUNT DE▶c3◀ (HL▶a9◀ ;DECREMEN▶d4◀ COUNTER J▶d0◀ NZ,NOSTI▶c3◀ ;NO▶d4◀ 5▶b0◀ TICK▶d3◀ YET▶ac◀ EXIT LD A,(CRT60##) ;get 50/60Hz CRT controler flag OR A ;test flag L▶c4◀ (HL),5▶b0◀ ;get 50Hz tick count JR Z,NO60HZ ;if 50HZ, jump LD (HL),60 ;preset tick count for 60Hz NO60HZ: CAL▶cc◀ RTCSE▶c3◀## ;SIGNA▶cc◀ ON▶c5◀ SECOUN▶c4◀ ELAPSE▶c4◀ TIME CALL LANSTD## ;service LAN driver for status LED ; NOSTIC: CALL LANCLK## ;service LAN timeout routine CALL SYGCLK## ;service syncronus gateway clock POP H▶cc◀ ▶bb◀restor▶e5◀ register POP DE ; POP BC ; POP AF ; LD SP,(INTSP##) ; JP ISRXIT## ; ; DSEG ; RTCCNT: DB 0 ;COUNTER VALUE ; END «eof»