Re: A86: Another New Guy
[Prev][Next][Index][Thread]
Re: A86: Another New Guy
> 1. Is there a conditional load statement? Something that would be like
>
> jp z,a,1
hmm wow wonder where u got that one from :) you can use a routine that
is easier to follow and is a little smaller (no need for another jump)
jp nz,wherever ;jump wherever if the condition is false
ld a,1
now add a jump to a diff label or something else here
> ? If not, is there a way to do that so that I don't have to do an entire
> new routine like this:
>
> A1:
> ld a,1
> ret
>
> to do that? For example, my program states:
>
> F_key_get:
> call GET_KEY
> cp KF1
> jp z,A1
> ret z
> cp KF2
> jp z,A2
> ret z
> jp nz, F_key_get
(you dont need the z on ret z)
> (I think you can guess what A2 does). Is there a more effecient way to
> do this? Does anyone have a routine that returns the BASIC-standard
> numbers?
yeah if you make a table, that confuses me more than doing single keys
tho and still would end up about the same size so you probably should
just keep the routine you have now
> 2. How do I display variables? Can I just call _vputs and do .db a? Or
> do I have to do something like "ld (DisplayVal),a .db DisplayVal"? Am
you have to use the OPs to load a variable and then use another call to
display it. look in the inc file for loading them and check out zreduce
for displaying
References: