diff --git a/blocks.frt b/blocks.frt index c21f0fd..05e6fb7 100644 --- a/blocks.frt +++ b/blocks.frt @@ -1534,10 +1534,14 @@ HEX WANT DROP-WORD : SHIFT-ARGS ARG$ DROP-WORD DROP ARGS ! ; DECIMAL -( SRC>EXEC 1 ) CF: ?LI \ AvdH A3mar20 - +( SRC>EXEC 2 ) CF: ?WIMS \ AvdH B1aug16 +HEX \ Given a source file NAME, return the binary file NAME. -: SRC>EXEC 4 - 2DUP + ".frt" CORA IF 2DROP "a.out" THEN ; +: SRC>EXEC PAD $! PAD $@ + 4 - >R + R@ 4 + R@ 1 + DO I C@ 20 INVERT AND I C! LOOP \ Uppercase + R> ".FRT" CORA IF "AOUT.EXE" ELSE + -4 PAD +! ".EXE" PAD $+! PAD $@ THEN ; +DECIMAL @@ -1545,19 +1549,16 @@ DECIMAL +\ +( SRC>EXEC 1 ) CF: ?HS \ AvdH A3mar20 + +\ Given a source file NAME, return the binary file NAME. +: SRC>EXEC 4 - 2DUP + ".frt" CORA IF 2DROP "a.out" THEN ; -( SRC>EXEC 2 ) CF: \ AvdH B1aug16 -HEX -\ Given a source file NAME, return the binary file NAME. -: SRC>EXEC PAD $! PAD $@ + 4 - >R - R@ 4 + R@ 1 + DO I C@ 20 INVERT AND I C! LOOP \ Uppercase - R> ".FRT" CORA IF "AOUT.EXE" ELSE - -4 PAD +! ".EXE" PAD $+! PAD $@ THEN ; -DECIMAL @@ -1565,7 +1566,6 @@ DECIMAL -\ ( LOAD-DLL: DLL-ADDRESS: K32 GET-ENV ) CF: ?WI \ AvdH B2aug9 ( sc -- adr) : Z 0 , DROP ; ( n adr -- ) @@ -1886,6 +1886,22 @@ Tools and utilities +( INSTALL-TRAPS ) CF: ?OSX \ AvdH A9sep15 +\ Nobody knows how to do this on Bill's systems. +: INSTALL-TRAPS ; +: INSTALL-NO-TRAPS ; + + + + + + + + + + + + ( INSTALL-TRAPS ) CF: ?WIMS \ AvdH A9sep15 \ Nobody knows how to do this on Bill's systems. : INSTALL-TRAPS ; @@ -2574,7 +2590,7 @@ DECIMAL -( OS-IMPORT cdED ) CF: \ AvdH A2feb05 +( OS-IMPORT cdED cd ) CF: \ AvdH A2feb05 "SYSTEM" PRESENT 0= ?LEAVE-BLOCK CREATE cmdbuf 1000 ALLOT : OS-IMPORT ( sc "name-forth" -- ) @@ -2587,25 +2603,9 @@ CREATE cmdbuf 1000 ALLOT ?LI WANT -syscalls- \ Change directory to SC . : cdED ZEN HERE HERE __NR_chdir XOS ?ERRUR ; +: cd NAME cdED ; \ Change directory to "SC" - -( cat cp echo diff grep more ls make man rm ee l unix) CF: ?LI -WANT OS-IMPORT ( and cdED ) \ AvdH A30325 -"cat " OS-IMPORT cat -: cd NAME cdED ; \ Change directory to "SC" -"cp " OS-IMPORT cp -"echo " OS-IMPORT echo -"diff " OS-IMPORT diff -"grep " OS-IMPORT grep -"more " OS-IMPORT more -"ls " OS-IMPORT ls -"make " OS-IMPORT make -"man " OS-IMPORT man -"rm -i " OS-IMPORT rm -\ "ee " OS-IMPORT ee \ My favorite editor -"vi " OS-IMPORT ed \ Less favorite editor -"" OS-IMPORT !! ( cat cd cp echo ed more ls rm ee l unix) CF: ?WIMS \ AvdH WANT OS-IMPORT HEX "TYPE " OS-IMPORT cat @@ -2638,6 +2638,22 @@ DECIMAL "CALL" PRESENT ?LEAVE-BLOCK HEX "A:" OS-IMPORT A: "C:" OS-IMPORT C: "D:" OS-IMPORT D: DECIMAL +( cat cp echo diff grep more ls make man rm ee l unix) CF: ?HS +WANT OS-IMPORT ( and cdED ) \ AvdH A30325 +"cat " OS-IMPORT cat +"cp " OS-IMPORT cp +"echo " OS-IMPORT echo +"diff " OS-IMPORT diff +"grep " OS-IMPORT grep +"more " OS-IMPORT more +"ls " OS-IMPORT ls +"make " OS-IMPORT make +"man " OS-IMPORT man +"rm -i " OS-IMPORT rm +\ "ee " OS-IMPORT ee \ My favorite editor +"vi " OS-IMPORT ed \ Less favorite editor +"" OS-IMPORT !! + ( DEVELOP EDITOR ME ) CF: ?WIMS \ AvdH A9oct05 diff --git a/ci86.gnr b/ci86.gnr index 3a720b1..23b452e 100644 --- a/ci86.gnr +++ b/ci86.gnr @@ -7870,7 +7870,16 @@ dnl This may fail the first time the test runs enddoc) _HOSTED_X_({ _HEADER({OPEN-FILE},{OFILE},{DOCOL}) - DC TOR, ZEN, FROMR, X + DC TOR, ZEN, FROMR +_HOSTED_OSX_({ + DC TDUP, ZERO + DC LIT, access, XOS, LDUP + _0BRANCH({OFIL1}) + DC NEGATE, NIP, EXIT +OFIL1: + DC DROP +})_C{}_END_({_HOSTED_OSX_}) + DC X DC LIT, open, XOS DC LDUP, ZERO, MIN DC SEMIS diff --git a/constant_osx.m4 b/constant_osx.m4 index 4f0452f..bdbdcef 100644 --- a/constant_osx.m4 +++ b/constant_osx.m4 @@ -37,6 +37,7 @@ creat EQU 0x8 unlink EQU 0xa chdir EQU 0xc read EQU 0x3 +access EQU 0x21 select EQU 0x52 _newselect EQU 0x5d ; Spykerman ; _newselect EQU 0x8e