	.module denise.c
	.dbfile denise.c
	.area text
;  IX -> 0,x
_SCI_isr::
	.dbfile C:\ICCTK\include/isrtk.h
	.dbfunc SCI_isr
	.dbline 40
; /************************************************************************
;  * Title        smokeden.c                                	                
;  * Programmer	Sean Justice	        				
;  * Date         July 17,1999      	                                
;  * Version	1			                		
;  *								        
;  * Description
;  * Start by hit the rear bumper and then Denise will not do 
;  * anything until she has detected smoke.
;  *	
;  *	Functions:
;  *		detectsmoke() used to detect if the smoke detector 
;  * 		has detected any smoke
;  *								
;  * Use Hyperterm with the following settings:                           
;  *   									
;  *      COM1, 9600 Baud, 8 bits, No Parity, 1 Stop bit, No Flow         
;  *      of Control, VT100 Terminal, WrapLines.				
;  *									
;  *Usage: Verify functionality of TALRIK's sensors.
;  ************************************************************************/
;  
; /**************************** Includes **********************************/
; 
; #include <tkbase.h>
; 
; 
; /************************ End of includes *******************************/
; 
; 
; /*************************** Constants **********************************/
; 
; /*IR emitter output port driver, the output latch at address 0xffb9 */
; #define IRE_OUT   *(unsigned char *)(0xffb9) 
; 
; /*Constant for driving all the 40KHz modulated IR emitters on when loaded into IRE_OUT */
; #define IRE_ALL_ON 0xff 
; 
; /*Constant for turning all the 40KHz modulated IR emitters off when loaded into IRE_OUT */
; #define IRE_ALL_OFF 0x00
L2:
	rti
;  IX -> 0,x
_SPI_isr::
	.dbfunc SPI_isr
	.dbline 46
; 
; #define BUMPER_FUZZY 10
; #define NOSMOKE 40
; #define IRTHRESHOLD 110
; #define FIRE 45
; #define FIRE2 40
L3:
	rti
;  IX -> 0,x
_PAIE_isr::
	.dbfunc PAIE_isr
	.dbline 52
; #define HEAT 45
;  
; /************************ End of Constants ******************************/
; int rspeed = 0;
; int lspeed = 0;
; unsigned int temp_one = 0;
L4:
	rti
;  IX -> 0,x
_PAV_isr::
	.dbfunc PAV_isr
	.dbline 58
; unsigned int temp_two = 0;
; unsigned int left = 0;
; unsigned int right = 0;
; /******************functions***********************************/
; 
; void detectsmoke(void);
L5:
	rti
;  IX -> 0,x
_TOF_isr::
	.dbfunc TOF_isr
	.dbline 64
; void avoidobject(void);
; void righturn(void);
; void lefturn(void);
; void checkbumper(void);
; void firecheck(void);
; void intitemp(void);
L6:
	rti
;  IX -> 0,x
_TOC4_isr::
	.dbfunc TOC4_isr
	.dbline 76
; void lookright(void);
; void lookleft(void);
; void heatcheck(void);
; void motorforward(void);
; void heatsource(void);
; void heatforward(void);
; void firesignal(void);
; 
; 
; 
; void main(void)
; /****************************** Main ***********************************/
L7:
	rti
;  IX -> 0,x
_TOC1_isr::
	.dbfunc TOC1_isr
	.dbline 94
