[comp.sys.amiga] Accessing non-library code from Basic, and libraries in general

john13@garfield.UUCP (John Russell) (03/15/88)

A couple of days ago a message was posted about calling (non-library)
assembler routines from Basic. I have some interest in this topic too --
I've tried to call C functions by getting the absolute address into a
32-bit variable, and going "&fnaddress" without success. Is there something
like geta4() that needs to be done? Could such a called routine use
stdin/out?

(There was a valid  reason I wanted to do it like this rather than as a 
library, BTW)

A very useful utility in my view would be a "library creator" -- easy enough
to use that a programmer not already proficient in C or Amiga internals
could create library routines without any special consideration. Probably
it would also create an include file for the functions (eg return types).

Also am I correct in assuming that libraries represent an easy way to unload
"fossil" routines from memory? EG for a program like FaccII that needs to
stay as small as possible while running, you might use a library routine
to parse arguments / setup the environment and then AllocMem(-1,...) to
unload all library code before proceeding. This is an issue that has been in
my mind lately, whether libraries or overlays or some other method would be
the best, but I haven't had time to do anything with it other than doing
some sample overlays.

John
--
" 'Emergency room'! AUUUGGGH! That's where I'll be going."
"It looks like she needs to have this Bonus Round pumped out of her!"
	-- Pat Sajak consoles an unsuccessful Wheel-of-Fortune contestant