ZX Format #01
31 октября 1995 |
|
IS-DOS - Programmers: UniColor - Standard color settings in the programs of IS-DOS
Category "Programmer's article" Eliseev VA UniColor - Standard color settings programs in IS-DOS. In order to standardize procedures for setting colors in the IS-DOS programs in recent years have increasingly used the standard UniColor, allows you to configure the color Any program with a universal Utilities unicolor.com. Therefore, when developing any program in the medium IS-DOS is preferable to use these standards to help users customize the system. To ensure compatibility with Standard UniColor all the colors of the program should be collected in a special table called "vector UniColor". The structure of this program is extremely simple: The first four bytes are the so-called marker UniColor - a sequence of characters UnCo (# 55, # 6E, # 43, # 6F), in which the utility unicolor.com determines the location of the vector. The fifth byte contains information about the number of available custom colors in the program. Subsequent bytes in an amount determined by the fifth byte of the vector represent the color codes in the standard IS-DOS format: bytes 0 - 2 - color ink Bytes 3 - 5 - paper color Byte 6 - Brightness Byte 7 - shimmer Total possible to set custom colors to 16. Subsequently, the program necessary colors are transferred from the vector UniColor a vector corresponding to the window, or passed as parameters in the registers of the processor by conventional methods. Example: code fragment, containing vector UniColor. ;**************************************** START JR BEGIN COL DEFM "UnCo"; Marker UniColor DEFB # 04; number of colors = 4 DEFB% 00111000; color box WIN1 DEFB% 00000001; shadow color WIN1 DEFB% 00001101; color box WIN2 DEFB% 00000001; shadow color WIN2 BEGIN LD IX, WIN1; vector W1 in IX LD HL, (COL +5); transfer of color LD (WIN1 +4), HL; windows and shadows of And the vector UniColor , The vector window W1 LD IX, WIN2; vector W2 in IX LD HL, (COL +5); transfer of color LD (WIN2 +4), HL; for WIN2 ........ WIN1 DEFW # 0415 DEFW # 0806 DEFB% 00000000 DEFB% 00000000 DEFW # 0000 WIN2 DEFW # 0404 DEFW # 0806 DEFB% 00000000 DEFB% 00000000 DEFW # 0000 ;****************************************
Other articles:
Similar articles:
В этот день... 21 November