A83: Re: A Few ASM Questions to all the Gurus out there


[Prev][Next][Index][Thread]

A83: Re: A Few ASM Questions to all the Gurus out there




Just so you know, I've never done this, but I think it should work....
For checking multiple keypresses (for 1 to all) you use direct input to read
the key code, then you check the bits in a.
If  you'll notice, a zero indicates that a certain key was pressed:
kEnter .equ 254 ; %11111110
kPlus .equ 253 ; %11111101
kMinus .equ 251 ; %11111011
kMul .equ 247 ; %11110111
kDiv .equ 239 ; %11101111
kPower .equ 223 ; %11011111
kClear .equ 191 ; %10111111
If enter and plus were pressed at the same time, you'd end up with %11111100
in register a. Make sure you take into account the different groups.

The sprite routine in ZLib already is variable. It supports widths from 1 to
8 and heights from 1 to 64.  Use ZGFXL if you need widths from 1 to 96.

jr is a relative (within approximately 128 bytes) jump.  Use it for
small/slow jumps.
jp is jump to anywhere you want. Use it for fast/large jumps.
call is the same as jp, but it puts the location of the next instruction on
the stack so when you ret you end up right after the call. You must ret (or
pop) to get the stack back to a normal level after using call or your
program will crash.

Joe Wingbermuehle
http://www.usmo.com/~joewing/

-----Original Message-----
From: Bruce Link <bjelink@yahoo.com>
To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Date: Tuesday, October 06, 1998 10:32 PM
Subject: A83: A Few ASM Questions to all the Gurus out there


>
>1st Question:
> How do I go about acknowledging 2 key presses at once like up-right or
>down-left...
>I think Bill Nagel did this is penguins... but there is no code..
>
>2nd Question:
>To Joe Wingbermuehle: Is there any chance the next Zlib library will have a
>variable width and height sprite routine in it?
>
>3rd Question:
>Could someone explain to me the differences between the commands: call, jr
>and jp
>
>Thanx
>Bruce
>


Follow-Ups: