Voyager #03
19 октября 1998
  Софт  
  Profi  

PROFI CLUB - Studying CP / M (compatibility, processors, terminals).

<b>PROFI CLUB</b> - Studying CP / M (compatibility, processors, terminals).
(C) Chertkov VY
Music: BURATINO remixed by KENOTRON



              STUDIES CP / M

                 Part 1



     This article is written as supporters Profi
and CP / M, and a fierce opponent in any case -
not crooked, just read, and who knows, maybe
and find something interesting for yourself. If you
something already know this or just heard -
not a problem - again read not hurt (worse on the
that no one will be, although you never know ...). I also want 
to noted that most of the above information gathered from 
various sources (magazines, books, docks, Some sources, docks 
with the PC, etc.) throughout my acquaintance with the pros. 
All of this collected literally bit by bit, because no 
information no ....




                 *



  1. Introduction


    The first general-purpose microprocessor from Intel 4004 
appeared in 1971. He could run any program written in a system 
of their teams, could enter data, process them and display the 
results. The word length of the microprocessor was only 4 bits 
(notebooks). The microprocessor contains about 1000 
transistors, performed 8,000 operations per second and has been 
focused on the use of calculators. 

     A year later, Intel introduced a microprocessor firm 8008 
- 4004 analog with word length 8 bits and a faster. But the 
truly epoch-making was Issue microprocessor 8080 - we can say 
with it all began. This MP was introduced to the market in 
early 1974 and immediately attracted attention because was 
powerful enough to build a small computer. Later, Intel 
introduced a set of chips from which you can create a variety 
of microprocessor-based systems. Some of these LSIs are used 
now. 

     A little later on sale there, as designers to build their 
own hands, and turnkey computers based on IP i8080. No 
operating system for them, of course, did not exist, to control 
the computer using special program, named for the functions 
they perform monitors. Monitor lets you view and edit the 
contents of memory cells, memory is filled with constant, run 
programs, etc. Also, monitors allows you to unload blocks of 
memory to external media (tape, cassette tape) and upload them, 
if necessary, back into RAM. The program monitors generally 
sewn up in ROM and takes control immediately after powering on 
the computer that was convenient for the user. 

     Monitors also includes a set of frequently
used procedures, such as input bytes from the keyboard, output 
characters to the terminal or printer (TTY), and others. This 
is explained by the fact that any more or less difficult 
program uses these functions. Because they are similar to the 
corresponding fragments other programs, not to repeat one and 
the same procedure in each program, they were placed in

monitor. The advantage lies in the fact that now
to create a program spends less time and
save space in RAM. Procedures were located
specific addresses were available to any program. This, in 
essence, was the embryo of the operating system. 

     Appears in the mid-70's on the market of personal computer 
with external memory on magnetic disks affected the evolution 
of operating systems. Having quick access to anywhere in the 
disk and having an elusive for the tape data rate, the drive 
allowed to apply a new orderly way to store data on external

carriers. There is a need to create an operating system, 
effectively managing the data on external media (to manage 
files on disk). When working on a PC user has to frequently

run a variety of programs, which, in addition
the same should exchange data among themselves. In addition, it 
is necessary to solve more specific terms tasks: partitioning 
disks, copy and delete files, print them on your printer or 
plotter, the organization of local networks, and more. The 
optimal solution was that all of the above "assumed the" 
operating system - complex program (or rather, a set of 
programs), which manages computer resources. 

     Because the main task of the OS - to manage
computer, it makes it the best way, but the software included 
in the OS - the most perfect. If it were not so, then what is a 
meaning in the OS? 



     In 1975, Harry has created an operating Kildel
system CP / M computers, built on the basis
I8080 IP and supports the drive.
System manufactured by Digital Research. Name of the system 
means the Control Program for Microcomputers (control program 
for microcomputers). The operating system is a program

who ran the machine resources, such as
external memory (file structures), keyboard,
terminal, printers, serial link, etc.
To operate the system required about 5K of RAM, all
the rest provide a program. Form of communication with the 
system operator was a dialogue, ie operator introduced the team 
- as a string in which the first word has its own team, and 
everything else - parameters of this command. The results are 
displayed on the terminal (previously teletype or printer), and 
the system in turn, could have requested any options

operator. A year later, was released the second version
and a little later than V2.2, which became a de facto standard
on the OS for an 8-bit computer. We have circulated under the
different names variants of this particular system. Version 3.0 
supports real-time, worked with the sectors of large size (1024 
bytes) and has been focused on the processor 64180. System 
require at least 128K of RAM. The fourth version multitasking - 
the so-called system MP / M. Information about this system is 
extremely small, and to find any description (not that 
technical guidance, even just a user manual) is not possible. 

     For ease of installation on the computer of an arbitrary 
