forked from KolibriOS/kolibrios
Lisp v1.4 new version
git-svn-id: svn://kolibrios.org@7567 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
5831d02aa5
commit
396f192799
@ -55,7 +55,7 @@ dword evalLisp()
|
|||||||
{
|
{
|
||||||
s = DSBYTE[code];
|
s = DSBYTE[code];
|
||||||
|
|
||||||
while(s == ' ')
|
while (s == ' ') || (s == 9)
|
||||||
{
|
{
|
||||||
code++;
|
code++;
|
||||||
s = DSBYTE[code];
|
s = DSBYTE[code];
|
||||||
@ -184,13 +184,13 @@ void main()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
consoleInit();
|
consoleInit();
|
||||||
con_printf stdcall ("Lisp interpreter v1.3");
|
con_printf stdcall ("Lisp interpreter v1.4\r\n");
|
||||||
while(maxLoop)
|
while(maxLoop)
|
||||||
{
|
{
|
||||||
con_printf stdcall ("\r\n\r\nEnter code: ");
|
con_printf stdcall ("\r\n$ ");
|
||||||
con_gets stdcall(buffer, bufferSize);
|
con_gets stdcall(buffer, bufferSize);
|
||||||
code = EAX;
|
code = EAX;
|
||||||
code = txt;
|
//code = txt;
|
||||||
con_printf stdcall ("Output: ");
|
con_printf stdcall ("Output: ");
|
||||||
evalLisp();
|
evalLisp();
|
||||||
maxLoop--;
|
maxLoop--;
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
|
|
||||||
/* Lisp functions */
|
/* Lisp functions */
|
||||||
|
:dword std_exit()
|
||||||
|
{
|
||||||
|
con_exit stdcall (1);
|
||||||
|
ExitProcess();
|
||||||
|
}
|
||||||
|
|
||||||
:dword std_set(dword count, args)
|
:dword std_set(dword count, args)
|
||||||
{
|
{
|
||||||
dword name = 0;
|
dword name = 0;
|
||||||
@ -103,7 +109,7 @@ void Init()
|
|||||||
functions.set("str", #std_str);
|
functions.set("str", #std_str);
|
||||||
|
|
||||||
/* System functions */
|
/* System functions */
|
||||||
functions.set("exit", #ExitProcess);
|
functions.set("exit", #std_exit);
|
||||||
|
|
||||||
/* Math functions */
|
/* Math functions */
|
||||||
functions.set("+", #std_add);
|
functions.set("+", #std_add);
|
||||||
|
Loading…
Reference in New Issue
Block a user