ScottKit (compile/decompile Scott Adams game files)

Someone pointed me at this:

reprog.wordpress.com/2017/10/12 … ears-late/

github.com/MikeTaylor/scottkit

Absolutely fascinating!

I decompiled adv05 “The Count”, and was amazed how small the code is. Scott Adams games are somewhat terse, but nevertheless, you still have to have the game logic in there.

What i did notice with the decompiled format, is that the messages are repeated, where they are shared in the compiled version. For example the action;

	print "I notice a DARK WINDOW UNDER the bedroom window ledge!"

Appears 6 times in the decompiled version.

When compiling back, you need to be sure you don’t wind up with 6 copies. If the source was made by hand, it’s too easy to have one or two of these messages, very slightly different and thus create unneeded duplicates, even where the compiler merges identical strings.

On the subject of strings, was the .DAT format really the one used by the TRS-80? I ask this because it appears the strings were not compressed in any way. I should imagine doing so would have yielded significant space for bigger games (or graphics - a stretch i know!)

One last observation is that in “The Count”, there’s a dream where the source code (or at least the text parts of it) flashes in front of you. I can’t see this in the decompiled version, so presumably, it’s an opcode not implemented, or something else. not sure.

great stuff!

(I don’t know the technical details of how the text was implemented, but I have heard that it was hardly compressed at all, leading to the remarkable terseness of the Scott Adams games.)

So, it seems the compiled output of scottkit is essentially the same as the TRS-80, .DAT format (except for a few newlines). Furthermore, it appears to run under scottfree.

Looking at the source of scottfree, which is just a few pages of C, it would be straightforward to compile that for the TRS-80. ie make a version that actually runs on the real, old kit.

So that means, a new “scott adams” game could be built and run on a 80’s TRS-80. ho ho!

Anyone authored any games?

Anyhow, i won’t have time to try until xmas, which is the only time i can justify working on “pointless” projects. :slight_smile:

I recall a few years back there was a pirate adventure in the IFComp entitled “R” which was written to the specs of a Scott Adams virtual machine.

This is of course a good thing. I welcome it. But it’s not the first compiler for Scott Adams format.
Among others, I like sac, written in Perl by Mike Taylor.

Hi, folks – Mike Taylor here. I am the author of both the older sac (part of the Games::ScottAdams Perl module) and the newer ScottKit Ruby gem. Thanks to Nathan for his kind words about sac, but really ScottKit supersedes it in every respect: it’s a better program, with better documentation, better examples, and – crucially – a better source format.

The stupid thing is, I wrote 95% of it in 2010, but didn’t get around to releasing it properly because I somehow lost impetus before I’d finished the documentation. But it’s up and running now, fully supported (I read and address bug reports in the issue tracker), and the subject of a sequence of blog-posts at reprog.wordpress.com/category/g … ?order=ASC (but skip the the first one, which is only tangentially about ScottKit.)

jkj yuio, rather than thinking “the same string appears six times in the decompiled version”, think “if the same string appears six times in the source code, they all get changed into references to the same one in the object code”. The idea was to make it as easy as possible for authors to make games, without troubling them with such notions as string identifiers. Let the computer do the work: as Larry Wall once said, that’s what it’s paid for!

I, too, have been astonished at how inefficient the Scott Adams data format is. I have a blog-post in the works about this, but even without elaborate techniques such as string compression, I think his data files could easily have been reduced to 2/3 the size – or, to put it another way, his games could have been 50% bigger.

I suspect there’s either a typo bug or something wrong in the gem repository:

[code]gem install scottkit
Fetching: scottkit-1.5.0.gem (100%)
Successfully installed scottkit-1.5.0
Parsing documentation for scottkit-1.5.0
Installing ri documentation for scottkit-1.5.0
Done installing documentation for scottkit after 0 seconds
1 gem installed

scottkit
/usr/local/bin/scottkit: No data-file specified
Usage: /usr/local/bin/scottkit [options] []
(ScottKit version 1.4.0)
-c, --compile Compile instead of loading
-d, --decompile Decompile instead of playing
-p, --play-from-source Compile and play from source
-t, --teleport Generate teleporting actions (for debugging)
[/code]

either the version number isn’t updated in the script or gem gets the wrong version. I think that is former…

Best regards from Italy,
dott. Piergiorgio.

Thanks for spotting this! I’ve upgraded the program to now report v1.5.0, so if you’re using a version checked out from git it will be correct. I will try to remember to make this change the next I bump the version number.

(Does anyone know how I can ask Ruby what the version-number of a library is? Then I could avoid having to store the same information in two places.)

The easiest solution is just to define it as a constant that you can reference wherever you need it, e.g.:

# lib/scottkit/version.rb

module ScottKit
  VERSION = '1.5.0'
end

I’ve never used Jeweler, so I have no idea what best practices are for versioning with it.

Yep, manually storing it in the code is one option: but since I only refer to it in one place in the code, it seemed like an unnecessary extra level of indirection. The fundamental problem is that i have to mention it once for the packager and once for the program. That seems wrong, but obviously I should be seeking advice about this on a Ruby board, not an IF one!

I generally resolve that by referencing the constant in the gemspec itself, e.g.:

# scottkit.gemspec

$LOAD_PATH.unshift File.dirname(__FILE__) + '/lib'
require 'scottkit/version'

Gem::Specification.new do |spec|
  spec.version = ScottKit::VERSION
  # rest of spec
end

The skeleton created by the “bundle gem” command does more or less the same thing.

If you’re using Jeweler to generate the gemspec, you probably need to specify the version in the rake task instead. That’s what the README seems to indicate, anyway.

Thank you, I will think on this.

(I chose jeweler seven years ago when I first wrote this code, and it maybe that it would be a stupid choice in 2017 – or that the way it works now is completely different. Perhaps simply abandoning jeweler would be the best thing now. I don’t know.)

Hi,
I decompiled adv05 “The Count” with The Adventure System instruction set.
The reference book: mocagh.org/miscgame/advsystem.pdf
The code: (in the strings of the code, as in inform, the ‘^’ is equivalent to line feed - new line.)

[spoiler][code]
;ADVENTURE: 5 “THE COUNT”.
;Copyright Adams 1979.

advent 5 version 1.16 carry 7 start room_1 wlen 3 time 175 tr-rm room_0 dead-rm room_23 lamp OBJ_9 %100 CT-1 CONT rem "DECRMNT MINUTES"
.cont
? -BIT 1
"Welcome to ADVEWNTURE: 5 `THE COUNT`. Dedicated to Alvin Files.^"
CT<-N 3
EXM,CT 0
CT<-N 65
rem "INTRO"

.cont
? -BIT 1
"I see I was put to bed. Its AFternoon & I overslept!"
EXM,CT 3
CT<-N 0
EXM,CT 3
rem "INTRO"

.cont
? CT<= 10 && CT> 1 && -BIT 2 && -IN ROOM_18 && -IN ROOM_6
"Its getting DARK outside!"
rem "18"

.cont
? CT<= 4 && -BIT 4 && CT> 1 && -BIT 2
"I'm getting very tired"
rem "GETTING TIRED"

.cont
? CT= 1
NIGHT 
"The sun has set!"
DSPRM 
rem "SUNSET"

%100
? IN/W OBJ_35 && IN ROOM_3
EXX,X OBJ_35 OBJ_10
rem "SHEET OVER LEDGE"

%100
? BIT 4
EXM,CT 1
CT-1 
CONT 
rem "DEC PILL"

.cont
? CT<= 8 && CT<= 4
"I'm getting very tired"
rem "WEARING OFF"

.cont
? CT<= 0
CLRZ 4
rem "WORE OFF"

.cont
EXM,CT 1
rem "RESET COUNTER"

%33
? IN ROOM_4 && -RM0 OBJ_7
"I hear the"
"Flagpole splinter"
"I fall to my death"
GOTOY ROOM_22
rem "POLE BROKE"

%100
? HAS OBJ_35 && IN ROOM_11
X-RM0 OBJ_36
EXX,X OBJ_35 OBJ_0
"Sheet came untied"
rem "UNTIE SHEET"

%100
? CT<= 0 && -BIT 4 && -IN ROOM_22
SETZ 2
CLS 
rem "FELL ASLEEP"

%25
? CT<= 0 && HAS OBJ_31 && -BIT 2 && -IN ROOM_22
"A bAt flew by & LAUGHED At me!"
"He smelled something & flew on"
rem "BAT AT NITE"

%40
? CT<= 0 && -HAVE OBJ_31 && -BIT 2 && -IN ROOM_22
"A bAt flew by & LAUGHED At me!"
"he settled on my NECK!"
SETZ 2
DELAY 
rem "BAT BITE AT NITE"

%50
? IN ROOM_4 && AVL OBJ_9
"The torch burnt thru the sheet!"
"I fall to my death"
GOTOY ROOM_22
rem "BURNT SHEET"

%100
? BIT 2 && -IN ROOM_22
CONT 
GOTOY ROOM_7
SETZ 3
CLRZ 2
rem "FELL SLEEP?"

.cont
? RM0 OBJ_14
GOTOY ROOM_0
X->Y OBJ_13 ROOM_21
X-RM0 OBJ_12
rem "OPEN IF DOOR UNLOCKED"

.cont
? -RM0 OBJ_16 && -IN/W OBJ_16
X-RM0 OBJ_16
SETZ 9
rem "STEAL STAKE"

.cont
X-RM0 OBJ_6
X-RM0 OBJ_7
X-RM0 OBJ_10
X-RM0 OBJ_35
rem "RETURN SHEE"

.cont
X-RM0 OBJ_1
X->Y OBJ_2 ROOM_2
CT<-N 65
X-RM0 OBJ_55
rem "CLOSE WINDOW"

.cont
? -RM0 OBJ_45 && -IN/W OBJ_45
X-RM0 OBJ_45
SETZ 9
rem "GET PACKAGE"

