[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getting buffers for ml programs
In article <1995Jul6.091205@west.cscwc.pima.edu> 137dickey@west.cscwc.pima.edu
writes:
>Help!
>I had some machine language programs that I moved from a DOS 3.3 format, to a
>PRODOS 8 disk. When I tried to BRUN them, and error message occured telling
>me that no buffer was available. I assume that these buffers are the start,
>end, and execution adresses that any ML program uses or is it something else?
>I tried using a MLI (machine language interface) to get the buffer adress,
>but that was useless. Is there a way you can get a ML programs buffer adress
>from BASIC? Would I have to use and assembler?
>Any help would be appreciated.
Under ProDOS, these are the two most important causes of NO BUFFERS AVAILABLE:
* You had eight files already open, and tried to open a ninth. ProDOS
can only handle eight open files at a time.
* You tried to load a file into memory that ProDOS considers to be
"reserved". There is a bitmap in the ProDOS global page (at $BF58
through $BF6F) that indicates what memory is "reserved" and what's
"available". If you have BASIC running, chances are the following
memory is "reserved," and ProDOS will complain mightily if any part
of your file tries to load into one of these areas:
$0000-$01FF (zero page and stack)
$0400-$07FF (text page 1)
$9A00-$B9FF (BASIC.SYSTEM code)
$BE00-$BFFF (BASIC.SYSTEM and ProDOS global pages)
It's also generally a bad idea to try to load files into the I/O
area or the language card area (where ProDOS itself resides), for
obvious reasons.
You can find out the load address of a binary file by CATALOGing the disk
it resides on (be sure the use the 80-column CATALOG command, not the
40-column CAT command, as the latter omits the desired information). At
the right-hand side of the CATALOG printout is a column headed "SUBTYPE"
that will tell you the load address (in hex) of the binary file.
Also look immediately to the left of the SUBTYPE column--you'll find a
column headed "ENDFILE". This gives the file's length in decimal. You can
add the length to the starting address (after converting to a common base,
of course) to find out the file's ending address. If the file's range
(from starting to ending address) overlaps any of the reserved areas listed
above, ProDOS will say "NO BUFFERS AVAILABLE" and refuse to load the file.
Getting DOS 3.3 machine language programs to run under ProDOS isn't always
easy. If the machine language tries to do any disk access it all, it will
probably have to be totally rewritten. Even programs that don't do disk
access sometimes run into compatibity problems and have to be rewritten.
- Neil Parker
(P.S. Are my posts actually making it out to the net?)
--
Neil Parker | No cute quote, no cute ASCII art, no cute
nparker@cie-2.uoregon.edu | disclaimer, no deposit, no return....
nparker@cie.uoregon.edu | (This space intentionally left blank:
http://cie-2.uoregon.edu/~nparker | )