What value will return the MIN H4 H8 function. Minimum value excluding zeros

¨ Text output on the screen by direct video clip programming.

¨ Development of application programs using BIOS service functions to work with the screen and keyboard.

¨ Encourage delay for software operations.

In [2, various system functions of the DOS output on the symbolic information screen were considered. However, DOS features are very limited: it does not have functions to change the color of displayed characters and positioning the cursor. In addition, there are no means of forming graphic images in DOS.

All features of the computer video system can be implemented using interrupt BIOS video funks iNT 10H.. Interrupt iNT 10H. Provides: Changing video mode (text or graphic); withdrawal of symbolic and text information; shift fonts, setting the color palette, work with a graphic image. Programming the video system using BIOS tools is more cumbersome, however, great capabilities and high output rate determine the widespread use of this method in application programs.

This paper discusses the BIOS functions to maintain the computer video system, as well as the functions for working with the keyboard. We list the functions that are subject to review in laboratory work.

INT 10H:

function 00h - installation of video mode;

function 02h - setting the cursor position;

function 03h - read position and cursor size;

function 05h - Installation of the video archway;

function 06h (07h) - initialization or scrolling window up (down);

function 08h - reading the symbol and attribute in the position of the cursor;

function 09H - recording a symbol and attribute to the position of the cursor;

function 0Ah - recording a symbol to the position of the cursor with the current attribute;

function 0EH - recording a symbol in a teletep mode with the current attribute;

0fh function - get the display mode;

function 1003H - Switching the destination of the older attribute byte bit: flicker / brightness,

the 13H function is a record of a string with a specified attribute in a teletep mode.

INT 16H:

00H function 00h (10h) - reading the character from the keyboard with the expectation;

function 01H (11h) - checking the keyboard buffer for the presence of a symbol in it;

function 02h (12h) - receiving flags (extended) keyboard.

INT 15H,function 86h - delay.

INT 1.AH, Function 00h - Obtaining system time.

8.2.2. Direct video clip programming in text mode

Modern video controllers support a variety of text and graphic modes. Text modes differ in the resolution (the number of displayed symbols horizontally and vertical) and the color palette (monochrome or 16-color mode). For graphic modes, the main feature of the classification is the number of simultaneously displayed colors and, accordingly, the number of bits of the video memory, allocated to each point (pixel) of the image. The following types of graphics modes distinguish:

Monochrome (1-bit coding);

16-color EGA / VGA. (4-bit coding);

256-colored SVGA (8-bit coding);

- Hicolor. (16-bit coding);

- TrueColor. (24-bit / 32-bit coding).

Graphic modes VGA (SVGA) are strongly outdated, and texts continue to be successfully applied (see Table 3.2 p. 8.2.3).

All that is shown on the monitor - graphics, text is simultaneously present in memory built into the video adapter. In order for the image to appear on the monitor, it must be recorded in the memory of the video adapter. In text mode, the address space is assigned to VGA-compatible systems for video memory (excluding the 7th video mode with a monochrome adapter), starting with the B800H logical address and ending with the BF00H address: 0FFFH. This area is divided into 8 sectors in the number of video shops (4 KB to the page). Thus, the chapter division of the address space of video memory in text mode has the following form:

B800H: 0000H - page 0, offset in the range 0000H - 0FFFH

B900H: 0000H - page 1, offset in the range 0000H - 0FFFH

- ...........

BF00H: 0000H - page 7, offset in the range 0000H - 0FFFH

The video driver corresponding to the active page is displayed on the screen. In text modes for the image of each symbol, 2 bytes are given: byte with ASCII-symbol code and byte with its attribute. At the same time at the address B800H: 0000H There is a byte with a symbol code (left top corner of the screen), and in B800H: 0001h - attribute of this symbol; B800H: 0002h - the code of the second symbol, and in B800H: 0003h - The attribute of the second symbol, etc. In general, when forming an image directly in the video driver, bypassing DOS and BIOS programs, all control codes ASCII. losing their control functions and displayed in the form of the corresponding characters. The structure of the attribute byte is shown in Fig. 3.1.

Fig. 3.1. Structure byte Attributes

From fig. 3.1 It follows that each character can take any of the 16 possible colors determined by the combination of junior 4-bits. Bits 4-6 byte attributes set the background color under this symbol. The last bit 7, depending on the video adapter mode, determines either the brightness of the background under this symbol (then the background can also take 16 different colors), or the flickering of the symbol ( installedDOS by default).

When loading the machine, a standard palette is installed, the colors codes are shown in Table. 3.1. Consider some examples. So, in the flicker mode, the value of the senior semi-trap attribute 8h.indicates not a gray background, but black with a flickering symbol, the color of which is still determined by the younger gesty; The meaning of the senior cannis 0CH- Red background with a flickering symbol. Switching the destination of the bit 7 is carried out by subfunction 03h.functions 10h. Interrupts iNT 10H..

Table 3.1.

Flower codes standard palette

Salad.

Turquoise

Lightly turquoise

Purple

Light purple

Brown

Brightly

Dual-byte characters codes are written in the video driver in the order in which they should appear on the screen: the first 80 * 2 bytes correspond to the first line of the screen, the second 80 * 2 bytes - the second, etc. In this case, the transition to the next line of the screen is determined by non-control codes of the carriage return and the transfer of the line, but by placeing the code in the other place of the video clip. In order to get access to the video drive from the program, you must be taken into one of the segment data registers segment address of the video clip. After that, by setting one or other offsets, you can record in any seats (cells) of the video clip. Calculate the displacement of the cell in the "string column" coordinates (row,cLM) You can:

Vidadd.r \u003d (rOW * 160) + (cLM * 2)

With a large amount of output data, the information frame is formed in advance in the user buffer located in the program data segment.

Listing 3.1.Recording rows in a video clipboard 0- pages .

; Cleaning the screen

; Configure the ES segment register to the video clip page, and DS to the data segment

; Switched to the video clip of the symbol string by setting up accordingly

; registers Si, Di and Cx

cLD; View Forward

rEP MOVSB;) *; send the string of characters with attributes in a video clipboard

