From 7d59dad969a6cd1e42958f4c805d1d373ee04713 Mon Sep 17 00:00:00 2001
From: Joshua Wise <joshua@nyus.joshuawise.com>
Date: Sat, 19 Apr 2008 00:10:08 -0400
Subject: [PATCH] Fix ld a, []

---
 diag.asm      | 3 +--
 insn_ldm8_a.v | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/diag.asm b/diag.asm
index 5d44cef..2c843eb 100644
--- a/diag.asm
+++ b/diag.asm
@@ -52,8 +52,7 @@ signon:
 
 putscreen:
 	; Wait for vblank
-	ld c, $41
-.stat:	ld a, [c]
+.stat:	ld a, [$FF41]
 	ld [$FF51], a
 	and $03		; mode
 	cp $01		; VBLANK
diff --git a/insn_ldm8_a.v b/insn_ldm8_a.v
index 2754862..14d82ca 100644
--- a/insn_ldm8_a.v
+++ b/insn_ldm8_a.v
@@ -24,8 +24,8 @@
 	`INSN_LD8M_A: begin
 		case (cycle)
 		0:	begin end
-		2:	begin end
-		3:	if (opcode[4]) `_A <= rdata;
+		1:	begin end
+		2:	if (opcode[4]) `_A <= rdata;
 		endcase
 	end
 `endif
-- 
2.43.0