	TTL	Dinosaur_Hunt  
*               By Richard Schneider 08/02/89 version 1.1

                INCLUDE  "df1:libraries/IFF.I"    ;Download from PLINK

        	INCLUDE "df1:exec/types.i"        ; |
                INCLUDE "df1:exec/nodes.i"        ; |
        	INCLUDE "df1:exec/libraries.i"    ; |     Metacompco INCLUDE
        	INCLUDE "df1:exec/lists.i"        ; | ->  files
                INCLUDE "df1:exec/ports.i"        ; |
                INCLUDE "df1:exec/io.i"           ; |
        	INCLUDE	"df1:exec/semaphores.i"   ; |
	        INCLUDE "df1:libraries/dos.i"     ; |
	        INCLUDE "df1:libraries/dos_lib.i" ; |

                INCLUDE "df1:arp/arpbase.i"       ;Download from PLINK

		XREF	_SysBase                  ;gotton from ToolCaddy's
		XREF	_DOSBase                  ;startup sequenc 
		XDEF	START                     ;lets Toolcaddy's 
*                                                 ;startup-seq know about me
*****************************************************************************
START		LEA	GRAPHICS,A1	point to graphic's name
		MOVE.L	#0,D0		allow any version
		JSR	-$228(A6)	go OpenLibrary Graphics
		MOVE.L	D0,GFXBASE	save Graphics Base
		BEQ	EXIT		go report error
************** O P E N   A R P *********************************************
        	LEA	ARP,A1	        point to arp lib's name
		MOVE.L	#0,D0		allow any version
		JSR	-$228(A6)	go OpenLibrary arp
		MOVE.L	D0,ARPBASE	save ARP Base  
                BEQ	EXIT1		go close graphics lib
******************  O P E N   IFF          
        	LEA	IFFL,A1	        point to iff lib's name
		MOVE.L	#16,D0		allow any version
        	MOVE.L	_SysBase,A6	point to EXEC Base
		JSR	-$228(A6)	go OpenLibrary iff
		MOVE.L	D0,IFFBASE	save Graphics Base
		BEQ	EXIT2	        close graphics and arp libs
*                                	go stop program  
******************* OPEN INTUITION LIBRARY  *********************************
		LEA	INTUITNAME,A1	point to intuition's name
		MOVE.L	#0,D0		allow any version
		JSR	-$228(A6)	go OpenLibrary Intuition
		MOVE.L	D0,INTUBASE	save the library base
		BEQ	EXIT3    	end program 
******************* OPEN TRANSLATOR LIBRARY  *********************************
		LEA	TRANSNAME,A1	point to translator's name
		MOVE.L	#0,D0		allow any version
		JSR	-$228(A6)	go OpenLibrary translator
		MOVE.L	D0,TRANBASE	save the library base
		BEQ	EXIT4    	end program 
******************* OPEN NARRATOR DEVICE  *********************************
                SUB.L   A1,A1
		MOVE.L	_SysBase,A6	point to EXEC Base
                JSR     -294(A6)        findtask get tcb
                MOVE.L  D0,NWRREP+2
                LEA     NWRREP,A1 
                JSR     -354(A6)        addport     
                LEA     TALKIO,A1       pointer to i/o area in A1
                MOVE.L  #NWRREP,14(A1)  enter port address
                CLR.L   D0              number 0
                CLR.L   D1              no flags   
		LEA	NARDEVICE,A0	point to narrator's name
		JSR	-444(A6)	go Opendevice 
		TST.L 	D0              err
		BNE	EXIT5    	end program 
*****************  setup i/o for narrator device  ******************
BP              LEA     TALKIO,A1       ptr. to i/o in A1
                MOVE.L  #NWRREP,14(A1)  enter port address                
                MOVE.L  #AMAPS,48+8(A1) ptr. to audio mask 
                MOVE.W  #4,48+12(A1)    size of mask

***   open windows routine ****************************************************
**    determine what directory is default one 
*                MOVE.L  #$4446303A,DIRECTORY initialize directory of struct df1
                MOVE.L  #$52414D3A,DIRECTORY initialize directory of struct RAM
* all libs are open  paint our window **************************************
		MOVE.L	INTUBASE,A6	point to Intuition Base
		LEA	NEWINDOW,A0	point to window requirements
		JSR	-$CC(A6)	go OpenWindow main window
		MOVE.L	D0,WINDOW	save the window pointer
		BEQ	EXIT6		stop prog close files
******    write intro instructions into window 
PRINTRPORT	MOVE.L	INTUBASE,A6	point to Intuition Base
		LEA	TEXT1,A1	point to text
		MOVE.L	WINDOW,A2	point to window
		MOVE.L	$32(A2),A0	get the RPORT
		MOVE.L	#0,D0		left edge
		MOVE.L	#0,D1		top edge
		JSR	-$D8(A6)	go PrintIText
		MOVE.W	#0,FLAG  	dissarm help flag for 1st time through
		MOVE.L	_SysBase,A6	point to EXEC Base
                BRA     REPLAY 
* wait for a message from exec *********************************************
BEGIN		MOVE.L	_SysBase,A6	point to EXEC Base
		MOVE.L	WINDOW,A0	get a pointer
		MOVE.L	$56(A0),A0	get UserPort
		CLR.L	D1		prepare the register
		MOVE.B	$0F(A0),D1	get MP_SIGBIT
		MOVE.L	#1,D0		get the signal bit
		LSL.L	D1,D0		shift it
		JSR	-$13E(A6)	go Wait
* get the message routine **************************************************
GETMSG		MOVE.L	WINDOW,A0	get a pointer
		MOVE.L	$56(A0),A0	get Userport
		JSR	-$174(A6)	go GetMsg the message
		TST.L	D0		is there a message?
		BEQ	BEGIN		no, go again
		MOVE.L	D0,A1		yes, get a pointer to message
* are we interested in the message routine **********************************
		MOVE.L	$14(A1),D0	get the class
 		BTST.L	#3,D0		is it MOUSEBUTTONS?
		BNE	BACKTOREQ	return resources, paint requester 
*		BTST.L	#9,D0		no, is it CLOSEWINDOW?
*		BNE	EXIT1		yes, go do it
		BTST.L	#10,D0		no, is it RAWKEY F2 or HELP?
		BNE	RAWKEY		yes, go do it
		JSR	-$17A(A6)	no, go ReplyMsg
		BRA	GETMSG		go again
* get key press  routine *****************************************************
RAWKEY		MOVE.W	$18(A1),D0	get the RawKeyCode
		CMPI.W	#$51,D0 	is it F2?
                BEQ     BACKTOREQ       give back resources paint requester
        	CMPI.W	#$5F,D0 	no, is it HELP?
 		BEQ	TALK 	

*		CMPI.W	#$4E,D0 	no, is it right?
*		BEQ	RIGHT		yes, go move it
*		CMPI.W	#$4F,D0 	no, is it left?
*		BEQ	LEFT		yes, go move it
		BRA	GETMSG		go again
******************** END ADVGRAPHICS3 ***********************************
TALK		TST.W	FLAG		is it already displayed?
		BEQ	BEGIN   	no not displayed don't provide help
*************   give help , 1st get file name pt. to text ********************
                MOVE.L  #0,D5          set scratch reg . to false for later test
                MOVE.L  #3,D4          set counter for DBR
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
                MOVE.L  #$416E6B79,NAME_BUCKET   write Ankl (Ankylosaur) in buc
                MOVE.L  #NAME_BUCKET,A4 
*                MOVE.L  #ANKYLOSAURUS,A4  Pt. to 1st possible text to say
** load params in regs a3 and a4 
TALK1           CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK2            not a match try next 
                DBRA    D4,TALK1         so far so good, go back for more 
                LEA     ANKYLOSAURUS,A0  this is what to say pass parm. in ptr. 
                MOVE.L  #BACKROUND-ANKYLOSAURUS,D0    pass the len 
                BRA     SAYIT  
TALK2           MOVE.L  #3,D4          set counter for DBR
                MOVE.L  #$53746567,NAME_BUCKET   write steg  in buc
                MOVE.L  #NAME_BUCKET,A4 
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
*                MOVE.L  #STEGOSAURUS,A4  Pt. to 2nd possible text to say
TALK22          CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK3           not a match try next 
                DBRA    D4,TALK22         so far so good, go back for more 
                LEA     STEGOSAURUS,A0  this is what to say pass parm. in ptr. 
                MOVE.L  #STYRACOSAURUS-STEGOSAURUS,D0   pass the len 
                BRA     SAYIT    
TALK3           MOVE.L  #3,D4  set counter for DBR 1 less than num chars to test
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
                MOVE.L  #$416C6C6F,NAME_BUCKET   write Allo (Allosaurus) in buc
                MOVE.L  #NAME_BUCKET,A4  Pt. to 3rd possible text to say
* NAME_BUCKET allows no more than 1 variable to be declared for guys like Allo
* whose spelled name causes Narrator to misspronounce Allosaurus. for each of 
* these guys 
*                MOVE.L  #ALLOSAURUS,A4  Pt. to 3rd possible text to say
TALK33          CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK4           not a match try next 
                DBRA    D4,TALK33         so far so good, go back for more 
                LEA     ALLOSAURUS,A0  this is what to say pass parm. in ptr. 
                MOVE.L  #ANKYLOSAURUS-ALLOSAURUS,D0   pass the len 
                BRA     SAYIT  
TALK4           MOVE.L  #3,D4          set counter for DBR
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
                MOVE.L  #$42726F6E,NAME_BUCKET   write Bron,  bronto etc in buc
                MOVE.L  #NAME_BUCKET,A4 
*                MOVE.L  #BRONTOSAURUS,A4  Pt. to 3rd possible text to say
TALK44          CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK5           not a match try next 
                DBRA    D4,TALK44         so far so good, go back for more 
                LEA     BRONTOSAURUS,A0  this is what to say pass parm. in ptr. 
                MOVE.L  #ICHTHIOSAURUS-BRONTOSAURUS,D0   pass the len 
                BRA     SAYIT 


TALK5           MOVE.L  #3,D4          set counter for DBR compare for 4
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
                MOVE.L  #$50617261,NAME_BUCKET  write Para (Parasaur etc. in buc
                MOVE.L  #NAME_BUCKET,A4  Pt. to text to compare
*                MOVE.L  #PARASAUROLOPHUS,A4  Pt. to 3rd possible text to say
TALK55          CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK6           not a match try next dino
                DBRA    D4,TALK55         so far so good, go back for more 
                LEA     PARASAUROLOPHUS,A0  this is what to say pass parm. in pt
                MOVE.L  #PLESIOSAURUS-PARASAUROLOPHUS,D0   pass the len 
                BRA     SAYIT     
TALK6           MOVE.L  #3,D4          set counter for DBR
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
                MOVE.L  #$50746572,NAME_BUCKET  Pter in buc 
                MOVE.L  #NAME_BUCKET,A4 
*                MOVE.L  #PTERANODON,A4  Pt. to 3rd possible text to say
TALK66          CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK7           not a match try next 
                DBRA    D4,TALK66         so far so good, go back for more 
                LEA     PTERANODON,A0  this is what to say pass parm. in ptr. 
                MOVE.L  #STEGOSAURUS-PTERANODON,D0   pass the len 
                BRA     SAYIT    
TALK7           MOVE.L  #3,D4          set counter for DBR
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
                MOVE.L  #$54726963,NAME_BUCKET   write Tric (tricerat) in buc
                MOVE.L  #NAME_BUCKET,A4 
*                MOVE.L  #TRICERATOPS,A4  Pt. to 3rd possible text to say
TALK77          CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK8           not a match try next 
                DBRA    D4,TALK77         so far so good, go back for more 
                LEA     TRICERATOPS,A0  this is what to say pass parm. in ptr. 
                MOVE.L  #TYRANOSAURUS-TRICERATOPS,D0   pass the len 
                BRA     SAYIT    
TALK8           MOVE.L  #3,D4          set counter for DBR
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
                MOVE.L  #$44696D65,NAME_BUCKET   write Dime in buc
                MOVE.L  #NAME_BUCKET,A4 
TALK88          CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK9           not a match try next 
                DBRA    D4,TALK88         so far so good, go back for more 
                LEA     DIMETRODON,A0  this is what to say pass parm. in ptr. 
                MOVE.L  #OUTTEXT-DIMETRODON,D0   pass the len 
                BRA     SAYIT 
   
TALK9           MOVE.L  #3,D4  set counter for DBR 1 less than num chars to test
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
                MOVE.L  #$4261636B,NAME_BUCKET   write Back (Backround) in buc
                MOVE.L  #NAME_BUCKET,A4  Pt. to 3rd possible text to say
TALK99          CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK10           not a match try next 
                DBRA    D4,TALK99        so far so good, go back for more 
                LEA     BACKROUND,A0  this is what to say pass parm. in ptr. 
                MOVE.L  #DINOSAURS_WERE-BACKROUND,D0   pass the len 
                BRA     SAYIT   
TALK10           MOVE.L  #3,D4  set counter for DBR 1 less than num chars to tes
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
                MOVE.L  #$44696E6F,NAME_BUCKET   write Dino (dinosWEre) in buc
                MOVE.L  #NAME_BUCKET,A4  Pt. to 3rd possible text to say
TALK101         CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK11           not a match try next 
                DBRA    D4,TALK101         so far so good, go back for more 
                LEA     DINOSAURS_WERE,A0 this is what to say pass parm.in ptr.
                MOVE.L  #PT2-DINOSAURS_WERE,D0   pass the len 
                MOVE.L  #1,D5             set flag to non-zero 
                BSR     SAYIT 
                MOVE.L  #0,D5             set back to zero 
                LEA     PT2,A0 this is what to say pass parm.in ptr.
                MOVE.L  #BRACHIOSAURUS-PT2,D0   pass the len 
                BRA     SAYIT 
