83Plus:BCALLs:510A

From WikiTI
Jump to: navigation, search

Synopsis

Unofficial Name: GetVarVersion

BCALL Address: 510A

Minimum OS Version: 2.30

Gets the version of a variable based on the tokens included within it.

Inputs

  • B: page of variable's size bytes
  • DE: address of variable's size bytes

Outputs

  • Z set if suitable for all calculators (83 and above)
  • A: version

Destroys

  • None

Comments

This works for both archived and unarchived variables. It does NOT update the version byte in the VAT entry (this is the same as what would be stored there).

If the version is zero, it contains no new tokens and would be accepted by the TI-83 and above.

If the version is 1, it contains at least one token from the range 0BBh,068h to 0BBh,0CEh. A few examples are below:

Archive
UnArchive
Asm(
AsmComp(
AsmPrgm
GarbageCollect

If the version is 2, it contains at least one token from the range 0BBh,0CFh to 0BBh,0DAh. A few examples are: '@#$&`;\|_%

If the version is 3, it contains at least one token from the range 0BBh,0DBh to 0BBh,0F5h.

If the version is 4, it contains either OpenLib( and ExecLib (or both).

If the version is 24h (which is 4 with bit 5 set), it contains at least one token from the range 0EFh,00h to 0EFh,10h. These are the 84+/SE timer and clock functions.

If the version is 5, it contains at least one token from the range 0EFh,13h to 0EFh,16h.

If the version is 0FFh, it contains tokens not mentioned above and is unrecognizable by the TI-OS.

A variable of a certain version can also contain older tokens; for example, a version 5 variable can also contain tokens from versions 0-4.