Firmware Technical Reference
Second Edition (July 1990)
INTERNATIONAL BUSINESS MACHINES PROVIDES THIS MANUAL "AS IS", WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Some states do not allow disclaimer of express or implied warranties in certain transactions; therefore, this statement may not apply to you. This publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time.
It is possible that this material may contain reference to, or information about, IBM products (machines or programs), programming, or services that are not announced in your country. Such references or information must not be construed to mean that IBM intends to announce such IBM products, programming, or services in your country.
References in this publication to IBM products, programs, or services do not imply that IBM intends to make these available in all countries in which IBM operates.
Any reference to an IBM licensed program or other IBM product in this publication is not intended to state or imply that only IBM's program or other product may be used.
IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. You can send license enquiries, in writing, to the IBM Director of Commercial Relations, IBM Corporation, Armonk, N.Y. 10504.
The following terms, DENOTED BY AN ASTERISK (*), used in this publication, are trademarks or service marks of IBM Corporation in the United States and/or other countries:
IBM OS/2 PS/2
Operating System/2 Personal System/2
The following terms, DENOTED BY A DOUBLE ASTERISK (**), used in this publication, are trademarks of other companies as follows:
This book contains software technical reference information concerning the IBM Realtime Interface Co-processor Adapter, Multiport Adapter, Multiport/2 Adapter, Portmaster Adapter/A, and the Multiport Adapter, Model 2.
Note:
Technical reference information for the IBM X.25 Interface Co-Processor/2 adapter is in the IBM X.25 Interface Co-Processor/2 Technical Reference.
Throughout the book, the term "co-processor adapter" refers to the above adapter types.
This manual:
This book contains introductory and reference information for software designers, programmers, and anyone with a knowledge of programming who needs to understand the use and operation of the co-processor adapter.
You should be familiar with the system unit, your application, and programming. Only the terms that apply specifically to the co-processor adapter are explained.
The IBM Realtime Interface Co-Processor Firmware Technical Reference is organized into three volumes.
Volume I contains the following:
Introduces the co-processor adapter software architecture.
References functions performed by software in the system unit for support of the co-processor adapter. It describes system initialization, system unit program initialization, system unit program to Realtime Control Microcode communication, and asynchronous error handling.
Describes modules available to system unit programs that request various modes and controls from the co-processor adapter.
Describes operations that must be performed to communicate with tasks on the co-processor adapter. These include co-processor adapter setup, interrupt handling, sending commands to a task, task data transfer, and loading and starting the Realtime Control Microcode.
Volume II contains the following:
Describes functions available to tasks on the co-processor adapter. These include system unit interrupts, task management, task initialization, and programming. These functions cause a dispatch cycle to occur.
Describes functions available to tasks executing on the co-processor. These functions are designed for use by interrupt handlers because interrupt handlers are prevented from using Supervisor Calls (SVCs). These services do not cause a dispatch cycle to occur.
Describes modules available to tasks and the Realtime Control Microcode residing in the co-processor adapter's programmable ROM (PROM). These modules provide services such as SCC port and CIO port initialization and programming, DMA initialization, and ASCII/EBCDIC translation. These functions do not cause a dispatch cycle to occur.
Provides tables of the hardware initialization upon exit from ROS Power On.
Describes modules available to tasks and the Realtime Control Microcode. These modules provide diagnostic testing at power-on time and are not dependent on the Realtime Control Microcode. They include tests and checks on RAM storage, timers, DMAs, interrupt handlers, and interfaces. These functions do not cause a dispatch cycle to occur.
Volume III contains the following:
Describes functions available to tasks on the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters. These functions include resource management, task management and services, task communications with the system unit, error handling, and interrupt handling.
Provides the link between an interrupt vector number code and the procedures assigned to service interrupts associated with that vector number code for the Realtime Interface Co-processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters.
Describes functions available to tasks on the Realtime Interface Co-Processor Portmaster Adapter/A and the Realtime Interface Co-Processor Multiport Adapter, Model 2 adapters. These functions include resource management, task management and services, task communications with the system unit, error handling, and interrupt handling.
Provides the link between an interrupt vector number code and the procedures assigned to service interrupts associated with that vector number code for the Realtime Interface Co-Processor Portmaster Adapter/A and the Realtime Interface Co-Processor Multiport Adapter, Model 2 adapters.
Related books in the Realtime Interface Co-Processor library are as follows:
IBM Realtime Interface Co-Processor Guide to Operations
Provides instructions for installing the Realtime Interface Co-Processor features. It also describes problem-determination procedures.
IBM Realtime Interface Co-Processor Adapter Hardware Maintenance and Service
Used to isolate and repair any failure of a field-replaceable unit (FRU). It provides step-by-step instructions for problem isolation to aid in identifying a FRU. Removal and replacement procedures are presented to complete repair.
IBM Realtime Interface Co-Processor Multiport Adapter Guide to Operations
Provides instructions for installing the Realtime Interface Co-Processor Multiport Adapter features. It also describes problem-determination procedures.
IBM Realtime Interface Co-Processor Multiport Adapter Hardware Maintenance and Service
Used to isolate and repair any failure of a field-replaceable unit (FRU). It provides step-by-step instructions for problem isolation to aid in identifying a FRU. Removal and replacement procedures are presented to complete repair.
IBM Realtime Interface Co-Processor Multiport/2 Adapter Guide to Operations
Provides instructions for installing the Realtime Interface Co-Processor Multiport/2 Adapter features. It also describes problem-determination procedures.
IBM Realtime Interface Co-Processor Multiport/2 Adapter Hardware Maintenance and Service
Used to isolate and repair any failure of a field-replaceable unit (FRU). It provides step-by-step instructions for problem isolation to aid in identifying a FRU. Removal and replacement procedures are presented to complete repair.
IBM Realtime Interface Co-Processor Multiport Adapter, Model 2 Guide to Operations
Provides instructions for installing the Realtime Interface Co-Processor Multiport Adapter, Model 2 features. It also describes problem-determination procedures.
IBM Realtime Interface Co-Processor Portmaster Adapter/A Guide to Operations
Provides instructions for installing the hardware necessary to use the Realtime Interface Co-Processor Portmaster Adapter/A and describes problem-determination procedures.
Realtime Interface Co-Processor Portmaster Adapter/A, Multiport Adapter, Model 2 Hardware Maintenance Library
Used to isolate and repair any failure of a field-replaceable unit (FRU) for the Portmaster Adapter/A or the Multiport Adapter, Model 2. It provides step-by-step instructions for problem isolation to aid in identifying a FRU. Removal and replacement procedures are presented to complete repair.
IBM Realtime Interface Co-Processor DOS Support
Provides information necessary to interface the co-processor adapter through the system unit DOS. It describes all functions, capabilities, and installation of the Realtime Interface Co-Processor DOS Support software.
IBM Realtime Interface Co-Processor OS/2 Support
Provides information necessary to interface the co-processor adapter through the system unit Operating System/2* (OS/2*). It describes all functions, capabilities, and installation of the Realtime Interface Co-Processor OS/2 Support software.
Realtime Interface Co-Processor C Language Support User's Guide
Describes the C Language Support product-&dasha; productivity aid that allows programmers to develop code for the co-processor adapter and the system unit in the C Programming Language. This guide explains the C-interface routines and the method of compiling and linking C-tasks for the co-processor adapter and your system unit.
IBM Realtime Interface Co-Processor Extended Services, Version 1.01
Describes the Extended Services product-&dasha; productivity aid that provides the system developer with a variety of services to ease the writing of systems applications for the Realtime Interface Co-Processor family of adapters. It includes numerous task, event, resource, and communications services that allow the system developer to concentrate on the application instead of the system.
You may need to use one or more of the following publications for reference with this manual:
Volume II contains the following:
Describes functions available to tasks on the co-processor adapter. These include system unit interrupts, task management, task initialization, and programming. These functions cause a dispatch cycle to occur.
Describes functions available to tasks executing on the co-processor. These functions are designed for use by interrupt handlers because interrupt handlers are prevented from using Supervisor Calls (SVCs). These services do not cause a dispatch cycle to occur.
Describes modules available to tasks and the Realtime Control Microcode residing in the co-processor adapter's programmable ROM (PROM). These modules provide services such as SCC port and CIO port initialization and programming, DMA initialization, and ASCII/EBCDIC translation. These functions do not cause a dispatch cycle to occur.
Provides tables of the hardware initialization upon exit from ROS Power On.
Describes modules available to tasks and the Realtime Control Microcode. These modules provide diagnostic testing at power-on time and are not dependent on the Realtime Control Microcode. They include tests and checks on RAM storage, timers, DMAs, interrupt handlers, and interfaces. These functions do not cause a dispatch cycle to occur.
Supervisor Calls (SVCs) are requested through the Realtime Control Microcode to perform functions for application tasks executing on the co-processor adapter. SVCs may be called from a task's mainline code and from software interrupt handlers.
For specific details relating to a particular SVC, refer to the list on the following pages and the SVCs by name within this chapter.
An SVC is invoked via a call to interrupt vector INT 56h with the requested SVC number in register AH. Register AH and other registers are used to pass parameters to the SVC handler, which invokes the appropriate module to perform the requested function. All user registers (except register AL on error detection) are preserved unless specified by the particular SVC.
+--------------------------------------------------+ | List of Supervisor Calls | +-----+------+---------+---------------------------+ | Int | AH | Name | Function | | No. | Reg | | | +-----+------+---------+---------------------------+ | 56h | 37h | INTPC | Interrupts the | | | | | system unit | +-----+------+---------+---------------------------+ | 56h | 38h | UNLOAD | Unloads specified task | +-----+------+---------+---------------------------+ | 56h | 39h | BUILD | Simulates a task | | | | | load from the | | | | | system unit | +-----+------+---------+---------------------------+ | 56h | 3Ah | START | Starts the specified task | +-----+------+---------+---------------------------+ | 56h | 3Bh | STOP | Stops the specified task | +-----+------+---------+---------------------------+ | 56h | 3Ch | WAIT | Places requesting task | | | | | into an idle or | | | | | "wait" state | +-----+------+---------+---------------------------+ | 56h | 3Dh | SUSPEND | Suspends task | +-----+------+---------+---------------------------+ | 56h | 3Eh | RESUME | Cancels the suspended | | | | | status of a task | +-----+------+---------+---------------------------+ | 56h | 3Fh | POST | Places the task on the | | | | | dispatch queue | +-----+------+---------+---------------------------+ | 56h | 40h | ASAP | Causes a dispatch | | | | | cycle to occur | +-----+------+---------+---------------------------+ | 56h | 41h | STAYRES | Terminates requesting | | | | | task; task remains | | | | | resident | +-----+------+---------+---------------------------+ | 56h | 42h | READVEC | Reads an interrupt vector | +-----+------+---------+---------------------------+ | 56h | 43h | TIMERP | Starts a periodic | | | | | software timer | +-----+------+---------+---------------------------+ | 56h | 44h | TIMER | Starts a software timer | +-----+------+---------+---------------------------+ | 56h | 45h | CANCEL | Cancels the specified | | | | | software timer | +-----+------+---------+---------------------------+ | 56h | 46h | ALLOC | Allocates one of a | | | | | co-processor adapter's | | | | | resources such as | | | | | an interrupt vector, | | | | | storage block, DMA | | | | | channel, communication | | | | | port, queue, or hard- | | | | | ware or software timer | +-----+------+---------+---------------------------+ | 56h | 47h | RETURN | Deallocates a co-processor| | | | | adapter resource | +-----+------+---------+---------------------------+ | 56h | 48h | INITCOMP| Tells the Realtime | | | | | Control Microcode that | | | | | initialization of the | | | | | task is complete | +-----+------+---------+---------------------------+ | 56h | 49h | QFREEST | Queries the largest | | | | | available free | | | | | storage size | +-----+------+---------+---------------------------+
The Realtime Control Microcode sets the carry flag on and sets register AL to an error code when an error is detected in a supervisor call. The Realtime Control Microcode returns to the requesting task when the first error condition is found. Other error conditions may exist; therefore, the call parameters should be checked before the SVC is executed again. The SVC error codes set by the Realtime Control Microcode are as follows.
+--------------------------------------------------+ | List of SVC Error Codes | +------+-------------------------------------------+ | AL | Meaning | | Code | | +------+-------------------------------------------+ | 01h | Non-valid SVC/SVI number | | 02h | Unused | | 03h | Unused | | 04h | Interface board not present | | 05h | Access denied | | 06h | Port interface mismatch | | 07h | Communications chip mismatch | | 08h | Insufficient storage | | 09h | Interrupt busy | | 0Ah | No response from system unit | | 0Bh | Interrupt rejected | | 0Ch | Requested action was already performed | | 0Dh | No resource available | | 0Eh | Unknown EMM handle | | 0Fh | EMM logical page number out of range | | 10h | Page Frame page number out of range | | 11h | Physical address mapped, but unallocated | | 12h | Address out of range | | 13h | Non-valid data | | 14h | Non-valid task number | | 15h | Non-valid timer number | | 16h | Non-valid queue number | | 17h | Name not found | | 18h | Non-valid port number/duplicate name | | 19h | Device number not available/clocking | | | option selected in hardware | | 1Ah | Insufficient expanded memory pages | | 1Bh | Stack overflow/underflow | | 1Ch | Requested hook access not available | | 1Dh | Task suspended by Realtime Control | | | Microcode - cannot be resumed | | 1Eh | Unused | | 1Fh | Unused | +------+-------------------------------------------+
A description of each supervisor call is provided in the remainder of this chapter.
Interrupts the system unit.
INVOCATION: INT 56h, AH = 37h
----------------------------------------------------
FUNCTION:
This SVC generates an interrupt to the system unit from the requesting task. There are five options with this SVC. The entry parameter (AL register) to select these options is bit-sensitive; therefore, tasks can combine options into one call.
Entry Parameters
INT 56h AH = 37h AL = xxxA BCDE where: A = 1, Request system restart of the system unit B = 1, infinite retry on interrupt presentation and response B = 0, CX = maximum interrupt retry count (must be greater than 0) C = 1, "output buffer busy" is reset to 0 D = 1, "busy" is reset to 0 E = 1, task is "waited" after interrupt x = not used
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler 09h Interrupt busy -The retry count (number of attempts) has expired and the interrupt cannot be presented to the system unit. Due to prior interrupt pending. 0Ah No response from -No system unit response system unit to the interrupt was received, and the retry count has expired 13h Non-valid data -Retry count specified is not valid (CX = 0)
Example Call
MOV AH,37h ;interrupt system unit ; SVC MOV AL,0Fh ; ;*********************************************************** ;* With 0Fh in AL, the following options are turned on: * ;* Option 2: Infinite retry on interrupt presentation * ;* and response. * ;* Option 3: Output buffer busy is reset to 0. * ;* Option 4: Busy bit is reset to 0 in the primary status * ;* bit of the IB after the interrupt is raised. * ;* Option 5: Task is waited after SVC. If posted flag is * ;* not 0, wait does not occur. * ;*********************************************************** INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error AL = error code ;Get here after next post
Unloads specified task.
INVOCATION: INT 56h, AH = 38h
----------------------------------------------------
FUNCTION:
The SVC unloads the specified task from the co-processor adapter storage. If the task is not already stopped, it is stopped as described in the Stop SVC. The task's resident storage is returned to the free memory pool, and the "loaded" bit in the task's primary status byte in the interface block is reset to 0. If any errors are detected, the service is not performed.
Entry Parameters
INT 56h AH = 38h AL = Task number to be unloaded
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
-------------------------------------------------------------- AL Code Meaning Causes -------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler -Task is permanent 14h Non-valid task number -Specified task is not loaded or is out of range
Example Call
MOV AH,38h ;unload task SVC MOV AL,01h ;unload task number 1 INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code
Simulates a task load from the system unit.
INVOCATION: INT 56h, AH = 39h
----------------------------------------------------
FUNCTION:
This SVC is the mechanism that a co-processor adapter task uses to create another task on the co-processor adapter.
The task that issues this SVC becomes the parent task. When a task builds another task, the building task is considered to be a parent task and the task that is built is the child task. A child task may not build a task. A task can build another task without the parent/child relationship if the built task is in storage that was acquired by the building task. In this case, the BX register must point to the offset address in the building task header, which is the storage resource block for the acquired storage in which the task to be built resides; otherwise, BX must be 0.
Restrictions:
The size in the built task's header must be the same size of the storage block in which the task is to be built. If this size is incorrect and the built task is subsequently unloaded, the incorrect amount of storage is returned to the free storage pool. The Realtime Control Microcode cannot detect this error because the built task does not have to reside in storage at Build time, only at Start time. This restriction applies only if no parent/child relationship exists (BX not equal to 0). Tasks cannot be built in expanded memory.
Entry Parameters
INT 56h AH = 39h AL = Task number to build ES = Segment of the built task's task header BX = 0 indicates task that is built is a child task BX = Address of the storage resource block in the parent task that describes the storage in which the built task resides. This storage resource block (the control block used to allocate the storage) is removed from the building task's resource block chain and becomes the resident storage of the built task. The pointer to the storage resource block is used to acquire the storage in which the peer task resides. The built task is not a child task of the building task in this case. DX = Offset of the built task's task header
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler -Child task attempted to build a task 13h Non-valid data -BX register is not 0, and does not point to a valid storage resource block -DX is not on a paragraph boundary 14h Non-valid task number -Task is out of range -Task is already loaded
Example Call
MOV AH,39h ;build task SVC MOV AL,02h ;build task number 2 MOV BX,CS ;COM file implementation MOV ES,BX ;ES = CS XOR BX,BX ;BX = 0, build as child task MOV DX,OFFSET TSK2 ;header of task 2 INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code
Starts the specified task.
INVOCATION: INT 56h, AH = 3Ah
----------------------------------------------------
FUNCTION:
This SVC starts the specified task. A task is started by building a Task Control Block (TCB) from the task header. The task must have been previously loaded from the system unit or built by the Build SVC. The Start command causes the task to be entered at its initial entry point.
If the task is already started, no operation is performed.
When the task is entered the first time, the task's registers are set up as follows:
Register Contents -------- -------- AX Undetermined BX Undetermined CX Undetermined DX Undetermined DI Undetermined SI Undetermined BP Undetermined SP Stack Pointer value from task header logically ANDed with FFFFEh CS Initial segment from task header DS Data segment value from the task header ES Segment of the task header SS Stack segment value from the task header IP Initial offset value from the task header Flags Carry = 0 Parity = 0 Auxiliary carry = 0 Zero = 0 Sign = 0 Trap = 0 Interrupt = 1 (enabled) Direction = 0 Overflow = 0
Entry Parameters
INT 56h AH = 3Ah AL = Task number to start
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler 0Ch Requested action -Task is already started already performed 13h Non-valid data (from -Task size is less than task header) 28 bytes or greater than 1Mb -Task priority is greater than MAXPRI or equal to 0 -Task number in header does not match the requested task number -Resource Block pointer is not 0 -Byte 5 of the task header is not 0 -Task Debug flag in the task header is non-zero This flag is reserved for future use but must be reset to 0 14h Non-valid task -Task has not been loaded number -Task is out of range
Example Call
MOV AH,3Ah ;start task SVC MOV AL,01h ;start task number 1 INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code
Stops the specified task.
INVOCATION: INT 56h, AH = 3Bh
----------------------------------------------------
FUNCTION:
This SVC stops the specified task. All resources except the storage in which the task resides are returned to the Realtime Control Microcode. If the task is already stopped, the SVC performs no operation. A stopped task may be restarted by the Start SVC or Start command from the system unit. The effect of Stop puts a task into the loaded state and removes its TCB from the Realtime Control Microcode storage area. All child tasks of the specified task are unloaded.
Entry Parameters
INT 56h AH = 3Bh AL = Task number to stop
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler -Task is permanent 0Ch Requested action -Task is already stopped already performed 14h Non-valid task number -Task is out of range -Task is not loaded
Example Call
MOV AH,3Bh ;stop task SVC MOV AL,01h ;stop task number 1 INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code
Puts a task in an idle or wait state.
INVOCATION: INT 56h, AH = 3Ch
----------------------------------------------------
FUNCTION:
This SVC puts a task in an idle or wait state. It may be made active by a post SVC or POSTI service interrupt from an interrupt handler or another task. While idle, it may only service interrupts.
If the task's posted flag (in its TCB) is set, the Wait call will return immediately. The task's posted flag must be clear for the Wait SVC to put the task in an idle state.
Entry Parameters
INT 56h AH = 3Ch
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler
Example Call
MOV AH,3Ch ;wait task SVC INT 56h ;interrupt Realtime Control Microcode ;Get here when posted JC ERROR_HAN ;if error, AL = error code
Suspends the specified task.
INVOCATION: INT 56h, AH = 3Dh
----------------------------------------------------
FUNCTION:
The SVC suspends the specified task and the suspended flag in the task's s state byte in the task's TCB is set to 1. If the suspended task is on the dispatch queue, it is removed from the dispatch queue. After a task is suspended, it may be posted. However, this post does not take effect until that task is resumed. To take a task out of the suspended state, it must be resumed.
If the task is already suspended, no operation is performed.
Entry Parameters
INT 56h AH = 3Dh AL = Task number to be suspended
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler 0Ch Requested action -Task is already suspended already performed 14h Non-valid task number -Task is out of range -Task is not started
Example Call
MOV AH,3Dh ;suspend task SVC MOV AL,01h ;suspend task number 1 INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code
Cancels the suspended state of a task.
INVOCATION: INT 56h, AH = 3Eh
----------------------------------------------------
FUNCTION:
This SVC cancels the suspended state of a task. If the task was posted when it was suspended or has been posted since it was suspended, the Resume puts the specified task on the dispatch queue. If the task is not suspended, no operation is performed. This SVC does not resume tasks suspended by the Realtime Control Microcode because error conditions exist.
Entry Parameters
INT 56h AH = 3Eh AL = Task number to resume
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler 0Ch Requested action -Task is not suspended already performed 14h Non-valid task number -Task is out of range -Task is not started 1Dh Task cannot be -Task was suspended by the resumed Realtime Control Microcode
Example Call
MOV AH,3Eh ;resume task SVC MOV AL,01h ;resume task number 1 INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code
Places the task on the dispatch queue.
INVOCATION: INT 56h, AH = 3Fh
----------------------------------------------------
FUNCTION:
This SVC puts the task on the dispatch queue (if it is not suspended). If the task is already posted, only the post code and posted flag in the TCB is changed. If the task is suspended, the post code (PSTCD) is set to the requested value, the posted flag (POSTED) is set to 1, and the queued bit in the state byte (STB) is set, but the task is not put on the dispatch queue until the task is resumed. The posted flag must be reset to 0 by the task for the task to be able to "wait" itself.
Entry Parameters
INT 56h AH = 3Fh AL = Task number to post DX = Post code The following parameters are optional. This is a recommended format only. DH = Task number posting DL = pppp ABCD where: A = Posted by the I/O Interrupt Handler DL = pppp 1000 where p = user-defined post code B = Posted by timer expiration DL = pppp p100 where p = user-defined post code C = Posted by command subroutine DL = pppp pp10 where p = user-defined post code D = General post DL = pppp ppp1 where p = user-defined post code
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler 14h Non-valid task number -Target task is not started -Task is out of range
Example Call
MOV AH,3Fh ;post task SVC MOV AL,01h ;post task number 1 MOV DX,0AAAh ;post code, optional and ; specific to implementation INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code
Causes a dispatch cycle to occur.
INVOCATION: INT 56h, AH = 40h
----------------------------------------------------
FUNCTION:
This is an SVC in which no operation is performed. It is used to share execution time with other tasks. A task should use this SVC to force a dispatch cycle to occur and allow other tasks to execute. In the event a task does not return control to the Realtime Control Microcode, the Realtime Control Microcode executes a time-slice after 10 milliseconds to force a dispatch cycle to occur.
Entry Parameters
INT 56h AH = 40h
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler
Example Call
MOV AH,40h ;asap SVC INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code
Terminates the task, but the task remains resident.
INVOCATION: INT 56h, AH = 41h
----------------------------------------------------
FUNCTION:
This SVC causes the calling task to be terminated but to remain in storage.
After successful completion of this SVC, this task may not be started, stopped, posted, suspended, resumed, waited, or unloaded. The task has no TCB. A parent or child task may not be terminated with this SVC. The requesting task must not own any user interrupt vectors. This call may be used for installing interrupt handlers. One example would be a time-of-day routine.
Entry Parameters
INT 56h AH = 41h
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler -Attempt made to terminate a parent or child task -The requesting task owns a user-interrupt vector
Example Call
MOV AH,41h ;stay resident SVC INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code
Reads an interrupt vector.
INVOCATION: INT 56h, AH = 42h
----------------------------------------------------
FUNCTION:
This SVC returns the current doubleword value of an interrupt vector.
Entry Parameters
INT 56h AH = 42h AL = Interrupt vector number to read
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error ES = Segment value of the vector DX = Offset value of the vector
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler
Example Call
MOV AH,42h ;read vector SVC MOV AL,0C0h ;read interrupt vector C0h, ; pointer to EBCDIC-to-ASCII ; table INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code ;If here: ; ES = Segment value of the vector ; DX = Offset value of the vector
Starts a periodic software timer.
INVOCATION: INT 56h, AH = 43h
----------------------------------------------------
FUNCTION:
This SVC starts a software timer that automatically restarts itself when it times out. This timer calls the user's timer vector on each time-out. When the timer expires, the supplied vector is called via a FAR CALL. Your task executes a RET FAR at the end of the subroutine. This timer can be cancelled in the same manner as a nonperiodic timer, by using the CANCEL SVC or the CANCELI SVI.
Entry Parameters
INT 56h AH = 43h AL = Software timer number CX = Time period in milliseconds (0001h-FFFFh) in multiples of 5 milliseconds Example: 1 = 5 milliseconds 2 = 10 milliseconds ES = Segment of subroutine to call DX = Offset of subroutine to call
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler -Timer does not belong to this task. 13h Non-valid data -Timer period is 0 15h Non-valid timer number -Timer number is out of range -Timer is already running
Example Call
MOV AH,43h ;start periodic software ; timer SVC MOV AL,01h ;software timer 1 MOV CX,0005h ;time out in 25 milliseconds MOV BX,CS ;COM file implementation MOV ES,BX ;ES = CS MOV DX,OFFSET TIMER_HANDLER ;offset of subroutine, ; specific to implementation INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code
Starts a software timer.
INVOCATION: INT 56h, AH = 44h
----------------------------------------------------
FUNCTION:
This SVC starts a software timer. The parameters are timer number, duration, and a 32-bit vector that receives control when the timer expires. When the timer expires, the supplied vector is called via a CALL FAR. Your task must execute a RET FAR at the end of this section of code. The timer can be cancelled with the CANCEL SVC or the CANCELI SVI.
The duration of one count of the timer is 5 milliseconds.
Entry Parameters
INT 56h AH = 44h AL = Software timer number CX = Duration (0001h to FFFFh) ES = Segment of subroutine to call DX = Offset of subroutine to call
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler -Timer does not belong to this task 13h Non-valid data -Timer period is 0 15h Non-valid timer number -Timer is out of range -Timer is already running
Example Call
MOV AH,44h ;start software timer ; SVC MOV AL,01h ;software timer 1 MOV CX,0001h ;time out in 5 milliseconds MOV BX,CS ;COM file implementation MOV ES,BX ;ES = CS MOV DX,OFFSET TIMER_HANDLER ;offset of subroutine, ; specific to implementation INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code
Cancels the specified software timer.
INVOCATION: INT 56h, AH = 45h
----------------------------------------------------
FUNCTION:
This SVC cancels the specified software timer. If the timer is not running, no operation is performed. This SVC cancels both periodic and nonperiodic software timers.
Entry Parameters
INT 56h AH = 45h AL = Software timer number
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler 15h Non-valid timer -Timer is out of range number
Example Call
MOV AH,45h ;cancel software timer ; SVC MOV AL,01h ;cancel software timer 1 INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code
Allocates one of a co-processor adapter's resources.
INVOCATION: INT 56h, AH = 46h
----------------------------------------------------
FUNCTION:
This SVC allocates one of a co-processor adapter's resources-&dashsuch; as an interrupt vector, storage block, communication port, user queue, or hardware or software timer. A pointer to the resource block is passed as a parameter. The resource block is used to specify which resource is requested. Only one resource may be requested at a time. For further details, see
Entry Parameters
INT 56h AH = 46h ES = Segment of resource block DX = Offset of resource block
Note:
The resource block for a given resource type is defined in detail under Refer to , and .
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 04h Interface board -Co-processor has no interface not present board or the interface board has non-conformance on-board ROM 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler -Resource cannot be allocated -Attempt is made to allocate interrupt vector that is used by the Realtime Control Microcode or by the hardware 06h Port interface -Port interface type requested mismatch is not the same as the port interface type present on the interface board 07h Communications -Communications chip type chip mismatch present is not the same as the Communications chip type present on the interface board 08h Insufficient -Insufficient storage for storage a storage allocation request 13h Non-valid data -Requesting task number is not the task in execution -The resource block segment is not the requesting task's task header segment -Byte 7 of the resource block is non-zero -Block descriptor is out of range -Non-valid communication port requested 15h Non-valid timer -The requested timer number number is greater than MAXTIME (maximum number of timers) 16h Non-valid queue -The requested queue number number is greater than MAXQUEUE (maximum number of queues) 1A Insufficient -Insufficient expanded memory expanded memory pages for the allocation request pages 1C Requested access -The service requested is not not available supported or is disabled
Example Call
MOV AH,46h ;allocate resource SVC MOV BX,CS ;COM file implementation MOV ES,BX ;ES = CS MOV DX,OFFSET RS-232-C_PORT_1 ;offset of resource block, ; specific to implementation INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code
Deallocates a specified resource.
INVOCATION: INT 56h, AH = 47h
----------------------------------------------------
FUNCTION:
This SVC is used to return one resource at a time-&dashsuch; as an interrupt vector, storage block, communication port, user queue, or timer to the Realtime Control Microcode's control.
Entry Parameters
INT 56h AH = 47h ES = Segment of resource block that describes resource to be returned. DX = Offset of resource block that describes resource to be returned.
Note:
The resource block for a given resource type is defined in detail under , and .
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler 0Eh Unknown EMM -Expanded memory handle is handle not allocated 13h Non-valid data -Resource does not belong to this task -Requesting task number is not the task in execution -Resource block segment is not the requesting task's task header segment -Block descriptor is out of range -The return size is greater than the block size. This message is generated when a task is returning a partial storage block -Non-valid communications port requested 15h Non-valid timer -The requested timer number number is greater than MAXTIME (maximum number of timers) 16h Non-valid queue -The requested queue number number is greater than MAXQUEUE (maximum number of queues)
Example Call
MOV AH,47h ;return resource SVC MOV BX,CS ;COM file implementation MOV ES,BX ;ES = CS MOV DX,OFFSET RS-232-C_PORT_1 ;offset of resource block, MOV DX,OFFSET RS-232-C_PORT_1 ;offset of resource block, ; specific to implementation INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code
Tells the Realtime Control Microcode that initialization of the task is complete.
INVOCATION: INT 56h, AH = 48h
----------------------------------------------------
FUNCTION:
This SVC tells the Realtime Control Microcode that a task has finished its initialization. The initialized state bit is set to 1 in the task's primary status byte in the interface block. This is usually done at the end of the code that was entered by the Start command or Start SVC.
The task may be marked as permanent via this SVC. A permanent status says that this task cannot be stopped or unloaded. If a child task is marked as permanent, the parent task is also assigned a permanent status.
If the task is already initialized, no operation is performed.
Entry Parameters
INT 56h AH = 48h AL = 0 indicates task can be unloaded; non-zero indicates task is to be marked as permanent
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
--------------------------------------------------------------- AL Code Meaning Causes --------------------------------------------------------------- 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler 0Ch Requested action -The Initialize bit in already performed the task's primary status Byte in the interface block is already set to 1
Example Call
MOV AH,48h ;init. complete SVC MOV AL,00h ;task can be unloaded INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code
Gets the largest available free storage size.
INVOCATION: INT 56h, AH = 49h
----------------------------------------------------
FUNCTION:
This SVC returns the pointer to the largest free storage block along with the size of that block and the total amount of free storage.
This service only reports on the storage in base memory, not expanded memory.
Entry Parameters
INT 56h AH = 49h
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error BX = Segment of largest available storage block CX = Number of paragraphs in the largest storage block DX = Total number of free storage paragraphs
Errors
------------------------------------------------------------ AL Code Meaning Causes ------------------------------------------------------------ 01h Non-valid SVC number -SVC number out of range 05h Access denied -SVC cannot be called from an I/O interrupt handler or command interrupt handler
Example Call
MOV AH,49h ;query free storage SVC INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code ;If here: ; BX = Segment of largest available storage block ; CX = Number of paragraphs in the largest storage block ; DX = Total number of free storage paragraphs
Service interrupts (SVIs) can be accessed through the Realtime Control Microcode to perform various task services and are available to application tasks executing on the co-processor adapter. In general, these routines are designed to be used by I/O interrupt handlers because I/O handlers are prevented from using Supervisor Calls (SVCs) to perform these functions. The service interrupts perform many of the same functions as the SVC modules, but do not cause a dispatch cycle to occur.
For specific details relating to a particular SVI, refer to the list on the following pages and the SVIs by name within this chapter.
The service interrupts are accessed via even-numbered interrupts 60h through 74h.
The following tables list each service interrupt along with differences between support provided in Realtime Control Microcode Version 1 and Realtime Control Microcode Version 2.
+------------------------------------------------------------------------+ | List of Service Interrupts | +------+-------+----------------+----------------------------------------+ | Int | AH | | | | No. | Value | Name | Function | +------+-------+----------------+----------------------------------------+ | 60h | --- | SEG2PAG | Translates a segment and offset | | | | | into page and offset | | | | | | | 62h | --- | PAG2SEG | Translates page and offset into | | | | | segment and offset | | | | | | | 64h | --- | POSTI | Places a task on the dispatch queue | | | | | | | 66h | --- | RESUMEI | Cancels the suspended state of a task | | | | | | | 68h | --- | CANCELI | Cancels the specified software timer | | | | | | | 6Ah | --- | RECQUEUE | Gets the pointer to the first | | | | | element in a user queue | | | | | | | 6Ch | --- | ADDQUEUE | Adds an element to a user queue | | | | | | | 72h | 0Ch | PHYSICAL | Operation is identical to the ADDQUEUE| | | | ADDQUEUE | SVI except that it takes the 32-bit | | | | | physical address of an element rather | | | | | than an 80186 logical address. | | | | | | | 6Eh | --- | REMQUEUE | Removes the first element from a | | | | | user queue | | | | | | | 70h | --- | TRANSEG | Translates a segment address into | | | | | an offset from a supplied segment | | | | | address | | | | | | | 72h | 00h | DISABLE | Disables task preemption | | | | PREEMPT | | | | | | | | 72h | 01h | ENABLE | Enables task preemption | | | | PREEMPT | | | | | | | | 72h | 02h | GET TASK IN | Returns the task number of the | | | | EXECUTION | current task in execution | | | | | | | 72h | 0Dh | GET/SET | Used to get/set the system time | | | | SYSTEM TIME | | | | | | | | 72h | 03h | PEER REQUEST | Used to send a peer request to | | | | | another task | | | | | | | 72h | 10h | GET CALLABLE | Return the addresses of selected | | | | ADDRESSES | Realtime Control Microcode routines | | | | | | | 72h | 0Eh | GET INTERRUPT | Returns the current depth of hardware | | | | COUNT | interrupts | | | | | | | 72h | 0Fh | GET RESOURCE | Return a pointer to a structure | | | | COUNT | containing a list of hardware and | | | | | software resources | | | | | | | 72h | 11h | GET NEXT | Accepts as input a hardware or | | | | AVAILABLE | software resource type | | | | RESOURCE | | | | | | | | 72h | 04h | GET PAGE | Used to get the logical segment | | | | FRAME SEGMENT | address and number of pages in the | | | | ADDRESS | expanded memory page frame | | | | | | | 72h | 05h | GET | Returns the number of unallocated | | | | UNALLOCATED | pages and the total number of | | | | PAGE COUNT | expanded memory pages | | | | | | | 72h | 06h | MAP/UNMAP EMM | Maps or unmaps logical expanded | | | | HANDLE PAGES | memory pages to a page frame page | | | | | | | 72h | 07h | MAP/UNMAP | Maps or unmaps physical expanded | | | | PHYSICAL | memory pages to a page frame page | | | | MEMORY | | | | | | | | 72h | 08h | EMM HANDLE TO | Used to convert an EMM handle, logical| | | | PHYSICAL | page number, and offset to a 32-bit | | | | ADDRESS | physical address | | | | | | | 72h | 09h | EMM HANDLE TO | Used to convert a EMM handle, | | | | PAGE OFFSET | logical page number, and offset to a | | | | ADDRESS | 32-bit page offset address | | | | | | | 72h | 0Ah | PUSH PAGE MAP | Saves the contents of the page | | | | | mapping registers for the entire page | | | | | frame on the stack | | | | | | | 72h | 0Bh | POP PAGE | Used to restore the expanded memory | | | | MAP | page frame mapping previously saved | | | | | by a PUSH PAGE MAP call | | | | | | | 74h | | LCLS | Logical control line services: | | | 00h | | HALF RATE SELECT CONTROL | | | 01h | | TRANSMIT CONTROL | | | 02h | | RTS/DTR CONTROL | | | 03h | | QUERY EXTERNAL/STATUS INPUTS | | | 04h | | EXTERNAL/STATUS INTERRUPT CONTROL | | | 05h | | CLEAR EXTERNAL/STATUS INTERRUPT | | | 06h | | READ/WRITE CIO BITS | | | 07h | | CLOCKING OPTION CONTROL | +------+-------+----------------+---------------------------------------+
+----------------------------------------------------------------+ | Support Differences for Service Interrupts | +---------------+---------------+-----------------+--------------+ | Name | Modified for | Supported Only | Supported | | | Realtime | in Realtime | Only on | | | Control | Control | Portmaster | | | Microcode 2.x | Microcode 2.x | Adapter/A | +---------------+---------------+-----------------+-------------- | SEG2PAG | X | | | | | | | | | PAG2SEG | X | | | | | | | | | POSTI | | | | | | | | | | RESUMEI | | | | | | | | | | CANCELI | | | | | | | | | | RECQUEUE | X | | | | | | | | | ADDQUEUE | | | | | | | | | | PHYSICAL | | X | X | | ADDQUEUE | | | | | | | | | | REMQUEUE | X | | | | | | | | | TRANSEG | | | | | | | | | | DISABLE | | | | | PREEMPT | | | | | | | | | | ENABLE | | | | | PREEMPT | | | | | | | | | | GET TASK IN | | X | | | EXECUTION | | | | | | | | | | GET/SET | | X | | | SYSTEM TIME | | | | | | | | | | PEER REQUEST | | X | X | | | | | | | GET CALLABLE | | X | | | ADDRESSES | | | | | | | | | | GET INTERRUPT | | X | | | COUNT | | | | | | | | | | GET RESOURCE | | X | | | COUNT | | | | | | | | | | GET NEXT | | X | | | AVAILABLE | | | | | RESOURCE | | | | | | | | | | GET PAGE | | X | X | | FRAME SEGMENT | | | | | ADDRESS | | | | | | | | | | GET | | X | X | | UNALLOCATED | | | | | PAGE COUNT | | | | | | | | | | MAP/UNMAP EMM | | X | X | | HANDLE PAGES | | | | | | | | | | MAP/UNMAP | | X | X | | PHYSICAL | | | | | MEMORY | | | | | | | | | | EMM HANDLE TO | | X | X | | PHYSICAL | | | | | ADDRESS | | | | | | | | | | EMM HANDLE TO | | X | X | | PAGE OFFSET | | | | | ADDRESS | | | | | | | | | | PUSH PAGE MAP | | X | X | | | | | | | POP PAGE MAP | | X | X | | | | | | | LCLS | X | | | +---------------+---------------+-----------------+--------------+
The Realtime Control Microcode sets the Carry flag on and sets register AL to an error code when an error is detected in a service interrupt. The Realtime Control Microcode returns to the caller when the first error condition is found. Other error conditions may exist; therefore, the parameters should be checked before requesting the service again. The error codes set by the Realtime Control Microcode are as follows:
+-------------------------------------------------------+ | List of SVI Error Codes | +---------+---------------------------------------------+ | AL Code | Meaning | +---------+---------------------------------------------+ | 01h | Non-valid SVC/SVI number | | 02h | Unused | | 03h | Unused | | 04h | Interface board not present | | 05h | Access denied | | 06h | Port interface mismatch | | 07h | Communications chip mismatch | | 08h | Insufficient storage | | 09h | Interrupt busy | | 0Ah | No response from system unit | | 0Bh | Interrupt rejected | | 0Ch | Requested action was already performed | | 0Dh | No resource available | | 0Eh | Unknown EMM handle | | 0Fh | EMM logical page number out of range | | 10h | Page frame page number out of range | | 11h | Physical address mapped, but unallocated | | 12h | Address out of range | | 13h | Non-valid data | | 14h | Non-valid task number | | 15h | Non-valid timer number | | 16h | Non-valid queue number | | 17h | Name not found | | 18h | Non-valid port number/duplicate name | | 19h | Device number not available/clocking option | | | selected in hardware | | 1Ah | Insufficient expanded memory pages | | 1Bh | Stack overflow/underflow | | 1Ch | Requested hook access not available | | 1Dh | Task suspended by Realtime Control | | | Microcode - cannot be resumed | | 1Eh | Unused | | 1Fh | Unused | +---------+---------------------------------------------+
A description of each service interrupt is provided in the remainder of this chapter.
Translates a segment and offset into page and offset.
INVOCATION: INT 60h
------------------------------------------
FUNCTION:
This SVI translates a co-processor adapter storage address from segment and offset to page and offset. The Realtime Control Microcode supports variable-sized pages and shared storage windows, which may be any of 8192 (8KB), 16384 (16KB), 32768 (32KB), or 65536 (64KB) bytes. The returned offset is an offset into the page relative to the page size of that co-processor adapter. If the window size is greater than 64KB, the returned offset is 0 through 64KB and the page number is a logical 64KB page.
This routine does not enable interrupts.
Entry Parameters
ES = Segment to translate DX = Offset to translate
Exit Parameters
ES = Page number DX = Offset into the page
Errors
None
Example Call
MOV AX,CS MOV ES,AX ;ES = CS MOV DX,OFFSET SECSTAT ;DX = Offset of ; secondary status INT 60H ;request service ;after INT: ;ES = Page number ;DX = Offset into the page
Translates page and offset into segment and offset.
INVOCATION: INT 62h
------------------------------------------
FUNCTION:
This SVI translates a co-processor adapter storage address from page and offset to segment and offset. For a page:offset greater than installed base memory, the service returns an address out of range warning error and the page:offset address expressed as a 32-bit physical address. The Realtime Control Microcode supports variable-sized pages and shared storage windows, which may be any of 8192 (8KB), 16384 (16KB), 32768 (32KB), or 65536 (64KB) bytes. The returned offset is an offset into the page relative to the page size of that co-processor adapter.
If the window size is greater than 64KB, the page:offset specified is interpreted as if it were based on a 64K page size.
This routine does not enable interrupts.
Entry Parameters
ES = Page number to translate. Bits 7-15 not used DX = Offset to translate.
Exit Parameters
Carry flag = 0 if no error or warning; 1 if error or warning ES = logical segment value if carry flag = 0 32-bit physical address high if carry flag = 1; 0 if queue is empty DX = logical offset value if carry flag = 0 32-bit physical address low if carry flag = 1
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 12 Address out of range
Example Call
MOV ES,PAGE_VAL ;page value to convert MOV DX,OFF_VAL ;offset value INT 62H ;request service JC ERROR_HAN ;after INT: ;ES = Segment value ;DX = Offset value
Places a task on the dispatch queue.
INVOCATION: INT 64h
------------------------------------------
FUNCTION:
This SVI puts a task on the dispatch queue (if it is not suspended). If the task is already posted, only the post code (PSTCD) in the task control block (TCB) is changed.
If the task is suspended, the post code (PSTCD) is set to 1, the posted flag (POSTED) is set to 1, and the queued bit of the state byte (STB) is set, but the task is not put on the dispatch queue until the task is resumed. The posted flag must be reset to 0 by the task for the task to be able to "wait" itself.
The function and parameters are the same as the Post SVC.
At the end of hardware interrupt processing, the Realtime Control Microcode first-level interrupt handler determines if a higher priority task is posted via POSTI during the previous user interrupt handler. If preemption is not disabled and a higher priority task is posted, the Realtime Control Microcode executes a preemptive dispatch at the completion of the interrupt processing. This takes control from the interrupted task and gives control to the higher priority task.
This routine enables interrupts.
Entry Parameters
AL = Task number to post DX = Post code
The following parameters are optional; this is a recommended format only:
DH = Task number posting DL = pppp ABCD where: A = Posted by I/O interrupt handler DL = pppp 1000 where p = user-defined post code B = Posted by timer expiration DL = pppp 0100 where p = user-defined post code C = Posted by command subroutine DL = pppp 0010 where p = user-defined post code D = General post DL = pppp 0001 where p = user-defined post code
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 14h Non-valid task number -Target task is not started -Task number is out of range
Example Call
MOV AL,02H ;task number to post MOV DX,0AAAH ;post code, optional and ; specific to implementation INT 64H ;request service JC ERROR_HAN ;if error, AL = error code
Cancels the suspended state of a task.
INVOCATION: INT 66h
----------------------------------------------------
FUNCTION:
This SVI cancels the suspended state of a task. If the task was posted when it was suspended or has been posted since it was suspended, the RESUMEI routine places the specified task on the dispatch queue. If the task is already on the queue or is not suspended, no action is taken. This function does not resume tasks suspended by the Realtime Control Microcode because error conditions exist.
The function and parameters are the same as the Resume SVC.
This routine enables interrupts.
Entry Parameters
AL = Task number to resume
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------ AL Code Meaning Causes ------------------------------------------------------------ 0Ch Requested action -Task is not suspended already performed 14h Non-valid task number -Target task is not started -Task number is out of range 1Dh Task cannot -Task suspended by Realtime be resumed Control Microcode
Example Call
MOV AL,01H ;resume task number 1 INT 66H ;request service JC ERROR_HAN ;if error, AL = error code
Cancels the specified software timer.
INVOCATION: INT 68h
----------------------------------------------------
FUNCTION:
This SVI cancels a specified software timer. If the timer is not running, no action is taken.
The function and parameters are the same as the Cancel SVC.
This routine enables interrupts.
Entry Parameters
AL = Timer number
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 15h Non-valid timer number -Timer number is out of range
Example Call
MOV AL,01h ;software timer 1 INT 68h ;request service JC ERROR_HAN ;If error, AL = error code
Gets the pointer address to the first element in a user queue.
INVOCATION: INT 6Ah
-------------------------------------------------
FUNCTION:
This SVI gets the pointer to the first element in a user queue. It also indicates if the queue is empty. If the first queue element is in base memory, the service operates unchanged. The segment:offset value returned is expressed using the smallest possible offset. If the first queue element is above base memory, RECQUEUE returns a warning error and the 32-bit physical address of the queue element. The task may then use the MAP/UNMAP PHYSICAL MEMORY SVI to map the queue element into the expanded memory page frame.
This routine does not enable interrupts.
Entry Parameters
AL = Queue number
Exit Parameters
Carry flag = 0 if no error or warning; 1 if error or warning Zero flag = 1 if queue is empty ES = Logical segment value if carry flag = 0 32-bit physical address high if carry flag = 1 and AL = 12h; 0 if queue is empty DX = Logical offset value if carry flag = 0 32-bit physical address low if carry flag = 1 and AL = 12h AL = Unchanged if no error; error code if error
Errors
---------------------------------------------------------------- AL Code Meaning Causes ---------------------------------------------------------------- 16h Non-valid queue number -Queue number is not allocated -Queue number is out of range 12h Address out of range -Address returned is a 32-bit physical address
Example Call
MOV AL,01h ;user queue number 1 INT 6Ah ;request service JC ERROR_HAN ;if error, AL = error code JZ QUEUE_EMPTY ;jump if queue is empty ;If here: ;ES = Segment of the first queue element ;DX = Offset of the first queue element
Adds an element to a user queue.
INVOCATION: INT 6Ch
----------------------------------------------------
FUNCTION:
This SVI adds an element to a user queue. The module also indicates to the caller if this is the first entry in the queue. For Portmaster Adapter/A cards with expanded memory, if the segment:offset address specifies an expanded memory page frame, this SVI assumes that the element to be added has been mapped to the page frame.
This routine does not enable interrupts.
Entry Parameters
AL = Queue number. ES = Segment of new queue element DX = Offset of new queue element
Exit Parameters
Carry flag = 0 if no error; 1 if error Zero flag = 1 if this is the first entry in the user queue AL = Unchanged if no error; error code if error
Errors
----------------------------------------------------------------- AL Code Meaning Causes ----------------------------------------------------------------- 16h Non-valid queue number -Queue number is not allocated -Queue number is out of range
Example Call
MOV AL,01h ;user queue number 1 MOV AX,CS ;COM file implementation MOV ES,AX ;ES = CS MOV DX,OFFSET USRQ1 ;DX = Offset of queue ; element one INT 6Ch ;request service JC ERROR_HAN ;if error, AL = error code JZ FIRST_IN_QUEUE ;jump if first element in user queue
Removes the first element from a user queue.
INVOCATION: INT 6Eh
----------------------------------------------------
FUNCTION:
This SVI removes the first element from a user queue. It also indicates if this is the last entry in the queue or if the queue is empty. If the first queue element is in base memory, the service operates unchanged. The segment:offset value returned is expressed using the smallest possible offset. If the first queue element is above base memory, REMQUEUE returns a warning error and the 32-bit physical address of the queue element. The task may then use the MAP/UNMAP PHYSICAL MEMORY SVI to map the queue element into the expanded memory page frame.
This routine does not enable interrupts.
Entry Parameters
AL = Queue number
Exit Parameters
Carry flag = 0 if no error; 1 if error Zero flag = 1 if this is the last entry in queue or if queue is empty; 0 otherwise ES = Segment of queue element if carry flag = 0; 32-bit physical address high of queue element if carry flag = 1 and AL = 12h; 0 if queue is empty DX = Offset of queue element if carry flag = 0; 32-bit physical address low of queue element if carry flag = 1 and AL = 12h; 0 if queue is empty AL = Unchanged if no error; error code if error
Errors
----------------------------------------------------------------- AL Code Meaning Causes ----------------------------------------------------------------- 16h Non-valid queue number -Queue number is not allocated -Queue number is out of range 12h Address out of range -Address returned is a 32-bit physical address
Example Call
MOV AL,01h ;user queue number 1 INT 6Eh ;request service JC ERROR_HAN ;if error, AL = error code JZ LAST_IN_QUEUE ;if last element in queue ;or queue is empty ;After int: ;ES = segment value of element removed ;DX = offset of element removed
Adds an element to a user queue.
INVOCATION: INT 72h, AH = 0Ch
-------------------------------------------------
FUNCTION:
This SVI is identical to the ADDQUEUE SVI, except that it takes the 32-bit physical address of an element, rather than an 80186 logical When this SVI is used on a 1M-byte card, it converts the physical address to the segment offset address.
This routine does not enable interrupts.
This SVI is valid only when expanded memory is present.
Entry Parameters
AH = 0Ch AL = Queue number ES = 32-bit physical address high of queue element DX = 32-bit physical address low of queue element
Exit Parameters
Carry flag = 0 if no error; 1 if error Zero flag = 1 if this is the first entry in queue; 0 otherwise AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------------ AL Code Meaning Causes ------------------------------------------------------------------ 01h Non-valid entry parameter -AH is out of range 11h Physical address mapped -32-bit address falls within but unallocated unallocated expanded memory (Realtime Control Microcode 2.0 only) 13h Non-valid data -32-bit address exceeds physical memory amount 16h Non-valid queue number -Queue number is not allocated -Queue number is out of range 05h Access denied -Request not permitted from an interrupt handler
Example Call
MOV AH,0Ch ;physical addqueue code MOV AL,01h ;user queue number 1 MOV ES,0010h ;upper word of physical address 00100000h MOV DX,0000h ;lower word of physical address 00100000h INT 72 ;request service JC ERROR_HAN ;if error, AL = error code JZ FIRST_IN_QUEUE ;first element in queue
Translates a segment address into an offset from a supplied segment address.
INVOCATION: INT 70h
-------------------------------------------------
FUNCTION:
This SVI translates a segment address into an offset from a supplied segment address. It could be used so that a user could treat many requested storage blocks as if they were in the same segment. All the blocks must be within a 65536 byte block of storage.
This routine does not enable interrupts.
Entry Parameters
AX = Reference segment value DX = Segment value to be translated into an offset
Exit Parameters
Carry flag = 0 if no error; 1 if error DX = Offset of data from the reference segment AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 08h Insufficient storage -The supplied segment value and the reference segment value are not in the same 65536 bytes
Example Call
MOV AX,STOR1SEG ;reference segment value MOV DX,STOR2SEG ;translated as offset INT 70h ;request service JC ERROR_HAN ;if error, AL = error code ;If here: ;DX = Offset, resulting from the segment translation
Disables the preemption capability of the POSTI service interrupt.
INVOCATION: INT 72h, AH = 00h
------------------------------------------------
FUNCTION:
This SVI disables the preemption capability of the POSTI Service Interrupt. If tasks of a higher priority are posted while preemption is disabled, a flag is set so that when preemption is enabled, the higher priority task can be given immediate control. Preemption may not be disabled or enabled from an interrupt handler.
This routine enables interrupts.
Entry Parameters
AH = 00h
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -Request not permitted from an interrupt handler
Example Call
MOV AH,00h ;required for disable preemption INT 72h ;request service JC ERROR_HAN ;if error, AL = error code
Enables the preemption capability of the POSTI service interrupt.
INVOCATION: INT 72h, AH = 01h
-----------------------------------------------------
FUNCTION:
This SVI enables the preemption capability of the POSTI service interrupt. If a higher priority task was posted while preemption was disabled, that task is given control. Preemption may not be disabled or enabled from an interrupt handler. The default is preemption-enabled, so that this routine is necessary only if preemption has been previously disabled.
This routine enables interrupts.
Entry Parameters
AH = 01h
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -Request not permitted from an interrupt handler
Example Call
MOV AH,01h ;required for disable preemption INT 72h ;request service JC ERROR_HAN ;if error, AL = error code
Returns the task number of the task currently in execution.
INVOCATION: INT 72h, AH = 02h
------------------------------------------
FUNCTION:
This SVI returns the task number of the task which is currently executing. If called from an interrupt handler, it returns the task number of the task which was interrupted.
This routine does not enable interrupts.
This SVI is valid for Realtime Control Microcode Version 2.x only.
Entry Parameters
AH = 02h
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Task number in execution error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range
Example Call
MOV AH,02h ;get task in execution code INT 72 ;request service JC ERROR_HAN ;if error, AL = error code ;if here: ;AL contains the task in execution
Sets or gets the system time.
INVOCATION: INT 72h, AH = 0Dh
------------------------------------------
FUNCTION:
This SVI sets or retrieves the system time using the structure shown in the chart that follows. It is identical to the timeb structure used by the C-ftime() function. By using this format, the C-library time functions can be used to support time conversions on the Portmaster Adapter/A adapter.
+---------------------------------------------------+ | System Time Structure | +-------+-----------+-------------------------------+ | Byte | Field Name| Description | +-------+-----------+-------------------------------+ | 00h- | SECONDS | Seconds since 1-1-70 | | 03h | | | +-------+-----------+-------------------------------+ | 04h- | MILLISEC | Milliseconds | | 05h | | | +-------+-----------+-------------------------------+ | 06h- | TIMEZONE | Minutes from UTC, -1 = time | | 07h | | zone undefined | +-------+-----------+-------------------------------+ | 08h- | DSTFLAG | Daylight savings time flag | | 09h | | | +-------+-----------+-------------------------------+
The time is maintained by a CIO hardware timer running on 25-ms intervals. The initial time is obtained from the system unit operating system support during the Realtime Control Microcode initialization. The DOS or OS/2 support loader issues a Set Time command after loading the Realtime Control Microcode. The system unit clock and the Realtime Control Microcode clock is synchronized as closely as possible at initialization. Due to differences between system unit processors and operating systems, the two clocks cannot be guaranteed to be perfectly synchronized. The Realtime Control Microcode does not attempt to correct the clock differential.
This routine does not enable interrupts.
This SVI is valid for Realtime Control Microcode Version 2.x only.
Entry Parameters
AH = 0Dh AL = 00h Get time 01h Set time ES = Segment of time structure DX = Offset of time structure
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 13h Non-valid data -Milliseconds out of range
Example Call
MOV AH,0Dh ;get/set time code MOV AL,01h ;01h sets the time MOV ES,TIME_SEG ;segment of time structure MOV DX,TIME_OFF ;offset of time structure INT 72 ;request service JC ERROR_HAN ;if error, AL = error code
Sends peer requests to other tasks.
INVOCATION: INT 72h, AH = 03h
------------------------------------------
FUNCTION:
This SVI sends a peer request to another task. The destination task can be a task on a local or remote processor. The remote processor can be either another Portmaster Adapter/A adapter or the system unit. Refer to the Realtime Interface Co-Processor Firmware Technical Reference, Volume III, for more information on peer request. details of the peer request block.
This SVI can be called from an interrupt handler only when the no-wait option in the peer request block is requested.
This routine enables interrupts.
This SVI is valid for Realtime Control Microcode Version 2.x only.
Entry Parameters
AH = 03h ES = Segment of peer request block DX = Offset of peer request block
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range -The peer request block completion code field contains errors 05h Access denied -Peer services are not enabled
Example Call
MOV AH,03h ;peer request code LES DX,PEER_BLK_PTR ;set ES:DX -> peer request block INT 72 ;request service JC ERROR_HAN ;if error, AL = error code
Returns Realtime Control Microcode routine addresses.
INVOCATION: INT 72h, AH = 10h
------------------------------------------
FUNCTION:
This SVI returns a pointer to a structure containing the addresses of selected Realtime Control Microcode routines. These routines may be called by applications wishing to extend the Realtime Control Microcode services. These routines should not be used in lieu of SVCs and SVIs.
This routine does not enable interrupts.
This SVI is valid for Realtime Control Microcode Version 2.x only.
Entry Parameters
AH = 10h
Exit Parameters
Carry flag = 0 if no error; 1 if error ES = Segment of the callable address structure DX = Offset of the callable address structure AL = Unchanged if no error; error code if error
Errors
01h Invalid entry parameter -AH is out of range.
Example Call
MOV AH,10h ;get callable addresses code INT 72 ;request service JC ERROR_HAN ;if error, AL = error code ;if here: ;ES contains the segment of the callable address information ;DX contains the offset of the callable address information
Note:
A listing of the callable address structure and details of each Realtime Control Microcode routine are presented on the following pages.
+--------------------------------------------------------------+ | Callable Address Structure | +-------+--------------+---------------------------------------+ | Offset| Field Name | Description | +-------+--------------+---------------------------------------+ | 00h | COUNT | Number of routines in this structure. | +-------+--------------+---------------------------------------+ | 01h | Reserved | Reserved for future use; must be 0 | +-------+--------------+---------------------------------------+ | 02h- | ADD_BLOCK | Far address of the Realtime Control | | 05h | | Microcode ADD_BLOCK routine. | +-------+--------------+---------------------------------------+ | 06h- | REMOVE_BLOCK | Far address of the Realtime Control | | 09h | | Microcode REMOVE_BLOCK routine. | +-------+--------------+---------------------------------------+ | 0Ah- | TSKNUMCHK | Far address of the Realtime Control | | 0Dh | | Microcode TSKNUMCHK routine. | +-------+--------------+---------------------------------------+ | 0Eh- | GET_MAIN | Far address of the Realtime Control | | 11h | | Microcode GETMAIN routine. | +-------+--------------+---------------------------------------+ | 12h- | FREE_MAIN | Far address of the Realtime Control | | 15h | | Microcode FREE_MAIN routine. | +-------+--------------+---------------------------------------+ | 16h- | AIMINT | Far address of the Realtime Control | | 19h | | Microcode AIMINT routine. | +-------+--------------+---------------------------------------+ | 1Ah- | START_TIME | Far address of the Realtime Control | | 1Dh | | Microcode START_TIMER routine. | +-------+--------------+---------------------------------------+ | 1Eh- | EXTINTENTRY | Far address of the EXTERNALT_INT | | 21h | | routine. | +-------+--------------+---------------------------------------+ | 22h- | EXTINTEXIT | Far address of the PREEMPTCD | | 25h | | routine. | +-------+--------------+---------------------------------------+ | 26h- | PEERTIMEOUT | Far address of the PEERTIMEOUT | | 29h | | routine. | +-------+--------------+---------------------------------------+ | 2Ah- | QUEUE_PROC | Far address of the QUEUE_PROC | | 2Dh | | routine. | +-------+--------------+---------------------------------------+ | 2Eh- | DEQUEUE_PROC | Far address of the DEQUEUE_PROC | | 31h | | routine. (This routine does not | | | | enable interrupts.) | +-------+--------------+---------------------------------------+ | 32h- | CHANGE_REG | Far address to CHANGE_REG routine. | | 35h | | | +-------+--------------+---------------------------------------+Realtime Control Microcode Routines
ADD_BLOCK
Function
This routine adds a resource block to a task's resource block chain.
Entry Parameters
ES = Segment of resource block DI = Offset of resource blockExit Parameters
ES = Segment of resource block DI = Offset of resource blockREMOVE_BLOCK
Function
This routine removes a resource block from the task's resource block chain.
Entry Parameters
ES = Segment of resource block DI = Offset of resource blockExit Parameters
None.TSKNUMCHK
Function
This routine verifies that a task's arguments are correct in its Task Control Block.
Entry Parameters
ES = Points to IB, or segment 0 AL = Task numberExit Parameters
DS = Segment of task control block DI = Offset of task control block CF = 0 if no error 1 if errorGET_MAIN
Function
This routine allocates blocks of memory storage. Blocks are allocated in paragraph (16 byte) multiples. The block of memory can be requested to start on a specified boundary, and can be allocated from high or low storage.
Entry Parameters
CX = Requested size of memory in paragraphs DI = Requested boundary of block Must be a power of two AL = Search high or low flag 0 = low storage request Non-zero = high storage requestExit Parameters
DI = Segment of block allocated AL = Unchanged if no error; Error code if error
FREE_MAIN
Function
This routine returns a block of memory to the free memory pool.
Entry Parameters
DI = Segment of block of memory CX = Size of returned block in paragraphsExit Parameters
AL = Unchanged if no error; Error code if error
AIMINT
Function
The following routine interrupts the system unit on behalf of Realtime Control Microcode. If there is an error 64k retries are made. If after 64k retries the interrupt has not been raised successfully, an error is reported in Realtime Control Microcode's primary and secondary status.
Entry Parameters
AX = Parameter for LBIOS call - 00FEhExit Parameters
NoneSTART_TIMER
Function
The following routine starts a given timer.
Entry Parameters
AL = Software timer number CX = Duration (0001H - 0FFFFH) ES = Segment of subroutine to call DX = Offset of subroutine to callExit Parameters
CF = 0 if no error 1 if errorEXTINTENTRY
Function
The following routine is called to notify Realtime Control Microcode that a external hardware interrupt handler has been entered. An external hardware interrupt is an interrupt of which Realtime Control Microcode has no knowledge. The user has placed an interrupt vector address in the 80186 vector table that vectors directly to this external hardware interrupt handler and is not called by Realtime Control Microcode. EXTINTENTRY must be the first call inside the hardware interrupt handler. This will notify Realtime Control Microcode not to dispatch another task until the interrupt has been processed.
Entry Parameters
None.Exit Parameters
None.EXTINTEXIT
Function
The following routine is called by a users external hardware interrupt handler. This routine notifies Realtime Control Microcode that the external hardware interrupt has been processed. This must be the last routine called because it will not return to the interrupt handler.
Entry Parameters
None.Exit Parameters
None.PEERTIMEOUT
Function
This routine returns the time out value used by Peer Services.
Entry Parameters
None.Exit Parameters
AX = Peer Time Out ValueQUEUE_PROC
Function
This routine adds a task control block to the dispatch queue. The user must check and make sure the task is not already queued. This is done by testing bit 0 in the state byte of the task control block.
STATE BYTE BIT 0 1 - Task is queued 0 - Task is waitingEntry Parameters
DS = Segment of task control block DI = Offset of task control blockExit Parameters
None.DEQUE_PROC
Function
This procedure removes a task control block from the dispatch queue. The user must make sure that the task is on the dispatch queue. This is done by testing bit 0 in the state byte of the task control block.
STATE BYTE BIT 0 1 - Task is queued 0 - Task is waitingEntry Parameters
DS = Segment of task control block DI = Offset of task control blockExit Parameters
None.CHANGE_REG
Function
This routine will enable Preprocess hooks to modify user supplied registers. Realtime Control Microcode will modify the registers just before exiting to the user routine. These registers will not be available to other hook routines or to Realtime Control Microcode for processing.
AL = Hook Type = 0 (reserved) 1 (SVC Hook) 2 (Alloc SVC) 3 (Return SVC) 4 (SVI) 5 (ESIR)Entry Parameters (Continued)
SS = Segment of hook stack BP = Offset of hook stack ES = Segment of the following structure DI = Offset of the following structure Word 0 - Count of Registers to Modify Word 1 - Register No. to Modify Word 2 - Register Value - Word 1 and Word 2 will be repeated by the count of registers to modify in Word 0. Word 1 will have following values 0 - DI 1 - SI 2 - BP 3 - (Reserved) 4 - BX 5 - DX 6 - CX 7 - AX 8 - ES 9 - DS 10 - (Reserved) 11 - (reserved) 12 - Flags 13 - AH 14 - AL 15 - BH 16 - BL 17 - CH 18 - CL 19 - DH 20 - DL 21 - AND Flags 22 - OR FlagsExit Parameters
CF = 0 if no error 1 if error IF CF = 1 POSSIBLE ERRORS ARE Hook Type Out of Range Register No. Out of range
Returns the current depth of hardware interrupts.
INVOCATION: INT 72h, AH = 0Eh
------------------------------------------
FUNCTION:
This SVI returns a depth count of the number of active hardware interrupts. If no interrupts are active, the count returned is zero.
This routine does not enable interrupts.
This SVI is valid for Realtime Control Microcode Version 2.x only.
Entry Parameters
AH = 0Eh
Exit Parameters
Carry flag = 0 if no error; 1 if error AX = Depth of hardware interrupts (0 = none) AL = Error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range
Example Call
MOV AH,0Eh ;get interrupt count code INT 72 ;request service JC ERROR_HAN ;if error, AL = error code ;if here: ;AX contains the depth count of hardware interrupts
Returns a list of hardware and software resources.
INVOCATION: INT 72h, AH = 0Fh
------------------------------------------
FUNCTION:
This SVI returns a pointer to a structure containing a list of hardware and software resources. Each list item contains a count specifying the maximum type number that can be allocated.
A description of structure returned follows.
This routine does not enable interrupts.
This SVI is valid for Realtime Control Microcode Version 2.x only.
+-------------------------------------------------------+ | Resource Count Structure | +-------+-----------+-----------------------------------+ | Offset| Field Name| Description | +-------+-----------+-----------------------------------+ | 00h | COUNT | Number of resource types | +-------+-----------+-----------------------------------+ | 01h | HWTIMER | Number of hardware timers | +-------+-----------+-----------------------------------+ | 02h | SCCPORT | Number of SCC ports | +-------+-----------+-----------------------------------+ | 03h | CIOPORT | Number of CIO ports | +-------+-----------+-----------------------------------+ | 04h | SWTIMER | Number of software timers | +-------+-----------+-----------------------------------+ | 05h | USERQ | Number of user queues | +-------+-----------+-----------------------------------+ | 06h | TASK | Number of tasks | +-------+-----------+-----------------------------------+ | 07h | 186DMA | Number of 80186 DMA channels | +-------+-----------+-----------------------------------+
Entry Parameters
AH = 0Fh
Exit Parameters
Carry flag = 0 if no error; 1 if error ES = Segment of the resource count structure DX = Offset of the resource count structure AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range
Example Call
MOV AH,0Fh ;get resource count code INT 72 ;request service JC ERROR_HAN ;if error, AL = error code ;if here: ;ES contains the segment of the resource count information ;DX contains the offset of the resource count information
Returns the next available and unused number for a resource.
INVOCATION: INT 72h, AH = 11h
------------------------------------------
FUNCTION:
This SVI returns the next available and unallocated number for a specified resource type. An error code is returned when all the resource numbers for a specific resource type are in use.
This routine does not enable interrupts.
This SVI is valid for Realtime Control Microcode, Version 2.x only.
Entry Parameters
AH = 11h AL = Resource type 00h = Hardware timer 01h = 80186 DMA Channel 02h = User Interrupt Vector 03h = Software Timer 04h = User Queue 05h = Task Number
Exit Parameters
Carry flag = 0 if no error; 1 if error AH = Next available resource number AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 0Dh No resource available -All resources of this type are in use
Example Call
MOV AH,11h ;get next available resource code MOV AL,04 ;get next available user queue INT 72 ;request service JC ERROR_HAN ;if error, AL = error code ;if here: ;AH contains the number of the next available resource
Gets the logical segment address and number of pages in the expanded memory page frame.
INVOCATION: INT 72h, AH = 04h
------------------------------------------
FUNCTION:
This SVI returns the 80186 logical segment address of the expanded memory page frame and the number of 16KB pages in the page frame. An expanded memory logical page can be viewed at the page frame segment address once it has been mapped to the page frame.
This SVI is only valid when expanded memory is present on a Portmaster Adapter/A.
Entry Parameters
AH = 04h
Exit Parameters
ES = Page frame segment address CF = 0 if no error; 1 if error AL = Number of pages in frame if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -Expanded memory not present
Example Call
MOV AH,04h ;get page frame segment address code INT 72 ;request service JC ERROR_HAN ;if error, AL = error code ;if here: ;ES contains the segment address of the page frame ;AL contains the number of pages in the page frame
Returns the number of unallocated pages and the total number of expanded memory pages.
INVOCATION: INT 72h, AH = 05h
------------------------------------------
FUNCTION:
This SVI provides expanded memory usage information.
This SVI is only valid when expanded memory is present on a Portmaster Adapter/A.
Entry Parameters
AH = 05h
Exit Parameters
Carry flag = 0 if no error; 1 if error BX = Number of unallocated expanded memory pages DX = Total number of expanded memory pages AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -Expanded memory not present
Example Call
MOV AH,05h ;get unallocated page count code INT 72 ;request service JC ERROR_HAN ;if error, AL = error code ;if here: ;BX contains the number of unallocated expanded memory pages ;DX contains the total number of expanded memory pages
Maps or unmaps logical expanded memory pages to a page frame page.
INVOCATION: INT 72h, AH = 06h
------------------------------------------
FUNCTION:
This SVI maps or unmaps logical expanded memory pages to a page frame page. The page frame page number is the page in 80186 addressable memory where the expanded memory page is to be mapped.
The page frame page numbers range from 0 through the number of pages in the page frame minus 1.
The logical page number contains the number of the page to be mapped to the page frame. Logical pages are numbered 0 (relative) and must be in the range 0 through the number of pages allocated to the EMM handle minus 1. If a logical page number of FFFFh is specified, the page frame page number specified in AL will be unmapped and made inaccessible for reading or writing. On return, the ES register contains the 80186 segment address of the mapped logical page.
The Realtime Control Microcode preserves the mapping of expanded memory pages across dispatch cycles.
This routine does not enable interrupts.
This SVI is only valid when expanded memory is present on a Portmaster Adapter/A.
Entry Parameters
AH = 06h AL = Page frame page number BX = EMM handle logical page number DX = EMM handle
Exit Parameters
Carry flag = 0 if no error; 1 if error ES = Segmented address of mapped page AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -Expanded memory not present 0Eh Unknown EMM handle 0Fh EMM logical page number out of range 10h Page frame page number out of range
Example Call
MOV AH,06h ;map/unmap EMM handle pages code MOV AL,00h ;page frame page number 0 MOV BX,02h ;EMM logical page number 2 MOV DX,03h ;EMM handle INT 72 ;request service JC ERROR_HAN ;if error, AL = error code ;if here: ;ES contains the segment address of the mapped page
Maps or unmaps physical expanded memory pages to a page frame page.
INVOCATION: INT 72h, AH = 07h
------------------------------------------
FUNCTION:
This SVI maps or unmaps physical expanded memory pages to a page frame page. The page frame page number is the page in 80186 addressable memory where the expanded memory page is to be mapped. The page frame page numbers range from 0 through the number of pages in the page frame minus 1.
If a physical address of FFFFFFFFh is specified, the page number specified in AL is unmapped and made inaccessible for reading or writing.
The Realtime Control Microcode preserves the mapping of expanded memory pages across dispatch cycles.
This routine does not enable interrupts.
This SVI is only valid when expanded memory is present on a Portmaster Adapter/A.
Entry Parameters
AH = 07h AL = Page frame page number ES = 32-bit physical address high DX = 32-bit physical address low
Exit Parameters
Carry flag = 0 if no error; 1 if error ES = Segment of mapped memory DX = Offset of mapped memory AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -Expanded memory not present 10h Page number out of range 11h Physical address mapped, but unallocated 12h Address out of range 32-bit address exceeds physical memory 13h Non-valid data -Non-valid 32-bit address Address falls within PROM address space
Example Call
MOV AH,07h ;map/unmap physical memory code MOV AL,01h ;page frame page number 1 MOV ES,0010h ;upper word of physical address 00100000h MOV DX,0000h ;lower word of physical address 00100000h INT 72 ;request service JC ERROR_HAN ;if error, AL = error code ;if here: ;ES contains the segment of the mapped memory ;DX contains the offset of the mapped memory
Converts an EMM handle address to a physical address.
INVOCATION: INT 72h, AH = 08h
------------------------------------------
FUNCTION:
This SVI converts an EMM handle, logical page number, and offset to a 32-bit physical address.
This SVI is only valid when expanded memory is present on a Portmaster Adapter/A.
Entry Parameters
AH = 08h BX = Offset CX = Logical page number DX = EMM handle
Exit Parameters
Carry flag = 0 if no error; 1 if error ES = 32-bit physical address high DX = 32-bit physical address low AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -Expanded memory not present 12h Address out of range Offset greater than 16K 0Eh Unknown EMM handle 0Fh Logical page number out of range
Example Call
MOV AH,08h ;EMM handle to physical address code MOV BX,0050h ;offset within the EMM logical page MOV CX,02h ;EMM logical page number 2 MOV DX,03h ;EMM handle INT 72 ;request service JC ERROR_HAN ;if error, AL = error code ;if here: ;ES contains the upper word of the 32 bit physical address ;DX contains the lower word of the 32 bit physical address
Converts an EMM handle address to a page offset address
INVOCATION: INT 72h, AH = 09h
------------------------------------------
FUNCTION:
This SVI converts an EMM Handle, logical page number, and offset to a 32-bit page:offset address. The page:offset address is used by the system unit to view physical memory. If the window size is greater than 64KB, the returned offset is 0 through 64KB and the page number is a logical 64KB page.
This SVI is only valid when expanded memory is present on a Portmaster Adapter/A.
Entry Parameters
AH = 09h BX = Offset CX = Logical page number DX = EMM handle
Exit Parameters
Carry flag = 0 if no error; 1 if error ES = Page DX = Offset AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -Expanded memory not present 0Eh Unknown EMM handle 0Fh Logical page number out of range 12h Address out of range -Page number cannot be stored in a 16-bit register 13h Non-valid data -Offset specified in BX is > 16K
Example Call
MOV AH,09h ;EMM handle to physical address code MOV BX,0050h ;offset within the EMM logical page MOV CX,02h ;EMM logical page number 2 MOV DX,03h ;EMM handle INT 72 ;request service JC ERROR_HAN ;if error, AL = error code ;if here: ;ES contains the page number ;DX contains the offset
Saves the expanded memory page frame mapping on the stack.
INVOCATION: INT 72h, AH = 0Ah
------------------------------------------
FUNCTION:
This SVI saves the contents of the page mapping registers for the entire page frame on the stack. This function is used to save the memory mapping context when an interrupt occurs.
Every PUSH PAGE MAP call must have a corresponding POP PAGE MAP call. To maintain stack integrity, these calls must be used like the 80186 Push and Pop instructions are used to preserve the register environment in an interrupt handler.
This SVI is only valid when expanded memory is present on a Portmaster Adapter/A.
Entry Parameters
AH = 0Ah
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -Expanded memory not present 1Bh Stack overflow/underflowExample Call
MOV AH,0Ah ;push page map code INT 72 ;request service JC ERROR_HAN ;if error, AL = error code
Restores the expanded memory page frame mapping previously saved by a PUSH PAGE MAP call.
INVOCATION: INT 72h, AH = 0Bh
------------------------------------------
FUNCTION:
This SVI restores the expanded memory page frame mapping previously saved by a PUSH PAGE MAP call. It should be used only in conjunction with the Push Page Map routine.
This SVI is only valid when expanded memory is present on a Portmaster Adapter/A.
Entry Parameters
AH = 0Bh
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -Expanded memory not present 1Bh Stack overflow/underflow
Example Call
MOV AH,0Bh ;pop page map code INT 72 ;request service JC ERROR_HAN ;if error, AL = error code
Enables or disables the Half Rate Select (HRS).
INVOCATION: INT 74h, AH = 00h
---------------------------------------------------
FUNCTION:
This SVI controls the HRS output modem control signal. On the Realtime Interface Co-Processor, the Multiport, and the Multiport/2 adapters' interface boards, this signal is an output on ports 0 and 1. On the Portmaster Adapter/A and the Multiport Adapter, Model 2 adapters' interface boards, this signal can be either an input, output, or both as determined by the Interface Board ROS. If the interface board supports HRS as an output on the port requested, this SVI is used to control it. A new error code has been added to be returned when the service is called for a valid port that does not support HRS as an output.
This SVI assumes that the initial allocation state of the CIO ports is preserved.
This routine does not enable interrupts.
Entry Parameters
AH = 00h AL = Port Number (0-1 permitted for the Realtime Interface Co-Processor, the Multiport, and the Multiport/2 adapters) (0-5 when using the 6-port synchronous interface board) (0-7 when using the Portmaster Adapter/A and the Multiport Adapter, Model 2) CH = Enable/disable 00h = Disable 01h = Enable
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -HRS not an output on port 18h Non-valid port number -Non-valid port requested
Example Call
MOV AH,00h ;required to toggle half rate ; select on or off MOV AL,01h ;port 1 selected MOV CH,01h ;enable half-rate INT 74h ;request service ; logical control line support JC ERROR_HAN ;if error, AL = error code
Enables or disables the transmit function of the specified port.
INVOCATION: INT 74h, AH = 01h
---------------------------------------------------
FUNCTION:
This SVI enables or disables the transmit function of the specified port. Disabled is the default for this function during power-up. It is the responsibility of the application to verify that the installed interface board is appropriate for the service requested. An error code is returned when this service is called for a valid port that does not support transmit control.
This SVI assumes that the initial allocation state of the CIO ports is preserved.
This routine does not enable interrupts.
Entry Parameters
AH = 01h AL = Port number CH = Enable/disable 00h = Disable 01h = Enable
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -Transmit control not supported on port 18h Non-valid port number -Non-valid port requested
Example Call
MOV AH,01h ;required to toggle transmit ; control on or off MOV AL,04h ;port 4 selected MOV CH,01h ;enable transmit INT 74h ;request service ; logical control line support JC ERROR_HAN ;if error, AL = error code
Controls the request to send (RTS) and the data terminal ready (DTR) outputs of the specified port.
INVOCATION: INT 74h, AH = 02h
---------------------------------------------------------
FUNCTION:
This SVI controls the RTS and DTR control outputs to the specified port. They can be enabled, disabled, or both (one enabled and the other disabled). It is the responsibility of the application to verify that the installed interface board is appropriate for the service requested. An error code is returned when this SVI is called for a valid port that does not support RTS/DTR.
For the Realtime Interface Co-Processor, the Multiport, and the Multiport/2 adapters, use of this SVI requires that all writes to the SCC, except to the SCC data register (write register 8) and the command register (write register 0), must be performed using Realtime Control Microcode and PROM Services (such as SCCREGS). For this SVI, it is assumed that the initial allocation state of the CIO ports is preserved.
This routine does not enable interrupts.
Entry Parameters
AH = 02h AL = Port number CH = Control select (1 = select; 0 = not affected). Control Bits +---+---+---+---+---+---+---+---+ | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | | | | | | | | | | | | +---- RTS | | | | | | | | | | | | | +-------- DTR | | | | | | | | | | | +------------ 0 | | | | | | | | | +---------------- 0 | | | | | | | +-------------------- 0 | | | | | +------------------------ 0 | | | +---------------------------- 0 | +-------------------------------- 0 CL = Enable/disable (1 = enable; applicable only to selected outputs). Enable/Disable Bits +---+---+---+---+---+---+---+---+ | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | | | | | | | | | | | | +-- RTS | | | | | | +------ DTR | | | | | +----------- 0 | | | | | | | | | +--------------- 0 | | | | | | | +------------------- 0 | | | | | +----------------------- 0 | | | +--------------------------- 0 | +------------------------------- 0
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -Function not supported on port 18h Non-valid port number -Non-valid port requested
Example Call
MOV AH,02h ;AH = 2, parameter required ; to toggle RTS/DTR control MOV AL,05h ;port 5 selected MOV CH,01h ;RTS selected MOV CL,01h ;RTS enabled INT 74h ;request service JC ERROR_HAN ;if error, AL = error code
Queries the external/status control inputs of the specified port.
INVOCATION: INT 74h, AH = 03h
---------------------------------------------------------
FUNCTION:
This routine does not enable interrupts.
Realtime Interface Co-Processor, Multiport, and Multiport/2
For the Realtime Interface Co-Processor, the Multiport, and the Multiport/2 adapters, this SVI returns the values of the external/status control inputs (DCD, zero count, transmit underrun, break/abort, CTS, RI, and DSR) for the specified port. It should only be used for RS-232-C ports, RS-422-A ports, or SCC/CIO packages. It is the responsibility of the application to verify that the installed interface board is appropriate for the service requested.
Portmaster Adapter/A and Multiport Adapter, Model 2
For the Realtime Interface Co-Processor Portmaster Adapter/A and the Multiport Adapter, Model 2 adapters, zero count, transmit underrun, and break/abort bits (1, 6, and 7) are reserved and zeros are returned. If Half Rate Select (HRS) is defined as an input signal, the value is returned in bit 2. This SVI should only be used with communication port packages.
Entry Parameters
AH = 03h AL = Port number
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error AH = Return status Control Bits +---+---+---+---+---+---+---+---+ | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | | | | +-- Ring Indicate | | | | | | | (RS-232-C only) | | | | | | | | | | | | | +------ Zero Count | | | | | | | | | | | +---------- HRS | | | | | | | | | +-------------- DCD (RS-232-C only) | | | | | | | +------------------ DSR (RS-232-C only) | | | | | +---------------------- CTS (RS-232-C only) | | | +------------------------- Transmit Underrun | +------------------------------ Break/Abort
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -Function not supported on port 18h Non-valid port number -Non-valid port requested
Example Call
MOV AH,03h ;required to query external/ ; status inputs MOV AL,06h ;port 6 selected INT 74h ;request service JC ERROR_HAN ;if error, AL = error code ;If here: ; AH = Return status
Enables or disables the interrupt capabilities of the specified control inputs for the specified port.
INVOCATION: INT 74h, AH = 04h
---------------------------------------------------------
FUNCTION:
This routine does not enable interrupts.
Realtime Interface Co-Processor, Multiport, and Multiport/2
For the Realtime Interface Co-Processor, the Multiport, and the Multiport/2 adapters, this SVI enables and/or disables the external/status interrupt inputs (CTS, DSR, DCD, zero count, transmit underrun, ring indicate, and break/abort) for the specified port.
This SVI should only be used for RS-232-C ports, RS-422-A ports, or SCC/CIO packages. It is the responsibility of the application to verify that the installed interface board is appropriate for the service requested. Once enabled, the external/status input generates an interrupt on every successive state change, providing that the interrupts are serviced (see CLEAR EXTERNAL/STATUS INTERRUPT) and are not disabled. This SVI assumes that the initial state of the CIO ports is preserved.
Multiple inputs may be affected by one call. A control mask indicates the inputs affected by the call; all others are left in their previous states. Enabling and disabling different inputs can be done by the same call. A control value indicates the request to enable or disable the input for each affected input.
Portmaster Adapter/A and Multiport Adapter, Model 2
For the Realtime Interface Co-Processor Portmaster Adapter/A and the Multiport Adapter, Model 2 adapters, the zero count, transmit underrun, and break/abort bits (1, 6, and 7) are reserved and zeros are returned. If Half Rate Select (HRS) is defined as an input signal, the value is returned in bit 2. The DCD and CTS signals share an interrupt enable bit. They are either enabled or disabled together. If the bits for DCD and CTS are set differently, DCD gets precedence over CTS and the bits are enabled or disabled according to the DCD bits in register CX. This SVI should only be used with communication port packages.
Entry Parameters
AH = 04h AL = Port number CH = Control mask (controls to be affected by this call; 0 = not affected) CL = Control value (enable/disable flag for each control; 1 = enable) Control Bits +---+---+---+---+---+---+---+---+ | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | | | | +-- Ring Indicate | | | | | | | (RS-232-C only) | | | | | | | | | | | | | +------ Zero Count | | | | | | | | | | | +---------- HRS | | | | | | | | | +-------------- DCD (RS-232-C only) | | | | | | | +------------------ DSR (RS-232-C only) | | | | | +---------------------- CTS (RS-232-C only) | | | +-------------------------- Transmit Underrun | +------------------------------ Break/Abort
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -Function not supported on port 18h Non-valid port number -Non-valid port requested
Example Call
MOV AH,04h ;required to enable or disable ; external/status ;interrupt control inputs MOV AL,07h ;port 7 selected MOV CH,0FDh ;all external\status inputs ; selected MOV CL,010h ;DSR enabled, all others ; disabled INT 74h ;request service JC ERROR_HAN ;if error, AL = error code(Ref #1.)
Clears the interrupting conditions of an external/status interrupt for the specified port.
INVOCATION: INT 74h, AH = 05h
--------------------------------------------------
FUNCTION:
This routine does not enable interrupts.
Realtime Interface Co-Processor, Multiport, and Multiport/2
For the Realtime Interface Co-Processor, Multiport, and Multiport/2 adapters, this SVI clears the external/status interrupt for the specified port. This includes issuing an end-of-interrupt (EOI) to the SCC and/or CIO as required, clearing Interrupt Pending and Interrupt Under Service on the CIO as required, and issuing a reset external/status to the SCC port. The value of the external/status inputs is returned. This SVI should only be used for RS-232-C ports, RS-422-A, or SCC/CIO packages. It is the responsibility of the application to verify that the installed interface board is appropriate for the service requested. This SVI assumes that the initial state of the CIO ports is preserved. It does not issue a nonspecific EOI to the 80186 processor.
Portmaster Adapter/A and Multiport Adapter, Model 2
For the Realtime Interface Co-Processor Portmaster Adapter/A and the Multiport Adapter, Model 2 adapters, this SVI does not issue a nonspecific EOI to the 80186 processor or DMA/Peripheral interface communications port; this must be done by the user. The zero count, transmit underrun, and break/abort bits (1, 6, and 7) are reserved and zeros are returned. If HRS is defined as an input signal, the value is returned in bit 2. This SVI should be used with communication port packages.
Entry Parameters
AH = 05h AL = Port number
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error: Error code if error AH = Value of external status control inputs (as shown here) Bits +---+---+---+---+---+---+---+---+ | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | | | | +-- Ring Indicate | | | | | | | (RS-232-C only) | | | | | | | | | | | | | +------ Zero Count | | | | | | | | | | | +---------- HRS | | | | | | | | | +-------------- DCD (RS-232-C only) | | | | | | | +------------------ DSR (RS-232-C only) | | | | | +---------------------- CTS (RS-232-C only) | | | +-------------------------- Transmit Underrun | +------------------------------ Break/Abort
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 05h Access denied -Function not supported on port 18h Non-valid port number -Non-valid port requested
Example Call
MOV AH,05h ;required to clear external/ ; status interrupts MOV AL,07h ;port 7 selected INT 74h ;request service JC ERROR_HAN ;if error, AL = error code ;If here: ; AH = Value of the external/status control inputs
Reads or writes the specified data bits for the specified CIO port.
INVOCATION: INT 74h, AH = 06h
-----------------------------------------------------
FUNCTION:
This SVI reads or writes specified data bits for the specified CIO port. No check is made to ensure that the requestor is the owner of the CIO port. No checks are made to ensure that a read is requested for an input bit or a write is requested for an output bit. Data polarity resolution is the responsibility of the requestor. This SVI should only be used for CIO ports, SCC/CIO packages, or communication port packages.
This routine does not enable interrupts.
Entry Parameters
For the Realtime Interface Co-Processor, the Multiport, and the Multiport/2 adapters:
AH = 06h AL = CIO Port Number (0-3 permitted) DL = 00h if Read request; 01h if Write request CL = Requested bits to be read or written (0 = no action) CH = Values to be written (only bits = 1 of CH are affected)
For the Realtime Interface Co-Processor Portmaster Adapter/A and the Multiport Adapter, Model 2 adapters:
AH = 06h AL = CIO Port Number 00 = CIO 0, Port A 01 = CIO 0, Port B 02 = CIO 1, Port A 03 = CIO 1, Port B 04 = CIO 1, Port C 05 = CIO 2, Port A 06 = CIO 2, Port B 07 = CIO 2, Port C 08 = CIO 3, Port A 09 = CIO 3, Port B 10 = CIO 3, Port C 11 = CIO 4, Port A 12 = CIO 4, Port B 13 = CIO 4, Port C 14 = CIO 5, Port A 15 = CIO 5, Port B 16 = CIO 5, Port C 17 = CIO 6, Port A 18 = CIO 6, Port B 19 = CIO 6, Port C 20 = CIO 7, Port A 21 = CIO 7, Port B 22 = CIO 7, Port C DL = 00h if Read request; 01h if Write request CL = Requested bits to be read or written (0 = no action) CH = Values to be written
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error AH = Value read (if read requested; only requested bits are valid)
Errors
------------------------------------------------------------- AL Code Meaning Causes ------------------------------------------------------------- 01h Non-valid entry parameter -AH is out of range 18h Non-valid port number -Non-valid port requested
Example Call
MOV AH,06h ;parm required to read or ; write specific CIO bits MOV AL,00h ;port 0 selected MOV DL,01h ;write requested MOV CL,0F0h ;mask = F0h MOV CH,0A0h ;Value = A0h INT 74h ;request write of Ah to upper ; nibble while leaving lower ; nibble unchanged JC ERROR_HAN ;if error, AL = error code
Sets the DTE/DCE clocking options of the transmitter clock on a communications port.
INVOCATION: INT 74h, AH = 07h
--------------------------------------------------------
FUNCTION:
This SVI sets the DTE/DCE clocking options of the transmitter clock on individual communications ports. If the clocking options are not configurable, an error is returned; if possible, the clocking options set in hardware will be returned along with the error. This SVI assumes that the initial allocation state of the CIO ports is preserved.
This SVI is supported in Realtime Control Microcode Version 1.5 and Version 2.x. The Realtime Control Microcode version can be verified by checking the supervisor ID (SUPID) in the interface block. The version is set to 06h in this field for Realtime Control Microcode Version 1.5. The version is set to 0FFh for Realtime Control Microcode Version 2.x.
This routine does not enable interrupts.
Entry Parameters
AH = 07h AL = Port number CH = DCE/DTE clock option 00h = DCE clock 01h = DTE clock
Exit Parameters
Carry flag = 0 if no error; 1 if error AL = Unchanged if no error; error code if error AH = Unchanged if no error; Value of previous clocking option if error code = 19h
Errors
----------------------------------------------------------- AL Code Meaning Causes ----------------------------------------------------------- AL = 01h Non-valid entry parameter - AH is out of range = 18h Non-valid port number - Non-valid port requested - Port can not be used as a synchronous port = 19h Service can not be - AH contains clocking provided on specified option set in hardware port AH values are 00 - DCE clock set in hardware 01 - DTE clock set in hardware 02 - hardware clocking option cannot be read. Task is running on Realtime Control Microcode or Realtime Control Microcode Multiport card - It is the responsibility of the application to compare the returned clocking option with the requested one and if they do not match, set the clocking option correctly in hardware
Example Call
MOV AH,07h ;required to set clocking option MOV AL,02h ;port 2 selected MOV CH,01h ;request clocking set to DTE INT 74h ;request service ; logical control line support JC ERROR_HAN ;if error, AL = error code
The programmable read-only memory (PROM) services reside in the co-processor adapter's PROM. These services are accessible to the Realtime Control Microcode and to co-processor adapter tasks.
The PROM services are invoked through interrupt vectors from INT A0h through CEh.
The following tables list each PROM Service interrupt along with differences in support provided for Multiport Adapter, Model 2 and Portmaster Adapter/A.
+--------------------------------------------------------------------+ | List of PROM Services | +------+------+-------------+------------------------------+---------+ | Int | AH | Name | Function | Comment | | No. | Code | | | | +------+------+-------------+------------------------------+---------+ | A0h | | INTPCL | Raises interrupts to the | | | | | | system unit | | | | | | | | | A2h | | SCCRESET | Issues a software reset | | | | | | to the selected SCC port | | | | | | | | | A4h | | SCCREGS | Reads or writes to the | | | | | | SCC registers of a | | | | | | selected port | | | | | | | | | A6h | | CIOREGS | Enables, disables, or | | | | | | configures a CIO port | | | | | | and also accesses the | | | | | | CIO registers | | | | | | | | | A8h | | CIOTMR | Stops, starts, triggers, | | | | | | retriggers, configures, | | | | | | and/or reconfigures the | | | | | | hardware timers and sets | | | | | | time-out values for those | | | | | | timers | | | | | | | | | AAh | | DMACONNECT | Connects either DMA | | | | | | channel or both DMA | | | | | | channels | | | | | | | | | ACh | | DMASUPPORT | Sets up and starts | | | | | | DMA channel | | | | | | | | | AEh | | DMAREGS | Reads and writes to the | | | | | | DMA registers | | | | | | | | | B0h | | DMASTOP | Immediately stops a DMA | | | | | | channel | | | | | | | | | B2h | | DMAADDR | Translates a logical | | | | | | address to the corre- | | | | | | sponding physical address | | | | | | | | | B6h | | SEG2PAGL | Translates a storage | | | | | | address from | | | | | | segment:offset to | | | | | | page:offset | | | | | | | | | B8h | | PAG2SEGL | Translates a storage address | | | | | | from page:offset | | | | | | into segment:offset | | | | | | | | | C0h | | POINTER TO | Points to EBCDIC-ASCII | | | | | EBCDIC- | PROM-resident conversion | | | | | ASCII TABLE | tables | | | | | | | | | C2h | | EBC2ASC | Converts an EBCDIC string | | | | | | to an ASCII string | | | | | | | | | C4h | | ASC2EBC | Converts an ASCII string | | | | | | to an EBCDIC string | | | | | | | | | C6h | | ADDINTRA | Adds an element to a ring | | | | | | structure with 16-bit | | | | | | forward and backward | | | | | | pointers | | | | | | | | | C8h | | REMINTRA | Removes an element from | | | | | | a ring structure with | | | | | | 16-bit forward and back- | | | | | | ward pointers | | | | | | | | | CAh | | ADDINTER | Adds an element to a ring | | | | | | structure with 32-bit | | | | | | forward and backward | | | | | | pointers | | | | | | | | | CCh | | REMINTER | Removes an element of a | | | | | | ring structure with 32-bit | | | | | | forward and backward | | | | | | pointers | | | | | | | | | CEh | 00h | SEG2PHYT | Converts a logical address | Note 1 | | | | | to a translated physical | | | | | | address | | | | | | | | | CEh | 01h | PHY2PAG | Translates a 32-bit physical | Note 1 | | | | | address to page:offset | | | | | | | | | CEh | 02h | PDMAREGS | Reads from or writes to a | Note 1 | | | | | DMA/Peripheral Interface | | | | | | Controller (DMAPIC) Channel | | | | | | | | | CEh | 03h | BMREGS | Reads from or writes to a | Note 2 | | | | | bus master channel | | | | | | | | | CEh | 04h | BMSTOP | Stops a bus master channel | Note 2 | | | | | | | | CEh | 05h | BMRESET | Resets a bus master channel | Note 2 | | | | | | | | CEh | 06h | DAC | Reads from or writes to the | Note 2 | | | | | DAC registers | | | | | | | | | CEh | 07h | TTREGS | Reads from or writes to the | Note 2 | | | | | translate table | | | | | | | | | CEh | 08h | BMSTART | Starts a bus master channel | Note 2 | +------+------+-------------+------------------------------+---------+
Notes:
The following error codes are set in register AH when an error is detected during execution of PROM services. The error codes set by the PROM services are:
+-----------------------------------------------------------------+ | List of PROM Services Error Codes | +------------+-----+------+--------+--------+---------------------+ | Module | INT | AH | Carry | Error | Meaning | | Name | No. | Code | Flag | Code | | | | | | Modify | Reg AH | | +------------+-----+------+--------+--------+---------------------+ | INTCPL | A0h | | No | 01h | Request rejected. | | | | | | | Prior interrupt | | | | | | | still in | | | | | | | progress. | | CCRESET | A2h | | No | None | | | | | | | | | | CCREGS | A4h | | | None | | | | | | | | | | CIOREGS | A6h | | No | 01h | Request rejected. | | | | | | | Non-valid register | | | | | | | specification. | | CIOTMR | A8h | | No | None | | | | | | | | | | DMACONNECT | AAh | | No | 01h | Non-valid call | | | | | | | | | DMASUPPORT | ACh | | No | 01h | Request rejected. | | | | | | | Non-valid Request | | | | | | | parameters. | | DMAREGS | AEh | | No | None | | | | | | | | | | DMASTOP | B0h | | No | None | | | | | | | | | | DMAADDR | B2h | | No | None | | | | | | | | | | SEG2PAGL | B6h | | No | None | | | | | | | | | | PAGE2SEGL | B8h | | No | None | | | | | | | | | | POINTER TO | C0h | | No | None | (Not called - | | EBCDIC- | | | | | Int Vector) | | ASCII TABLE| | | | | | | | | | | | | | EBC2ASC | C2h | | No | 01h | Request rejected. | | | | | | | 0-byte count. | | | | | | | | | ASC2EBC | C4h | | No | 01h | Request rejected. | | | | | | | 0-byte count in | | | | | | | CX entry parameter. | | | | | | | | | ADDINTRA | C6h | | No | None | | | | | | | | | | REMINTRA | C8h | | Yes | 01h | Next and/or previous| | | | | | | pointers in user | | | | | | | element are | | | | | | | incorrect | | | | | | | | | ADDINTER | CAh | | No | None | | | | | | | | | | REMINTER | CCh | | Yes | 01h | Next and/or previous| | | | | | | pointers in user | | | | | | | element are | | | | | | | incorrect | | | | | | | | | SEG2PHYT | CEh | 00h | Yes | 01h | Input address error | | | | | | | | | PHY2PAG | CEh | 01h | Yes | 02h | Page number cannot | | | | | | | be stored in 16-bit | | | | | | | register | | PDMAREGS | CEh | 02h | No | None | | | | | | | | | | BMREGS | CEh | 03h | Yes | 01h | Non-valid bus master| | | | | | | channel number | | | | | | | | | BMSTOP | CEh | 04h | Yes | 01h | Non-valid bus master| | | | | | | channel number | | | | | | | | | BMRESET | CEh | 05h | Yes | 01h | Non-valid bus master| | | | | | | channel number | | | | | | | | | DAC | CEh | 06h | No | None | | | | | | | | | | TTREGS | CEh | 07h | Yes | 01h | Selector out of | | | | | | | range | | | | | | 02h | Data out of range | | | | | | | | | BMSTART | CEh | 08h | Yes | 01h | Non-valid bus master| | | | | | | channel number | +------------+-----+------+--------+--------+---------------------+
A description of each PROM service is provided in the remainder of this chapter.
Raises an interrupt to the system unit.
INVOCATION: INT A0h
----------------------------------------------------
FUNCTION:
This service raises an interrupt to the system unit. The request is rejected if the interrupt ID byte (INTID) within the interface block at offset 0441h in page 0 of co-processor adapter memory indicates that a prior request is still pending. The option to wait for system unit response may cause long delays while polling. This option should be used with caution.
This routine may be interrupted only if the option to wait for the system unit response is selected. Otherwise, this routine does not enable interrupts.
Entry Parameters
AL = Task number AH = xxxx xxxA (bits 1-7 not used) A = 0, Do not wait for interrupt response from system unit; A = 1, Wait for interrupt response by continuous monitoring of the interrupt ID (INTID) byte
Exit Parameters
AH = xxxx xxxB (bits x 1-7 unpredictable) where: B = 0, interrupt raised to system unit normally; B = 1, request rejected because prior interrupt still in process
Errors
None
Registers Changed
AH
Example Call
MOV AL,01h ;task 1 to interrupt system unit MOV AH,00h ;no wait for system unit response INT 0A0h ;request for service TEST AH,01h ;if AH = 00, no error; if JNZ ERROR_HAN ;AH = 01, error and jump
Issues a software reset to the selected SCC port.
INVOCATION: INT A2h
----------------------------------------------------
FUNCTION:
This service issues a software reset to the selected SCC port, resulting in a port reset to the register default values. Refer to the Realtime Interface Co-Processor Firmware Technical Reference, Volume III, formore information about the states to which the communication controllers will be set.
Notes:
Entry Parameters
AH = SCC port. For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, the valid range for this parameter depends on the presence of Zilog SCCs 1-3, as indicated in the HCD described in the Realtime Interface Co-Processor Firmware Technical Reference, Volume III.. The presence of SCC 0 is always assumed. Consequently, the valid range always includes SCC ports 0 and 1. For the Realtime Interface Co-Processor Multiport, Model 2 and the Portmaster Adapter/A, the valid range depends on the presence of additional Signetics DUSCCs, as indicated in the HCD described under . The presence of DUSCC 0 is not assumed. The table that follows indicates the relationship between those SCCs that are present and functioning and the valid ports for this parameter. DUSCC/SCC DUSCC/SCC ports --------- ---------------- 0 0,1 1 2,3 2 4,5 3 6,7 4 8,9 5 10,11 6 12,13 7 14,15 8 16,17 9 18,19 10 20,21 11 22,23 12 24,25 13 26,27 14 28,29 15 30,31
Exit Parameters
AH = 00h if no error; 01h if error
Errors
AH = 01 if a non-valid SCC port is specified
Registers Changed
AL, DX
Example Call
STI ;enable interrupts to 80C186 MOV DX, DUSCCBASE ;get DUSCC base address ADD DL, AH ;add DUSCC IER register offset OUT DX, AL ;write zeros to IER MOV AL,00h ;reset SCC port 0 INT 0A2h ;request for service TEST AH,01h ;if AH = 00, no error; if JNZ ERROR_HAN ; AH = 01, error and jump
Reads or writes the specified SCC port's registers.
INVOCATION: INT A4h
----------------------------------------------------
FUNCTION:
This service is used to read any of the SCC registers or write to any of the specified SCC port's write registers. No enabling or disabling of the port is done automatically. No checking is done to verify that you own the SCC port or that the values written are meaningful. A pointer to a fixed-format parameter table must be passed in DS:SI. The first byte of this table must be a non-zero count of registers to write or read. Following the count byte are byte pairs of which the first byte is always a pointer to the register to be read or written. If writes are requested, the second byte in each pair is the value to write. If reads are requested, the second byte in each pair is overwritten with the value read.
For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, which support Zilog SCCs, this routine adjusts the values of write/read registers 12 and 13 to account for the different SCC clock speeds of the co-processor adapters. Software compatibility is maintained by having software assume an SCC clock speed of 3.68 MHz on all co-processor adapters. Thus, the actual values read/written to registers 12 and 13 could differ from the specified values.
Restrictions: Write registers 2 and 9 of the Zilog SCC, and the Signetics DUSCC ICR, IVR and MRR should not be written. Changing these registers may yield unpredictable results.
Notes:
Entry Parameters
AL = SCC port. For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, the valid range for this parameter depends on the presence of Zilog SCCs 1-3, as indicated in the HCD described under . The presence of SCC 0 is always assumed. Consequently, the valid range always includes SCC ports 0 and 1. For the Realtime Interface Co-Processor Multiport, Model 2 and the Portmaster Adapter/A, the valid range depends on the presence of additional Signetics DUSCCs as indicated in the HCD described under . The presence of DUSCC 0 is not assumed. The table that follows indicates the relationship between those SCCs that are present and functioning and the valid ports for this parameter. DUSCC/SCC DUSCC/SCC ports --------- ---------------- 0 0,1 1 2,3 2 4,5 3 6,7 4 8,9 5 10,11 6 12,13 7 14,15 8 16,17 9 18,19 10 20,21 11 22,23 12 24,25 13 26,27 14 28,29 15 30,31 AH = Less than or equal to 7Fh indicates write SCC registers; greater than or equal to 80h indicates read SCC registers DS = Segment pointer to parameter table SI = Offset pointer to parameter table
The format for the parameter table pointed to by DS:SI is as follows:
+---+ Pointer (DS:SI) ---> | C | Where: C = Count/number of +---+---+ registers read or write | X | Y | (number of following +---+---+ words in table) | . | . | X = Register pointer +---+---+ (DZh, where D = | . | . | don't care for SCC or +---+---+ D = 0-3h for DUSCC, and | . | . | Z = 0-Fh) +---+---+ Y = Data to be written | X | Y | to register X +---+---+ (if write) or target location for data from register X (if read) Note: Align C-byte at odd address for speed.
The following table shows the register pointers for the DUSCC registers. For writing directly to the registers, refer to the "Dual Universal Serial Communications Controller" section of the appropriate Hardware Technical Reference for a list of DUSCC registers and their offsets.
+------------------------------------------------------------+ | DUSCC Registers | +----------+----------+--------------------------------------+ | Register | Register | Description | | Pointer | Name | | | (Hex) | | | +----------+----------+--------------------------------------+ | 0 | CMR1 | Channel Mode Register 1 | | 1 | CMR2 | Channel Mode Register 2 | | 2 | S1R | SYN 1/Secondary Address 1 Register | | 3 | S2R | SYN 2/Secondary Address 2 Register | | 4 | TPR | Transmitter Parameter Register | | 5 | TTR | Transmitter Timing Register | | 6 | RPR | Receiver Parameter Register | | 7 | RTR | Receiver Timing Register | | 8 | CTPRH | Counter/Timer Preset Register High | | 9 | CTPRL | Counter/Timer Preset Register Low | | A | CTCR | Counter/Timer Control Register | | B | OMR | Output and Miscellaneous Register | | C | CTH | Counter/Timer High | | D | CTL | Counter/Timer Low | | E | PCR | Pin Configuration Register | | F | CCR | Channel Command Register | | 10 | TxFIFO | Transmitter FIFO | | 14 | RxFIFO | Receiver FIFO | | 18 | RSR | Receiver Status Register | | 19 | TRSR | Transmitter & Receiver Status Reg | | 1A | ICTSR | Input & Counter/Timer Status Reg | | 1B | GSR | General Status Register | | 1C | IER | Interrupt Enable Register | | 1E | IVR | Interrupt Vector Register-Unmodified | | 3E | IVRM | Interrupt Vector Register-Modified | | 1F | ICR | Interrupt Control Register | | 3F | MRR | Master Reset Register | +----------+----------+--------------------------------------+
The following table shows the register pointers for the SCC registers. For writing directly to the registers, refer to the "Z80C30 Serial Communications Controller (SCC)" section of the appropriate Hardware Technical Reference for a list of SCC registers and their offsets.
+------------------------------------------------------------+ | SCC Registers | +----------+-----------+-------------------------------------+ | Register | Register | Description | | Pointer | Name | | | (Hex) | | | +----------+-----------+-------------------------------------+ | 0 | WR0/RR0 | Command/Status Register | | 1 | WR1/RR1 | Control/Status Register | | 2 | WR2/RR2 | Interrupt Vector Register | | 3 | WR3/RR3 | Receiver Parameter Register/ | | | | Interrupt Pending | | 4 | WR4 | Transmit/Receive Miscellaneous | | | | Register | | 5 | WR5 | Transmit Parameters | | 6 | WR6 | Sync Character | | 7 | WR7 | Sync Character | | 8 | WR8/RR8 | Transmit/Receive Buffer | | 9 | WR9 | Master Interrupt Control | | A | WR10/RR10 | Miscellaneous Control/Status | | B | WR11 | Clock Mode Control | | C | WR12/RR12 | Lower Byte BRG | | D | WR13/RR13 | Upper Byte BRG | | E | WR14 | Miscellaneous Control | | F | WR15/RR15 | E/S Interrupt Control | +----------+-----------+-------------------------------------+
Exit Parameters
AH = 00 if no error; 01 if error Values read if read is requested; otherwise, no action is taken.
Errors
AH = 01 if a non-valid port is specified
Registers Changed
AX, SI, BX, CX, DX
Memory Affected
If read, memory pointed to by DS:SI.
Example Call
;table used to store the SCC register values SCC_RDTA DB 02 DB 12,? DB 13,? MOV AL,00h ;read regs for SCC port 0 MOV AH,80h ;value required for a read MOV BX,CS ;COM file implementation MOV DS,BX ;DS = CS MOV SI,OFFSET CC_RDTA ;place values read in table INT 0A4h ;request for service TEST AH,01h ;if AH = 00, no error; if JNZ ERROR_HAN ; AH = 01, error and jump
Enables, disables, or configures a CIO port, and accesses that CIO port's registers.
INVOCATION: INT A6h
----------------------------------------------------
FUNCTION:
This service enables, disables, or configures a CIO port or accesses that CIO port's registers. All registers may be read. All registers except the interrupt vector registers and the command and status registers may be written. If a read or write register request is made, a pointer to a parameter table must be passed in DS:SI. The first byte of this table must be a count of registers to read or write. Following the count are byte pairs in which the first byte in the pair is a pointer to the register to be read or written. If writes are requested, the second byte in each pair is the value to write. If reads are requested, the second byte in each pair is overwritten with the value read.
Restrictions: Port C of CIO 0 cannot be accessed with this call.
Entry Parameters
AL = CIO port desired. For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, the valid range for this parameter depends on the presence of CIO 1, as indicated in the HCD described under . If CIO 1 is present and functioning, the range is 0-3; otherwise, the range is 0-1. For the Realtime Interface Co-Processor Multiport, Model 2 and the Portmaster Adapter/A, the valid range depends on the presence of additional CIOs, as indicated in the HCD described under . If CIO 7 is present and functioning, the range is 0-16h. The table that follows indicates the relationship between those CIOs that are present and functioning and the valid ports for this parameter. AL = 00h CIO 0 Port A AL = 0Eh CIO 5 Port A 01h CIO 0 Port B 0Fh CIO 5 Port B 02h CIO 1 Port A 10h CIO 5 Port C 03h CIO 1 Port B 11h CIO 6 Port A 04h CIO 1 Port C 12h CIO 6 Port B 05h CIO 2 Port A 13h CIO 6 Port C 06h CIO 2 Port B 14h CIO 7 Port A 07h CIO 2 Port C 15h CIO 7 Port B 08h CIO 3 Port A 16h CIO 7 Port C 09h CIO 3 Port B 0Ah CIO 3 Port C 0Bh CIO 4 Port A 0Ch CIO 4 Port B 0Dh CIO 4 Port C AH = 00xx xxx0 Disable port; 01xx xxx0 Enable port; 10xx xxx0 Disable port and write CIO registers; 11xx xxx0 Disable port, write CIO registers and enable port; xxxx xxx1 Read CIO registers DS = Segment pointer to parameter table SI = Offset pointer to parameter table
The parameter table pointed to by DS:SI has the following format:
+----+ Pointer (DS:SI) ---> | C | Where: C = Count/ number of +----+----+ registers to read | X | Y | or write (number +----+----+ of following words | . | . | in table) +----+----+ X = Register pointer | . | . | (DZh, where D = +----+----+ don't care; Z = 0-Fh) | . | . | Y = Data to be written to +----+----+ register X (if write) | X | Y | or target location for +----+----+ data read from register X (if read) Note: Align C-byte at odd address for speed.
Register Pointer Coding
Only the following pointers are valid. These pointers do not correspond directly with the Z8036 CIO register address specification. Registers 09h and 0Ah are read-only; all others are read/write.
Exit Parameters
AH = 00h if no error; 01h if error Values read if a read is requested; otherwise, no action is taken.
Errors
AH = 00h if requested functions performed normally; 01h if rejected due to a non-valid register specification or non-valid port
Registers Changed
AX, SI, BX, CX, DX
Example Call
;READ TABLE FOR CIOREGS CIO_RDTA DB 09 ;number of registers to read DB 00,? ;byte pairs of register DB 01,? ;offsets and register DB 02,? ;values to be read DB 03,? DB 04,? DB 05,? DB 06,? DB 07,? DB 08,? MOV AL,01h ;reset SCC port 1 MOV AH,01h ;read regs for CIO port 1 MOV BX,CS ;COM file implementation MOV DS,BX ;DS = CS MOV SI,OFFSET CIO_RDTA ;place values read in table INT 0A6h ;request for service TEST AH,01h ;if AH = 00, no error; if JNZ ERROR_HAN ;AH = 01, error and jump
Stops, starts, triggers, retriggers, configures, and/or reconfigures the hardware timers, and sets time-out values for those timers.
INVOCATION: INT A8h
----------------------------------------------------
FUNCTION:
This service stops, starts, triggers, retriggers, configures, and/or reconfigures the requestable hardware timers and sets the time-out values for those timers. If a request is made to change the continuous/single cycle mode and/or the time-out value and a restart option is chosen, you should be aware that the reconfiguration does not take effect until the next (re)trigger of the timer.
Restrictions: Timer 3 of CIO 0 cannot be accessed with this call.
Entry Parameters
AL = Timer to be affected. For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, the valid range for this parameter depends on the presence of CIO 1, as indicated in the HCD described under . If CIO 1 is present and functioning, the range is 0-4; otherwise, the range is 0-1. For the Realtime Interface Co-Processor Multiport, Model 2 and the Portmaster Adapter/A, the valid range depends on the presence of additional CIOs, as indicated in the HCD described under . If CIO 7 is present and functioning, the range is 0-16h.
Entry Parameters (Continued)
The table that follows indicates the relationship between those CIOs that are present and functioning and the valid ports for this parameter. AL = 00h CIO 0 timer 1 AL = 0Eh CIO 5 timer 1 01h CIO 0 timer 2 0Fh CIO 5 timer 2 02h CIO 1 timer 1 10h CIO 5 timer 3 03h CIO 1 timer 2 11h CIO 6 timer 1 04h CIO 1 timer 3 12h CIO 6 timer 2 05h CIO 2 timer 1 13h CIO 6 timer 3 06h CIO 2 timer 2 14h CIO 7 timer 1 07h CIO 2 timer 3 15h CIO 7 timer 2 08h CIO 3 timer 1 16h CIO 7 timer 3 09h CIO 3 timer 2 0Ah CIO 3 timer 3 0Bh CIO 4 timer 1 0Ch CIO 4 timer 2 0Dh CIO 4 timer 3 AH = xxxx xxx1 Activates bit 2; set single or continuous mode where: xxxx x0x1 Stop timer and set single cycle mode xxxx x1x1 Stop timer and set continuous cycle mode = x1xx xxxx Activates bit 7; set restart or retrigger where: 01xx xxxx Restart timer (starts count from where it left off with same options) 11xx xxxx Retrigger timer (reloads count with new options) = xx1x xxxx Activates bit 4; set disable or enable interrupts where: xx10 xxxx Disable timer interrupts xx11 xxxx Enable timer interrupts = xxxx xx1x Read timer count into CX CX = 0 Do not change time-out value; = Not equal 0. Set new time-out value from CX. The time-out granularity is specified in 543-nanosecond increments. Note: The AH register entry parameter is bit-sensitive so that any or all of these options can be combined into one call.
Exit Parameters
AH = 00h if no error; 01h if error CX = Timer count for function xxxx xx1x (entry parameter); otherwise, unchanged
Errors
AH = 01h if non-valid timer specified
Registers Changed
AL, CX, BX, DX
Example Call
MOV AL,01h ;stop timer 1; MOV AH,0C1h ;set single cycle, and ;retrigger timer with count in CX MOV CX,0500h ;time out in 695.04 microsec INT 0A8h ;request for service TEST AH,01h ;if AH = 00, no error; if JNZ ERROR_HAN ;AH = 01, error and jump ;If here: ;CX = Time-out value
Connects either DMA channel or both DMA channels.
INVOCATION: INT AAh
----------------------------------------------------
FUNCTION:
This service connects either DMA channel or both DMA channels. The two 80186 DMA request inputs can each be connected via software to any of the four DMA request outputs. This routine provides the facility to connect either DMA channel without disturbing the other channel, or to connect both channels with a single call. No checking is done; it is the caller's responsibility to ensure the integrity of the hardware and software systems when using this routine (ownership of resources, correctness of channel selection, target DMA channels stopped, and so forth).
Restrictions: This call is not valid on the Multiport Adapter, Model 2 and Portmaster Adapter/A adapters.
Entry Parameters
AH = 00h indicates DMA channel 0; 01h indicates DMA channel 1; FFh indicates both channels AL = xxxx aabb, where aa and/or bb are: 00: connect SCC port 0 transmit to DMA request 01: connect SCC port 0 receive to DMA request 10: connect SCC port 1 transmit to DMA request 11: connect SCC port 1 receive to DMA request
Notes:
Exit Parameters
AL = New value of DMA allocation register Format: aabb 0000 where: aa = channel 1 bb = channel 0 Note: If only channel 1 is changed, only aa bits will be affected. If only channel 2 is changed, only bb bits will be affected. AH = Old value of DMA allocation register Format: ccdd 0000 where: cc = channel 1 dd = channel 0
Errors
AH = 01h Non-valid call for Realtime Interface Co-Processor Adapter Multiport, Model 2 and Portmaster Adapter/A adapters only.
Registers Changed
AX
Example Call
MOV AH,00h ;connect channel 0 MOV AL,00h ;connect SCC port 0 for xmit INT 0AAh ;request for service ;After int: ; AL = New value of DMA allocation register ; AH = Old value of DMA allocation register
Sets up and starts one DMA channel.
INVOCATION: INT ACh
----------------------------------------------------
FUNCTION:
This service is intended to simplify the most common setups of the 80186 DMA channels. You provide I/O addresses and the DMA control word in registers and memory addresses, and transfer count in a memory table. This routine optionally converts memory addresses from segment:offset format to the physical address format that the DMA requires. The selected DMA channel is configured by writing the control word last so that the DMA operation may be immediately started without a separate call. Memory-to-memory DMA types are supported and no checking of input data is done. This routine is designed to be called by preparatory set-up and checking routines.
Note:
This function assumes that the direction flag has been cleared prior to calling this module.
Entry Parameters
BX = DMA control word CX = I/O port address for either source or destination (not needed for memory-to-memory options) DX = I/O port address for selected DMA channel DS = Segment address of parameter table SI = Offset address of parameter table
AH = Type of setup configuration desired. General format: cnnx xxxx where: c = 0, convert memory addresses from segment:offset to physical address; = 1, memory addresses in table are in physical form; no conversion needed n = setup type (see table as follows) x = don't care
+-------------------------+ Memory-to-memory (segment:offset) | Source offset | ------------------------------------- +-------------------------+ AH = 011x xxxx | Source segment | +-------------------------+ Parameter table (five words) = | Destination offset | +-------------------------+ | Destination segment | +-------------------------+ | Transfer count | +-------------------------+ +-------------------------+ Memory-to-memory (physical address) | Source physical | ----------------------------------- | low 16 | AH = 111x xxxx +-------------------------+ | Source physical | Parameter table (five words) = | high 4 | +-------------------------+ | Destination physical | | low 16 | +-------------------------+ | Destination physical | | high 4 | +-------------------------+ | Transfer count | +-------------------------+
Exit Parameters
AH = xxxx xxxB (bits 1-7 unpredictable) where: B = 0, normal operation; 1, request rejected; non-valid request parameters
Errors
AH = xxxx xxx1 Request not valid because I/O to I/O not supported
Registers Changed
AX, CX, DX, SI
Example Call
;REQUIRED DECLARATIONS ; SCR_BUFF DB 20 DUP(0) ;source buffer DES_BUFF DB 20 DUP(0) ;destination buffer ;DMA TABLE FOR MEMORY-TO-MEMORY TRANSFER ; DMA0_TBL1 DW OFFSET SRC_BUFF ;source SET_CS1 DW 0 DW OFFSET DES_BUFF ;destination SET_CS2 DW 0 DW 20h ;word count MOV BX,0D707h ;control word MOV DX,0FFC0h ;address for DMA port 0 PUSH CS ;COM file implementation POP DS ;DS = CS LEA SI,DMA0_TBL1 ;pointer to DMA table 0 MOV AH,60h ;memory-to-memory move INT 0ACh ;request for service TEST AH,01h ;if AH = 00, no error; if JNZ ERROR_HAN ; AH = 01, error and jump
Reads and writes to the DMA registers.
INVOCATION: INT AEh
----------------------------------------------------
FUNCTION:
This service writes six words directly to the DMA registers for either channel from a 12-byte table, or reads the six registers to the table. If writing the registers, the table must contain precisely the correct data for the DMA, as specified in the Intel manuals; no validity checking is done. (Source and destination must be physical memory and/or I/O addresses.)
The order of reading or writing the registers is top-to-bottom in the following:
Segment:offset table pointer ---> Source low-order 16 bits of 20-bit physical address Pointer + 2 ---> Source high-order 4 bits of 20-bit physical address + 4 ---> Destination low- order 16-bits of 20-bit physical address + 6 ---> Destination high- order 4 bits of 20-bit physical address + 8 ---> Byte or word count (depends on control word value) + 10 ---> Control word
Entry Parameters
AH = Less than or equal to 7Fh, write DMA register; greater than or equal to 80h, read DMA registers DX = DMA port address of channel to read or write ES = If read, segment address pointer to parameter table DI = If read, offset address pointer to parameter table DS = If write, segment address pointer to parameter table SI = If write, offset address pointer to parameter table
Exit Parameters
Data in table if read selected; otherwise, none
Errors
None
Registers Changed
DX, SI (if write), DX, DI (if read)
Example Call
;READ TABLE FOR CHANNEL 0 DMA0_TBL1 DW ? ;put values of DMA registers DW ? ; into table DW ? DW ? DW ? DW ? MOV AH,80h ;read DMA registers MOV DX,0FFC0h ;address for DMA port 0 PUSH CS ;COM file implementation POP ES ;ES = CS LEA DI,DMA0_TBL1 ;pointer to DMA table 0 INT 0AEh ;request for service ;After int: ;DMA channel 0 register data read into DMA0_TBL1
Immediately stops a DMA channel.
INVOCATION: INT B0h
----------------------------------------------------
FUNCTION:
This service immediately stops a DMA channel regardless of the type of operation in progress, and returns the contents of the byte count register in AX. The byte count is read after a short settling delay. No checking is done.
Entry Parameters
DX = Base address of DMA channel to stop FFC0h, if DMA channel 0 FFD0h, if DMA channel 1
Exit Parameters
AX = Byte count
Errors
None; no validity checking done
Registers Changed
AX, DX
Note:
No validity checking is done on the entry parameter. Unpredictable results may occur if a non-valid parameter is passed.
Example Call
MOV DX,0FFC0h ;address for DMA port 0 INT 0B0h ;request for service ;After int: ;AX = Byte count
Translates a logical address to the corresponding physical address.
INVOCATION: INT B2h
----------------------------------------------------
FUNCTION:
This service reads a 4-byte logical segment:offset address from memory, translates it to the physical address form that is required by the 80186 DMA device, and writes the result back into the same memory locations, overwriting the input. The resulting physical address is also returned in DX and AX.
INPUT: OUTPUT: DS:SI pointer --- offset yyyyh - where the physical pointer + 2 segment 000xh address is 000x yyyyh
Entry Parameters
DS = Segment of address to translate SI = Offset of address to translate
Exit Parameters
Four bytes changed in memory AX = Low-order 16 bits of result DX = High-order 4 bits of result (000xh)
Errors
None
Registers Changed
AX, DX
Example Call
;REQUIRED DECLARATIONS ; BUFFER DW 100 DUP(0) ;data buffer ;TABLE FOR DMAADDR ; BUFFER@ DW OFFSET BUFFER ;offset of buffer DW 00 ;segment of buffer ;initialized to CS PUSH CS ;COM file implementation POP DS ;DS = CS MOV SI,OFFSET BUFFER@ ;pointer to address INT 0B2h ;request for service ;After int: ;AX = Low-order 16 bits of result ;DX = High-order 4 bits of result (000xh)
Translates a co-processor adapter storage address from offset:segment to offset:page.
INVOCATION: INT B6h
----------------------------------------------------
FUNCTION:
This service translates a co-processor adapter storage address from offset and segment to offset and page. A page is typically an 8192-byte block of co-processor adapter storage beginning on an 8192-byte boundary that corresponds to the co-processor adapter's shared storage window. However, the Realtime Interface Co-Processor Multiport/2 and the Portmaster Adapter/A support variable-sized pages and shared storage windows that can be either 8KB, 16KB, 32KB, or 64KB. The returned offset is an offset into the page relative to the page size of that co-processor adapter.
Note:
If the window size is greater than 64KB, the routine forces the window size to 64KB.
Entry Parameters
ES = Segment to translate DX = Offset to translate
Exit Parameters
ES = Page number DX = Offset into the page
Errors
None
Registers Changed
AX, BX, DX, ES
Example Call
MOV BX,0200h ;segment to translate POP ES,BX ;ES = BX MOV DX,0001h ;offset to translate INT 0B6h ;request for service ;After int: ;ES = Page number ;DX = Offset into page
Translates a co-processor adapter storage address from page:offset into segment:offset.
INVOCATION: INT B8h
----------------------------------------------------
FUNCTION:
This service translates a co-processor adapter storage address page and offset into segment and offset. The resulting segment is the value nearest to the translated address. The returned offset is always less than 16. If the page value (in conjunction with the window size) is above 1MB, then a 32-bit physical address is returned, along with an error code.
Note:
If the window size is greater than 64K then the routine forces the window size to 64K.
Entry Parameters
ES = Page number to translate. Bits 7-15 not used DX = Offset to translate.
Exit Parameters
If no error conditions, then ES = Resulting segment DX = Resulting offset If input address above 1MB, then ES = Address A31-A16 DX = Address A15-A0
Errors
AH = 02h page value above 1MB
Registers Changed
AX, DX, ES
Example Call
MOV BX,0001h ;page to translate MOV ES,BX ;ES = BX MOV DX,0001h ;offset to translate INT 0B8h ;request for service ;After int: ;ES = Segment ;DX = Offset
Points to EBCDIC-ASCII PROM-resident conversion tables.
INVOCATION:not called; located at Interrupt Vector C0h location (00300h).
----------------------------------------------------
FUNCTION:
This is not a routine but is only a segment:offset pointer to the low-address end of the PROM-resident EBCDIC-ASCII conversion tables. The pointer is used directly for EBCDIC-to-ASCII conversion; 256 is added to the pointer for ASCII-to-EBCDIC conversion. The table layout is as follows:
----------------- (ASCII index 00h AA equivalents, Segment:offset pointer --> (a) . . 256 bytes) index FFh AA ----------------- (EBCDIC index 00h EE equivalents Pointer + 256 --> (b) . . 128 bytes) index 7Fh EE ----------------- (EBCDIC index 80h EE equivalents Pointer + 384 --> (c) . . 128 bytes) index FFh EE ----------------- Pointer + 512 --> other data
The two sections marked (b) and (c) in the preceding table are identical so that the high-order bit of an ASCII character may be ignored when performing ASCII-to-EBCDIC conversions.
Entry Parameters
Not applicable
Exit Parameters
Not applicable
Errors
Not applicable
Registers Changed
Not applicable
Example Call
MOV AH,42h ;read vector call MOV AL,0C0h ;read interrupt vector C0H ;pointer to EBCDIC-to-ASCII ; table INT 56h ;interrupt Realtime Control Microcode JC ERROR_HAN ;if error, AL = error code ;If here: ;ES:DX = Pointer to EBCDIC-ASCII table
Converts an EBCDIC string to an ASCII string.
INVOCATION: INT C2h
----------------------------------------------------
FUNCTION:
This service converts an EBCDIC string from memory to an ASCII string in memory. Pointers must be passed for both source and destination strings; if the pointer values are the same, ASCII bytes overwrite the input EBCDIC bytes.
Entry Parameters
CX = Byte count (0 is non-valid) DS = Segment pointer of source (EBCDIC) string SI = Offset pointer of source (EBCDIC) string ES = Segment pointer of destination (ASCII) string DI = Offset pointer of destination (ASCII) string
Exit Parameters
AH = xxxx xxxB (bits 1-7 unpredictable)
Values returned in destination data table.
Errors
AH = xxxx xxxB where: B = 0 if normal operation; 1 if request rejected due to 0-byte count
Registers Changed
AX, BX, CX, SI, DI
Example Call
;data strings to be converted CON_EBCDIC DB 00,01,02,03,04,05,06,07,08,09,10 CON_ASCII DB 11 DUP(?) ;destination table of converted string MOV CX,11 ;string (byte) count PUSH CS ;DS = CS POP DS ;DS:SI points to MOV SI,OFFSET CON_EBCDIC ;EBCDIC string PUSH CS ;ES = CS POP ES ;ES:DI points to MOV DI,OFFSET CON_ASCII ;destination string INT 0C2h ;request for service TEST AH,01h ;if AH = 00, no error; JNZ ERROR_HAN ;if AH = 01, error and jump ;After int: ;Conversion values returned in destination table CONV_ASCII
Converts an ASCII string to an EBCDIC string.
INVOCATION:C4h
----------------------------------------------------
FUNCTION:
This service converts an ASCII string from memory to an EBCDIC string also in memory. Pointers must be passed for both source and destination strings; if the pointer values are the same, EBCDIC bytes overwrite the input ASCII bytes.
Entry Parameters
CX = Byte count (0 is non-valid) DS = Segment pointer of source (ASCII) string SI = Offset pointer of source (ASCII) string ES = Segment pointer of destination (EBCDIC) string DI = Offset pointer of destination (EBCDIC) string
Exit Parameters
AH = xxxx xxxB (bits 1-7 unpredictable) where: B = 0 if normal operation; = 1 if errorValues returned in destination data table.
Errors
AH = xxxx xxx1 indicates request rejected due to 0-byte count in CX entry parameter
Registers Changed
AX, BX, CX, SI, DI
Example Call
;data strings to be converted ALPA DB 'This is an ASCII string' CON_EBCDIC DB 23 DUP(?) ;destination table of converted string MOV CX,23 ;string (byte) count PUSH CS ;DS = CS POP DS ;DS:SI points to MOV SI,OFFSET ALPHA ;source ASCII string PUSH CS ;ES = CS POP ES ;ES:DI points to MOV DI,OFFSET CON_EBCDIC ;destination string INT 0C4h ;request for service TEST AH,01h ;if AH = 00, no error; if JNZ ERROR_HAN ;AH = 01,error and jump ;After int: ;Conversion values returned in destination table CONV_EBCDIC
Adds an element to a ring structure with 16-bit forward and backward pointers.
INVOCATION: INT C6h
----------------------------------------------------
FUNCTION:
This service adds an element to a ring structure with 16-bit forward and backward pointers. It assumes the existence of one element in the ring. If the ring contains only one element, both the forward and backward pointers for that element point to itself. Register BX is used to indicate the location of the forward pointer within the element. The backward pointer is assumed to be 2 bytes past the forward pointer (BX+2).
Entry Parameters
BX = Displacement of the forward pointer within the element DX = Offset of the element before which the new element is to be inserted DI = Offset of the new element to be inserted DS = Segment in which the ring is located
Exit Parameters
None
Errors
None
Registers Changed
None
Example Call
;data tables used to set up ring START_RNG DW $ ;Forward pointer DW $-2 ;Forward pointer DW 100 DUP(0) ;Data area SEC_ELM DW $ ;Forward pointer DW $-2 ;Backward pointer DW 100 DUP(0) ;Data area MOV BX,0000 ;pointers at offset 0 in ; elements MOV DX,OFFSET START_RNG ;point to element in ring MOV DI,OFFSET SEC_ELM ;DI points to next ; element PUSH CS ;DS = CS = segment in POP DS ;which ring element is ; located INT 0C6h ;request for service
Removes an element from a ring structure with 16-bit forward and backward pointers.
INVOCATION: INT C8h
----------------------------------------------------
FUNCTION:
This service removes an element from a ring structure with 16-bit forward and backward pointers.
Entry Parameters
BX = Displacement of the forward pointer within the element DI = Offset of the element to remove DS = Segment in which the ring is located
Exit Parameters
Carry flag = 1 if error detected; = 0 if no error Zero flag = 1 if requested element is the last one in the ring (not an error); = 0 if more than one element in ring
Errors
Carry flag set if next and/or previous pointers in user element are incorrect.
Registers Changed
None
Example Call
SEC_ELM DW $ ;forward pointer DW $-2 ;backward pointer DW 100 DUP(0) ;data area MOV BX,0000 ;pointers at offset 0 ; in elements PUSH CS ;DS = CS = segment in ; which element POP DS ; is located MOV DI,OFFSET SEC_ELM ;offset of ring element INT 0C8h ;request for service JC ERROR_HAN ;if error, handle it JZ LAST_ELEMENT ;if this is last element
Adds an element to a ring structure with 32-bit forward and backward pointers.
INVOCATION: INT CAh
----------------------------------------------------
FUNCTION:
This service adds an element to a ring structure with 32-bit forward and backward pointers. It assumes the existence of one element in the ring. If the ring contains only one element, both the forward and backward pointers for that element point to itself. Register BX is used to indicate the location of the forward pointer within the element. The segment of the forward pointer is at BX+2. The offset of the backward pointer is at BX+4 and the segment of the backward pointer is at BX+6.
Entry Parameters
BX = Displacement of the forward pointer within the element ES:DX = Location of the element before which the new element is inserted DS:DI = Location of the new element to insert
Exit Parameters
None
Errors
None
Registers Changed
None
Example Call
;data tables required to set up a ring START_RNG DW $ ;forward pointer off DW 0 ;forward pointer seg DW $-4 ;backward pointer off DW 0 ;backward pointer seg DW 100 DUP(0) ;data area SEC_ELEM DW $ ;forward pointer off DW 0 ;forward pointer seg DW $-4 ;backward pointer off DW 0 ;backward pointer seg DW 100 DUP(0) ;data area MOV BX,0000 ;pointers at offset ; 0 in elements MOV AX,CS ;DS = CS = segment of MOV ES,AX ;next ring element MOV DX,OFFSET START_RNG ;DX = offset of next ; ring element MOV DS,AX ;ES = CS = segment of ; element to add MOV DI,OFFSET SEC_ELM ;DX = offset of ring ; element to add INT 0CAh ;request for service
Removes an element of a ring structure with 32-bit forward and backward pointers.
INVOCATION: INT CCh
----------------------------------------------------
FUNCTION:
This service removes an element of a ring structure with 32-bit forward and backward pointers.
Entry Parameters
BX = Displacement of the forward pointer within the element DS:DI = Offset of the element to remove
Exit Parameters
Carry flag = 1 if any errors are detected; = 0 if no errors Zero flag = 1 if requested element was the last one in the ring (not an error); = 0 if more than one element in ring
Errors
Carry flag set if next and/or previous pointers in user element are incorrect.
Registers Changed
None
Example Call
SEC_ELM DW $ ;forward pointer DW 0 DW $-2 ;backward pointer DW 100 DUP(0) ;data area MOV BX,0000 ;forward pointer at offset 0 MOV AX,CS ;DS = CS = segment of ring MOV DS,AX ;element to remove MOV DI,OFFSET SEC_ELM ;offset of element to remove INT 0CCh ;request for service JC ERROR_HAN ;if error, handle it JZ LAST_ELEMENT ;if last element in queue
Converts a segment:offset address into a physical address. On the Portmaster Adapter/A, the value returned is a translated physical address.
INVOCATION: INT CEh, AH = 00h
----------------------------------------------------
FUNCTION:
This service functions like DMAADDR (INT B2); however, it returns a translated physical address, and returns the address in registers, rather than in memory.
This routine is supported on both Multiport Adapter, Model 2 and Portmaster Adapter/A; however, it operates differently on each adapter. On the Portmaster Adapter/A, this routine returns a translated physical address, which is read from the specified translate table entry. On the Multiport Adapter, Model 2, this routine converts the input address directly to a physical address, and does not use the translate table.
The error handling is also handled differently on both adapters. On Portmaster Adapter/A, this routine returns an error if the input address falls within either of the two uppermost entries of the translate table. On the Multiport Adapter, Model 2, this routine returns an error if the input address falls within the 64KB address area reserved for the base card PROM.
This routine does not check the output address for errors.
+-----------+ | | +-- 32-bit address --+ +- | Translate | | | | A19-A14 -->| Table |--> TA20-TA14 + A13-A0 | | | ^ 20-bit +-----------+ | address | | | | A13-A0 -----------------------------------+ +-
Restrictions: This call is not valid for the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters.
Entry Parameters
AH = 00h ES = Segment DX = Offset
Exit Parameters
ES = Address A31-A16 DX = Address A15-A0
Errors
CF set and AH = 1 if input address error
Registers Changed
AX, ES, DX
Memory Affected
None
Converts a 32-bit, physical address into a page:offset address.
INVOCATION: INT CEh, AH = 01h
----------------------------------------------------
FUNCTION:
This service converts a 32-bit, physical address into a page:offset address. The translate table is not involved in this conversion. The block size entry parameter can either specify the default window size, as programmed via POS, or it may be an encoded block size as shown here.
Note:
If the window size is greater than 64K, then a 64K block size is used when performing the conversion. For the Multiport Adapter, Model 2, the window size is always 8K.
Restrictions: This call is not valid for the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters.
Entry Parameters
AH = 01h AL = Encoded block size AL = 0000 0000 8K Block 0000 0001 16K 0000 0010 32K 0000 0011 64K 1111 1111 Window Size DX = Address A15-A0 ES = Address A31-A16
Exit Parameters
ES = Page number DX = Offset into the page
Errors
CF set and AH = 2 if page number cannot be stored in 16-bit register
Registers Changed
AX, ES, DX
Memory Affected
None
Reads from or writes to a DMA/Peripheral Interface Controller Channel.
INVOCATION: INT CEh, AH = 02h
----------------------------------------------------
FUNCTION:
This service reads from or writes to a DMA/Peripheral Interface Controller Channel. On a write access, involving the transmit channel at baud rates below 1Mbps, or on write operations involving the receive channel at all baud rates, it disables the selected channel, performs the write operations; then the final access is to write the channel control word.
Restrictions: This call is not valid for the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters.
Entry Parameters
AH = 02h AL = 0xxx xxxx indicates a write AL = 1xxx xxxx indicates a read AL = xxxx xxx1 indicates that the baud rate is equal to or greater than 1Mbps DX = Base I/O Address DS:SI = Input Table Pointer ES:DI = Output Table Pointer +---------------------------------+ DS:SI--> |Channel Control Word | +---------------------------------+ | Target Address (0-15) | +---------------------------------+ | Target Address (16-20) | +---------------------------------+ | Character Match Bytes | +---------------------------------+ | I/O Address (0-15) | +---------------------------------+ | Transfer Count | +---------------------------------+ | List Address Pointer (0-15) | +---------------------------------+ | List Address Pointer (16-20) | +---------------------------------+
Exit Parameters
+---------------------------------+ ES:DI--> |Channel Control Word | +---------------------------------+ | Target Address (0-15) | +---------------------------------+ | Target Address (16-20) | +---------------------------------+ | Character Match Bytes | +---------------------------------+ | I/O Address (0-15) | +---------------------------------+ | Transfer Count | +---------------------------------+ | List Address Pointer (0-15) | +---------------------------------+ | List Address Pointer (16-20) | +---------------------------------+
Errors
None
Registers Changed
None
Memory Affected
On read, 8-word area pointed to by ES:DI is destroyed
Reads from or writes to the bus master channel registers.
INVOCATION: INT CEh, AH = 03h
----------------------------------------------------
FUNCTION:
This service reads from or writes to the bus master channel registers. On a write access, it disables the selected channel, performs the write operations, then the final access is to write the channel control word. This routine checks for a valid channel number, then writes a table of values to the channel. For the Portmaster Adapter/A, the only valid channel number is 1.
Restrictions: This call is not valid for the Realtime Interface Co-Processor; the Realtime Interface Co-Processor Multiport; the Realtime Interface Co-Processor Multiport Adapter, Model 2; and the Realtime Interface Co-Processor Multiport/2 adapters.
Entry Parameters
AH = 03h AL = 0xxx xxxx indicates a write AL = 1xxx xxxx indicates a read DL = Bus master channel number DS:SI = Input Table Pointer ES:DI = Output Table Pointer +-----------------------------------+ DS:SI--> |Channel Control Register | +-----------------------------------+ | Transfer Count Register | +-----------------------------------+ | Card Address Register (0-15) | +-----------------------------------+ | Card Address Register (16-20) | +-----------------------------------+ | System Address Register (0-15) | +-----------------------------------+ | System Address Register (16-31)| +-----------------------------------+ | List Address Pointer (0-15) | +-----------------------------------+ | List Address Pointer (16-20) | +-----------------------------------+
Exit Parameters
+-----------------------------------+ ES:DI--> |Channel Control Register | +-----------------------------------+ | Transfer Count Register | +-----------------------------------+ | Card Address Register (0-15) | +-----------------------------------+ | Card Address Register (16-20) | +-----------------------------------+ | System Address Register (0-15) | +-----------------------------------+ | System Address Register (16-31)| +-----------------------------------+ | List Address Pointer (0-15) | +-----------------------------------+ | List Address Pointer (16-20) | +-----------------------------------+
Errors
CF set and AH = 1 if non-valid bus master channel number
Registers Changed
AX
Memory Affected
On read, the 8-word area pointed to by ES:DI is destroyed
Stops a bus master channel.
INVOCATION: INT CEh, AH = 04h
----------------------------------------------------
FUNCTION:
This service stops a bus master channel. It checks for a valid channel number, then stops the channel. For the Portmaster Adapter/A, the only valid channel number is 1.
Restrictions: This call is not valid for the Realtime Interface Co-Processor; the Realtime Interface Co-Processor Multiport; the Realtime Interface Co-Processor Multiport Adapter, Model 2; and the Realtime Interface Co-Processor Multiport/2 adapters.
Entry Parameters
AH = 04h AL = Channel number
Exit Parameters
Carry flag = 0 if no error; = 1 if error
Errors
CF set and AH = 1 if non-valid bus master channel number
Registers Changed
AX
Memory Affected
None
Resets a bus master channel.
INVOCATION: INT CEh, AH = 05h
----------------------------------------------------
FUNCTION:
This service resets a bus master channel. It checks for a valid channel number, then resets the channel. For the Portmaster Adapter/A, the only valid channel number is 1.
Restrictions: This call is not valid for the Realtime Interface Co-Processor; the Realtime Interface Co-Processor Multiport; the Realtime Interface Co-Processor Multiport Adapter, Model 2; and the Realtime Interface Co-Processor Multiport/2 adapters.
Entry Parameters
AH = 05h AL = Channel number
Exit Parameters
Carry flag = 0 if no error; = 1 if error
Errors
CF set and AH = 1 if non-valid bus master channel number
Registers Changed
AX
Memory Affected
None
Reads from or writes to the Diagnostic Address Compare (DAC) registers.
INVOCATION: INT CEh, AH = 06h
----------------------------------------------------
FUNCTION:
This service reads from or writes to the appropriate Diagnostic Address Compare (DAC) registers. On a write access, an entry parameter specifies whether or not to disable the DAC function. If disable is requested, no other input parameters are expected.
The Mask bits passed in CX determine which bits of the monitored address (as specified in BL) are compared against the physical address passed in DX. By setting a mask bit to 1, the specified address bit of the monitored address and the physical address is not compared. A DAC match occurs when all unmasked bits are equal. Note that bits A20-A16 of the monitored address are always compared against the physical address bits passed in ES.
Restrictions: This call is not valid for the Realtime Interface Co-Processor; the Realtime Interface Co-Processor Multiport; the Realtime Interface Co-Processor Multiport Adapter, Model 2; and the Realtime Interface Co-Processor Multiport/2 adapters.
Entry Parameters
AH = 06h AL = 0xxx xxxe indicates a write where e = 0 disable DAC 1 enable DAC AL = 1xxx xxxx indicates a read no other input parameters are required on a read BX = Control information +---+---+---+---+---+---+---+---+ BL = | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | | | | | | | | | | | | +- Monitor write access only = 1 | | | | | | | Monitor r/w access = 0 | | | | | | +- Monitor 80C186 access | | | | | +- Monitor memory slave access | | | | +- Monitor backend DMA access | | | +- Monitor bus master access | | +- Block memory write attempt = 1; permit write = 0 | +- RSVD +- RSVD
ES:DX = Physical Address ES = A20-A16 DX = A15-A0 CX = Address Mask up to 64K 15 0 +---+---+---+ - - - - - - +---+---+---+ |15 |14 |13 | | 2 | 1 | 0 | ++--+---+---+ - - - - - - +-+-+-+-+-+-+ | | | | | | | +- A0 Mask | | +- A1 Mask | +- A2 Mask | +- A15 Mask
Exit Parameters
BX = Source information
where BX = 15 0 +---------+---+---+---+---+---+---+---+---+---+---+---+---+---+ | 15 - 13 |12 |11 |10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +---+-----+-+-+---+---+-+-+-+-+-+-+-+-+-+-+---+---+-+-+-+-+-+-+ | | | | | | | | | | RSVD +-----+-----+ | | | +-----+-----+ | | Arb Level | +-+-+ DMAPIC +-+-+ if bit 8 | DMAPIC Channel No. Local set | Chip No. Master | DAC Source If set, then source = host or other bus master If reset, see bits 1-0 for encoded source ES = Upper 16 bits of address where DAC occurred DX = Lower 16 bits of address where DAC occurred
Errors
None
Registers Changed
BX, ES, DX
Memory Affected
None
Writes to or reads from multiple translate table. entries.
INVOCATION: INT CEh, AH = 07h
----------------------------------------------------
FUNCTION:
This service writes to or reads from multiple translate table entries. On a write request, a pointer to a table of selector numbers and input data is passed. On a read request, the data from the translate table is written to a table. A read request returns the translated address data and the protection bit data. No error checking is done to see if the settings of the protect bits are in conflict.
Restrictions: This call is not valid for the Realtime Interface Co-Processor; the Realtime Interface Co-Processor Multiport; the Realtime Interface Co-Processor Multiport Adapter, Model 2; and the Realtime Interface Co-Processor Multiport/2 adapters.
Entry Parameters
AH = 07h AL = 0xxx xxxx indicates a write AL = 1xxx xxxx indicates a read DS:SI--> parameter table +---+ where: | C | C = Count of selectors (8 bits) +---+---+---+ S = Selector number (8 bits) | S | P | Y | P = Protection data (8 bits) +---+---+---+ Y = Value to write (16 bits) | . | . | . | +---+---+---+ | . | . | . | +---+---+---+ | . | . | . | +---+---+---+ | S | P | Y | +---+---+---+
Entry Parameters (Continued)
where Y = 15 0 +--------+---+---+---+---+---+---+---+ | 15 - 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +---+----+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | | | | | RSVD | | | | | | +- A14 | | | | | +- A15 | | | | +- A16 | | | +- A17 | | +- A18 | +- A19 +- A20 where S = 8 bits and S = Selector number (0-3Fh) where P = 8 bits and P = 7 0 +---+---+---+---+---+---+---+---+ | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +-+-+---+---+---+---+-+-+-+-+-+-+ | | | | +--------+----------+ | +- Write Protect, 1 = on 0 = off | +- Read/Write Protect, 1 = on 0 = off RSVD
Exit Parameters
ES:DI--> parameter table +---+ where: | C | C = Count of selectors (8 bits) +---+---+---+ S = Selector number (8 bits) | S | P | Y | P = Protection data (8 bits) +---+---+---+ Y = Value read (16 bits) (8 bits) | . | . | . | (8 bits) +---+---+---+ (8 bits) | . | . | . | (16 bits) +---+---+---+ | . | . | . | +---+---+---+ | S | P | Y | +---+---+---+
Errors
CF set and AH = 1 if selector out of range (Read or Write) AH = 2 if data out of range (Write only)
Registers Changed
AX
Memory Affected
On read, area pointed to by ES:DI is destroyed. The length of the area destroyed depends on the number of translate table entries read.
Starts a bus master channel.
INVOCATION: INT CEh, AH = 08h
----------------------------------------------------
FUNCTION:
This service starts a bus master channel. It checks for a valid channel number, then starts the channel. For the Portmaster Adapter/A, the only valid channel number is 1.
Restrictions: This call is not valid for the Realtime Interface Co-Processor; the Realtime Interface Co-Processor Multiport; the Realtime Interface Co-Processor Multiport Adapter, Model 2; and the Realtime Interface Co-Processor Multiport/2 adapters.
Entry Parameters
AH = 08h AL = Channel number
Exit Parameters
Carry flag = 0 if no error; = 1 if error
Errors
CF set and AH = 1 if non-valid bus master channel number
Registers Changed
AX
Memory Affected
None
The CIOs, SCCs and DUSCCs are initialized to the states shown in the following tables upon exit from the adapter's PROM power-on tests. The hardware may also be initialized to a given state through a PROM Service call.
+----------------------------------------------------------+ | SCC Default Values | +----------+-------+---------------------------------------+ | | Value | | | Register | (Hex) | Description | +----------+-------+---------------------------------------+ | 1 | 00 | All interrupts disabled | +----------+-------+---------------------------------------+ | 3 | C0 | 8 bits/char, Rx disabled | +----------+-------+---------------------------------------+ | 4 | 4C | Clock x16, 2 stop bits, no parity | +----------+-------+---------------------------------------+ | 5 | 60 | 8 bits/char, Tx disabled | +----------+-------+---------------------------------------+ | 6 | 00 | Address search character | +----------+-------+---------------------------------------+ | 7 | 00 | Flag character | +----------+-------+---------------------------------------+ | 9 | 09 | Master Interrupt enabled. | | | | Note: Only the first 4 SCCs will use | | | | vector includes status (VIS), SCCs | | | | after the first 4 will not support | | | | VIS. | +----------+-------+---------------------------------------+ | 10 | 00 | NRZ encoding | +----------+-------+---------------------------------------+ | 11 | 50 | RXCLK, TXCLK - baud rate generator | +----------+-------+---------------------------------------+ | 12 | 0A | 9600 baud - LSB | +----------+-------+---------------------------------------+ | 13 | 00 | 9600 baud - MSB | +----------+-------+---------------------------------------+ | 14 | 03 | Enable baud rate generator | +----------+-------+---------------------------------------+ | 15 | C0 | Break and Tx Underrun Interrupts | +----------+-------+---------------------------------------+
+-------------------------------------------------------------+ | DUSCC Default Values | +-------------+-------+---------------------------------------+ | Register | Value | Description | | | (Hex) | | +-------------+-------+---------------------------------------+ | CCR | 43 | Rx disabled | +-------------+-------+---------------------------------------+ | CCR | 03 | Tx disabled | +-------------+-------+---------------------------------------+ | CMR1 | 07 | NRZ/Manchester encoding, no parity | +-------------+-------+---------------------------------------+ | CMR2 | 08 | Normal connection, half-duplex | +-------------=-------+---------------------------------------+ | TPR | F3 | 2 stop bits, 8-bit transmit character | +-------------+-------+---------------------------------------+ | TTR | 3D | Baud rate generator supplies Tx clock | | | | at 9600 baud | +-------------+-------+---------------------------------------+ | RPR | 0B | Rx disabled, strip parity, 8-bit | | | | receive character | +-------------+-------+---------------------------------------+ | RTR | 2D | Baud rate generator supplies Rx clock | | | | at 9600 baud | +-------------+-------+---------------------------------------+ | CTCR | 00 | Timer disabled | +-------------+-------+---------------------------------------+ | OMR | E0 | 8-bit residual Tx character | +-------------+-------+---------------------------------------+ | PCR | 00 | | +-------------+-------+---------------------------------------+ | RSR | 00 | | +-------------+-------+---------------------------------------+ | TRSR | 00 | | +-------------+-------+---------------------------------------+ | GSR | 00 | | +-------------+-------+---------------------------------------+ | IER | 00 | Interrupts disabled | +-------------+-------+---------------------------------------+ | CCR | 40 | Reset Rx | +-------------+-------+---------------------------------------+ | CCR | 00 | Reset Tx | +-------------+-------+---------------------------------------+ | ICR | | Only the first 4 DUSCCs support vector| | | | includes status (VIS) | +-------------+-------+---------------------------------------+
+----------------------------------------------------------+ | CIO Default Values | +-------------+-------+------------------------------------+ | Register | Value | Description | | | (Hex) | | +-------------+-------+------------------------------------+ |MODE | 06 | Bit port with OR priority | +-------------+-------+------------------------------------+ |HANDSHAKE | 00 | Ignored - bit port | +-------------+-------+------------------------------------+ |DATA POLARITY| FF | All inverting | +-------------+-------+------------------------------------+ |D DIRECTION | | See note below | +-------------+-------+------------------------------------+ |SPCL I/O CTRL| 00 | All normal | +-------------+-------+------------------------------------+ |PATTERN PLRTY| 00 | All normal | +-------------+-------+------------------------------------+ |PATTERN | 00 | All disabled | |TRANSITION | | | +-------------+-------+------------------------------------+ |PATTERN MASK | 00 | All masked off | +-------------+-------+------------------------------------+ |COMMAND/STAT | E0 | Clear interrupt enable | +-------------+-------+------------------------------------+ |COMMAND/STAT | 20 | Clear IP and IUS | +-------------+-------+------------------------------------+ |DATA REGISTER| 00 | | +-------------+-------+------------------------------------+
Note:
All CIO ports, with the exception of CIO 0 Port C, are configured as shown here. Configuration data for the Data Direction register is supplied by the Interface Board PROM.
The diagnostic test modules are resident in the co-processor adapter's programmable read-only memory (PROM). They provide diagnostic testing at power-on time and are available to user-written tasks on the co-processor adapter and the Realtime Control Microcode. They are not dependent on the Realtime Control Microcode.
These modules can be called via interrupt vector FEh with the module number passed in the AH register. Other registers are used to pass various other parameters.
Some of these routines perform functional testing of individual co-processor adapter components that may or may not be present on a specific co-processor adapter. The PROM power-on self test microcode and the Realtime Control Microcode maintain a hardware configuration descriptor (HCD), which describes those components that may be present on one co-processor adapter and not present on another. The HCD is located at offset 0456h in page 0 of co-processor adapter memory.
For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, the format of the HCD is shown in Chapter 10, under .
For the Realtime Interface Co-Processor Multiport, Model 2 and the Portmaster Adapter/A, the format of the HCD is shown in Chapter 12, under .
The following tables list each Diagnostic Test Module along with differences in support provided for Multiport Adapter, Model 2 and Portmaster Adapter/A.
+---------------------------------------------------------------------+ | List of Diagnostic Test Modules | +------+------+----------------+----------------------------+---------+ | Int | AH | Name | Function | Comment | | No. | Code | | | | +------+------+----------------+----------------------------+---------+ | FEh | 00h | RAM TEST | Tests each byte/word of | | | | | | the specified RAM space. | | | | | | Will test up to 1 Meg. | | | | | | | | | FEh | 0lh | CHECKSUM | Performs byte-additive | | | | | TEST | checksum of the specified | | | | | | area. | | | | | | | | | FEh | 02h | GET MEMORY | Returns the size of in- | | | | | SIZE | stalled RAM storage. | | | | | | | | | FEh | 03h | PROCESSOR | Provides a basic | | | | | TEST | function test of timers, | | | | | | DMAs, and interrupts. | | | | | | | | | FEh | 04h | CIO TEST | Tests a CIO's basic | | | | | | functions. | | | | | | | | | FEh | 05h | SCC TEST | Tests an SCC's basic | | | | | | functions. | | | | | | | | | FEh | 06h | SHARED STORAGE | Tests the basic function | | | | | INTERFACE CHIP | of the shared storage | | | | | TEST (SSTIC) | interface chip. | | | | | | | | | FEh | 07h | GET INTERFACE | Identifies the | | | | | ID | co-processor adapter's | | | | | | first two hardware | | | | | | interfaces. | | | | | | | | | FEh | 08h | CONFIGURE CIO | Resets a CIO port and | | | | | PORT | configures it to a | | | | | | defined state. | | | | | | | | | FEh | 09h | CONFIGURE SCC | Resets an SCC port and | | | | | CHANNEL | configures it to a | | | | | | specific defined state. | | | | | | | | | FEh | 0Ah | CONFIGURE DMA | Resets a DMA channel | | | | | CHANNEL | and configures it to a | | | | | | defined state. | | | | | | | | | FEh | 0Bh | CONFIGURE | Resets a CIO timer to a | | | | | HARDWARE TIMER| specified defined state. | | | | | | | | | FEh | 0Ch | INITIALIZE | Initializes the watchdog | | | | | WATCHDOG TIMER| timer and CIO 0 Port C. | | | | | | | | | FEh | 0Dh | PRIORITY | Sets the interrupt | | | | | SWITCH | priorities of the shared | | | | | | storage interface chip | | | | | | versus the SCCs and CIOs. | | | | | | | | | FEh | 0Eh | GET EXTENDED | Identifies the extended | Note 1 | | | | INTERFACE ID | Interface Board, if present.| | | | | | | | | FEh | 0Fh | RAM TEST | Tests each byte/word of | Note 3 | | | | EXTENDED | the specified RAM space, | | | | | | will test up to 2 Meg. | | | | | | | | | FEh | 10h | GET MEMORY | Returns the size of | Note 2 | | | | SIZE EXTENDED | installed RAM in bytes. | | | | | | | | | FEh | 11h | CONFIGURE BUS | Initializes the bus master | Note 3 | | | | MASTER CHANNEL| registers to a known state. | | | | | | | | | FEh | 12h | CONFIGURE | Initializes the DMA/ | Note 2 | | | | DMAPIC CHANNEL| Peripheral Interface | | | | | | Controller (DMAPIC) | | | | | | registers to a known state. | | | | | | | | | FEh | 13h | CREATE PORT | Builds the Port Config- | Note 2 | | | | CONFIGURATION | uration Descriptor (PCD) | | | | | DESCRIPTOR | and the Hardware Config- | | | | | | uration Descriptor (HCD). | | | | | | | | | FEh | 14h | GET BASE | Returns an encoded | | | | | CARD ID | adapter ID. | | | | | | | | | FEh | 15h | STOP DMAPIC | Stops a DMAPIC channel. | Note 2 | | | | CHANNEL | | | +------+------+---------------+-----------------------------+---------+
Notes:
Limited error checking is performed in these routines. The AH register is used to indicate the requested subroutine by assigned number. If a non-valid module number is contained in AH, the carry flag is set to 1 and control is returned to the caller. Also, for those routines that do hardware functional testing, the carry flag is set to 1 if a hardware failure error is detected. Therefore, the caller should immediately, upon return, interrogate the carry flag to determine if an error occurred.
The following table shows which Diagnostic Test modules set the carry flag if an error is detected.
+------------------------------------------------------------+ | Error Handling of Diagnostic Test Modules | +---------------------------+---------+---------+------------+ | Module Name | INT No. | AH Code | Carry Flag | | | | | Modify | +---------------------------+---------+---------+------------+ | RAM TEST | FEh | 00h | Yes | | | | | | | CHECKSUM TEST | FEh | 01h | Yes | | | | | | | GET MEMORY SIZE | FEh | 02h | No | | | | | | | PROCESSOR TEST | FEh | 03h | Yes | | | | | | | CIO TEST | FEh | 04h | Yes | | | | | | | SCC TEST | FEh | 05h | Yes | | | | | | | SHARED STORAGE INTERFACE | FEh | 06h | Yes | | CHIP TEST | | | | | | | | | | GET INTERFACE ID | FEh | 07h | No | | | | | | | CONFIGURE CIO PORT | FEh | 08h | Yes | | | | | | | CONFIGURE SCC CHANNEL | FEh | 09h | Yes | | | | | | | CONFIGURE DMA CHANNEL | FEh | 0Ah | No | | | | | | | CONFIGURE HARDWARE TIMER | FEh | 0Bh | Yes | | | | | | | INITIALIZE WATCHDOG TIMER | FEh | 0Ch | Yes | | | | | | | PRIORITY SWITCH | FEh | 0Dh | No | | | | | | | GET EXTENDED INTERFACE ID | FEh | 0Eh | No | | | | | | | RAM TEST EXTENDED | FEh | 0Fh | Yes | | | | | | | GET MEMORY SIZE EXTENDED | FEh | 10h | No | | | | | | | CONFIGURE BUS MASTER | FEh | 11h | No | | CHANNEL | | | | | | | | | | CONFIGURE DMAPIC CHANNEL | FEh | 12h | No | | | | | | | CREATE PORT CONFIGURATION | FEh | 13h | Yes | | DESCRIPTOR | | | | | | | | | | GET BASE CARD ID | FEh | 14h | No | | | | | | | STOP DMAPIC CHANNEL | FEh | 15h | No | +---------------------------+---------+---------+------------+
A description of each diagnostic test module is provided in the remainder of this chapter.
Tests each byte of the specified RAM space.
INVOCATION: INT FEh, AH = 00h
----------------------------------------------------
FUNCTION:
This diagnostic routine tests each byte of the specified RAM space as both a byte and a word for addressability, and pattern retention with address-in-address and inverted-address-in-address writes and reads. The RAM is cleared and tested for all zeros.
Restrictions: Make sure that your task owns the RAM area you are planning to test to avoid overwriting another task's storage area.
Note: This test disables the watchdog timer.
Entry Parameters
AH = 00h ES = Segment in which to begin testing CX = Number of paragraphs (16-byte blocks) to test
Exit Parameters
Carry flag = 0 if no error; 1 if error
Errors
ES:DI = Address of error if carry flag = 1 AL = Error bits if carry flag = 1 (refer to the appropriate hardware reference guide for the error bit definition)
Registers Changed
ES, AX, BX, CX, DX, SI, DI
Memory Affected
Tested RAM space
Example Call
;assumes storage block 0 allocated before call MOV AH,00h ;parm required for RAM test MOV BX,CS:STOR0SEG ;test segment of storage ; block 0, set by Realtime Control Microcode MOV ES,BX ;store in ES MOV CX,01h ;test paragraph 1 of storage ; block 0 INT 0FEh ;request for service JC ERROR_HAN ;if error, AL = error bits ;and ES:DI = error address
Performs byte-additive checksum of the specified area.
INVOCATION: INT FEh, AH = 01h
----------------------------------------------------
FUNCTION:
This subroutine performs a byte-additive checksum of the area specified. The 16-bit checksum value must be in the last two bytes of the area tested. Because this is a cumulative test, no specific error indicators are returned.
Note:
This test disables the watchdog timer.
Entry Parameters
AH = 01h ES = Segment in which to begin checksum CX = Number of bytes to checksum (65535 bytes, maximum)
Exit Parameters
Carry flag = 0 if no error; 1 if error
Errors
Checksum test failed if carry flag = 1
Registers Changed
None
Memory Affected
None
Example Call
;assumes storage block 0 allocated before call MOV AH,01h ;parameter required MOV BX,CS:STOR0SEG ;test segment of storage MOV ES,BX ;block in 0, set by ; Realtime Control Microcode MOV CX,15 ;check 15 bytes INT 0FEh ;request for service JC ERROR_HAN ;if error, handle it
Returns the size of installed RAM storage.
INVOCATION: INT FEh, AH = 02h
----------------------------------------------------
FUNCTION:
This routine returns the RAM size in paragraphs (16-byte blocks) that the co-processor adapter can detect.
Entry Parameters
AH = 02h
Exit Parameters
AX = Number of paragraphs (16-byte blocks) of useable RAM storage detected. Carry flag = 0
Errors
None (carry flag always reset to 0)
Registers Changed
AX
Memory Affected
None
Example Call
MOV AH,02h ;AH = 2, parameter required INT 0FEh ;request for service ;after int., AX = # paragraphs
Provides a basic function test of timers, DMAs, and interrupts.
INVOCATION: INT FEh, AH = 03h
----------------------------------------------------
FUNCTION:
This routine tests the 80186 timers, DMAs, and interrupts. Not all modes for each of these devices are tested. This is a basic function test only. Because this is a cumulative test, no specific error indicators are returned as error codes.
Restrictions: This test temporarily destroys the setup of the 80186 processor and must not be run while any application tasks are running.
Note:
This test disables the watchdog timer, and assumes that the direction flag has been cleared prior to calling this module.
Entry Parameters
AH = 03h DS = Segment pointer to 128-byte block to be used for DMA test SI = Offset pointer to 128-byte block to be used for DMA test
Exit Parameters
Carry flag = 0 if no error; 1 if error
Errors
Processor function test failed if carry flag = 1
Registers Changed
None
Memory Affected
128-byte block used for DMA test
Example Call
;assumes storage block 0 allocated before call MOV AH,03h ;AH = 3, parameter required ; for processor test MOV BX,CS:STOR0SEG ;test the segment of storage MOV DS,BX ; block 0, set by Realtime Control Microcode MOV SI,0 ;Offset 0 within segment INT 0FEh ;request for service JC ERROR_HAN ;if error, processor test ; failed
Tests a CIO's basic function.
INVOCATION: INT FEh, AH = 04h
----------------------------------------------------
FUNCTION:
This routine tests the HCD prior to testing a CIO. If the appropriate bit is not set in the HCD (presence bit), the test of the CIO's basic functions is not performed. All ports of the specified CIO are set to the default configurations after testing, whether or not errors are detected.
Restrictions: This test destroys the setup of the entire CIO and, therefore, must not be used while any application task is operating.
Note:
If CIO 0 is specified, this test disables the watchdog timer.
Entry Parameters
AH = 04h AL = CIO to be tested. For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, the valid range for this parameter depends on the presence of additional CIOs as indicated in the HCD described under . For the Realtime Interface Co-Processor Multiport, Model 2 and the Portmaster Adapter/A, the valid range depends on the presence of additional CIOs, as indicated in the HCD described under .
Exit Parameters
Carry flag = 0 if no error; 1 if test detected failure or non-valid CIO specified
Errors
CIO function test failed or non-valid CIO specified if carry flag = 1
Registers Changed
None
Memory Affected
None
Example Call
MOV AH,04h ;parameter required MOV AL,0 ;test CIO 0 INT 0FEh ;request for service JC ERROR_HAN ;if error, CIO test failed or ; non-valid CIO port specified
Tests an SCC's basic function.
INVOCATION: INT FEh, AH = 05h
----------------------------------------------------
FUNCTION:
This routine tests an SCC's basic functions. Both ports of the specified SCC are set to the default configuration after testing, whether or not errors are detected.
Restrictions: For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, if SCC 0 is specified, CIO 0 is also affected. This test must not be run if any application is using either of the ports on SCC 0 or either of the 8-bit ports on CIO 0.
Notes:
Entry Parameters
AH = 05h AL = SCC to be tested. For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, the valid range for this parameter depends on the presence of Zilog SCCs 1-3, as indicated in the HCD described under . For the Realtime Interface Co-Processor Multiport, Model 2 and the Portmaster Adapter/A, the valid range depends on the presence of additional Signetics DUSCCs as indicated in the HCD described under
Exit Parameters
Carry flag = 0 if no error; 1 if test detected failure or non-valid SCC specified
Errors
SCC function test failed or non-valid SCC specified if carry flag = 1
Registers Changed
None
Memory Affected
None
Example Call
MOV AH,05h ;parameter required MOV AL,0 ;test SCC 0 INT 0FEh ;request for service JC ERROR_HAN ;if error, SCC test failed ;or non-valid port specified
Tests the shared storage interface chip's basic function.
INVOCATION: INT FEh, AH = 06h
----------------------------------------------------
FUNCTION:
This routine tests the basic function of the shared storage interface chip.
Restrictions: This test destroys the setup of the shared storage interface chip. The Realtime Control Microcode, application tasks executing on the system unit and the co-processor adapter can be severely affected. Therefore, to ensure the expected operation from the co-processor adapter, the adapter should be reset to its predefined power-on self test state after executing this function.
Entry Parameters
AH = 06h
Exit Parameters
Carry flag = 0 if no error; 1 if error
Errors
Shared storage interface chip function test failed if carry flag = 1
Registers Changed
None
Memory Affected
None
Example Call
MOV AH,06h ;parameter required INT 0FEh ;request for service JC ERROR_HAN ;if error, test failed
Identifies the co-processor adapter electrical interfaces.
INVOCATION: INT FEh, AH = 07h
----------------------------------------------------
FUNCTION:
This routine is used to identify the electrical interfaces on the co-processor adapter of SCC ports 0 and 1.
Note:
Refer to Get Extended Interface ID (INT FEh, AH=0Eh) for a list of Interface Board IDs.
Entry Parameters
AH = 07h
Exit Parameters
Carry flag = 0 CH = Hardware interface of SCC port 0 CL = Hardware interface of SCC port 1
Errors
None (carry flag is always reset to 0)
Registers Changed
CX
Memory Affected
None
Example Call
MOV AH,07h ;parameter required INT 0FEh ;request for service ;After int: ; CH = Hardware interface of SCC port 0 ; CL = Hardware interface of SCC port 1
Resets a CIO port and configures it to a defined state.
INVOCATION: INT FEh, AH = 08h
----------------------------------------------------
FUNCTION:
This routine tests the HCD prior to configuring a CIO. If the appropriate bit is not set in the HCD (presence bit), the CIO is not configured.
This routine resets a CIO port and configures it to a specified defined state. This state is the normal reset state except for the following registers, which are configured as shown.
Restrictions: CIO 0 Port C cannot be configured by this routine.
For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, the reset values are as follows:
CIO 0 Port A (Port 0) ------------------------------------------------------ Register Value Description ------------------------------------------------------ MODE 06h Bit port with OR priority HANDSHAKE 00h Ignored bit port DATA FFh All inverting POLARITY D DIRECTION 3Bh 7, 6, 2 output; 5, 4, 3, 1, 0 input SPCL I/0 CTRL 00h All normal PATTERN PLRTY 00h All normal PATTERN 00h All disabled TRANSITION PATTERN MASK 00h All masked off COMMAND/STAT E0h Clear Interrupt Enable COMMAND/STAT 20h Clear IP and IUS DATA REGISTER 00h
CIO 0 Port B (Port 1) ------------------------------------------------------ Register Value Description ------------------------------------------------------ MODE 06h Bit port with OR priority HANDSHAKE 00h Ignored bit port DATA FFh All inverting POLARITY D DIRECTION 3Bh 7, 6, 2 output; 5, 4, 3, 1, 0 input SPCL I/0 CTRL 00h All normal PATTERN PLRTY 00h All normal PATTERN 00h All disabled TRANSITION PATTERN MASK 00h All masked off COMMAND/STAT E0h Clear Interrupt Enable COMMAND/STAT 20h Clear IP and IUS
CIO 1 Port A (Port 2, if present) ------------------------------------------------------ Register Value Description ------------------------------------------------------ MODE 06h Bit port with OR priority HANDSHAKE 00h Ignored bit port DATA FFh All inverting POLARITY D DIRECTION FFh All input SPCL I/0 CTRL 00h All normal PATTERN PLRTY 00h All normal PATTERN 00h All disabled TRANSITION PATTERN MASK 00h All masked off COMMAND/STAT E0h Clear Interrupt Enable COMMAND/STAT 20h Clear IP and IUS
CIO 1 Port B (Port 3, if present) ------------------------------------------------------ Register Value Description ------------------------------------------------------ MODE 00h Bit port; disable pattern match HANDSHAKE 00h Ignored bit port DATA FFh All inverting POLARITY D DIRECTION C0h 7, 6 input; 5-0 output SPCL I/0 CTRL 00h All normal PATTERN PLRTY 00h All normal PATTERN 00h All disabled TRANSITION PATTERN MASK 00h All masked off COMMAND/STAT E0h Clear Interrupt Enable COMMAND/STAT 20h Clear IP and IUS
For the Realtime Interface Co-Processor Multiport, Model 2 and the Portmaster Adapter/A, the reset values are as follows:
All CIO Ports A and B ------------------------------------------------------ Register Value Description ------------------------------------------------------ MODE 06h Bit port with OR priority HANDSHAKE 00h Ignored bit port DATA FFh All inverting POLARITY D DIRECTION See Note SPCL I/0 CTRL 00h All normal PATTERN PLRTY 00h All normal PATTERN 00h All disabled TRANSITION PATTERN MASK 00h All masked off COMMAND/STAT E0h Clear Interrupt Enable COMMAND/STAT 20h Clear IP and IUS DATA REGISTERS 00h
CIO Port C ------------------------------------------------------ Register Value Description ------------------------------------------------------ DATA POLARITY FFh All inverting D DIRECTION See Note SPCL I/O CTRL 00h All normal COMMAND/STAT 20h Clear IP and IUS DATA REGISTER 00h
Note:
All CIO ports are configured as shown here. Configuration data for the data direction field is supplied by the Interface Board PROM.
Interrupt pending, interrupt enable, and interrupt under service flags are reset to zeros.
The specified port is left disabled.
Entry Parameters
AH = 08h AL = CIO port desired. For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, the valid range for this parameter depends on the presence of CIO 1, as indicated in the HCD described under . If CIO 1 is present and functioning, the range is 0-3; otherwise, the range is 0-1. For the Realtime Interface Co-Processor Multiport, Model 2 and the Portmaster Adapter/A, the valid range depends on the presence of additional CIOs, as indicated in the HCD described under . If CIO 7 is present and functioning, the range is 0-16h. The table that follows indicates the relationship between those CIOs that are present and functioning and the valid ports for this parameter. AL = 00h CIO 0 port A AL = 0Eh CIO 5 port A 01h CIO 0 port B 0Fh CIO 5 port B 02h CIO 1 port A 10h CIO 5 port C 03h CIO 1 port B 11h CIO 6 port A 04h CIO 1 port C 12h CIO 6 port B 05h CIO 2 port A 13h CIO 6 port C 06h CIO 2 port B 14h CIO 7 port A 07h CIO 2 port C 15h CIO 7 port B 08h CIO 3 port A 16h CIO 7 port C 09h CIO 3 port B 0Ah CIO 3 port C 0Bh CIO 4 port A 0Ch CIO 4 port B 0Dh CIO 4 port C
Exit Parameters
Carry flag = 0 if no error; 1 if non-valid CIO port specified
Errors
Carry flag set if non-valid CIO port specified
Registers Changed
None
Memory Affected
None
Example Call
MOV AH,08h ;parameter required MOV AL,0 ;configure CIO port 0 INT 0FEh ;request for service JC ERROR_HAN ;if error, non-valid port ; specified
Resets an SCC port and configures it to a specific defined state.
INVOCATION: INT FEh, AH = 09h
----------------------------------------------------
FUNCTION:
This routine resets an SCC port and configures it to a specified defined state. The state is the normal reset state, except for the following registers which are configured as shown:
Notes:
For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, the reset values are as follows:
------------------------------------------------------ Register Value Description ------------------------------------------------------ WR0 10h WR1 00h WR2 X0h Base interrupt vector binary format 20h SCC 0 80h SCC 1 90h SCC 2 E0h SCC 3 WR3 C0h 8 bits/character receive disabled WR4 4Ch WR5 60h 8 bits/character transmit disabled WR6 00h Address search character WR7 00h Flag character WR8 --- Transmit buffer (not programmed) WR9 09h Enable master interrupt WR10 00h Force NRZ mode WR11 50h Receive clock, transmit clock from baud rate generator WR12 0Ah Lower byte of time constant WR13 00h Upper byte of time constant WR14 03h Select and enable baud rate generator WR15 C0h Break and transmit underrun enable
For the Realtime Interface Co-Processor Multiport, Model 2 and the Portmaster Adapter/A, the reset values are as follows:
------------------------------------------------------ Register Value Description ------------------------------------------------------ CCR 43h Rx disabled CCR 03h Tx disabled CMR1 07h NRZ/Manchester encoding, no parity CMR2 08h Normal connection, half-duplex TPR F3h 2 stop bits, 8-bit transmit character TTR 3Dh Baud rate generator supplies Tx clock at 6900 baud RPR 0Bh Timer disabled RTR 2Dh Bit residual Tx character CTCR 00h OMR E0h PCR 00h RSR 00h TRSR 00h GSR 00h IER 00h Interrupts disabled CCR 40h Reset Rx CCR 00h Reset Rx ICR Only the first 4 DUSCCs support vector includes statusEntry Parameters
AH = 09h AL = Port number. For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, the valid range for this parameter depends on the presence of Zilog SCCs 1-3, as indicated in the HCD described under . The presence of SCC 0 is always assumed. Consequently, the valid range always includes SCC ports 0 and 1. For the Realtime Interface Co-Processor Multiport, Model 2 and the Portmaster Adapter/A, the valid range depends on the presence of additional Signetics DUSCCs as indicated the HCD described under . The presence of DUSCC 0 is not assumed. The table that follows indicates the relationship between those SCCs that are present and functioning and the valid ports for this parameter. SCC/DUSCC Ports SCC/DUSCC Ports --------- ----- --------- ----- AL = 0 0,1 AL = 8 16,17 1 2,3 9 18,19 2 4,5 10 20,21 3 6,7 11 22,23 4 8,9 12 24,25 5 10,11 13 26,27 6 12,13 14 28,29 7 14,15 15 30,31
Exit Parameters
Carry flag = 0
Errors
Carry flag is set if non-valid SCC specified
Registers Changed
None
Memory Affected
None
Example Call
STI ;enable interrupts to 80C186 MOV DX, DUSCCBASE ;get DUSCC base address ADD DL, AH ;add DUSCC IER register offset OUT DX, AL ;write zeros to IER MOV AH,09h ;parameter required MOV AL,0 ;configure SCC channel 0 INT 0FEh ;request for service JC ERROR_HAN ;if error, non-valid port ; specified
Resets a DMA channel and configures it to a defined state.
INVOCATION: INT FEh, AH = 0Ah
----------------------------------------------------
FUNCTION:
This routine resets a DMA channel and configure it to a specific defined state. The requested channel is programmed as follows:
------------------------------------------------------ Register Value Description ------------------------------------------------------ SOURCE POINTER 0040Dh (PROM work area) DESTINATION POINTER 0040Dh (PROM work area) TRANSFER COUNT 0000h (Move 0 bytes) CONTROL WORD FE04h (Storage to storage transfer with no increment or decrement; transfer count indicated with interrupt disabled; no synchronization; timer request disabled; stop DMA; byte transfers. (For more information, refer to the Intel iAPX 86/88, 186/188 User's Manual Hardware Reference, Figure 5-9, "DMA Control Word Register and Bit Descriptions")
Entry Parameters
AH = 0Ah AL = DMA channel number (0 or 1)
Exit Parameters
Carry flag = 0
Errors
None (carry flag is always reset to 0)
Registers Changed
None
Memory Affected
None
Example Call
MOV AH,0Ah ;parameter required MOV AL,0 ;configure DMA channel 0 INT 0FEh ;request for service
Resets a CIO timer to a specified defined state.
INVOCATION: INT FEh, AH = 0Bh
----------------------------------------------------
FUNCTION:
This routine stops a CIO timer without resetting the CIO or affecting the ports or the other timers. The requested CIO timer is enabled and the registers are shown below:
Restrictions:
Timer 3 on CIO 0 cannot be configured
------------------------------------------------------ Register Value Description ------------------------------------------------------ MODE SPECIFICATION 0000 0101 Single-cycle, one-shot, can be retriggered TIMER CONSTANT MSB 1111 1111 Maximum count TIMER CONSTANT LSB 1111 1111 Maximum count COMMAND/STATUS 001x x00x where x = read-only bits REGISTER Interrupt enabled, interrupt pending, and interrupt under service flags are reset to zeros.
Entry Parameters
AH = 0Bh AL = Timer number. For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, the valid range for this parameter depends on the presence of CIO 1, as indicated in the HCD described under . If CIO 1 is present and functioning, the range is 0-4; otherwise, the range is 0-1. For the Realtime Interface Co-Processor Multiport, Model 2 and the Portmaster Adapter/A, the valid range depends on the presence of additional CIOs, as indicated in the HCD described under . If CIO 7 is present and functioning, the range is 0-16h. The table that follows indicates the relationship between those CIOs that are present and functioning and the values for this parameter. AL = 00h CIO 0 timer 1 0Eh CIO 5 timer 1 01h CIO 0 timer 2 0Fh CIO 5 timer 2 02h CIO 1 timer 1 10h CIO 5 timer 3 03h CIO 1 timer 2 11h CIO 6 timer 1 04h CIO 1 timer 3 12h CIO 6 timer 2 05h CIO 2 timer 1 13h CIO 6 timer 3 06h CIO 2 timer 2 14h CIO 7 timer 1 07h CIO 2 timer 3 15h CIO 7 timer 2 08h CIO 3 timer 1 16h CIO 7 timer 3 09h CIO 3 timer 2 0Ah CIO 3 timer 3 0Bh CIO 4 timer 1 0Ch CIO 4 timer 2 0Dh CIO 4 timer 3
Exit Parameters
Carry flag = 0 if no error; 1 if non-valid CIO timer specified
Errors
Carry flag is set if non-valid CIO timer specified
Registers Changed
None
Memory Affected
None
Example Call
MOV AH,0Bh ;parameter required MOV AL,0 ;configure hardware timer 0 INT 0FEh ;request for service JC ERROR_HAN ;if error, non-valid hardware ; timer specified
Initializes watchdog timer and CIO 0 Port C.
INVOCATION: INT FEh, AH = 0Ch
----------------------------------------------------
FUNCTION:
This routine initializes the watchdog timer and CIO 0 Port C, without resetting CIO 0 or affecting the other ports or timers. The registers are written as follows:
------------------------------------------------------ Register Value Description ------------------------------------------------------ MODE SPECIFICATION 0010 0101 Single-cycle, one-shot, can be retriggered External count disabled, external output disabled TIMER CONSTANT MSB 1111 1111 Maximum count TIMER CONSTANT LSB 1111 1111 Maximum count COMMAND/STATUS 0010 0000 REGISTER Interrupt enabled, interrupt pending, and interrupt under service flags are reset to zeros.
Port C is programmed as follows:
------------------------------------------------------ Register Value Description ------------------------------------------------------ DATA PATH POLARITY 0000 1111 All inverting DATA DIRECTION 0000 1010 Port C, bit 0 and 2 outputs Port C, bit 1 and 3 inputs SPECIAL I/O CONTROL 0000 0000 Normal PORT C DATA REGISTER 0000 0001
Note:
This routine first disables the watchdog timer and resets any resulting interrupt. After initialization, the timer output enable is off, the timer is not running, and the error LED is off. For normal operation of the watchdog function, the output enable (EOE) must be set on, after the timer is started.
Entry Parameters
AH = 0Ch
Exit Parameters
Watchdog timer is enabled but stopped; error LED is off For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, Carry flag = 0 For the Realtime Interface Co-Processor Multiport, Model 2 and the Portmaster Adapter/A, Carry flag = 1 if error detected; = 0 if no error
Errors
Carry flag set if CIO 0 not present, or input parameter is out of range
Registers Changed
None
Memory Affected
None
Example Call
MOV AH,0Ch ;parameter required INT 0FEh ;request for service ;After int: ; Watchdog timer is enabled but stopped; error LED is off
Sets the interrupt priorities of the shared storage interface chip (SSTIC) and the other devices on the co-processor adapter.
INVOCATION: INT FEh, AH = 0Dh
----------------------------------------------------
FUNCTION:
This routine sets the interrupt priorities to the 80186 of the SSTIC and the other devices on the SSTIC. The default priorities have the SCCs and CIOs higher than the SSTIC.
Entry Parameters
AH = 0Dh AL = 00 indicates SSTIC is lower priority, SCCs and CIOs are higher priority (default state) 01 indicates SSTIC is higher priority, SCCs and CIOs are lower priority
Exit Parameters
Carry flag = 0
Errors
None (carry flag is always reset to 0)
Registers Changed
None
Memory Affected
None
Example Call
MOV AH,0Dh ;parameter required MOV AL,01 ;SSTICC has higher priority INT 0FEh ;request for service
Gets the identifier of the extended Interface Board.
INVOCATION: INT FEh, AH = 0Eh
-------------------------------------------------
FUNCTION:
This routine returns the identifier of the extended Interface Board.
Restrictions: This routine is not valid for the Realtime Interface Co-Processor adapter.
Entry Parameters
AH = 0Eh
Exit Parameters
CL = Extended Interface Board identifier CH = 00h
The following list contains Interface Board IDs for released products. Refer to the appropriate Hardware Technical Reference Manual for the IDs of future products. The IDs for the Realtime Interface Co-Processor adapter are returned by the Diagnostic Service, Get Interface ID routine (INT FEh, AH=07h).
Adapter Cards and Interface Boards ID ---------------------------------- ---- Realtime Interface Co-Processor RS-232-C (1-port) C1h RS-422-A/X.21 (1 port) C2h 20 ma Current Loop (1 port) C3h V.35 (1 port) C4h Realtime Interface Co-Processor Multiport RS-232-C (4-port) or RS-232-C (8-port) C7h RS-232-C (4-port)/RS-422-A (4-port) C8h Realtime Interface Co-Processor Multiport, Model 2 RS-232-D (8-port) 10h RS-422-A (8-port) 21h 4-Port Selectable BFh
Exit Parameters (Continued)
Adapter Cards and Interface Boards (Cont) ID ---------------------------------- ---- Realtime Interface Co-Processor Multiport/2 RS-232-C (4-port) or RS-232-C (8-port) C7h RS-232-C (6-port sync) CFh RS-232-C (4-port)/RS-422-A (4-port) C8h RS-422-A (8-port) BEh Japan DI/DO D0h Portmaster Adapter/A RS-232-D (8-port) 10h RS-422-A (8-port) 21h 4-Port Selectable BFh 6-Port, V.35 18h 6-Port, X.21 28h For all of the above base cards No Interface Board FFh All other 8-bit values are reserved X.25 Co-Processor/2 C9h High-Speed Communication Co-Processor C9h Carry flag = 0
Errors
None (carry flag always reset to 0)
Registers Changed
CX
Memory Affected
None
Example Call
MOV AH,0Eh ;parameter required INT 0FEh ;request for service ;After int: ; CL = Interface Board identifier ; CH = 00h
Tests each byte of the specified RAM space.
INVOCATION: INT FEh, AH = 0Fh
----------------------------------------------------
FUNCTION:
This diagnostic routine tests each byte of the specified RAM space for addressability and pattern retention. The test uses the translate table to map the input addresses into the upper megabyte of memory, if necessary.
Restrictions:
Entry Parameters
AH = 0Fh ES = Upper 16 bits of base address DI = Lower 16 bits of base address BX = Number of bytes to test (upper word) DX = Number of bytes to test (lower word)
Exit Parameters
Carry flag = 0 if no error; 1 if error
Errors
CF = 1 if address exceeds memory limit, or memory error
Registers Changed
None
Memory Affected
Tested RAM space
Example Call
MOV ES,AX ;Get upper 16 physical address bits of RAM area to test MOV DI,DX ;Get lower 16 physical address bits of RAM area to test MOV BX,0001h ;Get upper word of byte count MOV DX,0000h ;Get lower word of byte count ; test 64K bytes MOV AH,0Fh ;parm required for RAM test INT 0FEh ;request for service JC ERROR_HAN ;if error, CF = 1
Returns the size of installed RAM storage.
INVOCATION: INT FEh, AH = 10h
----------------------------------------------------
FUNCTION:
This routine returns the RAM size, in bytes, that the co-processor adapter can detect.
Restrictions: This call is not valid for the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters.
Entry Parameters
AH = 10h
Exit Parameters
Carry flag = 0 AX = Lower 16 bits of byte count DX = Upper 16 bits of byte count
Errors
None (carry flag always reset to 0)
Registers Changed
AX, DX
Memory Affected
None
Example Call
MOV AH,10h ;AH = 10h, parameter required INT 0FEh ;request for service ;after int., AX = Lower 16 bits of byte count DX = Upper 16 bits of byte count
Configures a bus master channel to a known state.
INVOCATION: INT FEh, AH = 11h
----------------------------------------------------
FUNCTION:
This routine sets all bus master registers on a given channel to zeros.
Restrictions: This call is not valid for the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2, or Multiport Adapter, Model 2 adapters.
Entry Parameters
AH = 11h AL = Channel number
Exit Parameters
Carry flag = 0
Errors
None (carry flag always reset to 0)
Registers Changed
None
Memory Affected
None
Example Call
MOV AH,11h ;AH = 11h, parameter required INT 0FEh ;request for service
Configures all DMA/Peripheral Interface Controller channels to a known state.
INVOCATION: INT FEh, AH = 12h
----------------------------------------------------
FUNCTION:
This routine sets all DMA/Peripheral Interface Controller registers to zeros.
Restrictions: This call is not valid for the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters.
Entry Parameters
AH = 12h
Exit Parameters
Carry flag = 0
Errors
None (carry flag always reset to 0)
Registers Changed
None
Memory Affected
None
Example Call
MOV AH,12h ;AH = 12h, parameter required INT 0FEh ;request for service
Creates the Port Configuration Descriptor and the Hardware Configuration Descriptor.
INVOCATION: INT FEh, AH = 13h
----------------------------------------------------
FUNCTION:
This routine builds the Port Configuration Descriptor (PCD), the Hardware Configuration Descriptor (HCD), and the extended Hardware Configuration Descriptor (Hardware Type Descriptor). The PCD is a RAM table which contains data retrieved from the Interface Board ROS and/or base card tables (stored in the adapter's PROM). Prior to calling this routine, the user must clear the HCD and the Extended HCD fields in the Interface Block.
This routine also checks the Interface Board ROS Checksum prior to creating the table in RAM.
Note:
This function assumes that the direction flag has been cleared prior to calling this module.
Restrictions: This call is not valid for the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters.
Entry Parameters
AH = 13h
Exit Parameters
Carry flag = 0 if no error; 1 if error
Errors
CF = 1 if Interface Board ROS checksum error
Registers Changed
None
Memory Affected
This routine creates the PCD in RAM. The location of the PCD depends on the size of RAM. Its location can be determined by reading two pointers. The first pointer is the XROSWRK pointer, located in the PROM Work Area. This will point to the Extended PROM Work Area. A pointer in this area, the PCDPTR, will point to the PCD.
Example Call
XOR AX,AX ;Clear the register ;The following clears assume DS=0 MOV HCD,AX ;Clear the lower word of the HCD 0:456 MOV CCHCD,AX ;Clear the upper word of the HCD 0:458 MOV XHCDL,AX ;Clear the lower word of the Extended HCD 0:468 MOV XHCDH,AX ;Clear the upper word of the Extended HCD 0:46A MOV AH,13h ;AH = 13h, parameter required INT 0FEh ;request for service JC ERROR_HAN ;if error, CF = 1
Returns a base card ID.
INVOCATION: INT FEh, AH = 14h
----------------------------------------------------
FUNCTION:
This function returns a base card ID. It returns unique values for Multiport Adapter, Model 2 and Portmaster Adapter/A base cards.
Entry Parameters
AH = 14h
Exit Parameters
The following list contains base card IDs for released products. Refer to the appropriate Hardware Technical Reference Manual for the IDs of future products. AL = 00h for the Realtime Interface Co-Processor Multiport, Model 2 AL = 80h for Portmaster Adapter/A For the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters, the carry flag = 1. (The values returned for this group of adapters does not correspond to the base card ID.)
Errors
None; however, Carry flag = 1 is returned for the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters
Registers Changed
AL
Memory Affected
None
Example Call
MOV AH,14h ;AH = 14h, parameter required INT 0FEh ;request for service JC QUERY_ID ;check base card ID if CF=1 ;after int., AL = base card ID
Stops one or more DMA/Peripheral Interface Controller channels.
INVOCATION: INT FEh, AH = 15h
----------------------------------------------------
FUNCTION:
This routine stops a DMA/Peripheral Interface Controller channel. It can stop an individual channel or all DMAPIC channels.
Restrictions: This call is not valid for the Realtime Interface Co-Processor, the Realtime Interface Co-Processor Multiport, and the Realtime Interface Co-Processor Multiport/2 adapters.
Entry Parameters
AH = 15h AL = DMAPIC Channel Number or AL = FFh, ==> stop all channels
Exit Parameters
Carry flag = 0
Errors
None (carry flag always reset to 0)
Registers Changed
None
Memory Affected
None
Example Call
MOV AL,01h ;request to stop DMAPIC channel 1 MOV AH,15h ;AH = 15h, parameter required INT 0FEh ;request for service
Last modified: March 25, 1999