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

Re: Date and time not updating in Applesoft BASIC program?



On Feb 3, 9:32 pm, "ict@ccess" <gids...@sasktel.net> wrote:
> > Thanks for that. However, I discovered that I can also rewrite the
> > program so that it can store values in variables (W, L, T, etc.)
> > instead of doing POKEs to the conflicting memory addresses.
>
> > Although, when you think about it, is not a LET (stated or implied)
> > statement merely a POKE to a memory location referenced by a variable?
>
> > Brandon
>
> Variables will not work in this case.
>
> When a variable is accessed, zero page locations $81-82 hold the
> variable name and $83-84 hold the variable address.  A FP variable
> only has 5 bytes allotted to it.
>
> For most purposes, if only 5 bytes are needed in an ML program then
> you can do something like
> A=(# derived from ML bytes) : CALL PEEK(83)+256*PEEK(84)
>
> but the mnemonic
>
> JSR BF00
>   65
>   00 00
>
> takes 6 bytes.  Putting 2 variables back to back does not work either,
> because in memory the two variables are separted by the variable name,
> so you will not have 10 consecutive bytes for your ML program.
>
> Rob

I was actually talking about storing numeric values not related to the
system date and time (e.g. wins, ties, and losses) to variables, and
using POKEs to store the GET_TIME machine language routine. Would it
work?

Brandon