; Stop the program to observe the result (otherwise after the program is completed

; DOS request to enter the command can be lost the information provided)

; Data fields in the program data segment. Symbols and attributes: 0B0H - Cvell

; turquoise on black, 0E4h-Arasny on yellow

mSG DB '*', 0B0H, 'T', 0E4H, 'E', 0E4, 'S', 0E4, 'T', 0E4, '*', 0B0H

In this fragment of the program, the symbolic codes of the displayed message are interspersed with their attributes. This method of generating data fields intended for direct recording to video memory becomes bulky, but it can be significantly simplified if the output characters have the same attributes. So, if we want to output text characters from a data segment with a single attribute 0E4h., then we just need to replace one command line marked in the above fragment symbol "*)" , on three. At the same time, the task of the data line will acquire the form familiar to us.

mOV SI, OFFSET MSG; source displacement

mOV DI, 160 * 12 + 36 * 2; Reception of the receiver (36 column of the 13th line),

mOV CX, MSGLEN; Number of shipped byte

cLD; View Forward

mOV AH, 0E4H; Attribute of the output symbols 0E4H - red on yellow

stosw; unloading "Symbol + attribute" from ah in video driver (AX → ES: DI)

loop Cycle; repeat msglen times

; Data fields in the program data segment.

mSG DB '* Test *'

The above method of outputting text is formatted by a video line without taking into account the transfer symbols or indents from the left border. The introduction of elementary rules of the text editor in the output procedure will greatly complicate the program. In this case, it is advisable to use BIOS functions to display messages.

Development of the structure of programs engaged in the viewing of arbitrary video stations to which information is pre-recorded by the method of direct video clip programming, conveniently produced using the function 05 h.iNT 10.h.BIOS (p. 8.2.3.2).

8.2.3. Reference data on BIOS functions

8.2.3.1. Interrupt INT 10H. Video Functions BIOS.

¨ Function 00h. Installing the video mode (Table 3.2) of the current video shield cleaning video (Fast screen cleaning is realized by the 06 functionh and 07.h).

Call: AH \u003d 00h,

Al \u003d video mode (the mode code is set in the younger 7 bits, installing in 1 senior bit prohibits screen cleaning).

The challenge destroys the registers AX,BP,Si, I.DI.

Table 3.2.

Text video modes and pages in the standard VGA.Supported
Modern video controllers

Mode

Resolution

Color

Size of the sign

Address

Pages

haltone

haltone

3 (Mono. )

By default, DOS uses mode 3 (however, the correctly decorated program should check or install the desired text mode with the subsequent restoration of the previous one).

¨ Function 02h. Setting the cursor position.

Specifies the position of the cursor on the screen in the text coordinates from which the text will be displayed. The countdown of the row and column number is conducted from the upper left corner. The cursor can be installed both in text and graphically, however, in graphic mode, the cursor is not visible. BIOS supports up to eight independent cursors - one for each page (see Table 3.2) no matter what page is active. Function 02 h.

