
- •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.
29. Structure of the program written for Windows.
Despite the fact that Windows 95 and Windows NT seem to be more complex operating systems compared with DOS, to program in assembly language for them much easier. On the one hand, Windows-application runs in 32-bit mode (we do not consider Windows 3.11 and older who were working in 16-bit mode) memory model flat, so that the programmer gets all the benefits mentioned in the previous head and on the other hand - we no longer need to learn in detail how the different devices of the computer program is low. In the current operating environment applications use only system calls, the number of which is greater than 2000 (about 2200 for Windows 95 and 2434 for Windows NT). All Windows-based applications using a special format of executable files - the format of PE (Portable Executable). These files start as usual EXE-files the old model (also known as MZ in the first two symbols of the title), and if such a file is run from DOS, then it will run and display the error message (text message depends on the compiler), while as Windows will notice that after the usual MZ-header file is PE-header, and launch the application. UTB will only mean that the program will be required to compile other parameters on the command line.
30. The general principles of creation of window applications in the Assembler
In order to display any window, the program usually has to first describe its appearance and all of the properties, that is what is called a window class. MessageBox - it's a small window with the specified text message and one or more buttons. In our example, the message will be the traditional «Hello world!», And the button will be only one - OK.
; winhello.asm
; Graphic win32-prilozhenie
; A dialog box appears with the text type mesagebox "Hello world!"
include def32.inc
include kernel32.inc
include user32.inc
.386
.model flat
.const
; window title
hello_title db "First win32 GUI program",0
; message
hello_message db "Hello world!",0
.code
_start:
push MB_ICONINFORMATION ; window style
push offset hello_title ; Address line with the title
push offset hello_message ; Address line with the message
push 0 ; ID of parent
call MessageBox
push 0 ; exit code
call ExitProcess ; completion of the program
end _start
we need to add to the file def32.inc line:
; from winuser.h
MB_ICONINFORMATION equ 40h
and create a new file, user32.inc, which will include determining the functions of user32.dll - library, which includes all the basic functions that are responsible for window interface:
; user32.inc
; include file with definitions of functions from user32.dll
;
ifdef _TASM_
includelib import32.lib
; the names of the functions
extrn MessageBoxA:near
; assignment to facilitate readability
MessageBox equ MessageBoxA
else
includelib user32.lib
; true names used functions
extrn __imp__MessageBoxA@16:dword
; assignment to facilitate readability
MessageBox equ __imp__MessageBoxA@16
Now you can compile the program the same way as we did winurl.asm, and run - you will see a small window with our message and an OK button, which will disappear after you press the button. If winhello.asm compiled as a console application, nothing will change, the text box with the name of the program will be open as long as our message box is closed.