Date : Fri, 25 Jun 1993 11:11:40 BST
From : "M.J.Ebourne" <M.J.Ebourne@...>
Subject: Unrolling loops & fast routines
> If you have multiple screens and are DIMing lots of screen buffers,
> allocating an extra 256 bytes each time is going to get expensive!
If he's got multiple screens he only needs one dim, and so at worst loses
255 bytes.
My personal prefered way would be to lower HIMEM and allocate yourself the
memory. That is guaranteed to be in the same place all the time, and be page
aligned. Much more sensible.
> Note also that the mode 7 screen is only 40x25 bytes, which is 24 bytes
> less than 1k. Not only can you dim less than 1k per screen, but you
> can also transfer less and gain speed that way (Note that this is a
> little messy, you need two loops transferring 3 pages concurrently, and
> the 4th page in a 2nd loop).
Indeed, but it would not NECESSARILY be quicker. Its worth counting the
cycles to make sure. Also, to save 24 bytes requires a lot of messing around
for very little gain.
Also the fact that the screen is being copied in several different places
simultaneously makes it look smoother because you cannot see one bit appearing
before another.
--
Martin Ebourne Email: mje@...
Electronics, Southampton University