###
ZXNet echo conference «code.zx»
From Aleksandr Majorov → To All 5 July 1997
Hayushki, All!
Here's a bad thing for you, if you call her in the ISDOS,
then she reads the date from CMOS and pushes it
in her place...
the program was typed in ZASME (rulez) with
use of its capabilities, therefore
either work in it, or with pens ;-)
╔══════════════ let’s start from here ══════════╗
; AUTO DATE SET FOR IS-DOS
MAKE "dt.com",25000
;At the same time we turn on Scorp's TURBO mode
LD BC,#7FFD: IN A,(C)
;read the date and pack it into
;tricky format:
;DE by bit:
;FEDCBA9876543210
;yyyyyyMMMMdddddd
;where "yyyyy" is the year number MINUS 80!
;"MMMM" - month number
;"dddd" - day.
LD A,7: CALL READ_CM
AND #1F: LD H,A ;DAY
LD A,8: CALL READ_CM
AND #0F: LD L,A ;MONTH
LD A,9: CALL READ_CM
SUB 80: LD D,A ;YEAR
LD A,L
RLCA: RLCA: RLCA: RLCA: RLCA
RL D
OR H: LD E,A
PUSH DE
LD C,#45: RST 16
EXX: POP DE
DEC HL: DEC HL
LD (HL),D: DEC HL: LD (HL),E
RET
READ_CM LD BC,#FFF9
LD DE,#3FF0: CALL TR_DOS
LD C,#79
LD DE,#3FF3: CALL TR_DOS
;TRANSFER FROM BIN-DECIMAL. SYSTEMS
;TO BINARY
DECODE LD C,A: AND #F0
RRCA: LD B,A
RRCA: RRCA: ADD A,B
LD B,A
LD A,C: AND #0F: ADD A,B
RET
TR_DOS PUSH DE: JP #3D2F
╚═════════════ enough for today ═════════╝
Well, that's all...
Best regards, Aleksandr (*MAS*)
From Michael Kondratyev → To Aleksandr Majorov 7 July 1997
Hello Alexander!
Sat Jul 05 1997, Aleksandr Majorov (812/00.00) concocted a letter to All:
AM> Here's a bad thing for you, if you call it in ISDOS
AM> then she reads the date from CMOS and pushes it in
AM> put it in place...
why is she so fat?
AM> the program was typed in ZASMA (rulez) with
AM> use of its capabilities, therefore
AM> or work in it, or with pens and pens ;-)
God, how pathetic. It's not readable at all.
AM> ╔══════════════ let's start from here ══════════╗
AM> ; AUTO DATE SET FOR IS-DOS
ld d, 00100001b ; read reg bin ? ? ? ? date
MOA_SERVICE Rst08_TIME
jc @@no_146818_chip
ld a, e ; year
sub 80
ld h, a
ld a, b ; month
rept 5
add a, a
endm
rl h
or c ; day
ld l, a
push hl
ISDOS_RST 0x45
exx
dec hl
dec hl
pop deld (hl), d
dec hl
ld (hl), e
@@no_146818_chip:
xor a
ret
AM> ╚═════════════ на сегодня хватит ═════════╝
With best wishes, Michael.
From Max Melnikov → To Konstantyn Kankyev 31 May 2001
Hello, Konstantyn Kankyev.
· ·· ---·<[ Local time 10:07 ]>·-- -···
· ·· ---·<[ Konstantyn Kankyev and All ]>·-- -···
· ·· ---·<[ Discussing ]>·-- -···
KK> We need an upper memory driver for machines >128 kb, preferably in
KK> plaint-text. If possible, duplicate it at zx_spec@chat.ru
KK> PS. Are you sorry to share? My toy does not fit into 128 kg
KK> ...
It flew by earlier:
─ [1] What interests me. (500:3432/13) ────────────────────────── MY.MAIL ─
Msg: 9 of 95
From : Felix Knajzev 500:812/5.9 Wed 05 Jul 00 13:29
To: Alexandr Kolotukhin
Subj: computers.
─────────────────── ──────────────────── ──────────────────── ────────────────────
@RealName: Knyazev Felix Apollonovich
Greetings, O venerable Alexandr!
[Saturday July 1, 2000] at [16:25:31] Alexandr Kolotukhin wrote a letter to All.
They discussed the topic "computers." Let's continue what we started...
AK> Tell me, please:
AK> 1. How to identify different types of computers from ACM:
AK> Scorp, Kai, Proffi, ATM and others who have memory
AK> 256 and
AK> above.
[skip]
============== here we will start the file "OnLine76.C" ================(C) PAUL FALCON
I would like to introduce you to a program that will help you
rummage" with the top memory. That is, control it on different machines
nah.
When launched, the program itself determines which computer it is connected to.
works. And sets the variables in accordance with the testing
machine knowledge: what kind of computer, and how many “brains” it has, i.e. pa-
wrinkle.
To work with the program, it is enough to refer to three procedures:
frames regardless of the type of specific computer.
The main system 55-65% was coded by my friend Yura Kovalevsky. pe-
reworked, added more machines to identify, coded 45-35% - me.
Well, now the technical information, in fact, what and how:
Data for a specific machine is in the variable (IY+118)
(23728) and its bit layout is as follows:
0 =1 there is port #7FFD SPECTRUM 128K
1 =1 there is port #1FFD SCORPION or KAY
2 =1 there is a port #DFFD PROFI
3 =1 there is a port #FFF7 TURBO 2+
4 =1 there is port #FDFD ATM TURBO
5 =1 6 and 7 bits are valid #7FFD
6
7 =1 at address 8 bytes #C3 (SCORPION)
Matches by meaning, i.e. what significance will it have
belt (IY+118) when identifying a particular computer:
0 SPECTRUM 48K
1 SPECTRUM 128K
32+1 SPECTRUM 256K - 512K
2 KAY 48K
2+1 KAY 256K - 1024k
4 PROFI 48K
4+1 PROFI 256K - 1024K
8 TURBO 2+ 48K
8+1 TURBO 2+ 128K - 1024K16 ATM TURBO 48K
16+1 ATM TURBO 128K - 512K
128 SCORPION 48K
128+1 SCORPION 128K
128+2 SCORPION 256K - 1024K
The number of actually existing pages is entered into the variable
new (IY+119)(23729).
Naturally, you can use other addresses for storing these
variables, but these are the most convenient in my opinion.
Managing the program is so simple that you need to know everything
three procedures:
If, when defining any machine, it is necessary to exclude non-
how many pages, then the DEBUG procedure will help here, in the C register
indicates the number of the page to be deleted from the table. Do it on-
before immediately after machine definition and after memory definition
(after CALL VIRT).
Example: ....
LD C,8
CALL DEBUG
....
In this example, page number 8 will be removed from the available ones
for switching (useful for Scorp, it does not kill the shadow).
If this procedure is not useful to you, then you can safely cut out
load it from the program from the DEBUG to ONPAGE labels.
Also, the number of pages and their numbers can be adjusted
right in the table itself (at the end of the program) initially there is no
There are 2 and 5 pages.
Turning pages by their logical number is a procedure
ONPAGE.
Example: ....
LD A,8
CALL ONPAGE
....
This example will include with #C000 the page located at numberru (in reg. A) from the beginning of the table (in our case it will be included
Page 10, if there is one here at all).
Turning pages by their physical number is a procedure
EX_RAM.
Example: ....
LD A,8
CALL EX_RAM
....
From #C000 the page with the number (in reg. A) will turn on. Those. really
8 page.
Here's the program itself...
; @ @ @ @@@ @@@
; @ @ @ @ @ @ @
; @ @ @ @ @ @ @ @@ @ @ @ @@ @ @@@
; @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
; @ @ @ @ @ @ @ @ @ @ @ @ @@ @@ @ @ @@
; @@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
; @ @ @@@ @ @@@ @@ @ @ @ @ @ @@@@
;
; VERSION 5.5. IMPROVED.
;
;
; AUTOCONFIG PAGEMAKER FOR MACHINES:
;
; TURBO 2+ (48K - 1024K) V6.00 - V7.1
; ATM TURBO (48K - 512K) V4.10 - V5.20
; SCORPION (48K - 1024K)
; PROFI (48K - 1024K)
; SPECTRUM (128K - 512K) 6 & 7 BIT #7FFD
;
; THE SHAREWARE PRODUCT FOR FREE USING!
; (when using this procedure in
; their programs link to the authors
; almost mandatory (but up to you))
START ; start started...
XOR A
LD (IY+118),A ; computer type
INC A
LD (IY+119),A ; number of available pages
D.I.
; check (.) 'RST 8' in ROM 48 (if ZS-256, there is #C3)
LD BC,#7FFD
LD A,#10
OUT(C),A
LD A,(#0008)
CP#C3JR NZ,ITURBO ; not ZS-256
; this is probably SCORPION
SET 7,(IY+118)
ITURBO
; checking the presence of a RAM/ROM manager
; take 2 bytes from the 0th segment (ROM48 there)
LD HL,(1111)
; duplicate ROM48 in the 3rd segment (#C000-#FFFF)
LD BC,#FFF7
LD A,%00011111
CALL OUTC_A
; take 2 bytes of the 3rd segment (if TURBO 2+, there is ROM48)
LD DE,(#C000+1111)
AND A
SBC HL,DE ; compare with bytes of the 0th segment
; restoring the dispatcher
LD BC,#FFF7
LD A,#FF
CALL OUTC_A
JR NZ,IDFFD ; this is not TURBO 2+
; RAM/ROM manager detected (TURBO 2+)
SET 3,(IY+118)
JR I7FFD
; PROFI?
IDFFD LD HL,#80
LD DE,#1000
LD BC,#DFFD
; check for port #DFFD bit 4
; (check the RAM connection instead of ROM)
OUT (C),D ; enable the 0th RAM segment
; instead of ROM
; try to disable ROM
NOP
LD A,(HL) ; read byte
INC(HL); change it
CP(HL); compare with what we read
LD(HL),A ; restore the byte
OUT (C),E ; restoring ROM
JR Z,I1FFD ; no #DFFD port
; there is a port #DFFD (PROFI)
SET 2,(IY+118)JR I7FFD
; check for port #1FFD bit 0
; (check for RAM connection instead of ROM)
I1FFD LD DE,#1110
LD B,#1F
OUT (C),D ; enable RAM segment 8
NOP
LD A,(HL) ; read byte
INC(HL); change it
CP(HL); compare with what we read
LD(HL),A ; restore the byte
OUT (C),E ; put the ROM in place
JR Z, IDFFD ; no port #1FFD
; there is port #1FFD (SCORPION or KAY)
XOR A
OUT(C),A
SET 1,(IY+118)
JP I7FFD
IFDFD
; Checking for the presence of port #FDFD (ATM-1)
LD B,C
LD HL,#FFFF
OUT(C),D
NOP
LD B,#7F
OUT(C),D
NOP
LD(HL),D
LD B,C
OUT(C),E
NOP
LD B,#7F
OUT(C),D
NOP
LD(HL),E
LD B,C
OUT(C),D
NOP
LD B,#7F
OUT(C),D
NOP
LD A,(HL)
CP D
JR NZ,I7FFD ; there is no such word
; however there is a #FDFD port
SET 4,(IY+118)
; presence of port (#7FFD)
; (check for switching ROM48<->ROM128)
I7FFD LD HL,#80
LD DE,#1000
LD BC,#7FFD
OUT (C),D ; ROM 1, definitely!NOP
LD A,(HL) ; byte ROM 48
OUT (C),E ; ROM 0
NOP
CP(HL); byte from ROM 128
OUT (C),D ; ROM 1
NOP
JR Z,SIZED ; no port or blocked
; port #7FFD detected
SET 0,(IY+118)
; determine the amount of memory
SIZED
CALL VIRT ; DE - end of table (label #FF)
LD A,(IY+119) ; SPECTRUN 256K-512K ?
CP#08
JR C,ENDING
LD A,(IY+118)
CP#01
JR NZ,ENDING
SET 5,(IY+118) ; cool SPECCY 256K - 512K
ENDING
LD A,#00 ; page after exiting the program
CALL EX_RAM ; in port #7FFD on SPECTRUM 128K.
EI; for normal exit.
RET
; determination of real (!) pages for a given machine
; "phantom" pages will be removed from the logical table
; at the output:
; DE - end of table (label #FF)
; variable PAGE - available number of pages
VIRT LD IX,#C000
; fill the pages with their numbers, saving the contents bytes
; at check points (#C000)
LD HL,DOOM+63
LD B,64
V_R11 LD A,B
DEC A ; NN page 63,62,61,60...1.0
CALL EX_RAM
LD C,(IX+0)
LD(HL),C ; save byte contentsLD (IX+0),A ; put the page number there
DEC HL
DJNZ V_R11
; exclude not found pages from the table
PUSH AF
LD A,61
LD (IY+119),A
POP AF
LD DE,TABL_PG
V_R20 LD A,(DE)
CP#FF
JR Z,V_R30 ; end of table
CALL EX_RAM
CP (IX+0) ; compare page number with byte contents
JR Z,V_R22 ; the page actually exists
; There is no such page on life!!!
PUSH DE
LD HL,TABL_PG+62
AND A
SBC HL,DE
PUSH HL
POP BC; table shift volume
PUSH DE
POP HL
INC HL
LDIR
DEC (IY+119) ; -1 available page
POP DE
DEC DE
V_R22 INC DE
JR V_R20
; restore the contents of the bytes (#C000) on the pages
V_R30 LD B,64
LD HL,DOOM
V_R31 LD A,64
SUB B ; NN page 0,1,2,3,4...62,63
CALL EX_RAM
LD A,(HL)
LD (IX+0),A ; save byte contents
INC HL
DJNZ V_R31
RET
; "ripping" from the page table of a given page
; at the entrance:
; C - N pages
; DE - end of table (label #FF)
; at the output:
; DE - end of table (possibly already new)DEBUG PUSH DE
POP HL
NO_PG1 DEC DE
LD A,(DE)
CP#FF
JR Z,NO_PG2 ; HE page to be deleted was found!!!
CP C
JR NZ,NO_PG1
;DE - on the number of the page to be deleted
;HL - at the end of table mark (#FF)
SBC HL,DE
PUSH HL
POP B.C.
PUSH DE
POP HL
INC HL
LDIR
DEC (IY+119) ; -1 available page
DEC HL
DEC HL
NO_PG2 EX DE,HL
RET
; page switching program for different types of machines
ONPAGE
PUSH BC; A - logical page number
PUSH HL
LD C,A
LD B,#00
LD HL,TABL_PG
ADD HL,BC
LD A,(HL) ; physical page number
POP HL
POP B.C.
EX_RAM DI ; A - physical page number
PUSH HL
PUSH AF
PUSH BC
BIT 1,(IY+118)
JR NZ,ZS256 ; SCORPION (#1FFD)
BIT 2,(IY+118)
JR NZ,PROFI ; PROFI (#DFFD)
BIT 3,(IY+118)
JR NZ,TURBO_2 ; TURBO 2+ (#FFF7)
BIT 4,(IY+118)
JR NZ,ATM1 ; ATM TURBO (#FDFD)
BIT 0,(IY+118)
JR NZ,SPECCY ; SPECTRUM 128K-512K (#7FFD)
BIT 7,(IY+118)JR NZ,SPECCY ; SCORPION 128K (#7FFD)
JR TDK
; for TURBO 2+ (supports 128K-1024K)
TURBO_2 PUSH AF
PUSH IX
AND %00011000
CPL
LD BC,#FFF7
CALL OUTC_A
POP IX
POP AF
JP SPECCY
; ATM TURBO V4.10 - 5.20 (supports 256K - 512K)
ATM1 LD BC,#FDFD
PUSH AF
RRCA
RRCA
RRCA
AND %00000011
JR HOME
; for PROFI (supports 256K-1024K)
PROFI LD BC,#DFFD
PUSH AF
RRCA
RRCA
RRCA
AND %00000111
JR HOME
; for SCORPION or KAY (supports 512K-1024K non-standard)
ZS256 PUSH AF
LD B,A
AND %00001000
RLCA
LD C,A
LD A,B
AND %00110000
RLCA
RLCA
ADD A,C
LD BC,#1FFD
HOME OUT(C),A
NOP
POP AF
; for SPECTRUM 128K (supports 256K-512K non-standard!)
SPECCY LD B,A
AND %00011000
RLCA
RLCA
RLCA
LD C,A
LD A,B
AND %00000111
ADD A,C
OR #10 ; ROM 48
LD BC,#7FFD
OUT(C),A
NOP
TDK
POP B.C.
POP AF
POP HL
RETOUTC_A LD IX,#2A53
PUSH IX
JP #3D2F
DEFB #FF
TABL_PG DEFB 00,01,03,04,06,07
DEFB 08,09,10,11,12,13,14,15
DEFB 16,17,18,19,20,21,22,23
DEFB 24,25,26,27,28,29,30,31
DEFB 32,33,34,35,36,37,38,39
DEFB 40,41,42,43,44,45,46,47
DEFB 48,49,50,51,52,53,54,55
DEFB 56,57,58,59,60,61,62,63
DEFB #FF
DOOM DEFS 64.0
Well, that seems to be the whole program, if anything, write to my network
your address in SpbZXNet (812/03.00).
Best wishes.
Paul Falcon (CREATOR)
SPbZXNet: 812/03.00
.
============== here we will end the file "OnLine76.C" ================
Best regards, Felix.
[I.ZX]
-+- Lara_Croft_v4.50
+ Origin: LDIR is good, but LDI is better! (500:812/5.9)
27
Sincerely, Max Melnikov... aka HighLander... aka Uncle Maximka...
··----*<[_ProDiGy_]>*<[/*LImp BiZkiT*/]>*<[/*_MetaLlicA_*/]>*<[BeeR]>*----··
··----*<[/*_UnrEAl TouRNameNt_*/]>*<[/*MW 4*/]>*<[*GirlS*]>*<[_KiSh_]>*----··
From Valera Selev → To All 3 February 2002
Hello, All!
How to test the cache for the presence of Real Commander in it?
<<< WBR, Stormbringer >>>
<<< 500:322/67.64 >>> AKA <<< 2:462/162.7 >>> AKA <<< 2:462/167.64 >>>
<<< http://cobrasoft.narod.ru >>>
From Moderator of CODE.ZX → To All 27 May 2002
Let your enemies, All, die without sons!
People, there is no need to set up a spbzxnet.general branch here.
WBR, Moderator.