Discussion:
[N8VEM: 18366] CP/M alignment
William R Sowerbutts
2014-07-02 13:18:34 UTC
Permalink
Dear lazyweb,

All the CP/M implementations I have seen have the CCP, BDOS and BIOS aligned
to 256-byte boundaries, ie the low 8 bits of the first address of each are 0.

Does anyone know if this is an actual requirement? Or is it just a common
convention? Perhaps this practice started as a convention and as a result
some applications now make this assumption about BDOS/BIOS entry vector
alignment and will break if this assumption is violated?

Many thanks

Will

_________________________________________________________________________
William R Sowerbutts will-***@public.gmane.org
"Carpe post meridiem" http://sowerbutts.com
main(){char*s=">#=0> ^#X@#@^7=",c=0,m;for(;c<15;c++)for
(m=-1;m<7;putchar(m++/6&c%3/2?10:s[c]-31&1<<m?42:32));}
John Coffman
2014-07-02 13:44:12 UTC
Permalink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Will,<br>
<br>
I would guess that the alignment is a consequence of the original DR
code having been written in pieces without a linker.&nbsp; That way small
adjustments to the code would not require altering the cross-module
linkage points.<br>
<br>
My impression is that there is no alignment requirement in Z80 CP/M
2.2.<br>
<br>
--John<br>
<br>
<br>
<br>
<br>
On 07/02/2014 06:18 AM, William R Sowerbutts wrote:
<blockquote cite="mid:20140702131834.GA32543-***@public.gmane.org"
type="cite">
<pre wrap="">Dear lazyweb,

All the CP/M implementations I have seen have the CCP, BDOS and BIOS aligned
to 256-byte boundaries, ie the low 8 bits of the first address of each are 0.

Does anyone know if this is an actual requirement? Or is it just a common
convention? Perhaps this practice started as a convention and as a result
some applications now make this assumption about BDOS/BIOS entry vector
alignment and will break if this assumption is violated?

Many thanks

Will

_________________________________________________________________________
William R Sowerbutts <a class="moz-txt-link-abbreviated" href="mailto:will-***@public.gmane.org">will-***@public.gmane.org</a>
"Carpe post meridiem<a class="moz-txt-link-rfc2396E" href="http://sowerbutts.commain(){char*s=">" http://sowerbutts.com
main(){char*s="</a>&gt;#=0&gt; ^#X@#@^7=",c=0,m;for(;c&lt;15;c++)for
(m=-1;m&lt;7;putchar(m++/6&amp;c%3/2?10:s[c]-31&amp;1&lt;&lt;m?42:32));}

</pre>
</blockquote>
</body>
</html>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &quot;N8VEM&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:n8vem+unsubscribe-/***@public.gmane.org">n8vem+unsubscribe-/***@public.gmane.org</a>.<br />
To post to this group, send email to <a href="mailto:n8vem-/***@public.gmane.org">n8vem-/***@public.gmane.org</a>.<br />
Visit this group at <a href="http://groups.google.com/group/n8vem">http://groups.google.com/group/n8vem</a>.<br />
For more options, visit <a href="https://groups.google.com/d/optout">https://groups.google.com/d/optout</a>.<br />
Wayne Warthen
2014-07-03 18:09:14 UTC
Permalink
I have not seen any "code level" reason that CCP, BDPS, or CBIOS need to be
page aligned. MOVCPM would not work -- it can be modified to work for page
boundaries, but nothing less than that. Not sure MOVCPM is relevant to
you. There are definitely applications out there that assume page
boundaries.

--Wayne
Will,
I would guess that the alignment is a consequence of the original DR code
having been written in pieces without a linker. That way small adjustments
to the code would not require altering the cross-module linkage points.
My impression is that there is no alignment requirement in Z80 CP/M 2.2.
--John
Dear lazyweb,
All the CP/M implementations I have seen have the CCP, BDOS and BIOS aligned
to 256-byte boundaries, ie the low 8 bits of the first address of each are 0.
Does anyone know if this is an actual requirement? Or is it just a common
convention? Perhaps this practice started as a convention and as a result
some applications now make this assumption about BDOS/BIOS entry vector
alignment and will break if this assumption is violated?
Many thanks
Will
_________________________________________________________________________
"Carpe post meridiem" http://sowerbutts.com
(m=-1;m<7;putchar(m++/6&c%3/2?10:s[c]-31&1<<m?42:32));}
--
You received this message because you are subscribed to the Google Groups "N8VEM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to n8vem+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to n8vem-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/n8vem.
For more options, visit https://groups.google.com/d/optout.
William R Sowerbutts
2014-07-03 23:35:28 UTC
Permalink
There are definitely applications out there that assume page boundaries.
Thanks; this is just what I was worried about. Do you have an example of
one?

W

_________________________________________________________________________
William R Sowerbutts will-***@public.gmane.org
"Carpe post meridiem" http://sowerbutts.com
main(){char*s=">#=0> ^#X@#@^7=",c=0,m;for(;c<15;c++)for
(m=-1;m<7;putchar(m++/6&c%3/2?10:s[c]-31&1<<m?42:32));}
Wayne Warthen
2014-07-05 05:48:25 UTC
Permalink
I'm afraid I don't remember any examples offhand, but quite sure I encountered it.

Wayne
William R Sowerbutts
2014-07-06 17:55:13 UTC
Permalink
I didn't have to look far -- both SURVEY.COM and CLRDIR.COM on the RomWBW ROM
disk image require the BIOS to be page aligned.

Will
Post by Wayne Warthen
I'm afraid I don't remember any examples offhand, but quite sure I encountered it.
Wayne
--
You received this message because you are subscribed to the Google Groups "N8VEM" group.
Visit this group at http://groups.google.com/group/n8vem.
For more options, visit https://groups.google.com/d/optout.
_________________________________________________________________________
William R Sowerbutts will-***@public.gmane.org
"Carpe post meridiem" http://sowerbutts.com
main(){char*s=">#=0> ^#X@#@^7=",c=0,m;for(;c<15;c++)for
(m=-1;m<7;putchar(m++/6&c%3/2?10:s[c]-31&1<<m?42:32));}

Loading...