@@ 1,43 1,80 @@
+NOTE OPEN LOCKS
LINK 800
+@REP 2
+COPY 0 X
COPY 999 T
-MARK PICKLOCK
+MARK DECODE@{1,1}
COPY T #LOCK
ADDI X #LOCK X
SUBI T 111 T
-TJMP PICKLOCK
+TJMP DECODE@{1,1}
COPY X #LOCK
-NOTE UNLOCKED
+LINK 800
+@END
-NOTE GET "OGRE"
LINK -1
+LINK -1
+LINK -1
+
+; GET 'PROJECT OGRE'
GRAB 300
COPY F X
DROP
+
+; FIND THE FILE
LINK 800
LINK 800
-NOTE FIND PROJECT OGRE
-@REP 4
-LINK 80@{1,1}
+MAKE
+COPY 801 T
+COPY T F
+DROP
+MARK FINDFILE
+LINK T
GRAB 200
-TEST F = X
-FJMP SKIP@{1,1}
-COPY 80@{1,1} T
-JUMP FOUND
-
-MARK SKIP@{1,1}
+TEST X = F
+TJMP FOUNDFILE
DROP
LINK -1
-@END
+GRAB 400
+COPY F T
+ADDI T 1 T
+SEEK -1
+COPY T F
+DROP
+JUMP FINDFILE
-MARK FOUND
+MARK FOUNDFILE
DROP
+LINK -1
MAKE
-COPY T F
COPY X F
-LINK -1
DROP
-LINK T
+
+COPY 43 T
+
+MARK COPYLOOP
+GRAB 400
+COPY F X
+DROP
+LINK X
GRAB 200
-SEEK 1
+SUBI 44 T X
+SEEK X
+COPY F X
+DROP
+LINK -1
+GRAB 401
+SEEK 9999
+COPY X F
+SUBI T 1 T
+DROP
+TJMP COPYLOOP
+
+MARK DONECOPY
+GRAB 400
+WIPE
+GRAB 401
+LINK -1
+LINK -1