configuration operating system was divided into two parts - the 
actual disk operating system (BDOS - Basic Disk Operating 
System) and input / output system (BIOS - Basic Input / Output

System). BDOS module represents the core of the operating 
system, implementing a "logical" level I / O: Support for logic 
devices, accounting and the distribution of disk space, console

I / O, support files. You could even say
that file support is a major task BDOS,
and it provides many opportunities for this.

     Module BIOS, by contrast, contains only the simplest 
functions of controlling external devices. In general, BIOS is 
a set of programs for Service main components of the computer, 
such : keyboard, screen, printer, disk drives

and other device drivers be executed
only the simplest functions. For example, BIOS can read some 
sectors of the disk, but the organization of data files is 
missing here. The system BIOS and device drivers form a 
"physical" level operating system.


     The first part (BDOS) could be transferred to
any computer with appropriate processor without modification. 
It is required to only requirement is the presence of RAM in 
the lower memory addresses, not occupied frame buffer, ie 
"Pure" memory, which would have carried out the program and 
placed the OS itself. Also, for Time was necessary to have at 
least one disk device (this may be the drive or hard drive). 
All I / O BDOS exercises by calling the system BIOS, so manner 
attained a high mobility of both the CP / M, and the programs 
running under its control. Program is much less dependent on 
hardware. In BDOS'e contained Yeshe one component of the OS - 
CCP (Console Command Processor) - Processor Console

commands, or simply a shell.
This is a small program that automatically starts after you 
restart the system. It carries reception and execution of user 
commands. In fact - This is a common application, but without 
it the work of a completely impossible - it is the primary 
hull. Dialogue with the operator is just CCP, BDOS same -

is simply a set of functions and nothing more.

     The second part of the system (BIOS) - (small and
relatively simple) is specially programmed
for each machine with regard to its hardware features. This 
part of the system created by the producers themselves PC. Thus 
it turns out that the CP / M compatible with most 8-bit 
computers. 

     It is a broad system compatibility, as well as several 
other features, such as support for transit or external 
command, made her so popular.




         * TO BE CONTINUED *



ranzitnyh or external command, made her
so popular.



         * TO BE CONTINUED *



(C) Chertkov VY
Music: 'CROON' / 13.10.98 (:-<>)/ KENOTRON



               STUDIES CP / M

                  Part 2



  2. Compatibility



     The operating system CP / M is so widely spread through 
ease of installation it on the computer of an arbitrary 
configuration and a large number of software created for this 
system. 

     Like any professional OS, CP / M has a remarkable 
property: the components of the system can evolve 
independently, while maintaining full compatibility with the 
earlier written software! Because The system uses certain 
conventions, the modules have certain entry points. Program 
invokes the operating system in a specific way, for This is 
achieved by high mobility and compatibility. 

     Here we must note one thing. All programs under the CP / M 
