
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;                                         ;;;
;;;    HangMan Version 0.8 (beta test!)     ;;;
;;;    Copyright (C) Oliver Smith, 1990     ;;;
;;; Copyright (C) KingFisher Software, 1990 ;;;
;;;                                         ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; link with BLINK using:
;	1> blink from hang.o to hangman LIB AMIGA.LIB

	opt	c+,l+
	output	hang.o

	NOLIST

	incdir	"df1:"
	include	"exec/types.i"
	include	"exec/funcdef.i"
	include	"exec/exec_lib.i"
	include	"exec/tasks.i"
	include	"exec/nodes.i"
	include	"exec/ports.i"
	include	"exec/memory.i"

	xref	_CreatePort,_DeletePort
	xdef	_SysBase

_SysBase	equ	4
nocr	equ	0
crlf	equ	1
npics	equ	10


DROP	MACRO
	cmp.w	#1,doormsg+dm_carrier
	beq	byebyebye
	ENDM

SEND	MACRO
	lea	\1,a0
	moveq.l	#\2,d0
	bsr	sendmessage
	DROP
	ENDM

 STRUCTURE	dm,MN_SIZE
	SHORT	dm_command
	SHORT	dm_data
	STRUCT	dm_string,80
	SHORT	dm_carrier
	LABEL	dm_size

;	-	-	-	-	-	-	-

begin:
				; Check we have ONE parameter
	cmp.b	#2,d0
	beq.s	.okay
	moveq.l	#-1,d0
	rts
.okay
	move.b	(a0),here1		; set line no. in
	move.b	(a0),here2		; port names
	sub.l	a1,a1			; 0 = this task
	CALLEXEC	FindTask
	move.l	d0,mytask
	move.l	d0,a0
	move.l	#doorname,LN_NAME(a0)

	clr.l	-(sp)			; 0 priority
	pea	rportname
	jsr	_CreatePort		; create the reply port
	move.l	d0,replyport
	lea	8(sp),sp			; restore stack
	
	lea	doormsg,a0
	move.b	#NT_MESSAGE,LN_TYPE(a0)
	move.l	replyport,MN_REPLYPORT(a0)
	move.w	#dm_size,MN_LENGTH(a0)

    ; Locate the correct DoorControl port for this line
	lea	cportname,a1
	CALLEXEC	FindPort
	tst.l	d0			; if it failed
	beq	exit1
	move.l	d0,myport

	move.l	#7,d0
	bsr	getsvar
	lea	string,a0
	lea	filename,a1
.loopcop	move.b	(a0)+,(a1)+
	tst.b	(a0)
	bne.s	.loopcop
	move.b	#'h',(a1)+
	move.b	#'a',(a1)+
	move.b	#'n',(a1)+
	move.b	#'g',(a1)+
	move.b	#'/',(a1)+
	move.b	#0,(a1)+

	lea	doordetail,a0
	bsr	setwhere
	DROP
	
	bsr	return
	bsr	return
	DROP
	lea	welcome1,a0
	bsr	prttxt
	DROP
	bsr	return
	bsr	return
	DROP
	SEND	WordCount,nocr
	moveq.l	#0,d0
	lea	words,a0
.loopx	tst.b	(a0)+
	bne.s	.loopx
	addq.l	#1,d0
	tst.b	(a0)+			; check for DOUBLE \0
	bne.s	.loopx
	move.l	d0,nwords
	bsr	deconv
	bsr	return
	DROP
	bsr	return
	bsr	return
	SEND	welcome9,nocr
	moveq.l	#1,d0
	bsr	getsvar
	SEND	string,nocr
	lea	welcomeA,a0
	bsr	hotkey
	move.l	d0,-(sp)

	bsr	sendchar
	bsr	return

	move.l	(sp)+,d0
	cmp.b	#'y',d0
	beq.s	.yes
	cmp.b	#'Y',d0
	bne.s	.no
.yes	bsr	return
	DROP
	lea	insfile,a0
	bsr	showtext
	DROP
.no	bsr	return

					; choose word to use
pickword	move.l	#0,string
	move.l	#0,myword
	move.l	#0,mywptr
	move.l	#0,mywlen
	move.l	#0,hidden
	move.l	#0,nhidden
	move.l	#0,used
	move.l	#0,guessed
	move.l	nwords,d0
	bsr	rnd			; get random number
	move.l	d0,myword
	lea	words,a0
	move.l	myword,d0
	subq.l	#1,d0			; fix for DBRA count
.loop	tst.b	(a0)+
	bne.s	.loop
	dbra	d0,.loop
	move.l	a0,mywptr
	moveq.l	#-1,d0
