Buzz #17
10 апреля 1999 |
|
DOS PRO - The fastest procedure, the disk: read / write sectors without monitoring and controlling errors reading sectors monitoring of the serviceability of reading, reading / writing sectors with the control interrupts the ignition / quenching lamp drive spinning and braking disc, reset VG13, positioned at 0 track, protection from Magic Button, blanking lamp drive, check what the current, control the availability of the disk in the drive.
■ ------------------------------------------------- ------------- ■ (C) 1998 FASTeR / TNL (FAST M UP!!!) (P) 1998 TNL insys! (C T) ULYANOVSK! (!), When used in its programs, LINK, the author undertakes Tyelna! AND TO YOU seeking a relaxing and I am happy:)! (!) (8422) 37-68-85 (Alexander) CALL preferably before 23.00 MBC! <<<<< E-MAIL: FASTER_TNL@DARKSTAR.ILXQ.ML.OVG >>>>> ■ ------------------------------------------------- ------------- ■ Hello! FAST M UP!!! I, FASTER / TNL present to your attention the fastest procedures for working with the disc today! Very possible that this is not the limit! Therefore, if anyone write faster any of the procedures, even necessarily contact me! Procedure, I did not specifically comment on (and everything is clear:) only where deemed necessary. I hope they Will be useful (and not only once!) In your programs, especially that they are fast and work well in TURBO mode (koim property have not all procedures!). If you have any questions, call! I'm a sociable and fun with You communicate on any topic! ;) So magnificent 15-scale ... ;) ■ ------------------------------------------------- ------------- ■ == = - · ∙ ° FASTeR'S COLLECTION! ° ∙ · - == = ■ ------------------------------------------------- ------------- ■ (!) When writing procedures, the highest priority was speed, and not volume! When operating procedures are used only registers one at Boron (in this case, the principal!): A, HL, IX, IY, BC, DE. Stack "strains" only to relieve himself! Before calling the procedure (except the one that works IM 2), we should prohibit the interruption (which, in principle, not It is a rule)! (!) Before you will be presented to the procedure, I want to say this: 1. When referring to TR-DOS ROM is used entry point: # 3D30! This is not a rule ... (They say there are components that are not digested with this appointment! True to me like never met!) 2. In reading # 1F algorithm is used (CooL!), proposed LIMITED ANDREW MOA! I have met also with a vari atsiey this algorithm (by Ivan Roshchin!). Well what can I ska show?? Throughout my practice, when using the algorithm by MOA, I do not ever face a situation when the AL Algorithm not working correctly! So there! (!) PROtsedury run on all versions of TR-DOS (5.03 and above, under the condition that they not made any "predatory" changes)! ■ ------------------------------------------------- ------------- ■ == = ■ ■ ■ PROCEDURE_1: TURBO_READ_WITHOUT_ERRORS_CONTROLING! ■ ■ ■ == = ; READING (REC) sector (s) without the control of ERROR (Fastest ; PROCEDURE)! (!) 100% GUARANTEE correct reading, just in TURBO MODE! (!) 50% IN NORMAL MODE! So do not ESPECIALLY fond P_1, A ; Are looking HARDLY AT ALL to get involved. And in general this was written LOADER ; Exclusively under the influence and impressions of the TURBO! ; STACK USE: BY 8 BYTES. DI; VERY GOOD TEAM:) LD IX, ADRES_ZAGRUZKI LD DE, TRACK / SECTOR; (# 5CF4) LD B, КОЛИЧЕСТВО_ЗАГРУЖАЕМЫХ_СЕКТОРОВ ; THIS PROTSEDURKA ADJUSTABLE LOAD (SAVE) ER FOR THE CURRENT DRIVE! , (Called only once at the beginning!) LD A, (# 5CF6); IN A NUMBER OF DRIVE. 0-A, 1-B ... OR # 2C LD (DRV +1), A SET 4, A LD (DRV +5), A LD (TR_SEC), DE CALL LOAD_; NO COMMENTS;) RET; TOO;) ■ ------------------------------------------------- ------------- ■ LOAD_ LD DE, (TR_SEC) LOAD LD A, D; TRACK / 2 SRL A LD C, # 7F CALL DOS DRV LD A, # 2C JR C, SIDE LD A, # 3C SIDE LD HL, # 1FF3; NO PARTY. CALL DOS1; OUT (# FF), A LD A, # 18; POSITIONING. CALL DOS2 LD HL, # 3EF5; waiting for a POSITION CALL DOS1; Rovani. N_SEC XOR A; ALL SECTORS count?? OR B LD (TR_SEC), DE RET Z; OUT IF operation is over! LD A, E INC A; sector number. LD C, # 5F CALL DOS LD A, # 80; read command SECTOR! CALL DOS2; # A0-TEAM write sectors! LD C, # 7F LD IY, # 3FE5; # 3FCA-RECORDING! PUSH IX POP HL * PUSH BC CALL DOS3; Executing commands ... * POP BC INC HX; INCREASES Load address! DEC B; MINUS ONE SECTOR! INC E; next sector! BIT 4, E; ALL SECTORS?? JP Z, N_SEC; next sector ... LD E, 0; Zeroing SECTOR! INC D; next track ... JP LOAD; all over again ... DOS LD HL, # 2A53; OUT (C), A DOS1 PUSH HL JP # 3D30; (# 3D2F)-SHIT 4EVER!!! DOS2 LD IY, # 2FC3; OUT (# 1F), A DOS3 PUSH IY JP # 3D30; (# 3D2F)-SHIT 4EVER!!! TR_SEC DEFW 0; SAVES TRACK AND SECTOR! ■ ------------------------------------------------- ------------- ■ , Second option PROCEDURES. FASTER, but uses an additional, relatively: HL ', BC', DE ', IY-not used! ; STACK USE: BY 8 BYTES. LOAD_ LD DE, (TR_SEC) LOAD LD A, D SRL A LD C, # 7F CALL DOS DRV LD A, # 2C JR C, SIDE LD A, # 3C SIDE LD HL, # 1FF3 CALL DOS1 LD A, # 18 LD HL, # 2FC3 CALL DOS1 LD HL, # 3EF5 CALL DOS1 N_SEC XOR A OR B LD (TR_SEC), DE RET Z LD A, E INC A LD C, # 5F CALL DOS PUSH IX EXX LD A, # 80 LD HL, # 2FC3 CALL DOS1 LD C, # 7F LD DE, # 3FE5 POP HL CALL DOS2 EXX INC HX DEC B INC E BIT 4, E JP Z, N_SEC LD E, 0 INC D JP LOAD DOS LD HL, # 2A53; OUT (C), A DOS1 PUSH HL JP # 3D30; RULEZ 4EVER!!! DOS2 PUSH DE JP # 3D30 TR_SEC DEFW 0 ■ ------------------------------------------------- ------------- ■ * - Teams marked with an asterisk are to LOADER worked fine in NORMAL MODE. If they are removed, then LOADER will only work in TURBO MODE!!! (!) This LOADER not hang up and reset in the case of the appearance of errors, and will read until no opupeet! ;) True then, no one can guarantee performance loaded the program! ;) ■ ------------------------------------------------- ------------- ■ == = ■ ■ ■ PROCEDURE_2: TURBO_READ_WITH_ERRORS_CONTROLING! ■ ■ ■ == = ; READING (REC) sector (s) error-checking! ; IDEAL LOADER (SAVER) for toys / SISTEMOK! ; STACK USE: BY 10 BYTES. LOAD1_ LD DE, (TR_SEC) LOAD LD A, D SRL A LD (TRACK +1), A LD C, # 7F CALL DOS DRV LD A, # 2C JR C, SIDE LD A, # 3C SIDE LD HL, # 1FF3 CALL DOS1 LD A, # 18 CALL DOS2 N_SEC XOR A OR B LD (TR_SEC), DE RET Z ERROR LD A, E INC A LD C, # 5F CALL DOS LD A, # 80 CALL DOS2 LD C, # 7F LD IY, # 3FE5 PUSH IX POP HL PUSH BC CALL DOS3 ; Reading algorithm # 1F BY ANDREW MOA! XOR A LD HL, # 1E3A; OUT (# 3F), A CALL DOS1 LD A, # 0A LD C, # 5F CALL DOS PUSH DE LD D, # 01 LD HL, # 3F33 CALL DOS1 LD A, B; a result of reading The Register 'B' AND # 7F; HERE YOU CAN APPLY ON VA POP DE; IDEs DISCRETION! POP BC TRACK LD A, 0 LD HL, # 1E3A CALL DOS1 JR NZ, ERROR; If an error reading, repeat ... INC HX DEC B INC E BIT 4, E JP Z, N_SEC LD E, 0 INC D JP LOAD DOS LD HL, # 2A53; OUT (C), A DOS1 PUSH HL JP # 3D30 DOS2 LD IY, # 2FC3; OUT (# 1F), A DOS3 PUSH IY JP # 3D30 TR_SEC DEFW 0 ■ ------------------------------------------------- ------------- ■ , Second option PROCEDURES. FASTER, but uses an additional, relatively: HL ', BC', DE ', IY-not used! ; STACK USE: BY 8 BYTES. LOAD1_ LD DE, (TR_SEC) LOAD LD A, D SRL A LD (TRACK +1), A LD C, # 7F CALL DOS DRV LD A, # 2C JR C, SIDE LD A, # 3C SIDE LD HL, # 1FF3 CALL DOS1 LD A, # 18 LD HL, # 2FC3 CALL DOS1 N_SEC XOR A OR B LD (TR_SEC), DE RET Z ERROR LD A, E INC A LD C, # 5F CALL DOS PUSH IX EXX LD A, # 80 LD DE, # 2FC3 CALL DOS3 LD C, # 7F LD DE, # 3FE5 POP HL CALL DOS3 ; Reading algorithm # 1F BY ANDREW MOA! XOR A CALL DOS2 LD A, # 0A LD C, # 5F CALL DOS LD D, # 01 LD HL, # 3F33 CALL DOS1 LD A, B AND # 7F TRACK LD A, 0 CALL DOS2 EXX JR NZ, ERROR INC HX DEC B INC E BIT 4, E JP Z, N_SEC LD E, 0 INC D JP LOAD DOS LD HL, # 2A53; OUT (C), A DOS1 PUSH HL JP # 3D30 DOS2 LD DE, # 1E3A; OUT (# 3F), A DOS3 PUSH DE JP # 3D30 TR_SEC DEFW 0 ■ ------------------------------------------------- ------------- ■ == = ■ ■ ■ PROCEDURE_3: TURBO_READ_WITH_ERROR_CONTROLING! ■ ■ ■ == = ; READ SECTOR (S) monitoring of the correct reading! ; TO USE THIS PROCEDURE FOR THE RECORD, YOU CAN It is easy to OVERWRITE SAME procedure! ; IDEAL LOADER for the bootloader to the toy / SISTEMKAM! ; STACK USE: BY 14 BYTES. LOAD_ LD DE, (TR_SEC) LOAD LD A, D SRL A LD C, # 7F CALL DOS DRV LD A, # 2C JR C, SIDE LD A, # 3C SIDE LD HL, # 1FF3 CALL DOS1 LD A, # 18 LD HL, # 2FC3 CALL DOS1 N_SEC XOR A OR B LD (TR_SEC), DE RET Z ERROR LD A, E INC A LD C, # 5F CALL DOS PUSH BC PUSH DE LD DE, # 20AA LD B, 1 PUSH IX POP HL LD C, # 7F CALL DOS2 POP DE XOR A OR B POP BC JP Z, ERROR INC HX DEC B INC E BIT 4, E JP Z, N_SEC LD E, 0 INC D JP LOAD DOS LD HL, # 2A53; OUT (C), A DOS1 PUSH HL JP # 3D30 DOS2 PUSH DE LD IY, # 2090 PUSH IY JP # 3D30 TR_SEC DEFW 0 ■ ------------------------------------------------- ------------- ■ , Second option PROCEDURES. FASTER, but uses an additional, relatively: HL ', BC', DE ', IY', IY-not used! ; STACK USE: BY 10 BYTES. LOAD_ LD DE, (TR_SEC) LOAD LD A, D SRL A LD C, # 7F CALL DOS DRV LD A, # 2C JR C, SIDE LD A, # 3C SIDE LD HL, # 1FF3 CALL DOS1 LD A, # 18 LD HL, # 2FC3 CALL DOS1 N_SEC XOR A OR B LD (TR_SEC), DE RET Z ERROR LD A, E INC A LD C, # 5F CALL DOS PUSH IX EXX LD DE, # 20AA LD B, 1 LD C, # 7F POP HL CALL DOS2 XOR A OR B EXX JP Z, ERROR INC HX DEC B INC E BIT 4, E JP Z, N_SEC LD E, 0 INC D JP LOAD DOS LD HL, # 2A53; OUT (C), A DOS1 PUSH HL JP # 3D30 DOS2 PUSH DE LD IY, # 2090 PUSH IY JP # 3D30 TR_SEC DEFW 0 ■ ------------------------------------------------- ------------- ■ == = ■ ■ ■ PROCEDURE_4: TURBO_READ_WITH_INTERRUPT_MODE! ■ ■ ■ == = ; READING (REC) sector (s) to interrupt! Of course with control; LEM ERROR! ; STACK USE: BY 24 BYTES. DI LD HL, INT LD (# FEFF), HL LD A, # FE LD I, A IM 2 EI LD IX, ADDRESS LD DE, (# 5CF4) LD (TR_SEC), DE LD B, KOL_SEC CALL LOAD1_ LD IY, # 5C3A; CLEAR TO EXIT IN BASIC; 8) LD A, # 3F; SO you can remove all this LD I, A; OTSEDOVA JUNK! IM 1 EI RET INT DI; EI PUSH HL; Only retain Register PUSH DE; that spoil! PUSH BC PUSH IX .......... , But here YOUR REASONABLE LAWLESSNESS! XOR A; This team is MANDATORY! POP IX POP BC POP DE POP HL EI JP # 3D30 ■ ------------------------------------------------- ------------- ■ == = (!) Before calling LISTED BELOW procedures (except the 7 th and 9 th!) Must configure the current drive: LD A, (# 5CF6); IN A NUMBER OF DRIVE. 0-A, 1-B ... OR # 2C LD HL, # 1FF3; OUT (# FF), A CALL DOS RET == = ■ ■ ■ PROCEDURE_5: LIGHT_ON ■ ■ ■ == = ; IGNITION LIGHTS DRIVE / Rolling CD! ; STACK USE: BY 4 BYTES. LD C, # 7F; VALUE 'A', taken from Lummox! LD HL, # 2A53; OUT (C), A CALL DOS LD HL, # 1E3A; OUT (# 3F), A CALL DOS LD A, # 18 LD HL, # 2FC3; OUT (# 1F), A DOS PUSH HL JP # 3D30 ■ ------------------------------------------------- ------------- ■ == = ■ ■ ■ PROCEDURE_6: LIGHT_ON_FOREVER ■ ■ ■ == = ; Rolling DRIVE (IGNITION BULB), which will ; SPIN SPIN SPIN ... ;) ; STACK USE: BY 4 BYTES. LD A, # 24; TO DRIVE 'A' LD HL, # 1FF3; OUT (# FF), A CALL DOS LD C, # 7F; like the previous one! LD HL, # 2A53; OUT (C), A CALL DOS LD HL, # 1E3A; OUT (# 3F), A CALL DOS LD A, # 18 LD HL, # 2FC3; OUT (# 1F), A DOS PUSH HL JP # 3D30 ■ ------------------------------------------------- ------------- ■ == = ■ ■ ■ PROCEDURE_7: LIGHT_OFF ■ ■ ■ == = ; Quenching LIGHTS DRIVE / DAMPING DRIVE! ; STACK USE: BY 2 BYTES. XOR A LD HL, # 2FC3; OUT (# 1F), A PUSH HL JP # 3D30 ■ ------------------------------------------------- ------------- ■ == = ■ ■ ■ PROCEDURE_8: RESET_WG ■ ■ ■ == = ; WG93/POZITSIONIROVANIE RESET TO 0 tracks! ; STACK USE: BY 2 BYTES. LD A, # 08 LD HL, # 2FC3; OUT (# 1F), A PUSH HL JP # 3D30 ■ ------------------------------------------------- ------------- ■ == = ■ ■ ■ PROCEDURE_9: FUCK_WG ■ ■ ■ == = ; Some sort of PROTECTION FROM MAGIC BUTTON / quenching LIGHTS DRIVE ; STACK USE: BY 2 BYTES. XOR A LD HL, # 1FF3; OUT (# FF), A PUSH HL JP # 3D30 ■ ------------------------------------------------- ------------- ■ == = ■ ■ ■ PROCEDURE_10: CHECK_3.5 "_OR_5.25 "_??? ■ ■ ■ == = ; Procedure checks, ANY CURRENT DRIVE: 3.5 "or 5.25"?? ; CD must be present in the drive and MUST NOT ; Rotates! ; STACK USE: BY 28 BYTES. LD A, # 08 LD HL, # 2FC3; OUT (# 1F), A CALL DOS LD HL, # 3EF5 CALL DOS LD IY, 2200; DELAY ... (4 TURBO 2)! CALL IN_1F AND # 02 LD HX, A AGAIN CALL IN_1F AND # 02 OR HX RET NZ; USE 3.5 "DRIVE! DEC IY LD A, LY OR HY JP NZ, AGAIN RET; USE 5.25 "DRIVE! ; Reading algorithm # 1F BY ANDREW MOA! IN_1F XOR A LD HL, # 1E3A CALL DOS LD A, # 0A LD C, # 5F LD HL, # 2A53 CALL DOS LD D, # 01 LD HL, # 3F33 CALL DOS LD A, B RET DOS PUSH HL JP # 3D30 ■ ------------------------------------------------- ------------- ■ == = ■ ■ ■ PROCEDURE_11: DISK_CONTROLER_4_SYSTEMZ_OR_GAMEZ ■ ■ ■ == = ; This procedure Monitors disk into the drive! ; This procedure is designed specifically for the system or IGRO; OUT PROGRAM! (!) NO WHEELS FOR BOOT'OV ETC PROGRAMS! ; STACK USE: BY 6 BYTES. LD A, # 08 LD HL, # 2FC3; OUT (# 1F), A CALL DOS LD HL, # 3EF5 CALL DOS LD IY, 5500; DELAY ... (4 TURBO 2)! CALL IN_1F BIT 1, B LD HX, B AGAIN CALL IN_1F BIT 1, B LD A, B OR HX RET NZ; DISK PRESENT! DEC IY LD A, LY OR HY JP NZ, AGAIN RET; DISK NOT PRESENT! ; Reading algorithm # 1F BY ANDREW MOA! IN_1F XOR A LD HL, # 1E3A CALL DOS LD A, # 0A LD C, # 5F LD HL, # 2A53 CALL DOS LD D, # 01 LD HL, # 3F33 CALL DOS RET DOS PUSH HL JP # 3D30 ■ ------------------------------------------------- ------------- ■ == = ■ ■ ■ PROCEDURE_12: DISK_CONTROLER_4_BOOTZ_OR_COMMANDERZ ■ ■ ■ == = ; This procedure Monitors disk into the drive! ; This procedure Special 4 BOOT'OV, COMMANDER'OV , ETC PROGRAMS! (!) NO WHEELS floppy disk is write protected! THEREFORE I ReCom; NDUYU share it with PROCEDURE_11, AS INDICATED IN ; LISTING PROCEDURES! (Meaning this: if you insert a CD ; Write protected, the program will be counted as a lack of IT; YUSCHY, THEREFORE, send it to PROCEDURE_11, THE SITUATION WILL BE AT; VEDENA IN ORDER! ; STACK USE: BY 20 BYTES. BEGIN CALL CHECK BIT 6, B JR NZ, NO_DISK LD A, 1; DISK PRESENT! OUT (# FE), A AGAIN XOR A IN A, (# FE) CPL AND # 1F RET NZ; POLL KEYBOARD ... CALL CHECK BIT 6, B JR Z, AGAIN NO_DISK XOR A; DISK NOT PRESENT! OUT (# FE), A ; CALL PROCEDURE_11; CM. ABOVE! JR BEGIN CHECK LD A, # 08 CALL DOS LD HL, # 3EF5 CALL DOS1 ; Reading algorithm # 1F BY ANDREW MOA! XOR A LD HL, # 1E3A CALL DOS1 LD A, # 0A LD C, # 5F LD HL, # 2A53 CALL DOS1 LD D, # 01 LD HL, # 3F33 CALL DOS1 XOR A CALL DOS LD A, # D0 CALL DOS EI HALT; FRAME rest ... RET DOS LD HL, # 2FC3; OUT (# 1F), A DOS1 PUSH HL JP # 3D30 ■ ------------------------------------------------- ------------- ■ == = P.S. Well, in principle, and everything! It remains for me to say that the test I conducted all procedures in the following configuration: SCORPION ZS 256 TURBO + + NORMAL MODE / TURBO MODE / TURBO WG93/3.5 "/ 5.25" / TR-DOS 5.03sc. All procedures were written by me during 1998 in the beam follows, in my opinion (except for the absence of a binary system and the inability to unload object code), assemb Leray - ALASM 4.1 BY ALEM (VERY THANX!) HAIL 2 ALL OUR (TNL insys) FRIENDZ!!! BYE! C YE L8ER ... ... ' SPECIAL HELLO (FROM ME!) 2 MAX PETROV!!! == = ■ ------------------------------------------------- ------------- ■ == = - LAST EDITION ON 01.11.98 ULYANOVSK RUSSIA TNL INSYS! - == =
Other articles:
Similar articles:
В этот день... 21 November