.cont
? -RM0 OBJ_26 && -IN/W OBJ_26
X->Y OBJ_26 ROOM_13
SETZ 9
rem "GET CIGS"

.cont
? IN ROOM_0
GOTOY ROOM_1
"What a DREAM I just had !!!!"
rem "DREAMING?"

.cont
? BIT 9
CLRZ 9
GOTOY ROOM_1
"I've a hunch I've been robbed!"
rem "RIPPED OFF?"

.cont
GOTOY ROOM_1
DAY 
"I see I was put to bed. Its AFternoon & I overslept!"
DROPX OBJ_0
rem "PUT TO BED"

.cont
? AVL OBJ_18
CLRZ 3
EXX,X OBJ_18 OBJ_19
"Odd, I wasn't bitten last nite!"
rem "GET BLOOD"

.cont
CLRZ 4
X-RM0 OBJ_36
DROPX OBJ_0
DSPRM 
rem "SHEETS"

%100
? BIT 3
CLRZ 3
EXM,CT 0
CT-1 
CONT 
rem "DEC DAYS"

.cont
? CT<= 0
"My neck looks BITTEN!"
"I've turned into A VAMPIRE!"
GOTOY ROOM_22
rem "LOST GAME"

.cont
"My neck looks BITTEN!"
EXM,CT 0
AGETX OBJ_22
rem "RESET DAY + REPORT BITE"

%50
? -RM0 OBJ_27 && -IN ROOM_13
EXM,CT 2
CT-1 
CONT 
rem "CIGARETTE OUT"

.cont
? CT= 0
X-RM0 OBJ_27
X-RM0 OBJ_28
X-RM0 OBJ_29
X-RM0 OBJ_30
rem "GONE OUT?"

.cont
? IN ROOM_6 && CT= 0
"The cigArette went out & the coffin VANISHED"
rem "REPORT IT"

.cont
EXM,CT 2
rem "RESET COUNTER"

%100
? IN ROOM_22
"YOU HAVE LOST!"
FINI 
rem "END GAME"

%30
? CT<= 25 && RM0 OBJ_45 && -IN ROOM_9 && RM0 OBJ_46
CONT 
EXM,CT 0
rem "DELIVER PACKAGE"

.cont
? CT= 2
X->Y OBJ_45 ROOM_9
X->Y OBJ_65 ROOM_9
" ^A bell rings somewhere: `DING-DONG`.^"
rem "CHECK DAY"

.cont
EXM,CT 0
rem "RESET COUNTER"

%100
? -BIT 1
SETZ 1
rem "MORE INTRO"

%100
? CT<= 1 && -AVL OBJ_9
NIGHT 
DSPRM 
rem "SUNSET?"

%100
? IN ROOM_10 && CT> 0 && BIT 15
DAY 
DSPRM1 
rem "LITE DOORLW"

%29
? CT<= 39 && RM0 OBJ_47 && -IN ROOM_9
X->Y OBJ_47 ROOM_9
" ^A bell rings somewhere: `DING-DONG`.^"
rem "DELIVER POSTCARD"
>TIE SHE ? AVL OBJ_0 "Tell me to what? i.e. `TO TREE`"
>GO WIN
? IN ROOM_4
GOTOY ROOM_5
DSPRM1 
"OK"

>GO WIN
? IN ROOM_5
GOTOY ROOM_10
DSPRM1 
"OK"

>LOO MIR
? AVL OBJ_17 && -RM0 OBJ_22
CONT 
"My neck looks BITTEN!"
"I appear pale & drained!"
"I think I can only take"

.cont
EXM,CT 0
DSPCT 
EXM,CT 0
"more days of this!"

>UNL TOR
? AVL OBJ_9
EXX,X OBJ_9 OBJ_20
"OK"
DSPRM 

>LIG TOR
? AVL OBJ_20 && AVL OBJ_21
EXX,X OBJ_9 OBJ_20
DSPRM1 
"OK"

>EMP BOT
? AVL OBJ_18
EXX,X OBJ_18 OBJ_19
"OK"

>LOO MIR
? AVL OBJ_17 && RM0 OBJ_22
"TODAY I look healthy..."

>LOO WIN
? IN ROOM_2
"I'm up in A cAstle, in the distAnce I see VOODOO CASTLE. There'sstAnding \"
"room outside the window"

>CLO WIN
? IN/W OBJ_1
EXX,X OBJ_1 OBJ_2
DSPRM1 
"OK"
rem "CLO"

>GO WIN
? IN/W OBJ_1 && HAS OBJ_35
GOTOY ROOM_3
DROPX OBJ_6
DSPRM1 
"OK"

>TO BED
? AVL OBJ_0 && IN/W OBJ_34
X-RM0 OBJ_0
DROPX OBJ_35
DROPX OBJ_36
DSPRM1 

>TO POL
? AVL OBJ_0 && AVL OBJ_4
X-RM0 OBJ_0
DROPX OBJ_7
DROPX OBJ_10
DSPRM1 

