[A83] Re: 83p os
[Prev][Next][Index][Thread]
[A83] Re: 83p os
On Thu, 17 Apr 2003 robvanwijk@gmx.net wrote:
> > If you already change the jumps you can also check that no program has an
> > IM2 instruction in it. But when you have self modifying code it's very
> > difficult to check.
>
> It's even worse. IM 2 translates to ED5F, but a program can very well
> contain
> ED5F without switching to interrupt mode 2. For instance, 21ED5F is
> perfectly
> legal, as it means ld HL,$5FED. But checking the byte before ED5F does not
> guarantee anything either. Consider the following:
>
> DirtyTrick:
> ld HL,$5FED
> ... some code ...
> jp DirtyTrick+1
>
> The only "solution" that I can think of is telling programmers they're not
> allowed
> to use IM 2, and trust they'll comply.
So?
That looks to me as the only thing neccesary.
If they don't comply, the programmers'll find out they ruin the os during
debugging anyway.
--Peter-Martijn
>
> Rob van Wijk
>
>
References: