Deja Vu #06
30 сентября 1998 |
|
CODING - Driver read / write.
Driver Read / Write -------------------- Specifications: 1) The length - 166 bytes. 2) TURBO read / write. 3) Floppy Drive A-D. 4) The bug - do not hang up, unlike drivers, using chunks of MAGIC in TR-DOS. 5) Does not reset when the PC TURBO 6) Works best on 5.03, 5.04 and similar to them. At 1.5 can (?) Format nut track ... 7) Called by the same # 3D13, C = 5 / 6. 8) Can work and allowed interrupt vaniyah (but slow). 9) A simplified error handling: if the bits 0-6 Register # 1F dropped - it is believed that there is no error. Otherwise - repeat. A) You can change the Number of attempts to read and writing. If the sector is still no problem remains to (not written), it is determined but measures under the head track and is Repositioning (well, the word ...). B) driver is necessary buffer for reading identification fikatora sector (6 bytes). C) not really been tested ... ORG # 6000 ENT ; Written by Max / CBX / BD ; XAS Assembler, 06.08.98. LD A, (# 5D16) AND 3 LD (DRV +1), A; Number of drive. LD HL, # 4000 LD DE, # 0000 LD BC, # 1805 CALL DRIVER RET DRIVER DI LD IX, # 3FE5 LD A, # 80 BIT 0, C JR NZ, LD_MODE LD LX, # CA LD A, # A0 LD_MODE LD (CMD +1), A LD (PROC +2), IX MAIN LD A, # 2C BIT 0, D JR NZ, DRV LD A, # 3C DRV OR 0 LD C, # FF CALL REG LD A, D RRA LD C, # 7F CALL REG LD A, # 18 CALL CMD_RDY LD C, 8; Number of attempts. ERR PUSH HL, BC XOR A LD (# 5CD6), A OUT (# FE), A LD A, E INC A LD C, # 5F CALL REG CMD LD A, # 80 CALL COMM PROC LD IX, # 3FE5 LD C, # 7F CALL TODOS LD BC, CONT PUSH BC ONE LD BC, ONE PUSH BC LD B, # 01 PUSH BC LD BC, # 2099 PUSH BC JR DOS; Check # 1F. CONT DI POP BC, HL LD A, (# 5CD6) AND A JR Z, NOERR DEC C JR NZ, ERR OUT (# FE), A PUSH HL LD HL, TRK_BF LD A, # C0 CALL CMD_RDY POP HL LD A, (TRK_BF) LD C, # 3F CALL REG JR MAIN NOERR INC H INC E BIT 4, E JR Z, CNT LD E, A INC D CNT DJNZ MAIN EI RET COMM LD C, # 1F REG LD IX, # 2A53 TODOS PUSH IX DOS JP # 3D2F CMD_RDY CALL COMM LD C, # 7F READY LD IX, # 3FE5 JR TODOS TRK_BF EQU # 8000 P.S. In the last issue was my little article on free download beysika.Privedennaya there a procedure designed to read driver who, after his work in the HL shows the address byte located after the last loaded sector. If someone is using my prog, Expect it. * Did you know that the work of the Player in STP depends on the contents of the register A? Explained: ORG +6 JP PLAY; entry point for PLAY. ....... PLAY DI LD (XXXX), SP LD D, 0 * EXX LD BC, XXXX LD HL, XXXX DEC (HL) JP NZ, XXXX LD (HL), 5; temp Mouzon. INC HL DEC (HL) JP P, XXXX LD HL, XXXX OR (HL); Testing (HL) to zero. JP Z, XXXX; Branching. ....... NOTE: XXXX designated nonessential in this case values. As seen from the fragment accumulator value is nowhere exposed. If the register A is not zero - checking OR (HL) or in zhist not work ... What this bug (?) Influences - is unknown, but the rumor seems to be no differences. Nevertheless, we can fix it (why?) PLAYER, replacing marked '*' command LD D, 0 into two: XOR A: LD D, A.
Other articles:
Similar articles:
В этот день... 21 November