TALK11          MOVE.L  #3,D4          set counter for DBR
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
                MOVE.L  #$42726163,NAME_BUCKET   write Brac (Brachios) in buc
                MOVE.L  #NAME_BUCKET,A4  Pt. to 3rd possible text to say
TALK111          CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK12           not a match try next 
                DBRA    D4,TALK111         so far so good, go back for more 
                LEA     BRACHIOSAURUS,A0 this is what to say pass parm. in ptr.
                MOVE.L  #BRACHPT2-BRACHIOSAURUS,D0   pass the len 
                MOVE.L  #1,D5             set flag to non-zero 
                BSR     SAYIT 
                MOVE.L  #0,D5             set back to zero 
                LEA     BRACHPT2,A0 this is what to say NEXT pass parm.in ptr.
                MOVE.L  #BRONTOSAURUS-BRACHPT2,D0   pass the len 
                BRA     SAYIT  

TALK12          MOVE.L  #3,D4          set counter for DBR
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
                MOVE.L  #$49636874,NAME_BUCKET   write Icht in buc
                MOVE.L  #NAME_BUCKET,A4 
*                MOVE.L  #ICHTHIOSAURUS,A4  Pt. to 12 TH possible text to say
TALK121         CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK13           not a match try next 
                DBRA    D4,TALK121         so far so good, go back for more 
                LEA     ICHTHIOSAURUS,A0 this is what to say pass parm. in ptr.
                MOVE.L  #MASSOSPONDYLUS-ICHTHIOSAURUS,D0   pass the len 
                BRA     SAYIT  
TALK13          MOVE.L  #3,D4          set counter for DBR
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
                MOVE.L  #$506C6573,NAME_BUCKET   write Ples in buc
                MOVE.L  #NAME_BUCKET,A4 
*                MOVE.L  #PLESIOSAURUS,A4  Pt. to 13 TH possible text to say
TALK131         CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK14           not a match try next 
                DBRA    D4,TALK131         so far so good, go back for more 
                LEA     PLESIOSAURUS,A0 this is what to say pass parm. in ptr. 
                MOVE.L  #PTERANODON-PLESIOSAURUS,D0   pass the len 
                BRA     SAYIT   
TALK14          MOVE.L  #3,D4          set counter for DBR
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
                MOVE.L  #$53747972,NAME_BUCKET   write Styr in buc
                MOVE.L  #NAME_BUCKET,A4 
*                MOVE.L  #STYRACOSAURUS,A4  Pt. to 14 TH possible text to say
TALK141         CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK15          not a match try next 
                DBRA    D4,TALK141         so far so good, go back for more 
                LEA     STYRACOSAURUS,A0 this is what to say pass parm. in ptr. 
                MOVE.L  #TRICERATOPS-STYRACOSAURUS,D0   pass the len 
                BRA     SAYIT 
TALK15          MOVE.L  #3,D4          set counter for DBR
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
                MOVE.L  #$4D617373,NAME_BUCKET write Mass(Massospondylus) in buc
                MOVE.L  #NAME_BUCKET,A4 
*                MOVE.L  #MASSOSPONDYLUS,A4  Pt. to 15 TH possible text to say
TALK151         CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK16          not a match try next 
                DBRA    D4,TALK151         so far so good, go back for more 
                LEA     MASSOSPONDYLUS,A0  is what to say pass parm. in ptr. 
                MOVE.L  #PARASAUROLOPHUS-MASSOSPONDYLUS,D0   pass the len 
                BRA     SAYIT  
TALK16          MOVE.L  #3,D4          set counter for DBR
                MOVE.L  #FILE_STORAGE,A3  Pt. to the name user sel. in req.
                MOVE.L  #$54797261,NAME_BUCKET   write Tyra in buc
                MOVE.L  #NAME_BUCKET,A4 
*                MOVE.L  #TYRANOSAURUS,A4  Pt. to 3rd possible text to say
TALK161         CMP.B   (A3)+,(A4)+      compare a character 
                BNE     TALK17           not a match try next 
                DBRA    D4,TALK161         so far so good, go back for more 
                LEA     TYRANOSAURUS,A0  this is what to say pass parm. in ptr. 
                MOVE.L  #DIMETRODON-TYRANOSAURUS,D0   pass the len 
                BRA     SAYIT 
   
TALK17          BRA     BEGIN           only testing 2 names so far 
****  BEFORE talking, clean up translator's buffer, by initializing to 0s **
SAYIT           MOVE.L  #599,D4         Trans. buffer is 600 BYTES long 
                MOVE.L  #OUTTEXT,A4     Pt. to translator's buffer
CLEAR           MOVE.B  #0,(A4)+        initialize aN ADDRESS'S CONTENTS to 0 
                DBRA    D4,CLEAR        so far so good, go back for more  
         
                LEA     OUTTEXT,A1      address where translated data kept
                MOVE.L  #600,D1        len of buffer where transed data kept
                MOVE.L  TRANBASE,A6
                JSR     -30(A6)        translate text to phonemes 
P               LEA     TALKIO,A1
                MOVE.W  #3,28(A1)      use cmd. write
                MOVE.L  #600,36(A1)
                MOVE.W  #120,48(A1)    speed of voice
                MOVE.W  #200,50(A1)    pitch of voice
                MOVE.W  #0,52(A1)      speech mode normal human voice
                MOVE.W  #1,54(A1)      sex female
*********** one can change speed,  pitch, etc here in offsets 48 and 50 ****
*********** of i/o structure *********************
                MOVE.L  #OUTTEXT,40(A1)
       		MOVE.L	_SysBase,A6	point to EXEC Base
*                JSR     -462(A6)        call sendio speech starts here
                MOVE.B  #$1,$1E(A1)      I/O FLAGS use quick
*                MOVE.B  QUICK,$1E(A1)      I/O FLAGS use quick
*                BITDEF 0                 * complete IO quickly
                BEGINIO                 ;CAlls the supervisor
WAIT         	MOVE.L	_SysBase,A6	point to EXEC Base
                LEA     TALKIO,A1       pt.  to i/o request block  	
                JSR     -468(A6)        go Checkio see if done 
                BEQ    WAIT     
                CMP.L  #0,D5            at TALK we initialized D5 TO 0 
                                        ;at dinosaurs_were we reset d5 to 1
		BEQ   	BEGIN   	help over,  back for more input
                RTS                     to large data TALKnn
********     main loop   
REPLAY        	MOVE.L	ARPBASE,A6		point to ARP Base
                LEA     FileReqwind,A1        set to default for runaway req.
                MOVE.L  #0,(A1)+              prob. null out rest of struct
                MOVE.L  #0,(A1)+           
                MOVE.L  #0,(A1)+           
                MOVE.W  #0,(A1)+         
                LEA     FileRequest,A0        ;put struct in a0
                JSR     _LVOFileRequest(A6) display requester         
                BEQ     EXIT6          close ALL open libs release mem.  

