Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!orsvax1!pyrnj!caip!cbmvax!carolyn From: carolyn@cbmvax.cbm.UUCP (Carolyn Scheppner) Newsgroups: net.micro.amiga Subject: Re: Aztec C and Basic Libraries Message-ID: <348@cbmvax.cbmvax.cbm.UUCP> Date: Thu, 5-Jun-86 15:52:30 EDT Article-I.D.: cbmvax.348 Posted: Thu Jun 5 15:52:30 1986 Date-Received: Sat, 7-Jun-86 08:02:57 EDT References: <778@deepthot.UUCP> Reply-To: carolyn@cbmvax.UUCP (Carolyn Scheppner) Organization: Commodore Technology, West Chester, PA Lines: 57 In article <778@deepthot.UUCP> chicken@deepthot.UUCP (Rob Mowat) writes: > > I (we) have the developer's version of Aztec C and bought it with >the intention of using it to build libraries to use with basic programs. >... > I am wondering if anyone can tell me how to produce a .bmap file from >an Aztec C library file. There was a program included with BasicDemos >called ConvertFD but I am not sure what an .FD file is or even how to make >it. >As well, is there any way to access the other Amiga libraries from Basic. > What do you mean by "Aztec C library file"? You can't make a .bmap for the scannable object libraries that you link with. Each .bmap is basically an index for an Amiga run-time library. Most of the run-time libraries (graphics.library, dos.library, etc) are loaded in with KickStart. Others (diskfont.library, icon.library, etc.) reside in the LIBS: directory of WorkBench and are loaded when required. You can also create your own run-time libraries (see 1.1 RKM Vol.2 Appendix K). An FD file is a text file that describes the functions in a run-time library. The functions are listed in the same order as they appear in the library's function table. Each is followed by information about the the parameters passed to the function (descriptions)(registers). This is a listing of diskfont_lib.fd (contains 2 functions): ##base _DiskfontBase ##bias 30 ##public OpenDiskFont(textAttr)(A0) AvailFonts(buffer,bufBytes,flags)(A0,D0/D1) ##end The 1.1 FD files were distributed on the 1.1 Amiga C disk. If you don't have Amiga C, you may be able to get the FD files from a users group, a commercial network, or possibly on a Fish or Amicus public domain disk. ConvertFD is an AmigaBasic program that converts FD files to the .bmap files required by AmigaBasic for interfacing with system library CALLs. AmigaBasic uses them to convert your C style CALLs to assembler style parameters-in-the-registers JSRs to an offset from a library base. I will post NewConvertFD, a revised ConvertFD which prepends an "x" to all system function names known to conflict with AmigaBasic tokens. When using .bmaps made with NewConvertFD, you can, for example, use the AmigaDos Open(), Read(), Write(), and Close() functions by calling xOpen(), xRead(), xWrite(), xClose(). This allows you to implement absolute binary loads and saves to/from one or many areas of memory. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carolyn Scheppner -- CBM >>Amiga Technical Support<< UUCP ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn PHONE 215-431-9180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=