summaryrefslogtreecommitdiff
path: root/testbenches
diff options
context:
space:
mode:
Diffstat (limited to 'testbenches')
-rw-r--r--testbenches/mine.z8022
1 files changed, 19 insertions, 3 deletions
diff --git a/testbenches/mine.z80 b/testbenches/mine.z80
index aa33fb5..57c6998 100644
--- a/testbenches/mine.z80
+++ b/testbenches/mine.z80
@@ -3,7 +3,7 @@
.ORG 4000h
- call cond_jr ;cd
+ call cond_jr_no ;cd
halt ;76
inc8:
@@ -19,7 +19,8 @@ dec8:
dec a ;3d
ret ;c9
-cond_jr:
+ ;; Test jump-not-taken of JR [C,NC,Z]
+cond_jr_no:
ld a,01h ;3e 01
cp a ;bf
jr nz,wrong ;20 07
@@ -31,10 +32,25 @@ cond_jr:
jr nc,wrong ;30
ret ;c9
-
wrong:
jp wrong
+ ;; Test jump-taken of JR [C,NC,Z]
+cond_jr_yes:
+ ld a,01h ;3e 01
+ ld b,02h ;06 02
+ cp b ;b8
+ jr nz,right1 ;20
+ jp wrong
+right1: scf ;37
+ jr c,right2 ;38
+ jp wrong
+right2: ccf ;3f
+ jr nc,right3 ;30
+ jp wrong
+right3: ret ;c9
+
+
data8:
.db 0a5h
data16: