flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 07 May 2024, 22:11
You can use du instead of dw.
Code: _message du 'Hello World',13,10,0 |
|||
![]() |
|
bitRAKE 08 May 2024, 00:29
|
|||
![]() |
|
MatQuasar 08 May 2024, 01:53
revolution wrote: You can use du instead of dw. Nice, I thought it required include file from "encodings". Just now I tested, it doesn't need one. Thank you for the suggestion. |
|||
![]() |
|
MatQuasar 08 May 2024, 01:55
bitRAKE wrote: Looks familiar ... Yes! Actually I referred to your this particular example before doing my own similar one. I use the offset in EFI_SYSTEM_TABLE and EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL directly, skipping the need of include files. ![]() |
|||
![]() |
|
revolution 08 May 2024, 02:03
By declaring constants, and expanding the rsp value, this code can be made more reader friendly.
Code: format PE64 EFI DLL on 'nul' section '.code' code readable executable EFI_SYSTEM_TABLE.ConOut = 0x40 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.OutputString = 0x08 entry $ sub rsp, 8 * 5 mov rcx, qword[rdx + EFI_SYSTEM_TABLE.ConOut] lea rdx, [_message] call qword[rcx + EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.OutputString] add rsp, 8 * 5 ret _message du 'Hello World',13,10,0 |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.