ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

SUB

T1 sm83 alu insn
Game Boy SM83 Instruction: SUB (9 encodings)
SourceGame Boy SM83 (LR35902) Complete Opcode & Timing Table (gb-opcodes) (gbdev_sm83)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeSharp SM83 (Game Boy)
Sharp SM83 (Game Boy DMG / CGB)
License & VersionCC0-1.0
master
Upstreamhttps://github.com/gbdev/gb-opcodes
Privilegeuser
ExtensionsSM83 Base

Summary

Sharp SM83 (Game Boy DMG/CGB LR35902) SM83 Base instruction SUB with 9 opcode variants, exact T-cycle counts, and Z/N/H/C flag effects.

Syntax / Encoding

0x90: SUB A, B  ; 1B, 4t, flags [Z:Z N:1 H:H C:C]
0x91: SUB A, C  ; 1B, 4t, flags [Z:Z N:1 H:H C:C]
0x92: SUB A, D  ; 1B, 4t, flags [Z:Z N:1 H:H C:C]
0x93: SUB A, E  ; 1B, 4t, flags [Z:Z N:1 H:H C:C]
0x94: SUB A, H  ; 1B, 4t, flags [Z:Z N:1 H:H C:C]
0x95: SUB A, L  ; 1B, 4t, flags [Z:Z N:1 H:H C:C]
0x96: SUB A, (HL)  ; 1B, 8t, flags [Z:Z N:1 H:H C:C]
0x97: SUB A, A  ; 1B, 4t, flags [Z:1 N:1 H:0 C:0]
0xD6: SUB A, n8  ; 2B, 8t, flags [Z:Z N:1 H:H C:C]