Stack Depth requirements for CP/M 2.2 CBIOS

Allison ajp166 at bellatlantic.net
Sat Jan 31 11:07:10 CST 2009


>
>Subject: RE: Stack Depth requirements for CP/M 2.2 CBIOS
>   From: "ROBO5.8" <robo58 at optonline.net>
>   Date: Sat, 31 Jan 2009 07:54:55 -0500
>     To: "'General Discussion: On-Topic Posts Only'" <cctech at classiccmp.org>
>
>Hi Chuck,
>
>Thanks for the reply.
>
>My IDE drive is about 2GB which is overkill and beyond the capacities of
>CP/M 2.2.  So I'm only using 20MB of the drive for this project.  My system
>uses Interrupts for Floppy but polling for the IDE.

Anything under 16drives of 8mb will fly (128mb) and not using the full 
drive is not an issue.


>In the mid 70's and early 80's I did lots of CBIOS work and never ran into
>stack problems with CP/M.  Maybe the code was simpler and I used fewer
>Calls, Pushes and Pop's.
>
>I am currently using a Private Stack for some of my CBIOS debug routines
>since they are more stack intensive.
>
>Did you find that you had to make any other changes to the
>Blocking/Deblocking code other than the recommended CP/M 2.2 patches for
>success?

I'dn look at drive selection and allocation vector (alloc) for a 8mb logical
drive that nees to be at least for 4kb allocation size should be at least 
256bytes for each drive!  You can make it smaller by making the allocation 
chunks larger (8kb would only need 128bytes).

I've never had stack size issues for just disk IO but interrrupt handlers 
yes always on creatign private stack.  I generally develop the disk IO
with minimal polled IO to limit the number of things that can go wrong
and ones the disk IO is up then roll in the interrupt IO and added features.

Allison

>
>Thanks Robo
>
>
>-----Original Message-----
>From: cctech-bounces at classiccmp.org [mailto:cctech-bounces at classiccmp.org]
>On Behalf Of Chuck Guzis
>Sent: Friday, January 30, 2009 7:29 PM
>To: General Discussion: On-Topic and Off-Topic Posts
>Subject: Re: Stack Depth requirements for CP/M 2.2 CBIOS
>
>On 30 Jan 2009 at 19:08, ROBO5.8 wrote:
>
>> I have rewritten my old systems CP/M 2.2 CBIOS to add an IDE Drive.
>> 
>> I've run into a problem that has me stumped.  Everything works as long as
>I
>> don't try and copy or assemble a large Assembly file (>80KB).
>> 
>> I will be going along fine and then out of nowhere I will see CP/M request
>> access to Drive "T".  My debug info says SELDSK is requesting Drive
>0FF00h.
>> 
>> I have added debug code to all the CBIOS routines so that they report what
>> they are doing to the console (slow but nice).
>> 
>> I've gone through my code many times and tested each routine via an
>embedded
>> debug monitor.  I believe I have added every CP/M 2.2 patch (1-6 and
>9)that
>> is specific to the CBIOS including those dealing with Blocking/Deblocking.
>
>What do you mean by "large"?  I've run 2.2 with disks up to 20MB with 
>no problems.
>
>CP/M's stack can't be depended upon for much space at all.  Since my 
>BIOS code was interrupt driven, every interrupt service routine 
>started with a change to a private "system" stack.  I recall having a 
>lot of problems before doing that.
>
>Cheers,
>Chuck
>
>



More information about the cctech mailing list