17.05.2015 Views

~ National ~ Semiconductor - Al Kossow's Bitsavers

~ National ~ Semiconductor - Al Kossow's Bitsavers

~ National ~ Semiconductor - Al Kossow's Bitsavers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

holdloop: nop<br />

#<br />

br hold loop<br />

#<br />

#<br />

#****************************** INTERRUPT HANDLER ******************************<br />

isr:<br />

#<br />

~ave [rO,rl,r2,r3,r4,r5,r6,r7]<br />

movb lir,rO<br />

#RO- contains llr<br />

cmpb rO,$OxOc6 #<br />

beq ISlnt<br />

#Llne status lnterrupt<br />

cmpb rO,$OxOc4 #<br />

beq rdal<br />

#Recelver interrupt<br />

cmpb rO,$OxOcc #<br />

beq rtmout<br />

cmpb rO,$OxOc2<br />

#Rec timeout interrupt<br />

#<br />

beq threi<br />

#THRE interrupt<br />

cmpb rO,$OxOcO #<br />

beq mSlnt<br />

#Modem status interrupt<br />

#<br />

#<br />

#************************** INVALID INTERRUPT ROUTINE **************************<br />

save [rO,rl,r2,r3]<br />

movd $4,rO<br />

addr message2,rl<br />

movd $21,r2<br />

movd $O,r3<br />

svc<br />

restore [rO,rl,r2,r3]<br />

#<br />

•<br />

#<br />

#<br />

#<br />

#<br />

#<br />

•#<br />

#<br />

jump stop<br />

#Restore all registers<br />

#<br />

#<br />

#********************* RECEIVER TIMEOUT INTERRUPT ROUTINE ************.*********<br />

#<br />

rtmout:<br />

jump rdal<br />

#<br />

#*************************** RECEIVER INTERRUPT ROUTINE ************************<br />

#<br />

#Th1s portion of the program is reached by a positive test for the received data<br />

#available interrupt. Once in this routine each byte 1s removed from the FIFO,<br />

#placed 1n a des1gnated statlc base memory location and the LSR is tested to see<br />

#If tne data ready (DR) blt 18 etill set. Data is removed from the FIFO and<br />

.placed in memory untll the DR bit is no longer set. Tne data sent will be<br />

#compared to known data, located in another deslgnated static base location, by<br />

#calling the compare subroutine.<br />

rdai:<br />

rdrbr:<br />

continue:<br />

movb $O,mcr<br />

addr rbuf(sb),r4<br />

movd rbufoff,r6<br />

movb rxd,O(r4)[r6:b]<br />

cmpb $OxOO,O(r4)[r6:b]<br />

addqw l,r6<br />

addqw l, rbufoff<br />

bne continue<br />

movw SO,r6<br />

movw $O,rbufoff<br />

movb lsr,r3<br />

andb $Ol,r3<br />

cmpb SOl,r3<br />

#Disable RTS; stop transmission<br />

#r4 contains rbuf base address<br />

#Put rbuf offset runner into r6<br />

#Store a byte in the receiver buffer<br />

#Is 1t the last character<br />

#Increment offset ptr.<br />

#Track r6<br />

#<br />

#Reset pointer offset<br />

#Reset rbufoff<br />

#Read lsr<br />

#Mask all but bit 0<br />

•<br />

TL/C/9313-16<br />

l><br />

Z<br />

J,.<br />

co<br />

....<br />

4-75

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!