Re: A86: A86 : Protocol additions


[Prev][Next][Index][Thread]

Re: A86: A86 : Protocol additions



On Fri, 5 Sep 1997 Steve86Asm@aol.com wrote:

> The best way to avoid errors is to just thoroughly check your code, which
> still misses them, but I don't think a compiler or other such program would
> be able to find them...  The best protection is another 86 that can send the
> files back when it crashes...

No, the best protection would be a debugger that would pretend to execute
the program and make sure that it doesn't do undesirable stuff (like 
overwrite the stack).  A debugger should not be much more difficult to
write than a disassembler, and I already have one of those.  The question
is where to put the debugger so that _asm_exec_ram is free.  Ooo! I have
an idea:

   1. Relocate the debugger to some free space in RAM page 1.
   2. Whenever the debuggee wants to access a different RAM page, switch
      the $4000 page, do the dirty work, and switch it back.

There are still some problems with this scheme.  For example, some of the
system calls change the $8000 page.  Those calls would have to be emulated
somehow, or thunked by a procedure somewhere above $C000.  Also, we still
don't know exactly how routines use RAM page 1.  It might not be a
suitable place.

--------
Dan Eble (mailto:eble@cis.ohio-state.edu)
         (http://www.cis.ohio-state.edu/~eble)


References: