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 32412e075a2b009d3d9865fa1adb77e5c25d59d3
parent c1475f5e66662e851319bc87b97ef9d191be4ae1
Author: Alexander Burger <abu@software-lab.de>
Date:   Tue,  5 Apr 2011 12:52:14 +0200

Changed 'initCode' to 'initMain', added 'initCode'
Diffstat:
Mlib/tags | 60++++++++++++++++++++++++++++++------------------------------
Msrc64/arch/x86-64.l | 6++++--
Msrc64/glob.l | 6+++---
Msrc64/lib/asm.l | 3++-
Msrc64/main.l | 6++++--
5 files changed, 43 insertions(+), 38 deletions(-)

diff --git a/lib/tags b/lib/tags @@ -25,16 +25,16 @@ $ (2958 . "@src64/flow.l") >> (2625 . "@src64/big.l") abs (2729 . "@src64/big.l") accept (139 . "@src64/net.l") -adr (603 . "@src64/main.l") -alarm (480 . "@src64/main.l") +adr (605 . "@src64/main.l") +alarm (482 . "@src64/main.l") all (770 . "@src64/sym.l") and (1620 . "@src64/flow.l") any (3933 . "@src64/io.l") append (1338 . "@src64/subr.l") apply (713 . "@src64/apply.l") -arg (2270 . "@src64/main.l") -args (2246 . "@src64/main.l") -argv (2891 . "@src64/main.l") +arg (2272 . "@src64/main.l") +args (2248 . "@src64/main.l") +argv (2893 . "@src64/main.l") as (146 . "@src64/flow.l") asoq (3001 . "@src64/subr.l") assoc (2966 . "@src64/subr.l") @@ -65,7 +65,7 @@ call (3089 . "@src64/flow.l") car (5 . "@src64/subr.l") case (1961 . "@src64/flow.l") catch (2463 . "@src64/flow.l") -cd (2646 . "@src64/main.l") +cd (2648 . "@src64/main.l") cdaaar (464 . "@src64/subr.l") cdaadr (487 . "@src64/subr.l") cdaar (179 . "@src64/subr.l") @@ -88,7 +88,7 @@ circ (816 . "@src64/subr.l") circ? (2398 . "@src64/subr.l") clip (1795 . "@src64/subr.l") close (4339 . "@src64/io.l") -cmd (2873 . "@src64/main.l") +cmd (2875 . "@src64/main.l") cnt (1413 . "@src64/apply.l") co (2545 . "@src64/flow.l") commit (1496 . "@src64/db.l") @@ -99,9 +99,9 @@ connect (201 . "@src64/net.l") cons (747 . "@src64/subr.l") copy (1225 . "@src64/subr.l") ctl (4217 . "@src64/io.l") -ctty (2671 . "@src64/main.l") +ctty (2673 . "@src64/main.l") cut (1795 . "@src64/sym.l") -date (2385 . "@src64/main.l") +date (2387 . "@src64/main.l") dbck (2105 . "@src64/db.l") de (531 . "@src64/flow.l") dec (2323 . "@src64/big.l") @@ -111,16 +111,16 @@ del (1850 . "@src64/sym.l") delete (1401 . "@src64/subr.l") delq (1452 . "@src64/subr.l") diff (2585 . "@src64/subr.l") -dir (2804 . "@src64/main.l") +dir (2806 . "@src64/main.l") dm (543 . "@src64/flow.l") do (2137 . "@src64/flow.l") e (2919 . "@src64/flow.l") echo (4370 . "@src64/io.l") -env (615 . "@src64/main.l") +env (617 . "@src64/main.l") eof (3492 . "@src64/io.l") eol (3483 . "@src64/io.l") err (4197 . "@src64/io.l") -errno (1381 . "@src64/main.l") +errno (1383 . "@src64/main.l") eval (182 . "@src64/flow.l") ext (5100 . "@src64/io.l") ext? (1032 . "@src64/sym.l") @@ -128,7 +128,7 @@ extern (898 . "@src64/sym.l") extra (1262 . "@src64/flow.l") extract (1218 . "@src64/apply.l") fifo (1961 . "@src64/sym.l") -file (2751 . "@src64/main.l") +file (2753 . "@src64/main.l") fill (3236 . "@src64/subr.l") filter (1161 . "@src64/apply.l") fin (2029 . "@src64/subr.l") @@ -154,7 +154,7 @@ getl (3030 . "@src64/sym.l") glue (1232 . "@src64/sym.l") gt0 (2716 . "@src64/big.l") head (1816 . "@src64/subr.l") -heap (535 . "@src64/main.l") +heap (537 . "@src64/main.l") hear (3196 . "@src64/io.l") host (184 . "@src64/net.l") id (1027 . "@src64/db.l") @@ -165,7 +165,7 @@ ifn (1861 . "@src64/flow.l") in (4157 . "@src64/io.l") inc (2256 . "@src64/big.l") index (2633 . "@src64/subr.l") -info (2708 . "@src64/main.l") +info (2710 . "@src64/main.l") intern (873 . "@src64/sym.l") ipid (3208 . "@src64/flow.l") isa (958 . "@src64/flow.l") @@ -182,7 +182,7 @@ lieu (1156 . "@src64/db.l") line (3667 . "@src64/io.l") lines (3820 . "@src64/io.l") link (1172 . "@src64/subr.l") -lisp (1948 . "@src64/main.l") +lisp (1950 . "@src64/main.l") list (887 . "@src64/subr.l") listen (151 . "@src64/net.l") lit (157 . "@src64/flow.l") @@ -221,10 +221,10 @@ n== (2083 . "@src64/subr.l") nT (2194 . "@src64/subr.l") name (497 . "@src64/sym.l") nand (1655 . "@src64/flow.l") -native (1389 . "@src64/main.l") +native (1391 . "@src64/main.l") need (919 . "@src64/subr.l") new (832 . "@src64/flow.l") -next (2253 . "@src64/main.l") +next (2255 . "@src64/main.l") nil (1738 . "@src64/flow.l") nond (1938 . "@src64/flow.l") nor (1676 . "@src64/flow.l") @@ -238,7 +238,7 @@ onOff (1611 . "@src64/sym.l") one (1644 . "@src64/sym.l") open (4301 . "@src64/io.l") opid (3224 . "@src64/flow.l") -opt (2994 . "@src64/main.l") +opt (2996 . "@src64/main.l") or (1636 . "@src64/flow.l") out (4177 . "@src64/io.l") pack (1142 . "@src64/sym.l") @@ -265,24 +265,24 @@ prog (1756 . "@src64/flow.l") prog1 (1764 . "@src64/flow.l") prog2 (1781 . "@src64/flow.l") prop (2779 . "@src64/sym.l") -protect (525 . "@src64/main.l") +protect (527 . "@src64/main.l") prove (3523 . "@src64/subr.l") push (1686 . "@src64/sym.l") push1 (1722 . "@src64/sym.l") put (2696 . "@src64/sym.l") putl (2948 . "@src64/sym.l") -pwd (2635 . "@src64/main.l") +pwd (2637 . "@src64/main.l") queue (1918 . "@src64/sym.l") -quit (1098 . "@src64/main.l") +quit (1100 . "@src64/main.l") quote (141 . "@src64/flow.l") rand (2973 . "@src64/big.l") range (997 . "@src64/subr.l") rank (3029 . "@src64/subr.l") -raw (458 . "@src64/main.l") +raw (460 . "@src64/main.l") rd (5117 . "@src64/io.l") read (2627 . "@src64/io.l") replace (1499 . "@src64/subr.l") -rest (2299 . "@src64/main.l") +rest (2301 . "@src64/main.l") reverse (1674 . "@src64/subr.l") rewind (5083 . "@src64/io.l") rollback (1890 . "@src64/db.l") @@ -295,14 +295,14 @@ send (1130 . "@src64/flow.l") seq (1083 . "@src64/db.l") set (1480 . "@src64/sym.l") setq (1513 . "@src64/sym.l") -sigio (496 . "@src64/main.l") +sigio (498 . "@src64/main.l") size (2802 . "@src64/subr.l") skip (3469 . "@src64/io.l") sort (3958 . "@src64/subr.l") sp? (709 . "@src64/sym.l") space (5017 . "@src64/io.l") split (1588 . "@src64/subr.l") -stack (564 . "@src64/main.l") +stack (566 . "@src64/main.l") state (2005 . "@src64/flow.l") stem (1985 . "@src64/subr.l") str (3987 . "@src64/io.l") @@ -322,7 +322,7 @@ text (1270 . "@src64/sym.l") throw (2489 . "@src64/flow.l") tick (3176 . "@src64/flow.l") till (3578 . "@src64/io.l") -time (2518 . "@src64/main.l") +time (2520 . "@src64/main.l") touch (1047 . "@src64/sym.l") trim (1755 . "@src64/subr.l") try (1171 . "@src64/flow.l") @@ -331,13 +331,13 @@ udp (268 . "@src64/net.l") unify (3931 . "@src64/subr.l") unless (1897 . "@src64/flow.l") until (2081 . "@src64/flow.l") -up (706 . "@src64/main.l") +up (708 . "@src64/main.l") upp? (3228 . "@src64/sym.l") uppc (3292 . "@src64/sym.l") use (1569 . "@src64/flow.l") -usec (2623 . "@src64/main.l") +usec (2625 . "@src64/main.l") val (1461 . "@src64/sym.l") -version (3008 . "@src64/main.l") +version (3010 . "@src64/main.l") wait (3118 . "@src64/io.l") when (1880 . "@src64/flow.l") while (2057 . "@src64/flow.l") diff --git a/src64/arch/x86-64.l b/src64/arch/x86-64.l @@ -1,4 +1,4 @@ -# 02apr11abu +# 05apr11abu # (c) Software Lab. Alexander Burger # Byte order @@ -880,7 +880,9 @@ # System (asm initData ()) -(asm initCode () +(asm initCode ()) + +(asm initMain () (prinst "xor" "%r12" "%r12") # Init NULL register (prinst "mov" "(%rsi)" "%r13") # Get command in X (prinst "lea" "8(%rsi)" "%r14") # argument vector in Y diff --git a/src64/glob.l b/src64/glob.l @@ -1,4 +1,4 @@ -# 09mar11abu +# 05apr11abu # (c) Software Lab. Alexander Burger (data 'Globals 0) @@ -601,8 +601,6 @@ : EnvTrace word 0 # Trace level : EnvEnd # Must be aligned -initData - : OrgTermio skip TERMIOS # Original termio structure : Flock skip FLOCK # File lock structure : Tms skip TMS # 'times' structure @@ -1145,4 +1143,6 @@ initData hx2 ("0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0") hx2 ("0" "0" "0" "0" "0" "0" "0") +initData + # vi:et:ts=3:sw=3 diff --git a/src64/lib/asm.l b/src64/lib/asm.l @@ -1,4 +1,4 @@ -# 29mar11abu +# 05apr11abu # (c) Software Lab. Alexander Burger # *LittleEndian *Registers optimize @@ -418,6 +418,7 @@ (inc (destination) "*Mode") (initCode) (initData) + (initMain) (initFun (read) (read) (operand (read))) (initSym (read) (read) (operand (read))) (jc (address) "*Mode") diff --git a/src64/main.l b/src64/main.l @@ -1,4 +1,4 @@ -# 21mar11abu +# 05apr11abu # (c) Software Lab. Alexander Burger ### Global return labels ### @@ -26,9 +26,11 @@ ld E (E) # Get value or CAR ret +initCode + ### Main entry point ### (code 'main) - initCode + initMain ld (AV0) X # Save command ld (AV) Y # and argument vector # Check debug mode