[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Date and time not updating in Applesoft BASIC program?
> 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