; {
;   init_analog();
;   init_motortk();
;   init_clocktk();
;   init_serial();
; 
;   IRE_OUT = IRE_ALL_ON;    /* Turns on all the 40KHz modulated IR emitters */
;   
;   wait(300);
;   
;   while (rear_bumper() < BUMPER_FUZZY); /*To start press the rear bumper*/
;   
;   read_IR();
;   wait(35);
;   
;   detectsmoke(); /*don't do anything unitl smoke is detected*/
;   intitemp();	/*See what the temperature in the room is*/
;   
L8:
	rti
;  IX -> 0,x
_TIC3_isr::
	.dbfunc TIC3_isr
	.dbline 100
;   
;   
;   while (1)
;   {
;   	checkbumper();	/*See if bumper has been hit*/
;   	      
L9:
	rti
;  IX -> 0,x
_TIC2_isr::
	.dbfunc TIC2_isr
	.dbline 106
;   	firecheck();	/*checks if there is a flame*/
;   	
;   	lookright();	/*look to the right*/
;   	lookleft();		/*look to the left*/
;   	motorforward();
;   	heatcheck();	/*check for heat increase*/
L10:
	rti
;  IX -> 0,x
_TIC1_isr::
	.dbfunc TIC1_isr
	.dbline 112
;   }
; }
; /************************fucntions*************************************************/
; 
; /* function to detect the smoke, this function will alert Denise to the problem*/
; void detectsmoke(void)
L11:
	rti
;  IX -> 0,x
_RTI_isr::
	.dbfunc RTI_isr
	.dbline 118
; {
; 	read_IR();
; 	wait(35);
; 	
; 	while (IRDT[IR5clk] < NOSMOKE)
; 		{
L12:
	rti
;  IX -> 0,x
_IRQ_isr::
	.dbfunc IRQ_isr
	.dbline 124
; 			read_IR();
; 			
; 			wait(35);
; 		}
; 	
; }
L13:
	rti
;  IX -> 0,x
_XIRQ_isr::
	.dbfunc XIRQ_isr
	.dbline 130
; /* function initize the heat sensors for the temp of the room */
; 
; void intitemp(void)
; {
; 	
; 	read_IR();
L14:
	rti
;  IX -> 0,x
_SWI_isr::
	.dbfunc SWI_isr
	.dbline 136
; 	wait(35);
; 	
; 	temp_one = IRDT[2];
; 	temp_two = IRDT[3];
; 	
; }
L15:
	rti
;  IX -> 0,x
_ILLOP_isr::
	.dbfunc ILLOP_isr
	.dbline 142