>CLI ANY
? IN/W OBJ_10
GOTOY ROOM_4
DSPRM1 
"OK"

>CLI ANY
? IN/W OBJ_11
GOTOY ROOM_4
DSPRM1 
"OK"

>SLE ANY
SETZ 2
CLS 
CLRZ 4

>LOO WAT
? AVL OBJ_37
"Strange watch says"
DSPCT 
"moves till sunset"

>GO WIN
? IN ROOM_3 && HAS OBJ_35
GOTOY ROOM_2
X-RM0 OBJ_6
DSPRM1 
"OK"

>LOO OVE
? CT> 0 && AVL OBJ_44
"There's A tremendous Amount of HEAT & SUNLIGHT coming out."

>LOO OVE
? AVL OBJ_44 && CT<= 0
"There's something there, maybe I should"
"go there?"

>TO RIN
? IN/W OBJ_54
X-RM0 OBJ_0
X->Y OBJ_35 ROOM_18
DROPX OBJ_55
DSPRM1 

>UNT ANY
? IN/W OBJ_55
X-RM0 OBJ_35
X-RM0 OBJ_55
DROPX OBJ_0
DSPRM1 

>UNT ANY
? IN/W OBJ_7
X-RM0 OBJ_7
X-RM0 OBJ_10
DROPX OBJ_0
DSPRM1 

>LOO DUM
? IN/W OBJ_63
"OK"
"There's something there, maybe I should"
"go there?"

>EAT TAB
? AVL OBJ_23
SETZ 4
EXX,X OBJ_23 OBJ_24
EXM,CT 1
CONT 

.cont
CT<-N 40
EXM,CT 1
"OK"
"I'm real PEPPY now!"

>EAT TAB
? AVL OBJ_24
SETZ 4
EXX,X OBJ_24 OBJ_8
EXM,CT 1
CONT 
rem "PILL 2"

.cont
CT<-N 40
EXM,CT 1
"OK"
"I'm real PEPPY now!"

>LOO PAC
? IN ROOM_4
"There's something there, maybe I should"
"go there?"

>SMO ANY
? AVL OBJ_27 && IN ROOM_6 && RM0 OBJ_28
"There's A COUGHIN (sic) in the room."
DROPX OBJ_28
DROPX OBJ_30

>LOO TOI
? IN/W OBJ_62
"There's something there, maybe I should"
"go there?"

>LOO ROO
? IN ROOM_20
"There's something there, maybe I should"
"go there?"

>LIG CIG
? AVL OBJ_33 && AVL OBJ_21
EXM,CT 2
CT<-N 8
EXM,CT 2
CONT 

.cont
EXX,X OBJ_33 OBJ_27
"OK"

>GET CIG
? AVL OBJ_33
GETX OBJ_33
"OK"

>LOO POS
? AVL OBJ_47
"There's writing on it."

>LOO LET
? AVL OBJ_65
"There's writing on it."

>GET CIG
? AVL OBJ_27
GETX OBJ_27
"OK"

>LOO GAT
? AVL OBJ_50
"Mob looks ANGRY"

>LOO COF
? IN/W OBJ_30
"I see nothing special."

>LOO COF
? IN/W OBJ_29
"There's something there, maybe I should"
"go there?"

>LOO VIA
? AVL OBJ_42 && -BIT 6
"There's something there, maybe I should"
"empty it?"

>OPE DOO
? IN/W OBJ_12
EXX,X OBJ_12 OBJ_13
DSPRM1 
"OK"

>CLO DOO
? IN/W OBJ_13
EXX,X OBJ_12 OBJ_13
DSPRM1 
"OK"

>LOC DOO
? IN/W OBJ_12 && AVL OBJ_15
EXX,X OBJ_12 OBJ_14
DSPRM1 
"OK"

>LOO CAS
? IN/W OBJ_49
"OK"
"I see nothing special."
"EXCEPT"
"I notice a DARK WINDOW UNDER the bedroom window ledge!"

>GET LOC
? IN/W OBJ_14 && AVL OBJ_15
EXX,X OBJ_14 OBJ_12
DSPRM1 
"OK"
rem "."

>REA NOT
? AVL OBJ_47 && RM0 OBJ_51
"The paper clip is in the way!"

>GO BED
? IN/W OBJ_34
GOTOY ROOM_1
DSPRM1 
"OK"

>GO OVE
? AVL OBJ_44 && CT> 0
"Sorry I can't do that"
"There's A tremendous Amount of HEAT & SUNLIGHT coming out."

>GO OVE
? AVL OBJ_44 && CT<= 0
GOTOY ROOM_15
DSPRM1 
"OK"

>WIT FIL
? AVL OBJ_41 && IN/W OBJ_39
EXX,X OBJ_39 OBJ_40
DSPRM1 
"OK"

>OPE WIN
? IN/W OBJ_2
EXX,X OBJ_1 OBJ_2
DSPRM1 
"OK"

