The first and only 15C emulator on Android is from Vicinno Soft. They also have a 12C emulator on Android. With all the talk of the GSB -I bug, I figured it would be a good test to try to try on the Android app. I wrote the following test program:
001 42,21,11 LBL A
002 0 0
003 43,30, 0 TEST 0
004 43 32 RTN
005 3 3
006 16 CHS
007 44 25 STO[I]
008 32 25 GSB[I]
009 31 R/S
edit: align columns properly.
On my classic 15C in FIX 4, I run the program like this:
[f][A] - see "-3.0000"
[g][P/R] - see "000 -"
We load zero in line 2, then test for != 0. This is false, so we skip the return instruction. Lines 005 through 007 load -3 into [I]. After line 008, a branch is taken to line 3, which tests for !=0. This time the test is true, and the calculator executes a RTN. In line with the observed bug, this transfers execution to the line immediately after line 003, the GSB-I target. In other words, the RTN is executed again. When we switch to program mode, we see the PC is at line 000, just as if we had executed RTN without a pending GSB call.
I get identical results on the Android app. So this program is an emulator, rather than a simulator.
Edited: 21 Sept 2011, 5:26 p.m. after one or more responses were posted