From 70b6c9964ce7dbe0457af41067a7d3c6e044bbbf Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Sat, 16 Nov 2013 16:39:51 -0500 Subject: [PATCH] Add comment about reset value of stack pointer --- src/cpu8051.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cpu8051.c b/src/cpu8051.c index a44cd7f..213f61b 100644 --- a/src/cpu8051.c +++ b/src/cpu8051.c @@ -118,6 +118,8 @@ cpu8051_Reset(void) memory_sfr_write8(_P1_, 0xFF); memory_sfr_write8(_P2_, 0xFF); memory_sfr_write8(_P3_, 0xFF); + + /* The default value of SP (after system reset) is 07 */ memory_sfr_write8(_SP_, 0x07); } -- 2.20.1