Thank You!
-----Original Message-----
From: owner-hecnet at Update.UU.SE [mailto:owner-hecnet at Update.UU.SE] On Behalf
Of Johnny Billquist
Sent: Saturday, November 19, 2011 9:48 PM
To: hecnet at Update.UU.SE
Subject: Re: [HECnet] Macro32 entry forward desclaration - how?
On 2011-11-19 20:46, Pinoccio wrote:
Hi all!
I am studying Macro32 and have a seemingly simple question. My source file
is:
.TITLE tstentry
.IDENT /V1.0/
.PSECT RDATA,NOWRT,SHR,NOPIC,NOEXE,RD,QUAD
HI: .ASCID "Hello, World!"
.PSECT CODE,NOWRT,SHR,PIC,EXE,RD,QUAD
.ENTRY START, ^M<>
CALLS #0, PRINT
RET
.END START
.ENTRY PRINT
PUSHL HI
CALLS #1,G^LIB$PUT_OUTPUT
RET
.END PRINT
Macro32 decides PRINT is an external symbol, and link denies to produce
executable with a "LINK-W-USEUNDEF, undefined symbol PRINT referenced"
error. How I should make forward declaration of PRINT function to show
assembler it is valid local symbol? In C language I can make prototype
declaration before calling. But what is a right way for Macro 32?
You have misunderstood what .END does.
.END means assembly stops there, and the argument is the start address
of the program.
So, your code for your PRINT routine is not even assembled. Make sure
you create a list file, and this should be obvious.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic
trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" -
B. Idol
Show replies by date