[net.micro.amiga] Using Dos library from basic

net@uwmacc.UUCP (06/25/86)

Trying to get around the aformentioned bug in input$(), I attempted to use
the Dos library, with the dos.bmap include with AmigaBAsic and the library
command. Unfortunately, the appropriate commands are open,read,write, and
close, which are treated by basic as keywords EVEN in the middle of a
DECLARE FUNCTION xxxxxx LIBRARY statement. I HAVE to declare at least open,
other wise I will get no return value, and thus no file handle to pass to
the others. Didn't anybody at Microsoft or Commodore/Amiga try USING the
demo files provided? (As a side note, trying to run the Library demo
 program gets me a "file not found" for graphics.library. What gives?)

Help!

Jeff Kesselman
ihnp4!uwvax!uwmacc!net

P.S. Please mail responses to me directly.
P.P.S .... I love my Amiga, it's its sorry excuse for software that drives
      me crazy!!!

mitsu@well.UUCP (Mitsuharu Hadeishi) (06/26/86)

	In re: Using AmigaDOS library calls from AmigaBASIC
	Carolyn Scheppner posted a modified ConvertFD which will prepend
an "x" to all library functions.  Thus you would only need to declare
xOpen, xClose, etc.  An easy way to get around this is to look in your .bmap
file and prepend x's to everything that is a reserved keyword in AmigaBASIC.
			-Mitsu (mitsu@well.UUCP)
(Carolyn's posting is some miles back in net.micro.amiga)

carolyn@cbmvax.cbm.UUCP (Carolyn Scheppner) (06/27/86)

In article <30@uwmacc.UUCP> net@uwmacc.UUCP (jeff kesselman) writes:
>Trying to get around the aformentioned bug in input$(), I attempted to use
>the Dos library, with the dos.bmap include with AmigaBAsic and the library
>command. Unfortunately, the appropriate commands are open,read,write, and
>close, which are treated by basic as keywords EVEN in the middle of a
>DECLARE FUNCTION xxxxxx LIBRARY statement. I HAVE to declare at least open,
>other wise I will get no return value, and thus no file handle to pass to
>the others. Didn't anybody at Microsoft or Commodore/Amiga try USING the
>demo files provided? (As a side note, trying to run the Library demo
> program gets me a "file not found" for graphics.library. What gives?)
>

1.  What you need is a dos.bmap created with NewConvertFD.  NewConvertFD
    prepends an 'x' to all system function names known to conflict with
    AmigaBasic keywords (so you can call xOpen, xRead, etc.).
    You also need a corrected dos_lib.fd to create it from.

    I have sent both of these and several demos to the mod.sources.amiga
    moderator.

2.  The demos run fine if you are cd'd (CHDIR'd) to the right place.
    When AmigaBasic executes a LIBRARY statement, it looks for the
    libraryname.bmap file.  The two places it looks are the LIBS:
    directory and the directory you are cd'd to.

    Since the graphics.bmap for the Library demo is in the BasicDemos
    directory (drawer), you must be cd'd there.  This can be done
    by either starting the Library demo from WorkBench or by doing
    a CHDIR "Extras:BasicDemos" before running it from AmigaBasic.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Carolyn Scheppner -- CBM   >>Amiga Technical Support<<
                     UUCP  ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn 
                     PHONE 215-431-9180
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=