Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Using NASM / windows x86 64bit help
« Last post by hockey97 on August 26, 2024, 06:09:17 PM »
What can I do to use windows 32 api for 64bit programs?

I want to know how to link the user32.dll and kernel32.dll properly and what else is needed to support using
windows 32 api to make a gui  window?

I am using nasm and gcc compiler

Thanks in advance.
12
Using NASM / Debugging macroses
« Last post by Korybut on August 13, 2024, 10:27:10 AM »
Hello!

I am implementing several macroses right now and debugging them is kinda painful since I run debugger for compiled code and then verify if my macroses work correctly. IMO the great option is to be able to see the listing with already executed macroses, howerer '-l' option produces different output which is of no particular use unfortunately.

Many thanks in advance!
13
5 years ago...
The question is: Why M$ never released MS-DOS 6 or Windows 3.1 sources? (and never will!)

Just checked that GitHub again and found they now have DOS 4.0 and DOS 4.0-ozzie (I don't know what the ozzie version even is). They seemed to skip all of DOS 3.x versions though.
14
Programming with NASM / Re: How do I write an EFI application in NASM?
« Last post by ben321 on August 03, 2024, 08:28:13 PM »
A small example for i386 mode, assuming by "application" you mean "bootloader":
Change main to _start if you want to avoid -e option with ld.

PS: EFI_BOOT_SERVICES.Print() and EFI_BOOT_SERVICES.ReadKeyStroke() don't exist. Print() is a wrapper function, defined in a external library, to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.OutputString() and ReadKeyStroke() is a function on EFI_SIMPLE_TEXT_INPUT_PROTOCOL. They are available at interfaces pointed by ConIn and ConOut, at EFI_BOOT_SERVICES.

I strongly recommend to read UEFI specification (download, at least, version 2.7 - most BIOSes support this one). There you can find the entire documentation of how EFI works and how to use it in i386, x86-64, ARM, and other platforms.

The link you provided to the UEFI specifications doesn't work. Please fix your link.
15
Using NASM / Re: Call abs_addr-$
« Last post by suncowiam on July 20, 2024, 04:45:03 AM »
I found a possible solution:

SECTION .text
  call 60000h-next_addr-$$
next_addr:
  mov rax, 1

When compiled, the relative offset will equate to 60000h.  Does anyone else have any better solutions?

Thanks
16
Using NASM / Call abs_addr-$
« Last post by suncowiam on July 20, 2024, 12:22:24 AM »
Is there an argument to calculate the target address - next inst to help calculate relative addresses?

I need to compile a specific relative address in a call or jmp instruction.
17
Programming with NASM / Re: Printing number to screen without using extern
« Last post by alCoPaUL on June 09, 2024, 05:19:43 PM »
Use JWasm coz it has a directive called option DllExport <'insert name of the dll'> and you won't need using .lib files (and i assume that is your reason why you bluntly asked about not using externs) when making the .exe..

or maybe some assembler (NASM/TASM/MASM/whateverASM) has a funky way of putting whatever in the source code and it won't need cross linking to the library on the commandline or in the source code itself ("includelib\whatever.lib")

coz once you found out a way of not using a .lib file, your source code could literally be able to do just about anything as if it is assembled and linked..

EDIT:

i saw some reference to DLLIMPORT with NASM and GoLink and i saw that you still need the .dll files for linking.. for JWasm, i just skimmed the source code snippet containing the DLLIMPORT option in the author's GitHub and didn't check if its accompanied linker still needs to refer to the .dll files @ commandline or source..

what i'm getting at is the source code already has everything about the references to the DLL functions without needing to do symbolic link any external files like .libs and .dlls and you just go do a "link whatever.obj /subsystem:console /entry:meme" without any more switches..
18
Programming with NASM / Re: Printing number to screen without using extern
« Last post by avcaballero on June 09, 2024, 04:19:01 PM »
Hello, here an example of what you want.
19
Looping each digit it is ... I know loops, and I know how to ascii and print normal strings to screen. Android is a bit annoying
20
how do I convert ?
How do you do by hand?

You have, at least, try instead asking someone to do it for you...
Pages: 1 [2] 3 4 ... 10