Master MOS Y2K in OSWORD 14 =========================== The only part of the Master MOS that does anything with centuries is the string returned by OSWORD 14,0. It is hard-wired to 19xx. Code calling OSWORD 14,0 should always be checking the returned result anyway in case there is no RTC at all, with something like: X%,Y%=>control block A%=14:?X%=0:CALL &FFF1 T$="":IF ?X%:X%?24=13:T$=LEFT$($X%,11)+STR$(26-(X%?13)DIV8)+$(X%+13) REM T$="" if no RTC, else T$=time string with correct century There's enough space in MOS 3.20 and MOS 3.50 to squeeze in a full 19xx vs 20xx year check, but - the further into the 21st century we get, the more remote is the need for OSWORD 14 on live hardware to return the year as 19xx, so why not hard-wire it to 20xx. This is easily done with: MOS 3.20: 9881 change to &20 MOS 3.50: 9664 change to &20 However, if you do want to patch the MOS to return both 19xx and 20xx, it can be done with: Patch MOS 3.20 -------------- 9880: C9 38 CMP #&38 ; Compare decade <- was: 9880: LDA #&19 ; Century=19 9882: 20 DF B8 JSR &B8DF ; Call patch <- was: 9882: JSR &9893 ; Insert century B8DF: A9 19 LDA #&19 ; Prepare century=19 B8E1: B0 02 BCS &BEE5 ; Decade>='8', use it B8E3: A9 20 LDA #&20 ; Set to century=20 BEE5: 4C 93 98 JMP &9893 ; Insert it and return Patch MOS 3.50 -------------- 9663: C9 38 CMP #&38 ; Compare decade <- was: 9663: LDA #&19 ; Century=19 9665: 20 21 FB JSR &FB21 ; Call patch <- was: 9665: JSR L9676 ; Insert century FB21: A9 19 LDA #&19 ; Prepare century=19 FB23: B0 02 BCS &FB2C ; Decade>='8', use it FB25: A9 20 LDA #&20 ; Set to century=20 FB27: 4C 76 96 JMP &9676 ; Insert it and return