demoforstack-push/pop;ThestoringofaCPUregisterinthestackiscalledaPUSH.;TheloadingofthecontentsofthestackbackintoaCPUregisteriscalledaPOP.org00hMain:;setSPatthedefaultlocation-07h-00000111BDefault:movR2,#12hmovR3,#22hmovR4,#32hmovR5,#42hmovR6,#52hmovR7,#62hpush2push3push4push5push6push7Second:movSP,#28h ;set RAM location 28h as the first stack locationpush2push3push4push5push6push7Third:setbPSW.3setbPSW.4movR2,#13hmovR3,#23hmovR4,#33hmovR5,#43hmovR6,#53hmovR7,#63hFourth:push2push3push4push5push6push7pop2pop3pop4pop5pop6pop7Fifth:pop2pop3pop4pop5pop6pop7pop2pop3pop4pop5pop6pop7end
when I tested this code, the simulator didn't pop the second push value.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
when I tested this code, the simulator didn't pop the second push value.