ML> I surmise (JdeBP probably knows) that the OS/2 CLOCK$ drivers read
ML> only the two low-order digits of the RTC clock year, and effectively
ML> put the two upper digits into the CMOS "century byte" by using
ML> windowing: Any year shown as greater than 79 gets 19 in that byte;
ML> any year less than 80 gets 20.
Excerpted from the `calc_year_sec' routine in CLOCK01.ASM off the OS/2 Warp 4
DDK:
------------------------------------------------------------------------
DATEOK:
; if year is over 20 centry ( year < 80 )
; year += 100
XOR AH,AH ; AX = LOWER PART OF YEAR
CMP AL,80 ; Is it 20xx?
JGE calc20 ; No, Add only 1900
ADD AX,100 ; Yes, add extra 100
; year += 1900
; save on stack
calc20: ADD AX,1900 ; AX = Year and century
MOV century_year,ax ;
SUB AX,1980 ; Get years since 1980
------------------------------------------------------------------------
This routine is called from `FIXISEG', which is the routine that reads from
the RTC registers and writes into the (16-bit) global infoseg.
¯ JdeBP ®
--- FleetStreet 1.22 NR
* Origin: JdeBP's point, using Squish (2:257/609.3)
|