home *** CD-ROM | disk | FTP | other *** search
- ; Z80DOS - Z80 Disk Operating System
- ;
- ; Version 1.0 - 05 Sept. 87 by Carson Wilson
- ;
- ;
- ; Support file: Z80DMOD.Z80
- ; Version: 1.0
- ; Author: Fred Haines, adapted from the routine by Carson Wilson
- ;
- ; Description: eliminates necessity for BIOS insert to implement
- ; Z80DOS time routine without a realtime clock.
-
- ; Example time routine for systems without realtime clock:
- ;
- ; Inputs: C <> 0: 5-byte entry pointed to by HL sets system time
- ; HL points to 5-byte time buffer of the form:
- ;
- ; HL + 0 = low byte days since December 31, 1977 in hex
- ; HL + 1 = high byte " " " " " " "
- ; HL + 2 = BCD hours
- ; HL + 3 = BCD minutes
- ; HL + 4 = BCD seconds
- ;
- ; C = 0: On return HL points to 5-byte time entry
-
- ;
- ; Begin routine
-
- timebuf equ 0050h ; Address of time storage at page zero
- ; or other available protected RAM area
-
- org bios-17
-
- time1:
- ld a,c ; Test flag
- or a
- jr nz,setime ; C <> 0, set time
- ld hl,timebuf ; Point HL to buffer
- ret
- setime:
- ld de,timebuf ; Point to storage
- ld bc,5 ; Copy five bytes
- ldir
- ret
-
- ; END Z80DMOD.Z80
-