X-Git-Url: http://git.squeep.com/?p=dcpu16;a=blobdiff_plain;f=dcpu16.c;h=2a59d24e1cca31f5e161163fc8578d14fdcdc968;hp=cfa6d8a2b02e2faa3f11e144db8528b0338a8d5b;hb=395837ab88bd03a3dca10338b4cb0d53b4fa9587;hpb=eb3e31c1bfba67227dfd02890cc84330b1580918 diff --git a/dcpu16.c b/dcpu16.c index cfa6d8a..2a59d24 100644 --- a/dcpu16.c +++ b/dcpu16.c @@ -25,6 +25,8 @@ * TODO * drop checks for assigning to literals -- it won't affect anything anyhow * debug short literal decoding + * add callbacks queues for set/get, attach your own filters + * such as a display */ static const char * const src_id_ = "$Id$"; @@ -312,7 +314,7 @@ OP_IMPL(add) { if (val_a < 0x1f) { *a = acc; } - d->o = acc >> 16; + d->o = (acc > 0xffff); d->cycle += 2; } @@ -324,9 +326,9 @@ OP_IMPL(sub) { if (val_a < 0x1f) { *a = acc; - } - d->o = acc >> 16; + d->o = (acc > 0xffff); + } d->cycle += 2; }