Multi-System Opcode Lookup, Status Flag Visualizer & Cycle Counter (6502, Z80 & 68000)
Instant instruction set reference, visual processor flag matrix (C/Z/N/V/S/H/X), and assembly raster-timing cycle calculator with page-boundary & branch penalty support
Multi-System Opcode Lookup, Status Flag Visualizer & Cycle Counter (6502, Z80 & 68000)
Instant instruction set search engine, processor status flag matrix, and raster-timing cycle calculator covering MOS 6502 / 6510 (Commodore 64, VIC-20, BBC Micro, Atari 800), Zilog Z80 (ZX Spectrum, Amstrad CPC), and Motorola 68000 (Amiga, Atari ST).
Active Instruction Set
MOS 6502 / 6510 (8-Bit)
Matching Opcodes
162 Opcodes Shown
Status Register Flags
N V - B D I Z C (8-Bit SR)
Selected Opcode
$A9 LDA #$nn (2B · 2 Cycles)
Snippet Cycle Total
28 Cycles (44% of PAL Line)
1. Instant Multi-System Opcode Search & Filter Engine
| Opcode | Instruction | Mode | Bytes | Cycles | Status Flags |
|---|
Opcode Inspector: $A9 — LDA #$nn
Hex / Decimal / Binary
$A9 · 169 dec · %10101001
Addressing Mode & Size
Immediate · 2 Bytes
Clock Cycles & Penalties
2 Cycles (No page penalty)
RTL Operation / Pseudo-Code
A ← M (Load Accumulator)
Visual Processor Status Flag Matrix:
All Addressing Modes for
LDA (click to compare timing):
| Opcode | Syntax | Mode | Bytes | Cycles |
|---|
2. Assembly Snippet Cycle Calculator (Raster-Timing Engine)
Paste or edit assembly instructions below to compute line-by-line and cumulative CPU clock cycles, including branch-taken and page-boundary crossing penalties:
| # | Instruction | Opcode & Mode | Bytes | Cycles | Cumulative |
|---|
CPU Instruction Timing, Page-Boundary Penalties & Raster Synchronization
- MOS 6502 / 6510 / 8500 Clock Cycles & Page-Crossing Penalties: On the MOS 6502 and 6510 (Commodore 64, VIC-20, BBC Micro, Atari 800/XL), every bus cycle transfers one byte. Indexed read instructions (
Absolute,X,Absolute,Y, and(Indirect),Y) take 4 or 5 base cycles, but add a +1 cycle penalty whenever adding the index register carries across a 256-byte page boundary (e.g.$04F0 + XwhereX = $20crosses from page$04to$05). Relative branch instructions (BNE,BEQ,BCC,BCS,BMI,BPL,BVC,BVS) take 2 cycles when not taken, 3 cycles (+1) when taken within the same 256-byte page, and 4 cycles (+2) when the branch target crosses into an adjacent page. On a PAL C64, the VIC-II executes exactly 63 cycles per raster line (only 23 CPU cycles on character "badlines"). - Zilog Z80 / Z80A T-States, M-Cycles & Prefix Bytes: On the Zilog Z80A (ZX Spectrum, Amstrad CPC, MSX), instructions execute in Machine Cycles (M-cycles), each lasting 3 to 6 clock T-states. Single-byte register operations like
LD r,r'orADD A,rtake 4 T-states (1 M1 fetch cycle), whereas prefixed bit/shift instructions ($CB), extended instructions ($ED, such asLDIRat 21 T-states per byte copied or 16 T-states on final byte), and index register instructions ($DDIX/$FDIY) add extra opcode fetch and displacement cycles. On the ZX Spectrum 48K, a full video scanline lasts 224 T-states (228 T-states on 128K). - Motorola MC68000 Word Alignment & Effective Address Timing: On the 16/32-bit Motorola 68000 (Amiga, Atari ST, Sinclair QL, Sega Genesis), all instructions are multiples of 16-bit words (2 to 10 bytes), and every 16-bit bus read or write takes 4 clock periods. The
DBRA Dn, label(DBF) loop primitive takes 10 clock periods when looping back and 14 clock periods when the counter expires (Dn = -1), making it the cornerstone of tight 68000 Copper/Blitter and Shifter routines.
Comments (0)
No comments yet. Be the first to share your thoughts on this tool!
Leave a Comment