[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Himem with prodos basic?
j >I made an assembly language program that I need to interface with my
j >prodos basic program. The problem is what addresses should it go in?
j >Right now I'm loading it into the first hires graphics page. It seems
j >to work there but will prodos basic start scribbling all over it if I
j >make my program too long? I tried doing himem:(whatever hex 3500 is in
j >decimal) but then I got a "no buffers available" message when I tried
j >to load files. My apple 2c has 128K of RAM I think. Also, when I use &
j >to call the program, how would I type paramaters for it? Would it be
j >"& 3 2" or "&3,2,3" or what? And how does the program get them, are
j >they pushed onto the stack or something?
As for passing parameters, most of the time you will just declare a data
area in the binary code, POKE in the parameters from your BASIC program,
CALL the routine, and PEEK the results back into the BASIC program.
Using the 1st Hires page will work as long you make sure the
program/variables doesn't grow too large and/or your strings grow too
far down in memory; either case will over write your code image. [BASIC
programs/numeric variables start at $800 and grow upwards; String
variables start at HIMEM, typically, $9600 and grow downward.
The problem with HIMEM is that BASIC.SYSTEM uses it to 'protect' memory,
here the 'no buffers available' message.
If the asm rountine is small enough, place it on Page 3 ($300-$3CF).
If your code too big to fit in Page 3, let me know and I will describe a
couple of other ways to fit the code in....
* KingQWK 1.05 # [PK] * Somehow tuna doesn't taste the same without the
dolphin