Indication of disk operation (C)Pantera _________________________________________ Again I decided to show people my another fantasy on the topic of coding. Once upon a time, and more than once, I saw that some are clever in their creations use so-called performance indicators bots with disk. You say this very effectively perfect. Just imagine, you are in your new restoring discs, with no one hitherto well-known algorithm, use indicator tion of disk operation. What are you daydreaming about??? Haha, same thing. You're probably jumping now You eat and frantically wonder where to get it, where can I get it???. Well, I'll help you with this... Next comes the algorithm for indicating work with disk. Of course this is just an example, but if you have a desire, it is not difficult to achieve it children can be remade for any program. For lovers of freebies, I would like to immediately note: this program displays in the window, only loading 30 sectors, because only whenthis amount you will see the movement of the scale ly. If the number of sectors exceeds this value, then the scale will reach the end of the window and will stop, and the flop guide will load the rest of the sectors. Those who are smart will think of it how to make a full display. NOW IS THE MAIN POINT!!! This procedure is written under the shell of Mach placed it in the appendix of the second new measure of the Black Crow. If you don't have it, then you can download the second issue from zx.da.ru. Now the second point, but not the main one: Work with the disk goes directly with VG93. If you do the work via CALL 15635, then Operations may be significantly slowed down, please note this is when writing your programs. WELL AND NOW THE COMPETITION!!! To those readers who send their variations ant indication of disk operation, first will receive the next issue of Black Crow. But there are conditions: 1. The procedure must be connected with the equipment with a pencil from the second issue of the magazine. 2. Of course, this cannot be controlled, but still don’t send cracks from others programs. The only thing that is not prohibited is take my example as a basis. Just him so easy to convert for display the entire disc, that even your hands are reaching out to clave, at least I think so :-). Well, I hope the people's talents will overwhelm me with your own codes :-). Program listing: ;------ Example window --------------------- R_DEMO DEFB 3,8,25,4,114,1,0,0,0,#90 DEFW R_DEMO,S_UPR,J_UPRDEFB #1В,"Work process",0 T_DEMO DEFB 13.0 T_DEMO1 DEFB "#",0 ;Any character S_UPR DEFB 3,8,1,1, #FF J_UPR DEFW PRN ;-------PRINT-------------------------- PRN LD HL,T_DEMO ;Take code #0D CALL OS ;for first input DEFB _PRI_С ;lines, scale JR M1 ;in the middle ;-------BODY OF PROCEDURE--------------------------------- R_SECT DEFB 30 ;True value ;quantity ;downloadable ;sectors ADRES DEFW #С000 ;Download address M1 LD HL,(ADRES) PUSH HL ;Download address TRACK LD D,2 ;Track SECT LD E,#0F ;Sector S_SCT LD V,1 ;Qty. sectors CALL OS ;must be 1 DEFB _LOADER JR NZ,_ERROR CALL COUNT ;To counter POP HL ;Download address LD (ADRES),HL;Put it back EI RET ;-------CALCULATION OPERATIONS----------------- COUNT LD A,(R_SECT) ;How many times PUSH AF ;count CALL SECTOR1CALL PRINTD CALL ADR_COR POP AF DEC A LD (R_SECT),A ;Remainder JR NZ,M1 ;Loading RET ;Operation OK. ;-------SECTOR CALCULATION------------------ SECTOR1 LD A,(SECT+1) ;Which sector SR #0F ;15th?,then JR Z,TRACK1 ;new track INC A ;if not, then LD (SECT+1),A ;new sector RET ;-------TRACK CALCULATION--------------------- TRACK1 LD A,(TRACK+1);Track number INC A ;1 moreLD (TRACK+1),A XOR A ;Zero again LD (SECT+1),A ;sector RET ;-------PRINTING SUBROUTINE-------------- PRINTD LD HL,T_DEMO1 ;Print pro- CALL OS ; work process, DEFB _PRI_С ; in the form of a scale RET ;-------ADDRESS ADDRESS------------ ADR_COR LD HL,(ADRES) ;Where to load LD DE,#0100 ;Sect size. ADD HL,DE ;Address+sector LD (ADRES),HL ;New address RET ;downloads ;-------EXIT BY ERROR------------------ _ERROR POP HL ;Here is the address EI ;where is the stop RET
Share your thoughts about the article