CA2297069C - Computerized system and associated method for optimally controlling storage and transfer of computer programs on a computer network - Google Patents

Computerized system and associated method for optimally controlling storage and transfer of computer programs on a computer network Download PDF

Info

Publication number
CA2297069C
CA2297069C CA002297069A CA2297069A CA2297069C CA 2297069 C CA2297069 C CA 2297069C CA 002297069 A CA002297069 A CA 002297069A CA 2297069 A CA2297069 A CA 2297069A CA 2297069 C CA2297069 C CA 2297069C
Authority
CA
Canada
Prior art keywords
computer
request
user
machine
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CA002297069A
Other languages
French (fr)
Other versions
CA2297069A1 (en
Inventor
Michael A. Feinberg
Matthew A. Feinberg
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Catharon Productions Inc
Original Assignee
Catharon Productions Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Family has litigation
First worldwide family litigation filed litigation Critical https://patents.darts-ip.com/?family=25416079&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=CA2297069(C) "Global patent litigation dataset” by Darts-ip is licensed under a Creative Commons Attribution 4.0 International License.
Application filed by Catharon Productions Inc filed Critical Catharon Productions Inc
Publication of CA2297069A1 publication Critical patent/CA2297069A1/en
Application granted granted Critical
Publication of CA2297069C publication Critical patent/CA2297069C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates

Abstract

A computerized system and an associated method for optimally controlling storage and transfer of computer programs between computers on a network to facilitate interactive program usage. In accordance with the method, an applications program is stored in a nonvolatile memory of a first computer as a plurality of individual and independent machine-executable code modules. In response to a rquest from a second computer transmitted over a network link, the first computer retrieves a selected one of the machine-executable code modules and only that selected code module from the memory and transmits the selected code module over the network link to the second computer.

Description

. k DEMANDES OU BREVETS VOLUMINEUX
LA PRESENTE PARTIE DE CETTE DEMANDE OU CE BREVET
COMPREND PLUS D'UN TOME.
CECf EST LE TOME ~ DE o2-NOTE: ~ Pour les tomes additionels, veuillez contacter le Bureau canadien des brevets JUMBO APPLlCATiONS/PATENTS
THIS SECTION OF THE APPLfCATION/PATENT CONTAINS MORE
THAN ONE VOLUME
. THIS IS VOLUME OF
NOTE: For additional volumes please contact the Canadian Patent OfficE

COMPUTERIZED SYSTEM AND ASSOCIATED METHOD
FOR OPTIMALLY CONTROLLING STORAGE AND TRANSFER
OF COMPUTER PROGRAMS ON A COMPUTER NETWORK
Rarirorntmd of the Inyention This invention relates to computing and communications on a computer network.
More specifically, this invention relates to a computerized system and an associated method for optimally controlling storage and transfer of computer programs between computers on a network to facilitate interactive program usage.
In the past several years, there has been an ever increasing number of individuals, corporations and other legal entities which have obtained access to the global network of computers known as the Internet. More precisely described, the Internet is a network of regional computer networks scattered throughout the world. On any given day, the Internet connects roughly 20= million users in over 50 countries. That number will continue to increase annually for the foreseeable future.
The Internet has provided a means for enabling individual access to enormous amounts of information in several forms including text, video, graphics and sound.
This multi-media agglomeration or abstract space of information is generally referred to as the "World-Wide Web," which is technically a "wide-area hypermedia information retrieval initiative aiming to give universal access to a large universe of documents." To obtain access to the Vi'orld-Wide Web, a computer operator uses software called a browser. The most popular browsers in the United States are Netscape Navigator and Microsoft's Internet Explorer.
The operation of the Vi'eb relies on so-called hypertext for enabling user interaction.
Hypertext is basically the same as reeular text in that it may be stored., read, searched. and edited, with one important exception: a hypertext document contains links to other documents.
For instance, selecting the word "hyperte~-t" in a first document could call up, secondan~
.r documents to the user's computer screen, including, for example, a dictionary definition of "hypertext" or a history of hypertext. These secondary documents would in turn include connections to other documents so that continually selecting terms in one documents after another would lead the user in a free-associative tour of information. In this way, hypertext links or "hyperlinks" can create a complex virtual web of connections.
Hypermedia include hypertext documents which contain links not only to other pieces of text, but also to other media such as sounds, images and video. Images themselves can be selected to link to sound or documents.
The standard language the Web uses to create and recognize hypermedia documents is the HyperText Markup ("HTML") Language. This language is loosely related to, but technically not a subset of, the Standard Generalized Marb-up Language ("SGML"), a document formatting language used widely in some computing circles. Web documents are typically written in HTML and are nothing more than standard text files with formatting codes that contain information about layout (text styles, document titles, paragraphs, lists) and 1 S hyperlinks.
HTML is limited to display functions (text, animation, graphics, and audio) and form submission. Inherent in the basic HTh~, protocol (set of software-encoded rules governing the format of messages that are exchanged between computers) are design limitations that prevent the implementation of the type of program functionality that is commonly used in today's desktop computers. Because of this limitation, it is impossible to enhance HTML
documents with the features necessary to support the Internet applications currently being sought by industry and consumers.
Sun Microsystems and Netscape Communications have attempted to introduce additional program functionality through the implementation of Sun's Java programming language as a browser plug-in. Microsoft, in addition to supporting Java, has introduced Active-X as a browser plug-in. Currently, after two years of development, both Java and Active-X are still failing to deliver working software. These languages are plagued by software errors that crash the newer operating systems. Even the developers of these languages, Sun and Microsoft, are having major problems with Java and Active-X
applications that they have written to demonstrate the capabilities of the languages.
Java, Active-X and almost all other programming languages use a programming paradigm based on the "C" programming language introduced by AT&T in the 1970's to develop the L1TTIX operating system. Although well suited for operating system development, "C" has two major drawbacks for Internet content delivery. The first drawback is that an entire program must be loaded before anything can be executed using the program. Because Internet content is open-ended, most applications can become very large, making downloading impractical due to the limited bandwidth of most Internet connections. Typical Java and Active-X applications take several minutes to download before they start running. The second drawback using programs based in "C" is that content development is very inefficient. "C" and programming languages based on the "C" paradigm are currently used to produce software tools and utilities such as word processors, spreadsheets, and operating systems. Software developers can assign a large number of programmers to a long-term project, with the knowledge that repeated sales of the product to existing users will recover the large investment expenditure. However, developers of Internet content cannot afford this type of approach and have fallen back upon the very simple HTW., protocol to economize development.
However, even HTW, is inadequate to enable or facilitate the conducting of interactive programming on the Internet. Although well adapted to passively providing multimedia information, HTML is extremely limited in active and interactive software use and ..-development. Thus, companies seeking to conduct commercial activities on the Internet are seeking a programming tool or information-exchange methodology to replace HTML, or to provide major enhancement to that language. In contrast to applications programs based on the "C" paradigm, Internet applications programming is generally not subject to multiple uses.
Rather an Internet program is consumed: the program is used only once by the typical user.
Utilities-type software developed for individual computer use, such as word processors, spread sheets, E-mail, etc., can be sold at higher prices because the software is used again and again by any individual.
Programming languages based on the "C" programming paradigm are awkward for programming interactions involving the computer's display screen. For example, a Microsoft program for the manipulation of sprites (graphic images that can move over a background and other graphic objects in a nondestructive manner) requires over 800 lines of "C" code and over 290 lines of assembler code. The same program written in the TenCORE language requires only six lines.
TenCORE is a modular programming language designed in the early 1980's to facilitate the transfer of information between disk drives and RAM, particularly for the delivery of interactive instruction ("Computer-Based Training"); At that time, disk drives were all slow and RAM was inevitably small. In adapting to these hardware limitations, TenCORE
introduced the use of small individual code modules for performing respective functions, thereby enabling efficient performance as each code module loaded a single interaction from the slow disk drives. Programming in the form of substantially independent code modules is open-ended, a necessary characteristic for educational software requiring the deliven~ of whatever remedial instruction is required by the individual student. TenCORE
utilizes a program called an ''interpreter" that implements all basic required functions efficiently. The interpreter has no content itself. The content comes from an unlimited number of small pseudocode modules which are loaded into the system memory and issue commands to the interpreter. In writing a program, the programmer's involvement is reduced to simply issuing commands, leaving all the difficulties of implementation to the interpreter.
In contrast to TenCORE, "C" type programming includes a series of pre-written code libraries which are linked together as they are compiled. In theory, when a new microprocessor is designed, only the code libraries need to be rewritten and then all programs can be re-compiled using the new libraries. However, over the past twenty years the number of these code libraries has grown to a point where the original concept of rewriting for different microprocessors is no longer practical because of the difficulty in compensating for subtle differences between microprocessors. Vl'hat remains is a complex and difficult programming syntax that takes years to master and is very difficult to debug.
Objects of the Invention A general object of the present invention is to provide a method for communicating I 5 over a computer network.
A more particular object of the present invention is provide a method for enabling or facilitating the conducting of interactive programming over a computer network such as the Internet.
A related object of the present invention is to provide a method for communicating software over a computer network. to enable an increased degree of interactive computer use via the network.
Another object of the present invention is to provide a computing system for enabling or facilitating the conducting of interactive programming over a computer network such as the Internet.
*rB

It is a further object of the present invention to provide a computing system for communicating software over a computer network, to enable an increased degree of interactive computer use via the network.
These and other objects of the present invention will be apparent from the drawings and descriptions herein.
Summary of the Invention The present invention is directed to a computerized system and to an associated method for optimally controlling storage and transfer of computer programs between computers on a network to facilitate interactive program usage. In accordance with the method, an applications program is stored in a nonvolatile memory of a first computer as a plurality of individual and independent machine-executable code modules. In response to a request from a second computer transmitted over a network link, the first computer retrieves a selected one of the machine-executable code modules and only that selected code module from the memory and transmits the selected code module over the network link to the second computer.
In one important field of use of the invention, the first computer is a server computer on a network. The second computer may be a user computer or a secondary server.
Alternatively, the two computers may be two individual user computers on the network.
Where the second computer is a user computer, the request for the executable code module arises because the user needs the code module to perform a desired fimction in the applications program. The user's computer does not have all of the code modules of the applications program and obtains new code modules only as those modules are needed.
Because executable code of the applications program is broken dowm into individually executable modules, the program can be downloaded piecemeal, module by module, as the individual modules are needed by the user's execution of the program.
Accordingly, the user need not wait for the entire program to be downloaded before the user can start using the program.
Where the first computer and the second computer are a primary server and a secondary server, respectively, the present invention allows the primary server, when is too busy to handle a user request or task, to hand that request or task off to the secondary server.
When a primary server receives a user request or task that the server cannot handle due to load, that request or task is forwarded preferably to the least busy secondary server available.
The secondary server then processes the user request and responds to the client/user directly.
If the secondary server does not have a code module, data file, or other resource required to handle the user request, the required code module, data file, or other resource can be transferred to the secondary server from the first server. This shunting of user requests contemplates the utilization of multiple secondary servers located on different Internet connections. The present invention thus eliminates most bandwidth and server load issues on the Internet and other computer networks.
Of course, a server computer must shed its load before the server reaches its full capacity, thereby leaving enough system resources (processor, memory, etc.) free to fulfill any requests from a secondary server for resources necessary for the secondary server to fulfill a shunted user request or task.
If a secondary server is unable to contact the client machine, the secondary server can forward the user request to another secondary server for processing, since the other secondary server may be able to reach the client machine directly.
A secondary server may also serve as a backup server. In that case, the secondary server immediately requests all code modules, data files, and other resources from the primary server instead of waiting for a client request that requires one of those resources. When a client or secondary server makes a request of the primary server and discovers it to be inaccessible, the request can then be made of a backup server. In this way, if a primary server were to fail, the information that was on the primary server would still be accessible through the backup server. To facilitate the maintenance of up-to-date resources on backup servers, the primary server sends notification packets to each of the backup servers whenever a resource is created or updated. The backup servers can then request the new, updated copy of the resource from the primary server, thereby remaining up to date with the primary server at all times.
In order to optimize processing of user requests, a primary server stores in its memory a list of secondary servers on the network, the list including response times and load statistics (processor usage, etc.) for the respective secondary servers. The primary server periodically updates these response times, by sending echo packets to the secondary servers and measuring delays between the sending of the echo packets and a receiving of responses to the echo packets from the respective secondary servers. The server also periodically updates the load statistics by requesting the current load statistics from the secondary servers. For processing a recently received user request, the primary server scans the list in memory and selects the secondary saver having the lightest load and shortest response time.
For security purposes, code modules, as well as other resources such as data files, are transmitted in encrypted form. Encryption is accomplished by placing the code modules, files, documents or other transmittable resources in the data area of an encryption packet. Vfhen an encrypted packet is received, it is decrypted and the code modules. files.
documents or other transmittable resources subsequently handled pursuant to normal procedures.
The encryption/decryption process can be handled by a plug-in code module. Any number of plug-WO 99/07007 PCT/US9$/15627 ,..
in encryption code modules may exist in a data and code transfer system in accordance with the invention at any one time. The header of an encryption packet contains an indication of which plug-in encryption code module must be used for decryption purposes.
Encryption/decryption code modules can be delivered real time by a code module exchange protocol.
To further enhance the security of the system, the primary server stores a list of user authentification codes in its memory. Upon receiving a request, e.g., for a machine executable code module, from another computer, the primary server compares a user authentification code in the request with the stored list of user authentification codes. The primary server proceeds with retrieving and transmitting a selected machine-executable code module only if the user authentification code in the request matches a user authentification code in the stored list.
Where an incoming request for a machine-executable code module is contained in an encryption packet, the server decrypts the encryption packet prior to the comparing of the user authentification code in the request with the list of user authentification codes in the memory.
I S Encrypting and decrypting of encryption packets, as well as the checking of user authentification codes, may be performed by the secondary server(s). Vfhatever programming or data required for carrying out these security measures can be transmitted from the primary server in accordance with the present invention.
'The present invention provides for the updating of an applications program in users' machines. VVhen a user sends a request for a code module to a server, the request includes a specification of the version of the program code sought. The server processing the request checks whether the requested version is the latest version available. Vfhen a newer version of a requested code module is available, the server informs the user and inquires v~°hether the user could use the newer version of the requested module. The user could then send a request for the updated version of the desired code module.
If the updated version of the desired code module is incompatible with older versions of other code modules, the older version of the desired code module will be transmitted from the server to the user. If the older version is not available, the user may have to request 5 transmission of the newer versions of several additional modules.
Generally, it is contemplated that machine-executable code modules are written in a user-friendly programming code such as TenCORE. In that case, a software-implemented interpreter unit of the user computer translates the code modules from the programming code into machine code directly utilizable by the user computer. When such an interpreter is used, 10 the interpreter itself can be updated in the same fashion as an application program or code module. For purposes of updating the interpreter, the interpreter is treated as a single large code module.
In a related method in accordance with the present invention for optimally controlling storage and transfer of computer programs between computers on a network to facilitate interactive program usage, a portion of an applications program is stored in a first computer.
The applications program comprises a plurality of individual and independent machine-executable code modules. Only some of the machine-executable code modules are stored in the first computer. This method includes executing at least one of the machine-executable code modules on the first computer, transmitting, to a second computer via a network link, a request for a fixrther machine-executable code module of the applications program, receiving the further machine-executable code module at the first computer from the second computer over the network link, and executing the further machine-executable code module on the first computer.
To further facilitate program transfer on the network, the first computer may conduct an investigation into server availability. Pursuant to this feature of the invention, a request is sent from the first computer {e.g., a user) to a further computer (e.g., a primary server) for a list of servers (e.g., secondaries) on said network. After transmission of the list of server to the first computer, response times for the server are determined by (a) sending echo packets from the first computer to the servas, (b) measuring, at the first computer, delays between the sending and receiving of the echopackets, (c) querying the servers as to current server load (processor usage, etc.) The request for a further machine-executable code module is sent to the server having the lightest load and shortest measured response time. The list of servers can be cached in memory by the first computer to facilitate further access to the information in the event that the server from which the list was requested becomes unavailable or is too busy to handle the request.
In the event that there has been an update in a requested code module, a request from the first computer for a particular version of the code module may trigger an inquiry as to whether the first computer could use the updated version of the code module.
If so, the first computer transmits a second requests, this time for the updated version of the desired code module.
Where the two computers are both user machines, the method of the present invention facilitates interactive processing. Each computer executes one or more selected code modules in response to the execution of code modules by the other computer. Thus, both computers store at least some of the machine-executable code modules of the applications program.
Occasionally one computer will require a code module which it does not have in present memory. Then the one computer can obtain the required code module from the other computer. If the other computer does not have the required module, a request may be made to a server on which the applications program exists in its entirety.

Where the machine-executable code modules are written in a user-friendly programming code, each user computer includes an interpreter module implemented as ...
software-modified generic digital processing circuits which translates the code modules from the programming code into machine code utilizable by the respective computer.
In accordance with a feature of the present invention, the machine-executable code modules each incorporate an author identification. The method then further comprises determining, in response to an instruction received by a user computer over the network and prior to executing the one of the machine-executable code modules on the user computer, whether the particular author identification incorporated in the one of the machine-executable code modules is an allowed identification. The user computer proceeds with code module execution only if the particular author identification is an allowable identification. Generally, the instruction determining whether a code module is written by an allowed author is a list of blacklisted authors.
The author identification feature of the invention severs to prevent an author from creatine a virus or other malicious program and distributing it using the code module exchange protocols of the present invention. All compilers supporting the coding of individual machine-executable code modules in accordance with the present invention will incorporate a respective author identification code into each machine-executable code module. The author identification is unique to each author. When a malicious program is discovered, the identification of the author may be distributed throughout the network to blacklist that author and prevent the execution of code modules containing the blacklisted author's identification.
As an additional advantage, this feature will discourage users from distributing illegal copies of the authoring package, since the respective users will be held responsible for any malicious programs written under their author identification.

The storing of applications program modules in a user computer may include caching the code modules in a nonvolatile memory of the user computer.
It is to be noted that the present invention permits the transmission during user computer idle time of code modules whose use is anticipated. A request from the user computer is transmitted to a server or other computer for a machine-executable code module during an idle time on the user computer.
A computing system comprises, in accordance with the present invention, digital processing circuitry and a nonvolatile memory storing general operations programming and an applications program. The applications program includes a plurality of individual and independent machine-executable code modules. The memory is connected to the processing circuitry to enable access to the memory by the processing circuitry. A
communications lint: is provided for communicating data and programs over a network to a remote computer. A code module exchange means is operatively connected to the memory and to the communications link for retrieving a single code module from among the machine-executable code modules and transferring the single code module to the remote computer in response to a request for the single code module from the remote computer.
As discussed above, the computing system of the present invention may be a server computer on the network. The server's memory may contain a list of secondary servers on the network, the list including response times for the respective secondary servers, The computing system then further comprises a detection circuit, generally implemented as software-modified generic digital processing circuitry. for detecting an overload condition of the computing system. A server selector, also generally implemented as software-modified generic digital processing circuitry, is operatively connected to the detection circuit, the memory and the communications link for determining which of the secondary servers has a shortest response time and for shunting an incoming user request to the secondary server with the shortest response time when the overload condition exists at a time of arrival of the user request.
Thus, the remote computer transmitting a code-module request to the computing ..-system may be a secondary server to which a user request has been shunted. The requested single code module is required for enabling the remote computer to process the user request.
On behalf of the computing system.
Pursuant to another feature of the present invention, the computing system further comprises an updating unit, preferably implemented as software-modified generic digital processing circuitry, operatively connected to the memory and the communications lint: for ( 1 ) periodically sending echo packets to the secondary servers, (2) measuring delays between the sending of the echo packets and a receiving of responses to the echo packets from the respective secondary servers, and (~) updating the response times in the list in accordance with the measured delays.
For security purposes, the memory of the computing system may contain a stored list 1 S of user authentification codes. The computing system then includes a comparison unit, preferably implemented as software-modified generic digital processing circuitry, for comparing a user authentification code in an incoming request with the list of user authentification codes in the memory and for preventing code-module retrieval and transmission in the event that the user authentification code in the request fails to correspond to any user authentification code in the list.
Where incoming requests for code modules are contained in encryption packets, the computing system further comprises a software-implemented decryption circuit connected to the communications link and the comparison unit for decrypting the encryption packet prior to the comparing of the user authentification code in the request with the list of user authentification codes in the memory.
In accordance with another feature of the invention, the computing system includes means for determining whether a requested code module has an updated version and for responding to the request with an invitation to the remote computer to accept the updated 5 version of the requested code module.
It is contemplated that the machine-executable code modules are written in a user-friendly programming code. Where the computing system uses the applications code itself, the computing system further comprises an interpreter for translating the programming code into machine code directly utilizable by the processing circuitry. The interpreter may take the form 10 of generic digital processing circuit modified by programming to perform the translation function.
A computing system (e.g., a user computer on a network) also in accordance with the present invention comprises a memory storing a portion of an applications program having a plurality of individual and independent machine-executable code modules, only some of the 15 machine-executable code modules being stored in the memory. A digital processing circuit is operatively connected to the memory for executing at least one of the machine-executable code modules. A communications link is provided for communicating data and programs over a network to a remote computer. A code module exchange unit is operatively connected to the memory and to the communications link for communicating with a remote computer (e.g., a server on the network) via a network link to obtain from the remote computer a fi~rther machine-executable code module of the applications program. The digital processing circuitry is operatively tied to the code module exchange unit for executing the further machine-executable code module upon reception thereof from the remote computer.
When a client or user machine is not running at full capacity (processor idle time is over *rB

a given threshold and network traffic is under a given threshold), that machine can look for other client machines on the same virtual network that may be in the midst of a processor-intensive task and take on some of the load. If necessary, the code modules to handle that task can be transferred to the idle client machine. It is possible for clients working together on the same project to communicate with each other using a custom sub-protocol. This client-side distributed processing significantly improves the performance of processor-intensive tasks.
The present invention provides a programming paradigm which addresses the Internet content developer's specific needs A software system and computer communications method in accordance with the present invention delivers rapidly over the Internet, provides a practical programming paradigm that supports rapid economical development of content, and facilitates new capabilities in Internet software and systems management.
TenCORE, a modular programming language designed to use small efficient code modules for facilitating program transfer between disk drives and central processing units of desl.-top computers, may be easily modified to carry out the present invention. Minimal modifications require the adapting of the transfer capabilities to work over network links.
The present invention arises in pan from the realization by the inventors that the problems facing the developers of TenCORE in 1980 are the same problems that software designers face today when dealing with the Internet and its limited bandwidth and slow connections. It was perceived that Internet applications must be open-ended and programming must be delivered rapidly in spite of bandwidth limitations. Thus, the solution provided by TenCORE is useful in solving today's problems with interactive software on the Internet. The modular programming of TenCORE enables rapid Internet performance because a single TenCORE Net programming module can be quickly downloaded over the Internet.
The TenCORE Net programming modules are TenCORE programming modules which are modified to enable downloading from Internet servers instead of from a microcomputer's disk drive.
TenCORE and TenCOItE Net are interpreted languages, i.e., they serve to translate into machine language pseudocode programs and to perform the indicated operations as they are translated. "Pseudocode" is unrelated to the hardware of a particular computer and requires conversion to the code used by the computer before the program can be used. Once the TenCORE Net interpreter is installed on a computer equipped with an Internet connection, clicking with a mouse on a conventional World-Wide Vfeb hyperlink that points to a TenCORE Net application automatically bypasses the Internet browsing software and launches the application. Because only the required modules are sent over the Internet and because the TenCORE Net modules are very small, Internet performance is very fast.
Brief Description of the Drawine Fig. 1 is a block diagram of a computer network with various servers and user computers. which transmit executable programs to one another pursuant to the present invention.
Fig. 2 is a block diagram of a primary server in accordance with the present invention.
Fig. 3 is a block diagram of a user computer in accordance with the present invention.
Fig. 4 is a flow chart diagram illustrating a maintenance loop in the operation of selected program-modified processing circuits in the primary server of Fig. 2 and the user computer of Fig. 3.
Fig. 5 is a flow chart diagram illustrating a loop for processing an incoming data packet in the operation of selected program-modified processing circuits in the primary sen~er of Fig.
2 and the user computer of FIB. 3.
Figs. 6A and 6B are a flow chart diagram illustrating further operations relating to the *rB

processing of an incoming request for a code module in accordance with the present invention.
Fig. 7 is a flow chart diagram illustrating a subroutine for processing an incoming resource request packet in the operation of selected program-modified processing circuits in the primary server of Fig. 2 .
Fig. 8 is a flow chart diagram illustrating a maintenance loop in the operation of selected program-modified processing circuits in the primary server or a secondary server of Fig. 2.
Fig. 9 is a flow chart diagram illustrating a subroutine for processing an incoming resource request packet in the operation of selected program-modified processing circuits in the primary server of Fig. 2 .
Fig. 10 is a flow chart diagram illustrating a maintenance loop in the operation of selected program-modified processing circuits in the primary server or a secondary server of Fig. 2.
Description of the Preferred Embodiments I 5 As illustrated in Fig. 1, a computer network comprises a plurality of user computers 12 operatively connected to a primary server computer 14 via a complex of network links 16.
'The primary server 14 stores, in an area 18 of a nonvolatile memory 20 (Fig.
2), an applications program which may be desired for use on one or more user computers 12. 'The term ''applications program' as used herein refers to any executable collection of computer code other than operating systems and other underlying programming for controlling basic machine functions.
As further illustrated in Fig. 1, the network includes a plurality of secondary servers 22 which are available for assisting primary server 14 in responding to requests from user computers 12. More particularly, as shown in Fig. 2, primary computer 14 includes an w overload detector 24 which continually monitors a queue of jobs or tasks which primary server 14 has to perform. Overload detector 24 determines whether the number and size of tasks in the queue has exceeded a predefined threshold. Once that threshold is reached, overload detector 24 signals a secondary server selector 26 which accesses an area 28 of memory 20 to identify a secondary server 22 which is least busy. To that end, memory area 28 contains a list of secondary servers 22 as well as measured response times for the respective servers.
The response times in the secondary-server list in memory area 28 are periodically measured by dispatching echo packets to each secondary server 22 and measuring the delays between the transmission of the respective echo packets from primary server 14 and the receipt of responses from the respective secondary servers 22. To accomplish the measurement, primary server 14 and, more particularly, a processing unit 30 thereof contain an echo packet dispatcher 32 and a response-time monitor 34. Upon transmitting an echo packet to a secondary server 22 via a network communications interface 36 at primary server 14, dispatcher 32 notifies response-time monitor 34 as to the transmission of a packet and as to the secondary server 22 to which the transmission was made. Monitor 34 counts out the time between the transmission of the echo packet and the arrival of a response from the respective secondary server 22 via network links 16 and communications interface 36. A
response-time update unit 38 is connected to response-time monitor 34 and to memory area 28 for writing updated response times in the secondary server list stored in memory area 28.
The applications programs store 18 in memory 20 contains a multiplicity of individual and independent machine-executable code modules. Accordingly, a user computer 12 working with the applications program need not be loaded with the entire program in order to begin processing operations. In the event that the user's execution of the applications program requires a code module not contained in the user's computer memory, a request is transmitted WO 99/070(17 PCT/US98/15627 from the user computer 23 over network links 16 to primary server 14. If primary server 14 is not overloaded, it retrieves the requested code module from program store 18 and transmits it over communications interface 36 and network links 16 to the user computer which made the request.
5 Processing unit 30 of primary server 14 includes a code-module exchanger 40 which processes incoming requests for code modules of the applications program or programs stored in memory area 18. Exchanger 40 cooperates with a version detector 42 which consults the applications program store 18 to determine whether a requested version of a particular code module is the latest version in store 18. If not, version detector 42 and code module exchanger 10 40 transmit an inquiry to the resting computer as to whether the latest version of the desired code module is utilizable by the requester. If the newer version of the desired code module can be used in place of the older version, the newer version is transmitted over communications interface 36 and network links 16.
Code modules, as well as other resources such as data files, may be transmitted in 15 encrypted form for security purposes. Encryption is accomplished by placing the code modules, files, documents or other transmittable resources in the data area of an encryption packet. When an encrypted packet is received by processing unit 30 via communications interface 36, the packet is forwarded via generic processing circuits 50 to an encryption/decryption unit 44 for deciphering. Encryption/decryption unit 44 consults a 20 memory area 46 containing a plurality of possible encryption keys and selects an encryption key identified by header information in the encryption packet containing the user request.
Upon decryption of the incoming encryption packet, the user request or code module exchange packet contained therein is forwarded to code-module exchanger 40 for processing. The encryption/decryption process can be handled by a plug-in code module performing the functions of encryption/decryption unit 44 and memory area 46. Any number of plug-in encryption code modules may exist in a data and code transfer system at any one time. The header of an encryption packet contains an indication of which plug-in encryption code module must be used for decryption purposes.
To further enhance the security of a computer network which has protocols for the exchange of executable code modules, primary server 14 stores a list of user authentification codes in a memory area 48. In response to a request, e.g., for a machine-executable code module, from another computer, comparator 52 in processing unit 30 compares a user authentification code in the request with the list of user authentification codes stored in memory area 48. Code module exchanger 40 proceeds with retrieving and transmitting a selected machine-executable code module only if the user authentification code in the request matches a user authentification code in the stored list. Where an incoming request for a machine-executable code module is contained in an encryption packet, encryption/decryption unit 44 deciphers the encryption packet prior to the comparing by comparator 52 of the user authentification code in the request with the list of user authentification codes in memory area 48. Where a user request is relayed to a secondary server 22 chosen by selector 26, the secondary server incorporates an encryption/decryption unit and an authentification-code comparator for encrypting and decrypting of encryption packets and the checking of user authentification codes, may be performed by the secondary server(s). Whatever programming or data required for carrying out these security measures can be transmitted from primary server 14 to the selected secondary server 22.
As illustrated in Fig. 3, a processing unit 54 of a user computer 12 includes a code-module exchanger 56 which generates requests for desired code modules of an applications program as those code modules are required during execution of the applications program by the user. The code-module requests are transmitted to code-module exchanger 40 of primary server 14 via a network communications interface 58 at user computer 12, network links 16 {Fig. 1 ) and communications interface 36 at primary server 14.
In a security enhanced system, processing unit 54 of user computer 12 includes a encryption/decryption unit 60 which inserts code-module request packets, as well as other information transfer packets, into the data areas of respective encryption packets whose encryption keys are selected from a plurality of keys stored in an area 62 of a nonvolatile memory 64 of user computer 12. Again, the encryption/decryption process at user computer 12 can be handled by a plug-in code module performing the functions of encryption/decryption unit 60 and memory area 62. The header of an encryption packet generated by encryption-decryption unit 60 contains an indication of which plug-in encryption code module at primary server 14 must be used for decryption purposes.
In a further security enhancement used to protect the computing system of Fig.
1 in general and user computer 12 in particular from computer viruses and other malicious programming, processing unit 54 is provided with an author identification comparator 66 which accesses an author identification list 68 in memory 64. Author identification list 68 is periodically updated by author identification comparator 66 and other function-converted blocks in generic processing circuits 70 in response to incoming instructions from primary server 14. Author identification fist 68 contains a list of allowed authors or, perhaps more efficiently, a list of authors who have been blacklisted owing to their passing of viruses or other malicious programming onto the network. Prior to the use of an incoming machine-executable code module. The author identification in a packet header is checked by comparator 66 to determine that the author of the particular code module has not been blacklisted. If the author is allowed to produce executable code modules for user computers 12, processing of the ...
incoming code module proceeds normally. If, on the other hand, the author of the incoming code module has been blacklisted, then the code module is never executed and may be discarded prior to storage in an applications program store 72 in memory 64.
As discussed above with reference to Figs. 1 and 2, primary server 14 may occasionally hand off an incoming user request to a secondary server 22, depending on the load condition of the primary server and the secondary servers. Generally, this handing off of responsibility for responding to users' requests is transparent to the users, i.e., the processing of users' requests proceeds without knowledge or intervention by the users. It is also possible for user computers 12 to take over selection of a secondary computer 22 from primary computer 14.
To that end, processing unit 54 of user computer 12 is provided with a secondary server selector 74 which accesses a list 76 of secondary-servers in memory 64.
Generally, selector 74 selects a secondary server 22 with a smallest response time relative to the respective user computer 12. To that end, processing unit 54 further includes an echo packet dispatcher 78, a response-time monitor 80 and a response-time update unit 82. Dispatcher 78 sends echo packets to secondary servers 22 via communications interface 58 and network links 16 {Fig.
1 ), while monitor 80 determines the delays of responses from the various secondary servers.
Update unit 82 corrects response time data in list 76 in accordance with measurements carried out by dispatcher 78 and monitor 80. It is contemplated that the updating of secondary-server response times in list 76 is implemented only when user computer 12 requires a user module or other resource from primary server 14 and that server is too busy to handle the user request.
Processing unit 54 of a user computer 12 has a distributed processing circuit 84 which enables processing unit 54 to share the processing of large tasks with other user computers in the network. Thus, when a user computer is not running at full capacity (processing unit 54 is more than 50% idle and there is no network traffic), that distributed processing circuit 84 looks for other user computers 12 that may be in the midst of a processor-intensive task and enable transfer of some of the load to the processing unit 54 of the respective user computer 12. If necessary, the code modules to handle that task can be transferred to the idle user ...
computer 12. This client-side distributed processing significantly improves the performance of processor-intensive tasks.
Processing unit 54 of a user computer 12 also contains a metered delivery and billing circuit 86 which controls access to content which must be paid for. Credit registers 88 in memory 64, accessible by circuit 86, store credits which the particular user has against respective accounts. When credit in an account maintained or monitored by primary server 14 is low, circuit 86 may arrange for the transfer of more credit from primary server 14 to the particular user. Metered delivery and billing circuit 86 includes a billing method to pay for the credit. Generally, credit requests and responses thereto should be encrypted.
Processing unit 54 of a user computer 12 additionally includes a unidirectional data submission and collection circuit 90 which accesses data files 92 in memory 64 for purposes of uploading those data files to primary server 14 or to a selected secondary server 22. Data submission and collection circuit 90 is operative when the user computer does not need to read the data back from the server. 'This circuit is particularly useful for on-line orders, form submission, and data collection (including statistical data) among other things.
Generally, packets that contain data to be written must be sent directly to the primary server 14 and cannot be shunted. This prevents conflicts between different versions of the resource that was written to. Data written back to the server should require user authentification. User authentification should be used even if the write-back will be done only by a program under author control. In that case, user identification codes and passwords can be built into the program. 'The reason for this is to prevent another author from writing a WO 99/07007 PCT/US98/1562~
program that would write back to the same data and possibly corrupt it.
Applications program code modules stored in memory area 18 (Fig. 2) and module store 72 (Fig. 3) are written in TenCORE, a modular programming language originally designed to use small efficient code modules for facilitating program transfer between disk ,..
5 drives and central processing units of desktop computers. TenCORE is easily modified, for example, to adapt the code transfer capabilities to operate over network links. The program so modified for use on user computers 12, primary server 14 and secondary servers 22 may be called "TenCORE Net."
TenCORE Net uses small individual code modules for performing respective functions, l0 thereby enabling efFlcient performance as each code module is downloaded a single interaction from primary server 14 or a selected secondary server 22. Programming in TenCORE Net is open-ended, so that a user computer 12 executes instructions of an applications program when that applications program is only partially stored in program store 72 of memory 64.
The code modules held in memory store 72 are in a user-friendly pseudocode language 1 S which must be translated or interpreted for direct machine use. To that end, processing unit 54 includes a program or programmed interpreter circuit 94 that implements all basic required functions efficiently. The interpreter has no content itself. Content is derived from a potentially unlimited number of small pseudocode modules which are loaded into memory store 72 and which effectively issue commands to interpreter 94. In writing a program, the 20 programmer's or author's involvement is reduced to simply issuing commands, leaving all the difficulties of implementation to the interpreter.
TenCORE may be modified in two ways to enable network use. First, a subroutine or set of instructions may be inserted before each call line of computer code for checking whether the code intended for execution exists in applications program memory area 72.
If not, code ..-module exchanger 56 is instructed to obtain the required code module from primary server 14.
Once the required code module has been downloaded into memory area 72, it is called and translated by interpreter circuit 94 prior to execution by processing circuits 70.
Through the use of modular applications programs and code-module exchangers 40 and 56, the control of computer program storage and transfer between computers 12, 14, 22 on a network is optimized, thereby facilitating interactive program usage. An applications program stored in nonvolatile memory area 18 of primary server 14 may be transferred to various user computers 12 in modular fashion. In response to a request transmitted over network links 16 from a user computer I2 or a selected secondary server 22, primary server 14 retrieves a selected machine-executable code module and only that selected code module from memory area 18 and transmits the selected code module over network links 16 to the user computer or secondary server.
Where the applications program is, for instance, a drawing or painting program, a user computer 12 may be instructed to draw a three-dimensional geometric figure such as a truncated pyramid. If processing circuits 70 discover that the applications program in program store 72 is missing a code module required for performing that task, code module exchanger 56 requests that the requisite module be transferred from primary server 14.
In response to that request, version detector 42 may find that a later version of the desired module exists and inquire of code-module exchanger 56 whether the later version would be acceptable for use by the respective user computer.
Thus, user computers 12 do not have all of the code modules of the applications program and obtain new code modules only as those modules are needed. Because executable code of the applications program is broken down into individually executable modules, the program can be downloaded piecemeal, module by module, as the individual modules are needed by the user's execution of the progam. Accordingly, the user need not wait for the entire progam to be downloaded before the user can start using the progam.
Similarly, a selected secondary server 22 can begin to process a transferred or shunted user request and respond to the client/user directly, without having the entire applications program and other resources relating to the handling of the progam's distribution by the primary server 14. If the selected secondary server does not have a code module, data file, or other resource required to handle the user request, the required code module, data file, or other resource can be transferred to the secondary server from the primary server. Secondary servers 22 are thus provided with code module exchangers similar to exchangers 40 and 56.
Of course, primary server 14 must shed its load before that server reaches its full capacity, thereby leaving enough system resources (processor, memory, etc.) free to fulfill any requests from a secondary server for resources necessary for the secondary server to fulfill a shunted user request or task.
In security sensitive networks, secondary servers 22 are equipped with I S encryption/decryption units like unit 44, as well as authentification comparators 52. Where an incoming request for a machine-executable code module is contained in an encryption packet, the secondary server decrypts the encryption packet prior to the comparing of the user authentification code in the request with a list of user authentification codes in memory.
Whatever progamming or data required for carrying out these security measures can be transmitted from primary server 14.
If a secondary server is unable to contact the client machine, the secondary server can forward the user request to another secondary server for processing, since the other secondary server may be able to reach the client machine directly.
Code module exchanger 56 of processing unit 54 facilitates interactive processing on a .r network. Each user computer 12 executes one or more selected code modules in response to the execution of code modules by the other computer. Thus, both computers store at least some of the machine-executable code modules of the applications program.
Occasionally, one computer will require a code module which it does not have in present memory.
Then the one computer can obtain the required code module from the other computer. If the other computer does not have the required module, a request may be made to a server on which the applications program exists in its entirety.
Thus, clients or users on a network are able to exchange code modules with one another. If a first user and a second user are engaged in an interactive whiteboarding session and the first user starts drawing with a tool that the second user does not have in her version of the whiteboarding program, the code module or modules for that tool can be transferred automatically from the first user's computer to the second user's computer.
It is to be noted that code module exchanger 56 may be instructed to initiate the transmission during user computer idle time of code modules whose use is anticipated. A
1 ~ request from the user computer 12 is transmitted to primary server 14 or other computer for a machine-executable code module during an idle time on the user computer.
Resource requests that are generated for idle-time downloading should be flagged as such, so that code module exchanger 56 can assign different priorities from standard requests for load balancing and distribution purposes. The status of a resource request can be upgraded to real time from idle time in the event that the user attempts to access the associated section of the application.
It is to be noted that the various dedicated function blocks of processing units 30 and 54 are generally and preferably implemented as software-modified generic digital processing circuits. Accordingly, code-module exchanger 40 and 56 are characterizable as protocols for the exchange of code modules between a server 14 or 2? and a user computer 12.
This code module exchange protocol is considered a subprotocol of a Modularized Code Master Protocol ("MCMP") which handles load distribution, user authentification and encryption.
Load distribution is more particularly handled in primary server 14 by processor overload detector 24 and secondary-server selector 26, while user authentification and encryption are handled in primary server and secondary servers 22 by comparator 52 and encryption/decryption unit 44.
The MCMP has four subprotocols, namely, the Code Module Exchange Protocol ("CMXP"), the Uni-Directional Data Submission and Collection Protocol ("UDSCP"), the Metered Delivery and Billing Protocol ("MDBP"), and the Distributed Processing Protocol (DPP"). The Code Module Exchange Protocol is realized by code-module exchanger 40 in processing unit 30 of primary server 14 and secondary servers 22 and by code-module exchanger 56 in processing unit 54 of user computers 12. The Uni-Directional Data Submission and Collection Protocol is implemented by circuit 90 in user computers 12 and by corresponding non-illustrated program-modified processing circuitry in primary server 14.
The Metered Delivery and Billing Protocol finds realization by circuit 86 in user computers 12 and by corresponding non-illustrated program-modified processing circuitry in primary server 14. The Distributed Processing Protocol takes the form of circuit 84 in processing unit 54 of user computers 12.
Fig. 4 illustrates operations undertaken by echo dispatcher 32, response-time monitor 34,, and update unit 38 as well as other processing circuits of processing unit 30 of primary server 14 to maintain an updated list 28 of the availability of secondary servers 22 . The same steps may be performed by echo dispatcher 78, response-time monitor 80, and update unit 82 as well as other processing circuits of processing unit 54 of user computer 12 to obtain an updated list of secondary server response times. In an inquiry 100, echo dispatcher 32 or 78 or generic processing circuits 50 or 70 query whether the time since the last echo testing is greater than a predetermined maximum period TMR. If the maximum period has been exceeded, echo packet dispatcher 32 or 78 transmits, in a step 102, an echo packet to the secondary server 22 which was tested the least recently. Response-time monitor 34 or 80 5 determines in an inquiry I 04 whether a response has been received from the targeted secondary server 22. If a response has not been received and if a prespecified number of measurement attempts has not been exceeded, as determined at a decision junction 106, another echo packet is dispatched in step 102. If a response is received from the targeted secondary server 22, update unit 38 or 82 then records, in list 28 or 7b, the time between the initial packet 10 transmission by dispatcher 32 or 78 and the receipt of the echo packet by monitor 34 or 80.
This recordation is effected in a step I 08. If the number of attempts at secondary-server response-time measurement has exceeded the pre-specified number, as determined at decision junction 106, the server is marked in list 28 or 76 as being unavailable (step 110). Also a message or alert signal may be generated to inform a server overseer. If at query 100, it is 15 determined that the time since the last echo testing is less than predetermined maximum period TMR, processing unit 30 or 54 investigates at 112 whether there is a packet in a MCMP
incoming packet queue. If not, the maintenance loop of Fig. 4 is re-entered.
If so, a packet processing operation 114 is executed. It should be noted that the MCMP
incoming packet queue contains both packets received from the network, and packets placed into the queue by 20 the MCMP protocol.
Figs. 6A and 6B illustrate operation I 14 carried out under the MCl~~ protocol by processing unit 30 of primary server 14 or of a secondary server 22 selected for overflow handing. In an initial inquiry 124, overload detector 24 decides whether processing unit 30 is too busy to handle the incoming packet (which may be, for example, a user request for a code ...
module). If so, processing circuits 50 investigate the MCMP packet header at a junction 126 to determine whether the packet can be shunted to a secondary server 22. If so, a further investigation 128 is conducted to determine whether the incoming packet has already been shunted. If the packet was sent to the server directly by the originating computer {i.e., not shunted), secondary-server selector 26 accesses list 28 in a step 130 to find the secondary server 22 with the lightest load. At a subsequent inquiry 132, processing unit 30, and more particularly, server selector 26, determines whether the selected secondary server is suitable for transfer of responsibility for the incoming packet. If the selected secondary server is suitable, the packet is flagged as the result of a service hand-off and forwarded to the selected secondary server (step 134).
If the secondary server selected in step 130 is not suitable for a hand-off, for example, if the response time of the secondary server is greater than a predetermined maximum, as determined at inquiry 132, a query 136 is made as to whether an incoming packet is the result of a service hand-off. This inquiry 136 is also made if the packet cannot be shunted, as determined at decision junction 126.
If an incoming MCMP packet is the result of a service hand-off, as determined at query 136; processing circuits 50 undertake an investigation 138 as to whether the requested resource is available. If the resource is available, processing circuits 50 ask at 140 whether the resource has passed a pre-assigned expiration date. If so, a signal is transmitted in a step 142 to the source of resource to determine if a newer version of the resource is available. If a new version is available, as ascertained at a decision junction 144. a request for the newer version of the resource is transmitted to the source in a step 146. This request is flagged as non-shuntable and should be additionally flagged as a priority request.
Prior to the processing of an incoming packet, e.g., a user request for a code module, processing unit 30 examines the header information in the incoming packet at an inquiry 150 to determine whether the packet contains user authentification information. Where user authentification information is found, the former encryption status of the packet is determined at 152. If the packet was not encrypted, a message is generated in a step 154 to report that the user authentification failed. If the incoming packet was encrypted, the MCMP
header information is checked at 156 to determine if the source server is specified.
If there is no source server specification, user authentification failure is reported in step 154. If there is a source server specified in the MCMP header information and if that source server is not the host server, as determined at a decision junction 158, an investigation 160 is conducted (by authentification code comparator 52) as to whether memory area 48 has a non-expired, cached copy of the user authentiftcation data. If there is no non-expired, cached copy of the user authentification data in memory area 48, comparator SZ induces processing circuits 50 to obtain the user's authentification data from the source server and to store that data in memory area 48 (step I62). If a user's password contained in the MCMP packet header information does not match the cached password, as determined by comparator 52 in an evaluation 164 or if the user is not listed with the source server, as discovered by processing circuits 50 at a check point 166, the user authentification is reported as failed in a step 168. A report as to user authentification failure (step 154) is also made if the source server is the host server (decision junction 158) and if comparator 52 finds in an investigation 170 that the user authentification data in the packet header does not correspond to any user authentification data in memory area 48.
Once comparator ~3 finds a match between the authentification code in an incoming packet and the user's authentification code in memory area 48, as determined in investigation 170 or in evaluation 164, or if the incoming packet did not contain a user authentification code, then evaluation 171 determines whether the packet should be handled directly by the MCMP
protocol, or by another protocol. If evaluation 171 determines that the packet should be handled by the MCMP protocol directly, then the packet is processed accordingly at a step 173 as illustrated in Fig. 5. If evaluation 171 determines that the packet should be handled by a specific protocol, then processing circuits 50 determine in a step 172 which protocol (e.g., CMXD, UDSCP, MDBP, DPP) is appropriate for handling the content of the packet.
If a response is produced by processing unit 30 under the selected protocol or by the main MCMP
protocol, as determined in an inquiry 174, that response is tranenutted in a step 176 to the client that originally made the request. If there was a service handofF, that is, if the packet was shunted to the host server; then the response will be transmitted to a computer other than the computer from which the host received the packet. . In a step 178, processing unit 30 begins processing the next packet in the queue or waits for a new packet to arrive.
As shown in Fig. ~, processing operation 173 includes an initial inquiry 116 into the type of packet. If the packet is an encryption packet, encryptionldecryption unit 38 or 60 is activated in a step 118 to decrypt the packet using the appropriate decryption module or key.
In a subsequent step 120, the packet encased in the data area of the encrypted packet is flagged as non-shuntable and placed back into the MCMP incoming packet queue. If it is determined at inquiry 116 that the packet is not an encryption packet, an MCMP status report indicated an unknown packet type is issue in a step 122 and the packet is discarded. The functionality of the MCMP protocol may be enhanced at a later time by enhancing the process illustrated in Fig. 5 to include conditions for additional types of packets.
The Code Module Exchange Protocol (CMXP) handles dynamic downloading of executable code, program version control, client-to-client module exchange, virus and malicious program protection, data uploading, idle-time dowloading, and code module *rB

..
caching. These functions are variously performed in servers 14 and 22 by code module exchanger 40 and version detector 42 and in user computer 12 by code module exchanger 56, author identification comparator 66, and unidirectional data submission and collection circuit 86, as well as by various nondesignated generic processing circuits 50 and 70.
The server-side portion of the CMXP protocol, as implemented in part by code module exchanger 40, handles the delivery of code modules and supporting resources such as graphic images and fonts.
Requests to the CMXP server and to code module exchanger 40 can reference a file, a portion of a file (such as a code module), or a portion of a code module or other supporting module.
Because programs are broken down into separate code modules, these code modules can be delivered on an as-needed basis, eliminating the need to download an entire program before execution thereof can commence.
There are several ways of accommodating or incorporating an upgrade where programs are delivered piecemeal, module by module. If the old and new versions are completely compatible (for example, the new version was generated as the result a fix to a typographical error in a dialog box), the new modules can be merged with the old modules.
Version information is stored on a per-file basis as well as a per-code-module basis.
This means that code modules which were not changed in a version upgrade do not need to be downloaded again. If the old and the new versions are not compatible and cannot be merged, and the entire program has been cached locally or is still available from the server, the old version of the program can continue to execute until the next time the program is restarted.
If the old and the new versions are not compatible and cannot be merged, and the old version of the program is no longer available in its entirety, the program should be immediately terminated and restarted using the new version code modules. The author of a program can override any of these update procedures by including a custom update module in the new version of the program,.

This code module is downloaded (if necessary) and executed whenever a version conflict arises. Then, an election can be made to perform any of the above procedures or a custom procedure such as remapping the contents of the program's memory area so that they can be used by the new version.
5 Code modules and associated resources are cached by both user computers 12 and secondary servers 22. The caching rules can be incorporated into the CMXP
protocol andlor the applications program itself. This allows custom caching rules to be built into an application, thus providing for special caching schemes and hybrid applications. When a code module download is in progress, the number of bytes completed is stored in the cache along 10 with the actual data downloaded. If a download is interrupted, it can resume where it left off at a later time.
Fig. 7 illustrates operations executed by digital processing circuits of processing unit 30 which are functionally modified in accordance with the CMXP protocol. The operations include a check on author identification. Generally, the author blacklist in memory area 68 of 15 user computers 12 is transmitted to the user computers from a server which undertakes maintenance operations to keep the list updated (Fig. 8).
As illustrated in Fig. 7, processing circuits 50 inquire at 180 whether an incoming packet constitutes a request for a resource. An ai~rmative answer to this inquiry leads to a further inquiry 182, as to whether the requested resource is available for anonymous access. If 20 the resource is restricted, a determination 184 is made as to whether the requesting user has rights to access the requested resource. If the user has no such rights, an "access denied"
message is returned to the requester in a step 186. If the requested resource is available to the requesting party, processing circuits 50 determine at a decision junction 188 whether the requested resource contains executable code. An affirmative determination causes a query 190 WO 99/07007 PC'T/US98115627 as to the validity of the author's fingerprint. If the fingerprint oi- author identification is invalid, a message is generated for a responsible party in a step 192. The local copy of the resource is deleted in a subsequent step 194 and a message "Resource Distribution Prohibited" is transmitted to the requesting party in a step i 96.
If in response to query 190 it is found that the fingerprint of the author of the requested resource is valid, then a check 198 is made as to whether the author is blacklisted. A
blacklisting leads to deletion of the local copy of the resource in step 194 and the issuance of the message "Resource Distribution Prohibited" in step 196. If the author is not blacklisted, or if the requested resource does not contain executable code, as determined at decision junction I O 188, then the processing unit 30 queries at 200 whether the client already has an up-top-date copy of the resource. If the client or user already has the latest version of the resource, a message to that effect is transmitted in a step 202. If the client or user's copy of the resource is an older version, the requested resource is transmitted to the client in a step 204.
If an incoming packet does not constitute a request for a resource, as ascertained in response to at inquiry 180, an investigation 206 is made as to whether the packet constitutes a request to modify a resource. If so, and if the resource is not available for anonymous modification, as determined at a decision junction 208, then processing unit 30 queries at 210 whether the user has rights to modify the resource. If the user has no such rights, then a message "Access Denied" is returned to the requester in a step 212. If the resource is available for modification by anybody (decision junction 208) or by the particular user (query 210), the processing unit 30 makes the requested modification to the resource in a step 214 and notifies key secondary servers, in a step 216, of the change to the resource.
If an incoming packet does not constitute a request for a resource, as ascertained in response to inquiry 180, and is not a request to modify a resource, as determined in investigation 206, then the processing unit 30 checks at 218 whether the packet is an update to a prohibition list, for example, a list of prohibited users or blacklisted authors. If the packet is such an update and is encrypted, as determined at decision junction 220, then the processing unit 30 determines at an inquiry 222 whether the packet was sent under the system user account. If so, the cached copy of the prohibition list is updated in a step 224 and all secondary servers are notified of the update in a step 226. If an incoming update request is not encrypted (decision junction 220) or is not sent under the system user account (inquiry 222), then an alert message is issued to an appropriate party in a step 228. In a step 230, a special status report is issued if an unknown packet type is received.
In a CMXP maintenance loop, shown in Fig. 8, for updating a list of blacklisted authors, processing unit 30 asks in an initial query 232 asks whether the time since the last list update is more than a predetermined number of hours. If that much time has passed, an attempt 234 is made to contact the next server upstream of the server conducting the inquiry.
If that server cannot be contacted, as determined in a scan 236, a check 238 is made as to whether there are other servers available. If another server is available, an attempt 240 is made to contact that server. If no server can be contacted, the time is again checked, at 242. If a predetermined interval has lapsed since the last update, then an alert is provided to an appropriate party in a step 244.
If a server can be contacted, as ascertained in scan 236, the date of the last modification of the prohibition list is obtained from that server in a step 246. In a comparison 248, the processing unit 30 then determines whether the prohibition list has been modified since the list was cached by the processing unit. Where such a modification has occurred, a copy of the prohibition list is obtained in a step 250. The encryption status of the obtained list is investigated at 252. If the copy of the prohibition list. Finding a nonencrypted copy of the ...
prohibition list leads to an alert status in a step 254, while an encrypted packet is investigated at 256 to determine with the packet was sent under the system user account. A
properly sent packet results in an update of the cached copy of the prohibition list in a step 258 and a notification of the update to all servers in a step 260.
There are two primary methods for submitting or collecting data via the Uni-Directional Data Submission and Collection Protocol ("UDSCP"). Pursuant to the first method, submissions can be directed to either a primary server 14 or a secondary server 22.
All submissions are then collected at a central server, where the submissions are processed by an application-specific server-side module. This method would be particularly useful for collecting all form submissions on one server where they can be incorporated into a LAN-based mail system. In the second method, a submission can be again directed at either a primary server 14 or a secondary server 22. The submissions are collected on the servers to which they were originally submitted (or are shunted using the standard load collection rules).
The submissions are then processed by an application-specific server-side module. This module could, for example, e-mail all of the submissions to an Internet e-mail address.
Fig. 9 illustrates program steps undertaken by digital processing circuits of processing unit 30 which are functionally modified in in accordance with the UDSCP
protocol. These circuit handle data submissions transmitted from user computers 12, particularly from unidirectional data submission and collection circuit 90 of processing unit 54, and from other servers. In a first inquiry 262, the processing unit 30 inquires whether an incoming packet is a data submission. If so, another inquiry 264 is made as to whether the data has to be collected immediately. If immediate collection is called for, the next question 266 entertained by the processing unit 30 is whether the data has to be collected at the source server. If not, the packet is passed in a step 268 through to a module that handles the final data collection: This module handles e-mailing the submission, recording it in a database, writing it to a file, or preforming any other necessary server-side task with the data. Subsequently, in an investigation 270, it is checked whether the request has been processed by the data collection module. If so, the packet is removed in a step 272 from the UDSCP submission processing queue, assuming that is where the packet was obtained. Then a status report is issued at 274 indicating successful data packet transmission. If investigation 270 reveals that the request has not been processed by the data collection module, the processing unit 30 questions at 276 whether the failure to process was due to a possibly temporary condition. If the answer to this question 276 is negative, a status report 278 is issued describing the error condition. If the answer to the question 276 is affirmative, a status report 280 is issued describing the condition and indicating the possibility of delay in processing the data. The packet is then added in a step 282 to the UDSCP processing queue.
If an incoming packet is a data submission which does not have to be collected immediately, as determined at inquiries 262 and 264, a status report 284 is issued indicating success and the packet is then added in a step 286 to the UDSCP processing queue. If an incoming data packet is a data submission which has to be collected immediately at the source server, as determined at inquiries 262 and 264 and in response to question 266, a check 288 is made as to whether the host server is the source server. If so, the packet is passed in step 268 through to a module that handles the final data collection. If not, processing unit 30 conducts an investigation 290 as to whether the source server can be contacted. If no contact is possible, a status report 292 is generated indicating that there will be a delay in processing the data and the packet is then added to the UDSCP processing queue in step 286.
If the source server can be contacted, the data is transmitted to that server in a step 294.
If the LrDSCP
function-modified generic processing circuits of processing unit 30 are provided with a packet *rB

other than a data submission, a report is produced in a step 296 indicated that the packet is of unknown type.
Fig. 10 illustrates steps in a maintenance loop undertaken by generic digital processing circuits in processing unit 30 which are functionally modified in accordance with the UDSCP
5 protocol. First, an inquiry 298 is made as to whether there are entries in the UDSCP
submission processing queue. If so, the first entry is read in a step 300.
Subsequently, processing unit 30 decides at junction 302 whether more than X seconds have passed since a date and time stamp on the entry. If not, the UDSCP submission processing queue is investigated at 304 to ascertain whether any further entries are in the queue.
If so, the next 10 entry is read in a step 306 and again the processing unit 30 decides at junction 302 whether more than X seconds have passed since a date and time stamp on the entry. If the time passed is greater than that predetermined limit, then a query 308 is made as to whether the server is too busy to handle the data submission. If the server is indeed too busy, processing unit 30 questions at 310 whether the data has the be collected immediately. If the data collection is 15 not urgent, processing unit 30 determines at 312 whether the date and time stamp on the entry was earlier than a particular time. If the date and time stamp is recent, processing unit 30 returns to investigation 304 to check any remaining data submissions in the UDSCP
submission queue.
If the server is not too busy to handle a data submission (query 308), if the data has to 20 be collected immediately (question 310), or if data and time Stamp indicates a certain age to the data submission (determination 312), processing unit 30 determines at a decision junction 314 whether the data has to be collected by the source sewer. If not, the packet is passed in a step 316 to a module that handles the final data collection. This module handles e-mailing the submission, recording it in a database, writing it to a file, or preforming any other necessary WO 99/0700? PCT/US98/15627 server-side task with the data. Subsequently, processing unit 30 checks at 318 whether the data submission was processed by the data collection module. If processing has indeed occurred, the packet is removed from the UDSCP submission processing queue in a step 320 and the processor 30 returns to investigation 304 to ascertain whether any further entries are in the queue. If the data submission packet has not been processed, which is discovered at 318, an inquiry 322 is made as to whether the failure to process the request is due to a possibly temporary condition. If not, a notification 324 is generated for alerting an appropriate person as to the failure. If so, the date and time stamp on the data submission is updated in a step 326.
If processing unit 30 determines at decision junction 314 that the data has to be collected by the source server and further determines at a subsequent decision junction 328 that the host (itself] is the source server, then the packet is processed (step 316).
Alternatively, if the source server must do the data collection and is a different computer, as determined at decision junction 328, then an attempt 330 is made to contact the source server.
If the source server cannot be contacted, the date and time stamp on the data submission is updated in step 326. If the source server is available, the data submission is transmitted to the source server in a step 332 and the packet is removed from the UDSCP
processing queue in a step 334.
As discussed above, the MCMP protocol handles Load Distribution, User Authentication, and Encryption. All other functions are handled by sub-protocols. The MCMP
protocol has four sub-protocols. These are the Code Module Exchange Protocol (CMXP), the Uni-directional Data Submission and Collection Protocol (UDSCP), the Metered Delivery and Billing Protocol (h~BP), and the Distributed Processing Protocol (DPP). This set of protocols can be expanded in the future to add additional functionality to the MCMP protocol.

i Basic MCMP Packet Structure All MCMP packets consist of a MCMP header, followed optionally by one or more resource identifiers, and a data area called the packet body (Fig 1 ). The entire size of an MCMP packet can be calculated as 128+RsrcIDLen+PacketSize, where RsrclDLen and PacketSize are elements of MCMP header (see below).
The MCMP header identifies the sub-protocol to which the packet belongs, as well as the type of packet. In addition, the MCMP header contains load distribution, user authentication, and encryption information. The Resource identifiers identify any resource or resources referred to in the packet (the ResourceReq flag being set). The MCMP
packet body contains packet-type specific information and is always interpreted by a subprotocol handle.
The packet body is optional and can be omitted b ysetting the PacketSize element of the MCMP headet to be 0.
The MCMP header structure is defined as:
MCMPHeader,128 $$ MCMP header structure ~ MPVersion,4 $$ Master protocol version ProtoVendor, 8 $$ Protocol vendor ~ ProtoID, 8 $$ Protocol ID
ProtoVer, 4 $$ Protocol version TransID, 2 $$ Client Assigned Transaction-ID

PacketType, 2 $$ Protocol-specific Packet Type PacketVersion, 4 $$ Packet version number PacketSize, 4 $$ Size, in bytes, of packet body OrigIP, 4 $$ Originating Host IP
Address OrigPort, 2 $$ originating Host Port I~Tumber i UserID,10 $$ User ID for client authentication Password, 10 - $$ Password for client authentication RsrcIDLen,2 $$ Resource identifier length RsrclDs,2 $$ Number of resource identifiers RsrcSrcIP,4 $$ Resource source IP

Flags, 2 $$ Flags; see functions below , 64 $$ Reserved * Flags:
Shunted = bit (Flags,l) $$ Packet has been shunted Shuntable = bit (Flags,2) $$ Packet can be shunted Encrypted = bit (Flags,3) $$ Packet was encased in an encryption packet ResourceReq = bit (Flags,4) $$ Packet constitutes a request for a resource The elements of this structure are described in more detail below.
MPVersion: This is a 4-character version identifier for the Master Protocol.
If the structure of the MCMP header or any other major component of the Master Protocol structure is revised, this version number is incremented.
ProtoVendor: This is an 8-byte text literal that describes the software vendor initial responsible for maintaining the sub-protocol specificiation for the sub-protocol to which the packet belongs.
ProtoiD: This is an 8-byte text literal assigned by the software vendor specified in the ProtoVendor element. This identifies the sub-protocol to which the packet belongs. The combination of ProtoVendor and ProtoID uniquely identifies a sub-protocol.

ProtoVer: This is a 4-byte text string that specifies the version of the sub-protocol specified in the ProtoVendor and ProtoID elements. The first to characters are the major .-version, the second two the minor version. All characters must be used, so if the major version is one character long, it must be written as O1, not 1. This value does not contain a decimal point. For example, version 2.4 would be 0 2 4 0.
Packet-Type Identifier (PacketTypej: A two-byte integer assigned by the vendor that uniquely identifies the packet type within a particular sub-protocol.
PacketVersion: This is a 4-character identifier for the packet version. When the structure of a packet is changed, this version number is incremented. This allows a sub-protocol handler running on an MCMP server to deal with both old and new packet structures, should a packet structure need to be altered. The format for the string is the same as the format of the ProtoVer element of the MCMP header.
Shunted flag (Shunted): A flae indicating whether this packet has been shunted as the result of a service hand off.
Shuntable flag (Shuntable): A flag indicating whether this packet can be shunted. This flag and the Shunted flag are mutually exclusive.
Encrypted flag (Encrypted): A flag indicating whether the packet was encrypted. This flag is cleared when a packet is placed in the MCMP Server incoming packets queue, unless the packet is place there by the decryption system, in which case the flag is set.
Request-Resource flag (ResourceReq): Indicates whether the packet constitutes a request for a resource.
Number of Resource Identifiers (RsrcIDs): Dpecifies the number of resource identifiers following the MCMP header structure.
Resource Identifier Length (RsrcIdLen): Specifies the combined length of all resource identifiers following the MCMP Header structure.
...
Originating Host Address (OrigIP, OrigPort): This is the IP address of the host from which the request originated. If the packet was shunted, this is the IP
address of the host that originally transmitted the request, not the address of the server that forwarded the request.
5 Resource Source IP (RsrcSourceIP): This is the IP address of the host on which the original copy of the requested resource resides, if the Request-Resource flag is true.
Cached Copy Date/Time Stamp (CacheDate, CacheTime): This is the date and time stamp of the cached copy of the resource, or zero if no cached copy exists. If the date and time stamp of the resource match this date and time stamp, the resource content will not be 10 returned.
Size of packet body (PacketSize): The size (in bytes) of the packet body following the MCMP Header and (if present) the resource identifiers.
User ID and Password for client authentication (UserII7, Password): A user ID
and Password used to authenticate the client. The authority for a user's ID and Password is the 15 Resource Source IP server. If a request is made to a secondary server for a password-protected resource, the secondary server must check with the primary (or source server) for password authentication. This information can be cached for the duration of the session.
Transaction ID (TransID): A unique ID assigned by the host initiating the transaction.
20 This is used to track a transaction over one or more service hand-offs. For an encryption packet, this should be set to zero (although it can be set to a non-zero value in the encased packet).
MCMP Resource Identifiers If the packet refers to one or more resources (the ResourceReq flag is set), the i WO 99/07007 PCTlUS98/15627 Resource identifiers identify the resource or resources to which the packet refers. Resource identifiers are null-terminated text strings. The basic format for a resource identifier is:
- type:[locators;]length[;date[,time]]
Where:
type Identifies the resource type; the possible values for this argument are sub-protocol-specific.
locators One or more values (in double-quotes if they contain commas;
double up the double-quotes where they are used within the value) used to locate the resource.
length The amount of the resource to read (in units specific to the sub-protocol). This is always the last item in the resource identifier. It can be in the format "rr" to specify n units starting at the beginning of the resource, the format "n ~ir" to specify a range of units (inclusive), the format "rr rr" to specify a starting unit and number of units, or "*" to specify the entire resource.
date The date, in the format mm/dd/yyyy that the cached copy of the resource was last modified. This field accepts both single and double digits for the month and day, although the year must be specified as a full 4-character string. Forward-slashes must be used as separators.
Time The time, in the 24-hour format hh:mmas, that the cached copy of the resource was last modified. hh may be a single or double digit number, and mm and as must be double digit numbers (use a leading zero if necessary).

i ,..
The Resource ID is optional, and does not need to be included in a MCMP
packet, so long as the ResourceReq flag is not set.
Some example Resource ID's are:
data:"\catharon\demos\media., "video.bin", "play30";*
prohibitedlist:
dir:"\"
data:"\catharon\demos\","mag2.dat";0/256 data:"\training","air.bin.","Rudder";*;10/0311995,4:03:30 MCMP Packet Types The following subprotocols are not sub-protocl specific and are accordingly defined for the MCMP protocol:
MCMP Encrypt = h0002 $$ Encryption MCMP_Status = h0003 $$ Status Report MCMP PerfStatReq = h0006 $$ Performance Statistics Request I MCMP PerfStatResp = h0007 $$ Performance Statistics Response MCMP UserIReq = h0008 $$ User Information Request MCMP UserIResp = h0009 $$ User Information Response MCMP EchoReq = h000a $$ Echo Request MCMP EchoResp = h000b $$ Echo Response These packet types are described in detail below.
ENCRYPTION (MCMP Encrypt): The encryption packet is used when data must be encrypted. A packet to be encrypted is encased in the data area of a MCMP
System encryption packet. The MCMP Header for the encryption packet is:

..-PacketType: MCMP Encrypt (h0002) PacketSize: Size of encased packet in encrypted form plus 32 bytes ResourceID's: None Shuntable: Inherited from encased packet ResourceReq: False The packet body of the encryption packet is:
Bytes 0-31 Encryption header Bytes 32-end Encrypted packet The header for the encryption packet is:
PT Encrypt Header,32 DecryptLess,8 $$ Code module to handle decryption DecryptUnit, 8 EncodingMethod,2 $$ Encoding method ,14 $$ Reserved STATUS REPORT (MCMP_Status): The status report packet is used to return the status of an operation. When used, it is always a response to a previously transmitted request.
The status packet contains detailed error information, including an English language description of the error or status value which can be displayed by the application if it cannot interpret the error code.
A status report packet body consists of one or more information fields, which can vary in length. The first information field is always a Status Report Header. Each information field consists of an 8-byte header which indicates the length and type of the information field, followed by the field itself.
The MCMP Header for the status report packet is:

i PacketType: MCMP_Status (h0002) PacketSize: Variable ResourcelD's: None Shuntable: No ResourceReq: No The Information Field Header for the status report packet is:
MCMP_StRprt ffldHdr,8 IfldSize,2 $$ Size of information field IfldClass, I $$ Field class ( I=Standard, 2=Protocol Specific) ~ IfldType,2 $$ Field type 3 $$ Reserved Following are the standard information field types (where IFldClass=1):
MSR Header = 1 $$ Header MSR ShortDesc - = 2 $$ Short Description MSR LongDesc = 3 $$ Long Description MSR DetailDesc = 4 $$ Detailed Description (Technical) MSR XErr70 = 102 $$ LAS 7.0 Execution Error Data MSR XErr70do = 103 $$ LAS 7.0 Execution Error-do-stack These information field types are described in detail below:
The generic status report header (MSR Header) is always present in all status report packets, and is always the very first information field in the packet. It has the following structure:
MSR Header Struc,32 ProtoVendor, 8 $$ The Vendor of the protocol reporting the error ProtoID, 8 $$ The ID of the protocol reporting the error ProtoVer, 4 $$ The version of the protocol reporting the error ' Severity, 1 $$ severity of error:

' * -1 = Notification of success ' * 0 = Warning {operation will proceed anyway, but there may be a problem) ' * 1 = Error (operation cannot proceed) ' * 2 = Unexpected error ProtoSpecific, 1 $$ Protocol-specific error-flag.

10 ~ ErrorType, ? $$ Sub-Protocol-Specific error type ErrorCode , 2 $$ Sub-Protocol -Specific error code 6 $$ Reserved If the ProtoSpecific flag is set. then ErrorType and ErrorCode are protocol-specific.

Otherwise, ErrorType is one of the following:

15 ERRT Zreturn = 1 $$

*zreturn* error ERRT XErr = 2 $$ TenCORE Execution error ERRT CErr = 3 $$ TenCORE Condense error ERRT Dosdata = 4 $$ Catharon dosdata-style error 20 For anything in the MCMP_Status packet that is protocol specific, the ProtoVendor and ProtoID from the Status Report Header are used to identify the protocol.

The Short Description information field type (MSR-ShortDesc) is a short description of the error, 40 charactershorter, that can be used in a list long or s or wherever a brief, friendly error description This packet is 40 bytes long, and is is needed. structured as follows:

MSR ShortDesc strtlc, 40 ShortErrDesc,40 $$ Short description of error The Long Description information field type (MSR LongDesc) is a longer description of the error, which can vary in length up to 2048 characters. This description can span multiple lines, with each line terminated by a carriage return (hOd). The length of this description is determined by the length of the information field, and the entire content of the information field is one iong buffer variable containing the description as text. There is no maximum length to a line, and lines may be word-wrapped at any position when this description is displayed.
The Detailed Description information field type (MSR DetailDesc) is a detailed technical description of the error, with all diagnostic error information included. For example, this might be a standard TenCORE execution error as it would be written to the catharon.err log file by the Catharon error handler. This can vary in length, up to 4096 characters. The description can span multiple lines, with each line terminated by a carriage return (hOd). Lines must be no longer than 80 characters. Lines longer than 80 characters may be truncated at display time. This description is never word-wrapped, and is always displayed in a fixed pitch font, allowing items on separate lines to be aligned and formatted using spaces (tables could be created using this method). The length of this description is determined by the length of the information field, and the entire content of the information field is one long buffer variable containing the description as text.
The TenCORE 7.0 Execution Error Data (MSR XErr70) is an exact snapshot of the data generated by a TenCORE execution error, and returned by TenCORE in the execution error memory block. It is 256 bytes long. This information field type is normally only included if the error being reported is a TenCORE execution error.

i ..-The TenCORE 7.0 Execution Error To- Stack (MSR XErr70do) is an exact snapshot of the TenCORE execution error -do- stack. The size of the data varies based on the size of the TenCORE -do- stack at the time of the error.
PERFORMANCE STATISTICS REQUEST (MCMP PerfStatReq): The performance statistics request packet requests a server's current performance and load statistics.
The MCMP Header of a performance statistics request is:
PacketType: MCMP PerfStatReq (h0005) PacketSize: 0 ResourcelD's: None Shuntable: No (because this is a request for the statistics for the server to which it is addressed, shunting me packet would cause meaningless results) The response to this packet should be either an MCMP PerFStatResp or a MCMP_Status packet.
PERFORMANCE STATISTICS REPORT (MCMP PertStatResp): This packet is a response to an MCMP PerfStatReq packet and contains a performance statistics report for the server to which it was addressed.
The MCMP Header of a performance statistics report is:
PacketType: MCMP PerfStatReq (h0006) PacketSize: 32 ResourceID's: None Shuntable: No ResourceReq: No The Packet Body of a performance statistics report is:

i PerfStats,32 Pusage, l $$ Processor usage (percent) CurReqs,2 $$ Current number of requests being processed TotalRegs,2 $$ Total number of requests the can be processed ShuntRegs,2 $$ Threshold, in requests, at which shunting begins PmemTotal,4 $$ Total physical memory on system PmemUsed,4 $$ Used memory on system VmemTotal,4 $$ Total virtual memory on system ~ VmemUsed,4 $$ Used virtual memory on system AreqPMethod.l $$ Current method for processing additional requests ~ ,8 $$ Reserved The elements of the packet body structure are, in detail:
PUsage:Current processor usage percentage (0% to 100%). Set to -1 if processor usage percentage is not available.
CurReqs: Approximate number of requests currently being processed.
TotalReqs: Total number of requests that can be processed at one time.
ShuntReqs: Maximum number of requests before shunting occurs. This is usually less than TotalReqsto allow some extra system resources for the purpose of shunting requests.
PmemTotal: Number of b5nes of physical memory on server, ar -1 if amount not known.
PnemUsed: Number of bytes of physical memory that have been used, or -1 if amount not known.

VmemTotal: Number of bytes of virtual memory available on server, -1 if not known.
VmemUsed: Number of bytes of virtual memory in use, or -1 if not known.
AreqPMethod: Method that will be used by the server deal with new incoming requests, based on the other statistics in this packet. This can have the numerical value 1, 2, or 3. 1 indicates that new requests will be processed normally; 2 indicates that new requests will be shunted; 3 indicates that new requests will be refused.
USER AUTHENTICATION INFORMATION REQUEST (MCMP UserIReq): This packet requests user authentication information on a particular user. This packet must be encrypted, and is sent only from a secondary server to a primary server. The receiving server must check that the sender is listed as a secondary server before responding to this request.
The expected response is either an MCMP_Status packet or an MCMP UserIResp packet.
This packet uses a special type of resource identifier, which is defined as follows:
type:user[,uadbitem];length[;date,time]
Where:
type Identifies the resource type; is always "useradb"
user The name of the user in question uadbitem Path to user authentication database item to retrieve. If omitted, a tree-file is resumed containing the entire user authentication data tree for the specified user. The root of the resumed tree-file is equivalent to \LocalLlsers\username in the user database file.
length Portion of item to be resumed.
Examples:
useradb:JohnS.lC atharonlRAdminlRights; *:03/ 13 / 1995.12:20: ~i 8 i useradb:HugoC;
useradb:JDouglas,lXYZWidStIWDBP\GroupMembership;256:S/12/1996, 01:00:30 The User Authentication Database (UADB) is stored in a tree-file. User information is stored in \LocalUsers. Inside the \LocalUsers folder are folders for each user, named based on 5 the user's ID. In each user's folder are folders for each vendor (i.e.
"Catharon", "CTC", etc.), and inside the vendor folders are folders for each protocol defined by that vendor. The contents of a protocol folder are protocol-specific. The path specified in the resource ID is rooted at \I,ocalUsers\username.
Basic user authentication information is stored in \Catharon\MCMP\BaseAuthData.
10 This is structured as follows:
UserAuthData,32 UserID,10 $$ Userts name/ID
UserPass,10 $$ User's password ExpTime,3 $$ Time, in seconds, before data 15 ' $$ expires ( 10 to 864000) BinUII7,4 $$ Binary User ID
,5 $$ Reserved If a secondary server sends a request in the form:
useradb:usez,2ame;*[;date,time]
20 the entire user authentication tree is retrieved for the specified user.
The ability to read a specific item from the user authentication tree is provided for future use and expandability.
After retrieving user authentication data, that data can be cached for the period of time specified in the ExpTime element of the UserAuthData structure. The user authentication data may not be cached longer than the specified time.

i Sb The MCMP Header of the User Authentication Information Request is:
PacketType: MCMP UserIReq (h0008) PacketSize: 0 ResourceID's: One; specifying the user to retrieve information about, and what information to retrieve.
Shuntable: No (must be processed by primary server because the primary server is the only authoritative source of information on the user).
ResourceReq: Yes USER AUTHENTICATION INFORMATION RESPONSE (MCMP UserIResp):
The response to an MCMP UserlReq packet, this packet contains the requested information in its data area. This data is either the raw data read from the requested data block in the user database, or (if uadbitem is omitted) is a tree file containing the entire user information tree for the specified user, with the root of the file being equivalent to \LocalUsers\username in the UADB.
The MCMP Header of the User Authentication Information Response is:
PacketType: MCMP UserIResp (h0009) PacketSize: Variable ResourceID's: None Shuntable: No ResourceReq: No ECHO REQUEST (MCMP EchoReq): This packet is used to time the connection to a particular MCMP host. When this packet is received by an MCMP host, a MCM1P
EchoResp packet is immediately sent back. The data area can contain any data, up to a maximum size of i WO 99/07007 PCT/US98/i5627 2048 bytes. The return packet's data area will contain the same data.
The MCMP Header of the Echo Request is:
PacketType: MCMP EchoReq (hO00a) PacketSize: Any S ResourceID's: None Shuntable: No ResourceReq: No ECHO RESPONSE (MCMP EchoResp): This packet is sent in response to an MCMP EchoReq packet.
The MCMP Header of the Echo Response is:
PacketType: MCMP EchoResp (hO00b) PacketSize: Same as original MCMP EchoReq packet Resource)D's: None Shuntable: No ResourceReq: No Some files in a directory may support additional access pennission information. For example, a tree file could contain information on access permission for individual units within the tree file.
CMXP Resource Identifiers Resource Identifiers for CMXP packets are defined as follows:
type:patht,file[,unit]];length[;date,time]
Where:
type Identifies the resource type. This can be either "Data" to read data from the specified resource, or "Dir" to read a directory of contained i resources.
path Path to a directory...must be at least a backslash "\". If f ile and unit are not specified, the directory is considered the resource to be read;
otherwise, the file or unit referenced is assumed to be located in the specified directory. If file and unit are not specified, then type must be "Dir".
file . A filename. If unit is not specified, the file is considered the resource;
otherwise, the unit is assumed to be located in the specified file. A file resource can be accessed with both the "Dir" and "Data" resource types;
"Dir" will reference the list of contained units, while "Data" will reference the actual data contained in the file.
unit A unit name. If specified, the unit is considered to be the resource.
This can be accessed with both the "Dir" and "Data" resource types;
"Dir" will reference the list of sub-units, while "Data" will access the data contained in the unit.
length The portion of the resource to read. If typeis "Data", this value is in bytes. if type is "Dir", this value is in directory entries.
date/time Can only be specified in a request packet. Causes the recipient process to ignore the request unless the resource has been modified since the date/time specified. This can be used in conjunction with the CMXP ReadReq packet to request that a resource be sent only if it has changed since it was cached on the client.
CMXP Packet Types The following is a list of the packet types used by the CMXP protocol at this time. The i functionality of the CMXP protocol can be expanded in future by adding to this list of packet types.
CMXP ReadRsrcReq = h0002 CMXP ReadRsrcResp= h0003 CMXP WriteRsrc = h0004 CMXP CreateRsrc = h0005 CMXP DestroyRsrc = h0006 CMXP RenameRsrc = h0007 CMXP CopyRsrc = h0008 CMXP MoveRsrc = h0009 CMXP AItSListReq = h000a CMXP_AItSListResp = h000b These packet types are described in detail below.
READ RESOURCE REQUEST (CmxP ReadRsrcReq): This packet is a request to I S read one or more resources. It is sent from a client to a server to download a resource, sent from a client to a client to request a code module transfer for a plug-in module, or sent from a server to a server to request transfer of the appropriate resource to service a client request. A
CMXP ReadRsrcReq packet can request either resource content, resource information, or both. Because the definition of a resource includes file directory and code module directories, this packet can also be used to request a list of files in a directory or code modules in a file.
This packet is responded to with a series of packets (one for each request resource).
These packets are either CMXP_ReadRsrcResp (if the resource u~as successfully read) or MCMP_Status (if there was an error reading the resource).
The MCMP Header of a read resource request packet is:

i .-PacketType: CNI.XP ReadRsrcReq (honey) PacketSize: 32 ResourceID's: One or more, Identifying resources to read Shuntable: Yes 5 ResourceReq: Yes The Packet Body of a read resource request packet is:
ReadRsrcReqHeader,32 RHFlags,2 $$ Flags ,30 $$ Reserved 10 * Flags:
Includelnfo = bit(RHFlags,l) ~$ Include resource information IncludeData = bit(RHFlags,2) $$ Include resource content IdlePreCache = bit(RHFlags,3) $$ Request is the result of an idle-time pre-caching operation.
d 5 The elements of the packet body are, in detail:
IncludeInfo: If set, this flag causes infonnation about the resource to be returned.
IncludeData: If set, this flag causes the resource content to be returned.
IdlePreCache: If set, indicates the the request is the result of an idle-time pre-caching operation initiated by the client without user involvement. A CMXP server processes packets 20 with this flag clear before packets with this flag set are processed. When the load on a C11~
server becomes too high for it to deal with all requests, and it can not shunt requests, requests with this flag set will be dropped before requests with this flag clear.
IncludeInfo and IncludeData can both be set in the same request In this case, the response is the resource information followed by the resource content. This is the most common request type. At least one of these flags must be set in each request packet READ RESOURCE RESPONSE (CMXP_ ReadRsrcResp): Sent in response to a CMXP ReadRsrcReq packet, this packet contains the requested information. Note that this packet is never sent in response to a CMXP ReadRsrcReq if an error condition exists; instead, a MCMP_Status packet is sent.
Depending on the state of the IncludeInfo and IncludeData flags in the CMXP ReadRsrcReq packet, the packet body may contain resource information and/or resource content. The resource information, if it is present, always comes first in the packet body, followed by the resource content, if present. The size of the resource information can be determined by reading the ResourceInfoSize element of the version of a program can be sucessfully merged with code modules from an old version of the program.
RsMaxSubs: The maximum number of subsidiaries that the resource can contain.
RaSizeAInfo: The size, in bytes (1 to 8), of the associated information for the resource (RsAInfo).
RsSizeSubName: The maximum length, in characters, of the name of a subsidiary of the resource.
Rslieight, RsWidth: The height and width of the bounding rectangle of the resource at its default scaling, if applicable. This is used for object-based drawings, images, etc.
RsPTime: The playing time, in seconds at the default playing speed, of the resource (if appliable); used for video clips, wav files, midi files, animations, etc.
WRITE RESOURCE (CMXP_Vi,'riterSrc): This packet writes data to the specified resource. This requires sending a packet to the primary' sen;er that cannot be shunted, so this can increase server load. For form submissions and other uni-directional submissions, the UDSCP protocol is recommended over the write functions of the CMXP protocol.

A CMXP WriteRsrc request may fail due to, among other things, the fact that the user is not allowed to write to the specified resource. This situation may be remediable by repeating the request with a user-id and password specified (in this case, the request must be encased in a MCMP Encrypt packet).
There are two variations of the status code returned when access is denied due to failed user authentication. One variation indicates that the client should prompt for a user name and password. This is a "hint" to the client that the resource may be accessible via a user name and password. It is not conclusive. In other words, the variation on the Access Denied code does NOT indicate whether access is really available to anyone; i just indicates whether the client should ask. There may, for example, be a resource designed to be accessed under program control, and not under user control, which requires user authentication of an "automation user", and which denies access the rest of the time without even prompting for a user-id/password.
The packet body contains the data to be written to the resource.
I 5 The MCMP Headerof the write resource packet is:
PacketType: CMXP_WriteRsrc (h0004) PacketSize: Variable ResourceID's: One; the ID of the resource to-wnte to Shuntable: No ResourceReq: Yes CREATE RESOURCE (CMXP CreateRsrc): This packet creates a subsidiary in the specified resource. This includes files, directories, and units. The same rules regarding user authentication apply to this packet as apply to the CA~SXPy'riteRsrc packet.
The MCMP Header of the create resource packet is:

i PacketType: CMXP CreateRsrc (h0005) PacketSize: Variable ResourceiD's: One; the ID of the resource In which to create the new subsidiary.
Shuntable: No ResourceReq: Yes The Packet Body of the create resource packet is:
NewRsrc, 3 00 RsSize,4 $$ Size, in bytes, of resource ~ RsAInfo,8 $$ Associated information (if applicable) RsMaxSubs,2 $$ Maximum number of subsidiaries RsSizeAInfo, l $$ Size, in bytes, of associated information RsSizeSubName,2 $$ Maximum length of a subsidiary's name RsName,256 $$ Resource Name ~ RsName2,8 $$ Secondary Resource Name RsType,8 $$ Resource type ,11 $$ Reserved The elements of the packet body are, in detail:
ReSise: The size, in bytes, of the new resource. If creating a TenCORE nameset or dataset, this must be a multiple of 256 bytes, and is equivalent to the records argumen of the -createn- comrnand multiplied by 256 (to convert from records to bytes). When creating new directories, this is ignored.
R-AInfo: Associated information for the resource, if applicable (see CMXP
CreateRsrc above) RsMaxSubs: The number of subsidiaries allowed in the resource, if applicable.
This is required for TenCORE namesets, and is equivalent to the names argument of the -createn-command. In most cases, when not dealing with TenCORE namesets, this is ignored.
R-SizeA.Info: The size of the resource's associated information. For namesets, this is equivalent to the infolength argument of the -createn- command.
RsSizeSubName: Maximum length of a subsidiary's name. For TenCORE namesets, this is equivalent to the namelength argument of the -createn- command. In most cases when-not dealing with TenCORE namesets, this is ignored.
ReName: The name of the resource to create. The length of this name and the rules for allowed characters depend on the type of resource being created.
RaName2: This is a secondary name for the resource. It is not currently used, but is provided for future use. This may be used, for example, to specify a short file name alias to go with a long filename in Windows 95/NT.
RaType: This specifies the type of resource being created. Note that not all resource types are necessarily valid for all possible resources in which they could be created (i.e., one cannot create a file inside of a unit). Where only one resource type is possible for a particular containing resource, the value'default' is used (for example, the only type of resource that can be created inside a TenCORE nameset is a block). This value is an 8-byte text literal.
The following resource types are currently defined for the CMXP protocol:
course A course file (TenCORE nameset with .CRS extension) group A group file (TenCORE nameset with .GRP extension) nameset A gentral purpose nameset file (TenCORE nameset with .NAM
extension) roster A roster file (TenCORE nameset with .RTR extension) i source A source file (TenCORE nameset with .SRC
extension) studata A student data file (TenCORE nameset with . SDF extension) tpr A Producer file (TenCORE nameset with .TPR
extension) binary A binary file (TenCORE nameset with .BIN
extension) 5 file An operating system file dir An operating system folder or directory dataset A TenCORE dataset tree Catharon tree-file default The default type for the container 10 block A data block (in a nameset or tree-file) foider A folder (in a time-file) DESTROY RESOURCE (CMXP DestroyRsrc): This packet destroys the specified resource. The same rules regarding user authentication apply to this packet as apply to the CMXP_Vi~'riteRsrc packet. The MCMP Header of this packet is:
15 PacketType: CMXP DestroyRsrc (h0006) PacketSize: 0 ResourceID's: One; the ID of the resource to destroy Shuntable: No ResourceReq: Yes 20 RENAME RESOURCE (CMXP-RenameRsrc): This packet renames the specified resource. The same rules regarding user authentication apply to this packet as apply to the CMXP WriteRsrc packet. The packet body contains the new name for the resource.
The MCMP Header of this packet is:
PacketType: CMXP RenameRsrc (h0007) i PacketSize: 272 ResourceID's: One; the ID of the resource to rename Shuntable: No ResourceReq: Yes The Packet Body of the rename resource packet is:
RenameRsrc,272 ~ ResourceName,256 $$ New name for resource ResourceSecondaryName,8 $$ Secondary name for resource (if applicable) IO . ,9 $$ Reserved COPY RESOURCE (CMXP CopyRsrc): This packet copies the specified resource.
The same rules regarding user authentication apply to this packet as apply to the CMXP-WriteRsrc packet. The MCMP Header of the copy resource packet is:
PacketType: Cry CopyRsrc (h0008) I _5 PacketSize: 0 ResourceID's: Two; the first is the location of the resource to copy, the second the location to create the new copy of the resource.
Shuntable: No 20 ResourceReq: Yes MOVE RESOURCE (CI~~ MoveRsrc): This packet moves the specified resource.
The same rules regarding user authentication apply to this packet as apply to the CMXP VfriteRsrc packet. The MCMP Header of the move resource packet is:
PacketType: CMS' MoveRsrc (h0009) *rB

i PacketStze: 0 ResourceID's: Two; the first is the old location of the resource, the second the new location for the resource.
Shuntabte: No ResourceReq: Yes ALTERNATE SERVER LIST REQUEST (CMXP,AItSListReq): This packet requests a list of secondary servers available for the specified resource. The server should respond with an CMXP_ AItSListResp packet, except in the case of an error, in which case an MCMP_Status packet should be returned. The MCMP Header of this packet is:
PacketType: CMXP_AItSUstReq (h000a) PacketSize: 0 ResourceID's: One - The resource for which to list secondary servers.
Shuntable: Yes ResourceReq: Yes I S ALTERNATE SERVER LIST RESPONSE (CMXP AItSListResp): This packet is sent in response to an CMXP_ AItSListReq packet and contains the list of alternate servers.
The MCMP Header is:
Packet'Type: CMXP~AItSUstResp (h000b) PacketSize: Variable ResourceID's: None Shuntable: No ResourceReq: No The Packet Bodyof the CMXP_AItSListResp packet is:
AItSList(nn),16 i ~ IP,4 $$ IP Address of server ~ Port, 2 $$ Port on server to access ~ Load, 1 $$ Last known load on server Ping,4 $$ Last known ping-time to server ~ ,4 $$ Reserved UDSCP Packet Types The following is a list of the packet types used by the UDSCP protocol at this time.
The functionality of the UDSCP protocol can be expanded in future by adding to this list of packet types.
UDSCP Submission = h0002 UDSCP_QueueStatusReq = h0003 UDSCP_QueueStatusResp = h0004 These packet types are described in detail below.
DATA SUBMISSION (UDSCP_Submission): This is the primary packet type for the UDSCP protocol. It is generated by a client, and then forwarded from server to server until it reaches the collection point. The packet body consists of a UDSCP Header followed by the content of the submission.
The MCMP Header of the data submission packet is:
PacketType: LJDSCP Submission (h0002) PacketSize; 32 + Size of data being submitted ResourceID's: None Shuntable: Yes ResourceReq: No The UDSCP Header is:

i UDSCP SubmitHeader, 3 2 HeaderSize,2 $$ Size of UDSCPSubmitHeader DataSize,4 $$ Size of data being submitted Cmethod,l $$ Collection method (I=Central, 2=Secondary) ~ CpointIP,4 $$ Collection point IP Address Priority, 1 $$ Priority (O=low, I=normal, 2=urgent) Lesson,8 $$ TenCORE LessonlUnit to process submission Unit, 8 Flags, 2 $$ Flags ~ ,2 * Flags:
Forwarded = bit(Flags,l) $$ Submission has been forwarded by a server The elements of the UDSCP header are described in detail below:
HeaderSize: The size, in bytes, of the UDSCPSubmitHeader structure. This value should be read to determine the size of the whole structure, this allowing the structure to be expanded in future without affecting existing code.
DataSize: The size, in bytes, of the content of the submission following the UDSCP
Header.
Cmethod: The collection method to be used. This is an integer value. A setting of 1 causes data to be collected and processed at a centeral server, while a setting of 2 allows data to be processed on secondary servers.
CpointIP: The IP address of the collection point (centeral server). This is ignored if CMethod=2.
Priority: The priority of the submission. This is an integer value, and can be either 0 for low, 1 for normal, or 2 for high priority. UDSCP servers attempt to process high priority submissions immediately, while normal and low priority submissions are held in the UDSCP
submission queue and processed when the server would othewise be idle. If a normal or low priority remains in the UDSCP queue for longer than the user configurable time limit, the 5 server will attempt to process it immediately regardless of load or, failing to do so, notify a responsible person. The time limits for low and normal priority submissions are configurable separately, and low priority submissions are usually configured for a longer timeout.
Lesson, Unit: The names of the TenCORE lesson and unit that will process the submission.
10 Forwarded: This flag is set if the submission has been forwarded by a UDSCP
server, or clear if this is the first UDSCP server to deal with the submission (i.e., the submission came from a client).
QUEUE STATUS REQUEST (UDSCP- QueueStatusReq): This packet requests the status of the UDSCP queue. The expected response is either an MCMP_Status packet or a 15 UDSCP QueueStatusResp packet.
The MCMP Headerof the queue status request packet is:
Packet Type: UDSCP _ Queue Status Req {h0003) PacketSize: 0 ResourcelD's: None 20 Shuntable: No ResourceReq: No QUEUE STATUS RESPONSE (UDSCP:QueueStatusResp): This packet is the response to a UDSCP QueueStatusReq packet. It contains information about the UDSCP
server's current UDSCP queue status. The MCMP Header is:

i PacketType: UDSCPQueueStatusResp (h0004) PacketSize: 0 ResourcelD's: None Shuntable: No ResourceReq: No The Packet Body of this status response packet is:

QueueStatus,b4 Entries,4 $$ Total number of entries in the queue LowEntAge,4 $$ Age of the newest entry in the queue, in seconds HighEntAge,4 $$ Age of the oldest entry in the queue AvgEntAge,4 $$ Age of the average queue entry HighPriEnt,4 $$ Number of high-priority entries in the queue LowPriEnt,4 ~ $$ Number of low-priority entries in the queue ~ FwdEnt,4 $$ Number of entries which have been forwarded ToFwdEnt,4 $$ Number of entries which must be forwarded ,32 $$ Reserved The Metered Delivery and Billing Protocol (MDBP) controls access to pay-for content, including delivering credit to pay for the content, and collecting royalty information after the content has been purchased.
MDBP Packet T~~pes The MDBP protocol works closely with the CWXP protocol. The Chi' protocol is used to deliver the content in encrypted form. The content is then decrypted when it is i unlocked by the MDBP libraries on the client machine. The content is unlocked when it is paid for with credit on the local machine. Credit can be replenished through the MDBP protocol.
When credit is replenished on the local machine, the royalty information is reported to the credit server, which then handles the appropriate distribution of profits.
In a standard credit-purchasing transaction, three packets are exchanged:
~ An MDBP CreditReq is sent from the client to the server ~ The server responds with an MDBP CreditTransfer The client sends an MDBP PurchaseReport to the server Before credit can be purchased by a user, that user must be registered with the credit server.
The following is a list of the packet types used by the MDMP protocol at this time.
The functionality of the Iv)DBP protocol can be expanded in future by adding to this list of packet types.
MDBP CreditReq = 2 $$ Request for additional credit MDBP CreditTransfer = 3 $$ Response to MDBP CreditReq MDBP RegisterUser = 4 $$ Register a user MDBP RegisterUserResp = 5 $$ Response to MDBP_RegisterUser MDBP WriteUserData = 6 $$ Write user data MDBP ReadUserData = 7 $$ Read user data MDBP ReadUserDataResp = 8 $$ Response to MDBP_ReadUserData IvIDBP PurchaseReport = 9 $$ Puchasing/Royalty Report The MDBP packet types are described in detail below.
REQUEST FOR ADDITIONAL CREDIT (MDBP- CreditReq): This packet requests additional credit from the sen~er. The packet body contains the user's ID
code, which is used to i access the user's data in the user database, as well as the amount of credit to be purchased. The user's data includes a billing method to use to pay for the credit. This packet must be encrypted. The expected response is either an MDBP CreditResp or an MCMP_Status packet.
The MCMP Header of a credit request packet is:
PacketType: MDBP CreditReq (h0002) PacketSize: 22 ResourceID's: None Shuntable: No ResourceReq: No I O The Packet Bodyof a credit request packet is:
UserID,8 $$ User ID; B-byte integer value Password, I 0 S$ User' 8 password Credit, 4,r $$ How much credit to purchase (in dollars) CREDIT TRAI~ISFER (MDBP CreditTransfer): This packet is the response to an I 5 MDBP CreditReq. It actually performs the transfer of credit from the server to the client. The packet body contains information on the credit transfer. This packet must be encrypted.
The MCMP Header of a credit transfer packet is:
PacketType: MDBP CreditReq thOo03) PacketSize: 20 20 ResourceID's: None Shuntable: No ResourceReq: No The Packet Body of a credit transfer packet is:
UserID,8 SS The ID of the user who should be receiving this credit i Credit, 4,r $$ The amount of credit purchased (in dollars) Tserial,8 $$ A serial number used to track the transaction USER REGISTRATION (MDBP_RegisterUser): This packet is used for the initial registration of a user with a credit server. It causes a new entry to be created in the user registration database. The packet body contains information about the user which will be written into the standard fields in the user's new record. The information can be read and modified at a later time through use of the MDBP WriteUserData and MDBP
ReadUserData packets. This packet must be encrypted. The expected response to this packet is an MDBP RegisterUserResp or MCMP Status packet.
The MCMP Header of a user registration packet is:
PacketType: MDBP RegisterUser (h0004) PacketSize:
ResourceID's: None Shuntable: No I S ResourceReq: No The Packet Bodyof a user registration packet is:
RegisterUser, 512 Name,54 $$ Full name Company, 54 $$ Company name ~ Address1,45 $$ Line 1 of the street address Address2,45 $$ Line 2 of the street address City, 20 $$ City name State,? $$ 2-letter state abbreviation Pcode,16 $S Postal code (zip code) i Country,30 $$ Country name Telephone, l 6 $$ Telephone number AX,16 $$ FAX number Email, I 00 $$ E-mail address 5 ~ CardNo,20 $$ Credit card number ('nnnn nnnn nnnn nnnn') CardExpDate,S $$ Credit card expiration date ('mm/yy' or 'mm-YY' ) Password, 10 $$ Password ,79 $$ Reserved 10 USER REGISTRATION RESPONSE (MDBP RegisterUserResp): This packet is the response to an MDBP RegisterUser packet. It acknowledges the fact that the user has been registered, and returns the user's assigned ID code. The MCMP Header of this packet is:
PacketType: MDBP RegisterUserResp (h0005) PacketSize: 8 I S ResourceID's: None Shuntable: No ResourceReq: No The Packet Body is:
userID,8 $S user ID; 8-byrte integer value 20 WRITE USER DATA (MDBP WriteUserData): This packet writes data to the user database. This uses a resource identifier to identify the element in the user registration database to write to. The packet body is the data to be witten. This packet uses a special type of resource identifier, which is defined as follows:
type userid[,dbitem];length[;date,time]

i Where:
type Identifies the resource type; is always "mdbpuser"
userid The iD of the user in question (in hexadecimal) dbitem Path to user database item to retrieve. If omitted, a tree-file is resumed containing the entire user data tree for the specified user.
length Portion of item to be returned.
Examples:
mdbpuser:00000000000003e4,\Catharon\RAdminUtights;*;03/13/1995,12:20:48 mdbpuser:0000000000000014;
mdbpuser:0000000000002af~.XYZ~fidgtlVfDBP\GroupMembership;256;
5/12/1996,01:00:30 The user database contains a system folder and a publishers folder. The system folder contains the data specified in the initial User Registration packet, and can be expanded to contain additional data. The publishers folder contains a subfolder for each publisher, named based on the publisher's name, and the publisher's folder contain, in turn, publication folders, named based on the publication. The organization of data within a publication folder is specific to the publication.
The MCMP Header of the write user data packet is:
PacketType: MDBP WriteUserData (h0006) PacketSize: Variable ResourceID's: 1 (The resource to write to) Shuntable: No ResourceReq: Yes i 77 ",.
READ USER DATA (MDBP ReadUserData): This packet reads data from the user database. This uses a resource identifier to identify the element in the user registration database to read from. The format of the resource identifier is the same as that for the resource identifier used in the MDBP WriteUserData packet.
Multiple resource identifiers can be specified, causing each of the specified elements in the user registration database to be returned.
This packet is responded to with a series of packets (one for each request resource).
These packets are either MDBP ReadUserDataResp (if the resource was successfully read) or MCMP Status (if there was an error reading the resource).
The MCMP Header of the read user data packet is:
PacketType: MDBP_ReadUserData (h0007) PacketSize: 0 ResourceID's: 1 or more Shuntable: No ResourceReq: Yes READ USER DATA RESPONSE (MDBP ReadLjserDataResp): This packet is the response to an MDBP ReadUserData packet. It contains the content of the requested element of the user registration database. The body is the data that was read. The MCMP Header is:
PacketType: MDBP ReadUserDataResp (h0008) PacketSize: Variable ResourcelD's: None Shuntable: No ResourceReq: No PURCHASING/ROYALTY REPORT (MDBP PurchaseReport): One or more of i these packets is sent from the client to the server after the client has received a response to an MDBP_CreditReq packet, if the client has purchasing or royalty information to report.
The data area contains a generic royalty report header followed by a publication-specific royalty-report data area. In some cases, the royalty report header is suil'lcient to report the needed royalty information, so the data area is optional and does not have to be included. Any data following the royalty report header is assumed to be publication-specific data.
The MCMP Header of the royalty report packet is:
PacketType: MDBP PurchaseReport (h0009) PacketSize: Variable ResourceID's: None Shuntable: No ResourceReq: No The Royalty Report Header is RoyaityReport, l 28 HeaderSize,2 $$ Size, in bytes, of royalty report header Publisher,45 $$ Name of publisher Publication,45 $$ Name of publication Vollssue,20 $$ Volume and/or issue number of publication, if applicable Version, 4 $$ Version of publication, if applicable UserID,8 $$ ID of user who was reading this publication CreditSpent,4,r $$ Credit spent. in dollars, on this publication DPP Packet Ty pes 79 .' The distributed processing protocol (DPP) is used to reduce the processing load created by a particular task by distributing it over multiple computers. The protocol is used to search for and locate idle systems and (in conjunction with the CMXP protocol) transmit the appropriate code modules to those systems so that they can assist with the task. When the task is complete, the protocol is used to gather the results from all of the "assisting" machines and collect them and compile them on the machine that initiated the task.
The functionality provided by this protocol should not be confused with the load distribution functionality provided by the main MCMP protocol. The MCMP
protocol's load distribution works by distributing client requests over various machines in various locations.
The DPP protocol uses several machines working together to accomplish a single task, and is more suited to a local area network. and to processor intensive tasks, such as rendering of 3D
images.
Each system involved in the distributed processing process must be configured with a list of those systems which can assist it with a task, as well as those systems which it can assist with tasks. This list can include entries with wildcards, to specify an entire network, such as 192.168.123. * for the entire 192.168.123 . C-level network.
The purpose for this system configuration is to control who can utilize a system's processor. For example, a company might want to limit shared processing to systems within it's own internal network, for security reasons.
Systems can also be assigned priorities for access to a computer's processor.
For example, a company may want all of it's computer to grant distributed processing requests from other computers on it's network in preference to other requests. However, if that company is affiliated with some other company, it might want to grant that other company access to it's computers for distributed processing purposes, provided that none of it's own i computers require processing assistance.
The following is a list of the packet types used by the DPP protocol at this time. The functionality of the DPP protocol can be expanded in future by adding to this list of packet types.
5 DPP~AssistReq = 2 $$ Request for processing assistance DPP_AssistResp = 3 $$ Response to DPP AssistReq DPP EndTaskReq = 4 $$ Request to terminate processing assistance DPP EndTaskNotify = 5 $$ Notification of termination of assistance DPP UpdateReq = 6 $$ Request for update of task status 10 DPP UpdateResp = 7 $$ Response to UpdateReq These packet types are described in detail below.
REQUEST FOR PROCESSING ASSISTANCE (DPP AssistReq): This packet is sent by a system requiring processing assistance to another system to request processing assistance from that system. This packet contains all the information needed to initiate a distributed 15 process, including the resource identifier for the initial code module to handle the process, so that the code module can be fetched via CMXP if necessary. The response to this packet is either a DPP_AssistResp packet (if the recipient system can assist) or an MCMP
Status packet (if the recipient system can not assist).
Possible reasons for an MCh~P_Status packet can include:
20 ~ Access Denied The system to which the packet was sent was not allowed to assist with the request. This is a result of the system generating the request not being listed in the appropriate configlrration file on the receiving system.
Insufficient Free Svstem Resources 81 "..
There are not enough free system resources on the system receiving the request for that system to assist with the distributed process. In some cases, a system may be to busy to even return this status value.
Request Superceded This indicates that the system had enough free processor time, but chose to assist a different system in preference to the one sending the request. The reason that Request Superceded is a separate status code from Access Denied is that "Access Denied" may generate an error if encountered by a program searching for systems to assist it (to notify the user of a possible mis-configuration) while Request Superceded would simply indicate that the system is not available to assist with the task at that given time, and would therefore not generate an error.
Task-Specific Error This is resumed by the code module that would handle the task. The MCMP_Status packet will contain an additional task-specific error code indicating the specific error which occurred. Task specific errors might include an error indicating that the system is not capable of assisting with the task due to a hardware limitation.
The packet body of the assistance request packet consists of a 32-byte header, followed by a task-specific data area, which contains any infommation that the code module referenced in the Resource ID requires to assist in the processing of the task. This could, for example, include an image (if an image must be processed) or a description of a 3D
emzronment to be rendered.

I

WO 99/07007 PCT/US98/1562'1 The task-specific data area also contains information indicating which portion of the task the system is to work on (for example, starting and ending lines in the image) as well as the frequency with which the assisting system is to update the initiating system with processed data.
The MCMP Header of the assistance request packet is:
PacketType: DPPTAssistReq (h0002) PacketSize: 32 + Size of task-specific data ResourceID's: One (The ID of the code module to handle the distributed process) Shuntable: No ResourceReq: No The DPP_ AssistReq Header is:
DPP AssistReq Hdr,32 ProcessID,2 $$ Process Identifier I S . ,30 $$ Resen~ed The elements of the DPP AssistReq Header are described in detail below:
Process-ID: This is a 2-byrte integer value that identifies the process. It is assigned by the system initiating the process, and is a unique identifier when combined with that system's IP
address.
DPP AssistResp: This packet is sent in response to a DPP AssistReq to acknowledge that the system has begun assisting with the task. Because this is simply an acknowledgement message, there are no Resource ID's and there is no packet body. The MCMP
Header is:
PacketType: DPP AssistResp (h0003) PacketSize: 0 I

WO 99/07007 PCTlUS98/15627 ResourceID's: None Shuntable: No ResourceReq: No DPP EndTaskReq: This packet is sent to an assisting system to instruct that system to cease assisting with a task prematurely (before the task is complete). This would be used, for example, if the user on the initiating system were to click a "cancel" button and abort the task.
The MCMP Header is:
PacketType: DPP EndTaskReq (h0004) PacketSize: 16 ResourcelD's: One (The ID of the code module to handle the distributed process) Shuntable: No ResourceReq: No The Packet Body of the end task request header is:
DPP EndTaskReq,16 ProcessLD,2 $$ ID of process to terminate ,14 $$ Reserved DPP EndTaskNotify: This packet is sent by an assisting system to notify the initiating system that it will no longer be assisting with a task. This is used both by itself, and as an acknowledgement to a DPP EndTaskReq packet. This would be sent if, for example, the assisting system was to become too busy to continue to assist with the task, or if the assisting system was to be instructed by the initiating system to abort the task. This packet can also be used to notify an initiating system of a completed task. The MCMP Header is:
PacketT'ype: DPP EndTaskNotiy (h0005) * rEl i PacketSize: 16 ResourceID's: One (The ID of the code module to handle the distributed process) Shuntable: No ResourceReq: No The Packet Bodyof the end task notification packet is:
DPP EndTaskResp,16 ProcessID,2 S$ ID of process to terminate Tstatus,l $$ Task status; 1=Complete, O=Incomplete (Aborted) . , I 3 $$ Reserved DPP UpDateReq: This packet is sent by the initiating system to instruct the assisting system to transmit processed data (a DDP L'pdateResp packet). For example, if an image was being processed, this would cause the assisting system to respond with the data making up the portion of the image that it has processed so far. The use of this packet type depends on the task. Some tasks will not use this packet at all, and will instead automatically generate DPP L'pdateResp packets at various intervals, and when the task is complete.
The MCMP
Header is:
PacketType: DPP LTpdateReq (h0006) PacketSize: 1 6 ResourceID's: One (The ID of the code module to handle the distributed process) Shuntable: No ResourceReq: No The Packet Body of the update request packet is:
*rB

i DPP End'TaskResp, l 6 ProcessID,2 $$ ID of process for which to return processed data . ,14 $$ Reserved DPP UpDateResp: This packet is sent from an assisting system to an initiating system.
S It contains the data that has been processed so far as part of the task in question. For example, if an image is being processed, this packet would contain the portion of the image that had already been processed. Note that the data sent in these packets in not cumulative. That is, if two packets are sent in succession, the second contains only data not included in the f rst.
These packets are often sent in response to DPP,UpdateReq packets, although they 10 can also be sent automatically by the program handling the task assistance, both during the task and upon task completion.
The packet body consists of a header, followed by task-specific data. All data not part of the header is assumed to be task-specific data.
The MCMP Header of the update response packet is:
15 PacketType: DPP UpdateResp (h0007) PacketSize: 16 + Size of task-specific data ResourceID's: One (The ID of the code module to handle the distributed process) Shuntable: No 20 ResourceReq: No DPP UpdateResp Header is:
DPP UpdateResp,16 HeaderSize,2 $$ Size, in bytes, of DPP UpdateResp header ProcessID,2 $$ ID of process for which to return processed data ,12 $$ Reserved The term "code module" is used herein to denote a self standing portion of an applications program dedicated to the performance of a specific operation of the applications program. For example, in a painting program, one code module may control the drawing of a line, while another code module implements the application of color and yet another code module is used for generating a geometrical figure such as a circle. These code modules are independent in that at least some of them are not required for executing any particular operation. Sometimes two or more modules are required to produce a particular result.
However, in no case are all modules required.
The term "machine-executable" as used herein refers to code modules which are program modules, capable of controlling computer operations and changing the state of the arithmetic logic circuits of a general purpose digital computer, thereby changing the functionality of the general purpose dieitat computer. Thus, "machine-executable code modules" do not include data files and other passive electronically encoded information.
The term "applications program" as used herein refers to any executable collection of computer code other than operating systems and other underlying programming for controlling basic machine functions. Thus, the Modularized Code Master Protocol, including its subprotocols, is an applications program which is itself modularized and transmittable in code modules over a network. For example, at least some subprotocols will not exist on some secondary servers. Should such a subprotocol be required for a secondary server to compete a task or process a user's request. then that required subprotocol may be transmitted over the network from the primary sewer to the secondary server.
Subprotocols are handled by including a subprotocol identifier in the MCMP
Header 87 ,..
attached to each MCMP packet. On an MCMP server, the circuits for handling the subprotocols may be plug-in modules which are handled in real-time by the CMXP
protocol.
When an incoming packet is received, the appropriate subprotocol handler is called. The subprotocol handler can then process the packet in whatever way is required. A
protocol handler becomes involved in the load distribution process because the MCMP
server has no way of knowing what format the resources are in, how to transfer them between servers, or what the caching rules are. The subprotocol handler must deal with accessing, transfer, and caching of the protocol-specific resources. The subprotocol handlers are called periodically during the MCMP server's main processing loop, allowing it to perform various maintenance tasks. Alternatively, the subprotocol handier could be called from a loop running in a separate thread.
The handler for a specific subprotocol may request that the MCMP server flag a socket as being in a Proprietary Dialog Mode (PDM). On a PD'~~i socket, all incoming data is passed directly to the subprotocol handler without being processed by the MCMP
server. When a socket is retunred to normal operation from the PDM operation, the subprotocol handler must pass any ''extra" unprocessed data to the MCMP server, since it may have read a portion of one or more MCMP packets.
The term "primary server" or "source server' is used herein to denote the authoritative source for the resources relating to a particular application. For example, the primary server for the TenCORE Net Demo would be the server where the latest version of the demo was always posted.
The term "secondary server" as used herein denotes a server that receives service-handoffs from a primary server. A secondary sen'er usually mirrors the content of the primary server for which it is secondar~.~. For example. a secondary server for the TenCORE

Net Demo would be a server that could take over servicing clients if the primary server became too busy. A secondary server does not necessarily contain minors of the resources for which it is secondary server, inasmuch as the secondary server can request these resources from the primary server as needed.
A single machine is can be both a primary server and a secondary server. For example, a machine could be primary server for the TenCORE Net Demo, and secondary server for the Country Closet Clothing Catalog.
A single machine can function as primary server for multiple applications, and can function as secondary server for multiple applications.
The word "resource" is used herein to denote any block of data that can be used by a server or client. A resource can be a file, a code module, a portion of a file, a code module, a portion of a code module, a file directory, a code module directory, or any related piece of information, including the CMXP Prohibited List. The term "resource" is also used to refer to hardware and system resources, such as processor time and memory.
The term "tree-file" refers to a Catharon Tree-Structure Nameset File. A tree-file contains a series of named sets of records, which are grouped and nested into a tree-like structure (similar to an operating system's file system). In tree files, names beginning with a percent sign "%" are reserved for internal use. Any other names may be used by whatever application is maintaining the tree-file. Currently, only one percent-sign name has been assigned. It is "\%System" and it contains general information about the file, including (optionally) the name of the application that created the file, the user under who's network account the file was last edited, the date and time the file was last edited, the location of various resources in the file, the location of the default folder (if none specified), and the file's associated information.
* rE~

89 .-A.s related hereinabove, TenCORE is an interpreted language which utilizes pseudocode. Interpreter programs suitable for use with the TenCORE programming language as modified in accordance with the above descriptions are in common use today.
A description of the TenCORE programming language is set forth below. The basic characteristics of the language are discussed first, then the treatment of variables. Finally, an exposition is made of all the important commands used in the language. From this information, as well as the foregoing description, one of ordinary skill in the art can generate a modular programming language suitable for use in the invention.

TenCORE Language Basics "T
The TenCORE Language Authoring System is a complete programming environment specially enhanced for implementing computer-based training. Its editors aid in the creation of source code, images, fonts, screen displays and data manipulation. The language has complete 5 facilities for display creation, response input and analysis, and data manipulation within a structured programming environment.
Command Syntax The primary building block of the language is the command. TenCORE contains about 175 commands mnemonically named for the functions they perform. Most commands are 10 followed by a tag often with keywords that father define the specific function desired. A
command and tag taken together is called a statement. As in any language, there are rules that determine the syntax of a tag and how a sequence of statements interact to perform a specific task.
The TenCORE language is a fixed field language. In the simplest form, the syntax has the 15 form:
command tas The conrnrarrd field contains the name of a command of up to 8 characters long. The tag field begins at character position 9 (there is a tab stop here in the source editor) and can be up to 1 I9 characters in length on the remainder of the line. For many commands, the tag can be 20 continued for several lines by tabbing over (leaving blank) the command field on the following lines. Some typical lines of code look like this:
at 5:10 color yellow write Welcome to Basic Sign Language * rEl Today's lesson consists of... ""
Each statement begins with a command and is followed by a tag. In the first line, the at command causes the cursor to be positioned on the fifth line and tenth character position of the display. The second color command selects yellow to be used for following graphics and text.
The last w rite command puts tent on the display at the position and color previously specified.
The write statement's tag continues over several lines by tabbing over succeeding command fields.
Selecti~~e Form ~tanv commands have a selective form' command SELECTOR: negT.~G: zeroTAG: oneT.AG.. . .nTAG
The SELECTOR is an expression consisting of variables. constants or calculations that is evaluated and used to select a specific tag from the list. The tags are usually separated by semicolons although other separators are available The nT.~G case is selected when SELECTOR
evaluates to n or greater. .~ blank entw in the list t .. ) can be used to skip execution of the 1 ~ command for a specific case. If dan is defined as an integer variable programmed to hold a particular day of the week. then the following: statements would dispiau that day on the screen at 5:10 write Today is ~.rritec day;;, Monday; Tuesday; Wednesday; Thursday;
Friday; Saturday; Sunday Since TenCORE defines logical True to be the value -1 (or am' negative value) and false to be 0 (or any positive value), any two tag selective acts as a true or false decision:
command SELECTOR: trueTAG: falseTAG
SUBSTITUTE SHEET (RULE 26) Conditional Form Some commands (especially the judging commands) have only a CONDITION as the tag that is used to determine if the command executes or not. The condition is any expression that logically evaluates to trr~e (-1 ) or false (0).
command COIrrpITION
For example, if you wanted to accept misspellinss aftei a student's third attempt at matchine a response, you could use a conditional expression based on the system variable arses which holds the number of previous judging attempts:
okspell ztries > 3 answer Mississippi Embedding '~lanv text handling commands allow the embedding of further commands in the body of the text.
command TEXT «command.ta~» TEXT
The ssmbols « and » are the embedding symbols accessed by the [.~L.T][.] and [ALT][ ]
keys. Frequently. the embedded command name can be abbreviated to the first letter or rn~o to save space: a g., the abbreviated form of the embedded show command is simply s. Embeddine is frequently used for display of variables and the control of plottine attributes mithin teat statements thereby effeciently coding for an entire display:
write «eolor,red»Your score «color,white» is «show,score»9.
T'he «c,green»elass average «c,white» is «s,average»8.
Comments. Spacing and Continued Commands An asterisk (*) at the beginnins of a line marks the entire line as a comment that is removed by the compiler and has no effect on execution. ~ commern can be placed on am~ line of SUBSTITUTE SHEET (RULE 26) i .»
code by placing it after double dollar signs $$: the compiler removes the comment and it does not affect the execution of the code:
cslc tamp ~ temp*9/5 + 32 SS convert centigrade to Fahrenheit Normally, trailing spaces on a tag are removed by the compiler and do not affect execution. This is also true when double dollar $$ comment signs are used: the compiler removes the comment and any spaces back to the real tag. For some text commands, you may actually want the trailing spaces and can direct the compiler to maintain them by using an on-line comment with triple dollar signs SSS The following example would display something like Welcome Bob:
write Welcome SSS maintain single trailing space shows name h4ost commands with non-selective tags can be repeated again «~ithout the need for typinG in the command field again. "Space" can also be added between most lines of code to make the coding read well:

1S This section of initializes code parametezs.

calc frame c 2045 SS starting frame number file ~ 'bangs' SS use the explosion library block c 'mega' SS use the big explosion type c 'nameset' $$ these are nauteset files attach fila;type SS attach the file U111tS

A sequence of TenCORE statements makes up a functional entim called a rrrur analosous to a procedure or subroutine in other languages.
Commands can be grouped imo units in any «'av that makes sense. Simple "page turning"
lessons consist of multiple frames of material: each could be a unit. A
complex Graphic that is SUBSTITUTE SHEET (RULE 28) CA 02297069 2000-O1-19 , WO 99/07007 PC'f/US98/156Z7 ...
used several places in a lesson can be put once into a single unit which is then referenced at each point it is needed. A simulation can have each functional part in its own unit.
Each unit must have a unique name of up to 8 characters in length starting with a letter.
Punctuation, special symbols and the two system reserved names x and q are not allowed.
Referencing Units If you want to reference a unit in the same lesson, you simply state the unit's name:
do clock SS call unit clock to start ti~aiag going If you want to access a unit in a lesson different from the one currently executing. then you must eive both the lesson and unit names:
do maps,illinois SS shot., the map of Illinois Finally, you may not want to explicitly state the unit or lesson names but rather refer to names that have been calculated into variables This is done by enrbeddW g the variables inhere the explicit names would normally appear. Embedding consists of surrounding the variables with the « and » symbols. For example. say that all the lesson and unit names in a project have been put 1 ~ into the 8-bwe arrays lessons and unrrs. then am~ unit can be accessed by setting the indices to point to the desired unit:
do «lessans(i)~,«uaits(j)u Generic Unit tames System keyword names exist to provide Qeneric branch destinations to main units in the current lesson or back to the system. For example,=next and =back can be used for the unit name when jumping to the next or pre~~ious main unit in the current lesson;
=exit can be used to exit the current lesson back to DOS, the editor or the system Activiy l~4anager. A descriptive list of the nine generic unit names along with examples of their use is found with the jump write-up.
SUBSTITUTE SHEET (RULE 2B) i Unit Terminology:
".
Units can play a number of different roles during execution depending on how they are used. Units may correspond to major displays and interactions that a user experiences: the "pages" of the lesson. On the other hand, a unit may simply be a subroutine called by one of these 5 major units to perform a sub-task. The following terms are used to describe various functional units.
main unit .~ main unit is the first unit executed in a lesson and am~ other unit reached by a jump type branch. It normally corresponds to one "pave" or user situation in the lesson. It is the IO starting point for all user interaction. When the end of the main unit is reached in execution, the system waits for a key press or other interaction to occur to branch the user to another main unit.
Branching to a ne«~ main unit norirtally~:
~ erases the screen ~ re-initializes all plotting parameters 1 S ~ resets branches to their lesson defaults ~ clears all painter areas ~ establishes a new main reference point in the lesson current unit The current unit is the unit currently executing. It may be the main unit or a subroutine 20 unit called from the main unit b~~ a do or flo~~~ command.
done unit A done or called unit is used to describe a uttit executed as a subroutine.
Vfhen the end of a done unit is reached, control returns to the command following the calling command in the invoicing unit or to the waiting state from where a slow branch was triggered.
SUBSTITUTE SHEET (RULE 25~
*rB

base unit The base unit is the main unit at the time a branch occurred that was modified with the base keyword. It can be used to set up a common help sequence that can automatically return to whatever main unit called it. Return to the base unit occurs through a branch using the =base S generic name.
startup unit The startup unit is the first unit executed in your lesson either from DOS or a tourer such as the system Activity hianager. It is usually the first physical unit in the lesson file and should contain a startup comrnand if the unit is to be directly entered from Dos.
restart unit A restart unit is placed in the lesson flow where return from an interruption in the learning session can occur. It would generally have a restart command in it and should have a display that can re-orient the student afrer the interruption. The system Activity h4anaeer would branch a user to one of these units if the "continue last lesson" option is chosen upon student sianon.
Control Blocla Control blocks offer a means to expand control of major events such as starting or quitting a lesson or in going from one main unit to another. Coding in a lesson's control blocks is automatically executed at these major events resardless of the specific starting. ending or main unit im~olved. This is a convenient way to ensure that necessaw initializations or cleanups are done. Control blocks are created in the editor on the block directory page.
Besides the following, some additional control blocks are discussed in the Updates chapter.
SUBSTITUTE SHEET (RULE 26) +initial The code in a +initial control block is executed each time an outside jump type braach is made to the lesson: e.g., starting the lesson from DOS, executing the lesson from the editor, jumping to the lesson from another lesson or from the Activity Manager. It can be used to load S fonts, set plotting conditions, initialize data keeping, etc. regardless of where entry to a lesson occurs.
+main .~ +main control block is executed each time a new main unit is entered: it is used to perform operations common to the beginning of all the main units in a lesson.
For example, it can be used for: displaying a lesson-wide background image and flow bar, saving restart information, or displaying debugging information during lesson editing such as the current main unit name.
+exit A +exit control block is executed whenever control leaves the current lesson as during a jump to a different lesson or when quitting to DOS or to the calling program that started the current lesson running. It can be used. for example. to collect end-of lesson summan~ information or to turn off any deuces that were turned on for the lesson.
+editor A +editor control block is executed each time you go to edit the file. It can be used, for example, to load fonts for text editing.
Screen Resolution A wide range of PC display hardware is supported from the original CGA and EGA
adapters to A'ICGA, Z'G A and Enhanced ~'Ga adapters. Each of these includes an increasing collection of graphic and text screen resolutions and color capabilities.
TenCORE courseware is typically created using a specific screen resolution and color range that is supported on the target SUBSTITUTE SHEET (RULE 26~

i .,.-population of run-time machines for your courseware: often the lowest common denominator is used. The screen command selects these parameters and is usually placed in the +initial control block of a lesson.
Graphic Coordinates A particular screen pixel is addressed by x and y graphic coordinates with 0,0 specifying the lower left corner of the screen:
dot 100, 200 SS write the pixel at x=100, y=200 at 320, 240 SS at the center of the vga screen circle, 75,fi11 SS draw a filled circle of radius 75 AZost display commands update the system variables zx and zy as pan of their operation and thereby define the current screen location.
Character Coordinates Text can be more com~enientl~~ addressed b~~ character coordinates that specift~ a line number and character position that are separated by a colon to distinguish them from eraphic I S coordinates:
at 5:15 SS line 5 character 15 write Text on line 5....
Defaults Graphics and text commands display using the current settings for numerous attributes ZO such as: the foreground and background colors, the plotting mode, text size and drop shadowing, etc. These attributes can be set just prior to using them:
color yellow $$ the following in yellow node write SS overstrike plotting mode 25 text shadow; on SS drop shadowing on text SUBSTITUTE SHEET (RULE 28) i text si:e: 2 SS size two fonts at 5:10 S$ at line 5, character 1 write A cross aeation of the sun...
Attributes have initial default values that are set by the system when executing an initial or screen command as at the start of a lesson: e.g., the system default foreground color is white and the text size is 1. Attributes are automatically returned to their default values at the start of each main unit or they can be forced as a croup to their default values at any tithe by use of the statement status restore: default. Upon jumping to a new' main unit after executing the above example code, size 1 text and color white would be put back in operation. See the initial command for a list of the display auributes and their standard default values.
To give a common "feel" to a lesson, it is convenient to set the attribute values to your default values at the start of all units in the lesson. That way, if you later chance your mind about using, say, the gothic font throughout a lesson, you can merely chance the font default value to something else and have it apply to the entire lesson The status save: default statement is used to reset the attribute defaults to their current values:
color yellow text spacing: variable text shadow, on text margin: wordwrap status save: default SS the above are now lesson defaults Lesson defaults are usuall~° set in the +initial control block of a lesson.
Variables Author-Defined Variables TenCORE supports both local and global variables.
SUBSTITUTE SHEET (RULE 26) Local variables are defined in a specific unit and are available only to that unit. When a "~
unit is exited, either by reaching the end of the unit or by branching to a new main unit, the values of its local variables are lost.
Global variables are available throughout the lesson in which they are defined and retain their values for the entire program. Vfith the help of the TenCORE Activity Manager or a similar program, global~variables can even be made to retain their values across TenCORE sessions.
Local Variables Local variables are created by defining them within a source unit, between a define local and a define end statement.
define local height,2 SS defines the 2-byte integer variable height length,4,r SS defines the 4-byte real variable length define end Variables defined in this way are known only to the unit in which the definition occurs, and the values assigned to these variables are lost when the unit is exited via anv command which goes to a ne«~ mam unit.
Local variables are usually used for temporan~ information which is not needed outside the current unit, such as loop indexes.
Global Variables A special block, called the defines block, is normally used to hold global ~~ariable definitions. Within the defines block, variables are defined by inserting lines of this form:
name,size[,type]
as m:
SUBSTITUTE SHEET (RULE 26) WO 99/0?007 PC'T/US98/15627 defines haight,2 SS defines the 2-byte integer variable height length,4,r S$ defines the 4-byte real vaziable length Variables defined within a defines block are global variables. They are available in every unit within the file, and are normally used to store informafion which is needed in several places, such as the user's name or status within the program.
Global variables for every lesson are stored from the beginning of a single memory area resen~ed far global variable storage. This means that if a program extends over two or more source files. it is important that all source files use the same defines and/or coordinate their shared use of this area. This subject is treated in more depth in the Physical Allocation of Variables chapter.
Local Definition of Global Variables Similar to local variables. global variables can be defined bem~een a define global and a define end statement l~ define global height,2 lengih,4,r define end Variables defined bem~een define globs! and define end use the global variable storage area, but are known only within the unit in which the definifion occurs.
The define global command should be used only for isolated test units and a few special purpose utilities. L;~sed without an understanding of how space for global variables is allocated.
the define global command can lead to conflicting definitions of variables and unpredictable program behavior. For more information, see the Physical Allocation of Variables chapter.
SUBSTITUTE SHEET (RULE 26j i Precedence of Variable lames A local variable can be eiven the same name as an existing global variable in this case, the local variable supercedes the global variable.
globals (defines block) user,20 screen,5 define local user,4,r define end Here "user" has been defined as both a elobal and a local variable. Within unit screens, the global variable "user" cannot be accessed Am~ time that "user" appears in unit screens. it refers to the local variable Variable \ames 1 ~ Variable names can be one to eicht characters long. .-~m~ of the following mac be used in variable names:
~ letters (including those in the extended character set. such as .A and O) ~ numerals ~ period (.). underline ( ). caret( ' ) and tilde (-) 20 ~ ettended ASCII characters The first character of a ~~ariable name may not be a numeral or a period. Some samples of valid v ariables names are:
usernama Lesson xLOGT
SUBSTITUTE SHEET (RULE 28) i x.loc last x Mist root Invalid variable names include:
2student may not start with a numeral useraddress ~ name longer than 8 characters unit'n punctuation not allowed Case is significann the variable "a" is different from the variable "A" and the variable "alpha" is different from the variables "Alpha" and ":~LPH.~".
Spacing around the elements of a variable definition is not significant. Most authors apply one of m~o different smles in defininc variables define local width,2 1~ height,2 are a , 2 length.2 msss,4,r define end In the style above, the length and mpe of each variable are written immediately after the variable name. Another common smle is the followinc:
define local width , 2 height ,2 area ,2 length ,2 mass ,4,r SUBSTITUTE SHEET (RULE 26) i define ead In this style, the lengths of all the definitions are aligned in a tabular format These styles are functionally equivalent.
Variable Tppes Any of the three types can be defined globally or locally. Variables in TenCORE are not "strongly typed", i.e. a variable defined as one type can often be used in operations primarily intended for another type of variable.
Integer Variables Integer variables store posnive and negative whole numbers. Integer variables are defined as follows:
a,l x,2 line,3 tense , 4 total,8 Where the normal form is nante,smc~. The size of an rote=er variable can tie 1. ~. ;, .~. or 8 b~~tes. The size determines the range of values that the variable can store.
size _I Ranne -1?s to I~-' -3'_ -. G s to . 3 ; G'.

-s. ~ss.~ns to s.:~s.bo-I -~.~.t-..~s:.c>~s to 2.m-..ss3.b.t~

s -9to'vo-9to~!

Integer variables are significant for all values within their range: no rounding errors occur from addition, subtraction, or integer multiplication of integer values.
However, rounding is 20 performed when real values are assigned to integer variables and when integer division is performed.
SUBSTITUTE SHEET (RULE 26) *rB

WO 99!07007 PCT/US98l15627 .-Integer-type variables optionally take the npe modifier integer, which can be abbreviated as i:
x,2.i liae,3,iateger TenCORE stores integer values in natural (high-byte to low-byte) order. (hsany h4S-DOS
programs store integer values in low-byte to high-byte order.) Real Variables For storing non-integer numeric values. TenCORE provides real variables. which are defined as follo«~s force,8,reai area,4,r Where the normal form is rranre.sr_e.real. Real variables can be either -~ or 8 bytes IOnQ.
and the tai real or its abbreviation r must follow the size specification when the variable is 1 ~ defined The size of a real variable determines the range of values that the variable can store and the precrs~on. measured in srgruircaru drgrrs, with which the variable can store the value.
Size I Range I Si~nif cant Digits l ,~ -8 lft.: . ., 1 Eight-bye real variables should be used whenever storage space is not at a premium. if 4-byte real variables must be used. they should be compared only to other 4-byte real variables.
Comparisons of the form ii length = 1.1 can give unexpected results due to the limited precision of 4-byte real variables.
Real variables are stored in IEEE format. As in the case of integer variables, the bwes are stored in natural (high-to-lowO'order rather than the reverse order used by some programs.
SUBSTITUTE SHEET (RULE 26) A variable declared with no size and no type is created as a 4-byte real variable.
Non-Numeric Buffer Variables For holding text or other information, non-numeric variables can be defined with any size from 1 b'~te to 32767 bytes (provided that enough variable space is available), as in:
$ username,20 unitname,8 italics, 2052 The general format is name,si~e. \on-numeric variables are most often used to store text, but they can also be used to store am~ other information requiring a buffer.
There is no difference bem~een the definifion of a non-numeric variable with a IenQth of l, 2, 3, 4 or 8 b~~tes and the definition of an integer variable of the same size. Only the context in which the variable is used indicates whether the variable holds inteser or non-numeric data.
In TenCORE command syntax. non-numeric variables are referred to as "buffers".
Arrays 1 S The variable types described so far are all scalar. meaning that each variable holds only one value. TenCORE also supports array variables .~ array is a series of variables of the same size and type. all referred to by the same name. using an nu~c~x to speciy individual elements of the array. An array index is simply a number in parentheses which appears immediately after the name of the array.
average(100),4,real SS array of one-hundred 4-byte reals count(5),2,i SS array of five 2-byte integers bignum(20),8 SS array of twenty H-byte integers table(10),256 S$ array of ten 256-byte non-numeric variables SUBSTITUTE SHEET (RULE 26) i ...
The defitufton of an array variable looks like the definition of a scalar variable, except that the variable name is followed by a number in parentheses which specifies the number of elements (values) the array should hold. The general form for defining an array is:
rrame(elemerits),si~e, npe S Arrays can then be referenced in TenCORE code as in:
talc count ( 3 ) G 10 detain l,table(index),1 Brackets are svnom~mous with parentheses, permittins the following alternative notation.
talc count(3] c 10 0 detain l,table(index],1 TenCORE supports onl~~ one-dimensional arra~~s: arra~~s of t«~o or more dimensions can be simulated usinc functions S~~stem-Defined Variables TenCORE provides a number of system-defined variables which store information about the current state of the pro~_ram These s~~stem-detined ~~ariables ~u~uall~~
shortened to s~~stem variables) are simply names which TenCORE recognizes as representing numbers or other variable information System variables provide information which is frequently needed or which might be tedious or impossible for the author to maintain in author-defined variables :0 For instance, the system variable ztries can be used to refer to the number of times the user has entered a response to the currently active arrow structure:
if ztries > 3 write The correct answer is: green endif SUBST1<TUTE SHEET (RULE 26) WO 99/07007 PCT/US98l15627 ..
This example displays the correct response to a question if the user has already tried to answer more than three times.
System variables all begin with the letter "z". This makes them easier to recognize. As a matter of good programming syle, author-defined variables should therefore avoid names which begin with "z". It is possible to create an author-defined variable with the same name as a system variable. In this case, the author-defined variable has precedence and the value of the system-defined variable becomes unavailable.
The followin_ are examples of some other system variables zreturn is set b~~ many commands to indicate the success or failure of the command. A
negative value of zreturn indicates success, while various non-negative values indicate different reasons for failure of the command zreturn is a one-bs~te integer reflecting conrnrand status.
~ zcolor is set to the value of the currem foreground plotting color. It is a m~o-bye integer relating to drsplm corrrro!
~ zmainu contains the name of the current main unit It is an eieht-byte variable relating to branching Values cannot be directly assiened to system variables. However. some system variables are affected by an associated command: for instance, zcolor indicates the currently selected foreeround color and is therefore affected by the color command. Executing color white+ sets zcolor to 15, the value corresponding to bright white.
A comprehensive list of system variables organized according to categow follows. In addition, many command descriptions refer the reader to system variables affected by the command.
SUBSTITUTE SHEET (RULE 26) i System Variables zareacnt 2(int)Number of areas currently defined zareahl 2(int)Area ll'~ of currently highlighted area (0 if no area highlighted) zargs I (int)~ Number of nonnull arguments actually received by either a -receive-or by the return argument list of a -do zargsin - T(int)Number of arQttments sent by -do-, jump-, or jumpop zargsout 1(int)Number of arguments the invoking unit expects returned zaspectx ~(int)x-aspect ratio correction factor zaspecy 2(int)y-aspect ratio correction factor 0 zauthsys 1 (int)Indicates the TenCORE executor type:

=
L.~S
author executor (TC.~C:THOR
E~) 0 = udent executor (TCRL,~'\.E?~) st 1 = Producer e~cecutor (TPR.EXE) zbinary 1 (int)Tvpe of file from which "zlesson" was loaded 1: -1 = binaw: 0 = LAS source. 1 = Producer source zcharb 2(int) Offset of standard size 1 font baseline zcharh 2(int) Height in dots of standard font or charset zchanv 2(int)Vv'idth in dots of standard font or charset Dote: all tew positioning is based on the standard font (zchany, zcharh, zcharb), not the current font.

20 zclipxl 2(int) X-coord of lower left corner of clipping area zclipx2 2(int) X-coord of upper right corner of clipping area zclipyl 2(int) Y-coord of lower left corner of clipping area zclipy 2 2(int) Y-coord of upper right corner of clipping area zclock 4(int) Value of the system clock, accurate to -ms SUBSTITUTE SHEET (RULE 26) i zcolor 2(int) Foreground color set with -color zcolore 2(int) Erasure color set with -colore zcolorg 2(int) Background color set with -colorg zddisk 1(int) DOS default drive: 1=A:, 2=B:, 3=C:

zdisk 1(int) Method of searching for data files: Values same as "zedisk"

zdisks 4(biis)Bitmap of drives TenCORE can access, set in DOS
by SET CDISKS=

zdisplay I (int) Current active display number (dual screen driver only) zdispx 2(int)X-size of current window zdispy 2(int)Y-size of current window zdolevel 2(int) Current level of do mpg command stack (do, libray, flour do, flow libraw) zdomcnt 2(int) dumber of existing domains zdomname 8(alpha)Name of current domain zdompar 8(alphal\ame of parent domain zdoserr I (int) DOS disk error code Set onl~~ ~i~hen "zreturn"
= 0, indicating a disk error:

disk is write-protected 2 rive not ready (door open or bad drive) 4 CRC error (error detected in data) 6 seek error (bad drive or diskette) 7 unknown media type (unrecognized diskette) 8 sector not found (bad drive or diskette) 12 general failure (bad drive or diskette) zdosver 4(alpha) DOS version number in the format "7~.3~"

zedisk 1(int) A~iethod of searching for sourcelbinant files:

SUBSTITUTE SHEET (RULE 26) I

.r -1 = search all drives; 0 = search only "zddisk"
-2 = search only system pseudo-drive 1, 2, 3,... = search only drive .A., B:, C.
zedoserr 8(int) DOS extended error code, set when "zreturn" = 0. Valid only when running under DOS 3.0 or higher. The format is:
2 bytes error code 1 bite error class 1 bite actions 1 b~~te locus The remaining three bSZes are reserved.
zenable O(bits) -enable- flags This variable is a set of bits numbered 1 to 32. Certain its correspond to -enable-commands as follows 1 enable absolute 9 (resen~edl ~_ enable pointer 10 (reser<~ed) 3 enable mode 11 i resewedl enable cursor 1= enable break 5 enable ptrup 13 enable arro«~
6 enable font 14 (reser,~ed) 7 enable area 15 enable fillbreak 8 (resen~ed) (bits 14-;2 reserved) Use the bit() function to test "zenable". For instance, bit(zenable,2) is -1 if the pointer is enabled and 0 if not zem~ien 4(int) Length in byes of DOS environment buffer SUBSTITUTE SHEET (RULE 2S) * rFs i ..
zemloc 4(int) Absolute memory location of DOS emironment buffer zerrcode 2(int) "error code" value from "zedoserr"

zerrlevl =(int) DOS variable "errorlevel" as return from last exec file.- command zerrorl 8(alpha)Lesson name of unit to execute if an execution error occurs, set by -error zerroru 8(alpha)Ltnit name of unit to execute on execution error zeiitbin 1 (int) Type of file from which =exit branch will be loaded:

-1 = binan~; 0 = source; 1 = tpr zeaitl 8lalpha) Lesson name to branch to on -jump =exit zexitu 8(alphalL'nit name to branch to on -jump =exit zfcrecs 4(int) ;umber of contiguous free records in the attached nameset ype file zfdisl: 1(int) Disk on which the attached fUe re~ide~.

1 = drive .~.. : = drive B:. etc.

= = s~~stem path zflowent '_'(int) \umber of tlow branches currently defined zfname S(atphal\ame of the attached file. G if none attached zfnames '_'(int) Total number of names in the attached file; has no meaning for dataset files zfontb ~(int) Offset of current font baseline zfontf 4 (bits)For font groups, specifies which of the attributes were fit correctly and which were synthesized. Bits defined as follows:
6 = Bold attribute matches request 7 = Italic attribute matches request 8 = Size attribute matches request 16 = Narrou~ attribute matches request 22 = Bold Synthesized SUBSTITUTE SHEET RULE 26) i 23 = Italic Synthesized 24 = Size Synthesized For the bits above that are synthesizable, the attribute may not match the request but also may not be synthesized; for example, if the font group only has bolded items, and the current attributes specify non-bolded, then bits 6 and 22 will both be off zfonth 2 (int)Height in dots of currently active font zfontret I (int)Information on how closely the selected font fits the requested parameters. All values available for font groups, For fonts, values -I, ? and 3 are IO possible. Set by -font-, -text-,status restore-.
-3 = partial match. some synthesis required -I = exact match = partial match. some non-svnthesizabie attributes could not be matched I = no suitable match found; base font is in effect l : 2 = base font not available; standard font is in effect 3 = standard font not available; charsets are in effect zfont«~ 2(int) V'idth in dots of currently active font zforce 2(bits)force- flays This variable is a set of bits numbered 1 to 16. Certain bits correspond to -force-?0 commands as follo«~s:
1 force cursor lock-zinfo 8(int) Associated information bytes for the selected name in the attached file; has no meaning for dataset files 2 force number lock-3 force extended-SUBSTITUTE SHEET (RULE 2B) i WO 99/07007 PC"TNS98/15627 4 force charset-(bits 5-16 unused) Use the bit{) function to test "zforce". For instance, bit(zforce, l ) is -1 if -force cursor lock- is in effect and 0 if not zfrecs 4(int) Total number of data records in the attached file zfrombin ~ 1 (int) Type of file from which "zfroml" was loaded:

-1 = binary; 0 = source; 1 = tpr zfromd 1 (int) Drive from which "zfroml" was loaded. Same values as zldisk zfrom 8(alpha)Lesson name of unit which invoked current unit via -do-, -libraw-, or main-unit branch zfromlin 2(int) Line number of command in "zfromu" which which invoked the current unit zfromu 8(alpha)Unit name of unit which invoked currert unit zfrecs 4(int) Total number of data records in the attached file 1 ~ zfype 8(alpha)Tvpe of the attached file: 0 if none attached:
file ypes: source. tpr.

dataset. nameset.binan~. roster, course. studata, and group zfunames 2(int) Dumber of names used in the attached file zfurecs 4(int) I;umber of records used in the attached file;
has no meaning for dataset files zfver 4(alpha)TenCORE version which created the attached nameset as "X.XX"

zheolor 2(int) Hardware color set set with -color zhcolore 2(int) Hardware erasure color set with -colore zheolorg 2(int) Hardware background color set with -colorg zhdispx 2(int) Physical x-size of current screen type SUBSTITUTE SHEET (RULE 26) i ziafo 8(int) Associated information bytes for the selected name in the attached file;
has no meaning for dataset files zinput 2(int) Keypress value of last key processed 0 no input 1- 255 standard or extended character > 255 non-character keypress "zinput" contains 2-byte kevpress v slues. To determine if "zinput" contains a particular value, one of the following forms is required:
zinput=%"character" zinput=%alt"character"
zinput=%cti"character" zinput=%altctl"character"
zinput=%ke~~name The °~oalt, %ctl, and °.oaltctl modifiers operate on single standard ASCII characters (h20 - h7f). The °ro modifier operates on standard and extended characters (h20 -h0ff) in double quotes and on named keys 1 ~ zinputa 3(int) Area ID of area causing the current zinput value (0 if zinput was not generated by an area j; set when zinput updated zinputainfo 8(int) Value of info tag for area that caused this branch zinputf 4(bits Keyboard and pointer status at last input This variable is a set of bits numbered 1-32. Certain bits correspond to keyboard and pointer status as follows:
1 Insert turned on 2 CapsLock turned on 3 NumLock turned on 4 ScrollLock turned on SUBSTITUTE SHEET (RULE 2B) I

.-either Alt kev down 6 either Ctrl key down 7 left Shift key down 8 right Shift down 9 SysReq key down CapsLock key down 1 l NumLock key down 12 ScrolU..ock kev down 13 rieht Alt kev down 10 14 right Ctrl key down I S left Alt kev down 16 left Ctrl kev down 17 enhanced keyboard "extra" key 18 key is from .aJt-numbers 19 key is from pointer action ke~~ is from "pointer up" action 21 key is from touch device (bits 2~-29 reserved) middle mouse button pressed (Some mice produce bits 31 R 32 instead of 0 30 on a middle button press) 31 right mouse button pressed 32 left mouse button pressed Use the bit() function to test "zinputf'. For instance, bit(zinputf,2) is I if CapsLock was turned on during the input in "zinput", and 0 if not.
SUBSTITUTE SHEET (RULE 28) I

zinputx 2(int) Graphics x location of pointer when "zinput" was last updated zinputy 2(int) Graphics y location of pointer when "zinput" was last updated zintincr 2(int) hiinimum significant increment for I value in -palette zintnum 1(int) Interrupt number used by TenCORE device drivers zkeyset 2(int) shift flag byte and scan code of last key processed.
high byte = shift flags low bwe = scan code The high bwe is a set of bits numbered 1-8. duplicating the first eight bits in "zinputF' The low b~~te is a "scan code" identifying a physical key zldisk 1 (int) Drive from which the currently executing lesson was ...-loaded.1,3.3...=A:.B:,C:...; -2=system drive ziength 2(int Length of judging buffer after -put zlesson 8(alpha) File name of current unit zlident 8(alpha) Identification scored in current binan~ file zline 2(int) Current character line zlinfo 2(int) 'umber of b~~tes of associated information for the attached file; has no meaning for dataset files zlname 2(int) Maximum length of a name in characters for the attached file; has no meaning for dataset files ' zmainl 8(alpha) File name of main unit zmainu 8(alpha) Unit name of main unit 6 zmargin 2(int) x-coordinate of left text margin zmaxarea 2(int) l~4aximum number of areas; default=1000 SUBSTITUTE SHEET (FIULE 28) i zmaxcol 3(int) Maximum number of colors available on current display~-zmaxdom =(int) Maximum number of domains allowed zmaxflow '_'(int) Maximum number of flo~ branches that can be defined zmaxpage 3(int) lumber of available hardware display pages zmlength 4(int) Size, in bytes, of the last-referenced memory block.

Due to Windows memory management and disk swapfile, the effective memory pool size is generally more than large enough for most TenCOR.E needs on a typical Windows system. However, you should always check zreturn because it is possible for memory-related commands to fail, particularly on Windows systems with low memow. For compatibility reasons, the system variables zmem, zrmem and zfmem never return a value greater than ~ l?K (~34.?88).
However, if enough memory is available, a memory block as large as 1,08,660 bwes (hex FFFFO) can be created. :~.Iso for compatibility reasons, zxmem always returns a value of 0.

zmem ~(int) Current size. in bwes, of memory pool 1 ~ zfmem a(int) Largest block that could be allocated in the memory pool zrmem ~(int) Largest block that could be allocated in the memory pool zxmem A(int) Set to 0 zmode 2(int) Current screen display mode 0 = im~erse 3 = write 6 = add 1 = rewrite 4 = noplot 7 = sub 2 = erase 5 = xor zmouse 1 (int)Indicates if the mouse device driver is loaded:
-1 = mouse driver loaded;
0 = not loaded SUBSTITUTE SHEET (RULE 26~

i t19 zmstart ~(int) Absolute address of the last-referenced memory block.
The top two byes are the segment and the bottom two bytes are zero to conform to a standard absloc address usable in memloc(a,zmstart) zmxnames a(int) Viaximum number of names permitted in the attached nameset type file S zname 8(alpha)First 8 characters of the selected name in the attached file:
has no meaning for dataset files w zndisks 1(int) Number of drives defined within DOS as set by LASTDItIVE= in CONFIG.SYS
znindex 2(int) Position of the selected name within the attached nameset type file znumber 2(int) Number of replacements made with -put zoriginx 3(int) Relative ~-coord of origin as set with -origin zoriginy 2(int) Relative y-coord of origin as set with -origin zpalincr 3(int) Minimum significant increment for R, G, and B values in -palette zpcolo 3(int) Color of dot of last pointer input location: in text mode,foreground color 1 ~ of character zplotxh 2(int) L.pper x text extent (see text measure zplotxl 2(int) Lower x text extent (see text measure zptoty h ?(int) Upper y text extent (see text measure zplotyt 2(int) Lower y text extent (see text measure ?0 zrec 4(int) hTumber of records associated with the selected name in the attached file;

for datasets equals "zfrecs"

zreturn I(int) Indicates the success or failure of a command which sets this system variable.
"zreturn"
is generally set by commands which access disk or the TenCORE
memory pool.
Possible values for "zreturn"
are:

SUBSTITUTE SHEET (RULE 26) I

3 Redundant operation (no action takenl -1 Operation successful 0 Disk Error: see "zdoserr"

1 No file attached 2 Block out of range 3 Memory or value out of range 4 Does not exist S Im~alid device selected 6 Duplicate name 7 Directory full 8 Insufficient disk records 9 ~o name in effect 10 Vame or block not foundl l Im~alid type l~ I? Im~alidnameleneth 13 Invalid information length 14 Too many names/records in nameset \ameset directory corrupted 16 Invalid name 17 Invalid image or data 18 Unable to fill memory pool requests 19 Operation invalid in context 20 datain- on locked data 21 Conflict W ith another user's lock SUBSTfTUTE SHEET (RULE 26) i 22 Too manv locks on one name 23 Screen coordinate out of range 24 Required name/record lock not found zrmargin 2(int)x-coordinate of right text margin S zrotate 2(int)Number of degrees of rotation zrotatea 2(int)x-coordinate of rotation origin zrotatey 2(int)y-coordinate of rotation origin zrpage 1(int)Display read page set by -page zrstartl 8(alpha)Lesson name of restart unit, set by -restart zrstartu 8(alpha)Unit name of restart unit, set by -restart zscaleox 2(int)x-coordinate of scaling origin zscaleoy 2(int)y-coordinate of scaling origin zscalex 8(real)x-scaling factor zscaley 8(real)y-scaling factor I S zscreen 1 (int)Current hardware (BIOS) screen:

0, 40 x 25 text cga,text,medium 4, 320x200 graph 4 color cga,graphics,medium 6 640x200 graph 2 color cga,graphics,high 7 80 x 25 mono text mda 13 320x200 graph 16 color ega,graphics,low 14 640x200 graph 16 color ega,graphics,medium 16 640x350 graph 16 color ega,graphics,high 17 640x480 graph 2 color mcga,graphics,high 18 640x480 graph 16 color vga,graphics,medium * rEt i WO 99/07007 PC'T/US98/15627 19 320x200 graph 256 color mcga,graphics,medium zscreenc 1(int) Current screen color type, as selected with the -screen- command: 0 =

color; 1 = mono zscreenh 1(int) Screen hardware driver (*.DIS file); adjusted for display hardware actually detected:

0 cga 10 vga 2 hercules 11 mcga 3 ega 4 evga 9 att zscreenm 1 (int) Current screen mode, as selected with the -screen-command: 0 =

graphics, i = text zscreenr 1(int) Current screen resolution, as selected with the -screen- command:

0 low 2 high 1 medium 3 alt 1 4 ait2 ~ alt3 zscreent 1(int) Current screen type, as selected with the -screen-command:

0 cga 5 ncr 10 vga 1 tecmar 6(reserved) 11 mcga 2 hercules 7(reserved) 1 Z online 3 ega 8 nokia 13 (reserved) 4 (reserved)9 att~ 14 evga zsdisks 4(bits)Bitmap of drives to include in automatic searches, set in DOS by SET

TCSEARCH=

zserial 8(alpha)8-character serial number of TenCORE executor i zsetret 1(int)Kind of match found when -setname- is executed;
possible values ,.are:

N Unique partial match (N-1 chars) -1 Exact match; a name is selected 0 No match; selection cleared, no name selected +N Non-unique partial match (N chars); first partially matching name selected zspace 2(int)Current character column zsysver 4(alpha)TenCORE
version in the form "X.XX"

zteEmain 4(int)Elapsed time spent in previous main unit ztmmain 4(int)System clock at start of main unit ztmunit 4(int)System clock at start of current unit zuncover 2(int)Current uncover key as set by uncover command zunit 8alpha)Unit name of current unit zvarsl 4(int)Total size of global variables, in bytes zwidth 1(int)Width of graphics lines set by -width-; affects draw, circle, ellipse, 1 S polygon, and dot zwindows 2(int)Number of windows opened (besides initial window zwindowx 2(int)Absolute x-coord of lower left corner of window zwindowy 2(int)Absolute y-coord of lower left corner of window zwpage 1(int)Display write page set by -page za 2(int)Current graphic horizontal location zamaa 2(int)Maximum x-coordinate in current window zxycotor 2(int)Color of dot at current screen location In text mode, foreground color of character i Zy 2(int) Current graphic vertical location -~
zvmax 2(int) l~raximum y-coordinate in current window Displaying the Contents of Variables Displaying Numeric Variables Variables which contain numeric information can be displayed using the show command:
at 17:21 show ztriea The normal form is show varname where varname is the name of the variable to display.
For integers, show displays the first non-zero digit at the current screen location and displays up to 20 digits. For real numbers, it starts at the current screen location and displays up to 24 places. including a decimal point and three decimal places. This can be altered by adding field and right tags, as in:
show real8,2,6 which displays up to a total of twelve places (including the decimal point):
six digits including 1 ~ trailing zeros are displayed to the right of the decimal point. In this case, if the value of "real8" is 1.2345, it displays:
1.234500 (L starting screen location) Tabular Display A second form of displaying numeric information, showt, right justifies and space-fills the field when it displays a variable. This is useful for aligning columns of numbers. For example:
define local earl ,8,r var2 ,8,r var3 ,8,s i WO 99/07007 pCTNS98/15627 var4 ..
,8,r define end set earl G 1.1, 20.02, 300.003, 4000.0004 at 5:5 showt var1,12,4 at 6:5 showt var2,12,4 at 7:5 showt var3,12,4 at a:5 showt var4,12,4 The code above produces output similar tp this:

Hexadecimal Display The showh command displays the contents of a variable using two hexadecimal base' 16 digits for each byte of the variable. For example:
calc int4 ~ 32766 showh int4 displays:
00007ffe i WO 99/0700? PCTNS98/15627 Unless the optional length tai is specified, showh displays as many digits as necessary to show the entire variable (2 digits for a one-byte variable; 4 digits for a two-byte variable; etc.).
Alphanumeric Display Text information is usually displayed using the shows (for "show alphanumeric") S command.
packz textbuf;;Good morning!
at 5:5 shows textbuf $$ displays Good morning"
The shows command displays characters for the length of the variable or for an optionally specified length.
shows textbuf,6 $$ displays "Good m"
Embedded show In practice, the show command and its variants are usually embedded in a write command, as in:
IS at 5:5 write show,reall s,reall $$ 's' is for (s) how showt,reall t,reall $$ 't' for show (t) showh,reall h,reall $$ 'h' for show (h) ahowa,text a,text $$ 'a' for show(a) Note that the abbreviations can also be s, t, used.
h, and a The characters « and » are called embed symbols. The left embedding symbol is produced by pressing [ALT][<], the right embed symbol is produced by pressing [ALT][>]
The general form for embedding a show command in a write is:
< command,expression»
Command is one of the show commands or its abbreviation; expression may be a number, a variable, or a calculation involving either, as in:

i write The Fahrenheit temperature is as,9*celsius/5+32». ~-Assigning Values to Variables :~ssisning values to variables is performed in various ways depending on the type of variable and the type of information to be stored in the variable.
Numeric Values Values are assigned to numeric variables using the talc command:
define local ratio,4, resl define end talc ratio G 1 / 3 The general form of talc is:
cafe variable G expression variable any author-defined numeric variable 1 S ~ the assigrrrneut arrow (produced by pressing [ALT][A] is the operator that assigns a value to the variable expression a valid arithmetic and/or logical expression In the example above, TenCORE calculates the value of I divided by 3 and stores it into the variable'ratio'.
The talc command can be continued from one line to the next, as follows:
talc a ~ 1 b G 2 c G b / 3 d ~ c + b The talc command above assigns values to four different variables without the necessity of repeating the command name on each line.
When a real value is assigned to an integer variable, the value is rounded to the nearest integer.
The talc command works only with valid numeric variables (i.e., 1,-2-, ~-, 4-, and 8-byte integers, and 4- and 8-byte reals). It does not work with 5-, 6-, or 7-byte variables, or with any variable larger than 8 bytes.
The full range of arithmetic and logical operators which can be used with talc, as well as alternate ways of representating numeric values, are treated in the section Ways of Representing i 0 Literal Data later in this chapter.
Selective Forms The talc command has two selective forms, calcc and calcs. For more information, see the respective command descriptions.
Text Values 1 ~ Because the talc command works only with numeric variables, i.e. variables with a defined length of l, 2, 3, 4 or 8 bytes, it is not suitable for assigning text to variables.
Text is assigned to variables using the packz command. Its general form is:
packz buffer; [ length ]; text buffer the buffer to receive the text 20 length an optional tag a variable to receive the number of charcters assigned to variable (the packz command sets length, not the author) text the text information to assign to variable i The "z" on packz indicates that any bytes of brrffer not used to store the text are zoo filled. Without zeroing, packing "rose" into a buffer which already contained "geranium" would give ''rosenium", If zero filling is not desired, use the pack command.
define local sublen,2 subject,40 define end packz subject,sublen;Geography 101 at 5:5 write The heading «a,subject» is «s,sublen» bytes long.
The length tag can be omitted, leaving two adjacent semicolons between the variable and the text to be assigned:
packz subject;;Geography 101 at 5:5 write The heading is «a,subject».
Like the write command, packz can be continued over several lines:
~0 packz text2;;This is line one.
This is line two.
This is line three.
Any of the show commands can be embedded in the text tag of the packz command just as they can be embedded in a write command:
packz text;textlen;atomic weight of «a,element» is «s,weight~.
at 5:5 show text i 'Vhen shows is embedded in a packz command, null characters( bytes with a value.ef 0) in the embedded variable are skipped over instead of being copied. If a special application requires that even the null characters be copied, the showy command can be used instead of shows. The showy command works just like shown with the important exception that even null characters are copied in a packz command or displayed in a write command.
The showy command has both an embedded form (abbreviated < v, ») and a non-embedded form, but is is primarily intended for embedding in a packz command.
Selective Form The paclcz command has a selective form called packzc. For more information, see the respective command descriptions.
Copying Non-numeric data The easiest way to copy non-numeric data from one variable to another is to use the move command, which has the general form:
move source, destination, length source any defined variable or a literal destination any defined variable length an expression specifying the number of bytes to move.
The following example copies the contents of the 40-byte variable "newname"
into the variable "oldname".
move newname,oldname,40 Converting Text to Numbers The compute command translates a string of numeric characters into a numeric value.
pack text;textl;-12345 conspute text,textl,reault i at 1:1 show result The general form is compute buffer, length, result bufFer the string of characters length the number of characters to convert result the variable in which to store the result The string to be convened can contain:
~ the digits D through 9 ~ the unary + and - characters (the positive or negative sign) ~ one decimal point (period) Any other characters within the string cause compute to fail, indicated by a zreturn value greater than -1. If it fails, compute makes no changes to the value stored in ''result".
For extracting numeric information from the input at an arrow, see the store and storen command descriptions.
Initialization of Variables Author-defined global variables should normally be initialized before use.
This is often accomplished in a program's startup unit using the zero command.
zero The simplest form of zero sets a single variable to zero, whatever its defined length:
zero usernarne Another form of zero clears a specified number of bytes starting at the named variable.
zero scores,22 Here, it zeros 22 bytes starting at "scores". The general form for clearing a number of bytes is:

i zero variable,length "' variable name of the variable at which to start length the number of bytes to zero Startup units often clear all of global variable space before assigning any values to variables. This ensures that the lesson has a clean slate to work with.
For clearing global variable space,. the system variable zvarsl gives the total number of bytes reserved for storage of global variables (including space which has not been defined). If "firstvar" is the first global variable defined, the following command zeroes all global variables:
zero firstvar, zvarsl If "firstvar" is not the first global variable defined, an area zvarsl bytes in length would extend beyond the end of Global variable space. In this case, the zero command above results in an execution error.
Local variables do not need to be explicitly set to zero. All of a unit's local variables are automatically zeroed when execution of the unit begins.
I S set Another way of initializing variables is with the set command. Rather than zeroing variables,set assigns a series of values to consecutive variables:

define local jan ,1 feb ,1 $$ all twelve months nov ,1 dec ,1 2$ define end i WO 99/07007 PCTlUS98/15627 set jan G 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 This example assigns 31 to "jan", 28 to "feb" and so on. It has the same effect as twelve calc commands.
The normal form of the tag is:
set variable ~ vahre list variable the variable to assign the first value to.
value list the subsequent values that are assigned to locations following variable.
The set command does not perform any bounds checking: assignments are made based on the defined length of the variable named in the tag, regardless of how the subsequent variables are defined. In the above example, "jan" is defined as a 1-byte integer, so the values in the tag of the set are assigned to the twelve bytes starting at "jan". If the eleven variables defined immediately following ''jan" are not all 1 byte long, they will not contain the expected values.
The set command has a selective form sets. For more information, see the respective command descriptions.
Comparison and Searching Two variables can be compared using the compare command. This command returns the number of leading characters which match in the two comparison strings.
define local string1,26 string2,26 result,l i define end pack stringl;;abcdefghijklmnopqrstuvwxyz pack string2::abcDEFGIiIJKI,MNOPQRSTUVWXYZ
compare stringl,string2,26,result This example compares ''stringl" to "string2" and sets "result" to the number of leading characters which matched; in this case 3, for 'abc'.
The general form of the compare command is:
compare vari,var2,length,result varl one of the variables to compare var2 the other variable to compare length the number of bytes to compare result set to the position of the last matching byte. It is set to - 1 if varl and nar2 are identical or 0 if they do not match at all find Variables can be searched for specific contents using the find command.
define local alphabet, 26 aiphalen, 2 location, 2 packz alphabet;alphalen;abcdefghijklmnopqrstuvwxyz find 'ef',2,alphahet,alphalen,l,location This example searches the variable 'alphabet" for the string 'ef. It finds it and sets the variable "location" to 5 because 'eF starts at the fifth byte in the search area.
The general form of the find command is:

i find object, object-length, start-var, list-len, incr, location object the value to search for. This can be a literal, a variable, or a buffer object-length the length of the object to search for, in bytes.
start-var the variable at which to start the search list-len the number of entries to search. An entry can be more than one byte long, as specified by incr.
incr the length of each entry.
location the entry number at which object was found If object was not found, location is set to -1.
Examples The following examples assume definition of the following variables:
define local name ,15 $$ name to search for found ,2 $$ position in list where "name" found list(5) , 15 $$ list of names define end The variable "list" contains a list of 5 names, each of which occupies 15 characters. The contents of "list" are as follows:
john miller... mark ho........sarah johnston.james heflin lisa berger tl L16 t31 L46 t61 Null characters have been shown as to improve their visibility, and numbers have been added to help in counting bytes.
Literal Object The following find statement searches for the name mark ho:
2$ find 'mark ho',7,list(1),5,15,found $$ found will be 2 WO 99/07007 PCT/US98/i5627 Because the name has fewer than 9 characters, it can be supplied as the text literal '.park ho' . Next comes the length of the object to find, 7 characters. The start of the list is given as list(!), and its length as ~ entries of 15 bytes each.
After the search, the variable "found" contains the value 2 because mark ho is found at the second position (not the second byte) in the list.
Variable Object Since names of more than 8 bytes cannot occur as text literals, they must be packed into variables. The following example locates James hefTin.
packz name;;james heflin find name,l5,list(1),5,15,found The variable "found" receives the value 4 becauseJames heflin is found in the fourth position.
Byte-by-byte To find a last name, a end like the followine could be executed:
1J packz name;; miller find name,6,list(1),75,l,found When this example is executed, "found" receives the value 6.
The length of the name is given as 6 because this locates part of an entry, not an entire entry.
Similarly, the list is specified as 75 one-byte entries instead of 5 fifteen-byte entries. This causes find to look for miller starting at every character, not just at the start of each 15-byte name field. This illustrates that the object of the search can be longer than the nominal entry length provided to find.

Backwards by Entry To search backwards, a negative value is given for the increment. The following example searches backw ards from the end of the list for john, looking only at the beginning of each I 5-byte entry:
$ find 'john',4,list(1),5,-l5,found Here, "found" receives the value I . Although the search proceeded backwards from the end of the list, the position is always counted from the beginning of the list.
Backwards by Byte Another example of back~.vards searching is the following:
find 'john',4,list(1),75,-l,found In this case, an increment of 1 is used, causing find to look at every character starting from the end of the list.
In this case, "found" receives the value 37, because the first john found when searching backwards byte-by-byte occurs in sarah johustorz If the search had been in the forward direction.
1 ~ john miller would have been found first, and "found" would have received the value 1.
Nays of Representing Literal Data Data used in cafc commands and other numeric contexts can be expressed in a number of literal forms.
For purposes of discussion, the term literal is used to identify a I-, 2-, 3-, 4- or 8-byte value which is expressed directly rather than as a variable or an expression.
Values of 5, 6 or 7 bytes can be used as literals, but are represented internally as 8-byte values.
Integer Literals Any valid number written as a sequence of digits with no decimal point is an integer literal. An integer literal may have a leading plus or minus sign.

i Real Literals .a real literal is distinguished from an integer literal by the presence of a decimal point.
Even if there are no digits following the decimal point, the presence of the decimal point causes the value to be represented as a real value.
Text Literals A text literal is a string of 1 to 8 characters enclosed in single quotation marks. Many commands allow file names, unit names or other block names to be written as text literals:
image plot;'pictures','bird' The image command above displays a screen image stored in file pictures, block bird.
Text literals are always stored internally as 8 bytes; unused bytes at the right end of the text are zeroed. Another way of stating this is that text literals are stored left justified in 8 bytes.
Because text literals are 8 bytes long, the calc command can be used to assign a text literal to an 8-byte variable:
calc filename G 'pictures' The variable must have been defined to be 8 bytes long. If a shorter variable is used, characters are certain to be Iost from the begirmiog of the text literal.
Character Literals Character literals normally consist of a single character enclosed in double quotation marks:
if name (2) a "a"
Such a character literal is stored internally as a single byte.
A character literal can be assigned directly to an integer-compatible variable using calc:
calc naaee (2) G "z'.
It is also possible, although unusual, to create multiple-byte character literals by enclosing a string of 2 to 8 characters in double quotes:

calc chars c "abc"
Such a literal is ahvays stored in the smallest possible of 1, 2, 3, 4 or 8 bytes. If the literal contains 5, 6 or 7 characters, zero-valued bytes are added to the left end of the literal to round its length up to 8 bytes. Another way of saying this is that character literals are stored right justified S in the smallest possible size of 1, 2, 3, 4 or 8 bytes.
Multi-byte character literals (enclosed in double quotes) are not a substitute for text literals (enclosed in single quotes). Correct usage is to use single quotes for all textual literals such as file names and unit names, and to reserve double quotes for single characters.
Keypress Literals When examining the system-defined variable zinput, which reports the last key processed, one often uses keypress literals.
A keypress literal is normally a 1-byte character literal prefixed with a percent sign as follows: %"a". The percent sign changes the 1-byte character literal into a 2-byte internal representation consistent with zinput.
A number of other prefixes exist as well: %alt, %ctl, %altctl and %ctlalt (the last two are equivalent). Thus, to determine whether the last key processed was [CTRL][A]
one could write if ziaput = ~ctl"a"
All keypress literals are represented internally as two byte positive values.
The detailed format can be found under the description of zinput.
Hexadecimal Literals This discussion of hexadecimal (base 16) literals should be considered optional advanced material. If you have not used hexadecimal numbers before, you probably do not need this information and you may want to skip ahead to Constants.

i A hexadecimal literal is written as the letter h followed by a digit 0 - 9, followed by..aero or more of the hexadecimal digits 0 - 9 and a - j(In hexadecimal notation, the values 10 through 15 are represented by the leners a through f. ) Thus the following are valid hexadecimal literals:
h4 (equals decimal 4) h10 (equals decimal 16) hOf (equals decimal 15) hlec4 (equals decimal 7876) hffff (equals decimal -1) Note that hf would not be a valid hexadecimal literal, since the first digit after h must be within the range 0 - 9. Any time the first digit of the hexadecimal value is one of a through f, an extra 0 must appear after the h as in: hOf.
It is useful to think of hexadecimal literals as being evaluated "backwards", from right to left. The digits of the literal are read in pairs, starting from the right, and each pair of digits 1 ~ corresponds to one byte in the internal representation of the value. Each new pair of digits causes a new byte to be added to the internal representation of the literal. A lone, unpaired digit remaining at the left end of the literal also causes another byte to be added, unless the remaining digit is zero. A lone, unpaired zero at the left end of the literal is always discarded. If the resulting internal representation is 5, 6 or 7 bytes tong, zero-valued byrtes are added to the left of the value to pad it out to 8 bytes.
Hexadecimal Literals as Integer Values In calculations, a hexadecimal literal is always considered an integer value,.When assigning a hexadecimal literal to a variable, it is important to distinguish between the length of the variable and the length of the literal. Consider the following example:
define local i teiap , 4 define end calc temp G h91 Here the value of a 1-byte literal is assigned to a 4-byte integer variable.
The integer value of the literal is evaluated before considering the length of the variable.
Since the literal is one byte long, its value is h91, which corresponds to the binary value 10010001.
Because the leftmost bit is a ' 1', the value is interpreted as a negative number: 111. This is the value assigned to the variable "temp". Note that the two-byte literal h0091 or the four-byte literal h00000091 would have given a dii~erent result, namely the positive number 145. This is why it is important to pay attention to the length of a hexadecimal literal.
Heradecimal Literals as Bit Patterns It is sometimes desirable to use a heradecimal literal to assign a particular pattern of bits to a real variable. This cannot be done using calc, because a calculation would interpret the hexadecimal literal as an integer, and then convert the value of the integer to the IEEE format used to store real numbers in TenCORE. The numeric value would be preserved, but the bit pattern would not.
The move command can be used to copy a hexadecimal literal into a variable as a bit pattern without any numeric interpretation:
define local height,4, real define end move h7f800000,height,4 i This example copies the 4-byte bit pattern for the indefinite value 1/0 into the 4-byte real variable ''height". Because no calculation is performed, no conversion of the bit pattern takes place.
Constants A constant is a named item of literal data. Constants can be defined globally or locally using the = sign:
a=1 greet=' Hello' The general syntax for constant definition is name=literal. A constant can be given any name which is valid for a variable. Constant definitions can occur at any point where a variable definition can occur. Once defined, a constant can be used anywhere that the literal data it represents could be used:
define local Picfile='pictures' picblock='fish' Px=140 Py=100 define end image plot; block,Picfile,Picblock;Px,Py The image command above is equivalent to:
image plot;block,'pictures','fish';140,100 Constants are often defined for use in defining other variables:
MA7~1AMES=20 name(MA7~JAMES),20 age (MA7~1A1~S) .2 i addresst~~S)~4~
This example defines three arrays of length 20. The lengths of all three arrays can be changed by changing the definition of h~AMES.
Many programmers make a convention of using upper-case characters for names of constants so they are not easily confused with variable names.
The same rules apply to literals used in constant definitions as to literals used anywhere else. A constant has a value, a type (integer or real), and a length (the number of bytes in the internal representation). As with other literal data, all three of these characteristics must sometimes be considered when using a constant in a calculation.
Operators TenCORE supports a rich variety of operators which can be used to combine literals, constants and variables into numeric expressions. In addition, TenCORE
supports a number of mathematical functions and provides a mechanism for the author to define other functions.
Arithmetic Operators I S + Addition G Assignment (e.g., a ~ b means assign b value to a) [CTRL][C][A] or [ALT] [A]
- Subtraction * or x Multiplication, real arithmetic [CTRL][C][+]
$imul$ Multiplication. integer arithmefic or= Division, real arithmetic {CTRL][C][/]
$idiv$ Division, integer arithmetic ** Exponent (e.g., a ** b means a to the b power) ° Convert preceding value from degrees to radians [CTRL][C][°]

i Logical Operators '"' Logical operators compare expressions and return values corresponding to true or false.
For example, the command sequence:
if 2 < 3 $ . Write True eadif plots True because 2 is less than 3. This is similar to posing the question:
True or false: Two is less than three.
Logical operators compare the operands in an expression and then return value -1 if the expression is true, 0 if false. Key sequences used to enter non-standard characters are shown.
- Equal to (true if operands are idenficaI) Not equal to (true if operands are not identical) Less than (true if leti operand is less than right operand) > Greater than (true if left operand is greater than right operand) <_ Less than or equal to (true if left operand is less than or equal to right operand) >_ Greater than or equal to (true if left operand is greater than or equal to right operand) $and$ Logical "and" (true if both operands are true $or$ Logical "or" (true if either operand is true) In addition to the operators above, the note function returns true if the operand in parentheses is false and vice versa.
The operands of a logical operator do not have to be numeric values; for example, ASCII
characters can be compared with each other.

i PC'TNS98/15627 In TenCORE, true is represented by a value of -1 and false is represented by a value of 0.
For example, some expressions and their numeric values are:
< 3 $$ returns-1, true 3 $$ returns0, false 2 > 3 $$ returns0, false not( 2 > 3 ) $$ returns-1, true (true is the same as not false) More generally, TenCORE treats any negative value as true and any non-negative value as false.
Because true and false have associated numeric values, a logical expression is often used as the selector in the selective form of a command:
writec 2<3;True;False This example prints Trrre because 2 is less than 3 and the result of the expression is thus -1; had the expression been false, the numeric value would have been 0 and the example would have printed False.
Although logical operators are normally used in combination with each other, they are occasionally used together with arithmetic operators as in the following:
calc score G score - (annwer=correct) s increments "score" by 1 if answer=correct This has the effect of leaving "score" unchanged if the values of "answer" and "forrect"
are different. This is because the value ojans<ver=correct will be False (0), and the value assigned to "score" is score - (0). But if the values of "answer" and "correct" are equal, then answer=correct has the value True (-I) and the value assigned to "score" is score - ( I), which is equivalent to score + 1.
Bitwise Operators Bitwise operators treat each operand as a pattern of bits rather than as a numeric value.

i The bitwise operators and the operations they perform are:
--$mask$ Logical "and". Each bit in the result is set if the corresponding bit is set in both operands union$ Logical "or". Each bit in the result is set if the corresponding bit is set in either operand.

$dif~ ~ Logical "exclusive or". Each bit in the result is set if the corresponding bit is set in olie of the operands and not set in the other operand.

$ars$ Arithmetic Right Shift. The bit pattern in the first operand is shifted right by the number of places given in the second operand:
The leftmost (sign) bit propagates to the right, and bits which "fall off' the right end are discarded.

$clsl$ Circular Left Shift in 1 byte. The bit pattern in the first operand is circularly shifted leftwards for the number of places given in the second operand. Bits shifted out of the left end of the byte re-appear in the right end.

$cls2$ Circular Left Shift in 2 bytes.

$cls3$ Circular Left Shift in 3 bytes.

$cls4$ Circular Left Shift in 4 bytes.

$cls8$ Circular Left Shift in 8 bytes.

For example, $mask$, $union$
and $diff$ produce the following results:

$mask$ $uaion$ $diff$

i Thus 45 $mask$ 84 equals 4; 45 $union$ 84 equals 125; and 45 $diff$ 84 equals 121.
Bitwise operators are intended to operate only on integer values and non-numeric values with valid integer sizes (1 ,2 ,3 ,4 or 8 bytes). They are not suited for use with real values.
System-Defined Functions TenCORE supports a number of system-defined functions which take an argument in parentheses. These include trigonometric, logarithmic, logical, arithmetic and address functions.
Logarithmic .
alog(x) Antilogarithm base 10 of x ( 10 to the x'" power) exp(x) Math constant C to the x'" power ln(x) Natural logarithm of x log(x) Logarithm base 10 of x logac(n,x) Logarithm base n of x Negation comp(x) Bitwise complementation. All bits in operand x are inverted (bits containing ' 1' are reset to 0' and vice versa).
not(x) Logical negation. Returns true (-1) if operand xis false and vice versa.
Trigonometric acos(x) Arc cosine (x in radians) asin(x) Arc sine (x in radians) atan(x) Arc tangent (x in radians) cos(x) Cosine (x in radians) sin(x) Sine (x in radians) tan(x) Tangent (x in radians) i Address absloc(v) 4-byte absolute address in memory of variable v sysloc(global) Segment address of global variable space sysloc(local) Segment address of local variable space for current unit varloc(v) Offset from start of local or global variable space for variable v Arithmetic abs(x) Absolute value of x bit(v,x) Logical value of bit x in variable v (-1 if the bit is 1) bitcnt(v,n) Number of bits set in variable or buffer V, in a range of n bits frac(x) Fractional part of x imod(x,y) x modulo y int(x) Integer part of variable x mod(x,y) x modulo y randi(x) Random integer from 1 to x randi(x,y) Random integer from x to y randr(x) Random real value from 0.0 to x randr(x,y) Random real value from x to y round(x) x rounded to the closest even integer sign(x) -1 if x is negative 0 if variable x is positive sqrt(x) Square root of x ~ Pi(3.14159265358979312) [CTRL][C][P]

i Evaluation of Expressions This section discusses the details of how TenCORE evaluates expressions. The first part, Precedence of Operators, is useful to all authors. The remainder of the material can be regarded as optional information for authors who need to optimize calculations for maximum possible efficiency of execution.
Precedence of Operators and Functions TenCORE observes a certain precedence of operators in evaluating expressions.
Thus the expression 5 + 4 * 3 equals 17 instead of 27 because the multiplication operator * has a higher precedence than the addition operator +, and is executed first. This makes the expression 5 + 12 instead of 9 * 3 Parentheses override the normal order; operations within the parentheses are done first (in normal order). The resulting value is then used in the related operation in the expression. The following table shows the TenCORE operators and functions in the order in which they are performed. Class 1 is performed before class 2, 2 before 3, and so on.
1 Exponentiation (**) and Functions 2 Unary Minus and Unary Plus 3 Multiplication and Division (*, /, =, $imul$, $idiv$) 4 Addition and Subtraction (+, -) 5 Bitwise Operators ($union$, $mask$, $diff'$, $ars$, $clsl$, $cls2$, $cls3$, $cls4$, $cls8$) 6 Comparison Operators (=, $, <,>, <_ ,z) 7 Logical Operators ($and$, $or$) 8 Degree-to-Radian Conversion (° as in 45°) i 9 Assignment (G) '°
Rounding Rounding of a value with a fractional part exactly equal to .5 always yields an even integer Another way of stating this is that values where the fractional part is .5:
~ round up if the integer part is odd ~ round down if the integer part is even Example talc intvar c 7.5 $$ "intvar" assigned the value 8 intvar G 9.5 $$ "intvar" assigned the value 8 Compression of Sub-Expressions Some sub-expressions are evaluated and compressed when a unit is translated to binary form rather than when it is executed:
talc ratio ~ (4 + 5) / limit Because the sub-expression (4+5) contains only integers and its value is known already before the program is run, the command would be represented internally as:
talc ratio c 9 / limit To qualify for evaluation and compression at translation time, a sub-expression must contain only:
~ integer literals which fit in 4 bytes or less ~ integer constants which fit in 4 bytes or less ~ the operators + - $imuls $idiv$
Sub-expressions containing other elements cannot be evaluated at condense time and are not compressed.

i Operator Types Certain operators and functions work exclusively on a particular type of value, either real or integer. Non-conforming values are internally converted into the type expected by the operator or function before any operation is performed.
Operators which work with real values are:
* real multiplication real division * * exponentiation degree-to-radian conversion In addition, the trigonometric functions, exponential and logarithmic functions, and into, frac~ and round0 always work with real values.
When these operators and functions are used with integer operands, the operands are first converted to real values. If the result is assigned to an integer variable or used in a command which expects an integer value, the result is convened to back to integer.
Operators which work only with integer values are:
$imul$ integer multiplication $idiv$ integer division In addition, the logical and bitwise operators, and the functions imod~, note and comp(), always work with integer values.
When these operators and functions are used with real operands, the operands are first converted to integer values. If the result is assigned to a real variable, it is converted to real before assignment.
Other operators and functions can work on real or integer values and do not perform any internal conversions.

Operator types normally affect only a program's speed of execution. However, certain integer operators applied to real values may give unexpected results if the implicit conversion is not kept in mind. The bitwise operators in particular, together with the comps function, don't really give meaningful results when applied to real values.
Intermediate Values and Speed Optimization A TenCORE author usually does not need to know how intermediate values used in evaluating expressions are represented internally, as the internal representation does not affect the correctness of the result. However, the information can be useful in optimizing calculations for speed.
Intermediate values are always represented as either 4-byte integers or extended-precision 10-byte reals, Four-byte integers are used if all three of the following conditions are met:
~ none of the operands are real ~ none of the operators require real values ~ none of the operands are loner than 4 bytes If any of the above conditions are not met, 10-byte reals are used. Since 10-byte real calculations take several times as long as 4-byte integer calculations, a single real operand in an otherwise (4-byte) integer expression can significantly slow down its evaluation. In practice, this is usually significant only in particularly speed-critical applications, especially if a math coprocesor is not present.
Author- Defined Functions An author-defined function is a named expression. Like constants, functions are defined using the = sign:
pressure s weight / area The simplest syntax for function definition is ~ranre=expression. A function can had any name which is valid for a variable. Function definitions can occur at any point where a variable definition can occur. Once defined, a function can be used anyvhere that the expression it represents could be used.
Arguments Functions can be defined with arguments: -fakir (xx) = 9 * xx / 5 + 32 inrange(aa,bb,cc) = as S bb $and$ bb 5 cc The function "fakir()" defined above gives the Fahrenheit equivalent of a Celsius temperature. It could be used as follows:
write 15° Celsius is us,fahr(15)» Fahrenheit The function "inrange()" determines whether one value lies between two others, returning true or false. It could be used as follows:
if inrange(100,zinputx,200) $and$ inrange(140,zinputy,180) lj , write Good! You pointed inside the box.
endif This example checks whether the last pointer input (given by the system variables zinputx,zinputy) was within a rectangular area with opposite corners at 100,10 and 200,180.
The general syntax for defining a function with arwments is name(argl,argl,...,argn)=expression An argument can have any name which is valid for a variable, but must not duplicate the name of a variable which is already defined. Many authors use double letters such as aa, bb, etc., to minimize the likelihood of using an argument name which conflicts with a variable or constant name.

i l54 The purpose of author-defined functions is to improve readability of source code arid to simplify changes. When a program is translated to binary form, each reference to a function is expanded to the full length of the definition. Using functions thus has no effect on the final size or efficiency of a program.
S Reduction to Constants Any integer-valued function which can be entirely evaluated and compressed at condense time is reduced to a constant (see the Compression of Sub-Expressions section earlier in this chapter). Thus the following two definitions are equivalent:
length = 4 + 256 + 128 length = 388 Reduction of simple functions to constants is particularly useful when defining variables, as it makes possible constructions like the following:
define local IS xEaDER = 4 ENTRIES = 20 LENGTH = HEADER + ENTRIES
list(LENGTH),1 define end Type and Length Like literals, constants, and variables, functions have an associated type and length. These are determined according to the rules given above for evaluating expressions.
Thus the value of a function is always either a 4-byte integer or an 8-byte real. In practice, this is seldom significant, since TenCORE automatically performs any needed type conversions.

Physical Allocation of Variable Space In keeping with the differences in characteristics and usage between global and local variables discussed in chapter 4, they are stored in different physical segments of the computer 8 memory.
Global Variable Storage Global variables occupy a segment of memory which is reserved when TenCORE is started and is preserved until TenCORE is exited. There is only one segment of memory used for global storage. Every defines block and every define global statement allocates storage for variables starting at the beginning of this single segment.
The system-defined variable zvarsl gives the length of the memory segment allotted for global variables.
Local Variable Storage Local variables occupy a segment of memory specific to the unit in which they are defined. Each unit has its own separate local storage segment which exists only as long is the unit 1 S is active. This segment is reserved and zeroed when execution of the unit begins. When the unit is exited by branching to a new main unit, by reaching the end of the unit, or by exit via return or goto q), the space for that unit's local variables is released.
Allocation of Space Within a set of global or local defines, successive bytes of storage are allocated sequentially starting from the beginning of the global or local segment. For example:
Defintion Location offset from start of segment) vari, 2 Bytes 0 -1 var2 ~ 2 Bytes 2 - 3 realvar, 8, r Bytes 4 - 11 userrame. 40 B es 12 - 51 Two system-defined functions return the location of a variable within memory:

i varloc0 returns the offset within variable space (local or global) absloc0 returns the absolute location within computer memory The starting byte of each variable above could be displayed as follows:
at 5:5 J write earl starts at byte us,varloc(varl)»
var2 starts at byte us,varloc(var2)»
realvar starts at byte ~cs,varloc(realvar)p username starts at byte us,varloc(buffer)»
Bytes of storage can be skipped, as in:
varl,2 ,4 var2,2 where ,,~ allocates four bytes as unused.
absolute Definition Variables can be defined at an absolute offset (from the beginning of local or global space, as appropriate) by using the format:
@offset, name, length, type where the @ symbol indicates that the variable is to start at the specified location. For example:
@O,first,l $$ first byte of variable space @1000, name, 8, i $$ 8-byte integer at offset 1000 The variable "first" above could be used with zero to zero all global variables as follows:
zero first,zvarsl By defining "first" at an absolute location (rather than just placing it first in the defines block), the author guarantees that the zero command will always start with the first byte of global i storage, even if other variable definitions are inadvertently inserted before "first" in the deifiries block.
The offset for an absolutely defined variable may be given as a defined constant:
loc = 2000 $$ defined constant @loc,xyz,r $$"xyz" starts at offset 2000 The use of absolute definition does not affect the allocation of subsequent variables--allocation continues sequentially following the last variable which did not use absolute variable definition.
Redefinition A technique very similar to absolute definition is redefinition, in which a variable is defined to start at the same location as a previously defined variable.
Redefinition takes the format:
n.oldname, newname, byrtes, type where the @., symbol indicates that the variable newname is to start at the same location as oldname. For example:
username,40 $$ full user name @username,userchar,l $$ first character redefined/1-byte integer In this example, the variable "usercha" could be used with if to test whether the first character (and thus presumably the whole name) is null:
if userchar = 0 do getnaa~e endif As in the case of absolute definition, redefinition does not affect the allocation of subsequent variables: allocation continues sequentially following the last variable which did not use redefinition.

i Segmentation Variables may be broken down into smaller pieces or segments which can be referenced by name.
define local systime ,4 hours ,l minutes ,l seconds ,1 hundr ,1 define end clock systime at 3:3 write time: «s,hours» hxs, «s,minutes» min, «s,seconds» sec With "systime" segmented as above, the bytes can be referenced collectively (as in the clock command) or individually (as in the write command).
The definition of a segment must follow the definition of the variable of which it is a part.
A period must appear in the first position, then seven space characters (one tab), then the segment name and size.
Segmentation is sometimes used in defining buffers for disk operations, which always use 256-byte lengths of data.
record,256 name,40 response(64),1 . score,4 time,4 i Here, "record" reserves a full 256 bytes, even though the segments only need 40 +~64 + 4, or 108, byrtes. This ensures that that one can read in a 256-byte disk record without affecting "time" or other neighboring variables.
As this example illustrates, segments do not have to add up to the full size of the segmented variable. However, they normally must not exceed it.
Only one level of indentation is allowed when defining segmented variables. If a segment needs to be further divided into sub-segments, this can be accomplished by combining segmentation and redefinition:
uaerid,20 . u.id1,10 . u.div,l . u.id2,21 @u.idl " 10 $$ redefinition of u.idl 1$ . u.idl.a,l . u.idl.b,9 No name was given to the redefined variable. It could have been given a unique name such as "xuidl", but since the only purpose was to (sub-)segment "u.idt", it was simpler to omit the name.
The use of period (.) in variable names has no special meaning in TenCORE, which treats the period just like any other valid character, but does give visual emphasis to the logical structure.
Array Segmentation Segmentation of arrays is similar to segmentation of individual (scalar) variables.
However, when an array is segmented, each segment is itself an array, even though no array size is given.

i WO 99/07007 PCT/US9$/15627 define local systime(3) ,4 hours ,1 , minutes ,1 $ , seconds ,1 hundr ,1 define end clock systime(1) clock systime(2) clock systime(3) write The three times are:
«s,hours(1)» hrs, «s,iainutes(1)» min, «s,seconds(1)» seconds «s.hours(2)» hrs, «s,minutes(2)» min, «s,seconds(2)» seconds «s,houra(3)» hrs, «s,minutes(3)» min, «s,seconds(3)» seconds Because the variable "systime(3)" was defined as an array with 3 elements, each of the segments "hours", "minutes", "seconds" and "hundr" is treated as an array which is referenced with an index is parentheses.
Special Segmentation In certain cases, especially with anays, it is desirable to segment beyond the defined length of a variable. Normally, this would result in an error when the program is compiled before execution. However, by adding the keyword special (abbreviated s) after a segment definition, the check for segmenting beyond the length of the original variable is omitted. The defaults for variable definitions cannot be used with this keyword: the length and type must be explicitly specified, with the keyword special added after the type.

i Segmentation beyond the end of a variable does not cause any more bytes to be alltscated in variables. After the special segments are defined, the next variable starts at the location after the last normally defined variable.
Example Shows how one could define a data area containing mixed data types: two-byte integers and eight-byte integers. Each piece of data is prefixed by a single byte indicating which type of data follows.
data,8192 @data,bufl(8192),1 . typel,l,i,s $$ prefix byte datal,2,i,s S$ access 2-byte words at any byte @data,buf2 (8192),1 type2,l,i,s $$ prefix byte data2,B,i,s $$ access 8-byte words at any byte 1$ newvar,l $$ starts 8192 bytes after "data"
$$ newar is overwritten by special segments By knowing the starting byte of an individual entry, the type can be determined and the appropriate variable name ("datal" or "data2") used to access the data in the appropriate format.
The next entry would be found by incrementing the index into the array by the length of the current entry (3 or 9).
Blocks A technique similar to segmentation but applicable on a larger scale is the variable block.
Defining a variable block reserves a section of variable space. Within the variable block, scalar and array variables can be defined and segmented.
The normal format for defining a variable block is:
*rB

i name, size, block ,.r where name is any name valid for a variable; size is the number of bytes to reserve for the block; and block indicates that this is a variable block (block can be abbreviated as b).
The following example defines a 256-byte block named "diskio":
diskio,256,block $$ 256-byte data area for disk input/output ,10 $$ 10 bytes unused name,20 $$ user's name date,6 $$ date of last use time,4 $$ time of last use . hours ,1 . minutes ,1 . seconds ,1 hand ,1 score,2 $$ most recent test score status,256,block $$ next block begins here Once a variable block is defined, all subsequent variable definitions are part of the defined block, up to the next variable block definition. If definitions within a variable block use up more space than is reserved for the block, a compile error occurs.
When the length of the variable block is not known, the sire argument can be left blank. In this case, the variable block is given whatever size is required to hold all variables subsequently defined, up until the next block definition.
Sharing Definitions Among Source Files If a program is spread over several source files, care must be taken to make the global variable definitions agree for each file. This is normally done by placing all the global definitions in one file and including a copy of the definitions in the other files with use commands:

i tax l,globals (defines block) 'T
lastname,l5 firstnam,l0 mi,l $ stunum,9 p (64) ,1 score,4 tax la,globals (defines block) use taxl,globals tax lb,globals (defines block) uae taxl,globals In this example, all of the variables for the files tail, taxla and taxlb are defined in taxl.
The use commands in taxla and taxlb just include a copy of the definitions already made in tail.
Sharing Some Definitions But Not Others Sometimes, it is desirable to define some variables which are used by an entire set of source files, and other variables which are unique to each individual source file. Since there is only one memory area for all global variables, the definitions of the variables for individual source files must naturally be coordinated to avoid conflicting definitions. This can be accomplished using a combination of variable blocks and redefinition.
The following example applies this technique to the files tail, taxla and taxlb by adding variables defined in taala and taxlb:

i taxl,globals (defines block) lastname,l5 firstnam,l0 mi,l stunum,9 p(64) ,1 score,4 tax1a,2048,block tax1b,2048,block taxla,globals (defines block) use taxl,globals @taxla,ownvars,2048,block xloc,2 yloc,2 interest,8,r taxlb,globals (defines block) use taxl,globals @taxlb,ownvars, 2048, block linella,8,r linellb,8,r line12,8,r In this example, the definitions used by all three files include the 2048-byte variable~blocks "taxla" and "tax lb". These variable blocks are data areas reserved for the source files of the same name. The source files taxla and taxlb then redefine their own block using the name "ownvars"
and define their own variables within this block. Making "ownvars" a block variable ensures that the variable definitions in taxla and taxlb do not extend beyond the areas reserved for them.
Unlike other redefined variables, redefined block variables permanently affect variable allocation. If taxla defines another block after "ownvars", this block will conflict with the variables defined in taxlb.
Accessing Other Ylemory Segments Sometimes it is desirable to access data stored in areas of memory other than local and global variable space. This can be accomplished using the transfr and exchang commands.
transfr The transfr command transfers data from one place to another. It has the general form:
transfr from-base-address,offset;to-base-address,offset;length Both from-base and to-base must be from among the following keywords:
~ routvars, r Router variables. This is a special unstructured 256-byte buffer which can be accessed only via transfr and exechang. The router buffer provides an area for data that is not normally used by lessons. One common use for this buffer is for keeping user performance data for an activity manager.
display, d CGA screen display memory. Note that display memory for other display types EGA, VGA, etc.) cannot be accessed with transfr.
global,g i Global variables. -w locat,l Local variables.
~ sysvars, s System data area. CAUTION: do not use this area for data storage.
~ sysprog,p System program area. CAUTION: do not use this area for data storage.
~ absolute, a Absolute memory location.
The following example transfers the router variables into local variables and then displays the student's sign-on name.
define local localr,256 . info, 8 . name,20 define end transfr routvars,0; local, varloc(localr);256 at 10:5 write The student name is ua,name»
exchang The exchang command is similar to the transfr command, but swaps two areas of memory.
The following code uses the exchang command to swap a gait of 2-byte variables:

i if xl < x0 exchang g,varloc(xo);g,varloc(xl)~2 endif This is equivalent to but simpler than the following:
it xl < x0 calc temp G xo xo G xl xl G temp endif Accessing Absolute Memory The transfr and exchang commands can also be used to access any absolute memory address in the computer. This is accomplished using the base-address keyword absolute. The offset is then a four-byte integer location.
A useful function when transferring to or from absolute memory locations is absloc0, which returns the absolute location in memory of a variable. This is often used to pass the location of data to a library routine, as follows:
pack name;namelen;Wendell Oliver Holmes library mclib,answer(absloc(name),namelen) The advantage to using absloc~ here is that unit mclib,answer does not need to know whether the data is in the local or global segment--it can copy the data directly from the absolute memory location.
Technical Notes on Absolute Addresses The absloc~ function returns four-byte values over a continuous integer range.
To convert an abslocQ value to the segment:offset form required for passing data to DOS functions, the following calculations can be used:
*rB

i WO 99!07007 PCT/US98/15627 define ".
local temp .4 segment ,2 offset ,2 S define end talc temp ~ absloc(myvar) segment G temp $ars$ 4 offset ~ temp Smask$ h00f $$ extra 0 required This calculation yields the highest possible segment address and the lowest possible offset address.
The calculation to go from an existing segment:offset address to an absolute integer address is:
talc segment G sysloc(global) $S or local, as appropriate offset G varloc(variable) temp G ((segment $mask$ h0000ffff) $cls4$ 4)+
(offset$mask$h0000ffff) Accessing the l~iemory Pool Data can also be transferred from variables to the TenCOIRE memory pool, as in:
memory write,m~ool,moffset,bigbuf,bufsize Where write is a keyword specifying the direction of the transfer; "mempool"is the name of the memory pool block; "moffset" is the offset into the memory pool block;
"bigbuf is the variable at which to start the transfer; and "bufsize" is the number of bytes to transfer.

s The keyword write specifies that the transfer is from variable space to the memory pool;
read transfers from the memory pool to variable space; and exchange swaps the contents of the two.
For more information on this topic or on primary and secondary memory pools, refer to the memory command.
Command List area...........................................................................
..................................................171 asmcall ...................................................................
.....................................................187 at/aff ...............................................................................
............................................189 beep ...............................................................................
.............................................192 block ....................................... .......................... ..
... .... .................................................194 box............................................................................
..................................................195 branch ....................................................................
... ..... .............................................197 13 calc ...............................................................................
..............................................198 calcc..........................................................................
. .................................................198 calcs ..................................................................... .
......................................................200 circle................................ . .......................
.............. ........ . ............................................ 201 clearu ...............................................................................
...........................................202 clock ................................................................ .. ....
..................................................... 203 color ...............................................................................
............................................204 colore.........................................................................
.................................................205 compare ...............................................................................
.......................................207 compute ...............................................................................
.......................................209 date .................. ........... ......... ...... .......... .............
.. ...... .. ... .... ...... ... . ............ ................... 210 debug..........................................................................
................................................211 device.........................................................................
......................... ....................212 disable ...............................................................................
..........................................213 do ...............................................................................
................................................216 dot ...............................................................................
...............................................219 draw...........................................................................
................................................. 220 ellipse........................................................................
.................................................. 221 else...........................................................................
...................................................222_ elseif.........................................................................
................................................... 223 enable.........................................................................
.................................................223 endif..........................................................................
..................................................227 endloop ..........................................:....................................
........................................227 erase..................................................................:.......
..................................................228 error..........................................................................
..................................................229 exchang........................................................................
...............................................230 exec ...............................................................................
.............................................232 SUBSTITUTE SHEET (RULE 25) exitsys ...............................................................................
....................................
x-:..236 extin..................................................................
..~7 ..........................................................

extout.........................................................................
.................................................

fill .....................................................................

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

find...................................................................
..241 .........................................................

flow...........................................................................
..................................................244 font ...............................................................................
..............................................261 goto ...............................................................................
.............................................272 if ...............................................................................
..................................................273 image ...............................................................................
...........................................275 initial ...............................................................................
............................................284 intcall ...............................................................................
...........................................287 loadu ...............................................................................
............................................296 loop...........................................................................
..................................................297 memory ...............................................................................
........................................299 mode...........................................................................
................................................306 move ...............................................................................
............................................311 nextkey ...............................................................................
........................................312 nocheck.................................................................
......................................................

operate.............
...............................................................................
...............315 ......

origin ...............................................................................
...........................................316 outloop ........................................._.....................................
........................................318 pack, packz packc, packzc.........................................................................
..................319 page ...............................................................................
.............................................323 palette ...............................................................................
..........................................325 pause..........................................................................
.................................................329 perm.. .. . . .. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . .. . . . . . . . . . . . . . . . . . ..
. . . . . . ... . . ... . . . . . .. . .. . . . . . . . .
. . . . . . . . . . . . . . . .. . . .. . . . . . . .
. . . . . 3 3 6 polygon ...............................................................................
........................................

press..........................................................................
..................................................342 ~
~0 print ...............................................................................
.............................................344 put ...............................................................................
...............................................346 receive........................................................................
.................................................348 reloop.........................................................................
.................................................

return ....................... ..... ........... ........ ..............
... . ......... .................................. . .... ......
.. . 3 51 3 rotate ... ......... ......................... ... .. . .......
.......................
5 . ............................. ...... .... ......... 3 53 scale ......................................... ...
..................................................
.............................. 3 5 5 screen.........................................................................
.................................................357 seed................................................................
..363 ...........................................................

set ...............................................................................
................................................364 40 setbit ...............................................................................
............................................365 setc ...............................................................................
..............................................366 show ...............................................................................
............................................368 showa..........................................................................
................................................370 showh ...............................................................................
..........................................371 45 showt ...............................................................................
...........................................372 showv ...............................................................................
..........................................374 status.........................................................................
..................................................375 text...........................................................................
...................................................380 i width..........................................................................
...........,................................:~:..396 window ...............................................................................
........................................396 write..........................................................................
..................................................402 writec .............. ...... ...... . . ... ...... ... .... .......... .......
... .. .... ................................. . ........ ........ .. 404 zero...........................................................................
..................................................406 area Manages pointer input areas.
area keyword;...

define defines a pointer area highlight specifies highlight type and color disable temporarily deactivates current pointer areas enable reactivates disabled pointer areas clear deletes current pointer areas select highlights a pointer area save saves current pointer areas to a named memory block restore retrieves pointer areas from a named memory block delete deletes named pointer area memory blocks reset deletes all named pointer area memory blocks toggle highlights or dehighlights a toggle pointer area inarea determines if a location is within a pointer area dir returns list of active pointer area identifiers key returns the area identifier of a specified key WO 99/07007 PCT/US98/1562?

info reports the attributes associated with a pointer area repos repositions all pointer areas in a window Description Facilitates pointer input within defined areas of the screen. Once a pointer area has been defined, a Click or other pointer action within the area generates a specific input value, just as if a keyboard key had been pressed. Appropriate coding can cause such an input to trigger a flow branch to another unit, break a pause, generate typing at an arrow or any other action desired.
Up to fifty active pointer areas may exist; this number can be increased with the /sa=
command line option. The number of currently defined pointer areas is stored in the system ~°ariable zareacnt. zmaxarea holds the marimum number of areas allowed.
area definitions are cleared upon a jump branch to a new main unit. As part of the initializations for a new main unit, the default set of areas are activated.
area definitions are saved when a window is opened and restored to their previous state when the window is closed unless noarea is used on the window close.
Pointer areas can be highlighted and dehighlighted automatically as the pointer moves in and out of the areas. The current pointer areas, together with their characteristics, can be saved in a named memory block; these can be deactivated and reactivated using the name.
Pointer areas can be temporarily disabled and enabled.
area define; [LOCATION]; [LOCATION[; [action=KEY, action KEY...]
Defines a rectangular screen area, whose opposite corners are identified by the two locations, within which any of the pointer actions listed generates an input key. Pointer areas with several defined actions and key values may be continued on following lines.
The following pointer actions can generate input values. Each pointer action has its own keyword:

i click= any pointer button is pressed left=, right= the left or right pointer button is pressed clickup= any pointer button is released teftup=, rightup=the left or right pointer button is released add=, sub= a second button is pressed or released enter=, exit= the pointer enters or leaves an area If the keyword left or right is used, then click cannot be used. If leftup or rightup is used, then cli;ckup cannot be used. If click= is the only action specified, the click= keyword can be omitted. .
KEYmay be any ordinary key value, such as a,b,c, %fl, etc. or one of the pseudo-keys %input 1 - 999.
Example 1 Inputs the value %enter when a button is clicked within the area defined by 10:20; 11:30.
In this case the keyword click= is optional (click=%enter). Coupled with the following flow command, the area input causes a jump to unit nexturrit.
area define; 10:20; 11:30; %enter flow jump; %enter; nextunit Erample 2 Inputs the value %"L" if the left button is pressed, and %"R" if the right button is pressed.
area define; 100,200; 300,250; left=L,right=R
Example 3 Inputs the pseudo-key %input999 when the pointer enters the area defined by 5:3; 6:10. If the left button is released in the area, %f10 is generated.
area define; 5:3; 6:10; leftup=%fl0,enter=%input999 i Example 4 Defines the entire screen as a pointer area. Clicking the right button will input the pseudo-key %other.
area define; , ; right=%other $ Example 5 Defines a rectangular area from 10:10, 30 characters across for 2 lines. A
pointer button click will input the %f1 key.
at lo: to area define; 30,2; ; click=%fl Example 6 Defines a rectangular area around the text "Topic 1 : Introduction" allowing for fixed or variable spacing. A click while in the area will input %" 1".
at 15:10 ~arite Topic 1: Introduction 1$ area define; 15:10; zx,zy+zfonth; click=%"1"
Example 7 Is continued over two lines.
area define; 200,150; 400,170; left=a right=%home,leftup=b, rightup=
ah01» ,enter=%inputl,exit=%input255 area define; [LOCATION]; [LOCATION]; [action=KEY, action=KEY...] [;modifier;
modifier ...]
Modifiers The following modifiers can be used optionally with an area define statement.
Any number of modifiers may be used and they can be listed in any order. setid and getid are mutually exclusive.

WO 99/0'1007 PCT/US98/15627 default preserves the active pointer areas for all subsequent main units.
(Normally,~a branch to a new main unit that erases the screen clears all pointer areas.) See also Default Area Highlighting.
priority assigns a priority from 0 to 15 in order to establish a precedence for overlapping areas. Level 15 is the highest priority.
If a priority is not set, the area is assigned a level of 0. If pointer activity occurs within two or more overlapping pointer areas, the highest priority area will take precedence. If overlapping pointer areas have the same level, the last defined area takes precedence.
getid specifies a variable to hold the unique 2-byte pointer area identifier that is automatically generated by the system when a pointer area is defined. System generated identifiers are always negative, between -32,768 and -1. The >D is used to identify a specific area in forms of the area command and is returned in system variable zinputa.
setid specifies a number which becomes the pointer area's unique identifier.
Author-specified identifiers. must be between 1 and 32,767 to avoid a possible conflict with system-generated identifiers. The definition of a pointer area whose identifier is identical to that of an existing pointer area will result in the existing pointer area being redefined. The ID is used to identify a specific area in forms of the area command and is returned in the system variable zinputa.
Ezampte 1 The pointer area definition will be a aera~ue area upon entering a new main unit. The area can be referenced later using the >D received in the variable arealD.
area define; 5:10; 10:251 left=b, right=B; default; getid,areaID

..
Example 2 Inputs the pseudo-key %input 1 when either button is pressed while in the rectangular area. The area can be referenced by the specified ID value 1.
area define; 100,100; 200,110: ~inputl; setid,l Example 3 Inputs the hexadecimal value 7000 when the pointer enters the rectangular area. If any other pointer area with a lower priority level overlaps this area, then this one takes precedence because it has the maximum priority level.
area define; 400,150; 450,200; enter= «h7000» ; priority, l5 area highlight: COLOR ~ off (; xor] [track ~ toggle]
Controls the highlighting color of all subsequent pointer areas. Area highlighting is offby default. A single area highlight statement affects all subsequent area define statements, but not pointer areas defined previously. Highlighting is reset to off by an initi:~l statement.
The system variable znreahl holds the area id of the currently highlighted area (or 0 if no ' 15 area is highlighted).
Highlighting to the given color is produced by plotting a box in an exclusive-or (XOR) mode and color over the screen area The upper-left pixel of the screen area is used in determining the box color that will XOR the screen to the desired highlight color.
Modifiers The following modifiers can be used optionally with an area highlight statement but only when a color is specified. track and toggle are mutually exclusive.
xor specifies that pointer areas are to be highlighted by directly XORing the screen with the color specified track dehighlights the area only when the pointer enters another area that has highlighting enabled toggle disables automatic area highlighting and allows author-controlled highlighting (See area toggle.) Default Area Highlighting When default areas are in effect and a main unit is entered via a jump - type branch, area highlighting does not occur until after one of the following events:
~ a branching command is executed (loop, jump, jumpop, branch, doto; goto) ~ input is requested from the system (pause, arrow, nextkey, delay) ~ the end-of unit is reached ~ certain commands that may have a long execution time are executed (image, fill) ~ An enable command with the keyword area, pointer or break These are the same points at which the pointer position is checked to see whether it has just entered or exited a highlighted area.
This delay allows the author time to get the display on the screen for which highlighting is desired. If a branch is required or if input must be requested before building the screen, the author must first issue a disable area statement to disable highlighting. After building the screen, enable area turns on any highlight.
Example 1 Produces red+ highlight areas. It uses the upper left corner of the area as an XOR
reference color. Thus, the color of the pixel at 250,320 (the upper left comer of the area) is used to determine what color to XOR the area with to produce red+.
area highlight; red+
area define; 250,300; 900,320; click=~f10 i 17$
Example 2 Turns ofd highlighting for all subsequently defined pointer areas.
area highlight; off Example 3 XORs subsequently defined pointer areas with blue. The areas will be highlighted when the pointer enters an area but will not be dehighlighted until it enters another area.
area highlight; blue; xor; track Example 4 Disables automatic area highlighting. area toggle can be used to highlight these areas.
area highlight; white; toggle area disable [; arealD/s] [; noplot]
Temporarily disables the pointer areas having the identifiers specified. The disable keyword alone temporarily disables all defined areas. A disabled pointer area no longer produces pointer input or a highlight. If a pointer area is highlighted when disabled, highlighting is turned i 5 ofd unless the noplot modifier is present.
Example 1 Disables the pointer area whose identifier is contained in the variable idvar.
If the pointer area is currently highlighted, it will remain highlighted.
area disable; idvar; noplot Example 2 Disables the pointer areas whose identifiers are 1 and 2.
area disable: 1,2 Eaampte 3 Temporarily disables all pointer areas.
area enable i area enable [; arealD/sJ
Enables pointer areas previously disabled with area disable.
Example 1 Enables the pointer areas whose identifiers are contained in the array elements arealD(1), arealD(2), and arealD(3).
area enable; areaID(1),areaID(2),areaID(3) Example 2 Enables all pointer areas area enable area clear [; [arealD/sJ[; noplotJ [; defauItJJ
When used with area identifiers, clear removes the specified pointer. When used without area identifiers, clear removes all areas. Areas are cleared regardless of being disabled.
If a pointer area is highlighted when it is cleared, the highlighting will be turned off unless noplot is used.
The default modifier is used to remove any area definitions that have been set with the default modifier.
Example 1 Deletes the pointer areas whose identifiers are contained in variables IDI and area clear: ID1, ID2 Example 2 Deletes all pointer areas. A following jump branch will restore any unit default pointer areas.
area clear i Example 3 Deletes all pointer areas from the entire screen, leaving any highlight on.
When the window is closed, any previous areas are restored.
window open; 100,100; 300,300 area clear; ;noplot window close area select; arealD ~ pointer ~ off Highlights the area specified by the identifier or currently under the pointer. If off is specified, any highlighted area is turned off. select does not work with toggle highlight areas.
Only one area is highlighted at a time; any previously highlighted area is turned off.
Example 1 Highlights the area whose identifier is contained in the variable aID.
area select; aID
1 S Example 2 Turns off any highlighted area.
area select; off Example 3 Before opening the window, all areas are disabled. This turns off any highlight that is on.
After closing the window, the areas are re-enabled and any area under the pointer is highlighted.
area disable $$ turn off areas and highlight window open, 100,.100;300,300 window close area eaable $$ turn areas on again area select;pointer $$ highlight if pointer on area i area save; 'NA1~IE' ~ local area save; default Saves the current set of area definitions in a memory pool block or the default buffer. The name can be either a text literal or contained in a variable. Named blocks can be restored later in any unit.
The local keyword saves the area settings in a memory pool block specific to the current unit. A local block can be restored only in the unit which saved it; it is deleted automatically when execution of the unit ends.
Saving the current area settings to the default buffer makes them the default area settings for all new main units. They are automatically reset on a jump to another unit.
The memory pool is used by the commands: memory, image, window, status. area, flow, font and perm. Memory blocks are tagged as belonging to a specific command type at creation and cannot be accessed by other commands using the memory pool;
different commands can use the same name for a memory block without conflict.
Example 1 Saves the current pointer areas in the named memory block level!
area save; ~levell~
Example 2 Saves the current pointer areas using the name contained in the variable areavar.
area save; areavar Example 3 Saves and restores the active flow settings over a subroutine call in a memory pool block unique to the executing unit. The block is automatically deleted when the unit is exited.
area save; local i do routines,graph ~"
area restore; local Example 4 Makes the current area settings the defaults for all subsequent units that are entered by a S jump branch.
area save: default area restore: 'NAME' ~ local [; delete ] [; noplot ]
area restore; default [; noplot ]
Replaces the current area settings with a previously saved set. Optionally, the named or local block can be deleted from the memory pool by using the delete modifier.
Any areas highlighted when saved are highlighted when restored unless the noplot modifier is used.
Example 1 Saves and restores the current area settings over a library call. The library routine can 1 ~ alter the active area settings as desired without afFecting the calling program upon return.
:alternately, the area save and restore could be built into the library routine to provide a more easily used tool.
area save; 'areas' library routines, graph area restore; 'areas' Example Z
Saves and restores the active flow settings over a subroutine call in a memory pool block unique to the executing unit. The block is automatically deleted when the unit is exited. The highlight status is not restored.
area save; local i do routines,graph '"
area restore; local; noplot Example 3 Restores the unit default set of pointer areas.
area restore; default area delete; 'NAME'1 local Deletes a saved set of pointer areas from the memory pool without affecting any current pointer area definitions.
Example Deletes from memory the areas saved under the name menu.
area delete; 'mean' area reset Deletes all named sets of pointer areas from the memory pool without affecting current definitions. The default set of area settings are unaffected.
area toggle; arealD
Highlights or dehighlights the pointer area whose identifier is specified.
This keyword option only operates on toggle pointer areas (as set by area highlight) It is intended for authors who want total control over the highlighting of pointer areas. Unlike area select, more than one pointer area can be highlighted.
Example Highlights the pointer area whose identifier is contained in the variable cID.
area toggle; cID

i area inarea: LOCATION; arealD r-Determines whether the specified location is within a pointer area. If so, the area's identifier is put into the variable arealD. If the location is within multiple areas, the highest priority area or, if levels are the same, the last defined area takes precedence.
If the location is not within any area, the variable is set to 0.
Example Sets whichlD to 1, the identifier belonging to the priority 15 pointer area.
area define; 90,100; 120,160; click= space;
priority, 15; setid,l area define; 90,100; 120,160; click=home;
priority, 6; setid, 2 area inarea; 100,155; whichlD
area dir; idBuffer [;length]
Returns the identifiers of all active pointer areas. To report on the maximum number of pointer areas, the area identifier buffer should be zmaxarea*2 bytes in length.
Example Returns the area identifiers of all currently active pointer areas in the array buffer id.
define local id(50),2 $$ use system default for array length define end area dir; id(1); 2*zareacnt.
area key; KEY; arealD
Returns the identifier of the pointer area which includes the specified key in its pointer action list. If two areas have the specified key listed, then the identifier of the highest priority area is returned. If the areas have equal priority, then the identifier of the last defined pointer ark is returned.
area info; arealD; infoBuffer48 Returns the attributes of an enabled pointer area into the buffer specified.
The pointer area is selected by providing its identifier. The structure of the 48-byte buffer is as follows:
Attribute B tes lower left x coordinate 2 tower left v coordinate 2 a er risht x coordinate 2 a er right v coordinate 2 hiahli~ht color of area 4 t a {0=none; 1=hi$hlieht; 2=track)1 rioritv (0=none; I ..15= rioritv1 level) default {0=none; t=default) 1 window o en level (zwindows) 1 reserved 16 left= kev value 2 right= kev value 2 enter= kev value 2 exit= kev value 2 Icftu = kev value 2 ri htu = kev value 2 add= kev value 2 sub= kev value 2 Example Reads the information from the area whose identifier is contained in the variable ID2, into the buffer named areadata.
area info; ID2; areadata If a window is in effect when this statement is executed, the specified coordinates will be relative to the current window.
area repos; aOffset,yOffset Adjusts all pointer areas by the absolute screen dimensions specified. If one or more windows are open, it operates only on areas created while the current window was open.

i Example .Moves all pointer areas to the left 20 pixels and up 100 pixels.
area repos; -20,100 System Variables zreturn The save, restore, reset and delete forms of the area command, which use the memory pool, report on success or failure in zreturn. In addition, the select and toggle forms also report error conditions through zreturn. All other forms set zreturn to ok (-1). The major zreturn values are:
IO -2 Redundant operation; area is already selected -i Operation successful Name not found I 1 Select or toggle of invalid highlight type 18 Unable to fill memory pool request I S Miscellaneous zareacnt Number of currently defined pointer areas zareahl area id of currently highlighted area (else 0) zinputa area id of area causing the current zinput value (else 0), set when zinput updated zmaxarea Maximum number of areas that can be defined asmcalt Calls an assembly language routine loaded into variables.
asmcall buffer [ ,variable]
buffer starting variable where routine is loaded variable puts offset of specified variable into register BX
Description Calls an assembly language routine which has been loaded into local or global variables.
Segment register DS points to the start of variables. if the optional variable is used, register BX
is set to the offset of variable. The result is that DS:[BX] points to the variable listed as the second tag. A far return must be executed at the end of the routine to return control to TenCORE. The value of the AL register is returned in the TenCORE system variable zreturn.
The assembly language routine may alter any of the microprocessor registers, but SS and SP, if changed, must be restored to original values before returning to TenCOIRE.
Addresses The following system-defined function references are sometimes useful with asmcall:
sysloc(global) Segment address of global variables sysloc(local) Segment address of the current unit's local variables varloc(variable) Offset address of variable absloc(variable) Absolute location of variable within memory, expressed as a 4-byte offset with no segment. This corresponds to the segment:offset address as follows:
segment = absloc() $ars$ 4 offset = :~bsloc() ~mask$ hOf ,..-If you have the segment and offset and wish to convert to the absolute location, use the following calculation:
absloc = ((segment $mask$ h0000~ $cls4$ 4) + (offset ~mask$ h0000fi~
Example Reverses the bits in a byte.
define global asmbuff(12),1 $$ buffer for assembly language program asmdata ,1 $$ integer byte to reverse define end * Load short assembly language routine by direct execution.
1$ * The routine begins with DS:BX pointing to the TenCORE
* variable "asmdata". The program loads and reverses * the byte, leaving it in register AL. After the asmcall, * zreturn is set to the value left in AL.
*
70 * The set conQaand used here allows the programmer to * emulate the structure that would be used for assembler * program~.ng.
*
set asmbuff(1) $$ mirror proc far 2$ h8a, h27 $$ mov ah, [bx] 1 fetch byte hOb9, h08, h00 $$ mov cx,0008 ; shift 8 bits i * $$ mirrori:
hOdO, hOec S$ sh rah,01 ; move LSB to CF
hOdO, hd0 $$ rcl a1,01 ; shift CF into AL
h0e2, hOfa $$ loop mirrorl hOcb $$ retf ; far return * $S endp calc aamdata G h55 $$ trial value to demonstate bit reversal asmcall asmbuff(1), asmdata $$ call routine, pointing to data at 4:4 write Original value = «h,asmdata» hex Reversed value = «h,zreturn» hex System Variable zreturn Holds the value of AL register upon return atlatf Sets the screen location and text margins.
at [LOCATION] [; LOCATION]
Description Sets the current screen x-y location and the left text margin to the first LOCATION in the tag. The system variables zx, zy and zmargin are updated to this new location.
if character coordinates are used to specify the at location, the zx and zy system variables contain the lower left graphic coordinates of the character cell.

i A right text margin (which is initially set to the right screen or window border) can.be set by specifying a second LOCATION. The right margin is found in the system variable zrmargin.
Text that hits the right margin is automatically wrapped to the left margin.
See text margin for the available text wrapping options. The right margin is ignored by the obsolete charset character plotting.) The blank-tag form sets the left margin to the current screen location. This form is equivalent to the following statement:
at zx,zy The atf form of the command allows for the automatic adjustment of the zy position based on the height of the first following real plotting character. The top pixel of this first following real character is placed at the same y-position as the top of a standard font character.
This action of atf provides for an apparent fixed top margin for text even if the text contains unknown starting embedded text attributes such as size and font. The adjustment to zy occurs in the following write or show statement when the first real character is plotted on the screen.
Examples Example 1 Writes text starting at x = 10, y = 150.
at io,iso write This is line one of my text.
This is line two at the same left margin.
Example 2 Writes text starting at line 7, character 3.
at 7:s write The line:character format is used for text more often than the 2$ graphic x,y format.

i Example 3 The text margin statement with wordwrap sets plotting to perform automatic wrapping of words at the right text margin stated in the following two location at. The second location on the at sets up a right margin at the 30th character position on the screen (or current window).
The line number part of the second location is not used by the system plotter.
text mazgin;wordwrap at 5:10; 20:30 write This text will appear on the screen as a paragraph only 20 characters wide regardless of how long the lines look in source code...
Example 4 By using atf commands, the top of the tent from the two write statements appear to have a common top margin on the screen. The second write statement that has an initial embedded size 2 code sequence adjusts the system variable zy upon plotting the "S" so that the top of the "S" appears in the same location as the standard size font.
atf l0 : l0 write Size 1 text atf 10 : 30 write S1Z2 2 t2Xt * $$ Embedded size 2 at start of text System Variables The following system variables reflect the actions of the at statement:
zx X-coordinate of screen location zy Y-coordinate of screen location ziine Line number zspace Character number i zxycolor Color of the pixel at screen location ~°
zmargin Left text margin zrmargin Right text margin beep Causes the speaker to generate a controlled beep.
beep duration [, hertz ]
duration the length of beep, in seconds hertz frequency in cycles per second Description Produces a tone of the frequency and length specified in the tag. If the frequency is not specified, it defaults to 1000 Hz.
Examples Example 1 Produces a small, perhaps recognizable musical tune.
beep .15, 261.3 $$ C
beep .2, 349.66 $$ F
beep .2, 440.88 $$ A
beep .4, 523.25 $$ C
beep .2, 440.88 $$ A
beep .4, 523.25 $$ C
Example 2 Demonstrates user control of a beep command.

i WO 99/07007 PCT/US98/1562'7 .r define local length ,4,r SS length of beep define end at 5:5 write How many seconds do you want the speaker to beep?
arrow 6:5 store length at 8:7 . write Please enter a number, like 2,3 or 5 ok beep length endarrow Frequencies A one-octave scale from middle-C
has the following frequencies. Multiply or divide by two for other octaves:

C 261.63 C# 277. I 8 D 293.66 D# 311.13 E 329.63 F 349.23 F# 369.99 392.00 Cr# 415.30 p 440.00 i A# 466.16 '"' g 493.88 C 523.25 To calculate more precise frequencies, use a multiple of 110 as a standard "A"
and multiply by the twelfth root of 2 for each half tone increment.
block block [LOCATION ] ;[LOCATION ] ;[LOCATION ] [;[from page][,to page]]
Description Copies a rectangular screen area from one location to another including across display pages. Operational only on 16- and 256-color screens. The block command works solely with absolute plotting coordinates; it is not affected by origin, rotate, or scale.
The first two locations specify the corners of the source area to be copied;
if not specified they default to the entire screen. The third location is the upper-left corner of the destination; it defaults to the same position as the source area.
The fourth argument (frompage) is the source page number; it defaults to the current read page (zrpage).
The last argument (topage) is the destination page number; it defaults to the current write page (zwpage) block xl,yl; x2,y2; x3,y3 $$ copy one area of screen to another block xl,yl; x2,y2;; 2,1 $$~ copy from page 2 to page 1 block xl,yl: x2,y2:; 2 $$ copy from page 2 to current page at 10:10 block 6,5;;5:10 $$ copy 6 chars,5 lines from 10:10 to 5:10 i box Draws a solid box or a frame on the screen.
box [ LOCATION ] [; [ LOCATION ) [; Xframe (, Yframe]]]
Description Draws a solid box or frame on the screen in the foreground color. See the Command Syntax Conventions for a description of LOCATION. The erase command is identical to box except that it uses the background color for drawing.
The presence of a frame width argument signifies that a frame rather than solid box be drawn. The widths of the right and IeR sides are specified in pixels by the first frame argument while the second frame argument specifies the top and bottom widths. If the second frame argument is absent, the top arid bottom frame width is set to best match the side width in aspect appearance on the screen.
Examples Example 1 The entire screen (or window) is made blue with a white frame 5 pixels wide.
color blue box color ~ahite+
box ::5 Example 2 A solid rectangle 200 pixels wide by 100 pixels high is put on the screen in the foreground color. Graphic coordinates are used to specify each x,y coordinate for a location.
box 101,101; 300,200 i Example 3 The text in the write statement is given a red frame 2 pixels wide. The text measure command is used to determine the screen area that a following paragraph of text plots over on the screen. This information is returned in the system variables zplotxl, zplotyl for lower left corner and zplotxh, zplotyh for upper right corner.
text measure $$ initialize text measuring at 100,150 write This is a paragraph of text of arbitrary length that will be nicely framed...
color red+
box zplotxl-2,zplotyl-2:zplotxh+2, zplotyh+2: 2 $$ frame the text Example 4 ~ blue box 20 characters wide and 10 lines deep is put on the screen starting on the 10th line. Since the box command does not change the system variables zx and zy as set by the at command, the text will also occur at the start of line 10.
at 10:1 color blue box 20,10 color white+
write This text appears in the box...

i branch Transfers execution to a Labeled point in the same unit.
branch label ~ q branch SELECTOR; label ~ q; label ~ q;...
label Any valid label present in the current unit. A label is a numeral optionally followed by 1 to 7 letters or numerals, in the command field of a line.
q Branch to the end of the current unit.
Description Alters the flow of execution within a unit, by transferring execution to the line following the specified label, or to the end of the unit if the keyword q is specified.
A blank entry in the selective List is used to fall through to the following command.
Example If name is already set, the branch command will skip the arrow structure.
branch name=O;;lskip at 10:10 write Enter your name.

long 8 arrow 11:10 storea name ok endarrow lskip i ..-at 15:10 Write Welcome, ushowa,namex.
caic Assigns a value or calculation to a variable.
calc variable G expression Description The expression to the right of the assignment arrow can be any combination of constants, literals, variables, operators and functions so long as it evaluates to a single numeric value.
calc cannot work with variables greater than 8 bytes in size.
The command name does not need to be repeated for additional lines of calculations.
For more information on calculations, assignments, and variables, refer to the section Variables, Calculations, and Data Transfer in this document.
Example Increment a counter, compute a percentage, and evaluate a complex expression.
calc count G count + 1 score G correct / total that G (1/2) * q * (t**2) caicc Selectively performs an entire calculation and assignment.
calcc J~;G~C: I (ltt; var 1 G exp i ; vari ~exp~;;...

i Description caicc is a selective form of calc that performs one of a list of calculations, based on the value of the selector. Each calculation in the list can assign a different value to a different variable. if no calculation is to be performed for a particular value of the selector, a null tag (;;)is used.
The calcc statement can be continued in the tag field of subsequent lines.
Examples Example 1 review is set if the selector right is 1; score is assigned if right is 2 or greater. Nothing occurs for a zero or negative value of right.
calcc right;;; review G -1; score G (right/5)*100 Example 2 The value 4 is assigned to section if the selector complete is true; if false, no assignment occurs.
1$ calcc complete; section G 4;;
Example 3 cot:cmn is assigned if select is 1, apples is assigned if select is 2, and total is assigned .i0 if select is 3. Nothing occurs if select is negative, zero or greater than 3.
calcc select" , column C 22 + pointer;
apples G bushels*47 total ~ 50;;
*rB

i calcs Selectively assigns a value to a variable.
calcs SELECTOR; variable G exp 1; exp2;;...
Description calcs is a selective form of calc that evaluates one of a list of expressions and assigns it to a given variable. Based on the value of the selector, an expression is selected and evaluated from the list on the right of the assignment arrow and assigned to the specified variable. If no assignment is to be performed for a particular value of the selector, a null tag (;;) is used; the variable remains unchanged.
The calcs statement can be continued in the tag field of subsequent lines.
Examples Example 1 The selector month is used to set the variable days to its proper value. The selective assignment is continued over two lines.
calcs month; days x;;31;28;31;30;31;30;
31;31;30;31;30;31 Example 2 If complete is true, section is assigned the value 4; otherwise it is set to the evaluation of the expression last *2 calcs complete; section G 4;last*2 i circle Draws a circle.
circle radius [ ,fill ~ angle ,angle2 Description Draws a circle of the specified radius with its center at the current screen location in the current foreground color.
The optional fill keyword produces a solid circle filled with the current foreground color.
The current screen location is not altered after a one-tag circle, so concentric circles can be drawn without resetting the screen location.
The three-tag form draws an arc. Arcs are always drawn counter-clockwise from anglel to angle2. As a result, different arcs are drawn depending on which angle is specified first. For example, circle 100,0,90 draws a quarter of a circle, from 0 to 90 degrees.
The statement circle 100,90,0 draws three-quarters of a circle, from 90 degrees around to 360 (or 0) degrees.
For an arc, the current screen location is updated to the ending (last) arc position.
Example Draws a circle centered on the screen; two arcs with the same center but different radii;
then a filled circle.
screen vga,gzaphics,tnedium,color at 320,240 $S set the center of the circle circle 80 $$ draw a circle with radius circle 60,0,90 $$ draw a quarter of a circle at 320,240 $$ reset the center of the circle circle 70,90,0 $$ draw three-quarters of a circle i at 320,240 $$ reset the center of the circle circle 40,fi11 $$ draw a filled circle in the center clearu Removes units) from the unit cache.
clearu ~ UNIT J
ciearu SELECTOR; UMT,~ UNIT;...
Description Units are automatically loaded into a virtual memory central unit cache as they are needed, and deleted as necessary to make room for new units. clearu can be used to manually clear specific units from the unit cache.
The blank-tag form removes all but the current unit from the unit cache.
clearu clears only units loaded from a file of the type corresponding to the current mode of operation. See operate for a discussion of modes of operation.
clearu is affected by the edisk command. Because multiple copies of a single file may be I S present on different drives, there may be multiple copies of a single unit in the unit cache. If zedisk ._ -I, units are fetched by searching all drives. All units matching the lesson/unit specification in the tag of ctearu, and matching the current mode of operation (source or binary) are cleared from the unit cache. if zedisk ~ -1, then only a unit from the current execution disk is cleared from the unit cache.
24 If no unit is cleared from the unit cache because no unit matched the unit reference and mode of operation specifications, zreturn is set to -2. If an attempt is made to explicitly clear the currently executing unit, zreturn is set to 19.

i clearu is primarily used by utility programs to control which version of a unit is in ,..
memory or to control which units are deleted to make room for others. .
System Variables zreturn _? Redundant operation; no action taken -1 Operation successful 19 Operation invalid, tried to clear the current unit ctoCk Reads or writes system clock.
clock time4 [ ,set ]
Description Copies the information from the system clock into the specified 4-byte buffer.
The set keyword sets the system clock to the time in the buffer.
The system clock is stored as 4 bytes; one byte each for the hour, minute, second, and hundredths of a second.
Example Reads the system clock and displays the current time in hours and minutes.
define local sysclock, 4 $S variables to hold time . hours,l minutes,l seconda,l hundrths,l i WO 99/07007 PCT/US98l156Z7 ..-define end clock sysclock $$ read the current time at 5:5 write The current time is: «t, hours,2»:«t, minutes,2») color Sets the foreground color.
color COLOR
color SELECTOR: COLOR; COLOR:
write «color ~ c, COLOR»
Description Selects the foreground color for subsequent text and graphics.
The + at the end of a keyword indicates the bright version of the color. The keyword backgnd gives the background color (last specified with the colore command). A
numeric expression evaluating to a hardware color number may be used in place of a keyword.
Keywords set the first 16 colors (see the Command Syntax Description for keyword Colors). A color number must be used for colors coded higher than 15.
The default foreground color is white. The default can be changed using color followed by status save; default.
The color of text can also be changed by embedding text attributes into the tag of a write command.

i ...
CGA Restrictions When using any of the CGA graphics displays on a composite color monitor, turning the thickness option on (thick on) produces truer colors.
screen cga, graphics, medium, color S screen cga, graphics, medium, mono When using screen cga,graphics,medium, four separate groups of colors are available:
1 _2 3 4 backend backend backend back$nd ereen green+ c an cyan+

red red+ magenta ma enta+

brown brown+ white white+

All colors on the display must be from one color group. If a color from one group is selected while colors from another group are on the display, all colors on the screen change to the corresponding color in the newly selected group.
Example Displays yellow text in a blue box.
screen vga color blue 1$ box 5:10;10:50 color yellow at 6:15:10:50 write A paragraph of yellow text...
System Variables zcolor Color number if set by a color keyword name; -I if set by a color number zhcolor Hardware color number i colore Sets the erase color.
colore COLOR
colore SELECTOR; COLOR; COLOR;
write «colore ~ ce, COLOR»
Description Sets the erase color to be used for erasing, including: mode erase plotting, full screen erases, the erase command, and character background plotting in mode rewrite.
To fill the screen or window with the erase color, a full-screen erase must be performed after execution of colore.
The color keywords set the first 16 colors (See the Command Syntax Conventions). A
color number must be used for colors coded higher than 15.
A numeric expression evaluating to a hardware color number may be used in place of a keyword.
On CGA graphics displays, colore is subject to the same color restrictions as color. See the color command description for details. On CGA text displays, bright colors (8-15) are not available for colore.
The default erase color is black. This default can be changed using colore followed by status save; default.
Example Erases the screen to blue after [ENTER] is pressed.
screen vga color white+

i ..
at 5:5 write Press Enter to see the background color change.
colors blue pause pass= renter erase at 5:5 write The screen has been erased to change the background color.
System Variables zcolore Color number if set by a color keyword; -1 if set by a color number zhcolore Hardware erase color number compare Compares two tent strings.
compare stringl, string2, length, result 1 ~ string 1 the reference string, typically a variable or an up to 8-byte left justified literal.
string2 the compare string, must be in a variable.
length number of bytes to compare result-1 = identical; 0 = no match; >0 = last matching character.
Description Compares two strings byte-for-byte. Variable boundaries can be crossed. The value returned into res~elt indicates the success of the compare. If the strings partially match, result is set to the position of the last matching character.

i In addition to result, compare sets zreturn to -1 if the strings match. If the strings ~ not match, zreturn is set to indicate which string is "alphabetically" less than the other: 0 if the first is less, 1 if the second is less. The ASCII codes for the first characters that do not match will be compared to determine which string is "numerically" less. For instance, if "aaa" and "aab" are compared, zreturn will be set to 0 because the third character "a" of the first string is less than the third character "b" of the second string.
System variables can not be used for either string.
Example Checks a "password" before letting the user continue define local input ,8 $$ the user's entry password = 'saturday' $$ today's password return ,2 $$ value returned by compare define end at 3:2 write Enter the password of the day...
long 8 arrow 4:2 zero input storea input compare password, input,8,retuzn ok return write Good. Let's continue no write Sorzy, wrong password. Erase and try again.
endarrow i System Variables zreturn _ 1 First string = second string 0 First string < second string 1 Second string > first string compute Computes the numeric value of a string of characters.
compute string, length, result string text variable containing the characters to numerically evaluate length the number of characters to evaluate result numeric variable to hold the result of the compute Description Converts a string into a numeric value. The string may contain leading or trailing blanks, a leading + or - sign, and a decimal point. The string cannot contain any other operators. If the conversion is successful, the value is stored in result. If compute fails (zreturn =0), result remains unchanged.
Example Converts a string to a numeric value, performs an operation on the value, then converts it back to a string:
define local string, 10 $$ holds the string to convert length ,2 $$ length of the string number ,4,r $$ real number for result i define end pack string; length ;23.65 compute string, length, number $$ convert to numeric s calc nutaber G number * 4.83 packz string;;ashow, numberx $$ convert to string at 5:5 write The new string is:ushowa, string a System Variables zreturn -1 Operation successful 0 No valid number was found in the string 1 Overflow error trying to store the converted number in the result variabie.
The result variable needs to be larger.
1 s date Reads or sets the current date.
date date4 [ ,set ]
Description Reads the date from the system clock and puts it in a variable. If the set keyword is used, the system date is set to the date stored in the variable.
The system date is stored as 4 bytes; 2 bytes for year, I byte for month, 1 byte for day.
Example Displays the current date.

i WO 99/07007 PCTlUS98/15627 define local today,4 year, 2, integer , month, 1, integer day, 1, integer define end date today at 10:10 write Today is $$$
writec month;;;January ;February ;March ;April ;May ;June ;
July ;August ;September ;October ;November ;December ;
write «show,day», «show,ycar».
1 s debug Turns step-by-step program execution on/off.
debug on ~ otl' debug SELECTOR; on ( oft'; on ~ off;...
Description debug on stops execution of the current unit and enters the debugger. From the debugger, execution may continue either one command at a time (step mode) or until a specified command or unit is reached (breakpoint mode). debug off returns to normal execution.
The debugging tool is exited by:
~ executing debug off WO 99/07007 PCT/US98l15b27 pressing [ESC] to quit debugging exiting through the System Tools window ~ returning to the editor (normally via [SHIFT][F2]) ~ an execution error debug is normally functional only during source mode execution. It can be made functional in binary mode by choosing that option when making the binary.
debug does not fi~nction with the student executor.
The debugger can also be entered while running a unit by pressing [SHIFT][2], then selecting Debug from the System key options menu.
to device Controls TenCORE device drivers.
device device, fixnction [ , variable [ ,length ] ]
device device number to call, in the range 0 to 255 function device-specific function number to call, in the range 0 to 255 variable data variable needed by the specified function length length of variable, if other than the defined length Description device allows authors to control hardware devices not directly supported by the TenCORE language, but which are implemented through TenCORE device support files. These include special mouse, touch-panel, and interactive video features which go beyond the standard support built into TenCORE commands. The variable tag is used only if the fi~nction requires a data variable.

i Device Support Files "' To use device, a TenCORE device support file is required. The device support file is executed(loaded) before starting the TenCORE executor, and remains resident in memory. Usage of device depends on the device support file being addressed.
System Variable zreturn Set to the processor register AL before returning. Some device support files use this feature to return status information.
disable Disables system features (opposite of enable).
disable keywords pointer disables pointer display and all pointer input ptrup disables pointer-up inputs cursor disables blinking cursor on text mode displays 1 S arrow disables plotting of the arrow prompt absolute disables absolute screen plotting break disables break modified flow branching from interrupting processing area disables area input font plots characters from charsets instead of fonts mode disables mode changes embedded in text Multiple features can be disabled by a single disable statement. See the Defaults section for the initial state of these system features.

..-Description disable pointer Turns off display of the pointer and all input from the pointing device.
disable ptrup Turns off button-up input from the pointing device.
disable cursor Disables the blinking cursor for text mode screens.
disable arrow Disables plotting of the brow prompt character i and trailing space. User input occurs exactly at the location given in the arrow command.
disable absolute Turns off the enable absolute plotting mode and causes subsequent screen graphics to be modified by scale, rotate, window, and origin commands.
disable break I S Disables break modified flow branching from interrupting program execution. flow branching still occurs at the standard input processing locations (see the flow command for description). break is often disabled over a block of critical coding that must be completed in its entirety (e.g., file manipulations and their zreturn checks). Care must be taken to avoid disabling break while in a programming loop with no other means of exit. Since system routing keys such as [SHIFT][1] and [SHIFT][2J are turned offby disable break, a system hangup can occur.
disable area Turns off area input. New areas can be defined while area input is disabled, but input from them will not occur until area input is enabled.

i disable font Plots characters from charsets rather than fonts. Charsets are an obsolete form of character definition.
disable mode Turns ofd mode changes embedded in text.
Defaults The system defaults for the enable and disable command features are set by the initial command to the following:
ON area, arrow, break, font, mode OFF absolute, cursor, pointer, ptrup Status of Disable Features The current ON/OFF status of the system features affected by the disable command are found in the bitmap of the 4-byte system variable zenable. , zenable BIT FEATURE
1 absolute 2 pointer 3 mode 4 cursor 5 ptrup 6 font 7 area 12 break 13 arrow i Use the bit function to examine zenable. A bit set implies ON while unset implies OFF.
For example:
bit(zenable,2) _ -1 means pointer ON
bit(zenable,2) = 0 means pointer OFF
S Example All flow branching is turned off while attaching a file and checking for success.
flow do: $f10; glossary; break S$ a flow break branch disable break $$ prevent interruptions attach 'afile': nameset $$ attempt to open file jump zreturn;;erroru $$ check success enable break $S re-enable flow breaks CIO
Executes a unit as a subroutine.
do UNIT [ ( [argument/16s ] [ ; return/16s ] ) ]
do SELECTOR; UVIT [ ( [ argument/16s ] [ ; return/16s ] ) ] ; ...
Description Executes the specified unit as a subroutine. Upon completion of the subroutine, execution resumes with the command following the do. Subroutines can be nested up to 20 levels deep.
The unit which contains the do command is sometimes referred to as the calling unit; the subroutine is the called unit.
If a jump branch to a new main unit occurs while in a subroutine, execution does not return to the command following the do and the do stack is cleared.

i do can pass up to 16 arguments to a subroutine and receive up to I6 arguments froffi a subroutine. A semicolon separates the send argument list from the receive argument list, while a comma separates arguments within a list.
The called unit must accept the passed arguments with a receive command (unless a nocheck receive command is in effect) or an execution error will occur. The called unit must return any required return arguments using the return command (unless a nocheck return is in effect) or an execution error will occur. See receive, return, and no check.
All arguments are passed and returned by value. However, the address of a variable can be sent as a value using the varloc ( ) function.
IO Examples Example 1 When writing courseware, it is advantageous to put displays and routines that will be used in multiple places into one place that can be called as a subroutine when needed. Unit header can contain coding for a title bar that will appear on all pages for this segment of the lesson. Unit I 5 diagraml can plot an image and other graphics that will be common for this segment of the lesson. The do call to unit navigate in lesson tools is used to show the standard display of student navigation options available throughout all lessons in this series of lessons.
do header $$ in current lesson do diagraml $$ in current lesson 20 at 20:10 write This diagram shows the system We will be studying next at the start of its combustion cycle.
do tools, navigate $$ in lesson tools *rB

i Example 2 ,..
The do statement passes the value 3 to the subroutine mouth to request that it return the numerically identified month's name and number of days. The do command's argument list is divided into two parts separated by a semicolon: the first part is for sending arguments, the second part is for receiving arguments.
define local name,6 days,l define end do month(3; name, days) $$ get the name and days * in the 3rd month write ua,name» has us,days» days.
unit month define local lnumber,l lname,8 ldays,l define end receive lnumber $$ obtain month number argument packzc lnumber; lnama 1 ; ; :January;February;Harch;April...
calcs lnumber; ldaya G ;; 31: 28; 31: 30...
return lname,ldays $$ return the name and days Example 3 The expression score < 7~ is used as a true/false selector to choose either unit sad or smile which graphically shows a student's status with a sad or smiling face image.
do score < 75:sad: smile i dOt Plots a single pixel on the screen.
dot [ LOCATION ]
Description Plots a single pixel on the screen in the current plotting mode and color, at the specified location. If no location is specified, the current location (zx,zy) is used.
The dot command is affected by thick. With thick on, all dots are plotted two pixels thick; with thick off, dots are plotted one pixel thick.
Examples Example 1 Displays a dot at the location of the mouse pointer (zinputx,zinputy) when the pause is broken.
enable pointer pause pass= pointer dot zinputx,zinputy Example 2 Draws a sine wave using dot.
define local x ~g,r $$ a real variable for the x-coordinate define end loop x G 0, 2* a, 0.1 . dot 50*x, 100+50*sin(x) endloop i ZZO
System Variables '"
zr Current horizontal graphic screen location Zy Current vertical graphic screen location d raw Draws lines between screen locations.
draw [ LOCATION ]; [ LOCATION ]; [ LOCATION ];...
Description Plots lines on the screen in the current plotting mode and color. A line is drawn between each location separated by a semicolon. When a double semicolon (;;) is reached, draw skips to the next location.
A single draw command can be continued on more than one line. If the tag starts with a semicolon, the line starts at the current screen location.
With thick on, all dots are plotted two pixels thick; with thick off, dots are plotted one pixel thick.
Examples Example 1 Draws a box and a triangle on the screen with one draw command. Note the double semicolon to separate the two figures and that the drawing is continued over multiple lines.
draw 10,10; 80,10; 80,100; 10,,100; 10,10;; 10,130;
100,130; 10,190; 10,130 i WO 99/07007 PC"T/US98/15627 Example 2 Draws connected line segments at random locations on the screen (or window).
The starting semicolon is used to start each draw at the current screen location which is the ending point of the previous draw.
loop . color randi(1,15) $$ choose random color . draw ;randi(O,zdispx), randi (0, zdiapy) delay .O1 endloop to ellipse Draws an ellipse.
ellipse Xradius, Yradi:~s [, till ~ anglel, angle2 ]
Description Draws an ellipse (or portion of an ellipse) with the center at the current screen location. If the fill keyword is specified, the ellipse is filled with the current foreground color. The current screen location is not altered after a full ellipse is drawn: multiple ellipses can be drawn with the same center without resetting the screen location.
The two-tag form draws a full ellipse. The four-tag form draws only the arc of the ellipse specified by the starting and ending angles. Arcs are always drawn counter-clockwise from the first angle to the second angle. For example, ellipse 100,60,0,90 draws one quarter of an ellipse.
The command ellipse 100,60,90,0 draws three-quarters of an ellipse. The current screen location is updated after an arc is drawn (a four-tag ellipse).

i WO 9910700? PG"T/US98/15627 Example .~.

Draws an ellip se and arcs centered two on the screen.

at zxmax/2, zymax/2$$ set the center of the ellipse ellipse 95, 50 $$ draw a full ellipse ellipse 90, 40, 0, 90 $$ draw a quarter of an ellipse at zxmax/2, zymax/2$$ reset the center of the ellipse ellipse 70, 30, 90, $$ three-quarters of an ellipse else alternate case for if/else programming structure.
else Description Should the conditions of the previous if and elseif commands be false, the indented commands between else and endif are executed. An else command is not required in an if structure. For more information on if structures, see the if command description.
Example if score > 90 write Very Good!
elseif score > 75 write OK, but you could do better.
else Write You need more practice.
endif i WO 99/0007 PCT/US98/1562~

elseif Conditional case for if/else programming structure.
elseif CONDITION
Description If the tags of the if command and all previous elseif commands evaluate false and the tag on the current elseif command evaluates true, the following indented commands are executed.
Control then passes to the command following the endif. For more information on if strictures, see the if command description.
Example if score > 90 write Very Good!
elaeif score > 75 . write OK, but you could do better.
else lj , write You need more practice.
endif enable Enables system features (opposite of disable).
enable keywords enable uvadable4»
pointer turns on pointer display and pointer input ptrup enables pointer-up inputs cursor turns on blinking cursor on text mode displays i arrow re-enables plotting of the arrow prompt '"' absolute turns on absolute screen plotting break re-enables break modified flow branching to interrupt processing area re-enables area input font re-enables font plotting mode re-enables mode changes embedded in text Multiple features can be enabled by a single enable statement. See the Defaults section for the initial state of these system features.
Descriptions enable pointer Turns on display of the pointer and input from the pointing device.
enable ptrup Enables button-up input. Unless ptrup is enabled, the pointing device generates input only when a button is depressed enable cursor Turns on a blinking cursor for text mode screens. This command has no effect on graphic screens.
enable arrow Re-enables plotting of the arrow prompt character > and trailing space.
enable absolute Turns on absolute screen plotting mode. Subsequent screen graphics are not modified by scale, rotate, window and origin commands. The scale, rotate and origin commands are effectively turned offwhile window becomes modified by relative off and clip off.

i enable break Re-enables break modified flow branching to interrupt program execution.
enable area Re-enables area input. Any previously defined current areas including those defined while area input was disabled are now active.
enable font Returns to using fonts instead of charsets for character plotting. Charsets are an obsolete form of character definition.
enable mode Re-enables mode changes embedded in text.
enable «variable4»
The variable form of the enable command is used to enable/disable all features according to their bit settings in a 4-byte variable. The variable is usually a saved copy of the system variable zenable that is used to later reset all features back to a previous state. The feature bitmap is discussed in the following section Status of Enable Features.
Defaults The system defaults for the enable and disable command features are set by the initial command to the following:
ON area, arrow, break, font, mode OFF absolute, cursor, pointer, ptrup Status of Enable Features The current ONIOFF status of the system features affected by the enable command are found in the bitmap of the 4-byte system variable zenable.
zenable BIT FEATURE

i 1 absolute 2 pointer mode cursor 5 Pt~P
font 7 area 12 break 13 arrow Use the bit function to examine zenable. A bit set implies ON while onset implies OFF.
For example:
bit(zenable,2) _ -1 means pointer ON
bit(zenable,2) = 0 means pointer OFF
Example 1 S The absolute screen coordinates of the pointer are displayed at the pointer location. The coordinates and display are relative to the physical screen and not affected by any window, origin, rotate or scale commands.
enable pointer, absolute $$ turn on pointer and absolute loop pause $$ move mouse then press button at zinputx,zinputy $$ at pointer location write <s,zinputx» - <s,zinputy~ $$ show coordinates endloop i WO 99!07007 PCT/US98/15627 endif Ends if/else programming structure.
endif Description Marks the end of an if structure, Every if must have a matching endif at the same indent level. For more information on if structures, see the if command description.
Example if score > 90 writs Very Good!
elseif score > 75 write OK, but you could do better.
else Write You need more practice.
endif is endloop Ends loop programming structure.
endloop Description Marks the end of a loop structure. Every loop must have a matching endloop at the same ZO indent level. For more information on loop structures, see the loop command description.
Example Fifty X's are written on the screen.

i loop index G 1,50 write X
endloop erase Erases a box, frame or characters on the screen.
erase [ LOCATION ) [; [ LOCATION ] [; Xframe [, Yframe ]]]
Description Erases a box or frame on the screen to the background color. See the Command Syntax Conventions for a description of LOCATION. The box command is identical to erase except that it uses the foreground color for drawing.
The presence of a frame width argument signifies that a frame rather than solid box be erased. The widths of the right and left sides are specified in pixels by the first frame argument while the second frame argument specifies the top and bottom widths. If the second frame argument is absent, the top and bottom frame width is set to best match the side width in aspect I S appearance on the screen.
Examples Example 1 The entire screen (or window) is erased to blue.
colors blue erase Example 2 A rectangle 200 pixels wide by 100 pixels high is erased to the background color. Graphic coordinates are used to specify each x,y coordinate for a location.

i erase 101,101; 300,200 Example 3 The text in a write statement is later erased after a pause. The text measure command is used to determine the screen area that a following paragraph of text plots over on the screen.
This information is returned in the system variables zplotxl, zplotyl for lower left corner and zplotxh, zplotyh for upper right corner.
text measure $$ initialize text measuring at 100,150 write This is a paragraph of text of arbitrary length that will be erased...
pause erase zplotxl, zplotyl; zplotxh, zplotyh Example 4 Ten characters are erased.
at lo:l erase to error Specifies an execution error unit.
error [ UNIT ]
error SELECTOR ; UNIT ; UNIT ~;...

i Description Sets the execution error lesson and unit. Whenever an execution error occurs, the system jumps to the unit specified with error. If no unit has been specified, a TenCORE system error message is displayed.
The blank-tag form clears the error lesson and unit. The setting of the error unit remains in effect until another error command is encountered.
The "error unit" is normally set by the router lesson when the system is started.
When error is executed, the current mode of operation, (binary or source), is saved along with the error lesson and unit names. If an error causes a branch to the error unit, the saved mode of operation is used to decide whether to fetch the error unit from a binary file or a source file.
System Variables zerrorl Name of the error lesson zerroru Name of the error unit exchang Exchanges the contents of two areas of memory.
exchang keyword, offset; keyword, offset; length keyword routvars ~ r Router variables display ~ d CGA screen display memory global ~ g Global variables local ~ 1 Local variables sysvars ~ s System data area sysprog ~ p System program area absolute ~ a Absolute memory location i offset offset from memory base "' length number of bytes to exchange Description Exchanges bytes between two areas of memory. Up to 65,535 (64K-1) bytes can be exchanged. An offset of 0 specifies the beginning of the area of memory.
For relative addressing, TenCORE divides the computer memory into areas, each with its own keyword. A location is specified by providing a keyword, then an offset An offset of 0 specifies the first byte of that area.
Additional information about each keyword:
routvars This is a 256-byte area of memory which can be accessed only via eachang and transfr. This area is used by the Student Router for storing data while a user is in an activity. if using this router, be careful not to modify the first 128 bytes of this area.
display CGA screen display memory. The display memory for other display types (EGA, VGA, etc.) cannot be accessed with exchang.
sysvars Do not use this area for data storage.
sysprog Do not use this area for data storage.
absolute Programs which reference absolute memory locations may not work in multi-tasking environments.
Because eachang can access any area of memory in the computer, it should be used with caution.
When specifying an offset in variables, the varloc( )function can be used to specify the offset of a particular variable.

i Similarly, an absolute memory location can be specified using the absloc( ) function~-Note, however, that absioc() may not work properly on mufti-tasking operating systems such as Windows or OS/2.
Locally defined names have precedence over globally defined names when using varloc( ).
This could cause unexpected results when varloc( ) is used with eachang.
Examples Example 1 The expression varloc(scorvar) specifies the beginning of global variables containing user scores.
exchang global, varloc(scorvar); routvars,128; 128 ~ Uses 2nd half of routvars Example 2 Makes certain that the 2-byte value in XO is less than or equal to the 2-byte value in X1.
if xo > xl exchang global,varloc (XO) ;global,varloc (X1);2 endif exec Executes a DOS program or command.
exec keyword...
command executes a program or command through the DOS command processor, or provides access to the DOS prompt tile executes a program directly Descriptions "°
exec command [, all ( memorySize ]
Provides access to the DOS command line prompt. To return to TenCORE, type exit at the DOS prompt.
DOS memory not currently used by TenCORE is available for use by programs or commands entered at the DOS prompt. If the all option is specified, as much DOS memory as possible is made available by temporarily removing most of TenCORE. If a memory size is specified, the system attempts to free the specified number of kilobytes of memory. Note that the DOS command processor uses a part of this memory.
exec command [, all ~ memorySize ]; buffer [,length ]
The DOS command processor is loaded and passed the buffer to execute as if its contents had been typed at the DOS prompt. Features of the DOS prompt such as path search and batch file execution are available. If the length is not specified, the defined length of the buffer is used;
unused bytes at the end of the buffer should be zero-filled.
1 S DOS memory not currently used by TenCORE is available for use by the passed program or command. If the all option is specified, as much DOS memory as possible is made available by temporarily removing most of TenCOItE. If a memory size is specified, the system attempts to free the specified number of kilobytes of memory. The DOS command processor uses a part of this memory.
exec file [ ,all ~ memorySize ]; buffer [,length ]
Executes .EXE and .COM files (only). The complete file name (including the .F,XE or.
COM extension), as well as drive and path must be specified. The features of the DOS command processor such as path search and batch file execution are not available. Any characters starting with the first space or slash (/) are passed as arguments to the executed file. if the length is not i specified, the defined length of the buffer is used; unused bytes at the end of the bui~er shod be zero-filled.
DOS memory not currently used by TenCORE is available for use by the executed file. If the all option is specified, as much DOS memory as possible is made available by temporarily removing most of TenCORE. If a memory size is specified, the system attempts to free the specified number of kilobytes of memory.
The file form of exec is more efficient than the command form as the DOS
command processor is not loaded. This form also allows access to error reports for the executed program (the command form provides error reports for the DOS command processor).
Examples The following defines are used for all the following examples.
define local buf, 100 define end Example 1 Uses the command form of exec to allow any DOS directive or program name typed at an arrow to be executed. As much memory as possible is made available.
write Enter DOS command to execute:
long 100 arrow atorea buf $S store input into variable ok endarrow exec couaoand, all ; buf 2$ writer zreturn::Error: zreturn = ashowt,zreturn~a i Example 2 Uses the command form of exec to copy all TenCORE datasets in the current directory to drive a:. As much memory as possible is made available.
packz buf;;xcopy *.dat a:
exec command, all;buf vrritec zreturn;;Error: zreturn = <showt,zreturn»
Example 3 Uses the tile form of exec to call the Autodesk Animator animation program OUICKFLLEXE in directory D: ~PROGS to play the animation BACKHOE.FLI in directory C: ';ANIMS. 250 kilobytes of memory are requested.
screen mcga,medium packz buf:;d:\progs\quickfli.exe c:\anims\backhoe.fli exec file,250;buf raritec zreturn;;Error: zreturn = ushowt,zreturn»
System Variables The exec command sets the following system variables.
command form:
zreturn reports on success of operation -1 DOS command processor successfully executed.
0 insufficient memory to load DOS command processor, or unable to provide requested amount of memory.
1 DOS command processor (COI~~IAND.COM) not found.
file form:
zreturn reports on success of operation -1 program successfully executed i 0 insufficient memory to load program, or unable to provide requested amount of memory.
I program no found.
zerrlevl DOS ERRORLEVEL value as returned by executed program.
Both forms also set the system variables zedoserr and zerrcode which provide extended DOS error information.
exitsys Exits to DOS or to the program which called TenCORE.
exitsys ( error ( ,noerase ] ]
error I-byte integer value passed to the DOS variable ERRORLEVEL
noerase the screen mode is not changed and the screen is not erased Description Returns control back to the program which called the TenCORE executor.
Normally, the user is returned to the DOS prompt. If TenCORE was started via a DOS batch file, the next command in that batch file is executed. If error is specified, the value is passed to the DOS
variable ERRORLEVEL, where it can be tested using DOS commands. If the noerase keyword is present, the screen mode is not changed and the.screen is not erased. This keyword can only be specified when using the return value error.
ERRORLEVEL Values TenCORE uses ERRORLEVEL values to indicate various error conditions. Authors are advised against using values 0 to 31 with exitsys.
0 Normal exit via exitsys (no tag) i 1 Copy protection violation 2 Error in TenCORE command line options Insufficient memory to execute TenCORE

Display driver not found 5 Error in display driver (e.g., invalid revision number) 6 Error in syntax of TenCORE environment string 7-15 Reserved for later use 16 Initial unit not found 17 No startup found in first unit executed 18 Initial unit version incompatible with executor 19 rill drives excluded by TCDISKS or TCSEARCH

20-30 Reserved for later use 31 [SHIFT][7] pressed from generic Execution Error display extin I S Reads data from an external I/O port.
extin port, buffer, length port address of the I/O port to read from buffer buffer to receive data from the port length number of bytes to receive Description Reads the specified number of bytes from the specified external I/O port. This command can be used to control external devices via a serial or parallel port. Consult the IBM Technical i Reference Man:gal for details on addressing and controlling the serial and parallel ports. extent is the counterpart to extin.
Examples Eaampte 1 Reads one byte of data from COMI.
define local rstatus , 1 $$ the variable to read into define end extin 1016,rstatus,l * read 1 bytes from address 1016 (h3F8) into rstatus Example 2 Uses extin and extout to send a byte to the COIVI1 port using xon/xoff protocol. This routine could form the basis of a routine to control a printer.
define local status ,1 $$ status flags for cowl:
dr ,1 $$ data ready, bit 0 of the status bits * if this bit is set, there is data ready to read rstatus ,1 $$ a character read from coral:
2~ tx ,1 $$ transmitter status. If 0, the port is * ready to accept another character to transmit xonoff ,l $$ xon/xoff flag. If 1, xoff, else xon.
char ,1 $$ a character to send out the port lsr = 1021 $$ line status register address rxyar = 1016 $$ receive variable register address txvar = 1016 $$ transmitter variable register address i .>
define end loop loop extin lsr,status,l * , now check the first bit of the status, * , see if xon/xoff was sent calc dr G status Smask$ 1 outloop dr = 0 $$ no xon/xoff, so proceed * if there was xon/xoff, read it and set the flag extin rxvar,rstatus,l calcs rstatus=17; xonoff G 0,1 endloop reloop xonoff = 1 $$ xoff, so loop again * now check bit 5 of the status to see if it's ok to sand * another character calc tx G status $mask$ 32 outloop tx=32 $$ if ok, send it, otherwise loop again endloop extout txvar,char,l $$ send the character extout Writes data to an eaternai I/O port eatout port, buffer, length port address of the 1/0 port to write to buffer buffer containing the data to send to the port length number of bytes to send i WO 99/07007 PCT/US98/1562?

Description Writes the specified number of bytes to the specified external 1/O port. This command can be used to control external devices via a serial or parallel port. Consult the IBM Technical Reference Man:gal for details on addressing and controlling the serial and parallel ports. extin is S the counterpart to extout.
Examples Example 1 Writes the contents of rstattrs to COM1.
define local rstatus ,1 define end extout 1016,rstatus,l $$ writes rstatus to COM1 (h3FB) Example 2 See the extin command description, Example 2 for an additional example.
fi ll Fills any bounded area on the screen.
fill [ color [, boundary ] ]
color color to fill with boundary color which defines the boundary of the area to be filled i Description Fills an enclosed area with a specified color starting at the current cursor position. If no color is specified, the area is filled with the current foreground color. If no boundary color is specified, the fill stops at any color different from the original color of the beginning point.
If the area to be filled is not closed the entire screen is filled.
The fill command usually follows an at, which sets the point at which the fill is to begin.
Fill does not use the current plotting mode: the specified color always appears regardless of mode.
Example Produces a red circle inscribed with a bright white triangle outline. After the first delay, the top segment of the triangle is filled with cyan.
After the second delay, the top segment becomes magenta.
After the last delay, the entire triangle becomes solid blue with a white outline.

screen vga color red at 320,216 circle 65, fill color white+

draw 320,335; 200,150; 440,150; 320,335 delay 1 color cyan at 320,334 fill delay 1 fill magenta delay 1 fill blue, white+

i .-find Finds the position of a data object within :t list.
find object, length, buffer, entries, incr, return object data to search for length length of the object in bytes buffer variable to begin search entries number of entries in list incr length of each entry in buffer in bytes return entry number of first match Description Searches a list of character or numeric entries for the desired object string.
find will search for the object every irrcr bytes, from the beginning of b:rffer without attention to defined sizes or boundaries of variables. It considers buffer to be the first byte of a list whose characteristics are defined entirely by entries and incr.
I 5 If incr is negative, the search proceeds backwards from the end of the list to the start.
return indicates the position in the list where object was found, with the first entry being 1. If the object is not found, -I is returned. The value in return is always relative to the beginning of the list, even if the search is backwards.
Examples The examples below all assume the following defines.
define local name,l5 $$ name to search for found,2 $$ position in list where "name" found *rB

i list(5),15 $$ list of names define end In each example, list contains 5 names, each of which occupies 15 characters.
The contents are as follows:
John miller.... ho........sarahjohnston.jamesheflin...lisa berger....
mark T T T T T

Null characters have been shown as dots to improve their visibility, and numbers have been added to help in counting bytes.
Example 1... Literal Object Searches for the name 'mark ho'.
find 'mark ho',7,list(1),5,15,found $$ found will be 2 Because the name has 8 or less characters, it can be supplied as the text literal 'mark ho'.
Next comes the length, 7 characters. The start of the list is given as list(/), and its length as 5 entries of 15 bytes each.
After the search found contains the value 2 because 'mark ho' is found at the second position (not the second byte) in the list.
Example 2...Variable Object Objects of more than 8 bytes cannot be given as text literals and must occur in variables.
To locate 'James heflin':
packz name;;james heflin find name,l5,liat(1),5,15,found The variable found receives the value 4 because'james heflin' is found in the fourth position.

Example 3...Byte-by-Byte To find a last name.
packs name:: miller find name,6,list(1),75,l,found When this example is executed,found receives the value 6.
Note that the length of the name is given as 6 because this locates part of an entry, not an entire entry.
Similarly, the list is specified as 75 one-byte entries instead of 5 fifteen-byte entries. This causes find to Iook for'millef starting at every byte, not just at the start of each 15-byte entry.
This illustrates that the object of the search can be longer than the nominal entry length provided for it.
Example 4...Backwards Search To search backwards, a negative value is given for the entry length. This searches backwards from the end of the list for'john', looking only at the beginning of each 15-byte entry.
find 'john',4,list(1),5,-l5,found Here, found receives the value 1. Although the search proceeded backwards from the end of the list, the position is always counted from the beginning of the list.
Example S...Backwards Byte-by-Byte Another example of backwards searching is the following.
find 'john',4,list(1),75,-l,found In this case, an entry length of -1 is used, causing find to look at every character starting from the end of the list.
found receives the value 37, because the first'john' found when searching backwards byte-by-byte occurs in'sarah johnston'. If the search had been in the forward direction, 'john millet would have been found first, and found would have received the value 1.

i f~OW
~~Ianages lesson flow by event-driven unit branching.
flow keyword...

jump defines event driven unit branch with screen erase jumpop like jump but without screen erase do defines event driven subroutine call library like do but forces a binary subroutine call clear clears active flow event settings save saves active set of flow events restore restores saved set of flow events to active status delete deletes saved set of flow events reset deletes all saved sets of flow events dir returns list of active flow events info provides flow branch data about active flow event I S Description Manages event-driven branching. Events can be keypresses, pointer inputs, time-ups, etc.
A specific event can trigger a jump to a new main unit or a subroutine call.
Up to 50 different events can be active at a given time. A set of flow events and associated branches can be defined as the default environment for all new main units throughout a lesson. Advanced options can manipulate a lesson's flow settings so as to provide a clean connection to a router or library routines.
Flow events normally occur at waiting states within a lesson:

WO 99/07007 PCTNS98/15b27 ~ at a pause that allows flow key input ~ at an arrow that processes user keypresses ~ at the completion of a unit's execution ("end-of unit") A sequence of coding will not be interrupted by a flow event at any other place unless the flow definition has been modified with break to allow for program interruption.
flow jump ( jumpop ~ do ~ library; ICEY/s; UNIT [modifier; modifier;...]
Defines a connection between a keypress (or other input event) and a branch to a unit.
The first argument is a keyword specifying the type of branch. KEY is described fully in the Syntax Conventions section. Multiple keys separated by commas are allowed and when pressed cause a branch to UNIT. A total of 50 different events can be active as created by multiple flow commands. A given event is associated with one branch at a time. If the same event is defined in two different flow commands, the most recent definition takes precedence.
Modifiers alter the standard operation of the command. Argument passing is not supported.
jump Ends the current unit and branches to a new main unit. The following initializations are performed:
~ the screen is erased to the default background color ~ all flow events and area definitions are cleared and reset to their main unit defaults ~ all display parameters are reset to their main unit defaults (as set by status save; default) ~ the unit becomes the new main unit for processing and flow events jumpop Ends the current unit and branches without a screen erase ("op" stands for "on page") to a new main unit. Only the following initializations are performed:

i ~ all flow events are cleared and reset to their new main unit defaults ~ the unit becomes the new main unit for processing and flow events do Calls a unit as a subroutine. No initializations are performed. Return from the subroutine unit continues execution at the place the flow do event occurred. 20 levels of nested subroutine calls are allowed. flow do executes in source or binary mode depending on the mode of the calling lesson.
library Calls a unit as a binary subroutine. No initializations are performed. Return from the subroutine unit continues execution at the place the flow do event occurred.
20 levels of nested subroutine calls are allowed. flow library is frequently used for calling third party software where the coding exists only in binary form.
Example 1 When [ENTER] is pressed, branches and passes control to quiz! in the current lesson.
The screen is erased and all display settings, flow branches, and pointer areas are reset to their main unit defaults. When [F8] is pressed, moreir fo is called as a subroutine and control remains with the calling unit. Unit moreinfo would contain coding to add new information to that already on the screen.
write Press Enter to Bsgin the Quiz.
Press F8 for more information.
flow jump: %eater: quizl flow do; %f8; moreinfo i Example 2 Branches and passes control to unit index in lesson aero! when either [Fl] or [ESC] is pressed. When [PGT] is pressed, the binary subroutine scroll is executed.
Control remains in the calling unit upon return from scroll flow jump; %fl,%eac: aerol,index flow library; %p9uP: scroll Example 3 Branches to the unit named by the variable urritYar when any of the keys a, b, c or the value contained in the variable xkey is input.
I0 flow jump; a,b,c, <xkey» ; «unitvar»
Ezample 4 Branches with a screen erase to help when either [F 1 ] is pressed or a Click occurs on the associated area. Pressing [F2] or a Click on its associated area branches to more without a screen erase. In either case, control passes to the new unit.
area define; 100,0; 150,20; click=%fl area define; 200,0; 250,20; click=%f2 flow jusap: %fl; help flow jumipop; %f2; more Generic Unit Names Generic branch names are provided for common jump destinations to new main units:
=neat The next physical unit to the current main unit in the lesson. If none, the branch is ignored.
=back The previous physical unit to the current main unit in the lesson. If none, the branch is ignored.
=first The first executable unit in the current lesson.

i =last The last executable unit in the current lesson.
=main The current main lesson and unit as held in the system variables zmainl,zmainu.
=base The main lesson and unit from which the last base modified flow branch occurred or as set by the base command. If none, the branch is ignored. The names of the current base lesson and unit are held in the system variables zbasel,zbaseu. Typically used for returning from a supplementary lesson sequence such as help to the main line of study.
See base modifier on page $$$.
IO =editor The Source Editor (with the current executing unit as the source block being edified) if executed by the authoring system; ignored by the student executor.
=exit The lesson exit as set by the exities command and contained in the system variables zexitl,zeaitu. Student users are typically branched back to their routing system such as the TenCORE Activity Manager or DOS
if none is present. An author testing a lesson is returned to the File Directory.
=system Opens the system options window with the calculator, image capture, cursor, etc. [F2] is normally loaded with this branch as a TenCORE
system default during authoring; ignored by the student executor.
Example 1 Branches to the unit following or preceding the current main unit in the lesson when [ESC] or [F6] is pressed. In the first or last unit of the lesson, the branch is ignored. This is an easy way to program the essential flow for a linear page-turning lesson.

i WO 99!07007 PCT/US98/15627 flow jump: $enter: =next ",.
flow jump: $f6; =back Ezample 2 'Vhen [ESC] is pressed, branches to the exit unit that was specified by the exitles command in a router or, if none, then DOS.
flow jump: 'escape: =exit Unanticipated Input A flow event can be defined for all unanticipated input at one of the naturai waiting states by using the pseudo-key %other. This "other" event occurs only if the input cannot be applied to any other possible flow branch or input situation.
Example 1 Causes any key inputs that would otherwise be discarded by the system to branch to unit record which, say, records these unanticipated inputs for later study.
flow do; brother: record; default; break Example 2 At the pause, keys a, b and c continue execution of the unit. Any input specified in an active flow event such as [ENTER] and [F6] work as defined. Any other inputs branch to unit continue.
flow jump; renter; next flow jump: $f6; =back flow jump; Bother: continue pause flow=all;pass=a,b,c *rB

i WO 99/07007 PC"T/US98I15b27 ".
Example 3 At the arrow, standard ASCII input such as a, b and c cause typing to appear on the screen as expected. Other arrow related functions such as erase, copy, judge-with-the-Enter key, etc. also perform as expected. Any defined flow event such as the branch to unit aha is active;
unanticipated keys such as an undefined [F 12J branch to unit help flow do; bother; help flow jump: ~f3: aha arrow 10:20 Modifiers Modifiers on a flow statement alter the default action of the command.
Multiple modifiers separated by semicolons can be used and in any order although some are mutually exclusive.
default Establishes the flow branch as a default setting for all subsequent new main units. default modified flow settings are cleared by an initial statement or by a flow clear statement with a default or router modifier. default settings for an entire lesson are often placed in the +initial control block of a lesson so that they are set with any entry to the lesson.
complete Delays putting the flow command into effect until alI processing in the unit is completed including any pause or arrow statements. The flow works only at the end-of unit. For example, users can be required to complete all arrows in a unit before branching to the next unit. The complete and break modifiers cannot be combined.
router Establishes the flow setting permanently over all following units. It is NOT
cleared by an initial statement The router modifier allows management Zsz software (such as the TenCORE Activity Manager) to permanently set ".
keys for routing use in an application. router flow settings can be cleared only by using flow clear with the router modifier For example, a roofer modified exit branch using [SHIFT][I] is set by the TenCORE system at start-up of the student executor to return users to DOS. If the Activity Manager is used, it resets this flow branch to exit users back to a return unit in the Activity Manager before launching an application.
Great care should be taken in clearing roofer flow settings in an application lesson as the user can become stuck in the application. The roofer and break modifiers are best used together unless you are certain that your lessons accept the roofer exit key in all situations.
break Allows the flow branch to occur at any point, interrupting any programming or pause in process. A break modified flow branch will 1 S always work unless temporarily turned off by disable break. The main use for break is to interrupt a programming loop that does not check for keys.
The break modifier is often used with the roofer modifier by a roofer to guarantee that the exit branch will always work in application lessons.
break cannot be combined with complete.
ZO When a break modified flow do or flow library event interrupts commands being processed (as in a programming loop), the current program statement is completed, the subroutine is executed, then processing continues with the next statement. When a break occurs at a timed pause or delay command, the timing is suspended until return from the subroutine. During the subroutine call, the flow event is temporarily",.
disabled to avoid recursion and re-enabled upon exit from the subroutine.
In addition, the following system variables are saved and restored over the subroutine call: zinput, zinputf, zinputx, zinputy, zinputa, zreturn.
Great care must be taken to avoid unreliable results when using break with the do or library form of flow. Since a break interrupt can occur anywhere, variables (especially system variables) can be accidentally changed in the interrupt do or library call level making them invalid upon return from the call. The break attribute should be turned off over critical coding by use of a disable break statement. See the following Example 4 clearkeys Upon branching, deletes all pending input from the input buffer.
clearkeys eliminates keys that may have been "stacked-up" waiting for some event to end, such as a lengthy full-page display.
base The base modifier on a flow branch causes the main lesson and unit from which the branch occurs to become the base lesson and unit and stored in the system variables zbasel and zbaseu. When a base modified flow branch initiates a supplementary lesson sequence, such as help, the =base generic SIT location can be used to return the user to the starting base location.
windowclose Closes the current window, if any, before executing the flow branch.
windowreset Closes all open windows, if any, before executing the flow branch.
operate Before branching, restores the execution mode in effect when the flow statement was encountered. (See the operate command.) binary Before branching, changes to binary execution mode source Before branching, changes to source execution mode.
tpr Before branching, changes to tpr (Producer) execution mode.
Example 1 Causes an immediate branch to the next linear unit in the lesson when the [ENTER] key is pressed. All subsequent main units will default to this flow setting. If this statement is to apply to the entire lesson, it should be placed in the +initial control block flow juatp; renter; =next; default; break Example 2 Sets [ESC] to be a router exit key. It is kept permanently over initial commands and will break any programming situation (unless break is disabled), close all windows, and jump to route, return.
flow jump; $escape; route, return; router; break: windowreset Example 3 I S Branches to unit qr~es6 if [ENTER] is pressed at an end-of unit. Any pause or arrow must be completed first. Any other inputs "stacked-up" are removed.
flow jump: $enter; ques6; complete; clearkeys Example 4 A library unit (clock in lesson routines) is installed to show the user the time whenever [FIO] is pressed or when a %timeup input occurs. Within the library routine itself, a time 1 statement is executed before exiting so that the %timeup key will keep occurring and "refresh"
the clock every second while the user remains in the main unit. Critical coding in the lesson that may be affected by unexpected interrupts should be protected by disabling the break attribute over the coding, then enabling it again after the coding.

i flow library: ~f10,$timeup; routines, clock; break: default disable break $$ protect critical codiag attach 'file';nameset $$ perhaps unit clock also does attach do zreturn:;erroru aetname 'block' $$ and setname enable break S$ re-enable break flow clear [ ; [ KEYS/s J [; default ~ router ] ]
Deletes flow settings from the active list and optionally from the new main unit default and the router lists. The default modifier is used to remove any flow definitions that have been set with the default modifier. The router modifier is used to remove both router and default modified flow settings.
Example 1 1 S Deletes all active flow settings except those modified with router. Any settings made with the default modifier will be re-activated upon a jump to a new main unit.
flow clear Example 2 Deletes any active flow settings for [ENTER] and [F6] unless they were defined with the router modifier. If either of these keys were defined with a default modifier, it will be re-activated upon a jump to a new main unit.
flow clear; $enter,~f6 Example 3 Deletes [ENTER] from the active and default flow settings unless it has the router attribute i WO 9910700? PCT/US98/1562?

flow clear; $enter; default Example 4 Deletes all flow settings, except those modified with router, from both the active and default settings. An initial statement also performs this task.
S flow clear;;default Example 5 Completely deletes [ENTER] as a flow setting regardless of how it was set.
flow clear; $enter; router Example 6 Deletes all flow settings regardless of how they were defined. Use with extreme caution for all the system flow settings such as [SHIFT][F1] are also removed preventing any exit unless otherwise provided for.
glow clear;;router flow save;'NA11~IE' ~ local flow save; default Saves the set of active flow definitions in a memory pool block or the default buffer. The name can be either a text literal or contained in a variable. Named blocks can be restored later in any unit.
The local keyword saves the flow settings in a memory pool block specific to the current unit A local block can be restored only in the unit which saved it; it is deleted automatically when execution of the unit ends.
Saving the active flow settings to the default buffer makes them the default flow settings for all new main units. They are automatically reset on a jump or jumpop to another unit.
The memory pool is used by the commands: memory, image, window, status, area, flow, font and perm. Memory blocks are tagged as belonging to a specific command type at i creation and cannot be accessed by other commands using the memory pool;
different comman,~s can use the same name for a memory block without conflict.
Example I
Saves the active flow settings under the name flows in the memory pool.
flow save: 'flows' Example 2 Saves and restores the active flow settings over a subroutine call in a block unique to the unit. The block is automatically deleted when the unit is exited.
flow save; local do routines, graph flow restored local Example 3 Makes the active flow settings the defaults for all subsequent units that are entered by a jump or jumpop branch.
flow save; default flow restore; 'NAME' ~ local [; delete flow restore; default Replaces the active flow settings with a previously saved set. Optionally, the named or local block can be deleted from the memory pool by using the delete modifier.
Example 1 Saves and restores the active flow settings over a library call. The library routine can alter the active flow settings as desired without affecting the calling program upon return. Alternately, the flow save and restore could be built into the library routine to provide a more easily used tool.
flow save; 'flows' i WO 99/07007 PC'f/US98/156Z7 library routinea,graph flow restore; 'flows' Example 2 Re-activates the flow settings whose name is contained in the variable setup.
'rhe memory block is then deleted.
flow restore; setup; delete flow delete; 'NA1~IE' J local Deletes a saved set of flow settings from the memory pool.
Example Deletes the quiz set of saved flow events from the memory pool.
flow deletes 'quiz' flow reset Deletes all named sets of flow settings from the memory pool. The default set of flow settings are unaffected.
flow dir; keyBuffer [,length]
Lists the keys for all the active flow events. The key inputs are returned as a sequence of 2-byte values (zero terminated if possible) into keyBcrffer. These values can be used as input for Bow info to obtain the full information about a flow event. The system variable zflowcnt holds the number of active flow events.
Example Obtain the input key values for all the active flow settings. The inputs are returned as 2-byte values in a 50-element (maximum) array called value.
define local value(50),2 define end i Z59 ~-flow dir: valueti), zflowont ~ 2 SS read active flow keys flow info: I~E~': infoBufter [,length [
Returns the flow setting parameters for a specified key input value in the given buffer.
The maximum length of information returned is 22 bytes. The optional length argument can limit the number of bytes returned. An extensive coding example using flow info is found in lesson TCSAMPLE unit i/fiow.
~arameter bvtr e(s1 values branch type 1 0= not flow event 1= jump 2= jumpop 3= dollibra lesson ~ 8 branch lesson name unit ~ 8 ~ branch unit name 1 0= current main unit only range 1 = default event for new main unit 2 = roister ( ermanent event) active 1 0 = at normal wait states 1 = complete (at end-of-unit) 2 = break (interrupt processin ) execution mode 1 3 = no change on branch -1 = to binay 0 = to source 1=tot r window 1 0 = no change on branch 1 = window close 2 = window reset base 1 -1 = set =base on branch 0 = no chance System Default Flow Settings While running your lesson, (SHIFT](FI],[F2] and [SHffT][F2) are pre-defined by the authoring systeat as:
!'low jump; 1F1: exit: break; roister SUBSTfTUTE SHEET (RULE 26) i flow jump: $F2; =editor; break; router flow jump: %f2; system; break; router Only [SHIFT][F1] is pre-defined by the student system as:
flow jump: ~bFi; =exit; break; router These flow settings may be redefined, or deleted using flow clear with the router modifier. However, be sure to provide an alternate means to exit your lessons;
otherwise a user could become stuck with no exit even to DOS.
To temporarily save, clear and restore both the active and default flow settings over or within a library call, do the following:
flow save;'currents' $$ save active flow settings flow restore; default $$ restore defaults to active flow save;'defsave' $$ save default flow settings flow clear;; default $$ delete all but router settings library routines, stuff $$ all settings but router can be changed flow restore:'defsave' $$ read back saved default settings flow save; default $$ set them back as defaults flow restore;'currents' $$ restore saved active settings System Variables zreturn The save, restore, reset and delete forms of the flow command, which use the memory pool, report on success or failure in zreturn. All other forms set zreturn to ok (-1). The major zreturn values are:
- 1 Operation successful 10 Name not found i 1 g Unable to fill memory pool request Miscellaneous zflowcnt Number of active flow settings zmaxflow Maximum number of flow settings allowed s font Selects fonts for teat display.
font [ 'LESSON;] 'FONT' [; fontNumber ~ standard [;noload ] ]
font [ 'LESSON',] 'FONTGROUP' ~; fontNumber ~ standard [;noload ] ]
font ; fontNumber font standard [; standard ]
font info; infoBufl'er [,length ]
Description A font is a named block in a lesson. It contains character designs corresponding to some or all of the ASCII character codes 0 to 255. A font group is also a named block in a lesson. It contains a list of related fonts with different text attributes.
The teat command attributes of size, bold, italic and narrow interact with fonts and font groups. For a font, the appearance of the attributes is synthesized (except for narrow). When a font group is active, the system automatically selects the member font most appropriate for the text attributes enabled at any given time.
One font or font group is always designated as the standard. The standard font is the basis for character screen coordinates, even if some other font is currently selected for text display. For example, at 5:10 specifies a screen position 5 standard character heights below the * rE3 top, and 9 character widths from the left. A font group appropriate for the current screen ..
resolution is automatically designated as the standard when an initial or screen command is executed. However, this standard may be overridden with a different font or font group, thus altering the character grid.
A font or font group can optionally be associated with a reference number.
This number alone can later be used to reselect the font.
The status command saves and restores all Font and teat parameters: the selected font or font group, the standard font, the font number table, and text attributes. A
status save;default statement is required to save these parameters over a jump branch to a unit.
Fonts and font groups are kept in the memory pool. There is no need to explicitly delete fonts from memory; when space is required for other memory pool objects, they are automatically deleted and reloaded from disk if needed again.
The system standard font groups exist in lesson TCSTDFNT. An additional set of decorative font groups is supplied in lesson TCFONTS. The Font Editor can be used to modify any of the fonts in these lessons, import fonts from other sources, or create custom fonts from scratch.
font ['LESSON',] 'FONT' Selects a specific font from the current lesson or optionally from a named lesson. The font is brought from the disk to the memory pool and remains active until replaced by another font command or a jump branch to a unit which resets to the default font.
Example 1 The initial command causes all plotting parameters to be set to their system standard defaults including the standard font for the current screen resolution. Font gothic in the current lesson is then loaded and used for the following write text. Text attributes are then changed so i WO 99/07007 PC'T/US98/15627 that the last write statement appears in a synthesized form of font gothic.
The zreturn check .,.
indicates any system errors in loading the font from the disk. A zreturn check is recommended after any font command, but is omitted in the following examples to save space.
initial write This text uses the system standard font.
font 'gothic' ig zreturn > -1 write Erzor us,zreturnu loading Gothic endif write This writing uses character designs in font Gothic.
text size; 2 text bold; on ,,Trite This writing uses a bold and double size font synthesized from font Gothic.
Example 2 Selects font bur=l8 from the decorative font library in lesson TCFONTS. This is the 48 dot high version of burlesk.
font 'tcfonts','bur48' write This text is using Buriesk character definitions.
Eacample 3 Selects the font named in the variable fontYar from the lesson named in the variable fontLib font fontLib, fontVar font ['LESSON',] 'FONTGROUP' Activates a font group and selects a font from the group based upon current teat attributes. Specific fonts can exist in a font group for all 72 combinations of the text attributes i a6a size (1 through 9), italic, bold, and narrow. The text command (along with its embedded and,.
uncover code forms) sets these attributes and therefore determines which font is selected from the group. If a font with the required attributes is not found in the group, the closest match is used, and the nonmatching attributes are synthesized if possible. Attributes that can be synthesized are size (only 2 through 4), italic, and bold. The system variables zfontret and zfontf (see System Variables later) indicate how closely the current font selection from the group matches the text attributes currently in effect.
By looking at a font statement, it is not possible to tell whether a font or font group is referenced. However, the block's type is displayed on the Block Directory page.
Eaample 1 The font group mine has 4 fonts in it specifically designed for size 1 and 2 in both normal and italic but not bold. Text attribute uncover codes in the write statements select for italic and bold. The italic comes from one of the designed fonts in the group while the bold is synthesized.
font 'mine' IS text size; 1 write This normal and italic text comes directly from specifically designed fonts but bold is synthesized.
text size: 2 write Thia size 2 normal and italic text comas directly from designed fonts while bold is synthesized starting from the size 2 normal and italic fonts.
Eaample 2 The size attribute causes the size Z font to be chosen from each of the decorative font groups.
text size: 2 i font 'tcfonts','burlesk' .~
write This writing uses the font group burlesk.
font 'tcfonts','opera' write This writing uses the font group opera.
font standard Selects the standard font or font group. This is one of the system standard fonts found in lesson TCSTDFNT, unless the standard font has been overridden as described in the following section.
Example font 'gothic' write This text is in Gothic font standard write while this is in standard.
font ['LESSON',] 'FONT' ; standard font ['LESSON',] 'FONTGROUP' ; standard The optional keyword standard on a font selection causes the named font or font group to become the new standard, overriding the system standard font group. Any subsequent font standard statements select this new standard font or font group until a jump branch.
To make the new standard font selection permanent for an entire lesson, use status save;defautt to make the selection part of the default display parameters that are restored upon a jump branch. Then, only a subsequent initial, screen, status restore;standard, or font standard;standard statement restores the system standard font group in lesson TCSTDFNT.
System variables zcharw and zcharh report the width and height of the standard font at size 1. These values are the basis for character screen coordinates.

Example Variable typeface contains the name of the font to activate; it becomes the standard font.
If the font is 32 pixels high and 32 pixels wide, then both the system variables zcharh and zcharw become 32. For screen vga,medium (480 pixels high and 640 pixels wide), the character S coordinate grid now has 15 (480/32) lines and 20 (640/32) columns. The text for the write statement would appear at the graphic coordinates of x = 128 ((S-1)*32) and y = 416 (480-(2*32)). This character grid remains in force until the standard font is replaced.
screen vga, rnedi~
font typeface; standard at 2:5 write Character position 5 on line 2.
font standard ; standard Restores the system standard font group from lesson TCSTDFNT. This might be desirable if the standard font has been overridden earlier.
The lesson TCSTDFNT contains the system standard font groups and fonts, one named for each vertical screen resolution: the names begin with the letters std followed by the vertical resolution of the screen. For example, std350 is for ega,medium screens, std480 for vga,medium screens, and std600 for vga,high screens. Whenever a font standard;standard or initial, screen, or status restore;standard statement is executed, the current screen resolution is used to select the system standard font group. Since it is a font group, the font selected from the group depends upon the current text attributes.
The system standard fonts can be changed by editing the fonts and font groups in lesson TCSTDFNT and then making a new binary to replace TCSTDFNT.BIN.

font ['LESSON',] 'FONT' fontNumber j;noload ]
font ['LESSON',]'FONTGROUP' ; fontNumber [;noload j Selects a font or font group and assigns it a unique number from 1 to 35.
Numbered fonts can be accessed by an uncover code sequence embedded in text This allows switching between fonts within a single write command, for example.
In the Source Editor, entering the sequence [CTRL][A],[F],[1] - [9] enters the uncover codes for the first 9 numbered fonts while the sequence [CTRL][A],[F],[AJ -[Z] enters the codes for the numbered fonts 10 through 35. In student mode at an arrow, a similar sequence of codes can be used for switching fonts but the default uncover code sequence starts differently:
[CTRL][U],[M],[F],[A] - [z].
Numbered font statements can be included in the +editor control block of a lesson so that text with embedded font selection sequences appears in the correct fonts during editing.
Font number assignments are saved and restored by the status command.
A single font or font group may be assigned more than one number by using multiple font commands. If this is done, any of the numbers assigned to the font can be used to select it.
However, a given number can be associated with only one font or font group at a time. The most recent assignment of a given font number overrides any earlier assignment.
The optional keyword noload is used to allow a font or fontgroup to have a font number association without actually loading the font into memory. This option can save disk read time at the start of a routine where multiple fonts need to be associated with font numbers. Later, the font will be automatically loaded as needed when referenced by its number embedded in write statements.

i Example 1 Two numbered fonts are loaded. Uncover code sequences are used to switch between fonts within the text of the write statement. (Uncover code sequences become visible when display of hidden characters is turned on in the Source Editor.) font 'gothic'; 2 font 'geneva'; 3 write This text is Geneva, ~f3 switches to Gothic, then .1f2 back to G:neva.
Example 2 In the +initial control block, the three numbered fonts are put into the default display status buffer. Any jump branch to a unit resets to these three numbered fonts so that they can be used through uncover codes in text of write, pack, etc. statements. If the font statements are also put into the +editor control biock, any text with the font uncover codes (such as the write statement of this example) would be displayed in its chosen font during editing. The optional keyword noload is used to avoid any possible startup delays.
* in the +initial control block font 'tcfonts','geneva'; 1 ; noload font 'tcfonts','poster'; 2 ; noload font 'mine'.'firework'; 3 ; noload status save; default * in units throughout the lesson write 1fl Geneva, 1f2 Poster, ~f3 Fireworks font ;fontNumber Selects a font or font group that was previously assigned a number.

i Example Two numbered fonts are loaded. Several write statements switch between using the two fonts by referencing their numbers alone.
font 'gothic'; 2 font 'gensva'; 3 write This text is Geneva then font :2 writs switches to Gothic then font ;3 write back to Geneva.
font info; infoBuffer [,length) Reads information about the selected font or font group into a buffer for the given length in bytes. If the length is not specified, the defined length of the buffer is used.
The following 256 bytes of information are available:
S stem Data X00 bytes) Bvtes Offset font lesson name _ 8 0 font block name 8 8 font group lesson name 8 16 (font lesson if font loaded) font group block name 8 24 font block if font loaded) font number (-I =standard, 1 32 0=unnumberd) font rou (-1- es, 0=no) 1 33 character width 2 34 character hei ht 2 36 baseline offset 2 38 underline offset 2 40 underline thickness 2 42 underline a 2 44 shadow x offset 2 46 shadow offset 2 48 italic an le (real) 4 50 s acin decrement (0=no, 1- 1 54 es) reserved 45 55 * rE~

i a7o ..
Descriptive Information (156 B tes Offset bytes) font name 16 100 revision number 1 116 family 1 117 subclass 1 118 st le 1 119 wei ht 2 120 oints 2 122 horizontal resolution 2 124 vertical resolution 2 126 reserved 48 128 co ri ht 80 176 Example The copyright message for the standard font is displayed.
define local $ infobuf,256 ,176 $$ skip other fields copyrt,80 $$ copyright field define end font standard font info; infobuf at 10:1 sho~aa copyrt, 80 System Variables zreturn ARer a font command, zreturn indicates the success of loading a font:
-1 Operation successful 0 Disk error {see zdoserr, zedoserr) 2 No font in group i WO 99!07007 PCT/US98115627 ".
4 File not found Font name not found File directory error - unrecoverable 1 g Unable to fill memory pool request 5 zfontret The system variable zfontret indicates how closely the current font matches the text attributes currently in effect.
zfontret for a font:
-1 Font loaded successfully 10 2 Unable to load font; standard font used 3 Unable to load standard font; charsets used zfontret for a font group (and updated when text attributes change):
-2 Exact match of attributes; some synthesis used -1 Exact match of attributes 15 0 Partial match of attributes 1 No suitable match; base font used 2 Unable to load base font; standard font used 3 Unable to load standard font; charsets used zfontf For font groups only, zfontf contains a bit field that reports on how the attributes are produced whenever a font is loaded or text attributes change causing the selection of another font in the group.
zfonff bit meaning 6 Bold matched in font group i WO 99!07007 PCTNS98/156Z7 Italic matched in font group g Size matched in font group l6 Narrow matched in font group 22 Bold synthesized 23 Italic synthesized 24 Size synthesized The attribute may not match the request but also may not be synthesized; for example, if the font group only has bolded items, and the current attributes specify non-bolded, then bits 6 and 22 will both be off Miscellaneous The following system variables are set after loading a font and are updated if appropriate when text attributes change:
zfonth Character height and width of selected font zfontw I S zcharh Character height and width of standard size 1 font zcharw (basis for the character coordinate system) zfontb Baseline offset of selected font zcharb Baseline offset of standard size 1 font C~ Ot0 Transfers execution to another unit ar to the end of unit.
goto UNIT ~ q goto SELECTOR; UNIT ~ q; UNIT ~ q ; . ..

i ..-Description Allows the logical continuation of the current unit into another unit. goto switches execution to the specified unit but does not: erase the screen, clear the do return markers, change the main unit, or alter a help sequence.
The q keyword transfers execution to the end of the unit.
The goto command is considered by many as an obsolete programming method properly replaced by structured programming.
if Begins an if structure.
if condition Description Marks the beginning of an if structure. If the condition is true, any following indented code is executed. If the condition is false, execution continues with the next non-indented elseif, else, or endif.
1 S An if structure is the main conditional structure in the TenCOR.E
language. The commands which make up an if structure are:
if elseif (optional, any number) else (optional) endif The if structure begins with an if and ends with an endif. Commands to be executed when a particular condition is true are indented immediately following the if, elseif, or else. Indenting in i TenCORE consists of a period in the first character of the command field followed by 7 spaces (one tab stop in the source code editor). The command and tag of the indented command are then typed as usual.
In any if structure, only one set of indented commands is executed. The condition is checked on each if and elseif in succession. The indented commands beneath the first if or elseif that is true are executed and then control passes to the command after the endif. if none of the conditions on if and elseif are true, the indented commands following any else are executed.
Examples Example 1 If the value of the variable score is over 75, the indented commands are executed.
if score > 75 . do goodfb . jump endless endif Example 2 elseif and else commands are used in an if structure.
if right = 0 $$ user missed all questions do verybad . jump helppg elseif right < 5 $$ user got 1 to 4 right do notgood jump quiz elaeif right < 10 $$. user got 5 to 9 right do good . jump review else $$ user got more than 9 right i , do great ..

, j,~p endless endif Example 3 An if structure is nested.

if wraag > 5 S$ user missed more than 5 write You are making too many mistakes!

pause if wrong > 10 $$ user missed more than 10 . . j~P Nit endif endif image Displays, ca ptures and manages screen images.

image keyword plot displays the specified image save captures all or part of the screen to the specified destination move transfers an image between storage areas info returns information about an image delete deletes the specified image from the memory pool reset deletes all images from the memory pool compress turns compression of image data on or off palette reads palette information from an image Description The image command is used to plot completed pictures onto the display, to capture pictures off the display or to move pictures between variables, memory pool blocks and disk storage locations (namesets, datasets, and lessons). Pictures are screen images that are: created in image blocks by the Image Editor imported into image blocks from existing bit-map images created by "paintbrush" programs or a part of a screen that is directly captured and saved by either the Image Option -after pressing System Key [F2] or executing an image save command.
image plot; from ( ;[ LOCATION] [ ;palette Plots the specified image at the same location it was saved from, unless a location is specified. In either case, the current screen location is not changed. The display mode as set by the mode command is used in plotting the image. (See mode for additional information.) if the keyword palette is specified, the palette stored with the image is used. If palette is not specified, the palette is not changed. Images plot downwards from the specified location, which ' corresponds to the upper left comer of the image.
1 S ,from keywords and syntax:
block ~ b ,'NAME' Plots an image block from the specified lesson. If only the image name is specified, the current lesson is assumed.
file ~ f [ ,record J
Plots from the attached dataset or nameset, starting at record 1 unless a starting record number is specified. In the case of a nameset, a valid name must have been previously selected with the setname command.
* rH~

i memory ~ m ,'NAME' Plots from a memory pool block. The name may be a literal in single quotes, or occur in a variable.
vars ~ v ,variable ( ,length ]
Plots from variables. The defined length of the variable is used unless a length is specified.
Examples image plot; block, 'horse';20,100 * block "horse" at location 20,100 image plot; block, 'library','horse' * block "horse" in file "library"
image plot;file * currently attached file image plot; memory,myimage * name contained in the variable myimage from mamory pool image plot; vars , picsave * image in variable "picsave"
image plot;memory,'show';l5:Ol:palette * plot using the palette stored with the image image save; destination (; [LOCATION] ; [LOCATION][ ;palette [,variable]]]
Saves the area of the screen specified by the rectangular area to destination.
If no display area is specified, the entire screen is saved. If the palette keyword is used, the current palette is stored with the image as well. If variable is given, only those colors specified in variable are i saved with the image. See palette read for the format of i°ariable. The image is saved in a sp,~cial compressed format in order to use as little storage as possible.
destii:atio~r keywords and syntax:
file ~ f ( ,record ]
Saves to the attached dataset or nameset, starting at record 1 unless a starting record number is specified. In the case of a nameset, a valid name must have been previously selected with the setname command. The number of records required to save an image can be calculated as: (bytes + 255) $idiv$ 256.
memory I m ,'NAME
Saves to a block in the memory pool. The name may be a literal in single quotes, or occur in a variable. If an image is already stored with the specified name it is replaced. Names in the memory pool created by image are independent of any names created with other commands. For instance, the memory command and the image command can both create a name in the memory pool called cat without causing a conflict. The initial command deletes all images from the memory pool.
vars ~ v ,variable [ ,length ]
Saves to variables. The defined length of the variable is used unless a length is specified.
The image may be truncated if the defined length of variable is insufficient Examples defiae local palblock (16) , 6 palslot,2 define ead i image save:file:50,20;150,80 * save in attached file image save:memory,'pic':o,0:99.99 *save in "pic", mamory pool image save:memory,'save';O,O;zxmax,zymax;palette,palblock(1),IO
* save the first ten entries of the palette image move; from; destination Copies an image between a from and a destination when neither is the screen.
Example image move:block,'abc':memory,'def' * from "abc' in current file to block "def" in memory pool block cannot be used for destination, since that would modify a running lesson source 1 S file. Also, if destination is file, then from can only be memory or vars.
image info; buffer; from ~ last [; palette]
image info;bufter; display ~ d, LOCATION [;[LOCATION] [;palette]]
Returns information about an image specified by from. The information is returned as 24 bytes in the specified buffer in the following fixed format:
1 byte: image type 0 = byte-oriented (CGA, EVGA, etc.) 1 = plane-oriented (EGA, VGA, etc.) 2 = text image 1 byte: bits per pixel (byte-oriented) or number of planes 2 bytes: bias from left of screen i WO 99/0?007 PCTNS98/15627 2 bytes: bias from top of screen Y.-2 bytes: image width 2 bytes: image height 4 bytes: number of bytes used by image block 10 bytes reserved Bias, width, and height are given in pixels for byte- and plane-oriented images, and in character positions for text images.
Adding the palette keyword causes palette information to be included in the returned length of the image.
Additional from keywords and syntax exits for image info:
display ~ d, LOCATION [ ; [ LOCATION ] [ ; palette ]]
The image is taken directly from the screen. This form can be used to determine how much space a particular image on the screen will require, before creating a file to hold the image.
last [;palette ]
1$ The last image processed by the image command.
Example define local infovar,24 type,l . bits,l . xstart,2 ystart,2 xsize,2 ysize,2 2$ . length,4 i io "..
define end image info;infovar~display,50,50;100,100 at 2:1 write Image Will require us,length~ bytes for storage pause pass= all created 'imagel',(length+255) $idiv$ 256 do zreturn;~error('created') $$ always check zreturn image save;file:50,50;100,100 image delete; 'NAME' Deletes the specified image from the memory pool.
image reset Deletes all images from the memory pool.
I S image compress; [ on ~ off ]
Toggle image compression. Compressed images occupy less memory or disk space;
non-compressed images in memory plot faster. The default is on.
image palette; from ; buffer, entries Reads image palette entries into a bui~er. The buffer must contain one or more 6-byte palette entries in the form of slot (2bytes) red ( 1 byte) green (1 byte) blue ( 1 byte) intensity (1 byte) i The value of slot must be pre-set for each palette entry before executing image palettg,r The value of each slot will determine which palette slot's information is read into that entry. For example, if the value of slot for a particular entry is 8, the information for palette slot 8 will be read into that entry. If the values of slot are not set, slot 0 will be read into all the entries. Any subset of palette entries may be read or written by setting appropriate slot values.
entries determines how many entries will be read.
Example Reads the palette infornnation for the base 15 palette entries from the image in memory block test:
define local pvar(16) ,6 . slot,2 pred,l .
. pgreen,l . pblue,l . intensty,l count ,2 define end loop count G 1, 16 *m~ust initialize slot numbers . calc slot(count) G count - 1 endloop image palette: memory, 'test':pvar(1),16 ..
Screen Compatibility To be able to display an image from one screen on another screen, they must be of the same type. There are three types of image:
~ graphics byteaoriented, such as the CGA, Hercules, MCGA, and EVGA
~ graphics plane-oriented, such as the EGA, and VGA
~ text For graphics screens, the number of bits per pixel (byte-oriented) or number of planes (plane-oriented) must also be identical. Text images are compatible among all text screen types.
The characteristics of a given image can be determined using the image info command.
The following tables list the characteristics of the graphics screens currently supported by TenCORE:
B te-oriented Screens Bits/ iYel c a,medium c a,hi h 1 hercules me a, hi h 1 me a,medium w~a Plane oriented Screens Number Of Planes as v a For example, in the byte-oriented group, the cga high, hercules, and mcga high images are compatible with each other. In the plane-oriented group, all listed screens are compatible with 1 S each other. Caution: even thoargh an image from one screen is compatible with another screen, it may look different on the other screen due to changes in aspect ratio. For example, an ega high image plotted on a vga medium screen will be the same width, but only be about 73% of the original height.

i WO 99/0?00? PCT/US98/1562?

System Variable zreturn _ 1 Operation successful 0 Disk error (see zdoserr, zedoserr) 1 No file attached Block out of range 3 Memory out of range 4 File not found 5 Image screen type doesn't match execution screen type 8 Insufficient disk records 9 No name in effect 10 Name or block not found I 1 Invalid type 16 Invalid name 17 Invalid image 1 g Unable to fill memory pool request initial Initializes the system to a standard state.
initial j nodetach ]
Description Sets the system to a standard state. It is normally used when starting a lesson, as in a +initial control block, to set all system parameters to a known state.

i The nodetach keyword prevents the currently attached file from being detached, and ,w.

presen~es any s which are in effect for shared files.
lock The initial command performs the following command initializations:

Display window reset; noplot status restore; standard blink off color white colore black colorg black disable cursor enable font font standard; standard mode write origin 0,0 rotate 0 scale 1,1 text align; baseline text bold; off status save; default palette init disable absolute text delay; 0 text direction; right i text increment; 0,0 ,..

text italic; off text margin; wrap text narrow; off text reveal; off text rotate; 0 text shadow; offwhite text size; 1 text spacing; fixed text underline; offforegnd thick off display 1 Input disable pointer disable ptrup enable area area clear; default area highlight; off uncover %ctl"u"

force no lock time clear $$ all but router Branching slow clear;default i enable break base Disk disk -1 $$ search all drives for files edisk -1 detach all nsdirwr -1 $$ always write nameset directory Judging enable arrow okword 'ok' noword 'no' General memory reset $$ all but router status reset area reset ilow reset $$ all but router perm reset image reset version $$ no version emulation Videodisc Overlay video init video unitinit, on * rE~

intcail Calls a software interrupt.
intcall number, pass, receive [ ;extended ]
number interrupt routine to call pass data passed to the interrupt routine (8 or 20 bytes) receive data returned from the interrupt routine ( 8 or 20 bytes) extended forces the use of extended registers Description Calls the interrupt specified by rrumber. In the non-extended form, the registers AX, BX, CX, and DX are set to contain the four 2-byte values from pass. Registers DS
and ES are set to point to the global or local variables segment as appropriate for the pass variable; SI and DI are set to the offset within the segment. On exit from the routine, receive contains the four 2-byte values residing in the AX,BX,CX and DX registers. zreturn contains the low byte of the FLAGS
register.
The extended keyword forces the use of the extended set of registers allocated to the 20 byte pass and receive variables in the following order:
AX,BX,CX,DX,SI,DI,BP,DS,ES,FLAGS
Addresses The following system-defined function references are sometimes useful in setting or interpreting registers used with intcall:
sysioc(global) Segment address of global variables sysloc(local) Segment address of the current unit's local variables i varloc(var) Offset address of the variable var ..-absloc(var) Absolute location of var within memory, expressed as a 4-byte offset with no segment. Corresponds to the segment:offset address as follows:
segment = abslocQ $ars$ 4 offset = abslocU $mask$ hOf absloc = ((segment $mask$ h0000~ $cls4$ 4) + (offset $mask$ h0000fl~
Example Executes interrupt h 12, which returns the memory size. The interrupt requires no input data, so the same variables are used for input and output.
define local regstrs,8 ax, 2 SSAX data bx, 2 $$8X data cx, 2 $$CX data . dx, 2 $$DX data define end * call bios interrupt h12, "memory size determine" no input * parameters, so the same variables can be used for * input and output iatcall h12, regstrs, regstrs at 5:5 write You have us, ax $imul$ 1024» bytes of memory.

System Variable zreturn contains the lower byte of the computer's internal flags register. The function reference bit(zreturn,8) can be used to test the carry (CY) bit, often set by software interrupts to indicate an error condition. See intcall online documentation for FLAGS
register definition.
s jump Branches to a new main unit.
jump UNIT [ (argument/16s) ]
jump SELECTOR; UNIT[ (argument 16s) ]; UNIT[ (argument ll6s) ];...
jumpop UNIT[ (argument /16s) ]
j umpop SELECTOR; UNIT [ (argument% 16s) ]; UNIT [ (argumenti 16s) ]; ...
Description The jump and jumpop commands branch to the specified unit making it the new main unit. Optionally, up to 16 arguments may be gassed to the new main unit. All flow branch settings are cleared (except for router settings) and restored to their defaults.
A jump branch restores all plotting parameters to their default values (see status) and erases the screen (or window) to the colore color. All pointer areas are cleared and restored to their defaults.
A jumpop (jump on-page) branch does not change plotting parameters, area settings or perform a screen erase.
The flow command with jump keywords performs similar functions. However, flow is a delayed event-driven branch while jump occurs immediately when the command is executed.
jump also allows arguments while flow does not.

i The SELECTOR form is described in the "Syntax Conventions". jump has an additio,~al q (for quit) list entry form that if selected terminates further execution of the current unit. See Example 4.
Up to 16 arguments, separated by commas, can be passed with the branch. These are evaluated with the execution of the jump and their values are passed to next unit. A receive command in the next unit is used to accept the arguments. See the receive command for further information on argument passing and the system variables zargs and zargsin that are set when passing arguments.
Examples Example 1 jump two Branches immediately to unit hvo in the current lesson. The screen is erased and all defaults are re-established.
Example 2 1$ jump rivers,uname»
Branches to the unit specified by variable name in lesson rivers.
Example 3 jumpop build (98.6, men+women, size) receive temp, total, size $$ in unit build Branches (without a screen erase) to unit b:gild in the current lesson passing as arguments:
the constant 98.6, the evaluation of the expression men+womerr, and the value in the variable size. In unit build, the receive statement accepts the passed arguments into variables. Since the screen is not erased with jumpop, unit build can add more to the existing screen display.

i Example 4 x-2: one; two; three; q This selective form of jump branches to unit orre if x-2 is negative, to nvo if 0, to three if l and quits executing any further commands in the current unit for values greater than 1.
Generic Unit Names Generic branch names are provided for common jump destinations to new main units:
=neat The unit which physically follows the current main unit in the lesson.
If none, the branch is ignored.
=back The unit which physically precedes the current main unit in the lesson.
If none, the branch is ignored.
first The first executable unit in the current lesson.
=last The last executable unit in the current lesson.
=main The current main lesson and unit as held in the system variables zmainl,zmainu.
=base The main lesson and unit from which the last base modified flow branch occurred or as set by the base command. If none, the branch is ignored. The names of the current base lesson and unit are held in the system variables zbasel,zbaseu. Typically used for returning from a supplementary lesson sequence such as help to the main line of study.
=editor The source editor (loaded with the current executing unit) if executed by the authoring system; ignored by the student executor.
=exit The lesson exit as set by the exitles command and contained in the system variables zexitl,zexitu. Student users are typically branched back to their routing system such as the TenCORE Activity Manager or DOS

i if none is present. An author testing a lesson is returned to the File ""
Directory.
=system Opens the system options window with the calculator, image capture, cursor, etc. [F2] is normally loaded with this branch as a TenCORE
system default during authoring; ignored by the student executor.
Ezampie A learner proceeds to the next main unit if the question is answered correctly on the first try. If two or three tries are required, the current main unit is redone. For any other number of tries, the base unit pointer is set and the student is branched to a helping unit called trouble. In unit trouble, a jump to =base would return the learner to the base unit for another try at the question. This code would work equally well as part of the main unit or as a subroutine called by all the questions in the lesson.
if tries = 1 jump =next $$ go on to next question elseif tries < 4 . jump main $$ re-do this unit else . base azmainu~ $$ set base to current main unit jump trouble $$ give learner extended help endif library Does a subroutine call to a binary unit.
library UNIT[ ( [ argument/16s ][ ; return/16s ] ) ]
library SELECTOR; UNIT] ( [ argument/16s ][ ; return/16s ] ) ];...

.,.
Description A special form of the do command (which see) that does a subroutine call to an external binary library regardless ofwhether the calling unit is being executed in source or binary mode.
The format is identical to do including the passing of arguments to and from the called unit. This command is used for calling completed routines or third-party TenCORE software that exits only in binary form. When a binary is made of a lesson, library and do work identically.
If the calling unit is executing in source mode (by running source code directly from the Source Code Editor), library switches to binary execution mode for the subroutine call. When returning from the called unit back to the calling unit, source mode execution is resumed. If the called library routine jumps to a new main unit, execution continues in binary mode and the "return to editing" key [F2] no longer operates.
See the operate command for a discussion of source and binary execution modes and how they can be explicitly controlled.
loadlib Loads a binary unit into the unit buffer.
loadlib UNIT
loadlib SELECTOR; UNIT ; UNIT;
Description Loads a binary unit into the unit buffer cache for execution by a subsequent library command. The unit is fetched from a binary file regardless of the type (source or binary) of the invoking unit or the status set by operate.

i loadlib can be used to check for the existence of a unit before executing it, or to force ,..
units into memory. This can be useful for speeding up following sections of code, or for allowing the diskette on which the units reside to be removed.
loadlib should be used with caution: any non-executing unit can be purged from memory if space is needed for the execution of a unit.
Example Unit cop~le is pre-loaded from the binary copy of lesson libfile. Unit copyfile copies files from one diskette to another. Once loaded, the diskette containing lesson libfile can be removed.
loadlib libfile, copyfile * force binary unit copyfile into mamory jump zreturn:: erroru SS always check zreturn at 5:5 Write Now put the diskette to copy FROM in drive A and the diskette to 1S copy To in drive 8.
Press Enter to begin the copy pause pass = $enter library libfile, copyfile $$ guaranteed to be in memory System Variable zreturn -1 Operation Successful p Disk error (see zdoserr, zedoserr) 4 Lesson not found 10 Unit not found 11 Invalid type i 16 Invalid name ..-21 Conflict with another user's lock loadu Loads a unit into the unit buffer.
loadu UMT
loadu SELECTOR; UNIT ; UNIT; ...
Description Loads the specified unit from disk to the unit buffer cache without executing it. loadu can be used to load one or more units in advance to avoid later disk access delays, to check if a unit exists, or to load a unit from a diskette that is to be removed.
Example Unit copyfile is pre-loaded. Unit copyfrle copies files from one diskette to another. Once loaded, the diskette containing the routine can be removed.
loadu copyfile $$ force unit copyfile into memory jump zraturn;; erroru $$ always check zreturn at 5:5 write Now put the disk to copy FROM in drive A and the disk to copy TO is drive B.
2~ Prssa Enter to begin the copy.
pause pass = renter jump copyfile $$ guaranteed to be in memory *rB

i System Variable zreturn _ 1 Operation Successful 0 Disk error (see zdoserr, zedoserr) 4 Lesson not found Unit not found 11 Invalid type 16 Invalid name 21 Conflict with another user's lock 10 IOOp Starts a loop structure.
loop [CONDITION]
loop counter G start, end [ ,increment ]
counter variable to serve as the index counter start starting value for counter end ending value for counter increment increment (decrement)for the index counter Description Begins a loop structure ended by endloop used to repeat a series of commands for a specified number of times or while a condition is true. A loop structure can contain reloop and outloop commands (which see) at the same level of indentation. All other commands must be indented. Loops may be nested within each other, but the range of the inner loop must be whelly within the range of the outer loop.
The assignment arrow (G) distinguishes an ITERATIVE loop from a WHB.E loop.
loop [ CONDITION ]
The code within the WHHII"E loop structure is executed for as long as the CONDITION is true. If no tag is given, repetition is continuous unless an exit is provided via outloop, jump, etc.
If a condition is present, its value is tested each time execution returns to the loop command. If the condition is true, a new iteration is begun; if false, the loop exits.
Example Plots a line ofX's on the screen using a VV~iILE loop.
at 5:1 loop zapace < 80 $$ while zspace is less than 80 ~ write X
endloop loop counter G start, end ( ,increment ]
An ITERATIVE loop repeats for the number of times indicated by the controlling arguments. counter is assigned the value of start. Each time execution returns to the start of the loop, increment is added to counter. If increment is omitted, the default value is 1. If increment is a negative, the value of counter will decrease. If cozrnter has passed the value of end (in whatever direction the loop is counting), the loop terminates.
Eaampte 1 loap index G 1,10 $$ loop from 1 to 10 ~ at index:4 ~ write index is as,index»
endloop 'i DEMANDES OU BREVETS VOLUMINEUX
LA PRESENTE PARTIE DE CETTE DEMANDE OU CE BREVET
COMPREND PLUS D'UN TOME.
CECI EST LE TOME ~ DE o2-NOTE: ~ Pour les tomes additionels, veuillez contacter le Bureau canadien des brevets THiS SECTION OF THE APPLICATION/PATENT CONTAINS MORE
THAN ONE VOLUME
. THIS IS VOLUME O!=
NOTE: For additional volumes please contact the Canadian Patent Office

Claims (36)

WHAT IS CLAIMED IS:
1. A method for optimally controlling storage and transfer of computer programs between computers on a network to facilitate interactive program usage, comprising:
storing an applications program in a nonvolatile memory of a first computer, said applications program being stored as a plurality of individual and independent machine-executable code modules;

in response to a request from a second computer transmitted over a network link, retrieving a selected one of said machine-executable code modules and only said selected one of said machine-executable code modules from said memory; and transmitting said selected one of said machine-executable code modules over said network link to said second computer.
2. The method defined in claim 1 wherein said first computer is a server computer on a network, said second computer being a secondary server on said network, further comprising, in response to a user request directed to said first computer, forwarding said user request from said first computer to said second computer to initiate processing of said user request by said second computer, said selected one of said machine-executable code modules being required by said second computer to process said user request.
3. The method defined in claim 2, further comprising:

storing, in a memory of said first computer, a list of secondary servers on said network, said list including response times for the respective secondary servers;

periodically updating said response times, said updating including (a) sending echo packets from said first computer to said secondary servers and (b) measuring, at said first computer, delays between the sending of said echo packets and a receiving of responses to said echo packets from the respective secondary servers; and selecting said second computer from among said secondary servers as the secondary server having the shortest response time.
4. The method defined in claim 1, further comprising:
storing a list of user authentification codes in said memory;
upon receiving said request from said second computer, comparing a user authentification code in said request with said list of user authentification codes in said memory;

proceeding with the retrieving and transmitting of said selected one of said machine-executable code modules only if the user authentification code in said request matches a user authentification code in said list.
5. The method defined in claim 4 wherein said request from said second computer is contained in an encryption packet, further comprising decrypting said encryption packet prior to the comparing of said user authentification code in said request with said list of user authentification codes in said memory.
6. The method defined in claim 1 wherein said request from said second computer is a second request directed to said first computer from said second computer, further comprising:
receiving a first request directed to said first computer from said second computer via said network link, said first request asking for transmission of a first version of a particular code module included in said machine-executable code modules;
transmitting, from said first computer to said second computer via said network link, a signal indicating that a more recent version of said particular code module is available, said selected one of said machine-executable code modules being said more recent version of said particular code module.
7. The method defined in claim 1 wherein said machine-executable code modules are written in a user-friendly programming code, further comprising translating said selected one of said code module at said second computer from said programming code into machine code directly utilizable by said second computer.
8. A method for optimally controlling storage and transfer of computer programs between computers on a network to facilitate interactive program usage, comprising:
storing a portion of an applications program in a first computer, said applications program comprising a plurality of individual and independent machine-executable code modules, only some of said machine-executable code modules being stored in said first computer;
executing at least one of said machine-executable code modules on said first computer;
transmitting, to a second computer via a network link, a request for a further machine-executable code module of said applications program;
receiving said further machine-executable code module at said first computer from said second computer over said network link; and executing said further machine-executable code module on said first computer.
9. The method defined in claim 8, further comprising:
sending a request from the first computer to a further computer for a list of servers on said network;
after transmission of said list of servers from said further computer to said first computer, determining response times for said servers by (a) sending echo packets from said first computer to said servers and (b) measuring, at said first computer, delays between the sending of said echo packets and a receiving of responses to said echo packets from the respective servers; and selecting said second computer from among said servers as the server having the shortest response time, the transmitting of said request for said further machine-executable code module being executed after the selecting of said second computer.
10. The method defined in claim 8 wherein said request from said first computer is a second request directed to said second computer from said first computer, further comprising transmitting a first request from said first computer to said second computer via said network, said first request being for a first version of a particular machine-executable code module of said applications program, said second request being transmitted in response to a signal from said second computer indicating that a more recent version of said particular machine-executable code module is available, said second request being for said more recent version of said particular machine-executable code module.
11. The method defined in claim 8 wherein said second computer stores at least some of said machine-executable code modules of said applications program, said second computer executing at least one of said machine-executable code modules in response to the execution of a machine-executable code module by said first computer, whereby said first computer and said second computer engage in interactive processing via said network.
12. The method defined in claim 8 wherein said machine-executable code modules are written in a user-friendly programming code, further comprising translating said selected one of said code module at said second computer from said programming code into machine code utilizable by said second computer.
13. The method defined in claim 8 wherein said machine-executable code modules each incorporate an author identification, further comprising, in response to an instruction received by said first computer over said network and prior to executing said one of said machine-executable code modules on said first computer, determining whether the particular author identification incorporated in said one of said machine-executable code modules is an allowed identification and proceeding with the executing of said one of said machine-executable code modules only if said particular author identification is an allowable identification.
14. The method defined in claim 8 wherein the storing of said portion of said applications program in said first computer includes caching said code modules in a nonvolatile memory of said first computer.
15. The method defined in claim 8, further comprising transmitting a request from said first computer to said second computer for a machine-executable code module during an idle time on said first computer.
16. A computing system comprising:
digital processing circuitry;
a nonvolatile memory storing general operations programming and an applications program, said applications program including a plurality of individual and independent machine-executable code modules, said memory being connected to said processing circuitry to enable access to said memory by said processing circuitry;
a communications link for communicating data and programs over a network to a remote computer; and a code module exchange means operatively connected to said memory and to said communications link for retrieving a single code module from among said machine-executable code modules and transferring said single code module to said remote computer in response to a request for said single code module from said remote computer.
17. The computing system defined in claim 16 wherein said computing system is a server computer on said network.
18. The computing system define in claim 17 wherein said memory contains a list of secondary servers on said network, said list including response times for the respective secondary servers, further comprising:
detection means for detecting an overload condition of the computing system;
and server selection means operatively connected to said detection means, said memory and said communications link for determining which of said secondary servers has a shortest response time and for shunting an incoming user request to the secondary server with the shortest response time when said overload condition exists at a time of arrival of said user request.
19. The computing system defined in claim 18 wherein the secondary server to which said user request is shunted is said remote computer, said single code module being required for enabling said remote computer to process the user request.
20. The computing system defined in claim 18, further comprising updating means operatively connected to said memory and said communications link for (I) periodically sending echo packets to said secondary servers, (II) measuring delays between the sending of said echo packets and a receiving of responses to said echo packets from the respective secondary servers, and (III) updating the response times in said list in accordance with the measured delays.
21. The computing system defined in claim 17 wherein said network is the Internet.
22. The computing system defined in claim 16 wherein said memory contains a stored list of user authentification codes, further comprising comparison means for comparing a user authentification code in said request with said list of user authentification codes in said memory and for preventing code-module retrieval and transmission in the event that the user authentification code in said request fails to correspond to any user authentification code in said list.
23. The computing system defined in claim 22 wherein said request from said remote computer is contained in an encryption packet, further comprising means connected to said communications link and said comparison means for decrypting said encryption packet prior to the comparing of said user authentification code in said request with said list of user authentification codes in said memory.
24. The computing system defined in claim 16, further comprising means for determining whether a requested code module has an updated version and for responding to said request with an invitation to said remote computer to accept the updated version of the requested code module.
25. The computing system defined in claim 1 wherein said machine-executable code modules are written in a user-friendly programming code, further comprising an interpreter for translating said programming code into machine code directly utilizable by said processing circuitry.
26. A computing system comprising:
a first computer;
a second computer remotely located relative to said first computer;
communications links at said first computer and said second computer for tying said first computer and said second computer to one another over a network, said first computer including a nonvolatile memory storing at least a portion of an applications program, said applications program including a plurality of individual and independent machine-executable code modules, each of the computers being provided with code module exchange means for cooperating with the code module exchange means of the other computer to transfer a single code module from among said machine-executable code modules from said first computer to said second computer.
27. The computing system defined in claim 26 wherein said first computer is a primary server and said second computer is a secondary server on said network, said first computer including detection means for detecting an overload condition of said first computer, said first computer further including shunting means operatively connected to said detection means and the communications link at said first computer for shunting an incoming user request to said second computer when said overload condition exists at a time of arrival of said user request.
28. The computing system defined in claim 27 wherein said first computer further includes updating means operatively connected to said memory and said communications link for (I) periodically sending echo packets to a plurality of secondary servers on said network, (II) measuring delays between the sending of said echo packets and a receiving of responses to said echo packets from the respective secondary servers, and (III) updating the response times in a list in said memory in accordance with the measured delays.
29. The computing system defined in claim 26 wherein said first computer is a server computer and said second computer is a user computer.
30. A computing system comprising:
a memory storing a portion of an applications program, said applications program comprising a plurality of individual and independent machine-executable code modules, only some of said machine-executable code modules being stored in said memory;

digital processing circuitry operatively connected to said memory for executing at least one of said machine-executable code modules;
a communications link for communicating data and programs over a network to a remote computer; and a code module exchange means operatively connected to said memory and to said communications link for communicating with a remote computer via a network link to obtain from said remote computer a further machine-executable code module of said applications program, said digital processing circuitry being operatively tied to said code module exchange means for executing said further machine-executable code module upon reception thereof from said remote computer.
31. The computing system defined in claim 30 wherein said computing system is a user computer on said network and said remote computer is a server computer.
32. The computing system defined in claim 31 wherein said memory contains a list of servers on said network, said list including response times for the respective servers, further comprising server selection means operatively connected to said memory and said code module exchange means for instructing said code module exchange means to communicate with a server selected from among said secondary servers as having a shortest response time, said remote computer being the selected server.
33. The computing system defined in claim 32, further comprising updating means operatively connected to said memory and said communications link for (I) periodically sending echo packets to said servers, (II) measuring delays between the sending of said echo packets and receiving of responses to said echo packets from the respective servers, and (III) updating the response times in said list in accordance with the measured delays.
34. The computing system defined in claim 30, further comprising a software modified circuit operatively connected to said code module exchange means for encrypting communications transmitted to said remote computer and for decrypting communications received from said remote computer.
35. The computing system defined in claim 30 wherein said machine-executable code modules are written in a user-friendly programming code, further comprising an interpreter for translating said programming code into machine code directly utilizable by said processing circuitry.
36. A method for distributing processing among computers on a computer network, comprising:
storing an applications program in a nonvolatile memory of a first computer, said applications program being stored as a plurality of individual and independent machine-executable code modules;
executing portions of said applications program on said first computer;
transmitting a request over a network link from said first computer to a second computer not running at full capacity, said request being to take over the work load of said first computer;
in response to a request from said second computer, selectively transmitting machine-executable code modules of said applications program from said first computer to said second computer over said network link, the transmitted code modules being less than all of the code modules of said applications program; and operating said second computer to follow programming instructions in the transmitted code modules to assist said first computer in executing its work load.
CA002297069A 1997-07-29 1998-07-28 Computerized system and associated method for optimally controlling storage and transfer of computer programs on a computer network Expired - Fee Related CA2297069C (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US08/902,591 1997-07-29
US08/902,591 US6065046A (en) 1997-07-29 1997-07-29 Computerized system and associated method of optimally controlled storage and transfer of computer programs on a computer network
PCT/US1998/015627 WO1999007007A2 (en) 1997-07-29 1998-07-28 Computerized system and associated method for optimally controlling storage and transfer of computer programs on a computer network

Publications (2)

Publication Number Publication Date
CA2297069A1 CA2297069A1 (en) 1999-02-11
CA2297069C true CA2297069C (en) 2002-05-07

Family

ID=25416079

Family Applications (1)

Application Number Title Priority Date Filing Date
CA002297069A Expired - Fee Related CA2297069C (en) 1997-07-29 1998-07-28 Computerized system and associated method for optimally controlling storage and transfer of computer programs on a computer network

Country Status (12)

Country Link
US (1) US6065046A (en)
EP (1) EP1010193A4 (en)
JP (2) JP2001512272A (en)
KR (1) KR100345460B1 (en)
CN (1) CN1232913C (en)
AU (1) AU724513B2 (en)
BR (1) BR9811593A (en)
CA (1) CA2297069C (en)
IL (1) IL134141A (en)
NZ (1) NZ502477A (en)
RU (1) RU2226711C2 (en)
WO (1) WO1999007007A2 (en)

Families Citing this family (120)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6760746B1 (en) * 1999-09-01 2004-07-06 Eric Schneider Method, product, and apparatus for processing a data request
JP3901806B2 (en) * 1997-09-25 2007-04-04 富士通株式会社 Information management system and secondary server
SE513248C2 (en) * 1997-12-19 2000-08-07 Ericsson Telefon Ab L M Method for managing data structures
US6493870B1 (en) * 1998-03-20 2002-12-10 Sun Microsystems, Inc. Methods and apparatus for packaging a program for remote execution
KR100290862B1 (en) * 1998-04-02 2001-07-12 구자홍 Slot Structure for Transmitting Packet Data and Method of Transmitting Packet Comprising the Slots in Mobile Communication Systems
US7197570B2 (en) * 1998-07-22 2007-03-27 Appstream Inc. System and method to send predicted application streamlets to a client device
US20010044850A1 (en) * 1998-07-22 2001-11-22 Uri Raz Method and apparatus for determining the order of streaming modules
US6311221B1 (en) * 1998-07-22 2001-10-30 Appstream Inc. Streaming modules
US6279030B1 (en) * 1998-11-12 2001-08-21 International Business Machines Corporation Dynamic JAVA™ class selection and download based on changeable attributes
US9141717B2 (en) 1999-03-22 2015-09-22 Esdr Network Solutions Llc Methods, systems, products, and devices for processing DNS friendly identifiers
US7162699B1 (en) 1999-04-02 2007-01-09 Massachusetts Institute Of Technology Mechanisms and artifacts to manage heterogeneous platform interfaces in a collaboration system
US6834343B1 (en) * 1999-05-27 2004-12-21 Microsoft Corporation Method for watermarking computer programs
US6446218B1 (en) 1999-06-30 2002-09-03 B-Hub, Inc. Techniques for maintaining fault tolerance for software programs in a clustered computer system
US6324692B1 (en) * 1999-07-28 2001-11-27 Data General Corporation Upgrade of a program
US6944586B1 (en) * 1999-11-09 2005-09-13 Interactive Drama, Inc. Interactive simulated dialogue system and method for a computer network
US6658449B1 (en) * 2000-02-17 2003-12-02 International Business Machines Corporation Apparatus and method for periodic load balancing in a multiple run queue system
DE60010853T2 (en) * 2000-03-10 2005-07-14 Alcatel Method and device for data backup
US20010039497A1 (en) * 2000-03-30 2001-11-08 Hubbard Edward A. System and method for monitizing network connected user bases utilizing distributed processing systems
US7092985B2 (en) * 2000-03-30 2006-08-15 United Devices, Inc. Method of managing workloads and associated distributed processing system
US8010703B2 (en) * 2000-03-30 2011-08-30 Prashtama Wireless Llc Data conversion services and associated distributed processing system
US20090216641A1 (en) 2000-03-30 2009-08-27 Niration Network Group, L.L.C. Methods and Systems for Indexing Content
US20040103139A1 (en) * 2000-03-30 2004-05-27 United Devices, Inc. Distributed processing system having sensor based data collection and associated method
USRE42153E1 (en) 2000-03-30 2011-02-15 Hubbard Edward A Dynamic coordination and control of network connected devices for large-scale network site testing and associated architectures
US20090222508A1 (en) * 2000-03-30 2009-09-03 Hubbard Edward A Network Site Testing
US6963897B1 (en) * 2000-03-30 2005-11-08 United Devices, Inc. Customer services and advertising based upon device attributes and associated distributed processing system
US8234203B1 (en) 2000-05-12 2012-07-31 Adventive, Inc. E-commerce system including online automatable inventory monitor and control system
US6978378B1 (en) * 2000-05-12 2005-12-20 Bluetie, Inc. Secure file transfer system
JP3511978B2 (en) 2000-05-18 2004-03-29 日本電気株式会社 Router with priority control function and machine-readable recording medium recording program
US6981260B2 (en) * 2000-05-25 2005-12-27 International Business Machines Corporation Apparatus for minimizing lock contention in a multiple processor system with multiple run queues when determining the threads priorities
JP4033619B2 (en) * 2000-05-26 2008-01-16 シャープ株式会社 Server device
US6633876B1 (en) * 2000-06-07 2003-10-14 Sun Microsystems, Inc. Analyzing post-mortem information on a remote computer system using a downloadable code module
AU6378201A (en) * 2000-06-07 2001-12-17 Netbloom A/S A method and a system for providing information from a server to a client
US7089301B1 (en) * 2000-08-11 2006-08-08 Napster, Inc. System and method for searching peer-to-peer computer networks by selecting a computer based on at least a number of files shared by the computer
US7822655B1 (en) * 2000-08-22 2010-10-26 i-Deal, LLC Method, apparatus and article-of-manufacture for managing and supporting initial public offering and other financial issues
EP1330807A2 (en) * 2000-09-21 2003-07-30 Michael B. Cantor Method for non-verbal assessment of human competence
US20020087717A1 (en) * 2000-09-26 2002-07-04 Itzik Artzi Network streaming of multi-application program code
US6876995B1 (en) 2000-10-04 2005-04-05 Microsoft Corporation Web store events
US6629103B1 (en) * 2000-11-02 2003-09-30 Oridus, Inc. Method for securely providing a text file for execution
US7254232B2 (en) * 2001-02-14 2007-08-07 Copytele, Inc. Method and system for selecting encryption keys from a plurality of encryption keys
US7219122B1 (en) 2001-04-23 2007-05-15 Massachusetts Institute Of Technology Software service handoff mechanism with a performance reliability improvement mechanism (PRIM) for a collaborative client-server system
US9900286B2 (en) 2001-04-26 2018-02-20 Nokia Technologies Oy Device classification for media delivery
FR2824929B1 (en) * 2001-05-18 2003-08-08 Gemplus Card Int APPLICATION DEPLOYMENT FROM A CHIP CARD
US7409420B2 (en) * 2001-07-16 2008-08-05 Bea Systems, Inc. Method and apparatus for session replication and failover
US7571215B2 (en) * 2001-07-16 2009-08-04 Bea Systems, Inc. Data replication protocol
US7702791B2 (en) * 2001-07-16 2010-04-20 Bea Systems, Inc. Hardware load-balancing apparatus for session replication
US20030023898A1 (en) * 2001-07-16 2003-01-30 Jacobs Dean Bernard Layered architecture for data replication
US6918013B2 (en) * 2001-07-16 2005-07-12 Bea Systems, Inc. System and method for flushing bean cache
US6986148B2 (en) * 2001-07-17 2006-01-10 Appforge, Inc. Methods and systems for providing platform-independent shared software components for mobile devices
US20030028583A1 (en) * 2001-07-31 2003-02-06 International Business Machines Corporation Method and apparatus for providing dynamic workload transition during workload simulation on e-business application server
US20030046230A1 (en) * 2001-08-30 2003-03-06 Jacobs Dean Bernard Method for maintaining account consistency
US7028030B2 (en) * 2001-08-30 2006-04-11 Bea Systems, Inc. Cluster caching with concurrency checking
US7113980B2 (en) * 2001-09-06 2006-09-26 Bea Systems, Inc. Exactly once JMS communication
EP1428356B1 (en) * 2001-09-07 2007-04-25 Telefonaktiebolaget LM Ericsson (publ) Method and arrangements to achieve a dynamic resource distribution policy in packet based communication networks
US7092868B2 (en) * 2001-10-30 2006-08-15 International Business Machines Corporation Annealing harvest event testcase collection within a batch simulation farm
US7143019B2 (en) * 2001-10-30 2006-11-28 International Business Machines Corporation Maintaining data integrity within a distributed simulation environment
US7027971B2 (en) * 2001-11-30 2006-04-11 International Business Machines Corporation Centralized disablement of instrumentation events within a batch simulation farm network
US7143018B2 (en) * 2001-11-30 2006-11-28 International Business Machines Corporation Non-redundant collection of harvest events within a batch simulation farm network
US7359847B2 (en) * 2001-11-30 2008-04-15 International Business Machines Corporation Tracking converage results in a batch simulation farm network
US7085703B2 (en) * 2001-11-30 2006-08-01 International Business Machines Corporation Count data access in a distributed simulation environment
EP1318451B1 (en) * 2001-12-10 2004-10-06 Aladdin Knowledge Systems GmbH&amp; Co. KG Method to execute a program on a computer
EP1324217A1 (en) * 2001-12-18 2003-07-02 Hewlett-Packard Company, A Delaware Corporation Process and cache system for providing an electronic service through a telecommunication network
US6978278B2 (en) * 2002-01-18 2005-12-20 Bea Systems, Inc. System and method for heterogeneous caching
US6898587B2 (en) * 2002-01-18 2005-05-24 Bea Systems, Inc. System and method for performing commutative operations in data access systems
US7020684B2 (en) * 2002-01-18 2006-03-28 Bea Systems, Inc. System and method for optimistic caching
US7403996B2 (en) 2002-02-21 2008-07-22 Bea Systems, Inc. Systems and methods for migratable services
WO2003073311A1 (en) * 2002-02-21 2003-09-04 Bea Systems, Inc. System and method for message driven bean service migration
US7152181B2 (en) * 2002-02-22 2006-12-19 Bea Systems, Inc. Method for highly available transaction recovery for transaction processing systems
US7178050B2 (en) * 2002-02-22 2007-02-13 Bea Systems, Inc. System for highly available transaction recovery for transaction processing systems
US8005978B1 (en) * 2002-03-01 2011-08-23 Cisco Technology, Inc. Method to optimize the load balancing of parallel coprocessors
US6988139B1 (en) * 2002-04-26 2006-01-17 Microsoft Corporation Distributed computing of a job corresponding to a plurality of predefined tasks
JP2004005189A (en) * 2002-05-31 2004-01-08 Ricoh Co Ltd Document management system and document management method
US20040030801A1 (en) * 2002-06-14 2004-02-12 Moran Timothy L. Method and system for a client to invoke a named service
CA2421825C (en) * 2002-09-20 2012-07-10 Mks Inc. Version control system for software development
US7240096B1 (en) * 2002-09-30 2007-07-03 Bell South Intellectual Property Corp. System and method for providing service technicians access to dispatch information
JP3654360B2 (en) * 2002-12-02 2005-06-02 ソニー株式会社 Control system and method, information processing apparatus and method, information processing terminal and method, recording medium, and program
WO2004070568A2 (en) 2003-01-31 2004-08-19 Viair, Inc. Asynchronous real-time retrieval of data
US7536674B2 (en) * 2003-08-13 2009-05-19 Intel Corporation Method and system for configuring network processing software to exploit packet flow data locality
US8037515B2 (en) 2003-10-29 2011-10-11 Qualcomm Incorporated Methods and apparatus for providing application credentials
US7765543B1 (en) * 2003-12-17 2010-07-27 Vmware, Inc. Selective descheduling of idling guests running on a host computer system
KR100657065B1 (en) * 2004-01-29 2006-12-13 삼성전자주식회사 Device and method for character processing in wireless terminal
US7818416B2 (en) * 2004-02-27 2010-10-19 Teamon Systems, Inc. Communications system and method for accessing a server and preventing access blocking and minimizing network traffic
US7559058B2 (en) 2004-05-11 2009-07-07 Microsoft Corporation Efficient patching
US8539469B2 (en) 2004-05-11 2013-09-17 Microsoft Corporation Efficient patching
US7890946B2 (en) 2004-05-11 2011-02-15 Microsoft Corporation Efficient patching
US9400875B1 (en) 2005-02-11 2016-07-26 Nokia Corporation Content routing with rights management
US7657737B2 (en) * 2005-02-28 2010-02-02 International Business Machines Corporation Method for mapping an encrypted https network packet to a specific url name and other data without decryption outside of a secure web server
JP4110557B2 (en) * 2005-06-21 2008-07-02 三菱電機株式会社 Inspection apparatus and programming system provided with program execution system
US7865583B2 (en) * 2006-03-31 2011-01-04 The Invention Science Fund I, Llc Aggregating network activity using software provenance data
US8260924B2 (en) 2006-05-03 2012-09-04 Bluetie, Inc. User load balancing systems and methods thereof
US8056082B2 (en) 2006-05-31 2011-11-08 Bluetie, Inc. Capacity management and predictive planning systems based on trended rate change of monitored factors and methods thereof
US9767460B2 (en) 2006-09-18 2017-09-19 Adventive, Inc. Methods for integrating revenue generating features within a software application and systems thereof
US20080091726A1 (en) * 2006-10-16 2008-04-17 Bluetie, Inc. Methods for scheduling and completing reservations within an application and systems thereof
US10430845B2 (en) * 2006-10-23 2019-10-01 Adventive, Inc. Systems and methods for automated purchase requests
US20080098000A1 (en) * 2006-10-23 2008-04-24 Blue Tie, Inc. System and method for storing user data in a centralized database and intelligently reducing data entry
US20080097815A1 (en) * 2006-10-23 2008-04-24 Bluetie, Inc. Methods for employing temporary time zones and predictive locations and systems thereof
US20080120570A1 (en) * 2006-11-22 2008-05-22 Bluetie, Inc. Methods for managing windows within an internet environment and systems thereof
US8301776B2 (en) * 2007-11-19 2012-10-30 Arris Solutions, Inc. Switched stream server architecture
US9489177B2 (en) * 2008-02-25 2016-11-08 Adventive, Inc. Methods for integrating and managing one or more features in an application and systems thereof
KR20090098500A (en) * 2008-03-14 2009-09-17 삼성전자주식회사 Apparatus and method for checking a virtual machine for idleness, and computer readable recording medium to perform the method
JP5468620B2 (en) * 2008-12-18 2014-04-09 コピウン,インク. Method and apparatus for content-aware data partitioning and data deduplication
US8924534B2 (en) * 2009-10-27 2014-12-30 Vmware, Inc. Resource optimization and monitoring in virtualized infrastructure
EP2545472B1 (en) * 2010-03-12 2020-05-06 BlackBerry Limited Distributed catalog, data store, and indexing
CN102985911B (en) 2010-03-16 2016-07-06 科派恩股份有限公司 Telescopic in height and distributed data de-duplication
WO2012027472A2 (en) 2010-08-24 2012-03-01 Copiun, Inc. Constant access gateway and de-duplicated data cache server
CN102566862B (en) * 2010-12-21 2014-08-27 汉王科技股份有限公司 Method and device for erasing geometric figures in interactive electronic whiteboard
JP5655934B2 (en) * 2011-03-22 2015-01-21 富士通株式会社 Parallel computer, communication control apparatus, and communication control method
JP6171386B2 (en) * 2013-02-15 2017-08-02 オムロン株式会社 Controller, information processing apparatus and program
JP2015032958A (en) * 2013-08-01 2015-02-16 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Identification device, identification method and program
KR101498700B1 (en) * 2013-09-23 2015-03-06 주식회사 플로우시스 Performance testing device of storage on vdi environment
JP6289882B2 (en) * 2013-11-26 2018-03-07 京セラ株式会社 Portable terminal device, download suppression method, and program
US9854053B1 (en) 2014-03-24 2017-12-26 Amazon Technologies, Inc. Providing faster data access using multiple caching servers
CN104363300B (en) * 2014-11-26 2018-06-05 浙江宇视科技有限公司 Task distribution formula dispatching device is calculated in a kind of server cluster
RU2609076C2 (en) * 2015-03-16 2017-01-30 Рамиль Ильдарович Хантимиров Method and system for smart control over distribution of resources in cloud computing environments
EP3418887A1 (en) * 2017-06-19 2018-12-26 Clarion Co., Ltd. Electronic device and program updating method
CN107786544B (en) * 2017-09-29 2018-08-17 贵州白山云科技有限公司 A kind of the task status processing method and system of message
CN109968359A (en) * 2019-03-28 2019-07-05 台州九牛慧联机器人技术有限公司 A kind of industrial robot control system
US11063882B2 (en) * 2019-08-07 2021-07-13 International Business Machines Corporation Resource allocation for data integration
CN112328510B (en) * 2020-10-29 2022-11-29 上海兆芯集成电路有限公司 Advanced host controller and control method thereof
DE102022001652A1 (en) 2022-05-10 2022-08-25 Mercedes-Benz Group AG Method for providing a vehicle-based server and a vehicle
CN115185526B (en) * 2022-05-27 2023-10-10 韩济澎 Compiling system and method for programming language capable of reverse reasoning

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4558413A (en) * 1983-11-21 1985-12-10 Xerox Corporation Software version management system
US4954941A (en) * 1988-08-31 1990-09-04 Bell Communications Research, Inc. Method and apparatus for program updating
US5341477A (en) * 1989-02-24 1994-08-23 Digital Equipment Corporation Broker for computer network server selection
KR920701894A (en) * 1989-04-28 1992-08-12 브루스 마르쿠스 Remote control device of computer software and its protection method
CA2053261A1 (en) * 1989-04-28 1990-10-29 Gary D. Hornbuckle Method and apparatus for remotely controlling and monitoring the use of computer software
US5473772A (en) * 1991-04-02 1995-12-05 International Business Machines Corporation Automatic update of static and dynamic files at a remote network node in response to calls issued by or for application programs
CA2048306A1 (en) * 1990-10-02 1992-04-03 Steven P. Miller Distributed configuration profile for computing system
US5426427A (en) * 1991-04-04 1995-06-20 Compuserve Incorporated Data transmission routing system
AU3944793A (en) * 1992-03-31 1993-11-08 Aggregate Computing, Inc. An integrated remote execution system for a heterogenous computer network environment
US5329619A (en) * 1992-10-30 1994-07-12 Software Ag Cooperative processing interface and communication broker for heterogeneous computing environments
US5544320A (en) * 1993-01-08 1996-08-06 Konrad; Allan M. Remote information service access system based on a client-server-service model
US5459837A (en) * 1993-04-21 1995-10-17 Digital Equipment Corporation System to facilitate efficient utilization of network resources in a computer network
CA2137488C (en) * 1994-02-18 1998-09-29 Richard I. Baum Coexecuting method and means for performing parallel processing in conventional types of data processing systems
US5732273A (en) * 1995-08-11 1998-03-24 Digital Equipment Corporation System for monitoring compute system performance
US5475813A (en) * 1994-07-18 1995-12-12 International Business Machines Corporation Routing transactions in the presence of failing servers
US5630066A (en) * 1994-12-20 1997-05-13 Sun Microsystems, Inc. System and method for locating object view and platform independent object
US5819020A (en) * 1995-10-16 1998-10-06 Network Specialists, Inc. Real time backup system
US5680461A (en) * 1995-10-26 1997-10-21 Sun Microsystems, Inc. Secure network protocol system and method
US5692047A (en) * 1995-12-08 1997-11-25 Sun Microsystems, Inc. System and method for executing verifiable programs with facility for using non-verifiable programs from trusted sources
US5708709A (en) * 1995-12-08 1998-01-13 Sun Microsystems, Inc. System and method for managing try-and-buy usage of application programs
US5828847A (en) * 1996-04-19 1998-10-27 Storage Technology Corporation Dynamic server switching for maximum server availability and load balancing
US5727950A (en) * 1996-05-22 1998-03-17 Netsage Corporation Agent based instruction system and method
US5774660A (en) * 1996-08-05 1998-06-30 Resonate, Inc. World-wide-web server with delayed resource-binding for resource-based load balancing on a distributed resource multi-node network

Also Published As

Publication number Publication date
CA2297069A1 (en) 1999-02-11
NZ502477A (en) 2002-07-26
KR100345460B1 (en) 2002-07-26
KR20010022458A (en) 2001-03-15
EP1010193A4 (en) 2004-09-01
CN1232913C (en) 2005-12-21
JP2001512272A (en) 2001-08-21
BR9811593A (en) 2002-01-22
US6065046A (en) 2000-05-16
IL134141A0 (en) 2001-04-30
AU724513B2 (en) 2000-09-21
JP2009009584A (en) 2009-01-15
IL134141A (en) 2004-06-20
EP1010193A2 (en) 2000-06-21
AU8667198A (en) 1999-02-22
RU2226711C2 (en) 2004-04-10
WO1999007007A3 (en) 1999-05-14
WO1999007007A2 (en) 1999-02-11
CN1315018A (en) 2001-09-26

Similar Documents

Publication Publication Date Title
CA2297069C (en) Computerized system and associated method for optimally controlling storage and transfer of computer programs on a computer network
Cornell Core Java
CA2298582C (en) Distributed computing architecture
Bailey Maximum rpm
Horstmann et al. Core Java: Advanced Features
KR100623245B1 (en) Automatic configuration generation
US8201187B2 (en) Object monitoring system in shared object space
Sobell A practical guide to Ubuntu Linux
JPH0683603A (en) Method and system for registering batch of object class
Sobell A Practical Guide to Fedora and Red Hat Enterprise Linux
JPH09171473A (en) Method for management of error and data-processing system
KR101823226B1 (en) Method and system for code protection
Reilly Designing microsoft asp. net applications
Lee et al. Beginners guide to bioinformatics for high throughput sequencing
US20070294775A1 (en) Content Data Creating Device, Control Method Thereof, Program for Creating Content Data, and Content Data Display Device
CN1332302C (en) Navigation in computer software applications developed in procedural language
Osborne The postroom computer
Krusemark et al. An operating system interface for transportable image processing software
Patrick et al. Visual Basic 2005 Cookbook: Solutions for VB 2005 Programmers
Verma Computer, internet & multimedia dictionary
Sobell et al. A practical guide to UNIX for Mac OS X users
Wünschiers Computational biology: Unix/Linux, data processing and programming
GB2306710A (en) Software version control facility
Basics Windows Script Host
Greenstein Public-Domain and User-Supported Software for the IBM PC and Compatibles

Legal Events

Date Code Title Description
EEER Examination request
MKLA Lapsed