; ; PCPICLK.MAC ; ; Z80 DateStamper clock driver for use with 6502 hardware ; driver. Uses same convention for all Apple clocks. ; ; 12/25/87 - sh. ; ; ; *** NOTE *** CLKADD must be patched to the base address of ; your running DateStamper(tm) system! This is displayed during ; loading of the DS module. More information may be found in the ; DateStamper manual Appendix 'B'. ; ; CLKADD EQU 0E395H ;patch this for your installation! ; ; ; WR65WRD EQU 0FFE9H ;write word to 6502 RD65BYT EQU 0FFE0H ;read byte from 6502 RD65BLK EQU 0FFECH ;read block from 6502 ; ; .Z80 ; ORG 80H DW CLKLEN ;length of clock driver DW 0 ;static year if needed DB 'PCPI Clk DVR' ;name of clock driver ; ; ORG CLKADD ; CLOCK: LD DE,16*256 + (14*4+0C3h) ;command #16 to char. dev. #14 'other' CALL WR65WRD ; LD DE,5 CALL RD65BLK ;read first five bytes ;'hl' had the buffer address! LD E,(HL) ;grab previous seconds CALL RD65BYT ;now get new seconds LD (HL),A ;and put in buffer RET ; ; CLKLEN EQU $ - CLOCK ; should be <= 42H! END