*    combine directory with filename for full path qualification
*    directory comes first 
                MOVE.L  #DIRECTORY,A0   now A0 pts. to direcotry
                MOVE.L  #FILENAME,A1    now A1 pts. to filename
*   now move directory into place do longword all 4 charsRAM: DF0: DF1: DH0:   
                MOVE.L  (A0)+,(A1)+     
*  now A1 pts to end of dir's address 
                MOVE.L  D0,A0
* and now A0 pts. to beginning of FILE_STORAGE, append to dir selected 
                MOVE.L  (A0)+,(A1)+     must impliment DBAcc here 
                MOVE.L  (A0)+,(A1)+    
                MOVE.L  (A0)+,(A1)+   
                MOVE.L  (A0)+,(A1)+  
                MOVE.L  (A0)+,(A1)+    
                MOVE.L  (A0)+,(A1)+   
                MOVE.L  #0,(A1)+           cap string off with a null as per iff
                LEA IFFBASE,A6          
 		MOVE.L	IFFBASE,A6	contents point to IFF Base
                MOVE.L  #FILENAME,A1
                MOVE.L A1,FILEPTR
                MOVE.L FILEPTR,A0       conyents of ptr. the addr               
                JSR     -30(A6)         open iff file
                BEQ     ERR   
        	MOVE.L	D0,IFFFILEHANDLE save iff file's handle
                BRA     GRAPHICPART
ERR             JSR     -78(A6)                 GET iff  ERR MSG 
                BRA   EXIT6
* initialize BitMap *********************************************************
GRAPHICPART    	MOVE.L	GFXBASE,A6	point to Graphics Base
		MOVE.L	#6,D0		get the DEPTH
		MOVE.L	#320,D1 	get the WIDTH
		MOVE.L	#200,D2 	get the HEIGHT
		LEA	BitMap,A0	point to the BitMap structure
		JSR	-$186(A6)	go InitBitMap
* allocate raster memory ****************************************************
		MOVE.W	#5,D7		get DEPTH-1
		LEA	BitMap+8,A5	point to BitMap bm_Planes
1$		MOVE.L	#320,D0 	get the WIDTH
		MOVE.L	#200,D1 	get the HEIGHT
		JSR	-$1EC(A6)	go AllocRaster
		MOVE.L	D0,(A5)+	save PLANEPTR
		BEQ	EXIT6		not enough memory
		DBRA	D7,1$		loop
* use IFF routine decodepic to obtain iff file's bitmap ************
        	MOVE.L	IFFFILEHANDLE,A1  OBtain  iff file's handle
        	LEA	BitMap,A0	point to the BitMap structure
        	MOVE.L	IFFBASE,A6	point to IFF   Base
                JSR     -60(A6)         Decode picture into bitmap
                BEQ     ERR1      
                BRA     RAS
ERR1            JSR     -78(A6)         GET ERR MSG 
                BRA     EXIT6
* initialize RasInfo ********************************************************
RAS		LEA	RasInfo,A0	point to RasInfo
		LEA	BitMap,A1	point to BitMap
		MOVE.L	A1,4(A0)	save as ri_BitMap
		MOVE.W	#0,8(A0)	set ri_RxOffset
		MOVE.W	#0,$A(A0)	set ri_RyOffset
		MOVE.L	#0,(A0) 	make ri_Next=NULL
* initialize RastPort structure *********************************************
        	MOVE.L	GFXBASE,A6	point to Graphics Base
		LEA	RastPort,A1	point to RastPort
		JSR	-$C6(A6)	go IntRastPort
		LEA	BitMap,A0	point to BitMap
		LEA	RastPort,A1	point to RastPort
		MOVE.L	A0,4(A1)	save in rp_BitMap
* get the colormap from the iff file ****************************************
        	MOVE.L	IFFBASE,A6	point to IFF   Base
               	MOVE.L	IFFFILEHANDLE,A1  OBtain  iff file's handle
        	LEA	colortable,A0	point to the colortable
                JSR     -54(A6)         Getcolortab build colortable 
                MOVE.L  D0,COUNT        OBTain number of colors found 
                BEQ     ERR3 
        	MOVE.L	IFFFILEHANDLE,A1  OBtain  iff file's handle
                JSR     -84(A6)         OBTAIN viewmodes 
                MOVE.W  D0,VIEWMODES        OBTain number of colors found 

                BRA     INITIALIZE
ERR3            JSR     -78(A6)         GET ERR MSG 
                BRA     EXIT6
* initialize ColorMap *******************************************************
INITIALIZE     	MOVE.L	GFXBASE,A6	point to Graphics Base
		MOVE.L	#64,D0		get the entries was 32
		JSR	-$23A(A6)	go GetColorMap
		MOVE.L	D0,ColorMap	save the pointer
* move our colors into ColorMap *********************************************
		LEA	colortable,A0	point to colortable	              
		MOVE.L	ColorMap,A1	point to ColorMap
		MOVE.L	4(A1),A1	point to cm_ColorTable
		MOVE.W	#63,D7		get number of colors-1 was 31
0$		MOVE.W	(A0)+,(A1)+	move a color
		DBRA	D7,0$		loop
* initialize ViewPort *******************************************************
		LEA	ViewPort,A0	point to ViewPort
		JSR	-$CC(A6)	go InitVPort
* prepare ViewPort structure ************************************************
		LEA	ViewPort,A0	point to ViewPort
		MOVE.L	ColorMap,4(A0)	save in vp_ColorMap
		MOVE.W	#320,$18(A0)	save WIDTH in vp_DWidth
		MOVE.W	#200,$1A(A0)	save HEIGHT in vp_DHeight
		MOVE.W	VIEWMODES,$20(A0) save MODES in vp_modes
		LEA	RasInfo,A1	point to RasInfo
		MOVE.L	A1,$24(A0)	save in vp_RasInfo
* initialize View ***********************************************************
		LEA	View,A1 	point to View
		JSR	-$168(A6)	go InitView
* link ViewPort to View *****************************************************
		LEA	ViewPort,A0	point to ViewPort
		LEA	View,A1 	point to View
                MOVE.W  VIEWMODES,16(A1) 
		MOVE.L	A0,(A1) 	v_ViewPort, link ViewPort into View
* MakeVPort *****************************************************************
		LEA	View,A0 	point to View
		LEA	ViewPort,A1	point to ViewPort
		JSR	-$D8(A6)	go MakeVPort
* MrgCop ********************************************************************
		LEA	View,A1 	point to View
		JSR	-$D2(A6)	go MrgCop
* LOADRGB4 ******************************************************************
        	LEA	ViewPort,A0 	point to Viewport
        	LEA	colortable,A1 	point to colors
                MOVE.L  #COUNT,D0       # of colors 
                JSR     -192(A6)        Loadrgb4
