- •1)Features of the Assembler. The main programs for work with the Assembler.
- •2) Data presentation in the computer. Binary and hexadecimal notations. Bits, bytes and words.
- •3)Main unprivileged commands. Data transfer.
- •4) Ways of addressing.
- •5) Dynamic libraries. Principles of using dynamic libraries.
- •6) Dynamic library structure.
- •7) File systems. Characteristics of files.
- •8) Numbers with a floating comma. Data types of fpu.
- •9) Work with the keyboard. The data buffer bios. Using ms dos function.
- •10) Base arithmetic fpu.
- •11)Comparison commands of fpu
- •12)Transcendental operations of fpu
- •Constants of fpu
- •16. Object modules.
- •17. Directive extern.
- •18) Directives call and invoke.
- •19) Use of libraries. Directive includelib.
- •20) Placement of data in external modules. Translation by tasm means.
- •21) Translation by masm means.
- •22) Directives of memory distribution. Pseudocommands of variable definitions.
- •23. Structures in the assembler
- •24. Program organization. Segments
- •25. Models of memory and the simplified directives of segment definition. Order of loading segments.
- •26. Procedures in the assembler
- •27. Programming bases in the Windows operating system
- •28. Call of the api functions from the program written on the assembler
- •29. Structure of the program written for Windows.
- •30. The general principles of creation of window applications in the Assembler
- •31. Directives of management of the program counter.
- •32. Global declarations.
- •33. Conditional assembling. Expressions
- •34. Attributes of the file. Temporary characteristics. File length.
- •35. File fat32 system. Catalogue structure. Fat table.
- •36. File ntfs system. Principles of construction.
- •37. Attributes of the records mft. Catalogues in ntfs.
- •38. Macrodefinitions. Blocks of repetitions. Macrooperators.
- •39. Management of files. Management of listing. Comments.
- •40) Virtual drivers and virtual Windows engines.
- •41) Modes of the user and kernel.
- •42) Types of Windows drivers.
- •44) Graphic video modes.
- •45) Work with a mouse.
- •46. System timer.
- •47. Services. Dispatcher of management of services.
- •49. Structure of the program which is writing down the driver in the system register.
- •50. Structure of the driver of the kernel mode.
- •1.Features of the Assembler. The main programs for work with the Assembler.
39. Management of files. Management of listing. Comments.
File Management
In the old DOS world, files would be manipulated using interrupts. In Windows, we
use Windows functions in order to access files. These are the 4 functions we can use:
CreateFile – Creates or opens a file, and returns its handle.
ReadFile – Reads data from a file.
WriteFile – You guessed it! Writes data to a file.
CloseHandle – Closes the handle that you obtained using CreateFile.
Management of listing
Typically, assemblers, in addition to creating an object file, provide the ability to create a program listing (TASM / L - for TASM, ml / Fl - for MASM). Listing - a file containing the text of the assembler program, the code is assembled, each command, a list of certain labels, cross-references, segments and groups. The format of the listing file is different for different assemblers and directives control the format of the file is also very different, but some of the most comprehensive guidelines yet supported by all three assemblers discussed in this book.
TITLE text - defines the header listing. The title appears in the beginning of each page;
SUBTTL text - defines a subtitle listing. The subtitle appears on the next line after the title;
PAGE height, width - sets the size of the listing pages (10-255 height, width 59-255). PAGE directive without arguments, starts a new page, the directive PAGE + begins a new section, and page numbering is from the beginning;
NAME text - specifies the name of the module program. If NAME is not specified, the name used in the first 6 characters from the TITLE; if no NAME, nor TITLE, for the name of the file name is taken;
. XLIST - cancel the issuance of the listing;
. LIST - to resolve the issue of listing;
. SALL - prohibit the listing of macro definitions;
. SFCOND - prohibit the listing not assembled conditional blocks;
. LFCOND - permit listing not assembled conditional blocks;
. TFCOND - change the listing of conditional blocks to the opposite;
. CREF - to allow cross-reference listing;
. XCREF - prohibit the listing of cross-references.
Comments
Besides the usual comments which start with, (comma) and ending at the end of a string, the large blocks of comments describing specific directive COMMENT.
comment @
any text
@
Operand for COMMENT - any character that will be the end of the comment. The entire section of the text, until the next occurrence of that character, the assembler is completely ignored.
40) Virtual drivers and virtual Windows engines.
Virtual drivers are used primarily for hardware virtualization, ie, to provide simultaneously performed tasks sharing capabilities of the computer. Measuring and control equipment that connects to a computer in order to create an automated installation is unlikely to be used in a multi-tasking, but its use for the control of virtual drivers can significantly reduce software costs and to reduce the response time. Consider the example of a virtual device driver, the service interruption from the interface board timer counter. It is obvious that the composition of such driver shall enter an interrupt handler from the board. The functions of the processor determines the programmer, in the simplest case, the handler can just read the data from the output of the counter register and the interrupt mask. However, the application is not the completion of the measurements, is more natural to arrange a call from an interrupt handler driver of a function application, which can be passed to the read data. In fact, this function will play the role of the interrupt handler applications, but it will not be called by the interrupt handler and driver. Virtual Engines in Windows When Windows is run in verbose mode, the system creates a virtual engine, in which all applications run Windows. The system virtual engine is running in protected mode. For each DOS session started again creates a separate virtual engine running in a virtual processor mode V86. Each virtual engine has a virtual processor register set and its own address space. System virtual engine also has a table LDT, wherein only one. This means that all Windows applications run in the same address space. This fact facilitates the exchange of data between applications, because it is possible to create a global memory block that is available to any application, but greatly reduces the security of Windows applications from each other. And in fact, the majority of errors in applications for its manifestation lead to having to restart the entire system.
The memory structure in the virtual engine MS-DOS
