Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to declare program entry point with NASM?

418 views
Skip to first unread message

Colin Ward

unread,
Nov 1, 1996, 3:00:00 AM11/1/96
to

Hi there fellow assembly maniacs...

I've been reading the docs for NASM and playing around with it a bit and
I'm rather impressed with it, especially using a '.' for local labels...
However, when writing 16 bit DOS code, I can't figure out how to indicate
the program entry point. You use End ProcName with MASM and TASM, but NASM
doesn't accept this and I can't find any mention of it in the docs.

Any ideas?

/----------------------------------------------------------------------\
[Hitman/Code HQ - 6502/68000/80386 & now 65816 (16 bit 6502!) ]
[Assembly Lover since 1987! A bit of C, but don't tell anyone... :-) ]
[OS coding/Hardware hitting/Demos/Games/Modules - c64, Amiga & PC ]
[I'm a pogrammar.. I'm a programor... I'm a progemmar... I write code. ]
\----------------------------------------------------------------------/

Colin Ward

unread,
Nov 4, 1996, 3:00:00 AM11/4/96
to

sg...@cam.ac.uk (Simon Tatham) wrote:

>Colin Ward <co...@leprechaun.com.au> wrote:
>> However, when writing 16 bit DOS code, I can't figure out how to
>> indicate the program entry point. You use End ProcName with MASM
>> and TASM, but NASM doesn't accept this and I can't find any mention
>> of it in the docs.

>*blush* You're absolutely right - I had omitted to put it in the
>documentation. The feature is in there, though, and I now quote the
>extra paragraph that will be added to the OBJ-format section of the
>documentation in the next release:

>-------------------------------------------------------------------
>If the module you're writing is intended to contain the program
>entry point, you can declare this by defining the special label
>`..start' at the start point, either as a label or by EQU (although
>of course the normal caveats about EQU dependency still apply).
>-------------------------------------------------------------------

No worries mate. I've written docs before and I know that they're the
most painful, time consuming, *boring* part of writing a program. I'm just
lucky that in my current job my boss likes (!?) to do the docs for my
programs - welll I'm not going to stop him!

Thanks for the help, anyway...

Ayushi Jain

unread,
Sep 18, 2020, 4:23:43 PM9/18/20
to
Pls tell how to declare ..start? Not mentioned clearly in the documentation

Frank Kotler

unread,
Sep 18, 2020, 5:23:58 PM9/18/20
to
You've been wondering about this since 1996? Wow!

Depends on the OS and Nasm's output format. In "-f obj" (omf).(a
somewhat obsolete format) just "..start". More often,
global _start
section .text
_start:

Or maybe "WinMain"...

You may need to tell the linker about it.

The documentation has improved since 1996! http:/nasm.us

Frank Kotler

unread,
Sep 18, 2020, 6:54:08 PM9/18/20
to
On 09/18/2020 05:20 PM, Frank Kotler wrote:
> The documentation has improved since 1996! http:/nasm.us
>
Sorry. Better link...

https://www.nasm.us/docs/2.14rc0/nasmdoc7.html#s

Best,
Frank

0 new messages