* LoadView ******************************************************************
		MOVE.L	$22(A6),oldview save pointer to old View
		LEA	View,A1 	point to View
		JSR	-$DE(A6)	go LoadView
*  AmigaDOS delay routine ****************************************************
		MOVE.W	#1,FLAG  	arm help flag we are looking at pic
                BRA     BEGIN            
* go back to Cli screen *****************************************************
BACKTOREQ       MOVE.L	GFXBASE,A6	point to Graphics Base
		MOVE.L	oldview,A1	point to old view
		JSR	-$DE(A6)	go LoadView
		JSR	-$10E(A6)	go WaitTOF
		MOVE.W	#0,FLAG  	disarm help flag 
*****************************************************************************
FreeMemory      LEA	BitMap+8,A5	point to BitMap bm_Planes
		MOVE.W	#5,D7		get DEPTH-1 was 4
1$		MOVE.L	(A5)+,A0	get a PLANEPTR
		MOVE.L	#320,D0 	get the WIDTH
		MOVE.L	#200,D1 	get the HEIGHT
		JSR	-$1F2(A6)	go FreeRaster
                DBRA	D7,1$		loop
		MOVE.L	ColorMap,A0	point to ColorMap
		JSR	-$240(A6)	go FreeColorMap
		LEA	ViewPort,A0	point to ViewPort
		JSR	-$21C(A6)	go FreeVPortCopLists
		LEA	View,A0 	point to View
		MOVE.L	4(A0),A0	get v_LOFCprList
		JSR	-$234(A6)	go FreeCprList
        	MOVE.L	IFFFILEHANDLE,A1  OBtain  iff file's handle
        	MOVE.L	IFFBASE,A6	point to IFF   Base
                JSR    -36(A6)       close iff picture file returning resour 
                BRA REPLAY 
***************** the big sleep close down everything ********************
EXIT6          	MOVE.L	_SysBase,A6	point to EXEC Base  
                LEA     TALKIO,A1
                JSR     -480(A6)        stop talking abortio    
                LEA     NWRREP,A1       
                JSR     -360(A6)        removeport
                LEA     TALKIO,A1
                JSR     -450(A6)       closedevice
EXIT5        	MOVE.L	_SysBase,A6	point to EXEC Base
  		MOVE.L	TRANBASE,A1	point to translator's name
		JSR	-414(A6)	go CloseLibrary Translator
EXIT4 	        MOVE.L  INTUBASE,A6
                MOVE.L  WINDOW,A0
                JSR     -$48(A6)        close the window 
        	MOVE.L	_SysBase,A6	point to EXEC Base
  		MOVE.L	INTUBASE,A1	point to intuition's name
		JSR	-414(A6)	go CloseLibrary Intuition
EXIT3        	MOVE.L	_SysBase,A6	point to EXEC Base
		move.l	IFFBASE,a1		; IffBase
		jsr	-414(a6)		; CloseLibrary() (IMPORTANT)
EXIT2           move.l	ARPBASE,a6      		
                JSR     _LVOArpExit(A6)         close nicely     
        	move.l	ARPBASE,a1		    	
                move.l	4,a6			; AbsExecBase
		jsr	-414(a6)		; CloseLibrary() (IMPORTANT)
EXIT1		MOVE.L	GFXBASE,A1	point to Graphics Base
		JSR	-$19E(A6)	go CloseLibrary Graphics
EXIT		RTS			return to Cli

                SECTION DATA,data
* text	*********************************************************************
IFFL     	DC.B    'iff.library',0
		CNOP	0,4
TRANSNAME       DC.B    'translator.library',0
                CNOP    0,4 
NARDEVICE       DC.B    'narrator.device',0
                CNOP    0,4
ARP     	DC.B    'arp.library',0
		CNOP	0,4
HAILING_TEXT    DC.B    'Select Me ',0
        	CNOP	0,4
AMAPS           DC.B    3,5,10,12,0,0 
                CNOP    0,4
TALKIO          DS.L    20
NWRREP          DS.L    8 
NAME_BUCKET     DS.L    1
**  D O N T   M O V E   D A T A  AROUND!  ADDRESSES ARE DETERMINED BY POSITION *
**  i can declare less variables this way.
** TO ADD A DINO APPEND IT TO OFFSET BEFORE OUTTEXT AND CHANGE TALKnn SEGMENTS *
** TO REFLECT ADDITIONS 
ALLOSAURUS      DC.B    'Ahlaws awrus was a meyt eater ' 
                DC.B    'that lived in jurassic times, beytweehn ' 
                DC.B    'abUWt wunhundred and ninE tEY thrEY milyun,'      
                DC.B    'ahnd abUWt wunhundred and thERr tEY sIX ' 
                DC.B    'milyun YIIRZ agOW,  TIPACAL lengtth was ten '       
                DC.B    'mEYters, AWr (thehrtY tOO, fEYt) wittha TIPACAL' 
                DC.B    'HITE of FAWR, mEYTers (AWr THehR TEEN,  fEYT).',0 
                CNOP    0,4                  
ANKYLOSAURUS    DC.B    'Ankylosaurus was a plant eater ' 
                DC.B    'that lived in layt kreytaycious time, ' 
                DC.B    'abUWt wunhundred milyun, tOO,'      
                DC.B    'abUWt sIX TEY FIVE,MILYUN, '       
                DC.B    'YIIRZ agOW,  TIPACAL lengtth was FAWR AND A HALF,' 
                DC.B    'mEYters, AWr, (SIX TEEN,fEYt,FAWR,INCHES).',0 
                CNOP    0,4  
BACKROUND       DC.B    'IN THIS PIKTCHER,  AWL YIIRZ ARE IN MILYUNZ, ' 
                DC.B    'The left column represents the entire history of  ' 
                DC.B    'life on earth, the right column represents the ayge ' 
                DC.B    'of the dinEH saWrs, (the mesozoic   AYGE), thIS aYge' 
                DC.B    'had three parts, the tri assic, jurassic, and ' 
                DC.B    '(the last) the cretayscius, SOME PAYLEONTOLOJISTS ' 
                DC.B    'SAY DINEH SAWS HAD WARM BLUD.',0 
                CNOP    0,4 
DINOSAURS_WERE  DC.B    'DinEH saWrs were REPTILLIAN LAND ANIMALS' 
                DC.B    'WITH A STRAYT LEGD WALK,OBZERVE THE BEHNT ' 
                DC.B    'nees, of the stik figure on the LEFT, IT SPRAWLS'
                DC.B    'on its belly like a lizzard, THE MIDDLE DRAWING' 
                DC.B    'represents a KROK ODILE running,ITS BELLY IS '
                DC.B    'off the ground but ITS legs are bent out. ',0  