can be divided into two types: those that work only through the 
standard means of system (BDOS 'BIOS), and those except the OS 
can apply directly to the hardware on your computer. Program of 
the first type, usually operate at any company that is running 
CP / M. If this program does not go ", it means that some 
components of the system is implemented incorrectly. Typically, 
the programs of this type of plain-looking, are not 
window-menyushnogo interface (especially icons) - this kind of 
fee for versatility and mobility. Although in 1981 the American 
Institute Standards (ANSI) has developed iskeyp sequences that 
control color output symbols and cursor shape. But the program 
under the CP / M, oriented to ANSI, I have met very rarely. 
Still, with graphics, they can not work ... 

     Programme of the second type, on the contrary, colorful and
pleasing to look at, because full advantage of the apparatus. 
They can say, written mostly not for CP / M, and for this 
particular computer. Once the program is drawn directly to

equipment (use the IN / OUT or drawn directly to video memory), 
then, of course, it will only work on "native" computer. Move 
it to another PC with a different architecture quite difficult 
or even impossible. Ie, the program is tied to the hardware. 
Such, for example, most programs on the profiles. On the other 
CP / M-cars they do not go, because using the hardware 
capabilities of a specific computer. 

     From all this it follows that if
writing a program is running CP / M
No one forces you to, for example, to display the text on the 
screen, to work exclusively through BDOS. If you do not intend 
to carry this program to other PCs, it is safe to write their 
own procedures to the screen and keyboard. Another thing, if 
the standard features you completely satisfied, then we can 
work through them. Ie, y programmer has a choice (and 
programming on the Spectrum - no): or use standard email 
functions or write your own. Or, you can create a special 
system that extends the display I / O - a kind of complement 
the operating system, I mean the resident library windows 
Windows on the Profi. Just as with the CP / M: more convenient 
to write the function once and collect them in unit than each 
time to recreate them in another program. Yes, and a resident 
of this can be improved (or, for example, will be a device such 
as graphics accelerator - will be enough just to change some 
procedures to residents - and all of hockey!), This will work 
better programs written under it! Program, though, is not 
targeted at the library, improvements to the equipment will not 
notice. 

     Under CP / M was created decent base programs. Where
all this software - another question. The thing is that the 
popularity of this system took place at the end of the 70 - top 
80's, but at that time, you know, PCs have not produced. From 
the PC the most were distributed Robotron 1715, imported

from the GDR. The ordinary man it was virtually unavailable, 
ie, mass distribution programs, as now, was not. And the 
programs were only those who could work on these computers (No 
older version of CP / M 2.2, processor, best, Z-80, but in 
general - i8080). All that was - this is what was used in 
colleges and some enterprises: spreadsheets

SuperCalc, MultiPlan, DBMS dBASE II, and a few
text editors like Word Star, Final Word
Refor + or some programming languages. And this
everything! Negative factor was the fact that the
late 80's the company began to buy IBMsovmestimuyu technique, 
and from CP / M tried to get rid of. As a result, now from 
proprietary software were Some fragments, fragments and scraps. 
What's left, has remade many times (as it was written - "the 
same program at a time reworking a few morons"), were even 
entire institutions, takes a full translation of the Western 
programs in Russian. So, game for ZXSpectrum, who came from 
Poland, one can generally assume that brand! Pure CP / M'ovskie 
program for professionals gathered with great difficulty: 
something found in one place, something - in other - and, as

Typically, all in a terrible state. The only way
I think, is now available nepokalechennye
program under the CP / M - is a dedicated CP / M sites (sites) 
in InterNET. 



         * TO BE CONTINUED *



.

(C) Chertkov VY
Music: THE BEST ITALIAN-'VENICE 'by KENOTRON



               STUDIES CP / M

                  Part 3



  3. Processors



     As already mentioned in the introduction, the system
CP / M was written for the processor i8080. Immediately
raises the question: "Why, actually, not for Z80?
After all, he's better. "The thing is that the firm Zilog
released its processor two years later than
released i8080, a PC at its base, respectively,
appeared later. Of course, 2 years - a small
term, but in the computer industry is an eternity. 
Subsequently, there were versions of the system-oriented and 
Z80, which required less memory and run faster.


     Who is late - he loses. Zilog and
subsequently created a much more advanced LSIs in
all respects than Intel'ovskie, but lost in the
time. Intel chips are produced, they are created
Computers have evolved standards in technology and
etc., and after that Zilog presented its development - but the 
time lost and the market is already captured. 



                 *



    Now consider applied in the PC running the system CP / M 
microprocessors: 



i8080



     We can say the first normal microprocessor. Executes 68 
basic commands, has 6 modes addressing. Registers 8 / 16 bits. 
Addresses 64K of memory. Data Bus Width 8-bit address bus - 16 
bits. Completed in CMOS. Clock Speed ​​2.5

MHz. Housing with 40-pin DIP. Powered +5 V, +12 V
and-5V, clock signals in phase, and amplitude of 12V. Address 
bus and data should always (!!!) buffered bus-shapers. Performs 
an average of about 250 thousand operations per second. One 
mode interrupt handling. No teams on the transition, one set of 
registers. As a programmer's perspective, and from the point of 
view Developer apparatus, the processor is very uncomfortable.

Although, if a program written for this processor
then it will work on any other processor
(From this list, of course).


i8085



     Advanced i8080. Modify
way technology is now on the wiring diagram MP
closer to the 16-bit. Unipolar +5 V supply, all
conclusions TTL-compatible. 5 MHz clock frequency. Has a 
built-in controller continuously. Compared with i8080 has only 
two additional commands (for Management Interrupt Controller). 
The rest - Fully compatible with the i8080. Performs on average

500 thousand operations per second (0.5 mips).



Z-80



     Several engineers firm Intel, developing
i8080, disagreed with the leadership, came out of it
composition and organized his own company - Zilog.
In 1976 he released his version of the MP, in comparison with 
the i8080, it has the additional registers and team. Any 
program written for the i8080, will work on the Z80. Processor 
consists of 8500 transistors perform 158 basic commands, has

10 addressing modes (there were prefixes CB, DD,
ED, FD). Registers 8 / 16 bits, the address 64K of memory.
Data Bus Width 8-bit address bus of 16 bits. Performed on n-MOS 
technology. 4 MHz clock frequency. Housing with 40-pin DIP. One 
power supply +5 V, all inputs and outputs are compatible with 
TTL. At a frequency of 4 MHz, on average perform 400 thousand 
operations per second (not NOP'ov!). Developed system interrupt

two types: masked (INT) and Non-maskable (NMI).
Mode 0 maskable interrupt ekvivlenten regime
in i8080. Has the ability to regenerate the dynamic RAM. 
Subsequently released versions of the microprocessor at 2.5 
(Z80L), 6 (Z80B) and 8 (Z80H) megahertz. Compatible 
microprocessors produced many firms, there are even options for 
10 and 14 MHz! (Ie up to 1.4 mips)


     By Z-80 can be connected to any of the LSI package i8080.



64180, Z180



     Further development of the Z80. Addresses 1MB of memory, 
clock frequency 10 MHz. Data Bus Width 8-bit address bus - 20 
bits. Housing with 64-pin DIP or PLCC 100-pin. Has built memory 
manager. Memory is divided into pages of 4K, plug in two 
windows - at address 0 and address 8000h. The width of 
registers, as in the Z-80 - 8 / 16 bits. Significantly improved 
interrupt system, a built-interrupt controller. Added new 
teams. The wrong code, restart the operation worked through 0. 
An average of 1 million operations second (ie, 1 mips). 
Performs all documented commands Z-80. 


New commands:
Team test checks - installed on your
Reg. A specified in the mask bits (mask - operand), unlike the 
team BIT that is checked several bits. Teams IN0 and OUT0 
designed to access built into the processor peripherals (ports 
00 .. FF). 



   ED 00 NN IN0 B, (NN); NN-B

   ED 01 NN OUT0 (NN), B

   ED 04 TST B; check bits

                         ; (TEST A, B)

   ED 08 NN IN0 C, (NN)

   ED 09 NN OUT (NN), C

   ED 0C TST C

   ED 64 NN TST NN

   ED 74 NN TSTIO NN; mask is read from

                          ; Port NN

    ......................



   ED 38 NN IN0 A, (NN)

   ED 39 NN OUT0 (NN), A

   ED 3C TST A

   ED 4C MLT BC; BC = B * C

   ED 5C MLT DE

   ED 6C MLT HL

   ED 7C MLT SP

   ED 1976 SLP; energy-saving

                          ; Mode

   ED 83 OTIM

   ED 8B OTDM

   ED 93 OTIMR

   ED 9B OTDMR



Z-280



     Address 16 MB of memory, ie, Address bus width 24 bits. 
Clock speed (minimum) 25 MHz. Data bus width 16 bits (twice the 
performance at the same clock speed). Built-in memory manager, 
segments. Has a conveyor system for processing commands, 
built-in cache memory (CACHE Tier 1) and the ability to connect 
math coprocessor. On average, 4.5 million operations per 
second. Performs all documented commands Z-80 and Z-180.

New teams (one found in the documentation for one emulator, ie, 
not all): 


   CB 30 TSET B; testing bits and conditions
                     ; SETTING

   CB 31 TSET C

   CB 32 TEST D

   CB 33 TSET E

   CB 34 TSET H

   CB 35 TSET L

   CB 36 TSET (HL)

   CB 37 TSET A



     These commands can be easily distinguished Z-280
from Z80, a typical example:


       LD A, 40H

       DB 0CBH, 37H

       JP M, Z-80

       JP P, Z-280



     Thus, the program Z-80, using
"Undocumented" commands (SLI - generally useless swill) to work 
on the Z-280 will be wrong! Moral: as no improvement, these 
undocumented commands do not bring it and apply They should not 
be - suffer the compatibility and more. 



NEC V20, V30



     The microprocessor is built on the architecture of i8086,
but has a subset of commands i8080. Bus Width
Data 8 / 16, at 1 MB of RAM. Built on the CMOS clock frequency 
10 MHz. Performs average of 1.5 million operations per second. 
Used in dvuhsistemnyh PC (eg, DEC Rainbow), because

can work in systems MS-DOS, CP/M-86 and
systems that are compatible with CP/M-80.

     Running the program in the codes i8080 mode
i8086 is a team BRKEM N, where N - number of software 
interrupts 8086, in this vector contains the code address i8080 
for execution. Registers 8086 in the transition mode 8080 is 
almost entirely meet the exception register sp 8080 it becomes 
equal to bp 8086. 



  0F FF NN BRKEM NN; Go to the emulation code

                     ; I8080



     In the i8080 added to the team:


  ED ED NN CALL N; call interrupts 8086

                     ; (INT N)

  ED FD RETEM; transition (recovery) mode

                     ; I8086



         * TO BE CONTINUED *



; (INT N)

  ED FD RETEM; transition (recovery) mode

                     ; I8086



         * TO BE CONTINUED *



system (BIOS) - (small and
relatively simple) is specially programmed
for each machine with regard to its hardware features. This 
part of the system created by the producers themselves PC. Thus 
it turns out that the CP / M compatible with most 8-bit 
computers. 

     It is a broad system compatibility, as well as several 
other features, such as support for transit or external 
command, made her so popular.




         * TO BE CONTINUED *



ranzitnyh or external command, made her
so popular.



         * TO BE CONTINUED *

(C) Chertkov VY
Music: SPECIAL COMPOS 'by KENOTRON'96



                STUDIES CP / M

                   Part 4



  4. Terminals



     This may sound strange, but adapters for personal 
computers did not appear immediately. First, to display 
alphanumeric information were invented device based on the CRT, 
called terminals. The name was chosen in such apparently due to 
the fact that these devices are graduates of the chain of 
transmission. The terminal is a monitor with built-in adapter 
allows you to display 80 characters per line when the number of 
rows from 24 to 30. The adapter contains its own

processor and video memory. To display the symbol
you just need to send the code for the character terminal.
The symbol appears in the current cursor position, after which 
the cursor moves one position to the right. If the line is 
off-screen, then it or broke off (WRAP OFF), or transferred to

Next physical line (WRAP ON). Switching
WRAP mode through software or hardware. To fill the entire 
screen scrolling was implemented up (Scroll Up) to clean the 
last row. In addition to ordinary characters to recognize the 
terminal control codes - end of line (CR), linefeed (LF), clear 
the screen (CLS), positioning the cursor (CURSOR MOVEMENT), 
delete the character left of cursor (BACKSPACE), etc.


     The adapter connects to the computer using
any interface - Serial (most often) or in parallel. Thus, 
connect the terminal to the computer was not difficult - 
important to have available the appropriate interface. From the 
standpoint of programmer's terminal looks like printer, the 
difference lies in the speed (terminal is much faster) and 
system commands. The terminal, like a printer accepts a stream 
of characters from which stand out commands and data.


     Terminals produced a set of firms here, for
example, a few names: Monroe, Morrow, DEC,
Xerox, Epson, Olivetti, Cromemco, Heath, Kaypro,
Osborne, Apple, Ericsson, Avatar, Compugraphic, Liberty, 
Generic Televideo and others 

     Most teams these terminals compatible with each other. But 
almost everywhere there are small differences. The situation is 
similar to the standard matrix Printer firm Epson: Many 
companies produce similar printers, virtually repeating the 
command system Epson'a, but to support their own "bloat", add 
their own commands or extend existing ones. All of them are 
compatible with Epson'om, but not with each other. C terminal 
situation is almost the same, except that one terminal, in 
principle, can support multiple systems are not mutually 
konfilktuyuschih commands. For example, the team VT-100 
terminals or ANSI codes begin with ESC, '[' (1Bh, 5Bh) and so

way, does not intersect with teams of other terminals, so they 
can along with their support team and VT-100. 



     In addition to the above-mentioned terminals exist
More and pseudo-TTY, ie operation mode TTY: symbol is printed 
at the current cursor and processed only a few control codes. 
Team supports any TTY terminal (a also present TTY). Thus, the 
programmers in the CP / M to create the program had a choice: 
or write it to a specific terminal or only use the "terminal" 
TTY. In the first case, the program will only work on 
compatible terminals in the second - on any computer. Are 
program as the first (eg, SuperCalc), and the second type 
(DD80). "Smarter" programs have configuration utility (setup or 
install), that asks the user what he or terminal what his 
computer, and then writes the configuration files and the 
program worked perfectly. 

     Now let us consider some of the instruction
terminals.



TTY TERMINAL



Terminal identification name: "TTY"
Screen length default: 25 lines
Auto-wrap: OFF



     Print mode teletype. Allows you to print plain text in a 
standard encoded ASCII.  Characters with code less than 20h do 
the following: 

^ G [07] sound (bell or beep)
^ H [08] backspace (backspace)
^ I [09] tabulation, ie, move the cursor to the column,

        multiple of 8
^ J [0A] newline (linefeed)
^ L [0C] clear screen (clear screen)
^ M [OD] carriage return (carriage return)



VT52 TERMINAL



Terminal identification name: "VT52"
Screen length default: 24 lines
Auto-wrap default: ON



     The terminal can print plain text
standard encoding ASCII. By default, symbols
displays with high brightness (bright), but you can switch to a 
low glow characters (dim). The screen can be displayed 
simultaneously both bright and dull characters. Also The 
installation of the absolute values ​​of brightness (64 level).

 Characters with code less than 20h do the following:

^ A [01] the cursor in the upper left-hand familiarity (home

        cursor)
^ B [02] and low brightness mode symbol (dim mode)
^ D [04] clear screen and cursor positioning

        (0,0 - home)
^ G [07] sound (beep)
^ H [08] backspace (backspace)
^ I [09] tabulation, ie, move the cursor to the column,

        multiple of 8
^ J [0A] newline (linefeed)
^ K [0B] move the cursor to the position up (cur
        sor up)
^ L [0C] clear screen (clear screen)
^ M [OD] carriage return (carriage return)
^ X [18] treatment to end of line (clear to end of

        line)
^ Z [1A] is similar to ^ D
ESC [1B] control (iskeyp) sequence
^ ^ [1E] ^ A similar
^ _ [1F] carriage return and linefeed



     Cursor control is carried out by a sequence: ESCAPE, 'Y', 
string +20 h, +20 h. Column Or ESCAPE, string +80 h, +80 h. 
Column Origin in upper left corner (home). Others ESC-sequence:



([28] The following characters are vivid (go to

        bright mode)
) [29] The following characters are dim (go to

        dim mode)
* [2A] clear screen (clear screen)
+ [2B] clear screen
, [2C] clear screen
: [3A] clear screen
; [3B] clear screen
A [41] cursor up (cursor up)
B [42] cursor down (cursor down)
C [43] cursor right (cursor right)
D [44] cursor left (cursor left)
E [45] clear screen and home cursor (Only clear

        screen for Amstrad.)
H [48] home cursor
I [49] back pervod string (reverse linefeed)
J [4A] treatment until the end of the screen (delete to end of

        screen)
K [4B] treatment to end of line (clear to end of

        line)
L [4C] insertion line (insert line)
M [4D] deleting a row (delete line)
R [52] delete the line (delete line)


X Set the size of the output window (Set text

        viewport):



    TR, LC, H, W



    TR = Row top of viewport +32

    LC = Left column +32

    H = height (rows-1) 32

    W = Width as above.


Y [59] control the cursor position;


b Set the brightness of characters (foreground):

   C = 63d or 0d. 1963 is bright, 0 is dark
c Set the brightness of the background (background):

   similarly 0-darkest ... 63-the brightest.


d [64] clear from start of screen to the cursor

        position
e [65] to include the cursor (cursor on)
f [66], turn off the cursor (cursor off)
j [6A] to save the cursor position (save cursor)
k [6B] to restore the previously saved position

        cursor.
l [6C] cleaning line (clear line)
o [6D] cleaning the screen from beginning to the current row
        ki
p [70] inverted the characters (go to reverse mode)
q [71] the normal characters (cancel reverse mode)
v [76] wrapping turn (turn line wrap on)
w [77] wrapping off (turn line wrap off)



          * TO BE CONTINUED *



on)
w [77] wrapping off (turn line wrap off)



          * TO BE CONTINUED *



and
relatively simple) is specially programmed
for each machine with regard to its hardware features. This 
part of the system created by the producers themselves PC. Thus 
it turns out that the CP / M compatible with most 8-bit 
computers. 

     It is a broad system compatibility, as well as several 