Call: AH \u003d 02h; Bh.\u003d page number (0.1, ... 7), usually 0;

DH \u003d line; DL\u003d column.

The challenge destroys the registers AX,BP,SIand DI.

¨ Function 03h. Read the position and size of the cursor.

Returns the current coordinates of the cursor status on the selected page. This makes it possible to temporarily go to work on another screen location, and then return to the old place. Function 03 h.BIOS can be used in combination with DOS functions to organize output to the screen.

Call: Ah \u003d 03h, bh \u003d Page number (0.1, ... 7), Usually 0.

Return: DH, DL \u003d Row and column of the current cursor position,

CH, Cl.\u003d The first and last strings of the cursor.

The call destroys the registers AX, BP, SI and DI.

¨ Function 05h. Installing a video architecture.

Sets an active video storage (both text and graphic).

Call: AH \u003d 05h, Al \u003d Page number (0, ..., 7).

The challenge destroys the registers AX,BP,SIand DI.

A program that establishes a page other than the current one is required to restore the initial work at the end of work.

¨ Function 06h (07h). Initialization or scrolling window up (down).

Initializes a window with specified coordinates, spaces ASCII.with a given attribute (Al \u003d 0), or scrolls the contents of the up (down) window to the specified number of strings ( Al\u003d number of strings). When scrolling, the rows appear from below (above) are filled with spaces ASCII. With a specified attribute. Feature is convenient to use to quickly clean the screen or some rectangular window.

Call: AH \u003d 06H (07h);

Al \u003d 0 - cleaning Al \u003d n (n\u003e 0) - Scroll on N. lines;

Bh \u003d Attribute characters in the window;

CH, CL \u003d Row and column coordinates (Y, X)upper left corner;

DH, DL \u003d Row and column coordinates (Y, X) Right bottom corner.

The challenge destroys the registers AX,BP,Siand Di.

¨ Function 08h. Reading a symbol and attribute in the current cursor position on the selected page.

Call: AH \u003d 08h., Bh \u003d Page number (0, ..., 7), Usually 0.

Return: AH \u003d. Symbol attribute, Al \u003d ASCIIsymbol code.

The challenge destroys the registers BP,SI and Di.

¨ Function 09h.. Recording a symbol with a specified attribute to the screen to the cursor position. Acts both graphically and in textual modes. In graphical mode, characters should not go to the next line. All codes in Al are treated as symbolic and do not manage the cursor position. After displaying the symbol, the cursor shifts to the next position of the 02h function. The repetition coefficient allows you to display the strings of the same characters. In text mode, the symbol is displayed with the specified in BL. Attribute. In graphic - content BL. It only affects the color of the symbol, but not on the background under it. The graphic image under the acquaintance is rubbed.

Call: Ah \u003d 09h., Al \u003d Ascii.-cake symbol,

BL.\u003d symbol attribute (text mode) or only color symbol (graphic mode),

Bh \u003dpage number (0.1, ... 7), CX.\u003d Repetition coefficient.

The challenge destroys the registers AX,BP,SI and DI.

¨ Function 0Ah. Recording a symbol with the current attribute to the screen to the cursor position. The function acts in both graphic and text modes. The character takes the attribute previously installed for this position. All ASCII codes in Al are treated as symbolic and not control the position of the cursor (as in the function 09h). After displaying the symbol, the cursor shifts to the next positionfunction 02h.

Call: AH \u003d 0ah, Al \u003d Ascii.-cake symbol,

Bh \u003d Page number (0.1, ... 7), CX \u003d Repetition coefficient.

The challenge destroys the registers AX,BP,SI and DI.

¨ Function 0EH. Recording a symbol with the current attribute in the teletep mode.

Records symbol ASCII. In the position of the cursor (pre-installed function 02h.) On the active page and shifts the cursor to the next position. Codes ASCII.: 07h - Call (BEL), 08h - step back (BS), 0DH - Return carriage (CR), 0ah - line translation (LF), considered as managers And the corresponding actions are performed. The remaining control codes are considered as symbols and are displayed. There is an automatic transition of the cursor to the next string after completing the previous one, as well as scroll up the screen up to 1 string after filling the bottom.

Call: AH \u003d 0EH, Al \u003d Ascii.-cake symbol,

BL.\u003d color symbol (only for graphic mode),

Bh \u003d Page number (0.1, ... 7), the default active page is valid.

¨ Function 0.FH. Get Display Mode and Current Page Number .

Call: AH \u003d 0.Fh..

Return: Al = display Mode AH.\u003d screen width in text format

Bh \u003dactive page number.

The challenge destroys the registers BP,SI and Di.