PT2             DC.B    'the right column represents the strayt legd walk ' 
                DC.B    'OF the dinEH saurs, Ichthiosaurus, teH rAn o don '  
                DC.B    'and plesiosaurus, were Not land animals '
                DC.B    'hence could not waWk AND DI METROW DON'
                DC.B    'WAS LIKE a KROK ODILE running, '
                DC.B    '(SO THEY WERE NOT DINeh SAwRS).',0
                CNOP    0,4 
BRACHIOSAURUS   DC.B    'BraYKEYoWsaurus was a plant eater THAT, '
                DC.B    'LIVED IN laYte jurassic times, ' 
                DC.B    'abUWt wunhundred and fif tEY milyun, tOO'      
                DC.B    'abUWt wunhundred and thERr tEY sIX '       
                DC.B    'milyun YIIRZ agOW,  TIPACAL lengtth was twenty ' 
                DC.B    'FIVE mEYters, AWr AYtEY TOO fEYt wittha ' 
                DC.B    'TYPICAL HITE OV TWELV and  SIX TENTHS '
                DC.B    'mEYTers AWr fawr tee fEYT NINe IHnchEHZ. ',0 
BRACHPT2        DC.B    'BRAYKEYOWsawrus was one of the largest, if not  '  
                DC.B    'the largest land animalS that ever lived '
                DC.B    'witha wayt ov aytey tunz,  BRAYKEYOWSAWRUS WAS ' 
                DC.B    'A STRAYNJ DINEH SAW  FAWR TOO REASONS,  ' 
                DC.B    'the mUWstrels WERE at the top of the hed,  and the '
                DC.B    'FRONT LEGS WEHR LONGER THAN THE REAR LEGS.  ',0    
                CNOP    0,4 
BRONTOSAURUS    DC.B    'Brontosaurus WUZ a plant eater, '
                DC.B    'also nown as apatOW saurus,  livd in, ' 
                DC.B    'late jurassic times, ' 
                DC.B    'abUWt wunhundred and fif tEY milyun, tOO,'      
                DC.B    'abUWt wunhundred and thERr tEY sIX '       
                DC.B    'milyun YIIRZ agO,  TIPACAL lengtth was twenty ' 
                DC.B    'mEYters, AWr (SIXTY FIVE, fEYt) wittha ' 
                DC.B    'TYPICAL HITE ( at shOlders oV) fawr and a half  '
                DC.B    'mEYTers (AWr fawr teen  fEYT, three IHnchEHz). ',0   
                CNOP    0,4   
ICHTHIOSAURUS   DC.B    'IKthEo saurus WUZ a fish and meat eater, ' 
                DC.B    'that lived in  jurassic times, ' 
                DC.B    'abUWt wunhundred and ninE tE threemilyun, tOO,'      
                DC.B    'abUWt wunhundred and thERr tEY sIX '       
                DC.B    'milyun YIIRZ agOW,'
                DC.B    'AN IKtheo sawrUS EHz i sohket was as big' 
                DC.B  'aZ a pursohns head, IKTHEO SAWR US '
                DC.B    'wUz not a dinEH SAWR, but a see  reptile. ',0 
                CNOP    0,4 

MASSOSPONDYLUS  DC.B    'Massospondylus WAS a plant and possible insekt eater ' 
                DC.B    'that lived in layt trYassik time, ' 
                DC.B    'abUWt too hundred  and ten milyun, tOO,'      
                DC.B    'abUWt wun hundred and nine tE three ,MILYUN, '  
                DC.B    'YIIRZ agOW,  Massospondylus was one of the first ' 
                DC.B    'dineh sawrz,  TIPACAL lengtth was five,'      
                DC.B    'mEYters, AWr, (six teyn ,fEYt).',0
                CNOP    0,4  
PARASAUROLOPHUS DC.B    'ParAS sAWR owL lowfus WUZ a plant eater, ' 
                DC.B    'AND A KRESTED, DUK BIHLED, DINEH SAWR, ' 
                DC.B    'that lived in laytt kreytaycious time, ' 
                DC.B    'abUWt wunhundred milyun, tOO,'      
                DC.B    'abUWt sIX TEY FIVE,MILYUN, '       
                DC.B    'YIIRZ agOW,  TIPACAL lengtth was NINE,' 
                DC.B    'mEYters, AWr, (TWEN TEY NINE ,fEYt, FAWR INCHEZ),'
                DC.B    'wittha TIPACAL HITE OF  FAWR ,'
                DC.B    'mEYTers (AWr THIRT TEEN,fEYT,) '
                DC.B    'WITHA WAYT OV THREE TUNZ) ',0  
                CNOP    0,4 
PLESIOSAURUS    DC.B    'Plesiosaurus was a fish and meat eater ' 
                DC.B    'but not a dinEH saur, A SEE REPT ILE. '
                DC.B    'plesiosawrus lived in kreytaycious time, ' 
                DC.B    'abUWt wunhundred thirty six milyun, tOO,'      
                DC.B    'abUWt sIX TEY FIVE,MILYUN, '       
                DC.B    'YIIRZ agOW,'
                DC.B   'KOOD NESSEY THE LOHK NESS MONSTER BE PLESIOSAURUS ?' ,0 
                CNOP    0,4 
PTERANODON      DC.B    'teH ran o don, ate fish small animals and insects '
                DC.B    'but WUZ not a dinEH saur, TEH RAN O DON, ' 
                DC.B    'WUZ A TEROWSAW,  THAT lived in kreytaycious time, ' 
                DC.B    'abUWt wunhundred thirty six milyun, tOO,'      
                DC.B    'abUWt sIX TEY FIVE,MILYUN, '       
                DC.B    'YIIRZ agOW,'
                DC.B    'TIPACAL lengtth of wingz  was seh ven,' 
                DC.B    'mEYters, AWr, (Twun TEY three ,fEYt)',0  
                CNOP    0,4                                
STEGOSAURUS     DC.B    'Stegosaurus WUZ an armowrd plant eater ' 
                DC.B    'that livd in layt jurassic times, ' 
                DC.B    'abUWt wunhundred and fif tEY milyun, tOO,'      
                DC.B    'abUWt wunhundred and thERr tEY sIX '       
                DC.B    'milyun YIIRZ agOW,  TIPACAL lengtth was six ' 
                DC.B    'mEYters, AWr (twunty, fEYt). ',0 
                CNOP    0,4  
STYRACOSAURUS   DC.B    'Sty raK oWs awrus WUZ a plant eatING ' 
                DC.B    'diNEh sawr that lived in layt kreytaycious ' 
                DC.B    'TIME, abUWt seh ven tey  milyun, tOO,'      
                DC.B    'abUWt sIX TEY FIVE,MILYUN YIIRZ AGOW , '       
                DC.B    'TIPACAL lengtth was five ,' 
                DC.B    'mEYters, AWr abawt , (six teEn  ,fEYt),WERE'
                DC.B    'those frilled horns for, maYting RITTCHOOEHLZ? ',0 
                CNOP    0,4 