other features, such as support for transit or external 
command, made her so popular.




         * TO BE CONTINUED *



ranzitnyh or external command, made her
so popular.



         * TO BE CONTINUED *

(C) Chertkov VY
Music: APPLE on PLATE / KENOTRON 96



               STUDIES CP / M

                  Part 5



GENERIC TELEVIDEO 912/LIBERTY/MORROW/ADM /

        GENERIC LEAR TERMINAL



     These terminals have a lot in common, so
below summarizes the command system, ie some
commands are the same type of terminals, the other - to 
another, some teams can match. 

     For these terminals, most applications written for CP / M. 
Differences between terminals are in the number of rows and on 
/ off. regime AUTOWRAP. 

     The terminals allow you to print plain text
in the standard encoding ASCII. If the cursor is moved beyond 
the last row, then made movie screen up one row and the last 
row is cleared (auto scroll). Output symbols can be individual 
attributes (brightness, underline, inverse, flashing). 


First, distinctive features:

Terminal identification name: "ADM 3A"

                        "Morrow MT70"

                        "Televideo 912"
Screen length default: 25 lines
Auto-wrap default: ON


Terminal identification name: "GENERIC TELEVIDEO"

                        "LIBERTY"
Screen length default: 24 lines
Auto-wrap default: ON



Terminal identification name: "GENERIC LEAR

                                  SIEGLER "