.loop2	addq.l	#1,d0
	tst.b	(a0)+
	bne.s	.loop2
	move.l	d0,mywlen
	move.l	mywptr,a0
	lea	hidden,a1
	moveq.l	#0,d0
	move.l	mywlen,d7
	subq.l	#1,d7
.copy	move.b	(a0),(a1)+
	cmp.b	#32,(a0)+			; space?
	beq.s	.next
	move.b	#'-',-1(a1)		; replace it
	addq.l	#1,d0
.next	dbra	d7,.copy
	move.b	#0,(a1)
	move.l	d0,nhidden
	move.l	#0,lost

hangloop	bsr	return
	lea	pictures,a0
	move.l	lost,d0
	lsl.l	#2,d0			; * 4
	add.l	d0,a0
	move.l	(a0),a0
	bsr	showtext
	DROP
	bsr	return
	SEND	yourword,nocr
	lea	hidden,a0
	moveq.l	#crlf,d0
	bsr	sendmessage
	DROP
	tst.l	guessed			; tried anything yet?
	beq.s	.noguess
	SEND	guesses,nocr
	lea	used,a0
	bsr	sendmessage
.noguess	bsr	return
	DROP
.getloop	bsr	return
	lea	aletter,a0
	bsr	hotkey
	bsr	sendchar
	DROP
	move.l	d0,-(sp)
	bsr	return
	move.l	(sp)+,d0
	DROP
.skip	cmp.b	#'!',d0			; quit?
	beq	.exit
	cmp.b	#13,d0
	beq	hangloop
	cmp.b	#'a',d0
	blt.s	.next
	cmp.b	#'z',d0
	ble.s	.okay
.next	cmp.b	#'A',d0
	blt.s	.getloop
	cmp.b	#'Z',d0
	bgt.s	.getloop
	add.b	#'a'-'A',d0		; force lower
.okay	lea	used,a0			; see if its already been used
	bsr	instr
	tst.l	d0			; yes?
	beq	.repeat			; yes!
	move.l	d1,-(sp)
	bsr	return
	bsr	return
	move.l	(sp)+,d1
	DROP
	lea	used,a2
	add.l	guessed,a2
	add.l	#1,guessed
	move.b	d1,(a2)			; letter
	move.b	#0,1(a2)
	move.l	mywptr,a0
	lea	hidden,a1
	move.l	nhidden,d7
.loopxx	cmp.b	(a0),d1
	bne.s	.nextxx
	move.b	(a0),(a1)
	sub.l	#1,nhidden
	beq	.winner
.nextxx	lea	1(a1),a1
	tst.b	(a0)+
	bne.s	.loopxx
	cmp.l	nhidden,d7
	beq.s	.wrong
	SEND	yes,crlf
	bra	hangloop
.wrong	add.l	#1,lost
	cmp.l	#npics,lost
	beq	.kill_im
	SEND	no,crlf
	bra	hangloop
.repeat	bsr	return
	bsr	return
	SEND	repeated,crlf
	bra	hangloop

.winner	bsr	return
	lea	won,a0
	DROP
	bsr	prttxt
	cmp.l	#npics-1,lost		; last chance?
	beq	.exiting
	SEND	youwin,nocr
	move.l	#12,d0
	sub.l	lost,d0
	bsr	deconv
	move.w	d0,-(sp)
	bsr	return
	bsr	return
	move.w	(sp)+,doormsg+dm_data
	move.w	#21,doormsg+dm_command
	bsr	sendit
	bra.s	.exiting

.kill_im	bsr	return
	lea	died,a0
	bsr	prttxt
	DROP
	SEND	youloose,crlf
	move.w	#-5,doormsg+dm_data
	move.w	#21,doormsg+dm_command
	bsr	sendit
	DROP

.exiting	DROP
	bsr	return
	bsr	return
	SEND	wordwas,nocr
	move.l	mywptr,a0
	moveq.l	#crlf,d0
	bsr	sendmessage
	bsr	return
	
* finally, ask them to press a key before exiting
.exit	bsr	return
	lea	playagain,a0
	bsr	hotkey
	DROP
	move.l	d0,-(sp)
	bsr	sendchar
	bsr	return
	move.l	(sp)+,d0
	cmp.b	#'n',d0
	beq.s	tata
	cmp.b	#'N',d0
	bne	pickword
tata	bsr	return
	bsr	return
	SEND	byemsg1,crlf
	SEND	byemsg2,crlf
	bsr	return

	;: *** Your code finishes here *** :;