Example. The procedure for setting the cursor position on the current page.

entrance : dH \u003d string (0 - 25), dL\u003d column (0 - 79)

.......... ; Restore registers

¨ Function 10h. Podfunction 03h.. Switching bit "Flicker / Brightness".

Specifies the appointment of the older bit 7 of the character attribute: a symbol flicker or an increased brightness of the background.

Call: A.X.\u003d 1003h, BL.\u003d Purpose of the 7th bit of the attribute:

0 - Increased brightness, 1 - flicker (Installed by default).

The function affects all the screen symbols that have the elder bit of the background attribute.

¨ The 13H function. Record string of characters with specified attributes.

Records a string to the current video clip page, starting from the specified position. Codes ASCII.: 07h.- Call, 08h.- step back, 0ah - line translation,
0DH - Returns carriages are considered as managers, the rest - as symbolic.

Call: AH \u003d 13h., Al \u003d. Recording Mode:

0 - symbol attribute in BL.The string contains only characters codes, after recording the cursor takes the original position (i.e. the output of the next line, if you do not change the position of the cursor, starts with the initially installed position);

1 - differs from the mode 0 in that after recording the cursor remains at the end of the line;

2 - the string contains alternately characters and attribute codes (i.e. each character is described by 2 bytes - ASCII.-code and attribute), after recording the cursor takes the initial position;

3 - differs from mode 2 in that at the end of the output, the cursor remains at the end of the line.

Bh.\u003d page number (0.1, ... 7), BL.\u003d Attribute for modes 0 and 1,

CX.\u003d symbolic string length (in length only the characters codes are included, but not bytes of attributes),

DX \u003d DH.DL.\u003d Coordinates of the cursor (string, column) at the starting point of the line output on the screen,

ES: BP.\u003d Address to start a row in memory.

Pay attention to the feature of the address task !

1. Programs (training workshops) performed in the DOS operating environment, use the default text mode 3, page 0.

2. Wide destination programs should request the current video mode and page (function 0Fh, int 10h) With their applications in the BIOS functions used.

.......

MOV V_MODE, AL; Save the mode

MOV CURRENT_PAGE, BH; save the string

3. If the program displays the image to different pages, then the sequence of actions with each page may be the following (default mode of the "0" page):

Installing a page function 05h;

Setting the cursor position function 02h.;

Building formatting text BIOS or DOS.

In the future, cyclic viewing of the content of pages by switching them function can be 05 h,iNT 10.h.. When leaving the program, be sure to restore the desired "0" distributor. Make it, for example, you can.

..........

..........

; Keyboard buffer analysis by the DOS 06H INT 21H function in order to complete it with pressing; arbitrary keys

mOV AH, 06H; input function without waiting

mOV DL, 0FFH; input

out_Program :; Restore the page function 05h, int 10h

..........

The video clippers can be repeatedly formatted and the method of direct memory programming. The selection of pages is carried out by the corresponding initialization of the segment register. Es (see paragraph 8.2.2). Viewing content content can also be completed by their sequential switching using the function. 05h, int 10h.

4. The structure of the demo program exploring the function "Flicker - Brightness of the Background" (Function 10h.Subfunction 03h, int 10h).

; Cleaning the screen

..........

; Initialization of 2 local windows, each with its attribute and text. When specifying

; The older color attributes (7th by number) bit is selected equal to "1".

.........

continue:; turn on the flicker

mOV BL, 1; flicker

; Introduce a delay for 3 seconds

.........

; Include increased brightness

.........

; Introduce a delay for 3 seconds

.........

; Keyboard buffer analysis DOS 06H INT 21H function in order to complete it with pressing

; arbitrary keys

.........

jnz out_program; zf \u003d 0, there is a symbol, on the output

jMP Continue; zf \u003d 1, no symbol, will continue

out_Program :; Restore flickering (default)

..........

eXIT: MOV AX, 4C00H; call the program termination function

.........

5. If the program is organized by an infinite data output cycle on the screen BIOS functions (09 h, 0.AH, 0EH, 13.h)then it can not be emergency to interrupt using keystrokes Ctrl + C. (i.e., to exit the program, as can be done when using the corresponding DOS functions). So that you can do this, turn on the function in the cycle body 0bh. Interrupts INT 21H..

8.2.3.3. Interrupt Int 16h.

¨ Function 00h (10h). Reading keyboard symbol with expectation.