Screen length default: 24 lines
Auto-wrap default: OFF



Terminal identification name: "MORROW MDT20"
Screen length default: 24 lines
Auto-wrap default: ON


About the emulation:



     The main difference lies in the fact that
opposite to the sequence of control cursor
(ESC ,=,...) necessary to swap the coordinates
cursor (ie, first set the column number, and then
line).



     Proper system of command above the Terminal. Characters 
with code less than 20h do the following: 

^ A [01] The following characters are bright (bright

        mode)
^ B [02] The following characters are dim (dim

        mode)
^ D [04] clear screen and home cursor
^ G [07] beep
^ H [08] backspace
^ I [09] TAB
^ J [0A] linefeed
^ K [0B] cursor up
^ L [0C] cursor right
^ M [OD] carriage return
^ X [18] clear to end of line
^ Z [1A] clear screen and home cursor
ESC [1B]
^ ^ [1E] home cursor
^ _ [1F] carriage return and linefeed



     Cursor control is carried out by a sequence: ESCAPE ,'=', 
Row +20 h, Column +20 h (Row - Line, Column - column). Ie, the 
value of the coordinates is necessary to add 20h (code space), 
otherwise the code is run for the team, not as a parameter 
functions ESC ,'='!. In the derivation of the character with 
code 27 (1Bh) following characters mean: 

