( FILE: OMIT.4th -- 8 July 88 -- MFB ) ( This program lets you take words out of the dictionary. You can make a smaller system by removing symbols that will never be referenced by any new programs. Use it before an attach to make the attached part smaller. Example - Assume you have created the following words: : SUB1 ... ; : MAIN ... SUB1 ... SUB1 ... ; and no further references to SUB1 are necessary. Delete the dictionary entry for SUB1 with: OMIT SUB1 Note that the code for SUB1 is not deleted, only the symbol table entry. ) : OMIT WORD LAST @ FIND DUP 0= IF ( found) DROP CRLF ATOM ." " Not Found by OMIT" ." RETURN THEN DICTION OVER U> IF ( not in diction build area) DROP " \13 10\Can't omit system/attached entries\13 10\" ." RETURN THEN DUPB@ ( length) OVER + 4 + ( next) REPEAT ( tos = move dest; nos = move src) OVER LAST @ - WHILE ( not past last) 1- SWAP 1- DUPB@ 3 PICK B! SWAP ( move one byte) ENDWHILE LAST ! ( update last) DROP ; IMMEDIATE ( End of OMIT)