I am currently developing a subset of the 6502 in LogiSim. One of my main resources is Hanson's Block Diagram.
Currently I am developing opcodes for the processor, and my current task is the instruction BPL, where the processor checks the negative flag, and if it is positive goes to a specified address.
My first thought was that the processor puts the status register into the ALU and has the other argument as 10000000, but the ALU compares 8 bit numbers, so I am not sure how it would compare just a single bit of the status register. How does the 6502 check the negative flag internally?