KrNews #06
15 ноября 1998 |
|
AUTOCONF - AUTOCONFIG extended memory needed by all.
AutoConfig needed by all! (C) 1998 Viper / Techno Laboratory You've probably already noticed AutoConfig, when charged with a newspaper ;-) AutoConfig - a small subroutine, which determines what memory pages from your computer fast and which are slow and distributing the pages in connection with test results. Suppose your program N pages using the 128th memory. List of pages is organized in a table: DEFB 16,17,19,20,0 where 0 - marker of the end of the table. Some pages require high-performance, ie, we that they were fast. As this achieve? The following program test all pages from the table and arrange them by priority: the beginning Tables will be quick page, then slow. In your program in such a case will spolzovatsya logical Addressing pages - pages will have non-physical (16, 17, 19 ...), but LUNs (0, 1, 2, 3, 4 ...). It is clear that the first logical Pages will speed higher than that the latter. Therefore, the first logical page (0, 1) must be used vremyakritichnyh for tasks such as: 1) scrolling 2) a large number of computations 3) playing music 4) Animation List goes on infinity. It should be noted that the test will be work properly and when the TURBO mode. Q: What is it? A: This program is needed to that your program worked just fine used on most computers, and not only on your! Otherwise, large Diversity Spectrum-compatible machines, methods to increase up to 128kb will Besides that your program will be reset or malfunction - use such a program at some (many) computers will be impossible! For example, here are the results Some research: with the help of this program: Pentagon (rulez!): Page: 0 - fast Page: 1 - fast Page: 3 - fast Page: 4 - fast Page: 6 - fast Page: 7 - fast Profi: Page: 0 - fast Page: 1 - fast Page: 3 - fast Page: 4 - fast Page: 6 - fast Page: 7 - fast Krasnodar: Page: 0 - fast Page: 1 - fast Page: 3 - fast Page: 4 - slow Page: 6 - slow Page: 7 - slow Pulse: Page: 0 - fast Page: 1 - slow Page: 3 - slow Page: 4 - fast Page: 6 - fast Page: 7 - slow From Western sources: 48kb firm: fast memory: # 8000 - # ffff 128kb firm: Page: 0 - fast Page: 1 - slow Page: 3 - slow Page: 4 - fast Page: 6 - fast Page: 7 - slow Spectrum +2, +3 Page: 0 - fast Page: 1 - fast Page: 3 - fast Page: 4 - slow Page: 6 - slow Page: 7 - slow It is easy to see that the 0th page is fast on any computer. Clearly, many programs well-established in some users who refused to work or worked correctly in others. Examples widely known: ProTracker 2. 1, Black Raven, UFO 1-2, MicroEditor .. ProTracker 3.31 works on the "Krasnodar", but catches glitches on the "Impulse" ... It should also be noted that for achieve maximum compatibility with different models need to In the second mode Interrupt routine of their service was in the fast memory. The presence of 257-byte table also necessary. For Timex'a need to install all Music coprocessor registers to 0. Q: How do I use the test results? A: Very simple. Suppose you need 0th logical page, where you is scrolling. The easiest way: ... LD HL, PAGS; address of page table LD A, (HL) CALL K128 ... Where K128 - routine switching pages. In the general case, however, can be used index pair (IX, IY): ... LD IX, PAGS LD A, (IX + N) CALL K128 ... Where N - number of logical page. You need to arrange downloadable logical pages on disk in a certain order, and then act as described above. By the way, if you need to have one of the Page was not involved in the sorting of priorities of speed, it is also easy do (pointing SIZE smaller by 1 than total number of pages and this page should be the last in the table). WARNING!!! If the test at any computer malfunctioned, please report it to the address of the publisher. I hope this article helps You create Upscale PROGRAM work on all computers. In general, the program is much less all written above). I want to thank VTS'u, which gave an idea of the test. ; AutoConfig 1.0 ; (C) 1998 Viper / Techno Laboratory ST EQU # 10; SHIFT TO THE TABLE ; SPEED ON ; Page table SIZE EQU 3; NUMBER OF PAGES subjected; GAYUSCHIHSYA SORT OF SPEED ORG # 8000 ENT LD IX, PAGS LOI LD A, (IX) OR A JR Z, ENY CALL MET LD A, D OR A JR Z, SLOW SUB A COP LD (IX + ST), A INC IX JR LOI SLOW LD A, 1 JR COP ENY CALL SORT RET MET DI CALL K128 LD HL, # C000 LD A, # C1 LD B, L INN LD (HL), A INC L DJNZ INN INC H LD (HL), A DEC A LD I, A LD HL, INT LD A, 195; JP LD (# C1C1), A LD (# C1C2), HL IM 2 LD DE, 0 EI HALT LD HL, I2 LD (# C1C2), HL M0 INC DE; 243 * 255 => slow = 61965 LD B, 16 M1 DJNZ M1 LD A, R INC HL JR M0 I2 DI POP HL LD A, # 3F LD I, A IM 1 INT EI RET K128 PUSH BC LD BC, # 7FFD OUT (C), A POP BC RET SORT LD B, SIZE-1 L0 LD C, SIZE-1 LD IX, PAGS + ST L1 LD A, (IX) LD D, (IX +1) CP D JR C, N1 JR Z, N1 LD (IX), D LD (IX +1), A LD A, (IX + ST) LD D, (IX + ST +1) LD (IX + ST +1), A LD (IX + ST), D N1 INC IX DEC C JR NZ, L1 DJNZ L0 RET PAGS DEFB 17,19,23,16 DEFB 0
Other articles:
Similar articles:
В этот день... 21 November