Skip to content

Commit

Permalink
Oops, forgot some ops
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagosr committed Sep 1, 2014
1 parent d800eeb commit f154b2c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions racket/z80.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,13 @@
[`(ld ix (,(? za? w))) (zddw #x2a w)]
[`(ld iy (,(? za? w))) (zfdw #x2a w)]

[`(ld (,(? za? w)) bc) (zedw #x43 w)]
[`(ld (,(? za? w)) de) (zedw #x53 w)]
[`(ld (,(? za? w)) hl) (zw #x22 w)]
[`(ld (,(? za? w)) sp) (zedw #x73 w)]
[`(ld (,(? za? w)) ix) (zddw #x22 w)]
[`(ld (,(? za? w)) iy) (zfdw #x22 w)]

[`(ld sp hl) (db #xf9)]
[`(ld sp ix) (zdd #xf9)]
[`(ld sp iy) (zfd #xf9)]
Expand All @@ -272,7 +279,7 @@
[`(add a l) (db #xa5)]
[`(add a (hl)) (db #xa6)]
[`(add a a) (db #xa7)]
[`(add a ,(? zb? n)) (zb #xc6)]
[`(add a ,(? zb? n)) (zb #xc6 n)]
[`(add a ixh) (zdd #xa4)]
[`(add a ixl) (zdd #xa5)]
[`(add a (ix ,(? zoff? n))) (zdds #xa6 n)]
Expand Down Expand Up @@ -301,7 +308,7 @@
[`(adc a l) (db #x8d)]
[`(adc a (hl)) (db #x8e)]
[`(adc a a) (db #x8f)]
[`(adc a ,(? zb? n)) (zb #xce)]
[`(adc a ,(? zb? n)) (zb #xce n)]
[`(adc hl bc) (zed #x4a)]
[`(adc hl de) (zed #x5a)]
[`(adc hl hl) (zed #x6a)]
Expand All @@ -321,7 +328,7 @@
[`(sub l) (db #x95)]
[`(sub (hl)) (db #x96)]
[`(sub a) (db #x97)]
[`(sub ,(? zb? n)) (zb #xd6)]
[`(sub ,(? zb? n)) (zb #xd6 n)]
[`(sub ixh) (zdd #x94)]
[`(sub ixl) (zdd #x95)]
[`(sub (ix ,(? zoff? s))) (zdds #x96 s)]
Expand All @@ -344,6 +351,7 @@
[`(sbc a iyh) (zfd #x9c)]
[`(sbc a iyl) (zfd #x9d)]
[`(sbc a (iy ,(? zoff? s))) (zfds #x9e)]
[`(sbc a ,(? zb? n)) (zb #xde n)]

[`(and b) (db #xa0)]
[`(and c) (db #xa1)]
Expand Down

0 comments on commit f154b2c

Please sign in to comment.