TRICERATOPS     DC.B    'TrY cerat Tops was a plant eater, a hawnd  '
                DC.B    'diNEH  sawr that lived in layt kreytaycious time, ' 
                DC.B    'abUWt seh ven tey  milyun, tOO,'      
                DC.B    'abUWt sIX TEY FIVE,MILYUN, '       
                DC.B    'YIIRZ agOW,  TIPACAL lengtth was seh ven,' 
                DC.B    'mEYters, AWr, (Twun TEY three ,fEYt),'
                DC.B    'the skuhl was too meyters, awr six feyt six  '
                DC.B    'in chez long,  trY cerat Tops wayd  '  
                DC.B    '(eIGht TUNZ). ',0 
                CNOP    0,4 
TYRANOSAURUS    DC.B    'Tyranosaurus Rex WAS a meat eater '
                DC.B    'that lived in layt kreytaycious time, ' 
                DC.B    'abUWt wunhundred milyun, tOO,'      
                DC.B    'abUWt sIX TEY FIVE,MILYUN, '       
                DC.B    'YIIRZ agOW,  TIPACAL lengtth was TWELVE,' 
                DC.B    'mEYters, AWr, (THER TEY NINE ,fEYt),'
                DC.B    'wittha TIPACAL HITE OF  FIVE ,' 
                DC.B    'mEYTers (AWr SIX TEEN,fEYT,THREE INCHES),'
                DC.B    '(WITHA WAYT OV SEH VEN TUNZ), ' 
                DC.B    'AT PRESENT, THE LARGEST MEET EATER DISCOVERED ,'
                DC.B    'YET, THAT LIVED ON LAND.',0  
                CNOP    0,4
DIMETRODON      DC.B    'Di METROw DOhN  WUS a MEAT  eater, ' 
                DC.B    'that lived in THE trYassik time, ABUWT ' 
                DC.B    'too hundred  and TWUN TEY FIVE milyun, tOO,'      
                DC.B    'abUWt wun hundred and nYne tE three ,MILYUN, '  
                DC.B    'YIIRZ agOW,  Di metroW doHn was not a ' 
                DC.B    'dineh sawr,  NOWt, DAA beHnT leHgZ, '
                DC.B    'SOME PAYLEONTOLOGISTS THINK THE SAYL ' 
                DC.B    'ON DI METROW DOHNZ BACK HELPT '  
                DC.B    'REHGULATE DI METROW DOHNZ BOHDY TEMPERATURE,'          
                DC.B    'TIPACAL lengtth was THREE AND AHALF  '      
                DC.B    'mEYters  AWr, (E LEHVEN ,fEYt).',0
                CNOP    0,4 
OUTTEXT         DS.B    600
*     OUTTEXT         DS.B    1000 also worked with 800 750
FILE_STORAGE    DS.B    50
        	CNOP	0,4
FILENAME        DS.B    50 
		CNOP	0,4
DIRECTORY       DS.B    50  
* pointers ******************************************************************
		CNOP	0,4
FLAG            DS.W    1       used for help while in picture
FILEPTR         DS.L    1       pointer to iff file 
TRANBASE        DS.L    1       ptr. to Translator lib's base 
GFXBASE 	DS.L	1	pointer to Graphics Base
IFFBASE 	DS.L	1	pointer to IFF Base
ARPBASE 	DS.L	1	pointer to ARP Base
IFFFILEHANDLE 	DS.L	1	filehandle of opened iff file
ARPHANDLE       DS.L	1	filehandle of opened iff file
COUNT   	DS.L	1	depth of image in iff file
VIEWMODES 	DS.W	1	the viewmode as returned from GetViewModes
ColorMap	DS.L	1	pointer to ColorMap structure
oldview         DS.L    1       
* structures ****************************************************************
* this structure located on page D-52 as STRUCTURE View,0
*****************************************************************************
View		DC.L	0	v_ViewPort
		DC.L	0	v_LOFCprList
		DC.L	0	v_SHFCprList
		DC.W	0	v_DyOffset
		DC.W	0	v_DxOffset
		DC.W	0	v_Modes
*****************************************************************************
* this structure located on page D-52 as STRUCTURE ViewPort,0
*****************************************************************************
ViewPort	DC.L	0	vp_Next
		DC.L	0	vp_ColorMap
		DC.L	0	vp_DspIns
		DC.L	0	vp_Sprins
		DC.L	0	vp_ClrIns
		DC.L	0	vp_UCopIns
		DC.W	0	vp_DWidth
		DC.W	0	vp_DHeight
		DC.W	0	vp_DxOffset
		DC.W	0	vp_DyOffset
		DC.W	0	vp_Modes
		DC.W	0	vp_reserved
		DC.L	0	vp_RasInfo
*****************************************************************************
*this structure located on Page D-52 as RasInfo,0
*****************************************************************************
RasInfo 	DC.L	0	ri_Next
		DC.L	0	ri_BitMap
		DC.W	0	ri_RxOffset
		DC.W	0	ri_RyOffset
*****************************************************************************
*this structure located on Page D-47 as BitMap,0
*****************************************************************************
BitMap		DC.W	0	bm_BytesPerRow
		DC.W	0	bm_Rows
		DC.B	0	bm_Flags
		DC.B	0	bm_Depth
		DC.W	0	bm_Pad
		DS.L	8	bm_Planes
*****************************************************************************
* this is the FileReq cheath arp rerquester

******************************* File Requester *******************************
********************** Submit the following to FileRequest() *****************
******************************************************************************

*                               	STRUCTURE FileRequester,0
FileRequest     DC.L    HAILING_TEXT        CPTR fr_Hail	 Hailing text
	        DC.L    FILE_STORAGE	CPTR fr_File *Filename array (FCHARS+1)
		DC.L    DIRECTORY       CPTR fr_Dir *Directory array (DSIZE+1)
FileReqwind	DC.L    0             CPTR fr_Window ; Window requesting or NULL		DC
		DC.B    0               UBYTE fr_reserved1 Set to NULL
		DC.L    0           APTR fr_Function Func to call for wildcards
		DC.L    0               LONG fr_reserved2 RESERVED
*	                          	LABEL	fr_SIZEOF

*****************************************************************
* The following are the equates for fr_FuncFlags. These bits tell
* FileRequest() what your fr_UserFunc is expecting, and what FileRequest()
* should call it for.
*
* You are called like so
* fr_Function(Mask, Object)
* ULONG	Mask
* CPTR	*Object
*
* The Mask is a copy of the flag value that caused FileRequest() to call
* your function. You can use this to determine what action you need to
* perform, and exactly what Object is, so you know what to do and
* what to return.
*
*	BITDEF	FR,DoWildFunc,7	; Call me with a FIB and a name, ZERO return accepts.
*	BITDEF	FR,DoMsgFunc,6	; You get all IDCMP message not for FileRequest()
*	BITDEF	FR,DoColor,5	; Set this bit for that new and differnt look
*	BITDEF	FR,NewIDCMP,4	; Force a new IDCMP (only if fr_Window != NULL)
*	BITDEF	FR,NewWindFunc,3 ; You get to modify the NewWindow struct.
*	BITDEF	FR,AddGadFunc,2	; You get to add gadgets
*	BITDEF	FR,GEventFunc,1	; Function to call if one of your gads is selected
*	BITDEF	FR,ListFunc,0	; not implemented.

