Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alternate entry-point
#1
v1c, when I tried specifying an alternate entry-point in my fb module, fbc told me it couldn't find it. Is it telling my this because it requires some undocumented aruguements?

Gimmie an example, pls.
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Reply
#2
The -entry option will only work if you have defined a label in ASM or C or a different language, it won't change the name of the entry-point, it will pass to LD a different one than the default.
Reply
#3
So I can stick a bit of inline asm in to mark a label?

ie:
Code:
'' stuff up here

Sub MyEntryPoint ()
Asm
   asmMyEntryPoint:
End Asm

   '' Stuff to do

End Sub

'' More stuff here

And compile using -entry asmMyEntryPoint?
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Reply
#4
Declaring as a proc will be enough:

Code:
sub foo cdecl alias "foo"

    print "no std entry-point called!"
    
    end 0

end sub

Code:
fbc test.bas -entry _foo

END() has to be explicitly called or the proc would return to nowhere..
Reply
#5
Yeah, I always end my programs with END anyway.

But, I didn't think of the underscore requirement.

Damn you and your not adding that inherently!
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Reply
#6
This:
Code:
fbc test.bas -entry foo
would be more basic... :wink:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)