├── out ├── DUNGEON.ZAP ├── SYNTAX.ZAP ├── zork2.z3 ├── zapf-it.cmd ├── zork2word.xzap ├── rename.cmd ├── MACROS.ZAP ├── ZORK2.ZAP ├── CRUFTY.ZAP ├── CLOCK.ZAP ├── DEMONS.ZAP ├── MAIN.ZAP ├── zork2freq.xzap └── PARSER.ZAP ├── origfiles ├── zork2-mac-r22.zap │ ├── dungeo.zap │ ├── syntax.zap │ ├── macros.zap │ ├── zork2.zap │ ├── zork2.xzap │ ├── crufty.xzap │ ├── clock.zap │ ├── demons.zap │ ├── main.zap │ └── zork2freq.xzap ├── muddle │ └── pprint.1 ├── zork.z.rest │ ├── ibytes.mud.2 │ ├── ziputil.mud.3 │ ├── getstr.mud.2 │ ├── zipout.mud.2 │ ├── zac.mud.18 │ ├── zops.mud.18 │ └── apply.mud.1 ├── zork2-mac-r22.rest │ ├── zork2.errors │ ├── dungeon.cmp │ └── actions.cmp ├── zork2-mac-r22.zil │ ├── crufty.zil │ ├── zork2.zil │ ├── demons.zil │ ├── clock.zil │ ├── macros.zil │ ├── main.zil │ └── syntax.zil ├── zork.z.zilch │ └── zstr.mud.2 └── mimlib │ ├── sortx.mud │ ├── newstruc.mud │ └── trace.mud ├── images ├── SORT-fixes.png ├── ZIL-to-ZAP.png ├── crufty-diffs.png └── Z-machine-ToolChain.png ├── src ├── z2.mud ├── z.mud ├── crufty.zil ├── zork2.zil ├── demons.zil ├── clock.zil ├── macros.mud ├── macros.zil ├── main.zil ├── nstruc.mud ├── sort.mud ├── trace.mud ├── pprint.mud └── syntax.zil ├── .gitattributes └── .gitignore /out/DUNGEON.ZAP: -------------------------------------------------------------------------------- 1 | 2 | .ENDI 3 | -------------------------------------------------------------------------------- /out/SYNTAX.ZAP: -------------------------------------------------------------------------------- 1 | 2 | .ENDI 3 | -------------------------------------------------------------------------------- /origfiles/zork2-mac-r22.zap/dungeo.zap: -------------------------------------------------------------------------------- 1 | 2 | .ENDI 3 | -------------------------------------------------------------------------------- /origfiles/zork2-mac-r22.zap/syntax.zap: -------------------------------------------------------------------------------- 1 | 2 | .ENDI 3 | -------------------------------------------------------------------------------- /out/zork2.z3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZoBoRf/ZILCH-How-to/HEAD/out/zork2.z3 -------------------------------------------------------------------------------- /images/SORT-fixes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZoBoRf/ZILCH-How-to/HEAD/images/SORT-fixes.png -------------------------------------------------------------------------------- /images/ZIL-to-ZAP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZoBoRf/ZILCH-How-to/HEAD/images/ZIL-to-ZAP.png -------------------------------------------------------------------------------- /images/crufty-diffs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZoBoRf/ZILCH-How-to/HEAD/images/crufty-diffs.png -------------------------------------------------------------------------------- /origfiles/muddle/pprint.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZoBoRf/ZILCH-How-to/HEAD/origfiles/muddle/pprint.1 -------------------------------------------------------------------------------- /images/Z-machine-ToolChain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZoBoRf/ZILCH-How-to/HEAD/images/Z-machine-ToolChain.png -------------------------------------------------------------------------------- /out/zapf-it.cmd: -------------------------------------------------------------------------------- 1 | C:\storage\project\if\zilf-0.9\zilf\Package\Release\Stage\zilf-0.9.0-win-x64\bin\Zapf.exe zork2.zap 2 | -------------------------------------------------------------------------------- /out/zork2word.xzap: -------------------------------------------------------------------------------- 1 | 2 | 3 | ;word frequency table of 96 most common words 4 | 5 | WORDS:: .TABLE 6 | .ENDT 7 | 8 | .ENDI 9 | -------------------------------------------------------------------------------- /out/rename.cmd: -------------------------------------------------------------------------------- 1 | move ACTION.ZAP ACTIONS.ZAP 2 | move DUNGEO.ZAP DUNGEON.ZAP 3 | move ZORK2D.ZAP ZORK2DAT.ZAP 4 | move ZORK2S.ZAP ZORK2STR.ZAP 5 | 6 | -------------------------------------------------------------------------------- /origfiles/zork.z.rest/ibytes.mud.2: -------------------------------------------------------------------------------- 1 | > 2 | 3 | >> 7 | -------------------------------------------------------------------------------- /src/z2.mud: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | > 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /out/MACROS.ZAP: -------------------------------------------------------------------------------- 1 | 2 | 3 | .FUNCT ZPROB,BASE 4 | ZERO? LUCKY /?ELS5 5 | RANDOM 100 6 | GRTR? BASE,STACK /TRUE 7 | RFALSE 8 | ?ELS5: RANDOM 300 9 | GRTR? BASE,STACK /TRUE 10 | RFALSE 11 | 12 | 13 | .FUNCT PICK-ONE,FROB 14 | GET FROB,0 15 | RANDOM STACK 16 | GET FROB,STACK 17 | RSTACK 18 | 19 | .ENDI 20 | -------------------------------------------------------------------------------- /origfiles/zork2-mac-r22.zap/macros.zap: -------------------------------------------------------------------------------- 1 | 2 | 3 | .FUNCT ZPROB,BASE 4 | ZERO? LUCKY /?ELS5 5 | RANDOM 100 6 | GRTR? BASE,STACK /TRUE 7 | RFALSE 8 | ?ELS5: RANDOM 300 9 | GRTR? BASE,STACK /TRUE 10 | RFALSE 11 | 12 | 13 | .FUNCT PICK-ONE,FROB 14 | GET FROB,0 15 | RANDOM STACK 16 | GET FROB,STACK 17 | RSTACK 18 | 19 | .ENDI 20 | -------------------------------------------------------------------------------- /origfiles/zork2-mac-r22.zap/zork2.zap: -------------------------------------------------------------------------------- 1 | 2 | .INSERT "ZORK2DAT" ; DATA IS IN THIS FILE 3 | 4 | 5 | .INSERT "DUNGEON" 6 | 7 | 8 | .INSERT "SYNTAX" 9 | 10 | 11 | .INSERT "MACROS" 12 | 13 | 14 | .INSERT "CLOCK" 15 | 16 | 17 | .INSERT "MAIN" 18 | 19 | 20 | .INSERT "PARSER" 21 | 22 | 23 | .INSERT "DEMONS" 24 | 25 | 26 | .INSERT "CRUFTY" 27 | 28 | 29 | .INSERT "VERBS" 30 | 31 | 32 | .INSERT "ACTIONS" 33 | 34 | 35 | .INSERT "ZORK2STR" 36 | 37 | .END 38 | -------------------------------------------------------------------------------- /origfiles/zork2-mac-r22.zap/zork2.xzap: -------------------------------------------------------------------------------- 1 | .INSERT "ZORK2FREQ" 2 | 3 | .INSERT "ZORK2DAT" ; DATA IS IN THIS FILE 4 | 5 | 6 | .INSERT "DUNGEON" 7 | 8 | 9 | .INSERT "SYNTAX" 10 | 11 | 12 | .INSERT "MACROS" 13 | 14 | 15 | .INSERT "CLOCK" 16 | 17 | 18 | .INSERT "MAIN" 19 | 20 | 21 | .INSERT "PARSER" 22 | 23 | 24 | .INSERT "DEMONS" 25 | 26 | 27 | .INSERT "CRUFTY" 28 | 29 | 30 | .INSERT "VERBS" 31 | 32 | 33 | .INSERT "ACTIONS" 34 | 35 | 36 | .INSERT "ZORK2STR" 37 | 38 | .END 39 | -------------------------------------------------------------------------------- /out/ZORK2.ZAP: -------------------------------------------------------------------------------- 1 | .INSERT "zork2freq" 2 | 3 | 4 | .INSERT "ZORK2DAT" ; DATA IS IN THIS FILE 5 | 6 | 7 | .INSERT "DUNGEON" 8 | 9 | 10 | .INSERT "SYNTAX" 11 | 12 | 13 | ENDLOD:: 14 | 15 | .INSERT "MACROS" 16 | 17 | 18 | .INSERT "CLOCK" 19 | 20 | 21 | .INSERT "MAIN" 22 | 23 | 24 | .INSERT "PARSER" 25 | 26 | 27 | .INSERT "DEMONS" 28 | 29 | 30 | .INSERT "CRUFTY" 31 | 32 | 33 | .INSERT "VERBS" 34 | 35 | 36 | .INSERT "ACTIONS" 37 | 38 | 39 | .INSERT "ZORK2STR" 40 | 41 | .END 42 | -------------------------------------------------------------------------------- /src/z.mud: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | > 6 | 7 | 9 | 10 | 11 | > 12 | 13 | 17 | > 18 | "Saved.") 19 | (T 20 | 21 | )>> 22 | 23 | 24 | -------------------------------------------------------------------------------- /origfiles/zork.z.rest/ziputil.mud.3: -------------------------------------------------------------------------------- 1 | )) 2 | #DECL ((G) (I) OBLIST) 3 | ) 5 | (T 6 | .I> 7 | .I>> 8 | <1 .G>> 9 | >)>>> 10 | 11 | > 14 | > 15 | 16 | >) 17 | (ELSE )>>> 18 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # disable automatic handling of line endings 2 | * text=false 3 | # Explicitly declare text files you want to always be normalized and converted 4 | # to native line endings on checkout. 5 | *.zil text eol=lf 6 | *.zap text eol=lf 7 | *.xzap text eol=lf 8 | *.mud text eol=lf 9 | *.cmp text eol=lf 10 | *.errors text eol=lf 11 | *.c text eol=lf 12 | *.h text eol=lf 13 | *.w text eol=lf 14 | *.sty text eol=lf 15 | *.tex text eol=lf 16 | *.bib text eol=lf 17 | *.el text eol=lf 18 | *.vim text eol=lf 19 | # Denote all files that are truly binary and should not be modified. 20 | *.png binary 21 | *.jpg binary 22 | -------------------------------------------------------------------------------- /out/CRUFTY.ZAP: -------------------------------------------------------------------------------- 1 | 2 | 3 | .FUNCT THIS-IT?,OBJ,TBL,SYNS,?TMP1 4 | FSET? OBJ,INVISIBLE /FALSE 5 | ZERO? P-NAM /?THN3 6 | GETPT OBJ,P?SYNONYM >SYNS 7 | PTSIZE SYNS 8 | DIV STACK,2 9 | SUB STACK,1 10 | CALL ZMEMQ,P-NAM,SYNS,STACK 11 | ZERO? STACK /FALSE 12 | ?THN3: ZERO? P-ADJ /?ELS8 13 | GETPT OBJ,P?ADJECTIVE >SYNS 14 | ZERO? SYNS /?ELS8 15 | PTSIZE SYNS 16 | SUB STACK,1 17 | CALL ZMEMQB,P-ADJ,SYNS,STACK 18 | ZERO? STACK /FALSE 19 | ?ELS8: ZERO? P-GWIMBIT /TRUE 20 | FSET? OBJ,P-GWIMBIT /TRUE 21 | RFALSE 22 | 23 | 24 | .FUNCT I-LANTERN 25 | CALL LIGHT-INT,LAMP,I-LANTERN,LAMP-TABLE 26 | RSTACK 27 | 28 | .ENDI 29 | -------------------------------------------------------------------------------- /origfiles/zork2-mac-r22.zap/crufty.xzap: -------------------------------------------------------------------------------- 1 | 2 | .FUNCT THIS-IT?,OBJ,TBL,SYNS,?TMP1 3 | FSET? OBJ,INVISIBLE /FALSE 4 | ZERO? P-NAM /?THN3 5 | GETPT OBJ,P?SYNONYM >SYNS 6 | PTSIZE SYNS 7 | DIV STACK,2 8 | SUB STACK,1 9 | CALL ZMEMQ,P-NAM,SYNS,STACK 10 | ZERO? STACK /FALSE 11 | ?THN3: ZERO? P-ADJ /?ELS8 12 | GETPT OBJ,P?ADJECTIVE >SYNS 13 | ZERO? SYNS /FALSE 14 | PTSIZE SYNS 15 | SUB STACK,1 16 | CALL ZMEMQB,P-ADJ,SYNS,STACK 17 | ZERO? STACK /FALSE 18 | ?ELS8: ZERO? P-GWIMBIT /TRUE 19 | FSET? OBJ,P-GWIMBIT /TRUE 20 | RFALSE 21 | 22 | 23 | .FUNCT I-LANTERN 24 | CALL LIGHT-INT,LAMP,I-LANTERN,'LAMP-TABLE 25 | RSTACK 26 | 27 | .ENDI 28 | -------------------------------------------------------------------------------- /origfiles/zork2-mac-r22.rest/zork2.errors: -------------------------------------------------------------------------------- 1 | Assembling ZORK2.XZAP.10 2 | 3 | 4 | Inserting ZORK2FREQ.XZAP.5 ( 616 bytes) 5 | Inserting ZORK2DAT.ZAP.1 (17170 bytes) 6 | Inserting DUNGEON.ZAP.1 ( 0 bytes) 7 | Inserting SYNTAX.ZAP.1 ( 0 bytes) 8 | Inserting MACROS.ZAP.1 ( 42 bytes) 9 | Inserting CLOCK.ZAP.1 ( 197 bytes) 10 | Inserting MAIN.ZAP.1 ( 628 bytes) 11 | Inserting PARSER.ZAP.1 ( 4076 bytes) 12 | Inserting DEMONS.ZAP.1 ( 277 bytes) 13 | Inserting CRUFTY.XZAP.7 ( 89 bytes) 14 | Inserting VERBS.ZAP.1 ( 9969 bytes) 15 | Inserting ACTIONS.ZAP.1 (32301 bytes) 16 | Inserting ZORK2STR.ZAP.1 (17699 bytes) 17 | 17850 bytes of preload. 18 | 19 | 83128 bytes (82K). 20 | 244 objects. 21 | 147 globals. 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Vim 3 | *~ 4 | 5 | # Vim also creates swap files that have the swp and swo extensions. to remove those use the lines: 6 | *.swp 7 | *.swo 8 | 9 | # Prerequisites 10 | *.d 11 | 12 | # Object files 13 | *.o 14 | *.ko 15 | *.obj 16 | *.elf 17 | 18 | # Linker output 19 | *.ilk 20 | *.map 21 | *.exp 22 | 23 | # Precompiled Headers 24 | *.gch 25 | *.pch 26 | 27 | # Libraries 28 | *.lib 29 | *.a 30 | *.la 31 | *.lo 32 | 33 | # Shared objects (inc. Windows DLLs) 34 | *.dll 35 | *.so 36 | *.so.* 37 | *.dylib 38 | 39 | # Executables 40 | *.exe 41 | *.out 42 | *.app 43 | *.i*86 44 | *.x86_64 45 | *.hex 46 | 47 | # Debug files 48 | *.dSYM/ 49 | *.su 50 | *.idb 51 | *.pdb 52 | 53 | /README.md.html 54 | -------------------------------------------------------------------------------- /src/crufty.zil: -------------------------------------------------------------------------------- 1 | "CRUFTY2 for 2 | Zork: The Wizard of Frobozz 3 | The Great Underground Empire (Part 2) 4 | (c) Copyright 1981 Infocom, Inc. All Rights Reserved. 5 | " 6 | 7 | ) 9 | > 10 | 11 | > 13 | <- 2> 1>>> 14 | 15 | > 16 | 1>>>> 17 | >>> 18 | 19 | > 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /origfiles/zork2-mac-r22.zil/crufty.zil: -------------------------------------------------------------------------------- 1 | "CRUFTY2 for 2 | Zork: The Wizard of Frobozz 3 | The Great Underground Empire (Part 2) 4 | (c) Copyright 1981 Infocom, Inc. All Rights Reserved. 5 | " 6 | 7 | ) 9 | > 10 | 11 | > 13 | <- 2> 1>>> 14 | 15 | > 16 | 1>>>> 17 | >>> 18 | 19 | > 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /origfiles/zork.z.rest/getstr.mud.2: -------------------------------------------------------------------------------- 1 | )) 2 | #DECL ((VALUE) ZSTR 3 | (ZPC) FIX 4 | (BYTE1) ) 5 | > 6 | ) 9 | ZSTR>> 10 | > 13 | .BYT>> 14 | > 15 | > 16 | > 17 | > 18 | > 19 | > 20 | > 21 | > 22 | > 23 | >> -------------------------------------------------------------------------------- /origfiles/zork.z.rest/zipout.mud.2: -------------------------------------------------------------------------------- 1 | ) 4 | >>> 5 | 6 | 7 | >> 10 | >>> 11 | .B> 12 | 13 | > 14 | 15 | FIX>> >> 19 | FIX>> >> 20 | FIX>> >> 21 | FIX>> >> 22 | <+ .B 23 | 32 24 | <* 16> 25 | <* FIX> 32>>> 26 | -------------------------------------------------------------------------------- /origfiles/zork2-mac-r22.zil/zork2.zil: -------------------------------------------------------------------------------- 1 | "ZORK2 for 2 | Zork: The Wizard of Frobozz 3 | The Great Underground Empire (Part 2) 4 | (c) Copyright 1981 Infocom, Inc. All Rights Reserved. 5 | " 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | >> 15 | 16 | 17 | >> 18 | 19 | ) "AUX" (TIM