求翻译!谢谢哈哈 LED red of ACac power adapterr insert .(power on LED blue)/When insert ACac power adapterr; abnormal

Automatically Generating Sequences of Numeric Values in DB2 Universal
IBM® DB2® Universal DatabaseTM (UDB) for Linux,
UNIX®, and Windows® Version 8.1 and the recently announced DB2
Universal Database for z/OSTM and OS/390® Version 8
support a rich set of features for automatically generating sequences of
numeric values. These most recent releases of DB2 UDB introduce database
sequence objects, building upon the previous introduction of
identity columns. In this article, we briefly discuss typical uses of
identity columns and sequences and then present some examples
demonstrating them and comparing their features.DB2 UDB for Linux, UNIX and WindowsDB2 UDB for z/OS and OS/390DB2 UDB for iSeriesIdentity columnsV7V6V5R2Sequence objectsV7.2V8 (in beta at the time this article was written)Planned for a future releaseInternational SQL Standard: Both
identity columns and sequence objects are currently proposed
to be in the next version of the international SQL standard.
The support implemented in DB2 closely matches what has been
proposed and is in the current draft version of the
international SQL standard.Two ways to generate a
sequence of numbersA sequence of numbers can be automatically generated in DB2 in two ways: ..The IDENTITY columnWhen a column of a table is defined with the IDENTITY attribute, a numeric
value is automatically generated for that column whenever a row is
inserted into the table. The SEQUENCE objectThe second way to have DB2 automatically generate a sequence of numbers is
to create a SEQUENCE object. You can refer to a sequence object using a
sequence expression. A sequence expression can appear most
places that an expression can appear. A sequence expression can specify
whether the value to be returned is a newly generated value, or the
previously generated value. If the sequence reference is for the next value, a numeric value
is automatically generated for the sequence and returned as the result for
the sequence expression. For example, if we assume that a sequence named
orders_seq has been created, this sequence expression returns
the next value generated for the sequence: NEXT VALUE FOR orders_seqIf the sequence reference is for the previous value, the numeric
value that was generated in the previous SQL statement for the sequence is
returned as the result for the sequence expression. This sequence
expression returns the previous value that was generated by the
sequence: PREVIOUS VALUE FOR orders_seqNote that when DB2 UDB introduced sequences, the non-SQL-standard syntax of
NEXTVAL was supported in place of NEXT VALUE,
and PREVVAL was supported in place of
PREVIOUS VALUE. These variations continue to be
supported.Choosing between identities
and sequencesAlthough both identities and sequences are used for generating numeric
values, you might choose to use one instead of another depending on the
particular situation. Identity columns are useful when:Only one column in a table requires automatically generated
valuesEach row requires a separate valueAn automatic generator is desired for a primary key of a tableThe process of generating a new value is tied closely to inserting
into a table, regardless of how the insert happensSequence objects are useful when:Values generated from one sequence are to be stored in more than one
tableMore than one column per table requires automatically generated values
(multiple values may be generated for each row using the same sequence
or more than one sequence)The process of generating a new value is independent of any reference
to a tableUnlike sequence objects, identity columns are defined on a table, and so
require certain restrictions. Each table can have at most one identity
column. When you create a column as an identity column, you must use an
exact numeric data type for the column. Because the identity attribute
generates a value for the column, which is similar to what the
DEFAULT clause does, you cannot specify the
DEFAULT clause when defining an identity column. An identity
column is implicitly defined to be NOT NULL.Example 1. Combining customer
and supplier tablesTo illustrate a typical use of the identity column, consider a table that
contains customer order information for a fictional Widget company's
database. The company wants the order number to be generated automatically
for each row (order) that is inserted into the table. The DDL for our exampleAs shown in , we use an identity column
for the order numbers, and they define the order number column as part of
the primary key. Note that the IDENTITY attribute in and of
itself does not guarantee that the sequence values generated will be
unique. The PRIMARY KEY constraint, however, guarantees
uniqueness for the rows in the table. To ensure that only automatically
generated values are inserted into the identity column, they specify the
GENERATED ALWAYS clause. At the end of each quarter, the
Widget company uses the last generated order_id to determine
how many orders were taken for that quarter. The options
NO CACHE and ORDER make sure that in the event
of a system failure, no unused identity values are discarded. The Widget
company plans to restart the order number column from 1 again to start a
new quarter, using an ALTER TABLE statement. All attributes of the identity column are explicitly shown in , even thought they are set to the
values that they would default to if they were not specified. Because
default values can vary depending on the vendor implementation, specifying
all of the options is good coding practice.Listing 1. Creating an
order table with an IDENTITY
columnCREATE TABLE customer_orders_t (
INT NOT NULLGENERATED ALWAYS
AS IDENTITY
(START WITH 1
INCREMENT BY 1
MINVALUE 1
NO MAXVALUE
order_date DATE NOT NULL,
INT NOT NULL,
product_id INT NOT NULL,
INT NOT NULL,
DECIMAL(10,2) NOT NULL,
CHAR(9) NOT NULL,PRIMARY KEY (order_date, order_id))Here is an example of an INSERT statement that inserts rows
into the table.INSERT INTO customer_orders_t VALUES
(DEFAULT, CURRENT DATE,
:cid, :pid, :qty, :cost, 'PENDING')The Widget company not only manages customer orders, but also supplier
orders. The supplier orders are in a separate supplier order table that is
defined very similarly to the customer order table.CREATE TABLE supplier_orders_t (
INT NOT NULLGENERATED ALWAYS
AS IDENTITY
(START WITH 1
INCREMENT BY 1
MINVALUE 1
NO MAXVALUE
order_date DATE NOT NULL,
INT NOT NULL,
product_id INT NOT NULL,
INT NOT NULL,
DECIMAL(10,2) NOT NULL,
CHAR(9) NOT NULL,
PRIMARY KEY (order_date, order_id))Here is an example of an INSERT statement that inserts rows into the
supplier_orders_t table:INSERT INTO supplier_orders_t VALUES
(DEFAULT, CURRENT DATE,
:sid, :pid, :qty, :cost, 'PENDING')Combining the tablesThe company realizes that greater efficiency and synergy can be obtained by
combining both the customer order table and the supplier order table into
one overall order table for both customers and suppliers. The only thing
that is different between a customer order or a supplier order is whether
the order is coming in or going out, and this is reflected in the STATUS
field. To combine these tables with minimal disruption they plan to phase
in such a change over time. The steps in their plan include: being generated for
each table so that they would be unique between the tables.. (Alternatively, they could wait until the beginning
of a quarter, when the order numbers are reset.) table and use the
customer orders table for managing all orders from customers and with
suppliers..Step
1. Synchronize order
To synchronize the generated order_id numbers used in both
tables, both tables are changed so that values can be supplied by a
SEQUENCE object for the identity column instead of always
being generated. A single sequence, orders_seq, generates
values for the identity columns in both tables. The INSERT
statements for each table are changed to explicitly provide a value for
the identity columns by referencing orders_seq in a
NEXT VALUE expression. The orders_seq sequence
is defined as follows:CREATE SEQUENCE orders_seq AS INT
START WITH 1
INCREMENT BY 1
MINVALUE 1
NO MAXVALUE
ORDERBoth the customer order table and supplier order table are altered with the
SET GENERATED BY DEFAULT clause to allow insert
operations to explicitly provide a value for the identity column. (Note
that SET GENERATED BY DEFAULT and
SET GENERATED ALWAYS for the ALTER TABLE
statement is available on DB2 UDB for iSeries in V5R2, on DB2 UDB for z/OS
and OS/390 in V8, and will be available on DB2 UDB for Linux, UNIX and
Windows in a future release.)ALTER TABLE customer_orders_t
ALTER COLUMN order_id SET GENERATED BY DEFAULTALTER TABLE supplier_orders_t
ALTER COLUMN order_id SET GENERATED BY DEFAULTLOCK TABLE statements are issued to restrict inserts to the
two tables while all INSERT statements for the order tables
are modified to supply an explicit value for the order_id
column and the orders_seq sequence is started at the
appropriate value. Here is how the INSERT statements for the supplier and
customer order tables are changed:INSERT INTO customer_orders_t VALUES
(NEXT VALUE FOR orders_seq, CURRENT DATE,
:cid, :pid, :qty, :cost, 'PENDING')
INSERT INTO supplier_orders_t VALUES
(NEXT VALUE FOR orders_seq, CURRENT DATE,
:sid, :pid, :qty, :cost, 'PENDING')And now here is how orders_seq sequence is modified to start
at the value that is next after the largest value that has been generated
by the order_id identity columns of both the customer orders
and supplier orders tables. First, a SELECT statement is used
to determine this value:SELECT MAX(c.order_id), MAX(s.order_id)
FROM customer_orders_t c, supplier_orders_t sFor example, suppose the above query returned the two values: 42331 and
57231. The orders_seq sequence would then be altered as
follows:ALTER SEQUENCE orders_seq
RESTART WITH 57232A COMMIT statement releases the locks on the tables, and the
two order tables are available again for inserts. Instead of each
order_id column having values generated independently of each
other by the identity attribute, the values inserted are generated from a
single sequence, orders_seq, and thus the values will be
unique across the two tables.See
for an illustration of .Figure 1. order_id sequence values
override identity columns Step
2. Wait until orders are synchronized The Widget company
does not want to wait for the beginning of the quarter when the order IDs
instead, they decide to monitor the status of the orders. When
the result of the following query is an empty table, they can move to :SELECT order_id
FROM (SELECT order_id FROM customer_orders_t
WHERE status && 'COMPLETED' AND order_id & 57232) AS x
UNION ALL (SELECT order_id FROM supplier_orders_t
WHERE status && 'COMPLETED' AND order_id & 57232)See
for an illustration of .Figure 2. All potential duplicate
order_id numbers are completed Step
3. Phase out supplier orders To phase out the
supplier_orders_t table, the table is briefly made
unavailable by renaming it as follows:RENAME TABLE supplier_orders_t TO supplier_orders_t_oldThen a view is created to allow existing references to
supplier_orders_t to continue to access the underlying
data:CREATE VIEW supplier_orders_t
(order_id, order_date, supp_id, product_id, quantity,
price, status)
order_id, order_date, cust_id, product_id, quantity,
price, status
FROM customer_orders_tNow all active orders for both traditional customers and suppliers are
managed in the customer_orders_t table. To make things easier
and more straightforward for future maintenance on these tables, a bit of
cleanup work is also done in .See
for an illustration of .Figure 3. All new orders go in
customer_orders_t Step
4. Clean up Because order numbers must now only be
generated for a single column (order_id), the values can be
generated by the identity column rather than using a separate sequence
object. Again, the table is briefly made unavailable and the identity
value is reset to the next value that would be generated by the
sequence.LOCK TABLE customer_orders_t IN EXCLUSIVE MODEVALUES NEXT VALUE FOR orders_seq INTO :nextorderAssume, for example, the above query returned the value: 64243. The
customer_orders_t table can then be altered as follows:ALTER TABLE customer_orders_t
ALTER COLUMN order_id
SET GENERATED ALWAYS
RESTART WITH 64243Again, each instance where an INSERT statement uses the
orders_seq sequence needs to be changed, to go back to using
DEFAULT, as was shown previously in .
Now the sequence can be dropped:DROP SEQUENCE orders_seq RESTRICTAfter the data in the old supplier orders table is archived, this table can
then be dropped, too.See
for an illustration of .Figure 4. Use the identity column again
to generate values, starting with 64243 Tuning performance Now that the
customer_orders_t table is being used for almost twice as
much activity, the Widget company decides to place this table in a
parallel environment. In order to take advantage of the parallel inserts
that can now be done, they decide to tune the performance of the identity
column for this table by caching values. They determine that a cache size
of 50 would be appropriate for the number of orders that get created per
hour and for how often the database system is restarted for any reason.
They also changed how they calculate how many orders are actually created
in a quarter and so that there is no reason to force the sequence values
to be generated in order. The main requirement for unique values to be
generated during the period of one quarter continues to be met and so the
following adjustment is made to enhance the performance of the sequence
generation for the identity column:ALTER TABLE customer_orders_t
ALTER COLUMN order_id
SET CACHE 50
SET NO ORDERExample 2. Collecting
satellite readingsSequences allow unique values to be generated across more than one table,
as we showed in . Sequences also allow
more than one column in a table to have its values automatically
generated.For this example, consider an orbiting satellite around a planet or moon.
This particular satellite, SAT1, is designed to take data readings at 16
different points along its orbit. The table that collects this data will
have three columns where the values are automatically generated: one
column will use the identity attribute to generate a reading ID, and two
others will obtain their values from sequences. See
for an illustration.Figure 5. A satellite and the 16 data
reading points along its orbitThe DDL for our example Because the number of
readings is likely to be quite large, the identity column uses the
DECIMAL(31) data type.CREATE TABLE SAT1_readings (
reading_id DECIMAL(31) NOT NULL PRIMARY KEYGENERATED ALWAYS AS IDENTITY
(START WITH 1
INCREMENT BY 1
MINVALUE 1
NO MAXVALUE
orbit_location SMALLINT NOT NULL,
horizon_adjustment SMALLINT NOT NULL,
planet_image BLOB(100 M))The orbit_location has a value from between 0 and 15 for the
16 points along the orbit that readings are taken. The following sequence
is created to generate a cycling sequence of these 16 values:CREATE SEQUENCE orbit_location_seq
AS SMALLINT
START WITH 0
INCREMENT BY 1
MINVALUE 0
MAXVALUE 15
ORDERThe horizon_adjustment value indicates where the satellite is
in relation to the plane of horizon. A value of 0 means that it is on the
plane of horizon, a value of +4 means it is at its maximum point above the
plane of horizon and a value of -4 means it is at its maximum value below
the plane of horizon. The sequence starts at the value -4, which is
neither the minimum value nor the maximum value, because it will be used
in an equation in order to calculate the horizon adjustment value. The
sequence cycles for each orbit. The following sequence will be used in the
calculation of the horizon_adjustment value:CREATE SEQUENCE horizon_adjustment_seq
AS SMALLINTSTART WITH -4
INCREMENT BY 1
MINVALUE -7
MAXVALUE 8
ORDERPopulating the readings tableThe following INSERT statement populates the table each time a
reading is made:INSERT INTO SAT1_readings VALUES
(DEFAULT, NEXT VALUE FOR orbit_location_seq,
ABS(NEXT VALUE FOR horizon_adjustment_seq) - 4,
:planet_image)After the first 17 readings, and the corresponding INSERT
statements, the values that are automatically generated for the columns
reading_id (r_i), orbit_location (o_l) and horizon_adjustment (h_a)
are:r_i1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.o_l01234567891011121314150h_a0-1-2-3-4-3-2-1012343210Capturing additional readings Because the instruments
are sensitive enough, readings on the planet can be made before the
satellite actually achieves orbit. The range of the instruments allow 10
readings to be made as the satellite approaches the planet, before it
settles into its orbit. To capture these additional readings, which are
outside of the regular cycle of the orbit, the sequence values are started
outside of the range of the MINVALUE and
MAXVALUE values that define limits of the cycle. The following statements alter the identity value and the sequence values
to allow the extra 10 readings to be captured before readings are taken at
the 16 points along the orbit. The RESTART option either restarts the
identity column or sequence at the specified value, or when no value is
specified, restarts at the value specified as the START WITH
value when the identity column or sequence was created.ALTER TABLE SAT1_readings
ALTER COLUMN reading_id
RESTARTALTER SEQUENCE orbit_location_seq
RESTART WITH -10
ALTER SEQUENCE horizon_adjustment_seq
RESTART WITH -14The following table shows what the first 17 readings would be if the above
three ALTER statements were performed before the
corresponding INSERT statements. The 17 readings include the
10 readings made prior to orbit and the first seven readings made during
the orbit:r_i1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.o_l-10-9-8-7-6-5-4-3-2-10123456h_a109876543210-1-2-3-4-3-2ConclusionDB2 supports two flexible ways to automatically generate numeric values:
identity columns, which are tied closely to a table, and sequence objects,
which generate values independent of any table reference. The examples
above illustrate how powerful and flexible both identity columns and
sequence objects are for automatically generating numeric values.
Specifically, the examples demonstrate the following features of identity
columns and sequences:Using an identity column in a primary keyUsing a sequence object with two tablesExplicitly specifying a value for an identity column instead of having
a value generatedStarting a sequence of values at a predetermined valueRestarting an identity column value at a specified valueCaching identity values to improve performanceDefining a sequence or identity column to allow the values to
cycleSpecifying a starting value for a sequence that is greater than the
minimum value defined for the sequenceSpecifying a starting value for a sequence that is a negative
valueDefining a sequence to generate values that increase and then
decreaseEnsuring that values are returned in the order they are generatedWe hope you find sequences and identities useful for your applications.
to add and subscribe to comments.
Subscribe me to comment notifications
static.content.url=/developerworks/js/artrating/SITE_ID=1Zone=Information ManagementArticleID=14271ArticleTitle=Automatically Generating Sequences of Numeric Values in DB2 Universal Databasepublish-date=
Newsletters
dW Premiumcomp.os.cpm Frequently Asked Questions (FAQ)
CP/M Frequently Asked Questions
Table Of Contents
There exists a privately maintained web site with many DRI
and manuals. (Caldera/Lineo is aware of this site and has given
permission to present the material.) Available for download are:
CP/M 2.2 (binary, source, manuals)
CP/M 3.0 (binary, source, manuals)
CP/M-68K (binary for v1.2, and v1.3, no manuals
The software is licensed free to non-profit users. This includes
individual users. Commercial licenses are available, but without
form of support.
The address of the site is:
On the other hand, there have been lots of greatly improved
including ZCPR3 for the command processor and several replacements
for the BDOS.
Some of these are commercial (e.g., ZSDOS/ZDDOS),
many have been released to the public.
Most of the latter can be
obtained from oak.oakland.edu and many BBSs.
There is also a CP/M-Plus replacement named ZPM3, written by
Cran. It offers much more performance and some additional features
compared to CP/M-Plus. An extended CCP, the ZCCP, is also
available.
Unfortunately, it still seems to have some bugs.
ZPM3 and ZCCP
free! However no sources as Simeon won't give them away.
New legal copies of CP/M-86 were still available, for $75, from:
DISCUS Distribution Services, Inc.
17607 Vierra Canyon road
Salinas, CA
(408) 663-6966
And CP/M-68K is available from:
James Knox
1825 East 38 1/2
Austin, TX
(512)472-0744
(800)531-5170
(512)473-2122 (FAX)
<- Work
He will send you instructions and passwords necessary to perform
an ftp upload.
Ftp.update.uu.se specializes on CP/M programs for the DEC Rainbow,
but has also some generic CP/M software such as a Micro Emacs, the
HI-TECH Z80 C compiler and a few games.
Questions about this site
can be directed to Tom Karlsson, <>, the site
administrator.
There is a European file server group, named TRICKLE.
This group
mirrors oak.oakland and other archives.
For more information, get
in touch with your local TRICKLE operator.
Hi-Tech C V3.09 for CP/M is now freeware.
The authors are still
maintaining their copyright, but are allowing free use for both
private and commercial users without royalty.
The original is on
their bbs in Australia, at +61 7 .
Copies can be
Hi-Tech also offers a Z80 cross compiler for DOS or Unix supports
compilation of CP/M programs. The cross compiler is commercial
software, but a working demo is available from their ftp and web
The Computer Journal still offers BDS C, in both the original,
straight CP/M version and in a version that includes Z-System
The package, with both versions of the compiler and a
large manual, is only $25.
Micro Emacs is available from:
Public domain CP/M programs are available via:
Elliam Associates
Atascadero, CA 93423
(805)466-8440
In the past, Elliam has sold Turbo Pascal, Uniform, Nevada COBOL,
SuperCalc, and much more.
Call for availability and price.
WordStar 4.0 is available from:
Trio Company of Cheektowaga Limited
3290 Genesee Street
P. O. Box 594
Cheektowaga, NY
716-892-9630
Dynacomp stills sell CP/M software (or to be accurate, they still
had several dozen CP/M programs in the 1992 catalog.) It is the
kind of programs which ought to be written in BASIC: Typing
little engineering programs like calculation of the stiffness of
beams, education math programs. Their address is:
178 Phillips Road
Webster, NY 14580
(800)828-6772 orders
(716)265-4040 support
There is no known U.S. source to purchase the following programs:
muMath/muSimp
Any Microsoft product (M80, L80, F80, Pascal, BASIC)
Most have been &abandoned& by their makers, but not placed in the
public domain. There is now a site specializing in making
commercial abandoned software. You may find a copy of what you
at The Commercial CP/M Archive:
For our European readers, much is available in Germany.
WordStar 3.0, Multiplan 1.06, SuperCalc PCW, and Microsoft Basic
(Interpreter and Compiler), M80, L80, CREF80 , and LIB80 can be
ordered in either PCW format or C128 (also native 1571) format
Wiedmann Unternehmensberatung & EDV-Handel
Hauptstrasse 45
73553 Alfdorf
Tel: +49- (Inside Germany use 0-7172...)
They are marketed as &for the C128&, however the disks are in KAYPRO
IV format, and since the C128 uses the same screen codes as ADM-31
or KAYPRO, it's probably interesting for people with other CP/M
machines as well.
Everything is said to come with a German
manual and each one is offered for app. EUR 76.50 , including sales tax
of 16%, which you could probably somehow get a refund on if living
outside the EC.
Z3PLUS (for CP/M 3.0) and NZCOM
(for CP/M 2.2) Z-Systems and manuals can be downloaded from
Additional tools, the complete Z3COMs and ZHELPs
and Juggler 3.5 with Amstrad CPC
Vortex and PCW CF2DD Support (3.5& only) (used to be EUR 25.--,
now free!) can be downloaded from:
or ordered on CD via
Helmut Jungkunz
Wirtstr. 10
81539 Muenchen, Germany
Tel.: +49.89.
and C128 CP/M Plus (app. EUR 40.-) from:
Schaltungsdienst Lange Berlin
Tel.: 030/7036060
VDE is a very popular free editor that uses WordStar key bindings.
It can be obtained from
for a plain vanilla CP/M system or
for those running a Z-system.
ZDE (version 1.3 and above), the successor to VDE, written for Z80 CPUs, should be
preferred in that case. It can be downloaded from most online CP/M resources.
tel. 907-443-7199 or 907-443-2437
fax. 907-443-2487
And the P112 from D-X Designs Pty Ltd is a single board CP/M
compatible computer with the footprint of a 3.5& floppy disk drive.
It provides a Z80182 (Z-80 upgrade) CPU with up to 1 MB of memory,
serial parallel and diskette IO, and realtime clock in a 3.5-inch
drive form factor.
Powered solely from 5V, it draws 150mA
not including disk drives) with a 16MHz CPU clock.
Details can be found at:
It contains over 19,000 files with executable programs, source code,
documentation, and other materials.
Included are the the entire
Simtel20 pub/cpm archives, the contents of some major bulletin
boards, and the personal collections of several leaders in the CP/M
community.
You'll find:
Assemblers, compilers, code libraries, and programming tools
Editors, word processors, spreadsheets, calculators
Disk, printer, modem and other system utilities
Archive and compression tools
Telecommunication software for users and BBS operators
Articles from user's group journals and other publications
Games and educational software
Help files
You'll also find CP/M emulators and other tools for working with
CP/M files under DOS, OS/2, and Unix.
Most programs include not
only documentation but also complete source code.
Programs for all
different computers are on the disc: Kaypro, Osborne, Commodore,
Amstrad, Starlet, and others.
This disc comes with a MSDOS view
program which allows you to view, decompress, or copy files to your
It's fully BBS'd with description files compatible with
popular MSDOS BBS programs.
A spokesman for Walnut Creek said that it is just not feasible for
them to have another run made.
When asked specifically about having
a few made privately, the spokesman said the entire disk is public
domain and freeware, and that Walnut Creek doesn't need to give
permission to have anyone copy it.
They're not looking for a
royalty or even acknowledgment.
formats&.)
One solution is Sydex' excellent shareware program 22DISK which
permits reading, writing, and formatting many CP/M format disks on
Version 1.44 is available at:
22DISK is shareware and should be registered.
It supports 8-inch
drives on PC's, provided either a adaptor is wired to the PC's
floppy controller or that a CompatiCard is installed. Sydex or
Johnson can provide assistance with using standard PC controllers.
Sydex can be reached at:
P.O. Box 5700
Eugene, OR
MicroSoulutions used to make a program called Uniform and You
be able to locate a copy at a swap meet or from a distributor.
are versions for both the IBM-pc's and a lot of different cp/m
Some flavors of PC have a problem with both UniForm and 22disk and
UniForm will not operate properly under DRDOS v6.0.
UniForm also
fails if the machine clock exceeds ~20MHz.
This has been
with MicroSolutions, and no fix is available.
Another solution is the MSODBALL suite of programs by John Elliot.
They work by using a format (the msodball format) that is
convertible via the main program to become useable on either CP/M
(3.x ?) or MSDOS.
has been written in such a way that
the latest version will run directly under either CP/M or MSDOS.
They can be found at:
You need not use the DOS machine - there are also at least three
transfer programs running under CP/M: TRANSFER (for CP/M-2.2), of
which a quick-hack CP/M-3 ad DOSDISK, and
for CP/M-Plus written by Tilmann Reh, latest version 2.1 of Oct
TRANSFER and MSDOS are freely available, DOSDISK is commercial.
MSDOS has two related utilities:
MSFORM will create the DOS Boot
Record, FAT and directory structure on a freshly formatted disk,
MSDIR will give you a quick look at the main directory of a DOS
DosDisk is a standard CP/M product.
As supplied, it runs only on
the following specific hardware:
all Kaypros equipped with a TurboROM
all Kaypros equipped with a KayPLUS ROM and QP/M or CP/M
Xerox 820-I equipped with a Puls-2 ROM and QP/M
Ampro Little Board
SB180 and SB180FX equipped with XBIOS
Morrow MD3 and MD11
Commodore C128 with CP/M-3 and 1571 drive
DosDisk also runs on any of the configurations with B/P Bios
(non-banked ZSDOS only), to include the Ampro Little Board,
SB180FX, YASBEC and P112.
There is also a kit version for which the user can write his own
driver, provided the BIOS implements a table-driven disk
interface.
Contact Jay Sage for details.
DosDisk and MSDOS both handle DOS
subdirectories.
You can also use a null modem or other serial link and terminal
emulation programs running on each machine. For example, the CP/M
machine could run KERMIT, IMP, or MEX and another program that
supports the same file transfer protocol on the second machine,
as Procomm or Hyperterminal on a PC.
The usual problem is getting
the terminal program onto the CP/M machine - having someone send
a disk is the easiest way, but you can also use a crude assembler
basic program to transfer the real program, or use pip to send
across a hex version (pip can only transfer ascii files.)
Remember, these conversion programs only move the data, as is, in
its current binary form, from one disk format to another.
not reinterpret the data so that a different program can use the
information.
However, there are some tools under DOS that will
convert word processing file data among different word processors,
such as WordStar, Word Perfect, and Microsoft Word.
If the CP/M
computer that made the original disk is still running, you might
want to try to generate a pure text (ASCII) version of your
information (e.g., by &printing to disk&) before moving it over to a
If the computer is not working but you still have the
program, you might try copying it over to a DOS disk and running
under a CP/M emulator on the DOS machine to produce a text file.
The creator/owner of Jugg'ler, Herne Data Systems, is still in
business, but no longer sells it. Rather, Jugg'ler's creator, Mike
Garamszeghy, has graciously placed it in the public domain. Copies
can be obtained from his C128-CP/M web page at:
His disk format data base and other CP/M related items are also
available there.
Montezuma Micro CP/M has a &config& utility that allows logical
device reassignments, setting up of comm hardware parameters, etc.
Option [f] &disk drive definitions& allows the user to set the
logical format of any disk drive connected to the system.
about 100 different floppy formats provided, from A to Z.
Micro often shipped software in Kaypro format, for example.
this redefinition utility, it is easy to read &alien& disks, format
them, duplicate them to another's format via 'pip' to another
The CPU280 CP/M-3 implementation offers the AutoFormat feature
allows to format, read and write almost every disk format.
One might also try:
GLOBAL Computer Supplies
2318 East Del Amo Blvd.
Compton, CA 90220
ZSIM is an (extremely accurate) Z80 emulator ( MHz Z80)
in conjunction with a CP/M 80 BIOS, i.e. it simulates a Z80
that can run CP/M.
Together with the original CP/M operating
you have a full Z80-CP/M machine.
If you don't have a CP/M system disk at hand, you can use the
included public domain CP/M compatible operating system P2DOS.
ZSIM uses CP/M format disks, a ram disk and a hard disk.
disk formats are CP/M 86 single sided and double sided, but you
install any singled sided CP/M format PC drives can physically
So you can use ZSIM to transfer data to MS-Dos.
can be saved to the PC hard disk.
The hard disk is in an MS-Dos
A sample hard disk containing the SMALL-C compiler is
As ZSIM uses an original operating system and CP/M disks it should
run every CP/M program that does not use special hardware.
free for personal use.
Sources of the CP/M BIOS are included.
On .au (formerly: raven.alaska.edu) you'll find:
(Also available as z80pack.tgz at ftp.cs.uni-sb.de in the
/pub/others.)
This is a Z80 CPU emulation completely written in C, an I/O
emulation for a typical CP/M system also is included. The package
also comes with the BIOS source for the I/O emulation and a Z80
cross-assembler.
It was developed it under COHERENT but it's
that it does work under Linux and SunOS too. You still need a CP/M
license to get CP/M running or you might try to get one of the
available CP/M clones running on it. On a 486/66 DX2 running
COHERENT it's like a 11Mhz Z80 CPU, so the emulation speed is
acceptable.
On mtalab.unc.edu you'll find:
This package, written by Michael Bischoff, is well integrated into
the host operating system.
It provides options to use either a
container file for the CP/M disk for full BIOS compatibility, or
access the Linux file system through the included BDOS emulator.
The Z80 emulator is written in 86 assembler and the rest is in C.
pre-assembled ZDOS CCP is included with the package.
speed on a 486/66 is approximately a 22 Mhz Z80, and on a
Pentium/90
it is 50 Mhz.
Full source is included.
On oak.oakland.edu you'll find:
MYZ80 is a Z80/64180 emulator package.
The new 8 & 80286
machines with the fast hard drives and the snazzy OS/2 operating
systems are such a delight... but for many, the Z80 machines still
have to be fired up from to time in order to develop code for CP/M
and the Z80 chip. Well, not any more, thanks to MYZ80.
Other emulators on the market are less than satisfactory
solutions.
Of the small number which can actually run without causing system
errors under the later versions of DOS, apparently none is capable
of running real CP/M. Instead they use an emulated version of CP/M
which is only as accurate as the developers have bothered to make
MYZ80 can run CP/M 3.0 and ZCPR (which is such a useful Z80
developer's environment).
So if you suffer from less than perfect
Z80 emulation and slow overall performance, give MYZ80 a try, and
save the 'real' Z80
machines for those cold winter mornings when
you really need the heat.
The author of MYZ80, Simon Cran, can be
reached at:
Simeon Cran P/L
PO Box 5706
West End, Queensland, AUstralia 4101
(One byte is wrong in the MyZ80 CPM 2.2 bios distributed with the
registered version 1.20. Subsequent releases will be fixed, but
everyone who has that version will have trouble accessing the ram
disk unless the C: drive is accessed first.
To fix the problem
change the byte at offset 16CE in MYZ80.SYS. It will be 03 but
should be 04.)
22NICE is (like 22DISK) from Sydex. It emulates the application
program while translating all BDOS and BIOS calls into the
appropriate DOS calls.
This way, it's comparably fast and allows
for free use of the DOS file system (including paths). You are
to map drive/user combinations to particular paths in the DOS file
system. The emulator can be configured for different emulation
(8080, Z80, and automatic detection) and different terminal
emulations. There are two run-time options: First, you can create
small COM file which will then load both the emulator and the CP/M
program (contained in a .CPM file to avoid confusions); Second,
can build the emulator and the application together to a single
file (which is larger then but needs no run-time module).
obtain a demonstration copy from:
Yaze is another Z80 and CP/M emulator designed to run on Unix
It is available via ftp and www at:
The package consists of an instruction set simulator, a CP/M-2.2
bios written in C which runs on the Unix host, a monitor which
CP/M into the simulated processor's ram and makes Unix directories
or files look like CP/M disks, and a separate program (cdm) which
creates and manipulates CP/M disk images for use with yaze.
Yaze emulates all documented and most undocumented Z80
instructions
and flag bits.
A test program is included in the package which
compares machine states before and after execution of every
instruction against results from a real Z80.
Yaze is independent
the host machine architecture and instruction set, written in ANSI
standard C, and is provided with full source code under the GNU
General Public License.
It supports CP/M disk geometries as
in Unix files or as read-only disks constructed on-the-fly.
disks are indistinguishable from real disks for even the most
inquisitive, low-level CP/M programs and can be mounted and
unmounted at will during emulation.
Please also check the CP/M 3 YAZE homepage at
There is a CP/M 2.2 Simulator that simulates an 8080 CPU and CP/M
2.2 environment.
The heart of the simulator is written in 680x0
assembly language for speed.
It has been tested under DNIX (a
compatible with many SVR3, BSD, Xenix, and Sun extensions), on a
68030 NeXT, and on a 68030 Amiga running SVR4.
One 'benchmark'
shows that on machines of the
class the simulator
performs about as well as a 7 MHz Z-80 would.
Other tests
that this is somewhat optimistic.
The simulator was posted to
alt.sources and can be found at:
in files 9954 to 9959.
.LBR, .yQx, .xYx, .xZx:
(If the above mirror sites are unavailable, please check
for download.)
CFX is the acronym for Cp/m File eXchange by Carson Wilson. As its
name suggests, CFX is a tool intended to allow quick access to
While CFX will operate on standard ASCII files, its main
strength is its ability to access files stored with the special
archiving and compression methods native to the CP/M operating
Specifically, CFX can handle files compressed with Roger
Warren's LZH utilities (.xYx), Steve Greenberg's CRUNCH utilities
(.xZx), &squeezed& files (.xQx), and archives built using Gary
Novosielski's Library definition (.LBR).
A directory of suppliers for Amstrad CPC and PCW machines
An &email helpline& of contacts who are willing to give advice
A listing of other Amstrad user groups and magazines
Forthcoming events in the Amstrad world
The WACCI PD Library listings & both Amstrad and CP/M
There is also information on WACCI itself, the UK's biggest Amstrad
CPC user club, including details of subscription rates.
Amstrad support is also available from Bill Roch. He offers
software, hardware and does repairs on the PCW's -
9512. He may provide the most support for the wonderful Amstrad in
4067 Arizona Avenue
Atascadero, CA
(805) 466-8440 - phone
(805) 461-1666 - fax
The descendant of Locomotive Software, a developer of software on
the PCW (and CPCs) for Amstrad, are now with LocoScript Software.
Their web page is mainly concerned with proprietary word
processing
software, but has some CP/M related stuff and has links to other
useful PCW CP/M related sites. Try:
Howard Fisher
LocoScript Software
10 Vincent Works
Dorking, Surrey H4 3HJ, UK
and one in Perth, Australia.
+61 9 450 0200

我要回帖

更多关于 ac power adapter 的文章

 

随机推荐