[A89] Re: change the SR
[Prev][Next][Index][Thread]
[A89] Re: change the SR
> I do ASM. Don't ask me why, i just always want the most difficult thing
> with
> the most possibilies. Niklas already gave me the ASM code.
I am not saying that you have to use c. I quoted it thinking you would see the
trap #12 in it. Further more a quick dissassembly of trap #12 on ams 2.04
shows the following:
move.w (a7)+,d0 ;get saved sr off the stack
jmp some_address
and at some_address there is an rts which loads the return address but not the
sr so the calc will stay in supervisor mode do to the origional trap call.
So doing a trap #12 should be a way to enter supervisor mode which is what you
asked how to do.
by the way you do not need to use the low memory protection port just add
#$40000 so to the pointers so that you get the wrap arround effect.
-Samuel
23 He (Elisha) went up from there to Bethel; and while he was going up on
the way, some small boys came out of the city and jeered at him saying,
"Go away, baldhead! Go away, baldhead! 24 When he turned around and saw
them, he cursed them in the name of the lord. Then two she-bears came
out of the woods and mauled forty-two of the boys. 25 From there he went on
to Mount Carmel, and then returned to Samaria.
- 2 Kings 2: 23-25
Follow-Ups:
References: