From f0792433cbb9c22cacb49ad29ef939a59dd15ca3 Mon Sep 17 00:00:00 2001 From: Joonas Javanainen Date: Sun, 7 Jan 2024 22:04:21 +0200 Subject: [PATCH] Add RST addresses to pseudocode --- chapter/cpu/instruction-set.typ | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chapter/cpu/instruction-set.typ b/chapter/cpu/instruction-set.typ index 7df242d..d4a412e 100644 --- a/chapter/cpu/instruction-set.typ +++ b/chapter/cpu/instruction-set.typ @@ -1796,7 +1796,8 @@ if opcode == 0xD9: next_addr: [`n`], pseudocode: ```python opcode = read_memory(addr=PC); PC = PC + 1 -if opcode in [0xC7, 0xD7, 0xE7, 0xF7, 0xCF, 0xDF, 0xEF, 0xFF]: +if opcode in [0xC7, 0xCF, 0xD7, 0xDF, 0xE7, 0xEF, 0xF7, 0xFF]: + # address 0x00, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38 n = rst_address(opcode) SP = SP - 1 write_memory(addr=SP, data=msb(PC)); SP = SP - 1