mirror of
https://git.sr.ht/~crc_/retroforth
synced 2024-11-16 19:48:56 +01:00
fix repl.c to properly allow compiler flags to override default settings (thanks grobe0ba on #retro for pointing this out)
FossilOrigin-Name: 56f65c222de1d1d80d84a3ce12c5f48e79605e4be503413a5e4c511ab02fd032
This commit is contained in:
parent
543f078725
commit
0c5e54c70c
6 changed files with 142 additions and 90 deletions
|
@ -72,6 +72,7 @@ DEVICES += interface/scripting.retro
|
|||
# DEVICES += interface/sockets.retro
|
||||
DEVICES += interface/sources.retro
|
||||
DEVICES += interface/multicore.retro
|
||||
DEVICES += interface/retro-napia.retro
|
||||
DEVICES += interface/deprecated.retro
|
||||
DEVICES += interface/unsigned.retro
|
||||
|
||||
|
|
1
Makefile
1
Makefile
|
@ -58,6 +58,7 @@ DEVICES += interface/scripting.retro
|
|||
DEVICES += interface/sources.retro
|
||||
DEVICES += interface/multicore.retro
|
||||
DEVICES += interface/unsigned.retro
|
||||
DEVICES += interface/retro-napia.retro
|
||||
DEVICES += interface/deprecated.retro
|
||||
|
||||
# -------------------------------------------------------------
|
||||
|
|
|
@ -6,6 +6,13 @@
|
|||
|
||||
- new words
|
||||
|
||||
- n:add
|
||||
- n:sub
|
||||
- n:mul
|
||||
- n:div
|
||||
- n:mod
|
||||
- n:divmod
|
||||
|
||||
- dictionary
|
||||
|
||||
- arrays
|
||||
|
@ -19,10 +26,13 @@
|
|||
|
||||
- recognize TAB as whitespace when including files
|
||||
|
||||
# Documentatio
|
||||
# Documentation
|
||||
|
||||
# Other
|
||||
|
||||
- d:source data on retro-unix now avoids duplicating the
|
||||
source filename
|
||||
|
||||
# Examples
|
||||
|
||||
- advent of code, 2021 (day 1, 2)
|
||||
|
|
20
interface/retro-napia.retro
Normal file
20
interface/retro-napia.retro
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
~~~
|
||||
:n:add + ;
|
||||
:n:sub - ;
|
||||
:n:mul * ;
|
||||
:n:div / ;
|
||||
:n:mod mod ;
|
||||
:n:divmod /mod ;
|
||||
~~~
|
||||
|
||||
~~~
|
||||
'retro-napia.retro
|
||||
dup 'n:add d:lookup d:source store
|
||||
dup 'n:sub d:lookup d:source store
|
||||
dup 'n:mul d:lookup d:source store
|
||||
dup 'n:div d:lookup d:source store
|
||||
dup 'n:mod d:lookup d:source store
|
||||
dup 'n:divmod d:lookup d:source store
|
||||
drop
|
||||
~~~
|
156
vm/nga-c/image.c
156
vm/nga-c/image.c
|
@ -10,8 +10,8 @@
|
|||
#define CELL_MAX LLONG_MAX - 1
|
||||
#endif
|
||||
#endif
|
||||
CELL ngaImageCells = 17562;
|
||||
CELL ngaImage[] = { 1793,17071,17517,17561,202201,410,382,1230,1535,0,10,1,10,2,10,3,10,4,10,
|
||||
CELL ngaImageCells = 17643;
|
||||
CELL ngaImage[] = { 1793,17152,17598,17642,202201,410,382,1230,1535,0,10,1,10,2,10,3,10,4,10,
|
||||
5,10,6,10,7,10,8,10,11,10,12,10,13,10,14,10,15,10,16,10,
|
||||
17,10,18,10,19,10,20,10,21,10,22,10,23,10,24,10,25,68223234,1,2575,
|
||||
85000450,1,656912,161,178,268505089,63,62,285281281,0,63,2063,10,101384453,0,9,10,68485378,255,18350338,
|
||||
|
@ -20,8 +20,8 @@ CELL ngaImage[] = { 1793,17071,17517,17561,202201,410,382,1230,1535,0,10,1,10,2,
|
|||
101777669,1,17565186,107,524545,111,64,167838467,-1,134287105,3,59,659457,3,459023,128,2049,56,25,2049,
|
||||
128,1793,135,2049,135,117506307,0,128,0,524545,26,133,168820993,0,147,1642241,147,134283523,11,133,
|
||||
1793,128,524545,2049,128,1793,128,16846593,147,161,178,1793,64,16846593,147,133,178,1793,64,7,
|
||||
10,659713,1,659713,2,659713,3,659713,4,659713,5,1793,17326,17108737,3,2,524559,128,2049,128,
|
||||
2049,128,524545,0,128,524545,0,128,2049,142,168820998,2,16307,1230,167841793,211,9,17826049,0,211,
|
||||
10,659713,1,659713,2,659713,3,659713,4,659713,5,1793,17407,17108737,3,2,524559,128,2049,128,
|
||||
2049,128,524545,0,128,524545,0,128,2049,142,168820998,2,16388,1230,167841793,211,9,17826049,0,211,
|
||||
2,15,25,524546,188,134287105,212,116,2305,213,459023,221,134287361,212,216,659201,211,10,659969,7,
|
||||
2049,56,25,17694978,58,237,9,84152833,48,319750404,236,117507601,239,184618754,45,25,16974851,-1,168886532,1,
|
||||
134284289,1,252,134284289,0,239,660227,32,0,0,115,105,103,105,108,58,105,0,285278479,269,
|
||||
|
@ -170,7 +170,7 @@ CELL ngaImage[] = { 1793,17071,17517,17561,202201,410,382,1230,1535,0,10,1,10,2,
|
|||
110,58,105,110,99,0,659713,1,10,3114,3139,166,15534,0,110,58,100,101,99,0,
|
||||
659969,1,10,3128,3158,166,15534,0,110,58,98,101,116,119,101,101,110,63,0,67503109,
|
||||
1793,3166,67503109,67503109,2049,3106,10,1,3161,2049,2241,11,10,3142,3187,166,15534,0,83,99,
|
||||
111,112,101,76,105,115,116,0,17419,17473,10,3172,3198,166,15534,0,123,123,0,2049,
|
||||
111,112,101,76,105,115,116,0,17500,17554,10,3172,3198,166,15534,0,123,123,0,2049,
|
||||
1576,2,1,3187,2049,59,16,10,3190,3225,166,15534,0,45,45,45,114,101,118,101,
|
||||
97,108,45,45,45,0,2049,1576,1,3187,2049,3125,16,10,3207,3241,166,15534,0,125,
|
||||
125,0,1,3187,2049,56,4,15,11,1793,3255,3841,3187,4097,2,10,1,3250,1793,3281,
|
||||
|
@ -228,7 +228,7 @@ CELL ngaImage[] = { 1793,17071,17517,17561,202201,410,382,1230,1535,0,10,1,10,2,
|
|||
10,4239,4297,154,15534,0,84,101,109,112,83,116,114,105,110,103,115,0,32,4280,
|
||||
4317,154,15534,0,84,101,109,112,83,116,114,105,110,103,77,97,120,0,512,4298,
|
||||
4331,166,15534,0,83,84,82,73,78,71,83,0,2049,1545,3841,4297,3841,4317,19,18,
|
||||
10,4318,4353,154,0,0,67,117,114,114,101,110,116,0,26,10,4340,4370,166,0,
|
||||
10,4318,4353,154,0,0,67,117,114,114,101,110,116,0,8,10,4340,4370,166,0,
|
||||
0,115,58,112,111,105,110,116,101,114,0,3841,4353,3841,4317,19,2049,4331,17,10,
|
||||
4355,4391,166,0,0,115,58,110,101,120,116,0,1,4353,2049,3864,3841,4353,3841,4297,
|
||||
11,1793,4407,1,0,4097,4353,10,1,4402,9,10,4318,4423,166,15534,0,115,58,116,
|
||||
|
@ -815,78 +815,82 @@ CELL ngaImage[] = { 1793,17071,17517,17561,202201,410,382,1230,1535,0,10,1,10,2,
|
|||
47,109,111,100,0,1,1,1,0,1,8101,2049,10553,2,2049,10534,2049,10534,10,16004,
|
||||
16049,166,16058,0,42,47,109,111,100,0,1,1,1,8101,2049,10553,2049,10534,10,105,
|
||||
110,116,101,114,102,97,99,101,47,117,110,115,105,103,110,101,100,46,114,101,
|
||||
116,114,111,0,16038,16096,166,0,0,115,58,115,112,108,105,116,0,2049,7185,10,
|
||||
16083,16122,166,0,0,115,58,115,112,108,105,116,45,111,110,45,115,116,114,105,
|
||||
110,103,0,2049,7219,10,16099,16147,166,0,0,115,58,99,111,110,116,97,105,110,
|
||||
115,45,99,104,97,114,63,0,2049,4847,10,16125,16174,166,0,0,115,58,99,111,
|
||||
110,116,97,105,110,115,45,115,116,114,105,110,103,63,0,2049,5063,10,16150,16201,
|
||||
166,0,0,97,58,99,111,110,116,97,105,110,115,45,115,116,114,105,110,103,
|
||||
63,0,2049,9218,10,16177,16220,166,0,0,97,58,105,110,100,101,120,45,111,102,
|
||||
0,2049,9410,10,16204,16246,166,0,0,97,58,105,110,100,101,120,45,111,102,45,
|
||||
115,116,114,105,110,103,0,2049,9535,10,16223,16265,166,0,0,115,58,105,110,100,
|
||||
101,120,45,111,102,0,2049,4779,10,16249,16291,166,0,0,115,58,105,110,100,101,
|
||||
120,45,111,102,45,115,116,114,105,110,103,0,2049,5286,10,16268,16303,166,17090,0,
|
||||
84,73,66,0,1,7,15,10,16294,16323,166,17090,0,105,109,97,103,101,58,115,
|
||||
97,118,101,0,1,1000,2049,10553,2049,10534,10,16307,16341,166,0,0,101,100,105,116,
|
||||
63,0,2,1793,16348,1,8,11,10,1,16344,1793,16356,1,127,11,10,1,16352,2049,
|
||||
2255,22,10,16330,16374,166,0,0,103,97,116,104,101,114,0,2049,16341,1,15,1,
|
||||
4134,2049,64,10,16362,16394,166,0,0,99,121,99,108,101,0,2049,10883,2049,2217,4,
|
||||
8,2049,2644,25,3,2049,16374,1,16394,7,10,16307,16427,166,17090,0,112,97,114,115,
|
||||
101,45,117,110,116,105,108,0,1793,16439,2049,4451,2049,4234,2049,16394,771,2049,4096,10,
|
||||
1,16429,2049,4260,10,16410,16455,166,17090,0,115,58,103,101,116,0,1793,16477,1793,16463,
|
||||
1,13,11,10,1,16459,1793,16471,1,10,11,10,1,16467,2049,2255,22,10,1,16457,
|
||||
2049,16427,10,16444,16493,166,17090,0,99,108,101,97,114,0,2049,4472,92,94,91,50,
|
||||
74,92,94,91,48,59,48,72,0,1,16495,2049,8461,2049,10659,10,16482,16527,154,17090,
|
||||
0,78,111,69,99,104,111,0,0,16515,16537,154,0,0,69,79,84,0,0,16528,
|
||||
16552,154,0,0,73,103,110,111,114,105,110,103,0,0,16538,16568,166,0,0,105,
|
||||
103,110,111,114,105,110,103,63,0,3841,16552,10,16553,16584,166,0,0,118,101,114,
|
||||
115,105,111,110,0,3841,4,1,100,20,10,16571,16601,166,0,0,100,111,110,101,
|
||||
63,0,2,4097,16537,1793,16610,1,13,11,10,1,16606,1793,16618,1,10,11,10,1,
|
||||
16614,1793,16626,1,32,11,10,1,16622,2049,2298,22,22,10,16590,16643,166,0,0,101,
|
||||
111,108,63,0,3841,16537,1793,16651,1,13,11,10,1,16647,1793,16659,1,10,11,10,
|
||||
1,16655,2049,2255,22,10,16633,16677,166,0,0,118,97,108,105,100,63,0,2,2049,
|
||||
102,2049,2812,10,16665,16698,166,0,0,99,104,101,99,107,45,101,111,102,0,2,
|
||||
1793,16705,1,-1,11,10,1,16701,1793,16713,1,4,11,10,1,16709,2049,2255,22,1793,
|
||||
16723,2049,10950,10,1,16720,9,10,16683,16735,166,0,0,98,115,0,2049,4212,1,2,
|
||||
2049,2675,1793,16747,2049,4160,3,10,1,16743,9,2049,4160,3,10,16727,16768,166,0,0,
|
||||
99,104,101,99,107,45,98,115,0,2,1793,16775,1,8,11,10,1,16771,1793,16783,
|
||||
1,127,11,10,1,16779,2049,2255,22,1793,16793,2049,16735,10,1,16790,9,10,16754,16808,
|
||||
166,0,0,99,104,101,99,107,0,2049,16698,2049,16768,10,16797,16828,166,0,0,99,
|
||||
104,97,114,97,99,116,101,114,0,2049,10883,2,2049,4134,10,16813,16846,166,0,0,
|
||||
98,117,102,102,101,114,0,1793,16856,2049,16303,2049,4234,8,2049,4096,10,1,16848,2049,
|
||||
4260,10,16834,16877,166,0,0,114,101,97,100,45,116,111,107,101,110,0,1793,16893,
|
||||
1793,16888,2049,16828,2049,16808,2049,16601,10,1,16881,2049,2397,10,1,16879,2049,16846,2049,4587,
|
||||
10,16861,16911,166,0,0,105,110,112,117,116,0,2049,16877,2049,16677,10,16900,16929,166,
|
||||
0,0,112,114,111,99,101,115,115,0,2049,16568,1793,16947,771,2049,16643,1793,16943,1,
|
||||
16552,2049,3931,10,1,16938,9,10,1,16933,2049,2862,1,410,1,15,2049,64,10,16515,
|
||||
16966,178,17090,0,47,47,0,2049,15452,1,16552,2049,3916,10,16958,16985,166,17090,0,98,
|
||||
97,110,110,101,114,0,2049,16584,2049,4472,82,69,84,82,79,32,49,50,32,40,
|
||||
37,110,46,37,110,41,92,110,0,1,16989,2049,8461,2049,10659,2049,10735,2049,1545,2049,
|
||||
10735,18,2049,1545,2049,4472,37,110,32,77,97,120,44,32,37,110,32,85,115,101,
|
||||
100,44,32,37,110,32,70,114,101,101,92,110,0,1,17025,2049,8461,2049,10659,10,
|
||||
16973,17071,166,17090,0,108,105,115,116,101,110,0,3841,16527,1793,17078,2049,16985,10,1,
|
||||
17075,2049,72,2049,16911,2049,16929,1,17082,7,10,105,110,116,101,114,102,97,99,101,
|
||||
47,114,101,116,114,111,45,117,110,105,120,46,114,101,116,114,111,0,17059,17130,
|
||||
154,0,0,83,111,117,114,99,101,115,0,1,17367,0,0,0,0,0,0,0,
|
||||
116,114,111,0,16038,16094,166,516096,0,110,58,97,100,100,0,17,10,16083,16107,166,
|
||||
516096,0,110,58,115,117,98,0,18,10,16096,16120,166,516096,0,110,58,109,117,108,
|
||||
0,19,10,16109,16133,166,516096,0,110,58,100,105,118,0,197652,10,16122,16146,166,516096,
|
||||
0,110,58,109,111,100,0,788,10,16135,16162,166,516096,0,110,58,100,105,118,109,
|
||||
111,100,0,20,10,16148,16177,166,0,0,115,58,115,112,108,105,116,0,2049,7185,
|
||||
10,16164,16203,166,0,0,115,58,115,112,108,105,116,45,111,110,45,115,116,114,
|
||||
105,110,103,0,2049,7219,10,16180,16228,166,0,0,115,58,99,111,110,116,97,105,
|
||||
110,115,45,99,104,97,114,63,0,2049,4847,10,16206,16255,166,0,0,115,58,99,
|
||||
111,110,116,97,105,110,115,45,115,116,114,105,110,103,63,0,2049,5063,10,16231,
|
||||
16282,166,0,0,97,58,99,111,110,116,97,105,110,115,45,115,116,114,105,110,
|
||||
103,63,0,2049,9218,10,16258,16301,166,0,0,97,58,105,110,100,101,120,45,111,
|
||||
102,0,2049,9410,10,16285,16327,166,0,0,97,58,105,110,100,101,120,45,111,102,
|
||||
45,115,116,114,105,110,103,0,2049,9535,10,16304,16346,166,0,0,115,58,105,110,
|
||||
100,101,120,45,111,102,0,2049,4779,10,16330,16372,166,0,0,115,58,105,110,100,
|
||||
101,120,45,111,102,45,115,116,114,105,110,103,0,2049,5286,10,16349,16384,166,17171,
|
||||
0,84,73,66,0,1,7,15,10,16375,16404,166,17171,0,105,109,97,103,101,58,
|
||||
115,97,118,101,0,1,1000,2049,10553,2049,10534,10,16388,16422,166,0,0,101,100,105,
|
||||
116,63,0,2,1793,16429,1,8,11,10,1,16425,1793,16437,1,127,11,10,1,16433,
|
||||
2049,2255,22,10,16411,16455,166,0,0,103,97,116,104,101,114,0,2049,16422,1,15,
|
||||
1,4134,2049,64,10,16443,16475,166,0,0,99,121,99,108,101,0,2049,10883,2049,2217,
|
||||
4,8,2049,2644,25,3,2049,16455,1,16475,7,10,16388,16508,166,17171,0,112,97,114,
|
||||
115,101,45,117,110,116,105,108,0,1793,16520,2049,4451,2049,4234,2049,16475,771,2049,4096,
|
||||
10,1,16510,2049,4260,10,16491,16536,166,17171,0,115,58,103,101,116,0,1793,16558,1793,
|
||||
16544,1,13,11,10,1,16540,1793,16552,1,10,11,10,1,16548,2049,2255,22,10,1,
|
||||
16538,2049,16508,10,16525,16574,166,17171,0,99,108,101,97,114,0,2049,4472,92,94,91,
|
||||
50,74,92,94,91,48,59,48,72,0,1,16576,2049,8461,2049,10659,10,16563,16608,154,
|
||||
17171,0,78,111,69,99,104,111,0,0,16596,16618,154,0,0,69,79,84,0,0,
|
||||
16609,16633,154,0,0,73,103,110,111,114,105,110,103,0,0,16619,16649,166,0,0,
|
||||
105,103,110,111,114,105,110,103,63,0,3841,16633,10,16634,16665,166,0,0,118,101,
|
||||
114,115,105,111,110,0,3841,4,1,100,20,10,16652,16682,166,0,0,100,111,110,
|
||||
101,63,0,2,4097,16618,1793,16691,1,13,11,10,1,16687,1793,16699,1,10,11,10,
|
||||
1,16695,1793,16707,1,32,11,10,1,16703,2049,2298,22,22,10,16671,16724,166,0,0,
|
||||
101,111,108,63,0,3841,16618,1793,16732,1,13,11,10,1,16728,1793,16740,1,10,11,
|
||||
10,1,16736,2049,2255,22,10,16714,16758,166,0,0,118,97,108,105,100,63,0,2,
|
||||
2049,102,2049,2812,10,16746,16779,166,0,0,99,104,101,99,107,45,101,111,102,0,
|
||||
2,1793,16786,1,-1,11,10,1,16782,1793,16794,1,4,11,10,1,16790,2049,2255,22,
|
||||
1793,16804,2049,10950,10,1,16801,9,10,16764,16816,166,0,0,98,115,0,2049,4212,1,
|
||||
2,2049,2675,1793,16828,2049,4160,3,10,1,16824,9,2049,4160,3,10,16808,16849,166,0,
|
||||
0,99,104,101,99,107,45,98,115,0,2,1793,16856,1,8,11,10,1,16852,1793,
|
||||
16864,1,127,11,10,1,16860,2049,2255,22,1793,16874,2049,16816,10,1,16871,9,10,16835,
|
||||
16889,166,0,0,99,104,101,99,107,0,2049,16779,2049,16849,10,16878,16909,166,0,0,
|
||||
99,104,97,114,97,99,116,101,114,0,2049,10883,2,2049,4134,10,16894,16927,166,0,
|
||||
0,98,117,102,102,101,114,0,1793,16937,2049,16384,2049,4234,8,2049,4096,10,1,16929,
|
||||
2049,4260,10,16915,16958,166,0,0,114,101,97,100,45,116,111,107,101,110,0,1793,
|
||||
16974,1793,16969,2049,16909,2049,16889,2049,16682,10,1,16962,2049,2397,10,1,16960,2049,16927,2049,
|
||||
4587,10,16942,16992,166,0,0,105,110,112,117,116,0,2049,16958,2049,16758,10,16981,17010,
|
||||
166,0,0,112,114,111,99,101,115,115,0,2049,16649,1793,17028,771,2049,16724,1793,17024,
|
||||
1,16633,2049,3931,10,1,17019,9,10,1,17014,2049,2862,1,410,1,15,2049,64,10,
|
||||
16596,17047,178,17171,0,47,47,0,2049,15452,1,16633,2049,3916,10,17039,17066,166,17171,0,
|
||||
98,97,110,110,101,114,0,2049,16665,2049,4472,82,69,84,82,79,32,49,50,32,
|
||||
40,37,110,46,37,110,41,92,110,0,1,17070,2049,8461,2049,10659,2049,10735,2049,1545,
|
||||
2049,10735,18,2049,1545,2049,4472,37,110,32,77,97,120,44,32,37,110,32,85,115,
|
||||
101,100,44,32,37,110,32,70,114,101,101,92,110,0,1,17106,2049,8461,2049,10659,
|
||||
10,17054,17152,166,17171,0,108,105,115,116,101,110,0,3841,16608,1793,17159,2049,17066,10,
|
||||
1,17156,2049,72,2049,16992,2049,17010,1,17163,7,10,105,110,116,101,114,102,97,99,
|
||||
101,47,114,101,116,114,111,45,117,110,105,120,46,114,101,116,114,111,0,17140,
|
||||
17211,154,0,0,83,111,117,114,99,101,115,0,1,17448,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17117,
|
||||
17270,166,0,0,107,110,111,119,110,63,0,2,1,17130,2049,9218,10,17258,17287,166,
|
||||
0,0,105,110,100,101,120,0,1,17130,4,2049,9535,1,17130,4,2049,9355,10,17276,
|
||||
17310,166,0,0,114,101,99,111,114,100,0,2049,4500,2,1,17130,2049,3864,3841,17130,
|
||||
1,17130,17,16,10,1793,17365,2049,15387,2049,17270,1793,17335,2049,17287,10,1,17332,1793,17342,
|
||||
2049,17310,10,1,17339,2049,64,1793,17355,1,190,1,2,17,8,10,1,17348,2049,2229,
|
||||
2049,1576,2049,184,16,10,1,17326,100,105,99,116,45,119,111,114,100,115,45,108,
|
||||
105,115,116,105,110,103,46,102,111,114,116,104,0,17059,17405,166,17367,0,100,58,
|
||||
119,111,114,100,115,0,1793,17414,2049,188,2049,10659,2049,10629,10,1,17407,2049,8706,10,
|
||||
17392,17437,166,17367,0,100,58,119,111,114,100,115,45,119,105,116,104,0,2049,1977,
|
||||
2049,5574,1793,17468,2049,188,2,2049,1977,2049,5063,1793,17457,2049,10659,2049,10629,10,1,17452,
|
||||
1793,17463,3,10,1,17461,2049,64,10,1,17443,2049,8706,10,17419,17494,166,17367,0,100,
|
||||
105,115,112,108,97,121,45,105,102,45,108,101,102,116,0,2,2049,1977,2049,5520,
|
||||
1793,17506,2049,10659,2049,10629,10,1,17501,1793,17512,3,10,1,17510,2049,64,10,17419,17545,
|
||||
166,17367,0,100,58,119,111,114,100,115,45,98,101,103,105,110,110,105,110,103,
|
||||
45,119,105,116,104,0,2049,1977,2049,5574,1793,17556,2049,188,2049,17494,10,1,17551,2049,
|
||||
8706,10,0 };
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
17198,17351,166,0,0,107,110,111,119,110,63,0,2,1,17211,2049,9218,10,17339,17368,
|
||||
166,0,0,105,110,100,101,120,0,1,17211,4,2049,9535,1,17211,4,2049,9355,10,
|
||||
17357,17391,166,0,0,114,101,99,111,114,100,0,2049,4500,2,1,17211,2049,3864,3841,
|
||||
17211,1,17211,17,16,10,1793,17446,2049,15387,2049,17351,1793,17416,2049,17368,10,1,17413,1793,
|
||||
17423,2049,17391,10,1,17420,2049,64,1793,17436,1,190,1,2,17,8,10,1,17429,2049,
|
||||
2229,2049,1576,2049,184,16,10,1,17407,100,105,99,116,45,119,111,114,100,115,45,
|
||||
108,105,115,116,105,110,103,46,102,111,114,116,104,0,17140,17486,166,17448,0,100,
|
||||
58,119,111,114,100,115,0,1793,17495,2049,188,2049,10659,2049,10629,10,1,17488,2049,8706,
|
||||
10,17473,17518,166,17448,0,100,58,119,111,114,100,115,45,119,105,116,104,0,2049,
|
||||
1977,2049,5574,1793,17549,2049,188,2,2049,1977,2049,5063,1793,17538,2049,10659,2049,10629,10,1,
|
||||
17533,1793,17544,3,10,1,17542,2049,64,10,1,17524,2049,8706,10,17500,17575,166,17448,0,
|
||||
100,105,115,112,108,97,121,45,105,102,45,108,101,102,116,0,2,2049,1977,2049,
|
||||
5520,1793,17587,2049,10659,2049,10629,10,1,17582,1793,17593,3,10,1,17591,2049,64,10,17500,
|
||||
17626,166,17448,0,100,58,119,111,114,100,115,45,98,101,103,105,110,110,105,110,
|
||||
103,45,119,105,116,104,0,2049,1977,2049,5574,1793,17637,2049,188,2049,17575,10,1,17632,
|
||||
2049,8706,10,0 };
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
/* RETRO is a clean, elegant, and pragmatic dialect of Forth. It provides
|
||||
a simple alternative for those willing to make a break from legacy
|
||||
systems.
|
||||
/* RETRO is a clean, elegant, and pragmatic dialect of Forth.
|
||||
It provides a simple alternative for those willing to make a
|
||||
break from legacy systems.
|
||||
|
||||
The language draws influences from many sources including traditional
|
||||
Forth systems, cmForth, colorForth, Factor, and Parable. It was
|
||||
designed to be easy to grasp and adapt to specific uses.
|
||||
The language draws influences from many sources including
|
||||
traditional Forth systems, cmForth, colorForth, Factor, and
|
||||
Parable. It was designed to be easy to grasp and adapt to
|
||||
specific uses.
|
||||
|
||||
The basic language is very portable and runs on a tiny virtual machine.
|
||||
The basic language is very portable and runs on a tiny
|
||||
virtual machine.
|
||||
|
||||
This file contains a minimal implementation of the virtual machine.
|
||||
This file contains a minimal implementation of the virtual
|
||||
machine.
|
||||
|
||||
|
||||
Copyright (c) 2008 - 2021, Charles Childers
|
||||
Copyright (c) 2008 - 2022, Charles Childers
|
||||
Copyright (c) 2009 - 2010, Luke Parrish
|
||||
Copyright (c) 2010, Marc Simpson
|
||||
Copyright (c) 2010, Jay Skeer
|
||||
|
@ -25,13 +27,27 @@
|
|||
#include <stdint.h>
|
||||
#include <limits.h>
|
||||
|
||||
#ifndef BIT64
|
||||
#define CELL int32_t
|
||||
#define CELL_MIN INT_MIN + 1
|
||||
#define CELL_MAX INT_MAX - 1
|
||||
#else
|
||||
#define CELL int64_t
|
||||
#define CELL_MIN LLONG_MIN + 1
|
||||
#define CELL_MAX LLONG_MAX - 1
|
||||
#endif
|
||||
|
||||
#define IMAGE_SIZE 524288 /* Amount of RAM. */
|
||||
#define ADDRESSES 128 /* Max address stack depth */
|
||||
#define STACK_DEPTH 32 /* Max data stack depth */
|
||||
#ifndef IMAGE_SIZE
|
||||
#define IMAGE_SIZE 524288 /* Amount of RAM, in cells */
|
||||
#endif
|
||||
|
||||
#ifndef ADDRESSES
|
||||
#define ADDRESSES 256 /* Depth of address stack */
|
||||
#endif
|
||||
|
||||
#ifndef STACK_DEPTH
|
||||
#define STACK_DEPTH 256 /* Depth of data stack */
|
||||
#endif
|
||||
|
||||
CELL sp, rp, ip; /* Stack and instruction pointers */
|
||||
CELL data[STACK_DEPTH]; /* The data stack */
|
||||
|
|
Loading…
Reference in a new issue