"[22] cursor type

        ESC, ", n where n - is:

        [1B, 22, nn]

             Block 0

             1 Block

             2 Block

             3 Underline (Underline)

             4 Underline (Underline)

             5 Underline (Underline)

             6 No cursor
([28] go to bright mode
) [29] go to dim mode
* [2A] clear screen
+ [2B] clear screen
, [2C] clear screen
. [2E] cursor control

       ESC,., N where n - is:

       [1B, 2E, nn]

            1 Cursor off

            3 Cursor on
: [3A] clear screen
; [3B] cursor control

       ESC,;, n where n - is:

       [1B, 3B, nn]

            A Cursor off

            I Cursor on
= [3D] cursor movement control (upr.kursorom)
A [41] cursor up
B [42] On. attributes (attributes on)

       ESC, B, n where n - is:

       [1B, 42, nn]

            0 Inverse (inverse)

            1 Bright (Bright)

            2 Blink (Shimmering)

            4 Cursor on
C [43] Off. attributes (attributes off)

       ESC, C, n where n - is:

       [1B, 43, nn]

            0 Inverse (inverse)

            1 Bright (Bright)

            2 Blink (Shimmering)

            4 Cursor on
D [44] to delete the character (delete character)
E [45] insertion line (insert line)
G [47] Set attributes for the next symbol
        oxen (set display attributes)

       ESC, G, n where n - is:

       [1B, 47, nn]

            0 Normal (normal characters)

            1 Underline (underline)

            2 Dim (dark)

            4 Reverse (inverse)

            8 Blink (blinking)

     These attributes can be set at the same time, it needs to 
