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

Re: Questions on EDASM reloc ($FE) files



> In article <JbadncanU4w_OafZnZ2dnUVZ_v-dnZ2d@comcast.com>,
>  "Michael J. Mahon" <mjmahon@aol.com> wrote:
> 
> >John B. Matthews wrote:
> >
> >>In article <voOdnfM3qdn3YqTZnZ2dneKdnZydnZ2d@comcast.com>,
> >> "Michael J. Mahon" <mjmahon@aol.com> wrote:
> >>
> >>So RLOAD contains no "reasonableness" checks on the file's contents?
> >>Even so, the result you describe seems relatively benign (compared
> >>to BRUNning a .GIF file ;-).
> > 
> > Not at all. RLOAD assiduously checks for the correct file type. Since it 
> > owns the type and EDASM produces no output for erroneous input, it 
> > reasonably assumes that the REL file contains relocation data in a 
> > familiar format. It seems unfair to criticize RLOAD for not rejecting a 
> > forged file type. :-)
> 
> I understood that it knew the file was correctly typed.  What I was
> referring to is some further, or ongoing, check on the validity of
> that file's contents.  Assembler authors make mistakes, too!  And
> file corruption is also an issue.  In short, if the file directs
> the relocator to do something patently unreasonable, then it would
> be reasonable for it to detect an error.  ;-)

Oh, sorry; I was beating the wrong dead horse:-) The loader uses the 
(albeit primitive) memory protection built into ProDOS to avoid writing 
outside the allocated buffer. Misuse is more likely to generate "NO 
BUFFERS AVAILABLE" (or similar) than to walk through $C0xx land!

> Microcomputer system programmers frequently assumed that data errors
> never occur and their programs ploughed on senselessly.  Mainframe and
> Mini programmers tended to be a bit more suspicious of data errors,
> often through rude experience.  (Of course, more is at risk if much
> data is on line and potentially vulnerable to corruption.)

I am amazed by my own ability to ignore errors;-) I've come to rely on 
modern languages with rigorous exception processing (e.g. Ada, Java).

-- 
John
jmatthews at wright dot edu
www dot wright dot edu/~john.matthews/