Re: A86: TI-86 ASM Questions...
[Prev][Next][Index][Thread]
Re: A86: TI-86 ASM Questions...
At 10:30 PM 8/18/98 EDT, you wrote:
>
>Sorry if any of these questions are kind of stupid, but I am just starting to
>program in ASM for the TI-86. Well, here goes:
>1. Do you guys know an easy way to fill a memory loaction with zero's? (Right
>now I have a big (1024 byte) splash type screen that is empty and I use
"ldir"
>to move it into the location)
There is a rom call routine to do it _ldhlz ($437B). HL is the address to
start at, and B is the number of bytes to fill with 0's. If you need more
than 255 bytes (or a faster way), use this:
ld hl,MemToFill ; point to memory to fill with 0's (or whatever)
ld de,MemToFill+1 ; point one byte ahead of that
ld (hl),FillValue ; FillValue is a one byte value (0)
ld bc,NumBytes ; NumBytes is how many bytes to fill
ldir ; copy FillValue from hl to hl+1, for all bytes
>2. Is there a web site or anything where I can find out how to check the
>keyboard ports instead of using "call GET_KEY", because it pauses a bit when
>you switch from pushinng one button to pushing another?
You should try Matt's site, he has all that kind of stuff:
http://www.dogtech.com/cybop/ti86/
Or, the Assembly Studio 86 help file has a chart with the bit values and
tells how to use the ports.
>3. How can you use trig tables to do multiples of sin and cos (rounded to
>nearest integer)? (like 5cos x or something) (anyone have a routine?)
BIOSERRORS posted a couple trig tables to ticalc.org in the
\86\asm\routines section. He made them for a raycaster he was writting.
>4. I think someone asked this already, but I probably deleted the answers.
>How can you compress an image, such as a title screen pic, so it doesn't take
>up 1024 bytes?
Scabby has some compression/decompression routines called Bloat. You can
find them in the same place as the trig tables.
Hope this helps,
--
David Phillips
mailto:electrum@tfs.net
ICQ: 13811951
AOL/AIM: Electrum32
References: