<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 18 Aug 2008 01:52:28 +0100
From   : jgh@... (Jonathan Graham Harston)
Subject: Master 128 century correction

"Raf" wrote:
> Jonathan wrote:
> > 2: You don't need to read the RTC hardware manually yourself, when
> > there is code already existing in the machine to do it for you.
> > Rather than intercept OSWORD 14 and do everything, pass the call on
> > the the MOS, and modify the returned data if it needs modifying,
> > something like:
 
> I am unable to get the above to work. At one stage,
 
REM > NewTime/s
REM Intercept RTC calls to force 21st century
:
DIM mcode% &800
FOR P=0 TO 1
P%=&8000:O%=mcode%
[OPT P*3+4
EQUB 0:EQUW 0
JMP Service
EQUB &82:EQUB Copyright-&8000:EQUB 1
EQUS "TIME":EQUB 0
EQUS "1.00"
.Copyright
EQUB 0:EQUS "(C)"
EQUB 0
:
.Service
CMP #&27:BEQ ServReset
RTS
.ServReset
LDA &20C:STA oldwordv+0
LDA &20D:STA oldwordv+1
LDA #newword AND 255:STA &DB1
LDA #newword DIV 256:STA &DB2
STX &DB3
LDA #&12:STA &20C
LDA #&FF:STA &20D
LDA #&27:RTS
:
.newword
CMP #14:BEQ newword14
.oldword
JMP (oldwordv)
:
.newword14
STX &F0:STY &F1
LDY #0:LDA (&F0),Y:PHA
LDY &F1:LDA #14:JSR oldword
PLA:BNE exit
LDY #11:LDA #ASC"2":STA (&F0),Y
INY:LDA #ASC"0":STA (&F0),Y
.exit
LDX &F0:LDY &F1:LDA #14
RTS
:
.oldwordv:EQUW 0
]
NEXT
A$="SAVE NEWTIME "+STR$~mcode%+" "+STR$~O%+" 8000 8000"
OSCLIA$
 
-- 
J.G.Harston - jgh@...                - mdfs.net/User/JGH
**** DO NOT EMPLOY MARREN BUILDERS/ROOFERS, SHEFFIELD ****
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>