; /* this program checks the bumper front and rear to see if anything has hit it*/
; 
; void checkbumper(void)
; {
; 	if (rear_bumper() > BUMPER_FUZZY)
; 		{
L16:
	rti
;  IX -> 0,x
_COP_isr::
	.dbfunc COP_isr
	.dbline 148
; 			
; 			rspeed = lspeed = 50;
; 			motortk(RIGHT_MOTOR, rspeed);
; 			motortk(LEFT_MOTOR, lspeed);
; 			wait(1000);
; 			rspeed = 100;
L17:
	rti
;  IX -> 0,x
_CLMON_isr::
	.dbfunc CLMON_isr
	.dbline 154
; 			lspeed = -100;
; 			motortk(RIGHT_MOTOR, rspeed);
; 			motortk(LEFT_MOTOR, lspeed);
; 			wait(1000);
; 		}
; 	else if (front_bumper() > BUMPER_FUZZY)
L18:
	rti
	.area data
_drew::
	.blkw 1
	.area idata
	.word _interrupt_vectors
	.area data
_rspeed::
	.blkb 2
	.area idata
	.word 0
	.area data
_lspeed::
	.blkb 2
	.area idata
	.word 0
	.area data
_temp_one::
	.blkb 2
	.area idata
	.word 0
	.area data
_temp_two::
	.blkb 2
	.area idata
	.word 0
	.area data
_left::
	.blkb 2
	.area idata
	.word 0
	.area data
_right::
	.blkb 2
	.area idata
	.word 0
	.area text
;  IX -> 0,x
_main::
	.dbfile denise.c
	.dbfunc main
	.dbline 78
	jsr _init_analog
	.dbline 79
	jsr _init_motortk
	.dbline 80
	jsr _init_clocktk
	.dbline 81
	jsr _init_serial
	.dbline 83
	ldab #255
	stab 0xffb9
	.dbline 85
	ldd #300
	jsr _wait
L20:
	.dbline 87
L21:
	jsr _rear_bumper
	cpd #10
	blo L20
	.dbline 89
	jsr _read_IR
	.dbline 90
	ldd #35
	jsr _wait
	.dbline 92
	jsr _detectsmoke
	.dbline 93
	jsr _intitemp
	bra L24
L23:
	.dbline 99
	jsr _checkbumper
	.dbline 101
	jsr _firecheck
	.dbline 103
	jsr _lookright
	.dbline 104
	jsr _lookleft
	.dbline 105
	jsr _motorforward
	.dbline 106
	jsr _heatcheck
	.dbline 107
L24:
	.dbline 97
	bra L23
L19:
	rts
;  IX -> 0,x
_detectsmoke::
	.dbfunc detectsmoke
	.dbline 114
	jsr _read_IR
	.dbline 115
	ldd #35
	jsr _wait
	bra L28
L27:
	.dbline 119
	jsr _read_IR
	.dbline 121
	ldd #35
	jsr _wait
	.dbline 122
L28:
	.dbline 117
	ldd _IRDT+16
	cpd #40
	blo L27
	.dbline 124
L26:
	rts
;  IX -> 0,x
_intitemp::
	.dbfunc intitemp
	.dbline 130
	jsr _read_IR
	.dbline 131
	ldd #35
	jsr _wait
	.dbline 133
	ldd _IRDT+4
	std _temp_one
	.dbline 134
	ldd _IRDT+6
	std _temp_two
	.dbline 136
L31:
	rts
;  IX -> 0,x
_checkbumper::
	.dbfunc checkbumper
	.dbline 141
	jsr _rear_bumper
	cpd #10
	bls L35
	.dbline 144
	ldd #50
	std _lspeed
	ldd #50
	std _rspeed
	.dbline 145
	ldd _rspeed
	pshb
	psha
	ldd #1
	jsr _motortk
	puly
	.dbline 146
	ldd _lspeed
	pshb
	psha
	ldd #0
	jsr _motortk
	puly
	.dbline 147
	ldd #1000
	jsr _wait
	.dbline 148
	ldd #100
	std _rspeed
	.dbline 149
	ldd #-100
	std _lspeed
	.dbline 150
	ldd _rspeed
	pshb
	psha
	ldd #1
	jsr _motortk
	puly
	.dbline 151
	ldd _lspeed
	pshb
	psha
	ldd #0
	jsr _motortk
	puly
	.dbline 152
	ldd #1000
	jsr _wait
	.dbline 153
	bra L36
L35:
	.dbline 154
	jsr _front_bumper
	cpd #10
	bls L37
	.dbline 157
; 		{
; 			
; 			rspeed = lspeed = -50;
	ldd #-50
	std _lspeed
	ldd #-50
	std _rspeed
	.dbline 158
; 			motortk(RIGHT_MOTOR, rspeed);
	ldd _rspeed
	pshb
	psha
	ldd #1
	jsr _motortk
	puly
	.dbline 159
; 			motortk(LEFT_MOTOR, lspeed);
	ldd _lspeed
	pshb
	psha
	ldd #0
	jsr _motortk
	puly
	.dbline 160
; 			wait(1000);
	ldd #1000
	jsr _wait
	.dbline 161
; 			rspeed = -100;
	ldd #-100
	std _rspeed
	.dbline 162
; 			lspeed = 100;
	ldd #100
	std _lspeed
	.dbline 163
; 			motortk(RIGHT_MOTOR, rspeed);
	ldd _rspeed
	pshb
	psha
	ldd #1
	jsr _motortk
	puly
	.dbline 164
; 			motortk(LEFT_MOTOR, lspeed);
	ldd _lspeed
	pshb
	psha
	ldd #0
	jsr _motortk
	puly
	.dbline 165
; 			wait(1000);
	ldd #1000
	jsr _wait
	.dbline 167
; 			
; 		}
L37:
L36:
	.dbline 168
; }
L34:
	rts
