Re: [cc65] c64 question

Date view Thread view Subject view

From: MagerValp (MagerValp_at_cling.gu.se)
Date: 2001-03-07 23:25:40


>>>>> "AN" == Arvid Norberg <c99ang_at_cs.umu.se> writes:

AN> What happens when the 6502 gets an interrupt? I've always imagined
AN> that the folowing steps are performed by the CPU: 1. CPU registers
AN> were pushed onto the stack (a, x, y, pc).

Nope, only the PC and the status register (P) is pushed on the stack.
You have to push a, x, and y manually.

AN> 2. execution jumped to the interrupt handler

Yup.

AN> 3. when rti is reached, the resgisters are popped back and
AN> execution continues where it was interrupted.

Have to pop back a, x, and y manually.

-- 
    ___          .     .  .         .       . +  .         .      o   
  _|___|_   +   .  +     .     +         .   .  Per Olofsson, konstnär
    o-o    .      .     .   o         +          MagerValp_at_cling.gu.se
     -       +            +    .     http://www.cling.gu.se/~cl3polof/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:39 CET