]> Untitled Git - emu8051.git/commitdiff
Zero all memories when initializing program
authorHugo Villeneuve <hugo@hugovil.com>
Sat, 23 Nov 2013 04:42:14 +0000 (23:42 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Sat, 23 Nov 2013 04:42:14 +0000 (23:42 -0500)
This is especially usefull to have NOP in program memory.

src/memory.c

index 67a9266adbb3be4437aca514e36c42715fb13778..c5b2acf51c7384776af89fe6b60ad346e27bebcd 100644 (file)
@@ -70,6 +70,8 @@ memory_init(void)
                        log_err("%s", strerror(errno));
                        exit(1);
                }
+
+               memset(m->buf, 0x00, m->size);
        }
 }