No ACL setup yet! Denying access to everyone.
en:edu:zmitac:s1:apl:lab:lab2
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:edu:zmitac:s1:apl:lab:lab2 [2024/11/25 12:07] – [Biblioteka asemblerowa dll] ktokarz | en:edu:zmitac:s1:apl:lab:lab2 [2024/11/26 13:26] (current) – [Laboratory2] ktokarz | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| + | ===== Laboratory | ||
| + | Configuration of the Visual Studio Community 2019 for dll libraries written in MASM. | ||
| ===== Creating the project with dll library written in assembler ===== | ===== Creating the project with dll library written in assembler ===== | ||
| Line 168: | Line 170: | ||
| ... | ... | ||
| </ | </ | ||
| - | ==== Odwołanie do biblioteki | + | ==== Calling functions in dll from C++ program |
| - | Aby program | + | In order for a program |
| - | - Przygotować typ funkcji zgodny z jej późniejszym wywołaniem, | + | - Prepare the type of the function that is compatible with its later call, |
| - | - Załadować bibliotekę funkcją | + | - Load the library using the LoadLibrary |
| - | - Odczytać aktualny adres interesującej nas funkcji wywołując | + | - Read the current address of the function of interest to us by calling |
| - | - Użyć funkcji odwołując się do jej adresu. | + | - Use the function by referring to its address. |
| - | Przykładowy kod mógłby wyglądać tak: | + | The sample code could look like this: |
| < | < | ||
| Line 191: | Line 193: | ||
| </ | </ | ||
| - | Użycie funkcji z parametrami wymaga nieco zmodyfikowanych definicji typu. Należy także zwrócić uwagę na typ wartości zwracanej przez funkcję. Pamiętać należy, że w przypadku liczb zmiennoprzecinkowych, | + | Using a function with parameters requires slightly modified type definitions. You should also pay attention to the type of the value returned by the function. Remember that in the case of floating-point numbers, the size of the XMM0, XMM1 registers is 64 bits. This corresponds |
| < | < | ||
| Line 200: | Line 202: | ||
| </ | </ | ||
| - | ==== Zadanie do zrealizowania w ramach laboratorium | + | ==== Task to be completed in the laboratory |
| - | Należy napisać bibliotekę | + | You should write a DLL in assembler and a C++ program that demonstrates how the DLL works.\\ |
| - | **Biblioteka | + | **The DLL** should provide functions that perform and return the result of basic arithmetic calculations |
| - | **Program w C++** ma wywoływać wszystkie funkcje przekazując przykładowe wartości parametrów i wyświetlić wyniki na ekranie. Nie jest wymagany interfejs użytkownika | + | **The C++ program** should call all functions, pass sample parameter values, and display the results on the screen. No input user interface is required |
| + | |||
| + | ==== For the report ==== | ||
| + | Include the code of your C++ file and assembler source file WITH COMMENTS. Also, add a screenshot of the window with the results displayed. | ||
en/edu/zmitac/s1/apl/lab/lab2.1732532820.txt.gz · Last modified: by ktokarz
