• Commodore Free Magazine, Issue 78 - Part 10

    From Stephen Walsh@39:901/280 to All on Sun Mar 23 17:59:22 2014
    cessing, not during
    regular program execution, and is used to determine whether an interrupt
    comes from a break instruction or from a hardware interrupt. The 65816
    Native mode P Register does not have a B flag; instead it has a dedicated
    break vector ($00FFE6-00FFE7).

    THE 65816 P REGISTER

    The 65816 uses all eight bits in the P Register. Bit 0 includes what is
    called a "phantom" bit and is used for switching from Emulation to Native
    mode and back. I will fully explain this phantom emulation bit next time
    out.

    65816 Status Register Bit-fields

    Bit 7 6 5 4 3 2 1 0
    N V m x D I Z C/e

    The m and x bits reflect the size of data used in the A Register and X/Y
    index registers, respectively. The x bit affects both the X and Y
    registers.

    THE PROGRAM COUNTER (PC)

    The final register in our list is the program counter, or PC. It is a
    16-bit register that holds the address of the next instruction to be
    executed. The program counter is normally incremented to point to the next instruction in memory, except in the case of jump, branch, and call instructions, which pass control to a new location within the program by storing the new location to the program counter. If the program counter
    goes past $FFFF it wraps around to $0000.

    IN CONCLUSION

    Today was all about 6502/65816 architecture, with a couple of short
    paragraphs on the 65x family's early days. I sincerely hope this was informative yet not too "techy", and look forward to next time when we will discuss numbering systems used by 6502 assembly language programmers, as
    well as introducing the Native mode of the 65816. So, until our next
    meeting, take 'er easy.

    Please send errors, omissions, or suggestions to bert@winc64.com or on
    Lemon64, username satpro.

    =====================================



    --- MBSE BBS v1.0.01 (GNU/Linux-i386)
    * Origin: Dragon's Lair ---:- bbs.vk3heg.net -:--- (39:901/280)