Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DRI Copyright Dates.

6 views
Skip to first unread message

s_dub...@yahoo.com

unread,
Nov 18, 2009, 12:20:43 AM11/18/09
to
Mr. Emmanuel Roche writes in another thread..
"
So, the least that can be said is that Gary Kildall knew about
celestial computations. So, it cannot be mere hazard that Gary
Kildall
chose the 1st January 1978 for the date of CP/M, especially since we
all know that CP/M was already several years old by then! So, why?

Kildall: (...) as a teacher, I spent a lot of time with students
showing them clean algorithms I had picked up. (Page 63)

Comments welcomed.
"

I don't know why..
The CP/M v1.4 Interface Guide lists the requirement that any copy of
the system disk carry the copyright notice:

Copyright (c), 1976
Digital Research


The file, LDBDOS.A86 found in the collection of MP/M-86 sources has:


; title 'Bdos Interface, Bdos, Version 2.2 Feb, 1980'
;*****************************************************************
;*****************************************************************
;** **
;** L o a d e r **
;** B a s i c D i s k O p e r a t i n g S y s t e m **
;** I n t e r f a c e M o d u l e **
;** **
;*****************************************************************
;*****************************************************************
;
; Copyright (c) 1978, 1979, 1980
; Digital Research
; Box 579, Pacific Grove
; California
;
;
; 5 september, 1980
; smaller version of BDOS for CP/M-86 Loader
;
;**********************************************
;
cpmsegment equ 0 ; base of CP/M-86
ldroffset equ 0 ; offset of CPMLDR
bdosoffset equ 400H ; offset of LBDOS-86
biosoffset equ 1200H ; offset of LBIOS-86
bdoscodesize equ 0B00H ; size of BDOS code

. . .

A rather interesting tidbit of information regarding CP/M-86, 5
september, 1980.

IIRC the launch of the IBM-PC was Oct 1981, right? A full year after
this was being worked on.

The 1978 initial copyright date may be the date DRI moved to Pacific
Grove?

Steve

Mr Emmanuel Roche, France

unread,
Nov 18, 2009, 3:10:24 AM11/18/09
to
Hello, Steve!

> The 1978 initial copyright date may be the date DRI moved to
> Pacific Grove?

Hahaha! My poor Steve, I am afraid that you are mixing "Copyright
date" with the 16-bit INTEGER holding the date in BDOS Version 3...

Ok. We need to have a common source of information about dates and the
calendar. On the Internet, I found one Wikipedia article. I have read
it several times, and followed all its links. At the very minimum, you
should read it:

http://en.wikipedia.org/wiki/Gregorian_calendar

Now, note that "For the Gregorian calendar, a perpetual calendar often
consists of 14 one-year calendars, plus a table to show which one-year
calendar is to be used for any given year."

That is to say: the Gregorian calendar was designed to give the right
date from 1582 to 4099, but, during its lifespan, there will be X
times the repetition of a 14-year "sequence" of dates... See?

So, I think that Gary Kildall thought to this characteristic of the
Gregorian calendar when he... Ho, I was forgetting: What is the
relation with 1978? Well, during my searches, I found:

http://www.vpcalendar.net/20th_21st.html

If you click on "1978", you will see (at the bottom):

"Years that use Calendar 0:

20th Century: 1905 1911 1922 1933 1939 1950 1961 1967 1978"

Here is your "1978": It is the "Year 0" of a 14-years repetition of
dates...

This Web site has also a FAQ page that is worth reading:

http://www.vpcalendar.net/QuickRef/FAQs.html

Today, there is not a cloud, so I am going to work all day long in the
garden.

If someone has any other idea(s) about the CP/M date INTEGER starting
the 1st January 1978, he is welcome to share it.

Yours Sincerely,
Mr. Emmanuel Roche, France

glen herrmannsfeldt

unread,
Nov 18, 2009, 7:08:50 AM11/18/09
to
Mr Emmanuel Roche, France <roch...@laposte.net> wrote:

(snip)


