picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit ad1140e51b7eb3394b7429ea06d150d93ebb0c8a
parent 310899470ebde9fcba69649ddad51563fc337875
Author: Alexander Burger <abu@software-lab.de>
Date:   Fri, 25 Feb 2011 19:13:31 +0100

Separate variable and function initialization
Diffstat:
Msrc64/arch/x86-64.l | 11+++--------
Msrc64/glob.l | 710++++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc64/lib/asm.l | 18+++++++++++++-----
3 files changed, 371 insertions(+), 368 deletions(-)

diff --git a/src64/arch/x86-64.l b/src64/arch/x86-64.l @@ -16,6 +16,9 @@ # Block operations: %rcx %rsi %rdi # C arguments: %rdi %rsi %rdx %rcx %r8 %r9 +# Machine specific +(de boxfun (Adr) Adr) + # Addressing modes (de byteReg (Reg) (cdr @@ -194,7 +197,6 @@ (prinst "mov" (byteVal Src) "%cl") (prinst (pack Cmd (unless (pre? "%" Dst) "q")) "%cl" Dst) ) ) - ### Instruction set ### (asm nop () (prinst "nop") ) @@ -319,7 +321,6 @@ (prinst "cld") (prinst "rep movsq") ) - # Arithmetics (asm add (Dst D Src S) (setq Dst (dst Dst D) Src (src Src S)) @@ -429,7 +430,6 @@ (asm clrc () (prinst "clc") ) - # Comparisons (asm cmp (Dst D Src S) (dstSrc "cmp" (dst Dst D) (src Src S)) ) @@ -476,7 +476,6 @@ (asm nul4 () (prinst "cmp" "%r12d" "%eax") ) - # Byte addressing (asm set (Dst D Src S) (setq Dst (dst Dst D) Src (src Src S)) @@ -492,7 +491,6 @@ (asm nul (Src S) (prinst "cmp" "%r12b" (src Src S)) ) - # Types (asm cnt (Src S) (prinst "testb" "$0x02" (lowByte (src Src S))) ) @@ -509,7 +507,6 @@ (asm atom (Src S) (prinst "testb" "$0x0E" (lowByte (src Src S))) ) - # Flow Control (asm call (Adr A) (nond @@ -783,7 +780,6 @@ (prinst "pop" "%r12") (prinst "pop" "%rbx") ) - # Stack Manipulations (asm push (Src S) (setq Src (src Src S)) @@ -882,7 +878,6 @@ (byteReg Reg) ) (prinst "jz" "1b") ) # until nz - # System (asm initData ()) diff --git a/src64/glob.l b/src64/glob.l @@ -1,4 +1,4 @@ -# 23jan11abu +# 25feb11abu # (c) Software Lab. Alexander Burger (data 'Globals 0) @@ -137,8 +137,8 @@ # Protected symbols initSym OS "*OS" TgOS initSym DB "*DB" Db1 - initSym Meth "meth" doMeth - initSym Quote "quote" doQuote + initFun Meth "meth" doMeth + initFun Quote "quote" doQuote initSym TSym "T" TSym # System globals @@ -174,376 +174,376 @@ initSym Bye "*Bye" Nil # System functions - initSym NIL "raw" doRaw - initSym NIL "alarm" doAlarm - initSym NIL "sigio" doSigio - initSym NIL "protect" doProtect - initSym NIL "heap" doHeap - initSym NIL "stack" doStack - initSym NIL "adr" doAdr - initSym NIL "env" doEnv - initSym NIL "up" doUp - initSym NIL "quit" doQuit - initSym NIL "errno" doErrno - initSym NIL "native" doNative - initSym NIL "lisp" doLisp - initSym NIL "args" doArgs - initSym NIL "next" doNext - initSym NIL "arg" doArg - initSym NIL "rest" doRest - initSym NIL "date" doDate - initSym NIL "time" doTime - initSym NIL "usec" doUsec - initSym NIL "pwd" doPwd - initSym NIL "cd" doCd - initSym NIL "ctty" doCtty - initSym NIL "info" doInfo - initSym NIL "file" doFile - initSym NIL "dir" doDir - initSym NIL "cmd" doCmd - initSym NIL "argv" doArgv - initSym NIL "opt" doOpt - initSym NIL "version" doVersion + initFun NIL "raw" doRaw + initFun NIL "alarm" doAlarm + initFun NIL "sigio" doSigio + initFun NIL "protect" doProtect + initFun NIL "heap" doHeap + initFun NIL "stack" doStack + initFun NIL "adr" doAdr + initFun NIL "env" doEnv + initFun NIL "up" doUp + initFun NIL "quit" doQuit + initFun NIL "errno" doErrno + initFun NIL "native" doNative + initFun NIL "lisp" doLisp + initFun NIL "args" doArgs + initFun NIL "next" doNext + initFun NIL "arg" doArg + initFun NIL "rest" doRest + initFun NIL "date" doDate + initFun NIL "time" doTime + initFun NIL "usec" doUsec + initFun NIL "pwd" doPwd + initFun NIL "cd" doCd + initFun NIL "ctty" doCtty + initFun NIL "info" doInfo + initFun NIL "file" doFile + initFun NIL "dir" doDir + initFun NIL "cmd" doCmd + initFun NIL "argv" doArgv + initFun NIL "opt" doOpt + initFun NIL "version" doVersion # Garbage collection - initSym NIL "gc" doGc + initFun NIL "gc" doGc # Mapping - initSym NIL "apply" doApply - initSym NIL "pass" doPass - initSym NIL "maps" doMaps - initSym NIL "map" doMap - initSym NIL "mapc" doMapc - initSym NIL "maplist" doMaplist - initSym NIL "mapcar" doMapcar - initSym NIL "mapcon" doMapcon - initSym NIL "mapcan" doMapcan - initSym NIL "filter" doFilter - initSym NIL "extract" doExtract - initSym NIL "seek" doSeek - initSym NIL "find" doFind - initSym NIL "pick" doPick - initSym NIL "cnt" doCnt - initSym NIL "sum" doSum - initSym NIL "maxi" doMaxi - initSym NIL "mini" doMini - initSym NIL "fish" doFish - initSym NIL "by" doBy + initFun NIL "apply" doApply + initFun NIL "pass" doPass + initFun NIL "maps" doMaps + initFun NIL "map" doMap + initFun NIL "mapc" doMapc + initFun NIL "maplist" doMaplist + initFun NIL "mapcar" doMapcar + initFun NIL "mapcon" doMapcon + initFun NIL "mapcan" doMapcan + initFun NIL "filter" doFilter + initFun NIL "extract" doExtract + initFun NIL "seek" doSeek + initFun NIL "find" doFind + initFun NIL "pick" doPick + initFun NIL "cnt" doCnt + initFun NIL "sum" doSum + initFun NIL "maxi" doMaxi + initFun NIL "mini" doMini + initFun NIL "fish" doFish + initFun NIL "by" doBy # Control flow - initSym NIL "as" doAs - initSym NIL "lit" doLit - initSym NIL "eval" doEval - initSym NIL "run" doRun - initSym NIL "def" doDef - initSym NIL "de" doDe - initSym NIL "dm" doDm - initSym NIL "box" doBox - initSym NIL "new" doNew - initSym NIL "type" doType - initSym NIL "isa" doIsa - initSym NIL "method" doMethod - initSym NIL "send" doSend - initSym NIL "try" doTry - initSym NIL "super" doSuper - initSym NIL "extra" doExtra - initSym NIL "with" doWith - initSym NIL "bind" doBind - initSym NIL "job" doJob - initSym NIL "let" doLet - initSym NIL "let?" doLetQ - initSym NIL "use" doUse - initSym NIL "and" doAnd - initSym NIL "or" doOr - initSym NIL "nand" doNand - initSym NIL "nor" doNor - initSym NIL "xor" doXor - initSym NIL "bool" doBool - initSym NIL "not" doNot - initSym NIL "nil" doNil - initSym NIL "t" doT - initSym NIL "prog" doProg - initSym NIL "prog1" doProg1 - initSym NIL "prog2" doProg2 - initSym NIL "if" doIf - initSym NIL "if2" doIf2 - initSym NIL "ifn" doIfn - initSym NIL "when" doWhen - initSym NIL "unless" doUnless - initSym NIL "cond" doCond - initSym NIL "nond" doNond - initSym NIL "case" doCase - initSym NIL "state" doState - initSym NIL "while" doWhile - initSym NIL "until" doUntil - initSym NIL "at" doAt - initSym NIL "do" doDo - initSym NIL "loop" doLoop - initSym NIL "for" doFor - initSym NIL "catch" doCatch - initSym NIL "throw" doThrow - initSym NIL "finally" doFinally - initSym NIL "co" doCo - initSym NIL "yield" doYield - initSym NIL "!" doBreak - initSym NIL "e" doE - initSym NIL "$" doTrace - initSym NIL "sys" doSys - initSym NIL "call" doCall - initSym NIL "tick" doTick - initSym NIL "ipid" doIpid - initSym NIL "opid" doOpid - initSym NIL "kill" doKill - initSym NIL "fork" doFork - initSym NIL "bye" doBye + initFun NIL "as" doAs + initFun NIL "lit" doLit + initFun NIL "eval" doEval + initFun NIL "run" doRun + initFun NIL "def" doDef + initFun NIL "de" doDe + initFun NIL "dm" doDm + initFun NIL "box" doBox + initFun NIL "new" doNew + initFun NIL "type" doType + initFun NIL "isa" doIsa + initFun NIL "method" doMethod + initFun NIL "send" doSend + initFun NIL "try" doTry + initFun NIL "super" doSuper + initFun NIL "extra" doExtra + initFun NIL "with" doWith + initFun NIL "bind" doBind + initFun NIL "job" doJob + initFun NIL "let" doLet + initFun NIL "let?" doLetQ + initFun NIL "use" doUse + initFun NIL "and" doAnd + initFun NIL "or" doOr + initFun NIL "nand" doNand + initFun NIL "nor" doNor + initFun NIL "xor" doXor + initFun NIL "bool" doBool + initFun NIL "not" doNot + initFun NIL "nil" doNil + initFun NIL "t" doT + initFun NIL "prog" doProg + initFun NIL "prog1" doProg1 + initFun NIL "prog2" doProg2 + initFun NIL "if" doIf + initFun NIL "if2" doIf2 + initFun NIL "ifn" doIfn + initFun NIL "when" doWhen + initFun NIL "unless" doUnless + initFun NIL "cond" doCond + initFun NIL "nond" doNond + initFun NIL "case" doCase + initFun NIL "state" doState + initFun NIL "while" doWhile + initFun NIL "until" doUntil + initFun NIL "at" doAt + initFun NIL "do" doDo + initFun NIL "loop" doLoop + initFun NIL "for" doFor + initFun NIL "catch" doCatch + initFun NIL "throw" doThrow + initFun NIL "finally" doFinally + initFun NIL "co" doCo + initFun NIL "yield" doYield + initFun NIL "!" doBreak + initFun NIL "e" doE + initFun NIL "$" doTrace + initFun NIL "sys" doSys + initFun NIL "call" doCall + initFun NIL "tick" doTick + initFun NIL "ipid" doIpid + initFun NIL "opid" doOpid + initFun NIL "kill" doKill + initFun NIL "fork" doFork + initFun NIL "bye" doBye # Symbol functions - initSym NIL "name" doName - initSym NIL "sp?" doSpQ - initSym NIL "pat?" doPatQ - initSym NIL "fun?" doFunQ - initSym NIL "getd" doGetd - initSym NIL "all" doAll - initSym NIL "intern" doIntern - initSym NIL "extern" doExtern - initSym NIL "====" doHide - initSym NIL "box?" doBoxQ - initSym NIL "str?" doStrQ - initSym NIL "ext?" doExtQ - initSym NIL "touch" doTouch - initSym NIL "zap" doZap - initSym NIL "chop" doChop - initSym NIL "pack" doPack - initSym NIL "glue" doGlue - initSym NIL "text" doText - initSym NIL "pre?" doPreQ - initSym NIL "sub?" doSubQ - initSym NIL "val" doVal - initSym NIL "set" doSet - initSym NIL "setq" doSetq - initSym NIL "xchg" doXchg - initSym NIL "on" doOn - initSym NIL "off" doOff - initSym NIL "onOff" doOnOff - initSym NIL "zero" doZero - initSym NIL "one" doOne - initSym NIL "default" doDefault - initSym NIL "push" doPush - initSym NIL "push1" doPush1 - initSym NIL "pop" doPop - initSym NIL "cut" doCut - initSym NIL "del" doDel - initSym NIL "queue" doQueue - initSym NIL "fifo" doFifo - initSym NIL "idx" doIdx - initSym NIL "lup" doLup - initSym NIL "put" doPut - initSym NIL "get" doGet - initSym NIL "prop" doProp - initSym NIL ";" doSemicol - initSym NIL "=:" doSetCol - initSym NIL ":" doCol - initSym NIL "::" doPropCol - initSym NIL "putl" doPutl - initSym NIL "getl" doGetl - initSym NIL "wipe" doWipe - initSym NIL "meta" doMeta - initSym NIL "low?" doLowQ - initSym NIL "upp?" doUppQ - initSym NIL "lowc" doLowc - initSym NIL "uppc" doUppc - initSym NIL "fold" doFold + initFun NIL "name" doName + initFun NIL "sp?" doSpQ + initFun NIL "pat?" doPatQ + initFun NIL "fun?" doFunQ + initFun NIL "getd" doGetd + initFun NIL "all" doAll + initFun NIL "intern" doIntern + initFun NIL "extern" doExtern + initFun NIL "====" doHide + initFun NIL "box?" doBoxQ + initFun NIL "str?" doStrQ + initFun NIL "ext?" doExtQ + initFun NIL "touch" doTouch + initFun NIL "zap" doZap + initFun NIL "chop" doChop + initFun NIL "pack" doPack + initFun NIL "glue" doGlue + initFun NIL "text" doText + initFun NIL "pre?" doPreQ + initFun NIL "sub?" doSubQ + initFun NIL "val" doVal + initFun NIL "set" doSet + initFun NIL "setq" doSetq + initFun NIL "xchg" doXchg + initFun NIL "on" doOn + initFun NIL "off" doOff + initFun NIL "onOff" doOnOff + initFun NIL "zero" doZero + initFun NIL "one" doOne + initFun NIL "default" doDefault + initFun NIL "push" doPush + initFun NIL "push1" doPush1 + initFun NIL "pop" doPop + initFun NIL "cut" doCut + initFun NIL "del" doDel + initFun NIL "queue" doQueue + initFun NIL "fifo" doFifo + initFun NIL "idx" doIdx + initFun NIL "lup" doLup + initFun NIL "put" doPut + initFun NIL "get" doGet + initFun NIL "prop" doProp + initFun NIL ";" doSemicol + initFun NIL "=:" doSetCol + initFun NIL ":" doCol + initFun NIL "::" doPropCol + initFun NIL "putl" doPutl + initFun NIL "getl" doGetl + initFun NIL "wipe" doWipe + initFun NIL "meta" doMeta + initFun NIL "low?" doLowQ + initFun NIL "upp?" doUppQ + initFun NIL "lowc" doLowc + initFun NIL "uppc" doUppc + initFun NIL "fold" doFold # List processing - initSym NIL "car" doCar - initSym NIL "cdr" doCdr - initSym NIL "caar" doCaar - initSym NIL "cadr" doCadr - initSym NIL "cdar" doCdar - initSym NIL "cddr" doCddr - initSym NIL "caaar" doCaaar - initSym NIL "caadr" doCaadr - initSym NIL "cadar" doCadar - initSym NIL "caddr" doCaddr - initSym NIL "cdaar" doCdaar - initSym NIL "cdadr" doCdadr - initSym NIL "cddar" doCddar - initSym NIL "cdddr" doCdddr - initSym NIL "caaaar" doCaaaar - initSym NIL "caaadr" doCaaadr - initSym NIL "caadar" doCaadar - initSym NIL "caaddr" doCaaddr - initSym NIL "cadaar" doCadaar - initSym NIL "cadadr" doCadadr - initSym NIL "caddar" doCaddar - initSym NIL "cadddr" doCadddr - initSym NIL "cdaaar" doCdaaar - initSym NIL "cdaadr" doCdaadr - initSym NIL "cdadar" doCdadar - initSym NIL "cdaddr" doCdaddr - initSym NIL "cddaar" doCddaar - initSym NIL "cddadr" doCddadr - initSym NIL "cdddar" doCdddar - initSym NIL "cddddr" doCddddr - initSym NIL "nth" doNth - initSym NIL "con" doCon - initSym NIL "cons" doCons - initSym NIL "conc" doConc - initSym NIL "circ" doCirc - initSym NIL "rot" doRot - initSym NIL "list" doList - initSym NIL "need" doNeed - initSym NIL "range" doRange - initSym NIL "full" doFull - initSym NIL "make" doMake - initSym NIL "made" doMade - initSym NIL "chain" doChain - initSym NIL "link" doLink - initSym NIL "yoke" doYoke - initSym NIL "copy" doCopy - initSym NIL "mix" doMix - initSym NIL "append" doAppend - initSym NIL "delete" doDelete - initSym NIL "delq" doDelq - initSym NIL "replace" doReplace - initSym NIL "strip" doStrip - initSym NIL "split" doSplit - initSym NIL "reverse" doReverse - initSym NIL "flip" doFlip - initSym NIL "trim" doTrim - initSym NIL "clip" doClip - initSym NIL "head" doHead - initSym NIL "tail" doTail - initSym NIL "stem" doStem - initSym NIL "fin" doFin - initSym NIL "last" doLast - initSym NIL "==" doEq - initSym NIL "n==" doNEq - initSym NIL "=" doEqual - initSym NIL "<>" doNEqual - initSym NIL "=0" doEq0 - initSym NIL "=T" doEqT - initSym NIL "n0" doNEq0 - initSym NIL "nT" doNEqT - initSym NIL "<" doLt - initSym NIL "<=" doLe - initSym NIL ">" doGt - initSym NIL ">=" doGe - initSym NIL "max" doMax - initSym NIL "min" doMin - initSym NIL "atom" doAtom - initSym NIL "pair" doPair - initSym NIL "circ?" doCircQ - initSym NIL "lst?" doLstQ - initSym NIL "num?" doNumQ - initSym NIL "sym?" doSymQ - initSym NIL "flg?" doFlgQ - initSym NIL "member" doMember - initSym NIL "memq" doMemq - initSym NIL "mmeq" doMmeq - initSym NIL "sect" doSect - initSym NIL "diff" doDiff - initSym NIL "index" doIndex - initSym NIL "offset" doOffset - initSym NIL "prior" doPrior - initSym NIL "length" doLength - initSym NIL "size" doSize - initSym NIL "assoc" doAssoc - initSym NIL "asoq" doAsoq - initSym NIL "rank" doRank - initSym NIL "match" doMatch - initSym NIL "fill" doFill - initSym NIL "prove" doProve - initSym NIL "->" doArrow - initSym NIL "unify" doUnify - initSym NIL "sort" doSort + initFun NIL "car" doCar + initFun NIL "cdr" doCdr + initFun NIL "caar" doCaar + initFun NIL "cadr" doCadr + initFun NIL "cdar" doCdar + initFun NIL "cddr" doCddr + initFun NIL "caaar" doCaaar + initFun NIL "caadr" doCaadr + initFun NIL "cadar" doCadar + initFun NIL "caddr" doCaddr + initFun NIL "cdaar" doCdaar + initFun NIL "cdadr" doCdadr + initFun NIL "cddar" doCddar + initFun NIL "cdddr" doCdddr + initFun NIL "caaaar" doCaaaar + initFun NIL "caaadr" doCaaadr + initFun NIL "caadar" doCaadar + initFun NIL "caaddr" doCaaddr + initFun NIL "cadaar" doCadaar + initFun NIL "cadadr" doCadadr + initFun NIL "caddar" doCaddar + initFun NIL "cadddr" doCadddr + initFun NIL "cdaaar" doCdaaar + initFun NIL "cdaadr" doCdaadr + initFun NIL "cdadar" doCdadar + initFun NIL "cdaddr" doCdaddr + initFun NIL "cddaar" doCddaar + initFun NIL "cddadr" doCddadr + initFun NIL "cdddar" doCdddar + initFun NIL "cddddr" doCddddr + initFun NIL "nth" doNth + initFun NIL "con" doCon + initFun NIL "cons" doCons + initFun NIL "conc" doConc + initFun NIL "circ" doCirc + initFun NIL "rot" doRot + initFun NIL "list" doList + initFun NIL "need" doNeed + initFun NIL "range" doRange + initFun NIL "full" doFull + initFun NIL "make" doMake + initFun NIL "made" doMade + initFun NIL "chain" doChain + initFun NIL "link" doLink + initFun NIL "yoke" doYoke + initFun NIL "copy" doCopy + initFun NIL "mix" doMix + initFun NIL "append" doAppend + initFun NIL "delete" doDelete + initFun NIL "delq" doDelq + initFun NIL "replace" doReplace + initFun NIL "strip" doStrip + initFun NIL "split" doSplit + initFun NIL "reverse" doReverse + initFun NIL "flip" doFlip + initFun NIL "trim" doTrim + initFun NIL "clip" doClip + initFun NIL "head" doHead + initFun NIL "tail" doTail + initFun NIL "stem" doStem + initFun NIL "fin" doFin + initFun NIL "last" doLast + initFun NIL "==" doEq + initFun NIL "n==" doNEq + initFun NIL "=" doEqual + initFun NIL "<>" doNEqual + initFun NIL "=0" doEq0 + initFun NIL "=T" doEqT + initFun NIL "n0" doNEq0 + initFun NIL "nT" doNEqT + initFun NIL "<" doLt + initFun NIL "<=" doLe + initFun NIL ">" doGt + initFun NIL ">=" doGe + initFun NIL "max" doMax + initFun NIL "min" doMin + initFun NIL "atom" doAtom + initFun NIL "pair" doPair + initFun NIL "circ?" doCircQ + initFun NIL "lst?" doLstQ + initFun NIL "num?" doNumQ + initFun NIL "sym?" doSymQ + initFun NIL "flg?" doFlgQ + initFun NIL "member" doMember + initFun NIL "memq" doMemq + initFun NIL "mmeq" doMmeq + initFun NIL "sect" doSect + initFun NIL "diff" doDiff + initFun NIL "index" doIndex + initFun NIL "offset" doOffset + initFun NIL "prior" doPrior + initFun NIL "length" doLength + initFun NIL "size" doSize + initFun NIL "assoc" doAssoc + initFun NIL "asoq" doAsoq + initFun NIL "rank" doRank + initFun NIL "match" doMatch + initFun NIL "fill" doFill + initFun NIL "prove" doProve + initFun NIL "->" doArrow + initFun NIL "unify" doUnify + initFun NIL "sort" doSort # Arithmetics - initSym NIL "format" doFormat - initSym NIL "+" doAdd - initSym NIL "-" doSub - initSym NIL "inc" doInc - initSym NIL "dec" doDec - initSym NIL "*" doMul - initSym NIL "*/" doMulDiv - initSym NIL "/" doDiv - initSym NIL "%" doRem - initSym NIL ">>" doShift - initSym NIL "lt0" doLt0 - initSym NIL "le0" doLe0 - initSym NIL "ge0" doGe0 - initSym NIL "gt0" doGt0 - initSym NIL "abs" doAbs - initSym NIL "bit?" doBitQ - initSym NIL "&" doBitAnd - initSym NIL "|" doBitOr - initSym NIL "x|" doBitXor - initSym NIL "seed" doSeed - initSym NIL "rand" doRand + initFun NIL "format" doFormat + initFun NIL "+" doAdd + initFun NIL "-" doSub + initFun NIL "inc" doInc + initFun NIL "dec" doDec + initFun NIL "*" doMul + initFun NIL "*/" doMulDiv + initFun NIL "/" doDiv + initFun NIL "%" doRem + initFun NIL ">>" doShift + initFun NIL "lt0" doLt0 + initFun NIL "le0" doLe0 + initFun NIL "ge0" doGe0 + initFun NIL "gt0" doGt0 + initFun NIL "abs" doAbs + initFun NIL "bit?" doBitQ + initFun NIL "&" doBitAnd + initFun NIL "|" doBitOr + initFun NIL "x|" doBitXor + initFun NIL "seed" doSeed + initFun NIL "rand" doRand # Input/Output - initSym NIL "path" doPath - initSym NIL "read" doRead - initSym NIL "wait" doWait - initSym NIL "sync" doSync - initSym NIL "hear" doHear - initSym NIL "tell" doTell - initSym NIL "poll" doPoll - initSym NIL "key" doKey - initSym NIL "peek" doPeek - initSym NIL "char" doChar - initSym NIL "skip" doSkip - initSym NIL "eol" doEol - initSym NIL "eof" doEof - initSym NIL "from" doFrom - initSym NIL "till" doTill - initSym NIL "line" doLine - initSym NIL "lines" doLines - initSym NIL "any" doAny - initSym NIL "sym" doSym - initSym NIL "str" doStr - initSym NIL "load" doLoad - initSym NIL "in" doIn - initSym NIL "out" doOut - initSym NIL "pipe" doPipe - initSym NIL "ctl" doCtl - initSym NIL "open" doOpen - initSym NIL "close" doClose - initSym NIL "echo" doEcho - initSym NIL "prin" doPrin - initSym NIL "prinl" doPrinl - initSym NIL "space" doSpace - initSym NIL "print" doPrint - initSym NIL "printsp" doPrintsp - initSym NIL "println" doPrintln - initSym NIL "flush" doFlush - initSym NIL "rewind" doRewind - initSym NIL "ext" doExt - initSym NIL "rd" doRd - initSym NIL "pr" doPr - initSym NIL "wr" doWr - initSym NIL "rpc" doRpc + initFun NIL "path" doPath + initFun NIL "read" doRead + initFun NIL "wait" doWait + initFun NIL "sync" doSync + initFun NIL "hear" doHear + initFun NIL "tell" doTell + initFun NIL "poll" doPoll + initFun NIL "key" doKey + initFun NIL "peek" doPeek + initFun NIL "char" doChar + initFun NIL "skip" doSkip + initFun NIL "eol" doEol + initFun NIL "eof" doEof + initFun NIL "from" doFrom + initFun NIL "till" doTill + initFun NIL "line" doLine + initFun NIL "lines" doLines + initFun NIL "any" doAny + initFun NIL "sym" doSym + initFun NIL "str" doStr + initFun NIL "load" doLoad + initFun NIL "in" doIn + initFun NIL "out" doOut + initFun NIL "pipe" doPipe + initFun NIL "ctl" doCtl + initFun NIL "open" doOpen + initFun NIL "close" doClose + initFun NIL "echo" doEcho + initFun NIL "prin" doPrin + initFun NIL "prinl" doPrinl + initFun NIL "space" doSpace + initFun NIL "print" doPrint + initFun NIL "printsp" doPrintsp + initFun NIL "println" doPrintln + initFun NIL "flush" doFlush + initFun NIL "rewind" doRewind + initFun NIL "ext" doExt + initFun NIL "rd" doRd + initFun NIL "pr" doPr + initFun NIL "wr" doWr + initFun NIL "rpc" doRpc # Database - initSym NIL "pool" doPool - initSym NIL "journal" doJournal - initSym NIL "id" doId - initSym NIL "seq" doSeq - initSym NIL "lieu" doLieu - initSym NIL "lock" doLock - initSym NIL "commit" doCommit - initSym NIL "rollback" doRollback - initSym NIL "mark" doMark - initSym NIL "free" doFree - initSym NIL "dbck" doDbck + initFun NIL "pool" doPool + initFun NIL "journal" doJournal + initFun NIL "id" doId + initFun NIL "seq" doSeq + initFun NIL "lieu" doLieu + initFun NIL "lock" doLock + initFun NIL "commit" doCommit + initFun NIL "rollback" doRollback + initFun NIL "mark" doMark + initFun NIL "free" doFree + initFun NIL "dbck" doDbck # Networking - initSym NIL "port" doPort - initSym NIL "accept" doAccept - initSym NIL "listen" doListen - initSym NIL "host" doHost - initSym NIL "connect" doConnect - initSym NIL "udp" doUdp + initFun NIL "port" doPort + initFun NIL "accept" doAccept + initFun NIL "listen" doListen + initFun NIL "host" doHost + initFun NIL "connect" doConnect + initFun NIL "udp" doUdp : SymTabEnd diff --git a/src64/lib/asm.l b/src64/lib/asm.l @@ -54,7 +54,7 @@ (prinl Sym " (" (cdr @) " . \"@src64/" (car @) "\")") ) ) ) ) ) (de asm Args - (put (car Args) 'asm (cdr Args)) ) + (def (car Args) 'asm (cdr Args)) ) (de fpic () (on *FPic) ) @@ -63,7 +63,7 @@ (de section (Fun @Sym) (def Fun (curry (@Sym) (Lbl Align) - (put Lbl 'src (cdr (file))) + (def Lbl 'src (cdr (file))) (unless (== *Section '@Sym) (prinl) (prinl " ." '@Sym) @@ -223,8 +223,9 @@ (| 2 (>> -4 N)) ) (de equ Args - (def (car Args) - (put (car Args) 'equ (run (cdr Args) 1)) ) ) + (let Val (run (cdr Args) 1) + (def (car Args) 'equ Val) + (def (car Args) Val) ) ) # Source/Destination addressing mode: @@ -412,6 +413,7 @@ (inc (destination) "*Mode") (initCode) (initData) + (initFun (read) (read) (operand (read))) (initSym (read) (read) (operand (read))) (jc (address) "*Mode") (jcz (address) "*Mode") @@ -512,8 +514,14 @@ (asm asciz (Str) (prinst ".asciz " (pack "\"" Str "\"")) ) +(asm initFun (Lbl Name Val) + (initSym Lbl Name Val (boxfun Val)) ) + (asm initSym (Lbl Name Val) - (idx '*Tags (def Name Val) T) + (initSym Lbl Name Val Val) ) + +(de initSym (Lbl Name Sym Val) + (idx '*Tags (def Name Sym) T) (setq Name (let (N 2 Lst (chop Name) C) (make