>GO DUM
? IN/W OBJ_63
GOTOY ROOM_20
DSPRM1 
"OK"

>KIL BAT
? AVL OBJ_52 && AVL OBJ_16 && AVL OBJ_53
EXX,X OBJ_52 OBJ_67
DSPRM1 
"I drive the stake through his HEART. The townspeople^come and carry me \"
"off cheering! (Don't worry, I tell them I^owe it all to you!!!!)"
FINI 
rem "WIN"

>GO ROO
? -BIT 8 && -BIT 7 && IN ROOM_20
GOTOY ROOM_12
DSPRM1 
"OK"

>EMP VIA
? AVL OBJ_42 && -BIT 6
DROPX OBJ_23
DSPRM1 
SETZ 6
rem "."

>UNT ANY
? IN/W OBJ_36
X-RM0 OBJ_36
X-RM0 OBJ_6
X-RM0 OBJ_35
CONT 

.cont
X-RM0 OBJ_10
DROPX OBJ_0
DSPRM1 

>CUT FIL
? AVL OBJ_41
"OK"
"Some time passes..."
CT-1 
CT-1 

>WAI ANY
? CT> 5
"Some time passes..."
CT-N 5

>PUL BEL
? IN/W OBJ_48
"OK"
" ^A bell rings somewhere: `DING-DONG`.^"

>EAT TAB
? AVL OBJ_8
SETZ 4
X-RM0 OBJ_8
EXM,CT 1
CONT 

.cont
CT<-N 40
EXM,CT 1
"OK"
"I'm real PEPPY now!"

>WIT FIL
? -AVL OBJ_41
"Sorry I can't do that"
"I've a hunch I've been robbed!"
rem "NO FILE"

>GO PAS
? IN/W OBJ_56
GOTOY ROOM_19
NIGHT 
DSPRM1 
"OK"

>FIN ANY
"Sorry I can't do that"
"I don't know where to look"

>GO WIN
? IN ROOM_10
GOTOY ROOM_5
DSPRM1 
"OK"

>GET POR
? AVL OBJ_58
GETX OBJ_58
X->Y OBJ_56 ROOM_10
"OK"

>CLI ANY
? IN/W OBJ_35 && IN ROOM_18
GOTOY ROOM_16
DAY 
DSPRM1 
"OK"

>CLI ANY
? IN/W OBJ_32
NIGHT 
GOTOY ROOM_18
DSPRM1 
"OK"

>GO SHE
"Try: `CLIMB SHEET`"

>GO PIT
? IN/W OBJ_32
NIGHT 
GOTOY ROOM_18
DSPRM1 
"OK"

>CLO ANY
? IN/W OBJ_38
"I closed the lid and I suffocated!"
FINI 

>CLO ANY
? IN/W OBJ_29
EXX,X OBJ_29 OBJ_30
DSPRM1 

>OPE COF
? IN/W OBJ_28 && -RM0 OBJ_39 && CT> 0
"Sorry I can't do that"
"Its LOCKED from INSIDE!"

>OPE COF
? IN/W OBJ_28
X-RM0 OBJ_30
DROPX OBJ_29
DSPRM1 
CONT 

.cont
? CT> 0
X->Y OBJ_52 ROOM_13
rem "PUT DRACKY"

>EAT GAR
? AVL OBJ_31
"OK"
X-RM0 OBJ_31

>GO GAT
? IN/W OBJ_50
"Peasants attack me, I was SUPPOSED to destroy the VAMPIRE!"
"YOU HAVE LOST!"
FINI 

>GO ROO
? IN ROOM_20 && BIT 7
GOTOY ROOM_21
DSPRM1 
"OK"

>REA LET
? AVL OBJ_65
"DeAr DRACKY, Don't open this present till HALLOWEEN.^ signed COUNT YORGA."

>REA POS
? AVL OBJ_47 && -RM0 OBJ_51
"Its for DRACULA, its and EATING & GHOULING bill from a^local mortuary!"

>REA POS
? AVL OBJ_47 && RM0 OBJ_51
"Its for DRACULA, its and EATING & GHOULING bill from a^local mortuary!"
"There's a note PAPER CLIPPED to the postcard"

>REA NOT
? AVL OBJ_51
"Postmaster says he'll be delivering a package tomorrow."

>GET CLI
? AVL OBJ_47 && RM0 OBJ_15
AGETX OBJ_15
AGETX OBJ_51
CLS 
"OK"

>UNC ANY
? AVL OBJ_47 && RM0 OBJ_15
AGETX OBJ_15
AGETX OBJ_51
CLS 
"OK"

>GET NOT
? AVL OBJ_51
AGETX OBJ_51
"OK"

>GET CLI
? AVL OBJ_15
AGETX OBJ_15
"OK"

>OPE PAC
? AVL OBJ_45
DROPX OBJ_46
DROPX OBJ_26
DROPX OBJ_18
CONT 

.cont
X-RM0 OBJ_45
"OK"