byebyebye	lea	enddetail,a0
	bsr	setwhere
	bsr	end
exit1	move.l	replyport,-(sp)
	jsr	_DeletePort
	lea	4(sp),sp

exit	moveq.l	#0,d0
	rts

prttxt	tst.b	(a0)
	beq.s	.exit
	moveq.l	#crlf,d0
	bsr	sendmessage
	cmp.w	#1,doormsg+dm_carrier
	beq.s	.exit
.loop	tst.b	(a0)+
	bne.s	.loop
	bra	prttxt
.exit	rts

pressany
	bsr	return
	lea	anykey,a0
	bsr	hotkey
	bra	return

deconv
	movem.l	d0-d7,-(sp)
	move.l	d0,d6
	move.l	#10000,d7
	move.l	#0,d5
.dloop	divu	d7,d6
	move.l	d6,d4			; keep a backup, hehe
	ext.l	d6			; clear upper word
	tst.w	d5			; suppression
	bne.s	.nosurp
	tst.l	d6			; nought?
	beq.s	.nextd
.nosurp	divu	#10,d6			; ensure its less than 10
	swap	d6			; upper .w = d6 mod 10
	move.b	d6,d0			; ready for output
	add.b	#'0',d0			; make into ASCII
	move.b	#-1,d5			; turn surpression off
	bsr	sendchar
.nextd	move.l	d4,d6			; restore backup d6
	clr.w	d6			; get rid of bottom word
	swap.w	d6			; get "remainder"
	move.w	d7,d0
	divu	#10,d7			; divide big num
	swap	d7			; get upper word
	cmp.w	d0,d7			; same number?
	beq.s	.final
	swap	d7
	bra.s	.dloop
.final	movem.l	(sp)+,d0-d7
	rts

instr	move.l	d0,d1
.loop	tst.b	(a0)
	beq.s	.brk
	cmp.b	(a0)+,d0
	bne.s	.loop
	moveq.l	#0,d0
	bra.s	.fin
.brk	moveq.l	#-1,d0
.fin	rts


* Here starts the door protocol functions

*
* end() -  Notifies Paragon that we are done and ready to continue with
*		the BBS.  ALWAYS use this to exit from your program, or
*		the BBS will go to never-never land.
*

end	move.w	#20,doormsg+dm_command
sendit	move.l	myport,a0
	lea	doormsg,a1
	CALLEXEC	PutMsg
	move.l	replyport,a0
	CALLEXEC	WaitPort
	move.l	replyport,a0
	CALLEXEC	GetMsg
	rts

*            a0
* SetWhere(string) - Notifies paragon "where" the user is. string is a ptr to
* the string containing the "location".
*
setwhere
	move.w	#$17,doormsg+dm_command
	lea	doormsg+dm_string,a1
.loop	move.b	(a0),(a1)+
	tst.b	(a0)+
	bne.s	.loop
	bra.s	sendit

* showfile shows the text file which mstring is the path to.
* It handles ^C aborting, and ^S/^Q pausing. */
showfile			; show file ... (a0) = handle
	
	move.w	#10,doormsg+dm_command	; COMMAND: ShowFile
sfile	lea	doormsg+dm_string,a1	; tell door about it
	move.l	a0,-(sp)
	lea	filename,a0
.loop1	move.b	(a0)+,(a1)+
	tst.b	(a0)
	bne.s	.loop1
	move.l	(sp)+,a0
.loop	move.b	(a0),(a1)+
	tst.b	(a0)+			; check for null byte
	bne.s	.loop			; not yet!
	bra.s	sendit			; do the biz


* showtext shows the text file which mstring is the path to.
* It handles ^C aborting, and ^S/^Q pausing.
* also, will display .TXT/.GR1 etc depending on graphics mode
showtext			; show file ... (a0) = handle
	move.w	#19,doormsg+dm_command	; COMMAND: ShowText
	bsr.s	sfile
	rts


* getsvar (d0=typ) - Gets certain string variables from Paragon.
* "typ" tells it what you want: 1=Name, 2=Password, 3=Address, 4=City,
* 5=State, 6=Postal code, 7=Door pathname, 8=Default BBS pathname.
getsvar
	move.w	d0,doormsg+dm_data
	move.w	#14,doormsg+dm_command
	move.l	myport,a0
	lea	doormsg,a1
	CALLEXEC	PutMsg
	move.l	replyport,a0
	CALLEXEC	WaitPort
	lea	doormsg+dm_string,a0
	lea	string,a1
.loop	move.b	(a0),(a1)+
	tst.b	(a0)+
	bne.s	.loop
	move.l	replyport,a0
	CALLEXEC	GetMsg
	rts


*
* getvar(d0=typ) - Returns numeric information about the user on-line
* typ is the type of information you want, and the types are specified
* in DOORSDOC.DOC  (This is command number 13)
*
getvar
	move.w	d0,doormsg+dm_data
	move.w	#13,doormsg+dm_command
	move.l	myport,a0
	lea	doormsg,a1
	CALLEXEC	PutMsg
	move.l	replyport,a0
	CALLEXEC	WaitPort
	moveq.l	#0,d0
	move.w	doormsg+dm_data,d0
	move.l	d0,.ret+2
	move.l	replyport,a0
	CALLEXEC	GetMsg
.ret	move.l	#-1,d0
	rts

*               a0    d0
* sendmessage(mstring,nl) - Sends a message to the local window and to
* the modem (if applicable).  "mstring" is the output string you want to
* send, "nl" is and integer which is 1 if you want it to send the
* c/r+l/f combination, or 0 if not.
*
sendmessage
	movem.l	d0-d7/a0-a6,-(sp)
	move.w	d0,doormsg+dm_data
trans1	move.w	#1,doormsg+dm_command
_out	lea	doormsg+dm_string,a1
.loop	move.b	(a0),(a1)+
	tst.b	(a0)+
	bne.s	.loop
	bsr	sendit
	movem.l	(sp)+,d0-d7/a0-a6
	rts

return
	lea	blank,a0
	move.w	#crlf,d0
	bra.s	sendmessage

*           a0
* hotkey mstring - outputs the string "mstring" and waits for one key which
* it will return in d0. "mstring" may be a null string, in which case it will
* only wait for the key, and not output any prompt.
*
hotkey
	move.w	#8,doormsg+dm_command
	lea	doormsg+dm_string,a1
.loop	move.b	(a0),(a1)+
	tst.b	(a0)+
	bne.s	.loop
	bsr	sendit
	moveq.l	#0,d0
	move.b	doormsg+dm_string,d0
	rts

sendchar				; send char to BOTH users
	movem.l	d0-d7/a0-a6,-(sp)
	move.w	d0,doormsg+dm_data
	move.w	#5,doormsg+dm_command
	bsr	sendit
	movem.l	(sp)+,d0-d7/a0-a6
	rts

rnd				; get random no. between 0 & d0
	movem.l	d0-d7/a0-a6,-(sp)
	move.w	d0,doormsg+dm_data
	move.w	#17,doormsg+dm_command
	move.l	myport,a0
	lea	doormsg,a1
	CALLEXEC	PutMsg
	move.l	replyport,a0
	CALLEXEC	WaitPort
	moveq.l	#0,d0
	move.w	doormsg+dm_data,d0
	move.l	d0,.ret+2
	move.l	replyport,a0
	CALLEXEC	GetMsg
	movem.l	(sp)+,d0-d7/a0-a6
.ret	move.l	#-1,d0
	rts

;	-	-	-	-	-	-	-

doorname	dc.b	"doortest",0
rportname	dc.b	"DoorReply"
here1	dc.b	0,0
cportname	dc.b	"DoorControl"
here2	dc.b	0,0
welcome1	dc.b	"		    :::::::::::::::::::::::::::::::::",0
      	dc.b	"		    :::%%%%%%%%%%%%%%%%%%%%%%%%%%%%::",0
	dc.b	"		    :: %                          %::",0
	dc.b	"		    :: % HangMan, By Oliver Smith %::",0
	dc.b	"		    :: %                          %::",0
	dc.b	"		    :: %       Version 1.1        %::",0
	dc.b	"		    :: %                          %::",0
	dc.b	"		    :: %%%%%%%%%%%%%%%%%%%%%%%%%%%%::",0
	dc.b	"		    ::                            :::",0
	dc.b	"		    :::::::::::::::::::::::::::::::::",0
	dc.b	" ",0
	dc.b	"		  Extra BBS time now given to winners!!",0
	dc.b	" ",0
	dc.b	" ",0,0