> Ok. We need to have a common source of information about dates and the
> calendar. On the Internet, I found one Wikipedia article. I have read
> it several times, and followed all its links. At the very minimum, you
> should read it:

> http://en.wikipedia.org/wiki/Gregorian_calendar

> Now, note that "For the Gregorian calendar, a perpetual calendar often
> consists of 14 one-year calendars, plus a table to show which one-year
> calendar is to be used for any given year."
(snip)

One I have had for a long time has a table giving one of 14 letters
for each year, and another table connecting the the letter to one
of seven month calendars depending on the desired month.

-- glen

Bill Gunshannon

unread,
Nov 18, 2009, 9:01:02 AM11/18/09
to
In article <02c653fd-b504-4cbf...@b15g2000yqd.googlegroups.com>,

There were 8086 machines before the IBM PC. The world was not created
by IBM. Anybody here even remember Dr. Godbout?

bill

--
Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves
bill...@cs.scranton.edu | and a sheep voting on what's for dinner.
University of Scranton |
Scranton, Pennsylvania | #include <std.disclaimer.h>

Jonathan Graham Harston

unread,
Nov 18, 2009, 8:23:46 PM11/18/09
to
roche182 wrote:
> If someone has any other idea(s) about the CP/M date INTEGER starting
> the 1st January 1978, he is welcome to share it.

Any dating system that uses a monotonically incrementing number
needs a zero point. That zero point is more or less arbitary, but
for practicality needs to be before any likely dates the system
using the dating system is going to use.

Common dating systems count:
* years from a zero point, with seperate month and day
* days from a zero point
* subdivisions of a day from zero point

DOS counts years from 1980. AcornMOS counts years from 1981. RISC
OS counts centiseconds from 1900. UNIX counts seconds since 1970.

If you're going to count days or subdivisions of days, for
practicality, you make time point zero 1st January of your start
year. If you're counting subdivisions of a day, you make your start
point 00:00:00.

Whatever you count and whatever zero point you use, you need to
implement the appropriate maths to convert to and from ordinal
form. Gary, with his understanding of celestial mechanics, may have
notice the 14-year cycle restarting in 1978 and realised it made
the maths easier to set his zero point there. A 15-bit integer
count of days since 01/01/1978 extends to the middle of 2067. Why
15-bit? Well, how many programs have fallen over assuming a 16-bit
integer was unsigned?

As for the original question, Z80 code to convert to and from ordinal
dates:

DEFPROCDate_FromOrd(mem%,d%,m%,y%,hr%,mn%,sc%,cs%):y%=y%MOD400
d%=y%*365.25+m%*30+d%+VALMID$("120112234455",m%,1)
d%=d%+((y%MOD4)=0)-((y%-1)DIV100)-
(m%>2AND((y%MOD4)=0AND(y%MOD100)<>0ORy%=0))+36493
IFd%>146066:d%=d%-146097
d%=d%*&41EB:mem%!1=d%+d%:d%=((hr%*60+mn%)*60+sc%)*100+cs%
?mem%=d%:mem%!1=mem%!1+d%DIV256:ENDPROC

Translates to something like (all untested of course):

; B=day of month, 1..31
; C=month, 1..12
; DE=year, 0..65535, only tested for 1901..2099
;
PUSH BC ; save day/month for a mo
EX DE,HL ; HL=year
LD DE,1900
AND A
SBC HL,DE ; HL=year-1900
PUSH HL ; save year
LD BC,365
EX DE,HL
LD HL,-365
.years
ADD HL,DE
DEC BC
LD A,B
OR C
JR NZ,years ; HL=(year-1900)*365
POP DE
LSR D
ROR E
LSR D
ROR E ; DE=(year-1900)/4
ADD HL,DE ; HL=(year-1900)*365.25
POP BC ; get day/month back
PUSH BC
PUSH HL ; save day count to 1st jan
LD HL,-30
LD DE,30
.months
ADD HL,DE
DEC C
JR NZ,months ; HL=month*30
EX DE,HL
POP HL
ADD HL,DE ; HL=year*365.25+month*30
LD C,B
LD B,0
ADD HL,BC ; HL=year*365.25+month*30
POP BC ; Get month back to C
PUSH BC
LD B,0
PUSH HL
LD HL,monthadjust-1
ADD HL,BC
LD C,(HL) ; Get month adjust for month lengths
POP HL
ADD HL,BC ; HL=year*365.25+month*30+adjust[month]
POP BC
POP DE ; Get original year-1900 back
LD A,E
AND 3 ; Is it a leap year?
JR NZ,notleap
DEC HL
LD A,C
CP 2
JR C,notleap
INC HL
.notleap
RET ; HL=number of days since 1900

