aboutsummaryrefslogtreecommitdiff
path: root/dcpu16.h
diff options
context:
space:
mode:
Diffstat (limited to 'dcpu16.h')
-rw-r--r--dcpu16.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/dcpu16.h b/dcpu16.h
index 084ca22..9a47624 100644
--- a/dcpu16.h
+++ b/dcpu16.h
@@ -47,18 +47,15 @@ enum { NOP, JSR, BRK,
struct context {
unsigned short mem[MEMSZ];
unsigned short reg[nReg];
- struct device *dev;
+ struct device {
+ unsigned int id;
+ unsigned int version;
+ unsigned int manu;
+ void (*cb)(struct context *);
+ } dev[256];
int ndev;
};
-struct device {
- unsigned int id;
- unsigned int version;
- unsigned int manufacturer;
- void (*cb)(struct context *);
- struct device *next;
-};
-
/* display: 32x12 (128x96) + 16 pixel boarder, font 8x4 */
int compile(FILE *, unsigned short *, size_t);