WordCount	dc.b	"		        Phrases in system: ",0
welcome9	dc.b	" Welcome to HangMan, ",0
welcomeA	dc.b	", do you require instructions? [y/N] ",0
yourword	dc.b	"The word so far is: ",0
repeated	dc.b	"			You've already tried that one!",0
aletter	dc.b	"What's your guess [a-z, ! to quit] --> ",0
leaves	dc.b	"That makes: ",0
yes	dc.b	"			    !! Well Done !!",0
no	dc.b	"			%% Nope! Try another! %%",0
blank	dc.b	0
wordwas	dc.b	"		THE PHRASE WAS :- ",0
guesses	dc.b	"Letters tried: ",0
youwin	dc.b	"  Bonus time awarded! No. of extra minutes: ",0
youloose	dc.b	"  Winners win, loosers lose. Time deducted: 5 minutes",0
playagain	dc.b	"   Play it again, sam? [Y/n]: ",0
insfile	dc.b	"hangdoc",0
anykey	dc.b	"	Hit any key...",0
byemsg1	dc.b	"HangMan, written for Paragon BBS s/w By Oliver Smith, Jan 1990!",0
byemsg2	dc.b	"Call The CodeOmatic, 0472-250690 [+44-472-250690] 24 hrs daily!",0

words	dc.b	"alien",0,"amiga",0,"articulate",0,"afterwards",0,"afterthought",0,"son of a bitch",0,"internally",0
	dc.b	"banana",0,"britain",0,"bulletin board",0,"belgium",0,"batman",0,"gone with the wind",0,"soul searching",0
	dc.b	"charming",0,"contemplate",0,"craft",0,"culture",0,"cruel",0,"christ",0,"simply unfair",0
	dc.b	"damp corner",0,"damsel",0,"deleted",0,"delicate",0,"degree",0,"sheer desperation",0,"no fixed abode",0
	dc.b	"echo",0,"elaborate",0,"elastic",0,"extra terrestrial",0,"english food",0,"castrated pig",0
	dc.b	"feeling",0,"fence",0,"finite",0,"fairy",0,"fantastic voyage",0,"fanatical",0,"careful planning",0
	dc.b	"golf",0,"grapes",0,"germany",0,"granny smith",0,"grapevine",0,"precious stones",0,"loitering with intent",0
	dc.b	"hotel",0,"habitation",0,"hungarian",0,"hungry",0,"hungary",0,"help line",0,"help page",0,"hitler",0
	dc.b	"indian",0,"indiana jones",0,"investigation",0,"invalid command",0,"ibm pc clone",0,"central processor unit",0
	dc.b	"joker",0,"jolly fisherman",0,"jolly rodger",0,"james dean",0,"parking spaces",0,"strategy",0,"final manouvere",0
	dc.b	"klingons",0,"kilo",0,"known distance",0,"kind words",0,"gale force",0,"authorisation",0,"fidonet",0
	dc.b	"limousin",0,"life guard",0,"limited edition",0,"lonley wanderer",0,"adventure games",0,"distributed network",0
	dc.b	"mr spock",0,"martian",0,"moonlight sonata",0,"midnight",0,"more or less",0,"totally pissed",0,"evasive actions",0
	dc.b	"never",0,"now and then",0,"necromancer",0,"nominal ledger",0,"tragic disaster",0,"arcade games",0,"showjumping",0
	dc.b	"originator",0,"orthodox",0,"orson wells",0,"only child",0,"total destruction",0,"so this is it were going to die",0
	dc.b	"parking",0,"personal",0,"property",0,"purchase ledger",0,"all in your mind",0,"access denied",0,"ditched",0
	dc.b	"question",0,"quizzical look",0,"quietly",0,"quality street",0,"direct debit",0,"shit think of a word",0
	dc.b	"robot",0,"robber",0,"raving mad",0,"rent a ghost",0,"russian",0,"perfectly true",0,"supercalafragalistic",0
	dc.b	"stupid",0,"system x",0,"star charts",0,"slave to work",0,"superman",0,"sales ledger",0,"super star",0,"catastrophically",0
	dc.b	"transaction",0,"turning point",0,"temperature",0,"temporary",0,"turn of events",0,"transition",0,"proportional spacing",0
	dc.b	"university",0,"union",0,"unique",0,"utilities",0,"utility belt",0,"edge of the world",0,"tales of narnia",0
	dc.b	"vertical",0,"vision",0,"veritable",0,"voice communication",0,"venison",0,"venerable",0,"glad to be of service",0
	dc.b	"cardiac arrest",0,"citizen k",0,"small phrases",0,"wanna try again",0,"almost home now",0,"serviette",0,"emphasized print",0
	dc.b	"never mind",0,"think about it",0,"spur of the moment",0,"blankety blank",0,"avon calling",0,"tea for two",0,"you are a wanker",0
	dc.b	"turn of phrase",0,"not just now",0,"hard to get",0,"looking around",0,"rest in peace",0,"avon calling",0,"interactive",0
	dc.b	"under arrest",0,"vertical hold",0,"olympic games",0,"margaret thatcher",0,"ronald regan",0,"candlelit dinner",0
	dc.b	"headmasters office",0,"food for thought",0,"meaningless sentence",0,"pause for thought",0,"time for tea",0,"hinge",0
	dc.b	"whenever possible",0,"complete failure",0,"did you guess",0,"work in progress",0,"live and let die",0,"word processor",0
	dc.b	"whisky",0,"white",0,"working",0,"whitewash",0,"workaholic",0,"wednesday",0,"week ending",0,"weak",0,"worthless",0,"hinge and bracket",0
	dc.b	"xylophone",0,"exchange",0,"xenophobia",0,"xmas tree",0,"vicious lies",0,"duck here it comes",0,"yes priminister",0
	dc.b	"york cathederal",0,"york minster",0,"yankee",0,"yoghurt",0,"younger",0,"user guide",0,"oliver smith is best",0,"bracket",0
	dc.b	"zoo",0,"zero",0,"below zero",0,"zenith",0,"zebra",0,"here we go again",0,"shoot to kill",0,"john plumridge was watching",0
	dc.b	"aphordite",0,"american dream",0,"pornography",0,"mustard",0,"never the twain",0,"kashmirs bbs",0,"simon parker made the drinks",0
	dc.b	"fellowship",0,"brootherhood",0,"telepathy",0,"television",0,"audio mixer",0,"remotely",0,"kashmirs bbs sucks",0,"physics lesson",0
	dc.b	"signals",0,"football",0,"american football",0,"pop music",0,"science fiction",0,"qubert lives",0,"thanks to the cat",0,"shoot to kill",0
	dc.b	"remote control",0,"passport",0,"one way ticket",0,"vienna",0,"purely ficticious",0,"we come in peace",0,"ride a cock horse",0
	dc.b	"going shopping",0,"disasterous",0,"hyporcritical",0,"synicism",0,"detestable thoughts",0,"mozart is really hip",0,"school kids",0
	dc.b	"delta patrol",0,"dam busters",0,"helicopter",0,"jet plane",0,"heart attack",0,"out of petrol",0,"white knickers",0,"astronomical ingenuity",0
	dc.b	"rock band",0,"elastic band",0,"rubber band",0,"bone idle",0,"pop idle",0,"painful injections",0,"the cat and the fiddle",0
	dc.b	"nuclear scientist",0,"holocaust",0,"the bible",0,"data protection",0,"hard disk drive",0,"house music is crap",0,"under the influence",0
	dc.b	"political beliefs",0,"fanatical obsession",0,"depressing news",0,"unreliable sources",0,"here comes the sun",0,"doctor kildare",0
	dc.b	"bonking",0,"raunchy",0,"telephone bill",0,"entropy",0,"nothingness",0,"totally brainless",0,"worse still",0,"doctor who",0
	dc.b	"gradual subsidance",0,"general relativity",0,"penis",0,"contrecaption",0,"young hopefuls",0,"its worse than that",0,"school teacher",0
	dc.b	"tentative",0,"tentacles",0,"testicles",0,"splendour",0,"exacting",0,"unsophisticated",0,"in the beginning",0,"respect your elders",0
	dc.b	"universal",0,"investigate",0,"illustrious",0,"industrial",0,"exploration",0,"tardigrade",0,"mite",0,"possibly not",0,"paul mcartney",0
	dc.b	"martian canals",0,"community charge",0,"fuck off ugly",0,"smeg head",0,"red dwarf",0,"stassis booth",0,"lost in space",0,"democratic german republic",0
	dc.b	"infinity",0,"pangalactic",0,"hitchhiker",0,"erogenous zones",0,"philosophical",0,"metaphysical",0,"once upon a time",0,"upper class twit",0
	dc.b	"castration",0,"monogrammed",0,"venerial disease",0,"provocatively",0,"brothel",0,"bros are gay",0,"born to be killed",0,"alfred hitchcock",0
	dc.b	"three",0,"better than life",0,"game head",0,"christianity",0,"belief",0,"nappy",0,"babies",0,"that time of month",0,"the beattles",0
	dc.b	"previously",0,"perfect",0,"nineteen",0,"jump suit",0,"precocious",0,"precaucious",0,"wellingtons",0,"mushroom sauce",0,"john lennon",0
	dc.b	"bexley",0,"baxter",0,"ford prefect",0,"illegal",0,"pc plod",0,"restaurant",0,"autopsy",0,"spy novel",0,"the owl and the pussy cat",0
	dc.b	"novelty",0,"crucial",0,"evidence",0,"harmonics",0,"rubber duck",0,"the computer",0,"astronomy",0,"is it that time already",0,"video titling software",0
	dc.b	"encyclopedia",0,"tangerine",0,"amphibious",0,"speculative",0,"workbench",0,"installation",0,"always use proparaliphics",0,"the bards tale",0
	dc.b	"interference",0,"agricultural",0,"par four",0,"underneath the arches",0,"ghost busters",0,"farmers wellies",0,"blind drunk",0,"rising damp",0
	dc.b	"transatlantic",0,"the north sea",0,"almost completely",0,"whenever",0,"how and when",0,"oh sheep are nice",0,"carless talk cost lives",0,"oh",0
	dc.b	"fish and chips",0,"chinese takeaway",0,"rubbish bin",0,"computer terminal",0,"the silver screen",0,"albert einstein",0,"ingenious plot",0
	dc.b	"how to kill your wife",0,"anyone there",0,"floppydisk",0,"interrupt driven",0,"string quartet",0,"frank sinatra",0,"sheer desperation",0
	dc.b	"gymnastic",0,"elongated",0,"full duplex",0,"baud rate",0,"irational",0,"sheer desperation",0,"englebert humperdink",0,"no respect",0,"stock aitkin and waterman",0
	dc.b	"painfully true",0,"bitter truth",0,"crossed line",0,"bad connexion",0,"zero gravity",0,"home and away",0,"theme tune",0,"utter disbelief",0
	dc.b	"peter pan",0,"plug ole bbs",0,"empyrion bbs",0,"the alien bbs",0,"paragon doors",0,"space empire",0,"trade wars",0,"disregard",0,"murder case book",0
	dc.b	"written by oliver smith",0,"customs and excise",0,"tax collector",0,"debit control",0,"bank account",0,"download",0,"file transfer",0,"the reflex",0
	dc.b	"connect string",0,"connection terminated",0,"bbspc is brill",0,"multiuser bbs",0,"line one",0,"terry wogan",0,"chat show host",0,"disreputable character",0
	dc.b	"joint venture",0,"four course meal",0,"false pretenses",0,"circumstantial evidence",0,"extra terrestrial",0,"epic voyage",0,"keyboard",0,"black and decker",0
	dc.b	"voyager",0,"right to reply",0,"indifferent",0,"circustantial",0,"boldly go",0,"radio station",0,"television",0,"inaudible",0,"most educational",0
	dc.b	"tea or coffee",0,"sugar and milk",0,"one lump or two",0,"nel mangle",0,"jason donovan",0,"kylie minogue",0,"henry ramsey",0,"rain rain go away",0
	dc.b	"friendship",0,"tranquillity",0,"available now",0,"requested",0,"ballance sheet",0,"amendment list",0,"corrections",0,"typex",0,"typewriter",0
	dc.b	"infantile behaviour",0,"eddie murphy",0,"jesus loves you",0,"courier hst",0,"inner circle",0,"jon radoff",0,"technical hitch",0,"unorganised salesperson",0
	dc.b	"durastiction",0,"positive calamity",0,"policy",0,"political asylum",0,"baby sitter",0,"stephen carleton",0,"wall to wall carpeting",0