>HEL ANY
? IN/W OBJ_14
"I'm A pretty good LOCK PICK!"

>LIG MAT
? AVL OBJ_21 && BIT 15
DAY 
DSPRM1 
"The match flares up briefly ..."
CONT 

.cont
DELAY 
DELAY 
DELAY 
CLS 

.cont
"and then goes out!"
NIGHT 
DSPRM1 

>JUM ANY
? IN ROOM_3
"I fall to my death"
"as I fall"
"I notice a DARK WINDOW UNDER the bedroom window ledge!"
GOTOY ROOM_22

>GO ROO
? IN ROOM_20 && BIT 8
GOTOY ROOM_14
DSPRM1 
"OK"

>CLI ANY
? IN ROOM_4
GOTOY ROOM_3
DSPRM1 
"OK"

>SAV GAM
"OK"
SAVE 

>GET SHE
? AVL OBJ_0
GETX OBJ_0
"OK"

>OPE WIN
? IN ROOM_4
"Sorry I can't do that"
"There's something there, maybe I should"
"go there?"

>GO TOI
? IN/W OBJ_62
"OK"
"Ah that's much better!"

>TO ANY
? AVL OBJ_0 && -IN ROOM_1
"Sorry I can't do that"

>GET SHE
? AVL OBJ_35
GETX OBJ_35
"OK"

>REA MEM
? AVL OBJ_71
"Dear Adventurer:^ I wanted to take this time (1 move!) to thank ALL of \"
"you out^there in ADventureland for the fantastically warm \"
"reception^Adventure has received!^Happy Adventuring,^ Scott Adams^(Chief \"
"Adventurer)"

>GET UP
? IN ROOM_1
GOTOY ROOM_2
DSPRM1 
"OK"

>OUT ANY
? IN ROOM_20
"Try: `GO ROOM`"

>FLY ANY
? IN ROOM_0

>OPE LET
? AVL OBJ_65
"There's writing on it."

>EAT BOT
? AVL OBJ_18
GOTOY ROOM_22
"I've turned into A VAMPIRE!"

>GO DOO
? IN/W OBJ_13
GOTOY ROOM_7
DSPRM1 
"OK"

>PUL ANY
"Nothing happens."

>SMO ANY
? AVL OBJ_27
"COUGH!"

>UNL DOO
? IN/W OBJ_14
"How?"

>HEL ANY
? IN ROOM_20
"I know how to RAISE and LOWER this thing!"

>QUI ANY
FINI 

>CLI POL
? IN/W OBJ_4
CLS 
"I'm At the tip of the pole"
CONT 
"I hear the"

.cont
"Flagpole splinter"
"as I fall"
GOTOY ROOM_22
"I notice a DARK WINDOW UNDER the bedroom window ledge!"

>PUT DUM
? IN ROOM_20 && BIT 7
"Sorry I can't do that"
"It won't go any"
"lower"

>PUT DUM
? IN ROOM_20 && BIT 8
CLRZ 8
"OK"
X->Y OBJ_63 ROOM_12

>PUT DUM
? IN ROOM_20
SETZ 7
"OK"
X->Y OBJ_63 ROOM_21

>OPE DUM
? IN ROOM_20 && BIT 8
"Sorry I can't do that"
"It won't go any"
"higher"
rem "OPE"

>OPE DUM
? BIT 7 && IN ROOM_20
CLRZ 7
"OK"
X->Y OBJ_63 ROOM_12
rem "RAISE DUMBWAITER"

>OPE DUM
? IN ROOM_20
SETZ 8
"OK"
X->Y OBJ_63 ROOM_14
rem "RAISE DUMBWAITER"

>GET CIG
? AVL OBJ_26
GETX OBJ_33
"OK"

>GO SLE
SETZ 2
CLS 

>LOO UP
? IN ROOM_9
"OK"
"I see nothing special."
"EXCEPT"
"I notice a DARK WINDOW UNDER the bedroom window ledge!"

>LOO CAS
? IN ROOM_9
"OK"
"I see nothing special."
"EXCEPT"
"I notice a DARK WINDOW UNDER the bedroom window ledge!"

>LOO UP
? IN/W OBJ_49
"OK"
"I see nothing special."
"EXCEPT"
"I notice a DARK WINDOW UNDER the bedroom window ledge!"

>WAI ANY
"Some time passes..."

>JUM ANY
"OK"
"Nothing happens."

>GO COF
? IN/W OBJ_29
GOTOY ROOM_13
DSPRM1 
"OK"

>WIT ANY
"It doesn't work!"
"Nothing happens."

>OUT ANY
"go there?"
"How?"

>OPE DUM
? IN/W OBJ_63
"There's something there, maybe I should"
"go there?"

>GET INV
INV 

>CUT ANY
"Tell me with what? Like: `WITH FIST`"

>LOO NEC
INV 

>LOO MIR
? -AVL OBJ_17
"How?"

>HEL ANY
? IN ROOM_1
"GET UP you sleepy head!"