Reads a symbol and scan code from the ring buffer. After reading, they are removed from the buffer and returned to the register AX.. If the buffer is empty, waiting for input.Each key on the keyboard corresponds to the so-called scan code corresponding to only this key. This code is sent by the keyboard each time you press and releasing the key and processed in the BIOS interrupt handler. INT 09.h.. Function 00h. It gives the opportunity to get a press code without intercepting this handler. If the key is pressed ASCII-symbol, then:

Al - Ascii.-cake symbol, AH - Scan key code.

If the key pressed the key ASCII-code, then:

Al - 00h, AH -advanced ASCII-the code.

Call: AH \u003d 00.h. (83/84-key).

Return: Al \u003d Ascii.-code symbol depicted on the key / 00h.,

AH.\u003d Scan code / advanced ASCII.-code keys.

Function 10.h (AH \u003d 10) - 00h for the extended keyboard (101/102- key
ASCII-codes for keys F11F12., as well as for a number of other combinations.
In the quality of the sign of control keys or their combinations, in addition to the value 00 h., are used 0ah, 0dh and E0h.

¨ Function 01H (11h). Verification of the keyboard buffer for the presence of a symbol in it.

Determines whether there are waiting characters in the ring buffer; Returns the flag of the waiting and the symbol itself when it is presented. However, the symbol and its scan code are not removed from the buffer and can be obtained again when a function is repeated 00 h int 16.h.. This function refers to the number of asynchronous: determining the state of the input buffer, it returns the control of
gram.

Call: Ah \u003d 01h. (83/84-key), 11h.(101/102-Key.).

Return: ZF \u003d.1, if the buffer is empty and Zf.\u003d 0, if there is a waiting character in the buffer. In this case:

Al \u003d Ascii.-cake symbol / 00h., AH.\u003d Scan Key Code / Advanced ASCII-the code.

Function 11.h (AH \u003d 11.h) -advanced function option 01 h. For extended keyboard (101/102 -Key.). Allows you to get extended ASCII.-Codes for keys F11F12., as well as for a number of other combinations. As a sign of control keys or their combinations, in addition to the value 00 h., are used 0ah, 0dh and E0h.

¨ Function 02.h (12.h). Getting the keyboard flags.

Returns the keyboard flag bytes describing the state of the control keys recorded in the BIOS data area to the address 0000 h: 0417.h.

Call: AH \u003d 02.h.

Return: A L.\u003d 1st byte keyboard flags.

Byte bits have the following values:

0: 1 - right Shift. Pressed

1: 1 - left Shift. Pressed

2: 1 - Ctrl (any) pressed

3: 1 - Alt. (any) pressed

4: 1 - Mode Scroll Lock.

5: 1 - Mode Num Lock.

6: 1 - Mode Caps Lock.

7: 1 - Mode Insert. Active

Function 12.h (AH \u003d 12.h) -advanced function option 02 h.for an extended keyboard (101/102- key). Displays the same byte value as the function 02 h., by the address 0000 h: 0417.h., And, additionally, the second keyboard status byte (address 0000h: 0418h) with the following values:

0: 1 - left Ctrl Pressed 4: 1 - pressed Scroll Lock.

1: 1 - left Alt. Pressed 5: 1 - pressed Num Lock.

2: 1 - right Ctrl Pressed 6: 1 - pressed Caps Lock.

3: 1 - right Alt. Pressed 7: 1 - pressed Sysreg.

8.2.3.4. Software delay

Software delays are used in cases where at any point of the program you need to suspend its execution for a while. By type of execution, program delays are divided into two types: delays implemented on the basis of the implementation of the "empty" cycles program, and delays implemented on the basis of the system timer of the computer. Listing 3.2 shows an example of the implementation of the first type delay.

Listing 3.2. Software delay based on the execution of nested cycles with the team Loop..

PROC DELAY; SUPPRAM

MOV CX, N; N - External Cycle Counter

Outer: Push CX; save the contents of the external cycle counter

MOV CX, 0; ensure the maximum number of repetitions (64k times)

; internal cycle

Inner: Loop Inner; internal cycle

POP CX; Restore the contents of the external cycle counter

LOOP OUTER; repeat the hanging cycle n times

Listing 3.2 Parameter N. performs the role of a large-scale delay time multiplier

t. ass \u003dN *t. Executions of the internal cycle.

In this case, the smallest unit of time (i.e., "tick") is the time of performing an internal cycle, in turn, from the time of execution 65535 times the command Loop.. Parameter N.selected experimentally to get t. back (in MSEK or seconds) taking into account the speed of a particular computer.

From consideration of this example, the disadvantages of this approach are obvious when it is required to ensure a time delay in the program, regardless of the type of computer used. It is reasonable to determine the time of the program delay directly by timer. The timer output signals with a frequency of 18.2 times per second do not depend on the performance of the computer and play the role of a daily time counter. The implementation of this method uses the function 00 h. BIOS interrupts INT 1.AH.

INT 1A. h, function 00 h. Reading timer cycles counter.

BIOS interrupt handler from the system timer ( INT 8.) counts the number of interrupts (every 55 ms or 18.2 times per second) in a double word of memory with the address 0040H: 006S.h.. This function returns the accumulated value (binary code) and resets it into 0 . In the register Al Returns 0 if the contents of the counter did not exceed the value corresponding to 24 hours (when this value is reached, the counter is reset), otherwise it returns Al \u003d.1.

Call: An \u003d 00.h..

Return: CX: DX. - the number of system time cycles from midnight,

Al - Flag of transition in a day.

Examples of returned values \u200b\u200bin CX: DX.:

1 sec 12. h. or 18

1 minute 04 44 h. or 1092,

1 hour 1 00 07 h. or 65543,

24 hours 18 00 B0 h. or 1 573 040.

For delays of smaller 14 seconds, you can only use the magazine bye DX

Listing 3.3. B This example sets a delay of 5 seconds, which corresponds to 91 countdown timer

..........

mOV AH, 0; Function "Reading" Timer Cycles

iNT 1AH; Get the value of the cycle meter in CX: DX

aDD DX, 91; add 5 sec. To the younger Word in DX

mOV BX, DX; I remember the required value in BX and perform

; permanent verification of the time counter values

rEPEAT: INT 1AH; again we get the value of the counter

cMP DX, BX; Compare with the desired

jNE REPEAT; if not just, then repeat again,

; otherwise the delay is over

If the introduction of high accuracy delay is required, then it is necessary to use the function 86h. BIOS interrupts INT 15H. It allows you to determine the delay time in microseconds. During the delay, interrupts are allowed. The program management is returned after the expiration of the specified time.

INT 15H, function 86h.

Call: AH \u003d 86.h, S.X. : DX \u003d. Delay time in MKSEK.

Return: CF \u003d 0. - normal execution, CF \u003d 1. - The function is not supported.

Example: CX:DX \u003d.0098h:9680h. \u003d 10 000 000 μSEK \u003d 10 seconds.

8.3. Options of an individual task

1. Initialize a screen with a specific attribute. To impose a local smaller window on it with another color attribute. In the central part of the window, display the text (several lines) from memory with the cyclic scrolling of the window of the window in several rows up and down. Changing the scrolling type is set by software delay (2 ... 3 sec.). Provide exit from the program.

2. Initialize two video constructions, each with its attribute and recorded text (some text characters must have excellent color). Organize a cyclic change of video shops with a period of 2 ... 3 sec. Provide output from the program with the restoration of the current page.

3. Initialize 2 local windows on the screen. Each window with your attribute and text with multiple lines. Organize the cyclic switching attributes of the first window to the second and back. The switching cycle is set to a time delay of 2 ... 3 sec. Provide exit from the program.

4. On the screen initialize 2 local windows. Each window with its attribute and text in several lines. Organize cyclic text switching from one window to another with a time delay of 2 ... 3 sec. Provide exit from the program.

5. On the Initialize window_1 screen, with the attribute and text in several lines. After a delay time 2 ... 3 seconds partially impose a window_2 on it with another attribute and text. Process looping. Provide exit from the program.

6. On the Initialize the local window with an attribute (and text), inform it the drift in a horizontal (vertical) direction. When the border reaches the screen, the window changes the drift in the opposite direction. The movement step of the local window in the screen space must be many times less than the size of the screen itself.

7. On the Initialize the local window with an attribute (and text) screen. After pressing the command key, the window begins to change its dimensions (pulsate), increasing and decreasing with a certain period. A temporary step of resizing a window must be much less than a period.
Pulsation.

8. Initialize the screen and the local window in it with your attributes. Organize text output mode to local keyboard window. Provide the ability to edit text, as well as scrolling windows when filling it.

9. Initialize the screen and two small local windows in it. Use the key<Tab.\u003e Organize switching cursor from one window to another. Selected key<Tab.\u003e The window acquires increased brightness. Provide exit from the program.

10. Initialize the screen and two local windows in it. In the left window, bring the first half table to the top half ASCII.and right - the second half. Provide for cleaning windows and output from the program.

11. Initialize the screen and two local windows in it (each with its attribute and text). Organize cyclic switching bit "Background Brightness / Flicker". Exit the program should restore the default bit value.

12. Initialize the screen and two local windows in it. In the left window, withdraw the second half of the table ASCII. C symbols of pseudographic. Using the cursor navigation, use the keys (¬, -, ®, ¯) to organize the possibility of continuous playback of direct lines in the second window.

13. Develop a program for outputting the text on the screen by directly programming a video clip using formatting elements (indentation from the left border, text transfer to the next string after crossing the word of the right border).

Entrance: DS:SI - address ASCI-lines AH.- attributes;

CX.- the number of output characters;

DH /DL - line ( row) / column ( cLM.);

Indent_L,Indent_R. - Fields of indent (in columns) on the left and right.

It is necessary to optimize the calculation of the address video buffer ES:DI. The procedure must return the initial value of the register Es.

14. Using direct video memory programming, fill out several video clip pages with subsequent viewing them (output to the screen) in cyclic mode. When you exit the program to restore the current page.

15. Develop a rectangle drawing program using graphic characters in ASCII encoding. The coordinates of the upper left corner (string, column) and the lower right must be entered from the keyboard after the corresponding invitation.

8.4. CONTROL QUESTIONS

1. Brief feature of the capabilities provided by the BIOS Basic I / O System programmer, compared to DOS service functions.

2. Name the volume of video memory for the image of one character and, accordingly, a single video monitor video in text mode.

3. Give the characteristic characteristic of the symbol in the video clip.

4. Develop macros for:

¨ Screen cleaning with a cursor setting into the upper left corner of the screen;

¨ Cursor positioning into an arbitrary point of the screen with memorization of its coordinates in memory using variables row and cLM.;

¨ output message mes. length leng. and color attribute aTTRIB from the position defined by variables row and cLM..

5. Which BIOS feature provides the user with comprehensive information on the keyboard key.

This article describes the syntax of the formula and the use of the function Min. In Microsoft Excel.

Description

Returns the smallest value in the list of arguments.

Syntax

Min (number1; [number2]; ...)

The arguments of the functions mines are described below.

    Number1, number2, ... The "number1" argument is mandatory, subsequent numbers are optional. From 1 to 255 numbers, among which it is required to find the smallest.

Remarks

    Arguments can be either numbers or numbers containing names, arrays or references.

    The logical values \u200b\u200band text representations of the numbers that are directly entered into the list of arguments are taken into account.

    If the arguments do not contain numbers, the Min function returns a value of 0.

    Arguments that are values \u200b\u200bof errors or texts that are not transformed into numbers lead to errors.

Example

Copy the sample data from the following table and insert them into the A1 cell of the new Excel sheet. To display the results of the formula, select them and press the F2 key, and then the Enter key. If necessary, change the width of the columns to see all the data.

The Min function is used to find the minimum number in the range under study and returns the corresponding number.

The mine function is designed to search for the minimum value in the data range under study and returns the corresponding result.

Examples of using functions Min and mine in Excel

The Excel table contains data on the date of birth of office workers. Determine the minimum age of the employee.

Data Table:

For calculations, we use the solve formula (correct result only when you press the Ctrl + SHIFT + ENTER combination):


The only argument is the expression year (today ()) - the year (B3: B10), which returns an array of numerical values \u200b\u200bequal to the difference of the current year and the year of birth of each employee. As a result of the calculations, we get:


The formula has automatically calculated that the youngest employee is 27 years old.



How to calculate the sum of minimum non-negative values \u200b\u200bin Excel

The Excel table contains several columns of numerical data. Find the total value of the minimum non-negative values \u200b\u200bcontained in these columns. Additional to find the smallest number from the table available.

Source Table:


To determine the minimum non-negative numbers, use the formula of the array:

!}

