Ensuring upward compatibility

Skip to first unread message

John Russell

Jan 8, 1989, 5:37:09 PM1/8/89
Given that there are some hidden gotchas that will cause programs written
even by careful and competent Amiga programmers to cause problems on
machines with faster processors, more and different kinds of memory, MMUs, etc.
How about this for a kind of "safety net" which would allow people to ensure
they were following good programming practice even if they didn't have a
68030 equipped Amiga with 32-bit ram and MMU:

- a set of stub routines that could be SetFunctionned into place before testing
out new software. These would include:

AllocMem - stick a tag onto the memory block stating what type of memory was
requested, possibly also address of task that requested it

drawing functions - these would check to make sure that the rastport they were
acting on was in a block of memory allocated as PUBLIC, the bitmaps they
were acting on were CHIP, etc.

I don't know what else -- whatever other warnings that you know people will
overlook, which could be trapped inside a system routine. Whenever an offense
was found you could pop up a requester saying what guideline had been
violated. As an option, you could make it possible to disable a specific
warning once it had been given once to avoid thousands of occurrences of the
same requester.

- a library of debugging calls that would be able to interact with the
replacement system routines

The first thing I can think of is a function you could call just before
exiting which would ensure that all AllocMems made by your task had been
freed properly.

While these things would impose significant overhead on the system, you could
at least run software through them before releasing it... this would catch
programs that needed to be FixHunked, system structures not in public memory,
and probably dozens of other things that might break, but which I'm not even
aware of :-). There might not be a way to find self-modifying code, improper
access of exception vectors and many others, but at least it would prevent
many of the honest slips that we all make.

"I figured there was this holocaust, right, and the only ones left alive were
Donna Reed, Ozzie and Harriet, and the Cleavers."
-- Wil Wheaton explains why everyone in the
Next Generation is so nice


Jan 9, 1989, 10:36:50 PM1/9/89

> a set of stub routines ...
ah yes, couldn't resist, so no flames, but the best puns
are often unintentional! Wouldn't be surprised if this
one catches on! J. Petersen
Reply all
Reply to author
0 new messages