/kernel/branches/Kolibri-F/docs/doxygen/doxygen.cfg |
---|
0,0 → 1,2612 |
# Doxyfile 1.9.1 |
# This file describes the settings to be used by the documentation system |
# doxygen (www.doxygen.org) for a project. |
# |
# All text after a double hash (##) is considered a comment and is placed in |
# front of the TAG it is preceding. |
# |
# All text after a single hash (#) is considered a comment and will be ignored. |
# The format is: |
# TAG = value [value, ...] |
# For lists, items can also be appended using: |
# TAG += value [value, ...] |
# Values that contain spaces should be placed between quotes (\" \"). |
#--------------------------------------------------------------------------- |
# Project related configuration options |
#--------------------------------------------------------------------------- |
# This tag specifies the encoding used for all characters in the configuration |
# file that follow. The default is UTF-8 which is also the encoding used for all |
# text before the first occurrence of this tag. Doxygen uses libiconv (or the |
# iconv built into libc) for the transcoding. See |
# https://www.gnu.org/software/libiconv/ for the list of possible encodings. |
# The default value is: UTF-8. |
DOXYFILE_ENCODING = UTF-8 |
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by |
# double-quotes, unless you are using Doxywizard) that should identify the |
# project for which the documentation is generated. This name is used in the |
# title of most generated pages and in a few other places. |
# The default value is: My Project. |
PROJECT_NAME = "KolibriOS kernel" |
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This |
# could be handy for archiving the generated documentation or if some version |
# control system is used. |
PROJECT_NUMBER = |
# Using the PROJECT_BRIEF tag one can provide an optional one line description |
# for a project that appears at the top of each page and should give viewer a |
# quick idea about the purpose of the project. Keep the description short. |
PROJECT_BRIEF = |
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included |
# in the documentation. The maximum height of the logo should not exceed 55 |
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy |
# the logo to the output directory. |
PROJECT_LOGO = |
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path |
# into which the generated documentation will be written. If a relative path is |
# entered, it will be relative to the location where doxygen was started. If |
# left blank the current directory will be used. |
OUTPUT_DIRECTORY = |
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- |
# directories (in 2 levels) under the output directory of each output format and |
# will distribute the generated files over these directories. Enabling this |
# option can be useful when feeding doxygen a huge amount of source files, where |
# putting all generated files in the same directory would otherwise causes |
# performance problems for the file system. |
# The default value is: NO. |
CREATE_SUBDIRS = NO |
# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII |
# characters to appear in the names of generated files. If set to NO, non-ASCII |
# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode |
# U+3044. |
# The default value is: NO. |
ALLOW_UNICODE_NAMES = NO |
# The OUTPUT_LANGUAGE tag is used to specify the language in which all |
# documentation generated by doxygen is written. Doxygen will use this |
# information to generate all constant output in the proper language. |
# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, |
# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), |
# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, |
# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), |
# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, |
# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, |
# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, |
# Ukrainian and Vietnamese. |
# The default value is: English. |
OUTPUT_LANGUAGE = English |
# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all |
# documentation generated by doxygen is written. Doxygen will use this |
# information to generate all generated output in the proper direction. |
# Possible values are: None, LTR, RTL and Context. |
# The default value is: None. |
OUTPUT_TEXT_DIRECTION = None |
# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member |
# descriptions after the members that are listed in the file and class |
# documentation (similar to Javadoc). Set to NO to disable this. |
# The default value is: YES. |
BRIEF_MEMBER_DESC = YES |
# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief |
# description of a member or function before the detailed description |
# |
# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the |
# brief descriptions will be completely suppressed. |
# The default value is: YES. |
REPEAT_BRIEF = YES |
# This tag implements a quasi-intelligent brief description abbreviator that is |
# used to form the text in various listings. Each string in this list, if found |
# as the leading text of the brief description, will be stripped from the text |
# and the result, after processing the whole list, is used as the annotated |
# text. Otherwise, the brief description is used as-is. If left blank, the |
# following values are used ($name is automatically replaced with the name of |
# the entity):The $name class, The $name widget, The $name file, is, provides, |
# specifies, contains, represents, a, an and the. |
ABBREVIATE_BRIEF = "The $name class" \ |
"The $name widget" \ |
"The $name file" \ |
is \ |
provides \ |
specifies \ |
contains \ |
represents \ |
a \ |
an \ |
the |
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then |
# doxygen will generate a detailed section even if there is only a brief |
# description. |
# The default value is: NO. |
ALWAYS_DETAILED_SEC = NO |
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all |
# inherited members of a class in the documentation of that class as if those |
# members were ordinary class members. Constructors, destructors and assignment |
# operators of the base classes will not be shown. |
# The default value is: NO. |
INLINE_INHERITED_MEMB = NO |
# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path |
# before files name in the file list and in the header files. If set to NO the |
# shortest path that makes the file name unique will be used |
# The default value is: YES. |
FULL_PATH_NAMES = YES |
# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. |
# Stripping is only done if one of the specified strings matches the left-hand |
# part of the path. The tag can be used to show relative paths in the file list. |
# If left blank the directory from which doxygen is run is used as the path to |
# strip. |
# |
# Note that you can specify absolute paths here, but also relative paths, which |
# will be relative from the directory where doxygen is started. |
# This tag requires that the tag FULL_PATH_NAMES is set to YES. |
STRIP_FROM_PATH = |
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the |
# path mentioned in the documentation of a class, which tells the reader which |
# header file to include in order to use a class. If left blank only the name of |
# the header file containing the class definition is used. Otherwise one should |
# specify the list of include paths that are normally passed to the compiler |
# using the -I flag. |
STRIP_FROM_INC_PATH = |
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but |
# less readable) file names. This can be useful is your file systems doesn't |
# support long names like on DOS, Mac, or CD-ROM. |
# The default value is: NO. |
SHORT_NAMES = NO |
# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the |
# first line (until the first dot) of a Javadoc-style comment as the brief |
# description. If set to NO, the Javadoc-style will behave just like regular Qt- |
# style comments (thus requiring an explicit @brief command for a brief |
# description.) |
# The default value is: NO. |
JAVADOC_AUTOBRIEF = NO |
# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line |
# such as |
# /*************** |
# as being the beginning of a Javadoc-style comment "banner". If set to NO, the |
# Javadoc-style will behave just like regular comments and it will not be |
# interpreted by doxygen. |
# The default value is: NO. |
JAVADOC_BANNER = NO |
# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first |
# line (until the first dot) of a Qt-style comment as the brief description. If |
# set to NO, the Qt-style will behave just like regular Qt-style comments (thus |
# requiring an explicit \brief command for a brief description.) |
# The default value is: NO. |
QT_AUTOBRIEF = NO |
# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a |
# multi-line C++ special comment block (i.e. a block of //! or /// comments) as |
# a brief description. This used to be the default behavior. The new default is |
# to treat a multi-line C++ comment block as a detailed description. Set this |
# tag to YES if you prefer the old behavior instead. |
# |
# Note that setting this tag to YES also means that rational rose comments are |
# not recognized any more. |
# The default value is: NO. |
MULTILINE_CPP_IS_BRIEF = NO |
# By default Python docstrings are displayed as preformatted text and doxygen's |
# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the |
# doxygen's special commands can be used and the contents of the docstring |
# documentation blocks is shown as doxygen documentation. |
# The default value is: YES. |
PYTHON_DOCSTRING = YES |
# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the |
# documentation from any documented member that it re-implements. |
# The default value is: YES. |
INHERIT_DOCS = YES |
# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new |
# page for each member. If set to NO, the documentation of a member will be part |
# of the file/class/namespace that contains it. |
# The default value is: NO. |
SEPARATE_MEMBER_PAGES = NO |
# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen |
# uses this value to replace tabs by spaces in code fragments. |
# Minimum value: 1, maximum value: 16, default value: 4. |
TAB_SIZE = 4 |
# This tag can be used to specify a number of aliases that act as commands in |
# the documentation. An alias has the form: |
# name=value |
# For example adding |
# "sideeffect=@par Side Effects:\n" |
# will allow you to put the command \sideeffect (or @sideeffect) in the |
# documentation, which will result in a user-defined paragraph with heading |
# "Side Effects:". You can put \n's in the value part of an alias to insert |
# newlines (in the resulting output). You can put ^^ in the value part of an |
# alias to insert a newline as if a physical newline was in the original file. |
# When you need a literal { or } or , in the value part of an alias you have to |
# escape them by means of a backslash (\), this can lead to conflicts with the |
# commands \{ and \} for these it is advised to use the version @{ and @} or use |
# a double escape (\\{ and \\}) |
ALIASES = |
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources |
# only. Doxygen will then generate output that is more tailored for C. For |
# instance, some of the names that are used will be different. The list of all |
# members will be omitted, etc. |
# The default value is: NO. |
OPTIMIZE_OUTPUT_FOR_C = NO |
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or |
# Python sources only. Doxygen will then generate output that is more tailored |
# for that language. For instance, namespaces will be presented as packages, |
# qualified scopes will look different, etc. |
# The default value is: NO. |
OPTIMIZE_OUTPUT_JAVA = NO |
# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran |
# sources. Doxygen will then generate output that is tailored for Fortran. |
# The default value is: NO. |
OPTIMIZE_FOR_FORTRAN = NO |
# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL |
# sources. Doxygen will then generate output that is tailored for VHDL. |
# The default value is: NO. |
OPTIMIZE_OUTPUT_VHDL = NO |
# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice |
# sources only. Doxygen will then generate output that is more tailored for that |
# language. For instance, namespaces will be presented as modules, types will be |
# separated into more groups, etc. |
# The default value is: NO. |
OPTIMIZE_OUTPUT_SLICE = NO |
# Doxygen selects the parser to use depending on the extension of the files it |
# parses. With this tag you can assign which parser to use for a given |
# extension. Doxygen has a built-in mapping, but you can override or extend it |
# using this tag. The format is ext=language, where ext is a file extension, and |
# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, |
# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, |
# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: |
# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser |
# tries to guess whether the code is fixed or free formatted code, this is the |
# default for Fortran type files). For instance to make doxygen treat .inc files |
# as Fortran files (default is PHP), and .f files as C (default is Fortran), |
# use: inc=Fortran f=C. |
# |
# Note: For files without extension you can use no_extension as a placeholder. |
# |
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise |
# the files are not read by doxygen. When specifying no_extension you should add |
# * to the FILE_PATTERNS. |
# |
# Note see also the list of default file extension mappings. |
EXTENSION_MAPPING = inc=C asm=C |
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments |
# according to the Markdown format, which allows for more readable |
# documentation. See https://daringfireball.net/projects/markdown/ for details. |
# The output of markdown processing is further processed by doxygen, so you can |
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in |
# case of backward compatibilities issues. |
# The default value is: YES. |
MARKDOWN_SUPPORT = YES |
# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up |
# to that level are automatically included in the table of contents, even if |
# they do not have an id attribute. |
# Note: This feature currently applies only to Markdown headings. |
# Minimum value: 0, maximum value: 99, default value: 5. |
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. |
TOC_INCLUDE_HEADINGS = 5 |
# When enabled doxygen tries to link words that correspond to documented |
# classes, or namespaces to their corresponding documentation. Such a link can |
# be prevented in individual cases by putting a % sign in front of the word or |
# globally by setting AUTOLINK_SUPPORT to NO. |
# The default value is: YES. |
AUTOLINK_SUPPORT = YES |
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want |
# to include (a tag file for) the STL sources as input, then you should set this |
# tag to YES in order to let doxygen match functions declarations and |
# definitions whose arguments contain STL classes (e.g. func(std::string); |
# versus func(std::string) {}). This also make the inheritance and collaboration |
# diagrams that involve STL classes more complete and accurate. |
# The default value is: NO. |
BUILTIN_STL_SUPPORT = NO |
# If you use Microsoft's C++/CLI language, you should set this option to YES to |
# enable parsing support. |
# The default value is: NO. |
CPP_CLI_SUPPORT = NO |
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: |
# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen |
# will parse them like normal C++ but will assume all classes use public instead |
# of private inheritance when no explicit protection keyword is present. |
# The default value is: NO. |
SIP_SUPPORT = NO |
# For Microsoft's IDL there are propget and propput attributes to indicate |
# getter and setter methods for a property. Setting this option to YES will make |
# doxygen to replace the get and set methods by a property in the documentation. |
# This will only work if the methods are indeed getting or setting a simple |
# type. If this is not the case, or you want to show the methods anyway, you |
# should set this option to NO. |
# The default value is: YES. |
IDL_PROPERTY_SUPPORT = YES |
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC |
# tag is set to YES then doxygen will reuse the documentation of the first |
# member in the group (if any) for the other members of the group. By default |
# all members of a group must be documented explicitly. |
# The default value is: NO. |
DISTRIBUTE_GROUP_DOC = NO |
# If one adds a struct or class to a group and this option is enabled, then also |
# any nested class or struct is added to the same group. By default this option |
# is disabled and one has to add nested compounds explicitly via \ingroup. |
# The default value is: NO. |
GROUP_NESTED_COMPOUNDS = NO |
# Set the SUBGROUPING tag to YES to allow class member groups of the same type |
# (for instance a group of public functions) to be put as a subgroup of that |
# type (e.g. under the Public Functions section). Set it to NO to prevent |
# subgrouping. Alternatively, this can be done per class using the |
# \nosubgrouping command. |
# The default value is: YES. |
SUBGROUPING = YES |
# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions |
# are shown inside the group in which they are included (e.g. using \ingroup) |
# instead of on a separate page (for HTML and Man pages) or section (for LaTeX |
# and RTF). |
# |
# Note that this feature does not work in combination with |
# SEPARATE_MEMBER_PAGES. |
# The default value is: NO. |
INLINE_GROUPED_CLASSES = NO |
# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions |
# with only public data fields or simple typedef fields will be shown inline in |
# the documentation of the scope in which they are defined (i.e. file, |
# namespace, or group documentation), provided this scope is documented. If set |
# to NO, structs, classes, and unions are shown on a separate page (for HTML and |
# Man pages) or section (for LaTeX and RTF). |
# The default value is: NO. |
INLINE_SIMPLE_STRUCTS = NO |
# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or |
# enum is documented as struct, union, or enum with the name of the typedef. So |
# typedef struct TypeS {} TypeT, will appear in the documentation as a struct |
# with name TypeT. When disabled the typedef will appear as a member of a file, |
# namespace, or class. And the struct will be named TypeS. This can typically be |
# useful for C code in case the coding convention dictates that all compound |
# types are typedef'ed and only the typedef is referenced, never the tag name. |
# The default value is: NO. |
TYPEDEF_HIDES_STRUCT = NO |
# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This |
# cache is used to resolve symbols given their name and scope. Since this can be |
# an expensive process and often the same symbol appears multiple times in the |
# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small |
# doxygen will become slower. If the cache is too large, memory is wasted. The |
# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range |
# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 |
# symbols. At the end of a run doxygen will report the cache usage and suggest |
# the optimal cache size from a speed point of view. |
# Minimum value: 0, maximum value: 9, default value: 0. |
LOOKUP_CACHE_SIZE = 0 |
# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use |
# during processing. When set to 0 doxygen will based this on the number of |
# cores available in the system. You can set it explicitly to a value larger |
# than 0 to get more control over the balance between CPU load and processing |
# speed. At this moment only the input processing can be done using multiple |
# threads. Since this is still an experimental feature the default is set to 1, |
# which efficively disables parallel processing. Please report any issues you |
# encounter. Generating dot graphs in parallel is controlled by the |
# DOT_NUM_THREADS setting. |
# Minimum value: 0, maximum value: 32, default value: 1. |
NUM_PROC_THREADS = 1 |
#--------------------------------------------------------------------------- |
# Build related configuration options |
#--------------------------------------------------------------------------- |
# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in |
# documentation are documented, even if no documentation was available. Private |
# class members and static file members will be hidden unless the |
# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. |
# Note: This will also disable the warnings about undocumented members that are |
# normally produced when WARNINGS is set to YES. |
# The default value is: NO. |
EXTRACT_ALL = YES |
# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will |
# be included in the documentation. |
# The default value is: NO. |
EXTRACT_PRIVATE = NO |
# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual |
# methods of a class will be included in the documentation. |
# The default value is: NO. |
EXTRACT_PRIV_VIRTUAL = NO |
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal |
# scope will be included in the documentation. |
# The default value is: NO. |
EXTRACT_PACKAGE = NO |
# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be |
# included in the documentation. |
# The default value is: NO. |
EXTRACT_STATIC = NO |
# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined |
# locally in source files will be included in the documentation. If set to NO, |
# only classes defined in header files are included. Does not have any effect |
# for Java sources. |
# The default value is: YES. |
EXTRACT_LOCAL_CLASSES = YES |
# This flag is only useful for Objective-C code. If set to YES, local methods, |
# which are defined in the implementation section but not in the interface are |
# included in the documentation. If set to NO, only methods in the interface are |
# included. |
# The default value is: NO. |
EXTRACT_LOCAL_METHODS = NO |
# If this flag is set to YES, the members of anonymous namespaces will be |
# extracted and appear in the documentation as a namespace called |
# 'anonymous_namespace{file}', where file will be replaced with the base name of |
# the file that contains the anonymous namespace. By default anonymous namespace |
# are hidden. |
# The default value is: NO. |
EXTRACT_ANON_NSPACES = NO |
# If this flag is set to YES, the name of an unnamed parameter in a declaration |
# will be determined by the corresponding definition. By default unnamed |
# parameters remain unnamed in the output. |
# The default value is: YES. |
RESOLVE_UNNAMED_PARAMS = YES |
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all |
# undocumented members inside documented classes or files. If set to NO these |
# members will be included in the various overviews, but no documentation |
# section is generated. This option has no effect if EXTRACT_ALL is enabled. |
# The default value is: NO. |
HIDE_UNDOC_MEMBERS = NO |
# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all |
# undocumented classes that are normally visible in the class hierarchy. If set |
# to NO, these classes will be included in the various overviews. This option |
# has no effect if EXTRACT_ALL is enabled. |
# The default value is: NO. |
HIDE_UNDOC_CLASSES = NO |
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend |
# declarations. If set to NO, these declarations will be included in the |
# documentation. |
# The default value is: NO. |
HIDE_FRIEND_COMPOUNDS = NO |
# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any |
# documentation blocks found inside the body of a function. If set to NO, these |
# blocks will be appended to the function's detailed documentation block. |
# The default value is: NO. |
HIDE_IN_BODY_DOCS = NO |
# The INTERNAL_DOCS tag determines if documentation that is typed after a |
# \internal command is included. If the tag is set to NO then the documentation |
# will be excluded. Set it to YES to include the internal documentation. |
# The default value is: NO. |
INTERNAL_DOCS = NO |
# With the correct setting of option CASE_SENSE_NAMES doxygen will better be |
# able to match the capabilities of the underlying filesystem. In case the |
# filesystem is case sensitive (i.e. it supports files in the same directory |
# whose names only differ in casing), the option must be set to YES to properly |
# deal with such files in case they appear in the input. For filesystems that |
# are not case sensitive the option should be be set to NO to properly deal with |
# output files written for symbols that only differ in casing, such as for two |
# classes, one named CLASS and the other named Class, and to also support |
# references to files without having to specify the exact matching casing. On |
# Windows (including Cygwin) and MacOS, users should typically set this option |
# to NO, whereas on Linux or other Unix flavors it should typically be set to |
# YES. |
# The default value is: system dependent. |
CASE_SENSE_NAMES = NO |
# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with |
# their full class and namespace scopes in the documentation. If set to YES, the |
# scope will be hidden. |
# The default value is: NO. |
HIDE_SCOPE_NAMES = NO |
# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will |
# append additional text to a page's title, such as Class Reference. If set to |
# YES the compound reference will be hidden. |
# The default value is: NO. |
HIDE_COMPOUND_REFERENCE= NO |
# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of |
# the files that are included by a file in the documentation of that file. |
# The default value is: YES. |
SHOW_INCLUDE_FILES = YES |
# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each |
# grouped member an include statement to the documentation, telling the reader |
# which file to include in order to use the member. |
# The default value is: NO. |
SHOW_GROUPED_MEMB_INC = NO |
# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include |
# files with double quotes in the documentation rather than with sharp brackets. |
# The default value is: NO. |
FORCE_LOCAL_INCLUDES = NO |
# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the |
# documentation for inline members. |
# The default value is: YES. |
INLINE_INFO = YES |
# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the |
# (detailed) documentation of file and class members alphabetically by member |
# name. If set to NO, the members will appear in declaration order. |
# The default value is: YES. |
SORT_MEMBER_DOCS = YES |
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief |
# descriptions of file, namespace and class members alphabetically by member |
# name. If set to NO, the members will appear in declaration order. Note that |
# this will also influence the order of the classes in the class list. |
# The default value is: NO. |
SORT_BRIEF_DOCS = NO |
# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the |
# (brief and detailed) documentation of class members so that constructors and |
# destructors are listed first. If set to NO the constructors will appear in the |
# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. |
# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief |
# member documentation. |
# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting |
# detailed member documentation. |
# The default value is: NO. |
SORT_MEMBERS_CTORS_1ST = NO |
# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy |
# of group names into alphabetical order. If set to NO the group names will |
# appear in their defined order. |
# The default value is: NO. |
SORT_GROUP_NAMES = NO |
# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by |
# fully-qualified names, including namespaces. If set to NO, the class list will |
# be sorted only by class name, not including the namespace part. |
# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. |
# Note: This option applies only to the class list, not to the alphabetical |
# list. |
# The default value is: NO. |
SORT_BY_SCOPE_NAME = NO |
# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper |
# type resolution of all parameters of a function it will reject a match between |
# the prototype and the implementation of a member function even if there is |
# only one candidate or it is obvious which candidate to choose by doing a |
# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still |
# accept a match between prototype and implementation in such cases. |
# The default value is: NO. |
STRICT_PROTO_MATCHING = NO |
# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo |
# list. This list is created by putting \todo commands in the documentation. |
# The default value is: YES. |
GENERATE_TODOLIST = YES |
# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test |
# list. This list is created by putting \test commands in the documentation. |
# The default value is: YES. |
GENERATE_TESTLIST = YES |
# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug |
# list. This list is created by putting \bug commands in the documentation. |
# The default value is: YES. |
GENERATE_BUGLIST = YES |
# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) |
# the deprecated list. This list is created by putting \deprecated commands in |
# the documentation. |
# The default value is: YES. |
GENERATE_DEPRECATEDLIST= YES |
# The ENABLED_SECTIONS tag can be used to enable conditional documentation |
# sections, marked by \if <section_label> ... \endif and \cond <section_label> |
# ... \endcond blocks. |
ENABLED_SECTIONS = |
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the |
# initial value of a variable or macro / define can have for it to appear in the |
# documentation. If the initializer consists of more lines than specified here |
# it will be hidden. Use a value of 0 to hide initializers completely. The |
# appearance of the value of individual variables and macros / defines can be |
# controlled using \showinitializer or \hideinitializer command in the |
# documentation regardless of this setting. |
# Minimum value: 0, maximum value: 10000, default value: 30. |
MAX_INITIALIZER_LINES = 30 |
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at |
# the bottom of the documentation of classes and structs. If set to YES, the |
# list will mention the files that were used to generate the documentation. |
# The default value is: YES. |
SHOW_USED_FILES = YES |
# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This |
# will remove the Files entry from the Quick Index and from the Folder Tree View |
# (if specified). |
# The default value is: YES. |
SHOW_FILES = YES |
# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces |
# page. This will remove the Namespaces entry from the Quick Index and from the |
# Folder Tree View (if specified). |
# The default value is: YES. |
SHOW_NAMESPACES = YES |
# The FILE_VERSION_FILTER tag can be used to specify a program or script that |
# doxygen should invoke to get the current version for each file (typically from |
# the version control system). Doxygen will invoke the program by executing (via |
# popen()) the command command input-file, where command is the value of the |
# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided |
# by doxygen. Whatever the program writes to standard output is used as the file |
# version. For an example see the documentation. |
FILE_VERSION_FILTER = |
# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed |
# by doxygen. The layout file controls the global structure of the generated |
# output files in an output format independent way. To create the layout file |
# that represents doxygen's defaults, run doxygen with the -l option. You can |
# optionally specify a file name after the option, if omitted DoxygenLayout.xml |
# will be used as the name of the layout file. |
# |
# Note that if you run doxygen from a directory containing a file called |
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE |
# tag is left empty. |
LAYOUT_FILE = |
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing |
# the reference definitions. This must be a list of .bib files. The .bib |
# extension is automatically appended if omitted. This requires the bibtex tool |
# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. |
# For LaTeX the style of the bibliography can be controlled using |
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the |
# search path. See also \cite for info how to create references. |
CITE_BIB_FILES = |
#--------------------------------------------------------------------------- |
# Configuration options related to warning and progress messages |
#--------------------------------------------------------------------------- |
# The QUIET tag can be used to turn on/off the messages that are generated to |
# standard output by doxygen. If QUIET is set to YES this implies that the |
# messages are off. |
# The default value is: NO. |
QUIET = NO |
# The WARNINGS tag can be used to turn on/off the warning messages that are |
# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES |
# this implies that the warnings are on. |
# |
# Tip: Turn warnings on while writing the documentation. |
# The default value is: YES. |
WARNINGS = YES |
# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate |
# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag |
# will automatically be disabled. |
# The default value is: YES. |
WARN_IF_UNDOCUMENTED = YES |
# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for |
# potential errors in the documentation, such as not documenting some parameters |
# in a documented function, or documenting parameters that don't exist or using |
# markup commands wrongly. |
# The default value is: YES. |
WARN_IF_DOC_ERROR = YES |
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that |
# are documented, but have no documentation for their parameters or return |
# value. If set to NO, doxygen will only warn about wrong or incomplete |
# parameter documentation, but not about the absence of documentation. If |
# EXTRACT_ALL is set to YES then this flag will automatically be disabled. |
# The default value is: NO. |
WARN_NO_PARAMDOC = NO |
# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when |
# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS |
# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but |
# at the end of the doxygen process doxygen will return with a non-zero status. |
# Possible values are: NO, YES and FAIL_ON_WARNINGS. |
# The default value is: NO. |
WARN_AS_ERROR = NO |
# The WARN_FORMAT tag determines the format of the warning messages that doxygen |
# can produce. The string should contain the $file, $line, and $text tags, which |
# will be replaced by the file and line number from which the warning originated |
# and the warning text. Optionally the format may contain $version, which will |
# be replaced by the version of the file (if it could be obtained via |
# FILE_VERSION_FILTER) |
# The default value is: $file:$line: $text. |
WARN_FORMAT = "$file:$line: $text" |
# The WARN_LOGFILE tag can be used to specify a file to which warning and error |
# messages should be written. If left blank the output is written to standard |
# error (stderr). |
WARN_LOGFILE = |
#--------------------------------------------------------------------------- |
# Configuration options related to the input files |
#--------------------------------------------------------------------------- |
# The INPUT tag is used to specify the files and/or directories that contain |
# documented source files. You may enter file names like myfile.cpp or |
# directories like /usr/src/myproject. Separate the files or directories with |
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING |
# Note: If this tag is empty the current directory is searched. |
INPUT = |
# This tag can be used to specify the character encoding of the source files |
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses |
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv |
# documentation (see: |
# https://www.gnu.org/software/libiconv/) for the list of possible encodings. |
# The default value is: UTF-8. |
INPUT_ENCODING = UTF-8 |
# If the value of the INPUT tag contains directories, you can use the |
# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and |
# *.h) to filter out the source-files in the directories. |
# |
# Note that for custom extensions or not directly supported extensions you also |
# need to set EXTENSION_MAPPING for the extension otherwise the files are not |
# read by doxygen. |
# |
# Note the list of default checked file patterns might differ from the list of |
# default file extension mappings. |
# |
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, |
# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, |
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, |
# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), |
# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl, |
# *.ucf, *.qsf and *.ice. |
FILE_PATTERNS = *.inc *.asm |
# The RECURSIVE tag can be used to specify whether or not subdirectories should |
# be searched for input files as well. |
# The default value is: NO. |
RECURSIVE = YES |
# The EXCLUDE tag can be used to specify files and/or directories that should be |
# excluded from the INPUT source files. This way you can easily exclude a |
# subdirectory from a directory tree whose root is specified with the INPUT tag. |
# |
# Note that relative paths are relative to the directory from which doxygen is |
# run. |
EXCLUDE = |
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or |
# directories that are symbolic links (a Unix file system feature) are excluded |
# from the input. |
# The default value is: NO. |
EXCLUDE_SYMLINKS = NO |
# If the value of the INPUT tag contains directories, you can use the |
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude |
# certain files from those directories. |
# |
# Note that the wildcards are matched against the file with absolute path, so to |
# exclude all test directories for example use the pattern */test/* |
EXCLUDE_PATTERNS = |
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names |
# (namespaces, classes, functions, etc.) that should be excluded from the |
# output. The symbol name can be a fully qualified name, a word, or if the |
# wildcard * is used, a substring. Examples: ANamespace, AClass, |
# AClass::ANamespace, ANamespace::*Test |
# |
# Note that the wildcards are matched against the file with absolute path, so to |
# exclude all test directories use the pattern */test/* |
EXCLUDE_SYMBOLS = |
# The EXAMPLE_PATH tag can be used to specify one or more files or directories |
# that contain example code fragments that are included (see the \include |
# command). |
EXAMPLE_PATH = |
# If the value of the EXAMPLE_PATH tag contains directories, you can use the |
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and |
# *.h) to filter out the source-files in the directories. If left blank all |
# files are included. |
EXAMPLE_PATTERNS = * |
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be |
# searched for input files to be used with the \include or \dontinclude commands |
# irrespective of the value of the RECURSIVE tag. |
# The default value is: NO. |
EXAMPLE_RECURSIVE = NO |
# The IMAGE_PATH tag can be used to specify one or more files or directories |
# that contain images that are to be included in the documentation (see the |
# \image command). |
IMAGE_PATH = |
# The INPUT_FILTER tag can be used to specify a program that doxygen should |
# invoke to filter for each input file. Doxygen will invoke the filter program |
# by executing (via popen()) the command: |
# |
# <filter> <input-file> |
# |
# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the |
# name of an input file. Doxygen will then use the output that the filter |
# program writes to standard output. If FILTER_PATTERNS is specified, this tag |
# will be ignored. |
# |
# Note that the filter must not add or remove lines; it is applied before the |
# code is scanned, but not when the output code is generated. If lines are added |
# or removed, the anchors will not be placed correctly. |
# |
# Note that for custom extensions or not directly supported extensions you also |
# need to set EXTENSION_MAPPING for the extension otherwise the files are not |
# properly processed by doxygen. |
INPUT_FILTER = |
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern |
# basis. Doxygen will compare the file name with each pattern and apply the |
# filter if there is a match. The filters are a list of the form: pattern=filter |
# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how |
# filters are used. If the FILTER_PATTERNS tag is empty or if none of the |
# patterns match the file name, INPUT_FILTER is applied. |
# |
# Note that for custom extensions or not directly supported extensions you also |
# need to set EXTENSION_MAPPING for the extension otherwise the files are not |
# properly processed by doxygen. |
FILTER_PATTERNS = |
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using |
# INPUT_FILTER) will also be used to filter the input files that are used for |
# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). |
# The default value is: NO. |
FILTER_SOURCE_FILES = NO |
# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file |
# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and |
# it is also possible to disable source filtering for a specific pattern using |
# *.ext= (so without naming a filter). |
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. |
FILTER_SOURCE_PATTERNS = |
# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that |
# is part of the input, its contents will be placed on the main page |
# (index.html). This can be useful if you have a project on for instance GitHub |
# and want to reuse the introduction page also for the doxygen output. |
USE_MDFILE_AS_MAINPAGE = |
#--------------------------------------------------------------------------- |
# Configuration options related to source browsing |
#--------------------------------------------------------------------------- |
# If the SOURCE_BROWSER tag is set to YES then a list of source files will be |
# generated. Documented entities will be cross-referenced with these sources. |
# |
# Note: To get rid of all source code in the generated output, make sure that |
# also VERBATIM_HEADERS is set to NO. |
# The default value is: NO. |
SOURCE_BROWSER = NO |
# Setting the INLINE_SOURCES tag to YES will include the body of functions, |
# classes and enums directly into the documentation. |
# The default value is: NO. |
INLINE_SOURCES = NO |
# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any |
# special comment blocks from generated source code fragments. Normal C, C++ and |
# Fortran comments will always remain visible. |
# The default value is: YES. |
STRIP_CODE_COMMENTS = YES |
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented |
# entity all documented functions referencing it will be listed. |
# The default value is: NO. |
REFERENCED_BY_RELATION = NO |
# If the REFERENCES_RELATION tag is set to YES then for each documented function |
# all documented entities called/used by that function will be listed. |
# The default value is: NO. |
REFERENCES_RELATION = NO |
# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set |
# to YES then the hyperlinks from functions in REFERENCES_RELATION and |
# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will |
# link to the documentation. |
# The default value is: YES. |
REFERENCES_LINK_SOURCE = YES |
# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the |
# source code will show a tooltip with additional information such as prototype, |
# brief description and links to the definition and documentation. Since this |
# will make the HTML file larger and loading of large files a bit slower, you |
# can opt to disable this feature. |
# The default value is: YES. |
# This tag requires that the tag SOURCE_BROWSER is set to YES. |
SOURCE_TOOLTIPS = YES |
# If the USE_HTAGS tag is set to YES then the references to source code will |
# point to the HTML generated by the htags(1) tool instead of doxygen built-in |
# source browser. The htags tool is part of GNU's global source tagging system |
# (see https://www.gnu.org/software/global/global.html). You will need version |
# 4.8.6 or higher. |
# |
# To use it do the following: |
# - Install the latest version of global |
# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file |
# - Make sure the INPUT points to the root of the source tree |
# - Run doxygen as normal |
# |
# Doxygen will invoke htags (and that will in turn invoke gtags), so these |
# tools must be available from the command line (i.e. in the search path). |
# |
# The result: instead of the source browser generated by doxygen, the links to |
# source code will now point to the output of htags. |
# The default value is: NO. |
# This tag requires that the tag SOURCE_BROWSER is set to YES. |
USE_HTAGS = NO |
# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a |
# verbatim copy of the header file for each class for which an include is |
# specified. Set to NO to disable this. |
# See also: Section \class. |
# The default value is: YES. |
VERBATIM_HEADERS = YES |
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the |
# clang parser (see: |
# http://clang.llvm.org/) for more accurate parsing at the cost of reduced |
# performance. This can be particularly helpful with template rich C++ code for |
# which doxygen's built-in parser lacks the necessary type information. |
# Note: The availability of this option depends on whether or not doxygen was |
# generated with the -Duse_libclang=ON option for CMake. |
# The default value is: NO. |
CLANG_ASSISTED_PARSING = NO |
# If clang assisted parsing is enabled and the CLANG_ADD_INC_PATHS tag is set to |
# YES then doxygen will add the directory of each input to the include path. |
# The default value is: YES. |
CLANG_ADD_INC_PATHS = YES |
# If clang assisted parsing is enabled you can provide the compiler with command |
# line options that you would normally use when invoking the compiler. Note that |
# the include paths will already be set by doxygen for the files and directories |
# specified with INPUT and INCLUDE_PATH. |
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. |
CLANG_OPTIONS = |
# If clang assisted parsing is enabled you can provide the clang parser with the |
# path to the directory containing a file called compile_commands.json. This |
# file is the compilation database (see: |
# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the |
# options used when the source files were built. This is equivalent to |
# specifying the -p option to a clang tool, such as clang-check. These options |
# will then be passed to the parser. Any options specified with CLANG_OPTIONS |
# will be added as well. |
# Note: The availability of this option depends on whether or not doxygen was |
# generated with the -Duse_libclang=ON option for CMake. |
CLANG_DATABASE_PATH = |
#--------------------------------------------------------------------------- |
# Configuration options related to the alphabetical class index |
#--------------------------------------------------------------------------- |
# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all |
# compounds will be generated. Enable this if the project contains a lot of |
# classes, structs, unions or interfaces. |
# The default value is: YES. |
ALPHABETICAL_INDEX = YES |
# In case all classes in a project start with a common prefix, all classes will |
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag |
# can be used to specify a prefix (or a list of prefixes) that should be ignored |
# while generating the index headers. |
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. |
IGNORE_PREFIX = |
#--------------------------------------------------------------------------- |
# Configuration options related to the HTML output |
#--------------------------------------------------------------------------- |
# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output |
# The default value is: YES. |
GENERATE_HTML = YES |
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a |
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of |
# it. |
# The default directory is: html. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
HTML_OUTPUT = html |
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each |
# generated HTML page (for example: .htm, .php, .asp). |
# The default value is: .html. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
HTML_FILE_EXTENSION = .html |
# The HTML_HEADER tag can be used to specify a user-defined HTML header file for |
# each generated HTML page. If the tag is left blank doxygen will generate a |
# standard header. |
# |
# To get valid HTML the header file that includes any scripts and style sheets |
# that doxygen needs, which is dependent on the configuration options used (e.g. |
# the setting GENERATE_TREEVIEW). It is highly recommended to start with a |
# default header using |
# doxygen -w html new_header.html new_footer.html new_stylesheet.css |
# YourConfigFile |
# and then modify the file new_header.html. See also section "Doxygen usage" |
# for information on how to generate the default header that doxygen normally |
# uses. |
# Note: The header is subject to change so you typically have to regenerate the |
# default header when upgrading to a newer version of doxygen. For a description |
# of the possible markers and block names see the documentation. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
HTML_HEADER = |
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each |
# generated HTML page. If the tag is left blank doxygen will generate a standard |
# footer. See HTML_HEADER for more information on how to generate a default |
# footer and what special commands can be used inside the footer. See also |
# section "Doxygen usage" for information on how to generate the default footer |
# that doxygen normally uses. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
HTML_FOOTER = |
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style |
# sheet that is used by each HTML page. It can be used to fine-tune the look of |
# the HTML output. If left blank doxygen will generate a default style sheet. |
# See also section "Doxygen usage" for information on how to generate the style |
# sheet that doxygen normally uses. |
# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as |
# it is more robust and this tag (HTML_STYLESHEET) will in the future become |
# obsolete. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
HTML_STYLESHEET = |
# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined |
# cascading style sheets that are included after the standard style sheets |
# created by doxygen. Using this option one can overrule certain style aspects. |
# This is preferred over using HTML_STYLESHEET since it does not replace the |
# standard style sheet and is therefore more robust against future updates. |
# Doxygen will copy the style sheet files to the output directory. |
# Note: The order of the extra style sheet files is of importance (e.g. the last |
# style sheet in the list overrules the setting of the previous ones in the |
# list). For an example see the documentation. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
HTML_EXTRA_STYLESHEET = |
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or |
# other source files which should be copied to the HTML output directory. Note |
# that these files will be copied to the base HTML output directory. Use the |
# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these |
# files. In the HTML_STYLESHEET file, use the file name only. Also note that the |
# files will be copied as-is; there are no commands or markers available. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
HTML_EXTRA_FILES = |
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen |
# will adjust the colors in the style sheet and background images according to |
# this color. Hue is specified as an angle on a colorwheel, see |
# https://en.wikipedia.org/wiki/Hue for more information. For instance the value |
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 |
# purple, and 360 is red again. |
# Minimum value: 0, maximum value: 359, default value: 220. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
HTML_COLORSTYLE_HUE = 220 |
# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors |
# in the HTML output. For a value of 0 the output will use grayscales only. A |
# value of 255 will produce the most vivid colors. |
# Minimum value: 0, maximum value: 255, default value: 100. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
HTML_COLORSTYLE_SAT = 100 |
# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the |
# luminance component of the colors in the HTML output. Values below 100 |
# gradually make the output lighter, whereas values above 100 make the output |
# darker. The value divided by 100 is the actual gamma applied, so 80 represents |
# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not |
# change the gamma. |
# Minimum value: 40, maximum value: 240, default value: 80. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
HTML_COLORSTYLE_GAMMA = 80 |
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML |
# page will contain the date and time when the page was generated. Setting this |
# to YES can help to show when doxygen was last run and thus if the |
# documentation is up to date. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
HTML_TIMESTAMP = NO |
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML |
# documentation will contain a main index with vertical navigation menus that |
# are dynamically created via JavaScript. If disabled, the navigation index will |
# consists of multiple levels of tabs that are statically embedded in every HTML |
# page. Disable this option to support browsers that do not have JavaScript, |
# like the Qt help browser. |
# The default value is: YES. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
HTML_DYNAMIC_MENUS = YES |
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML |
# documentation will contain sections that can be hidden and shown after the |
# page has loaded. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
HTML_DYNAMIC_SECTIONS = NO |
# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries |
# shown in the various tree structured indices initially; the user can expand |
# and collapse entries dynamically later on. Doxygen will expand the tree to |
# such a level that at most the specified number of entries are visible (unless |
# a fully collapsed tree already exceeds this amount). So setting the number of |
# entries 1 will produce a full collapsed tree by default. 0 is a special value |
# representing an infinite number of entries and will result in a full expanded |
# tree by default. |
# Minimum value: 0, maximum value: 9999, default value: 100. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
HTML_INDEX_NUM_ENTRIES = 100 |
# If the GENERATE_DOCSET tag is set to YES, additional index files will be |
# generated that can be used as input for Apple's Xcode 3 integrated development |
# environment (see: |
# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To |
# create a documentation set, doxygen will generate a Makefile in the HTML |
# output directory. Running make will produce the docset in that directory and |
# running make install will install the docset in |
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at |
# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy |
# genXcode/_index.html for more information. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
GENERATE_DOCSET = NO |
# This tag determines the name of the docset feed. A documentation feed provides |
# an umbrella under which multiple documentation sets from a single provider |
# (such as a company or product suite) can be grouped. |
# The default value is: Doxygen generated docs. |
# This tag requires that the tag GENERATE_DOCSET is set to YES. |
DOCSET_FEEDNAME = "Doxygen generated docs" |
# This tag specifies a string that should uniquely identify the documentation |
# set bundle. This should be a reverse domain-name style string, e.g. |
# com.mycompany.MyDocSet. Doxygen will append .docset to the name. |
# The default value is: org.doxygen.Project. |
# This tag requires that the tag GENERATE_DOCSET is set to YES. |
DOCSET_BUNDLE_ID = org.doxygen.Project |
# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify |
# the documentation publisher. This should be a reverse domain-name style |
# string, e.g. com.mycompany.MyDocSet.documentation. |
# The default value is: org.doxygen.Publisher. |
# This tag requires that the tag GENERATE_DOCSET is set to YES. |
DOCSET_PUBLISHER_ID = org.doxygen.Publisher |
# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. |
# The default value is: Publisher. |
# This tag requires that the tag GENERATE_DOCSET is set to YES. |
DOCSET_PUBLISHER_NAME = Publisher |
# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three |
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The |
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop |
# (see: |
# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows. |
# |
# The HTML Help Workshop contains a compiler that can convert all HTML output |
# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML |
# files are now used as the Windows 98 help format, and will replace the old |
# Windows help format (.hlp) on all Windows platforms in the future. Compressed |
# HTML files also contain an index, a table of contents, and you can search for |
# words in the documentation. The HTML workshop also contains a viewer for |
# compressed HTML files. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
GENERATE_HTMLHELP = NO |
# The CHM_FILE tag can be used to specify the file name of the resulting .chm |
# file. You can add a path in front of the file if the result should not be |
# written to the html output directory. |
# This tag requires that the tag GENERATE_HTMLHELP is set to YES. |
CHM_FILE = |
# The HHC_LOCATION tag can be used to specify the location (absolute path |
# including file name) of the HTML help compiler (hhc.exe). If non-empty, |
# doxygen will try to run the HTML help compiler on the generated index.hhp. |
# The file has to be specified with full path. |
# This tag requires that the tag GENERATE_HTMLHELP is set to YES. |
HHC_LOCATION = |
# The GENERATE_CHI flag controls if a separate .chi index file is generated |
# (YES) or that it should be included in the main .chm file (NO). |
# The default value is: NO. |
# This tag requires that the tag GENERATE_HTMLHELP is set to YES. |
GENERATE_CHI = NO |
# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) |
# and project file content. |
# This tag requires that the tag GENERATE_HTMLHELP is set to YES. |
CHM_INDEX_ENCODING = |
# The BINARY_TOC flag controls whether a binary table of contents is generated |
# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it |
# enables the Previous and Next buttons. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_HTMLHELP is set to YES. |
BINARY_TOC = NO |
# The TOC_EXPAND flag can be set to YES to add extra items for group members to |
# the table of contents of the HTML help documentation and to the tree view. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_HTMLHELP is set to YES. |
TOC_EXPAND = NO |
# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and |
# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that |
# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help |
# (.qch) of the generated HTML documentation. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
GENERATE_QHP = NO |
# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify |
# the file name of the resulting .qch file. The path specified is relative to |
# the HTML output folder. |
# This tag requires that the tag GENERATE_QHP is set to YES. |
QCH_FILE = |
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help |
# Project output. For more information please see Qt Help Project / Namespace |
# (see: |
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). |
# The default value is: org.doxygen.Project. |
# This tag requires that the tag GENERATE_QHP is set to YES. |
QHP_NAMESPACE = org.doxygen.Project |
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt |
# Help Project output. For more information please see Qt Help Project / Virtual |
# Folders (see: |
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). |
# The default value is: doc. |
# This tag requires that the tag GENERATE_QHP is set to YES. |
QHP_VIRTUAL_FOLDER = doc |
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom |
# filter to add. For more information please see Qt Help Project / Custom |
# Filters (see: |
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). |
# This tag requires that the tag GENERATE_QHP is set to YES. |
QHP_CUST_FILTER_NAME = |
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the |
# custom filter to add. For more information please see Qt Help Project / Custom |
# Filters (see: |
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). |
# This tag requires that the tag GENERATE_QHP is set to YES. |
QHP_CUST_FILTER_ATTRS = |
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this |
# project's filter section matches. Qt Help Project / Filter Attributes (see: |
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). |
# This tag requires that the tag GENERATE_QHP is set to YES. |
QHP_SECT_FILTER_ATTRS = |
# The QHG_LOCATION tag can be used to specify the location (absolute path |
# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to |
# run qhelpgenerator on the generated .qhp file. |
# This tag requires that the tag GENERATE_QHP is set to YES. |
QHG_LOCATION = |
# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be |
# generated, together with the HTML files, they form an Eclipse help plugin. To |
# install this plugin and make it available under the help contents menu in |
# Eclipse, the contents of the directory containing the HTML and XML files needs |
# to be copied into the plugins directory of eclipse. The name of the directory |
# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. |
# After copying Eclipse needs to be restarted before the help appears. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
GENERATE_ECLIPSEHELP = NO |
# A unique identifier for the Eclipse help plugin. When installing the plugin |
# the directory name containing the HTML and XML files should also have this |
# name. Each documentation set should have its own identifier. |
# The default value is: org.doxygen.Project. |
# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. |
ECLIPSE_DOC_ID = org.doxygen.Project |
# If you want full control over the layout of the generated HTML pages it might |
# be necessary to disable the index and replace it with your own. The |
# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top |
# of each HTML page. A value of NO enables the index and the value YES disables |
# it. Since the tabs in the index contain the same information as the navigation |
# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
DISABLE_INDEX = YES |
# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index |
# structure should be generated to display hierarchical information. If the tag |
# value is set to YES, a side panel will be generated containing a tree-like |
# index structure (just like the one that is generated for HTML Help). For this |
# to work a browser that supports JavaScript, DHTML, CSS and frames is required |
# (i.e. any modern browser). Windows users are probably better off using the |
# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can |
# further fine-tune the look of the index. As an example, the default style |
# sheet generated by doxygen has an example that shows how to put an image at |
# the root of the tree instead of the PROJECT_NAME. Since the tree basically has |
# the same information as the tab index, you could consider setting |
# DISABLE_INDEX to YES when enabling this option. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
GENERATE_TREEVIEW = YES |
# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that |
# doxygen will group on one line in the generated HTML documentation. |
# |
# Note that a value of 0 will completely suppress the enum values from appearing |
# in the overview section. |
# Minimum value: 0, maximum value: 20, default value: 4. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
ENUM_VALUES_PER_LINE = 4 |
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used |
# to set the initial width (in pixels) of the frame in which the tree is shown. |
# Minimum value: 0, maximum value: 1500, default value: 250. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
TREEVIEW_WIDTH = 250 |
# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to |
# external symbols imported via tag files in a separate window. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
EXT_LINKS_IN_WINDOW = NO |
# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg |
# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see |
# https://inkscape.org) to generate formulas as SVG images instead of PNGs for |
# the HTML output. These images will generally look nicer at scaled resolutions. |
# Possible values are: png (the default) and svg (looks nicer but requires the |
# pdf2svg or inkscape tool). |
# The default value is: png. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
HTML_FORMULA_FORMAT = png |
# Use this tag to change the font size of LaTeX formulas included as images in |
# the HTML documentation. When you change the font size after a successful |
# doxygen run you need to manually remove any form_*.png images from the HTML |
# output directory to force them to be regenerated. |
# Minimum value: 8, maximum value: 50, default value: 10. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
FORMULA_FONTSIZE = 10 |
# Use the FORMULA_TRANSPARENT tag to determine whether or not the images |
# generated for formulas are transparent PNGs. Transparent PNGs are not |
# supported properly for IE 6.0, but are supported on all modern browsers. |
# |
# Note that when changing this option you need to delete any form_*.png files in |
# the HTML output directory before the changes have effect. |
# The default value is: YES. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
FORMULA_TRANSPARENT = YES |
# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands |
# to create new LaTeX commands to be used in formulas as building blocks. See |
# the section "Including formulas" for details. |
FORMULA_MACROFILE = |
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see |
# https://www.mathjax.org) which uses client side JavaScript for the rendering |
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX |
# installed or if you want to formulas look prettier in the HTML output. When |
# enabled you may also need to install MathJax separately and configure the path |
# to it using the MATHJAX_RELPATH option. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
USE_MATHJAX = NO |
# When MathJax is enabled you can set the default output format to be used for |
# the MathJax output. See the MathJax site (see: |
# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. |
# Possible values are: HTML-CSS (which is slower, but has the best |
# compatibility), NativeMML (i.e. MathML) and SVG. |
# The default value is: HTML-CSS. |
# This tag requires that the tag USE_MATHJAX is set to YES. |
MATHJAX_FORMAT = HTML-CSS |
# When MathJax is enabled you need to specify the location relative to the HTML |
# output directory using the MATHJAX_RELPATH option. The destination directory |
# should contain the MathJax.js script. For instance, if the mathjax directory |
# is located at the same level as the HTML output directory, then |
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax |
# Content Delivery Network so you can quickly see the result without installing |
# MathJax. However, it is strongly recommended to install a local copy of |
# MathJax from https://www.mathjax.org before deployment. |
# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. |
# This tag requires that the tag USE_MATHJAX is set to YES. |
MATHJAX_RELPATH = https://cdn.jsdelivr.net/npm/mathjax@2 |
# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax |
# extension names that should be enabled during MathJax rendering. For example |
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols |
# This tag requires that the tag USE_MATHJAX is set to YES. |
MATHJAX_EXTENSIONS = |
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces |
# of code that will be used on startup of the MathJax code. See the MathJax site |
# (see: |
# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an |
# example see the documentation. |
# This tag requires that the tag USE_MATHJAX is set to YES. |
MATHJAX_CODEFILE = |
# When the SEARCHENGINE tag is enabled doxygen will generate a search box for |
# the HTML output. The underlying search engine uses javascript and DHTML and |
# should work on any modern browser. Note that when using HTML help |
# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) |
# there is already a search function so this one should typically be disabled. |
# For large projects the javascript based search engine can be slow, then |
# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to |
# search using the keyboard; to jump to the search box use <access key> + S |
# (what the <access key> is depends on the OS and browser, but it is typically |
# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down |
# key> to jump into the search results window, the results can be navigated |
# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel |
# the search. The filter options can be selected when the cursor is inside the |
# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys> |
# to select a filter and <Enter> or <escape> to activate or cancel the filter |
# option. |
# The default value is: YES. |
# This tag requires that the tag GENERATE_HTML is set to YES. |
SEARCHENGINE = YES |
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be |
# implemented using a web server instead of a web client using JavaScript. There |
# are two flavors of web server based searching depending on the EXTERNAL_SEARCH |
# setting. When disabled, doxygen will generate a PHP script for searching and |
# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing |
# and searching needs to be provided by external tools. See the section |
# "External Indexing and Searching" for details. |
# The default value is: NO. |
# This tag requires that the tag SEARCHENGINE is set to YES. |
SERVER_BASED_SEARCH = NO |
# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP |
# script for searching. Instead the search results are written to an XML file |
# which needs to be processed by an external indexer. Doxygen will invoke an |
# external search engine pointed to by the SEARCHENGINE_URL option to obtain the |
# search results. |
# |
# Doxygen ships with an example indexer (doxyindexer) and search engine |
# (doxysearch.cgi) which are based on the open source search engine library |
# Xapian (see: |
# https://xapian.org/). |
# |
# See the section "External Indexing and Searching" for details. |
# The default value is: NO. |
# This tag requires that the tag SEARCHENGINE is set to YES. |
EXTERNAL_SEARCH = NO |
# The SEARCHENGINE_URL should point to a search engine hosted by a web server |
# which will return the search results when EXTERNAL_SEARCH is enabled. |
# |
# Doxygen ships with an example indexer (doxyindexer) and search engine |
# (doxysearch.cgi) which are based on the open source search engine library |
# Xapian (see: |
# https://xapian.org/). See the section "External Indexing and Searching" for |
# details. |
# This tag requires that the tag SEARCHENGINE is set to YES. |
SEARCHENGINE_URL = |
# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed |
# search data is written to a file for indexing by an external tool. With the |
# SEARCHDATA_FILE tag the name of this file can be specified. |
# The default file is: searchdata.xml. |
# This tag requires that the tag SEARCHENGINE is set to YES. |
SEARCHDATA_FILE = searchdata.xml |
# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the |
# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is |
# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple |
# projects and redirect the results back to the right project. |
# This tag requires that the tag SEARCHENGINE is set to YES. |
EXTERNAL_SEARCH_ID = |
# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen |
# projects other than the one defined by this configuration file, but that are |
# all added to the same external search index. Each project needs to have a |
# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of |
# to a relative location where the documentation can be found. The format is: |
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... |
# This tag requires that the tag SEARCHENGINE is set to YES. |
EXTRA_SEARCH_MAPPINGS = |
#--------------------------------------------------------------------------- |
# Configuration options related to the LaTeX output |
#--------------------------------------------------------------------------- |
# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. |
# The default value is: YES. |
GENERATE_LATEX = NO |
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a |
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of |
# it. |
# The default directory is: latex. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
LATEX_OUTPUT = latex |
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be |
# invoked. |
# |
# Note that when not enabling USE_PDFLATEX the default is latex when enabling |
# USE_PDFLATEX the default is pdflatex and when in the later case latex is |
# chosen this is overwritten by pdflatex. For specific output languages the |
# default can have been set differently, this depends on the implementation of |
# the output language. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
LATEX_CMD_NAME = |
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate |
# index for LaTeX. |
# Note: This tag is used in the Makefile / make.bat. |
# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file |
# (.tex). |
# The default file is: makeindex. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
MAKEINDEX_CMD_NAME = makeindex |
# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to |
# generate index for LaTeX. In case there is no backslash (\) as first character |
# it will be automatically added in the LaTeX code. |
# Note: This tag is used in the generated output file (.tex). |
# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat. |
# The default value is: makeindex. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
LATEX_MAKEINDEX_CMD = makeindex |
# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX |
# documents. This may be useful for small projects and may help to save some |
# trees in general. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
COMPACT_LATEX = NO |
# The PAPER_TYPE tag can be used to set the paper type that is used by the |
# printer. |
# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x |
# 14 inches) and executive (7.25 x 10.5 inches). |
# The default value is: a4. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
PAPER_TYPE = a4 |
# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names |
# that should be included in the LaTeX output. The package can be specified just |
# by its name or with the correct syntax as to be used with the LaTeX |
# \usepackage command. To get the times font for instance you can specify : |
# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times} |
# To use the option intlimits with the amsmath package you can specify: |
# EXTRA_PACKAGES=[intlimits]{amsmath} |
# If left blank no extra packages will be included. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
EXTRA_PACKAGES = |
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the |
# generated LaTeX document. The header should contain everything until the first |
# chapter. If it is left blank doxygen will generate a standard header. See |
# section "Doxygen usage" for information on how to let doxygen write the |
# default header to a separate file. |
# |
# Note: Only use a user-defined header if you know what you are doing! The |
# following commands have a special meaning inside the header: $title, |
# $datetime, $date, $doxygenversion, $projectname, $projectnumber, |
# $projectbrief, $projectlogo. Doxygen will replace $title with the empty |
# string, for the replacement values of the other commands the user is referred |
# to HTML_HEADER. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
LATEX_HEADER = |
# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the |
# generated LaTeX document. The footer should contain everything after the last |
# chapter. If it is left blank doxygen will generate a standard footer. See |
# LATEX_HEADER for more information on how to generate a default footer and what |
# special commands can be used inside the footer. |
# |
# Note: Only use a user-defined footer if you know what you are doing! |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
LATEX_FOOTER = |
# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined |
# LaTeX style sheets that are included after the standard style sheets created |
# by doxygen. Using this option one can overrule certain style aspects. Doxygen |
# will copy the style sheet files to the output directory. |
# Note: The order of the extra style sheet files is of importance (e.g. the last |
# style sheet in the list overrules the setting of the previous ones in the |
# list). |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
LATEX_EXTRA_STYLESHEET = |
# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or |
# other source files which should be copied to the LATEX_OUTPUT output |
# directory. Note that the files will be copied as-is; there are no commands or |
# markers available. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
LATEX_EXTRA_FILES = |
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is |
# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will |
# contain links (just like the HTML output) instead of page references. This |
# makes the output suitable for online browsing using a PDF viewer. |
# The default value is: YES. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
PDF_HYPERLINKS = YES |
# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as |
# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX |
# files. Set this option to YES, to get a higher quality PDF documentation. |
# |
# See also section LATEX_CMD_NAME for selecting the engine. |
# The default value is: YES. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
USE_PDFLATEX = YES |
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode |
# command to the generated LaTeX files. This will instruct LaTeX to keep running |
# if errors occur, instead of asking the user for help. This option is also used |
# when generating formulas in HTML. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
LATEX_BATCHMODE = NO |
# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the |
# index chapters (such as File Index, Compound Index, etc.) in the output. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
LATEX_HIDE_INDICES = NO |
# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source |
# code with syntax highlighting in the LaTeX output. |
# |
# Note that which sources are shown also depends on other settings such as |
# SOURCE_BROWSER. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
LATEX_SOURCE_CODE = NO |
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the |
# bibliography, e.g. plainnat, or ieeetr. See |
# https://en.wikipedia.org/wiki/BibTeX and \cite for more info. |
# The default value is: plain. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
LATEX_BIB_STYLE = plain |
# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated |
# page will contain the date and time when the page was generated. Setting this |
# to NO can help when comparing the output of multiple runs. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
LATEX_TIMESTAMP = NO |
# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute) |
# path from which the emoji images will be read. If a relative path is entered, |
# it will be relative to the LATEX_OUTPUT directory. If left blank the |
# LATEX_OUTPUT directory will be used. |
# This tag requires that the tag GENERATE_LATEX is set to YES. |
LATEX_EMOJI_DIRECTORY = |
#--------------------------------------------------------------------------- |
# Configuration options related to the RTF output |
#--------------------------------------------------------------------------- |
# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The |
# RTF output is optimized for Word 97 and may not look too pretty with other RTF |
# readers/editors. |
# The default value is: NO. |
GENERATE_RTF = NO |
# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a |
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of |
# it. |
# The default directory is: rtf. |
# This tag requires that the tag GENERATE_RTF is set to YES. |
RTF_OUTPUT = rtf |
# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF |
# documents. This may be useful for small projects and may help to save some |
# trees in general. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_RTF is set to YES. |
COMPACT_RTF = NO |
# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will |
# contain hyperlink fields. The RTF file will contain links (just like the HTML |
# output) instead of page references. This makes the output suitable for online |
# browsing using Word or some other Word compatible readers that support those |
# fields. |
# |
# Note: WordPad (write) and others do not support links. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_RTF is set to YES. |
RTF_HYPERLINKS = NO |
# Load stylesheet definitions from file. Syntax is similar to doxygen's |
# configuration file, i.e. a series of assignments. You only have to provide |
# replacements, missing definitions are set to their default value. |
# |
# See also section "Doxygen usage" for information on how to generate the |
# default style sheet that doxygen normally uses. |
# This tag requires that the tag GENERATE_RTF is set to YES. |
RTF_STYLESHEET_FILE = |
# Set optional variables used in the generation of an RTF document. Syntax is |
# similar to doxygen's configuration file. A template extensions file can be |
# generated using doxygen -e rtf extensionFile. |
# This tag requires that the tag GENERATE_RTF is set to YES. |
RTF_EXTENSIONS_FILE = |
# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code |
# with syntax highlighting in the RTF output. |
# |
# Note that which sources are shown also depends on other settings such as |
# SOURCE_BROWSER. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_RTF is set to YES. |
RTF_SOURCE_CODE = NO |
#--------------------------------------------------------------------------- |
# Configuration options related to the man page output |
#--------------------------------------------------------------------------- |
# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for |
# classes and files. |
# The default value is: NO. |
GENERATE_MAN = NO |
# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a |
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of |
# it. A directory man3 will be created inside the directory specified by |
# MAN_OUTPUT. |
# The default directory is: man. |
# This tag requires that the tag GENERATE_MAN is set to YES. |
MAN_OUTPUT = man |
# The MAN_EXTENSION tag determines the extension that is added to the generated |
# man pages. In case the manual section does not start with a number, the number |
# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is |
# optional. |
# The default value is: .3. |
# This tag requires that the tag GENERATE_MAN is set to YES. |
MAN_EXTENSION = .3 |
# The MAN_SUBDIR tag determines the name of the directory created within |
# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by |
# MAN_EXTENSION with the initial . removed. |
# This tag requires that the tag GENERATE_MAN is set to YES. |
MAN_SUBDIR = |
# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it |
# will generate one additional man file for each entity documented in the real |
# man page(s). These additional files only source the real man page, but without |
# them the man command would be unable to find the correct page. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_MAN is set to YES. |
MAN_LINKS = NO |
#--------------------------------------------------------------------------- |
# Configuration options related to the XML output |
#--------------------------------------------------------------------------- |
# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that |
# captures the structure of the code including all documentation. |
# The default value is: NO. |
GENERATE_XML = NO |
# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a |
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of |
# it. |
# The default directory is: xml. |
# This tag requires that the tag GENERATE_XML is set to YES. |
XML_OUTPUT = xml |
# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program |
# listings (including syntax highlighting and cross-referencing information) to |
# the XML output. Note that enabling this will significantly increase the size |
# of the XML output. |
# The default value is: YES. |
# This tag requires that the tag GENERATE_XML is set to YES. |
XML_PROGRAMLISTING = YES |
# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include |
# namespace members in file scope as well, matching the HTML output. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_XML is set to YES. |
XML_NS_MEMB_FILE_SCOPE = NO |
#--------------------------------------------------------------------------- |
# Configuration options related to the DOCBOOK output |
#--------------------------------------------------------------------------- |
# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files |
# that can be used to generate PDF. |
# The default value is: NO. |
GENERATE_DOCBOOK = NO |
# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put. |
# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in |
# front of it. |
# The default directory is: docbook. |
# This tag requires that the tag GENERATE_DOCBOOK is set to YES. |
DOCBOOK_OUTPUT = docbook |
# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the |
# program listings (including syntax highlighting and cross-referencing |
# information) to the DOCBOOK output. Note that enabling this will significantly |
# increase the size of the DOCBOOK output. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_DOCBOOK is set to YES. |
DOCBOOK_PROGRAMLISTING = NO |
#--------------------------------------------------------------------------- |
# Configuration options for the AutoGen Definitions output |
#--------------------------------------------------------------------------- |
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an |
# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures |
# the structure of the code including all documentation. Note that this feature |
# is still experimental and incomplete at the moment. |
# The default value is: NO. |
GENERATE_AUTOGEN_DEF = NO |
#--------------------------------------------------------------------------- |
# Configuration options related to the Perl module output |
#--------------------------------------------------------------------------- |
# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module |
# file that captures the structure of the code including all documentation. |
# |
# Note that this feature is still experimental and incomplete at the moment. |
# The default value is: NO. |
GENERATE_PERLMOD = NO |
# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary |
# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI |
# output from the Perl module output. |
# The default value is: NO. |
# This tag requires that the tag GENERATE_PERLMOD is set to YES. |
PERLMOD_LATEX = NO |
# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely |
# formatted so it can be parsed by a human reader. This is useful if you want to |
# understand what is going on. On the other hand, if this tag is set to NO, the |
# size of the Perl module output will be much smaller and Perl will parse it |
# just the same. |
# The default value is: YES. |
# This tag requires that the tag GENERATE_PERLMOD is set to YES. |
PERLMOD_PRETTY = YES |
# The names of the make variables in the generated doxyrules.make file are |
# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful |
# so different doxyrules.make files included by the same Makefile don't |
# overwrite each other's variables. |
# This tag requires that the tag GENERATE_PERLMOD is set to YES. |
PERLMOD_MAKEVAR_PREFIX = |
#--------------------------------------------------------------------------- |
# Configuration options related to the preprocessor |
#--------------------------------------------------------------------------- |
# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all |
# C-preprocessor directives found in the sources and include files. |
# The default value is: YES. |
ENABLE_PREPROCESSING = YES |
# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names |
# in the source code. If set to NO, only conditional compilation will be |
# performed. Macro expansion can be done in a controlled way by setting |
# EXPAND_ONLY_PREDEF to YES. |
# The default value is: NO. |
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
MACRO_EXPANSION = NO |
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then |
# the macro expansion is limited to the macros specified with the PREDEFINED and |
# EXPAND_AS_DEFINED tags. |
# The default value is: NO. |
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
EXPAND_ONLY_PREDEF = NO |
# If the SEARCH_INCLUDES tag is set to YES, the include files in the |
# INCLUDE_PATH will be searched if a #include is found. |
# The default value is: YES. |
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
SEARCH_INCLUDES = YES |
# The INCLUDE_PATH tag can be used to specify one or more directories that |
# contain include files that are not input files but should be processed by the |
# preprocessor. |
# This tag requires that the tag SEARCH_INCLUDES is set to YES. |
INCLUDE_PATH = |
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard |
# patterns (like *.h and *.hpp) to filter out the header-files in the |
# directories. If left blank, the patterns specified with FILE_PATTERNS will be |
# used. |
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
INCLUDE_FILE_PATTERNS = |
# The PREDEFINED tag can be used to specify one or more macro names that are |
# defined before the preprocessor is started (similar to the -D option of e.g. |
# gcc). The argument of the tag is a list of macros of the form: name or |
# name=definition (no spaces). If the definition and the "=" are omitted, "=1" |
# is assumed. To prevent a macro definition from being undefined via #undef or |
# recursively expanded use the := operator instead of the = operator. |
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
PREDEFINED = |
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this |
# tag can be used to specify a list of macro names that should be expanded. The |
# macro definition that is found in the sources will be used. Use the PREDEFINED |
# tag if you want to use a different macro definition that overrules the |
# definition found in the source code. |
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
EXPAND_AS_DEFINED = |
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will |
# remove all references to function-like macros that are alone on a line, have |
# an all uppercase name, and do not end with a semicolon. Such function macros |
# are typically used for boiler-plate code, and will confuse the parser if not |
# removed. |
# The default value is: YES. |
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
SKIP_FUNCTION_MACROS = YES |
#--------------------------------------------------------------------------- |
# Configuration options related to external references |
#--------------------------------------------------------------------------- |
# The TAGFILES tag can be used to specify one or more tag files. For each tag |
# file the location of the external documentation should be added. The format of |
# a tag file without this location is as follows: |
# TAGFILES = file1 file2 ... |
# Adding location for the tag files is done as follows: |
# TAGFILES = file1=loc1 "file2 = loc2" ... |
# where loc1 and loc2 can be relative or absolute paths or URLs. See the |
# section "Linking to external documentation" for more information about the use |
# of tag files. |
# Note: Each tag file must have a unique name (where the name does NOT include |
# the path). If a tag file is not located in the directory in which doxygen is |
# run, you must also specify the path to the tagfile here. |
TAGFILES = |
# When a file name is specified after GENERATE_TAGFILE, doxygen will create a |
# tag file that is based on the input files it reads. See section "Linking to |
# external documentation" for more information about the usage of tag files. |
GENERATE_TAGFILE = |
# If the ALLEXTERNALS tag is set to YES, all external class will be listed in |
# the class index. If set to NO, only the inherited external classes will be |
# listed. |
# The default value is: NO. |
ALLEXTERNALS = NO |
# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed |
# in the modules index. If set to NO, only the current project's groups will be |
# listed. |
# The default value is: YES. |
EXTERNAL_GROUPS = YES |
# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in |
# the related pages index. If set to NO, only the current project's pages will |
# be listed. |
# The default value is: YES. |
EXTERNAL_PAGES = YES |
#--------------------------------------------------------------------------- |
# Configuration options related to the dot tool |
#--------------------------------------------------------------------------- |
# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram |
# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to |
# NO turns the diagrams off. Note that this option also works with HAVE_DOT |
# disabled, but it is recommended to install and use dot, since it yields more |
# powerful graphs. |
# The default value is: YES. |
CLASS_DIAGRAMS = YES |
# You can include diagrams made with dia in doxygen documentation. Doxygen will |
# then run dia to produce the diagram and insert it in the documentation. The |
# DIA_PATH tag allows you to specify the directory where the dia binary resides. |
# If left empty dia is assumed to be found in the default search path. |
DIA_PATH = |
# If set to YES the inheritance and collaboration graphs will hide inheritance |
# and usage relations if the target is undocumented or is not a class. |
# The default value is: YES. |
HIDE_UNDOC_RELATIONS = YES |
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is |
# available from the path. This tool is part of Graphviz (see: |
# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent |
# Bell Labs. The other options in this section have no effect if this option is |
# set to NO |
# The default value is: NO. |
HAVE_DOT = NO |
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed |
# to run in parallel. When set to 0 doxygen will base this on the number of |
# processors available in the system. You can set it explicitly to a value |
# larger than 0 to get control over the balance between CPU load and processing |
# speed. |
# Minimum value: 0, maximum value: 32, default value: 0. |
# This tag requires that the tag HAVE_DOT is set to YES. |
DOT_NUM_THREADS = 0 |
# When you want a differently looking font in the dot files that doxygen |
# generates you can specify the font name using DOT_FONTNAME. You need to make |
# sure dot is able to find the font, which can be done by putting it in a |
# standard location or by setting the DOTFONTPATH environment variable or by |
# setting DOT_FONTPATH to the directory containing the font. |
# The default value is: Helvetica. |
# This tag requires that the tag HAVE_DOT is set to YES. |
DOT_FONTNAME = Helvetica |
# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of |
# dot graphs. |
# Minimum value: 4, maximum value: 24, default value: 10. |
# This tag requires that the tag HAVE_DOT is set to YES. |
DOT_FONTSIZE = 10 |
# By default doxygen will tell dot to use the default font as specified with |
# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set |
# the path where dot can find it using this tag. |
# This tag requires that the tag HAVE_DOT is set to YES. |
DOT_FONTPATH = |
# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for |
# each documented class showing the direct and indirect inheritance relations. |
# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO. |
# The default value is: YES. |
# This tag requires that the tag HAVE_DOT is set to YES. |
CLASS_GRAPH = YES |
# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a |
# graph for each documented class showing the direct and indirect implementation |
# dependencies (inheritance, containment, and class references variables) of the |
# class with other documented classes. |
# The default value is: YES. |
# This tag requires that the tag HAVE_DOT is set to YES. |
COLLABORATION_GRAPH = YES |
# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for |
# groups, showing the direct groups dependencies. |
# The default value is: YES. |
# This tag requires that the tag HAVE_DOT is set to YES. |
GROUP_GRAPHS = YES |
# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and |
# collaboration diagrams in a style similar to the OMG's Unified Modeling |
# Language. |
# The default value is: NO. |
# This tag requires that the tag HAVE_DOT is set to YES. |
UML_LOOK = NO |
# If the UML_LOOK tag is enabled, the fields and methods are shown inside the |
# class node. If there are many fields or methods and many nodes the graph may |
# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the |
# number of items for each type to make the size more manageable. Set this to 0 |
# for no limit. Note that the threshold may be exceeded by 50% before the limit |
# is enforced. So when you set the threshold to 10, up to 15 fields may appear, |
# but if the number exceeds 15, the total amount of fields shown is limited to |
# 10. |
# Minimum value: 0, maximum value: 100, default value: 10. |
# This tag requires that the tag UML_LOOK is set to YES. |
UML_LIMIT_NUM_FIELDS = 10 |
# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and |
# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS |
# tag is set to YES, doxygen will add type and arguments for attributes and |
# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen |
# will not generate fields with class member information in the UML graphs. The |
# class diagrams will look similar to the default class diagrams but using UML |
# notation for the relationships. |
# Possible values are: NO, YES and NONE. |
# The default value is: NO. |
# This tag requires that the tag UML_LOOK is set to YES. |
DOT_UML_DETAILS = NO |
# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters |
# to display on a single line. If the actual line length exceeds this threshold |
# significantly it will wrapped across multiple lines. Some heuristics are apply |
# to avoid ugly line breaks. |
# Minimum value: 0, maximum value: 1000, default value: 17. |
# This tag requires that the tag HAVE_DOT is set to YES. |
DOT_WRAP_THRESHOLD = 17 |
# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and |
# collaboration graphs will show the relations between templates and their |
# instances. |
# The default value is: NO. |
# This tag requires that the tag HAVE_DOT is set to YES. |
TEMPLATE_RELATIONS = NO |
# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to |
# YES then doxygen will generate a graph for each documented file showing the |
# direct and indirect include dependencies of the file with other documented |
# files. |
# The default value is: YES. |
# This tag requires that the tag HAVE_DOT is set to YES. |
INCLUDE_GRAPH = YES |
# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are |
# set to YES then doxygen will generate a graph for each documented file showing |
# the direct and indirect include dependencies of the file with other documented |
# files. |
# The default value is: YES. |
# This tag requires that the tag HAVE_DOT is set to YES. |
INCLUDED_BY_GRAPH = YES |
# If the CALL_GRAPH tag is set to YES then doxygen will generate a call |
# dependency graph for every global function or class method. |
# |
# Note that enabling this option will significantly increase the time of a run. |
# So in most cases it will be better to enable call graphs for selected |
# functions only using the \callgraph command. Disabling a call graph can be |
# accomplished by means of the command \hidecallgraph. |
# The default value is: NO. |
# This tag requires that the tag HAVE_DOT is set to YES. |
CALL_GRAPH = NO |
# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller |
# dependency graph for every global function or class method. |
# |
# Note that enabling this option will significantly increase the time of a run. |
# So in most cases it will be better to enable caller graphs for selected |
# functions only using the \callergraph command. Disabling a caller graph can be |
# accomplished by means of the command \hidecallergraph. |
# The default value is: NO. |
# This tag requires that the tag HAVE_DOT is set to YES. |
CALLER_GRAPH = NO |
# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical |
# hierarchy of all classes instead of a textual one. |
# The default value is: YES. |
# This tag requires that the tag HAVE_DOT is set to YES. |
GRAPHICAL_HIERARCHY = YES |
# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the |
# dependencies a directory has on other directories in a graphical way. The |
# dependency relations are determined by the #include relations between the |
# files in the directories. |
# The default value is: YES. |
# This tag requires that the tag HAVE_DOT is set to YES. |
DIRECTORY_GRAPH = YES |
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images |
# generated by dot. For an explanation of the image formats see the section |
# output formats in the documentation of the dot tool (Graphviz (see: |
# http://www.graphviz.org/)). |
# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order |
# to make the SVG files visible in IE 9+ (other browsers do not have this |
# requirement). |
# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo, |
# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and |
# png:gdiplus:gdiplus. |
# The default value is: png. |
# This tag requires that the tag HAVE_DOT is set to YES. |
DOT_IMAGE_FORMAT = png |
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to |
# enable generation of interactive SVG images that allow zooming and panning. |
# |
# Note that this requires a modern browser other than Internet Explorer. Tested |
# and working are Firefox, Chrome, Safari, and Opera. |
# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make |
# the SVG files visible. Older versions of IE do not have SVG support. |
# The default value is: NO. |
# This tag requires that the tag HAVE_DOT is set to YES. |
INTERACTIVE_SVG = NO |
# The DOT_PATH tag can be used to specify the path where the dot tool can be |
# found. If left blank, it is assumed the dot tool can be found in the path. |
# This tag requires that the tag HAVE_DOT is set to YES. |
DOT_PATH = |
# The DOTFILE_DIRS tag can be used to specify one or more directories that |
# contain dot files that are included in the documentation (see the \dotfile |
# command). |
# This tag requires that the tag HAVE_DOT is set to YES. |
DOTFILE_DIRS = |
# The MSCFILE_DIRS tag can be used to specify one or more directories that |
# contain msc files that are included in the documentation (see the \mscfile |
# command). |
MSCFILE_DIRS = |
# The DIAFILE_DIRS tag can be used to specify one or more directories that |
# contain dia files that are included in the documentation (see the \diafile |
# command). |
DIAFILE_DIRS = |
# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the |
# path where java can find the plantuml.jar file. If left blank, it is assumed |
# PlantUML is not used or called during a preprocessing step. Doxygen will |
# generate a warning when it encounters a \startuml command in this case and |
# will not generate output for the diagram. |
PLANTUML_JAR_PATH = |
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a |
# configuration file for plantuml. |
PLANTUML_CFG_FILE = |
# When using plantuml, the specified paths are searched for files specified by |
# the !include statement in a plantuml block. |
PLANTUML_INCLUDE_PATH = |
# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes |
# that will be shown in the graph. If the number of nodes in a graph becomes |
# larger than this value, doxygen will truncate the graph, which is visualized |
# by representing a node as a red box. Note that doxygen if the number of direct |
# children of the root node in a graph is already larger than |
# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that |
# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. |
# Minimum value: 0, maximum value: 10000, default value: 50. |
# This tag requires that the tag HAVE_DOT is set to YES. |
DOT_GRAPH_MAX_NODES = 50 |
# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs |
# generated by dot. A depth value of 3 means that only nodes reachable from the |
# root by following a path via at most 3 edges will be shown. Nodes that lay |
# further from the root node will be omitted. Note that setting this option to 1 |
# or 2 may greatly reduce the computation time needed for large code bases. Also |
# note that the size of a graph can be further restricted by |
# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. |
# Minimum value: 0, maximum value: 1000, default value: 0. |
# This tag requires that the tag HAVE_DOT is set to YES. |
MAX_DOT_GRAPH_DEPTH = 0 |
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent |
# background. This is disabled by default, because dot on Windows does not seem |
# to support this out of the box. |
# |
# Warning: Depending on the platform used, enabling this option may lead to |
# badly anti-aliased labels on the edges of a graph (i.e. they become hard to |
# read). |
# The default value is: NO. |
# This tag requires that the tag HAVE_DOT is set to YES. |
DOT_TRANSPARENT = NO |
# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output |
# files in one run (i.e. multiple -o and -T options on the command line). This |
# makes dot run faster, but since only newer versions of dot (>1.8.10) support |
# this, this feature is disabled by default. |
# The default value is: NO. |
# This tag requires that the tag HAVE_DOT is set to YES. |
DOT_MULTI_TARGETS = NO |
# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page |
# explaining the meaning of the various boxes and arrows in the dot generated |
# graphs. |
# The default value is: YES. |
# This tag requires that the tag HAVE_DOT is set to YES. |
GENERATE_LEGEND = YES |
# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate |
# files that are used to generate the various graphs. |
# |
# Note: This setting is not only used for dot files but also for msc and |
# plantuml temporary files. |
# The default value is: YES. |
DOT_CLEANUP = YES |
/kernel/branches/Kolibri-F/docs/doxygen |
---|
Property changes: |
Added: svn:ignore |
+* |
/kernel/branches/Kolibri-F/docs/sysfuncr.txt |
---|
0,0 → 1,5003 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
СИСТЕМНЫЕ ФУНКЦИИ ОПЕРАЦИОННОЙ СИСТЕМЫ Kolibri 0.7.7.0 |
Номер функции помещается в регистр eax. |
Вызов системной функции осуществляется командой "int 0x40". |
Все регистры, кроме явно указанных в возвращаемом значении, |
включая регистр флагов eflags, сохраняются. |
====================================================================== |
============== Функция 0 - определить и нарисовать окно. ============= |
====================================================================== |
Определяет окно приложения. Рисует рамку окна, заголовок и рабочую |
область. Для окон со скином определяет стандартные кнопки закрытия и |
минимизации. |
Параметры: |
* eax = 0 - номер функции |
* ebx = [координата по оси x]*65536 + [размер по оси x] |
* ecx = [координата по оси y]*65536 + [размер по оси y] |
* edx = 0xXYRRGGBB, где: |
* Y = стиль окна: |
* Y=1 - только определить область окна, ничего не рисовать |
* Y=3 - окно со скином |
* Y=4 - окно со скином фиксированных размеров |
* Y=0,2 эти стили не должны более использоваться и оставлены |
только для совместимости со старыми приложениями |
* остальные возможные значения (от 5 до 15) зарезервированы, |
вызов функции с такими Y игнорируется |
* RR, GG, BB = соответственно красная, зеленая, синяя |
составляющие цвета рабочей области окна |
(игнорируется для стиля Y=1) |
* X = DCBA (биты) |
* A = 1 - у окна есть заголовок |
* B = 1 - координаты всех графических примитивов задаются |
относительно клиентской области окна |
* C = 1 - не закрашивать рабочую область при отрисовке окна |
* D = 0 - нормальная заливка рабочей области, 1 - градиентная |
Следующие параметры предназначены для окон типа I и II и |
игнорируются для стилей Y=1,3: |
* esi = 0xXYRRGGBB - цвет заголовка |
* RR, GG, BB определяют сам цвет |
* Y = 0 - обычное окно |
Y = 1 - неперемещаемое окно (работает для всех стилей окон) |
* X определяет градиент заголовка: |
X = 0 - нет градиента, |
X = 8 - обычный градиент, |
для окон типа II X=4 - негативный градиент |
* прочие значения X и Y зарезервированы |
* edi = адрес строки заголовка для стилей Y=3,4 (см. функцию 71.1) |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Положение и размеры окна устанавливаются при первом вызове |
этой функции и игнорируются при последующих; для изменения |
положения и/или размеров уже созданного окна используйте |
67-ю функцию. |
* Для окон стилей Y=3,4 с заголовком (A=1) строка заголовка |
устанавливается при первом вызове этой функции и игнорируется при |
последующих (точнее говоря, игнорируется после вызова |
подфункции 2 функции 12 - конца перерисовки); |
для изменения строки заголовка уже созданного окна используйте |
подфункцию 1 функции 71. |
* Если использовать окна соответствующих стилей, то положение |
и/или размеры окна могут меняться пользователем. |
Текущие положение и размеры могут быть получены вызовом функции 9. |
* Окно должно умещаться на экране. Если переданные координаты |
и размеры не удовлетворяют этому условию, то соответствующая |
координата (или, возможно, обе) считается нулем, а если и это |
не помогает, то соответствующий размер (или, возможно, оба) |
устанавливается в размер экрана. |
Далее обозначим xpos,ypos,xsize,ysize - значения, передаваемые |
в ebx,ecx. Координаты приводятся относительно левого верхнего |
угла окна, который, таким образом, задается как (0,0), координаты |
правого нижнего угла суть (xsize,ysize). |
* Размеры окна понимаются в смысле координат правого нижнего угла. |
Это же относится и ко всем остальным функциям. |
Это означает, что реальные размеры на 1 пиксель больше. |
* Вид окна стиля Y=1: |
* полностью определяется приложением |
* Вид окна со скином Y=3,4: |
* рисуется внешняя рамка шириной 1 пиксель |
цвета 'outer' из скина |
* рисуется промежуточная рамка шириной 3 пикселя |
цвета 'frame' из скина |
* рисуется внутренняя рамка шириной 1 пиксель |
цвета 'inner' из скина |
* рисуется заголовок (по картинкам из скина) в прямоугольнике |
(0,0) - (xsize,_skinh-1) |
* если ysize>=26, то закрашивается рабочая область окна - |
прямоугольник с левым верхним углом (5,_skinh) и правым нижним |
(xsize-5,ysize-5) - цветом, указанным в edx (с учетом градиента) |
* определяются две стандартные кнопки: закрытия и минимизации |
(смотри функцию 8) |
* если A=1 и в edi (ненулевой) указатель на строку заголовка, |
то она выводится в заголовке в месте, определяемом скином |
* Значение переменной _skinh доступно как результат вызова |
подфункции 4 функции 48 |
---------------------- Константы для регистров: ---------------------- |
eax - SF_CREATE_WINDOW (0) |
====================================================================== |
================= Функция 1 - поставить точку в окне. ================ |
====================================================================== |
Параметры: |
* eax = 1 - номер функции |
* ebx = x-координата (относительно окна) |
* ecx = y-координата (относительно окна) |
* edx = 0x00RRGGBB - цвет точки |
edx = 0x01xxxxxx - инвертировать цвет точки |
(младшие 24 бита игнорируются) |
Возвращаемое значение: |
* функция не возвращает значения |
---------------------- Константы для регистров: ---------------------- |
eax - SF_PUT_PIXEL (1) |
====================================================================== |
============== Функция 2 - получить код нажатой клавиши. ============= |
====================================================================== |
Забирает код нажатой клавиши из буфера. |
Параметры: |
* eax = 2 - номер функции |
Возвращаемое значение: |
* если буфер пуст, возвращается eax=1 |
* если буфер непуст, то возвращается al=0, ah=код нажатой клавиши, |
биты 16-23 содержат сканкод нажатой клавиши в режиме ASCII, |
в режиме сканкодов биты обнулены. |
биты 23-31 обнулены |
* если есть "горячая клавиша", то возвращается |
al=2, ah=сканкод нажатой клавиши (0 для управляющих клавиш), |
старшее слово регистра eax содержит состояние управляющих клавиш |
в момент нажатия горячей клавиши |
Замечания: |
* Существует общесистемный буфер нажатых клавиш размером 120 байт, |
организованный как очередь. |
* Существует ещё один общесистемный буфер на 120 "горячих клавиш". |
* При вызове этой функции приложением с неактивным окном |
считается, что буфер нажатых клавиш пуст. |
* По умолчанию эта функция возвращает ASCII-коды; переключиться на |
режим сканкодов (и назад) можно с использованием функции 66. |
Однако, горячие клавиши всегда возвращаются как сканкоды. |
* Узнать, какие комбинации клавиш соответствуют каким кодам, можно, |
запустив приложения keyascii и scancode. |
* Сканкоды возвращаются непосредственно клавиатурой и фиксированы; |
ASCII-коды получаются с использованием таблиц преобразования, |
которые можно установить подфункцией 2 функции 21 и прочитать |
подфункцией 2 функции 26. |
* Как следствие, ASCII-коды учитывают текущую раскладку клавиатуры |
(rus/en) в отличие от сканкодов. |
* Поступает информация только о тех горячих клавишах, которые были |
определены этим потоком подфункцией 4 функции 66. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_GET_KEY (2) |
====================================================================== |
================ Функция 3 - получить системное время. =============== |
====================================================================== |
Параметры: |
* eax = 3 - номер функции |
Возвращаемое значение: |
* eax = 0x00SSMMHH, где HH:MM:SS = часы:минуты:секунды |
* каждый элемент возвращается как BCD-число, например, |
для времени 23:59:59 результат будет 0x00595923 |
Замечания: |
* Смотри также подфункцию 9 функции 26 - получение времени |
с момента запуска системы; она во многих случаях удобнее, |
поскольку возвращает просто DWORD-значение счетчика времени. |
* Системное время можно установить функцией 22. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_GET_SYS_TIME (3) |
====================================================================== |
================ Функция 4 - нарисовать строку текста. =============== |
====================================================================== |
Параметры: |
* eax = 4 - номер функции |
* ebx = X*65536+Y, координаты в окне или буфере |
* ecx = 0xXXRRGGBB, где |
* RR, GG, BB задают цвет текста |
* XX=ABFFCSSS (биты): |
* A=1 - рисуемая строка заканчивается нулём |
* B=1 - закрашивать фон (цвет = edi) |
* FF задает шрифт и кодировку: |
0 = 6x9 cp866 |
1 = 8x16 cp866 |
2 = 8x16 UTF-16LE |
3 = 8x16 UTF-8 |
* C=0 - рисовать в окно, |
С=1 - рисовать в буфер (edi) |
* SSS = (множитель размера)-1, то-есть 0 = x1, 7 = x8 |
* edx = указатель на начало строки |
* esi = для A=0 длина строки, для A=1 игнорируется |
* edi = если B=1 - цвет для закраски фона, |
если C=1 - указатель на буфер |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Нельзя одновременно использовать B=1 и C=1, |
поскольку в обоих случаях используется регистр edi. |
* Если SSS=0, шрифт может сглаживаться, |
в зависимости от системной настройки. |
* Структура буфера: |
Xsize dd |
Ysize dd |
picture rb Xsize*Ysize*4 ; 32 бита |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DRAW_TEXT (4) |
====================================================================== |
========================= Функция 5 - пауза. ========================= |
====================================================================== |
Задерживает выполнение программы на заданное время. |
Параметры: |
* eax = 5 - номер функции |
* ebx = время в сотых долях секунды |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Передача ebx=0 не передает управление следующему процессу и |
вообще не производит никаких действий. Если действительно |
требуется передать управление следующему процессу |
(закончить текущий квант времени), используйте подфункцию 1 |
функции 68. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SLEEP (5) |
====================================================================== |
=============== Функция 7 - вывести изображение в окно. ============== |
====================================================================== |
Параметры: |
* eax = 7 - номер функции |
* ebx = указатель на изображение в формате BBGGRRBBGGRR... |
* ecx = [размер по оси x]*65536 + [размер по оси y] |
* edx = [координата по оси x]*65536 + [координата по оси y] |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Координаты изображения - это координаты верхнего левого угла |
изображения относительно окна. |
* Размер изображения в байтах есть 3*xsize*ysize. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_PUT_IMAGE (7) |
====================================================================== |
=============== Функция 8 - определить/удалить кнопку. =============== |
====================================================================== |
Параметры для определения кнопки: |
* eax = 8 - номер функции |
* ebx = [координата по оси x]*65536 + [размер по оси x] |
* ecx = [координата по оси y]*65536 + [размер по оси y] |
* edx = 0xXYnnnnnn, где: |
* nnnnnn = идентификатор кнопки |
* старший (31-й) бит edx сброшен |
* если 30-й бит edx установлен - не прорисовывать кнопку |
* если 29-й бит edx установлен - не рисовать рамку |
при нажатии на кнопку |
* esi = 0x00RRGGBB - цвет кнопки |
Параметры для удаления кнопки: |
* eax = 8 - номер функции |
* edx = 0x80nnnnnn, где nnnnnn - идентификатор кнопки |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Размеры кнопки должны быть больше 0 и меньше 0x8000. |
* Для окон со скином при определении окна (вызове 0-й функции) |
создаются две стандартные кнопки - закрытия окна |
с идентификатором 1 и минимизации окна с идентификатором 0xffff. |
* Создание двух кнопок с одинаковыми идентификаторами |
вполне допустимо. |
* Кнопка с идентификатором 0xffff при нажатии интерпретируется |
системой как кнопка минимизации, система обрабатывает такое |
нажатие самостоятельно, не обращаясь к приложению. |
В остальном это обычная кнопка. |
* Общее количество кнопок для всех приложений ограничено |
числом 4095. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DEFINE_BUTTON (8) |
====================================================================== |
============= Функция 9 - информация о потоке выполнения. ============ |
====================================================================== |
Параметры: |
* eax = 9 - номер функции |
* ebx = указатель на буфер размера 1 Кб |
* ecx = номер слота потока |
ecx = -1 - получить информацию о текущем потоке |
Возвращаемое значение: |
* eax = максимальный номер слота потока |
но, если указатель в ebx недопустимый, например, |
регион [ebx, ebx + 0x4C) пересекается с памятью ядра, |
то тогда функция возвращает -1 |
* буфер, на который указывает ebx, содержит следующую информацию: |
* +0: dword: использование процессора (сколько тактов в секунду |
уходит на исполнение именно этого потока) |
* +4: word: позиция окна потока в оконном стэке |
* +6: word: (не имеет отношения к запрошенному потоку) |
номер слота потока, окно которого находится в оконном стэке |
в позиции ecx |
* +8: word: зарезервировано |
* +10 = +0xA: 11 байт: имя процесса |
(имя запущенного файла - исполняемый файл без расширения) |
* +21 = +0x15: byte: зарезервировано, этот байт не изменяется |
* +22 = +0x16: dword: адрес процесса в памяти |
* +26 = +0x1A: dword: размер используемой памяти - 1 |
* +30 = +0x1E: dword: идентификатор (PID/TID) |
* +34 = +0x22: dword: координата окна потока по оси x |
* +38 = +0x26: dword: координата окна потока по оси y |
* +42 = +0x2A: dword: размер окна потока по оси x |
* +46 = +0x2E: dword: размер окна потока по оси y |
* +50 = +0x32: word: состояние слота потока: |
* 0 = поток выполняется |
* 1 = поток приостановлен |
* 2 = поток приостановлен в момент ожидания события |
* 3 = поток завершается в результате вызова функции -1 или |
насильственно как следствие вызова подфункции 2 функции 18 |
или завершения работы системы |
* 4 = поток завершается в результате исключения |
* 5 = поток ожидает события |
* 9 = запрошенный слот свободен, вся остальная информация о |
слоте не имеет смысла |
* +52 = +0x34: word: зарезервировано, это слово не изменяется |
* +54 = +0x36: dword: координата начала клиентской области |
по оси x |
* +58 = +0x3A: dword: координата начала клиентской области |
по оси y |
* +62 = +0x3E: dword: ширина клиентской области |
* +66 = +0x42: dword: высота клиентской области |
* +70 = +0x46: byte: состояние окна - битовое поле |
* бит 0 (маска 1): окно максимизировано |
* бит 1 (маска 2): окно минимизировано в панель задач |
* бит 2 (маска 4): окно свёрнуто в заголовок |
* +71 = +0x47: dword: маска событий |
* +75 = +0x4B: byte: режим ввода с клавиатуры(ASCII = 0; SCAN = 1) |
Замечания: |
* Слоты нумеруются с 1. |
* Возвращаемое значение не есть общее число потоков, поскольку |
бывают свободные слоты. |
* При создании процесса автоматически создается поток выполнения. |
* Функция выдает информацию о потоке. Каждый процесс имеет |
хотя бы один поток. Один процесс может создать несколько потоков, |
в этом случае каждый поток получает свой слот, причем поля |
+10, +22, +26 в этих слотах совпадают. |
Для приложений не существует общего способа определить, |
принадлежат ли два потока одному процессу. |
* Активное окно - окно, находящееся на вершине оконного стэка, |
оно получает сообщения о вводе с клавиатуры. Для него позиция в |
оконном стэке совпадает с возвращаемым значением. |
* Слот 1 соответствует специальному потоку операционной системы, |
для которого: |
* окно находится внизу оконного стэка, поля +4 и +6 содержат |
значение 1 |
* имя процесса - "OS/IDLE" (дополненное пробелами) |
* адрес процесса в памяти равен 0, размер используемой памяти |
16 Mb (0x1000000) |
* PID=1 |
* координаты и размеры окна, равно как и клиентской области, |
условно полагаются равными 0 |
* состояние слота - всегда 0 (выполняется) |
* время выполнения складывается из времени, уходящего на |
собственно работу, и времени простоя в ожидании прерывания |
(которое можно получить вызовом подфункции 4 функции 18). |
* Начиная со слота 2, размещаются обычные приложения. |
* Обычные приложения размещаются в памяти по адресу 0 |
(константа ядра std_application_base_address). |
Наложения не происходит, поскольку у каждого процесса своя |
таблица страниц. |
* При создании потока ему назначаются слот в системной таблице и |
идентификатор (Process/Thread IDentifier = PID/TID), которые для |
заданного потока не изменяются со временем. |
После завершения потока его слот может быть заново использован |
для другого потока. Идентификатор потока не может быть назначен |
другому потоку даже после завершения первого. |
Назначаемые новым потокам идентификаторы монотонно растут. |
* Если поток еще не определил свое окно вызовом функции 0, то |
положение и размеры этого окна полагаются нулями. |
* Координаты клиентской области окна берутся относительно окна. |
* В данный момент используется только часть буфера размером |
76 = 0x4C байта. Тем не менее рекомендуется использовать буфер |
размером 1 Кб для будущей совместимости, в будущем могут быть |
добавлены некоторые поля. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_THREAD_INFO (9) |
====================================================================== |
==================== Функция 10 - ожидать события. =================== |
====================================================================== |
Если очередь сообщений пуста, то ждет появления сообщения в очереди. |
В таком состоянии поток не получает процессорного времени. |
Затем считывает сообщение из очереди. |
Параметры: |
* eax = 10 - номер функции |
Возвращаемое значение: |
* eax = событие (смотри список событий) |
Замечания: |
* Учитываются только те события, которые входят в маску, |
устанавливаемую функцией 40. По умолчанию это события |
перерисовки, нажатия на клавиши и на кнопки. |
* Для проверки, есть ли сообщение в очереди, используйте функцию 11. |
Чтобы ждать не более определенного времени, используйте |
функцию 23. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_WAIT_EVENT (10) |
====================================================================== |
======= Функция 11 - проверить, есть ли событие, без ожидания. ======= |
====================================================================== |
Если в очереди сообщений есть какое-то событие, то считывает и |
возвращает его. Если очередь пуста, возвращает нуль. |
Параметры: |
* eax = 11 - номер функции |
Возвращаемое значение: |
* eax = 0 - очередь сообщений пуста |
* иначе eax = событие (смотри список событий) |
Замечания: |
* Учитываются только те события, которые входят в маску, |
устанавливаемую функцией 40. По умолчанию это события |
перерисовки, нажатия на клавиши и на кнопки. |
* Для ожидания появления события в очереди, используйте функцию 10. |
Чтобы ждать не более определенного времени, используйте |
функцию 23. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_CHECK_EVENT (11) |
====================================================================== |
=========== Функция 12 - начать/закончить перерисовку окна. ========== |
====================================================================== |
-------------- Подфункция 1 - начать перерисовку окна. --------------- |
Параметры: |
* eax = 12 - номер функции |
* ebx = 1 - номер подфункции |
Возвращаемое значение: |
* функция не возвращает значения |
------------- Подфункция 2 - закончить перерисовку окна. ------------- |
Параметры: |
* eax = 12 - номер функции |
* ebx = 2 - номер подфункции |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Функция начала перерисовки удаляет все определённые |
функцией 8 кнопки, их следует определить повторно. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_REDRAW (12) |
ebx - SSF_BEGIN_DRAW (1), SSF_END_DRAW (2) |
====================================================================== |
============ Функция 13 - нарисовать прямоугольник в окне. =========== |
====================================================================== |
Параметры: |
* eax = 13 - номер функции |
* ebx = [координата по оси x]*65536 + [размер по оси x] |
* ecx = [координата по оси y]*65536 + [размер по оси y] |
* edx = цвет 0xRRGGBB или 0x80RRGGBB для градиентной заливки |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Под координатами понимаются координаты левого верхнего угла |
прямоугольника относительно окна. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DRAW_RECT (13) |
====================================================================== |
================ Функция 14 - получить размеры экрана. =============== |
====================================================================== |
Параметры: |
* eax = 14 - номер функции |
Возвращаемое значение: |
* eax = [xsize]*65536 + [ysize], где |
* xsize = x-координата правого нижнего угла экрана = |
размер по горизонтали - 1 |
* ysize = y-координата правого нижнего угла экрана = |
размер по вертикали - 1 |
Замечания: |
* Смотри также подфункцию 5 функции 48 - получить размеры рабочей |
области экрана. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_GET_SCREEN_SIZE (14) |
====================================================================== |
= Функция 15, подфункция 1 - установить размер фонового изображения. = |
====================================================================== |
Параметры: |
* eax = 15 - номер функции |
* ebx = 1 - номер подфункции |
* ecx = ширина изображения |
* edx = высота изображения |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Вызов функции обязателен перед вызовом подфункций 2 и 5. |
* Для обновления экрана (после завершения серии команд, работающих с |
фоном) вызывайте подфункцию 3 перерисовки фона. |
* Есть парная функция получения размеров фонового изображения - |
подфункция 1 функции 39. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_SIZE_BG (1) |
====================================================================== |
= Функция 15, подфункция 2 - поставить точку на фоновом изображении. = |
====================================================================== |
Параметры: |
* eax = 15 - номер функции |
* ebx = 2 - номер подфункции |
* ecx = смещение |
* edx = цвет точки 0xRRGGBB |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Смещение для точки с координатами (x,y) вычисляется как |
(x+y*xsize)*3. |
* Если указанное смещение превышает установленный подфункцией 1 |
размер, вызов игнорируется. |
* Для обновления экрана (после завершения серии команд, работающих с |
фоном) вызывайте подфункцию 3 перерисовки фона. |
* Есть парная функция получения точки с фонового изображения - |
подфункция 2 функции 39. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_PIXEL_BG (2) |
====================================================================== |
============ Функция 15, подфункция 3 - перерисовать фон. ============ |
====================================================================== |
Параметры: |
* eax = 15 - номер функции |
* ebx = 3 - номер подфункции |
Возвращаемое значение: |
* функция не возвращает значения |
---------------------- Константы для регистров: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_REDRAW_BG (3) |
====================================================================== |
===== Функция 15, подфункция 4 - установить режим отрисовки фона. ==== |
====================================================================== |
Параметры: |
* eax = 15 - номер функции |
* ebx = 4 - номер подфункции |
* ecx = режим отрисовки: |
* 1 = замостить |
* 2 = растянуть |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Для обновления экрана (после завершения серии команд, работающих с |
фоном) вызывайте подфункцию 3 перерисовки фона. |
* Есть парная команда получения режима отрисовки фона - |
подфункция 4 функции 39. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_MODE_BG (4) |
====================================================================== |
===== Функция 15, подфункция 5 - поместить блок пикселей на фон. ===== |
====================================================================== |
Параметры: |
* eax = 15 - номер функции |
* ebx = 5 - номер подфункции |
* ecx = указатель на данные в формате BBGGRRBBGGRR... |
* edx = смещение в данных фонового изображения |
* esi = размер данных в байтах = 3 * число пикселей |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Проверки корректности смещения и размера не производится. |
* Цвет каждого пикселя хранится как 3-байтная величина BBGGRR. |
* Пиксели фонового изображения записываются последовательно |
слева направо, сверху вниз. |
* Смещение пикселя с координатами (x,y) есть (x+y*xsize)*3. |
* Для обновления экрана (после завершения серии команд, работающих с |
фоном) вызывайте подфункцию 3 перерисовки фона. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_IMAGE_BG (5) |
====================================================================== |
====================== Функция 15, подфункция 6 ====================== |
==== Спроецировать данные фона на адресное пространство процесса. ==== |
====================================================================== |
Параметры: |
* eax = 15 - номер функции |
* ebx = 6 - номер подфункции |
Возвращаемое значение: |
* eax = указатель на данные фона, 0 при ошибке |
Замечания: |
* Спроецированные данные доступны на чтение и запись. |
* Размер данных фона равен 3*xsize*ysize. Изменение размеров фона |
блокируется на время работы с спроецированными данными. |
* Цвет каждого пикселя хранится как 3-байтовая величина BBGGRR. |
* Пиксели фонового изображения записываются последовательно |
слева направо, сверху вниз. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_MAP_BG (6) |
====================================================================== |
====================== Функция 15, подфункция 7 ====================== |
=== Закрыть проекцию данных фона на адресное пространство процесса. == |
====================================================================== |
Параметры: |
* eax = 15 - номер функции |
* ebx = 7 - номер подфункции |
* ecx = указатель на данные фона |
Возвращаемое значение: |
* eax = 1 при успехе, 0 при ошибке |
---------------------- Константы для регистров: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_UNMAP_BG (7) |
====================================================================== |
====================== Функция 15, подфункция 8 ====================== |
=========== Получить координаты последней отрисовки фона. ============ |
====================================================================== |
Параметры: |
* eax = 15 - номер функции |
* ebx = 8 - номер подфункции |
Возвращаемое значение: |
* eax = [left]*65536 + [right] |
* ebx = [top]*65536 + [bottom] |
Замечания: |
* (left,top) - координаты левого верхнего угла, |
(right,bottom) - координаты правого нижнего. |
* Для получения более достоверных сведений, необходимо вызвать |
функцию сразу после получения события: |
5 = завершилась перерисовка фона рабочего стола |
---------------------- Константы для регистров: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_LAST_DRAW (8) |
====================================================================== |
====================== Функция 15, подфункция 9 ====================== |
=============== Перерисовать прямоугольную часть фона. =============== |
====================================================================== |
Параметры: |
* eax = 15 - номер функции |
* ebx = 9 - номер подфункции |
* ecx = [left]*65536 + [right] |
* edx = [top]*65536 + [bottom] |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* (left,top) - координаты левого верхнего угла, |
(right,bottom) - координаты правого нижнего. |
* Если параметры установлены некорректно - фон не перерисовывается. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_REDRAW_RECT (9) |
====================================================================== |
============= Функция 16 - сохранить рамдиск на дискету. ============= |
====================================================================== |
Параметры: |
* eax = 16 - номер функции |
* ebx = 1 или ebx = 2 - на какую дискету сохранять |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = 1 - ошибка |
---------------------- Константы для регистров: ---------------------- |
eax - SF_RD_TO_FLOPPY (16) |
====================================================================== |
============== Функция 17 - получить код нажатой кнопки. ============= |
====================================================================== |
Забирает код нажатой кнопки из буфера. |
Параметры: |
* eax = 17 - номер функции |
Возвращаемое значение: |
* если буфер пуст, возвращается eax=1 |
* если буфер непуст: |
* старшие 24 бита eax содержат идентификатор кнопки |
(в частности, в ah оказывается младший байт идентификатора; |
если все кнопки имеют идентификатор, меньший 256, |
то для различения достаточно ah) |
* al = 0 - кнопка была нажата левой кнопкой мыши |
* al = бит, соответствующий нажавшей кнопке мыши, если не левой |
Замечания: |
* "Буфер" хранит только одну кнопку, при нажатии новой кнопки |
информация о старой теряется. |
* При вызове этой функции приложением с неактивным окном |
возвращается ответ "буфер пуст". |
* Возвращаемое значение al соответствует состоянию кнопок мыши |
в формате подфункции 2 функции 37 в момент начала нажатия |
на кнопку, за исключением младшего бита (соответствующего левой |
кнопке мыши), который сбрасывается. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_GET_BUTTON (17) |
====================================================================== |
= Функция 18, подфункция 1 - сделать самым нижним окно потока. ======= |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 1 - номер подфункции |
* ecx = номер слота потока |
Возвращаемое значение: |
* функция не возвращает значения |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_UNFOCUS_WINDOW (1) |
====================================================================== |
==== Функция 18, подфункция 2 - завершить процесс/поток по слоту. ==== |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 2 - номер подфункции |
* ecx = номер слота процесса/потока |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Нельзя завершить поток операционной системы OS/IDLE (номер слота |
1), можно завершить любой обычный поток/процесс. |
* Смотри также подфункцию 18 - завершение |
процесса/потока с заданным идентификатором. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_TERMINATE_THREAD (2) |
====================================================================== |
= Функция 18, подфункция 3 - сделать активным окно заданного потока. = |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 3 - номер подфункции |
* ecx = номер слота потока |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* При указании корректного, но несуществующего слота активизируется |
какое-то окно. |
* Узнать, какое окно является активным, можно вызовом подфункции 7. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_FOCUS_WINDOW (3) |
====================================================================== |
Функция 18, подфункция 4 - получить счётчик пустых тактов в секунду. |
====================================================================== |
Под пустыми тактами понимается время, в которое процессор простаивает |
в ожидании прерывания (в инструкции hlt). |
Параметры: |
* eax = 18 - номер функции |
* ebx = 4 - номер подфункции |
Возвращаемое значение: |
* eax = значение счётчика пустых тактов в секунду |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_GET_IDLE_COUNT (4) |
====================================================================== |
======== Функция 18, подфункция 5 - получить тактовую частоту. ======= |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 5 - номер подфункции |
Возвращаемое значение: |
* eax = тактовая частота (по модулю 2^32 тактов = 4ГГц) |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_GET_CPU_FREQUENCY (5) |
====================================================================== |
Функция 18, подфункция 6 - сохранить рамдиск в файл на жёстком диске. |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 6 - номер подфункции |
* ecx = указатель на строку с полным именем файла |
(например, "/hd0/1/kolibri/kolibri.img") |
Возвращаемое значение: |
* eax = 0 - успешно |
* иначе eax = код ошибки файловой системы |
Замечания: |
* Все папки в указанном пути должны существовать, иначе вернётся |
значение 5, "файл не найден". |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_RD_TO_HDD (6) |
====================================================================== |
====== Функция 18, подфункция 7 - получить номер активного окна. ===== |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 7 - номер подфункции |
Возвращаемое значение: |
* eax = номер активного окна (номер слота потока, окно которого |
активно) |
Замечания: |
* Активное окно находится вверху оконного стэка и получает |
сообщения обо всём вводе с клавиатуры. |
* Сделать окно активным можно вызовом подфункции 3. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_GET_ACTIVE_WINDOW (7) |
====================================================================== |
==== Функция 18, подфункция 8 - отключить/разрешить звук спикера. ==== |
====================================================================== |
При отключённом звуке вызовы подфункции 55 функции 55 игнорируются. |
При включённом - направляются на встроенный спикер. |
--------------- Подподфункция 1 - получить состояние. ---------------- |
Параметры: |
* eax = 18 - номер функции |
* ebx = 8 - номер подфункции |
* ecx = 1 - номер подподфункции |
Возвращаемое значение: |
* eax = 0 - звук спикера разрешён; 1 - запрещён |
-------------- Подподфункция 2 - переключить состояние. -------------- |
Переключает состояния разрешения/запрещения. |
Параметры: |
* eax = 18 - номер функции |
* ebx = 8 - номер подфункции |
* ecx = 2 - номер подподфункции |
Возвращаемое значение: |
* функция не возвращает значения |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_SPEAKER (8) |
ecx - SSSF_GET_STATE (1), SSSF_TOGGLE (2) |
====================================================================== |
= Функция 18, подфункция 9 - завершение работы системы с параметром. = |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 9 - номер подфункции |
* ecx = параметр: |
* 2 = выключить компьютер |
* 3 = перезагрузить компьютер |
* 4 = перезапустить ядро из файла kernel.mnt на рамдиске |
Возвращаемое значение: |
* при неверном ecx регистры не меняются (т.е. eax=18) |
* при правильном вызове всегда возвращается признак успеха eax=0 |
Замечания: |
* Не следует полагаться на возвращаемое значение при неверном |
вызове, оно может измениться в последующих версиях ядра. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_SHUTDOWN (9) |
====================================================================== |
========= Функция 18, подфункция 10 - свернуть активное окно. ======== |
====================================================================== |
Сворачивает активное окно. |
Параметры: |
* eax = 18 - номер функции |
* ebx = 10 - номер подфункции |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Минимизированное окно с точки зрения функции 9 сохраняет положение |
и размеры. |
* Восстановление окна приложения происходит при активизировании |
подфункцией 3. |
* Обычно нет необходимости явно сворачивать/разворачивать своё окно: |
сворачивание окна осуществляется системой при нажатии на кнопку |
минимизации (которая для окон со скином определяется автоматически |
функцией 0, для окон без скина её можно определить функцией 8), |
восстановление - приложением @taskbar. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_MINIMIZE_WINDOW (10) |
====================================================================== |
====================== Функция 18, подфункция 11 ===================== |
============= Получить информацию о дисковой подсистеме. ============= |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 11 - номер подфункции |
* ecx = тип таблицы: |
* 1 = короткая версия, 16 байт |
* edx = указатель на буфер (в приложении) для таблицы |
Возвращаемое значение: |
* функция не возвращает значения |
Формат таблицы: короткая версия: |
* +0: byte: информация о НГМД (дисководах для дискет), AAAABBBB, |
где AAAA задаёт тип первого дисковода, BBBB - второго согласно |
следующему списку: |
* 0 = нет дисковода |
* 1 = 360Kb, 5.25'' |
* 2 = 1.2Mb, 5.25'' |
* 3 = 720Kb, 3.5'' |
* 4 = 1.44Mb, 3.5'' |
* 5 = 2.88Mb, 3.5'' (такие дискеты сейчас уже не используются) |
Например, для стандартной конфигурации из одного 1.44-дисковода |
здесь будет 40h, а для случая 1.2Mb на A: и 1.44Mb на B: |
значение оказывается 24h. |
Первый контроллер IDE: |
* +1: byte: информация о жёстких дисках и CD-приводах, AABBCCDD, |
где AA соответствует контроллеру IDE0, ..., DD - IDE3: |
* 0 = устройство отсутствует |
* 1 = жёсткий диск |
* 2 = CD-привод |
Например, в случае HD на IDE0 и CD на IDE2 здесь будет 48h. |
* +2: 4 db: число найденных разделов на жёстких дисках с |
соответственно IDE0,...,IDE3. |
Второй контроллер IDE: |
* +6: byte: информация о жёстких дисках и CD-приводах, AABBCCDD |
где AA соответствует контроллеру IDE4, ..., DD - IDE7: |
* 0 = устройство отсутствует |
* 1 = жёсткий диск |
* 2 = CD-привод |
Например, в случае HD на IDE4 и CD на IDE6 здесь будет 48h. |
* +7: 4 db: число найденных разделов на жёстких дисках с |
соответственно IDE4,...,IDE7. |
Третий контроллер IDE: |
* +11: byte: информация о жёстких дисках и CD-приводах, AABBCCDD |
где AA соответствует контроллеру IDE8, ..., DD - IDE11: |
* 0 = устройство отсутствует |
* 1 = жёсткий диск |
* 2 = CD-привод |
Например, в случае HD на IDE8 и CD на IDE10 здесь будет 48h. |
* +12: 4 db: число найденных разделов на жёстких дисках с |
соответственно IDE8,...,IDE11. |
При отсутствии жёсткого диска на IDEx соответствующий байт |
нулевой, при наличии показывает число распознанных разделов, |
которых может и не быть (если носитель не отформатирован или |
если файловая система не поддерживается). В текущей версии ядра |
для жёстких дисков поддерживаются только FAT12/16/32, NTFS, |
ext2/3/4 и XFS. |
Замечания: |
* Таблица может быть использована для получения информации |
об имеющихся устройствах. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_INFO_DISC_SYS (11) |
====================================================================== |
========== Функция 18, подфункция 13 - получить версию ядра. ========= |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 13 - номер подфункции |
* ecx = указатель на буфер (не менее 16 байт), куда будет помещена |
информация |
Возвращаемое значение: |
* функция не возвращает значения |
но, если указатель в ecx недопустимый, например, |
регион [ecx, ecx + 9) пересекается с памятью ядра, |
то тогда функция возвращает -1 |
Замечания: |
* В данный момент используется только часть буфера размером |
9 байт. Тем не менее рекомендуется использовать буфер |
размером 16 байт для будущей совместимости, в будущем могут быть |
добавлены некоторые поля. |
Структура буфера: |
db a,b,c,d для версии a.b.c.d |
db 0: зарезервировано |
dd REV - номер svn-ревизии ядра |
Для ядра Kolibri 0.7.7.0+: |
db 0,7,7,0 |
db 0 |
dd 1675 |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_KERNEL_VERSION (13) |
====================================================================== |
====================== Функция 18, подфункция 14 ===================== |
======= Ожидать начала обратного хода луча развёртки монитора. ======= |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 14 - номер подфункции |
Возвращаемое значение: |
* eax = 0 как признак успеха |
Замечания: |
* Функция предназначена исключительно для активных |
высокопроизводительных графических приложений; используется для |
плавного вывода графики. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_WAIT_RETRACE (14) |
====================================================================== |
== Функция 18, подфункция 15 - поместить курсор мыши в центр экрана. = |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 15 - номер подфункции |
Возвращаемое значение: |
* eax = 0 как признак успеха |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_CURSOR_CENTER (15) |
====================================================================== |
====================== Функция 18, подфункция 16 ===================== |
============ Получить размер свободной оперативной памяти. =========== |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 16 - номер подфункции |
Возвращаемое значение: |
* eax = размер свободной памяти в килобайтах |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_GET_FREE_RAM (16) |
====================================================================== |
====================== Функция 18, подфункция 17 ===================== |
============ Получить размер имеющейся оперативной памяти. =========== |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 17 - номер подфункции |
Возвращаемое значение: |
* eax = общий размер имеющейся памяти в килобайтах |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_GET_TOTAL_RAM (17) |
====================================================================== |
====================== Функция 18, подфункция 18 ===================== |
============= Завершить процесс/поток по идентификатору. ============= |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 18 - номер подфункции |
* ecx = идентификатор процесса/потока (PID/TID) |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = -1 - ошибка (процесс не найден или является системным) |
Замечания: |
* Нельзя завершить поток операционной системы OS/IDLE (номер слота |
1), можно завершить любой обычный поток/процесс. |
* Смотри также подфункцию 2 - завершение |
процесса/потока по заданному слоту. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_TERMINATE_THREAD_ID (18) |
====================================================================== |
=== Функция 18, подфункция 19 - получить/установить настройки мыши. == |
====================================================================== |
------------- Подподфункция 0 - получить скорость мыши. -------------- |
Параметры: |
* eax = 18 - номер функции |
* ebx = 19 - номер подфункции |
* ecx = 0 - номер подподфункции |
Возвращаемое значение: |
* eax = текущий делитель скорости |
------------ Подподфункция 1 - установить скорость мыши. ------------- |
Параметры: |
* eax = 18 - номер функции |
* ebx = 19 - номер подфункции |
* ecx = 1 - номер подподфункции |
* edx = новое значение делителя скорости |
Возвращаемое значение: |
* функция не возвращает значения |
Замечание: рекомендуемый делитель скорости = 4 |
---------- Подподфункция 2 - получить чувствительность мыши ---------- |
Параметры: |
* eax = 18 - номер функции |
* ebx = 19 - номер подфункции |
* ecx = 2 - номер подподфункции |
Возвращаемое значение: |
* eax = текущий коэффициент чувствительности |
--------- Подподфункция 3 - установить чувствительность мыши --------- |
Параметры: |
* eax = 18 - номер функции |
* ebx = 19 - номер подфункции |
* ecx = 3 - номер подподфункции |
* edx = новое значение коэффициента чувствительности |
Возвращаемое значение: |
* функция не возвращает значения |
Замечание: рекомендуемый коэффициент чувствительности = 3 |
-------- Подподфункция 4 - установить положение курсора мыши. -------- |
Параметры: |
* eax = 18 - номер функции |
* ebx = 19 - номер подфункции |
* ecx = 4 - номер подподфункции |
* edx = [координата по оси x]*65536 + [координата по оси y] |
Возвращаемое значение: |
* функция не возвращает значения |
------- Подподфункция 5 - симулировать состояние клавиш мыши. -------- |
Параметры: |
* eax = 18 - номер функции |
* ebx = 19 - номер подфункции |
* ecx = 5 - номер подподфункции |
* edx = информация о эмулируемом состоянии кнопок мыши: |
(соответствует возвращаемому значению подфункции 2 функции 37) |
* бит 0 установлен = левая кнопка нажата |
* бит 1 установлен = правая кнопка нажата |
* бит 2 установлен = средняя кнопка нажата |
* бит 3 установлен = 4-я кнопка нажата |
* бит 4 установлен = 5-я кнопка нажата |
Возвращаемое значение: |
* функция не возвращает значения |
-------- Подподфункция 6 - получить задержку двойного щелчка. -------- |
Параметры: |
* eax = 18 - номер функции |
* ebx = 19 - номер подфункции |
* ecx = 6 - номер подподфункции |
Возвращаемое значение: |
* eax = текущая задержка двойного щелчка (100 = секунда) |
------- Подподфункция 7 - установить задержку двойного щелчка. ------- |
Параметры: |
* eax = 18 - номер функции |
* ebx = 19 - номер подфункции |
* ecx = 7 - номер подподфункции |
* dl = новое значение задержки двойного щелчка (100 = секунда) |
Возвращаемое значение: |
* функция не возвращает значения |
Замечание: настройки мыши можно регулировать в приложении mouse_cfg. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_MOUSE_SETTINGS (19) |
ecx - SSSF_GET_SPEED (0), SSSF_SET_SPEED (1), SSSF_GET_SPEEDUP (2), |
SSSF_SET_SPEEDUP (3), SSSF_SET_POS (4), SSSF_SET_BUTTON (5), |
SSSF_GET_DOUBLE_CLICK_DELAY (6), SSSF_SET_DOUBLE_CLICK_DELAY (7) |
====================================================================== |
====================== Функция 18, подфункция 20 ===================== |
============= Получить информацию об оперативной памяти. ============= |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 20 - номер подфункции |
* ecx = указатель на буфер для информации (36 байт) |
Возвращаемое значение: |
* eax = общий размер имеющейся оперативной памяти в байтах |
или -1 в случае ошибки |
* буфер, на который указывает ecx, содержит следующую информацию: |
* +0: dword: общий размер имеющейся оперативной памяти в страницах |
* +4: dword: размер свободной оперативной памяти в страницах |
* +8: dword: число страничных ошибок (исключений #PF) |
в приложениях |
* +12: dword: размер кучи ядра в байтах |
* +16: dword: размер свободной памяти в куче ядра в байтах |
* +20: dword: общее количество блоков памяти в куче ядра |
* +24: dword: количество свободных блоков памяти в куче ядра |
* +28: dword: размер наибольшего свободного блока в куче ядра |
(зарезервировано) |
* +32: dword: размер наибольшего выделенного блока в куче ядра |
(зарезервировано) |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_GET_RAM_INFO (20) |
====================================================================== |
====================== Функция 18, подфункция 21 ===================== |
======= Получить номер слота процесса/потока по идентификатору. ====== |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 21 - номер подфункции |
* ecx = идентификатор процесса/потока (PID/TID) |
Возвращаемое значение: |
* eax = 0 - ошибка (неверный идентификатор) |
* иначе eax = номер слота |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_GET_THREAD_SLOT (21) |
====================================================================== |
Функция 18, подфункция 22 - операции с окном другого процесса/потока. |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 22 - номер подфункции |
* ecx = тип операции: |
* 0 = минимизация окна, поток задан номером слота |
* 1 = минимизация окна, поток задан идентификатором |
* 2 = восстановление окна, поток задан номером слота |
* 3 = восстановление окна, поток задан идентификатором |
* edx = параметр операции (номер слота или PID/TID) |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = -1 - ошибка (неправильный параметр) |
Замечания: |
* Поток может свернуть своё окно вызовом подфункции 10. |
* Восстановление окна с одновременной активизацией осуществляется |
подфункции 3 (принимающей номер слота). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_FOREIGN_WINDOW (22) |
ecx - SSSF_MINIMIZE (0), SSSF_MINIMIZE_ID (1), SSSF_RESTORE (2), |
SSSF_RESTORE_ID (3) |
====================================================================== |
======= Функция 18, подфункция 23 - минимизировать все окна. ========= |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 23 - номер подфункции |
Возвращаемое значение: |
* eax = 0 - все окна были минимизированы до вызова функции |
* eax = N - количество окон свернутых функцией |
Замечания: |
* Окна спец. потоков (имя начинается с символа @) не сворачиваются. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_MINIMIZE_ALL (23) |
====================================================================== |
===== Функция 18, подфункция 24 - установить пределы отрисовки. ====== |
====================================================================== |
Параметры: |
* eax = 18 - номер функции |
* ebx = 24 - номер подфункции |
* ecx = новый размер по X |
* edx = новый размер по Y |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Функция не меняет физический размер видеорежима. Она предназначена |
для нестандартных дисплеев, отображающих изображение частично. |
* Размеры указываемые в функции не должны превышать размеры текущего |
видеорежима, иначе функция ничего не изменит. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_SET_SCREEN_LIMITS (24) |
====================================================================== |
===================== Функция 18, подфункция 25 ====================== |
======== Управление положением окна относительно других окон. ======== |
====================================================================== |
------------- Подподфункция 1 - получить положение ------------------ |
Параметры: |
* eax = 18 - номер функции |
* ebx = 25 - номер подфункции |
* ecx = 1 - номер подподфункции |
* edx = -1(для текущего окна) или PID приложения |
Возвращаемое значение: |
* eax = одна из констант положения окна |
------------- Подподфункция 2 - установить положение ---------------- |
Параметры: |
* eax = 18 - номер функции |
* ebx = 25 - номер подфункции |
* ecx = 2 - номер подподфункции |
* edx = -1(для текущего окна) или PID приложения |
* esi = новое положение окна (одна из констант ниже) |
Возвращаемое значение: |
* eax = 0 - неудача |
* eax = 1 - успех |
Константы положения окна относительно других окон: |
ZPOS_DESKTOP = -2 - на самом заднем плане |
ZPOS_ALWAYS_BACK = -1 - позади всех окон |
ZPOS_NORMAL = 0 - обычное |
ZPOS_ALWAYS_TOP = 1 - поверх всех окон |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_WINDOW_BEHAVIOR (25) |
ecx - SSSF_GET_WB (1), SSSF_SET_WB (2) |
====================================================================== |
==================== Функция 20 - интерфейс MIDI. ==================== |
====================================================================== |
------------------------ Подфункция 1 - сброс ------------------------ |
Параметры: |
* eax = 20 - номер функции |
* ebx = 1 - номер подфункции |
-------------------- Подфункция 2 - вывести байт --------------------- |
Параметры: |
* eax = 20 - номер функции |
* ebx = 2 - номер подфункции |
* cl = байт для вывода |
Возвращаемое значение (одинаково для обеих подфункций): |
* eax = 0 - успешно |
* eax = 1 - не определён базовый порт |
Замечания: |
* Предварительно должен быть определён базовый порт вызовом |
подфункции 1 функции 21. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_MIDI (20) |
ebx - SSF_RESET (1), SSF_OUTPUT (2) |
====================================================================== |
==== Функция 21, подфункция 1 - установить базовый порт MPU MIDI. ==== |
====================================================================== |
Параметры: |
* eax = 21 - номер функции |
* ebx = 1 - номер подфункции |
* ecx = номер базового порта |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = -1 - ошибочный номер порта |
Замечания: |
* Номер порта должен удовлетворять условиям 0x100<=ecx<=0xFFFF. |
* Установка базы нужна для работы функции 20. |
* Получить установленный базовый порт можно вызовом |
подфункции 1 функции 26. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM_SET (21) |
ebx - SSF_MPU_MIDI_BASE (1) |
====================================================================== |
===== Функция 21, подфункция 2 - установить раскладку клавиатуры. ==== |
====================================================================== |
Раскладка клавиатуры используется для преобразования сканкодов, |
поступающих от клавиатуры, в ASCII-коды, считываемые функцией 2. |
Параметры: |
* eax = 21 - номер функции |
* ebx = 2 - номер подфункции |
* ecx = какую раскладку устанавливать: |
* 1 = нормальную |
* 2 = раскладку при нажатом Shift |
* 3 = раскладку при нажатом Alt |
* edx = указатель на раскладку - таблицу длиной 128 байт |
Или: |
* ecx = 9 |
* dx = идентификатор страны (1=eng, 2=fi, 3=ger, 4=rus) |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = 1 - параметр задан неверно |
Замечания: |
* Если нажат Alt, то используется раскладка с Alt; |
если не нажат Alt, но нажат Shift, то |
используется раскладка с Shift; |
если не нажаты Alt и Shift, но нажат Ctrl, то используется |
нормальная раскладка, после чего из кода вычитается 0x60; |
если не нажата ни одна из управляющих клавиш, то используется |
нормальная раскладка. |
* Получить раскладки и идентификатор страны можно с помощью |
подфункции 2 функции 26. |
* Идентификатор страны - глобальная системная переменная, которая |
самим ядром не используется; однако приложение @taskbar отображает |
соответствующую текущей стране иконку. |
* Приложение @taskbar переключает раскладки по запросу пользователя. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM_SET (21) |
ebx - SSF_KEYBOARD_LAYOUT (2) |
====================================================================== |
========= Функция 21, подфункция 5 - установить язык системы. ======== |
====================================================================== |
Параметры: |
* eax = 21 - номер функции |
* ebx = 5 - номер подфункции |
* ecx = язык системы (1=eng, 2=fi, 3=ger, 4=rus) |
Возвращаемое значение: |
* eax = 0 |
Замечания: |
* Язык системы - глобальная системная переменная, никак |
не используемая самим ядром, однако приложение @taskbar рисует |
соответствующую иконку. |
* Проверок на корректность не делается, поскольку ядро эту |
переменную не использует. |
* Получить язык системы можно вызовом подфункции 5 функции 26. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM_SET (21) |
ebx - SSF_SYS_LANG (5) |
====================================================================== |
====================== Функция 21, подфункция 11 ===================== |
=========== Разрешить/запретить низкоуровневый доступ к HD. ========== |
====================================================================== |
Параметры: |
* eax = 21 - номер функции |
* ebx = 11 - номер подфункции |
* ecx = 0/1 - запретить/разрешить |
Возвращаемое значение: |
* eax = 0 |
Замечания: |
* Используется при LBA-чтении (подфункция 8 функции 58). |
* Текущая реализация использует только младший бит ecx. |
* Получить текущее состояние можно вызовом подфункции 11 функции 26. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM_SET (21) |
ebx - SSF_ACCESS_HD_LBA (11) |
====================================================================== |
====================== Функция 21, подфункция 12 ===================== |
========== Разрешить/запретить низкоуровневый доступ к PCI. ========== |
====================================================================== |
Параметры: |
* eax = 21 - номер функции |
* ebx = 12 - номер подфункции |
* ecx = 0/1 - запретить/разрешить |
Возвращаемое значение: |
* eax = 0 |
Замечания: |
* Используется при работе с шиной PCI (функция 62). |
* Текущая реализация использует только младший бит ecx. |
* Получить текущее состояние можно вызовом подфункции 12 функции 26. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM_SET (21) |
ebx - SSF_ACCESS_PCI (12) |
====================================================================== |
============ Функция 22 - установить системную дату/время. =========== |
====================================================================== |
Параметры: |
* eax = 22 - номер функции |
* ebx = 0 - установить время |
* ecx = 0x00SSMMHH - время в двоично-десятичном коде (BCD): |
* HH=час 00..23 |
* MM=минута 00..59 |
* SS=секунда 00..59 |
* ebx = 1 - установить дату |
* ecx = 0x00DDMMYY - дата в двоично-десятичном коде (BCD): |
* DD=день 01..31 |
* MM=месяц 01..12 |
* YY=год 00..99 |
* ebx = 2 - установить день недели |
* ecx = 1 для воскресенья, ..., 7 для субботы |
* ebx = 3 - установить будильник |
* ecx = 0x00SSMMHH |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = 1 - параметр задан неверно |
* eax = 2 - CMOS-батарейки разрядились |
Замечания: |
* Ценность установки дня недели представляется сомнительной, |
поскольку он мало где используется |
(день недели можно рассчитать по дате). |
* Будильник можно установить на срабатывание в заданное время |
каждые сутки. При этом отключить его существующими системными |
функциями нельзя. |
* Срабатывание будильника заключается в генерации IRQ8. |
* Вообще-то CMOS поддерживает для будильника установку значения |
0xFF в качестве одного из параметров и означает это, что |
соответствующий параметр игнорируется. Но в текущей реализации |
это не пройдёт (вернётся значение 1). |
* Будильник - глобальный системный ресурс; установка будильника |
автоматически отменяет предыдущую установку. Впрочем, на данный |
момент ни одна программа его не использует. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SET_TIME_DATE (22) |
====================================================================== |
============== Функция 23 - ожидать события с таймаутом. ============= |
====================================================================== |
Если очередь сообщений пуста, ждёт появления сообщения в очереди, |
но не более указанного времени. Затем считывает сообщение из очереди. |
Параметры: |
* eax = 23 - номер функции |
* ebx = таймаут (в сотых долях секунды) |
Возвращаемое значение: |
* eax = 0 - очередь сообщений пуста |
* иначе eax = событие (смотри список событий) |
Замечания: |
* Учитываются только те события, которые входят в маску, |
устанавливаемую функцией 40. По умолчанию это события |
перерисовки, нажатия на клавиши и на кнопки. |
* Для проверки, есть ли сообщение в очереди, используйте функцию 11. |
Чтобы ждать сколь угодно долго, используйте функцию 10. |
* Передача ebx=0 приводит к моментальному возвращению eax=0. |
* При текущей реализации произойдёт немедленный возврат из функции |
с eax=0, если сложение ebx с текущим значением счётчика времени |
вызовет 32-битное переполнение. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_WAIT_EVENT_TIMEOUT (23) |
====================================================================== |
======= Функция 24, подфункция 4 - извлечь лоток привода диска. ====== |
====================================================================== |
Параметры: |
* eax = 24 - номер функции |
* ebx = 4 - номер подфункции |
* ecx = номер CD/DVD-диска |
от 0=Primary Master до 3=Secondary Slave для первого IDE контр. |
от 4=Primary Master до 7=Secondary Slave для второго IDE контр. |
от 8=Primary Master до 11=Secondary Slave для третьего IDE контр. |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Функция поддерживается только для ATAPI-устройств (CD и DVD). |
* При извлечении лотка производится разблокировка ручного управления |
механизмом лотка. |
* При извлечении лотка код производит очистку кэша соответствующего |
устройства. |
* Примером использования функции является приложение CD_tray. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_CD (24) |
ebx - SSF_EJECT_TRAY (4), SSF_INSERT_TRAY (5) |
====================================================================== |
====== Функция 24, подфункция 5 - загрузить лоток привода диска. ===== |
====================================================================== |
Параметры: |
* eax = 24 - номер функции |
* ebx = 5 - номер подфункции |
* ecx = номер CD/DVD-диска |
от 0=Primary Master до 3=Secondary Slave для первого IDE контр. |
от 4=Primary Master до 7=Secondary Slave для второго IDE контр. |
от 8=Primary Master до 11=Secondary Slave для третьего IDE контр. |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Функция поддерживается только для ATAPI-устройств (CD и DVD). |
* Примером использования функции является приложение CD_tray. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_CD (24) |
ebx - SSF_EJECT_TRAY (4), SSF_INSERT_TRAY (5) |
====================================================================== |
========== Функция 25 - записать область на слой фона. =============== |
====================================================================== |
Параметры: |
* eax = 25 - номер функции |
* ebx = указатель на предварительно выделенную область памяти, |
где размещено исходное изображение в формате BBGGRRTTBBGGRRTT... |
* ecx = [размер по оси x]*65536 + [размер по оси y] |
* edx = [координата по оси x]*65536 + [координата по оси y] |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Координаты области - это координаты верхнего левого угла |
области относительно экрана. |
* Размер изображения в байтах есть 4*xsize*ysize. |
* TT - байт указатель прозрачности, в настоящее время: |
от 1 до FF - непрозрачно, от 0 - прозрачно. |
* Функция размещает изображение не на фоновое изображение (ф.15), |
а напрямую в LFB. Опции ф.15 для ф. 25 не имеют смысла. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SCREEN_PUT_IMAGE (25) |
====================================================================== |
===== Функция 26, подфункция 1 - получить базовый порт MPU MIDI. ===== |
====================================================================== |
Параметры: |
* eax = 26 - номер функции |
* ebx = 1 - номер подфункции |
Возвращаемое значение: |
* eax = номер порта |
Замечания: |
* Установить базовый порт можно вызовом |
подфункции 1 функции 21. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM_GET (26) |
ebx - SSF_MPU_MIDI_BASE (1) |
====================================================================== |
====== Функция 26, подфункция 2 - получить раскладку клавиатуры. ===== |
====================================================================== |
Раскладка клавиатуры используется для преобразования сканкодов, |
поступающих от клавиатуры, в ASCII-коды, считываемые функцией 2. |
Параметры: |
* eax = 26 - номер функции |
* ebx = 2 - номер подфункции |
* ecx = какую раскладку получать: |
* 1 = нормальную |
* 2 = раскладку при нажатом Shift |
* 3 = раскладку при нажатом Alt |
* edx = указатель на буфер длиной 128 байт, куда будет скопирована |
раскладка |
Возвращаемое значение: |
* функция не возвращает значения, |
но, если указатель в edx недопустимый, например, |
регион [edx, edx + 128) пересекается с памятью ядра, |
то тогда функция возвращает -1 |
Или: |
* eax = 26 - номер функции |
* ebx = 2 - номер подфункции |
* ecx = 9 |
Возвращаемое значение: |
* eax = идентификатор страны (1=eng, 2=fi, 3=ger, 4=rus) |
Замечания: |
* Если нажат Alt, то используется раскладка с Alt; |
если не нажат Alt, но нажат Shift, то используется |
раскладка с Shift; |
если не нажаты Alt и Shift, но нажат Ctrl, то используется |
нормальная раскладка, после чего из кода вычитается 0x60; |
если не нажата ни одна из управляющих клавиш, то используется |
нормальная раскладка. |
* Установить раскладки и идентификатор страны можно с помощью |
подфункции 2 функции 21. |
* Идентификатор страны - глобальная системная переменная, которая |
самим ядром не используется; однако приложение @taskbar отображает |
соответствующую текущей стране иконку |
(используя описываемую функцию). |
* Приложение @taskbar переключает раскладки по запросу пользователя. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM_GET (26) |
ebx - SSF_KEYBOARD_LAYOUT (2) |
====================================================================== |
========== Функция 26, подфункция 5 - получить язык системы. ========= |
====================================================================== |
Параметры: |
* eax = 26 - номер функции |
* ebx = 5 - номер подфункции |
Возвращаемое значение: |
* eax = язык системы (1=eng, 2=fi, 3=ger, 4=rus) |
Замечания: |
* Язык системы - глобальная системная переменная, никак |
не используемая самим ядром, однако приложение @taskbar рисует |
соответствующую иконку (используя описываемую функцию). |
* Установить язык системы можно вызовом подфункции 5 функции 21. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM_GET (26) |
ebx - SSF_SYS_LANG (5) |
====================================================================== |
=== Функция 26, подфункция 9 - получить значение счётчика времени. === |
====================================================================== |
Параметры: |
* eax = 26 - номер функции |
* ebx = 9 - номер подфункции |
Возвращаемое значение: |
* eax = число сотых долей секунды, прошедших с момента |
запуска системы |
Замечания: |
* Счётчик берётся по модулю 2^32, что соответствует немногим более |
497 суток. |
* Системное время можно получить функцией 3. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM_GET (26) |
ebx - SSF_TIME_COUNT (9) |
====================================================================== |
===================== Функция 26, подфункция 10 ====================== |
========== Получить значение высокоточного счётчика времени. ========= |
====================================================================== |
Parameters: |
* eax = 26 - номер функции |
* ebx = 10 - номер подфункции |
Returned value: |
* edx:eax = число наносекунд с момента загрузки ядра |
* eax = младшее двойное слово |
* edx = старшее двойное слово |
Remarks: |
* функция использует счётчик HPET, если HPET не доступен используется |
счётчик PIT. В этом случае точность будет уменьшена до 10 000 000 |
наносекунд. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM_GET (26) |
ebx - SSF_TIME_COUNT_PRO (10) |
====================================================================== |
====================== Функция 26, подфункция 11 ===================== |
=========== Узнать, разрешён ли низкоуровневый доступ к HD. ========== |
====================================================================== |
Параметры: |
* eax = 26 - номер функции |
* ebx = 11 - номер подфункции |
Возвращаемое значение: |
* eax = 0/1 - запрещён/разрешён |
Замечания: |
* Используется при LBA-чтении (подфункция 8 функции 58). |
* Установить текущее состояние можно вызовом |
подфункции 11 функции 21. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM_GET (26) |
ebx - SSF_ACCESS_HD_LBA (11) |
====================================================================== |
====================== Функция 26, подфункция 12 ===================== |
========== Узнать, разрешён ли низкоуровневый доступ к PCI. ========== |
====================================================================== |
Параметры: |
* eax = 26 - номер функции |
* ebx = 12 - номер подфункции |
Возвращаемое значение: |
* eax = 0/1 - запрещён/разрешён |
Замечания: |
* Используется при работе с шиной PCI (функция 62). |
* Текущая реализация использует только младший бит ecx. |
* Установить текущее состояние можно вызовом |
подфункции 12 функции 21. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYSTEM_GET (26) |
ebx - SSF_ACCESS_PCI (12) |
====================================================================== |
================ Функция 29 - получить системную дату. =============== |
====================================================================== |
Параметры: |
* eax = 29 - номер функции |
Возвращаемое значение: |
* eax = 0x00DDMMYY, где |
(используется двоично-десятичное кодирование, BCD) |
* YY = две младшие цифры года (00..99) |
* MM = месяц (01..12) |
* DD = день (01..31) |
Замечания: |
* Системную дату можно установить функцией 22. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_GET_SYS_DATE (29) |
====================================================================== |
================ Функция 30 - работа с текущей папкой. =============== |
====================================================================== |
-------- Подфункция 1 - установить текущую папку для потока. --------- |
Параметры: |
* eax = 30 - номер функции |
* ebx = 1 - номер подфункции |
* ecx = указатель на строку с путём к новой текущей папке, |
правила формирования строки указаны в описании функции 70. |
Возвращаемое значение: |
* функция не возвращает значения |
---------------------------------------------------------------------- |
--------- Подфункция 2 - получить текущую папку для потока. ---------- |
Параметры: |
* eax = 30 - номер функции |
* ebx = 2 - номер подфункции |
* ecx = указатель на буфер |
* edx = размер буфера |
Возвращаемое значение: |
* eax = длина строки (включая завершающий 0) |
Замечания: |
* Если размера буфера недостаточно для копирования всего пути, |
копируются только часть строки и в конце ставится завершающий 0. |
* По умолчанию, текущая папка для потока - "/rd/1". |
* При создании процесса/потока текущая папка наследуется от |
родителя. |
---------------------------------------------------------------------- |
---- Подфункция 3 - установить доп. системную директорию для ядра ---- |
Параметры: |
* eax = 30 - номер функции |
* ebx = 3 - номер подфункции |
* ecx = указатель на блок данных: |
key rb 64 |
path rb 64 |
Пример: |
align 64 |
key db 'kolibrios',0 ; ключ должен быть в нижнем регистре |
align 64 |
path db 'HD0/1',0 |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Функция может быть вызвана только 1 раз за 1 сессию работы ОС. |
* При вводе пути символьный ключ не зависит от кодировки. |
---------------------------------------------------------------------- |
--- Подфункция 4 - установить текущую папку с указанием кодировки. --- |
Параметры: |
* eax = 30 - номер функции |
* ebx = 4 - номер подфункции |
* ecx = указатель на строку с путём к новой текущей папке |
* edx = кодировка строки, подробности указаны в описании функции 80. |
Возвращаемое значение: |
* функция не возвращает значения |
---------------------------------------------------------------------- |
---- Подфункция 5 - получить текущую папку с указанием кодировки. ---- |
Параметры: |
* eax = 30 - номер функции |
* ebx = 5 - номер подфункции |
* ecx = указатель на буфер |
* edx = размер буфера |
* esi = кодировка строки |
Возвращаемое значение: |
* eax = длина строки в байтах (включая завершающий 0) |
Замечания: |
* Если размера буфера недостаточно для копирования всего пути, |
копируются только часть строки и в конце ставится завершающий 0. |
* По умолчанию, текущая папка для потока - "/rd/1". |
* При создании процесса/потока текущая папка наследуется от |
родителя. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_CURRENT_FOLDER (30) |
ebx - SSF_SET_CF (1), SSF_GET_CF (2), SSF_ADD_SYS_FOLDER (3) |
====================================================================== |
========= Функция 34 - узнать кому принадлежит точка экрана. ========= |
====================================================================== |
Параметры: |
* eax = 34 - номер функции |
* ebx = x-координата (относительно экрана) |
* ecx = y-координата (относительно экрана) |
Возвращаемое значение: |
* eax = 0x000000XX - точка принадлежит слоту окна N |
При некорректных значениях ebx и ecx функция возвращает 0 |
* Функция берет значения из области [_WinMapAddress] |
---------------------- Константы для регистров: ---------------------- |
eax - SF_GET_PIXEL_OWNER (34) |
====================================================================== |
============ Функция 35 - прочитать цвет точки на экране. ============ |
====================================================================== |
Параметры: |
* eax = 35 |
* ebx = y*xsize+x, где |
* (x,y) = координаты точки (считая от 0) |
* xsize = размер экрана по горизонтали |
Возвращаемое значение: |
* eax = цвет 0x00RRGGBB |
Замечания: |
* Узнать размеры экрана можно вызовом функции 14. Обратите внимание, |
что она вычитает 1 из обоих размеров. |
* К видеопамяти есть также прямой доступ (без вызовов системных |
функций) через селектор gs. Параметры текущего видеорежима |
можно получить функцией 61. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_GET_PIXEL (35) |
====================================================================== |
=============== Функция 36 - прочитать область экрана. =============== |
====================================================================== |
Параметры: |
* eax = 36 - номер функции |
* ebx = указатель на предварительно выделенную область памяти, |
куда будет помещено изображение в формате BBGGRRBBGGRR... |
* ecx = [размер по оси x]*65536 + [размер по оси y] |
* edx = [координата по оси x]*65536 + [координата по оси y] |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Координаты области - это координаты верхнего левого угла |
области относительно экрана. |
* Размер изображения в байтах есть 3*xsize*ysize. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_GET_IMAGE (36) |
====================================================================== |
==================== Функция 37 - работа с мышью. ==================== |
====================================================================== |
-------------- Подфункция 0 - экранные координаты мыши --------------- |
Параметры: |
* eax = 37 - номер функции |
* ebx = 0 - номер подфункции |
Возвращаемое значение: |
* eax = x*65536 + y, (x,y)=координаты курсора мыши (считая от 0) |
---------- Подфункция 1 - координаты мыши относительно окна ---------- |
Параметры: |
* eax = 37 - номер функции |
* ebx = 1 - номер подфункции |
Возвращаемое значение: |
* eax = x*65536 + y, (x,y)=координаты курсора мыши относительно |
окна приложения (считая от 0) |
Замечания: |
* Значение вычисляется по формуле (x-xwnd)*65536 + (y-ywnd). |
Если y>=ywnd, то младшее слово неотрицательно и содержит |
относительную y-координату, а старшее - относительную x-координату |
(правильного знака). В противном случае младшее слово отрицательно |
и всё равно содержит относительную y-координату, |
а к старшему слову следует прибавить 1. |
---------------- Подфункция 2 - состояния кнопок мыши ---------------- |
Параметры: |
* eax = 37 - номер функции |
* ebx = 2 - номер подфункции |
Возвращаемое значение: |
* eax = биты 0-4 соответствуют подфункции 3 |
----------- Подфункция 3 - состояния и события кнопок мыши ----------- |
Параметры: |
* eax = 37 - номер функции |
* ebx = 3 - номер подфункции |
Возвращаемое значение: |
* eax содержит следующую информацию: |
состояния: |
* бит 0 установлен = удерживается левая кнопка |
* бит 1 установлен = удерживается правая кнопка |
* бит 2 установлен = удерживается средняя кнопка |
* бит 3 установлен = удерживается 4-я кнопка |
* бит 4 установлен = удерживается 5-я кнопка |
события: |
* бит 8 установлен = нажата левая кнопка |
* бит 9 установлен = нажата правая кнопка |
* бит 10 установлен = нажата средняя кнопка |
* бит 15 установлен = используется вертикальная прокрутка |
* бит 16 установлен = отпущена левая кнопка |
* бит 17 установлен = отпущена правая кнопка |
* бит 18 установлен = отпущена средняя кнопка |
* бит 23 установлен = используется горизонтальная прокрутка |
* бит 24 установлен = двойной щелчёк левой кнопкой |
------------------ Подфункция 4 - загрузить курсор ------------------- |
Параметры: |
* eax = 37 - номер функции |
* ebx = 4 - номер подфункции |
* dx = источник данных: |
* dx = LOAD_FROM_FILE = 0 - данные в файле |
* ecx = указатель на полный путь к файлу курсора |
* файл курсора должен быть в формате .cur, стандартном для |
MS Windows, причём размером 32*32 пикселя |
* dx = LOAD_FROM_MEM = 1 - данные файла уже загружены в память |
* ecx = указатель на данные файла курсора |
* формат данных такой же, как и в предыдущем случае |
* dx = LOAD_INDIRECT = 2 - данные в памяти |
* ecx = указатель на образ курсора в формате ARGB 32*32 пикселя |
* edx = 0xXXYY0002, где |
* XX = x-координата "горячей точки" курсора |
* YY = y-координата |
* 0 <= XX, YY <= 31 |
Возвращаемое значение: |
* eax = 0 - неудача |
* иначе eax = хэндл курсора |
------------------ Подфункция 5 - установить курсор ------------------ |
Устанавливает новый курсор для окна текущего потока. |
Параметры: |
* eax = 37 - номер функции |
* ebx = 5 - номер подфункции |
* ecx = хэндл курсора |
Возвращаемое значение: |
* eax = хэндл предыдущего установленного курсора |
Замечания: |
* Если передан некорректный хэндл, то функция восстановит курсор |
по умолчанию (стандартную стрелку). В частности, к восстановлению |
курсора по умолчанию приводит передача ecx=0. |
------------------- Подфункция 6 - удалить курсор -------------------- |
Параметры: |
* eax = 37 - номер функции |
* ebx = 6 - номер подфункции |
* ecx = хэндл курсора |
Возвращаемое значение: |
* eax разрушается |
Замечания: |
* Курсор должен был быть ранее загружен текущим потоком |
(вызовом подфункции 4). Функция не удаляет системные курсоры и |
курсоры, загруженные другими приложениями. |
* Если удаляется активный (установленный подфункцией 5) курсор, то |
восстанавливается курсор по умолчанию (стандартная стрелка). |
------------------ Подфункция 7 - данные прокрутки ------------------- |
Параметры: |
* eax = 37 - номер функции |
* ebx = 7 - номер подфункции |
Возвращаемое значение: |
* eax = [horizontal offset]*65536 + [vertical offset] |
Замечания: |
* Данные доступны только активному окну. |
* После прочтения значения обнуляются. |
* Данные имеют знаковые значения. |
------- Подфункция 8 - загрузить курсор с указанием кодировки. ------- |
Параметры: |
* eax = 37 - номер функции |
* ebx = 8 - номер подфункции |
* ecx = указатель на строку с путём к файлу курсора |
* edx = кодировка строки, подробности указаны в описании функции 80. |
Возвращаемое значение: |
* eax = хэндл курсора, 0 - неудача |
---------------------- Константы для регистров: ---------------------- |
eax - SF_MOUSE_GET (37) |
ebx - SSF_SCREEN_POSITION (0), SSF_WINDOW_POSITION (1), |
SSF_BUTTON (2), SSF_BUTTON_EXT (3), SSF_LOAD_CURSOR (4), |
SSF_SET_CURSOR (5), SSF_DEL_CURSOR (6), SSF_SCROLL_DATA (7) |
====================================================================== |
================== Функция 38 - нарисовать отрезок. ================== |
====================================================================== |
Параметры: |
* eax = 38 - номер функции |
* ebx = [координата начала по оси x]*65536 + |
[координата конца по оси x] |
* ecx = [координата начала по оси y]*65536 + |
[координата конца по оси y] |
* edx = 0x00RRGGBB - цвет |
edx = 0x01xxxxxx - рисовать инверсный отрезок |
(младшие 24 бита игнорируются) |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Координаты берутся относительно окна. |
* Конечная точка также рисуется. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DRAW_LINE (38) |
====================================================================== |
== Функция 39, подфункция 1 - получить размер фонового изображения. == |
====================================================================== |
Параметры: |
* eax = 39 - номер функции |
* ebx = 1 - номер подфункции |
Возвращаемое значение: |
* eax = [ширина]*65536 + [высота] |
Замечания: |
* Есть парная команда установки размеров фонового изображения - |
подфункция 1 функции 15. После которой, разумеется, следует |
заново определить само изображение. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_BACKGROUND_GET (39) |
====================================================================== |
= Функция 39, подфункция 2 - прочитать точку с фонового изображения. = |
====================================================================== |
Параметры: |
* eax = 39 - номер функции |
* ebx = 2 - номер подфункции |
* ecx = смещение |
Возвращаемое значение: |
* eax = 0x00RRGGBB - цвет точки, если смещение допустимо |
(меньше 0x160000-16) |
* eax = 2 - иначе |
Замечания: |
* Не следует полагаться на возвращаемое значение в случае неверного |
смещения, оно может измениться в следующих версиях ядра. |
* Смещение точки с координатами (x,y) вычисляется как (x+y*xsize)*3. |
* Есть парная функция установки точки на фоновом изображении - |
подфункция 2 функции 15. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_BACKGROUND_GET (39) |
====================================================================== |
====== Функция 39, подфункция 4 - получить режим отрисовки фона. ===== |
====================================================================== |
Параметры: |
* eax = 39 - номер функции |
* ebx = 4 - номер подфункции |
Возвращаемое значение: |
* eax = 1 - замостить |
* eax = 2 - растянуть |
Замечания: |
* Есть парная функция установки режима отрисовки фона - |
подфункция 4 функции 15. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_BACKGROUND_GET (39) |
====================================================================== |
======== Функция 40 - установить маску для ожидаемых событий. ======== |
====================================================================== |
Маска для ожидаемых событий влияет на функции работы с событиями 10, |
11, 23 - они сообщают только о событиях, разрешённых этой маской. |
Параметры: |
* eax = 40 - номер функции |
* ebx = маска: бит i соответствует событию i+1 (см. список событий) |
(установленный бит разрешает извещение о событии) |
bit 31: фильтр активности событий мыши |
bit 31 = 0 - неактивное окно всегда получает события от мыши |
bit 31 = 1 - неактивное окно не получает события от мыши |
bit 30: фильтр позиции курсора |
bit 30 = 0 - окно принимает события мыши, если курсор |
за пределами окна |
bit 30 = 1 - окно не принимает события мыши, если курсор |
за пределами окна |
Возвращаемое значение: |
* eax = предыдущее значение маски |
Замечания: |
* Маска по умолчанию (7=111b) разрешает извещения о перерисовке |
и нажатиях клавиш и кнопок. |
Этого достаточно для большинства приложений. |
* События, запрещённые в маске, всё равно сохраняются, если |
приходят; о них просто не извещают функции работы с событиями. |
* Функции работы с событиями учитывают маску на момент |
вызова функции, а не на момент поступления сообщения. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SET_EVENTS_MASK (40) |
====================================================================== |
=================== Функция 43 - ввод/вывод в порт. ================== |
====================================================================== |
------------------------ Вывод данных в порт ------------------------- |
Параметры: |
* eax = 43 - номер функции |
* bl = байт для вывода |
* ecx = номер порта 0xnnnn (от 0 до 0xFFFF) |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = 1 - поток не зарезервировал указанный порт |
------------------------ Ввод данных из порта ------------------------ |
Параметры: |
* eax = 43 - номер функции |
* ebx игнорируется |
* ecx = 0x8000nnnn, где nnnn = номер порта (от 0 до 0xFFFF) |
Возвращаемое значение: |
* eax = 0 - успешно, при этом ebx = введённый байт |
* eax = 1 - поток не зарезервировал данный порт |
Замечания: |
* Предварительно поток должен зарезервировать за собой |
указанный порт функцией 46. |
* Для зарезервированных портов вместо вызова этих функций |
лучше использовать команды процессора in/out - это значительно |
быстрее и несколько короче и проще. Из незарезервированных |
портов читать всё равно нельзя. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_PORT_IN_OUT (43) |
====================================================================== |
= Функция 46 - зарезервировать/освободить группу портов ввода/вывода. |
====================================================================== |
К зарезервированным портам можно обращаться напрямую из приложения |
командами in/out (рекомендуемый способ) и вызовом функции 43 |
(нерекомендуемый способ). |
Параметры: |
* eax = 46 - номер функции |
* ebx = 0 - зарезервировать, 1 - освободить |
* ecx = номер начала диапазона портов |
* edx = номер конца диапазона портов (включительно) |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = 1 - ошибка |
Замечания: |
* В случае резервирования портов ошибкой считается выполнение |
одного из условий: |
* начальный адрес больше конечного; |
* указанный диапазон содержит некорректный номер порта |
(корректные - от 0 до 0xFFFF); |
* превышено ограничение на общее число зарезервированных областей |
- допускается максимум 255; |
* указанный диапазон пересекается с одним из |
ранее зарезервированных |
* В случае освобождения портов ошибкой считается попытка |
освобождения диапазона, который ранее не был целиком |
зарезервирован этой же функцией (с такими же значениями ecx,edx). |
* При обнаружении ошибки (в обоих случаях) никаких действий |
не производится. |
* При загрузке система резервирует за собой порты |
0..0x2d, 0x30..0x4d, 0x50..0xdf, 0xe5..0xff (включительно). |
* При завершении потока автоматически освобождаются все |
зарезервированные им порты. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SET_PORTS (46) |
====================================================================== |
================= Функция 47 - вывести число в окно. ================= |
====================================================================== |
Параметры: |
* eax = 47 - номер функции |
* ebx = параметры преобразования числа в текст: |
* bl = 0 - ecx содержит число |
* bl = 1 - ecx содержит указатель на dword/qword-число |
* bh = 0 - отображать в десятичной системе счисления |
* bh = 1 - отображать в шестнадцатеричной системе |
* bh = 2 - отображать в двоичной системе |
* биты 16-21 = сколько цифр отображать |
* биты 22-29 зарезервированы и должны быть установлены в 0 |
* бит 30 установлен = выводить qword (64-битное число); |
при этом должно быть bl = 1 |
* бит 31 установлен = не выводить ведущие нули числа |
* ecx = число (при bl=0) или указатель (при bl=1) |
* edx = [координата по оси x]*65536 + [координата по оси y] |
* esi = 0xXXRRGGBB, где |
* RR, GG, BB задают цвет текста |
* XX=0B0FCSSS (биты): |
* B=1 - закрашивать фон (цвет = edi) |
* F задает шрифт: |
0 = 6x9 |
1 = 8x16 |
* C=0 - рисовать в окно, |
С=1 - рисовать в буфер (edi) |
* SSS = (множитель размера)-1, то-есть 0 = x1, 7 = x8 |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Указанная длина не должна превосходить 60. |
* Выводится ровно указанное количество цифр. Если число мало и |
может быть записано меньшим количеством цифр, оно дополняется |
ведущими нулями; если число велико и не может быть записано |
таким количеством цифр, "лишние" ведущие цифры обрезаются. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DRAW_NUMBER (47) |
====================================================================== |
======= Функция 48, подфункция 0 - применить настройки экрана. ======= |
====================================================================== |
Параметры: |
* eax = 48 - номер функции |
* ebx = 0 - номер подфункции |
* ecx = 0 - зарезервировано |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Функция перерисовывает экран после изменения параметров |
подфункциями 1 и 2. |
* Вызов функции без предшествующих вызовов указанных подфункций |
игнорируется. |
* Вызов функции с ненулевым ecx игнорируется. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_APPLY (0) |
====================================================================== |
========= Функция 48, подфункция 1 - установить стиль кнопок. ======== |
====================================================================== |
Параметры: |
* eax = 48 - номер функции |
* ebx = 1 - номер подфункции |
* ecx = тип кнопок: |
* 0 = плоские |
* 1 = объёмные |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* После вызова описываемой функции следует перерисовать экран |
подфункцией 0. |
* Тип кнопок влияет только на их прорисовку функцией 8. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_SET_BUTTON_STYLE (1) |
====================================================================== |
==== Функция 48, подфункция 2 - установить стандартные цвета окон. === |
====================================================================== |
Параметры: |
* eax = 48 - номер функции |
* ebx = 2 - номер подфункции |
* ecx = указатель на таблицу цветов |
* edx = размер таблицы цветов |
(должен быть 40 байт для будущей совместимости) |
Формат таблицы цветов указан в описании подфункции 3. |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* После вызова описываемой функции следует перерисовать экран |
подфункцией 0. |
* Таблица стандартных цветов влияет только на приложения, |
которые эту таблицу явным образом получают (подфункцией 3) и |
используют (указывая цвета из неё при вызовах функций рисования). |
* Таблица стандартных цветов входит в скин и устанавливается заново |
при установке скина (подфункции 8). |
* Таблицу цветов можно просматривать/изменять интерактивно с помощью |
приложения desktop. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_SET_COLORS (2) |
====================================================================== |
===== Функция 48, подфункция 3 - получить стандартные цвета окон. ==== |
====================================================================== |
Параметры: |
* eax = 48 - номер функции |
* ebx = 3 - номер подфункции |
* ecx = указатель на буфер размером edx байт, |
куда будет записана таблица |
* edx = размер таблицы цветов |
(должен быть 40 байт для будущей совместимости) |
Возвращаемое значение: |
* функция не возвращает значения |
Формат таблицы цветов: каждый элемент - |
dword-значение цвета 0x00RRGGBB |
* +0: dword: frames - цвет рамки |
* +4: dword: grab - цвет заголовка |
* +8: dword: grab_button - цвет кнопки на полосе заголовка |
* +12 = +0xC: dword: grab_button_text - цвет текста на кнопке |
на полосе заголовка |
* +16 = +0x10: dword: grab_text - цвет текста на заголовке |
* +20 = +0x14: dword: work - цвет рабочей области |
* +24 = +0x18: dword: work_button - цвет кнопки в рабочей области |
* +28 = +0x1C: dword: work_button_text - цвет текста на кнопке |
в рабочей области |
* +32 = +0x20: dword: work_text - цвет текста в рабочей области |
* +36 = +0x24: dword: work_graph - цвет графики в рабочей области |
Замечания: |
* Структура таблицы цветов описана в стандартном включаемом файле |
macros.inc под названием system_colors; например, можно писать: |
sc system_colors ; объявление переменной |
... ; где-то надо вызвать |
; описываемую функцию с ecx=sc |
mov ecx, [sc.work_button_text] ; читаем цвет текста |
; на кнопке в рабочей области |
* Использование/неиспользование этих цветов - дело исключительно |
самой программы. Для использования нужно просто при вызове функций |
рисования указывать цвет, взятый из этой таблицы. |
* При изменении таблицы стандартных цветов (подфункцией 2 с |
последующим применением изменений подфункцией 0 или |
при установке скина подфункцией 8) всем окнам посылается сообщение |
о необходимости перерисовки (событие с кодом 1). |
* Стандартные цвета можно просматривать/изменять интерактивно |
с помощью приложения desktop. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_GET_COLORS (3) |
====================================================================== |
========== Функция 48, подфункция 4 - получить высоту скина. ========= |
====================================================================== |
Параметры: |
* eax = 48 - номер функции |
* ebx = 4 - номер подфункции |
Возвращаемое значение: |
* eax = высота скина |
Замечания: |
* Высотой скина по определению считается высота заголовка окон, |
использующих скин. |
* Смотри также общую структуру окна в описании функции 0. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_GET_SKIN_HEIGHT (4) |
====================================================================== |
===== Функция 48, подфункция 5 - получить рабочую область экрана. ==== |
====================================================================== |
Параметры: |
* eax = 48 - номер функции |
* ebx = 5 - номер подфункции |
Возвращаемое значение: |
* eax = [left]*65536 + [right] |
* ebx = [top]*65536 + [bottom] |
Замечания: |
* Рабочая область экрана определяет положение и координаты |
максимизированного окна. |
* Рабочая область экрана при нормальной работе есть весь экран |
за вычетом панели (@taskbar). |
* (left,top) - координаты левого верхнего угла, |
(right,bottom) - координаты правого нижнего. |
Таким образом, размер рабочей области по оси x определяется |
формулой right-left+1, по оси y - формулой bottom-right+1. |
* Смотри также функцию 14, |
позволяющую определить размеры всего экрана. |
* Есть парная функция установки рабочей области - подфункция 6. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_GET_SCREEN_AREA (5) |
====================================================================== |
==== Функция 48, подфункция 6 - установить рабочую область экрана. === |
====================================================================== |
Параметры: |
* eax = 48 - номер функции |
* ebx = 6 - номер подфункции |
* ecx = [left]*65536 + [right] |
* edx = [top]*65536 + [bottom] |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Рабочая область экрана определяет положение и координаты |
максимизированного окна. |
* Эта функция используется только приложением @taskbar, |
устанавливающим рабочей областью весь экран за вычетом панели. |
* (left,top) - координаты левого верхнего угла, |
(right,bottom) - координаты правого нижнего. |
Таким образом, размер рабочей области по оси x определяется |
формулой right-left+1, по оси y - формулой bottom-right+1. |
* Если left>=right, то x-координаты рабочей области не изменяются. |
Если left<0, то left не устанавливается. Если right больше |
или равно ширины экрана, то right не устанавливается. |
Аналогично по оси y. |
* Смотри также функцию 14, |
позволяющую определить размеры всего экрана. |
* Есть парная функция получения рабочей области - |
подфункция 5. |
* Эта функция автоматически перерисовывает экран, по ходу дела |
обновляет координаты и размеры максимизированных окон. |
Все окна извещаются о необходимости перерисовки (событие 1). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_SET_SCREEN_AREA (6) |
====================================================================== |
====================== Функция 48, подфункция 7 ====================== |
============ Получить область скина для текста заголовка. ============ |
====================================================================== |
Возвращает область заголовка окна со скином, предназначенную |
для вывода текста заголовка. |
Параметры: |
* eax = 48 - номер функции |
* ebx = 7 - номер подфункции |
Возвращаемое значение: |
* eax = [left]*65536 + [right] |
* ebx = [top]*65536 + [bottom] |
Замечания: |
* Использование/неиспользование этой функции - |
личное дело приложения. |
* Рекомендуется учитывать значения, возвращаемые этой функцией, |
при выборе места для рисования текста заголовка (функцией 4) или |
какого-нибудь заменителя текста заголовка |
(по усмотрению приложения). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_GET_SKIN_MARGINS (7) |
====================================================================== |
==== Функция 48, подфункция 8 - установить используемый скин окон. === |
====================================================================== |
Параметры: |
* eax = 48 - номер функции |
* ebx = 8 - номер подфункции |
* ecx = указатель на имя файла скина |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = 1 - не удалось загрузить файл |
* eax = 2 - файл не является файлом скина |
Замечания: |
* При успешной загрузке скина все окна извещаются о необходимости |
перерисовки (событие 1). |
* При загрузке система считывает скин из файла default.skn |
на рамдиске. |
* Пользователь может изменять скин статически, создав свой |
default.skn, или динамически с помощью приложения desktop. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_SET_SKIN (8) |
====================================================================== |
= Функция 48, подфункция 9 - получить настройку сглаживания шрифтов. = |
====================================================================== |
Параметры: |
* eax = 48 - номер функции |
* ebx = 9 - номер подфункции |
Возвращаемое значение: |
* eax = 2 - субпиксельное, 1 - обычное, 0 - выключить |
---------------------- Константы для регистров: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_GET_FONT_SMOOTH (9) |
====================================================================== |
===== Функция 48, подфункция 10 - настроить сглаживание шрифтов. ===== |
====================================================================== |
Параметры: |
* eax = 48 - номер функции |
* ebx = 10 - номер подфункции |
* cl = 2 - субпиксельное, 1 - обычное, 0 - выключить |
---------------------- Константы для регистров: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_SET_FONT_SMOOTH (10) |
====================================================================== |
======== Функция 48, подфункция 11 - получить размер шрифтов. ======== |
====================================================================== |
Параметры: |
* eax = 48 - номер функции |
* ebx = 11 - номер подфункции |
Возвращаемое значение: |
* eax = текущая высота шрифта в пикселях |
---------------------- Константы для регистров: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_GET_FONT_SIZE (11) |
====================================================================== |
======= Функция 48, подфункция 12 - установить размер шрифтов. ======= |
====================================================================== |
Параметры: |
* eax = 48 - номер функции |
* ebx = 12 - номер подфункции |
* cl = новая высота шрифта в пикселях |
---------------------- Константы для регистров: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_SET_FONT_SIZE (12) |
====================================================================== |
= Функция 48, подфункция 13 - установить скин с указанием кодировки. = |
====================================================================== |
Параметры: |
* eax = 48 - номер функции |
* ebx = 13 - номер подфункции |
* ecx = указатель на строку с путём к файлу скина |
* edx = кодировка строки, подробности указаны в описании функции 80. |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = 1 - не удалось загрузить файл |
* eax = 2 - файл не является файлом скина |
Замечания: |
* При успешной загрузке скина все окна извещаются о необходимости |
перерисовки (событие 1). |
* При загрузке система считывает скин из файла default.skn |
на рамдиске. |
* Пользователь может изменять скин статически, создав свой |
default.skn, или динамически с помощью приложения desktop. |
====================================================================== |
============ Функция 49 - Advanced Power Management (APM). =========== |
====================================================================== |
Параметры: |
* eax = 49 - номер функции |
* dx = номер функции APM (аналог ax в спецификации) |
* bx, cx = параметры функции APM |
Возвращаемое значение: |
* 16-битные регистры ax, bx, cx, dx, si, di и флаг CF |
установлены в соответствии со спецификацией APM |
* старшие половины 32-битных регистров eax, ebx, ecx, |
edx, esi, edi разрушаются |
Замечания: |
* Спецификация APM 1.2 описывается в документе |
"Advanced Power Management (APM) BIOS Specification" |
(Revision 1.2), доступном на |
http://www.microsoft.com/whdc/archive/amp_12.mspx; |
кроме того, она включена в известный Interrupt List by Ralf Brown |
(http://www.pobox.com/~ralf/files.html, |
ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_APM (49) |
====================================================================== |
================= Функция 50 - установка формы окна. ================= |
====================================================================== |
Обычные окна представляют собой прямоугольники. С помощью этой функции |
окну можно придать произвольную форму. Форма задаётся набором точек |
внутри обрамляющего прямоугольника, принадлежащих окну. Положение и |
размеры обрамляющего прямоугольника задаются функцией 0 и изменяются |
функцией 67. |
--------------- Установка данных с информацией о форме --------------- |
Параметры: |
* eax = 50 - номер функции |
* ebx = 0 - номер подфункции |
* ecx = указатель на данные формы (массив байт 0/1) |
Возвращаемое значение: |
* функция не возвращает значения |
------------------ Установка масштаба данных формы ------------------- |
Параметры: |
* eax = 50 - номер функции |
* ebx = 1 - номер подфункции |
* ecx задаёт масштаб: каждый байт данных определяет |
(2^scale)*(2^scale) пикселей |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Масштаб по умолчанию равен 0 (масштабирующий множитель 1). Если в |
данных формы один байт соответствует одному пикселю, то масштаб |
можно не устанавливать. |
* Обозначим xsize = ширина окна (в пикселях), ysize = высота; |
обратите внимание, что они на единицу больше, чем устанавливаемые |
функциями 0, 67. |
* По определению масштаба xsize и ysize должны делиться на 2^scale. |
* Байт данных по смещению a должен быть 0/1 и |
определяет принадлежность окну квадрата со стороной 2^scale |
(при scale=0 получаем пиксель) и координатами левого верхнего угла |
(a mod (xsize shr scale), a div (xsize shr scale)) |
* Размер данных: (xsize shr scale)*(ysize shr scale). |
* Данные должны присутствовать в памяти и не меняться |
после установки формы. |
* Система просматривает данные о форме при каждой перерисовке окна |
функцией 0. |
* Вызов подфункции 0 с нулевым указателем приводит к возврату |
к прямоугольной форме. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SET_WINDOW_SHAPE (50) |
====================================================================== |
===================== Функция 51 - создать поток. ==================== |
====================================================================== |
Параметры: |
* eax = 51 - номер функции |
* ebx = 1 - единственная подфункция |
* ecx = адрес точки входа потока (начальный eip) |
* edx = указатель стэка потока (начальный esp) |
Возвращаемое значение: |
* eax = -1 - ошибка (в системе слишком много потоков) |
* иначе eax = TID - идентификатор потока |
---------------------- Константы для регистров: ---------------------- |
eax - SF_CREATE_THREAD (51) |
====================================================================== |
====================== Функция 54, подфункция 0 ====================== |
============== Узнать количество слотов в буфере обмена. ============= |
====================================================================== |
Параметры: |
* eax = 54 - номер функции |
* ebx = 0 - номер подфункции |
Возвращаемое значение: |
* eax = количество слотов в буфере |
* eax = -1 - отсутствует область главного списка |
---------------------- Константы для регистров: ---------------------- |
eax - SF_CLIPBOARD (54) |
ebx - SSF_GET_SLOT_COUNT (0) |
====================================================================== |
====================== Функция 54, подфункция 1 ====================== |
================== Считать данные из буфера обмена. ================== |
====================================================================== |
Параметры: |
* eax = 54 - номер функции |
* ebx = 1 - номер подфункции |
* eсx = номер слота |
Возвращаемое значение: |
* eax = если успешно - указатель на область памяти с данными |
* eax = 1 - ошибка |
* eax = -1 - отсутствует область главного списка |
Замечания: |
* буфер, на который указывает eax, содержит следующую информацию: |
* +0: dword: общая длина данных |
* +4: dword: определяет тип данныx: |
* 0 = Текст |
* 1 = Текст с блочным выделением |
* 2 = Изображение |
* 3 = RAW |
* 4 и выше зарезервировано |
* +8: более детально смотрите файл clipboard_container_rus.txt |
* Функция должна использоваться совместно с 68.11. Приложение должно |
предварительно проинициализировать локальную кучу вызовом 68.11. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_CLIPBOARD (54) |
ebx - SSF_READ_CB (1) |
====================================================================== |
====================== Функция 54, подфункция 2 ====================== |
================== Записать данные в буфер обмена. =================== |
====================================================================== |
Параметры: |
* eax = 54 - номер функции |
* ebx = 2 - номер подфункции |
* eсx = количество копируемых байт |
* edx = указатель на буфер под копируемые данные |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = 1 - ошибка |
* eax = -1 - отсутствует область главного списка |
---------------------- Константы для регистров: ---------------------- |
eax - SF_CLIPBOARD (54) |
ebx - SSF_WRITE_CB (2) |
====================================================================== |
====================== Функция 54, подфункция 3 ====================== |
========= Удалить последний слот с данными в буфере обмена =========== |
====================================================================== |
Параметры: |
* eax = 54 - номер функции |
* ebx = 3 - номер подфункции |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = 1 - ошибка |
* eax = -1 - отсутствует область главного списка |
---------------------- Константы для регистров: ---------------------- |
eax - SF_CLIPBOARD (54) |
ebx - SSF_DEL_SLOT (3) |
====================================================================== |
====================== Функция 54, подфункция 4 ====================== |
=================== Аварийный сброс блокировки буфера ================ |
====================================================================== |
Параметры: |
* eax = 54 - номер функции |
* ebx = 4 - номер подфункции |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = -1 - отсутствует область главного списка или нет блокировки |
Замечания: |
* Используется в исключительных случаях, когда зависшее или убитое |
приложение заблокировало работу с буфером обмена. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_CLIPBOARD (54) |
ebx - SSF_UNLOCK_BUFFER (4) |
====================================================================== |
====================== Функция 55, подфункция 55 ===================== |
========== Начать проигрывать данные на встроенном спикере. ========== |
====================================================================== |
Параметры: |
* eax = 55 - номер функции |
* ebx = 55 - номер подфункции |
* esi = указатель на данные |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = 55 - ошибка (спикер отключён или занят) |
Данные - это массив элементов переменной длины. |
Формат каждого элемента определяется первым байтом: |
* 0 = конец данных |
* 1..0x80 = задаёт длительность звучания в сотых долях секунды |
ноты, определяемой непосредственным значением частоты |
* следующее слово (2 байта) содержит делитель частоты; |
частота определяется как 1193180/divider |
* 0x81 = invalid |
* 0x82..0xFF = нота, определяемая октавой и номером: |
* длительность в сотых долях секунды = (первый байт)-0x81 |
* присутствует ещё один байт; |
* (второй байт)=0xFF - пауза |
* иначе он имеет вид a*0x10+b, где b=номер ноты в октаве от 1 |
до 12, a=номер октавы (считая с 0) |
Замечания: |
* Пищание спикером может быть запрещено/разрешено подфункцией 8 |
функции 18. |
* Функция возвращает управление, сообщив куда следует информацию |
о запросе. Само проигрывание идёт независимо от программы. |
* Данные должны сохраняться в памяти по крайней мере |
до конца проигрывания. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SPEAKER_PLAY (55) |
====================================================================== |
======================= Функция 57 - PCI BIOS. ======================= |
====================================================================== |
Параметры: |
* eax = 57 - номер функции |
* ebp соответствует регистру al в спецификации PCI BIOS |
* остальные регистры - по спецификации PCI BIOS |
Возвращаемое значение: |
* CF не определён |
* остальные регистры - по спецификации PCI BIOS |
Замечания: |
* Многих результатов этой функции можно также добиться вызовом |
соответствующих подфункций функции 62. |
* Функция вызывает расширение PCI32 BIOS, документированное, |
например, в http://alpha1.dyns.net/files/PCI/bios21.pdf. |
* Если BIOS не поддерживает это расширение, поведение функции |
эмулируется (через аналоги подфункций функции 62 режима ядра). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_PCI_BIOS (57) |
====================================================================== |
=========== Функция 60 - Inter Process Communication (IPC). ========== |
====================================================================== |
IPC применяется для посылок сообщений от одного процесса/потока |
другому. При этом следует предварительно договориться о том, как |
интерпретировать конкретное сообщение. |
-------- Подфункция 1 - установить область для получения IPC --------- |
Вызывается процессом-приёмником. |
Параметры: |
* eax = 60 - номер функции |
* ebx = 1 - номер подфункции |
* ecx = указатель на буфер |
* edx = размер буфера |
Возвращаемое значение: |
* eax = 0 - всегда успешно |
Формат IPC-буфера: |
* +0: dword: если здесь не 0, то буфер считается заблокированным; |
блокируйте/разблокируйте буфер, когда вы с ним активно работаете |
и вам надо, чтобы извне не изменялись данные буфера |
(не поступали новые сообщения) |
* +4: dword: занято места в буфере (в байтах) |
* +8: первое сообщение |
* +8+n: второе сообщение |
* ... |
Формат сообщения: |
* +0: dword: PID процесса/потока, пославшего сообщение |
* +4: dword: длина сообщения (не считая этот заголовок) |
* +8: n*byte: данные сообщения |
--------------- Подфункция 2 - послать сообщение IPC. ---------------- |
Вызывается процессом-инициатором. |
Параметры: |
* eax = 60 - номер функции |
* ebx = 2 - номер подфункции |
* ecx = PID приёмника |
* edx = указатель на данные сообщения |
* esi = длина сообщения (в байтах) |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = 1 - приёмник не определил буфер для IPC-сообщений |
(может быть, ещё не успел, а может быть, это не тот поток, |
который нужен) |
* eax = 2 - приёмник заблокировал IPC-буфер; |
попробуйте немного подождать |
* eax = 3 - переполнение IPC-буфера приёмника |
* eax = 4 - процесса/потока с таким PID не существует |
Замечания: |
* Система сразу после записи IPC-сообщения в буфер посылает |
потоку-приёмнику событие с кодом 7 (см. коды событий). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_IPC (60) |
ebx - SSF_SET_AREA (1), SSF_SEND_MESSAGE (2) |
====================================================================== |
=== Функция 61 - получить параметры для прямого доступа к графике. === |
====================================================================== |
Программе доступны данные графического экрана (область памяти, которая |
собственно и отображает содержимое экрана) напрямую без вызовов |
системных функций через селектор gs: |
mov eax, [gs:0] |
поместит в eax первый dword буфера, содержащий информацию о цвете |
левой верхней точки (и, возможно, цвета нескольких следующих). |
mov [gs:0], eax |
при работе в режимах VESA c LFB |
установит цвет левой верхней точки |
(и возможно, цвета нескольких следующих). |
Для интерпретации данных графического экрана требуется знание |
некоторых параметров, которые возвращаются этой функцией. |
Замечания: |
* Параметры графики очень редко меняются при работе системы. |
* При изменении видеорежима система перерисовывает все окна |
(событие с кодом 1) и перерисовывает фон (событие 5). |
Эти же события происходят и в других случаях, |
которые встречаются значительно чаще, чем изменение видеорежима. |
* При работе в видеорежимах с LFB селектор gs указывает на |
собственно LFB, так что чтение/запись по gs приводят |
непосредственно к изменению содержимого экрана. При работе в |
видеорежимах без LFB gs указывает на некоторую область данных |
ядра, причём все функции вывода на экран добросовестно выполняют |
двойную работу по записи непосредственно на экран и по записи |
в этот буфер. В результате при чтении содержимого этого буфера |
результаты соответствуют содержимому экрана |
(с, вообще говоря, большим цветовым разрешением), |
а запись игнорируется. |
Исключением является режим 320*200, для которого в главном цикле |
системного потока выполняется обновление экрана в соответствии |
с движениями курсора мыши. |
------------------------- Разрешение экрана -------------------------- |
Параметры: |
* eax = 61 - номер функции |
* ebx = 1 - номер подфункции |
Возвращаемое значение: |
* eax = [разрешение по оси x]*65536 + [разрешение по оси y] |
Замечания: |
* Можно использовать функцию 14 с учётом того, что она возвращает |
размеры на 1 меньше. Это полностью эквивалентный способ. |
------------------------ Число бит на пиксель ------------------------ |
Параметры: |
* eax = 61 - номер функции |
* ebx = 2 - номер подфункции |
Возвращаемое значение: |
* eax = число бит на пиксель (24 или 32) |
------------------------ Число байт на строку ------------------------ |
Параметры: |
* eax = 61 - номер функции |
* ebx = 3 - номер подфункции |
Возвращаемое значение: |
* eax = число байт, которое занимает одна строка развёртки |
(горизонтальная линия на экране) |
---------------------- Константы для регистров: ---------------------- |
eax - SF_GET_GRAPHICAL_PARAMS (61) |
ebx - SSF_SCREEN_SIZE (1), SSF_BITS_PER_PIXEL (2), |
SSF_BYTES_PER_LINE (3) |
====================================================================== |
===== Функция 62, подфункция 0 - получить версию PCI-интерфейса. ===== |
====================================================================== |
Параметры: |
* eax = 62 - номер функции |
* bl = 0 - номер подфункции |
Возвращаемое значение: |
* eax = -1 - доступ к PCI запрещён; иначе |
* ah.al = версия PCI-интерфейса (ah=версия, al=подверсия) |
* старшее слово eax обнулено |
Замечания: |
* Предварительно должен быть разрешён низкоуровневый доступ к PCI |
для приложений подфункцией 12 функции 21. |
* Если PCI BIOS не поддерживается, то значение ax неопределено. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_PCI (62) |
ebx - SSF_GET_VERSION (0) |
====================================================================== |
==== Функция 62, подфункция 1 - получить номер последней PCI-шины. === |
====================================================================== |
Параметры: |
* eax = 62 - номер функции |
* bl = 1 - номер подфункции |
Возвращаемое значение: |
* eax = -1 - доступ к PCI запрещён; иначе |
* al = номер последней PCI-шины; оставшиеся байты eax разрушаются |
Замечания: |
* Предварительно должен быть разрешён низкоуровневый доступ к PCI |
для приложений подфункцией 12 функции 21. |
* Если PCI BIOS не поддерживается, то значение al неопределено. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_PCI (62) |
ebx - SSF_GET_LAST_BUS (1) |
====================================================================== |
====================== Функция 62, подфункция 2 ====================== |
== Получить механизм обращения к конфигурационному пространству PCI. = |
====================================================================== |
Параметры: |
* eax = 62 - номер функции |
* bl = 2 - номер подфункции |
Возвращаемое значение: |
* eax = -1 - доступ к PCI запрещён; иначе |
* al = механизм (1 или 2); прочие байты eax разрушаются |
Замечания: |
* Предварительно должен быть разрешён низкоуровневый доступ к PCI |
для приложений подфункцией 12 функции 21. |
* Механизм обращения выбирается в соответствии |
с характеристиками оборудования. |
* Подфункции чтения и записи автоматически работают |
с выбранным механизмом. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_PCI (62) |
ebx - SSF_GET_ADRR_MODE (2) |
====================================================================== |
======== Функция 62, подфункции 4,5,6 - прочитать PCI-регистр. ======= |
====================================================================== |
Параметры: |
* eax = 62 - номер функции |
* bl = 4 - читать байт |
* bl = 5 - читать слово |
* bl = 6 - читать двойное слово |
* bh = номер PCI-шины |
* ch = dddddfff, где ddddd = номер устройства на шине, |
fff = номер функции устройства |
* cl = номер регистра (должен быть чётным для bl=5, |
делиться на 4 для bl=6) |
Возвращаемое значение: |
* eax = -1 - ошибка (запрещён доступ к PCI или |
неподдерживаемые параметры); иначе |
* al/ax/eax (в зависимости от запрошенного размера) содержит данные; |
оставшаяся часть регистра eax разрушается |
Замечания: |
* Предварительно должен быть разрешён низкоуровневый доступ к PCI |
для приложений подфункцией 12 функции 21. |
* Механизм доступа 2 поддерживает только 16 устройств на шине и |
игнорирует номер функции. Получить механизм доступа можно вызовом |
подфункции 2. |
* Некоторые регистры стандартны и существуют для всех устройств, |
некоторые определяются конкретным устройством. Список первых |
входит, например, в известный Interrupt List by Ralf Brown |
(http://www.pobox.com/~ralf/files.html, |
ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/); |
список вторых должен быть указан в документации по устройству. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_PCI (62) |
ebx - SSF_READ_BYTE (4), SSF_READ_WORD (5), SSF_READ_DWORD (6) |
====================================================================== |
======= Функция 62, подфункции 8,9,10 - записать в PCI-регистр. ====== |
====================================================================== |
Параметры: |
* eax = 62 - номер функции |
* bl = 8 - писать байт |
* bl = 9 - писать слово |
* bl = 10 - писать двойное слово |
* bh = номер PCI-шины |
* ch = dddddfff, где ddddd = номер устройства на шине, |
fff = номер функции устройства |
* cl = номер регистра (должен быть чётным для bl=9, |
делиться на 4 для bl=10) |
* dl/dx/edx (в зависимости от запрошенного размера) содержит |
данные для записи |
Возвращаемое значение: |
* eax = -1 - ошибка (запрещён доступ к PCI или |
неподдерживаемые параметры) |
* eax = 0 - успешно |
Замечания: |
* Предварительно должен быть разрешён низкоуровневый доступ к PCI |
для приложений подфункцией 12 функции 21. |
* Механизм доступа 2 поддерживает только 16 устройств на шине и |
игнорирует номер функции. Получить механизм доступа можно вызовом |
подфункции 2. |
* Некоторые регистры стандартны и существуют для всех устройств, |
некоторые определяются конкретным устройством. Список первых |
входит, например, в известный Interrupt List by Ralf Brown; |
список вторых должен быть указан в документации по устройству. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_PCI (62) |
ebx - SSF_WRITE_BYTE (8), SSF_WRITE_WORD (9), SSF_WRITE_DWORD (10) |
====================================================================== |
================ Функция 63 - работа с доской отладки. =============== |
====================================================================== |
Доска отладки представляет собой системный буфер (на 4096 байт), |
в который любая программа может записать (вообще говоря, произвольные) |
данные и из которого другая программа может эти данные прочитать. |
Есть соглашение, в соответствии с которым записываемые данные - |
текстовые строки, интерпретируемые как отладочные сообщения о ходе |
выполнения программы. Ядро в определённых ситуациях также записывает |
на доску отладки сведения о выполнении некоторых функций; |
по соглашению сообщения ядра начинаются с префикса "K : ". |
Для просмотра доски отладки создано приложение board, |
которое считывает данные из буфера и отображает их в своём окне. board |
понимает последовательность кодов 13,10 как переход на новую строку. |
Символ с нулевым кодом в конце строки не обязателен, но и не мешает. |
В связи с появлением отладчика ценность доски отладки несколько |
снизилась, поскольку отладчик позволяет полностью контролировать ход |
выполнения программы, причём для этого не требуется никаких усилий |
со стороны самой программы. Тем не менее во многих случаях |
доска отладки продолжает оставаться полезной. |
---------------------------- Запись байта ---------------------------- |
Параметры: |
* eax = 63 - номер функции |
* ebx = 1 - номер подфункции |
* cl = байт данных |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Байт записывается в буфер. Длина буфера - 512 байт. |
При переполнении буфера все полученные данные теряются |
и заполнение начинается снова с нуля. |
* Для вывода на доску отладки более сложных объектов (строк, чисел) |
достаточно этой функции, вызываемой в цикле. Можно не писать |
вручную соответствующий код, а воспользоваться файлом debug.inc, |
входящим в дистрибутив. |
---------------------------- Чтение байта ---------------------------- |
Забирает байт из буфера. |
Параметры: |
* eax = 63 - номер функции |
* ebx = 2 - номер подфункции |
Возвращаемое значение: |
* eax = ebx = 0 - буфер пуст |
* eax = байт, ebx = 1 - байт успешно прочитан |
---------------------- Константы для регистров: ---------------------- |
eax - SF_BOARD (63) |
ebx - SSF_DEBUG_WRITE (1), SSF_DEBUG_READ (2) |
====================================================================== |
========== Функция 64 - перераспределить память приложения. ========== |
====================================================================== |
Параметры: |
* eax = 64 - номер функции |
* ebx = 1 - единственная подфункция |
* ecx = новый размер памяти |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = 1 - недостаточно памяти |
Замечания: |
* Есть другой способ выделения/освобождения динамической памяти - |
подфункции 11, 12, 13 функции 68. |
* Функция не может использоваться совместно с 68.11, 68.12, 68.13. |
Вызов функции будет игнорироваться, если приложение создаст |
локальную кучу вызовом 68.11. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_MEMORY_RESIZE (64) |
====================================================================== |
========= Функция 65 - вывести изображение с палитрой в окно. ======== |
====================================================================== |
Параметры: |
* eax = 65 - номер функции |
* ebx = указатель на изображение |
* ecx = [размер по оси x]*65536 + [размер по оси y] |
* edx = [координата по оси x]*65536 + [координата по оси y] |
* esi = число бит на пиксель, должно быть 1,2,4,8,9,15,16,24 или 32 |
* edi = указатель на палитру (2 в степени esi цветов 0x00RRGGBB); |
игнорируется при esi > 8 |
* ebp = смещение данных каждой следующей строки изображения |
относительно предыдущей |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Координаты изображения - это координаты верхнего левого угла |
изображения относительно окна. |
* Формат изображения с 1 битом на пиксель: каждый байт изображения, |
за исключением, быть может, последних байтов строк, содержит |
информацию о цвете 8 пикселей, старший бит соответствует первому |
пикселю. |
* Формат изображения с 2 битами на пиксель: каждый байт изображения, |
за исключением, быть может, последних байтов строк, содержит |
информацию о цвете 4 пикселей, старшие два бита соответствуют |
первому пикселю. |
* Формат изображения с 4 битами на пиксель: каждый байт изображения, |
за исключением последних байтов строк (если ширина изображения |
нечётна), содержит информацию о цвете 2 пикселей, старшая тетрада |
соответствует первому пикселю. |
* Формат изображения с 8 битами на пиксель: каждый байт изображения |
рассматривается как индекс в палитре. |
* Формат изображения с 9 битами на пиксель: каждый байт изображения |
(8 бит) обозначает интенсивность серого для одного пикселя, т.о. |
этот тип изображения идентичен 8 бит на пиксель без палитры. |
* Формат изображения с 15 битами на пиксель: цвет каждого пикселя |
кодируется как (в битовом представлении) 0RRRRRGGGGGBBBBB - |
по 5 пикселей на каждый цвет. |
* Формат изображения с 16 битами на пиксель: цвет каждого пикселя |
кодируется как RRRRRGGGGGGBBBBB (схема 5+6+5). |
* Формат изображения с 24 битами на пиксель: цвет каждого пикселя |
кодируется тремя байтами - последовательно синяя, зелёная, красная |
составляющие цвета. |
* Формат изображения с 32 битами на пиксель: аналогично 24, только |
есть ещё игнорируемый четвёртый байт. |
* Вызов функции 7 эквивалентен вызову этой функции с параметрами |
esi=24, ebp=0. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_PUT_IMAGE_EXT (65) |
====================================================================== |
================= Функция 66 - работа с клавиатурой. ================= |
====================================================================== |
Режим ввода влияет на результаты чтения клавиш функцией 2. |
При загрузке программы для неё устанавливается ASCII-режим ввода. |
-------- Подфункция 1 - установить режим ввода с клавиатуры. --------- |
Параметры: |
* eax = 66 - номер функции |
* ebx = 1 - номер подфункции |
* ecx = режим: |
* 0 = обычный (ASCII-символы) |
* 1 = сканкоды |
Возвращаемое значение: |
* функция не возвращает значения |
--------- Подфункция 2 - получить режим ввода с клавиатуры. ---------- |
Параметры: |
* eax = 66 - номер функции |
* ebx = 2 - номер подфункции |
Возвращаемое значение: |
* eax = текущий режим |
------- Подфункция 3 - получить состояние управляющих клавиш. -------- |
Параметры: |
* eax = 66 - номер функции |
* ebx = 3 - номер подфункции |
Возвращаемое значение: |
* eax = битовая маска: |
* бит 0 (маска 1): левый Shift нажат |
* бит 1 (маска 2): правый Shift нажат |
* бит 2 (маска 4): левый Ctrl нажат |
* бит 3 (маска 8): правый Ctrl нажат |
* бит 4 (маска 0x10): левый Alt нажат |
* бит 5 (маска 0x20): правый Alt нажат |
* бит 6 (маска 0x40): CapsLock включён |
* бит 7 (маска 0x80): NumLock включён |
* бит 8 (маска 0x100): ScrollLock включён |
* бит 9 (маска 0x200): левый Win нажат |
* бит 10 (маска 0x400): правый Win нажат |
* прочие биты сброшены |
----- Подфункция 4 - установить общесистемную "горячую клавишу". ----- |
О нажатии "горячей клавиши" извещаются только приложения, |
установившие её; активное приложение (к которому поступает |
весь нормальный ввод) таких клавиш не получает. |
Извещение заключается в посылке события с кодом 2. |
Прочитать "горячую клавишу" можно так же, как и обычную, - |
функцией 2. |
Параметры: |
* eax = 66 - номер функции |
* ebx = 4 - номер подфункции |
* cl задаёт сканкод клавиши; |
используйте cl=0 для задания комбинаций типа Ctrl+Shift |
* edx = 0xXYZ задаёт возможные состояния управляющих клавиш: |
* Z (младшие 4 бита) задаёт состояние клавиш LShift и RShift: |
* 0 = ни одна из клавиш не должна быть нажата; |
* 1 = ровно одна из клавиш должна быть нажата; |
* 2 = обе клавиши должны быть нажаты; |
* 3 = должна быть нажата LShift, но не RShift; |
* 4 = должна быть нажата RShift, но не LShift |
* Y - аналогично для LCtrl и RCtrl; |
* X - аналогично для LAlt и RAlt |
Возвращаемое значение: |
* eax=0 - успешно |
* eax=1 - слишком много "горячих клавиш" (допускается максимум 256) |
Замечания: |
* Горячая клавиша может срабатывать либо при нажатии, |
либо при отпускании. Сканкод отпускания клавиши на 128 больше, |
чем сканкод нажатия (т.е. установлен старший бит). |
* Несколько приложений могут установить одну и ту же комбинацию; |
о нажатии такой комбинации будут извещаться все такие приложения. |
------ Подфункция 5 - удалить установленную "горячую клавишу". ------- |
Параметры: |
* eax = 66 - номер функции |
* ebx = 5 - номер подфункции |
* cl = сканкод клавиши и edx = 0xXYZ такие же, как и в подфункции 4 |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = 1 - нет такой горячей клавиши |
Замечания: |
* При завершении процесса/потока удаляются все установленные им |
горячие клавиши. |
* Вызов функции не влияет на другие приложения. |
Если другое приложение определило эту же комбинацию, |
оно по-прежнему будет получать уведомления. |
------------- Подфункция 6 - заблокировать обычный ввод. ------------- |
Параметры: |
* eax = 66 - номер функции |
* ebx = 6 - номер подфункции |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Блокируется обычный ввод данных с клавиатуры для установленных |
"горячих" клавиш |
* Для эмуляции мыши через клавиатуру, приложение MOUSEMUL |
--------- Подфункция 7 - разблокировать обычный ввод. ---------------- |
Параметры: |
* eax = 66 - номер функции |
* ebx = 7 - номер подфункции |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Разблокирование результатов ф. 66.6 |
* Для эмуляции мыши через клавиатуру, приложение MOUSEMUL |
---------------------- Константы для регистров: ---------------------- |
eax - SF_KEYBOARD (66) |
ebx - SSF_SET_INPUT_MODE (1), SSF_GET_INPUT_MODE (2), |
SSF_GET_CONTROL_KEYS (3), SSF_SET_SYS_HOTKEY (4), |
SSF_DEL_SYS_HOTKEY (5), SSF_LOCK_INPUT (6), SSF_UNLOCK_INPUT (7) |
====================================================================== |
============ Функция 67 - изменить положение/размеры окна. =========== |
====================================================================== |
Параметры: |
* eax = 67 - номер функции |
* ebx = новая x-координата окна |
* ecx = новая y-координата окна |
* edx = новый x-размер окна |
* esi = новый y-размер окна |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Значение -1 для параметра означает "не изменять"; например, для |
перемещения окна без изменения размеров можно указать edx=esi=-1. |
* Предварительно окно должно быть определено функцией 0. |
Она же задаёт начальные координаты и размеры окна. |
* Размеры окна понимаются в смысле функции 0, т.е. |
на один пиксель меньше, чем реальные размеры. |
* Вызов функции для максимизированных окон просто игнорируется. |
* Для окон соответствующих стилей положение и/или размеры могут быть |
изменены пользователем; текущие положение и размеры могут быть |
получены вызовом функции 9. |
* Функция посылает окну событие перерисовки (с кодом 1). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_CHANGE_WINDOW (67) |
====================================================================== |
=== Функция 68, подфункция 0 - получить счётчик переключений задач. == |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 0 - номер подфункции |
Возвращаемое значение: |
* eax = число переключений задач с момента загрузки системы |
(по модулю 2^32) |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_GET_TASK_SWITCH_COUNT (0) |
====================================================================== |
====================== Функция 68, подфункция 1 ====================== |
============ Переключиться на следующий поток выполнения. ============ |
====================================================================== |
Функция завершает текущий квант времени, выделенный потоку, |
и переключается на следующий. |
(Какой поток какого процесса будет следующим, предсказать нельзя). |
Позднее, когда до текущего потока дойдёт очередь, |
выполнение возобновится. |
Параметры: |
* eax = 68 - номер функции |
* ebx = 1 - номер подфункции |
Возвращаемое значение: |
* функция не возвращает значения |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_SWITCH_TASK (1) |
====================================================================== |
=============== Функция 68, подфункция 2 - кэш + rdpmc. ============== |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 2 - номер подфункции |
* ecx = требуемое действие: |
* ecx = 0 - разрешить выполнение инструкции rdpmc |
(ReaD Performance-Monitoring Counters) |
* ecx = 1 - узнать, включён/выключен кэш |
* ecx = 2 - включить кэш |
* ecx = 3 - выключить кэш |
Возвращаемое значение: |
* для ecx=0: |
* eax = значение cr4 |
* для ecx=1: |
* eax = (cr0 and 0x60000000): |
* eax = 0 - кэш включён |
* eax <> 0 - кэш выключен |
* для ecx=2 и ecx=3: |
* функция не возвращает значения |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_PERFORMANCE (2) |
ecx - SSSF_ALLOW_RDPMC (0), SSSF_CACHE_STATUS (1), |
SSSF_CACHE_ON (2), SSSF_CACHE_OFF (3) |
====================================================================== |
========== Функция 68, подфункция 3 - прочитать MSR-регистр. ========= |
====================================================================== |
MSR = Model Specific Register; полный список MSR-регистров процессора |
содержится в документации по процессору (например, IA-32 Intel |
Architecture Software Developer's Manual, Volume 3, Appendix B); |
каждое семейство процессоров имеет своё подмножество MSR-регистров. |
Параметры: |
* eax = 68 - номер функции |
* ebx = 3 - номер подфункции |
* ecx игнорируется |
* edx = адрес MSR |
Возвращаемое значение: |
* ebx:eax = старший:младший dword результата |
Замечания: |
* Указание в ecx несуществующего или нереализованного для данного |
процессора MSR повлечёт исключение в ядре, которое прибьёт поток. |
* Предварительно следует определить, поддерживаются ли MSR в целом, |
командой cpuid. Иначе возникнет уже другое исключение в ядре, |
которое всё равно прибьёт поток. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_READ_MSR (3) |
====================================================================== |
========= Функция 68, подфункция 4 - записать в MSR-регистр. ========= |
====================================================================== |
MSR = Model Specific Register; полный список MSR-регистров процессора |
содержится в документации по процессору (например, IA-32 Intel |
Architecture Software Developer's Manual, Volume 3, Appendix B); |
каждое семейство процессоров имеет своё подмножество MSR-регистров. |
Параметры: |
* eax = 68 - номер функции |
* ebx = 4 - номер подфункции |
* ecx игнорируется |
* edx = адрес MSR |
* esi:edi = старший:младший dword |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Указание в ecx несуществующего или нереализованного для данного |
процессора MSR повлечёт исключение в ядре, которое прибьёт поток. |
* Предварительно следует определить, поддерживаются ли MSR в целом, |
командой cpuid. Иначе возникнет уже другое исключение в ядре, |
которое всё равно прибьёт поток. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_WRITE_MSR (4) |
====================================================================== |
===== Функция 68, подфункция 11 - инициализировать кучу процесса. ==== |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 11 - номер подфункции |
Возвращаемое значение: |
* eax = 0 - неуспех |
* иначе размер созданной кучи |
Замечания: |
* Вызов функции инициализирует кучу, из которой впоследствии можно |
выделять и освобождать блоки памяти подфункциями 12, 13 и 20. |
* Если куча уже создана, функция вернёт размер существующей кучи. |
Размер кучи равен размеру всей свободной памяти приложения. |
* После создания кучи вызовы функции 64 игнорируются. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_HEAP_INIT (11) |
====================================================================== |
========== Функция 68, подфункция 12 - выделить блок памяти. ========= |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 12 - номер подфункции |
* ecx = требуемый размер в байтах |
Возвращаемое значение: |
* eax = указатель на выделенный блок |
Замечания: |
* Функция выделяет целое число страниц (4 Кб) так, что фактический |
размер выделенного блока больше или равен запрошенному. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_MEM_ALLOC (12) |
====================================================================== |
========= Функция 68, подфункция 13 - освободить блок памяти. ======== |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 13 - номер подфункции |
* ecx = указатель на блок памяти |
Возвращаемое значение: |
* eax = 1 - успешно |
* eax = 0 - неудача |
Замечания: |
* Блок памяти должен быть ранее выделен подфункцией 12 |
или подфункцией 20. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_MEM_FREE (13) |
====================================================================== |
====================== Функция 68, подфункция 14 ===================== |
====== Ожидать получения сигнала от других приложений/драйверов. ===== |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 14 - номер подфункции |
* ecx = указатель на буфер для информации (24 байта) |
Возвращаемое значение: |
* eax разрушается |
* буфер, на который указывает ecx, содержит следующую информацию: |
* +0: dword: идентификатор последующих данных сигнала |
* +4: данные принятого сигнала (20 байт), формат которых |
определяется первым dword-ом |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_WAIT_SIGNAL (14) |
====================================================================== |
=========== Функция 68, подфункция 16 - загрузить драйвер. =========== |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 16 - номер подфункции |
* ecx = указатель на ASCIIZ-строку с именем драйвера |
Возвращаемое значение: |
* eax = 0 - неудача |
* иначе eax = хэндл драйвера |
Замечания: |
* Если драйвер ещё не загружен, он загружается; |
если драйвер уже загружен, ничего не меняется. |
* Имя драйвера чувствительно к регистру символов. |
Максимальная длина имени - 16 символов, включая завершающий |
нулевой символ, остальные символы игнорируются. |
* Драйвер с именем ABC загружается из файла /rd/1/drivers/ABC.sys. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_LOAD_DRIVER (16) |
====================================================================== |
========== Функция 68, подфункция 17 - управление драйвером. ========= |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 17 - номер подфункции |
* ecx = указатель на управляющую структуру: |
* +0: dword: хэндл драйвера |
* +4: dword: код функции драйвера |
* +8: dword: указатель на входные данные |
* +12 = +0xC: dword: размер входных данных |
* +16 = +0x10: dword: указатель на выходные данные |
* +20 = +0x14: dword: размер выходных данных |
Возвращаемое значение: |
* eax = определяется драйвером |
Замечания: |
* Коды функций и структура входных/выходных данных |
определяются драйвером. |
* Предварительно должен быть получен хэндл драйвера подфункцией 16. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_CONTROL_DRIVER (17) |
====================================================================== |
== Функция 68, подфункция 18 - загрузить DLL с указанием кодировки. == |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 18 - номер подфункции |
* ecx = указатель на строку с путём к DLL |
* edx = кодировка строки, подробности указаны в описании функции 80. |
Возвращаемое значение: |
* eax = 0 - неудача |
* иначе eax = указатель на таблицу экспорта DLL |
Замечания: |
* Таблица экспорта представляет собой массив структур по 2 dword'а, |
заканчивающийся нулём. Первый dword в структуре является |
указателем на имя функции, второй содержит адрес функции. |
====================================================================== |
============= Функция 68, подфункция 19 - загрузить DLL. ============= |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 19 - номер подфункции |
* ecx = указатель на строку с путём к DLL, |
правила формирования строки указаны в описании функции 70. |
Возвращаемое значение: |
* eax = 0 - неудача |
* иначе eax = указатель на таблицу экспорта DLL |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_LOAD_DLL (19) |
====================================================================== |
====== Функция 68, подфункция 20 - перераспределить блок памяти. ===== |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 20 - номер подфункции |
* ecx = новый размер в байтах |
* edx = указатель на уже выделенный блок памяти |
Возвращаемое значение: |
* eax = указатель на перераспределённый блок, 0 при ошибке |
Замечания: |
* Предварительно следует инициализировать кучу процесса вызовом |
подфункции 11. |
* Функция выделяет целое число страниц (4 Кб) так, что фактический |
размер выделенного блока больше или равен запрошенному. |
* Если edx=0, то вызов функции эквивалентен выделению памяти |
подфункцией 12. В противном случае блок памяти по адресу edx |
должен быть ранее выделен подфункцией 12 или |
описываемой подфункцией. |
* Если ecx=0, то функция освобождает блок памяти по адресу edx и |
возвращает 0. |
* Содержимое памяти вплоть до наименьшего из старого и нового |
размеров сохраняется. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_MEM_REALLOC (20) |
====================================================================== |
========= Функция 68, подфункция 21 - загрузить драйвер PE. ========== |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 21 - номер подфункции |
* ecx = указатель на ASCIIZ-строку с именем драйвера |
* edx = указатель на командную строку |
Возвращаемое значение: |
* eax = 0 - неудача |
* иначе eax = хэндл драйвера |
Замечания: |
* Если драйвер ещё не загружен, он загружается; |
если драйвер уже загружен, ничего не меняется. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_LOAD_DRIVER_PE (21) |
====================================================================== |
=== Функция 68, подфункция 22 - открыть именованную область памяти. == |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 22 - номер подфункции |
* ecx = имя области. Максимум 31 символ, включая завершающий ноль |
* edx = размер области в байтах для SHM_CREATE и SHM_OPEN_ALWAYS |
* esi = флаги открытия и доступа: |
* SHM_OPEN = 0x00 - открыть существующую область памяти. |
Если область с таким именем не существует, |
функция вернёт код ошибки 5. |
* SHM_OPEN_ALWAYS = 0x04 - открыть существующую или создать новую |
область памяти. |
* SHM_CREATE = 0x08 - создать новую область памяти. |
Если область с таким именем уже существует, |
функция вернёт код ошибки 10. |
* SHM_READ = 0x00 - доступ только на чтение |
* SHM_WRITE = 0x01 - доступ на чтение и запись |
Возвращаемое значение: |
* eax = указатель на область памяти, 0 при ошибке |
* при создании новой области (SHM_CREATE или SHM_OPEN_ALWAYS): |
edx = 0 - успех, иначе - код ошибки |
* при открытии существующей области (SHM_OPEN или SHM_OPEN_ALWAYS): |
edx = код ошибки (при eax=0) или размер области в байтах |
Коды ошибок: |
* E_NOTFOUND = 5 |
* E_ACCESS = 10 |
* E_NOMEM = 30 |
* E_PARAM = 33 |
Замечания: |
* Предварительно следует инициализировать кучу процесса вызовом |
подфункции 11. |
* Если создаётся новая область, то флаги доступа устанавливают |
максимальные права доступа для остальных процессов. Попытка |
открытия другим потоком с неразрешёнными правами провалится |
с кодом ошибки E_ACCESS. |
* Процесс, создавший область, всегда имеет доступ на запись. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_MEM_OPEN (22) |
====================================================================== |
=== Функция 68, подфункция 23 - закрыть именованную область памяти. == |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 23 - номер подфункции |
* ecx = имя области. Максимум 31 символ, включая завершающий ноль |
Возвращаемое значение: |
* eax разрушается |
Замечания: |
* Область памяти физически освобождается (с забыванием всех данных |
и высвобождением физической памяти), когда её закроют |
все открывшие потоки. |
* При завершении потока освобождаются все открытые им |
области памяти. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_MEM_CLOSE (23) |
====================================================================== |
==== Функция 68, подфункция 24 - установить обработчик исключений. === |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 24 - номер подфункции |
* ecx = адрес нового обработчика исключений |
* edx = маска обрабатываемых исключений |
Возвращаемое значение: |
* eax = адрес старого обработчика исключений (0, если не установлен) |
* ebx = маска старого обработчика исключений |
Замечания: |
* Номер бита в маске исключений соответствует номеру исключения по |
спецификации на процессор (Intel-PC). Так, например, исключения |
FPU имеют номер 16 (#MF), а SSE - 19 (#XF). |
* В данной реализации игнорируется запрос на перехват исключения 7 |
- система обрабатывает #NM самостоятельно. |
* Пользовательский обработчик получает номер исключения параметром |
в стеке. Поэтому правильный выход из обработчика: RET 4. Возврат |
при этом производится на команду, вызвавшую исключение. |
* При передаче управления обработчику исключений сбрасывается |
соответствующий бит в маске исключений. Возникновение этого же |
исключения впоследствии приведёт к умолчальной обработке такового. |
А именно: к завершению работы приложения в отсутствии отладчика, |
приостановка с уведомлением отлаживающего приложения иначе. |
* После завершения критических действий в обработчике пользователя |
восстановление бита маски данного исключения можно сделать |
подфункцией 25. Сброс флагов исключений в модулях FPU и XMM также |
возлагается на обработчик пользователя. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_SET_EXCEPTION_HANDLER (24) |
====================================================================== |
= Функция 68, подфункция 25 - изменить состояние активности сигнала. = |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 25 - номер подфункции |
* ecx = номер сигнала |
* edx = значение устанавливаемой активности (0/1) |
Возвращаемое значение: |
* eax = -1 - задан неверный номер сигнала |
* иначе eax = старое значение активности сигнала (0/1) |
Замечания: |
* В текущей реализации изменяется только маска пользовательского |
обработчика исключений, установленного подфункцией 24. При этом |
номер сигнала соответствует номеру исключения. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_SET_EXCEPTION_STATE (25) |
====================================================================== |
======= Функция 68, подфункция 26 - освободить страницы памяти ======= |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 26 - номер подфункции |
* ecx = указатель на блок памяти выделенный подфункцией 12 |
* edx = смещение от начала блока |
* esi = размер высвобождаемого блока памяти, в байтах |
Примечания: |
* функция освобождает страницы с ecx+edx по ecx+edx+esi |
и устанавливает виртуальную память в зарезервированное состояние. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_MEM_FREE_EXT (26) |
====================================================================== |
============= Функция 68, подфункция 27 - загрузить файл ============= |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 27 - номер подфункции |
* ecx = указатель на строку с путём к файлу, |
правила формирования строки указаны в описании функции 70. |
Возвращаемое значение: |
* eax = указатель на загруженный файл или 0 |
* edx = размер загруженного файла или 0 |
Примечания: |
* функция загружает и, при необходимости, распаковывает файл (kunpack) |
* Предварительно следует инициализировать кучу процесса вызовом |
подфункции 11. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_LOAD_FILE (27) |
====================================================================== |
== Функция 68, подфункция 28 - загрузить файл с указанием кодировки == |
====================================================================== |
Параметры: |
* eax = 68 - номер функции |
* ebx = 28 - номер подфункции |
* ecx = указатель на строку с путём к файлу |
* edx = кодировка строки, подробности указаны в описании функции 80. |
Возвращаемое значение: |
* eax = указатель на загруженный файл или 0 |
* edx = размер загруженного файла или 0 |
Примечания: |
* функция загружает и, при необходимости, распаковывает файл (kunpack) |
====================================================================== |
======================== Функция 69 - отладка. ======================= |
====================================================================== |
Процесс может загрузить другой процесс как отлаживаемый установкой |
соответствующего бита при вызове подфункции 7 функции 70. |
У процесса может быть только один отладчик; один процесс может |
отлаживать несколько разных. Система уведомляет отладчик о событиях, |
происходящих с отлаживаемым процессом. Сообщения записываются в буфер, |
определённый подфункцией 0. |
Формат сообщения: |
* +0: dword: код сообщения |
* +4: dword: PID отлаживаемого процесса |
* +8: могут присутствовать дополнительные данные, |
определяемые кодом сообщения |
Коды сообщений: |
* 1 = исключение |
* дополнительно передаётся dword-номер исключения |
* процесс приостановлен |
* 2 = процесс завершился |
* приходит при любом завершении: как через системную функцию -1, |
так и при "убийстве" любым другим процессом |
(в том числе самим отладчиком) |
* 3 = отладочное исключение int 1 = #DB |
* дополнительно передаётся dword-образ регистра DR6: |
* биты 0-3: выполнено условие соответствующей точки останова |
(установленной подфункцией 9) |
* бит 14: исключение произошло из-за режима |
пошаговой трассировки (установлен флаг TF) |
* процесс приостановлен |
При завершении отладчика прибиваются все отлаживаемые процессы. |
Если отладчик этого не хочет, он должен предварительно отключиться |
подфункцией 3. |
Все подфункции применимы только к процессам/потокам, запущенным |
из текущего функцией 70 с установленным флагом отладки. |
Отладка многопоточных программ пока не поддерживается. |
Полный список подфункций: |
* подфункция 0 - определить область данных для отладочных сообщений |
* подфункция 1 - получить состояние регистров отлаживаемого потока |
* подфункция 2 - установить состояние регистров отлаживаемого потока |
* подфункция 3 - отключиться от отлаживаемого процесса |
* подфункция 4 - приостановить отлаживаемый поток |
* подфункция 5 - возобновить выполнение отлаживаемого потока |
* подфункция 6 - прочитать из памяти отлаживаемого процесса |
* подфункция 7 - записать в память отлаживаемого процесса |
* подфункция 8 - завершить отлаживаемый поток |
* подфункция 9 - установить/снять аппаратную точку останова |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_SET_MESSAGE_AREA (0), SSF_GET_REGISTERS (1), |
SSF_SET_REGISTERS (2), SSF_DETACH (3), SSF_SUSPEND (4), |
SSF_RESUME (5), SSF_READ_MEMORY (6), SSF_WRITE_MEMORY (7), |
SSF_TERMINATE (8), SSF_DEFINE_BREAKPOINT (9) |
====================================================================== |
====================== Функция 69, подфункция 0 ====================== |
========= Определить область данных для отладочных сообщений. ======== |
====================================================================== |
Параметры: |
* eax = 69 - номер функции |
* ebx = 0 - номер подфункции |
* ecx = указатель |
Формат области данных: |
* +0: dword: N = размер буфера (не считая этого заголовка) |
* +4: dword: занято в буфере |
* +8: N*byte: буфер |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Если поле размера отрицательно, буфер считается заблокированным |
и при поступлении нового сообщения система будет ждать. |
Для синхронизации обрамляйте всю работу с буфером операциями |
блокировки/разблокировки |
neg [bufsize] |
* Данные в буфере трактуются как массив элементов переменной длины - |
сообщений. Формат сообщения указан в общем описании. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_SET_MESSAGE_AREA (0) |
====================================================================== |
====================== Функция 69, подфункция 1 ====================== |
========= Получить состояние регистров отлаживаемого потока. ========= |
====================================================================== |
Параметры: |
* eax = 69 - номер функции |
* ebx = 1 - номер подфункции |
* ecx = идентификатор потока |
* edx = длина структуры контекста, должно быть 0x28=40 байт |
* esi = указатель на структуру контекста |
Возвращаемое значение: |
* функция не возвращает значения |
Формат структуры контекста: (FPU пока не поддерживается) |
* +0: dword: eip |
* +4: dword: eflags |
* +8: dword: eax |
* +12 = +0xC: dword: ecx |
* +16 = +0x10: dword: edx |
* +20 = +0x14: dword: ebx |
* +24 = +0x18: dword: esp |
* +28 = +0x1C: dword: ebp |
* +32 = +0x20: dword: esi |
* +36 = +0x24: dword: edi |
Замечания: |
* Если поток выполняет код 0-кольца, возвращается |
состояние регистров 3-кольца. |
* Процесс должен быть загружен для отладки (как указано в |
общем описании). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_GET_REGISTERS (1) |
====================================================================== |
====================== Функция 69, подфункция 2 ====================== |
======== Установить состояние регистров отлаживаемого потока. ======== |
====================================================================== |
Параметры: |
* eax = 69 - номер функции |
* ebx = 2 - номер подфункции |
* ecx = идентификатор потока |
* edx = длина структуры контекста, должно быть 0x28=40 байт |
* esi = указатель на структуру контекста |
Возвращаемое значение: |
* функция не возвращает значения |
Формат структуры контекста указан в описании подфункции 1. |
Замечания: |
* Если поток выполняет код 0-кольца, устанавливается |
состояние регистров 3-кольца. |
* Процесс должен быть загружен для отладки (как указано в |
общем описании). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_SET_REGISTERS (2) |
====================================================================== |
== Функция 69, подфункция 3 - отключиться от отлаживаемого процесса. = |
====================================================================== |
Параметры: |
* eax = 69 - номер функции |
* ebx = 3 - номер подфункции |
* ecx = идентификатор |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Если процесс был приостановлен, он возобновляет выполнение. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_DETACH (3) |
====================================================================== |
==== Функция 69, подфункция 4 - приостановить отлаживаемый поток. ==== |
====================================================================== |
Параметры: |
* eax = 69 - номер процесса |
* ebx = 4 - номер подфункции |
* ecx = идентификатор |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Процесс должен быть загружен для отладки (как указано в |
общем описании). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_SUSPEND (4) |
====================================================================== |
====================== Функция 69, подфункция 5 ====================== |
============ Возобновить выполнение отлаживаемого потока. ============ |
====================================================================== |
Параметры: |
* eax = 69 - номер функции |
* ebx = 5 - номер подфункции |
* ecx = идентификатор |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Процесс должен быть загружен для отладки (как указано в |
общем описании). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_RESUME (5) |
====================================================================== |
====================== Функция 69, подфункция 6 ====================== |
============= Прочитать из памяти отлаживаемого процесса. ============ |
====================================================================== |
Параметры: |
* eax = 69 - номер функции |
* ebx = 6 - номер подфункции |
* ecx = идентификатор |
* edx = сколько байт читать |
* esi = адрес памяти отлаживаемого процесса |
* edi = указатель на буфер для данных |
Возвращаемое значение: |
* eax = -1 при ошибке (неверный PID или буфер) |
* иначе eax = число прочитанных байт (возможно, 0, |
если в esi слишком большое значение) |
Замечания: |
* Процесс должен быть загружен для отладки (как указано в |
общем описании). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_READ_MEMORY (6) |
====================================================================== |
Функция 69, подфункция 7 - записать в память отлаживаемого процесса. |
====================================================================== |
Параметры: |
* eax = 69 - номер функции |
* ebx = 7 - номер подфункции |
* ecx = идентификатор |
* edx = сколько байт писать |
* esi = адрес памяти в отлаживаемом процессе |
* edi = указатель на данные |
Возвращаемое значение: |
* eax = -1 при ошибке (неверный PID или буфер) |
* иначе eax = число записанных байт (возможно, 0, |
если в esi слишком большое значение) |
Замечания: |
* Процесс должен быть загружен для отладки (как указано в |
общем описании). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_WRITE_MEMORY (7) |
====================================================================== |
====== Функция 69, подфункция 8 - завершить отлаживаемый поток. ====== |
====================================================================== |
Параметры: |
* eax = 69 - номер функции |
* ebx = 8 - номер подфункции |
* ecx = идентификатор |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Процесс должен быть загружен для отладки (как указано в |
общем описании). |
* Функция аналогична подфункции 2 функции 18 с двумя отличиями: |
требуется выполнение первого замечания и принимается PID, |
а не номер слота. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_TERMINATE (8) |
====================================================================== |
====================== Функция 69, подфункция 9 ====================== |
============= Установить/снять аппаратную точку останова. ============ |
====================================================================== |
Параметры: |
* eax = 69 - номер функции |
* ebx = 9 - номер подфункции |
* ecx = идентификатор потока |
* dl = индекс точки останова, от 0 до 3 включительно |
* dh = флаги: |
* если старший бит сброшен - установить точку останова: |
* биты 0-1 - условие: |
* 00 = точка останова на выполнение |
* 01 = точка останова на запись |
* 11 = точка останова на чтение/запись |
* биты 2-3 - длина; для точек останова на исполнение должно быть |
00, в противном случае одно из |
* 00 = байт |
* 01 = слово |
* 11 = двойное слово |
* esi = адрес точки останова; должен быть выровнен |
соответственно длине (т.е. должен быть чётным для |
точек останова на слово, кратен 4 для двойного слова) |
* если старший бит установлен - сбросить точку останова |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = 1 - ошибка во входных данных |
* eax = 2 - (зарезервировано, никогда не возвращается |
в текущей реализации) с этим индексом уже установлена |
глобальная точка останова |
Замечания: |
* Процесс должен быть загружен для отладки (как указано в |
общем описании). |
* Аппаратные точки останова реализуются через DRx-регистры |
процессора, отсюда все ограничения. |
* Функция может переустановить ранее установленную ей же |
точку останова (никак не сообщая об этом). |
Ведите список установленных точек останова в отладчике. |
* Срабатывание точки останова заключается в генерировании |
отладочного исключения #DB, о котором система сообщает отладчику. |
* Точка останова на запись и чтение/запись срабатывает после |
выполнения вызвавшей её инструкции. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_DEFINE_BREAKPOINT (9) |
====================================================================== |
= Функция 70 - работа с файловой системой с поддержкой длинных имён. = |
====================================================================== |
Параметры: |
* eax = 70 |
* ebx = указатель на информационную структуру |
Возвращаемое значение: |
* eax = 0 - успешно; иначе код ошибки файловой системы |
* в зависимости от подфункции может возвращаться значение и |
в других регистрах |
Общий формат информационной структуры: |
* +0: dword: номер подфункции |
* +4: dword: смещение в файле или папке |
* +8: dword: старшая часть смещения или поле флагов |
* +12 = +0xC: dword: размер данных |
* +16 = +0x10: dword: указатель на данные |
* +20 = +0x14: ?: текстовая строка - путь к файлу, заканчивается нулём |
или |
* +20 = +0x14: byte: 0 |
* +21 = +0x15: dword: указатель на строку |
Чувствительность к регистру букв зависит от файловой системы. |
Если путь начинается не с '/', то он считается относительным. |
Получить или установить текущую папку можно с помощью сисфункции 30. |
'../' в пути означает подъём на одну папку относительно текущей. |
Можно указать кодировку строки, поместив в её начале байт со значениями: |
* 1 = cp866 |
* 2 = UTF-16LE |
* 3 = UTF-8 |
иначе будет использоваться кодировка cp866. В абсолютном пути можно |
поместить этот байт после '/' или добавить дополнительный '/' перед ним. |
Также, можно использовать сисфункцию 80. |
Формат абсолютного пути: |
/base/number/dir1/dir2/.../dirn/file, |
где base/number идентифицирует устройство, на котором ищется файл: |
* RD/1 = рамдиск |
* FD/1 = первый флоппи-дисковод, |
FD/2 = второй флоппи-дисковод |
* HD0/x, HD1/x, HD2/x, HD3/x = жёсткие диски соответственно на |
IDE0 (Primary Master), IDE1 (Primary Slave), |
IDE2 (Secondary Master), IDE3 (Secondary Slave); |
x - номер раздела на выбранном винчестере, начиная с 1 |
* CD0/1, CD1/1, CD2/1, CD3/1 = аналогично для cd |
* SYS - системная папка (является ключом, не зависит от кодировки), |
второй ключ может быть установлен сисфункцией 30.3. |
Примеры: |
* '/sys/example.asm',0 |
* '/rd/1/example.asm',0 |
* '/HD0/1/folder/file.txt',0 |
* '/hd2/2/pics/tanzania.bmp',0 |
* 2,'/',0,'sys','/',0,'F',0,'I',0,'L',0,'E',0,0,0 |
Доступные подфункции: |
* подфункция 0 - чтение файла |
* подфункция 1 - чтение папки |
* подфункция 2 - создание/перезапись файла |
* подфункция 3 - запись в существующий файл |
* подфункция 4 - установка размера файла |
* подфункция 5 - получение атрибутов файла/папки |
* подфункция 6 - установка атрибутов файла/папки |
* подфункция 7 - запуск программы |
* подфункция 8 - удаление файла/папки |
* подфункция 9 - создание папки |
Для CD-приводов в связи с аппаратными ограничениями доступны |
только подфункции 0,1,5 и 7, вызов других подфункций завершится |
ошибкой с кодом 2. |
При первом обращении подфункций 0,1,5,7 к устройствам ATAPI |
(CD и DVD) производится блокировка ручного управления механизмом |
лотка. Это связано с кэшированием данных, полученных от привода. |
Разблокировка осуществляется при обращении подфункции 4 функции 24 |
к соответствующему устройству. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_READ_FILE (0), SSF_READ_FOLDER (1), SSF_CREATE_FILE (2), |
SSF_WRITE_FILE (3), SSF_SET_END (4), SSF_GET_INFO (5), |
SSF_SET_INFO (6), SSF_START_APP (7), SSF_DELETE (8), |
SSF_CREATE_FOLDER (9) |
====================================================================== |
= Функция 70, подфункция 0 - чтение файла с поддержкой длинных имён. = |
====================================================================== |
Параметры: |
* eax = 70 - номер функции |
* ebx = указатель на информационную структуру |
Формат информационной структуры: |
* +0: dword: 0 = номер подфункции |
* +4: dword: позиция в файле (в байтах) |
* +8: dword: 0 (зарезервировано под старший dword позиции) |
* +12 = +0xC: dword: сколько байт читать |
* +16 = +0x10: dword: указатель на буфер, куда будут записаны данные |
* +20 = +0x14: путь, правила формирования имён указаны в общем описании |
Возвращаемое значение: |
* eax = 0 - успешно, иначе код ошибки файловой системы |
* ebx = число прочитанных байт |
Замечания: |
* Если файл кончился раньше, чем был прочитан последний запрошенный |
блок, то функция прочитает, сколько сможет, после чего вернёт |
eax=6 (EOF). |
* Функция не позволяет читать папки |
(вернётся eax=10, access denied). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_READ_FILE (0) |
====================================================================== |
= Функция 70, подфункция 1 - чтение папки с поддержкой длинных имён. = |
====================================================================== |
Параметры: |
* eax = 70 - номер функции |
* ebx = указатель на информационную структуру |
Формат информационной структуры: |
* +0: dword: 1 = номер подфункции |
* +4: dword: индекс начального блока (считая с 0) |
* +8: dword: в какой кодировке возвращать имена: |
0 = по умолчанию |
1 = cp866 |
2 = UTF-16LE |
3 = UTF-8 |
* +12 = +0xC: dword: сколько блоков читать |
* +16 = +0x10: dword: указатель на буфер, куда будут записаны данные. |
* +20 = +0x14: путь, правила формирования имён указаны в общем описании |
Возвращаемое значение: |
* eax = 0 - успешно, иначе код ошибки файловой системы |
* ebx = число файлов, информация о которых была записана в буфер |
Структура буфера: |
* заголовок (32 байта) |
* блок с информацией о файле 1 |
* блок с информацией о файле 2 |
* ... |
Структура заголовка: |
* +0: dword: версия структуры (текущая версия = 1) |
* +4: dword: количество размещённых блоков; не больше, чем запрошено |
в поле +12 информационной структуры; может быть меньше, |
если в папке кончились файлы (то же самое, что и в ebx) |
* +8: dword: общее число файлов в папке |
* +12 = +0xC: 20*byte: зарезервировано (нули) |
Структура блока данных входа каталога (БДВК): |
* +0: dword: атрибуты файла: |
* бит 0 (маска 1): файл только для чтения |
* бит 1 (маска 2): файл является скрытым |
* бит 2 (маска 4): файл является системным |
* бит 3 (маска 8): это метка тома (возвращается подфункцией 5) |
* бит 4 (маска 0x10): это папка |
* бит 5 (маска 0x20): файл не архивировался - многие программы |
архивации имеют опцию, по которой архивируются только файлы |
с установленным этим битом, после чего этот бит сбрасывается - |
это может быть полезно для автоматического создания |
backup-архивов, ибо при записи бит обычно устанавливается |
(не в Kolibri, правда) |
* +4: dword: кодировка имени, соответствует полю +8 информационной структуры |
* +8: 4*byte: время создания файла |
* +12 = +0xC: 4*byte: дата создания файла |
* +16 = +0x10: 4*byte: время последнего доступа (чтение или запись) |
* +20 = +0x14: 4*byte: дата последнего доступа |
* +24 = +0x18: 4*byte: время последней модификации |
* +28 = +0x1C: 4*byte: дата последней модификации |
* +32 = +0x20: qword: размер файла в байтах (до 16777216 Тб) |
* +40 = +0x28: имя, размер в cp866 составляет 264 байта, иначе - 520 байт. |
Формат времени: |
* +0: byte: секунды |
* +1: byte: минуты |
* +2: byte: часы |
* +3: byte: зарезервировано (0) |
* например, 23.59.59 записывается как (в hex) 3B 3B 17 00 |
Формат даты: |
* +0: byte: день |
* +1: byte: месяц |
* +2: word: год |
* например, 25.11.1979 записывается как (в hex) 19 0B BB 07 |
Замечания: |
* Если БДВК содержит имя в cp866, то длина БДВК составляет |
304 байта, иначе - 560 байт. |
* Строка имени заканчивается нулём, дальнейшие данные содержат мусор. |
* Если файлы в папке кончились раньше, чем было прочитано |
запрошенное количество, то функция прочитает, сколько сможет, |
после чего вернёт eax=6 (EOF). |
* Любая папка на диске, кроме корневой, содержит два специальных |
входа "." и "..", идентифицирующих соответственно саму папку и |
родительскую папку. |
* Функция позволяет также читать виртуальные папки "/", "/rd", |
"/fd", "/hd[n]", при этом атрибуты подпапок полагаются равными |
0x10, а времена и даты обнулены. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_READ_FOLDER (1) |
====================================================================== |
====================== Функция 70, подфункция 2 ====================== |
======== Создание/перезапись файла с поддержкой длинных имён. ======== |
====================================================================== |
Параметры: |
* eax = 70 - номер функции |
* ebx = указатель на информационную структуру |
Формат информационной структуры: |
* +0: dword: 2 = номер подфункции |
* +4: dword: 0 (зарезервировано) |
* +8: dword: 0 (зарезервировано) |
* +12 = +0xC: dword: сколько байт писать |
* +16 = +0x10: dword: указатель на данные |
* +20 = +0x14: путь, правила формирования имён указаны в общем описании |
Возвращаемое значение: |
* eax = 0 - успешно, иначе код ошибки файловой системы |
* ebx = число записанных байт (возможно, 0) |
Замечания: |
* Если файл с таким именем не существовал, он создаётся; если |
существовал, то перезаписывается. |
* Если свободного места на диске недостаточно, то функция запишет, |
сколько сможет, после чего вернёт код ошибки 8. |
* Функция не поддерживается для CD (вернётся код ошибки 2). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_CREATE_FILE (2) |
====================================================================== |
====================== Функция 70, подфункция 3 ====================== |
======== Запись в существующий файл с поддержкой длинных имён. ======= |
====================================================================== |
Параметры: |
* eax = 70 - номер функции |
* ebx = указатель на информационную структуру |
Формат информационной структуры: |
* +0: dword: 3 = номер подфункции |
* +4: dword: позиция в файле (в байтах) |
* +8: dword: старший dword позиции (должен быть 0 для FAT) |
* +12 = +0xC: dword: сколько байт писать |
* +16 = +0x10: dword: указатель на данные |
* +20 = +0x14: путь, правила формирования имён указаны в общем описании |
Возвращаемое значение: |
* eax = 0 - успешно, иначе код ошибки файловой системы |
* ebx = число записанных байт (возможно, 0) |
Замечания: |
* Файл должен уже существовать, иначе вернётся eax=5. |
* Единственным результатом записи 0 байт является установка в |
атрибутах файла даты/времени модификации и доступа в текущую. |
* Если начальная и/или конечная позиция выходит за пределы файла |
(за исключением предыдущего случая), файл расширяется до |
необходимого размера нулевыми символами. |
* Функция не поддерживается для CD (вернётся код ошибки 2). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_WRITE_FILE (3) |
====================================================================== |
========= Функция 70, подфункция 4 - установка размера файла. ======== |
====================================================================== |
Параметры: |
* eax = 70 - номер функции |
* ebx = указатель на информационную структуру |
Формат информационной структуры: |
* +0: dword: 4 = номер подфункции |
* +4: dword: младший dword нового размера файла |
* +8: dword: старший dword нового размера файла |
* +12 = +0xC: dword: 0 (зарезервировано) |
* +16 = +0x10: dword: 0 (зарезервировано) |
* +20 = +0x14: путь, правила формирования имён указаны в общем описании |
Возвращаемое значение: |
* eax = 0 - успешно, иначе код ошибки файловой системы |
* ebx разрушается |
Замечания: |
* Если новый размер файла меньше старого, файл усекается. |
Если новый размер больше старого, файл расширяется, и если |
разница в размере не больше 16 МБ, новое место очищается нулями. |
* Если свободного места на диске недостаточно для расширения файла, |
то функция расширит насколько возможно, после чего вернёт |
код ошибки 8. |
* Функция не поддерживается для CD (вернётся код ошибки 2). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_SET_END (4) |
====================================================================== |
=== Функция 70, подфункция 5 - получение информации о файле/папке. === |
====================================================================== |
Параметры: |
* eax = 70 - номер функции |
* ebx = указатель на информационную структуру |
Формат информационной структуры: |
* +0: dword: 5 = номер подфункции |
* +4: dword: 0 (зарезервировано) |
* +8: dword: 0 или флаги (для корневого каталога) |
* +12 = +0xC: dword: 0 (зарезервировано) |
* +16 = +0x10: dword: указатель на буфер, куда будут записаны данные |
(40 байт) |
* +20 = +0x14: путь, правила формирования имён указаны в общем описании |
Возвращаемое значение: |
* eax = 0 - успешно, иначе код ошибки файловой системы |
* ebx разрушается |
Информация о файле возвращается в формате БДВК |
(блока данных входа каталога), указанном в описании подфункции 1, |
но без имени файла, за исключением корневого каталога. |
Замечания: |
* Для корневого каталога возвращается размер раздела, |
а при указании кодировки (не ноль), также его имя. |
* Для устройства возвращается только размер. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_GET_INFO (5) |
====================================================================== |
===== Функция 70, подфункция 6 - установка атрибутов файла/папки. ==== |
====================================================================== |
Параметры: |
* eax = 70 - номер функции |
* ebx = указатель на информационную структуру |
Формат информационной структуры: |
* +0: dword: 6 = номер подфункции |
* +4: dword: 0 (зарезервировано) |
* +8: dword: 0 (зарезервировано) |
* +12 = +0xC: dword: 0 (зарезервировано) |
* +16 = +0x10: dword: указатель на буфер с атрибутами (32 байта) |
* +20 = +0x14: путь, правила формирования имён указаны в общем описании |
Возвращаемое значение: |
* eax = 0 - успешно, иначе код ошибки файловой системы |
* ebx разрушается |
Атрибуты файла - первые 32 байта в БДВК (блоке данных входа каталога), |
формат которого указан в описании подфункции 1 |
(то есть без имени и размера файла). Атрибут файл/папка/метка тома |
(биты 3,4 в dword'е +0) не меняется. |
Байт +4 (формат имени) игнорируется. |
Замечания: |
* Функция не поддерживает виртуальные папки типа /, /rd и |
корневые папки типа /rd/1. |
* Функция не поддерживается для CD (вернётся код ошибки 2). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_SET_INFO (6) |
====================================================================== |
============ Функция 70, подфункция 7 - запуск программы. ============ |
====================================================================== |
Параметры: |
* eax = 70 - номер функции |
* ebx = указатель на информационную структуру |
Формат информационной структуры: |
* +0: dword: 7 = номер подфункции |
* +4: dword: поле флагов: |
* бит 0: запустить процесс как отлаживаемый |
* остальные биты зарезервированы и должны быть установлены в 0 |
* +8: dword: 0 или указатель на ASCIIZ-строку с параметрами |
* +12 = +0xC: dword: 0 (зарезервировано) |
* +16 = +0x10: dword: 0 (зарезервировано) |
* +20 = +0x14: путь, правила формирования имён указаны в общем описании |
Возвращаемое значение: |
* eax > 0 - программа загружена, eax содержит PID |
* eax < 0 - произошла ошибка, -eax содержит |
код ошибки файловой системы |
* ebx разрушается |
Замечания: |
* Командная строка должна заканчиваться символом с кодом 0 |
(ASCIIZ-строка); учитываются либо все символы до завершающего нуля |
включительно, либо первые 256 символов, в зависимости от того, |
что меньше. |
* Если процесс запускается как отлаживаемый, он создаётся |
в замороженном состоянии; для запуска используйте |
подфункцию 5 функции 69. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_START_APP (7) |
====================================================================== |
========== Функция 70, подфункция 8 - удаление файла/папки. ========== |
====================================================================== |
Параметры: |
* eax = 70 - номер функции |
* ebx = указатель на информационную структуру |
Формат информационной структуры: |
* +0: dword: 8 = номер подфункции |
* +4: dword: 0 (зарезервировано) |
* +8: dword: 0 (зарезервировано) |
* +12 = +0xC: dword: 0 (зарезервировано) |
* +16 = +0x10: dword: 0 (зарезервировано) |
* +20 = +0x14: путь, правила формирования имён указаны в общем описании |
Возвращаемое значение: |
* eax = 0 - успешно, иначе код ошибки файловой системы |
* ebx разрушается |
Замечания: |
* Функция не поддерживается для CD (вернётся код ошибки 2). |
* Можно удалять только пустые папки (попытка удаления непустой папки |
приведёт к ошибке с кодом 10, "доступ запрещён"). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_DELETE (8) |
====================================================================== |
============= Функция 70, подфункция 9 - создание папки. ============= |
====================================================================== |
Параметры: |
* eax = 70 - номер функции |
* ebx = указатель на информационную структуру |
Формат информационной структуры: |
* +0: dword: 9 = номер подфункции |
* +4: dword: 0 (зарезервировано) |
* +8: dword: 0 (зарезервировано) |
* +12 = +0xC: dword: 0 (зарезервировано) |
* +16 = +0x10: dword: 0 (зарезервировано) |
* +20 = +0x14: путь, правила формирования имён указаны в общем описании |
Возвращаемое значение: |
* eax = 0 - успешно, иначе код ошибки файловой системы |
* ebx разрушается |
Замечания: |
* Функция не поддерживается для CD (вернётся код ошибки 2). |
* Родительская папка должна уже существовать. |
* Если папка уже существует, функция завершится успешно (eax=0). |
---------------------- Константы для регистров: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_CREATE_FOLDER (9) |
====================================================================== |
======= Функция 70, подфункция 10 - переименование/перемещение ======= |
====================================================================== |
Параметры: |
* eax = 70 - номер функции |
* ebx = указатель на информационную структуру |
Формат информационной структуры: |
* +0: dword: 10 = номер подфункции |
* +4: dword: 0 (зарезервировано) |
* +8: dword: 0 (зарезервировано) |
* +12 = +0xC: dword: 0 (зарезервировано) |
* +16 = +0x10: dword: указатель на строку с новым именем/путём |
* +20 = +0x14: путь, правила формирования имён указаны в общем описании |
Возвращаемое значение: |
* eax = 0 - успешно, иначе код ошибки файловой системы |
* ebx разрушается |
Замечания: |
* Формирование нового пути отличается от общих правил: |
относительный путь относится к папке целевого файла (или папки), |
абсолютный путь считается от корня раздела. |
====================================================================== |
========== Функция 71 - установить заголовок окна программы ========== |
====================================================================== |
Параметры: |
* eax = 71 - номер функции |
* ebx = 1 |
* ecx = адрес строки заголовка, |
строка может начинаться с байта кодировки: |
1 = cp866 |
2 = UTF-16LE |
3 = UTF-8 |
или: |
* ebx = 2 |
* ecx = адрес строки заголовка |
* dl = кодировка строки |
Возвращаемое значение: |
* функция не возвращает значения |
Замечания: |
* Строка заголовка должна заканчиваться нулём. |
* Чтобы убрать заголовок, передайте NULL в ecx. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SET_CAPTION (71) |
====================================================================== |
================ Функция 72 - послать сообщение окну. ================ |
====================================================================== |
--- Подфункция 1 - послать сообщение с параметром активному окну. ---- |
Параметры: |
* eax = 72 - номер функции |
* ebx = 1 - номер подфункции |
* ecx = код события: 2 или 3 |
* edx = код клавиши для ecx=2, идентификатор кнопки для ecx=3 |
Возвращаемое значение: |
* eax = 0 - успешно |
* eax = 1 - буфер заполнен |
---------------------- Константы для регистров: ---------------------- |
eax - SF_SEND_MESSAGE (72) |
====================================================================== |
===================== Функция 73 - blit bitmap ===================== |
====================================================================== |
блит - копирование битового массив |
Параметры: |
* eax = 73 - номер функции |
* ebx = ROP и опциональные флаги |
31 30 29 28 6 5 4 3 0 |
[reserved][CR][reserved][T][B][ROP] |
ROP - код растровых операций |
0: копировать |
1-15: Зарезервировано |
B - блит на фоновую поверхность |
T - блит с прозрачностью |
CR - относительно клиентской области окна |
* ecx = указатель на параметры функции |
смещение цели и отсечение |
+0 signed dword: смещение по X окна, для целевого прямоугольника |
верхний левый угол |
+4 signed dword: смещение по Y окна, для целевого прямоугольника |
верхний левый угол |
+8 dword: ширина целевого прямоугольника |
+12 dword: высота целевого прямоугольника |
смещение исходника и отсечение |
+16 signed dword: смещение по X bitmap, для исходного прямоугольника |
верхний левый угол |
+20 signed dword: смещение по Y bitmap, для исходного прямоугольника |
верхний левый угол |
+24 dword: ширина исходного прямоугольника |
+28 dword: высота исходного прямоугольника |
+32: dword: данные bitmap - должны быть 32bpp |
+36: dword: размер строки bitmap в байтах |
Возвращаемое значение: |
* функция не возвращает значения |
---------------------- Константы для регистров: ---------------------- |
eax - SF_BLITTER (73) |
====================================================================== |
=================== Функция 74, подфункция -1 ======================== |
=========== Получить количество активных сетевых устройств. ========== |
====================================================================== |
Параметры: |
* eax = 74 - номер функции |
* bl = -1 - номер подфункции |
Возвращаемое значение: |
* eax = количество активных сетевых устройств |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_DEVICE_COUNT (255) |
====================================================================== |
==== Функция 74, подфункция 0, Получить тип сетевого устройства. ===== |
====================================================================== |
Параметры: |
* eax = 74 - номер функции |
* bl = 0 - номер подфункции |
* bh = номер устройства |
Возвращаемое значение: |
* eax = тип устройства |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_DEVICE_TYPE (0) |
====================================================================== |
==== Функция 74, подфункция 1, Получить имя сетевого устройства. ===== |
====================================================================== |
Параметры: |
* eax = 74 - номер функции |
* bl = 1 - номер подфункции |
* bh = номер устройства |
* ecx = указатель на буфера - 64 байт |
Возвращаемое значение: |
* eax = -1 для ошибки |
* В случае успеха в буфер записывается имя сетевого устройства |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_DEVICE_NAME (1) |
====================================================================== |
======= Функция 74, подфункция 2, Сброс сетевого устройства. ========= |
====================================================================== |
Параметры: |
* eax = 74 - номер функции |
* bl = 2 - номер подфункции |
* bh = номер устройства |
Возвращаемое значение: |
* eax = -1 для ошибки |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_RESET_DEVICE (2) |
====================================================================== |
====== Функция 74, подфункция 3, Остановить сетевое устройство. ====== |
====================================================================== |
Параметры: |
* eax = 74 - номер функции |
* bl = 3 - номер подфункции |
* bh = номер устройства |
Возвращаемое значение: |
* eax = -1 для ошибки |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_STOP_DEVICE (3) |
====================================================================== |
===== Функция 74, подфункция 4, Получить указатель на устройство ===== |
====================================================================== |
Параметры: |
* eax = 74 - номер функции |
* bl = 4 - номер подфункции |
* bh = номер устройства |
Возвращаемое значение: |
* eax = указатель, -1 для ошибки |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_DEVICE_POINTER (4) |
====================================================================== |
=== Функция 74, подфункция 6, Получить количество посланых пакетов === |
====================================================================== |
Параметры: |
* eax = 74 - номер функции |
* bl = 6 - номер подфункции |
* bh = номер устройства |
Возвращаемое значение: |
* eax = количество с момента старта устройства, -1 для ошибки |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_TX_PACKET_COUNT (6) |
====================================================================== |
=== Функция 74, подфункция 7, Получить количество принятых пакетов === |
====================================================================== |
Параметры: |
* eax = 74 - номер функции |
* bl = 7 - номер подфункции |
* bh = номер устройства |
Возвращаемое значение: |
* eax = количество с момента старта устройства, -1 для ошибки |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_RX_PACKET_COUNT (7) |
====================================================================== |
==== Функция 74, подфункция 8, Получить количество посланых байт. ==== |
====================================================================== |
Параметры: |
* eax = 74 - номер функции |
* bl = 8 - номер подфункции |
* bh = номер устройства |
Возвращаемое значение: |
* eax = количество с момента старта устройства, -1 для ошибки |
* ebx = старшая часть |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_TX_BYTE_COUNT (8) |
====================================================================== |
==== Функция 74, подфункция 9, Получить количество принятых байт. ==== |
====================================================================== |
Параметры: |
* eax = 74 - номер функции |
* bl = 9 - номер подфункции |
* bh = номер устройства |
Возвращаемое значение: |
* eax = количество с момента старта устройства, -1 для ошибки |
* ebx = старшая часть |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_RX_BYTE_COUNT (9) |
====================================================================== |
======= Функция 74, подфункция 10, Получить статус соединения. ======= |
====================================================================== |
Параметры: |
* eax = 74 - номер функции |
* bl = 10 - номер подфункции |
* bh = номер устройства |
Возвращаемое значение: |
* eax = статус соединения, -1 для ошибки |
Статусы: |
0 = нет соединения |
1 = неизвестное соединение |
4 = 10 Мбит |
8 = 100 Мбит |
12 = 1 Гбит |
10b = флаг полного дуплекса |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_LINK_STATUS (10) |
====================================================================== |
============== Функция 75, подфункция 0, Открыть сокет. ============== |
====================================================================== |
Параметры: |
* eax = 75 - номер функции |
* bl = 0 - номер подфункции |
* ecx = домен |
* edx = тип |
* esi = протокол |
Возвращаемое значение: |
* eax = номер сокета, -1 для ошибки |
* ebx = код ошибки |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_OPEN (0) |
====================================================================== |
============== Функция 75, подфункция 1, Закрыть сокет. ============== |
====================================================================== |
Параметры: |
* eax = 75 - номер функции |
* bl = 1 - номер подфункции |
* ecx = номер сокета |
Возвращаемое значение: |
* eax = -1 для ошибки |
* ebx = код ошибки |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_CLOSE (1) |
====================================================================== |
============= Функция 75, подфункция 2, Bind (Привязка). ============= |
====================================================================== |
Параметры: |
* eax = 75 - номер функции |
* bl = 2 - номер подфункции |
* ecx = номер сокета |
* edx = указатель на структуру sockaddr |
* esi = длина структуры sockaddr |
Формат структуры SockAddr: |
* +0: Word: Family |
* +2: 14*Byte: Data |
Возвращаемое значение: |
* eax = -1 для ошибки |
* ebx = код ошибки |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_BIND (2) |
====================================================================== |
============ Функция 75, подфункция 3, Listen (Слушать). ============= |
====================================================================== |
Параметры: |
* eax = 75 - номер функции |
* bl = 3 - номер подфункции |
* ecx = номер сокета |
* edx = backlog (возвращаемый лог) |
Возвращаемое значение: |
* eax = -1 для ошибки |
* ebx = код ошибки |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_LISTEN (3) |
====================================================================== |
========== Функция 75, подфункция 4, Connect (Соединение). =========== |
====================================================================== |
Параметры: |
* eax = 75 - номер функции |
* bl = 4 - номер подфункции |
* ecx = номер сокета |
* edx = указатель на структуру sockaddr |
* esi = длина структуры sockaddr |
Формат структуры SockAddr: |
* +0: Word: Family |
* +2: 14*Byte: Data |
Возвращаемое значение: |
* eax = -1 для ошибки |
* ebx = код ошибки |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_CONNECT (4) |
====================================================================== |
=========== Функция 75, подфункция 5, Accept (Соглашение). =========== |
====================================================================== |
Параметры: |
* eax = 75 - номер функции |
* bl = 5 - номер подфункции |
* ecx = номер сокета |
* edx = указатель на структуру sockaddr |
* esi = длина структуры sockaddr |
Формат структуры SockAddr: |
* +0: Word: Family |
* +2: 14*Byte: Data |
Возвращаемое значение: |
* eax = номер сокета из принятого сокета, -1 для ошибки |
* ebx = код ошибки |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_ACCEPT (5) |
====================================================================== |
============= Функция 75, подфункция 6, Send (Послать). ============== |
====================================================================== |
Параметры: |
* eax = 75 - номер функции |
* bl = 6 - номер подфункции |
* ecx = номер сокета |
* edx = указатель на буфер |
* esi = длина буфера |
* edi = флаги |
Возвращаемое значение: |
* eax = количество скопированных байтов, -1 для ошибки |
* ebx = код ошибки |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_SEND (6) |
====================================================================== |
============ Функция 75, подфункция 7, Receive (Получить). =========== |
====================================================================== |
Параметры: |
* eax = 75 - номер функции |
* bl = 7 - номер подфункции |
* ecx = номер сокета |
* edx = указатель на буфер |
* esi = длина буфера |
* edi = флаги |
Возвращаемое значение: |
* eax = количество скопированных байтов, -1 для ошибки |
* ebx = код ошибки |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_RECEIVE (7) |
====================================================================== |
=========== Функция 75, подфункция 8, Задать опции сокета. =========== |
====================================================================== |
Параметры: |
* eax = 75 - номер функции |
* bl = 8 - номер подфункции |
* ecx = номер сокета |
* edx = указатель на optstruct |
Возвращаемое значение: |
* eax = -1 для ошибки |
* ebx = код ошибки |
Замечания: |
Optstruct: dd level |
dd optionname |
dd optlength |
db options... |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_SET_OPTIONS (8) |
====================================================================== |
========== Функция 75, подфункция 9, Получить опции сокета. ========== |
====================================================================== |
Параметры: |
* eax = 75 - номер функции |
* bl = 9 - номер подфункции |
* ecx = номер сокета |
* edx = указатель на optstruct |
Возвращаемое значение: |
* eax = -1 для ошибки |
* ebx = код ошибки |
Замечания: |
Optstruct: dd level |
dd optionname |
dd optlength |
db options... |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_GET_OPTIONS (9) |
====================================================================== |
========== Функция 75, подфункция 10, Получить парный сокет ========== |
====================================================================== |
Параметры: |
* eax = 75 - номер функции |
* bl = 10 - номер подфункции |
Возвращаемое значение: |
* eax = номер первого сокета / -1 для ошибки |
* ebx = номер второго сокета / код ошибки |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_GET_PAIR (10) |
====================================================================== |
=============== Функция 76, Сетевые опции и статистика. ============== |
====================================================================== |
Параметры: |
* eax = 76 - номер функции |
* верхняя часть ebx = номер протокола |
* bh = номер устройства |
* bl = номер подфункции |
Протоколы и подфункции: |
0 - Ethernet: |
0 - Read MAC |
общие подфункции: |
0 - пакетов послано |
1 - пакетов принято |
1 - IPv4: |
2 - Read IP |
3 - Write IP |
4 - Read DNS |
5 - Write DNS |
6 - Read subnet |
7 - Write subnet |
8 - Read gateway |
9 - Write gateway |
2 - ICMP: |
3 - enable/disable ICMP echo reply |
3 - UDP |
4 - TCP |
5 - ARP: |
2 - Read # ARP entry's |
3 - Read ARP entry |
4 - Add static ARP entry |
5 - Remove ARP entry (-1 = remove all) |
6 - Send ARP announce on specified interface |
7 - Read # ARP conflicts (IP address conflicts) |
---------------------- Константы для регистров: ---------------------- |
eax - SF_NETWORK_PROTOCOL (76) |
====================================================================== |
============= Функция 77, подфункция 0, Создать фьютекс. ============= |
====================================================================== |
Параметры: |
* eax = 77 - номер функции |
* ebx = 0 - номер подфункции |
* ecx = указатель на контрольное значение фьютекса (dword) |
Возвращаемое значение: |
* eax = дескриптор фьютекса, 0 при ошибке |
---------------------- Константы для регистров: ---------------------- |
eax - SF_FUTEX (77) |
ebx - SSF_CREATE (0) |
====================================================================== |
============= Функция 77, подфункция 1, Удалить фьютекс. ============= |
====================================================================== |
Параметры: |
* eax = 77 - номер функции |
* ebx = 1 - номер подфункции |
* ecx = дескриптор фьютекса |
Возвращаемое значение: |
* eax = 0 - успешно, -1 при ошибке |
Замечания: |
* Ядро автоматически удаляет фьютексы при завершении процесса. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_FUTEX (77) |
ebx - SSF_DESTROY (1) |
====================================================================== |
================= Функция 77, подфункция 2, Ожидать. ================= |
====================================================================== |
Параметры: |
* eax = 77 - номер функции |
* ebx = 2 - номер подфункции |
* ecx = дескриптор фьютекса |
* edx = контрольное значение |
* esi = таймаут в сотых секунды, 0 - ждать бесконечно |
Возвращаемое значение: |
* eax = 0 - успешно, -1 - таймаут, |
-2 - контрольное значение не соответствует |
---------------------- Константы для регистров: ---------------------- |
eax - SF_FUTEX (77) |
ebx - SSF_WAIT (2) |
====================================================================== |
================ Функция 77, подфункция 3, Разбудить. ================ |
====================================================================== |
Параметры: |
* eax = 77 - номер функции |
* ebx = 3 - номер подфункции |
* ecx = дескриптор фьютекса |
* edx = сколько ожидающих будить (максимум) |
Возвращаемое значение: |
* eax = количество разбуженых |
---------------------- Константы для регистров: ---------------------- |
eax - SF_FUTEX (77) |
ebx - SSF_WAKE (3) |
====================================================================== |
========== Функция -1 - завершить выполнение потока/процесса ========= |
====================================================================== |
Параметры: |
* eax = -1 - номер функции |
Возвращаемое значение: |
* функция не возвращает ни значения, ни управления |
Замечания: |
* Если процесс явно не создавал потоков, то у него есть только |
один поток, завершение которого приводит к завершению процесса. |
* Если текущий поток - последний в процессе, то его завершение |
также приводит к завершению процесса. |
* Эта функция завершает текущий поток. Другой поток можно прибить |
вызовом подфункции 2 функции 18. |
---------------------- Константы для регистров: ---------------------- |
eax - SF_TERMINATE_PROCESS (-1) |
====================================================================== |
=== Функция 80 - работа с файловой системой с указанием кодировки. === |
====================================================================== |
Параметры: |
* eax = 80 |
* ebx = указатель на информационную структуру |
Возвращаемое значение: |
* eax = 0 - успешно; иначе код ошибки файловой системы |
* в зависимости от подфункции может возвращаться значение и |
в других регистрах |
Общий формат информационной структуры: |
* +0: dword: номер подфункции |
* +4: dword: смещение в файле или папке |
* +8: dword: старшая часть смещения или поле флагов |
* +12 = +0xC: dword: размер данных |
* +16 = +0x10: dword: указатель на данные |
* +20 = +0x14: dword: кодировка строки: |
1 = cp866 |
2 = UTF-16LE |
3 = UTF-8 |
0 = по умолчанию (поддерживает байт кодировки в начале строки) |
* +24 = +0x18: dword: указатель на строку пути (заканчивается нулём) |
В остальном полностью соответствует функции 70. |
====================================================================== |
=========================== Список событий =========================== |
====================================================================== |
Очередное событие можно получить вызовом одной из функций 10 |
(ожидать события), 11 (проверить без ожидания), 23 |
(ожидать в течение заданного времени). |
Эти функции возвращают только те события, которые входят в маску, |
устанавливаемую функцией 40. По умолчанию это первые три, чего |
вполне достаточно для многих приложений. |
Коды событий: |
* 1 = сообщение о перерисовке (сбрасывается при вызове функции 0) |
* 2 = нажата клавиша на клавиатуре (поступает, только когда окно |
активно) или нажата "горячая клавиша"; |
сбрасывается, когда все клавиши из буфера считаны функцией 2 |
* 3 = нажата кнопка, определённая ранее функцией 8 (или кнопка |
закрытия, созданная неявно функцией 0; кнопка минимизации |
обрабатывается системой и о ней сообщения не приходит; |
поступает, только когда окно активно; сбрасывается, когда все |
кнопки из буфера считаны функцией 17) |
* 4 = зарезервировано (в текущей реализации никогда не приходит даже |
при размаскировке функцией 40) |
* 5 = завершилась перерисовка фона рабочего стола |
* 6 = событие от мыши (что-то случилось - нажатие на кнопку мыши |
или перемещение; сбрасывается при прочтении) |
* 7 = произошло событие IPC (смотри функцию 60 - Inter Process |
Communication; сбрасывается при прочтении) |
* 8 = произошло сетевое событие (сбрасывается при прочтении; |
смотри работу с сетью) |
* 9 = произошло отладочное событие (сбрасывается при прочтении; |
смотри отладочную подсистему) |
* 16..31 = произошло событие с соответствующим IRQ |
(16=IRQ0, 31=IRQ15) (сбрасывается при считывании всех данных IRQ) |
====================================================================== |
==================== Коды ошибок файловой системы ==================== |
====================================================================== |
* 0 = успешно |
* 2 = функция не поддерживается для данной файловой системы |
* 3 = неизвестная файловая система |
* 5 = файл не найден |
* 6 = файл закончился |
* 7 = указатель вне памяти приложения |
* 8 = диск заполнен |
* 9 = ошибка файловой системы |
* 10 = доступ запрещён |
* 11 = ошибка устройства |
* 12 = файловой системе недостаточно оперативной памяти |
При запуске программы возможны также следующие коды ошибок: |
* 30 = 0x1E = недостаточно памяти |
* 31 = 0x1F = файл не является исполнимым |
* 32 = 0x20 = слишком много процессов |
/kernel/branches/Kolibri-F/docs/sysfuncs.txt |
---|
0,0 → 1,5256 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
SYSTEM FUNCTIONS of OS Kolibri 0.7.7.0 |
Number of the function is located in the register eax. |
The call of the system function is executed by "int 0x40" command. |
All registers except explicitly declared in the returned value, |
including eflags, are preserved. |
====================================================================== |
============== Function 0 - define and draw the window. ============== |
====================================================================== |
Defines an application window. Draws a frame of the window, header and |
working area. For skinned windows defines standard close and minimize |
buttons. |
Parameters: |
* eax = 0 - function number |
* ebx = [coordinate on axis x]*65536 + [size on axis x] |
* ecx = [coordinate on axis y]*65536 + [size on axis y] |
* edx = 0xXYRRGGBB, where: |
* Y = style of the window: |
* Y=1 - only define window area, draw nothing |
* Y=3 - skinned window |
* Y=4 - skinned fixed-size window |
* Y=0,2 window types are outdated and should not be used anymore, |
they are retained for compatibility with old programs. |
* other possible values (from 5 to 15) are reserved, |
function call with such Y is ignored |
* RR, GG, BB = accordingly red, green, blue components of a color |
of the working area of the window (are ignored for style Y=1) |
* X = DCBA (bits) |
* A = 1 - window has caption |
* B = 1 - coordinates of all graphics primitives are relative to |
window client area |
* C = 1 - don't fill working area on window draw |
* D = 0 - normal filling of the working area, 1 - gradient |
The following parameters are intended for windows |
of a type I and II, and ignored for styles Y=1,3: |
* esi = 0xXYRRGGBB - color of the header |
* RR, GG, BB define color |
* Y=0 - usual window, Y=1 - unmovable window (works for all window styles) |
* X not used, other values of Y are reserved |
* edi = caption string for styles Y=3,4 (also can be set by func 71.1) |
Returned value: |
* function does not return value |
Remarks: |
* Position and sizes of the window are installed by the first |
call of this function and are ignored at subsequent; to change |
position and/or sizes of already created window use function 67. |
* For windows with styles Y=3,4 and caption (A=1) caption string |
is set by the first call of this function and is ignored |
at subsequent (strictly speaking, is ignored after a call to |
subfunction 2 of function 12 - end redraw); to change caption of |
already created window use subfunction 1 of function 71. |
* If the window has appropriate styles, position and/or sizes can be |
changed by user. Current position and sizes can be obtained |
by function 9. |
* The window must fit on the screen. If the transferred |
coordinates and sizes do not satisfy to this condition, |
appropriate coordinate (or, probably, both) is considered as zero, |
and if it does not help too, the appropriate size |
(or, probably, both) is installed in a size of the screen. |
Further let us designate xpos,ypos,xsize,ysize - values passed |
in ebx,ecx. The coordinates are resulted concerning |
the left upper corner of the window, which, thus, is set as (0,0), |
coordinates of the right lower corner essence (xsize,ysize). |
* The sizes of the window are understood in sense of coordinates |
of the right lower corner. This concerns all other functions too. |
It means, that the real sizes are on 1 pixel more. |
* The window of style Y=1 looks as follows: |
* completely defined by the application |
* The skinned window Y=3,4 looks as follows: |
* draw external frame of width 1 pixel |
with color 'outer' from the skin |
* draw intermediate frame of width 3 pixel |
with color 'frame' from the skin |
* draw internal frame of width 1 pixel |
with color 'inner' from the skin |
* draw header (on bitmaps from the skin) in a rectangle |
(0,0) - (xsize,_skinh-1) |
* if ysize>=26, fill the working area of the window - |
rectangle with the left upper corner (5,_skinh) and right lower |
(xsize-5,ysize-5) with color indicated in edx |
(taking a gradient into account) |
* define two standard buttons: close and minimize |
(see function 8) |
* if A=1 and edi contains (nonzero) pointer to caption string, |
it is drawn in place in header defined in the skin |
* value _skinh is accessible as the result of call |
subfunction 4 of function 48 |
---------------------- Constants for registers: ---------------------- |
eax - SF_CREATE_WINDOW (0) |
====================================================================== |
================ Function 1 - put pixel in the window. =============== |
====================================================================== |
Parameters: |
* eax = 1 - function number |
* ebx = x-coordinate (relative to the window) |
* ecx = y-coordinate (relative to the window) |
* edx = 0x00RRGGBB - color of a pixel |
edx = 0x01xxxxxx - invert color of a pixel |
(low 24 bits are ignored) |
Returned value: |
* function does not return value |
---------------------- Constants for registers: ---------------------- |
eax - SF_PUT_PIXEL (1) |
====================================================================== |
============ Function 2 - get the code of the pressed key. =========== |
====================================================================== |
Takes away the code of the pressed key from the buffer. |
Parameters: |
* eax = 2 - function number |
Returned value: |
* if the buffer is empty, function returns eax=1 |
* if the buffer is not empty, function returns al=0, |
ah=code of the pressed key, |
bits 16-23 = contain scancode for pressed key in ASCII mode, |
in the scancodes mode this bits cleared. |
bits 23-31 = zero |
* if there is "hotkey", function returns al=2, |
ah=scancode of the pressed key (0 for control keys), |
high word of eax contains a status of control keys at the moment |
of pressing a hotkey |
Remarks: |
* There is a common system buffer of the pressed keys |
by a size of 120 bytes, organized as queue. |
* There is one more common system buffer on 120 "hotkeys". |
* If the application with the inactive window calls this function, |
the buffer of the pressed keys is considered to be empty. |
* By default this function returns ASCII-codes; to switch |
to the scancodes mode (and back) use function 66. |
However, hotkeys are always notificated as scancodes. |
* To find out, what keys correspond to what codes, start |
the application keyascii and scancode. |
* Scancodes come directly from keyboard and are fixed; |
ASCII-codes turn out with usage of the conversion tables, |
which can be set by subfunction 2 of function 21 |
and get by subfunction 2 of function 26. |
* As a consequence, ASCII-codes take into account current |
keyboard layout (rus/en) as opposed to scancodes. |
* This function notifies only about those hotkeys, which were |
defined by this thread by subfunction 4 of function 66. |
---------------------- Constants for registers: ---------------------- |
eax - SF_GET_KEY (2) |
====================================================================== |
==================== Function 3 - get system time. =================== |
====================================================================== |
Parameters: |
* eax = 3 - function number |
Returned value: |
* eax = 0x00SSMMHH, where HH:MM:SS = Hours:Minutes:Seconds |
* each item is BCD-number, for example, |
for time 23:59:59 function returns 0x00595923 |
Remarks: |
* See also subfunction 9 of function 26 - get time from |
the moment of start of the system; it is more convenient, because |
returns simply DWORD-value of the time counter. |
* System time can be set by function 22. |
---------------------- Constants for registers: ---------------------- |
eax - SF_GET_SYS_TIME (3) |
====================================================================== |
=================== Function 4 - draw text string. =================== |
====================================================================== |
Parameters: |
* eax = 4 - function number |
* ebx = X*65536+Y, coordinates in the window or buffer |
* ecx = 0xXXRRGGBB, where |
* RR, GG, BB specify text color |
* XX = ABFFCSSS (bits): |
* A=1 - output zero terminated string |
* B=1 - fill background (color = edi) |
* FF specifies the font and encoding: |
0 = 6x9 cp866 |
1 = 8x16 cp866 |
2 = 8x16 UTF-16LE |
3 = 8x16 UTF-8 |
* C=0 - draw to the window, |
C=1 - draw to the user buffer (edi) |
* SSS = (size multiplier)-1, so 0 = x1, 7 = x8 |
* edx = pointer to the beginning of the string |
* esi = for A=0 length of the string, for A=1 is ignored |
* edi = for B=1 color to fill background, |
for C=1 pointer to user buffer |
Returned value: |
* function does not return value |
Remarks: |
* You can not use B=1 and C=1 at the same time, since both use edi. |
* When SSS=0, font may be smoothed, depending on system setting. |
* User buffer structure: |
Xsize dd |
Ysize dd |
picture rb Xsize*Ysize*4 ; 32 bpp |
---------------------- Constants for registers: ---------------------- |
eax - SF_DRAW_TEXT (4) |
====================================================================== |
========================= Function 5 - delay. ======================== |
====================================================================== |
Delays execution of the program on the given time. |
Parameters: |
* eax = 5 - function number |
* ebx = time in the 1/100 of second |
Returned value: |
* function does not return value |
Remarks: |
* Passing ebx=0 does not transfer control to the next process |
and does not make any operations at all. If it is really required |
to transfer control to the next process (to complete a current |
time slice), use subfunction 1 of function 68. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SLEEP (5) |
====================================================================== |
=============== Function 7 - draw image in the window. =============== |
====================================================================== |
Paramters: |
* eax = 7 - function number |
* ebx = pointer to the image in the format BBGGRRBBGGRR... |
* ecx = [size on axis x]*65536 + [size on axis y] |
* edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
Returned value: |
* function does not return value |
Remarks: |
* Coordinates of the image are coordinates of the upper left corner |
of the image relative to the window. |
* Size of the image in bytes is 3*xsize*ysize. |
---------------------- Constants for registers: ---------------------- |
eax - SF_PUT_IMAGE (7) |
====================================================================== |
=============== Function 8 - define/delete the button. =============== |
====================================================================== |
Parameters for button definition: |
* eax = 8 - function number |
* ebx = [coordinate on axis x]*65536 + [size on axis x] |
* ecx = [coordinate on axis y]*65536 + [size on axis y] |
* edx = 0xXYnnnnnn, where: |
* nnnnnn = identifier of the button |
* high (31st) bit of edx is cleared |
* if 30th bit of edx is set - do not draw the button |
* if 29th bit of edx is set - do not draw a frame |
at pressing the button |
* esi = 0x00RRGGBB - color of the button |
Parameters for button deleting: |
* eax = 8 - function number |
* edx = 0x80nnnnnn, where nnnnnn - identifier of the button |
Returned value: |
* function does not return value |
Remarks: |
* Sizes of the button must be more than 0 and less than 0x8000. |
* For skinned windows definition of the window |
(call of 0th function) creates two standard buttons - |
for close of the window with identifier 1 and |
for minimize of the window with identifier 0xffff. |
* The creation of two buttons with same identifiers is admitted. |
* The button with the identifier 0xffff at pressing is interpreted |
by the system as the button of minimization, the system handles |
such pressing independently, not accessing to the application. |
In rest it is usual button. |
* Total number of buttons for all applications is limited to 4095. |
---------------------- Constants for registers: ---------------------- |
eax - SF_DEFINE_BUTTON (8) |
====================================================================== |
============ Function 9 - information on execution thread. =========== |
====================================================================== |
Parameters: |
* eax = 9 - function number |
* ebx = pointer to 1-Kb buffer |
* ecx = number of the slot of the thread |
ecx = -1 - get information on the current thread |
Returned value: |
* eax = maximum number of the slot of a thread |
but if pointer in ebx is illegal, for example, |
[ebx, ebx + 0x4C) region intersects with kernel memory, |
then function returns -1 |
* buffer pointed to by ebx contains the following information: |
* +0: dword: usage of the processor (how many time units |
per second leaves on execution of this thread) |
* +4: word: position of the window of thread in the window stack |
* +6: word: (has no relation to the specified thread) |
number of the thread slot, which window has in the window stack |
position ecx |
* +8: word: reserved |
* +10 = +0xA: 11 bytes: name of the process |
(name of the started file - executable file without extension) |
* +21 = +0x15: byte: reserved, this byte is not changed |
* +22 = +0x16: dword: address of the process in memory |
* +26 = +0x1A: dword: size of used memory - 1 |
* +30 = +0x1E: dword: identifier (PID/TID) |
* +34 = +0x22: dword: coordinate of the thread window on axis x |
* +38 = +0x26: dword: coordinate of the thread window on axis y |
* +42 = +0x2A: dword: size of the thread window on axis x |
* +46 = +0x2E: dword: size of the thread window on axis y |
* +50 = +0x32: word: status of the thread slot: |
* 0 = thread is running |
* 1 = thread is suspended |
* 2 = thread is suspended while waiting for event |
* 3 = thread is terminating as a result of call to function -1 |
or under duress as a result of call to subfunction 2 |
of function 18 or termination of the system |
* 4 = thread is terminating as a result of exception |
* 5 = thread waits for event |
* 9 = requested slot is free, all other information on the slot |
is not meaningful |
* +52 = +0x34: word: reserved, this word is not changed |
* +54 = +0x36: dword: coordinate of the client area on axis x |
* +58 = +0x3A: dword: coordinate of the client area on axis y |
* +62 = +0x3E: dword: width of the client area |
* +66 = +0x42: dword: height of the client area |
* +70 = +0x46: byte: state of the window - bitfield |
* bit 0 (mask 1): window is maximized |
* bit 1 (mask 2): window is minimized to panel |
* bit 2 (mask 4): window is rolled up |
* +71 = +0x47: dword: event mask |
* +75 = +0x4B: byte: keyboard mode(ASCII = 0; SCAN = 1) |
Remarks: |
* Slots are numbered starting from 1. |
* Returned value is not a total number of threads, because there |
can be free slots. |
* When process is starting, system automatically creates |
execution thread. |
* Function gives information on the thread. Each process has |
at least one thread. One process can create many threads, |
in this case each thread has its own slot and the fields |
+10, +22, +26 in these slots coincide. |
Applications have no common way to define whether two threads |
belong to one process. |
* The active window - window on top of the window stack - |
receives the messages on a keyboard input. For such window |
the position in the window stack coincides with returned value. |
* Slot 1 corresponds to special system thread, for which: |
* the window is in the bottom of the window stack, the fields |
+4 and +6 contain value 1 |
* name of the process - "OS/IDLE" (supplemented by spaces) |
* address of the process in memory is 0, size of used memory is |
16 Mb (0x1000000) |
* PID=1 |
* coordinates and sizes of the window and the client area are by |
convention set to 0 |
* status of the slot is always 0 (running) |
* the execution time adds of time leaving on operations itself |
and idle time in waiting for interrupt (which can be got by call |
to subfunction 4 of function 18). |
* Beginning from slot 2, the normal applications are placed. |
* The normal applications are placed in memory at the address |
0 (kernel constant 'std_application_base_address'). |
There is no intersection, as each process has its own page table. |
* At creation of the thread it is assigned the slot |
in the system table and identifier (Process/Thread IDentifier = |
PID/TID), which do not vary with time for given thread. |
After completion of the thread its slot can be anew used |
for another thread. The thread identifier can not be assigned |
to other thread even after completion of this thread. |
Identifiers, assigned to new threads, grow monotonously. |
* If the thread has not yet defined the window by call to |
function 0, the position and the sizes |
of its window are considered to be zero. |
* Coordinates of the client area are relative to the window. |
* At the moment only the part of the buffer by a size |
76 = 0x4C bytes is used. Nevertheless it is recommended to use |
1-Kb buffer for the future compatibility, in the future |
some fields can be added. |
---------------------- Constants for registers: ---------------------- |
eax - SF_THREAD_INFO (9) |
====================================================================== |
==================== Function 10 - wait for event. =================== |
====================================================================== |
If the message queue is empty, waits for appearance of the message |
in queue. In this state thread does not consume CPU time. |
Then reads out the message from queue. |
Parameters: |
* eax = 10 - function number |
Returned value: |
* eax = event (see the list of events) |
Remarks: |
* Those events are taken into account only which enter into |
a mask set by function 40. By default it is |
redraw, key and button events. |
* To check, whether there is a message in queue, use function 11. |
To wait for no more than given time, use function 23. |
---------------------- Constants for registers: ---------------------- |
eax - SF_WAIT_EVENT (10) |
====================================================================== |
=============== Function 11 - check for event, no wait. ============== |
====================================================================== |
If the message queue contains event, function reads out |
and return it. If the queue is empty, function returns 0. |
Parameters: |
* eax = 11 - function number |
Returned value: |
* eax = 0 - message queue is empty |
* else eax = event (see the list of events) |
Remarks: |
* Those events are taken into account only, which enter into |
a mask set by function 40. By default it is |
redraw, key and button events. |
* To wait for event, use function 10. |
To wait for no more than given time, use function 23. |
---------------------- Constants for registers: ---------------------- |
eax - SF_CHECK_EVENT (11) |
====================================================================== |
=============== Function 12 - begin/end window redraw. =============== |
====================================================================== |
---------------- Subfunction 1 - begin window redraw. ---------------- |
Parameters: |
* eax = 12 - function number |
* ebx = 1 - subfunction number |
Returned value: |
* function does not return value |
----------------- Subfunction 2 - end window redraw. ----------------- |
Parameters: |
* eax = 12 - function number |
* ebx = 2 - subfunction number |
Returned value: |
* function does not return value |
Remarks: |
* Subfunction 1 deletes all buttons defined with |
function 8, they must be defined again. |
---------------------- Constants for registers: ---------------------- |
eax - SF_REDRAW (12) |
ebx - SSF_BEGIN_DRAW (1), SSF_END_DRAW (2) |
====================================================================== |
============ Function 13 - draw a rectangle in the window. =========== |
====================================================================== |
Parameters: |
* eax = 13 - function number |
* ebx = [coordinate on axis x]*65536 + [size on axis x] |
* ecx = [coordinate on axis y]*65536 + [size on axis y] |
* edx = color 0xRRGGBB or 0x80RRGGBB for gradient fill |
Returned value: |
* function does not return value |
Remarks: |
* Coordinates are understood as coordinates of the left upper corner |
of a rectangle relative to the window. |
---------------------- Constants for registers: ---------------------- |
eax - SF_DRAW_RECT (13) |
====================================================================== |
=================== Function 14 - get screen size. =================== |
====================================================================== |
Parameters: |
* eax = 14 - function number |
Returned value: |
* eax = [xsize]*65536 + [ysize], where |
* xsize = x-coordinate of the right lower corner of the screen = |
horizontal size - 1 |
* ysize = y-coordinate of the right lower corner of the screen = |
vertical size - 1 |
Remarks: |
* See also subfunction 5 of function 48 - get sizes of |
working area of the screen. |
---------------------- Constants for registers: ---------------------- |
eax - SF_GET_SCREEN_SIZE (14) |
====================================================================== |
== Function 15, subfunction 1 - set a size of the background image. == |
====================================================================== |
Parameters: |
* eax = 15 - function number |
* ebx = 1 - subfunction number |
* ecx = width of the image |
* edx = height of the image |
Returned value: |
* function does not return value |
Remarks: |
* Before calling subfunctions 2 and 5 you should call this function |
to set image size! |
* For update of the screen (after completion of a series of commands |
working with a background) call subfunction 3. |
* There is a pair function for get size of the background image - |
subfunction 1 of function 39. |
---------------------- Constants for registers: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_SIZE_BG (1) |
====================================================================== |
=== Function 15, subfunction 2 - put pixel on the background image. == |
====================================================================== |
Parameters: |
* eax = 15 - function number |
* ebx = 2 - subfunction number |
* ecx = offset |
* edx = color of a pixel 0xRRGGBB |
Returned value: |
* function does not return value |
Remarks: |
* Offset for a pixel with coordinates (x,y) is calculated as |
(x+y*xsize)*3. |
* If the given offset exceeds size set by subfunction 1, |
the call is ignored. |
* For update of the screen (after completion of a series of commands |
working with a background) call subfunction 3. |
* There is a pair function for get pixel on the background image - |
subfunction 2 of function 39. |
---------------------- Constants for registers: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_PIXEL_BG (2) |
====================================================================== |
=========== Function 15, subfunction 3 - redraw background. ========== |
====================================================================== |
Parameters: |
* eax = 15 - function number |
* ebx = 3 - subfunction number |
Returned value: |
* function does not return value |
---------------------- Constants for registers: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_REDRAW_BG (3) |
====================================================================== |
== Function 15, subfunction 4 - set drawing mode for the background. = |
====================================================================== |
Parameters: |
* eax = 15 - function number |
* ebx = 4 - subfunction number |
* ecx = drawing mode: |
* 1 = tile |
* 2 = stretch |
Returned value: |
* function does not return value |
Remarks: |
* For update of the screen (after completion of a series of commands |
working with a background) call subfunction 3. |
* There is a pair function for get drawing mode of the background - |
subfunction 4 of function 39. |
---------------------- Constants for registers: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_MODE_BG (4) |
====================================================================== |
===================== Function 15, subfunction 5 ===================== |
============ Put block of pixels on the background image. ============ |
====================================================================== |
Parameters: |
* eax = 15 - function number |
* ebx = 5 - subfunction number |
* ecx = pointer to the data in the format BBGGRRBBGGRR... |
* edx = offset in data of the background image |
* esi = size of data in bytes = 3 * number of pixels |
Returned value: |
* function does not return value |
Remarks: |
* Offset and size are not checked for correctness. |
* Color of each pixel is stored as 3-bytes value BBGGRR. |
* Pixels of the background image are written sequentially |
from left to right, from up to down. |
* Offset of pixel with coordinates (x,y) is (x+y*xsize)*3. |
* For update of the screen (after completion of a series of commands |
working with a background) call subfunction 3. |
---------------------- Constants for registers: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_IMAGE_BG (5) |
====================================================================== |
===================== Function 15, subfunction 6 ===================== |
======== Map background data to the address space of process. ======== |
====================================================================== |
Parameters: |
* eax = 15 - function number |
* ebx = 6 - subfunction number |
Returned value: |
* eax = pointer to background data, 0 if error |
Remarks: |
* Mapped data are available for read and write. |
* Size of background data is 3*xsize*ysize. The system blocks |
changes of background sizes while process works with mapped data. |
* Color of each pixel is stored as 3-bytes value BBGGRR. |
* Pixels of the background image are written sequentially |
from left to right, from up to down. |
---------------------- Constants for registers: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_MAP_BG (6) |
====================================================================== |
===== Function 15, subfunction 7 - close mapped background data. ===== |
====================================================================== |
Parameters: |
* eax = 15 - function number |
* ebx = 7 - subfunction number |
* ecx = pointer to mapped data |
Returned value: |
* eax = 1 - success, 0 - error |
---------------------- Constants for registers: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_UNMAP_BG (7) |
====================================================================== |
===================== Function 15, subfunction 8 ===================== |
============= Get coordinates of last draw the background ============ |
====================================================================== |
Parameters: |
* eax = 15 - function number |
* ebx = 8 - subfunction number |
Returned value: |
* eax = [left]*65536 + [right] |
* ebx = [top]*65536 + [bottom] |
Remarks: |
* (left,top) are coordinates of the left upper corner, |
(right,bottom) are coordinates of the right lower one. |
* For receiving more reliable information, call the function |
immediately after the event: |
5 = kernel finished redrawing of the desktop background |
---------------------- Constants for registers: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_LAST_DRAW (8) |
====================================================================== |
===================== Function 15, subfunction 9 ===================== |
============= Redraws a rectangular part of the background =========== |
====================================================================== |
Parameters: |
* eax = 15 - function number |
* ebx = 9 - subfunction number |
* ecx = [left]*65536 + [right] |
* edx = [top]*65536 + [bottom] |
Returned value: |
* function does not return value |
Remarks: |
* (left,top) are coordinates of the left upper corner, |
(right,bottom) are coordinates of the right lower one. |
* If parameters are set incorrectly then background is not redrawn. |
---------------------- Constants for registers: ---------------------- |
eax - SF_BACKGROUND_SET (15) |
ebx - SSF_REDRAW_RECT (9) |
====================================================================== |
=============== Function 16 - save ramdisk on a floppy. ============== |
====================================================================== |
Parameters: |
* eax = 16 - function number |
* ebx = 1 or ebx = 2 - on which floppy save |
Returned value: |
* eax = 0 - success |
* eax = 1 - error |
---------------------- Constants for registers: ---------------------- |
eax - SF_RD_TO_FLOPPY (16) |
====================================================================== |
======= Function 17 - get the identifier of the pressed button. ====== |
====================================================================== |
Takes away the code of the pressed button from the buffer. |
Parameters: |
* eax = 17 - function number |
Returned value: |
* if the buffer is empty, function returns eax=1 |
* if the buffer is not empty: |
* high 24 bits of eax contain button identifier (in particular, |
ah contains low byte of the identifier; if all buttons have |
the identifier less than 256, ah is enough to distinguish) |
* al = 0 - the button was pressed with left mouse button |
* al = bit corresponding to used mouse button otherwise |
Remarks: |
* "Buffer" keeps only one button, at pressing the new button the |
information about old is lost. |
* The call of this function by an application with inactive window |
will return answer "buffer is empty". |
* Returned value for al corresponds to the state of mouse buttons |
as in subfunction 2 of function 37 at the beginning |
of button press, excluding lower bit, which is cleared. |
---------------------- Constants for registers: ---------------------- |
eax - SF_GET_BUTTON (17) |
====================================================================== |
===================== Function 18, subfunction 1 ===================== |
============= Make deactive the window of the given thread. ========== |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 1 - subfunction number |
* ecx = number of the thread slot |
Returned value: |
* function does not return value |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_UNFOCUS_WINDOW (1) |
====================================================================== |
= Function 18, subfunction 2 - terminate process/thread by the slot. = |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 2 - subfunction number |
* ecx = number of the slot of process/thread |
Returned value: |
* function does not return value |
Remarks: |
* It is impossible to terminate system thread OS/IDLE (with |
number of the slot 1), |
it is possible to terminate any normal process/thread. |
* See also subfunction 18 - terminate |
process/thread by the identifier. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_TERMINATE_THREAD (2) |
====================================================================== |
===================== Function 18, subfunction 3 ===================== |
============= Make active the window of the given thread. ============ |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 3 - subfunction number |
* ecx = number of the thread slot |
Returned value: |
* function does not return value |
Remarks: |
* If correct, but nonexistent slot is given, |
some window is made active. |
* To find out, which window is active, use subfunction 7. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_FOCUS_WINDOW (3) |
====================================================================== |
===================== Function 18, subfunction 4 ===================== |
=========== Get counter of idle time units per one second. =========== |
====================================================================== |
Idle time units are units, in which the processor stands idle |
in waiting for interrupt (in the command 'hlt'). |
Parameters: |
* eax = 18 - function number |
* ebx = 4 - subfunction number |
Returned value: |
* eax = value of the counter of idle time units per one second |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_GET_IDLE_COUNT (4) |
====================================================================== |
========== Function 18, subfunction 5 - get CPU clock rate. ========== |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 5 - subfunction number |
Returned value: |
* eax = clock rate (modulo 2^32 clock ticks = 4GHz) |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_GET_CPU_FREQUENCY (5) |
====================================================================== |
Function 18, subfunction 6 - save ramdisk to the file on hard drive. |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 6 - subfunction number |
* ecx = pointer to the full path to file |
(for example, "/hd0/1/kolibri/kolibri.img") |
Returned value: |
* eax = 0 - success |
* else eax = error code of the file system |
Remarks: |
* All folders in the given path must exist, otherwise function |
returns value 5, "file not found". |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_RD_TO_HDD (6) |
====================================================================== |
=========== Function 18, subfunction 7 - get active window. ========== |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 7 - subfunction number |
Returned value: |
* eax = number of the active window |
(number of the slot of the thread with active window) |
Remarks: |
* Active window is at the top of the window stack and receives |
messages on all keyboard input. |
* To make a window active, use subfunction 3. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_GET_ACTIVE_WINDOW (7) |
====================================================================== |
== Function 18, subfunction 8 - disable/enable the internal speaker. = |
====================================================================== |
If speaker sound is disabled, all calls to subfunction 55 of |
function 55 are ignored. If speaker sound is enabled, |
they are routed on builtin speaker. |
------------------- Subsubfunction 1 - get status. ------------------- |
Parameters: |
* eax = 18 - function number |
* ebx = 8 - subfunction number |
* ecx = 1 - number of the subsubfunction |
Returned value: |
* eax = 0 - speaker sound is enabled; 1 - disabled |
----------------- Subsubfunction 2 - toggle status. ------------------ |
Toggles states of disable/enable. |
Parameters: |
* eax = 18 - function number |
* ebx = 8 - subfunction number |
* ecx = 2 - number of the subsubfunction |
Returned value: |
* function does not return value |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_SPEAKER (8) |
ecx - SSSF_GET_STATE (1), SSSF_TOGGLE (2) |
====================================================================== |
== Function 18, subfunction 9 - system shutdown with the parameter. == |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 9 - subfunction number |
* ecx = parameter: |
* 2 = turn off computer |
* 3 = reboot computer |
* 4 = restart the kernel from the file 'kernel.mnt' on ramdisk |
Returned value: |
* at incorrect ecx the registers do not change (i.e. eax=18) |
* by correct call function always returns eax=0 |
as the tag of success |
Remarks: |
* Do not rely on returned value by incorrect call, it can be |
changed in future versions of the kernel. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_SHUTDOWN (9) |
====================================================================== |
======= Function 18, subfunction 10 - minimize topmost window. ======= |
====================================================================== |
Minimizes the topmost (active) window. |
Parameters: |
* eax = 18 - function number |
* ebx = 10 - subfunction number |
Returned value: |
* function does not return value |
Remarks: |
* The minimized window from the point of view of function 9 |
keeps position and sizes. |
* Restoring of an application window occurs at its activation by |
subfunction 3. |
* Usually there is no necessity to minimize/restore a window |
explicitly: minimization of a window is carried out by the system |
at pressing the minimization button (for skinned windows |
it is defined automatically by function 0, |
for other windows it can be defined manually by function 8), |
restore of a window is done by the application '@taskbar'. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_MINIMIZE_WINDOW (10) |
====================================================================== |
Function 18, subfunction 11 - get information on the disk subsystem. |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 11 - subfunction number |
* ecx = type of the table: |
* 1 = short version, 16 bytes |
* edx = pointer to the buffer (in the application) for the table |
Returned value: |
* function does not return value |
Format of the table: short version: |
* +0: byte: information about FDD's (drives for floppies), |
AAAABBBB, where AAAA gives type of the first drive, BBBB - |
of the second regarding to the following list: |
* 0 = there is no drive |
* 1 = 360Kb, 5.25'' |
* 2 = 1.2Mb, 5.25'' |
* 3 = 720Kb, 3.5'' |
* 4 = 1.44Mb, 3.5'' |
* 5 = 2.88Mb, 3.5'' (such drives are not used anymore) |
For example, for the standard configuration from one 1.44-drive |
here will be 40h, and for the case 1.2Mb on A: and 1.44Mb on B: |
the value is 24h. |
First IDE controller: |
* +1: byte: information about hard disks and CD-drives, AABBCCDD, |
where AA corresponds to the controller IDE0, ..., DD - IDE3: |
* 0 = device not found |
* 1 = hard drive |
* 2 = CD-drive |
For example, in the case HD on IDE0 and CD on IDE2 |
this field contains 48h. |
* +2: 4 db: number of the retrieved partitions on hard disks |
at accordingly IDE0,...,IDE3. |
Second IDE controller: |
* +6: byte: information about hard disks and CD-drives, AABBCCDD, |
where AA corresponds to the controller IDE4, ..., DD - IDE7: |
* 0 = device not found |
* 1 = hard drive |
* 2 = CD-drive |
For example, in the case HD on IDE4 and CD on IDE6 |
this field contains 48h. |
* +7: 4 db: number of the retrieved partitions on hard disks |
at accordingly IDE4,...,IDE7. |
Third IDE controller: |
* +11: byte: information about hard disks and CD-drives, AABBCCDD, |
where AA corresponds to the controller IDE8, ..., DD - IDE11: |
* 0 = device not found |
* 1 = hard drive |
* 2 = CD-drive |
For example, in the case HD on IDE8 and CD on IDE10 |
this field contains 48h. |
* +12: 4 db: number of the retrieved partitions on hard disks |
at accordingly IDE8,...,IDE11. |
If the hard disk on IDEx is absent, appropriate byte is zero, |
otherwise it shows number of the recognized partitions, which |
can be not presented (if the drive is not formatted or if |
the file system is not supported). Current version of the kernel |
supports only FAT12/16/32, NTFS, ext2/3/4 and XFS for hard disks. |
Remarks: |
* The table can be used for obtaining the information about |
available devices. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_INFO_DISC_SYS (11) |
====================================================================== |
========== Function 18, subfunction 13 - get kernel version. ========= |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 13 - subfunction number |
* ecx = pointer to the buffer (not less than 16 bytes), where |
the information will be placed |
Returned value: |
* function does not return value |
but if pointer in ecx is illegal, for example, |
[ecx, ecx + 9) region intersects with kernel memory, |
then function returns -1 |
Remarks: |
* At the moment only the part of the buffer by a size |
9 bytes is used. Nevertheless it is recommended to use |
16 byte buffer for the future compatibility, in the future |
some fields can be added. |
Structure of the buffer: |
db a,b,c,d for version a.b.c.d |
db 0: reserved |
dd REV - kernel SVN revision number |
For Kolibri 0.7.7.0+ kernel: |
db 0,7,7,0 |
db 0 |
dd 1675 |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_KERNEL_VERSION (13) |
====================================================================== |
======= Function 18, subfunction 14 - wait for screen retrace. ======= |
====================================================================== |
Waits for the beginning of retrace of the scanning ray of the screen |
monitor. |
Parameters: |
* eax = 18 - function number |
* ebx = 14 - subfunction number |
Returned value: |
* eax = 0 as the tag of success |
Remarks: |
* Function is intended only for active high-efficiency graphics |
applications; is used for smooth output of a graphics. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_WAIT_RETRACE (14) |
====================================================================== |
== Function 18, subfunction 15 - center mouse cursor on the screen. == |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 15 - subfunction number |
Returned value: |
* eax = 0 as the tag of success |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_CURSOR_CENTER (15) |
====================================================================== |
========= Function 18, subfunction 16 - get size of free RAM. ======== |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 16 - subfunction number |
Returned value: |
* eax = size of free memory in kilobytes |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_GET_FREE_RAM (16) |
====================================================================== |
======== Function 18, subfunction 17 - get full amount of RAM. ======= |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 17 - subfunction number |
Returned value: |
* eax = total size of existing memory in kilobytes |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_GET_TOTAL_RAM (17) |
====================================================================== |
===================== Function 18, subfunction 18 ==================== |
============= Terminate process/thread by the identifier. ============ |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 18 - subfunction number |
* ecx = identifier of process/thread (PID/TID) |
Returned value: |
* eax = 0 - success |
* eax = -1 - error (process is not found or is system) |
Remarks: |
* It is impossible to terminate system thread OS/IDLE (identifier |
1), it is possible to terminate any normal process/thread. |
* See also subfunction 2 - terminate |
process/thread by given slot. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_TERMINATE_THREAD_ID (18) |
====================================================================== |
======== Function 18, subfunction 19 - get/set mouse features. ======= |
====================================================================== |
---------------- Subsubfunction 0 - get mouse speed. ----------------- |
Parameters: |
* eax = 18 - function number |
* ebx = 19 - subfunction number |
* ecx = 0 - subsubfunction number |
Returned value: |
* eax = current speed divider |
---------------- Subsubfunction 1 - set mouse speed. ----------------- |
Parameters: |
* eax = 18 - function number |
* ebx = 19 - subfunction number |
* ecx = 1 - subsubfunction number |
* edx = new value for speed divider |
Returned value: |
* function does not return value |
Remark: recommended speed divider = 4 |
-------------- Subsubfunction 2 - get mouse sensitivity -------------- |
Parameters: |
* eax = 18 - function number |
* ebx = 19 - subfunction number |
* ecx = 2 - subsubfunction number |
Returned value: |
* eax = current sensitivity |
-------------- Subsubfunction 3 - set mouse sensitivity -------------- |
Parameters: |
* eax = 18 - function number |
* ebx = 19 - subfunction number |
* ecx = 3 - subsubfunction number |
* edx = new value for sensitivity |
Returned value: |
* function does not return value |
Remark: recommended sensitivity = 3 |
----------- Subsubfunction 4 - set mouse pointer position. ----------- |
Parameters: |
* eax = 18 - function number |
* ebx = 19 - subfunction number |
* ecx = 4 - subsubfunction number |
* edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
Returned value: |
* function does not return value |
-------- Subsubfunction 5 - simulate state of mouse buttons. --------- |
Parameters: |
* eax = 18 - function number |
* ebx = 19 - subfunction number |
* ecx = 5 - subsubfunction number |
* edx = information about emulated state of mouse buttons: |
(same as return value in subfunction 2 of function 37) |
* bit 0 is set = left button is pressed |
* bit 1 is set = right button is pressed |
* bit 2 is set = middle button is pressed |
* bit 3 is set = 4th button is pressed |
* bit 4 is set = 5th button is pressed |
Returned value: |
* function does not return value |
-------------- Subsubfunction 6 - get doubleclick delay. ------------- |
Parameters: |
* eax = 18 - function number |
* ebx = 19 - subfunction number |
* ecx = 6 - subsubfunction number |
Returned value: |
* eax = current doubleclick delay (100 = 1 second) |
-------------- Subsubfunction 7 - set doubleclick delay. ------------- |
Parameters: |
* eax = 18 - function number |
* ebx = 19 - subfunction number |
* ecx = 7 - subsubfunction number |
* dl = new value for doubleclick delay (100 = 1 second) |
Returned value: |
* function does not return value |
Remark: mouse settings can be modified in the application mouse_cfg. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_MOUSE_SETTINGS (19) |
ecx - SSSF_GET_SPEED (0), SSSF_SET_SPEED (1), SSSF_GET_SPEEDUP (2), |
SSSF_SET_SPEEDUP (3), SSSF_SET_POS (4), SSSF_SET_BUTTON (5), |
SSSF_GET_DOUBLE_CLICK_DELAY (6), SSSF_SET_DOUBLE_CLICK_DELAY (7) |
====================================================================== |
======== Function 18, subfunction 20 - get information on RAM. ======= |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 20 - subfunction number |
* ecx = pointer to the buffer for information (36 bytes) |
Returned value: |
* eax = total size of existing RAM in pages |
or -1 if error has occurred |
* buffer pointed to by ecx contains the following information: |
* +0: dword: total size of existing RAM in pages |
* +4: dword: size of free RAM in pages |
* +8: dword: number of page faults (exceptions #PF) |
in applications |
* +12: dword: size of kernel heap in bytes |
* +16: dword: free in kernel heap in bytes |
* +20: dword: total number of memory blocks in kernel heap |
* +24: dword: number of free memory blocks in kernel heap |
* +28: dword: size of maximum free block in kernel heap |
(reserved) |
* +32: dword: size of maximum allocated block in kernel heap |
(reserved) |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_GET_RAM_INFO (20) |
====================================================================== |
===================== Function 18, subfunction 21 ==================== |
======== Get slot number of process/thread by the identifier. ======== |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 21 - subfunction number |
* ecx = identifier of process/thread (PID/TID) |
Returned value: |
* eax = 0 - error (invalid identifier) |
* otherwise eax = slot number |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_GET_THREAD_SLOT (21) |
====================================================================== |
===================== Function 18, subfunction 22 ==================== |
============== Operations with window of another thread. ============= |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 22 - subfunction number |
* ecx = operation type: |
* 0 = minimize window of the thread with given slot number |
* 1 = minimize window of the thread with given identifier |
* 2 = restore window of the thread with given slot number |
* 3 = restore window of the thread with given identifier |
* edx = parameter (slot number or PID/TID) |
Returned value: |
* eax = 0 - success |
* eax = -1 - error (invalid identifier) |
Remarks: |
* The thread can minimize its window with subfunction 10. |
* One can restore and activate window simultaneously with |
subfunction 3 (which requires slot number). |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_FOREIGN_WINDOW (22) |
ecx - SSSF_MINIMIZE (0), SSSF_MINIMIZE_ID (1), SSSF_RESTORE (2), |
SSSF_RESTORE_ID (3) |
====================================================================== |
======== Function 18, subfunction 23 - minimize all windows. ========== |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 23 - subfunction number |
Returned value: |
* eax = 0 - all windows have been minimized before a function call |
* eax = N - number of windows minimized from function |
Remarks: |
* Window of special thread (name begin to symbol @) is not minimize. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_MINIMIZE_ALL (23) |
====================================================================== |
======= Function 18, subfunction 24 - set limits of screen. ========== |
====================================================================== |
Parameters: |
* eax = 18 - function number |
* ebx = 24 - subfunction number |
* ecx = new X size |
* edx = new Y size |
Returned value: |
* function does not return value |
Remarks: |
* The function does not change the physical size of the video mode. |
It is designed for non-standard displays which display the image |
partially. |
* The sizes specified in the function should not exceed the sizes |
of the current video mode, otherwise the function will not change |
anything. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_SET_SCREEN_LIMITS (24) |
====================================================================== |
===================== Function 18, subfunction 25 ==================== |
===== Control position of the window relative to other windows. ====== |
====================================================================== |
------------- Subsubfunction 1 - get position ----------------------- |
Parameters: |
* eax = 18 - function number |
* ebx = 25 - subfunction number |
* ecx = 1 - subsubfunction number |
* edx = -1(for current window) or PID application |
Returned value: |
* eax = one of the constants window position |
------------- Subsubfunction 2 - set position ----------------------- |
Parameters: |
* eax = 18 - function number |
* ebx = 25 - subfunction number |
* ecx = 2 - subsubfunction number |
* edx = -1(for current window) or PID application |
* esi = new window position (one of the constants below) |
Returned value: |
* eax = 0 - error |
* eax = 1 - success |
Constant position of the window relative to other windows: |
ZPOS_DESKTOP = -2 - on the background |
ZPOS_ALWAYS_BACK = -1 - behind all the windows |
ZPOS_NORMAL = 0 - normal |
ZPOS_ALWAYS_TOP = 1 - on top of all windows |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM (18) |
ebx - SSF_WINDOW_BEHAVIOR (25) |
ecx - SSSF_GET_WB (1), SSSF_SET_WB (2) |
====================================================================== |
==================== Function 20 - MIDI interface. =================== |
====================================================================== |
----------------------- Subfunction 1 - reset ------------------------ |
Parameters: |
* eax = 20 - function number |
* ebx = 1 - subfunction number |
-------------------- Subfunction 2 - output byte --------------------- |
Parameters: |
* eax = 20 - function number |
* ebx = 2 - subfunction number |
* cl = byte for output |
Returned value (is the same for both subfunctions): |
* eax = 0 - success |
* eax = 1 - base port is not defined |
Remarks: |
* Previously the base port must be defined by |
subfunction 1 of function 21. |
---------------------- Constants for registers: ---------------------- |
eax - SF_MIDI (20) |
ebx - SSF_RESET (1), SSF_OUTPUT (2) |
====================================================================== |
======== Function 21, subfunction 1 - set MPU MIDI base port. ======== |
====================================================================== |
Parameters: |
* eax = 21 - function number |
* ebx = 1 - subfunction number |
* ecx = number of base port |
Returned value |
* eax = 0 - success |
* eax = -1 - erratic number of a port |
Remarks: |
* Number of a port must satisfy to conditions 0x100<=ecx<=0xFFFF. |
* The installation of base is necessary for function 20. |
* To get base port use subfunction 1 of function 26. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM_SET (21) |
ebx - SSF_MPU_MIDI_BASE (1) |
====================================================================== |
========== Function 21, subfunction 2 - set keyboard layout. ========= |
====================================================================== |
Keyboard layout is used to convert keyboard scancodes to ASCII-codes, |
which will be read by function 2. |
Parameters: |
* eax = 21 - function number |
* ebx = 2 - subfunction number |
* ecx = which layout to set: |
* 1 = normal layout |
* 2 = layout at pressed Shift |
* 3 = layout at pressed Alt |
* edx = pointer to layout - table of length 128 bytes |
Or: |
* ecx = 9 |
* dx = country identifier (1=eng, 2=fi, 3=ger, 4=rus) |
Returned value: |
* eax = 0 - success |
* eax = 1 - incorrect parameter |
Remarks: |
* If Alt is pressed, the layout with Alt is used; |
if Alt is not pressed, but Shift is pressed, |
the layout with Shift is used; |
if Alt and Shift are not pressed, but Ctrl is pressed, the normal |
layout is used and then from the code is subtracted 0x60; |
if no control key is pressed, the normal layout is used. |
* To get layout and country identifier use |
subfunction 2 of function 26. |
* Country identifier is global system variable, which is not used |
by the kernel itself; however the application '@taskbar' displays |
the corresponding icon. |
* The application @taskbar switches layouts on user request. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM_SET (21) |
ebx - SSF_KEYBOARD_LAYOUT (2) |
====================================================================== |
========== Function 21, subfunction 5 - set system language. ========= |
====================================================================== |
Parameters: |
* eax = 21 - function number |
* ebx = 5 - subfunction number |
* ecx = system language (1=eng, 2=fi, 3=ger, 4=rus) |
Returned value: |
* eax = 0 |
Remarks: |
* System language is global system variable and is not used |
by the kernel itself, however application @taskbar draws the |
appropriate icon. |
* Function does not check for correctness, as the kernel does not |
use this variable. |
* To get system language use subfunction 5 of function 26. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM_SET (21) |
ebx - SSF_SYS_LANG (5) |
====================================================================== |
Function 21, subfunction 11 - enable/disable low-level access to HD. |
====================================================================== |
Parameters: |
* eax = 21 - function number |
* ebx = 11 - subfunction number |
* ecx = 0/1 - disable/enable |
Returned value: |
* eax = 0 |
Remarks: |
* Is used in LBA-read (subfunction 8 of function 58). |
* The current implementation uses only low bit of ecx. |
* To get current status use subfunction 11 of function 26. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM_SET (21) |
ebx - SSF_ACCESS_HD_LBA (11) |
====================================================================== |
Function 21, subfunction 12 - enable/disable low-level access to PCI. |
====================================================================== |
Parameters: |
* eax = 21 - function number |
* ebx = 12 - subfunction number |
* ecx = 0/1 - disable/enable |
Returned value: |
* eax = 0 |
Remarks: |
* Is used in operations with PCI bus (function 62). |
* The current implementation uses only low bit of ecx. |
* To get current status use subfunction 12 of function 26. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM_SET (21) |
ebx - SSF_ACCESS_PCI (12) |
====================================================================== |
================= Function 22 - set system date/time. ================ |
====================================================================== |
Parameters: |
* eax = 22 - function number |
* ebx = 0 - set time |
* ecx = 0x00SSMMHH - time in the binary-decimal code (BCD): |
* HH=hour 00..23 |
* MM=minute 00..59 |
* SS=second 00..59 |
* ebx = 1 - set date |
* ecx = 0x00DDMMYY - date in the binary-decimal code (BCD): |
* DD=day 01..31 |
* MM=month 01..12 |
* YY=year 00..99 |
* ebx = 2 - set day of week |
* ecx = 1 for Sunday, ..., 7 for Saturday |
* ebx = 3 - set alarm clock |
* ecx = 0x00SSMMHH |
Returned value: |
* eax = 0 - success |
* eax = 1 - incorrect parameter |
* eax = 2 - CMOS-battery was unloaded |
Remarks: |
* Value of installation of day of week seems to be doubtful, |
as it a little where is used |
(day of week can be calculated by date). |
* Alarm clock can be set on operation in the given time every day. |
But there is no existing system function to disable it. |
* Operation of alarm clock consists in generation IRQ8. |
* Generally CMOS supports for alarm clock set of value 0xFF |
as one of parameters and it means that the appropriate parameter |
is ignored. But current implementation does not allow this |
(will return 1). |
* Alarm clock is a global system resource; the set of |
an alarm clock cancels automatically the previous set. |
However, at moment no program uses it. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SET_TIME_DATE (22) |
====================================================================== |
============= Function 23 - wait for event with timeout. ============= |
====================================================================== |
If the message queue is empty, waits for new message in the queue, |
but no more than given time. Then reads out a message from the queue. |
Parameters: |
* eax = 23 - function number |
* ebx = timeout (in 1/100 of second) |
Returned value: |
* eax = 0 - the message queue is empty |
* otherwise eax = event (see the list of events) |
Remarks: |
* Only those events are taken into account, which enter into |
the mask set by function 40. By default it is |
redraw, key and button events. |
* To check for presence of a message in the queue use function 11. |
To wait without timeout use function 10. |
* Transmission ebx=0 results in immediate returning eax=0. |
* Current implementation returns immediately with eax=0, |
if the addition of ebx with the current value of time counter |
makes 32-bit overflow. |
---------------------- Constants for registers: ---------------------- |
eax - SF_WAIT_EVENT_TIMEOUT (23) |
====================================================================== |
======= Function 24, subfunction 4 - eject tray of disk drive. ======= |
====================================================================== |
Parameters: |
* eax = 24 - function number |
* ebx = 4 - subfunction number |
* ecx = position of CD/DVD-drive |
from 0=Primary Master to 3=Secondary Slave for first IDE contr. |
from 4=Primary Master to 7=Secondary Slave for second IDE contr. |
from 8=Primary Master to 11=Secondary Slave for third IDE contr. |
Returned value: |
* function does not return value |
Remarks: |
* The function is supported only for ATAPI devices (CD and DVD). |
* When the tray is being ejected, |
manual control of tray is unlocked. |
* When the tray is being ejected, the code clears the cache for |
corresponding device. |
* An example of usage of the function is the application CD_tray. |
---------------------- Constants for registers: ---------------------- |
eax - SF_CD (24) |
ebx - SSF_EJECT_TRAY (4), SSF_INSERT_TRAY (5) |
====================================================================== |
======== Function 24, subfunction 5 - load tray of disk drive. ======= |
====================================================================== |
Parameters: |
* eax = 24 - function number |
* ebx = 5 - subfunction number |
* ecx = position of CD/DVD-drive |
from 0=Primary Master to 3=Secondary Slave for first IDE contr. |
from 4=Primary Master to 7=Secondary Slave for second IDE contr. |
from 8=Primary Master to 11=Secondary Slave for third IDE contr. |
Returned value: |
* function does not return value |
Remarks: |
* The function is supported only for ATAPI devices (CD and DVD). |
* An example of usage of the function is the application CD_tray. |
---------------------- Constants for registers: ---------------------- |
eax - SF_CD (24) |
ebx - SSF_EJECT_TRAY (4), SSF_INSERT_TRAY (5) |
====================================================================== |
======= Function 25 - put image area on the background layer. ======== |
====================================================================== |
Parameters: |
* eax = 25 - function number |
* ebx = pointer to the previously allocated memory area, |
where placed the source images in a format BBGGRRTTBBGGRRTT... |
* ecx = [size on axis x]*65536 + [size on axis y] |
* edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
Returned value: |
* function does not return value |
Remarks: |
* Coordinates of the image are coordinates of the upper left corner |
of the image relative to the screen. |
* Size of the image in bytes is 4*xsize*ysize |
* TT - byte pointer of transparency, at current version: |
1 to FF - opaque, 0 - transparent. |
* The function places the image directly to LFB. It is not for |
background image f.15. Options f.15 to f.25 does not make sense. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SCREEN_PUT_IMAGE (25) |
====================================================================== |
======== Function 26, subfunction 1 - get MPU MIDI base port. ======== |
====================================================================== |
Parameters: |
* eax = 26 - function number |
* ebx = 1 - subfunction number |
Returned value: |
* eax = port number |
Parameters: |
* To set base port use subfunction 1 of function 21. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM_GET (26) |
ebx - SSF_MPU_MIDI_BASE (1) |
====================================================================== |
========== Function 26, subfunction 2 - get keyboard layout. ========= |
====================================================================== |
The keyboard layout is used to convert keyboard scancodes to |
ASCII-codes for function 2. |
Parameters: |
* eax = 26 - function number |
* ebx = 2 - subfunction number |
* ecx = what layout to get: |
* 1 = normal layout |
* 2 = layout with pressed Shift |
* 3 = layout with pressed Alt |
* edx = pointer to the 128-bytes buffer, where the layout will be |
copied |
Returned value: |
* function does not return value |
but if pointer in edx is illegal, for example, |
[edx, edx + 128) region intersects with kernel memory, |
then function returns -1 |
Or: |
* eax = 26 - function number |
* ebx = 2 - subfunction number |
* ecx = 9 |
Returned value: |
* eax = country identifier (1=eng, 2=fi, 3=ger, 4=rus) |
Remarks: |
* If Alt is pressed, the layout with Alt is used; |
if Alt is not pressed, but Shift is pressed, |
the layout with Shift is used; |
if Alt and Shift are not pressed, but Ctrl is pressed, the normal |
layout is used and then from the code is subtracted 0x60; |
if no control key is pressed, the normal layout is used. |
* To set layout and country identifier use |
subfunction 2 of function 21. |
* Country identifier is global system variable, which is not used |
by the kernel itself; however the application '@taskbar' displays |
the corresponding icon (using this function). |
* The application @taskbar switches layouts on user request. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM_GET (26) |
ebx - SSF_KEYBOARD_LAYOUT (2) |
====================================================================== |
========== Function 26, subfunction 5 - get system language. ========= |
====================================================================== |
Parameters: |
* eax = 26 - function number |
* ebx = 5 - subfunction number |
Returned value: |
* eax = system language (1=eng, 2=fi, 3=ger, 4=rus) |
Remarks: |
* System language is global system variable and is not used |
by the kernel itself, however application @taskbar draws the |
appropriate icon (using this function). |
* To set system language use subfunction 5 of function 21. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM_GET (26) |
ebx - SSF_SYS_LANG (5) |
====================================================================== |
=== Function 26, subfunction 9 - get the value of the time counter. == |
====================================================================== |
Parameters: |
* eax = 26 - function number |
* ebx = 9 - subfunction number |
Returned value: |
* eax = number of 1/100s of second, past from the system boot time |
Remarks: |
* Counter takes modulo 2^32, that correspond to a little more |
than 497 days. |
* To get system time use function 3. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM_GET (26) |
ebx - SSF_TIME_COUNT (9) |
====================================================================== |
===================== Function 26, subfunction 10 ==================== |
========== Get the value of the high precision time counter. ========= |
====================================================================== |
Parameters: |
* eax = 26 - function number |
* ebx = 10 - subfunction number |
Returned value: |
* eax = number of nanoseconds since system boot time (lower DWORD) |
* edx = number of nanoseconds since system boot time (high DWORD) |
Remarks: |
* The counter is based on HPET, if HPET is not available, resolution |
will be reduced to 10 000 000 nanoseconds. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM_GET (26) |
ebx - SSF_TIME_COUNT_PRO (10) |
====================================================================== |
===================== Function 26, subfunction 11 ==================== |
========== Find out whether low-level HD access is enabled. ========== |
====================================================================== |
Parameters: |
* eax = 26 - function number |
* ebx = 11 - subfunction number |
Returned value: |
* eax = 0/1 - disabled/enabled |
Remarks: |
* Is used in LBA read (subfunction 8 of function 58). |
* To set current state use subfunction 11 of function 21. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM_GET (26) |
ebx - SSF_ACCESS_HD_LBA (11) |
====================================================================== |
===================== Function 26, subfunction 12 ==================== |
========== Find out whether low-level PCI access is enabled. ========= |
====================================================================== |
Parameters: |
* eax = 26 - function number |
* ebx = 12 - subfunction number |
Returned value: |
* eax = 0/1 - disabled/enabled |
Remarks: |
* Is used by operations with PCI bus (function 62). |
* The current implementation uses only low bit of ecx. |
* To set the current state use subfunction 12 of function 21. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYSTEM_GET (26) |
ebx - SSF_ACCESS_PCI (12) |
====================================================================== |
=================== Function 29 - get system date. =================== |
====================================================================== |
Parameters: |
* eax = 29 - function number |
Returned value: |
* eax = 0x00DDMMYY, where |
(binary-decimal coding, BCD, is used) |
* YY = two low digits of year (00..99) |
* MM = month (01..12) |
* DD = day (01..31) |
Remarks: |
* To set system date use function 22. |
---------------------- Constants for registers: ---------------------- |
eax - SF_GET_SYS_DATE (29) |
====================================================================== |
============= Function 30 - work with the current folder. ============ |
====================================================================== |
--------- Subfunction 1 - set current folder for the thread. --------- |
Parameters: |
* eax = 30 - function number |
* ebx = 1 - subfunction number |
* ecx = pointer to string with the path to new current folder, |
rules of path forming can be found in function 70 description. |
Returned value: |
* function does not return value |
---------------------------------------------------------------------- |
--------- Subfunction 2 - get current folder for the thread. --------- |
Parameters: |
* eax = 30 - function number |
* ebx = 2 - subfunction number |
* ecx = pointer to buffer |
* edx = size of buffer |
Returned value: |
* eax = size of the string (including terminating 0) |
Remarks: |
* If the buffer is too small to hold all path, only part of the string |
will be copied and terminated with 0. |
* By default, current folder for the thread is "/sys". |
* At process/thread creation the current folder will be inherited |
from the parent. |
---------------------------------------------------------------------- |
--- Subfunction 3 - install the add.system directory for the kernel -- |
Parameters: |
* eax = 30 - function number |
* ebx = 3 - subfunction number |
* ecx = pointer to a block of data: |
key rb 64 |
path rb 64 |
Example: |
align 64 |
key db 'kolibrios',0 ; key must be in lower case |
align 64 |
path db 'HD0/1',0 |
Returned value: |
* function does not return value |
Remarks: |
* The function can be called only 1 time for 1 session of the OS. |
* On input the symbolic key is not changing by encoding. |
---------------------------------------------------------------------- |
---- Subfunction 4 - set current folder, specifying the encoding. ---- |
Parameters: |
* eax = 30 - function number |
* ebx = 4 - subfunction number |
* ecx = pointer to string with the path to new current folder |
* edx = string encoding, details can be found in function 80 description. |
Returned value: |
* function does not return value |
---------------------------------------------------------------------- |
---- Subfunction 5 - get current folder, specifying the encoding. ---- |
Parameters: |
* eax = 30 - function number |
* ebx = 5 - subfunction number |
* ecx = pointer to buffer |
* edx = size of buffer |
* esi = string encoding |
Returned value: |
* eax = size of the string in bytes (including terminating 0) |
Remarks: |
* If the buffer is too small to hold all path, only part of the string |
will be copied and terminated with 0. |
* By default, current folder for the thread is "/sys". |
* At process/thread creation the current folder will be inherited |
from the parent. |
---------------------- Constants for registers: ---------------------- |
eax - SF_CURRENT_FOLDER (30) |
ebx - SSF_SET_CF (1), SSF_GET_CF (2), SSF_ADD_SYS_FOLDER (3) |
====================================================================== |
========= Function 34 - who owner the pixel on the screen. =========== |
====================================================================== |
Parameters: |
* eax = 34 - function number |
* ebx = x-coordinate (relative to the display) |
* ecx = y-coordinate (relative to the display) |
Returned value: |
* eax = 0x000000XX - owner of pixel the slot window N |
If incorrect values ebx and ecx then function returns 0 |
* The function takes the value from the area [_WinMapAddress] |
---------------------- Constants for registers: ---------------------- |
eax - SF_GET_PIXEL_OWNER (34) |
====================================================================== |
======= Function 35 - read the color of a pixel on the screen. ======= |
====================================================================== |
Parameters: |
* eax = 35 |
* ebx = y*xsize+x, where |
* (x,y) = coordinates of a pixel (beginning from 0) |
* xsize = horizontal screen size |
Returned value: |
* eax = color 0x00RRGGBB |
Remarks: |
* To get screen sizes use function 14. Pay attention, |
that it subtracts 1 from both sizes. |
* There is also direct access (without any system calls) |
to videomemory through the selector gs. To get parameters of |
the current videomode, use function 61. |
---------------------- Constants for registers: ---------------------- |
eax - SF_GET_PIXEL (35) |
====================================================================== |
=================== Function 36 - read screen area. ================== |
====================================================================== |
Paramters: |
* eax = 36 - function number |
* ebx = pointer to the previously allocated memory area, |
where will be placed the image in the format BBGGRRBBGGRR... |
* ecx = [size on axis x]*65536 + [size on axis y] |
* edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
Returned value: |
* function does not return value |
Remarks: |
* Coordinates of the image are coordinates of the upper left corner |
of the image relative to the screen. |
* Size of the image in bytes is 3*xsize*ysize. |
---------------------- Constants for registers: ---------------------- |
eax - SF_GET_IMAGE (36) |
====================================================================== |
=================== Function 37 - work with mouse. =================== |
====================================================================== |
---------- Subfunction 0 - screen coordinates of the mouse ----------- |
Parameters: |
* eax = 37 - function number |
* ebx = 0 - subfunction number |
Returned value: |
* eax = x*65536 + y, (x,y)=coordinates of the mouse pointer |
(beginning from 0) |
-- Subfunction 1 - coordinates of the mouse relative to the window --- |
Parameters: |
* eax = 37 - function number |
* ebx = 1 - subfunction number |
Returned value: |
* eax = x*65536 + y, (x,y)=coordinates of the mouse pointer |
relative to the application window (beginning from 0) |
Remarks: |
* The value is calculated by formula (x-xwnd)*65536 + (y-ywnd). |
If y>=ywnd, the low word is non-negative and contains |
relative y-coordinate, and the high word - relative x-coordinate |
(with correct sign). Otherwise the low word is negative and still |
contains relative y-coordinate, and to the high word |
1 should be added. |
------------- Subfunction 2 - states of the mouse buttons ------------ |
Parameters: |
* eax = 37 - function number |
* ebx = 2 - subfunction number |
Returned value: |
* eax = bits 0-4 equal to subfunction 3 |
------- Subfunction 3 - states and events of the mouse buttons ------- |
Parameters: |
* eax = 37 - function number |
* ebx = 3 - subfunction number |
Returned value: |
* eax contains next information: |
states: |
* bit 0 is set = left button is held |
* bit 1 is set = right button is held |
* bit 2 is set = middle button is held |
* bit 3 is set = 4th button is held |
* bit 4 is set = 5th button is held |
events: |
* bit 8 is set = left button is pressed |
* bit 9 is set = right button is pressed |
* bit 10 is set = middle button is pressed |
* bit 15 is set = vertical scroll is used |
* bit 16 is set = left button is released |
* bit 17 is set = right button is released |
* bit 18 is set = middle button is released |
* bit 23 is set = horizontal scroll is used |
* bit 24 is set = doubleclick by left button |
-------------------- Subfunction 4 - load cursor --------------------- |
Parameters: |
* eax = 37 - function number |
* ebx = 4 - subfunction number |
* dx = data source: |
* dx = LOAD_FROM_FILE = 0 - data in a file |
* ecx = pointer to full path to the cursor file |
* the file must be in the format .cur, which is standard for |
MS Windows, at that of the size 32*32 pixels |
* dx = LOAD_FROM_MEM = 1 - data of file are already loaded in memory |
* ecx = pointer to data of the cursor file |
* the data format is the same as in the previous case |
* dx = LOAD_INDIRECT = 2 - data in memory |
* ecx = pointer to cursor image in the format ARGB 32*32 pixels |
* edx = 0xXXYY0002, where |
* XX = x-coordinate of cursor hotspot |
* YY = y-coordinate |
* 0 <= XX, YY <= 31 |
Returned value: |
* eax = 0 - failed |
* otherwise eax = cursor handle |
--------------------- Subfunction 5 - set cursor --------------------- |
Sets new cursor for the window of the current thread. |
Parameters: |
* eax = 37 - function number |
* ebx = 5 - subfunction number |
* ecx = cursor handle |
Returned value: |
* eax = handle of previous cursor |
Remarks: |
* If the handle is incorrect, the function restores the default |
cursor (standard arrow). In particular, ecx=0 restores it. |
------------------- Subfunction 6 - delete cursor -------------------- |
Parameters: |
* eax = 37 - function number |
* ebx = 6 - subfunction number |
* ecx = cursor handle |
Returned value: |
* eax destroyed |
Remarks: |
* The cursor must be loaded previously by the current thread |
(with the call to subfunction 4). The function does not delete |
system cursors and cursors, loaded by another applications. |
* If the active cursor (set by subfunction 5) is deleted, |
the system restores the default cursor (standard arrow). |
------------------ Subfunction 7 - get scroll data ------------------- |
Parameters: |
* eax = 37 - function number |
* ebx = 7 - subfunction number |
Returned value: |
* eax = [horizontal offset]*65536 + [vertical offset] |
Remarks: |
* Scroll data is available for active window only. |
* Values are zeroed after reading. |
* Values are signed. |
-------- Subfunction 8 - load cursor, specifying the encoding -------- |
Parameters: |
* eax = 37 - function number |
* ebx = 8 - subfunction number |
* ecx = pointer to the cursor file path string |
* edx = string encoding, details can be found in function 80 description. |
Returned value: |
* eax = cursor handle, 0 - failed |
---------------------- Constants for registers: ---------------------- |
eax - SF_MOUSE_GET (37) |
ebx - SSF_SCREEN_POSITION (0), SSF_WINDOW_POSITION (1), |
SSF_BUTTON (2), SSF_BUTTON_EXT (3), SSF_LOAD_CURSOR (4), |
SSF_SET_CURSOR (5), SSF_DEL_CURSOR (6), SSF_SCROLL_DATA (7) |
====================================================================== |
====================== Function 38 - draw line. ====================== |
====================================================================== |
Parameters: |
* eax = 38 - function number |
* ebx = [start coordinate on axis x]*65536 + |
[end coordinate on axis x] |
* ecx = [start coordinate on axis y]*65536 + |
[end coordinate on axis y] |
* edx = 0x00RRGGBB - color |
edx = 0x01xxxxxx - draw inversed line |
(low 24 bits are ignored) |
Returned value: |
* function does not return value |
Remarks: |
* Coordinates are relative to the window. |
* End point is also drawn. |
---------------------- Constants for registers: ---------------------- |
eax - SF_DRAW_LINE (38) |
====================================================================== |
== Function 39, subfunction 1 - get a size of the background image. == |
====================================================================== |
Parameters: |
* eax = 39 - function number |
* ebx = 1 - subfunction number |
Returned value: |
* eax = [width]*65536 + [height] |
Remarks: |
* There is a pair function to set sizes of background image - |
subfunction 1 of function 15. After which it is necessary, |
of course, anew to define image. |
---------------------- Constants for registers: ---------------------- |
eax - SF_BACKGROUND_GET (39) |
====================================================================== |
== Function 39, subfunction 2 - get pixel from the background image. = |
====================================================================== |
Parameters: |
* eax = 39 - function number |
* ebx = 2 - subfunction number |
* ecx = offset |
Returned value: |
* eax = 0x00RRGGBB - pixel color, if offset is valid |
(less than 0x160000-16) |
* eax = 2 otherwise |
Remarks: |
* Do not rely on returned value for invalid offsets, it may be |
changed in future kernel versions. |
* Offset for pixel with coordinates (x,y) |
is calculated as (x+y*xsize)*3. |
* There is a pair function to set pixel on the background image - |
subfunction 2 of function 15. |
---------------------- Constants for registers: ---------------------- |
eax - SF_BACKGROUND_GET (39) |
====================================================================== |
== Function 39, subfunction 4 - get drawing mode for the background. = |
====================================================================== |
Parameters: |
* eax = 39 - function number |
* ebx = 4 - subfunction number |
Returned value: |
* eax = 1 - tile |
* eax = 2 - stretch |
Remarks: |
* There is a pair function to set drawing mode - |
subfunction 4 of function 15. |
---------------------- Constants for registers: ---------------------- |
eax - SF_BACKGROUND_GET (39) |
====================================================================== |
=========== Function 40 - set the mask for expected events. ========== |
====================================================================== |
The mask for expected events affects function working with events |
10, 11, 23 - they notify only about events allowed by this mask. |
Parameters: |
* eax = 40 - function number |
* ebx = mask: bit i corresponds to event i+1 (see list of events) |
(set bit permits notice on event) |
bit 31: mouse active/inactive filter |
bit 31 = 0 - inactive window receive mouse events |
bit 31 = 1 - inactive window does not receive mouse events |
bit 30: cursor position filter |
bit 30 = 0 = the window receive mouse events if cursor |
outside window |
bit 30 = 1 - the window does not receive mouse events if cursor |
outside window |
Returned value: |
* eax = previous value of mask |
Remarks: |
* Default mask (7=111b) enables notices about redraw, |
keys and buttons. This is enough for many applications. |
* Events prohibited in the mask are saved anyway, when come; |
they are simply not informed with event functions. |
* Event functions take into account the mask on moment of |
function call, not on moment of event arrival. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SET_EVENTS_MASK (40) |
====================================================================== |
================ Function 43 - input/output to a port. =============== |
====================================================================== |
------------------------ Output data to port ------------------------- |
Parameters: |
* eax = 43 - function number |
* bl = byte for output |
* ecx = port number 0xnnnn (from 0 to 0xFFFF) |
Returned value: |
* eax = 0 - success |
* eax = 1 - the thread has not reserved the selected port |
------------------------ Input data from port ------------------------ |
Parameters: |
* eax = 43 - function number |
* ebx is ignored |
* ecx = 0x8000nnnn, where nnnn = port number (from 0 to 0xFFFF) |
Returned value: |
* eax = 0 - success, thus ebx = entered byte |
* eax = 1 - the thread has not reserved the selected port |
Remarks: |
* Previously the thread must reserve the selected port |
for itself by function 46. |
* Instead of call to this function it is better to use |
processor instructions in/out - this is much |
faster and a bit shorter and easier. |
---------------------- Constants for registers: ---------------------- |
eax - SF_PORT_IN_OUT (43) |
====================================================================== |
====== Function 46 - reserve/free a group of input/output ports. ===== |
====================================================================== |
To work with reserved ports an application can access directly by |
commands in/out (recommended way) and can use function 43 |
(not recommended way). |
Parameters: |
* eax = 46 - function number |
* ebx = 0 - reserve, 1 - free |
* ecx = start port number |
* edx = end port number (inclusive) |
Returned value: |
* eax = 0 - success |
* eax = 1 - error |
Remarks: |
* For ports reservation: an error occurs if and only if |
one from the following condition satisfies: |
* start port is more than end port; |
* the selected range contains incorrect port number |
(correct are from 0 to 0xFFFF); |
* limit for the total number of reserved areas is exceeded |
(maximum 255 are allowed); |
* the selected range intersects with any of earlier reserved |
* For ports free: an error is an attempt to free range, |
that was not earlier reserved by this function |
(with same ecx,edx). |
* If an error occurs (for both cases) function performs no action. |
* At booting the system reserves for itself ports |
0..0x2d, 0x30..0x4d, 0x50..0xdf, 0xe5..0xff (inclusively). |
* When a thread terminates, all reserved by it ports |
are freed automatically. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SET_PORTS (46) |
====================================================================== |
============= Function 47 - draw a number in the window. ============= |
====================================================================== |
Parameters: |
* eax = 47 - function number |
* ebx = parameters of conversion number to text: |
* bl = 0 - ecx contains number |
* bl = 1 - ecx contains pointer to dword/qword-number |
* bh = 0 - display in decimal number system |
* bh = 1 - display in hexadecimal system |
* bh = 2 - display in binary system |
* bits 16-21 = how many digits to display |
* bits 22-29 reserved and must be set to 0 |
* bit 30 set = display qword (64-bit) number (must be bl=1) |
* bit 31 set = do not display leading zeroes of the number |
* ecx = number (if bl=0) or pointer (if bl=1) |
* edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
* esi = 0xXXRRGGBB, where |
* RR, GG, BB specify text color |
* XX = 0B0FCSSS (bits): |
* B=1 - fill background (color = edi) |
* F specifies the font: |
0 = 6x9 |
1 = 8x16 |
* C=0 - draw to the window, |
C=1 - draw to the user buffer (edi) |
* SSS = (size multiplier)-1, so 0 = x1, 7 = x8 |
Returned value: |
* function does not return value |
Remarks: |
* The given length must not exceed 60. |
* The exactly given amount of digits is output. If number is small |
and can be written by smaller amount of digits, it is supplemented |
by leading zeroes; if the number is big and can not be written by |
given amount of digits, extra digits are not drawn. |
---------------------- Constants for registers: ---------------------- |
eax - SF_DRAW_NUMBER (47) |
====================================================================== |
========= Function 48, subfunction 0 - apply screen settings. ======== |
====================================================================== |
Parameters: |
* eax = 48 - function number |
* ebx = 0 - subfunction number |
* ecx = 0 - reserved |
Returned value: |
* function does not return value |
Remarks: |
* Function redraws the screen after parameters change by |
subfunctions 1 and 2. |
* Function call without prior call to one of indicated subfunctions |
is ignored. |
* Function call with nonzero ecx is ignored. |
---------------------- Constants for registers: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_APPLY (0) |
====================================================================== |
=========== Function 48, subfunction 1 - set button style. =========== |
====================================================================== |
Parameters: |
* eax = 48 - function number |
* ebx = 1 - subfunction number |
* ecx = button style: |
* 0 = flat |
* 1 = 3d |
Returned value: |
* function does not return value |
Remarks: |
* After call to this function one should redraw the screen by |
subfunction 0. |
* Button style influences only to their draw of function 8. |
---------------------- Constants for registers: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_SET_BUTTON_STYLE (1) |
====================================================================== |
====== Function 48, subfunction 2 - set standard window colors. ====== |
====================================================================== |
Parameters: |
* eax = 48 - function number |
* ebx = 2 - subfunction number |
* ecx = pointer to the color table |
* edx = size of the color table |
(must be 40 bytes for future compatibility) |
Format of the color table is shown in description of subfunction 3. |
Returned value: |
* function does not return value |
Remarks: |
* After call to this function one should redraw the screen by |
subfunction 0. |
* Table of standard colors influences only to applications, |
which receive this table obviously (by subfunction 3) |
and use it (specifying colors from it to drawing functions). |
* Table of standard colors is included in skin and is installed |
anew with skin installation (by subfunction 8). |
* Color table can be viewed/changed interactively with |
the application 'desktop'. |
---------------------- Constants for registers: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_SET_COLORS (2) |
====================================================================== |
====== Function 48, subfunction 3 - get standard window colors. ====== |
====================================================================== |
Parameters: |
* eax = 48 - function number |
* ebx = 3 - subfunction number |
* ecx = pointer to the buffer with size edx bytes, |
where table will be written |
* edx = size of color table |
(must be 40 bytes for future compatibility) |
Returned value: |
* function does not return value |
Format of the color table: |
each item is dword-value for color 0x00RRGGBB |
* +0: dword: frames - color of frame |
* +4: dword: grab - color of header |
* +8: dword: grab_button - color of button on header bar |
* +12 = +0xC: dword: grab_button_text - color of text on button |
on header bar |
* +16 = +0x10: dword: grab_text - color of text on header |
* +20 = +0x14: dword: work - color of working area |
* +24 = +0x18: dword: work_button - color of button in working area |
* +28 = +0x1C: dword: work_button_text - color of text on button |
in working area |
* +32 = +0x20: dword: work_text - color of text in working area |
* +36 = +0x24: dword: work_graph - color of graphics in working area |
Remarks: |
* Structure of the color table is described in the standard |
include file 'macros.inc' as 'system_colors'; for example, |
it is possible to write: |
sc system_colors ; variable declaration |
... ; somewhere one must call |
; this function with ecx=sc |
mov ecx, [sc.work_button_text] ; read text color on |
; button in working area |
* A program itself decides to use or not to use color table. |
For usage program must simply at calls to drawing functions select |
color taken from the table. |
* At change of the table of standard colors (by subfunction 2 with |
the subsequent application of changes by subfunction 0 or |
at skin set by subfunction 8) the system sends to all windows |
redraw message (the event with code 1). |
* Color table can be viewed/changed interactively with |
the application 'desktop'. |
---------------------- Constants for registers: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_GET_COLORS (3) |
====================================================================== |
============ Function 48, subfunction 4 - get skin height. =========== |
====================================================================== |
Parameters: |
* eax = 48 - function number |
* ebx = 4 - subfunction number |
Returned value: |
* eax = skin height |
Remarks: |
* Skin height is defined as the height of a header |
of skinned windows. |
* See also general structure of window in the description |
of function 0. |
---------------------- Constants for registers: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_GET_SKIN_HEIGHT (4) |
====================================================================== |
======== Function 48, subfunction 5 - get screen working area. ======= |
====================================================================== |
Parameters: |
* eax = 48 - function number |
* ebx = 5 - subfunction number |
Returned value: |
* eax = [left]*65536 + [right] |
* ebx = [top]*65536 + [bottom] |
Remarks: |
* The screen working area defines position and coordinates of |
a maximized window. |
* The screen working area in view of normal work is all screen |
without taskbar ('@taskbar' application). |
* (left,top) are coordinates of the left upper corner, |
(right,bottom) are coordinates of the right lower one. |
Thus the size of working area on x axis can be calculated by |
formula right-left+1, on y axis - by formula bottom-right+1. |
* See also function 14, |
to get sizes of all screen. |
* There is a pair function to set working area - subfunction 6. |
---------------------- Constants for registers: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_GET_SCREEN_AREA (5) |
====================================================================== |
======== Function 48, subfunction 6 - set screen working area. ======= |
====================================================================== |
Parameters: |
* eax = 48 - function number |
* ebx = 6 - subfunction number |
* ecx = [left]*65536 + [right] |
* edx = [top]*65536 + [bottom] |
Returned value: |
* function does not return value |
Remarks: |
* The screen working area defines position and coordinates of |
a maximized window. |
* This function is used only by the application '@taskbar', |
which set working area to all screen without taskbar. |
* (left,top) are coordinates of the left upper corner, |
(right,bottom) are coordinates of the right lower one. |
Thus the size of working area on x axis can be calculated by |
formula right-left+1, on y axis - by formula bottom-right+1. |
* If 'left'>='right', x-coordinate of working area is not changed. |
If 'left'<0, 'left' will not be set. If 'right' is greater than or |
equal to screen width, 'right' will not be set. |
Similarly on y axis. |
* See also function 14, |
to get sizes of all screen. |
* There is a pair function to get working area - subfunction 5. |
* This function redraws the screen automatically, |
updating coordinates and sizes of maximized windows. |
The system sends to all windows redraw message (the event 1). |
---------------------- Constants for registers: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_SET_SCREEN_AREA (6) |
====================================================================== |
=========== Function 48, subfunction 7 - get skin margins. =========== |
====================================================================== |
Returns the area of a header of a skinned window, intended for |
a text of a header. |
Parameters: |
* eax = 48 - function number |
* ebx = 7 - subfunction number |
Returned value: |
* eax = [left]*65536 + [right] |
* ebx = [top]*65536 + [bottom] |
Remarks: |
* An application decides itself to use or not to use this function. |
* It is recommended to take into account returned value |
of this function for choice of a place for drawing header text |
(by function 4) or a substitute of header text |
(at the discretion of an application). |
---------------------- Constants for registers: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_GET_SKIN_MARGINS (7) |
====================================================================== |
============= Function 48, subfunction 8 - set used skin. ============ |
====================================================================== |
Parameters: |
* eax = 48 - function number |
* ebx = 8 - subfunction number |
* ecx = pointer to filename of the skin |
Returned value: |
* eax = 0 - success |
* otherwise eax = file system error code; if file does not |
contain valid skin, function returns error 3 |
(unknown file system). |
Remarks: |
* After successful skin loading the system sends to all windows |
redraw message (the event 1). |
* At booting the system reads skin from file 'default.skn' |
on ramdisk. |
* User can change the skin statically by creating hisself |
'default.skn' or dynamically with the application 'desktop'. |
---------------------- Constants for registers: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_SET_SKIN (8) |
====================================================================== |
====== Function 48, subfunction 9 - get font smoothing setting. ====== |
====================================================================== |
Parameters: |
* eax = 48 - function number |
* ebx = 9 - subfunction number |
Returned value: |
* eax = 2 - subpixel, 1 - anti-aliasing, 0 - off |
---------------------- Constants for registers: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_GET_FONT_SMOOTH (9) |
====================================================================== |
========== Function 48, subfunction 10 - set font smoothing. ========= |
====================================================================== |
Parameters: |
* eax = 48 - function number |
* ebx = 10 - subfunction number |
* cl = 2 - subpixel, 1 - anti-aliasing, 0 - off |
---------------------- Constants for registers: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_SET_FONT_SMOOTH (10) |
====================================================================== |
============ Function 48, subfunction 11 - get font size. ============ |
====================================================================== |
Parameters: |
* eax = 48 - function number |
* ebx = 11 - subfunction number |
Returned value: |
* eax = current font height in pixels |
---------------------- Constants for registers: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_GET_FONT_SIZE (11) |
====================================================================== |
============ Function 48, subfunction 12 - set font size. ============ |
====================================================================== |
Parameters: |
* eax = 48 - function number |
* ebx = 12 - subfunction number |
* cl = new font height in pixels |
---------------------- Constants for registers: ---------------------- |
eax - SF_STYLE_SETTINGS (48) |
ebx - SSF_SET_FONT_SIZE (12) |
====================================================================== |
== Function 48, subfunction 13 - set skin, specifying the encoding. == |
====================================================================== |
Parameters: |
* eax = 48 - function number |
* ebx = 13 - subfunction number |
* ecx = pointer to the skin file path string |
* edx = string encoding, details can be found in function 80 description. |
Returned value: |
* eax = 0 - success |
* otherwise eax = file system error code; if file does not |
contain valid skin, function returns error 3 |
(unknown file system). |
Remarks: |
* After successful skin loading the system sends to all windows |
redraw message (the event 1). |
* At booting the system reads skin from file 'default.skn' |
on ramdisk. |
* User can change the skin statically by creating hisself |
'default.skn' or dynamically with the application 'desktop'. |
====================================================================== |
=========== Function 49 - Advanced Power Management (APM). =========== |
====================================================================== |
Parameters: |
* eax = 49 - function number |
* dx = number of the APM function |
(analogue of ax in APM specification) |
* bx, cx = parameters of the APM function |
Returned value: |
* 16-bit registers ax, bx, cx, dx, si, di and carry flag CF |
are set according to the APM specification |
* high halves of 32-bit registers eax, ebx, ecx, |
edx, esi, edi are destroyed |
Remarks: |
* APM 1.2 specification is described in the document |
"Advanced Power Management (APM) BIOS Specification" |
(Revision 1.2), available at |
http://www.microsoft.com/whdc/archive/amp_12.mspx; |
besides it is included in famous Interrupt List by Ralf Brown |
(http://www.pobox.com/~ralf/files.html, |
ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/). |
---------------------- Constants for registers: ---------------------- |
eax - SF_APM (49) |
====================================================================== |
=================== Function 50 - set window shape. ================== |
====================================================================== |
Normal windows have rectangular shape. This function can give to |
a window any shape. The shape is given by a set of points inside |
the base rectangle belonging to a window. Position and coordinates |
of the base rectangle are set by function 0 |
and changed by function 67. |
--------------------------- Set shape data --------------------------- |
Parameters: |
* eax = 50 - function number |
* ebx = 0 - subfunction number |
* ecx = pointer to shape data (array of bytes 0/1) |
Returned value: |
* function does not return value |
-------------------------- Set shape scale --------------------------- |
Parameters: |
* eax = 50 - function number |
* ebx = 1 - subfunction number |
* ecx sets a scale: each byte of data defines |
(2^scale)*(2^scale) pixels |
Returned value: |
* function does not return value |
Remarks: |
* Default scale is 0 (scale factor is 1). If in the shape data |
one byte corresponds to one pixel, there is no necessity |
to set scale. |
* Let's designate xsize = window width (in pixels), ysize = height; |
pay attention, that they are one pixel more than defined by |
functions 0, 67. |
* On definition of scale xsize and ysize must be divisible |
on 2^scale. |
* Byte of data on offset 'a' must be 0/1 and defines belonging |
to a window of square with the side 2^scale (if scale=0, |
this is one pixel) and coordinates of the left upper corner |
(a mod (xsize shr scale), a div (xsize shr scale)) |
* Data size: (xsize shr scale)*(ysize shr scale). |
* Data must be presented in the memory and not change |
after set of shape. |
* The system views the shape data at every window redraw by |
function 0. |
* The call of subfunction 0 with NULL pointer results in return |
to the rectangular shape. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SET_WINDOW_SHAPE (50) |
====================================================================== |
==================== Function 51 - create thread. ==================== |
====================================================================== |
Parameters: |
* eax = 51 - function number |
* ebx = 1 - unique subfunction |
* ecx = address of thread entry point (starting eip) |
* edx = pointer to thread stack (starting esp) |
Returned value: |
* eax = -1 - error (there is too many threads) |
* otherwise eax = TID - thread identifier |
---------------------- Constants for registers: ---------------------- |
eax - SF_CREATE_THREAD (51) |
====================================================================== |
==================== Function 54, subfunction 0 ====================== |
============== Get the number of slots in the clipboard. ============= |
====================================================================== |
Parameters: |
* eax = 54 - function number |
* ebx = 0 - subfunction number |
Returned value: |
* eax = slots in the clipboard |
* eax = -1 - main list area not found |
---------------------- Constants for registers: ---------------------- |
eax - SF_CLIPBOARD (54) |
ebx - SSF_GET_SLOT_COUNT (0) |
====================================================================== |
==================== Function 54, subfunction 1 ====================== |
================= Read the data from the clipboard. ================== |
====================================================================== |
Parameters: |
* eax = 54 - function number |
* ebx = 1 - subfunction number |
* eсx = slot number |
Returned value: |
* eax = if successful - pointer to a memory with data |
* eax = 1 - error |
* eax = -1 - main list area not found |
Remarks: |
* The function must be used in conjunction with 68.11. The |
application must pre-initialize the local heap by calling 68.11. |
---------------------- Constants for registers: ---------------------- |
eax - SF_CLIPBOARD (54) |
ebx - SSF_READ_CB (1) |
====================================================================== |
==================== Function 54, subfunction 2 ====================== |
================= Write the data to the clipboard. =================== |
====================================================================== |
Parameters: |
* eax = 54 - function number |
* ebx = 2 - subfunction number |
* eсx = the number of bytes to be copied |
* edx = a pointer to a buffer for data to be copied |
Returned value: |
* eax = 0 - success |
* eax = 1 - error |
* eax = -1 - main list area not found |
---------------------- Constants for registers: ---------------------- |
eax - SF_CLIPBOARD (54) |
ebx - SSF_WRITE_CB (2) |
====================================================================== |
===================== Function 54, subfunction 3 ===================== |
================ Delete the last slot in the clipboard =============== |
====================================================================== |
Parameters: |
* eax = 54 - function number |
* ebx = 3 - subfunction number |
Returned value: |
* eax = 0 - success |
* eax = 1 - error |
* eax = -1 - main list area not found |
---------------------- Constants for registers: ---------------------- |
eax - SF_CLIPBOARD (54) |
ebx - SSF_DEL_SLOT (3) |
====================================================================== |
===================== Function 54, subfunction 4 ===================== |
===================== Alarm reset the lock buffer ==================== |
====================================================================== |
Parameters: |
* eax = 54 - function number |
* ebx = 4 - subfunction number |
Returned value: |
* eax = 0 - success |
* eax = -1 - main list area not found or no blocking |
Remarks: |
* Used in exceptional cases, where no responsible or killed |
application blocked the clipboard operations. |
---------------------- Constants for registers: ---------------------- |
eax - SF_CLIPBOARD (54) |
ebx - SSF_UNLOCK_BUFFER (4) |
====================================================================== |
Function 55, subfunction 55 - begin to play data on built-in speaker. |
====================================================================== |
Parameters: |
* eax = 55 - function number |
* ebx = 55 - subfunction number |
* esi = pointer to data |
Returned value: |
* eax = 0 - success |
* eax = 55 - error (speaker is off or busy) |
Data is an array of items with variable length. |
Format of each item is defined by first byte: |
* 0 = end of data |
* 1..0x80 = sets sound duration on 1/100 of second; sound note |
is defined by immediate value of frequency |
* following word (2 bytes) contains frequency divider; |
frequency is defined as 1193180/divider |
* 0x81 = invalid |
* 0x82..0xFF = note is defined by octave and number: |
* duration in 1/100 of second = (first byte)-0x81 |
* there is one more byte; |
* (second byte)=0xFF - delay |
* otherwise it looks like a*0x10+b, where b=number of the note in |
an octave from 1 to 12, a=number of octave (beginning from 0) |
Remarks: |
* Speaker play can be disabled/enabled by |
subfunction 8 of function 18. |
* Function returns control, having informed the system |
an information on request. Play itself goes independently from |
the program. |
* The data must be kept in the memory at least up to the end |
of play. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SPEAKER_PLAY (55) |
====================================================================== |
======================= Function 57 - PCI BIOS. ====================== |
====================================================================== |
Parameters: |
* eax = 57 - function number |
* ebp corresponds to al in PCI BIOS specification |
* other registers are set according to PCI BIOS specification |
Returned value: |
* CF is undefined |
* other registers are set according to PCI BIOS specification |
Remarks: |
* Many effects of this function can be also achieved with |
corresponding subfunctions of function 62. |
* The function calls PCI32 BIOS extension, documented e.g. in |
http://alpha1.dyns.net/files/PCI/bios21.pdf. |
* If BIOS does not support this extension, its behavior is emulated |
(through kernel-mode analogues of subfunctions of function 62). |
---------------------- Constants for registers: ---------------------- |
eax - SF_PCI_BIOS (57) |
====================================================================== |
========== Function 60 - Inter Process Communication (IPC). ========== |
====================================================================== |
IPC is used for message dispatching from one process/thread to |
another. Previously it is necessary to agree how to interpret |
the concrete message. |
----------- Subfunction 1 - set the area for IPC receiving ----------- |
Is called by process-receiver. |
Parameters: |
* eax = 60 - function number |
* ebx = 1 - subfunction number |
* ecx = pointer to the buffer |
* edx = size of the buffer |
Returned value: |
* eax = 0 - always success |
Format of IPC-buffer: |
* +0: dword: if nonzero, buffer is considered locked; |
lock/unlock the buffer, when you work with it and need that |
buffer data are not changed from outside (no new messages) |
* +4: dword: occupied place in the buffer (in bytes) |
* +8: first message |
* +8+n: second message |
* ... |
Format of a message: |
* +0: dword: PID of sender |
* +4: dword: message length (not including this header) |
* +8: n*byte: message data |
------------------ Subfunction 2 - send IPC message ------------------ |
Is called by process-sender. |
Parameters: |
* eax = 60 - function number |
* ebx = 2 - subfunction number |
* ecx = PID of receiver |
* edx = pointer to the message data |
* esi = message length (in bytes) |
Returned value: |
* eax = 0 - success |
* eax = 1 - the receiver has not defined buffer for IPC messages |
(can be, still have no time, |
and can be, this is not right process) |
* eax = 2 - the receiver has blocked IPC-buffer; try to wait a bit |
* eax = 3 - overflow of IPC-buffer of the receiver |
* eax = 4 - process/thread with such PID does not exist |
Remarks: |
* Immediately after writing of IPC-message to the buffer the system |
sends to the receiver the event with code 7 (see event codes). |
---------------------- Constants for registers: ---------------------- |
eax - SF_IPC (60) |
ebx - SSF_SET_AREA (1), SSF_SEND_MESSAGE (2) |
====================================================================== |
==== Function 61 - get parameters for the direct graphics access. ==== |
====================================================================== |
The data of the graphics screen (the memory area which displays |
screen contents) are accessible to a program directly, without |
any system calls, through the selector gs: |
mov eax, [gs:0] |
places in eax the first dword of the buffer, which contains |
information on color of the left upper point (and, possibly, colors |
of several following). |
mov [gs:0], eax |
by work in VESA modes with LFB sets color of the left upper point |
(and, possibly, colors of several following). |
To interpret the data of graphics screen program needs to know |
some parameters, returning by this function. |
Remarks: |
* Graphics parameters changes very seldom at work. |
* At videomode change the system redraws all windows (event |
with code 1) and redraws the background (event 5). |
Same events occur in other cases too, which meet much more often, |
than videomode change. |
* By operation in videomodes with LFB the selector gs points to |
LFB itself, so reading/writing on gs result directly in |
change of screen contents. By operation in videomodes without |
LFB gs points to some data area in the kernel, and all functions |
of screen output fulfil honesty double operation on writing |
directly to the screen and writing to this buffer. In result |
at reading contents of this buffer the results correspond to |
screen contents (with, generally speaking, large color |
resolution), and writing is ignored. |
One exception is the mode 320*200, for which main loop of the |
system thread updates the screen according to mouse movements. |
------------------------- Screen resolution -------------------------- |
Parameters: |
* eax = 61 - function number |
* ebx = 1 - subfunction number |
Returned value: |
* eax = [resolution on x axis]*65536 + [resolution on y axis] |
Remarks: |
* One can use function 14 paying attention that |
it returns sizes on 1 pixel less. It is fully equivalent way. |
---------------------- Number of bits per pixel ---------------------- |
Parameters: |
* eax = 61 - function number |
* ebx = 2 - subfunction number |
Returned value: |
* eax = number of bits per pixel (24 or 32) |
-------------------- Number of bytes per scanline -------------------- |
Parameters: |
* eax = 61 - function number |
* ebx = 3 - subfunction number |
Returned value: |
* eax = number of bytes occupied by one scanline |
(horizontal line on the screen) |
---------------------- Constants for registers: ---------------------- |
eax - SF_GET_GRAPHICAL_PARAMS (61) |
ebx - SSF_SCREEN_SIZE (1), SSF_BITS_PER_PIXEL (2), |
SSF_BYTES_PER_LINE (3) |
====================================================================== |
===== Function 62, subfunction 0 - get version of PCI-interface. ===== |
====================================================================== |
Parameters: |
* eax = 62 - function number |
* bl = 0 - subfunction number |
Returned value: |
* eax = -1 - PCI access is disabled; otherwise |
* ah.al = version of PCI-interface (ah=version, al=subversion) |
* high word of eax is zeroed |
Remarks: |
* Previously low-level access to PCI for applications must be |
enabled by subfunction 12 of function 21. |
* If PCI BIOS is not supported, the value of ax is undefined. |
---------------------- Constants for registers: ---------------------- |
eax - SF_PCI (62) |
ebx - SSF_GET_VERSION (0) |
====================================================================== |
==== Function 62, subfunction 1 - get number of the last PCI-bus. ==== |
====================================================================== |
Parameters: |
* eax = 62 - function number |
* bl = 1 - subfunction number |
Returned value: |
* eax = -1 - access to PCI is disabled; otherwise |
* al = number of the last PCI-bus; other bytes of eax are destroyed |
Remarks: |
* Previously low-level access to PCI for applications must be |
enabled by subfunction 12 of function 21. |
* If PCI BIOS is not supported, the value of ax is undefined. |
---------------------- Constants for registers: ---------------------- |
eax - SF_PCI (62) |
ebx - SSF_GET_LAST_BUS (1) |
====================================================================== |
===================== Function 62, subfunction 2 ===================== |
===== Get mechanism of addressing to the PCI configuration space. ==== |
====================================================================== |
Parameters: |
* eax = 62 - function number |
* bl = 2 - subfunction number |
Returned value: |
* eax = -1 - access to PCI is disabled; otherwise |
* al = mechanism (1 or 2); other bytes of eax are destroyed |
Remarks: |
* Previously low-level access to PCI for applications must be |
enabled by subfunction 12 of function 21. |
* Addressing mechanism is selected depending on |
equipment characteristics. |
* Subfunctions of read and write work automatically |
with the selected mechanism. |
---------------------- Constants for registers: ---------------------- |
eax - SF_PCI (62) |
ebx - SSF_GET_ADRR_MODE (2) |
====================================================================== |
======== Function 62, subfunctions 4,5,6 - read PCI-register. ======== |
====================================================================== |
Parameters: |
* eax = 62 - function number |
* bl = 4 - read byte |
* bl = 5 - read word |
* bl = 6 - read dword |
* bh = number of PCI-bus |
* ch = dddddfff, where ddddd = number of the device on the bus, |
fff = function number of device |
* cl = number of register (must be even for bl=5, |
divisible by 4 for bl=6) |
Returned value: |
* eax = -1 - error (access to PCI is disabled or parameters |
are not supported); otherwise |
* al/ax/eax (depending on requested size) contains the data; |
the other part of register eax is destroyed |
Remarks: |
* Previously low-level access to PCI for applications must be |
enabled by subfunction 12 of function 21. |
* Access mechanism 2 supports only 16 devices on a bus and ignores |
function number. To get access mechanism use subfunction 2. |
* Some registers are standard and exist for all devices, some are |
defined by the concrete device. The list of registers of the |
first type can be found e.g. in famous |
Interrupt List by Ralf Brown |
(http://www.pobox.com/~ralf/files.html, |
ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/); |
registers of the second type must be listed |
in the device documentation. |
---------------------- Constants for registers: ---------------------- |
eax - SF_PCI (62) |
ebx - SSF_READ_BYTE (4), SSF_READ_WORD (5), SSF_READ_DWORD (6) |
====================================================================== |
====== Function 62, subfunctions 8,9,10 - write to PCI-register. ===== |
====================================================================== |
Parameters: |
* eax = 62 - function number |
* bl = 8 - write byte |
* bl = 9 - write word |
* bl = 10 - write dword |
* bh = number of PCI-bus |
* ch = dddddfff, where ddddd = number of the device on the bus, |
fff = function number of device |
* cl = number of register (must be even for bl=9, |
divisible by 4 for bl=10) |
* dl/dx/edx (depending on requested size) contains |
the data to write |
Returned value: |
* eax = -1 - error (access to PCI is disabled or parameters |
are not supported) |
* eax = 0 - success |
Remarks: |
* Previously low-level access to PCI for applications must be |
enabled by subfunction 12 of function 21. |
* Access mechanism 2 supports only 16 devices on a bus and ignores |
function number. To get access mechanism use subfunction 2. |
* Some registers are standard and exist for all devices, some are |
defined by the concrete device. The list of registers of the |
first type can be found e.g. in famous Interrupt List by |
Ralf Brown; registers of the second type must be listed |
in the device documentation. |
---------------------- Constants for registers: ---------------------- |
eax - SF_PCI (62) |
ebx - SSF_WRITE_BYTE (8), SSF_WRITE_WORD (9), SSF_WRITE_DWORD (10) |
====================================================================== |
============== Function 63 - work with the debug board. ============== |
====================================================================== |
The debug board is the global system buffer (with the size |
1024 bytes), to which any program can write (generally speaking, |
arbitrary) data and from which other program can read these data. |
By the agreement written data are text strings interpreted as |
debug messages on a course of program execution. The kernel in |
some situations also writes to the debug board information on |
execution of some functions; by the agreement kernel messages |
begins from the prefix "K : ". |
For view of the debug board the application 'board' was created, |
which reads data from the buffer and displays them in its window. |
'board' interpretes the sequence of codes 13,10 as newline. |
A character with null code in an end of line is not necessary, |
but also does not prevent. |
Because debugger has been written, the value of the debug board |
has decreased, as debugger allows to inspect completely a course of |
program execution without any efforts from the direction of program |
itself. Nevertheless in some cases the debug board is still useful. |
----------------------------- Write byte ----------------------------- |
Parameters: |
* eax = 63 - function number |
* ebx = 1 - subfunction number |
* cl = data byte |
Returned value: |
* function does not return value |
Remarks: |
* Byte is written to the buffer. Buffer size is 512 bytes. |
At buffer overflow all obtained data are lost. |
* For output to the debug board of more complicated objects |
(strings, numbers) it is enough to call this function in cycle. |
It is possible not to write the appropriate code manually and use |
file 'debug.inc', which is included into the distributive. |
----------------------------- Read byte ------------------------------ |
Takes away byte from the buffer. |
Parameters: |
* eax = 63 - function number |
* ebx = 2 - subfunction number |
Returned value: |
* eax = ebx = 0 - the buffer is empty |
* eax = byte, ebx = 1 - byte was successfully read |
---------------------- Constants for registers: ---------------------- |
eax - SF_BOARD (63) |
ebx - SSF_DEBUG_WRITE (1), SSF_DEBUG_READ (2) |
====================================================================== |
============== Function 64 - resize application memory. ============== |
====================================================================== |
Parameters: |
* eax = 64 - function number |
* ebx = 1 - unique subfunction |
* ecx = new memory size |
Returned value: |
* eax = 0 - success |
* eax = 1 - not enough memory |
Remarks: |
* There is another way to dynamically allocate/free memory - |
subfunctions 12, 13 and 20 of function 68, but after creation |
of the process heap 64 function call will be ignored. |
* The function cannot be used together with 68.11, 68.12, 68.13. |
The function call will be ignored after creation of process heap |
with function 68.11. |
---------------------- Constants for registers: ---------------------- |
eax - SF_MEMORY_RESIZE (64) |
====================================================================== |
======== Function 65 - draw image with palette in the window. ======== |
====================================================================== |
Parameters: |
* eax = 65 - function number |
* ebx = pointer to the image |
* ecx = [size on axis x]*65536 + [size on axis y] |
* edx = [coordinate on axis x]*65536 + [coordinate on axis y] |
* esi = number of bits per pixel, must be 1,2,4,8,9,15,16,24 or 32; |
* edi = pointer to palette (2 to the power esi colors 0x00RRGGBB); |
ignored when esi > 8 |
* ebp = offset of next row data relative to previous row data |
Returned value: |
* function does not return value |
Remarks: |
* Coordinates of the image are coordinates of the upper left corner |
of the image relative to the window. |
* Format of image with 1 bit per pixel: each byte of image |
(possibly excluding last bytes in rows), contains information on |
the color of 8 pixels, MSB corresponds to first pixel. |
* Format of image with 2 bits per pixel: each byte of image |
(possibly excluding last bytes in rows), contains information on |
the color of 4 pixels, two MSBs correspond to first pixel. |
* Format of image with 4 bits per pixel: each byte of image |
excluding last bytes in rows (if width is odd) contains |
information on the color of 2 pixels, high-order tetrad |
corresponds to first pixel. |
* Format of image with 8 bits per pixel: each byte of image is |
index in the palette. |
* Format of image with 9 bits per pixel: array of one byte values; |
each byte (8 bit) represents the intensity of gray for one pixel; |
this format is equal to 8bpp without palette. |
* Format of image with 15 bits per pixel: the color of each pixel |
is coded as (bit representation) 0RRRRRGGGGGBBBBB - 5 bits per |
each color. |
* Format of image with 16 bits per pixel: the color of each pixel |
is coded as RRRRRGGGGGGBBBBB (5+6+5). |
* Format of image with 24 bits per pixel: the color of each pixel |
is coded as 3 bytes - sequentially blue, green, red components. |
* Format of image with 32 bits per pixel: similar to 24, but |
one additional ignored byte is present. It's format is BGRX, |
where X is the ignored byte. |
* The call to function 7 is equivalent to call to this function |
with esi=24, ebp=0. |
---------------------- Constants for registers: ---------------------- |
eax - SF_PUT_IMAGE_EXT (65) |
====================================================================== |
================== Function 66 - work with keyboard. ================= |
====================================================================== |
The input mode influences results of reading keys by function 2. |
When a program loads, ASCII input mode is set for it. |
-------------- Subfunction 1 - set keyboard input mode. -------------- |
Parameters: |
* eax = 66 - function number |
* ebx = 1 - subfunction number |
* ecx = mode: |
* 0 = normal (ASCII-characters) |
* 1 = scancodes |
Returned value: |
* function does not return value |
-------------- Subfunction 2 - get keyboard input mode. -------------- |
Parameters: |
* eax = 66 - function number |
* ebx = 2 - subfunction number |
Returned value: |
* eax = current mode |
------------ Subfunction 3 - get status of control keys. ------------- |
Parameters: |
* eax = 66 - function number |
* ebx = 3 - subfunction number |
Returned value: |
* eax = bit mask: |
* bit 0 (mask 1): left Shift is pressed |
* bit 1 (mask 2): right Shift is pressed |
* bit 2 (mask 4): left Ctrl is pressed |
* bit 3 (mask 8): right Ctrl is pressed |
* bit 4 (mask 0x10): left Alt is pressed |
* bit 5 (mask 0x20): right Alt is pressed |
* bit 6 (mask 0x40): CapsLock is on |
* bit 7 (mask 0x80): NumLock is on |
* bit 8 (mask 0x100): ScrollLock is on |
* bit 9 (mask 0x200): left Win is pressed |
* bit 10 (mask 0x400): right Win is pressed |
* other bits are cleared |
-------------- Subfunction 4 - set system-wide hotkey. --------------- |
When hotkey is pressed, the system notifies only those applications, |
which have installed it; the active application (which receives |
all normal input) does not receive such keys. |
The notification consists in sending event with the code 2. |
Reading hotkey is the same as reading normal key - by function 2. |
Parameters: |
* eax = 66 - function number |
* ebx = 4 - subfunction number |
* cl determines key scancode; |
use cl=0 to give combinations such as Ctrl+Shift |
* edx = 0xXYZ determines possible states of control keys: |
* Z (low 4 bits) determines state of LShift and RShift: |
* 0 = no key must be pressed; |
* 1 = exactly one key must be pressed; |
* 2 = both keys must be pressed; |
* 3 = must be pressed LShift, but not RShift; |
* 4 = must be pressed RShift, but not LShift |
* Y - similar for LCtrl and RCtrl; |
* X - similar for LAlt and RAlt |
Returned value: |
* eax=0 - success |
* eax=1 - too many hotkeys (maximum 256 are allowed) |
Remarks: |
* Hotkey can work either at pressing or at release. Release |
scancode of a key is more on 128 than pressing scancode |
(i.e. high bit is set). |
* Several applications can set the same combination; |
all such applications will be informed on pressing |
such combination. |
-------------- Subfunction 5 - delete installed hotkey. -------------- |
Parameters: |
* eax = 66 - function number |
* ebx = 5 - subfunction number |
* cl = scancode of key and edx = 0xXYZ the same as in subfunction 4 |
Returned value: |
* eax = 0 - success |
* eax = 1 - there is no such hotkey |
Remarks: |
* When a process/thread terminates, all hotkey installed by it are |
deleted. |
* The call to this subfunction does not affect other applications. |
If other application has defined the same combination, it will |
still receive notices. |
--------------- Subfunction 6 - block the normal input. -------------- |
Parameters: |
* eax = 66 - function number |
* ebx = 6 - subfunction number |
Returned value: |
* function does not return value |
Remarks: |
* Blocking the normal keyboard input for installed hotkeys |
* To emulate a mouse via the keyboard, the application MOUSEMUL |
------------ Subfunction 7 - unlock the normal input. ---------------- |
Parameters: |
* eax = 66 - function number |
* ebx = 7 - subfunction number |
Returned value: |
* function does not return value |
Remarks: |
* Unlocking the results of the f. 66.6 |
* To emulate a mouse via the keyboard, the application MOUSEMUL |
---------------------- Constants for registers: ---------------------- |
eax - SF_KEYBOARD (66) |
ebx - SSF_SET_INPUT_MODE (1), SSF_GET_INPUT_MODE (2), |
SSF_GET_CONTROL_KEYS (3), SSF_SET_SYS_HOTKEY (4), |
SSF_DEL_SYS_HOTKEY (5), SSF_LOCK_INPUT (6), SSF_UNLOCK_INPUT (7) |
====================================================================== |
========= Function 67 - change position/sizes of the window. ========= |
====================================================================== |
Parameters: |
* eax = 67 - function number |
* ebx = new x-coordinate of the window |
* ecx = new y-coordinate of the window |
* edx = new x-size of the window |
* esi = new y-size of the window |
Returned value: |
* function does not return value |
Remarks: |
* The value -1 for a parameter means "do not change"; e.g. to move |
the window without resizing it is possible to specify edx=esi=-1. |
* Previously the window must be defined by function 0. |
It sets initial coordinates and sizes of the window. |
* Sizes of the window are understood in sense of function 0, |
that is one pixel less than real sizes. |
* The function call for maximized windows is simply ignored. |
* For windows of appropriate styles position and/or sizes can be |
changed by user; current position and sizes can be obtained by |
call to function 9. |
* The function sends to the window redraw event (with the code 1). |
---------------------- Constants for registers: ---------------------- |
eax - SF_CHANGE_WINDOW (67) |
====================================================================== |
====== Function 68, subfunction 0 - get the task switch counter. ===== |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 0 - subfunction number |
Returned value: |
* eax = number of task switches from the system booting |
(modulo 2^32) |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_GET_TASK_SWITCH_COUNT (0) |
====================================================================== |
======= Function 68, subfunction 1 - switch to the next thread. ====== |
====================================================================== |
The function completes the current time slice allocated to the |
thread and switches to the next. (Which thread in which process |
will be next, is unpredictable). Later, when execution queue |
will reach the current thread, execution will be continued. |
Parameters: |
* eax = 68 - function number |
* ebx = 1 - subfunction number |
Returned value: |
* function does not return value |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_SWITCH_TASK (1) |
====================================================================== |
============= Function 68, subfunction 2 - cache + rdpmc. ============ |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 2 - subfunction number |
* ecx = required action: |
* ecx = 0 - enable instruction 'rdpmc' |
(ReaD Performance-Monitoring Counters) for applications |
* ecx = 1 - find out whether cache is disabled/enabled |
* ecx = 2 - enable cache |
* ecx = 3 - disable cache |
Returned value: |
* for ecx=0: |
* eax = the value of cr4 |
* for ecx=1: |
* eax = (cr0 and 0x60000000): |
* eax = 0 - cache is on |
* eax <> 0 - cache is off |
* for ecx=2 and ecx=3: |
* function does not return value |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_PERFORMANCE (2) |
ecx - SSSF_ALLOW_RDPMC (0), SSSF_CACHE_STATUS (1), |
SSSF_CACHE_ON (2), SSSF_CACHE_OFF (3) |
====================================================================== |
=========== Function 68, subfunction 3 - read MSR-register. ========== |
====================================================================== |
MSR = Model Specific Register; the complete list of MSR-registers |
of a processor is included to the documentation on it (for example, |
IA-32 Intel Architecture Software Developer's Manual, |
Volume 3, Appendix B); each processor family has its own subset |
of the MSR-registers. |
Parameters: |
* eax = 68 - function number |
* ebx = 3 - subfunction number |
* ecx is ignored |
* edx = MSR address |
Returned value: |
* ebx:eax = high:low dword of the result |
Remarks: |
* If ecx contains nonexistent or not implemented for this processor |
MSR, processor will generate an exception in the kernel, which |
will kill the thread. |
* Previously it is necessary to check, whether MSRs are supported |
as a whole, with the instruction 'cpuid'. Otherwise processor |
will generate other exception in the kernel, which will anyway |
kill the thread. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_READ_MSR (3) |
====================================================================== |
========= Function 68, subfunction 4 - write to MSR-register. ======== |
====================================================================== |
MSR = Model Specific Register; the complete list of MSR-registers |
of a processor is included to the documentation on it (for example, |
IA-32 Intel Architecture Software Developer's Manual, |
Volume 3, Appendix B); each processor family has its own subset |
of the MSR-registers. |
Parameters: |
* eax = 68 - function number |
* ebx = 4 - subfunction number |
* ecx is ignored |
* edx = MSR address |
* esi:edi = high:low dword |
Returned value: |
* function does not return value |
Remarks: |
* If ecx contains nonexistent or not implemented for this processor |
MSR, processor will generate an exception in the kernel, which |
will kill the thread. |
* Previously it is necessary to check, whether MSRs are supported |
as a whole, with the instruction 'cpuid'. Otherwise processor |
will generate other exception in the kernel, which will anyway |
kill the thread. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_WRITE_MSR (4) |
====================================================================== |
=== Function 68, subfunction 11 - initialize process heap ============ |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 11 - subfunction number |
Returned value: |
* eax = 0 - failed |
* otherwise size of created heap |
Remarks: |
* The function call initializes heap for subfunctions 12, 13 and 20. |
* If the process heap is already created, this function will return |
the size of the existing heap. |
Heap size is equal to total amount of free application memory. |
* After creation of the heap calls to function 64 will be ignored. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_HEAP_INIT (11) |
====================================================================== |
======== Function 68, subfunction 12 - allocate memory block. ======== |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 12 - subfunction number |
* ecx = required size in bytes |
Returned value: |
* eax = pointer to the allocated block |
Remarks: |
* The function allocates an integer number of pages (4 Kb) in such |
way that the real size of allocated block is more than or equal to |
requested size. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_MEM_ALLOC (12) |
====================================================================== |
========== Function 68, subfunction 13 - free memory block. ========== |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 13 - subfunction number |
* ecx = pointer to the memory block |
Returned value: |
* eax = 1 - success |
* eax = 0 - failed |
Remarks: |
* The memory block must have been allocated by subfunction 12 |
or subfunction 20. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_MEM_FREE (13) |
====================================================================== |
===================== Function 68, subfunction 14 ==================== |
============ Wait for signal from another program/driver. ============ |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 14 - subfunction number |
* ecx = pointer to the buffer for information (24 bytes) |
Returned value: |
* buffer pointed to by ecx contains the following information: |
* +0: dword: identifier for following data of signal |
* +4: dword: data of signal (20 bytes), format of which is defined |
by the first dword |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_WAIT_SIGNAL (14) |
====================================================================== |
============= Function 68, subfunction 16 - load driver. ============= |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 16 - subfunction number |
* ecx = pointer to ASCIIZ-string with driver name |
Returned value: |
* eax = 0 - failed |
* otherwise eax = driver handle |
Remarks: |
* If the driver was not loaded yet, it is loaded; |
if the driver was loaded yet, nothing happens. |
* Driver name is case-sensitive. |
Maximum length of the name is 16 characters, including |
terminating null character, the rest is ignored. |
* Driver ABC is loaded from file /sys/drivers/ABC.sys. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_LOAD_DRIVER (16) |
====================================================================== |
============ Function 68, subfunction 17 - driver control. =========== |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 17 - subfunction number |
* ecx = pointer to the control structure: |
* +0: dword: handle of driver |
* +4: dword: code of driver function |
* +8: dword: pointer to input data |
* +12 = +0xC: dword: size of input data |
* +16 = +0x10: dword: pointer to output data |
* +20 = +0x14: dword: size of output data |
Returned value: |
* eax = determined by driver |
Remarks: |
* Function codes and the structure of input/output data |
are defined by driver. |
* Previously one must obtain driver handle by subfunction 16. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_CONTROL_DRIVER (17) |
====================================================================== |
== Function 68, subfunction 18 - load DLL, specifying the encoding. == |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 18 - subfunction number |
* ecx = pointer to the string with path to DLL |
* edx = string encoding, details can be found in function 80 description. |
Returned value: |
* eax = 0 - failed |
* otherwise eax = pointer to DLL export table |
Remarks: |
* Export table is an array of structures of 2 dword's, terminated |
by zero. The first dword in structure points to function name, |
the second dword contains address of function. |
====================================================================== |
=============== Function 68, subfunction 19 - load DLL. ============== |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 19 - subfunction number |
* ecx = pointer to the string with path to DLL, |
rules of path forming can be found in function 70 description. |
Returned value: |
* eax = 0 - failed |
* otherwise eax = pointer to DLL export table |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_LOAD_DLL (19) |
====================================================================== |
======= Function 68, subfunction 20 - reallocate memory block. ======= |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 20 - subfunction number |
* ecx = new size in bytes |
* edx = pointer to already allocated block |
Returned value: |
* eax = pointer to the reallocated block, 0 = error |
Remarks: |
* Before this call one must initialize process heap by call to |
subfunction 11. |
* The function allocates an integer number of pages (4 Kb) in such |
way that the real size of allocated block is more than or equal to |
requested size. |
* If edx=0, the function call is equivalent to memory allocation |
with subfunction 12. Otherwise the block at edx |
must be allocated earlier with subfunction 12 or this subfunction. |
* If ecx=0, the function frees memory block at edx and returns 0. |
* The contents of the block are unchanged up to the shorter of |
the new and old sizes. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_MEM_REALLOC (20) |
====================================================================== |
=========== Function 68, subfunction 21 - load driver PE. ============ |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 21 - subfunction number |
* ecx = pointer to ASCIIZ-string with driver name |
* edx = pointer to command line |
Returned value: |
* eax = 0 - failed |
* otherwise eax = driver handle |
Remarks: |
* If the driver was not loaded yet, it is loaded; |
if the driver was loaded yet, nothing happens. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_LOAD_DRIVER_PE (21) |
====================================================================== |
======== Function 68, subfunction 22 - open named memory area. ======= |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 22 - subfunction number |
* ecx = area name. Maximum of 31 characters with terminating zero |
* edx = area size in bytes for SHM_CREATE and SHM_OPEN_ALWAYS |
* esi = flags for open and access: |
* SHM_OPEN = 0x00 - open existing memory area. If an area |
with such name does not exist, the function |
will return error code 5. |
* SHM_OPEN_ALWAYS = 0x04 - open existing or create new |
memory area. |
* SHM_CREATE = 0x08 - create new memory area. If an area |
with such name already exists, the function |
will return error code 10. |
* SHM_READ = 0x00 - only read access |
* SHM_WRITE = 0x01 - read and write access |
Returned value: |
* eax = pointer to memory area, 0 if error has occurred |
* if new area is created (SHM_CREATE or SHM_OPEN_ALWAYS): |
edx = 0 - success, otherwise - error code |
* if existing area is opened (SHM_OPEN or SHM_OPEN_ALWAYS): |
edx = error code (if eax=0) or area size in bytes |
Error codes: |
* E_NOTFOUND = 5 |
* E_ACCESS = 10 |
* E_NOMEM = 30 |
* E_PARAM = 33 |
Remarks: |
* Before this call one must initialize process heap by call to |
subfunction 11. |
* If a new area is created, access flags set maximal rights |
for other processes. An attempt from other process to open |
with denied rights will fail with error code E_ACCESS. |
* The process which has created an area always has write access. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_MEM_OPEN (22) |
====================================================================== |
======= Function 68, subfunction 23 - close named memory area. ======= |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 23 - subfunction number |
* ecx = area name. Maximum of 31 characters with terminating zero |
Returned value: |
* eax destroyed |
Remarks: |
* A memory area is physically freed (with deleting all data and |
freeing physical memory), when all threads which have opened |
this area will close it. |
* When thread is terminating, all opened by it areas are closed. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_MEM_CLOSE (23) |
====================================================================== |
======== Function 68, subfunction 24 - set exception handler. ======== |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 24 - subfunction number |
* ecx = address of the new exception handler |
* edx = the mask of handled exceptions |
Returned value: |
* eax = address of the old exception handler (0, if it was not set) |
* ebx = the old mask of handled exceptions |
Remarks: |
* Bit number in mask of exceptions corresponds to exception number |
in CPU-specification (Intel-PC). For example, FPU exceptions have |
number 16 (#MF), and SSE exceptions - 19 (#XF). |
* The current implementation ignores the inquiry for hook of 7 |
exception - the system handles #NM by its own. |
* The exception handler is called with exception number as first |
(and only) stack parameter. So, correct exit from the handler is |
RET 4. It returns to the instruction, that caused the exception, |
for faults, and to the next instruction for traps (see |
classification of exceptions in CPU specification). |
* When user handler receives control, the corresponding bit in |
the exception mask is cleared. Raising this exception |
in consequence leads to default handling, that is, |
terminating the application in absence of debugger or |
suspend with notification of debugger otherwise. |
* After user handler completes critical operations, it can set |
the corresponding bit in the exception mask with subfunction 25. |
Also user handler is responsible for clearing exceptions flags in |
FPU and/or SSE. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_SET_EXCEPTION_HANDLER (24) |
====================================================================== |
======== Function 68, subfunction 25 - set exception activity ======== |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 25 - subfunction number |
* ecx = signal number |
* edx = value of activity (0/1) |
Returned value: |
* eax = -1 - invalid signal number |
* otherwise eax = old value of activity for this signal (0/1) |
Remarks: |
* In current implementation only mask for user exception handler, |
which has been previously set by subfunction 24, |
is changed. Signal number corresponds to exception number. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_SET_EXCEPTION_STATE (25) |
====================================================================== |
====== Function 68, subfunction 26 - release memory pages ============ |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 26 - subfunction number |
* ecx = pointer to the memory block, allocated by subfunction 12 |
* edx = offset from the block beginnings |
* esi = the size of the region of memory to release, in bytes |
Remarks: |
* function release range of pages from ecx+edx to ecx+edx+esi |
and set virtual memory into reserved state. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_MEM_FREE_EXT (26) |
====================================================================== |
========== Function 68, subfunction 27 - load file =================== |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 27 - subfunction number |
* ecx = pointer to the string with path to file, |
rules of path forming can be found in function 70 description. |
Returned value: |
* eax = pointer to the loaded file, or zero |
* edx = size of the loaded file, or zero |
Remarks: |
* function loads file and unpacks, if necessary |
* Before this call one must initialize process heap by call to |
subfunction 11. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_LOAD_FILE (27) |
====================================================================== |
== Function 68, subfunction 28 - load file, specifying the encoding == |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 28 - subfunction number |
* ecx = pointer to the string with path to file |
* edx = string encoding, details can be found in function 80 description. |
Returned value: |
* eax = pointer to the loaded file, or zero |
* edx = size of the loaded file, or zero |
Remarks: |
* function loads file and unpacks, if necessary |
====================================================================== |
======== Function 68, subfunction 29 - allocate ring memory. ========= |
====================================================================== |
Parameters: |
* eax = 68 - function number |
* ebx = 29 - subfunction number |
* ecx = required size in bytes |
Returned value: |
* eax = 0 - failed |
* eax = pointer to the allocated ring |
Remarks: |
* The requested size must be an exact multiple of pagesize (4 Kb) |
* The function allocates memory in such a way that you can read and |
write beyond the size of the allocated memory and will reach the |
beginning of the buffer again. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SYS_MISC (68) |
ebx - SSF_MEM_ALLOC_RING (29) |
====================================================================== |
====================== Function 69 - debugging. ====================== |
====================================================================== |
A process can load other process as debugged by set of corresponding |
bit by call to subfunction 7 of function 70. |
A process can have only one debugger; one process can debug some |
others. The system notifies debugger on events occurring with |
debugged process. Messages are written to the buffer defined by |
subfunction 0. |
Format of a message: |
* +0: dword: message code |
* +4: dword: PID of debugged process |
* +8: there can be additional data depending on message code |
Message codes: |
* 1 = exception |
* in addition dword-number of the exception is given |
* process is suspended |
* 2 = process has terminated |
* comes at any termination: both through the system function -1, |
and at "murder" by any other process (including debugger itself) |
* 3 = debug exception int 1 = #DB |
* in addition dword-image of the register DR6 is given: |
* bits 0-3: condition of the corresponding breakpoint (set by |
subfunction 9) is satisfied |
* bit 14: exception has occurred because of the trace mode |
(flag TF is set TF) |
* process is suspended |
When debugger terminates, all debugged processes are killed. |
If debugger does not want this, it must previously detach by |
subfunction 3. |
All subfunctions are applicable only to processes/threads started |
from the current by function 70 with set debugging flag. |
Debugging of multithreaded programs is not supported yet. |
The full list of subfunctions: |
* subfunction 0 - define data area for debug messages |
* subfunction 1 - get contents of registers of debugged thread |
* subfunction 2 - set contents of registers of debugged thread |
* subfunction 3 - detach from debugged process |
* subfunction 4 - suspend debugged thread |
* subfunction 5 - resume debugged thread |
* subfunction 6 - read from the memory of debugged process |
* subfunction 7 - write to the memory of debugged process |
* subfunction 8 - terminate debugged thread |
* subfunction 9 - set/clear hardware breakpoint |
---------------------- Constants for registers: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_SET_MESSAGE_AREA (0), SSF_GET_REGISTERS (1), |
SSF_SET_REGISTERS (2), SSF_DETACH (3), SSF_SUSPEND (4), |
SSF_RESUME (5), SSF_READ_MEMORY (6), SSF_WRITE_MEMORY (7), |
SSF_TERMINATE (8), SSF_DEFINE_BREAKPOINT (9) |
====================================================================== |
= Function 69, subfunction 0 - define data area fror debug messages. = |
====================================================================== |
Parameters: |
* eax = 69 - function number |
* ebx = 0 - subfunction number |
* ecx = pointer |
Format of data area: |
* +0: dword: N = buffer size (not including this header) |
* +4: dword: occupied place |
* +8: N*byte: buffer |
Returned value: |
* function does not return value |
Remarks: |
* If the size field is negative, the buffer is considered locked |
and at arrival of new message the system will wait. |
For synchronization frame all work with the buffer by operations |
lock/unlock |
neg [bufsize] |
* Data in the buffer are considered as array of items with variable |
length - messages. Format of a message is explained in |
general description. |
---------------------- Constants for registers: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_SET_MESSAGE_AREA (0) |
====================================================================== |
===================== Function 69, subfunction 1 ===================== |
============ Get contents of registers of debugged thread. =========== |
====================================================================== |
Parameters: |
* eax = 69 - function number |
* ebx = 1 - subfunction number |
* ecx = thread identifier |
* edx = size of context structure, must be 0x28=40 bytes |
* esi = pointer to context structure |
Returned value: |
* function does not return value |
Format of context structure: (FPU is not supported yet) |
* +0: dword: eip |
* +4: dword: eflags |
* +8: dword: eax |
* +12 = +0xC: dword: ecx |
* +16 = +0x10: dword: edx |
* +20 = +0x14: dword: ebx |
* +24 = +0x18: dword: esp |
* +28 = +0x1C: dword: ebp |
* +32 = +0x20: dword: esi |
* +36 = +0x24: dword: edi |
Remarks: |
* If the thread executes code of ring-0, the function returns |
contents of registers of ring-3. |
* Process must be loaded for debugging (as is shown in |
general description). |
---------------------- Constants for registers: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_GET_REGISTERS (1) |
====================================================================== |
===================== Function 69, subfunction 2 ===================== |
============ Set contents of registers of debugged thread. =========== |
====================================================================== |
Parameters: |
* eax = 69 - function number |
* ebx = 2 - subfunction number |
* ecx = thread identifier |
* edx = size of context structure, must be 0x28=40 bytes |
* esi -> context structure |
Returned value: |
* function does not return value |
Format of context structure is shown in the description of |
subfunction 1. |
Remarks: |
* If the thread executes code of ring-0, the function returns |
contents of registers of ring-3. |
* Process must be loaded for debugging (as is shown in |
general description). |
---------------------- Constants for registers: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_SET_REGISTERS (2) |
====================================================================== |
===== Function 69, subfunction 3 - detach from debugged process. ===== |
====================================================================== |
Parameters: |
* eax = 69 - function number |
* ebx = 3 - subfunction number |
* ecx = identifier |
Returned value: |
* function does not return value |
Remarks: |
* If the process was suspended, it resumes execution. |
---------------------- Constants for registers: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_DETACH (3) |
====================================================================== |
======== Function 69, subfunction 4 - suspend debugged thread. ======= |
====================================================================== |
Parameters: |
* eax = 69 - function number |
* ebx = 4 - subfunction number |
* ecx = thread identifier |
Returned value: |
* function does not return value |
Remarks: |
* Process must be loaded for debugging (as is shown in |
general description). |
---------------------- Constants for registers: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_SUSPEND (4) |
====================================================================== |
======== Function 69, subfunction 5 - resume debugged thread. ======== |
====================================================================== |
Parameters: |
* eax = 69 - function number |
* ebx = 5 - subfunction number |
* ecx = thread identifier |
Returned value: |
* function does not return value |
Remarks: |
* Process must be loaded for debugging (as is shown in |
general description). |
---------------------- Constants for registers: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_RESUME (5) |
====================================================================== |
= Fucntion 69, subfunction 6 - read from memory of debugged process. = |
====================================================================== |
Parameters: |
* eax = 69 - function number |
* ebx = 6 - subfunction number |
* ecx = identifier |
* edx = number of bytes to read |
* esi = address in the memory of debugged process |
* edi = pointer to buffer for data |
Returned value: |
* eax = -1 at an error (invalid PID or buffer) |
* otherwise eax = number of read bytes (possibly, 0, |
if esi is too large) |
Remarks: |
* Process must be loaded for debugging (as is shown in |
general description). |
---------------------- Constants for registers: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_READ_MEMORY (6) |
====================================================================== |
== Function 69, subfunction 7 - write to memory of debugged process. = |
====================================================================== |
Parameters: |
* eax = 69 - function number |
* ebx = 7 - subfunction number |
* ecx = identifier |
* edx = number of bytes to write |
* esi = address of memory in debugged process |
* edi = pointer to data |
Returned value: |
* eax = -1 at an error (invalid PID or buffer) |
* otherwise eax = number of written bytes (possibly, 0, |
if esi is too large) |
Remarks: |
* Process must be loaded for debugging (as is shown in |
general description). |
---------------------- Constants for registers: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_WRITE_MEMORY (7) |
====================================================================== |
======= Function 69, subfunction 8 - terminate debugged thread. ====== |
====================================================================== |
Parameters: |
* eax = 69 - function number |
* ebx = 8 - subfunction number |
* ecx = identifier |
Returned value: |
* function does not return value |
Remarks: |
* Process must be loaded for debugging (as is shown in |
general description). |
* The function is similar to subfunction 2 of function 18 |
with two differences: it requires first remark and |
accepts PID rather than slot number. |
---------------------- Constants for registers: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_TERMINATE (8) |
====================================================================== |
===== Function 69, subfunction 9 - set/clear hardware breakpoint. ==== |
====================================================================== |
Parameters: |
* eax = 69 - function number |
* ebx = 9 - subfunction number |
* ecx = thread identifier |
* dl = index of breakpoint, from 0 to 3 inclusively |
* dh = flags: |
* if high bit is cleared - set breakpoint: |
* bits 0-1 - condition: |
* 00 = breakpoint on execution |
* 01 = breakpoint on read |
* 11 = breakpoint on read/write |
* bits 2-3 - length; for breakpoints on exception it must be |
00, otherwise one of |
* 00 = byte |
* 01 = word |
* 11 = dword |
* esi = breakpoint address; must be aligned according to |
the length (i.e. must be even for word breakpoints, |
divisible by 4 for dword) |
* if high bit is set - clear breakpoint |
Returned value: |
* eax = 0 - success |
* eax = 1 - error in the input data |
* eax = 2 - (reserved, is never returned in the current |
implementation) a global breakpoint with that index is already set |
Remarks: |
* Process must be loaded for debugging (as is shown in |
general description). |
* Hardware breakpoints are implemented through DRx-registers of |
the processor, all limitations results from this. |
* The function can reinstall the breakpoint, previously set |
by it (and it does not inform on this). |
Carry on the list of set breakpoints in the debugger. |
* Breakpoints generate debug exception #DB, on which the system |
notifies debugger. |
* Breakpoints on write and read/write act after |
execution of the caused it instruction. |
---------------------- Constants for registers: ---------------------- |
eax - SF_DEBUG (69) |
ebx - SSF_DEFINE_BREAKPOINT (9) |
====================================================================== |
==== Function 70 - work with file system with long names support. ==== |
====================================================================== |
Parameters: |
* eax = 70 |
* ebx = pointer to the information structure |
Returned value: |
* eax = 0 - success; otherwise file system error code |
* some subfunctions return value in other registers too |
General format of the information structure: |
* +0: dword: subfunction number |
* +4: dword: offset in file or folder |
* +8: dword: higher part of offset or flags |
* +12 = +0xC: dword: size of data |
* +16 = +0x10: dword: pointer to data |
* +20 = +0x14: ?: path - zero terminated string |
or |
* +20 = +0x14: byte: 0 |
* +21 = +0x15: dword: pointer to string |
Case sensitivity depends on filesystem. |
If a path not begins with '/', it is considered a relative. |
To get or set the current folder, use the sysfunction 30. |
'../' in the path means a lift by one folder relatively current folder. |
To set the encoding, put at the start of the string a byte with next values: |
* 1 = cp866 |
* 2 = UTF-16LE |
* 3 = UTF-8 |
otherwise will be used cp866. In an absolute path |
you may put this byte after the '/' or put an additional '/' before it. |
Also, you may use the sysfunction 80. |
Format of an absolute path: |
/base/number/dir1/dir2/.../dirn/file, |
where base/number identifies device, on which file is located: |
* RD/1 = ramdisk |
* FD/1 = first floppy drive, |
FD/2 = second floppy drive |
* HD0/x, HD1/x, HD2/x, HD3/x = hard drives accordingly on |
IDE0 (Primary Master), IDE1 (Primary Slave), |
IDE2 (Secondary Master), IDE3 (Secondary Slave); |
x - partition number on the selected hard drive, starts from 1 |
* CD0/1, CD1/1, CD2/1, CD3/1 = same for cd |
* SYS = system folder (encoding inaffected key), |
second key may be set by sysfunction 30.3. |
Examples: |
* '/sys/example.asm',0 |
* '/rd/1/example.asm',0 |
* '/HD0/1/folder/file.txt',0 |
* '/hd2/2/pics/tanzania.bmp',0 |
* 2,'/',0,'sys','/',0,'F',0,'I',0,'L',0,'E',0,0,0 |
Available subfunctions: |
* subfunction 0 - read file |
* subfunction 1 - read folder |
* subfunction 2 - create/rewrite file |
* subfunction 3 - write to existing file |
* subfunction 4 - set file size |
* subfunction 5 - get attributes of file/folder |
* subfunction 6 - set attributes of file/folder |
* subfunction 7 - start application |
* subfunction 8 - delete file/folder |
* subfunction 9 - create folder |
For CD-drives due to hardware limitations only subfunctions |
0,1,5 and 7 are available, other subfunctions return error |
with code 2. |
At the first call of subfunctions 0,1,5,7 to ATAPI devices |
(CD and DVD) the manual control of tray is locked due to caching |
drive data. Unlocking is made when subfunction 4 of function 24 |
is called for corresponding device. |
---------------------- Constants for registers: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_READ_FILE (0), SSF_READ_FOLDER (1), SSF_CREATE_FILE (2), |
SSF_WRITE_FILE (3), SSF_SET_END (4), SSF_GET_INFO (5), |
SSF_SET_INFO (6), SSF_START_APP (7), SSF_DELETE (8), |
SSF_CREATE_FOLDER (9) |
====================================================================== |
=== Function 70, subfunction 0 - read file with long names support. == |
====================================================================== |
Parameters: |
* eax = 70 - function number |
* ebx = pointer to the information structure |
Format of the information structure: |
* +0: dword: 0 = subfunction number |
* +4: dword: file offset (in bytes) |
* +8: dword: 0 (reserved for high dword of offset) |
* +12 = +0xC: dword: number of bytes to read |
* +16 = +0x10: dword: pointer to buffer for data |
* +20 = +0x14: path, general rules of names forming |
Returned value: |
* eax = 0 - success, otherwise file system error code |
* ebx = number of bytes read |
Remarks: |
* If file was ended before last requested block was read, |
the function will read as many as it can, and after that return |
eax=6 (EOF). |
* The function does not allow to read folder (returns eax=10, |
access denied). |
---------------------- Constants for registers: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_READ_FILE (0) |
====================================================================== |
== Function 70, subfunction 1 - read folder with long names support. = |
====================================================================== |
Parameters: |
* eax = 70 - function number |
* ebx = pointer to the information structure |
Format of the information structure: |
* +0: dword: 1 = subfunction number |
* +4: dword: index of starting block (beginning from 0) |
* +8: dword: names encoding: |
0 = default |
1 = cp866 |
2 = UTF-16LE |
3 = UTF-8 |
* +12 = +0xC: dword: number of blocks to read |
* +16 = +0x10: dword: pointer to buffer for data |
* +20 = +0x14: path, general rules of names forming |
Returned value: |
* eax = 0 - success, otherwise file system error code |
* ebx = number of file information blocks, written to the buffer |
Structure of the buffer: |
* header (32 bytes) |
* block with information on file 1 |
* block with information on file 2 |
* ... |
Structure of header: |
* +0: dword: version of structure (current is 1) |
* +4: dword: number of placed blocks; is not greater than requested |
in the field +12 of information structure; can be less, if |
there are no more files in folder (the same as in ebx) |
* +8: dword: total number of files in folder |
* +12 = +0xC: 20*byte: reserved (zeroed) |
Structure of block of data for folder entry (BDFE): |
* +0: dword: attributes of file: |
* bit 0 (mask 1): file is read-only |
* bit 1 (mask 2): file is hidden |
* bit 2 (mask 4): file is system |
* bit 3 (mask 8): this is the volume label (using by subfunction 5) |
* bit 4 (mask 0x10): this is a folder |
* bit 5 (mask 0x20): file was not archived - many archivation |
programs have an option to archive only files with this bit set, |
and after archiving this bit is cleared - it can be useful |
for automatically creating of backup-archives as at writing |
this bit is usually set |
* +4: dword: encoding, equals to field +8 in the information structure |
* +8: 4*byte: time of file creation |
* +12 = +0xC: 4*byte: date of file creation |
* +16 = +0x10: 4*byte: time of last access (read or write) |
* +20 = +0x14: 4*byte: date of last access |
* +24 = +0x18: 4*byte: time of last modification |
* +28 = +0x1C: 4*byte: date of last modification |
* +32 = +0x20: qword: file size in bytes (up to 16777216 Tb) |
* +40 = +0x28: name, 264 bytes in cp866, otherwise - 520 bytes. |
Time format: |
* +0: byte: seconds |
* +1: byte: minutes |
* +2: byte: hours |
* +3: byte: reserved (0) |
* for example, 23.59.59 is written as (in hex) 3B 3B 17 00 |
Date format: |
* +0: byte: day |
* +1: byte: month |
* +2: word: year |
* for example, 25.11.1979 is written as (in hex) 19 0B BB 07 |
Remarks: |
* If BDFE contains cp866 name, the length of BDFE is 304 bytes, |
otherwise - 560 bytes. |
* Name string is zero terminated, further data contain garbage. |
* If files in folder were ended before requested number was read, |
the function will read as many as it can, and after that return |
eax=6 (EOF). |
* Any folder on the disk, except for root, contains two special |
entries "." and "..", identifying accordingly the folder itself |
and the parent folder. |
* The function allows also to read virtual folders "/", "/rd", |
"/fd", "/hd[n]", thus attributes of subfolders are set to 0x10, |
and times and dates are zeroed. An alternative way to get the |
equipment information - subfunction 11 of function 18. |
---------------------- Constants for registers: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_READ_FOLDER (1) |
====================================================================== |
===================== Function 70, subfunction 2 ===================== |
============ Create/rewrite file with long names support. ============ |
====================================================================== |
Parameters: |
* eax = 70 - function number |
* ebx = pointer to the information structure |
Format of the information structure: |
* +0: dword: 2 = subfunction number |
* +4: dword: 0 (reserved) |
* +8: dword: 0 (reserved) |
* +12 = +0xC: dword: number of bytes to write |
* +16 = +0x10: dword: pointer to data |
* +20 = +0x14: path, general rules of names forming |
Returned value: |
* eax = 0 - success, otherwise file system error code |
* ebx = number of written bytes (possibly 0) |
Remarks: |
* If a file with given name did not exist, it is created; |
if it existed, it is rewritten. |
* If there is not enough free space on disk, the function will |
write as many as can and then return error code 8. |
* The function is not supported for CD (returns error code 2). |
---------------------- Constants for registers: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_CREATE_FILE (2) |
====================================================================== |
===================== Function 70, subfunction 3 ===================== |
=========== Write to existing file with long names support. ========== |
====================================================================== |
Parameters: |
* eax = 70 - function number |
* ebx = pointer to the information structure |
Format of the information structure: |
* +0: dword: 3 = subfunction number |
* +4: dword: file offset (in bytes) |
* +8: dword: high dword of offset (must be 0 for FAT) |
* +12 = +0xC: dword: number of bytes to write |
* +16 = +0x10: dword: pointer to data |
* +20 = +0x14: path, general rules of names forming |
Returned value: |
* eax = 0 - success, otherwise file system error code |
* ebx = number of written bytes (possibly 0) |
Remarks: |
* The file must already exist, otherwise function returns eax=5. |
* The only result of write 0 bytes is update in the file attributes |
date/time of modification and access to the current date/time. |
* If beginning and/or ending position is greater than file size |
(except for the previous case), the file is expanded to needed |
size with zero characters. |
* The function is not supported for CD (returns error code 2). |
---------------------- Constants for registers: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_WRITE_FILE (3) |
====================================================================== |
============ Function 70, subfunction 4 - set end of file. =========== |
====================================================================== |
Parameters: |
* eax = 70 - function number |
* ebx = pointer to the information structure |
Format of the information structure: |
* +0: dword: 4 = subfunction number |
* +4: dword: low dword of new file size |
* +8: dword: high dword of new file size (must be 0 for FAT) |
* +12 = +0xC: dword: 0 (reserved) |
* +16 = +0x10: dword: 0 (reserved) |
* +20 = +0x14: path, general rules of names forming |
Returned value: |
* eax = 0 - success, otherwise file system error code |
* ebx destroyed |
Remarks: |
* If new file size is less than old one, file will be truncated. |
If new size is greater than old one, file will be expanded, and if |
size difference is up to 16 MB, new space will be cleared with 0. |
* If there is not enough free space on disk for expansion, the |
function will expand to maximum possible size and then return |
error code 8. |
* The function is not supported for CD (returns error code 2). |
---------------------- Constants for registers: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_SET_END (4) |
====================================================================== |
==== Function 70, subfunction 5 - get information on file/folder. ==== |
====================================================================== |
Parameters: |
* eax = 70 - function number |
* ebx = pointer to the information structure |
Format of the information structure: |
* +0: dword: 5 = subfunction number |
* +4: dword: 0 (reserved) |
* +8: dword: 0 or flags (for the root folder) |
* +12 = +0xC: dword: 0 (reserved) |
* +16 = +0x10: dword: pointer to buffer for data (40 bytes) |
* +20 = +0x14: path, general rules of names forming |
Returned value: |
* eax = 0 - success, otherwise file system error code |
* ebx destroyed |
Information on file is returned in the BDFE format (block of data |
for folder entry), explained in the description of subfunction 1, |
but without filename, except the root folder. |
Remarks: |
* For the root folder returns the partition size, |
and if encoding byte is non-zero, the volume label. |
* For the device returns only the size. |
---------------------- Constants for registers: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_GET_INFO (5) |
====================================================================== |
===== Function 70, subfunction 6 - set attributes of file/folder. ==== |
====================================================================== |
Parameters: |
* eax = 70 - function number |
* ebx = pointer to the information structure |
Format of the information structure: |
* +0: dword: 6 = subfunction number |
* +4: dword: 0 (reserved) |
* +8: dword: 0 (reserved) |
* +12 = +0xC: dword: 0 (reserved) |
* +16 = +0x10: dword: pointer to buffer with attributes (32 bytes) |
* +20 = +0x14: path, general rules of names forming |
Returned value: |
* eax = 0 - success, otherwise file system error code |
* ebx destroyed |
File attributes are first 32 bytes in BDFE (block of data |
for folder entry), explained in the description of subfunction 1 |
(that is, without name and size of file). Attribute |
file/folder/volume label (bits 3,4 in dword +0) is not changed. |
Byte +4 (name format) is ignored. |
Remarks: |
* The function does not support virtual folders such as /, /rd and |
root folders like /rd/1. |
* The function is not supported for CD (returns error code 2). |
---------------------- Constants for registers: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_SET_INFO (6) |
====================================================================== |
=========== Function 70, subfunction 7 - start application. ========== |
====================================================================== |
Parameters: |
* eax = 70 - function number |
* ebx = pointer to the information structure |
Format of the information structure: |
* +0: dword: 7 = subfunction number |
* +4: dword: flags field: |
* bit 0: start process as debugged |
* other bits are reserved and must be set to 0 |
* +8: dword: 0 or pointer to ASCIIZ-string with parameters |
* +12 = +0xC: dword: 0 (reserved) |
* +16 = +0x10: dword: 0 (reserved) |
* +20 = +0x14: path, general rules of names forming |
Returned value: |
* eax > 0 - program is loaded, eax contains PID |
* eax < 0 - an error has occurred, -eax contains |
file system error code |
* ebx destroyed |
Remarks: |
* Command line must be terminated by the character with the code 0 |
(ASCIIZ-string); function takes into account either all characters |
up to terminating zero inclusively or first 256 character |
regarding what is less. |
* If the process is started as debugged, it is created in |
the suspended state; to run use subfunction 5 of function 69. |
---------------------- Constants for registers: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_START_APP (7) |
====================================================================== |
========== Function 70, subfunction 8 - delete file/folder. ========== |
====================================================================== |
Parameters: |
* eax = 70 - function number |
* ebx = pointer to the information structure |
Format of the information structure: |
* +0: dword: 8 = subfunction number |
* +4: dword: 0 (reserved) |
* +8: dword: 0 (reserved) |
* +12 = +0xC: dword: 0 (reserved) |
* +16 = +0x10: dword: 0 (reserved) |
* +20 = +0x14: path, general rules of names forming |
Returned value: |
* eax = 0 - success, otherwise file system error code |
* ebx destroyed |
Remarks: |
* The function is not supported for CD (returns error code 2). |
* The function can delete only empty folders (attempt to delete |
nonempty folder results in error with code 10, "access denied"). |
---------------------- Constants for registers: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_DELETE (8) |
====================================================================== |
============= Function 70, subfunction 9 - create folder. ============ |
====================================================================== |
Parameters: |
* eax = 70 - function number |
* ebx = pointer to the information structure |
Format of the information structure: |
* +0: dword: 9 = subfunction number |
* +4: dword: 0 (reserved) |
* +8: dword: 0 (reserved) |
* +12 = +0xC: dword: 0 (reserved) |
* +16 = +0x10: dword: 0 (reserved) |
* +20 = +0x14: path, general rules of names forming |
Returned value: |
* eax = 0 - success, otherwise file system error code |
* ebx destroyed |
Remarks: |
* The function is not supported for CD (returns error code 2). |
* The parent folder must already exist. |
* If target folder already exists, function returns success (eax=0). |
---------------------- Constants for registers: ---------------------- |
eax - SF_FILE (70) |
[ebx] - SSF_CREATE_FOLDER (9) |
====================================================================== |
============= Function 70, subfunction 10 - rename/move. ============= |
====================================================================== |
Parameters: |
* eax = 70 - function number |
* ebx = pointer to the information structure |
Format of the information structure: |
* +0: dword: 10 = subfunction number |
* +4: dword: 0 (reserved) |
* +8: dword: 0 (reserved) |
* +12 = +0xC: dword: 0 (reserved) |
* +16 = +0x10: dword: pointer to the new name/path string |
* +20 = +0x14: path, general rules of names forming |
Returned value: |
* eax = 0 - success, otherwise file system error code |
* ebx destroyed |
Remarks: |
* New path forming differs from general rules: |
relative path relates to the target's parent folder, |
absolute path relates to the partition's root folder. |
====================================================================== |
================== Function 71 - set window caption ================== |
====================================================================== |
Parameters: |
* eax = 71 - function number |
* ebx = 1 |
* ecx = pointer to zero terminated string, |
the string may start with an encoding byte: |
1 = cp866 |
2 = UTF-16LE |
3 = UTF-8 |
or: |
* ebx = 2 |
* ecx = pointer to zero terminated string |
* dl = string encoding |
Returned value: |
* function does not return value |
Remarks: |
* Pass NULL in ecx to remove caption. |
---------------------- Constants for registers: ---------------------- |
eax - SF_SET_CAPTION (71) |
====================================================================== |
=============== Function 72 - send message to a window. ============== |
====================================================================== |
- Subfunction 1 - send message with parameter to the active window. -- |
Parameters: |
* eax = 72 - function number |
* ebx = 1 - subfunction number |
* ecx = event code: 2 or 3 |
* edx = parameter: key code for ecx=2, button identifier for ecx=3 |
Returned value: |
* eax = 0 - success |
* eax = 1 - buffer is full |
---------------------- Constants for registers: ---------------------- |
eax - SF_SEND_MESSAGE (72) |
====================================================================== |
===================== Function 73 - blit bitmap ===================== |
====================================================================== |
Parameters: |
* eax = 73 - function number |
* ebx = ROP and optional flags |
31 30 29 28 6 5 4 3 0 |
[reserved][CR][reserved][T][B][ROP] |
ROP - raster operation code |
0: Copy |
1-15: reserved |
B - blit into the background surface |
T - transparent blit |
CR - blit client relative |
* ecx = pointer to the function parameters |
destination offset and clipping |
+0 signed dword: destination rectangle X offset from the window |
top-left corner |
+4 signed dword: destination rectangle Y offset from the window |
top-left corner |
+8 dword: destination rectangle width |
+12 dword: destination rectangle height |
source offset and clipping |
+16 signed dword: source rectangle X offset from the bitmap |
top-left corner |
+20 signed dword: source rectangle Y offset from the bitmap |
top-left corner |
+24 dword: source rectangle width |
+28 dword: source rectangle height |
+32: dword: bitmap data - must be 32bpp |
+36: dword: size of the bitmap row in bytes |
Returned value: |
* function does not return value |
---------------------- Constants for registers: ---------------------- |
eax - SF_BLITTER (73) |
====================================================================== |
= Function 74, Subfunction 255, Get number of active network devices. = |
====================================================================== |
Parameters: |
* eax = 74 - function number |
* bl = 255 - subfunction number |
Returned value: |
* eax = number of active network devices |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_DEVICE_COUNT (255) |
====================================================================== |
======== Function 74, Subfunction 0, Get network device type. ======== |
====================================================================== |
Parameters: |
* eax = 74 - function number |
* bl = 0 - subfunction number |
* bh = device number |
Returned value: |
* eax = device type number, -1 on error |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_DEVICE_TYPE (0) |
====================================================================== |
======== Function 74, Subfunction 1, Get network device name. ======== |
====================================================================== |
Parameters: |
* eax = 74 - function number |
* bl = 1 - subfunction number |
* bh = device number |
* ecx = pointer to 64 byte buffer |
Returned value: |
* eax = -1 on error |
* The network device name is written into the buffer, on success |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_DEVICE_NAME (1) |
====================================================================== |
========= Function 74, Subfunction 2, Reset network device. ========== |
====================================================================== |
Parameters: |
* eax = 74 - function number |
* bl = 2 - subfunction number |
* bh = device number |
Returned value: |
* eax = -1 on error |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_RESET_DEVICE (2) |
====================================================================== |
========== Function 74, Subfunction 3, Stop network device. ========== |
====================================================================== |
Parameters: |
* eax = 74 - function number |
* bl = 3 - subfunction number |
* bh = device number |
Returned value: |
* eax = -1 on error |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_STOP_DEVICE (3) |
====================================================================== |
=========== Function 74, Subfunction 4, Get device pointer. ========== |
====================================================================== |
Parameters: |
* eax = 74 - function number |
* bl = 4 - subfunction number |
* bh = device number |
Returned value: |
* eax = device pointer, -1 on error |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_DEVICE_POINTER (4) |
====================================================================== |
========= Function 74, Subfunction 6, Get packet TX counter. ========= |
====================================================================== |
Parameters: |
* eax = 74 - function number |
* bl = 6 - subfunction number |
* bh = device number |
Returned value: |
* eax = Number of packets sent since device start, -1 on error |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_TX_PACKET_COUNT (6) |
====================================================================== |
========= Function 74, Subfunction 7, Get packet RX counter. ========= |
====================================================================== |
Parameters: |
* eax = 74 - function number |
* bl = 7 - subfunction number |
* bh = device number |
Returned value: |
* eax = Number of packets received since device start, -1 on error |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_RX_PACKET_COUNT (7) |
====================================================================== |
========== Function 74, Subfunction 8, Get TX byte counter. ========== |
====================================================================== |
Parameters: |
* eax = 74 - function number |
* bl = 8 - subfunction number |
* bh = device number |
Returned value: |
* eax = Number of bytes sent since device start (lower dword) |
-1 on error |
* ebx = Number of bytes sent since device start (higher dword) |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_TX_BYTE_COUNT (8) |
====================================================================== |
========== Function 74, Subfunction 9, Get RX byte counter. ========== |
====================================================================== |
Parameters: |
* eax = 74 - function number |
* bl = 9 - subfunction number |
* bh = device number |
Returned value: |
* eax = Number of bytes received since device start (lower dword) |
-1 on error |
* ebx = Number of bytes received since device start (higher dword) |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_RX_BYTE_COUNT (9) |
====================================================================== |
========== Function 74, Subfunction 10, Get link status. ============= |
====================================================================== |
Parameters: |
* eax = 74 - function number |
* bl = 10 - subfunction number |
* bh = device number |
Returned value: |
* eax = link status, -1 on error |
Link status: |
ETH_LINK_DOWN = 0b ; Link is down |
ETH_LINK_UNKNOWN= 1b ; There could be an active link |
ETH_LINK_FD = 10b ; full duplex flag |
ETH_LINK_10M = 100b ; 10 mbit |
ETH_LINK_100M = 1000b ; 100 mbit |
ETH_LINK_1G = 1100b ; gigabit |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_GET (74) |
bl - SSF_LINK_STATUS (10) |
====================================================================== |
============== Function 75, Subfunction 0, Open socket. ============== |
====================================================================== |
Parameters: |
* eax = 75 - function number |
* bl = 0 - subfunction number |
* ecx = domain |
* edx = type |
* esi = protocol |
Returned value: |
* eax = socket number, -1 on error |
* ebx = errorcode |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_OPEN (0) |
====================================================================== |
============= Function 75, Subfunction 1, Close socket. ============== |
====================================================================== |
Parameters: |
* eax = 75 - function number |
* bl = 1 - subfunction number |
* ecx = socket number |
Returned value: |
* eax = -1 on error |
* ebx = errorcode |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_CLOSE (1) |
====================================================================== |
================== Function 75, Subfunction 2, Bind. ================= |
====================================================================== |
Parameters: |
* eax = 75 - function number |
* bl = 2 - subfunction number |
* ecx = socket number |
* edx = pointer to sockaddr structure |
* esi = length of sockaddr structure |
Format of SockAddr structure: |
* +0: Word: Family |
* +2: 14*Byte: Data |
Returned value: |
* eax = -1 on error |
* ebx = errorcode |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_BIND (2) |
====================================================================== |
================= Function 75, Subfunction 3, Listen. ================ |
====================================================================== |
Parameters: |
* eax = 75 - function number |
* bl = 3 - subfunction number |
* ecx = socket number |
* edx = backlog |
Returned value: |
* eax = -1 on error |
* ebx = errorcode |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_LISTEN (3) |
====================================================================== |
================ Function 75, Subfunction 4, Connect. ================ |
====================================================================== |
Parameters: |
* eax = 75 - function number |
* bl = 4 - subfunction number |
* ecx = socket number |
* edx = pointer to sockaddr structure |
* esi = length of sockaddr structure |
Format of SockAddr structure: |
* +0: Word: Family |
* +2: 14*Byte: Data |
Returned value: |
* eax = -1 on error |
* ebx = errorcode |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_CONNECT (4) |
====================================================================== |
================= Function 75, Subfunction 5, Accept. ================ |
====================================================================== |
Parameters: |
* eax = 75 - function number |
* bl = 5 - subfunction number |
* ecx = socket number |
* edx = pointer to sockaddr structure |
* esi = length of sockaddr structure |
Format of SockAddr structure: |
* +0: Word: Family |
* +2: 14*Byte: Data |
Returned value: |
* eax = socket number of accepted socket, -1 on error |
* ebx = errorcode |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_ACCEPT (5) |
====================================================================== |
================== Function 75, Subfunction 6, Send. ================= |
====================================================================== |
Parameters: |
* eax = 75 - function number |
* bl = 6 - subfunction number |
* ecx = socket number |
* edx = pointer to buffer |
* esi = length of buffer |
* edi = flags |
Returned value: |
* eax = number of bytes copied, -1 on error |
* ebx = errorcode |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_SEND (6) |
====================================================================== |
================ Function 75, Subfunction 7, Receive. ================ |
====================================================================== |
Parameters: |
* eax = 75 - function number |
* bl = 7 - subfunction number |
* ecx = socket number |
* edx = pointer to buffer |
* esi = length of buffer |
* edi = flags |
Returned value: |
* eax = number of bytes copied, -1 on error |
* ebx = errorcode |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_RECEIVE (7) |
====================================================================== |
=========== Function 75, Subfunction 8, Set socket options. ========== |
====================================================================== |
Parameters: |
* eax = 75 - function number |
* bl = 8 - subfunction number |
* ecx = socket number |
* edx = pointer to optstruct |
Returned value: |
* eax = -1 on error |
* ebx = errorcode |
Remarks: |
Optstruct: |
dd level |
dd optionname |
dd optlength |
db options... |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_SET_OPTIONS (8) |
====================================================================== |
=========== Function 75, Subfunction 9, Get socket options. ========== |
====================================================================== |
Parameters: |
* eax = 75 - function number |
* bl = 9 - subfunction number |
* ecx = socket number |
* edx = pointer to optstruct |
Returned value: |
* eax = -1 on error |
* ebx = errorcode |
Remarks: |
Optstruct: |
dd level |
dd optionname |
dd optlength |
db options... |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_GET_OPTIONS (9) |
====================================================================== |
============ Function 75, Subfunction 10, Get socketpair. ============ |
====================================================================== |
Parameters: |
* eax = 75 - function number |
* bl = 10 - subfunction number |
Returned value: |
* eax = socketnum1, -1 on error |
* ebx = socketnum2, errorcode on error |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_SOCKET (75) |
bl - SSF_GET_PAIR (10) |
====================================================================== |
============ Function 76, Network options and statistics. ============ |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = protocol number |
* bh = device number |
* bl = subfunction number |
====================================================================== |
==== Function 76, Protocol 0 - Ethernet, Subfunction 0, Read MAC. ==== |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 0 (Ethernet) |
* bh = device number |
* bl = 0 (Read MAC) |
Returned value: |
* eax = -1 on error, otherwise lower bits of MAC |
* bx = upper bits of MAC |
====================================================================== |
= Function 76, Protocol 1 - IPv4, Subfunction 0, Read # Packets sent = |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 1 (IPv4) |
* bh = device number |
* bl = 0 (Read # packets sent) |
Returned value: |
* eax = number of packets sent (-1 on error) |
====================================================================== |
= Function 76, Protocol 1 - IPv4, Subfunction 1, Read # Packets rcvd = |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 1 (IPv4) |
* bh = device number |
* bl = 1 (Read # packets received) |
Returned value: |
* eax = number of packets received (-1 on error) |
====================================================================== |
=== Function 76, Protocol 1 - IPv4, Subfunction 2, Read IP address === |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 1 (IPv4) |
* bh = device number |
* bl = 2 (Read IP address) |
Returned value: |
* eax = IP address (-1 on error) |
====================================================================== |
=== Function 76, Protocol 1 - IPv4, Subfunction 3, Set IP address ==== |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 1 (IPv4) |
* bh = device number |
* bl = 3 (Set IP address) |
* ecx = IP address |
Returned value: |
* eax = -1 on error |
====================================================================== |
== Function 76, Protocol 1 - IPv4, Subfunction 4, Read DNS address === |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 1 (IPv4) |
* bh = device number |
* bl = 4 (Read DNS server IP address) |
Returned value: |
* eax = DNS server IP address (-1 on error) |
====================================================================== |
=== Function 76, Protocol 1 - IPv4, Subfunction 5, Set DNS address === |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 1 (IPv4) |
* bh = device number |
* bl = 5 (Set DNS address) |
* ecx = DNS server IP address |
Returned value: |
* eax = -1 on error |
====================================================================== |
== Function 76, Protocol 1 - IPv4, Subfunction 6, Read subnet mask === |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 1 (IPv4) |
* bh = device number |
* bl = 6 (Read subnet mask) |
Returned value: |
* eax = subnet mask (-1 on error) |
====================================================================== |
=== Function 76, Protocol 1 - IPv4, Subfunction 7, Set subnet mask === |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 1 (IPv4) |
* bh = device number |
* bl = 7 (Set subnet mask) |
* ecx = subnet mask |
Returned value: |
* eax = -1 on error |
====================================================================== |
===== Function 76, Protocol 1 - IPv4, Subfunction 8, Read gateway ==== |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 1 (IPv4) |
* bh = device number |
* bl = 8 (Read gateway IP address) |
Returned value: |
* eax = gateway IP address (-1 on error) |
====================================================================== |
===== Function 76, Protocol 1 - IPv4, Subfunction 9, Set gateway ===== |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 1 (IPv4) |
* bh = device number |
* bl = 9 (Set getway address) |
* ecx = gateway IP address |
Returned value: |
* eax = -1 on error |
====================================================================== |
= Function 76, Protocol 2 - ICMP, Subfunction 0, Read # Packets sent = |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 2 (ICMP) |
* bh = device number |
* bl = 0 (Read # packets sent) |
Returned value: |
* eax = number of packets sent (-1 on error) |
====================================================================== |
= Function 76, Protocol 2 - ICMP, Subfunction 1, Read # Packets rcvd = |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 2 (ICMP) |
* bh = device number |
* bl = 1 (Read # packets received) |
Returned value: |
* eax = number of packets received (-1 on error) |
====================================================================== |
= Function 76, Protocol 3 - UDP, Subfunction 0, Read # Packets sent == |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 3 (UDP) |
* bh = device number |
* bl = 0 (Read # packets sent) |
Returned value: |
* eax = number of packets sent (-1 on error) |
====================================================================== |
= Function 76, Protocol 3 - UDP, Subfunction 1, Read # Packets rcvd == |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 3 (UDP) |
* bh = device number |
* bl = 1 (Read # packets received) |
Returned value: |
* eax = number of packets received (-1 on error) |
====================================================================== |
= Function 76, Protocol 4 - TCP, Subfunction 0, Read # Packets sent == |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 4 (TCP) |
* bh = device number |
* bl = 0 (Read # packets sent) |
Returned value: |
* eax = number of packets sent (-1 on error) |
====================================================================== |
= Function 76, Protocol 4 - TCP, Subfunction 1, Read # Packets rcvd == |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 4 (TCP) |
* bh = device number |
* bl = 1 (Read # packets received) |
Returned value: |
* eax = number of packets received (-1 on error) |
====================================================================== |
= Function 76, Protocol 5 - ARP, Subfunction 0, Read # Packets sent == |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 5 (ARP) |
* bh = device number |
* bl = 0 (Read # packets sent) |
Returned value: |
* eax = number of packets sent (-1 on error) |
====================================================================== |
= Function 76, Protocol 5 - ARP, Subfunction 1, Read # Packets rcvd == |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 5 (ARP) |
* bh = device number |
* bl = 1 (Read # packets received) |
Returned value: |
* eax = number of packets received (-1 on error) |
====================================================================== |
== Function 76, Protocol 5 - ARP, Subfunction 2, Read # ARP entries == |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 5 (ARP) |
* bh = device number |
* bl = 2 (Read # current entries in the ARP table) |
Returned value: |
* eax = number of entries (-1 on error) |
====================================================================== |
==== Function 76, Protocol 5 - ARP, Subfunction 3, Read ARP entry ==== |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 5 (ARP) |
* bh = device number |
* bl = 3 (Read ARP entry) |
* ecx = ARP entry number (0 based) |
* edi = ptr to buffer where ARP entry will be written |
Returned value: |
* eax = -1 on error |
Remarks: |
* ARP_entry struct is defined in ARP.inc in kernel and currently |
looks like this: |
struct ARP_entry |
IP dd ? |
MAC dp ? |
Status dw ? |
TTL dw ? |
ends |
====================================================================== |
===== Function 76, Protocol 5 - ARP, Subfunction 4, Add ARP entry ==== |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 5 (ARP) |
* bh = device number |
* bl = 4 (Add ARP entry) |
* esi = ptr to buffer holding ARP entry |
Returned value: |
* eax = -1 on error |
Remarks: |
* See previous function for details on ARP entry. |
====================================================================== |
=== Function 76, Protocol 5 - ARP, Subfunction 5, Remove ARP entry === |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 5 (ARP) |
* bh = device number |
* bl = 5 (Remove ARP entry) |
* ecx = ARP entry number (0 based), use -1 to clear whole ARP table. |
Returned value: |
* eax = -1 on error |
====================================================================== |
=== Function 76, Protocol 5 - ARP, Subfunction 6, Send ARP announce == |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 5 (ARP) |
* bh = device number |
* bl = 6 (Send ARP announce) |
Returned value: |
* eax = -1 on error |
====================================================================== |
=== Function 76, Protocol 5 - ARP, Subfunction 7, Read # conflicts === |
====================================================================== |
Parameters: |
* eax = 76 - function number |
* high half of ebx = 5 (ARP) |
* bh = device number |
* bl = 7 (Read # IP address conflicts that have occured) |
Returned value: |
* eax = # IP address conflicts (-1 on error) |
---------------------- Constants for registers: ---------------------- |
eax - SF_NETWORK_PROTOCOL (76) |
====================================================================== |
========== Function 77, Subfunction 0, Create futex object =========== |
====================================================================== |
Parameters: |
* eax = 77 - function number |
* ebx = 0 - subfunction number |
* ecx = pointer to futex dword |
Returned value: |
* eax = futex handle, 0 on error |
Remarks: |
* Use subfunction 1 to destroy the futex. |
The kernel destroys the futexes automatically when the process |
terminates. |
---------------------- Constants for registers: ---------------------- |
eax - SF_FUTEX (77) |
ebx - SSF_CREATE (0) |
====================================================================== |
========= Function 77, Subfunction 1, Destroy futex object =========== |
====================================================================== |
Parameters: |
* eax = 77 - function number |
* ebx = 1 - subfunction number |
* ecx = futex handle |
Returned value: |
* eax = 0 - successfull, -1 on error |
Remarks: |
* The futex handle must have been created by subfunction 0 |
---------------------- Constants for registers: ---------------------- |
eax - SF_FUTEX (77) |
ebx - SSF_DESTROY (1) |
====================================================================== |
=============== Function 77, Subfunction 2, Futex wait =============== |
====================================================================== |
Parameters: |
* eax = 77 - function number |
* ebx = 2 - subfunction number |
* ecx = futex handle |
* edx = control value |
* esi = timeout in system ticks or 0 for infinity |
Returned value: |
* eax = 0 - successfull |
-1 - timeout |
-2 - futex dword does not have the same value as edx |
Remarks: |
* This functionn tests that the value at the futex dword still |
contains the expected control value, and if so, then sleeps |
waiting for a wake operation on the futex. |
* The futex handle must have been created by subfunction 0 |
---------------------- Constants for registers: ---------------------- |
eax - SF_FUTEX (77) |
ebx - SSF_WAIT (2) |
====================================================================== |
=============== Function 77, Subfunction 3, Futex wake =============== |
====================================================================== |
Parameters: |
* eax = 77 - function number |
* ebx = 3 - subfunction number |
* ecx = futex handle |
* edx = number of waiters to wake |
Returned value: |
* eax = number of waiters that were woken up |
Remarks: |
* This function wakes at most edx of the waiters that are |
waiting (e.g., inside futex wait) on the futex dword |
* The futex handle must have been created by subfunction 0 |
---------------------- Constants for registers: ---------------------- |
eax - SF_FUTEX (77) |
ebx - SSF_WAKE (3) |
====================================================================== |
=== Function 80 - file system interface with parameter of encoding === |
====================================================================== |
Parameters: |
* eax = 80 |
* ebx = pointer to the information structure |
Returned value: |
* eax = 0 - success; otherwise file system error code |
* some subfunctions return value in other registers too |
General format of the information structure: |
* +0: dword: subfunction number |
* +4: dword: offset in file or folder |
* +8: dword: higher part of offset or flags |
* +12 = +0xC: dword: size of data |
* +16 = +0x10: dword: pointer to data |
* +20 = +0x14: dword: string encoding: |
1 = cp866 |
2 = UTF-16LE |
3 = UTF-8 |
0 = default (supports encoding byte at the start of the string) |
* +24 = +0x18: dword: pointer to zero terminated string with path |
The rest is similar to sysfunction 70. |
====================================================================== |
=============== Function -1 - terminate thread/process =============== |
====================================================================== |
Parameters: |
* eax = -1 - function number |
Returned value: |
* function does not return neither value nor control |
Remarks: |
* If the process did not create threads obviously, it has only |
one thread, which termination results in process termination. |
* If the current thread is last in the process, its termination |
also results in process terminates. |
* This function terminates the current thread. Other thread can be |
killed by call to subfunction 2 of function 18. |
---------------------- Constants for registers: ---------------------- |
eax - SF_TERMINATE_PROCESS (-1) |
====================================================================== |
=========================== List of events =========================== |
====================================================================== |
Next event can be retrieved by the call of one from functions 10 |
(to wait for event), 11 (to check without waiting), 23 |
(to wait during the given time). |
These functions return only those events, which enter into a mask set |
by function 40. By default it is first three, |
there is enough for most applications. |
Codes of events: |
* 1 = redraw event (is reset by call to function 0) |
* 2 = key on keyboard is pressed (acts, only when the window is |
active) or hotkey is pressed; is reset, when all keys from |
the buffer are read out by function 2 |
* 3 = button is pressed, defined earlier by function 8 |
(or close button, created implicitly by function 0; |
minimize button is handled by the system and sends no message; |
acts, only when the window is active; |
is reset when all buttons from the buffer |
are read out by function 17) |
* 4 = reserved (in current implementation never comes even after |
unmasking by function 40) |
* 5 = kernel finished redrawing of the desktop background |
* 6 = mouse event (something happened - button pressing or moving; |
is reset at reading) |
* 7 = IPC event (see function 60 - |
Inter Process Communication; is reset at reading) |
* 8 = network event (is reset at reading) |
* 9 = debug event (is reset at reading; see |
debug subsystem) |
* 16..31 = event with appropriate IRQ |
(16=IRQ0, 31=IRQ15) (is reset after reading all IRQ data) |
====================================================================== |
=================== Error codes of the file system =================== |
====================================================================== |
* 0 = success |
* 2 = function is not supported for the given file system |
* 3 = unknown file system |
* 5 = file not found |
* 6 = end of file, EOF |
* 7 = pointer lies outside of application memory |
* 8 = disk is full |
* 9 = file system error |
* 10 = access denied |
* 11 = device error |
* 12 = file system requires more memory |
Application start functions can return also following errors: |
* 30 = 0x1E = not enough memory |
* 31 = 0x1F = file is not executable |
* 32 = 0x20 = too many processes |
/kernel/branches/Kolibri-F/docs/drivers_api.txt |
---|
0,0 → 1,105 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2011-2012. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
All functions are stdcall unless mentioned otherwise. |
=== Disk === |
The kernel exports the functions 'DiskAdd', 'DiskMediaChanged', 'DiskDel' for |
drivers. They must be called in the following order: DiskAdd, then zero or |
more DiskMediaChanged, then optionally DiskDel. The driver must not call |
two functions in parallel, including two calls to DiskMediaChanged. |
void* DiskAdd(DISKFUNC* functions, const char* name, void* userdata, int flags); |
; The pointer 'functions' must be valid at least until the disk will be deleted |
; (until DISKFUNC.close is called). |
; The pointer 'name' can be invalid after this function returns. |
; It should point to ASCIIZ-string without leading '/' in latin lowercase and |
; digits, like 'usbhd0'. |
; The value 'userdata' is any pointer-sized data, passed as is to all |
; callbacks. |
DISK_NO_INSERT_NOTIFICATION = 1 |
; The bitfield 'flags' has currently only one bit defined. If it is set, the |
; driver will never call DiskMediaChanged(hDisk, true), so the kernel must scan |
; for media insertion when the operation is requested. |
struc DISKFUNC |
{ |
.strucsize dd ? |
.close dd ? |
; void close(void* userdata); |
; Optional. |
; The last function that is called for the given disk. The kernel calls it when |
; the kernel has finished all operations with the disk and it is safe to free |
; all driver-specific data identified by 'userdata'. |
.closemedia dd ? |
; void closemedia(void* userdata); |
; Optional. |
; The kernel calls this function when it finished all processing with the |
; current media. If media is removed, the driver should decline all requests |
; to that media with DISK_STATUS_NO_MEDIA, even if new media is inserted, |
; until this function is called. If media is removed, a new call to |
; DiskMediaChanged(hDisk, true) is not allowed until this function is called. |
.querymedia dd ? |
; int querymedia(void* userdata, DISKMEDIAINFO* info); |
; return value: 0 = success, otherwise = error |
.read dd ? |
; int read(void* userdata, void* buffer, __int64 startsector, |
; int* numsectors); |
; return value: 0 = success, otherwise = error |
.write dd ? |
; int write(void* userdata, const void* buffer, __int64 startsector, |
; int* numsectors); |
; Optional. |
; return value: 0 = success, otherwise = error |
.flush dd ? |
; int flush(void* userdata); |
; Optional. |
; Flushes the hardware cache, if it exists. Note that a driver should not |
; implement a software cache for read/write, since they are called from the |
; kernel cache manager. |
.adjust_cache_size dd ? |
; unsigned int adjust_cache_size(void* userdata, unsigned int suggested_size); |
; Optional. |
; Returns the cache size for this device in bytes. 0 = disable cache. |
} |
struc DISKMEDIAINFO |
{ |
.flags dd ? |
DISK_MEDIA_READONLY = 1 |
.sectorsize dd ? |
.capacity dq ? |
} |
void DiskDel(void* hDisk); |
; This function informs the kernel that the disk should be deleted from the |
; system. This function removes the disk from the global file system; however, |
; it is possible that active operations with the disk are still running. When |
; the disk is actually removed, the kernel calls the 'close' function, which |
; can free all device-related resources. |
void DiskMediaChanged(void* hDisk, int newstate); |
; This function informs the kernel that a media has been inserted, removed or |
; changed. 'newstate' should be zero if currently there is no media inserted |
; and nonzero in the other case. This function must not be called with nonzero |
; 'newstate' from any of callbacks. This function must not be called if another |
; call to this function is active. |
=== Timers === |
Timers allow to schedule a function call to some time in the future, once |
or periodically. A timer function can do anything, including adding/removing |
other timers and itself, but it should not run time-consuming tasks, since that |
would block the processing thread for a long time; for such tasks it is |
recommended to create new thread. |
void* TimerHS(unsigned int deltaStart, unsigned int interval, |
void* timerFunc, void* userData); |
; Registers a timer which is activated in (deltaStart == 0 ? deltaStart : |
; interval) 1/100ths of second starting from the current time. If interval |
; is zero, this timer is automatically deleted when activated. Otherwise, |
; this timer will be activated every (interval) 1/100ths of second from the |
; first activation. Activated timer calls timerFunc(userData) as stdcall. |
; Returned value: NULL = failed, otherwise = timer handle which can be passed |
; to CancelTimerHS. |
void CancelTimerHS(void* hTimer); |
; Cancels previously registered timer. |
/kernel/branches/Kolibri-F/docs/stack.txt |
---|
0,0 → 1,214 |
eax = 74 - Work directly with network interface |
ebx = -1 (Get number of active network devices) |
out: |
eax = number of active network devices |
bh = device number, for all following functions ! |
bl = 0 (Get device type) |
out: |
eax = device type number |
bl = 1 (Get device name) |
in: |
ecx = pointer to 64 byte buffer |
out: |
name is copied into the buffer |
eax = -1 on error |
bl = 2 (Reset the device) |
in |
none |
out |
eax = -1 on error |
bl = 3 (Stop device) |
in |
none |
out |
eax = -1 on error |
TO BE FIGURED OUT |
eax = 75 - Work with Sockets |
These functions work like the ones found in UNIX (and windows) |
for more info, please read http://beej.us/guide/bgnet/ |
bl = 0 (Open Socket) |
in: |
ecx = domain |
edx = type |
esi = protocol |
out: |
eax = socket number, -1 on error |
bl = 1 (Close Socket) |
in: |
ecx = socket number |
out: |
eax = -1 on error |
bl = 2 (Bind) |
in: |
ecx = socket number |
edx = pointer to sockaddr structure |
esi = length of sockaddr structure |
out: |
eax = -1 on error |
bl = 3 (Listen) |
in: |
ecx = socket number |
edx = backlog |
out: |
eax = -1 on error |
bl = 4 (connect) |
in: |
ecx = socket number |
edx = pointer to sockaddr structure |
esi = length of sockaddr structure |
out: |
eax = -1 on error |
bl = 5 (accept) |
in: |
ecx = socket number |
edx = pointer to sockaddr structure |
esi = length of sockaddr structure |
out: |
eax = socket number, -1 on error |
bl = 6 (send) |
in: |
ecx = socket number |
edx = pointer to buffer |
esi = length of buffer |
edi = flags |
out: |
eax = -1 on error |
bl = 7 (receive) |
in: |
ecx = socket number |
edx = pointer to buffer |
esi = length of buffer |
edi = flags |
out: |
eax = number of bytes copied, -1 on error |
bl = 8 (set socket options) |
in: |
ecx = socket number |
edx = ptr to optstruct |
Optstruct: dd level |
dd optionname |
dd optlength |
db options... |
The buffer's first dword is the length of the buffer, minus the first dword offcourse |
out: |
eax = -1 on error |
bl = 9 (get socket options) |
in: |
ecx = socket number |
edx = ptr to optstruct |
Optstruct: dd level |
dd optionname |
dd optlength |
db options... |
out: |
eax = -1 on error, socket option otherwise |
bl = 10 (get IPC socketpair) |
in: |
/ |
out: |
eax = -1 on error, socketnum1 otherwise |
ebx = socketnum2 |
TIP |
when you import 'network.inc' and 'macros.inc' into your source code, you can use the following syntax to work with sockets: |
for example, to open a socket |
mcall socket, AF_INET, SOCK_DGRAM,0 |
mov [socketnum], eax |
then to connect to a server |
mcall connect, [socketnum], sockaddr, 18 |
eax = 76 - Work with protocols |
high half of ebx = protocol number (for all subfunctions!) |
bh = device number (for all subfunctions!) |
bl = subfunction number, depends on protocol type |
For Ethernet protocol |
0 - Read # Packets send |
1 - Read # Packets received |
2 - Read # Bytes send |
3 - Read # Bytes received |
4 - Read MAC |
5 - Write MAC |
6 - Read IN-QUEUE size |
7 - Read OUT-QUEUE size |
For IPv4 protocol |
0 - Read # IP packets send |
1 - Read # IP packets received |
2 - Read IP |
3 - Write IP |
4 - Read DNS |
5 - Write DNS |
6 - Read subnet |
7 - Write subnet |
8 - Read gateway |
9 - Write gateway |
For ARP protocol |
0 - Read # ARP packets send |
1 - Read # ARP packets received |
2 - Get # ARP entry's |
3 - Read ARP entry |
4 - Add static ARP entry |
5 - Remove ARP entry (-1 = remove all) |
For ICMP protocol |
0 - Read # ICMP packets send |
1 - Read # ICMP packets received |
3 - enable/disable ICMP echo reply |
For UDP protocol |
0 - Read # UDP packets send |
1 - Read # UDP packets received |
For TCP protocol |
0 - Read # TCP packets send |
1 - Read # TCP packets received |
/kernel/branches/Kolibri-F/docs/events_subsystem.ru.txt |
---|
0,0 → 1,232 |
Дата последней правки 26/07/2013. |
Подсистема событий ядра может понадобиться при написании драйверов и сервисов, работающих в режиме ядра. |
Она не имеет отношения к подсистеме событий пользовательского интерфейса. |
С точки зрения ядра событие - объект ядра и принадлежит создавшему его потоку. |
struc EVENT |
{ |
.magic dd ? ; 'EVNT' |
.destroy dd ? ; internal destructor |
.fd dd ? ; next object in list |
.bk dd ? ; prev object in list |
.pid dd ? ; owner id. идентификатор владельца (потока) |
.id dd ? ; event uid. уникальный идентификатор события (просто номерок) |
.state dd ? ; internal flags; см. далее. |
.code dd ? ; старший байт класс события, ; следующий байт приоритет |
; (будет использоваться только внутри ядра, при чтении всегда 0), |
; Чем больше численное значение двойного слова тем важнее событие. |
; два младших байта код события. |
rd 5 ; .data - точная структура этого поля не определена и зависит |
; от поля .code. (Здесь можно передавать какие-то свои данные, |
; при необходимости :) |
.size = $ - .magic |
.codesize = $ - .code |
} |
События реального времени получили класс 0хFF. Пока определёны только: |
EVENT.code= ;(Используется в звуковой подсистеме). |
RT_INP_EMPTY = 0xFF000001 |
RT_OUT_EMPTY = 0xFF000002 |
RT_INP_FULL = 0xFF000003 |
RT_OUT_FULL = 0xFF000004 |
Флаги поля EVENT.state определены в gui/event.inc. |
EVENT_SIGNALED = 0x20000000 ;бит 29 событие активно/неактивно; |
EVENT_WATCHED = 0x10000000 ;бит 28, поток-владелец ожидает активации события; |
MANUAL_RESET = 0x40000000 ;бит 30, не деактивировать событие автоматически по получении; |
MANUAL_DESTROY = 0x80000000 ;бит 31, не возвращать событие в список свободных по получении. |
На момент ревизии 3732 (и далее по тексту то же) определение находится в \kernel\trunk\const.inc |
и выглядит так: |
struct APPOBJ ; common object header |
magic dd ? ; |
destroy dd ? ; internal destructor |
fd dd ? ; next object in list |
bk dd ? ; prev object in list |
pid dd ? ; owner id |
ends |
struct EVENT APPOBJ |
id dd ? ;event uid |
state dd ? ;internal flags |
code dd ? |
rd 5 ; .data |
ends |
Код находится в gui/event.inc. |
Сами события как обьекты существуют в памяти ядра в виде двусвязного списка (см. поля .bk и .fd). |
При инициализации ядро резервирует память и создает 512 таких обьектов, помещая их в список FreeEvents |
(свободных событий). При нехватке событий (все заняты, а нужно ещё) ядро создает ещё 512 свободных |
и т.д. Каждый поток имеет свои (двусвязные) списки (в которые может быть помещено событие): |
ObjList - список объектов ядра, ассоциированных с этим потоком; |
EventList - список событий ядра для потока. |
Сами события, физически, при перемещении между списками и смене очередности в списке не перемещаются |
и не копируются. Это происходит только благодаря модификации полей .fd и .bk. Принцип работы списков, |
как очередей - FIFO. Использутся неблокирующая отправка и блокирующее получение. Адресация - прямая |
(у события всегда есть поток-владелец), по идентификатору потока. |
Жизненый цикл событий определяется флагами при создании. По умолчанию ядро использует значения |
MANUAL_RESET = 0 и MANUAL_DESTROY = 0. Такое событие является "одноразовым", и автоматически освобождается |
ядром, возвращаясь в список свободных событий после получения. |
Событие с флагом MANUAL_DESTROY = 1 после получения переходит в неактивное состояние, но остаётся в списке |
объектов потока и может использоваться снова. Событие с флагами MANUAL_DESTROY = 1 и MANUAL_RESET = 1 |
остаётся активным после получения и может быть сброшено вызовом ClearEvent. |
Пример (вариант) жизненного цикла события из звуковой подсистемы: |
Для зукового буфера (их может быть несколько) драйвер создает событие в списке ObjList с помощью |
CreateEvent и флагом MANUAL_DESTROY. Далее драйвер вызывает WaitEvent для этого события (ожидает флага |
EVENT_SIGNALED в событии) и блокируется, в ожидании запроса на пополнение буфера. Запрос отправляется |
с помощью RaiseEvent из другого потока. Отправка (RaiseEvent) и получение (WaitEvent) циклически |
повторяются при опустошении буфера. При остановке воспроизведения драйвер деактивирует событие с помощью |
ClearEvent. |
Вообще говоря, структура события приведена здесь только лишь для понимания принципов работы подсистемы. |
Самостоятельная работа с полями не приветствуется, ввиду возможных в будущем проблем с совместимостью. |
Работа должна производится только через API (функции подсистемы), с доступом только к тем полям, доступ к |
которым предоставляет функция. При этом пару "указатель на событие" и "уникальный идентификатор события" |
следует рассматривать как один 64-х битный уникальный идентификатор. (Если вы вызвали CreateEvent, напимер, |
его нужно запомнить где-нибудь [если это нужно] для дальнейшей работы с событием). |
Функции для работы с событиями экспортитуемые ядром: |
(для драйверов и т.п.; вызываются в режиме ядра) |
CreateEvent |
RaiseEvent |
ClearEvent |
SendEvent |
DestroyEvent |
WaitEvent |
WaitEventTimeout |
GetEvent |
Для пользовательских приложений Ф68.14 (GetEvent с обёрткой) |
--------------------------------------------------------------------------------------------- |
CreateEvent: |
Создаёт новое событие в очереди ObjList текущего потока. |
Устанавливает: |
EVENT.destroy <= внутренний деструктор по умолчанию; |
EVENT.pid <= текущий Process id; |
EVENT.id <= уникальный идентификатор; |
EVENT.state <= ecx - флаги; |
EVENT.code <= [esi], (если esi=0, то не копирует), размер 6*dword; |
Возвращает: |
eax - указатель на событие или 0 при ошибке. |
edx - Event.id. |
Портит: eax,ebx,edx,ecx,esi,edi |
--------------------------------------------------------------------------------------------- |
RaiseEvent: |
Активирует уже существующее событие (может принадлежать другому потоку) установкой |
флага EVENT_SIGNALED. Если необходимо, - устанавливает данные EVENT.code. |
Если флаг EVENT_SIGNALED в самом событии уже активен - больше ничего не делает. |
Если EVENT_SIGNALED не установлен в самом событии, то он будет установлен, кроме случая |
{EVENT_WATCHED в edx=1 и EVENT_WATCHED в событии=0}. |
Т.е. при установке EVENT_WATCHED в edx, проверяется, ожидает ли поток-владелец активации |
события. |
Кроме EVENT_SIGNALED в событии никакие другие флаги не модифицируются. |
Принимает: |
eax - указатель на событие; |
ebx - id, уникальный идентификатор события; |
edx - флаги для операции (формат EVENT.state); |
EVENT.code <= [esi], (если esi=0, то не копирует), размер 6*dword; |
Возвращает: ? |
Портит: eax,ebx,edx,ecx,esi,edi . |
--------------------------------------------------------------------------------------------- |
ClearEvent: |
Перемещает событие в список ObjList потока-владельца. (Возможно оно там и находилось.) |
Сбрасывает флаги EVENT_SIGNALED, EVENT_WATCHED. С остальными полями (.code, .id), |
ничего не делает. |
Принимает: |
eax - указатель на событие; |
ebx - id, уникальный идентификатор события. |
Возвращает: ? |
Портит: eax,ebx,ecx,edi . |
--------------------------------------------------------------------------------------------- |
SendEvent: |
Создаёт новое событие в списке событий целевого потока. Устанавливает в событии |
флаг EVENT_SIGNALED. |
Принимает: |
EVENT.pid <= eax - pid, идентификатор целевого потока; |
EVENT.code <= [esi], (если esi=0, то не копирует), размер 6*dword; |
Возвращает: |
eax - указатель на событие или 0 при ошибке. |
edx - Event.id. уникальный идентификатор. |
Портит: eax,ebx,ecx,esi,edi . |
--------------------------------------------------------------------------------------------- |
DestroyEvent: |
Переносит EVENT в список FreeEvents, чистит поля .magic,.destroy,.pid,.id. |
Событие может принадлежать другому потоку. |
Принимает: |
eax - указатель на событие; |
ebx - id, уникальный идентификатор события. |
Возвращает: |
eax - 0 при ошибке, не 0 при успехе. |
Портит: eax,ebx,ecx . |
--------------------------------------------------------------------------------------------- |
WaitEvent: |
Бесконечно ожидает установки флага EVENT_SIGNALED в конкретном событии, принадлежащем |
вызывающему WaitEvent потоку. Сигнализирующий поток устанавливат этот флаг через |
RaiseEvent. Ожидающий поток замораживается путем перевода TASKDATA.state<=TSTATE_WAITING=5. |
Перед заморозкой устанавливается флаг EVENT_WATCHED в событии. |
Если в полученном событии НЕ установлен MANUAL_RESET, то: |
{EVENT_SIGNALED и EVENT_WATCHED по получении события сбрасываются. |
При неактивном MANUAL_DESTROY - событие уничтожается штатно (DestroyEvent), |
а при активном - перемещается в список ObjList текущего слота.} |
Принимает: |
eax - указатель на событие; |
ebx - id, уникальный идентификатор события. |
Возвращает: ? |
Портит: eax,ebx,edx,ecx,esi,edi . |
--------------------------------------------------------------------------------------------- |
WaitEventTimeout: |
Ожидает с таймаутом установки флага EVENT_SIGNALED в конкретном событии, принадлежащем |
вызывающему WaitEventTimeout потоку. Сигнализирующий поток устанавливат этот флаг через |
RaiseEvent. Ожидающий поток замораживается путем перевода TASKDATA.state<=TSTATE_WAITING=5. |
Перед заморозкой устанавливается флаг EVENT_WATCHED в событии. |
Если в полученном событии НЕ установлен MANUAL_RESET, то: |
{EVENT_SIGNALED и EVENT_WATCHED по получении события сбрасываются. |
При неактивном MANUAL_DESTROY - событие уничтожается штатно (DestroyEvent), |
а при активном - перемещается в список ObjList текущего слота.} |
Принимает: |
eax - указатель на событие; |
ebx - id, уникальный идентификатор события. |
ecx - время ожидания в тиках системного таймера. |
Возвращает: |
eax - 0 - таймаут, если событие не активировалось, или |
не 0, если было активировано. |
Портит: eax,ebx,edx,ecx,esi,edi . |
--------------------------------------------------------------------------------------------- |
GetEvent: |
Бесконечно ожидает любое событие в очереди событий текущего потока. Поток замораживается |
путем перевода TASKDATA.state<=TSTATE_WAITING=5. Данные события (EVENT.code+5*dword) |
по получении копируются в указанный буфер. Сбрасывает байт приоритета (см. выше) в буфере. |
Если в полученном событии НЕ установлен MANUAL_RESET, то: |
{EVENT_SIGNALED и EVENT_WATCHED по получении события сбрасываются. |
При неактивном MANUAL_DESTROY - событие уничтожается штатно (DestroyEvent), |
а при активном - перемещается в список ObjList текущего слота.} |
Принимает: |
edi - указатель на буфер, куда копировать данные. |
Возвращает: |
буфер, содержащий следующую информацию: |
+0: (EVENT.code) dword: идентификатор последующих данных сигнала |
+4: (EVENT.data, поле формально не определено) данные принятого |
сигнала (5*dword), формат которых определяется первым dword-ом. |
Портит: eax,ebx,edx,ecx,esi,edi . |
-------------------------------------------------------------------------------------------- |
Ф 68.14 для приложений: ;это тот же GetEvent, но с обёрткой. |
Бесконечно ожидает любое событие в очереди событий текущего потока. Ожидающий поток |
замораживается путем перевода TASKDATA.state<=TSTATE_WAITING=5. Данные события (EVENT.code+5*dword) |
копируются в указанный буфер. Сбрасывает байт приоритета (см. выше) в буфере. |
Принимает: |
eax - 68 - номер функции |
ebx - 14 - номер подфункции |
ecx - указатель на буфер для информации (размер 6*dword) |
Возвращает: |
буфер, на который указывает ecx, содержит следующую информацию: |
+0: (EVENT.code) dword: идентификатор последующих данных сигнала |
+4: (EVENT.data, поле формально не определено) данные принятого |
сигнала (5*dword), формат которых определяется первым dword-ом. |
Портит: |
eax . |
--------------------------------------------------------------------------------------------- |
/kernel/branches/Kolibri-F/docs/events_subsystem.txt |
---|
0,0 → 1,248 |
Last edit: 26/07/2013 |
Kernel event subsystem may be useful when writing drivers and kernel space |
services. It is not related to the subsystem of GUI events. An event, from the |
kernel's point of view, is a kernel space object which is owned by the thread |
that created it. |
struc EVENT |
{ |
.magic dd ? ; 'EVNT' |
.destroy dd ? ; internal destructor |
.fd dd ? ; next object in list |
.bk dd ? ; prev object in list |
.pid dd ? ; owner (thread) id |
.id dd ? ; event uid. (just a number) |
.state dd ? ; internal flags; see below |
.code dd ? ; MSB: event class; next byte: priority |
; (used by kernel only, always 0 for reading), |
; The higher dword value the higher event priority. |
; Two LSBs: event code. |
rd 5 ; .data: the structure of this field is not defined and |
; depends on .code field. (Pass any data you need here) |
.size = $ - .magic |
.codesize = $ - .code |
} |
Realtime events have class 0хFF. Currently defined: |
EVENT.code= ; (Used in sound subsystem) |
RT_INP_EMPTY = 0xFF000001 |
RT_OUT_EMPTY = 0xFF000002 |
RT_INP_FULL = 0xFF000003 |
RT_OUT_FULL = 0xFF000004 |
Flags of EVENT.state field are defined in gui/event.inc. |
EVENT_SIGNALED = 0x20000000 ; bit 29: event is active/inactive |
EVENT_WATCHED = 0x10000000 ; bit 28: owner thread is waiting for the |
; event to be active |
MANUAL_RESET = 0x40000000 ; bit 30: do not deactivate event |
: automatically on receive |
MANUAL_DESTROY = 0x80000000 ; bit 31: do not return event to a list of |
; free ones on receive |
As of SVN r3732 (assume same below) the definition is located in |
/kernel/trunk/const.inc and is as follows: |
struct APPOBJ ; common object header |
magic dd ? ; |
destroy dd ? ; internal destructor |
fd dd ? ; next object in list |
bk dd ? ; prev object in list |
pid dd ? ; owner id |
ends |
struct EVENT APPOBJ |
id dd ? ; event uid |
state dd ? ; internal flags |
code dd ? |
rd 5 ; .data |
ends |
Code is located in gui/event.inc. |
Event objects live in kernel memory as a double-linked list (see fields .bk and |
.fd). While initialization the kernel reserves memory, creates 512 events and |
places them into FreeEvents list. When out of free event, kernel creates another |
512 ones etc. Each thread has own double-linked lists where an event may be |
placed to: |
ObjList -- a list of kernel objects associated with the thread; |
EventList -- a list of kernel events for the thread. |
When events are moved between lists or reordered their data are not copied. This |
is done only via modification of .fd and .bk fields. These lists work as FIFO |
queues. Sending does not block, receiving blocks. Addressing is direct, by |
thread id. There always is an owner thread for an event. |
Event's life cycle is defined by flags while creation. By default the kernel |
uses values MANUAL_RESET = 0 and MANUAL_DESTROY = 0. Such an event is oneshot |
and is automatically freed by the kernel and returned to the FreeEvents list |
when received. An event with flag MANUAL_DESTROY = 1 becomes inactive when |
received but remains in thread's object list and can be reused. An event with |
flags MANUAL_DESTROY = 1 and MANUAL_RESET = 1 remains active when received and |
can be reset via call to ClearEvent. |
A life cycle example of a sound subsystem event: |
* For an audio buffer (possibly several) the driver creates an event in ObjList |
by calling CreateEvent with flag MANUAL_DESTROY. |
* Then driver calls WaitEvent for the event (waits for EVENT_SIGNALED event |
flag) and blocks waiting for buffer update request. |
* The buffer update request is sent with RaiseEvent from another thread. |
* Sending (RaiseEvent) and receiving (WaitEvent) are repeated as buffer gets |
empty. |
* Driver deactivates the event with ClearEvent when playback is stopped. |
Actually, the event structure is described here only for understanding of |
subsystem work principles. Direct field access is discouraged due to possible |
compatibility issues in the future. Only API calls should be used. A pair |
"pointer to an event" and "event id" is considered a single 64-bit id. This id |
should be stored somewhere after a call to CreateEvent for further work with the |
event. |
The kernel exports following event related functions: |
(for drivers, etc; called from kernel mode) |
CreateEvent |
RaiseEvent |
ClearEvent |
SendEvent |
DestroyEvent |
WaitEvent |
WaitEventTimeout |
GetEvent |
For user applications sysfn 68.14 (a wrapper to GetEvent) |
-------------------------------------------------------------------------------- |
CreateEvent: |
Creates a new event in ObjList queue of current thread. |
Sets: |
EVENT.destroy <= default internal destructor |
EVENT.pid <= current Process id |
EVENT.id <= unique id |
EVENT.state <= ecx: flags |
EVENT.code <= [esi]: size is 6*dword, do not copy if esi=0 |
Returns: |
eax -- pointer to the event or 0 for error. |
edx -- Event.id. |
Destroys: eax,ebx,edx,ecx,esi,edi |
-------------------------------------------------------------------------------- |
RaiseEvent: |
Activates existing event (may be owned by another thread) by setting |
EVENT_SIGNALED flag. Sets EVENT.code data if necessary. Does nothing |
more if EVENT_SIGNALED flag is already active in the event. If |
EVENT_SIGNALED flag is not set in the event it will be set, except when |
EVENT_WATCHED in edx = 1 and EVENT_WATCHED in the event = 0. I.e. while |
setting EVENT_WATCHED in edx it is checked if owner thread is waiting |
for event activation. No flags, except EVENT_SIGNALED, are modified in |
the event. |
Gets: |
eax -- pointer to event |
ebx -- id |
edx -- flags (see EVENT.state) |
Sets: |
EVENT.code <= [esi]: size is 6*dword, do not copy if esi=0 |
Returns: ? |
Destroys: eax,ebx,edx,ecx,esi,edi |
-------------------------------------------------------------------------------- |
ClearEvent: |
Move event to ObjList of owner thread. (May be it was already there.) |
Reset flags EVENT_SIGNALED and EVENT_WATCHED, keep other fields (.code, |
.id). |
Gets: |
eax -- pointer to event |
ebx -- id |
Returns: ? |
Destroys: eax,ebx,ecx,edi |
-------------------------------------------------------------------------------- |
SendEvent: |
Create a new event in the event list of target thread. Sets |
EVENT_SIGNALED flag in the event. |
Gets: |
EVENT.pid <= eax: target thread id; |
EVENT.code <= [esi]: size is 6*dword, do not copy if esi=0 |
Returns: |
eax -- pointer to event or 0 for error |
edx -- Event.id |
Destroys: eax,ebx,ecx,esi,edi |
-------------------------------------------------------------------------------- |
DestroyEvent: |
Moves event to FreeEvents, clears fields .magic, .destroy, .pid, .id. |
The event may be owned by other thread. |
Gets: |
eax -- pointer to event |
ebx -- event id |
Returns: |
eax -- 0 for error, non-zero for success |
Destroy: eax,ebx,ecx |
-------------------------------------------------------------------------------- |
WaitEvent: |
Wait infinitely until flag EVENT_SIGNALED is set in the event owned by |
the caller thread. This flag is set by signaling thread via RaiseEvent. |
Waiting thread is frozen by setting TASKDATA.state <= TSTATE_WAITING=5. |
Flag EVENT_WATCHED is set in the event before freeze. |
If flag MANUAL_RESET is NOT set in the event then: |
EVENT_SIGNALED and EVENT_WATCHED are reset when the event is |
received. |
When MANUAL_DESTROY is |
inactive: the event is destroyed by DestroyEvent, |
active: the event is moved to ObjList of current thread. |
Gets: |
eax -- pointer to event |
ebx -- event id |
Returns: ? |
Destroys: eax,ebx,edx,ecx,esi,edi |
-------------------------------------------------------------------------------- |
WaitEventTimeout: |
Wait with a timeout until flag EVENT_SIGNALED is set in the event owned |
by caller thread. This flag is set by signaling thread via RaiseEvent. |
Waiting thread is frozen by setting TASKDATA.state <= TSTATE_WAITING=5. |
Flag EVENT_WATCHED is set in the event before freeze. |
If flag MANUAL_RESET is NOT set in the event then: |
EVENT_SIGNALED and EVENT_WATCHED are reset when the event is |
received. |
When MANUAL_DESTROY is |
inactive: the event is destroyed by DestroyEvent, |
active: the event is moved to ObjList of current thread. |
Gets: |
eax -- pointer to event |
ebx -- event id |
ecx -- timeout, in ticks of system timer |
Returns: |
eax -- 0 if the event was not activated, or |
not 0 if activated |
Destroys: eax,ebx,edx,ecx,esi,edi |
-------------------------------------------------------------------------------- |
GetEvent: |
Waits infinitely for any event in the queue of current thread. Thread is |
frozen by setting TASKDATA.state <= TSTATE_WAITING = 5. Event data |
(EVENT.code + 5*dword) are copied to specified buffer when received. |
Reset priority byte (see above) in the buffer. |
If flag MANUAL_RESET is NOT set in the event then: |
EVENT_SIGNALED and EVENT_WATCHED are reset when the event is |
received. |
When MANUAL_DESTROY is |
inactive: the event is destroyed by DestroyEvent, |
active: the event is moved to ObjList of current thread. |
Gets: |
edi -- pointer to buffer to copy data |
Returns: |
buffer with following data: |
+0: (EVENT.code) dword: id of following signal data |
+4: (EVENT.data) 5*dword: signal data, format depends on |
EVENT.code |
Destroys: eax,ebx,edx,ecx,esi,edi |
-------------------------------------------------------------------------------- |
SysFn 68.14 for application: ; wrapped GetEvent |
Waits infinitely for any event in the queue of current thread. Thread is |
frozen by setting TASKDATA.state <= TSTATE_WAITING = 5. Event data |
(EVENT.code + 5*dword) are copied to specified buffer when received. |
Reset priority byte (see above) in the buffer. |
Gets: |
eax -- 68: function number |
ebx -- 14: subfunction number |
ecx -- pointer to data buffer (size is 6*dword) |
Returns: |
ecx = buffer with following data: |
+0: (EVENT.code) dword: id of following signal data |
+4: (EVENT.data) 5*dword: signal data, format depends on |
EVENT.code |
Destroys: |
eax |
/kernel/branches/Kolibri-F/docs/usbapi.txt |
---|
0,0 → 1,211 |
When the kernel detects a connected USB device, it configures the device in |
terms of USB protocol - SET_ADDRESS + SET_CONFIGURATION, the first |
configuration is always selected. The kernel also reads device descriptor to |
print some information, reads and parses configuration descriptor. For every |
interface the kernel looks for class code of this interface and loads the |
corresponding COFF driver. Currently the correspondence is hardcoded into |
the kernel code and looks as follows: 3 = usbhid.obj, 7 = usbprint.obj, |
8 = usbstor.obj, 9 is handled by the kernel itself, other = usbother.obj. |
The driver must be standard driver in COFF format, exporting procedure |
named "START" and a variable named "version". Loader calls "START" procedure |
as stdcall with one parameter DRV_ENTRY = 1; if initialization is successful, |
the "START" procedure is also called by shutdown code with one parameter |
DRV_EXIT = -1. |
The driver must register itself as a USB driver in "START" procedure. |
This is done by call to exported function RegUSBDriver and passing the returned |
value as result of "START" procedure. |
void* __stdcall RegUSBDriver( |
const char* name, |
void* handler, |
const USBFUNC* usbfunc |
); |
The parameter 'name' should match the name of driver, "usbhid" for usbhid.obj. |
The parameter 'handler' is optional; if it is non-NULL, it should point to |
the standard handler for IOCTL interface as in non-USB drivers. |
The parameter 'usbfunc' is a pointer to the following structure: |
struc USBFUNC |
{ |
.strucsize dd ? ; size of the structure, including this field |
.add_device dd ? ; pointer to AddDevice function in the driver |
; required |
.device_disconnect dd ? ; pointer to DeviceDisconnected function in the driver |
; optional, may be NULL |
; other functions may be added in the future |
} |
The driver should implement the function |
void* __stdcall AddDevice( |
void* pipe0, |
void* configdescr, |
void* interfacedescr |
); |
The parameter 'pipe0' is a handle of the control pipe for endpoint zero |
of the device. It can be used as the argument of USBControlTransferAsync. |
The parameter 'configdescr' points to USB configuration descriptor |
and all associated data, as returned by GET_DESCRIPTOR request. |
The total length of all associated data is contained in the configuration |
descriptor. |
The parameter 'interfacedescr' points to USB interface descriptor corresponding |
to the interface which is initializing. This is a pointer inside data |
associated with the configuration descriptor. |
Note that one device can implement many interfaces, so AddDevice may be |
called several times with the same 'configdescr' and different 'interfacedescr'. |
The returned value NULL means that the initialization has failed. |
Any other value means that configuration was successful; the kernel does not |
try to interpret the value. It can be, for example, pointer to the internal |
data allocated with Kmalloc, or index in some internal table. |
The driver can implement the function |
void __stdcall DeviceDisconnected( |
void* devicedata |
); |
If this function is implemented, the kernel calls it when the device is |
disconnected, passing the returned value of AddDevice as 'devicedata'. |
The driver can use the following functions exported by the kernel. |
void* __stdcall USBOpenPipe( |
void* pipe0, |
int endpoint, |
int maxpacketsize, |
int type, |
int interval |
); |
The parameter 'pipe0' is a handle of the pipe for endpoint zero for |
the device, as passed to AddDevice. It is used to identify the device. |
The parameter 'endpoint' is endpoint number as defined by USB. Lower |
4 bits form the number itself, bit 7 - highest bit of low byte - |
is 0/1 for OUT/IN endpoints, other bits should be zero. |
The parameter 'maxpacketsize' sets the maximum packet size for this pipe. |
The parameter 'type' selects the type of the endpoint as defined by USB: |
0 = control, 1 = isochronous (not supported yet), 2 = bulk, 3 = interrupt. |
The parameter 'interval' is ignored for control and bulk endpoints. |
For interrupt endpoints, it sets the polling interval in milliseconds. |
The function returns a handle to the pipe or NULL on failure. |
The output handle becomes invalid when a) it is explicitly closed with |
the following function or b) the function DeviceDisconnected provided |
by the driver returns. |
void __stdcall USBClosePipe( |
void* pipe |
); |
Releases all resources associated with the given pipe. The only parameter |
must be a handle returned by USBOpenPipe. |
When a device is disconnected, all associated pipes are closed by the kernel; |
there is no need to ever call this function if all pipes are used continuously |
while a device is connected. |
void* __stdcall USBNormalTransferAsync( |
void* pipe, |
void* buffer, |
int size, |
void* callback, |
void* calldata, |
int flags |
); |
void* __stdcall USBControlTransferAsync( |
void* pipe, |
void* setup, |
void* buffer, |
int size, |
void* callback, |
void* calldata, |
int flags |
); |
The first function inserts a bulk or interrupt transfer to the transfer queue |
for given pipe. Type and direction of transfer are fixed for bulk and interrupt |
endpoints and are set in USBOpenPipe. The second function inserts a control |
transfer to the transfer queue for given pipe. Direction of a control transfer |
is concluded from 'setup' packet, bit 7 of byte 0 is set for IN transfers |
and cleared for OUT transfers. These function return immediately; when data |
are transferred, the callback function will be called. |
The parameter 'pipe' is a handle returned by USBOpenPipe. |
The parameter 'setup' of USBControlTransferAsync points to 8-byte |
configuration packet as defined by USB. |
The parameter 'buffer' is a pointer to buffer. For IN transfers, it will be |
filled with the data. For OUT transfers, it should contain data to be |
transferred. It can be NULL for an empty transfer or if no additional data are |
required for a control transfer. |
The parameter 'size' is size of data to transfer. It can be 0 for an empty |
transfer or if no additional data are required for a control transfer. |
The parameter 'callback' is a pointer to a function which will be called |
when the transfer will be done. |
The parameter 'calldata' will be passed as is to the callback function. |
For example, it can be NULL, it can be a pointer to device data or it can be |
a pointer to data used to pass additional parameters between caller and |
callback. The transfer-specific data can also be associated with 'buffer', |
preceding (negative offsets from 'buffer') or following (offsets more than |
or equal to 'size') the buffer itself. |
The parameter 'flags' is the bitmask. |
The bit 0 is ignored for OUT transfers, for IN transfers it controls whether |
the device can transfer less data than 'size' bytes. If the bit is 0, a small |
transfer is an error; if the bit is 1, a small transfer is OK. |
All other bits are reserved and should be zero. |
The returned value is NULL if an error occured and non-NULL if the transfer |
was successfully queued. If an error will occur later, the callback function |
will be notified. |
void __stdcall CallbackFunction( |
void* pipe, |
int status, |
void* buffer, |
int length, |
void* calldata |
); |
The parameters 'pipe', 'buffer', 'calldata' are the same as for the |
corresponding USB*TransferAsync. |
The parameter 'length' is the number of bytes transferred. For |
control transfers, this includes 8 bytes from SETUP stage, so |
0 means that SETUP stage failed and 'size'+8 means full transfer. |
The parameter 'status' is nonzero if an error occured. |
USB_STATUS_OK = 0 ; no error |
USB_STATUS_CRC = 1 ; CRC error |
USB_STATUS_BITSTUFF = 2 ; bit stuffing violation |
USB_STATUS_TOGGLE = 3 ; data toggle mismatch |
USB_STATUS_STALL = 4 ; device returned STALL |
USB_STATUS_NORESPONSE = 5 ; device not responding |
USB_STATUS_PIDCHECK = 6 ; invalid PID check bits |
USB_STATUS_WRONGPID = 7 ; unexpected PID value |
USB_STATUS_OVERRUN = 8 ; too many data from endpoint |
USB_STATUS_UNDERRUN = 9 ; too few data from endpoint |
USB_STATUS_BUFOVERRUN = 12 ; overflow of internal controller buffer |
USB_STATUS_BUFUNDERRUN = 13 ; underflow of internal controller buffer |
USB_STATUS_CLOSED = 16 ; pipe closed, either explicitly with USBClosePipe |
; or due to device disconnect |
USB_STATUS_CANCELLED = 17 ; transfer cancelled with USBAbortPipe |
If several transfers are queued for the same pipe, their callback functions |
are called in the same order as they were queued. |
When a pipe is closed, either explicitly with USBClosePipe, or |
implicitly due to device disconnect, all callback functions are called |
with USB_STATUS_CLOSED. The call to DeviceDisconnected() occurs after |
all callbacks. |
void __stdcall USBAbortPipe(void* pipe); |
Initiates cancellation of all active transfers for the given pipe. Asynchronous. |
When a transfer will be cancelled, the associated callback function |
will be called with USB_STATUS_CANCELLED. |
void* __stdcall USBGetParam(void* pipe0, int param); |
Returns miscellaneous parameters of the device. |
pipe0 is the pointer to the config pipe. |
param = 0: return pointer to device descriptor |
param = 1: return pointer to config descriptor, same as passed to AddDevice |
param = 2: return speed at which the device is operating, one of |
USB_SPEED_FS = 0 ; full-speed |
USB_SPEED_LS = 1 ; low-speed |
USB_SPEED_HS = 2 ; high-speed |
/kernel/branches/Kolibri-F/docs/loader_doc.txt |
---|
0,0 → 1,95 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
; (english text below) |
;------------------------------------------ |
; Интерфейс сохранения параметров |
;------------------------------------------ |
Если при передаче управления ядру загрузчик устанавливает AX='KL', |
то в DS:SI ядро ожидает дальнего указателя на следующую структуру: |
db версия структуры, должна быть 1 |
dw флаги: |
бит 0 установлен = присутствует образ рамдиска в памяти |
dd дальний указатель на процедуру сохранения параметров |
может быть 0, если загрузчик не поддерживает |
Процедура сохранения параметров должна записать первый сектор ядра |
kernel.mnt назад на то место, откуда она его считала; возврат из |
процедуры осуществляется по retf. |
;------------------------------------------ |
; Указание загрузчиком системного каталога |
;------------------------------------------ |
Перед передачей управления ядру могут быть установлены следующие регистры: |
CX='HA' |
DX='RD' |
Это указывает на то, что регистр BX указывает на системный раздел. Каталог /kolibri/ на |
этом разделе является системным, к нему можно обращаться как к /sys/ |
Возможные значения регистра BL (указывает на устройство): |
'a' - Primary Master |
'b' - Primary Slave |
'c' - Secondary Master |
'd' - Secondary Slave |
'r' - RAM диск |
'm' - Приводы CD-ROM |
Возможные значения регистра BH (указывает на раздел): |
для BL='a','b','c','d','r' - указывает на раздел, где расположен системный каталог |
для BL='m',указывает на номер физического устройства, с которого надо начинать поиск системного каталога. |
примеры значений регистра BX: |
'a1' - /hd0/1/ |
'a2' - /hd0/2/ |
'b1' - /hd1/1/ |
'd4' - /hd3/4/ |
'm0' - поиск по сидюкам каталога kolibri |
'r1' - /rd/1/ |
;------------------------------------------ |
; Interface for saving boot-screen settings |
;------------------------------------------ |
If a loader sets AX='KL' when transferring control to the kernel, |
the kernel expects in DS:SI far pointer to the following structure: |
db structure version, must be 1 |
dw flags |
bit 0 set = ramdisk image in memory is present |
dd far pointer to save settings procedure |
may be 0 if such procedure is not supported by loader |
Procedure for saving settings must write the first sector of the kernel |
kernel.mnt back to the place, from where it has been read; return from |
this procedure must be with retf. |
;------------------------------------------ |
; System directory information from loader |
;------------------------------------------ |
Before transfer of control to the kernel following registers can be set: |
CX = 'HA' |
DX = 'RD' |
This indicates that the register BX identifies system partition. The folder /kolibri/ in |
this partition is system folder, it can be referenced as /sys/ |
Possible values for register BL (indicates the device): |
'a' - Primary Master |
'b' - Primary Slave |
'c' - Secondary Master |
'd' - Secondary Slave |
'r' - RAM disc |
'm' - ROM drives |
Possible values for register BH (indicates section): |
for BL = 'a', 'b', 'c', 'd', 'r' to denote partition where the system folder |
for BL = 'm', indicates the number of physical devices, which must begin a systematic search directory. |
Examples of register BX: |
'a1' - /hd0/1/ |
'a2' - /hd0/2/ |
'b1' - /hd1/1/ |
'd4' - /hd3/4/ |
'm0' - search directory 'kolibri' by all CD-ROMs |
'r1' - /rd/1/ |
/kernel/branches/Kolibri-F/docs/apm.txt |
---|
0,0 → 1,518 |
--------p-155300----------------------------- |
INT 15 - Advanced Power Management v1.0+ - INSTALLATION CHECK |
AX = 5300h |
BX = device ID of system BIOS (0000h) |
Return: CF clear if successful |
AH = major version (BCD) |
AL = minor version (BCD) |
BX = 504Dh ("PM") |
CX = flags (see #00472) |
CF set on error |
AH = error code (06h,09h,86h) (see #00473) |
BUG: early versions of the Award Modular BIOS with built-in APM support |
reportedly do not set BX on return |
Bitfields for APM flags: |
Bit(s) Description (Table 00472) |
0 16-bit protected mode interface supported |
1 32-bit protected mode interface supported |
2 CPU idle call reduces processor speed |
3 BIOS power management disabled |
4 BIOS power management disengaged (APM v1.1) |
5-7 reserved |
(Table 00473) |
Values for APM error code: |
01h power management functionality disabled |
02h interface connection already in effect |
03h interface not connected |
04h real-mode interface not connected |
05h 16-bit protected-mode interface already connected |
06h 16-bit protected-mode interface not supported |
07h 32-bit protected-mode interface already connected |
08h 32-bit protected-mode interface not supported |
09h unrecognized device ID |
0Ah invalid parameter value in CX |
0Bh (APM v1.1) interface not engaged |
0Ch (APM v1.2) function not supported |
0Dh (APM v1.2) Resume Timer disabled |
0Eh-1Fh reserved for other interface and general errors |
20h-3Fh reserved for CPU errors |
40h-5Fh reserved for device errors |
60h can't enter requested state |
61h-7Fh reserved for other system errors |
80h no power management events pending |
81h-85h reserved for other power management event errors |
86h APM not present |
87h-9Fh reserved for other power management event errors |
A0h-FEh reserved |
FFh undefined |
--------p-155301----------------------------- |
INT 15 - Advanced Power Management v1.0+ - CONNECT REAL-MODE INTERFACE |
AX = 5301h |
BX = device ID of system BIOS (0000h) |
Return: CF clear if successful |
CF set on error |
AH = error code (02h,05h,07h,09h) (see #00473) |
Note: on connection, an APM v1.1 or v1.2 BIOS switches to APM v1.0 |
compatibility mode until it is informed that the user supports a |
newer version of APM (see AX=530Eh) |
SeeAlso: AX=5302h,AX=5303h,AX=5304h |
--------p-155302----------------------------- |
INT 15 R - Advanced Power Management v1.0+ - CONNECT 16-BIT PROTMODE INTERFACE |
AX = 5302h |
BX = device ID of system BIOS (0000h) |
Return: CF clear if successful |
AX = real-mode segment base address of protected-mode 16-bit code |
segment |
BX = offset of entry point |
CX = real-mode segment base address of protected-mode 16-bit data |
segment |
---APM v1.1--- |
SI = APM BIOS code segment length |
DI = APM BIOS data segment length |
CF set on error |
AH = error code (02h,05h,06h,07h,09h) (see #00473) |
Notes: the caller must initialize two consecutive descriptors with the |
returned segment base addresses; these descriptors must be valid |
whenever the protected-mode interface is called, and will have |
their limits arbitrarily set to 64K. |
the protected mode interface is invoked by making a far call with the |
same register values as for INT 15; it must be invoked while CPL=0, |
the code segment descriptor must have a DPL of 0, the stack must be |
in a 16-bit segment and have enough room for BIOS use and possible |
interrupts, and the current I/O permission bit map must allow access |
to the I/O ports used for power management. |
functions 00h-03h are not available from protected mode |
on connection, an APM v1.1 or v1.2 BIOS switches to APM v1.0 |
compatibility mode until it is informed that the user supports a |
newer version of APM (see AX=530Eh) |
SeeAlso: AX=5301h,AX=5303h,AX=5304h |
--------p-155303----------------------------- |
INT 15 - Advanced Power Management v1.0+ - CONNECT 32-BIT PROTMODE INTERFACE |
AX = 5303h |
BX = device ID of system BIOS (0000h) |
Return: CF clear if successful |
AX = real-mode segment base address of protected-mode 32-bit code |
segment |
EBX = offset of entry point |
CX = real-mode segment base address of protected-mode 16-bit code |
segment |
DX = real-mode segment base address of protected-mode 16-bit data |
segment |
---APM v1.1--- |
SI = APM BIOS code segment length |
DI = APM BIOS data segment length |
CF set on error |
AH = error code (02h,05h,07h,08h,09h) (see #00473) |
Notes: the caller must initialize three consecutive descriptors with the |
returned segment base addresses for 32-bit code, 16-bit code, and |
16-bit data, respectively; these descriptors must be valid whenever |
the protected-mode interface is called, and will have their limits |
arbitrarily set to 64K. |
the protected mode interface is invoked by making a far call to the |
32-bit code segment with the same register values as for INT 15; it |
must be invoked while CPL=0, the code segment descriptor must have a |
DPL of 0, the stack must be in a 32-bit segment and have enough room |
for BIOS use and possible interrupts, and the current I/O permission |
bit map must allow access to the I/O ports used for power management. |
functions 00h-03h are not available from protected mode |
on connection, an APM v1.1 or v1.2 BIOS switches to APM v1.0 |
compatibility mode until it is informed that the user supports a |
newer version of APM (see AX=530Eh) |
SeeAlso: AX=5301h,AX=5302h,AX=5304h |
--------p-155304----------------------------- |
INT 15 - Advanced Power Management v1.0+ - DISCONNECT INTERFACE |
AX = 5304h |
BX = device ID of system BIOS (0000h) |
Return: CF clear if successful |
CF set on error |
AH = error code (03h,09h) (see #00473) |
SeeAlso: AX=5301h,AX=5302h,AX=5303h |
--------p-155305----------------------------- |
INT 15 - Advanced Power Management v1.0+ - CPU IDLE |
AX = 5305h |
Return: CF clear if successful (after system leaves idle state) |
CF set on error |
AH = error code (03h,0Bh) (see #00473) |
Notes: call when the system is idle and should be suspended until the next |
system event or interrupt |
should not be called from within a hardware interrupt handler to avoid |
reentrance problems |
if an interrupt causes the system to resume normal processing, the |
interrupt may or may not have been handled when the BIOS returns |
from this call; thus, the caller should allow interrupts on return |
interrupt handlers may not retain control if the BIOS allows |
interrupts while in idle mode even if they are able to determine |
that they were called from idle mode |
the caller should issue this call continuously in a loop until it needs |
to perform some processing of its own |
SeeAlso: AX=1000h,AX=5306h,INT 2F/AX=1680h |
--------p-155306----------------------------- |
INT 15 - Advanced Power Management v1.0+ - CPU BUSY |
AX = 5306h |
Return: CF clear if successful |
CF set on error |
AH = error code (03h,0Bh) (see #00473) |
Notes: called to ensure that the system runs at full speed even on systems |
where the BIOS is unable to recognize increased activity (especially |
if interrupts are hooked by other programs and not chained to the |
BIOS) |
this call may be made even when the system is already running at full |
speed, but it will create unnecessary overhead |
should not be called from within a hardware interrupt handler to avoid |
reentrance problems |
SeeAlso: AX=5305h |
--------p-155307----------------------------- |
INT 15 - Advanced Power Management v1.0+ - SET POWER STATE |
AX = 5307h |
BX = device ID (see #00474) |
CX = system state ID (see #00475) |
Return: CF clear if successful |
CF set on error |
AH = error code (01h,03h,09h,0Ah,0Bh,60h) (see #00473) |
Note: should not be called from within a hardware interrupt handler to avoid |
reentrance problems |
SeeAlso: AX=530Ch |
(Table 00474) |
Values for APM device IDs: |
0000h system BIOS |
0001h all devices for which the system BIOS manages power |
01xxh display (01FFh for all attached display devices) |
02xxh secondary storage (02FFh for all attached secondary storage devices) |
03xxh parallel ports (03FFh for all attached parallel ports) |
04xxh serial ports (04FFh for all attached serial ports) |
---APM v1.1+ --- |
05xxh network adapters (05FFh for all attached network adapters) |
06xxh PCMCIA sockets (06FFh for all) |
0700h-7FFFh reserved |
80xxh system battery devices (APM v1.2) |
8100h-DFFFh reserved |
Exxxh OEM-defined power device IDs |
F000h-FFFFh reserved |
(Table 00475) |
Values for system state ID: |
0000h ready (not supported for device ID 0001h) |
0001h stand-by |
0002h suspend |
0003h off (not supported for device ID 0001h in APM v1.0) |
---APM v1.1--- |
0004h last request processing notification (only for device ID 0001h) |
0005h last request rejected (only for device ID 0001h) |
0006h-001Fh reserved system states |
0020h-003Fh OEM-defined system states |
0040h-007Fh OEM-defined device states |
0080h-FFFFh reserved device states |
--------p-155307CX0001----------------------- |
INT 15 - Advanced Power Management v1.0+ - SYSTEM STAND-BY |
AX = 5307h |
CX = 0001h |
BX = 0001h (device ID for all power-managed devices) |
Return: CF clear |
Notes: puts the entire system into stand-by mode; normally called in response |
to a System Stand-by Request notification after any necessary |
processing, but may also be invoked at the caller's discretion |
should not be called from within a hardware interrupt handler to avoid |
reentrance problems |
the stand-by state is typically exited on an interrupt |
SeeAlso: AX=4280h,AX=5307h/CX=0002h"SUSPEND",AX=5307h/CX=0003h,AX=530Bh |
--------p-155307CX0002----------------------- |
INT 15 - Advanced Power Management v1.0+ - SUSPEND SYSTEM |
AX = 5307h |
CX = 0002h |
BX = 0001h (device ID for all power-managed devices) |
Return: after system is resumed |
CF clear |
Notes: puts the entire system into a low-power suspended state; normally |
called in response to a Suspend System Request notification after |
any necessary processing, but may also be invoked at the caller's |
discretion |
should not be called from within a hardware interrupt handler to avoid |
reentrance problems |
the caller may need to update its date and time values because the |
system could have been suspended for a long period of time |
SeeAlso: AX=5307h/CX=0001h"STAND-BY",AX=530Bh |
--------p-155307CX0003----------------------- |
INT 15 - Advanced Power Management v1.2 - TURN OFF SYSTEM |
AX = 5307h |
CX = 0003h |
BX = 0001h (device ID for all power-managed devices) |
Return: after system is resumed |
CF clear |
Notes: if supported by the system's power supply, turns off the system power |
SeeAlso: AX=5307h/CX=0001h"STAND-BY",AX=530Bh |
--------p-155308----------------------------- |
INT 15 - Advanced Power Management v1.0+ - ENABLE/DISABLE POWER MANAGEMENT |
AX = 5308h |
BX = device ID for all devices power-managed by APM |
0001h (APM v1.1+) |
FFFFh (APM v1.0) |
CX = new state |
0000h disabled |
0001h enabled |
Return: CF clear if successful |
CF set on error |
AH = error code (01h,03h,09h,0Ah,0Bh) (see #00473) |
Notes: when power management is disabled, the system BIOS will not |
automatically power down devices, enter stand-by or suspended mode, |
or perform any power-saving actions in response to AX=5305h calls |
should not be called from within a hardware interrupt handler to avoid |
reentrance problems |
the APM BIOS should never be both disabled and disengaged at the same |
time |
SeeAlso: AX=5309h,AX=530Dh,AX=530Fh |
--------p-155309----------------------------- |
INT 15 - Advanced Power Management v1.0+ - RESTORE POWER-ON DEFAULTS |
AX = 5309h |
BX = device ID for all devices power-managed by APM |
0001h (APM v1.1) |
FFFFh (APM v1.0) |
Return: CF clear if successful |
CF set on error |
AH = error code (03h,09h,0Bh) (see #00473) |
Note: should not be called from within a hardware interrupt handler to avoid |
reentrance problems |
SeeAlso: AX=5308h |
--------p-15530A----------------------------- |
INT 15 - Advanced Power Management v1.0+ - GET POWER STATUS |
AX = 530Ah |
BX = device ID |
0001h all devices power-managed by APM |
80xxh specific battery unit number XXh (01h-FFh) (APM v1.2) |
Return: CF clear if successful |
BH = AC line status |
00h off-line |
01h on-line |
02h on backup power (APM v1.1) |
FFh unknown |
other reserved |
BL = battery status (see #00476) |
CH = battery flag (APM v1.1+) (see #00477) |
CL = remaining battery life, percentage |
00h-64h (0-100) percentage of full charge |
FFh unknown |
DX = remaining battery life, time (APM v1.1) (see #00478) |
---if specific battery unit specified--- |
SI = number of battery units currently installed |
CF set on error |
AH = error code (09h,0Ah) (see #00473) |
Notes: should not be called from within a hardware interrupt handler to avoid |
reentrance problems |
supported in real mode (INT 15) and both 16-bit and 32-bit protected |
mode |
(Table 00476) |
Values for APM v1.0+ battery status: |
00h high |
01h low |
02h critical |
03h charging |
FFh unknown |
other reserved |
SeeAlso: #00477,#00478 |
Bitfields for APM v1.1+ battery flag: |
Bit(s) Description (Table 00477) |
0 high |
1 low |
2 critical |
3 charging |
4 selected battery not present (APM v1.2) |
5-6 reserved (0) |
7 no system battery |
Note: all bits set (FFh) if unknown |
SeeAlso: #00476,#00478 |
Bitfields for APM v1.1+ remaining battery life: |
Bit(s) Description (Table 00478) |
15 time units: 0=seconds, 1=minutes |
14-0 battery life in minutes or seconds |
Note: all bits set (FFFFh) if unknown |
SeeAlso: #00476,#00477 |
--------p-15530B----------------------------- |
INT 15 - Advanced Power Management v1.0+ - GET POWER MANAGEMENT EVENT |
AX = 530Bh |
Return: CF clear if successful |
BX = event code (see #00479) |
CX = event information (APM v1.2) if BX=0003h or BX=0004h |
bit 0: PCMCIA socket was powered down in suspend state |
CF set on error |
AH = error code (03h,0Bh,80h) (see #00473) |
Notes: although power management events are often asynchronous, notification |
will not be made until polled via this call to permit software to |
only receive event notification when it is prepared to process |
power management events; since these events are not very time- |
critical, it should be sufficient to poll once or twice per second |
the critical resume notification is made after the system resumes |
from an emergency suspension; normally, the system BIOS only notifies |
its partner that it wishes to suspend and relies on the partner to |
actually request the suspension, but no notification is made on an |
emergency suspension |
should not be called from within a hardware interrupt handler to avoid |
reentrance problems |
SeeAlso: AX=5307h,AX=5307h/CX=0001h"STAND-BY",AX=5307h/CX=0002h"SUSPEND" |
(Table 00479) |
Values for APM event code: |
0001h system stand-by request |
0002h system suspend request |
0003h normal resume system notification |
0004h critical resume system notification |
0005h battery low notification |
---APM v1.1--- |
0006h power status change notification |
0007h update time notification |
0008h critical system suspend notification |
0009h user system standby request notification |
000Ah user system suspend request notification |
000Bh system standby resume notification |
---APM v1.2--- |
000Ch capabilities change notification (see AX=5310h) |
------ |
000Dh-00FFh reserved system events |
01xxh reserved device events |
02xxh OEM-defined APM events |
0300h-FFFFh reserved |
--------p-15530C----------------------------- |
INT 15 - Advanced Power Management v1.1+ - GET POWER STATE |
AX = 530Ch |
BX = device ID (see #00474) |
Return: CF clear if successful |
CX = system state ID (see #00475) |
CF set on error |
AH = error code (01h,09h) (see #00473) |
SeeAlso: AX=5307h |
--------p-15530D----------------------------- |
INT 15 - Advanced Power Management v1.1+ - EN/DISABLE DEVICE POWER MANAGEMENT |
AX = 530Dh |
BX = device ID (see #00474) |
CX = function |
0000h disable power management |
0001h enable power management |
Return: CF clear if successful |
CF set on error |
AH = error code (01h,03h,09h,0Ah,0Bh) (see #00473) |
Desc: specify whether automatic power management should be active for a |
given device |
SeeAlso: AX=5308h,AX=530Fh |
--------p-15530E----------------------------- |
INT 15 - Advanced Power Management v1.1+ - DRIVER VERSION |
AX = 530Eh |
BX = device ID of system BIOS (0000h) |
CH = APM driver major version (BCD) |
CL = APM driver minor version (BCD) (02h for APM v1.2) |
Return: CF clear if successful |
AH = APM connection major version (BCD) |
AL = APM connection minor version (BCD) |
CF set on error |
AH = error code (03h,09h,0Bh) (see #00473) |
SeeAlso: AX=5300h,AX=5303h |
--------p-15530F----------------------------- |
INT 15 - Advanced Power Management v1.1+ - ENGAGE/DISENGAGE POWER MANAGEMENT |
AX = 530Fh |
BX = device ID (see #00474) |
CX = function |
0000h disengage power management |
0001h engage power management |
Return: CF clear if successful |
CF set on error |
AH = error code (01h,09h) (see #00473) |
Notes: unlike AX=5308h, this call does not affect the functioning of the APM |
BIOS |
when cooperative power management is disengaged, the APM BIOS performs |
automatic power management of the system or device |
SeeAlso: AX=5308h,AX=530Dh |
--------p-155310----------------------------- |
INT 15 - Advanced Power Management v1.2 - GET CAPABILITIES |
AX = 5310h |
BX = device ID (see #00474) |
0000h (APM BIOS) |
other reserved |
Return: CF clear if successful |
BL = number of battery units supported (00h if no system batteries) |
CX = capabilities flags (see #00480) |
CF set on error |
AH = error code (01h,09h,86h) (see #00473) |
Notes: this function is supported via the INT 15, 16-bit protected mode, and |
32-bit protected mode interfaces; it does not require that a |
connection be established prior to use |
this function will return the capabilities currently in effect, not |
any new settings which have been made but do not take effect until |
a system restart |
SeeAlso: AX=5300h,AX=530Fh,AX=5311h,AX=5312h,AX=5313h |
Bitfields for APM v1.2 capabilities flags: |
Bit(s) Description (Table 00480) |
15-8 reserved |
7 PCMCIA Ring Indicator will wake up system from suspend mode |
6 PCMCIA Ring Indicator will wake up system from standby mode |
5 Resume on Ring Indicator will wake up system from suspend mode |
4 Resume on Ring Indicator will wake up system from standby mode |
3 resume timer will wake up system from suspend mode |
2 resume timer will wake up system from standby mode |
1 can enter global suspend state |
0 can enter global standby state |
--------p-155311----------------------------- |
INT 15 - Advanced Power Management v1.2 - GET/SET/DISABLE RESUME TIMER |
AX = 5311h |
BX = device ID (see #00474) |
0000h (APM BIOS) |
other reserved |
CL = function |
00h disable Resume Timer |
01h get Resume Timer |
02h set Resume Timer |
CH = resume time, seconds (BCD) |
DL = resume time, minutes (BCD) |
DH = resume time, hours (BCD) |
SI = resume date (BCD), high byte = month, low byte = day |
DI = resume date, year (BCD) |
Return: CF clear if successful |
---if getting timer--- |
CH = resume time, seconds (BCD) |
DL = resume time, minutes (BCD) |
DH = resume time, hours (BCD) |
SI = resume date (BCD), high byte = month, low byte = day |
DI = resume date, year (BCD) |
CF set on error |
AH = error code (03h,09h,0Ah,0Bh,0Ch,0Dh,86h) (see #00473) |
Notes: this function is supported via the INT 15, 16-bit protected mode, and |
32-bit protected mode interfaces |
SeeAlso: AX=5300h,AX=5310h,AX=5312h,AX=5313h |
--------p-155312----------------------------- |
INT 15 - Advanced Power Management v1.2 - ENABLE/DISABLE RESUME ON RING |
AX = 5312h |
BX = device ID (see #00474) |
0000h (APM BIOS) |
other reserved |
CL = function |
00h disable Resume on Ring Indicator |
01h enable Resume on Ring Indicator |
02h get Resume on Ring Indicator status |
Return: CF clear if successful |
CX = resume status (0000h disabled, 0001h enabled) |
CF set on error |
AH = error code (03h,09h,0Ah,0Bh,0Ch,86h) (see #00473) |
Notes: this function is supported via the INT 15, 16-bit protected mode, and |
32-bit protected mode interfaces |
SeeAlso: AX=5300h,AX=5310h,AX=5311h,AX=5313h |
--------p-155313----------------------------- |
INT 15 - Advanced Power Management v1.2 - ENABLE/DISABLE TIMER-BASED REQUESTS |
AX = 5313h |
BX = device ID (see #00474) |
0000h (APM BIOS) |
other reserved |
CL = function |
00h disable timer-based requests |
01h enable timer-based requests |
02h get timer-based requests status |
Return: CF clear if successful |
CX = timer-based requests status (0000h disabled, 0001h enabled) |
CF set on error |
AH = error code (03h,09h,0Ah,0Bh,86h) (see #00473) |
Notes: this function is supported via the INT 15, 16-bit protected mode, and |
32-bit protected mode interfaces |
some BIOSes set AH on return even when successful |
SeeAlso: AX=5300h,AX=5310h,AX=5311h,AX=5312h |
/kernel/branches/Kolibri-F/docs/. |
---|
Property changes: |
Added: svn:ignore |
+*.mnt |
+lang.inc |
+*.bat |
+out.txt |
+scin* |
+*.obj |