[HECnet] Macro32 entry forward desclaration - how?

Pinoccio pinoccio at gmx.com
Sat Nov 19 11:46:18 PST 2011


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?

Thanks.



More information about the Hecnet-list mailing list