This standard specifies the DOS Chinese information processing system interface specification (DOS-CPI for short). GB/T 15189-1994 DOS Chinese information processing system interface specification GB/T15189-1994 Standard download decompression password: www.bzxz.net
Some standard content:
National Standard of the People's Republic of China Specification of DOS Chinese information processing system interface Specirtcatlon of Ds Chinese information processing system interface 1 Subject content and scope of application GB/T 15189—94 This standard specifies the specification of DOS Chinese information processing system interface (abbreviated as OS-CPI, Specification of DOS Chinese 1n-formation Processing system Interface). This standard mainly defines the interface specification for application programs to call Chinese system functions and the interface specification for Chinese system drivers. This standard provides the function of removing the entire Chinese system, and after removal, it fully restores the support of GB2311 information processing seven-bit and "-bit coded character set code expansion technology standard. This standard mainly includes: system information functions, font functions, input method functions, prompt functions, display functions, keyboard functions, and printing functions. The Chinese support for B1OS INT10H, 16H, 17H original text functions in this standard should fully comply with the original text function call. This standard is applicable to the OOS Chinese information system and the drivers and applications of the DOS Chinese information system. 2 Function Class Definition 2.1 System Information Class Function Provides system information query or setting functions to help applications and drivers understand the existing resource status of the system and make reasonable and effective arrangements. 2. 2. Font functions Provide an interface for applications to obtain information about fonts installed in the system; provide functions such as obtaining information and querying font drivers installed in the system; provide functions such as installing/removing font drivers. 2.3. Input method functions Provide functions such as obtaining information about input methods installed in the system, querying and switching, and provide functions such as installing/removing input method drivers. 2.4. Prompt line functions Provide functions such as querying and setting the prompt line status: provide functions for outputting prompt line data information. 2.5. Display functions Support at least one Chinese character display mode; provide functions such as querying/setting supported display capabilities, and provide functions such as installing/removing display drivers. 2.6. Keyboard functions Provide functions for controlling system hotkeys, 2. 7 Printing functions Provide basic character and graphic printing, and related control functions: define basic printing control sequences, and the control sequences that need to be expanded shall be implemented by the manufacturer through the monitoring program; Approved by the State Administration of Technology Supervision on September 8, 1994 and implemented on April 1, 1995 W.bzsoso.coDGB/T 15189-94 Provide functions such as installation/removal of print drivers and print monitoring programs. 3 Xinhui definition 3. 1 Calling method Entry: (AH) 2 Function class number (AL) 2 Function number (DH)=Function selection (DL) Sub-function selection (ES:BX)=Data structure buffer INT XXH Exit: (AX) - 0 > 8000H CF flag Correct or warning Interrupt number XXH is determined by system initialization. It is obtained when AP calls the Chinese system to check whether the system exists. The method is as follows 1 Check whether the INT2FHAH=ODBH function exists Entry: (AX)-0DB00H Call: INT 2FH Exit, (AL)-0FFH (AL)=00H (This function is valid) (This function is invalid) Note: The validity of this function only means that AH=ODBH(INT 2FH>The call is valid, which does not mean that the Chinese system must exist. To check whether the Chinese system exists, the following call is required. Query whether the Chinese system exists, the system service interrupt number and the entry address b Entry: (AX)-0DB01H Call: INT 2FH (AX)=0CD05H The identification of the existence of the Chinese system (DL) -XXH The interrupt number of the Chinese system service entry (ES·BX) - Chinese system service entry address 3. 2 Function class abbreviations The function class numbers are shown in Table 1. Number values 07H~3FH are reserved by the system and are defined by the user after 40H. W.bzsoso:com3.3 Naming method System information functions Font functions Input method functions Prompt line functions Display functions Disk functions Print functions GB/T15189—94 This standard uses a form similar to C language to describe the relevant data structure. The variables are constructed in the following way: prefix + basic type + modifier The basic types used in the standard are as follows: Byte; Character 1 Double byte character, such as Chinese unsigned character (unsigned character)uch- structure string, ending with NUL(atringterminaledwithNULl.character);function or procedure(function or procedure);flag: long integer(longinteger); ul——unsigned long integer(unsigned long integer);unsigned integer(unBigned chort integer). Value is based on the basic type, and complex data structures are described by adding prefixes. The preview used in the standard is as follows;array(array)+ far pointer(far pointer); count(count): indexintoarray(indexintoarray) id -identifier(identifier). For example, array, whose element type is unsigned integer array, whose element type is character; far pointer to unsigned integer array; far pointer to character array: far pointer to string (terminating with NULL) far pointer to function entry point; count in characters (count in character); count in bytes (count in byte); index of unsigned integer array (index). Qualifiers are used to give a brief description of the purpose of each variable in the data structure. The standard modifiers are as follows: W. First/Last Min/Max - First/Last; Minimum/Maximum, Old/New, Old/New ---- Next/Prev Sre/Det - Next/Previous Source/Standard: Current: Current maximum value. GB/T 15189-94 Users can also create modifiers that meet their own requirements as needed. When creating modifiers, the following rules must be followed: 8. Modifiers can contain more than one word, but the first letter of each word must be capitalized. There must be no redundant words. In ipBufferPuinter, Pointer is redundant and is correct to be written as fpBuffer. b. Example: achMethodName idCharSet- Base character array, representing the name of the input method, representing the ID of a character setr-an unsigned integer, representing the size of an information structureuInfoSize.. TypeFaceLst- fpabTypeFace fpsParam- The number of elements in the Type Face List, Far pointer to an array, each element of the array is 1 byte, each representing a font (Type Face); pointer to the base parameter structuresKbdInfo.---Keyboard information structure,IbCharType- Flag (1 byte), indicating the type of character (charactertype). 3.4 Return code information definition The return code is the information returned by the calling function and is stored in the AX register. If AX=0, it means that the execution is completed correctly. The meanings of the various parts of AX are defined as follows: 151413 Among them: bit15 represents the global return code: Warning: Error. bit14~12 indicates the command category that generates errors/warnings 1) Data (Data); Query (Query) Setting (Set), Installation (Add): Delete (Del); Command (Command) bit 11~8 indicates the function category that generates errors/warnings: 1) System information category functions: Prompt line category functions; Input method category functions; Character category functions; W. Display category functions: Chain disk category functions, Print category functions. GB/T 151B9—94 bit 7~0 indicates the details of the error/alert: 1) Execution failure (Fail) Buffer space is larger than the system requirement (Underflow) Buffer space is insufficient (Overflow); Selection error (BadSelection) Parameter combination error (Bad Combine): Parameter is undefined (Undefined); This function is not provided by the system (Unavailable): Status change (Change): Parameter value is out of range (OutRange), repeated setting (Duplicate); Insufficient system space (Not Enough Memory)). The return code is the result of the "OR" operation of the above four parts. The classification of this return code is shown in Table 2. Table 2 Execution correct bit 15 Error/Warning bit 14--12 Command category bit ~8 Function category bit 7~0 FUNCRET-OK FUNCRET-WARNING FUNCRET-ERROR FUNCRET-DATA FUNCRET-QUERY FUNCRET-SET FUNCRET-ADD FUNCRET-DEL FUNCRET-CMD FUNCRET-EXTSYS FUNCRET-SYS FUNCRET-CPS FUNCRET-STLN FUNCRET-FONT FUNCRET-DSP FUNCRET-KBD FUNCRET-FRT FUNCRET-NOPPUCESS FUNCRET-UNAVAIL FUNCRET-FAIL Return value Correct (NOERROR) Warning (BIT 15 IS OFF) Error (BIT 15 IS ON) Data (INFO/DATA) Query (QUERY) Set (SET) Installation (INSTALL) Remove (REMOVE) Quiet command (PROCESS COMMAND) System information functions Font functions Input method functions Prompt line functions Display functions Disk functions Print functions Wave execution This function is not provided Execution failed W.4 bit 7-~0 FUNCRET-UNDEFINE FUNCRET-CHANGE FUNCRET-UNDERFLOW FUNCRET-OVERFLOW FUNCRET-DUPLICATE FUNCRET-OUTRANGE FUNCRET-NOMEMORY FUNCRET-BADSELECT FUNCRET-BADCOMBINE System information functions 4. 1 Function list System information functions include: Query system information; Query system mode: Set system mode, Query the original interrupt vector population address of the system, and query the new interrupt vector entry address of the system. 4.2 Data structure GB/T 15189-94 Continued Table 2 Return value : 0012H Data is undefined Data has changed Buffer space is too large Buffer space is insufficient Data volume is complex Parameter value is out of range Insufficient memory space Option error Parameter combination error This structure is used when calling the "Query System Information" function. The system information data structure is shown in Table 3. "Table 3 Field name uInfoSize idSyaSign idMajior idMinor idSyaD idCharSet fpezSyaDesc In Table 3: Size of this structure System installed standards—-. "Chinese\ CPTC DOS-CPI version (such as version 1.10 idMajor = a1)CPTC LXUS-CPI version (such as version 1.10 idMinor = 10)Chinese system number (ID) Code page ID 936 for SCC System internal code ID System information descriptionwwW.bzxz.Net uInfaSize; the size of the system information structure, in bytes.idSysSign: indicates that the system has been correctly installed. The application can use this sign to determine whether the current Chinese system exists;idMajar, idMinor: store the CPTC DOS-CPI specification version, idMajor = 01, idMinor-00 represents 1.00 version;idSysID: This area can be used by Chinese character manufacturers to store manufacturer information and manufacturer version, idCP: Simplified Code Page (Code Page D) 936;WidCharSet: The internal code ID used by this font idCP=936 00H; GB 2312 code idCP-938 00H, TCA code 80H; Tele code 90HBIG5 code A0H; IBM 5550 code BOH, CNS code+ GB/T 15189—94 fpazSysDeac Far pointer to system description information. 4. 3 Function description 4. 3. 1 Query system information Description: This function is valid in both Chinese mode and English mode. Input: Output: (AX) 0000H (ES:BX) - the initial address of the system information structure buffer, and first fill the buffer size into the first word (AX) - 0000H, correct =2111H, the buffer is too large (Underflow) - 2112H, the buffer is insufficient (Overflo*) - 0A103H, the query failed or the query function is not provided (DX) - the actual size of the information in the system (byte) changes, AX, DX odd register Note, ①) If the highest bit (bit 15) of the AX high register output is 0, then (ES I BX> refers to the buffer area that stores the query spectrum. ② Regardless of whether this function is executed correctly or not, the (DX) register will return the actual space size of the system storage information Tip: This standard content only shows part of the intercepted content of the complete standard. If you need the complete standard, please go to the top to download the complete standard document for free.