Path: utzoo!utgpu!water!watmath!garfield!john13 From: john13@garfield.UUCP (John Russell) Newsgroups: comp.sys.amiga Subject: Accessing non-library code from Basic, and libraries in general Keywords: very long subject line Message-ID: <4586@garfield.UUCP> Date: 15 Mar 88 04:15:40 GMT Organization: CS Dept., Memorial U. of Newfoundland, St. John's Lines: 30 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