CMOS in Scorpion driver
ZXNet echo conference «real.speccy»
From Valerij Kozhevnikoff → To All 16 November 1998
*Forwarded by Valerij Kozhevnikoff
*Orig.Area: ZXNET.SOFT
*Orig.From: Klim Gromov
*Orig.To : Viktor Kuzmin
*Orig.Subj: CMOS in Scorpion driver
*Orig.Date: 11 Nov 98
*Orig.Time: 23:53:29
============================================================================== =
So you asked.
Let me explain on my own - reading the register:
LD A, REG_NUMBER
LD BC, #DFBA
CALL WRDOS
CALL RET
WRDOS LD HL,#3FF0
M1 PUSH HL
JP #3D2F
RDDOS LD HL,#3FF3
JR M1
Greetings, Viktor!
I would really like to see a working CMOS clock in your programs, if they
are built into the computer, and support is not implemented, then by any means you try
to place your drivers there and there is something similar, and the quality of the program may
deteriorate from this, considering that it is not the Author who is interfering with the program, but a hacker.
If in the future you will make drivers for EMC and other useful software,
then please provide for the possibility there. using the watch. Next, I am posting a subject
written by me, which shows how you can use CMOS according to the Skorpov
scheme; if you wish, you can write another one. I also post several other
usefulprocedures.
CHECK;--------------------------------------------------------
;checking whether the computer is Scorpio or not
;--------------------------------------------------------------
LD A,(8)
CP #C3
JP NZ, not Scorpio
TURBO;-------------------------------------------
;turns on the turbo speed of the computer
;(preferably used when working with TR_DOS).
;--------------------------------------------------------------
RST 8
DEFB #87
RET
NORMAL;--------------------------------------------------------
;turning off the computer's turbo speed.
;--------------------------------------------------------------
RST 8
DEFB #88
RET
CHECK_CMOS;------------------------------------
;checking the presence of a CMOS clock
;--------------------------------------------------------------
LD A,1
CALL WR_DOS
CALL RD_DOS
CP #FF
RET NZ
LD A,201
LD (ERR_1),A
RET
TIME?;-------------------------------------------
;
;
;--------------------------------------------------------------
ERR_1 NOP ;for #C9 (RET)
XOR A
CALL READ_DALLAS ;SECU DY
LD HL,R_SEC
CP (HL)
JR Z,EX_T ;exit, they were already working at that second
LD (HL),A
LD DE,SEC
CALL PEEK_4TIME
LD A,2
CALL READ_DALLAS ;MI UTY
LD (R_MIN),A
LDDE,MIN_
CALL PEEK_4TIME
LD A,4
CALL READ_DALLAS ;ЧАСЫ
LD (R_HOUR),A
LD DE,HOUR
CALL PEEK_4TIME
EX_T POP AF
POP BC
POP DE
POP HL
RET
T_STR
DEFB "["
HOUR DEFB "**"
DEFB ":"
MIN_ DEFB "**"
DEFB ":"
SEC DEFB "**"
DEFB "]"
E_T_STR
R_HOUR DEFB 0 ;ПОКАЗА ИЯ ПОРТОВ CMOS
R_MIN DEFB 0
R_SEC DEFB 0
PEEK_4TIME;---------------------
LD C,A
PEEK_1 LD HL,TABL-1
PN_2 INC HL
LD C,A
SUB 10
JR NC,PN_2
LD A,(HL)
LD (DE),A
LD HL,TABL-1
LD A,C
PN_3 INC HL
SUB 1
JR NC,PN_3
LD A,(HL)
INC DE
LD (DE),A
RET
TABL DEFB "0123456789"
READ_DALLAS;--------------------
DI
PUSH AF
LD BC,#DFBA
NR2 LD A,10
CALL WR_DOS
CALL RD_DOS
BIT 7,A
JR NZ,NR2
POP AF
CALL WR_DOS
CALL RD_DOS
RET
RD_DOS;--------------------------------------------------------
LD HL,#3FF3
PUSH HL
JP #3D2F
WR_DOS;--------------------------------------------------------
LD HL,#3FF0
PUSH HL
JP #3D2F
Sinserely yours, Klim.
From Klim Gromov → To All 18 November 1998
Somehow on 16 Nov 98, when it was 05:16:36 in Moscow, Mr. Valerij Kozhevnikoff
wrote to Andrey Isaev:
VK> LD A, REG_NUMBER
VK> LD BC,#DFBA
VK> CALL WRDOS
VK> CALL RDDOS
VK> RET
Or rather, it should be like this:
PUSH AF
NR LD A,10
CALL WR5DOS
CALL RDDOS
BIT 7,A
JR NZ,NR ;watch is not ready
POP AF
..... ;continuation of the algorithm as before
This is necessary if the watch is not DALLAS, for example, and VI1. The 'NR' mark in exactly this
place should be checked.
SY, Klim Gromov.
From Kirill Frolov → To All 20 November 1998
16-11-98 05:16:36 Valerij Kozhevnikoff ==> Andrey Isaev
CMOS in Scorpion driver
VK> CHECK;-----------------------------------------------------------
VK> ;checking the computer is Scorpio or not
VK> ;--------------------------------------------------------------
VK> LD A, (8)
VK> CP #C3
VK> JP NZ, not a scorpio
Didn’t it occur to you that, for example, in a sprinter it could be like this
?
And climbing to Scorpov’s watches/discs on RST-8 is a sax and
you don’t need to do that. Directly is better if possible.
W!7h Be$7 W!5he$, FK0.
From Dmitry Sharikov → To All 21 November 1998
One day on the 20th of Nov 98 at exactly 02:07:00 Kirill Frolov
wrote to Valerij Kozhevnikoff on the topic 'CMOS in Scorpion driver':
KF> And climbing to the Scorpio watches/discs on RST-8 is a sax and
KF> you don’t need to do that. Directly is better if possible.
I would not say that climbing to the screw through RST8 is a brake...
With best wishes, Dmitry.