Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,30 @@
real Stack(10);
int SP;
proc Push(X);
real X;
[Stack(SP):= X; SP:= SP+1];
func real Pop;
[SP:= SP-1; return Stack(SP)];
char Str; real Top; int Token, I;
[Str:= "3 4 2 * 1 5 - 2 3 ^^ ^^ / + ";
SP:= 0;
Format(6, 8);
loop [repeat Token:= Str(0); Str:= Str+1;
until Token # ^ ; \skip space characters
case Token of
^+: [Top:= Pop; Push(Pop+Top)];
^-: [Top:= Pop; Push(Pop-Top)];
^*: [Top:= Pop; Push(Pop*Top)];
^/: [Top:= Pop; Push(Pop/Top)];
^^: [Top:= Pop; Push(Pow(Pop, Top))];
$A0: quit \space with MSB set
other [Push(float(Token-^0))]; \single digit number
ChOut(0, Token);
for I:= 0 to SP-1 do \show stack
RlOut(0, Stack(I));
CrLf(0);
];
]