forked from KolibriOS/kolibrios
Brainfuck interpreter update
git-svn-id: svn://kolibrios.org@7560 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
b8e5a89fa2
commit
a43456eaa9
@ -94,6 +94,7 @@ void evalBrainFuckCode(dword code)
|
||||
void main()
|
||||
{
|
||||
dword brainFuckCode = 0;
|
||||
word maxLoop = 1000;
|
||||
|
||||
buffer = malloc(bufferSize);
|
||||
memory = malloc(memoryBrainfuck);
|
||||
@ -106,16 +107,19 @@ void main()
|
||||
ELSE
|
||||
{
|
||||
consoleInit();
|
||||
con_printf stdcall ("BrainF*ck interpreter v1.01\r\n");
|
||||
loop()
|
||||
con_printf stdcall ("BrainF*ck interpreter v1.05");
|
||||
WHILE(maxLoop)
|
||||
{
|
||||
con_printf stdcall ("\r\nEnter BrainF*ck code:\r\n");
|
||||
con_printf stdcall ("\r\n\r\nEnter code: ");
|
||||
con_gets stdcall(buffer, bufferSize);
|
||||
evalBrainFuckCode(EAX);
|
||||
con_printf stdcall ("\r\nOutput BrainF*ck:\r\n");
|
||||
brainFuckCode = EAX;
|
||||
con_printf stdcall ("Output: ");
|
||||
evalBrainFuckCode(brainFuckCode);
|
||||
maxLoop--;
|
||||
}
|
||||
}
|
||||
ExitProcess();
|
||||
|
||||
IF(initConsole) con_exit stdcall (0);
|
||||
ExitProcess();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
for file in `find ./ -type f -name "*.c"`
|
||||
do
|
||||
./cmm $file;
|
||||
cmm $file;
|
||||
done
|
Loading…
Reference in New Issue
Block a user