block driver for GRM-512
ZXNet echo conference «code.zx»
From Eudgine Palenock → To Oleg Grigoriev 24 December 1998
Hello, Oleg!
One day, 22 Dec 98, someone Oleg Grigoriev wrote to Eudgine Palenock,
on the topic 'ramdisk blocker for turbo 2+ with 1 meter of brains'...
EP>> driver without buffer ->> works quickly. under 512kb. and
EP>> its sources are available...
OG> O. I want to. Throw it here, it’s interesting to look at the execution of the log
OG> logical part. By the way, who wrote?
Here, transferred under GRM-512... And the original version - under scorpion
- was received from Jason...
=================== Beginning of file 'GRM____b.C' ===================
ORG #A4E2.0
;for dread and write:
;hl-address in memory, de-start number blocks on disk, b-number of blocks
DEFW 0 ;no installation
MEM1 EQU $-1
DEFW dread
MEM2 EQU$-1
DEFW write
MEM3 EQU$-1
DEFW binit
DEFB #E0,4,0,0,0,0,0,0
;page order table
ptable DEFB #D0,#D1,#D2,#D3,#D4,#D5,#D6,#D7
DEFB #90,#91,#92,#93,#94,#95,#96,#97
DEFB #40,#41,#42,#43,#44,#45,#46,#47
DEFB #07,#06,#04,#03,#01,#00
dread XOR A
JR LLA504
write LD A,#EB
LLA504 LD (LLA54B),A
LLA507 LD (LLA54E),A
LD A,H
ADD A,B
JR C,LLA514
ADD A,#40
JR NZ,LLA514
DEC A
ADD A,L
LLA514 LD A,7
RET CJR LLA55A
LLA519 LD A,E
OR #C0
PUSH AF
NEG
LD C,B
CP B
JR NC,LLA524
LD C,A
LLA524 LD A,B
SUB C
LD B,0
EX DE,HL
PUSH HL
ADD HL,BC
EX (SP),HL
ADD HL,HL
ADD HL,HL
LD L,H
LD H,B
LD B,A
PUSH BC
LLA532 LD BC,ptable
ADD HL,BC
POP BC
LD A,(HL)
POP HL
EX (SP),HL
PUSH BC
LD B,C
LD C,0
LD L,C
DI
LD (L2),BC
L1 EQU $-2
LD BC,#7FFD
OUT (C),A
LD BC,0
L2 EQU $-2
LLA54B EX DE,HL
LDIR
LLA54E EX DE,HL
LD A,#10
LD BC,#7FFD
OUT (C),A
EI
EX DE,HL
POP BC
POP DE
LLA55A INC B
DJNZ LLA519
binit XOR A
RET
DEFW #FFFF
DEFW MEM1,MEM2,MEM3,LLA504,LLA507,LLA532,L1
=================== Конец файла 'GRM____b.C' ===================
С уважением, Евгений aka EVP.
From Valerij Kozhevnikoff → To Oleg Grigoriev 25 December 1998
Hello, Oleg!
24 Dec 98 at 06:03:58, Eudgine Palenock => Oleg Grigoriev:
EP>>> driver without a buffer ->> works quickly. under 512kb. and
EP>>> its sources are available...
OG>> O. I want to. Throw it here, it’s interesting to look at the execution of the log
OG>> logical part. By the way, who wrote?
EP> Here, transferred under GRM-512... And the original version - under scorpion
EP> - received from Jason...
Yeah. And I got it from glucodromic by out (#fd), and by blocker by
Kondratyev.
EP> ptable DEFB #D0,#D1,#D2,#D3,#D4,#D5,#D6,#D7
EP> DEFB #90,#91,#92,#93,#94,#95,#96,#97
EP> DEFB #40,#41,#42,#43,#44,#45,#46,#47
EP> DEFB #07,#06,#04,#03,#01,#00
Why are the fourth bits not set???
[...]
EP> LLA532 LD BC,ptable
EP> ADD HL,BC
EP> POP BC
EP> LD A,(HL)
EP> POP HL
EP> EX (SP),HL
EP> PUSH BC
EP> LD B,C
EP> LD C,0EP> LD L,C
EP> DI
EP> LD (L2),BC
EP> L1 EQU $-2 <<<- here you need $-3 !
EP> LD BC,#7FFD
[...]
EP> DEFW #FFFF
EP> DEFW MEM1,MEM2,MEM3,LLA504,LLA507,LLA532,L1
It's outdated a long time ago. Here it is under stump1024, final for today:
===================== import file zx1024j .a ==================
DEFW #0000 ;no installation
DEFW dread
DEFW write
DEFW binit
;for dread and write:
;hl - address in memory
;de - start number block on disk
;b - number of blocks
DEFB #E0,#04
DEFB #00,#00
DEFB #00,#00
DEFB #00,#00
;page order table
ptable DEFB #50,#51,#52,#53,#54,#55,#56,#57
DEFB #90,#91,#92,#93,#94,#95,#96,#97
DEFB #D0,#D1,#D2,#D3,#D4,#D5,#D6,#D7
;
DEFB #30,#31,#32,#33,#34,#35,#36,#37
DEFB #70,#71,#72,#73,#74,#75,#76,#77
DEFB #B0,#B1,#B2,#B3,#B4,#B5,#B6,#B7
DEFB #F0,#F1,#F2,#F3,#F4,#F5,#F6,#F7
DEFB #11,#13,#14,#16,#17
dread XOR A
JR WORK__
write LD A,#EB
WORK__ LD (EXCH_1),A
LD(EXCH_2),A
LD A,H
ADD A,BJR C,ERR_07
ADD A,#40
JR NZ,ERR_07
DEC A
ADD A,L
ERR_07 LD A,#07
RET C
JR NEXT__
LOOP__ LD A,E
OR #C0
PUSH AF
NEG
LD C,B
CP B
JR NC,LLL1
LD C,A
LLL1 LD A,B
SUB C
LD B,#00
EX DE,HL
PUSH HL
ADD HL,BC
EX (SP),HL
ADD HL,HL
ADD HL,HL
LD L,H
LD H,B
LD B,A
PUSH BC
LD BC,ptable
ADD HL,BC
POP BC
LD A,(HL) ;
; OR #10 ;для 7ffd
POP HL
EX (SP),HL
PUSH BC
LD B,C
LD C,#00
LD L,C
DI
LD (STORE+1),BC
LD BC,#7FFD
OUT (C),A
STORE LD BC,0
EXCH_1 EX DE,HL
_LDI
LDI
LDI
LDI
LDI
LDI
LDI
LDI
LDI
LDI
LDI
LDI
LDI
LDI
LDI
LDI
LDI
JP PE,_LDI
EXCH_2 EX DE,HL
LD A,#10
LD BC,#7FFD
OUT (C),A
EI
EX DE,HL
POP BC
POP DE
NEXT__ INC B DJNZ LOOP__
binit XOR A
RET
;(((16*16)+10)*16=4256
============================ import end =======================
WBR, Jason.