From eff0a366bbfff5db70778b4c90c8748c1f3bb4fb Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 2 May 2012 15:48:25 +0000 Subject: device stub --- dcpu16.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dcpu16.h b/dcpu16.h index 8e7b936..4f3522a 100644 --- a/dcpu16.h +++ b/dcpu16.h @@ -44,6 +44,21 @@ enum { NOP, JSR, BRK, #define KEYB 0x9000 #define KEYP 0x9010 +struct device { + unsigned int id; + unsigned int version; + unsigned int manufacturer; + void (*cb)(unsigned short *); + struct device *next; +}; + +struct context { + unsigned short mem[MEMSZ]; + unsigned short reg[nReg]; + struct device *dev; + int ndev; +}; + /* display: 32x12 (128x96) + 16 pixel boarder, font 8x4 */ unsigned short *compile(FILE *, size_t); -- cgit v1.2.3