The only argument is a function if performing an inspection of the data array on the occurrence of positive numbers. If the condition is performed, the Min function takes an array as an argument containing only positive numbers. Similarly, we find minimal values \u200b\u200bfor the remaining columns. The result obtained (CTRL + SHIFT + ENTER):


Find the smallest number in the table with the help of the formula:

The function arguments are the values \u200b\u200breturned by each of the functions min for the specified data vector. Use as an array formula. Result (CTRL + SHIFT + ENTER):


Search for several smallest values \u200b\u200bunder conditions in Excel

Some company previously worked with one product provider. However, it became known that some other suppliers offer more acceptable prices. The Excel table contains products and discount codes offered by other suppliers. If there are no discounts, the logical value is displayed if the number is positive - the goods cost more. Find the greatest discount for the same goods only at different prices of different suppliers.

Source Table:

Formula for calculation (massif formula):

\u003d 0; no discounts; minine (if (A3: A15 \u003d D1; B3: B15; ""))) "Class \u003d" Formula "/\u003e

Computing algorithm:

  1. Function If checks the mine condition (if (A3: A15 \u003d D1; B3: B15; ""))\u003e \u003d 0, where mine returns the minimum discount value for the product, the code of which is specified in the D1 cell.
  2. The mine function takes into account logical values. A case is possible when there is no discount for any product (all values \u200b\u200bare false), and the result 0 (zero) will be returned. In this case, the text line "No discounts" will be returned. A similar event will occur if all discounts are only positive numbers.
  3. If the condition is not executed, the maximum discount will be returned (the most negative value) for the specified product code.

We calculate the greatest discounts for other goods. As a result, we obtain (Ctrl + SHIFT + ENTER):


Features of using functions min and mine in Excel

Min function has the following syntax record:

Min (number1; [number2] ...)

Description of arguments:

  • number1 is a mandatory argument characterizing the first number from the range in which it is required to find the minimum value;
  • [Number2] ... - the second and subsequent optional arguments characterizing the second and subsequent numbers from the test range.

The mine function has the following syntax record:

Mina (value1; [value2] ...)

Description of arguments:

  • value 1 is a mandatory argument characterizing the first entry in the range in which you want to find the minimum value;
  • [Value2] ... - the second and subsequent optional arguments characterizing the second and subsequent entry of the data under study.

Notes 1:

  1. The difference in the syntax emphasizes the semantic difference between the two functions: min works only with numeric values, mines additionally takes into account the logical data type.
  2. If only text strings are transmitted as arguments of functions mines and mine, non-textual numbers of numbers, the functions will be returned to 0.
  3. The function of mines that takes a link to the data range as an argument, ignores not only logical truth and lies, as well as text strings and empty cells.
  4. If the minimum argument is a formula that returns an error, the result of the error code will also be the result of the execution of these functions. It is recommended to check the data using the if the error function.
  5. The functions of mines and mines do not have logical functions-analogs, as implemented, for example, the function of the account (counted), so the data check should be performed when performing minic functions as an argument (if, inhibit and other).

