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 2068f012357e0d10d87244bab8f0192cc6475398
parent 53e95a9e1c6f9e74619364555acc526cd6e58e4d
Author: Alexander Burger <abu@software-lab.de>
Date:   Sat, 23 Apr 2011 10:44:30 +0200

Get rid of DLL kludges
Diffstat:
Mlib/tags | 24++++++++++++------------
Msrc64/ext.l | 10+++++-----
Msrc64/ht.l | 70+++++++++++++++++++++++++++++++++++-----------------------------------
Msrc64/io.l | 6+-----
4 files changed, 53 insertions(+), 57 deletions(-)

diff --git a/lib/tags b/lib/tags @@ -122,7 +122,7 @@ eol (3483 . "@src64/io.l") err (4196 . "@src64/io.l") errno (1379 . "@src64/main.l") eval (180 . "@src64/flow.l") -ext (5099 . "@src64/io.l") +ext (5095 . "@src64/io.l") ext? (1032 . "@src64/sym.l") extern (898 . "@src64/sym.l") extra (1259 . "@src64/flow.l") @@ -137,7 +137,7 @@ find (1322 . "@src64/apply.l") fish (1613 . "@src64/apply.l") flg? (2445 . "@src64/subr.l") flip (1699 . "@src64/subr.l") -flush (5074 . "@src64/io.l") +flush (5070 . "@src64/io.l") fold (3341 . "@src64/sym.l") for (2222 . "@src64/flow.l") fork (3256 . "@src64/flow.l") @@ -253,13 +253,13 @@ poll (3288 . "@src64/io.l") pool (648 . "@src64/db.l") pop (1771 . "@src64/sym.l") port (5 . "@src64/net.l") -pr (5182 . "@src64/io.l") +pr (5178 . "@src64/io.l") pre? (1409 . "@src64/sym.l") -prin (4998 . "@src64/io.l") -prinl (5012 . "@src64/io.l") -print (5038 . "@src64/io.l") -println (5069 . "@src64/io.l") -printsp (5054 . "@src64/io.l") +prin (4994 . "@src64/io.l") +prinl (5008 . "@src64/io.l") +print (5034 . "@src64/io.l") +println (5065 . "@src64/io.l") +printsp (5050 . "@src64/io.l") prior (2713 . "@src64/subr.l") prog (1752 . "@src64/flow.l") prog1 (1760 . "@src64/flow.l") @@ -279,12 +279,12 @@ rand (2976 . "@src64/big.l") range (997 . "@src64/subr.l") rank (3033 . "@src64/subr.l") raw (454 . "@src64/main.l") -rd (5116 . "@src64/io.l") +rd (5112 . "@src64/io.l") read (2624 . "@src64/io.l") replace (1499 . "@src64/subr.l") rest (2296 . "@src64/main.l") reverse (1678 . "@src64/subr.l") -rewind (5082 . "@src64/io.l") +rewind (5078 . "@src64/io.l") rollback (1888 . "@src64/db.l") rot (848 . "@src64/subr.l") run (311 . "@src64/flow.l") @@ -300,7 +300,7 @@ size (2806 . "@src64/subr.l") skip (3469 . "@src64/io.l") sort (3962 . "@src64/subr.l") sp? (709 . "@src64/sym.l") -space (5016 . "@src64/io.l") +space (5012 . "@src64/io.l") split (1592 . "@src64/subr.l") stack (560 . "@src64/main.l") state (2001 . "@src64/flow.l") @@ -343,7 +343,7 @@ when (1876 . "@src64/flow.l") while (2053 . "@src64/flow.l") wipe (3088 . "@src64/sym.l") with (1322 . "@src64/flow.l") -wr (5199 . "@src64/io.l") +wr (5195 . "@src64/io.l") xchg (1536 . "@src64/sym.l") xor (1693 . "@src64/flow.l") x| (2885 . "@src64/big.l") diff --git a/src64/ext.l b/src64/ext.l @@ -1,4 +1,4 @@ -# 20apr11abu +# 23apr11abu # (c) Software Lab. Alexander Burger (data 'ExtData) @@ -201,9 +201,9 @@ ascii "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" shl E 4 # Shift to upper position call chr64E # Output encoded ld B (char "=") # and two equal signs - call envPutB + call (PutB) ld B (char "=") - call envPutB + call (PutB) ld E Nil # Return NIL else shr E 4 # Normalize second arg @@ -224,7 +224,7 @@ ascii "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" shl A 2 # Shift call chr64A # Output encoded ld B (char "=") # and an equal sign - call envPutB + call (PutB) ld E Nil # Return NIL else shr E 4 # Normalize third arg @@ -249,6 +249,6 @@ ascii "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" ld A E (code 'chr64A) ld B (A Chr64) # Fetch from table - jmp envPutB # Output byte + jmp (PutB) # Output byte # vi:et:ts=3:sw=3 diff --git a/src64/ht.l b/src64/ht.l @@ -1,4 +1,4 @@ -# 21apr11abu +# 23apr11abu # (c) Software Lab. Alexander Burger (data 'HtData) @@ -94,7 +94,7 @@ align 8 asciz "<hr>" if z # Yes do ld B (Y) # Output partial string - call envPutB + call (PutB) inc Y # till end pointer in E cmp Y E until eq @@ -123,24 +123,24 @@ align 8 asciz "<hr>" cmp B (hex "FF") if eq ld B (hex "EF") - call envPutB + call (PutB) ld B (hex "BF") - call envPutB + call (PutB) ld B (hex "BF") - call envPutB + call (PutB) else ld C A # Save char - call envPutB # Output it + call (PutB) # Output it test C (hex "80") # Double byte? if nz # Yes inc Y # Next ld B (Y) # Output second byte - call envPutB + call (PutB) test C (hex "20") # Triple byte? if nz # Yes inc Y # Next ld B (Y) # Output third byte - call envPutB + call (PutB) end end end @@ -165,7 +165,7 @@ align 8 asciz "<hr>" (code 'putHexB 0) # E ld E A # Save B ld B (char "%") # Prefix with "%" - call envPutB + call (PutB) ld A E # Get B shr B 4 # Get upper nibble and B 15 @@ -174,7 +174,7 @@ align 8 asciz "<hr>" add B 7 end add B (char "0") - call envPutB # Output upper nibble + call (PutB) # Output upper nibble ld A E # Get B again and B 15 # Get lower nibble cmp B 9 # Letter? @@ -182,7 +182,7 @@ align 8 asciz "<hr>" add B 7 end add B (char "0") - jmp envPutB # Output lower nibble + jmp (PutB) # Output lower nibble (code 'htFmtE 0) cmp E Nil # NIL? @@ -190,7 +190,7 @@ align 8 asciz "<hr>" num E # Number? if nz # Yes ld B (char "+") # Prefix with "+" - call envPutB + call (PutB) jmp prinE # and print it end push X @@ -199,7 +199,7 @@ align 8 asciz "<hr>" ld X E do ld B (char "_") # Prefix with "_" - call envPutB + call (PutB) ld E (X) # Print next item call htFmtE ld X (X CDR) # End of list? @@ -213,7 +213,7 @@ align 8 asciz "<hr>" sym (E TAIL) # External symbol? if nz # Yes ld B (char "-") # Prefix with "-" - call envPutB + call (PutB) call prExtNmX # Print external else push Y @@ -222,7 +222,7 @@ align 8 asciz "<hr>" ld C 0 if eq # Yes ld B (char "$") # Prefix with "$" - call envPutB + call (PutB) else call symByteCX_FACX # Get first byte cmp B (char "$") # Dollar, plus or dot? @@ -233,7 +233,7 @@ align 8 asciz "<hr>" if eq 40 call putHexB # Encode hexadecimal else - call envPutB + call (PutB) end end do @@ -244,15 +244,15 @@ align 8 asciz "<hr>" call putHexB # Encode hexadecimal else ld E A # Save char - call envPutB # Output it + call (PutB) # Output it test E (hex "80") # Double byte? if nz # Yes call symByteCX_FACX # Next byte - call envPutB # Output second byte + call (PutB) # Output second byte test E (hex "20") # Triple byte? if nz # Yes call symByteCX_FACX # Next byte - call envPutB # Output third byte + call (PutB) # Output third byte end end end @@ -289,7 +289,7 @@ align 8 asciz "<hr>" cmp Y Z # More args? while ne # Yes ld B (char "&") - call envPutB + call (PutB) sub Y I # Next arg ld E (Y) call htFmtE # Format it @@ -381,7 +381,7 @@ align 8 asciz "<hr>" ld C A # into C call getHexX_A # Get lower nibble or A C # Combine - call envPutB # Output + call (PutB) # Output else ld X (X CDR) # Next symbol cmp B (char "&") # Ampersand? @@ -392,31 +392,31 @@ align 8 asciz "<hr>" call headCX_FX if eq ld B (char "<") - call envPutB + call (PutB) else ld C HtGt # "&gt;" call headCX_FX if eq ld B (char ">") - call envPutB + call (PutB) else ld C HtAmp # "&amp;" call headCX_FX if eq ld B (char "&") - call envPutB + call (PutB) else ld C HtQuot # "&quot;" call headCX_FX if eq ld B (char "\"") - call envPutB + call (PutB) else ld C HtNbsp # "&nbsp;" call headCX_FX if eq ld B (char " ") - call envPutB + call (PutB) else ld A ((X) TAIL) # Get next byte call firstByteA_B @@ -429,7 +429,7 @@ align 8 asciz "<hr>" call outNameE # Output unicode char else 40 ld B (char "&") # Else ouput an ampersand - call envPutB + call (PutB) end end end @@ -455,7 +455,7 @@ align 8 asciz "<hr>" ld A (Chr) # Look ahead char? null A if z # No - call envGet_A # Get next char + call (Get_A) # Get next char end null A # EOF? if ns # No @@ -483,7 +483,7 @@ align 8 asciz "<hr>" ld E (L I) # Return result break T end - call envGet_A # Get next char + call (Get_A) # Get next char null A # EOF? if s # Yes ld E Nil # Return NIL @@ -658,27 +658,27 @@ skip CHUNK # <Y III> Chunk buffer add B 39 # Make lower case letter end add B (char "0") # Make ASCII digit - jmp envPutB + jmp (PutB) (code 'wrChunkY 0) # X ld (PutB) (Y II) # Restore 'put' ld A (Y) # Get count call outHexA # Print as hex ld B 13 # Output 'return' - call envPutB + call (PutB) ld B 10 # Output 'newline' - call envPutB + call (PutB) lea X (Y III) # X on chunk buffer do ld B (X) # Next byte from chunk buffer - call envPutB # Output + call (PutB) # Output inc X # Increment pointer dec (Y) # Decrement 'Cnt' until z ld B 13 # Output 'return' - call envPutB + call (PutB) ld B 10 # Output 'newline' - call envPutB + call (PutB) ld (Y II) (PutB) # Save 'put' ld (PutB) putChunkedB # Set new ret diff --git a/src64/io.l b/src64/io.l @@ -1,4 +1,4 @@ -# 20apr11abu +# 23apr11abu # (c) Software Lab. Alexander Burger # Close file descriptor @@ -4628,12 +4628,8 @@ (code 'space) ld B 32 -(code 'envPutB) # DLL hook jmp (PutB) -(code 'envGet_A) # DLL hook - jmp (Get_A) - # Output decimal number (code 'outNumE) shr E 4 # Normalize