aboutsummaryrefslogtreecommitdiff
path: root/dcpu16.h
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2012-05-09 00:03:40 +0000
committerDimitri Sokolyuk <demon@dim13.org>2012-05-09 00:03:40 +0000
commit11129399de73cd03a914ee7ddc2dd641feb83f21 (patch)
treea2e051cf27f4d4156613d48e6e791c983dac90a0 /dcpu16.h
parent625200d796e6652e084ad44563234868a87b697e (diff)
devices stub
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);