The text of a manual · part 19 of 38
PEN*KEY 6100 Computer Programmer's Reference Guide: Section 6: Conversions and Interfaces, pages 157 to 166
Pages 157 to 166 of 328, from PEN*KEY 6100 Computer Programmer's Reference Guide
The original document is the PDF (1.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Norand 6100
Page 157
SECTION 6
Conversions and Interfaces
Not all status bit values of the PCĆcompatible UARTs are supported. Break conditions are not generated or detected. Sticky parity is not supported. The transmit shift register empty and transmit holding register bits are both set when the UART is ready. The carrier detect, ring indicator, delta carrier detect, trailingĆedge ring indicaĆ tor, delta data set ready, and delta clearĆtoĆsend signals are not available.
INT 15h: Multitasking Services (Description) Subfunction 1, of Interrupt 15h, is traditionally reserved for cassette interface control. The 4000 Series BIOS replaced it with a set of multitasking services inĆ formally referred to as INT15. 4000API.EXE provides this same set of services for 4000 Series multitasking applications. These services are nonstandard, but 4000API.EXE may be executed on any PC to provide these services. Tasks and Scheduling
Int15 manipulates two linked lists of task contexts, the ready list and the pended list. The pended list contains tasks that are waiting for some event. A task moves from this list to the ready list when its timeout expires or when the event on which it is waiting occurs. The ready list is a queue of tasks scheduled for execution. Tasks enter at the tail of the queue and are activated from the head. All tasks have the same priority and are executed roundĆrobin. The currently executing task is not on either list. It moves to the pended list if it issues any," pend on mailbox, pend on queue, or delay with timeout comĆ mands. The current task moves to the ready list if its time slice expires (preempĆ tive only) or if it voluntarily gives up control by issuing a delay with 0 timeout. Int15 defaults to cooperative multitasking. That means that every task must occasionally give up control of the processor to let other tasks execute. By enabling timeĆslicing, int15 becomes a preemptive multitasker. Each task in the ready list is allocated a 55Ćmillisecond time slice. If the currently executing task exhausts its time slice before relinquishing control of the processor, it is forĆ cibly swapped out and placed on the tail of the ready list. Timeouts
Functions that require timeout values as input expect the register pair DXCX to contain the number of milliseconds before timeout. The timer resolution is the same as the system timer ticks: 55 milliseconds. A task that requests a one milĆ lisecond time out is guaranteed to wait at least one millisecond and possibly up to 55 milliseconds. Resource Arbitration and Task Communication
Most of the BIOS device handling services are not reentrant. Tasks cannot share the same device (the display, for example) without an arbitrator that ensures that both tasks do not try to use the BIOS at the same time. This resource arbitration can be handled via the intertask communication proĆ vided by mailboxes and queues. PEN*KEY R 6100 Computer Programmer’s Reference Guide
6-21
6. Conversions and Interfaces
The transmit shift register empty and break detect signals are not available.
Page 158
Conversions and Interfaces
SECTION 6
Mailboxes
A mailbox is a 4Ćbyte variable used for messageĆpassing between tasks. A mailĆ box is empty if it contains 0; otherwise, it contains a message. A task can perĆ form three mailbox operations: post, pend, and accept. 6. Conversions and Interfaces
Posting is the action of placing a 4Ćbyte message into a mailbox. Posting to a mailbox that is not empty overlays the message that was in the mailbox. When a task pends on an empty mailbox, the task is moved to the pended list until another task posts a message to the mailbox. When a task pends on a mailbox with a message in it, the pend request returns without pending. A task can accept from a mailbox if it wants to retrieve a message from the box without pending. An accept from an empty box returns zero. Queues
A queue is an 8Ćbyte variable for messages passing between tasks. A queue must be initialized to empty by calling the queue init function. A task can perĆ form three queue operations: post, pend, and accept. Posting is the action of adding a new message node to a queue. A message node consists of an 8Ćbyte field (manipulated by INT 15) followed by a message field. The length and structure of the message field is up to the user. Queues differ from mailboxes in that posting to a nonempty queue just adds a new node to the tail of the queue. When a task pends on an empty queue, the task is moved to the pended list until another task posts to the queue. When a task pends on a nonempty queue, the pend request returns immediately without pending. A task can accept from a queue if it wants to retrieve a message from the queue without pending. An accept from an empty queue returns zero.
INT 15h: Intermec Miscellaneous System Services These services consist of the following topics: " " " " "
Accumulating and computing the CRC on specified blocks of data Receiving, sending, and exchanging network packets Adjusting the processor speed Beeping the buzzer Returning a pointer to the BIOS version
INT 15h: PC-Like Miscellaneous System Services These services consist of the following topics: " " "
Requesting system shutdown Translating keyboard scan codes Pending until a key is pressed on the keyboard
INT 16h: Keyboard Services These services consist of the following topics: "
" "
6-22
Set Typematic Rates " Turn the key repeat on and off " Setting the key repeat Turn the keyclick on and off Swapping the keyboard translate tables
PEN*KEY R 6100 Computer Programmer’s Reference Guide
Page 159
SECTION 6
Conversions and Interfaces
Locating 4000API.EXE Interrupts
The categories of interrupt services are listed in the center column of Table 6-3. Individual interrupt definitions can be located: Using Table 6-3 (by keyword) listed in the right column, and searching for them in the Interrupt Index. Most nouns and verbs can locate an interrupt definition using the Interrupt Index, with the exception of Set and Get. " Using the Interrupt Cross-Reference table or just thumbing through the definitions, searching for the notation, 4000API. "
Table 6-3 Programming Interrupt Summary INT#
Supported Interfaces
Keywords
10h
Video Functions
Backlight, Contrast, Comparator, Port, Refresh, Screen, V25
14h
Serial Communications
Character, Communications, Control, Extended, Initialize, Port, Power, Receive, Send, Serial, Status
15h
Multitasking Services
Accept, Create, Current, Delay, Delete, Disable, Empty, Enable, Identifier, Information, Initialize, Mailbox, Message, Multitask, Optional, Pend, Post, Reset, Queue, Return, Switch, Task, Timeout, TimeĆslicing
15h
Norand Miscellaneous System Services
Accumulate, Adjust, Beep, BIOS, Block, Buzzer, Compute, CRC, Data, Exchange, Network, Packet, Pointer, Processor, Receive, Return, Send, Speed, Version
15h
PC-Like Miscellaneous System Services
Battery, Keyboard, Low, Normal, Pend, Request, Scan code, Shutdown, System, Translate
16h
Keyboard Functions
Default, Key, Keyboard, Keyclick, Number, Rate, Repeat, Return, Swap, Tables, Timers, Translate, Turn on/off, Typematic
Unimplemented 4000 Series BIOS APIs These 4000 Series Interrupt 16h Keyboard BIOS interfaces are not implemented in 4000API.EXE Function AH = 0FCh: Set and Read Keyboard Mask Value " Function AH = 0FDh: Set Debounce Timer Value These 4000 Series Interrupt 15h functions are not implemented in 4000API.EXE. "
" " " " " "
Function AX = 01ECh: Huge Memory Transfer Function AX = 01EDh: Return ASIC Register Function AX = 01EEh: Return Silicon Serial Number Function AX = 01F1h: Turn On RAM Card Controller Function AX = 01F2h: Elapsed Timer Ticks Function AX = 01F3h: Turn Off RAM Card Controller PEN*KEY R 6100 Computer Programmer’s Reference Guide
6-23
6. Conversions and Interfaces
Several 4000API interrupts are supported for the 6100 Computer. The supĆ ported interrupts are listed in the Interrupt Cross-Reference table, located under the Interrupt Cross-Ref (by number) tab. Even though they are matrixed into the entire set of interrupts, each individual interrupt supported by 4000API.EXE can be identified by the notation, 4000API, just under the interrupt heading.
Page 160
Conversions and Interfaces
" " " "
6. Conversions and Interfaces
" " " "
SECTION 6
Function AX = 01F6h: Battery Service Function AX = 01F7h: Set Low-Battery Interrupt Message Function AX = 01FCh, DL = 1: Set Length Of Available Memory Function AX = 01FCh, DL = 2: Allocate BIOS memory Function AX = 4100h: Wait On Any Event Function AH = 85h: System Request Has Been Pressed Function AX = 9102h: Post Keyboard System Resume Vector Interrupt 6Ch
4000 Series Screen Emulation: VROTATE.EXE, FONTSEL.EXE Topics Overview VROTATE.EXE, Parameters and Command Line Switches FONTSEL.EXE, Parameters and Command Line Switches BMP Conversion Utility: BMPUTIL Locating 4000 Series Video Interrupts Unimplemented 4000 Series Video Functions
Page NO TAG 6-25 6-26 6-26 6-27 6-27
VROTATE.EXE and FONTSEL.EXE are 4000 Series screen emulation programs for the 6100 Computer, in DOS text mode. These programs port applications, written for the 4000 Series platform to the 6100 Computer without modifying the display logic. VROTATE is a TSR program that provides screen rotation and FONTSEL provides the font characteristics. VROTATE and FONTSEL provide 4000 Series screen features, such as: Character mapping " Cursor fixed mode " Variable font sizes (20, 21, or 16 characters across the screen) VROTATE and FONTSEL.EXE work together providing several font selections, as described below. "
These programs replace the standard VGA BIOS interface available on the 6100 Computer with a 4000 Series compatible video BIOS interface. Since they replace the standard VGA BIOS, standard VGA calls are not available once VROTATE and FONTSEL are loaded. The VROTATE utility provides a rotate INT 10 interface that rotates the INT 10 calls into a portrait mode. It filters out video BIOS calls. VROTATE and FONTSEL work only with the 320x240 pixel display of the 6100 Computer. In the absence of command line switches, the default mode for VROĆ TATE and FONTSEL are as follows: " " "
"
6-24
Cursor chase video mode 8x16 bitmap font Inverse mode on (characters above 127 are mapped to inverse video characĆ ters 0ć127 when the high bit is turned off) Cursor turned off
PEN*KEY R 6100 Computer Programmer’s Reference Guide
Page 161
SECTION 6
Conversions and Interfaces
VROTATE.EXE, Parameters and Command Line Switches The format for the VROTATE command line is: where the brackets [] indicate optional parameters and the descriptions of the parameters are as follows: Parameters
Description xy
Coordinates of the upperĆleft corner of the display width height
Window size and rotated position of the display, under which the INT 10 calls are limited or emulated
-Repaint_scroll
Causes the rotated BIOS to repaint the screen on all scroll operaĆ tions, which is much slower, but very compatible
-Nowrap
Causes the screen to truncate at the right margin, instead of wrapĆ ping to the next line
-PLN
Applies hacks to support the PLN error screen
-Disable
Disables the VROTATE driver, which remains in memory, and can be reenabled by running VROTATE again
PL/N Options The following is an additional parameter to be used for PL/N applications. Parameters
Description
-PLN
To be used for PL/N applications.
Norand Enhanced Video BIOS Functions The VROTATE utility implements the Norand Enhanced Video BIOS calls. The general Enhanced Call Formats are as follows: On Entry: AH = 7Fh Norand enhanced operations AL = Subfunction On Return: AH = Error code AL = 7Fh If enhanced function is supported Subfunctions: AL = 00h Get version information AL = 13h Absolute write string AL = 20h Repaint screen AL = 21h Load or select font AL = 28h Get window size AL = 29h Set window size AL = 2Ah Physical write image AL = 30h Disable shadow buffer updates AL = 32h Disable rotated video AL = 33h Enable rotated video For details of these interfaces, refer to the Norand Enhanced Video BIOS interĆ rupts, starting on page 6-56 in this section. PEN*KEY R 6100 Computer Programmer’s Reference Guide
6-25
6. Conversions and Interfaces
VROTATE [x y [width height]] [–Repaint_scroll] [–Nowrap] [–PLN] [Disable]
Page 162
Conversions and Interfaces
SECTION 6
FONTSEL.EXE, Parameters and Command Line Switches This utility selects and loads the fonts in VROTATE. The command line is: 6. Conversions and Interfaces
FONTSEL <font_number> or FONTSEL <font_number>=<[path\]font_file_name> where: <font_number> is one of the following: 0 Sets up the display for 8x8 pixels per character. Results in a 30Ćcolumn, 20Ćline display. 1 Sets up the display for 8x16 pixels per character. Results in a 30Ćcolumn, 20Ćline disĆ play. 2 Sets up a userĆselectable display. path\ Consists of the DOS path where the font file is located. font_file_name The name of a file that contains the font to be loaded. " NOTE:
The current default font (and maximum font size) is 12x24.
The first format is for selecting the current active font. The second format is for replacing a font in VROTATE, where font_number is the font to be replaced. If you replace the currently used font, also select the font again to cause the new character size to be used. If not trashed, it shows up on the display. The format of a font file is: Version Char_width Char_height Font_data dw dw dw db
1 ? ? ? dup(?)
The 8x8 and 8x16 fonts can only be replaced with an 8x8 and 8x16 font. The user font can be replaced by any size font that meets the following requirements: " " "
Width must be a multiple of 4. Height must be a multiple of 8. Total size of the font data cannot exceed 9216 bytes, which is the size of the 12x24 font.
BMP Conversion Utility: BMPUTIL This is a Windows utility for converting BMP files to a format used by the NorĆ and Enhanced Video BIOS. This utility opens a standard Windows BMP file and generate the image data in a format useful for an application to send to the Physical Write Image BIOS function. The generated formats are C, Assembler, and binary.
6-26
PEN*KEY R 6100 Computer Programmer’s Reference Guide
Page 163
SECTION 6
Conversions and Interfaces
Locating 4000 Series Video Interrupts
The categories of interrupt services are listed in the center column of the followĆ ing table. Individual interrupt definitions can be located: Using Table 6-4 (by keyword) listed in the right column, and searching for them in the Interrupt Index. Most nouns and verbs can locate an interrupt definition using the Interrupt Index, with the exception of Set and Get. " Using the Interrupt Cross-Reference table or just thumbing through the definitions, searching for the notation, VROTATE. "
Table 6-4 Interrupts Supported by VROTATE.EXE INT#
Supported Interfaces
Keywords
10h
Alternate Settings Video Functions
Alternate, Current Display, Parameter, Physical, Pointer, Refresh, Return, Screen, Settings, Size
10h
Set Norand Specific Display Modes
Chase, Fixed, Invert, Mode
10h
Norand (enhanced) Video BIOS
Absolute, Buffer, Font, Image, Information, Load, Physical, Repaint, Rotated, Select, Shadow, String, Size, Text, Updates, Version, Video, Window
10h
Display Services
Active, Attribute, Character, Cursor, Mode, Page, Position, Return, Scroll, State, Teletype, Type, Video
10h
Programmable Font Support
Default, Font, Load, System, User
Unimplemented 4000 Series Video Functions The following functions remain unimplemented within the facilities for screen rotation and font mapping: " " " " " " " "
Function AX = 04h: Read Light Pen Position and Mode Function AH = 12h, Subfunction 20h: Select Alternate Print Screen Function AH = 12h, Subfunction 35h: Switch Active Display Function AX = 12E2h: Set 16Ćline display parameter packet Function AX = 12E3h: Set Graphics Mode Function AH = 12h, Subfunction BL = 0FDh: Return Physical Display Size Function AH = 0FEh: Get Video Buffer Address Function AX = 0FFh: Refresh the Screen
PEN*KEY R 6100 Computer Programmer’s Reference Guide
6-27
6. Conversions and Interfaces
Several 4000 Series Video interrupts are supported for the 6100 Computer. The supported interrupts are listed in the Interrupt Cross-Reference table, located unĆ der the Interrupt Cross-Ref (by number) tab. Even though they are matrixed into the entire set of interrupts, each individual interrupt supported by the video drivers, VROTATE.EXE and FONTSEL.EXE can be identified by the notation, VROTATE, immediately under the interrupt heading. There are one or more reference tokens for each of the interrupt definitions, to accommodate interrupts supported by one or more applications.
Page 164
Conversions and Interfaces
SECTION 6
ATA BIOS: ATABIOS.SYS Overview 6. Conversions and Interfaces
ATABIOS.SYS is a DOS block device driver for removable hard disks (such as PC Card ATA devices), using card and socket services. It identifies and configures cards with a device ID of 0Dh and a function code of 4 (FIXED_DISK_CARD) and takes over the INT 13 interface for doing the physical I/O to the device. It is used with NORATA.SYS.
Usage ATABIOS.SYS comes with several command line switches. They are indicated by a preceding slash or dash and are caseĆinsensitive (such as -i and /I both indiĆ cate the same switch). Some switches are followed by data (text or numeric), in which the date immediately follows the switch (no space between).
Data Format " " "
EXAMPLE:
T is the indicator for a text character. H is the indicator for a hexidecimal digit. D is the indicator for a decimal digit.
A switch shown as NTTTTTTTT indicates that the “N” switch is followed by (up to) 8 characters (such as –nMODEM1). All switches are optional, and if omitted does NOT default to the switch or the value indicated.
Data Definitions " " " "
R DH FH IHHH
Retry command after a suspend Specify device type (default D) Specify function code (default 4) Specify I/O address (default - first available valid configuration)
Command Line Switches There are no switches for ATABIOS.SYS.
Cross-Reference by Interrupt Numbers This topic consists of the entire combined list of interrupts supported for the 6100 Computer. Each of the table entries in the crossĆreference table points to the page number for the associated interrupt title and its description. The following crossĆreference consists of the entire combined list of interrupts supported for the 6100 Computer, by interrupt number first, then by the subĆ function registers. Table 6-5 Interrupt Cross-Reference INT # 08h
6-28
Interrupt Functions System Timer
PEN*KEY R 6100 Computer Programmer’s Reference Guide
Subfunctions
Page 6-13
Page 165
SECTION 6
Conversions and Interfaces
Table 6-5 (Continued) Interrupt Cross-Reference Interrupt Functions
Subfunctions
09h
Standard Keyboard Interface
10h
Display Services (Continued) Set Display Mode Set Cursor Type Read V25 Comparator Port Set Cursor Position Read Cursor Position and Mode Set Active Display Page Scroll Active Page Up Scroll Active Page Down Read Attribute and Character at Cursor Position Write Attribute and Character at Cursor Position Write Character Only at Cursor Position Set Color Palette Write Graphics Dot Read Graphics Dot Teletype Character Write Return Current Video State Set Palette Register Set Border Color Set Palette and Border Toggle Blink and Intensity Bit Get Palette Register Get Border Color Get Palette and Border Set Color Register Set Block of Color Registers Set Color Page State Get Color Register Get Block of Color Registers Set PEL Mask Get PEL Mask Get Color Page State Set Gray Scale Values Load User Font Load ROM 8x14 Fonts Load ROM 8x8 Fonts Set Block Specifier Load ROM 8x14 Font Set INT 1Fh Font Pointer Set INT 43h for User's Font Set INT 43h for ROM 8x14 Font
Page 6-35
AH= 00h 01h 01h 02h 03h 05h 06h 07h 08h 09h 0Ah 0Bh 0Ch 0Dh 0Eh 0Fh 10h 10h 10h 10h 10h 10h 10h 10h 10h 10h 10h 10h 10h 10h 10h 10h 11h 11h 11h 11h 11h 11h 11h 11h
AL=
BH=
BL=
F9h
00h 01h 02h 03h 07h 08h 09h 10h 12h 13h 15h 17h 18h 19h 1Ah 1Bh 00h/10h 01h/11h 02h/12h 03h 04h/14h 20h 21h 22h
PEN*KEY R 6100 Computer Programmer’s Reference Guide
6-36 6-37 6-37 6-38 6-38 6-38 6-39 6-39 6-39 6-40 6-40 6-41 6-41 6-41 6-42 6-42 6-42 6-42 6-43 6-43 6-43 6-43 6-44 6-44 6-44 6-45 6-45 6-45 6-45 6-46 6-46 6-46 6-47 6-47 6-47 6-48 6-48 6-48 6-49 6-49
6-29
6. Conversions and Interfaces
INT #
Page 166
Conversions and Interfaces
SECTION 6
Table 6-5 (Continued) Interrupt Cross-Reference INT # 10h 6. Conversions and Interfaces
Interrupt Functions Display Services (Continued) Set INT 43h for ROM 8x8 Font Set INT 43h for ROM 8x16 Font Get Font Information Get Video Configuration Information Set Scan Lines Enable/Disable Default Palette Loading Enable/Disable Video Enable/Disable Gray Scale Summing Enable/Disable Cursor Emulation Enable/Disable Screen Refresh Set Physical Display Size Return Pointer to Current Display Parameters Return Physical Display Size Read or Write Contrast Backlight Off or On Return Invert Mode Enable Invert Mode Disable Invert Mode Set Chase Mode Set Fixed Mode Load User Font Load System Default Font Get Version Information Absolute Write String Repaint Text Window Load or Select Font Get Window Size Physical Write Image Disable Shadow Buffer Updates Disable Rotated Video Enable Rotated Video
AH= 11h 11h 11h 12h 12h 12h 12h 12h 12h 12h 12h 12h 12h 12h 12h 12h 12h 12h 12h 12h 14h 14h 7Fh 7Fh 7Fh 7Fh 7Fh 7Fh 7Fh 7Fh 7Fh
Subfunctions AL= BH= 23h 24h 30h
Page BL=
10h 30h 31h 32h 33h 34h 36h FAh FBh FDh FEh FFh FCh FCh FCh FCh FCh FCh 00h
DDh DEh DFh E0h E1h 00h 01h 00h 13h 20h 21h 28h 2Ah 30h 32h 33h
6-49 6-50 6-50 6-51 6-51 6-52 6-52 6-52 6-52 6-53 6-53 6-53 6-53 6-54 6-54 6-54 6-54 6-55 6-55 6-55 6-56 6-56 6-56 6-57 6-57 6-57 6-58 6-58 6-59 6-59 6-59
11h
Equipment Determination
6-14
12h
Memory Size Determination
6-15
13h
Disk Services Reset Disk System Read Status of Last Operation Read Sectors into Memory Write Sectors from Memory Verify Sectors
6-30
PEN*KEY R 6100 Computer Programmer’s Reference Guide
AH= 00h 01h 02h 03h 04h
AL=
BH=
BL= 6-59 6-60 6-60 6-60 6-61