<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 01 Nov 1994 12:26:32 -0600
From   : barnett@... (David Barnett)
Subject: Re: Another emulator

Hi all,

David Alan Gilbert writes:
 >
>Warning for people still hacking at the instruction set:
>My last instruction level problem (that I fixed last night) was an
>error in my implementation of BRK, JSR, and RTS.
>BRK should push the address of PC two instructions after the BRK.
>JSR should push the address of the last byte of the JSR instruction
>and RTS should add one to the recovered PC value.
>
Notice that this is in each case really PC+2 at the time the instruction
was fetched.  In other words, they share an instruction mechanism.

Note that RTI does not have to increment the return address the way RTS does.

David Barnett
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>