
		St. Clement Okhridsky University of Sofia

		SOFTWARE RESEARCH & DEVELOPMENT LABORATORY
	-----------------------------------------------------------








				PYLDIN 601A
			    PROGRAMMERS GUIDE






				Sofia 1990












				PYLDIN 601A
			    PROGRAMMERS GUIDE

2							PYLDIN 601A
-------------------------------------------------------------------

   UniDOS, UniBIOS, UniPASCAL and UniBASIC are trademarks of
SOFTWARE RESEARCH & DEVELOPMENT LABORATORY.
PYLDIN 601A is a trademark of Abacus Co.
EduLAN is a trademark of ComseD.









  Copyright (c)1989-1990 SOFTWARE RESEARCH & DEVELOPMENT LABORATORY

All rights reserved. No part of this publication may be
reproduced, stored in a retrieval system, or transmitted,
in any form or by any means, electronic mechanical,
photocopying, recording or otherwise, without the prior
written permission of SOFTWARE RESEARCH & DEVELOPMENT
LABORATORY. Printed in Bulgaria.








	     SOFTWARE RESEARCH & DEVELOPMENT LABORATORY
			  5, A. Ivanov Blvd.
			 1126 Sofia, Bulgaria
		phone: (359 2) 70 61 58, 62 77 54
			fax: (359 2) 70 62 48


Contents

1 Getting acquainted					 7
  1.1  Specifications.................................	 7

2 UniDOS						 9
  2.1  UniDOS files...................................	 9
  2.2  UniDOS commands................................	 9
  2.3  UniDOS error messages..........................	16

3 The Text Editor -- UniED				19

4 UniBIOS calls						21

5 Assembler Instructions				23










				3

4							PYLDIN 601A
-------------------------------------------------------------------


Preface

The realization of the system software for the Pyldin microcomputer
is a result of the hard work and the experience of the authors and
the whole group participating in the Pyldin project. The aim was a
creation of a comfortable and functional software environment in a
respect with the computers of this class.
   The style of the system software was intentionally directed to
what is known as PC-DOS (and run on IBM-PC machines and
compatibles). The benefits of such approach is the considerable
reduce of time necessary to start over (in case of such
experience). This approach was observed also in many technical
decisions. One of the great advantages is the physical and logical
100 % compatibility of floppy disks of Pyldin and IBM-PC
compatible machines. Thus you can read and write diskettes with
Pyldin and/or with other machine. So you can say that Pyldin is
file-compatible with an IBM-PC.
   This book don't teaches you programming, it is a reference
manual. A prior experience with computers is supposed. The book
itself consists of several chapters - acquaintance with the
computer, description of UniDOS commands, the UniBIOS calls, the
Text Editor, the microprocessor instructions and the assembler
directives.
   The UniDOS commands are very similar to PC-DOS ones, with very
exceptions they may be considered a subset of PC-DOS. The Text
editor is similar in concept to editors like Word and Word-Perfect
or the PE2. Two other products -- UniPASCAL and UniBASIC are also
similar to the corresponding products found for IBM-PCs.
   We hope, that you will enjoy working with our software.
							    Authors









				5

6							PYLDIN 601A
-------------------------------------------------------------------


Chapter 1

Getting acquainted

1.1 Specifications

Technical specifications

 * Microprocessor: CM601 (Motorola MC6800 equivalent)
   1 MHz clock frequency
 * Dynamic memory (DRAM): 64 Kbytes
 * Read-Only Memory (ROM): 4 Kbytes expandable to 68 Kbytes
















				7

8							PYLDIN 601A
-------------------------------------------------------------------


Chapter 2

UniDOS

2.1  UniDOS files

2.2  UniDOS commands

The following convention is used in describing UniDOS commands:

 * The TYPEWRITER face is used for items entered via keyboard
   or displayed.

 * Optional (not required) arguments are placed in square
   brackets [ like this ].

 * Concrete file name or device name which must be supplied by
   the user are placed in angle brackets < like this>.

 * Space characters (blanks) which are part of the command are
   shown with an unerscore character like this.

 * All other items must be entered exactly as shown, lowercase
   and uppercase are not distinguished.

 * Wildcard characters * replacing any amount of symbols till
   the end of the field and ? replacing one character may be
   used in filename specifications in most of the commands.

 * Typical examples of commands are provided and the type of
   the command (internal or external) is given.

Redirection of input and output
-------------------------------

Input and output of commands and most of the programs may be
redirected from/to file or character device. The < symbol is
used for redirecting the input of a command (instead of the
keyboard) and > or >> symbols are used for redirecting of the
output. The >> is used for explicit appending to file (the
file may be created if does not exist), otherwise the file is
always created (old contents are lost).

Syntax: <command> <redirection symbol> <filename or device>
Example:  DIR > PRN:


				9

10							PYLDIN 601A
-------------------------------------------------------------------

CD -- Change Directory
----------------------

This command is used for changing current directory. If no
parameters are specified, the current directory is displayed.
The symbol \ is used for the root directory and for separator
between subdirectories. The symbol .. is used for the parent
directory.

Syntax: CD [drive:][pathname]
Example: CD \MYFILES
Type: internal


CLS -- CLear Screen
-------------------

This command is used for clearing the screen. The video mode
is not changed.

Syntax: CLS
Example: CLS
Type: internal


COPY -- copy file(s)
--------------------

This command is used for copying file(s). Wildcards * and ? are
accepted. Omitted parameters are substituted with default drive
and directory and the filename(s) are the same. Existing files
are overwritten if the target drive/directory differs from the
source. The character devices CON:, PRN:, AUX: and NUL: can be
used as source (if possible) or target.

Syntax: COPY <source specification> [<destination specification>]
Example: COPY MYFILE.TXT B:
Type: internal
Error messages:
	FILE CANNOT BE COPIED ONTO ITSELF -- source and target
			specifications are identical.
	PATH NOT FOUND -- source specification is not valid.


DATE -- set current date
------------------------

This command is used for setting the current date. If no
parameters are given the old date is displayed and the user is
asked for the new date. If no hardware clock is present the date
is set to January 1-st, 1989. The format of the date specification
is dd-mmm-[yy]yy, so dates after 01-JAN-[19]80 and before
31-DEC-2099 may be entered.

Syntax: DATE [<date specification>]
Example:  DATE 03-JUN-90
Type: internal

2.2  UniDOS commands						 11
-------------------------------------------------------------------

DIR -- DIRectory
----------------

This command is used for displaying the contents of the specified
directory. If no directory is specified contents of the current
directory are displayed. Wildcards * and ? are accepted. The
output may be redirected to file or printer.

Syntax: DIR [<drive:>][<path>]
Example: DIR A:*.TXT
Type: internal


DISKCOPY -- DISKette COPYing
----------------------------

This command is used for copying of diskettes. Only standard 180,
360 or 720 KB diskettes may be copied. Target diskette may be
formatted if necessary. The process of copying may be quite
tedious on one-floppy system.

Syntax: DISKCOPY <source_drive> <destination_drive>
Example: DISKCOPY A: B:
Type: external


DEL -- DELete files
-------------------

This command is used for erasing disk files. Hidden, system or
read-only files are not erased. The number of erased files is
displayed.

Syntax: DEL [<drive:>][<path>]<filename>
Example: DEL *.BAK
Type: internal


ECHO
----

This command is intended for use in JOB-files. Its purpose is
to echo a message on screen or to supress output during
processing of a JOB file.

Syntax: ECHO [ON or OFF] or [<any combination of pritable characters>]
Example: ECHO OFF
Type: internal

12							PYLDIN 601A
-------------------------------------------------------------------

FORMAT -- FORMAT diskette
-------------------------

This command is used for initializing diskettes. Physical format
is performed and new FAT (File Allocation Table) and directory are
created. The following formats are supported:

 * 360 KB DS/DD (standard)
 * 180 KB SS/DD
 * 720 KB DS/QD -- this format is possible if the floppy disk
		drive is 80-track model

If the number of tracks is not specified, the default is 40 tracks,
except the case of 80-track FDD, which has to be declared with the
corresponding MODE command. If the number of heads is not
specified it is assumed that the FDD is double-sided.

Syntax: FORMAT <drive:> [/<number_of_tracks>] [/<number_of_heads>]
Example: FORMAT A:
Type: external


HANDLES
-------

This command is used for specifing the maximum possible amount of
open files in one and the same moment. The default is 15 (after
bootstrap) and may be increased up to 32. Each new handle uses
about 530 bytes of memory, thus reducing the amount of memory
available for programs. The number of handles can be increased
only, decreasing is ignored. It is recommended to include this
command in the AUTOEXEC.JOB file.

Syntax: HANDLES <number_of_handles>
Example: HANDLES 24
Type: internal


MD -- Make Directory
--------------------

This command is used for creating new subdirectories. If the
full path is not provided the directory is created as a
subdirectory of the current one.

Syntax: MD [<drive:>][<path>]<directory>
Example: MD TMP
Type: internal

2.2  UniDOS commands						 13
-------------------------------------------------------------------

MODE -- select MODE of operation
--------------------------------

This command is used to select mode of operation of specific
devices supported by UniDOS. The current release supports display,
auxiliary channel (RS-232) and floppy disk drives.

Display mode

User can select between 80-column and 40-column text modes or to
return to text mode from graphics. In case of 40-column text mode
default attribute can be specified. The attribute is a positive
number between 0 and 255 or $FF in hexadecimal notation which is
formed by the background color (0..15) added with foreground color
(0..7) multiplied by 16 and finally added with 128 for blinking if
desired. If no attribute is given black and white mode is selected.

Syntax: MODE <number_of_columns> [<attribute>]
Example: MODE 40
Type: internal

Auxiliary channel mode

User can select baud rate and format of the serial interface
(RS-232-C). The following baud rates are supported: 150, 300, 600,
1200, 2400, 4800, 9600, 19200. The eight possible formats (0 to 7)
specify  the number of data bits (7 or 8), parity control (none,
odd or even) and the number of stop bits (1 or 2).

+----+-----------+----------------+-----------+
| No | data bits | parity control | stop bits |
+----+-----------+----------------+-----------+
| 0  |	   7	 |	even	  |	2     |
| 1  |	   7	 |	odd	  |	2     |
| 2  |	   7	 |	even	  |	1     |
| 3  |	   7	 |	odd	  |	1     |
| 4  |	   8	 |	none	  |	2     |
| 5  |	   8	 |	none	  |	1     |
| 6  |	   8	 |	even	  |	1     |
| 7  |	   8	 |	odd	  |	1     |
+----+-----------+----------------+-----------+

Syntax: MODE <baudrate> <format>
Example: MODE 1200 4
Type: internal

14							PYLDIN 601A
-------------------------------------------------------------------

Floppy Disk Drive mode

In case of using of quadro density floppy disk drives (80-track)
the user must specify explicitly the type of FDD. This is necessary
for proper formatting of diskettes in such drives and
reading/writing of 360 KB (double density) diskettes (40-track) in
such drives. In this case the FDD is automatically driven in a
double step mode. The corresponding command is recommended to be
included in the AUTOEXEC.JOB file.

Syntax: MODE <drive:> <number_of_tracks>
Example: MODE A: 80
Type: internal


MON -- MONitor
--------------

This command is used for invoking system monitor program. The
commands of the monitor program are described in the appendix.
Returning to UniDOS is done by monitor Q (quit) command.

Syntax: MON
Type: internal


PAUSE
-----

This command is intended for use in JOB-files. Its purpose is
to provide pause, which is terminated by pressing a key on the
keyboard. When executed the following message is displayed:

Press any key to continue...

User may be asked before this to change diskettes, etc.

Syntax: PAUSE
Type: internal


REM -- REMark
-------------

This command is intended for improving documentation of JOB-files.
Any characters on the line following REM are ignored during
processing of the JOB-file.

Syntax: REM [<any text>]
Example: REM This is my comment.
Type: internal

2.2  UniDOS commands						 15
-------------------------------------------------------------------

REN -- REName files
-------------------

This command is used for renaming files. Wildcards are accepted,
but should be used carefully. The new name must be unique.

Syntax: REN [<drive:>][<path>]<oldname> <newname>
Example: REN WORK.TXT LETTER.TXT
Type: internal


RD -- Remove Directory
----------------------

This command is used for removing subdirectories. The directory
must be empty (all files, including system, hidden and
subdirectories must be removed before that). The main directory
can not be deleted.

Syntax: RD [<drive:>][<path>]<directory_name>
Example: RD TEMP
Type: internal


TIME -- set current time
------------------------

This command is used for setting current time. If no clock card
is present the time is set to 0:00:00 after power on. Time must
be specified in 24 hour format i.e. 0:00:00 to 23:59:59 are
valid entries.

Syntax: TIME [<time specification>]
Example: TIME
Type: internal


TYPE -- display contents of a text file
---------------------------------------

This command is used for used for displaying contents of text
files. Wildcards are NOT accepted. If the length of text lines
exceeds the screen width the line is splitted at the
corresponding position i.e. at the 40-th column. The process
is terminated upon physical end of the file or coming upon EOF
character -- CTRL-Z. The rest of the file (till the physical
end) is skipped.

Syntax: TYPE [<drive:>][<path>]<filename>
Example: TYPE MYFILE.TXT
Type: internal

16							PYLDIN 601A
-------------------------------------------------------------------

VER -- VERsion of UniDOS
------------------------

This command is used for displaying the version of UniDOS loaded.
The logo of UniDOS is displayed.

Syntax: VER
Type: internal


2.3  UniDOS error messages

			 

	Access denied
	(饭 )
	      ਡ 䠩  
	      .

	Address failure
	(訡  ᭮  ᪠)
	      ० .

	Attempt to remove the current directory
	( ⪠ 㭨⮦ ⥪ ४)

	AUX: framing
	(ढୠ 訡 ਩ 䥩)

	AUX: overrun
	(४⨥ ⮢,   ਩ 䥩)

	AUX: parity
	(஫  ⭮ - 㤮⢮⥫)

	AUX: timeout
	(  ஫쭮 ६   ॠ)

	Bad command or file name
	(ୠ   ࠢ쭮   䠩)

	Cannot execute .CMD file
	( 믮 .CMD 䠩)
	      ਠ  -  㦥
	    ஢ .CMD 䠩.

	Data failure
	(訡     饭  )
	      ० .

	Directory exists
	(  ⠪ ४)

	Directory not empty
	(  ४)

	Disk full
	(   )

	Disk write protected
	( 饭  )

	Failure in .PGM file
	(訡  ஢ .PGM 䠩)
	      ० .PGM 䠩.

	FAT failure
	(訡  FAT- -  ⠡ ᠭ 䠩)

	File already open
	(⪠  ⮣ 䠩)

	File cannot be copied onto itself
	(  ஢  ᥡ)

	File creation failure
	(訡  ᮧ 䠩)

	File exists
	( )

	File opening failure
	(訡  ⨨ 䠩)

	File not found
	(  )

	General failure
	( 饭  )
	    ⭮   ଠ஢  稫
	ढୠ 訡.

2.3  UniDOS error messages					 17
-------------------------------------------------------------------

	Insufficient memory
	( 墠⠥ )

	Invalid date
	( )
	    ୠ ଠ  .

	Invalid drive
	(ࠢ쭮  䨪 ᪮)

	Invalid media type
	(ࠢ쭮 ⨯ ଠ ᪥)

	Invalid name
	(ࠢ쭮 )

	Invalid number of parameters
	(ࠢ쭮 ᫮ ࠬ஢)

	Invalid parameter
	(ࠢ ࠬ)

	Invalid sector
	(ࠢ ᥪ)

	Invalid time
	(ࠢ쭮  ६)

	Not disk file
	( -  ᪮ 䠩)
	    ⭮ ᯮ짮 ࠢ쭮 १ࢨ஢ .

	Not same device
	(  ன⢮)
	    ஢ ᨭ⠪ .

	Path not found
	( ⠪ )
	    ஢, ࠢ쭮  ࠭ .

	Printer general failure
	( 饭  ਭ)
	    ⭮ ਭ  祭.

	Printer out of paper
	(稫 㬠  ਭ)

	Printer timeout
	(訡  饭  ਭ)

	Root directory full
	( ४   )

	Too many open files
	(᫮  䠩  ⨬)
	    ⭮ ᤥ ⪠  䠩  㦥
	 ⮫쪮 䠩, ᪮쪮 㪠   HANDLES.

18							PYLDIN 601A
-------------------------------------------------------------------

Chapter 3

The Text Editor -- UniED

20							PYLDIN 601A
-------------------------------------------------------------------

Chapter 4

UniBIOS calls

22							PYLDIN 601A
-------------------------------------------------------------------

Chapter 5

Assembler Instructions