;  IX -> 0,x
_firecheck::
	.dbfunc firecheck
	.dbline 174
; /* this funciton checks to see if there is a fire in front of the robot*/
; 
; 
; void firecheck(void)
; {
; 	read_IR();
	jsr _read_IR
	.dbline 175
; 	wait(35);
	ldd #35
	jsr _wait
	.dbline 177
; 	
; 	if ((IRDT[IR6clk] > FIRE) || (IRDT[IR7clk] > FIRE2))
	ldd _IRDT+10
	cpd #45
	bhi L44
	ldd _IRDT+18
	cpd #40
	bls L40
L44:
	.dbline 180
; 	{
; 		
; 		rspeed = -100;
	ldd #-100
	std _rspeed
	.dbline 181
; 		lspeed = 100;
	ldd #100
	std _lspeed
	.dbline 182
; 		motortk(RIGHT_MOTOR, rspeed);
	ldd _rspeed
	pshb
	psha
	ldd #1
	jsr _motortk
	puly
	.dbline 183
; 		motortk(LEFT_MOTOR, lspeed);
	ldd _lspeed
	pshb
	psha
	ldd #0
	jsr _motortk
	puly
L45:
	.dbline 184
; 		while (1);
L46:
	bra L45
L40:
	.dbline 189
; 		/*firesignal();*/
; 		 
; 		 
; 	}
; }
L39:
	rts
;  IX -> 0,x
_lookright::
	.dbfunc lookright
	.dbline 193
; /*this functions looks to the right to see if there is an object*/
; void lookright(void)
; {
;   	read_IR();
	jsr _read_IR
	.dbline 194
;   	wait(35);
	ldd #35
	jsr _wait
	.dbline 196
;   	
;  	if ((IRDT[IR4clk] > IRTHRESHOLD) || (IRDT[IR3clk] > IRTHRESHOLD))
	ldd _IRDT+14
	cpd #110
	bhi L53
	ldd _IRDT+12
	cpd #110
	bls L49
L53:
	.dbline 199
; 	 
; 	 		{
; 	 			left = 1;
	ldd #1
	std _left
	.dbline 200
; 	 			lefturn();
	jsr _lefturn
	.dbline 202
; 	 				
; 	 		} 	
L49:
	.dbline 203
; }
L48:
	rts
;  IX -> 0,x
_lookleft::
	.dbfunc lookleft
	.dbline 207
; void lookleft(void)
; {
; 
; 	read_IR();
	jsr _read_IR
	.dbline 208
; 	wait(35);
	ldd #35
	jsr _wait
	.dbline 211
; 	
; 	
; 	 if ((IRDT[IR1clk] > IRTHRESHOLD) || (IRDT[IR2clk] > IRTHRESHOLD))
	ldd _IRDT+8
	cpd #110
	bhi L58
	ldd _IRDT
	cpd #110
	bls L55
L58:
	.dbline 213
; 	 		{
; 	 			right = 1;
	ldd #1
	std _right
	.dbline 214
; 	 			righturn();	 			
	jsr _righturn
	.dbline 215
; 	 		} 
L55:
	.dbline 217
; 	 		
; }
L54:
	rts
;  IX -> 0,x
_righturn::
	.dbfunc righturn
	.dbline 220
