This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| en:multiasm:exercisesbook:pc:sut:scenarios:win2 [2026/05/22 14:05] – created ktokarz | en:multiasm:exercisesbook:pc:sut:scenarios:win2 [2026/05/22 15:31] (current) – ktokarz | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Scenario x64_2: Creating static libraries ====== | + | ====== Scenario x64_2: Creating static libraries. Integer to text conversion function. |
| + | |||
| + | ** Prerequisites **\\ | ||
| + | The software environment is installed and configured. | ||
| + | |||
| + | ** Scenario **\\ | ||
| + | Create the conversion library linked in a static way. Write the main program to call the library function. Display the result in a console. | ||
| + | |||
| + | ** Result **\\ | ||
| + | The integer number converted to its string representation is displayed in a console. | ||
| + | |||
| + | ** Start **\\ | ||
| + | Create the library source file. | ||
| + | |||
| + | ** Step 1 **\\ | ||
| To create the static library, the assembler module shouldn' | To create the static library, the assembler module shouldn' | ||
| The first step is to assemble the source file with MASM. | The first step is to assemble the source file with MASM. | ||
| Line 82: | Line 96: | ||
| </ | </ | ||
| + | ** Step 2 **\\ | ||
| This library can be imported into the assembler program or a program written in another programming language. Assembly program can look as follows: | This library can be imported into the assembler program or a program written in another programming language. Assembly program can look as follows: | ||
| <code asm> | <code asm> | ||
| Line 141: | Line 156: | ||
| </ | </ | ||
| + | ** Result validation **\\ | ||
| + | The code should print the converted integer number as text in a console window. | ||
| + | <note tip> | ||
| + | Fun fact. The number chosen for the example is not random. It is the fifth perfect number. Such a number is equal to the sum of its positive proper divisors. | ||
| + | </ | ||
| - | + | ** If it does not assemble? **\\ | |
| - | + | Observe the messages passed by the assembler and linker programs. Refer to the documentation and instruction set. Make sure that all source files are available to MASM, and the resulting object and library files are available to the linker program. | |