* FCHARS	EQU	32			; Directory name sizes
* DSIZE	EQU	33

*this structure located on Page D-49 as RastPort,0
*****************************************************************************
RastPort	DC.L	0	rp_Layer
		DC.L	0	rp_BitMap
		DC.L	0	rp_AreaPtrn
		DC.L	0	rp_TmpRas
		DC.L	0	rp_AreaInfo
		DC.L	0	rp_GelsInfo
		DC.B	0	rp_Mask
		DC.B	0	rp_FgPen
		DC.B	0	rp_BgPen
		DC.B	0	rp_AOLPen
		DC.B	0	rp_DrawMode
		DC.B	0	rp_AreaPtSz
		DC.B	0	rp_Dummy
		DC.B	0	rp_linpatcnt
		DC.W	0	rp_Flags
		DC.W	0	rp_LinePtrn
		DC.W	0	rp_cp_x
		DC.W	0	rp_cp_y
		DS.B	8	rp_minterms
		DC.W	0	rp_PenWidth
		DC.W	0	rp_PenHeight
		DC.L	0	rp_Font
		DC.B	0	rp_AlgoStyle
		DC.B	0	rp_TxFlags
		DC.W	0	rp_TxHeight
		DC.W	0	rp_TxWidth
		DC.W	0	rp_TxBaseline
		DC.W	0	rp_TxSpacing
		DC.L	0	rp_RP_User
		DS.B	14	rp_wordreserved
		DS.B	8	rp_longreserved
		DS.B	8	rp_reserved
*****************************************************************************
colortable	DC.W	0	
        	DC.W	$F00
		DC.W	$0F0
		DC.W	$00F
*        	DS.W	27      grab enough for 32 colors total
        	DS.W	59      grab enough for 64 colors total
****************************************************************************
* structure returned by GetColorMap function call - for reference only
*****************************************************************************
*ColorMap	DC.B	0	cm_Flags
*		DC.B	0	cm_Type
*		DC.W	0	cm_Count
*		DC.L	0	cm_ColorTable
*****************************************************************************
* text *********************************************************************
GRAPHICS	DC.B	'graphics.library',0
INTUITNAME	DC.B	'intuition.library',0
TITLE		DC.B	'Dinosaur Hunt',0
TEXT11		DC.B	'Select a dinosaur.  Press F2 ',0
TEXT22          DC.B    'or left MOUSE button to',0  
TEXT33		DC.B	'return for more. Press HELP ',0
TEXT44          DC.B    'for `spoken'' info. ',0
TEXT55		DC.B	'To QUIT choose CANCEL ',0 
TEXT66		DC.B	'or the requester''s ',0 
TEXT77		DC.B	'CloseWindow gadget.',0
TEXT88		DC.B	'BY Richard Schneider',0
TEXT99		DC.B	'AKA  Captain60s',0
* pointers ****************************************************************
		CNOP	0,2		align this block
INTUBASE	DS.L	1
WINDOW		DS.L	1
F1FLG		DS.W	1
* main window structure ****************************************************
NEWINDOW	DC.W	0		left edge
		DC.W	0		top edge
		DC.W	640		width
		DC.W	200		height
		DC.B	3		detail pen 
		DC.B	0		block pen
*		DC.L	$608		MOUSEBUTTONS,CLOSEWINDOW,RAWKEY
		DC.L	$408		MOUSEBUTTONS,RAWKEY
*		DC.L	$2101F		NOCARE,ACTIVATE,SIZE,DEPTH,DRAG+ CLOSE
		DC.L	$21017		NOCARE,ACTIVATE,SIZE,DEPTH,DRAG
		DC.L	0		gadgets
		DC.L	0		checkmark
		DC.L	TITLE		title
		DC.L	0		screen
		DC.L	0		bitmap
		DC.W	50		minimum width
		DC.W	50		minimum height
		DC.W	640		maximum width
		DC.W	200		maximum height
		DC.W	1		Workbench Screen
*****************************************************************************
TEXT1		DC.B	3		front pen
		DC.B	0		back pen
		DC.B	1		JAM2
		DC.B	0		kludge
		DC.W	350		left edge
		DC.W	30		top edge
		DC.L	0		default font
		DC.L	TEXT11		text
		DC.L	TEXT2		next text
TEXT2		DC.B	3		front pen
		DC.B	0		back pen
		DC.B	1		JAM2
		DC.B	0		kludge
		DC.W	350		left edge
		DC.W	50		top edge
		DC.L	0		default font
		DC.L	TEXT22		text
		DC.L	TEXT3		next text
TEXT3		DC.B	3		front pen
		DC.B	0		back pen
		DC.B	1		JAM2
		DC.B	0		kludge
		DC.W	350		left edge
		DC.W	70		top edge
		DC.L	0		default font
		DC.L	TEXT33		text
		DC.L	TEXT4		next text
TEXT4		DC.B	3		front pen
		DC.B	0		back pen
		DC.B	1		JAM2
		DC.B	0		kludge
		DC.W	350		left edge
		DC.W	90		top edge
		DC.L	0		default font
		DC.L	TEXT44		text
		DC.L    TEXT5		next text
TEXT5		DC.B	3		front pen
		DC.B	0		back pen
		DC.B	1		JAM2
		DC.B	0		kludge
		DC.W	350		left edge
		DC.W	110		top edge
		DC.L	0		default font
		DC.L	TEXT55		text
		DC.L	TEXT6		next text
TEXT6		DC.B	3		front pen
		DC.B	0		back pen
		DC.B	1		JAM2
		DC.B	0		kludge
		DC.W	350		left edge
		DC.W	130		top edge
		DC.L	0		default font
		DC.L	TEXT66		text
		DC.L	TEXT7		next text
TEXT7		DC.B	3		front pen
		DC.B	0		back pen
		DC.B	1		JAM2
		DC.B	0		kludge
		DC.W	350		left edge
		DC.W	150		top edge
		DC.L	0		default font
		DC.L	TEXT77		text
		DC.L	TEXT8		next text
*                    pat self on back 
TEXT8		DC.B	3		front pen
		DC.B	0		back pen
		DC.B	1		JAM2
		DC.B	0		kludge
		DC.W	113		left edge
		DC.W	90		top edge
		DC.L	0		default font
		DC.L	TEXT88		text
		DC.L    TEXT9		next text
TEXT9		DC.B	3		front pen
		DC.B	0		back pen
		DC.B	1		JAM2
		DC.B	0		kludge
		DC.W	113		left edge
		DC.W	100		top edge
		DC.L	0		default font
		DC.L	TEXT99		text
		DC.L	0		next text
        	END

