This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| en:multiasm:exercisesbook:pc:sut:scenarios:win1 [2026/05/22 14:04] – created ktokarz | en:multiasm:exercisesbook:pc:sut:scenarios:win1 [2026/05/22 15:14] (current) – ktokarz | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Scenario x64_1: Hello World! ====== | ====== Scenario x64_1: Hello World! ====== | ||
| + | ** Prerequisites **\\ | ||
| + | Be familiar with the " | ||
| + | |||
| + | ** Scenario **\\ | ||
| + | First, a Hello World type program written purely in assembler. | ||
| + | |||
| + | ** Result **\\ | ||
| + | The "Hello World!" | ||
| + | |||
| + | ** Start **\\ | ||
| + | Create a new assembler source file. | ||
| + | |||
| + | ** Step 1 **\\ | ||
| It will not be very surprising that the first code example will be the "Hello world!" | It will not be very surprising that the first code example will be the "Hello world!" | ||
| * GetStdHandle - returns the handle of the console window, which is the main window of our application. | * GetStdHandle - returns the handle of the console window, which is the main window of our application. | ||
| * WriteConsole - displays the text in the console. | * WriteConsole - displays the text in the console. | ||
| * ExitProcess - returns control to the operating system. | * ExitProcess - returns control to the operating system. | ||
| - | The functions are implemented in a library file kernel32.lib, | + | The functions are implemented in a library file, kernel32.lib, |
| + | <note info> | ||
| + | Windows library functions can be used in a dynamic way by using dynamically linked libraries (DLLs). We will show this method in other scenarios. | ||
| + | </ | ||
| The details of each statement of the program are explained in comments. | The details of each statement of the program are explained in comments. | ||
| <code asm> | <code asm> | ||
| Line 49: | Line 65: | ||
| END ; end of source file</ | END ; end of source file</ | ||
| + | |||
| + | ** Step 2 **\\ | ||
| + | Assemble the program and observe results. | ||
| + | |||
| + | ** Result validation **\\ | ||
| + | The program should print the "Hello World!" | ||
| + | |||
| + | ** If it does not assemble? **\\ | ||
| + | Observe the messages passed by the assembler and linker programs. Refer to the documentation and instruction set. Be sure that all library files are accessible in the environment. | ||