lay down appropriate values.


     Appointment of the following command was not clear:
what kind of graphics mode is it?
H [48] graphics mode control (Simp. graphical solution
        zhimom)

       ESC, H, n where n - is:

       [1B, 48, nn]

            2 graphics mode on (graphic dir. Incl.)

          otherwise the graphics mode off (graf.rezh.vykl.)
I [49] go to reverse mode
J [4A] delete to end of screen
K [4B] clear line
L [4C] insert line
M [4D] delete line
N [4E] cancel reverse mode
Q [51] insert character
R [52] delete line
T [54] delete to end of line
W [57] delete character
Y [59] delete to end of screen
d [1964] cursor on / off

       ESC, d, n where n - is:

       [1B, 64, nn]

            0 cursor on

          otherwise, cursor off
e [1965] cursor on
f [66] cursor off
i [69] back TAB (reverse tab)
j [6A] save cursor (save cursor position)
k [6B] restore previously saved cursor position.

        (Recovery rate of the stored position.)
l [6C] go to bright mode
m [6D] go to dim mode
q [71] insert character (insert character)
r [72] delete line (delete line)
t [74] delete to end of line (delete to the end

        line)
w [77] delete character (delete character)
y [79] delete to end of screen (to remove the end

        screen)



VT100 TERMINAL



Terminal identification name: "VT100"
Screen length default: 24 lines
Auto-wrap default: ON



     The terminal can print plain text
standard encoding ASCII, control the color output of characters 
and the shape of the cursor. 

     All teams start with a sequence ANSI/VT100 ESC, '[' (1Bh, 
5Bh), followed by the options. Thus, the team VT100 do not 
intersect with teams of other terminals. Parameters are given 
in the form: P1; P2 ;...; Pn; C - where P1 and P2 to Pn - 
decimals (if none, then it is assumed that it is zero). Symbol 
C denotes one-letter command - the symbol of ASCII:



A [41] Cursor up. P1 specifies the number of rows to ne
      displacements up. P1 value of 0 is equivalent to
      valence 1. Upon reaching the top row

      command does nothing.
B [42] Cursor down. P1 specifies the number of rows to transfer
      displaced downwards (+ see above)
C [43] Cursor right. P1 specifies the number of columns for

      move to the right (+ see above).
D [44] Cursor left. P1 zadaey number of columns for ne
      displacements to the left (+ see above).
H [48] Cursor positioning. P1 sets the string, and P2 -

      column. Upper left corner has coordinates
      You 1,1. Any parameter equal to 0, is

      equal to 1.
J [4A] Erase screen. P1 can be 0, 1 or 2.

      P1 = 0 - cleaning of the cursor to the end of the screen,

      P1 = 1 - cleaning the screen from beginning to cursor

      P1 = 2 - clearing the screen.
K [4B] Erase line. P1 can be 0, 1 or 2.

      P1 = 0 - cleaning from cursor to end of line

      P1 = 1 - clean from the start line before the cursor

      P1 = 2 - clearing entire rows.
P [50] Delete character. P1 - number removed sim
      ox. If P1 = 0, removes the first character.
f [1966] Cursor Positioning. See H [48].
h [68] Set mode. Ignored.
l [6E] Reset mode. Ignored.


m [6D] Select video attributes. P1 contains the attribute

      which will be added to the current.

      P1 can be:

      0 - clear all attributes,

      1 - bright,

      4 - underline,

      5 - blinking,

      7 - reverse.
s [73] Save cursor position.
u [75] Restore cursor position.



     In a more modern computer terminals
are no longer used, because have several disadvantages: 
character by character printing (bring a string of characters 
for one can not appeal), speed limit display characteristics 
interface (after all characters are transmitted by cable is not 
instantaneous), it is impossible read characters on the screen, 
and finally the impossibility of working with graphics. To 
replace the terminals came adapters, but the display drivers in 
the system CP / M, as a rule, teams emulate terminals.


     Thus, even if the characters on the show
screen only through BDOS or BIOS, it is possible to control the 
color of characters and the cursor position, etc. The program, 
operating through driver, of course, more mobile - it's easy to 
transfer to another PC. 

     Driver profiles are supported on the screen of
teams VT52 (why not all - it must ask
its author), the other part was taken from the ceiling
(Or, rather, developed from scratch). Naturally, these
"New" command does not understand a single Western CP / M
program.



    * CONTINUED IN THE NEXT ISSUE *





Other articles:

Inform - The plans of the magazine.

Authors - The authors of the journal and editorial contacts.

Inform - Guide magazine.

Locman - On the game SubSunk.

Locman - Game Description DARK SIDE.

loafer - Complete walkthrough MIRROR.

Kaleidoscope - On the game Star Dust roads.

Kaleidoscope - On the second virtual computer art festival Art Comp-99.

Kaleidoscope - The presentation of text utilities - Text Utility V2.8i.

Skeleton - Description of the sound card DMA SOUND.

Skeleton - an undocumented feature of the processor Z80.

History - Life After Willie. Softografiya Matthew Smith.

History - On fidoshnom slang.

Laboratory - Intro POORGUY! - Inside (original text with commentaries).

Laboratory - ZX-SPECTRUM and operating systems.

Laboratory - Procedures from MicroSoft.

Laboratory - The algorithm output decimal numbers on the screen from the register of DE & HL.

Laboratory - The algorithm of division and multiplication of large numbers.

PROFI CLUB - Studying CP / M (compatibility, processors, terminals).

Humor - Ladder - advice to competent user.

Humor - Verse "OA programmers.

Mail - Letters from readers in the magazine.

Advertising - Advertisements and announcements ...

ZXTraders - Deystvyyuschie distributors software ZX Spectrum in Russia and Ukraine


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
List BBS - A list of running BBS.
Form - A small questionnaire for its readers.
Editorial - Sq: "I never write did not, and I always envied those who have a real good "...

В этот день...   21 November