Notes 2:

  1. Mine function Returns a value of 0 (zero) if the range to which the link was transmitted as an argument is contained or textual representations of numbers.
  2. Both functions are used to find the minimum quantities in the range of values \u200b\u200btransmitted as an argument, but there are several differences between them:
  • If one of the function arguments is a logical value (truth or false, which can be converted to numeric values \u200b\u200b1 and 0, respectively), this value will be taken into account in the calculations. For example, a function \u003d min (100; truth; false; 10) return the value of 0.
  • If a reference to a range containing logical data data was transferred as an argument of the Min function of the Min function. For example, a function \u003d min (A1: A4) will return to 10 if the range of cells A1: A4 contains the following data: 100, truth, lies and 10, respectively.
  • In order to take into account the logical type data, the mine's function should also be used. For example, recording \u003d mine (A1: A4) will return the value 0 (logical lies equivalent to numerical 0), if the cells A1: A4 contain data as in the previous paragraph.

You want the inscription "summary data" in the left table was in the center of the selected area, as in the right table. What button should you press?

You want the inscription "summary data" in the right table located as in the left table. What button should you press?

641. What value will appear in the selected cell if the function \u003d min (H4: H8) is introduced there?

· 11479

You want the number in the right cell to be displayed just like the number in the left. What is the menu item you need to choose?

You want in the highlighted C19 cell the difference between the cells A19 - B19. How do you need to start input formula?

· Cancel

· From the "minus" sign

· From the sign "equal"

· On the cell name

644. If you stretch the selected area with numbers 1, 2, 3 per right lower angle, holding the left mouse button, the result will be like a fragment:

With the help of which tool the picture is obtained, as in A24 cells: A28?

What tab should go to add slides to the presentation?

To change the "Title and Object" layout design, you need to go to the bookmark?

What button you need to click so that the selected text of the fragment 1 is converted into a marked list, as in a fragment 2?

What button you need to click so that the selected text of the fragment 1 is converted to such a look as in a fragment 2?

What button you need to click so that the word "cell" in the top table looked like in the bottom?

How to switch to the slide demonstration mode?

What does the specified icon mean near the slide number?

· Slide included in an arbitrary display

· Slide will be skipped when showing a presentation

· Animation effects are used on the slide.

· Slide contains video files

What is the menu item to choose to get the result, as in the picture on the right?

What shortcut need to use to start the browser to view the Web pages?

You need to immediately go to the site www.kremlin.ru. In what field to enter the desired address?

What tab you need to go to print text from the site?