A86: VAT entry format


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

A86: VAT entry format



Somebody (Steve?) was asking about the format of the VAT entries starting
at the end of ROM page 7. Well, here's what I've figured out. The way
they're built, it looks like the TI-OS must work backwards, from higher
memory addresses to lower ones. So I'll do everything backwards also (i.e.
follows means higher in mem., precedes means lower).

The VAT entry is a 5 byte header, followed by a Pascal string for the name.
Names can be a max of 8 chars. The header looks like this:

Size	Offset	Description
1	0	type byte (see linkprot.txt, I think I found it on TI-Files)
4?	1	absolute address of variable data.

The first 14 bits of the address field are the offset within the page
(2^14=16384). The top two bits of the second byte plus the bottom two bits
of the third byte hold the page number. But they're set to 01 01 for page 0
of user memory (RAM page 2). So a variable whose data is stored at the very
start of user memory would look like this. This is a real variable called
Var1, and all numbers are hex:

00, 00,40,01,00, 4,"Var1" ;note that everything is backwards, so you would
have to store it in memory as:
"1raV",04,00,01,40,00,00

BTW, if you don't know what a Pascal string is, it's just a string preceded
by a length byte.

Well, I know I didn't do the best job of explaining this. If you have any
questions, let me know.

--Joshua