137 lines
4.6 KiB
Plaintext
137 lines
4.6 KiB
Plaintext
|
Copyright (c) 1985-1997 Jim Lopushinsky
|
||
|
|
||
|
email: jimlop@ix.netcom.com
|
||
|
|
||
|
This is my original documentation:
|
||
|
|
||
|
Dec 10, 1985
|
||
|
Jim Lopushinsky
|
||
|
|
||
|
CPM.EXE allows execution of CP/M-86 .CMD files under MS-DOS and PC-DOS.
|
||
|
|
||
|
A>CPM <cpm-86 file name> <paramaters>
|
||
|
|
||
|
To run CP/M-80 .COM files, run the Z80 emulator under the CPM emulator:
|
||
|
|
||
|
A>CPM Z80 <cpm-80 file name> <paramaters>
|
||
|
|
||
|
Don't try running any funny CP/M stuff that calls the BIOS disk I/O
|
||
|
functions directly. It won't work. Other than that, virtually any
|
||
|
CP/M-86 .CMD program will be successfully executed. Note that programs
|
||
|
which make use of MP/M or Concurrent extended functions will not work.
|
||
|
|
||
|
All functions except one are totally machine independent, and should
|
||
|
run on any hardware configuration of MS-DOS version 3.0 or greater.
|
||
|
The only exception: There is no DOS function call for printer status,
|
||
|
and the CP/M printer status request is translated to INT 17H. This
|
||
|
should work fine on any PC or PC Clone.
|
||
|
|
||
|
|
||
|
Nov 30/97:
|
||
|
|
||
|
ANSI.SYS is required if you plan to run .CMD files that use IBM CP/M-86
|
||
|
version 1.1 or newer (or CCPM, CDOS etc) escape sequences. The following
|
||
|
CP/M escape sequences are converted to ANSI escape sequences:
|
||
|
|
||
|
ESC A cursor up
|
||
|
ESC B cursor down
|
||
|
ESC C cursor forward
|
||
|
ESC D cursor back
|
||
|
ESC E clear screen and cursor home
|
||
|
ESC H cursor home
|
||
|
ESC K clear to end of line from cursor position
|
||
|
ESC Y set cursor position
|
||
|
ESC : program function key
|
||
|
ESC a set video mode
|
||
|
ESC b set forground color
|
||
|
ESC c set background color
|
||
|
ESC j save cursor position
|
||
|
ESC k restore cursor position
|
||
|
ESC m cursor on
|
||
|
ESC n cursor off
|
||
|
ESC p reverse video on
|
||
|
ESC q reverse video off
|
||
|
ESC r intensity on
|
||
|
ESC s blink on
|
||
|
ESC t blink off
|
||
|
ESC u intensity off
|
||
|
|
||
|
|
||
|
WordStar key translations are preformed based on an IBM compatible keyboard
|
||
|
as follows:
|
||
|
|
||
|
ALT-X ^KX Save and exit
|
||
|
Up Arrow ^E Cursor up
|
||
|
Down Arrow ^X Cursor down
|
||
|
Left Arrow ^S Cursor left
|
||
|
Right Arrow ^D Cursor right
|
||
|
Page Up ^R Scroll screen up
|
||
|
Page Down ^C Scroll screen down
|
||
|
Insert ^V Toggle insert mode
|
||
|
Delete ^G Delete character at cursor
|
||
|
Home ^QS Beginning of line
|
||
|
End ^QD End of line
|
||
|
Ctrl-Page Down ^QC End of document
|
||
|
Ctrl-Page Up ^QR Beginning of document
|
||
|
|
||
|
------------------------------
|
||
|
|
||
|
Configuration options:
|
||
|
|
||
|
You will need a hex editor to change configuration. Search for the
|
||
|
string "USER OPTIONS" in CPM.EXE. Currently, the following options
|
||
|
can be changed:
|
||
|
|
||
|
BDOS call frequencies.
|
||
|
|
||
|
Offset 655 hex. 0 = no frequencies, 1 = tabulate CP/M BDOS call
|
||
|
frequencies. Default = off. If this option is set, after any CP/M-86
|
||
|
CMD file terminates, run CPMFREQ.EXE and examine CPMFREQ.TXT.
|
||
|
CPMFREQ.EXE requires CPM.TXT and CPMFREQ.DAT. CPMFREQ.DAT is produced
|
||
|
by the CP/M emulator.
|
||
|
|
||
|
WordStar key translation.
|
||
|
|
||
|
Offset 685 hex. 0 = no translation, 1 = translate to WS key sequences.
|
||
|
Default = on.
|
||
|
|
||
|
IBM-PC CP/M-86 screen escape sequences.
|
||
|
|
||
|
Offset 6B5 hex. 0 = no translation, 1 = translate CP/M-86 screen codes
|
||
|
to ANSI. Default = on. ANSI.SYS required if enabled.
|
||
|
|
||
|
BDOS version.
|
||
|
|
||
|
Offset 6E5 hex. This is a BCD value for the BDOS version that CP/M
|
||
|
function 12 returns. Default value = 31 hex. Change to 22 hex for
|
||
|
CP/M-86.
|
||
|
|
||
|
CP/M compatibility.
|
||
|
|
||
|
Offset 715 hex. 0 = CP/M compatible, 1 = CCP/M, CDOS compatible.
|
||
|
Default = 0 (CP/M compatible). This changes how BDOS functions 31
|
||
|
(get_DBP) and 53 (mc_max) operate:
|
||
|
|
||
|
CP/M compatible: Function 31 (get DBP) returns SPT (sectors per
|
||
|
track) as the number of logical 128 byte sectors.
|
||
|
Function 53 (get max memory) does not allocate
|
||
|
the memory.
|
||
|
|
||
|
CCP/M compatible: Function 31 (get DBP) returns SPT as the number
|
||
|
of physical sectors.
|
||
|
Function 53 (get max memory) allocates the memory.
|
||
|
|
||
|
-------------------------------
|
||
|
|
||
|
Revision history:
|
||
|
|
||
|
12/10/85 Initial version
|
||
|
|
||
|
10/06/96 1.1 Added option to record frequency of CP/M BDOS calls.
|
||
|
|
||
|
11/03/97 1.2 Implemented segment relocation fixups. Now DRC.CMD works.
|
||
|
|
||
|
11/30/97 1.3 Implemented Wordstar key translation for IBM keyboard.
|
||
|
Implemented CP/M-86 for IBM-PC screen escape sequences.
|
||
|
Translates to ANSI. ANSI.SYS required.
|