[Coco] Syscall
phil pt
ptaylor2446 at gmail.com
Sat Mar 3 20:32:34 EST 2018
No, Nothing in the other parts of the code does not have anything to do
with interfering with the syscall routine.
On Sat, Mar 3, 2018 at 8:30 PM, L. Curtis Boyle <curtisboyle at sasktel.net>
wrote:
> That’s the entire program? Is their a PROCEDURE (program name) above what
> you have shown here?
>
> Sent from my iPhone
>
> > On Mar 3, 2018, at 7:12 PM, phil pt <ptaylor2446 at gmail.com> wrote:
> >
> > Here is the code
> >
> > TYPE r=cc,a,b,dp:BYTE; x,y,u:INTEGER
> > DIM regs:r
> >
> >
> > 10 regs.a=0 \ (* <-std input *)
> > regs.b=$26 \ (* <-SS.ScSiz *)
> > RUN syscall($8D,regs)
> > sizeX=regs.x \ (* Window Width *)
> > sizeY=regs.y \ (* Window Length *)
> >
> >
> > On Sat, Mar 3, 2018 at 5:19 AM, L. Curtis Boyle <curtisboyle at sasktel.net
> >
> > wrote:
> >
> >> How big of a buffer space are allocating BASIC09 (when you invoke it
> from
> >> the command line)? Wayne is right in that it will consume a lot more RAM
> >> when merged with RUNB. This is because every user program gets a maximum
> >> (without fancy things like CHAIN, etc) 63.5K workspace. And each time
> you
> >> load program modules (like BASIC09, RUNB, etc, they get loaded into MMU
> >> blocks of RAM (each MMU block is 8K). OS-9/Nitros9 loads programs at the
> >> highest point of available RAM your 64k workspace, in MMU sized chunks.
> >> (There is 512 bytes at the very top that is reserved for I/O with
> hardware,
> >> and the task switching part of the kernal, so that is off limits to you
> and
> >> your programs). So, if your program (or merged programs) take 7.5k or
> less,
> >> it will take the full 7.5K (because the MMU can only map fixed sized
> >> blocks). If they take between 7.5K and 15.5K, it will take the full
> 15.5K,
> >> etc (just keep adding 8k).
> >> So, if you load BASIC09 (which is 23k, roughly), that will take 23.5k
> >> from your 63.5k (plus at least 8k for its internal variables, and your
> >> procedures). If you have syscall, etc merged with RUNB, when it try’s
> to
> >> add that into your workspace, it brings the entire merged chunk in (and
> >> since RUNB itself is about 12k, that gets rounded up to 16k for the MMU
> -
> >> you now have 23.5k for BASIC09, 16K for RUNB, syscall, inlet, etc) plus
> at
> >> least 8k for your procedures, etc - so you are at least taking up 48k of
> >> your workspace. If your program is bigger, you rapidly run out of room.
> >> Depending on the size of your program, you could UNLINK RUNB and it’s
> >> merged modules until you get an error 221 (which means it is really out
> of
> >> RAM, and then load in a merged file of inkey , syscall and your other
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
More information about the Coco
mailing list