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 224085c7f69433118e5b0b562f368d1987824fa1
parent b5d03fc9e83988922ea6bae29c6d8e5688724761
Author: Commit-Bot <unknown>
Date:   Mon, 30 Aug 2010 09:14:10 +0000

Automatic commit from picoLisp.tgz, From: Mon, 30 Aug 2010 09:14:10 GMT
Diffstat:
Mdoc64/asm | 16++++++++--------
Mlib/tags | 82++++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc64/arch/x86-64.l | 14+++++++-------
Msrc64/io.l | 16+++++++++-------
4 files changed, 65 insertions(+), 63 deletions(-)

diff --git a/doc64/asm b/doc64/asm @@ -1,4 +1,4 @@ -# 02aug10abu +# 30aug10abu # (c) Software Lab. Alexander Burger @@ -126,10 +126,10 @@ zxt # Zero-extend 'B' to 'A' - setc # Set Carry flag - clrc # Clear Carry flag - setz # Set Zero flag - clrz # Clear Zero flag + setz # Set Zero flag [z__] + clrz # Clear Zero flag [z..] + setc # Set Carry flag [--c] + clrc # Clear Carry flag [--c] Comparisons: cmp dst src # Compare 'dst' with 'src' [z.c] @@ -137,13 +137,13 @@ cmpn dst src cnt # Compare 'cnt' bytes 'dst' with 'src' slen dst src # Set 'dst' to the string length of 'src' memb src cnt # Find B in 'cnt' bytes of memory - null src # Compare 'src' with 0 [zs.] + null src # Compare 'src' with 0 [zs_] zero src # Test if ZERO [z..] - nul4 # Compare four bytes in 'A' with 0 [zs.] + nul4 # Compare four bytes in 'A' with 0 [zs_] Byte addressing: set dst src # Set 'dst' byte to 'src' - nul src # Compare byte 'src' with 0 + nul src # Compare byte 'src' with 0 [zs_] Types: cnt src # Non-'z' if small number diff --git a/lib/tags b/lib/tags @@ -29,7 +29,7 @@ adr (613 . "@src64/main.l") alarm (487 . "@src64/main.l") all (772 . "@src64/sym.l") and (1643 . "@src64/flow.l") -any (3792 . "@src64/io.l") +any (3794 . "@src64/io.l") append (1329 . "@src64/subr.l") apply (597 . "@src64/apply.l") arg (2243 . "@src64/main.l") @@ -82,11 +82,11 @@ cdddr (245 . "@src64/subr.l") cddr (79 . "@src64/subr.l") cdr (17 . "@src64/subr.l") chain (1132 . "@src64/subr.l") -char (3274 . "@src64/io.l") +char (3276 . "@src64/io.l") chop (1093 . "@src64/sym.l") circ (816 . "@src64/subr.l") clip (1786 . "@src64/subr.l") -close (4180 . "@src64/io.l") +close (4182 . "@src64/io.l") cmd (2846 . "@src64/main.l") cnt (1297 . "@src64/apply.l") co (2566 . "@src64/flow.l") @@ -97,7 +97,7 @@ cond (1938 . "@src64/flow.l") connect (201 . "@src64/net.l") cons (747 . "@src64/subr.l") copy (1216 . "@src64/subr.l") -ctl (4120 . "@src64/io.l") +ctl (4122 . "@src64/io.l") ctty (2644 . "@src64/main.l") cut (1797 . "@src64/sym.l") date (2358 . "@src64/main.l") @@ -114,13 +114,13 @@ dir (2777 . "@src64/main.l") dm (561 . "@src64/flow.l") do (2158 . "@src64/flow.l") e (2932 . "@src64/flow.l") -echo (4211 . "@src64/io.l") +echo (4213 . "@src64/io.l") env (625 . "@src64/main.l") -eof (3351 . "@src64/io.l") -eol (3342 . "@src64/io.l") +eof (3353 . "@src64/io.l") +eol (3344 . "@src64/io.l") errno (1358 . "@src64/main.l") eval (208 . "@src64/flow.l") -ext (4940 . "@src64/io.l") +ext (4942 . "@src64/io.l") ext? (1034 . "@src64/sym.l") extern (900 . "@src64/sym.l") extra (1284 . "@src64/flow.l") @@ -135,13 +135,13 @@ find (1206 . "@src64/apply.l") fish (1497 . "@src64/apply.l") flg? (2419 . "@src64/subr.l") flip (1686 . "@src64/subr.l") -flush (4915 . "@src64/io.l") +flush (4917 . "@src64/io.l") fold (3345 . "@src64/sym.l") for (2247 . "@src64/flow.l") fork (3269 . "@src64/flow.l") format (2089 . "@src64/big.l") free (2034 . "@src64/db.l") -from (3370 . "@src64/io.l") +from (3372 . "@src64/io.l") full (1066 . "@src64/subr.l") fun? (734 . "@src64/sym.l") gc (439 . "@src64/gc.l") @@ -153,14 +153,14 @@ glue (1234 . "@src64/sym.l") gt0 (2702 . "@src64/big.l") head (1807 . "@src64/subr.l") heap (542 . "@src64/main.l") -hear (3092 . "@src64/io.l") +hear (3094 . "@src64/io.l") host (184 . "@src64/net.l") id (1034 . "@src64/db.l") idx (2037 . "@src64/sym.l") if (1824 . "@src64/flow.l") if2 (1843 . "@src64/flow.l") ifn (1884 . "@src64/flow.l") -in (4016 . "@src64/io.l") +in (4018 . "@src64/io.l") inc (2256 . "@src64/big.l") index (2611 . "@src64/subr.l") info (2681 . "@src64/main.l") @@ -169,21 +169,21 @@ ipid (3214 . "@src64/flow.l") isa (978 . "@src64/flow.l") job (1448 . "@src64/flow.l") journal (977 . "@src64/db.l") -key (3201 . "@src64/io.l") +key (3203 . "@src64/io.l") kill (3246 . "@src64/flow.l") last (2031 . "@src64/subr.l") length (2687 . "@src64/subr.l") let (1498 . "@src64/flow.l") let? (1559 . "@src64/flow.l") lieu (1163 . "@src64/db.l") -line (3526 . "@src64/io.l") -lines (3679 . "@src64/io.l") +line (3528 . "@src64/io.l") +lines (3681 . "@src64/io.l") link (1163 . "@src64/subr.l") lisp (1921 . "@src64/main.l") list (887 . "@src64/subr.l") listen (151 . "@src64/net.l") lit (183 . "@src64/flow.l") -load (3993 . "@src64/io.l") +load (3995 . "@src64/io.l") lock (1191 . "@src64/db.l") loop (2190 . "@src64/flow.l") low? (3217 . "@src64/sym.l") @@ -233,31 +233,31 @@ offset (2651 . "@src64/subr.l") on (1583 . "@src64/sym.l") onOff (1613 . "@src64/sym.l") one (1646 . "@src64/sym.l") -open (4142 . "@src64/io.l") +open (4144 . "@src64/io.l") opid (3230 . "@src64/flow.l") opt (2967 . "@src64/main.l") or (1659 . "@src64/flow.l") -out (4036 . "@src64/io.l") +out (4038 . "@src64/io.l") pack (1144 . "@src64/sym.l") pair (2381 . "@src64/subr.l") pass (638 . "@src64/apply.l") pat? (720 . "@src64/sym.l") -path (1198 . "@src64/io.l") -peek (3258 . "@src64/io.l") +path (1200 . "@src64/io.l") +peek (3260 . "@src64/io.l") pick (1253 . "@src64/apply.l") pid (157 . "@src64/flow.l") -pipe (4057 . "@src64/io.l") -poll (3154 . "@src64/io.l") +pipe (4059 . "@src64/io.l") +poll (3156 . "@src64/io.l") pool (657 . "@src64/db.l") pop (1773 . "@src64/sym.l") port (5 . "@src64/net.l") -pr (5031 . "@src64/io.l") +pr (5033 . "@src64/io.l") pre? (1411 . "@src64/sym.l") -prin (4839 . "@src64/io.l") -prinl (4853 . "@src64/io.l") -print (4879 . "@src64/io.l") -println (4910 . "@src64/io.l") -printsp (4895 . "@src64/io.l") +prin (4841 . "@src64/io.l") +prinl (4855 . "@src64/io.l") +print (4881 . "@src64/io.l") +println (4912 . "@src64/io.l") +printsp (4897 . "@src64/io.l") prog (1779 . "@src64/flow.l") prog1 (1787 . "@src64/flow.l") prog2 (1804 . "@src64/flow.l") @@ -276,15 +276,15 @@ rand (2959 . "@src64/big.l") range (988 . "@src64/subr.l") rank (2970 . "@src64/subr.l") raw (465 . "@src64/main.l") -rd (4957 . "@src64/io.l") -read (2530 . "@src64/io.l") +rd (4959 . "@src64/io.l") +read (2532 . "@src64/io.l") replace (1490 . "@src64/subr.l") rest (2272 . "@src64/main.l") reverse (1665 . "@src64/subr.l") -rewind (4923 . "@src64/io.l") +rewind (4925 . "@src64/io.l") rollback (1885 . "@src64/db.l") rot (848 . "@src64/subr.l") -rpc (5064 . "@src64/io.l") +rpc (5066 . "@src64/io.l") run (331 . "@src64/flow.l") sect (2515 . "@src64/subr.l") seed (2944 . "@src64/big.l") @@ -295,31 +295,31 @@ set (1482 . "@src64/sym.l") setq (1515 . "@src64/sym.l") sigio (503 . "@src64/main.l") size (2752 . "@src64/subr.l") -skip (3328 . "@src64/io.l") +skip (3330 . "@src64/io.l") sort (3869 . "@src64/subr.l") sp? (711 . "@src64/sym.l") -space (4857 . "@src64/io.l") +space (4859 . "@src64/io.l") split (1579 . "@src64/subr.l") stack (571 . "@src64/main.l") state (2028 . "@src64/flow.l") stem (1976 . "@src64/subr.l") -str (3846 . "@src64/io.l") +str (3848 . "@src64/io.l") str? (1013 . "@src64/sym.l") strip (1563 . "@src64/subr.l") sub? (1444 . "@src64/sym.l") sum (1344 . "@src64/apply.l") super (1237 . "@src64/flow.l") -sym (3832 . "@src64/io.l") +sym (3834 . "@src64/io.l") sym? (2408 . "@src64/subr.l") -sync (3054 . "@src64/io.l") +sync (3056 . "@src64/io.l") sys (3073 . "@src64/flow.l") t (1770 . "@src64/flow.l") tail (1898 . "@src64/subr.l") -tell (3124 . "@src64/io.l") +tell (3126 . "@src64/io.l") text (1272 . "@src64/sym.l") throw (2510 . "@src64/flow.l") tick (3182 . "@src64/flow.l") -till (3437 . "@src64/io.l") +till (3439 . "@src64/io.l") time (2491 . "@src64/main.l") touch (1049 . "@src64/sym.l") trim (1746 . "@src64/subr.l") @@ -336,12 +336,12 @@ use (1592 . "@src64/flow.l") usec (2596 . "@src64/main.l") val (1463 . "@src64/sym.l") version (2981 . "@src64/main.l") -wait (3016 . "@src64/io.l") +wait (3018 . "@src64/io.l") when (1903 . "@src64/flow.l") while (2080 . "@src64/flow.l") wipe (3090 . "@src64/sym.l") with (1349 . "@src64/flow.l") -wr (5048 . "@src64/io.l") +wr (5050 . "@src64/io.l") xchg (1538 . "@src64/sym.l") xor (1720 . "@src64/flow.l") x| (2871 . "@src64/big.l") diff --git a/src64/arch/x86-64.l b/src64/arch/x86-64.l @@ -1,4 +1,4 @@ -# 02aug10abu +# 30aug10abu # (c) Software Lab. Alexander Burger # Byte order @@ -405,18 +405,18 @@ (asm zxt () # 8 bit -> 64 bit (prinst "movzx" "%al" "%rax") ) -(asm setc () - (prinst "stc") ) - -(asm clrc () - (prinst "clc") ) - (asm setz () (prinst "or" "%r12" "%r12") ) (asm clrz () (prinst "cmp" "%rsp" "%r12") ) +(asm setc () + (prinst "stc") ) + +(asm clrc () + (prinst "clc") ) + # Comparisons (asm cmp (Dst D Src S) diff --git a/src64/io.l b/src64/io.l @@ -1,4 +1,4 @@ -# 28aug10abu +# 30aug10abu # (c) Software Lab. Alexander Burger # Close file descriptor @@ -224,7 +224,8 @@ call errno_A cmp A EAGAIN # No data available? if eq # Yes - setc # Return 'lt' + clrz # Return 'lt' + setc ret end cmp A EINTR # Interrupted? @@ -274,7 +275,7 @@ add X A # Increment buffer pointer sub E A # Decrement count if z # Got all - null A # 'nsz' + null A # Return 'gt' (A is non-zero) ret end do @@ -296,7 +297,8 @@ call errno_A cmp A EAGAIN # No data available? if eq # Yes - setc # Return 'lt' + clrz # Return 'lt' + setc ret end cmp A EINTR # Interrupted? @@ -2801,8 +2803,8 @@ ld C (Y I) # Get 'hear' fd again ld E 2 # Size of count ld X Buf # Buffer pointer - call rdBytesNbCEX_F # Read count - if ns # Greater or equal zero + call rdBytesNbCEX_F # Read count? + if ge # Yes if z call clsChildY # Close child pop Z @@ -2894,7 +2896,7 @@ ld E I # Size of slot ld X Buf # Buffer pointer call rdBytesNbCEX_F # Read slot? - if nsz # Yes + if gt # Yes ld Y (Child) # Get child add Y (Buf) # in slot null (Y) # 'pid'?