ZX Format #04
14 июня 1996 |
|
IS-DOS - Category "IS-DOS - for beginners" No 4.
Category "IS-DOS - for beginners" No 4 Eliseev VA "IS-DOS - the first acquaintance" (Journal version) (C) PENCRAFT 1995 (C) ISKRASOFT 1995 Continued from - to No 1, 2, 3 _________________________________________ Shell In the previous section you learned One of the most important ways you can get the most commonly used tools and commands IS-DOS - call for special keys. However, do not always make sense to define the key for a particular team, because some teams are rarely needed, but under all the utilities of all possible combinations of key parameters is simply not enough. Therefore, to ensure timely treatment to the system It provides so-called. shell, whose responsibilities includes reading and transfer system commands entered by the user in a special area of memory called a "buffer command line." Entering commands in the this buffer is implemented through a special program - monitor command line, which is called mon.com and runs normally key CS + m (in the IS-DOS 2.0 and below - m). There is also the resident version of the monitor - mon.res, hotkey m and has a number of additional features, which will be discussed later. Monitor the command line opens special area of the screen - a window display, occupying the top three rows. In the upper left corner of this area is blinking cursor is the same as in the text editor. Generally, the monitor command line is a text editor in a nutshell, only created the text is not saved as a file and transferred to buffer the command line, where processed by the interpreter. Monitor control keys: CS +5 - cursor left CS +6 - cursor down CS +7 - cursor up CS +8 - cursor right CS +0 - delete character left SS + W - delete character under the cursor SS + E - insert a space CS +1 - mode Eng / Lat CS +2 - regimes Upper / Lower CS +3 - mode Insert / Replacement ENTER - the completion of entry and execution line CS +9, SS + ENTER, SS + CS, SS + A, SS + SPACE - Output from the monitor without having to line buffer content is not saved As you already understood, Keystroke ENTER leads to the completion of the command is entered, and starts the shell line. At the end of the command, as Typically, you return back to the monitor. Moreover, if the command is successful, the editing window is cleared and the cursor is placed in the upper left angle. If the command line allowed syntax error, eg incorrect parameters are specified, the command line remains on the screen, the cursor is placed at the end of the line, then you get the opportunity to correct the error and again try to execute a command by pressing ENTER, if you do and then it will not work - Click one of the keys out and read help-file to you want. If in the performance of your team place a system error - Larry will report this in a window on the lower half of the screen (transcript numbers of system errors, see the file S: HELP \ error.txt), then by pressing any key, you can go into the shell IS-DOS and speculate about the reasons for such the sad result. If system can not find the disk you want You file, the window error appears "No filename". If you suddenly get this message - remember that it does not necessarily mean that this file is not on drive at all, simply specify the full path to it, ie, in which subdirectory it should be sought. When you work in a monitor command line, as opposed to a text editor basic modes (Rus / Lat, upper / lower case, insert / replacement) are not displayed on the screen, which creates some difficulties however, this problem is easily solved by a special resident program indi.res. Install and run the commands Q: RES \ set Q: RES \ indi.res and @ indi, and you will see in the lower right corner of the window editing standard display modes: lat - Latin characters, in Russian - Russian, ins - insert mode, ovr - replace mode, the display modes in capital letters indicates a switch on capital letters. Resident monitor command line mon.res, which has already been mentioned, performs the same function as the mon.com, but has some additional features that make your command-line. Inside the resident monitor has a special buffer size of 256 bytes, which stored the commands entered by pressing ENTER. This frees you from having to re-type text commands to be call several times. In addition, you can edit the command text, even in If a system error or an error "No filename ". In the event that the keys failure, the command is not stored and the buffer contents remain unchanged. Commands in the buffer resident monitor arranged in the order they are entered, forming a ring-like stack. To move for him to find the right command, you can use the following keys: SS + SPACE - go to the previous command SS + CS, CS +9 - go to the next team Thus, to call the last command entered, press SS + SPACE, and for the withdrawal of the earliest preserved in the buffer - SS + CS. As buffer is filled, older teams erased, the contents of the stack is shifted to one line and a new command is written at its peak. The maximum number of memorized commands depending on their length and usually around 20. Resident monitor has one a useful feature - when you press the SS + ENTER at the current cursor position carries the name of the file or directory in which to challenge the monitor is cursor file panel. Output from the monitor with the refusal of execution line, because employment of other keys are only using SS + A. Program display modes indi.res works with a resident monitor as well as with com'ovskim. Let me remind you that when working with a resident monitor strictly Do not remove residents and drivers, set before himself mon.res, is bound to cause movement in memory of the monitor, and will lead to guaranteed failure. In such cases, use the program mon.com. Now let's talk more about the teams in the IS-DOS. Teams are internal and external. Are called internal commands that are located in the body system. There are only five teams: L_S / n - n to designate the unit system, L_Q / n - n to designate the device faster, L_T / n - n to designate the device current, CAT s - to make the current directory, as described in the string s, @ M - to run a memory resident program m where n - Symbols devices (both explicit - A, B, C, D, E, F, and Contingent - S, Q, T), s - the full path to the desired subdirectory (for example: Q: RES \ TRANS \ HELP \), m - the name under which set-resident program. Examples of internal commands IS-DOS: L_S / A - A device to designate the system L_Q / S - to appoint a quick same device that is assigned as a system CAT S: UTIL \ HELP - open (make current) directory S: UTIL \ HELP @ Indi - run a memory resident program established under the name indi Of course, before you call the @ need to TSR was established utility set.com. External teams in the IS-DOS commands are called, loadable from disk at the time of their execution. In fact any file can be com'ovsky external command. To call any external command to the command prompt, type the name of this team with all necessary parameters, do not forget to specify the full path to it. If the command is invoked from the current directory path is optional. Examples of external commands: Q: UTIL \ diskname [invoking changes disk name] Q: SHELL \ exebat T: SERVICE \ BLK \ ram128.bat [Call interpreter bat-files and executable is ram128.bat] Q: RES \ set Q: RES \ mon.res / e [Remove TSR mon.res] set mon.res [However, if the current panel to open the directory RES \] Q: UTIL \ date [Call Setup current date] date [However, if the current panel to open the directory UTIL \] Team bat-files Work in the monitor command line as mentioned above, well, if the team needs to call one - twice. If You also need to frequently use any sequence of commands, especially if it is large enough, then it is better to create a so-called. batch file that These commands allow you to run an unlimited number of times. Batch files in the IS-DOS represent a special text files with the bat. These files contains the text of commands to be executed. The format of the job commands in the files is the same as in the monitor command line - in fact, each row bat-file - this is a common command line. Interpretation of the bat-files in the system IS-DOS is engaged in a special program called exebat.com and is located in the directory SHELL. It reads from file the next row and puts it in designated storage area, where she is already engaged in a shell of the system. Command files can be nested, ie, one batch file can call another command file. Maximum nesting depth of 120 files. At the end of each working off of the embedded control files transferred to the caller of his file. Work of nested command bat-files the easiest way to provide a concrete example, graphically the sequence of execution of commands. For example, if we have a directory SHELL Here are four such bat-file: [Main.bat] Q: UTIL \ eliminat / r Q: SHELL \ exebat Q: SHELL \ checksum.bat Q: SHELL \ exebat Q: SHELL \ restres.bat [Checksum.bat] Q: RES \ set Q: RES \ univ.res Q: RES \ set Q: RES \ calc.res @ Univ calc *.* Q: RES \ set Q: RES \ univ.res / e Q: RES \ set Q: RES \ calc.res / e [Restres.bat] CAT Q: RES set gmen.res set mkdir.res set date +3. res @ Date +3 Q: SHELL \ exebat Q: SHELL \ setmon.bat [Setmon.bat] set mon.res set indi.res @ Indi a sequence of commands that are executed will be as follows: [Top of main.bat] Q: UTIL \ eliminat / r [Top of checksum.bat] Q: RES \ set Q: RES \ univ.res Q: RES \ set Q: RES \ calc.res @ Univ calc *.* Q: RES \ set Q: RES \ univ.res / e Q: RES \ set Q: RES \ calc.res / e [End of checksum.bat] [Top of restres.bat] CAT Q: RES set gmen.res set mkdir.res set date +3. res @ Date +3 [Top of setmon.bat] set mon.res set indi.res @ Indi [End of setmon.bat] [End of restres.bat] [End of main.bat] The system IS-DOS, there is one program to work with the bat-files - bat.res. This is a memory resident program that is convenient to use when working with a large number of bat-files, so as not to cause every time exebat.com. Program bat-res installed into the system by typing Q: RES \ set Q: RES \ bat.res, then to call the bat-file just enter the command @ bat, or even just @, Indicating name of a file. @ HEAD_EXAMPL = For example: @ Main.bat thus necessarily the file name must be separated from the @ symbol or command "@ Bat" a space, otherwise the system will treat his name as resident program. Also necessarily indicate increased bat. Bat.res program has three additional commands that begin with an "*": * L + - running command lines are displayed at the top of the screen. * L-- running lines do not appear on the display. * E - A special team, which is to exit from the chain attached bat-files. She posed at the beginning of the command line after the execution of which the output of the shell with the restoration of software stack. Commands can be typed as uppercase and lowercase letters. By using bat-res, do not forget that while it is running dangerously move TSRs, remove resident programs and drivers as this may cause a system reset due to movement of the program bat.res. If a team or set eliminat remove the resident program installed before bat.res, the consequences could be unpredictable. In such cases it is better to fly exebat.com. Drawing USER-menu. System USER-IS-DOS menu allows pre-programmed call any parts you use utilities or programs that will handle this special window with a list of these programs, the cursor to select and brief comments. In This chapter will discuss how to properly write the most USER-menu and use it for their own purposes. USER-menu is a special user-defined window consisting of an arbitrary number of rows. Rows in USER-menu there are two kinds of - Text string containing the headers menu separator lines and other useful information and operating lines of which moves the cursor to the menu - the horizontal line marking selected in Currently the line. The cursor menu is driven by cursor keys up and down, pressing ENTER on a working line calls execution of the command line, fixed in the working menu bar. Exit USER-out menu can be made at any time by pressing the standard keyboard shortcuts SS + A. Configuration, appearance, and a list of command is invoked for the USER-menu contains a text file in a special format, which will be described later. Interpretation of the file involved program menu.com, usually located in directory SHELL (up to 06.95 - UTIL). Program menu.com when calling from bat-file or command line without parameters, searches the current directory for a file name menu.mnu (up to 06.95 - menu.txt), containing a description of the menu, but not finding him in the current directory for a file with the same name in the SHELL. This allows create almost any directory their local USER-menu, and the general, universal menu, called the absence of local, keep in directory SHELL. In addition, when calling from the bat-file or a command line program menu.com can be set to a specific file name containing a description of the desired menu. This allows, in particular, to fix a particular challenge USER-menu for any button in the file extkey.txt, or organization C - command lines that contain the commands executed when you press ENTER on the appropriate working on the menu bar c - command line, intended for Call of large programs with load address below 25,000 Z - line for internal commands DOS, caused when you press ENTER before running the appropriate command line H - a line of text, hints that can be displayed on the screen during installation cursor to the appropriate operating line If the command line after the control character C, c and T is the symbol "*", The file name, which was panel cursor at the time of the call USER-menu passed as a parameter causes the command. Let us explain with an example: Suppose that at the time of the menu panel cursor is placed on the file name prise.txt, then the command line type C * Q: SHELL \ delete cause the execution team Q: SHELL \ delete prise.txt Row K, P and T determine the parameters and teams for the entire menu as a whole, so each menu can not be more than one row K, the line P and line T. Row K, P, T, H and Z are not binding in the absence of K-line parameters are set by default (see below). Position of the rows K, P and T in the text does not matter, in some place where you file them or put - the system will still find them. Rows A and a lie in the order in which they should be displayed in the window menu. Related line Z, H, C and c must be placed after the corresponding row of A. This feature allows you to use a single line commands or prompts for few lines of the menu, but requires more careful attention to the text. Let us explain with an example: Suppose we have a file menu.mnu read: a Working with MS-DOS a EXIT TO A SHELL APISAT on MS-DOS DISKS NZapis tagged files CQ: MSDOS \ to_msdos.com ACHITAT FROM MS-DOS CD NChtenie drive MS-DOS CQ: MSDOS \ from_msd.com This file contains two serious errors: 1. When cursor is on the line "EXIT IN SHELL "the system will prompt related to the next line, since the corresponding line of the tip is missing. 2. When you press ENTER on the same line will be executed the command line, referring to the next menu bar, as corresponding to the command line is missing. This problem can be solved at least two ways: Option 1 - set the first row of A blank lines C and H, then the menu text will look like: a Working with MS-DOS a EXIT TO A SHELL H C APISAT on MS-DOS DISKS NZapis tagged files CQ: MSDOS \ to_msdos.com ACHITAT FROM MS-DOS CD NChtenie drive MS-DOS CQ: MSDOS \ from_msd.com Blank lines H, Z, C and c can be omitted, if your menu, there is no such line. Option 2 - move the line "is released in SHELL "at end of file and append the string tips for her: a Working with MS-DOS a APISAT on MS-DOS DISKS NZapis tagged files CQ: MSDOS \ to_msdos.com ACHITAT FROM MS-DOS CD NChtenie drive MS-DOS CQ: MSDOS \ from_msd.com EXIT TO A SHELL H Output in the shell Because the string "EXIT TO SHELL" was at the end of the text when it is selected, nothing happens and working out the menu ends with an exit to the shell. Format string key K: K Line in the description USER-menu is as follows: K /<number> / <> symbol <number> ... Numbers can be written in decimal format (default), for example, 255 in 16-hex prefixed with #, for example, # 1F; in octal prefix o, for example, o12; and also in binary prefixed with%, eg % 01100011. Shared key blanks are not required as the keys, and so separated from each friend "/" character. Line K is interpreted as long as there is no received by a newline, so split it into multiple lines can not. Also, in one text menu should not be more than one row K, otherwise interpreted only the first one. USER-menu keys: A - B configuration menu. bit 1 - view the menu window "0" - no shadows "1" - with the shadow. bit 2 - reaction to the ENTER, "0" - interpreted the line c, C and Z, after working carried out in a shell, "1" - run only line of internal commands Z, then there is a return to menu. Bit 3 - window frame, "0" - single, "1" - Double. Bit 4 - Working off-line P at the entrance to menu, "0" - to perform, "1" - Ignore. Bits 5 - 8 - not used and may contain any values. All of these modes is convenient to specify the decimal numbers 1, 2, 4 and 8, respectively, with totals include several modes simultaneously, such as: / A5 - window shade and a double frame. B - second byte of configuration. Bits 1 and 2 - not used. Bit 3 - cursor, "0" - the cursor is displayed on the entire width of the window, "1" - the cursor displayed on the inside of the window, not affecting the area of the frame. Bit 4 - not used. Bit 5 - kind of window prompts, "0" - with the frame, "1" - without a frame. Bits 6 and 7 - not used. These values are also convenient to define decimal numbers (4 and 16, respectively), it is also possible summation values, for example: / B20 - box prompts without frame, the cursor inside window frame. E - X-coordinate of the window menu in familiarity 8 * 8 pixels. D - Y-coordinate of the window menu in rows. Window size, the system sets automatically according to the number of rows in the menu and the maximum length line. H - X-coordinate of the window hints at familiarity 8 * 8 pixels. G - Y-coordinate of the window hints in rows. N - the height hint of strings. C - width of the window hints at familiarity 6 * 8 pixels. F - line number on which the cursor is when you open the menu. K - color menu windows T - shadow color menu windows J - color cursor menu O - color desktop cursor menu I - color box tips Colors are defined in a standard format: Bits 0 - 2 - color ink Bits 3 - 5 - paper color Bit 6 - brightness Bit 7 - shimmer For byte shadow color bits 6 and 7 are ignored. As mentioned above, in the absence of K-line parameters are set by default. Values for parameters default are shown in Table. 5. Table 5. Menu settings by default. Parameter Default A 0 B 16 Centering on E X D centering on Y H 0 G 0 N 1 C 32 K% 00001111 T 0 J% 00111001 O% 00100000 I% 00001111 Example USER-menu: TCAT Q: SHELL \ PCAT Q: K/N3/B0/A5/G1/E0/D4/T% 00000001 / K% 00101000 / J% 00001110 / O% 01001110/C38 a USER MENU a A work with a disk H Disk Utility, work with files CQ: SHELL \ menu Q: SHELL \ MNU \ disk.mnu ZCAT Q: UTIL \ A RESIDENTS CQ: SHELL \ menu Q: SHELL \ MNU \ res.mnu H Installing the drivers and residents A JOB WITH TR-DOS CQ: SHELL \ menu Q: SHELL \ MNU \ tr_dos.mnu H file sharing system TR-DOS A WORK WITH MS-DOS CQ: SHELL \ menu Q: SHELL \ MNU \ ms_dos.mnu H file sharing system MS-DOS ADEREVO CATALOGS CQ: UTIL \ tree H Displays a directory tree of the current drive A hidden files H Set the attributes of "hidden files" CQ: SHELL \ exebat Q: RES \ attrh.bat A see the file H Removing the attribute "hidden files" CQ: SHELL \ exebat Q: RES \ attr.bat EXIT TO A SHELL H Output in the shell IS-DOS So, this concludes our first Articles "IS-DOS novice" and hope that you, dear readers read it if not happy, then by At least with interest. Once again I want to recalled that this Article shall in no way does not claim comprehensiveness and contains mostly original information, necessary for the successful and rapid development of the system and the acquisition of practical skills in working with programs in the environment IS-DOS. In the next issue we plan to release details of a text editor, IS-EDIT, as the most powerful and easy-to date text editor for the ZX-compatible computers on the queue as a detailed description of the utilities IS-DOS, practical guide to configuration and system setup, program description printing and viewing files, and more. Once again I remind you that all your wishes and comments on this article and other materials relating to the IS-DOS, we always glad to listen to on the phone 245-00-91 (from 10.00 to 16.00 on business days, ask Programs Division), on the same phone you can obtain prompt advice on all matters relating to the system IS-DOS and applications programs running in its environment. Firm "IskraSoft" _________________________________________ , Program - a detailed study of their interaction algorithm works with "Outside world" to look at the program was not only her author. Subfunction to the hard disk drive come into force in version 4.0 of the Shadow Service Monitor. hddid equ 34; identification of the hard disk Rin.: C = 34; buffer, mounted subfunction SETWRK (9); curves.: CY = 1 if there was error, error code returns to the battery: Akk = 86 hard disk is not found; Action: search your hard drive and setting its parameters. You must first specify the buffer of not less than 512 bytes, subfunction SETWRK (9). hddid runs automatically every time the "cold" reset computer. hddmount equ 35; connection section TR-DOS to the HDE Rin.: C = 35; Akk - the disk number (1 "B", 2 "C" or 3 "D") or a partition type; de ■ text string specification section (dr: [\] part \ dos); curves.: CY = 1 if there were any mistakes ■ section does not found Action: The connection section To start emulating sub-type TR-DOS for devices "C" and "D" prior to "connect" the appropriate device to sub-section. If the specification section is given device (dr), then the value of the battery ignored. In the designation of part ■ name sub-TR-DOS, dos ■ drive name in the section. Subfunction hddmount can be applied and to install other types of subsections specific modes are indicated by individual bits of the battery. This subfunction is in beta stage, and some parameters can be changed. $ Hddrd equ 36; reading sectors from the partition Hard Disk Rin.: C = 36; hl ■ address of a buffer in memory; de ■ starting sector number (in section); b ■ number of sectors (the sector size 512 bytes!) curves.: CY = 1 if there was an error. Action: Read the specified number of sectors within the current connection section of the buffer. $ Hddwr equ 37; recording sectors of the partition Hard Disk curves.: C = 37; hl ■ address of a buffer in memory; de ■ initial sector number; b ■ number of sectors (the sector size 512 bytes!) curves.: CY = 1 if there was an error. Action: Record the specified number of sectors of the buffer in the current connected section. ________ RST 8 code 82h Installing the monitor variables Rin.: DE ■ subfunction code (type variable); BC ■ relative address of the variables in the sub-functions; CY ■ type of operation: fixed ■ record, thrown ■ Reading; Akk ■ written to or read value. When you change the individual bits must be first consider the value of a variable, then change the desired bit, and finally write a new value. Size designations of variables: db ■ one byte; dw ■ two bytes, but you must be a byte; ds ■ few bytes of similar variables. DE = 00 System Variables Monitor BC = +12 (db) The individual bits of this byte can control the output values of the registers on the screen (recording 1 prohibits output): 7 ■ PC 6 ■ SP 5 ■ IX 4 ■ IY 3 ■ HL (HL ') 2 ■ DE (DE ') 1 ■ BC (BC ') 0 ■ AF (AF ') BC = +21 (db) Byte control output to the printer: 7 ■ (0) data are displayed in the direct form (1) data are displayed in reverse; 3 ■ (0), two stop bits (1) one stop bit; 2 ■ (0) 8 bits in a byte of data (1) 7 bits byte data; , 1 ■ (0) 9600 bps, (1) speed 1200 baud; 0 ■ (0) Interface Centronics, (1) interface RS232. DE = 2002 Variable mode BC = +0 (db) constant antidrebezgovoy delay monitor. BC = +1 (db) constant delay before auto. BC = +2 (db) constant delay between the auto-repeat. BC = +5 (db) Border color, place the monitor, when the alarm went off errors. BC = +6 (db) code character "carriage return" to the printer. BC = +7 (db) code symbol "newline" for your printer. BC = +8 (db) character code "of the transfer format for your printer. BC = +9 (dw) code that determines the rate of 9600 baud for the serial interface (on default 0bh). BC = +0 bh (dw) code that identifies the baud rate 1200 baud for the serial interface (on default 6ah). BC = +0 dh (ds 11) the first byte (+0 dh) specifies the number of control characters, which serve to transfer printer in graphics mode (directly behind them will receive 768 bytes graphic information for screen printing from the monitor). Codes themselves are located respectively at offset +0 eh, and more. BC = +15 h (ds 4) codes that serve to take the printer text mode, the final screen print. Byte +015 h stores the number of control codes, codes themselves are stored at offset +16 h and beyond. BC = +1 dh (db) the number of lines per page when printing printer. BC = +1 eh (db) the number of characters per line when printing printer. DE = 04 Variables disk BIOS BC = +4 (ds 4) byte stores the maximum number of sectors P4 BDBT zshR on track when the sector size 128, 256, 512 and 1024 bytes respectively. BC = +0 ah (db) number of the current drive: 0 ■ drive "A", 1 ■ "B", 2 ■ "C" and 3 ■ "D". BC = +0 bh (db) number of attempts to read the error, the initial value of 3. BC = +0 ch (ds 4) codes indicate the type of disk drives (BOM) "A", "B", "C" and "D" respectively. BC = +10 h (ds 4) codes indicate the type of floppy disk into drive "A", "B", "C" and "D" respectively. BC = +18 h (ds 2) codes, time-out for a drive "A" and "B" respectively. BC = +1 dh (db) error code disk interpreter installed RST 8, Code 81h: 1 is not ready (drive is not spinning or it's not); 2 attempt to write to a secure floppy disk (Functions 6, 11 and 13); 3 during the execution of the function has been pressed Key BREAK; 4 error when reading or writing sector functions of 5 or 6, you can use functions of 3 or 4; 5 positioning error (does not meet the track number); 6 positioning error (not considered address marker lanes); 8 positioning error, the mismatch types (an attempt to use 80 TRACK 40 TRACK CD drive or double-sided disc on a single drive); 9 unformatted disk (functions 7, 8); 16 floppy does not fit TR-DOS on the physical parameters: size sector, data density, or no code identifier <197> 10h (function 8); 17 mismatch type code TR-DOS floppies real format; 18 does not open the work buffer (function 8); 20 were in error when reading / writing track (Functions 12, 13). ____ RST 8 code 83h Cleaning windows user Subfunctions not. Rin.: IX ■ descriptor used by the window. Action: The initialization and cleaning windows, specified by "handle" ■ unit, consisting of 13 bytes. Appointment bytes handle to the window below. 0, +1 Coordinates of the cursor in the window (Y, X) <197> initially set to zero cleaning program window can then be modified by the user. +2, +3 The coordinates of the beginning of the window (Y, X). These coordinates are measured in standard familiarity size 8 * 8 pixels. 4, 5 window size in standard characters (8 * 8 pixels), the first number of vertical dimension, the second <197> horizontally. 6 Byte stores color attributes window. +7 System Attributes window, given by individual bits: 5 ■ O ban, all displayed characters ignored; , 4 ■ arbitrary format to achieve right edge of the box will be automatically executed commands carriage return and line carriage (see RST 8, code 84h); 3 ■ perform an automatic carriage return at the parish newline; 2 ■ perform automatic transition line in the parish of a carriage return; 1 ■ change the attributes in the derivation of each character (otherwise, the attributes are set only during cleaning windows); 0 ■ Do not remove the symbol of the cursor. 8, 9 Utilities bytes. +10 Character size in pixels. Monitor supports two character sizes at 6 and 8 points. +11 Window size in characters. For the symbols in the 8 points of this size coincides with the width of the window. If the symbol size 6 points, before initialization (clearing) should be calculate the size of the window and put this bytes. +12 Ticker symbol cursor. Code with this symbol will be displayed at the site noting the position cursor, if cleared by a 0 bit in the system Attributes window. Usage: first window should be described by specifying a descriptor initial window coordinates and size. All coordinates are measured from the top left corner of the window or screen. The window need to clear the function 83h, which initializes some variables in descriptor. ____ RST 8 code 85h Conclusion character in the user box Subfunctions not. Rin.: Akk code displayed on the printer character; IX ■ descriptor used by the window. Action: The output of the symbol in the window that you specify a handle. Symbols from the set ASSCI (Codes in the range 32 ... 127) directly printed in a box screen (see modes in the descriptor, described in the RST 8, code 84h). Along with the usual "Printable" characters, you can use control codes. Symbol * marked control codes that have appeared and acting in versions older than 3.0b (code 64 on 11/05/1994). 1 Setting the attributes for subsequent Character Directly for Managed Code should be withdrawn two bytes: the first B ■ mask sets the attributes, ■ second mask disposed of attributes. Significant bits must be set byte mask. 2 Recovering stored attributes 4 * Conclusion aligned Subsequently, the managed code to be transferred a string of printable characters, which will be center-aligned or right window. The string length should not exceed width of the window, the control characters in a string not allowed, except for the following two, trailing a string of codes. 5 * The output line in the center of the window 6 * The output string is right-aligned edge of the window 7 Conclusion sound The program fulfills a short sound signal. Border gets in this color mounted in a special cell monitor (see the variable modes, color). 10 Newline If the cursor is in the last row, then there is a "roll". 12 * Clear the window, the cursor is placed in the upper left corner 13 carriage return Move the cursor to the leftmost line position in the window. If the corresponding bit in the handle to the window, then together with a carriage return calls and maintenance program character translation line. 27 Position the cursor inside the box Directly for Managed Code should be withdrawn two bytes. The first determines the position of the cursor in a row, the second line number. The countdown is on the upper left corner starting from scratch. 30 * Reverse roll Cursor position is not changed, the entire text in the box is shifted by one row up, the first line of text disappears, last row is filled with blanks. ____ RST 8 code 86h copy of the graphic screen on the printer Subfunctions not. curves.: CY = 1 if at the time of withdrawal was pressed BREAK. This feature is available starting with version 2.4a (Code 3). Action: The printer output copies of a graphic display, similar to that obtained from the Service Monitor. Used for printing the current display settings. ____ RST 8 code 87h installation of double speed Subfunctions not. curves.: CY = 1 if the computer's motherboard is not capable of switching speed. This feature is available since version 2.4d (Code 3 from 11/12/1993) ____ RST 8 code 88h setting the normal speed Subfunctions not. curves.: CY = 1 if the computer's motherboard is not capable of switching speed. This feature is available since version 2.4d (Code 3 from 11/12/1993) ____ RST 8 code 89h Work with a chip CMOS Subfunctions not. Rin.: D ■ opcode: 7 ■ record (1) / Read (0) time value and / or date; 6 ■ consider the buffer (only if bit 7 = 0, see also bit 5); 5 ■ format reader ■ (1) direct reading; (0) reading in a format ASCIZ; 0 ■ working with date (1), or with time (0); , HL ■ buffer address (if bit 6 = 1); C ■ seconds / number; B - minutes / month; E - hours / year | format read into the buffer. curves.: CY = 1 if the CMOS chip is not present or given incorrectly formatted request; (HL) ■ line of text ASCIZ (if Bit 6 = 1); C ■ seconds / number; B - minutes / month; E - hours / year; L - day of the week. This feature is available since version 3.1f (Code 70 by 21/05/1995) Action: Install or reading the testimony the current time from the chip nonvolatile memory and clock (CMOS). Usage: one function call provides access to either the current date (bit 0 Register D is installed), or to the current Time (bit 0 of register D is cleared). 7-m bit D register indicates the type of operation to function: recording ■ 1, ■ Reading 0. Reading values from a chip is possible in two variants ■ transfer to the buffer whose address is specified in the registers HL (Register bit 6 set D), or transfer into the registers C, B, E and L (D register bit 6 is cleared). Interpretation of the read through the buffer values determined by the 5 th bit of register D. If it is set, then the buffer is placed 6 bytes of data on the current time and date (one byte per ■ second, minute, hour, day, month, year). If the 5-th bit D register is cleared, then by transfer time or date in a string of characters ASCII, null terminated. In this case, the contents of register E is used as the output format: lower 5 bits ■ ■ separator character to them will be added to 20h; bits 7, 6 and 5, respectively, allow the withdrawal of the hours, minutes and seconds for withdrawal date: 7 show day of the week 6 represent the character "0" before the number, 5 displays a word and a month before the year to add "19." If you change the current date set new values is possible only through registers C, B and E; change the day of the week is impossible, he calculated program for the current date. The remaining cells CMOS-memory used monitor for their needs, so routines to work with them until you provide. ____________ Comments and suggestions on the work of the embedded software can express by writing a letter to the electronic mail at 2:5030 / 25.1 (FidoNet) or moa@ddeeds.spb.su (InterNet).
Other articles:
Similar articles:
В этот день... 21 November