Re: Ongoing Pi Programming Contest Message #39 Posted by Egan Ford on 23 Oct 2008, 3:16 p.m., in response to message #27 by Kiyoshi Akima
Hello Kiyoshi,
You may find this useful: http://www.hpmuseum.org/cgisys/cgiwrap/hpmuseum/articles.cgi?read=866.
It's a "compiler" for the Nonpareil Voyager emulators. After changing line 23 to Rv, I had no problem compiling and running your code.
Compiler options used:
vcomp.pl comp new 16C nst 16C.nst strip 8 pi.src
I was able to run this on an accelerated 16C in about 5 minutes (described in the link above). The registers contained as expected:
3
1415926535897
9323846264338
3279502884197
1693993751058
2097494459230
7816406286208
9986280348253
4211706798214
8086513282306
6470938446095
5058223172535
9408128481117
4502841027019
3852110555964
4622948954930
3819644288109
With vcomp you can also pretty print your code, e.g.:
vcomp.pl list c 3 16C.nst
001  2 2 027  F F 053  44 31 STO (i)
002  C C 028  34 x<>y 054  1 1
003  4 4 029  43 3 x>y 055  22 9 GTO 9
004  43,22, b LBL B 030  22 d GTO D 056  43,22, F LBL F
005  44 .1 STO .1 031  1 1 057  0 0
006  0 0 032  40 + 058  43,22, 9 LBL 9
007  44 32 STO I 033  42 22 x<>I 059  43 23 DSZ
008  43,22, C LBL C 034  22 C GTO C 060  22 E GTO E
009  21 8 GSB 8 035  43,22, d LBL D 061  43,22, 7 LBL 7
010  20 x 036  2 2 062  45 31 RCL (i)
011  45 .1 RCL .1 037  44 0 STO 0 063  40 +
012  45 31 RCL (i) 038  45 .1 RCL .1 064  44 31 STO (i)
013  20 x 039  1 1 065  43 21 RTN
014  40 + 040  30  066  43,22, 8 LBL 8
015  36 ENTER 041  43 30 x>0 067  9 9
016  36 ENTER 042  22 b GTO B 068  1 1
017  45 .1 RCL .1 043  1 1 069  8 8
018  42 A SL 044  0 0 070  4 4
019  1 1 045  44 32 STO I 071  E E
020  40 + 046  0 0 072  7 7
021  10 / 047  43,22, E LBL E 073  2 2
022  44 31 STO (i) 048  21 7 GSB 7 074  A A
023  33 Rv 049  21 8 GSB 8 075  0 0
024  43 36 LSTx 050  30  076  0 0
025  42 9 RMD 051  43 2 x<0 077  0 0
026  42 22 x<>I 052  22 F GTO F
vcomp.pl list linecode c 5 16C.nst
001 2 017 RCL .1 033 x<>I 049 GSB 8 065 RTN
002 C 018 SL 034 GTO C 050  066 LBL 8
003 4 019 1 035 LBL D 051 x<0 067 9
004 LBL B 020 + 036 2 052 GTO F 068 1
005 STO .1 021 / 037 STO 0 053 STO (i) 069 8
006 0 022 STO (i) 038 RCL .1 054 1 070 4
007 STO I 023 Rv 039 1 055 GTO 9 071 E
008 LBL C 024 LSTx 040  056 LBL F 072 7
009 GSB 8 025 RMD 041 x>0 057 0 073 2
010 x 026 x<>I 042 GTO B 058 LBL 9 074 A
011 RCL .1 027 F 043 1 059 DSZ 075 0
012 RCL (i) 028 x<>y 044 0 060 GTO E 076 0
013 x 029 x>y 045 STO I 061 LBL 7 077 0
014 + 030 GTO D 046 0 062 RCL (i)
015 ENTER 031 1 047 LBL E 063 +
016 ENTER 032 + 048 GSB 7 064 STO (i)
Edited: 23 Oct 2008, 3:27 p.m.