>HEL ANY
EXM,CT 3
CT+N 1
CONT 

.cont
? CT> 4
"I'm getting very tired"
"of you always asking for help!"
EXM,CT 3

.cont
? CT<= 4
"Try examining things."
EXM,CT 3

>GET GLA
? IN/W OBJ_69
"Yuck!"
"Sorry I can't do that"

>LIG CIG
? -AVL OBJ_33
"First I need an unlit cigarette."

>LIG MAT
? AVL OBJ_21
"The match flares up briefly ..."
DELAY 
DELAY 
"and then goes out!"

>LIG ANY
? -HAVE OBJ_21
"How?"
"I've no matches!"

>LIG ANY
? AVL OBJ_21
"Sorry I can't do that"
"I'm not an arsonist!"

>OPE OVE
"Its already open."

>CLO OVE
"Sorry I can't do that"

>GO POL
? IN ROOM_3
"Try: `CLIMB POLE`"

>FLU TOI
? IN/W OBJ_62
"OK"

>SAV ANY
"Try: `SAVE GAME`"

>TIE ANY
"Sorry I can't do that"

>GO VEN
"Sorry I can't do that"
"A bat might make it, but not me!"

>LOO DOO
? IN ROOM_21
"There's something there, maybe I should"
"go there?"

>LOO DUS
? AVL OBJ_70
"A choooooo"
"I see nothing special."

>GO WIN
? IN/W OBJ_1 && -HAVE OBJ_35
GOTOY ROOM_3
DSPRM1 
"OK"

>JAM ANY
"Maybe I should BREAK it?"

>EAT STA
? AVL OBJ_52 && AVL OBJ_16 && AVL OBJ_53
EXX,X OBJ_52 OBJ_67
DSPRM1 
"I drive the stake through his HEART. The townspeople^come and carry me \"
"off cheering! (Don't worry, I tell them I^owe it all to you!!!!)"
FINI 
rem "DRIVE STAKE"

>GO WIN
? IN ROOM_3 && -HAVE OBJ_35
GOTOY ROOM_2
DSPRM1 
"OK"

>SAY ANY
"OK"
SAYWCR 

>MAK BED
"OK"

>SCO ANY
"How?"

>SME ANY
"OK"

>EAT ANY
"Yuck!"

>FEE ANY
"OK"
"I see nothing special."

>PUT MIR
? HAS OBJ_17 && -IN/W OBJ_3
X-RM0 OBJ_17
DROPX OBJ_69
"Mirror shatters! That's 7 years bad luck!"

>PUT MIR
? HAS OBJ_17 && IN/W OBJ_3
"OK"
DROPX OBJ_17
"I set the mirror on the pillow."

>LOO COA
? AVL OBJ_5
"It bears the Family Crest of DRACULA!"

>REA ANY
"try looking at it"

>LOO MEM
? AVL OBJ_71
"There's writing on it."

>LOO NOT
? AVL OBJ_51
"There's writing on it."

>INV ANY
INV 

>LOO ANY
DSPRM1 
"I see nothing special."
room_0: ""
room_1:
"*I'm lying in a large brass bed"

room_2:
n room_11
"bedroom"

room_3:
"*I'm on A ledge outside An open window"

room_4:
"*I'm hanging on the end of a sheet, I made a fold in the sheet^so I can \"
"leave things here. There's a window box here on the^side of the castle"

room_5:
"flower box outside An open window"

room_6:
s room_19
"CRYPT"

room_7:
w room_21
"closet"

room_8:
s room_11
"Bathroom"

room_9:
e room_17
w room_11
"*I'm outside the castle"

room_10:
"DOORLESS room"

room_11:
n room_8
s room_2
e room_9
w room_12
"hall inside the castle"

room_12:
e room_11
"kitchen"

room_13:
u room_6
"large COFFIN"

room_14:
"pAntry"

room_15:
w room_12
"giant SOLAR OVEN"

room_16:
u room_21
"Dungeon"

room_17:
w room_9
"Meandering path"

room_18:
"Pit"

room_19:
n room_6
s room_10
"Dark passage"

room_20:
"dumb-waiter by a room"

room_21:
d room_16
"workroom"

room_22:
"LOT OF TROUBLE! (And so Are you!)"
obj_0: at room_1 "Sheets" 'SHE'
obj_1:
at room_0
"Open window"

obj_2:
at room_2
"Closed window"

obj_3:
at room_1
"Pillow"
'PIL'

obj_4:
at room_3
"Flag pole in wall"

obj_5:
at room_9
"Coat-of-arms"
'COA'

obj_6:
at room_0
"Sheet going into window"

obj_7:
at room_0
"End of sheet tied to flAgpole"

obj_8:
at room_0
"1 nodoz tablet"
'TAB'

obj_9:
at room_0
"LIT torch"
'TOR'

obj_10:
at room_0
"Loose end of sheet going over ledge"

obj_11:
at room_5
"End of sheet hAnging here"

obj_12:
at room_0
"Closed & UNLOCKED door"

