Re: A83: Many Idealistic Questions And Stuff...


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

Re: A83: Many Idealistic Questions And Stuff...




Well... there are some bytes in low-memory (around 8000h) that contain flags.
Some routines check certain flags and act differently if they are set/reset.
Every byte has 8 flags (bits). Say that the system stores a flag as bit #3 at
8001h (just an example). To set it, you could:

    ld    a,(8001h)
    set   3,a
    ld    (8001h),a

This would of course trash register a. You could also do:

    ld    hl,8001h
    set   3,(hl)

This would trash hl instead. And ofcourse you could also do:

    ld    iy,8001h
    set   3,(iy+0)

(which is exactly the same as above, in a way.) This would trash iy. But as
you noticed, the set command has an offset to iy (like in (iy+0), the 0 can
be something else). So yet another way to do it is:

    ld    iy,8000h
    set   3,(iy+1)

Now for the dynamite... to change two different flags, set flag 3 in 8001h
AND reset flag 7 in 8005h, you could do:

    ld    iy,8000h
    set   3,(iy+1)
    res   7,(iy+5)

Without having to set iy to 8000h again! Wouldn't it be clever to have iy
pointing to the system flags all the time, so you won't need to initialize it
at all? Well, that's exactly what the system does for you!

Hope this helps.

Linus


On 31-Jul-98, Jkhum98@aol.com wrote:

>Can somebody explain everything about the 24 system flags that are displayed
>in the "Basic TI Design Information" section of TI's Documentation, and that
>are available for ASM programming? How do you access these and is there a
>defining process or you are just supposed to remember which is which that you
>are using...? What's the point of using them, and some examples of their
>purpose would be nice, but also, when are they erased or something? Like when
>the program ends, or certain calls reset or destroy these defined flags...?
>Hmm, also, is it possible to overwrite part of the TI83's ROM temporarily? I
>know some people would say that this would just be wrong and turn the calc
>into a Gameboy, but I don't use certain stuff like everything in the Finance
>Menu, and would rather use that space for other purposes... What about
>creating new menus for ourselves, is that realistic? And by the way, what are
>all the calls that are associated with menus? How to define them, set up the
>jumps, and have the option to extend more than 7 menu choices, referring to
>the ones in BASIC when you cant do more than 7...? And another example of
>overwriting the Memory is that the last 15 of the 256 ASCII characters are
all
>the same, and are those bullet thingies... Maybe we can create our own 5x7
>characters temporarily and replace those... Maybe a Backup sent to the calc
>can give us some optimized menus and the new characters, but then after all
>that, would a simple "Reset", reset everything back to normal?
>Hmm, some of these thing may sound very unrealistic and you can tell me where
>I'm completely wrong, but lets get some info from Pat on the subjects of the
>ASM available system flags, and stuff about menus. Thanks...
>--Jason

>Jason Kovacs
><Jkhum98@aol.com>



Follow-Ups: References: