Skip to content

Commit bf27c0c

Browse files
committed
Tau support
1 parent 64bff7d commit bf27c0c

3 files changed

Lines changed: 107 additions & 3 deletions

File tree

buildrun.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
java -jar prog8compiler-10.2-all.jar -target cx16 pi.p8
3+
java -jar prog8compiler-10.2.1-all.jar -target cx16 pi.p8
44
sed -i "/jsr cx16.init_system_phase2/d" pi.asm
55
sed -i "/jmp cx16.cleanup_at_exit/d" pi.asm
66
sed -ie "s/.word (+), 2025/.word (+), 0/" pi.asm

expected.txt

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,103 @@
5858
12147221317947647772622414254854540332157185306142288137585043063321751829798662
5959
23717215916077166925474873898665494945011465406284336639379003976926567214638530
6060
67360965712091807638327166416274888800786925602902284721040317211860820419000422
61+
62+
63+
64+
65+
66+
67+
68+
69+
70+
71+
72+
73+
74+
75+
76+
77+
78+
79+
80+
81+
82+
83+
84+
85+
86+
87+
88+
89+
90+
91+
92+
93+
94+
95+
96+
97+
98+
99+
100+
101+
6.283185307179586476925286766559005768394338798750211641949889184615632812572417
102+
99725606965068423413596429617302656461329418768921910116446345071881625696223490
103+
05682054038770422111192892458979098607639288576219513318668922569512964675735663
104+
30542403818291297133846920697220908653296426787214520498282547449174013212631176
105+
34976304184192565850818343072873578518072002266106109764093304276829390388302321
106+
88661145407315191839061843722347638652235862102370961489247599254991347037715054
107+
49782455876366023898259667346724881313286172042789892790449474381404359721887405
108+
54107843435258635350476934963693533881026400113625429052712165557154268551557921
109+
83472743574429368818024499068602930991707421015845593785178470840399122242580439
110+
21728068836319627259549542619921037414422699999996745956099902119463465632192637
111+
19004891891069381660528504461650668937007052386237634202000627567750577317506641
112+
67628412343553382946071965069808575109374623191257277647075751875039155637155610
113+
64342453613226003855753222391818432840397876190514402130971726557731872306763655
114+
93646060390407060370593799154724519882778249944355056695826303114971448490830139
115+
19016590662337234557117781501967635092749298786385101208018554033422780196976480
116+
25716723207127415320209420363885911192397893535674898896510759549453694208095069
117+
29241609336851813898258662735405797830420950432411393204811607630038702250676486
118+
00711752804949929465278283985452085398455935647095632720186834432824398491726300
119+
60572365949111413499677010989177173853991381854421595018605910642330689974405511
120+
92047296133099823976366959550713273961485308505572510363683514934578195554558760
121+
01632941200322904983843464344295447002828839471370963227223147051042669514836989
122+
36877046647814788286669095524833725037967138971124198438444368545100508513775343
123+
58098920330693360997725446558357217156876765593595336290820190776757272190136012
124+
84502504102347859697921682569772538912084839305700444213223726134885572440783898
125+
90094247427573921912728743834574935529315147924827781731665291991626780956055180
126+
19893152815790253893679670519141965164524104497881545343895653696520295398180528
127+
02727888749106101364069925049034987993028628596183813185018744433929230314197167
128+
74821195771919545950997860323507856936276537367737885548311983711850491907918862
129+
09994504936169197454728939169730767347244525219824921610248776878090248827309952
130+
55615954313828719954002592321788833897371116968127068441444516569772963169120570
131+
12033685478904534935357790504277045099909333455647972913192232709772461154912996
132+
07118726913634864822503015213895890219319218805045775942178629133827373445749788
133+
11202030066172358573618417495218356498771780194298193519705227310995637862595696
134+
43365997897445317609715128028540955110264759282903047492468729085716889590531735
135+
64210228270947147904622685433220427193907246288590496987437422029153080718055986
136+
88074840146211570781243967748956169569793666428914277375038870128604369063820969
137+
62010741229361349838556382395879904122839326857508881287490247436384359996782031
138+
83912362935028538247949788181437298846392313589041619029310045046320776386028418
139+
75242757119132778755741660781395841546934443651251993230028430061360768954690984
140+
05210829331850402994885701465037332004264868176381420972663469299302907811592537
141+
12201101621331759399632714947276810514291820579412828022194241256087807951903135
142+
43154008406757398720144611175263527188437462502942410658563836523722517346431583
143+
96829697658328941219150541391444183513423344582196338183056034701342549716644574
144+
36704187079314502421671583027397641828884201350206693422062825342227398173170327
145+
96630039403303023370342875315236703113017698199797199647746910566632710152958370
146+
71786452370979264265866179714128409350518141830962833099718923274360541963988619
147+
84897791514256578118464665219459942416886714653097876478238651949273346116720828
148+
56277660640764980751797048748834058265531236187546888061414938422403826040660760
149+
39524220220089858643032168488971927533967790457369566247105316426289915371452486
150+
68837860793728524868215464539560561463783088220208936465054324021053045442233207
151+
93331146185094221115707526933641306219793053837241129538625141172713240371162014
152+
58721319752972235820906697700692227315373506498883336079253159575437112169105930
153+
82533081706122868886371735395029132281360140047575531826880342549894084112446107
154+
79891226281422540008157094665398781629093292917615945416533661268657175713966104
155+
71617866131514813590914327550508404229911523162800500252457188260432943101958518
156+
46198159309475225103531350271503565933290955834900225992297806092798942659242146
157+
80875037914719229178038779426223580859565712950064063973830280574161719809602188
158+
24294442635895295545244828509709080664314370612284576275170086126643503659597324
159+
47434431832154333850949747797330989890022930812568673278758007953853134429277061
160+
34721931424183615276654332832549777601573851205804569442080634423721640838000845

pi.p8

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
main {
2020

21+
const bool TAU = false
22+
2123
; div routine writes its answer into this
2224
; Also used as input for div
2325
ubyte[3] @shared @requirezp asmAnswer
@@ -63,7 +65,8 @@ main {
6365

6466
; Used to be to (length + 1) << 1 but this allows for smaller PRG
6567
for cx16.r0 in A to 37143 step 2 {
66-
@(cx16.r0) = 2
68+
if TAU @(cx16.r0) = 4
69+
else @(cx16.r0) = 2
6770
@(cx16.r0 + 1) = 0
6871
}
6972

@@ -72,7 +75,8 @@ main {
7275
; But I don't think it can be done without increasing PRG size.
7376
; As of R43, the sequence "3." is now in ROM and RAM, but there's no way to
7477
; take advantage of that to decrease the PRG size. memory_copy is larger.
75-
txt.chrout('3')
78+
if TAU txt.chrout('6')
79+
else txt.chrout('3')
7680
txt.chrout('.')
7781

7882
for cx16.r1 in 1 to numberOfDigits {

0 commit comments

Comments
 (0)