September 2017
Beginner to intermediate
290 pages
6h 58m
English
Having told the compiler what output format we are expecting, we need to declare the sections. Since we are writing portable code, we will use two macros to properly declare code and data sections for each of the formats mentioned earlier. As we are used to seeing a data section after the code section (at least in this book, as the order may vary), we will declare a macro responsible for the proper declaration of the beginning of the code section first:
macro begin_code_section{ if ACTIVE_TARGET = TARGET_W32_DLL section '.text' code readable executable ; This is not obligatory, but nice to have - the DllMain procedure DllMain: xor eax, eax inc eax ret 4 * 3 else if ACTIVE_TARGET = TARGET_W32_OBJ ...Read now
Unlock full access