; void righturn(void)
; {
; 	if (right == 1)
	ldd _right
	cpd #1
	bne L60
	.dbline 222
; 	{
; 		rspeed = -100;
	ldd #-100
	std _rspeed
	.dbline 223
; 		lspeed = 100;
	ldd #100
	std _lspeed
	.dbline 224
; 		motortk(RIGHT_MOTOR, rspeed);
	ldd _rspeed
	pshb
	psha
	ldd #1
	jsr _motortk
	puly
	.dbline 225
; 		motortk(LEFT_MOTOR, lspeed);
	ldd _lspeed
	pshb
	psha
	ldd #0
	jsr _motortk
	puly
	bra L63
L62:
	.dbline 228
	jsr _read_IR
	.dbline 229
	ldd #35
	jsr _wait
	.dbline 231
	jsr _firecheck
	.dbline 233
L63:
	.dbline 226
; 		while ((IRDT[IR1clk] > IRTHRESHOLD) || (IRDT[IR2clk] > IRTHRESHOLD))
	ldd _IRDT+8
	cpd #110
	bhi L62
	ldd _IRDT
	cpd #110
	bhi L62
	.dbline 234
; 		{
; 			read_IR();
; 			wait(35);
; 			
; 			firecheck();
; 			
; 		}
; 	wait(150);	
	ldd #150
	jsr _wait
	.dbline 236
; 	 
; 	}
L60:
	.dbline 237
; }
L59:
	rts
;  IX -> 0,x
_lefturn::
	.dbfunc lefturn
	.dbline 240
; void lefturn(void)
; {
; 	if (left == 1)
	ldd _left
	cpd #1
	bne L67
	.dbline 242
; 	{
; 		rspeed = 100;
	ldd #100
	std _rspeed
	.dbline 243
; 		lspeed = -100;
	ldd #-100
	std _lspeed
	.dbline 244
; 		motortk(RIGHT_MOTOR, rspeed);
	ldd _rspeed
	pshb
	psha
	ldd #1
	jsr _motortk
	puly
	.dbline 245
; 		motortk(LEFT_MOTOR, lspeed);
	ldd _lspeed
	pshb
	psha
	ldd #0
	jsr _motortk
	puly
	bra L70
L69:
	.dbline 248
	jsr _read_IR
	.dbline 249
	ldd #35
	jsr _wait
	.dbline 250
	jsr _firecheck
	.dbline 253
L70:
	.dbline 246
; 		while ((IRDT[IR3clk] > IRTHRESHOLD) || (IRDT[IR4clk] > IRTHRESHOLD))
	ldd _IRDT+12
	cpd #110
	bhi L69
	ldd _IRDT+14
	cpd #110
	bhi L69
	.dbline 254
; 		{
; 			read_IR();
; 			wait(35);
; 			firecheck();
; 			
; 		
; 		}
; 	wait(150);	
	ldd #150
	jsr _wait
	.dbline 255
; 	}
L67:
	.dbline 256
; } 
L66:
	rts
;  IX -> 0,x
_motorforward::
	.dbfunc motorforward
	.dbline 259
; void motorforward(void)
; {
; 	rspeed = 100;
	ldd #100
	std _rspeed
	.dbline 260
; 	lspeed = 50;
	ldd #50
	std _lspeed
	.dbline 261
; 	motortk(RIGHT_MOTOR, rspeed);
	ldd _rspeed
	pshb
	psha
	ldd #1
	jsr _motortk
	puly
	.dbline 262
; 	motortk(LEFT_MOTOR, lspeed);
	ldd _lspeed
	pshb
	psha
	ldd #0
	jsr _motortk
	puly
	.dbline 263
; }
L74:
	rts
;  IX -> 0,x
_heatcheck::
	.dbfunc heatcheck
	.dbline 266