;Phrases thought of by James Olsen! :-
	dc.b	"there can be only one",0,"i know his name",0,"its a kind of magic",0,"i am in disguise",0,"this way no one will recognise me",0,"for richer for poorer",0
	dc.b	"who cuts your hair",0,"jolly james",0,"nice to see you",0,"nnnnineteen",0,"englands cricket team",0,"disgusting sexual habbits",0,"he cares for these mortals",0
	dc.b	"dan dadadaa  its sssuperman",0,"that shall be his undoing",0,"sexual frustration",0,"forgive me i am a worm",0,"lovers knott",0
	dc.b	"whos got the shits now",0,"look whos talking",0,"put your money where your dick is",0,"put your money where your mouth is",0,"get the fuck oudda here",0
	dc.b	"this is no time for an orgasm",0,"i promise i wont come in your mouth",0
	dc.b	"abruptly the sounds ceased",0,"theyre not devils theyre martians",0,"there must be something worth living for",0,"somewhere in the spirit of man",0
	dc.b	"the red weed",0,"the road to hell",0,"for the evil one never rests",0,"thunderchild",0,"war of the worlds",0,"splashed to the winds",0
	dc.b	"but this time the heat ray sent them to oblivion",0,"splash one mig",0,"maverick supersonic",0,"eject eject eject",0,"double engine flame out",0
	dc.b	"tranquiliser",0,"nineteen eighty four",0,"als sprach zarathrustra",0,"tomita","YOU CANT GET THIS ITS IN CAPTIALS",0,"SYSOPS REVENGE, YOU LOST!",0
	dc.b	"exclamation marks arent allowed!",0,"his outcries invited death for us both",0,"and yet i pitied him",0,"no one could have believed",0
	dc.b	"ello john  gotta new motor",0,"its a sign",0,"they must be cast out",0,"i am the chosen one",0,"i shall destroy them with my prayers",0,"thud",0
	dc.b	"the curious eye of a martian",0,"walls  coal  my boot",0,"with a click",0,"dragged away",0,"do do doooo dooo da",0,"knicker sniffer",0,"do do do da",0,"sa lkjnddsalkjndsalkjndsakjn ldsalkjn",0
	dc.b	"qw er ty ui op",0,"smerk tabs like a geordie",0,"arr drink beear mee",0,"canny baga tudor",0,"probably the best lager in the world",0,"probably the best door in the world",0
	dc.b	"malformed martian bean pole",0,"halt who goes there",0,"this is my teritory",0,"have you seen any martians",0,"david essex is a puff",0,"ive got a plan",0
	dc.b	"we are gonna build a whole new world",0,"they clap eyes on us and we are dead",0,"underground",0,"start from scratch",0,"take a look around you",0,"crazy circus show",0
	dc.b	"maybe from the madness something beautiful will grow",0,"well start all over again",0,"sollisbury hill",0,"the heat ray",0
	dc.b	"i saw flames flashing in the deep blue night",0,"i felt a traitor to my kind",0,"their outlines softned by the dust",0,"all was still",0,"desolating cry",0
	dc.b	"intensely weary",0,"intolerably",0,"unendurably",0,"gaunt quiet",0,"here and now",0,"exaltation",0,"red shreds",0
	dc.b	"a million to one but still they came",0,"but still they came",0,"a million to one",0,"primrose hill",0,"the martian camp",0
	dc.b	"slain after all mans devices had failed",0,"bacteria",0,"minute and invisible",0,"from that moment they were doomed",0
	dc.b	"directly the invaders came",0,"ate and drank",0,"codeomatic bbs",0
	dc.b	0,"hello",0,0

	even

