Re: LZ: Lots 'o questions...


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

Re: LZ: Lots 'o questions...



list-zshell@defiant.rbk.sollentuna.se wrote:
> 
>         I'm fairly new to z-80/zshell/ti-85 assembler programming (i just
> learned this morning :))
> and i had a few questions:heh, cool. same here....


> 2. I know the difference between ROM & RAM but what are the differences in
> accessing them?
> Basically you can only read rom. so stuff like ld (some_rom_location), some value wont work. It depends on how its hooked up 
on the calc for how it responds. Check out TI-RAM.TXT and TI-ROM.TXT (just browse around on www.ticalc.org)




> 3. What portions of RAM can i use to store variables and such and are there
> specially
> allocated portions of RAM that i should not overwrite?Check out the above files, and TI-85.H, i believe they say how to find the first free byte of user memory. Generally, zshell 
programmers use text memory (normally used by the ti-os for screen text and stuff i think, not needed for zshell proggies.)


> 
> 4. is there an assembler to use on the TI-85 itself so I don't have to use a
> computer?Im workin on one. I know of the COMPILER program, but it really isnt a compiler, it just converts a list of hex #'s into the 
characters. I know of Hexc, but you cant do labels on that.


> 
> 5. what are pages of memory? and what pupose do they serve?
> Welp, the z80 is 16-bit address, so the max memory that can be accessed is 64k (2^16), so what they do is take a port, latch 
it on output, and tie it to the high order lines of a chip, this way you can access more. For example....
lets say weve got a 8k ram chip, an 8k rom chip, and a 128k rom chip...
you put subroutines and big stuff on the 128k rom chip, from the Z80, you tie the address lines so that addresses 0-8k go to 
the rom chip and addresses 8k-16k go to the ram. Then you tie Z80 A0-A14 to the 128k rom chip A0-A14, tie Z80 A15 to !CS on 
the 128k rom through an inverter, and tie lets say port 100h's A0 line to the 128k rom chip to A15 and A1 to A16 (both 
latched). This way when you do a
LD C, 100h
LD B, 1
OUT (C), B
you switch to page 1, then you can access that rom.


> 6. what is the difference between video memory and regular (if there such a
> thing) memory


Video memory is read by the video display. For example, on an ibm-pc, the start of the vga buffer is at A000h, when you write 
to memory there or within the next 64k, the video card reads the memory and displays it on the screen. Same thing on the 
ti-85. Im not sure of the address though. Ive noticed people use FIND_PIXEL a lot (look at some source code) but wouldnt it 
be smarter to just calculate the address through code, a common function call wastes time.


<pre>
-- 


--Steve
s_wrobleski@foma.wsc.mass.edu
</pre>


References: