Newsgroups: comp.robotics
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornell!travelers.mail.cornell.edu!news.kei.com!news.mathworks.com!udel!darwin.sura.net!gatech!howland.reston.ans.net!agate!darkstar.UCSC.EDU!nic.scruz.net!earth.armory.com!rstevew
From: rstevew@armory.com (Richard Steven Walz)
Subject: Re: Z80 Assem Question
Organization: The Armory
Date: Fri, 10 Feb 1995 14:33:14 GMT
Message-ID: <D3sGFr.Bzv@armory.com>
References: <3hcq5u$g1@newsbf02.news.aol.com>
Sender: news@armory.com (Usenet News)
Nntp-Posting-Host: deepthought.armory.com
Lines: 28

In article <3hcq5u$g1@newsbf02.news.aol.com>,
Centauri7 <centauri7@aol.com> wrote:
>    I am used to programming on systems that have full memory.
>   I am currently building a little robot that will utilize EPROM and
>DRAM.
>  I'm pretty sure I can work out the details for addressing the chips.
>
>   This is really a Z80 assembler question.  How you you specify where
>the end of memory is?  I nned to know where the stack is going to want 
>to be.   The code can be stored in EPROM, and by using the ORG statement,
>I can segment, but I can't find into in the Zilog book about where the 
>stack goes.    Hmmmm....
>
> +
>    +  Centauri
>  +
------------------------------
If this is a plain ole Z-80A with 64KB of RAM space, use SRAM, for goodness
sake! MUCH easier to design with, and cheap enough compared to DRAM in that
small amount! As for the stack, you have a Stack Pointer. The SP. Change it
if you don't like its default position. The command LDSPnn loads SP <-- nn.
If you are doing banks of 64KB segments, it has no bank select register, as
it has only 16 address lines, but you can execute an OUT to a port that
controls that, and arrange code in each segment that handles the change
smoothly. This has been done a lot before. And if you would prefer, the
newer Z280 has bank selection for up to a MB built in, I believe.
-Steve Walz   rstevew@armory.com

