A86: Re: movingmem
[Prev][Next][Index][Thread]
A86: Re: movingmem
-----Original Message-----
From: Tom Feller <maeciggy@hotmail.com>
To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
Date: Wednesday, November 04, 1998 4:25 PM
Subject: A86: movingmem
>
> What is the best way to get a small chunk of memory(8 bytes) so that
>it can be read in Ascii format and not hex or binary?
>
What exactly do you mean? If you have a chunk of memory and want convert it
from ascii or hex into a regular number, say 16 or 24 bits, point to it with
HL and work through it left to right. At each byte multiply what you already
have by the base the numbers is (decimal is base 10, hex is base 16), then
add the current byte. Don't forget to subtract the ascii value of the
number ('0' = 48), and if it is 'A' to 'F', the value of the letter ('A' =
65).
> My second question is, What is the difference between an aligned
>sprite and an unaligned sprite?
An aligned sprite is one where every row of the sprite fits evenly into
memory, so it doesn't have to be shifted (remember that 8 pixels = 1 byte of
display memory). A non-aligned sprite doesn't. The byte must be shifted to
fit into two display bytes. Put another way, in an aligned sprite, the
starting coord is a multiple of 8, in a non-aligned it can be anything.
Aligned sprites are much faster than non-aligned sprites to draw, by about
10-15 times, on average.
>
> Maec(pronounced as "mace")The sorcerer
> formerly known as Tom Feller
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com