Fatal: No program entry point

By: Vincent Drake

Abstract: How to resolve this error when assembling and linking assembly code.

Question:

My code assembles successfully, but when I run TLINK/ILINK32, I get an error:

Fatal: No program entry point.

How do I fix this?


Answer:

This problem is easily fixed, but often confuses beginner assembly programmers. The linker cannot make an executable out of an object file/s unless a program starting point is specified in one of the object files. This is done by following the last 'END' statement of your assembly file with a pointer name.

Example:

.386
.MODEL FLAT
.CODE
STARTPOINT:
; program code here

END STARTPOINT  
; end this assembly file and begin 
; program execution at STARTPOINT

Server Response from: ETNASC03