A 64-bit hello world program> helloworld64.asm

83 views
Skip to first unread message

David Szafranski

unread,
Nov 14, 2024, 9:36:10 PM11/14/24
to xblite
Hi All,

Attached is a simple console program converted to 64-bit, helloworld64.asm.

If you have Windows 64-bit OS, then give it a try.

Follow the instructions on how to build it or run the bat file (change .txt to .bat) from a command window.

ciao for now,
D.


helloworld64.asm
helloworld64.txt

gentsky

unread,
Nov 15, 2024, 2:29:01 PM11/15/24
to xblite
Hi D.

This worked fine for me.

I am wondering how golink finds the correct 64 bit version of kernel32.dll since both the 32 and 64 bit versions have the same name.

Do you know?

Alan

David Szafranski

unread,
Nov 15, 2024, 10:38:36 PM11/15/24
to xblite
 Hi Alan,

From the goasm website, the main differences between 32-bit and 64-bit executables:

  • The PE file format for Win64 files is called "PE+".
  • The size of optional header field in the COFF header is 0F0h in a PE+ file and 0E0h in a PE file.
  • The "machine type" in the COFF header is not 14Ch (as it is for x86 processors), but is 8664h (for the AMD64 processor).
  • The "magic number" at the beginning of the optional header is 20Bh instead of 10Bh.
  • The "majorsubsystemversion" in a PE+ file is 5 instead of 4 in a PE file.
I would think that  a 64-bit DLL would have a similar header field.

David

M M

unread,
Nov 19, 2024, 6:09:17 PM11/19/24
to xbl...@googlegroups.com
Hello,
Just an idea mind, but what if the XBlite compiler were to output GNU/GCC compatible assembly? By leveraging the GNU toolkit as the assembler and linker, this could allow XBlite to target other systems. There is probably a nuance to this which might not make this feasible, but its just an idea.

Michael


From: xbl...@googlegroups.com <xbl...@googlegroups.com> on behalf of David Szafranski <david.sz...@gmail.com>
Sent: 15 November 2024 02:36
To: xblite <xbl...@googlegroups.com>
Subject: [xblite] A 64-bit hello world program> helloworld64.asm
 
--
You received this message because you are subscribed to the Google Groups "xblite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xblite+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/xblite/78de2839-858a-4963-90be-5dae18704672n%40googlegroups.com.

David Silverwood

unread,
Nov 25, 2024, 1:53:42 AM11/25/24
to xbl...@googlegroups.com
I like that idea, mostly because I am more of a linux user, however, with XBASIC already outputting 64bit in Linux I'm not sure how feasible that may be. I tend to use XBasic with Linux and XBlite with Windows and I believe they compliment each other quite well. Just my penny's worth.

Reply all
Reply to author
Forward
0 new messages