dcpu16

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 4a5fdca121b7804509d05d5e787ff3d0ad8db4fa
parent a3c1c951b444edb670b92c880278ef78cf3df94e
Author: Brian Swetland <swetland@frotz.net>
Date:   Wed,  4 Apr 2012 04:10:25 -0700

dcpu: correctly initialize SP to 0xFFFF

Diffstat:
Mdcpu.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/dcpu.c b/dcpu.c @@ -165,8 +165,12 @@ void load(struct dcpu *d, FILE *fp) { int main(int argc, char **argv) { struct dcpu d; + memset(&d, 0, sizeof(d)); + d.sp = 0xffff; + load(&d, stdin); + dumpheader(); for (;;) { dumpstate(&d);