obj_13:
at room_0
"Open door"

obj_14:
at room_21
"Locked door"

obj_15:
at room_0
"Paper clip"
'CLI'

obj_16:
at inventory
"Tent STAKE"
'STA'

obj_17:
at room_8
"Mirror"
'MIR'

obj_18:
at room_0
"Bottle of type V blood"
'BOT'

obj_19:
at room_0
"Empty bottle"
'BOT'

obj_20:
at room_18
"Unlit torch"
'TOR'

obj_21:
at room_14
"Sulfur mAtches"
'MAT'

obj_22:
at room_0
"2 small holes in my neck"

obj_23:
at room_0
"3 no-doz tablets"
'TAB'

obj_24:
at room_0
"2 nodoz tablets"
'TAB'

obj_25:
at room_6
"Piles of extinguished cigArettes"

obj_26:
at room_0
"Pack of Transylvanian cigarettes"
'PAC'

obj_27:
at room_0
"LIT cigArette"
'CIG'

obj_28:
at room_0
"Stone COFFIN"

obj_29:
at room_0
"Coffin is open"

obj_30:
at room_0
"Coffin is closed"

obj_31:
at room_14
"Dusty clove of garlic"
'GAR'

obj_32:
at room_16
"DARK pit"

obj_33:
at room_0
"Cigarette"
'CIG'

obj_34:
at room_2
"Brass bed"

obj_35:
at room_0
"The other end of the sheet"
'SHE'

obj_36:
at room_0
"Sheet tied to bed"

obj_37:
at room_8
"Pocket watch"
'WAT'

obj_38:
at room_13
"Coffin lid is open"

obj_39:
at room_13
"Lockable slide bolt"

obj_40:
at room_0
"Broken slide lock"

obj_41:
at room_15
"Large tempered nail file"
'FIL'

obj_42:
at room_7
"Small Vial"
'VIA'

obj_43:
at room_15
"Large dark lens set in ceiling"

obj_44:
at room_12
"Oven"

obj_45:
at room_0
"Package"
'PAC'

obj_46:
at room_0
"Empty box"
'WIN'

obj_47:
at room_0
"Postcard"
'POS'

obj_48:
at room_9
"Bell pull"

obj_49:
at room_17
"Castle towering above me"

obj_50:
at room_17
"Fence with an open gate & a crowd beyond"

obj_51:
at room_0
"Note"
'NOT'

obj_52:
at room_0
"DRACULA"
'BAT'

obj_53:
at room_21
"Rubber mallet"
'MAL'

obj_54:
at room_16
"Iron rings in wAll"

obj_55:
at room_0
"Sheet tied to ring going into pit"

obj_56:
at room_0
"DARK foreboding passage"

obj_57:
at room_0
"."

obj_58:
at room_10
"Full size portrait of DRACULA"
'POR'

obj_59:
at room_10
"Window"

obj_60:
at room_6
"Vent"

obj_61:
at room_5
"Daisies"
'DAI'

obj_62:
at room_8
"Toilet"

obj_63:
at room_12
"Dumb-waiter"

obj_64:
at room_21
"Vent"

obj_65:
at room_0
"Letter"
'LET'

obj_66:
at room_6
"Sign says: `POSITIVELY NO SMOKING ALLOWED HERE!` signed Dracula"

obj_67:
at room_0
"Mouldy old skeleton with a stake in the rib cage"

obj_68:
at room_0
"."
'KEY'

obj_69:
at room_0
"Broken glass"

obj_70:
at room_7
"Century worth of dust"
'DUS'

obj_71:
at room_21
"Memo tacked to the door"

obj_72:
at room_0
"."
SHE: END WIN: BOX LED POL: FLA BAT: VAM DRA COF: LID FIL: NAI BOT: BLO POS: CAR GAT: CRO FIS: HAN FOO FEE NEC: BIT GO: RUN WAL ENT USE LOO: EXA GET: TAK PIC CAT REM MOV OUT: EXI PUT: DRO LEA LOW KIL: ATT CLO: SHU OPE: LIF RAI UNL: EXT LIG: BUR IGN EMP: SPI CUT: BRE FIL TRI PUL: RIN EAT: DRI JAM: SMA BUS SAY: YEL SME: SNI FEE: TOU [/code][/spoiler] *** updated to version 1.16 *** [quote] "Welcome to ADVEWNTURE: 5 `THE COUNT`. Dedicated to Alvin Files. [/quote] ADVE'W'NTURE or ADVENTURE? Is it a bug in the data-file?

I have “Welcome to ADVEWNTURE” in my data-file, too, which was downloaded from Scott Adams’ own web-site. I wonder if that typo was in the original TRS-80 version that was sold in 1879?

There seems to be a version 1.16 of the game (with the bug): willus.com/trs80/?q=adams
The bug seems to appear after version 1.09.

You can see, Mike (for your compiler), at the beginning of the code that the use of ‘CONT’ is more subtle than it seems (and it can be very useful!)