home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CBM Funet Archive
/
cbm-funet-archive-2003.iso
/
cpm
/
faq
/
cpm-on-c128-1.txt
< prev
next >
Wrap
Text File
|
2001-08-30
|
8KB
|
177 lines
Cp/m on the c128 (article 1)
BY nOEL nYMAN
(cOPYRIGHT 1986 BY gEODUCK dEVELOPMENTAL sYSTEMS. pERMISSION
TO REPRINT THIS MATERIAL IS HEREBY GRANTED, PROVIDED THIS
NOTICE IS INCLUDED IN THE REPRINTED MATERIAL.)
iN THIS COLUMN WE PLAN TO EXPLORE cp/m (cONTROL pROGRAM FOR
mICROCOMPUTERS) AND HOW TO USE IT ON THE c128. a SPECIAL
input cp/m1 DISK IS ALSO AVAILABLE WITH THE LATEST cp/m
OPERATING SYSTEM, SEVERAL PROGRAMS, AND REPRINTS OF THESE
COLUMNS (SEE THE DISK ORDER FORM ELSEWHERE IN THIS ISSUE).
tO UNDERSTAND THE WHAT AND WHY OF cp/m, WE HAVE TO GO BACK
TO THE EARLY DAYS OF MICROCOMPUTING. iN THIS PRIMITIVE TIME
THERE WERE MAINFRAMES, HUGE AND EXPENSIVE COMPUTERS.
cOMMUNICATING WITH ONE REQUIRED A "CONSOLE" WHICH HAD A
KEYBOARD AND AN OUTPUT DEVICE. tHE OUTPUT WAS FREQUENTLY A
PRINTER, ALTHOUGH THE CATHODE RAY TUBE (crt OR TV SCREEN)
WAS BECOMING MORE COMMON. rEFURBISHED TELETYPE MACHINES WERE
OFTEN USED AS CONSOLES.
iN THE EARLY 1970'S A REVOLUTION BEGAN THAT WOULD CHANGE THE
COURSE OF COMPUTING...THE lsi (lARGE sCALE iNTEGRATION)
MICRO CHIP. iT BECAME POSSIBLE TO PRODUCE ON A SINGLE PIECE
OF SILICON ALL THE LOGIC IN cpu'S (cENTRAL pROCESSING uNITS)
REQUIRING SEVERAL CIRCUIT BOARDS ON THE MAINFRAMES. tHE
FIRST POPULAR MICROPROCESSOR CHIP, THE 8080 DESIGNED BY
iNTEL, WAS USED TO MAKE INTELLIGENT TERMINALS. tHESE WERE
CONSOLES THAT CONTAINED A KEYBOARD AND crt MONITOR, A SMALL
AMOUNT OF ram (rANDOM aCCESS mEMORY) AND SOME MEANS OF
COMMUNICATING WITH A MAINFRAME.
tHE LARGE HARD DISKS AND TAPE DRIVES USED BY THE MAIN FRAMES
WERE TOO COMPLEX FOR A MICROCOMPUTER TO CONTROL (THERE
WASN'T ENOUGH ram TO HOLD THE CONTROLLER PROGRAM REQUIRED).
sO THE MICROS USED PAPER TAPE. a PUNCH POKED ROWS OF UP TO
SEVEN HOLES IN THE HALF-INCH WIDE TAPE, EACH HOLE
REPRESENTING A BIT IN A SEVEN BIT CHARACTER OR COMMAND. a
PAPER TAPE READER TRANSLATED THESE HOLES INTO BINARY DATA TO
STORE IN THE MICRO. sTORING A PROGRAM WAS NOISY AND SLOW.
iN 1973 ibm DEVELOPED THE FIRST FLOPPY DISKS AS ALTERNATIVES
TO THE THEN POPULAR PUNCH CARDS USED ON MAINFRAMES. gARY
kILDALL AT iNTEL OBTAINED A USED DRIVE FROM A SMALL COMPANY
NAMED sHUGART AND BEGAN WORKING ON A CONTROLLER PROGRAM TO
INTERFACE IT WITH AN 8080 BASED MICROCOMPUTER. hE AND jOHN
tORODE DEVELOPED THE CONTROLLER INTO A FULL DISK DRIVE
OPERATING SYSTEM, WHICH THEY CALLED cp/m. iNTEL WASN'T MUCH
INTERESTED IN THE PROJECT, AND kILDALL AND tORODE BEGAN
MARKETING THE PRODUCT ON THEIR OWN THROUGH dIGITAL rESEARCH
IN 1976. tHE REST, AS THEY SAY, IS HISTORY.
cp/m IS AN OPERATING SYSTEM. eVERY COMPUTER NEEDS AN
OPERATING SYSTEM IN ORDER TO INTERFACE WITH THE CONSOLE, THE
DISK DRIVES, AND ANY OTHER PERIPHERALS SUCH AS MODEMS AND
PRINTERS. iN THE RELATIVELY ADVANCED AGE WE LIVE IN, HOME
COMPUTERS USUALLY COME WITH THEIR OPERATING SYSTEMS IN rom
(rEAD oNLY mEMORY). wHEN YOU POWER UP YOUR c128, IT "KNOWS"
HOW TO TALK TO THE KEYBOARD, SCREEN, ETC. tHE cOMMODORE
DISK DRIVES HAVE THEIR OPERATING SYSTEMS IN rom ALSO. yOU
DON'T NEED TO load ANY PROGRAM IN ORDER TO TYPE ON THE
KEYBOARD, PRINT CHARACTERS ON THE SCREEN, OR FIND A FILE ON
A FLOPPY DISK.
iN 1973 COMPUTERS WERE MUCH LESS SMART. pARTLY THIS WAS DUE
TO THE HIGH COSTS OF BOTH ram AND rom. a 32k MACHINE COST IN
EXCESS OF $3000 WITHOUT PERIPHERALS (1973 DOLLARS, GASOLINE
WAS STILL UNDER $0.20 A LITRE THEN). rom WAS VERY EXPENSIVE
AND DIFFICULT TO PROGRAM, eprom'S (eRASABLE pROGRAMMABLE
rEAD oNLY mEMORY) WEREN'T AVAILABLE.
eACH TIME YOU TURNED THE POWER ON, YOU HAD TO TEACH THE
COMPUTER HOW TO BE A COMPUTER ALL OVER AGAIN. yOU DID THAT
BY WRITING A PROGRAM CALLED THE OPERATING SYSTEM, AND
saveING ON DISK OR PAPER TAPE. yOU USED ANOTHER SMALLER
PROGRAM THAT OFTEN WAS TYPED IN BY HAND EACH TIME TO load
THE LARGER PROGRAM. tHIS METHOD OF USING A PROGRAM TO load
OTHER PROGRAMS WAS CALLED "BOOTSTRAPPING" SINCE THE
COMPUTER WAS IN A SENSE LIFTING ITSELF BY ITS OWN
BOOTSTRAPS. tHE IDEA OF "bootING" AN OPERATING SYSTEM
REMAINS WITH US, AND IS A COMMAND RECOGNIZED BY bASIC 7.0.
cp/m PROVIDED A STANDARDIZED OPERATING ENVIRONMENT ON MANY
DIFFERENT COMPUTERS. fOR EXAMPLE, THE trs-80 MACHINES USE
THE COMMAND lprint TO SEND STRINGS TO A PRINTER. cOMMODORE
USES print# FOLLOWED BY A FILE NUMBER. bUT ANY PRINTER
ROUTINE WRITTEN ON A MACHINE RUNNING UNDER cp/m WILL RUN ON
ANY OTHER cp/m MACHINE (i'M NOT SURE WHY "RUNNING UNDER" IS
USED, BUT THAT'S THE PROPER TERM).
cp/m COMES IN FOUR MAIN SECTIONS. tHE FIRST IS THE loadING
ROUTINE, WHICH IS USUALLY ON RESERVED TRACKS ON cp/m DISKS.
oN THE c128, THE loadER IS FOUND IN rom. tHE TWO WORKHORSES
OF cp/m ARE THE bdos (bASIC dISK oPERATING sYSTEM) AND THE
bios (bASIC iNPUT-oUTPUT sYSTEM). nOTE THAT THE TERM
"bASIC" AS USED HERE IS A SYNONYM FOR "PRIMARY" OR
"ESSENTIAL" AND DOES NOT REFER TO THE basic PROGRAMMING
LANGUAGE.
tHE bdos IS IDENTICAL FOR ALL cp/m SYSTEMS OF THE SAME
VERSION. bdos WORKS MUCH LIKE THE kERNAL JUMP TABLE IN
cOMMODORE MACHINES, PROVIDING ACCESS TO THE ROUTINES FOR
OPENING DISK FILES, PRINTING STRINGS, AND SUCH BY SIMPLY
CALLING THEM BY NUMBER. tHE bios IS CUSTOMIZED FOR EACH
COMPUTER MODEL. wHEN THE bdos IS ASKED TO OPEN A FILE, IT
USES SEVERAL bios ROUTINES WHICH ARE CUSTOMIZED FOR THE DISK
DRIVES, DATA BUSS STRUCTURE, ETC.
tHE LAST SECTION IS A PROGRAM CALL ccp (cONSOLE cOMMAND
pROCESSOR). tHE ccp ACCEPTS INPUT FROM THE KEYBOARD,
DISPLAYS IT ON THE SCREEN, AND PLACES IT IN MEMORY WHERE
APPROPRIATE FOR EXECUTION BY OTHER PROGRAMS. oN MOST
SYSTEMS THE ccp MUST BE REloadED AFTER OTHER PROGRAMS FINISH
EXECUTION. oN THE c128, THE ccp IS ALWAYS RESIDENT.
tHERE HAVE BEEN SEVERAL VERSIONS OF cp/m PRODUCED SINCE
1973. tHE c128 RUNS UNDER cp/m 3.0 (SOMETIMES CALLED
cp/m+). tHIS IS THE MOST ADVANCED cp/m AVAILABLE, USED
COMPUTERS WITH BANK SWITCHING CAPABILITY AND OVER 64k OF ram
CAN USE IT.
iF YOU'D LIKE TO READ MORE ABOUT cp/m, THERE ARE MANY BOOKS
AVAILABLE. sINCE IT'S A RELATIVELY OLD SYSTEM, YOUR LIBRARY
MAY BE A GOOD SOURCE OF INFORMATION. tRY TO GET MATERIAL
FOR cp/m+, SINCE SOME COMMANDS FOR OLDER cp/m VERSIONS ARE
DIFFERENT. sOME GOOD REFERENCES ARE:
the cp/m plus handbook, aLAN r. mILLER, sYBEX
cp/m and the personal computer, dWYER & cRITCHFIELD,
aDDISON-wESLEY
iF THE DATE ON THE SCREEN WHEN YOU boot cp/m IS OLDER THAN
dECEMBER 4, 1985, YOU SHOULD GET A COPY OF THE NEW OPERATING
SYSTEM. tHIS IS AVAILABLE FROM cOMPUsERVE, q-lINK, THE
input cp/m1 DISK, OR PERHAPS A USER IN YOUR AREA HAS ONE.
----sOME ADDITIONAL REFERENCES----
dr dobb's journal, ESPECIALLY EARLIER ISSUES, COVERS cp/m
EXTENSIVELY, YOU LOCAL LIBRARY MAY HAVE PAST ISSUES
AVAILABLE. fOR AN INTERESTING ARTICLE BY gARY kILDALL ON
THE START OF cp/m, SEE THE jANUARY 1980 ISSUE.
oLD COPIES OF byte, kilobaud microcomputing, AND interface
age ALSO HAVE ARTICLES ON cp/m. fOR A SERIES ON cp/m+,
CHECK THE fEBRUARY 1983 ISSUE OF microsystems.
tWO cp/m USER GROUPS HAVE DISKS AVAILABLE WITH A VARIETY OF
PROGRAMS. tHE 1571 DRIVE WILL READ kAYpRO iv FORMAT. fOR
MORE INFORMATION, CONTACT:
cpmug/lIFELINES
1651 tHIRD aVE
nEW yORK ny 10028
usa
sig/m
po bOX 97
iSELIN nj 08830
usa
tHE dWYER & cRITCHFIELD BOOK ABOVE HAS EXCELLENT REFERENCE
SECTIONS ON PROGRAMMING UNDER cp/m IN z80 AND 8080 MACHINE
CODE. fOR MORE DETAILS ON z80, TRY:
z80 assembly language programming
lANCE lEVENTHAL
oSBORNE/mCgRAW-hILL
z80 assembly language routines
lEVENTHAL AND sAVILLE
oSBORNE/mCgRAW-hILL