pictures	dc.l	pic1,pic2,pic3,pic4,pic5,pic6,pic7,pic8,pic9,pic10

pic10	dc.b	"pic10",0

pic9	dc.b	"pic9",0

pic8	dc.b	"pic8",0

pic7	dc.b	"pic7",0

pic6	dc.b	"pic6",0

pic5	dc.b	"pic5",0

pic4	dc.b	"pic4",0

pic3	dc.b	"pic3",0

pic2	dc.b	"pic2",0

pic1	dc.b	"pic1",0

died	dc.b	" ",0
	dc.b	" %%%%%%%%%%%%%%%%% WRONG! %%%%%%%%%%%%%%%%%",0
	dc.b	" ",0
	dc.b	" ",0
	dc.b	"    +-------+",0
	dc.b	"    |/      |",0
	dc.b	"    |       O",0
	dc.b	"    |       l      o",0
	dc.b	"    |     --+--   /        G A M E    O V E R",0
	dc.b	"    |       |    /",0
	dc.b	"    |      / \  +               Y o u   L o s t !",0
	dc.b	"+---+----+      |",0
	dc.b	"| HaHaHa |------|",0," ",0,0

won	dc.b	"    +-------+",0
	dc.b	"    |/      |",0
	dc.b	"    |       |",0
	dc.b	"    |       C     o",0
	dc.b	"    |            /        W E L L   D O N E !",0
	dc.b	"    |           /     O",0
	dc.b	"    |           +   --+--       Hanging CANCELLED!",0
	dc.b	"+---+----+      |     |",0
	dc.b	"|         ------|    / \",0," ",0,0

	even

doordetail
	dc.b	"Playing Hang Man",0
enddetail
	dc.b	"Nowhere Special",0

	even

filename	ds.b	132
doormsg	ds.b	dm_size
garbage	ds.l	1
myport	ds.l	1
replyport	ds.l	1
mytask	ds.l	1
string	ds.b	256
nwords	ds.l	1
myword	ds.l	1
mywptr	ds.l	1
mywlen	ds.l	1
hidden	ds.b	80		; hidden letters
nhidden	ds.l	1		; no. of letters left
used	ds.b	80		; list of letters used
lost	ds.l	1		; no. of misses
guessed	ds.l	1		; no guessed so far!
