From ee628477810acf8ca1f1c651e11df9a059fc655e Mon Sep 17 00:00:00 2001 From: Wayne Warthen Date: Mon, 6 Apr 2020 12:44:43 -0700 Subject: [PATCH] Revert "CP/M 3 Date Hack" This reverts commit 153b494e6124153fef5c87501cd0c6d90ad86d81. --- Source/CPM3/boot.z80 | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/Source/CPM3/boot.z80 b/Source/CPM3/boot.z80 index 53e36f47..b80d7631 100644 --- a/Source/CPM3/boot.z80 +++ b/Source/CPM3/boot.z80 @@ -490,21 +490,16 @@ time$ret: time$get: ; RTC -> cpm date/time in SCB - + ; read time from RTC ld b,020h ; HBIOS func: get time ld hl,tim$buf ; time buffer rst 08 ; do it ret nz ; bail out on error - ld a,(datehack) - or a - jr nz,time$get1 - ; convert yymmss in time buffer -> cpm3 epoch date offset call date2cpm ; time buf (yr, mon, day) -> SCB (@date) -time$get1: ; set time fields in SCB ld a,(tim$hr) ; get hour from time buf ld (@hour),a ; ... and put in SCB @@ -519,23 +514,7 @@ time$set: ; CPM date/time in SCB -> RTC ; convert CPM3 epoch date offset in SCB -> yymmss in time buffer - ;call cpm2date ; SCB (@date) -> time buf (yr, mon, day) - - ; this is a temporary hack!!! - ; since we cannot actually set the date on the RTC, we - ; just read the current RTC date and use that so that we - ; don't clobber a potentially good date. - ; read time from RTC - ld b,020h ; HBIOS func: get time - ld hl,tim$buf ; time buffer - rst 08 ; do it - ret nz ; bail out on error - ; - ; now we set a hack active flag so that future time$get - ; calls do not update the date field in the SCB - ; - ld a,0FFh ; true value - ld (datehack),a ; save it + call cpm2date ; SCB (@date) -> time buf (yr, mon, day) ; copy CPM3 time values from SCB -> time buffer ld a,(@hour) ; get hour from SCB @@ -650,8 +629,6 @@ tim$hr db 01h tim$min db 02h tim$sec db 03h -datehack db 00h - open: ld c,15 jp bdos