home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / BEEHIVE / OS / Z80D24SR.ARC / BIOSTIME.Z8Ä next >
Text File  |  1991-02-10  |  2KB  |  91 lines

  1. ; Z80DOS - Z80 Disk Operating System
  2. ;
  3. ; Version 1.0 - 05 Sept. 87 by Carson Wilson
  4. ;
  5. ;
  6. ; BIOSTIME.Z8D - Example BIOS inserts to implement Z80DOS time
  7. ; routine at BIOS+72.  This is from the Morrow MD3 BIOS.  Address
  8. ; of "jp time" will vary with system.
  9. ;
  10.  
  11. ; <Detail of BIOS left out>
  12.  
  13. timebuf    equ    50h    ; Address of time storage at page zero
  14.             ; or other available protected RAM area
  15. ;
  16. ; Begin BIOS code:
  17. ;
  18.  
  19. START:    JP BOOT        ;BIOS
  20. WBOT:    JP WBOOT    ;BIOS+3
  21.     JP CONST    ;BIOS+6
  22.     JP CONIN    ;+9
  23.     JP CONOUT    ;+12
  24.     JP LST        ;+15
  25.     JP PUN        ;+18
  26.     JP PTR        ;+21
  27.     JP HOME        ;+24
  28.     JP SELDSK    ;+27
  29.     JP SETTRK    ;+30
  30.     JP SETSEC    ;+33
  31.     JP SETDMA    ;+36
  32.     JP READ        ;+39
  33.     JP WRITE    ;+42
  34.     JP LISTST    ;+45
  35.     JP SECTRAN    ;+48
  36. ;
  37.     JP CVMSG    ;+51 CHANGE VIRTUAL DRIVE MESG.
  38. ;
  39.     JP RDBLK    ;+54    DIRECT DISK READ
  40.     JP WRBLK    ;+57    DIRECT DISK WR
  41.     JP DISCIO    ;+60    DIRECT DISK I/O
  42. ;
  43.     DB REV
  44.     DW RAMDATX
  45.     DW RAMYDAT
  46.     DW MTAB
  47.     DW XLTAB
  48. ;
  49. ; Insert jump to time routine at first available place in BIOS:
  50. ;
  51.     jp time        ;BIOS + 72 = get time
  52. ;
  53. ; BIOS + 72 will be the number for BIOStim in Z80DHDR.LIB.
  54. ;
  55.  
  56. ; <Detail of BIOS left out>
  57.  
  58. ; Insert time routine between other routines in BIOS.
  59.  
  60. ;
  61. ; Example time routine for systems without real time clock:
  62. ;
  63. ; Inputs: C <> 0: 5-byte entry pointed to by HL sets system time
  64. ;          HL points to 5-byte time buffer of the form:
  65. ;
  66. ;        HL + 0 = low  byte days since December 31, 1977 in hex
  67. ;        HL + 1 = high byte  "      "      "    "     "     "  "
  68. ;        HL + 2 = BCD hours
  69. ;        HL + 3 = BCD minutes
  70. ;        HL + 4 = BCD seconds
  71. ;
  72. ;      C = 0: On return HL points to 5-byte time entry
  73. ;
  74. time:
  75.     ld    a,c        ; Test flag
  76.     or    a
  77.     jr    nz,set        ; C <> 0, set time
  78.     ld    hl,timebuf    ; Point HL to buffer
  79.     ret
  80. set:
  81.     ld    de,timebuf    ; Point to storage
  82.     ld    b,5        ; Copy five bytes
  83.     ldir
  84.     ret
  85. ;
  86.  
  87. ; <Detail of BIOS left out>
  88.  
  89. ; END BIOSTIME.Z8D
  90.  
  91.