; void heatcheck(void)
; {
; 	read_IR();
	jsr _read_IR
	.dbline 267
; 	wait(35);
	ldd #35
	jsr _wait
	bra L77
L76:
	.dbline 271
	jsr _read_IR
	.dbline 272
	ldd #35
	jsr _wait
	.dbline 273
	jsr _lookright
	.dbline 274
	jsr _lookleft
	.dbline 275
	ldd #-60
	std _rspeed
	.dbline 276
	ldd #30
	std _lspeed
	.dbline 277
	ldd _rspeed
	pshb
	psha
	ldd #1
	jsr _motortk
	puly
	.dbline 278
	ldd _lspeed
	pshb
	psha
	ldd #0
	jsr _motortk
	puly
	.dbline 280
	jsr _heatsource
	.dbline 282
L77:
	.dbline 269
; 	
; 	while ((IRDT[2] > HEAT) || (IRDT[3] > HEAT))
	ldd _IRDT+4
	cpd #45
	bhi L76
	ldd _IRDT+6
	cpd #45
	bhi L76
	.dbline 283
; 	{
; 		read_IR();
; 		wait(35);
; 		lookright();
; 		lookleft();
; 		rspeed = -60;
; 		lspeed = 30;
; 		motortk(RIGHT_MOTOR, rspeed);
; 		motortk(LEFT_MOTOR, lspeed);
; 					
; 		heatsource();
; 		
; 	}
; }
L75:
	rts
;  IX -> 0,x
;  rMEM -> 2,x
;         search -> 4,x
_heatsource::
	jsr __enterb
	.byte 0x6
	.dbfunc heatsource
	.dbline 286
; void heatsource(void)
; {
; 	int search = 0;
	ldd #0
	std 4,x
	.dbline 288
; 	
; 	read_IR();
	jsr _read_IR
	.dbline 289
; 	wait(35);
	ldd #35
	jsr _wait
	.dbline 291
; 	
; 	temp_one = IRDT[2];
	ldd _IRDT+4
	std _temp_one
	.dbline 292
; 	temp_two = IRDT[3];
	ldd _IRDT+6
	std _temp_two
	.dbline 294
; 		
; 	rspeed = 60;
	ldd #60
	std _rspeed
	.dbline 295
; 	lspeed = 30;  
	ldd #30
	std _lspeed
	.dbline 296
; 	motortk(RIGHT_MOTOR, rspeed);
	ldd _rspeed
	pshb
	psha
	ldd #1
	jsr _motortk
	puly
	.dbline 297
; 	motortk(LEFT_MOTOR, lspeed);
	ldd _lspeed
	pshb
	psha
	ldd #0
	jsr _motortk
	puly
	jmp L85
L84:
	.dbline 301
; 	
; 	while (search == 0)
; 	{
; 		read_IR();
	jsr _read_IR
	.dbline 302
; 		wait(35);
	ldd #35
	jsr _wait
	.dbline 305
; 		
; 		
; 		if ((IRDT[2] > (temp_one - 2)) || (IRDT[3] > (temp_two - 2)))
	ldd _temp_one
	subd #2
	std 2,x
	ldd _IRDT+4
	cpd 2,x
	bhi L91
	ldd _temp_two
	subd #2
	std 2,x
	ldd _IRDT+6
	cpd 2,x
	bls L87
L91:
	.dbline 307
; 		{
; 			temp_one = IRDT[2];
	ldd _IRDT+4
	std _temp_one
	.dbline 308
; 			temp_two = IRDT[3];
	ldd _IRDT+6
	std _temp_two
	.dbline 309
; 			firecheck();
	jsr _firecheck
	.dbline 310
; 		}
L87:
	.dbline 311
; 		if ((IRDT[2] < (temp_one + 2)) || (IRDT[3] < (temp_two + 2)))
	ldd _temp_one
	addd #2
	std 2,x
	ldd _IRDT+4
	cpd 2,x
	blo L98
	ldd _temp_two
	addd #2
	std 2,x
	ldd _IRDT+6
	cpd 2,x
	bhs L94
L98:
	.dbline 313
; 		{
; 			search = 1;
	ldd #1
	std 4,x
	.dbline 314
; 			temp_one = IRDT[2];
	ldd _IRDT+4
	std _temp_one
	.dbline 315
; 			temp_two = IRDT[3];
	ldd _IRDT+6
	std _temp_two
	.dbline 316
; 			rspeed = lspeed = 0;
	ldd #0
	std _lspeed
	ldd #0
	std _rspeed
	.dbline 317
; 			motortk(RIGHT_MOTOR, rspeed);
	ldd _rspeed
	pshb
	psha
	ldd #1
	jsr _motortk
	puly
	.dbline 318
; 			motortk(LEFT_MOTOR, lspeed);
	ldd _lspeed
	pshb
	psha
	ldd #0
	jsr _motortk
	puly
	.dbline 319
; 			firecheck();
	jsr _firecheck
	.dbline 320
; 		}
L94:
	.dbline 321
L85:
	.dbline 299
	ldd 4,x
	bne X0
	jmp L84
X0:
	.dbline 337
; 	}
; 	
; 	/*while (search == 1)
; 	{
; 		read_IR();
; 		wait(35);
; 		
; 		rspeed = 40;
; 		lspeed = -40;
; 		motortk(RIGHT_MOTOR, rspeed);
; 		motortk(LEFT_MOTOR, lspeed);
; 		while ((IRDT[2] < (temp_one + 2)) || (IRDT[3] < (temp_two + 2)));
; 		search = 2;
; 		firecheck();
; 	}
; 	heatforward();*/
; }   
L81:
	xgdx
	addd #6
	xgdx
	txs
	pulx
	rts