.adjust
EQUB 1,2,0,1,1,2,2,3,4,4,5,5

Converting from a day count to ordinal dates is a bit more
complicated - I hate doing divisions in machine code - so
is left as an exercise for the reader.

--
J.G.Harston - j...@arcade.demon.co.uk - mdfs.net/User/JGH
BBC BASIC for Windows and Internationalisation
See http://mdfs.net/Software/BBCBasic/Windows/ProgTips

Jonathan Graham Harston

unread,
Nov 19, 2009, 1:15:50 PM11/19/09
to
> As for the original question, Z80 code to convert to and from ordinal
> dates:

And twenty seconds after entering "julian date conversion z80" into
a well-known search engine gives:

ftp.gaby.de/pub/cpm/znode51/pcwworld/u108/user_0/arkdate.asm
- convert day/month/year to julian day
www.retroarchive.org/cpm/cdrom/CPM/BYE5/B5C-LB36.INS
- convert julian day to day/month/year

Herbert Johnson

unread,
Nov 19, 2009, 6:42:44 PM11/19/09
to
> roche182 wrote:
> > If someone has any other idea(s) about the CP/M date INTEGER starting
> > the 1st January 1978, he is welcome to share it.

Jonathan Graham Harston) wrote:
> Any dating system that uses a monotonically incrementing number
> needs a zero point. That zero point is more or less arbitary, but
> for practicality needs to be before any likely dates the system
> using the dating system is going to use.

That leaves quite a range. I think most posts about DRI's choices are
conjectures without points of fact, or happenstances. That 1 Jan 1978
begins on a Sunday is likely happenstance but....

> Whatever you count and whatever zero point you use, you need to
> implement the appropriate maths to convert to and from ordinal
> form. Gary, with his understanding of celestial mechanics, may have
> notice the 14-year cycle restarting in 1978 and realised it made
> the maths easier to set his zero point there.

"Easier coding" is at least a reasonable conjecture. And Kildall was a
pilot, and he had at one time written astrological (as in horoscopes)
software. It's possible he made those connections, chose what was
easiest to program, if he did the programming. If if if. Reading the
manual I own....

Digital Research CP/M Plus (CP/M version 3.0) System Guide

first edition January 1983
from second edition July 1983

Section 2 CP/M 3 BIOS overview
2.7 clock support

(quote) The time of day is kept as four fields. @DATE is a binary word
containing the number of days
since 31 December 1977. The bytes @HOUR, @MIN and @SEC in the System
Control Block
contain the hour, minute and second in Binary Coded Decimal (BCD)
format. (end quote)

If someone has access to some CP/M Plus/3.0 BIOS's or sources from
DRI, there may be clues there.

http://www.timeanddate.com/

From date: Saturday, December 31, 1977
Added 65,535 days
Resulting date: Sunday, June 5, 2157

> A 15-bit integer
> count of days since 01/01/1978 extends to the middle of 2067. Why
> 15-bit? Well, how many programs have fallen over assuming a 16-bit
> integer was unsigned?

another copy, same manual,
Section 3.1, System Control Block

@DATE, read/write variable, the number of days since 31 December 1977,
expressed as a 16-bit unsigned integer, low byte first - end quote

from this copy on line: www.cpm.z80.de/manuals/cpm3-sys.pdf

Herb Johnson
retrotechnology.com
contact me c/o my Web site, not "gmail"

0 new messages