TITLE "B/P BIOS Clock Interface - (BPBIOS)" SUBTTL "Description of Clock Module" ;=================================================================== ; BPBIO.Z80 ; ZSDOS Clock driver for B/P BIOS Clock interface. ; Harold F. Bower ; Version: 15 Mar 93 ;=================================================================== VERS EQU 10 .Z80 NAME ZSBIOS MACLIB CLOCK.LIB COMMON /_CLKID_/ DESCST: DEFW 0 ; Ptr to statyr CLKNAM: DEFB 'B/P BIOS Vector ' ; Exactly 24 chars DEFB VERS/10+'0','.',VERS MOD 10 + '0',0 DESCR: DEFB ' Interface for B/P BIOS Clock',CR,LF,0 IF [$-DESCST] > 256 OVER2 ENDIF SUBTTL "Configurable Clock Hardware Parameters" COMMON /_PARM_/ PARBAS: DEFW NPARMS ; No parameters to set DEFW STRS NP0: NPARMS EQU ($-NP0)/3 STRS: DEFB 0 PAGE SUBTTL "Clock Code - B/P BIOS Vector" WBOOT EQU 0 ; Warm Boot Vector B_TIME EQU 26*3 ; Low byte in B/P Bios Jump Vector CSEG ;------------------------------------------------------------- ; Z S D O S C L O C K H E A D E R ;------------------------------------------------------------- ; Enter: HL points to a 6-byte buffer to Get/Set time ; Exit : A = 1 on Success, A = FFH if error ; HL points to last char in buffer JP DOREAD ; Jump to Read Clock JP DOWRIT ; Jump to Set Clock ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; R E A D a n d S E T T h e C l o c k ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DOREAD: LD C,0 ; Set flag to Read the Clock DEFB 11H ; ..fall thru next instr trashing DE DOWRIT: LD C,01 ; Set flag to Set Clock (junk DE if Reading) EX DE,HL ; .Put Destination buffer in DE BIOADR: LD HL,0000 ; Has it yet been set? LD A,H OR L JR NZ,DOCLK0 ; ..jump if so LD HL,(0001) ; Else get Warm Boot entry LD L,B_TIME ; Set offset to Clock entry LD (BIOADR+1),HL ; ..add to code entry DOCLK0: JP (HL) ; Set address to stack PAGE SUBTTL "Run-Time Configuration of Ports and Masks" ; This code installs configurable items into the clock module ; Enter with DE pointing to the physical address of the relocatable module COMMON /_POST_/ RET ; Nothing else to install SUBTTL "Pre-Execution Clock Checks" ; This module is executed just prior to installing the module to insure ; that a valid clock is present ; Enter with DE pointing to beginning of relocated clock CSEG COMMON /_PRE_/ INCLUDE PRECLOCK.LIB END