;  IX -> 0,x
_heatforward::
	.dbfunc heatforward
	.dbline 340
; void heatforward(void)
; { 
; 	rspeed = lspeed = 50;
	ldd #50
	std _lspeed
	ldd #50
	std _rspeed
	.dbline 341
; 	motortk(RIGHT_MOTOR, rspeed);
	ldd _rspeed
	pshb
	psha
	ldd #1
	jsr _motortk
	puly
	.dbline 342
; 	motortk(LEFT_MOTOR, lspeed);
	ldd _lspeed
	pshb
	psha
	ldd #0
	jsr _motortk
	puly
	bra L103
L102:
	.dbline 345
	jsr _firecheck
	.dbline 346
	jsr _lookright
	.dbline 347
	jsr _lookleft
	.dbline 348
L103:
	.dbline 343
; 	while ((IRDT[2] > HEAT) || (IRDT[3] > HEAT))
	ldd _IRDT+4
	cpd #45
	bhi L102
	ldd _IRDT+6
	cpd #45
	bhi L102
	.dbline 349
; 	{
; 		firecheck();
; 		lookright();
; 		lookleft();
; 	}
; 	heatsource();
	jsr _heatsource
	.dbline 350
; }
L101:
	rts
;  IX -> 0,x
_firesignal::
	.dbfunc firesignal
	.dbline 353
; void firesignal(void)
; {
; 	rspeed = -100;
	ldd #-100
	std _rspeed
	.dbline 354
; 	lspeed = 100;
	ldd #100
	std _lspeed
	.dbline 355
; 	motortk(RIGHT_MOTOR, rspeed);
	ldd _rspeed
	pshb
	psha
	ldd #1
	jsr _motortk
	puly
	.dbline 356
; 	motortk(LEFT_MOTOR, lspeed);
	ldd _lspeed
	pshb
	psha
	ldd #0
	jsr _motortk
	puly
	.dbline 357
; 	wait(1500);
	ldd #1500
	jsr _wait
	.dbline 358
; 	rspeed = 100;
	ldd #100
	std _rspeed
	.dbline 359
; 	lspeed = -100;
	ldd #-100
	std _lspeed
	.dbline 360
; 	motortk(RIGHT_MOTOR, rspeed);
	ldd _rspeed
	pshb
	psha
	ldd #1
	jsr _motortk
	puly
	.dbline 361
; 	motortk(LEFT_MOTOR, lspeed);
	ldd _lspeed
	pshb
	psha
	ldd #0
	jsr _motortk
	puly
	.dbline 362
; 	wait(1500);
	ldd #1500
	jsr _wait
L108:
	.dbline 363
; 	while(1);
L109:
	bra L108
L107:
	rts
