Skip to content

Commit

Permalink
Zork source code from 1979.
Browse files Browse the repository at this point in the history
  • Loading branch information
larsbrinkhoff authored and eswenson1 committed Apr 10, 2018
1 parent c67abad commit 1b55589
Show file tree
Hide file tree
Showing 23 changed files with 21,118 additions and 0 deletions.
2,036 changes: 2,036 additions & 0 deletions src/zork/act1.253

Large diffs are not rendered by default.

793 changes: 793 additions & 0 deletions src/zork/act2.92

Large diffs are not rendered by default.

1,536 changes: 1,536 additions & 0 deletions src/zork/act3.198

Large diffs are not rendered by default.

1,151 changes: 1,151 additions & 0 deletions src/zork/act4.231

Large diffs are not rendered by default.

924 changes: 924 additions & 0 deletions src/zork/b.176

Large diffs are not rendered by default.

145 changes: 145 additions & 0 deletions src/zork/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
MARC MARC
CONN <ZORK>
<MDL>MDL104
<RESTORE "<MDL>M104UNI">
<SNAME "ZORK">
<FLOAD "LITLPK.GBIN">
<USE "CLEAN" "PURITY">
<SETG NULL!- <INSERT <STRING <ASCII 127>> <ROOT>>>
%%<BLOCK (<MOBLIST FROBOZZ> <GET INITIAL OBLIST> <ROOT>)>
<DEFINE GL (FILE "AUX" VAL (CH <OPEN "READ" .FILE>) L)
<SET L
<MAPF ,LIST
<FUNCTION ()
<SET VAL <READ .CH '<MAPSTOP>>>
<EVAL .VAL>
.VAL>>>
<SET <SET VAL <PARSE <7 .CH>>> .L>
.VAL>
<DEFINE FLUSHG (ATM "AUX" (G ..ATM))
<MAPF <>
<FUNCTION (X)
<COND (<AND <TYPE? .X FORM>
<G? <LENGTH .X> 2>
<MEMQ <1 .X> '![SETG DEFMAC DEFINE]>>
<AND <MANIFEST? <2 .X>>
<UNMANIFEST <2 .X>>>
<GUNASSIGN <2 .X>>)>>
.G>
<UNASSIGN <REMOVE .ATM>>>
%%<ENDBLOCK>
<GL!-FROBOZZ "PRIM.NBIN">
<GL!-FROBOZZ "MAKSTR.NBIN">
<FLOAD "ZORK.XGBIN">
<FLUSHG!-FROBOZZ PRIM>
<FLUSHG!-FROBOZZ MAKSTR>
<FLOAD "TYPHAK.NBIN">
<MAPF <> <FUNCTION (X)
<MAPF <> <FUNCTION (X)
<COND (<GBOUND? .X> <PUT-DECL <GLOC .X> ANY>)>>
.X>>
<GET INITIAL OBLIST>>
<CLEANUP>
<PRINT-CLEANUP>
%%<SET X ,PURELST>
<GROUP-PURIFY X>
<GL!-FROBOZZ "PRIM.NBIN">
<GL!-FROBOZZ "MAKSTR.NBIN">
<FLOAD "DUNG">
<SETG END-GAME-EXISTS? T>
%%<BLOCK (<GET FROBOZZ OBLIST> <GET INITIAL OBLIST> <ROOT>)>
<DEFINE ROOM-FROB (RM L "AUX" TL)
<COND (<SET TL <MEMBER <RDESC1 .RM> .L>>
<PUT .RM ,RDESC1 <1 .TL>>)
(<SET L (<RDESC1 .RM> !.L)>)>
<COND (<SET TL <MEMBER <RDESC2 .RM> .L>>
<PUT .RM ,RDESC2 <1 .TL>>)
(<SET L (<RDESC2 .RM> !.L)>)>
<MAPR <>
<FUNCTION (Y "AUX" (X <1 .Y>))
<COND (<AND <TYPE? .X CEXIT> <CXSTR .X>>
<COND (<SET TL <MEMBER <CXSTR .X> .L>>
<PUT .X ,CXSTR <1 .TL>>)
(<SET L (<CXSTR .X> !.L)>)>)
(<AND <TYPE? .X DOOR> <DSTR .X>>
<COND (<SET TL <MEMBER <DSTR .X> .L>>
<PUT .X ,DSTR <1 .TL>>)
(<SET L (<DSTR .X> !.L)>)>)
(<TYPE? .X NEXIT>
<COND (<SET TL <MEMBER .X .L>>
<PUT .Y 1 <1 .TL>>)
(<SET L (.X !.L)>)>)>>
<REXITS .RM>>
.L>
<DEFINE OBJECT-FROB (OBJ L "AUX" TL TEMP)
<COND (<SET TL <MEMBER <ODESC1 .OBJ> .L>>
<OPUT .OBJ ODESC1 <1 .TL>>)
(<SET L (<ODESC1 .OBJ> !.L)>)>
<COND (<SET TL <MEMBER <ODESC2 .OBJ> .L>>
<PUT .OBJ ,ODESC2 <1 .TL>>)
(<SET L (<ODESC2 .OBJ> !.L)>)>
<COND (<SET TL <MEMBER <ODESCO .OBJ> .L>>
<OPUT .OBJ ODESCO <1 .TL>>)
(<SET L (<ODESCO .OBJ> !.L)>)>
<COND (<SET TEMP <OREAD .OBJ>>
<SET L (.TEMP !.L)>)>
<COND (<SET TEMP <OFMSGS .OBJ>>
<SET L (.TEMP !.L)>)>
.L>
%%<ENDBLOCK>
<GL!-FROBOZZ "DISP1.GBIN">
<DISPATCH-HACK>
<FLUSHG!-FROBOZZ PRIM>
<FLUSHG!-FROBOZZ MAKSTR>
<FLUSHG!-FROBOZZ DISP1>
<SET Y ()>
<SETG FF "; \\\"Dungeon\\\"">
%%<MAPF <>
<FUNCTION (X)
<SET Y <ROOM-FROB!-FROBOZZ .X .Y>>>
,ROOMS>
%%<MAPF <>
<FUNCTION (X)
<SET Y <OBJECT-FROB!-FROBOZZ .X .Y>>>
,OBJECTS>
%%<PUT <PUT FROBOZZ OBLIST> OBLIST>
%%<MAPR <>
<FUNCTION (X)
<PUT .X 1 ,<1 .X>>>
,PURE-LIST>
%%<PUTREST <REST ,PURE-LIST <- <LENGTH ,PURE-LIST> 1>> .Y>
%%<SET Y <IVECTOR <LENGTH ,PURE-LIST>>>
%%<MAPR <>
<FUNCTION (X Y)
<PUT .X 1 <1 .Y>>>
.Y ,PURE-LIST>
%%<SETG PURE-LIST .Y>
<UNASSIGN <REMOVE Y>>
<LENGTH ,PURE-LIST>
%%<PURIFY ,PURE-LIST ,DISPATCH-TABLE>
<KILL:PURITY>
<FLUSH-CLEANUP>
<UNASSIGN X>
<REMOVE <GUNASSIGN PURE-LIST>>
<REMOVE <UNASSIGN FOO>>
<DEFINE F (BAR) <GUNASSIGN <REMOVE .BAR>>>
<F DROP>
<F L-UNUSE>
<F USE>
<F ENTRY>
<F PACKAGE>
<F ENDPACKAGE>
<F FIND/LOAD>
<F F>
<HANDLER <GET ERROR!-INTERRUPTS INTERRUPT> ,ERRH>
<SETG MUD-HAND <OFF <3 <GET ,INCHAN INTERRUPT>>>>
<SETG ZORK-HAND <OFF <HANDLER <GET ,INCHAN INTERRUPT> ,CTRL-S>>>
<GC 0 T>
<SETG DBG <>>
<GC-MON T>
<BLOAT 0 0 0 0 0 300>
<SAVE-IT "<TAA>MADADV.SAVE" <>>
<QUIT>
DEL ZORK.XGBIN
EXP
Loading

0 comments on commit 1b55589

Please sign in to comment.