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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

--------------------------------------------------------------------,~<br />

threi:<br />

send15:<br />

sendnext:<br />

finlsh:<br />

abort:<br />

setsnd16:<br />

reload:<br />

addr sbuf(sb),rO<br />

movw xmltoff,rl<br />

cmpd $0,blk16cnt<br />

beq send15<br />

movd $OxlO,r7<br />

jump sendnext<br />

movd $OxOf,r7<br />

movb O(rO)[rl:b],txd<br />

addqw l,rl<br />

cmpw rl,$256<br />

beq reload<br />

save [r7]<br />

movb msreg,r7<br />

andb $Oxl0,r7<br />

cmpb $O,r7<br />

restore [r7]<br />

beq abort<br />

subb $1,r7<br />

cmpb $0,r7<br />

bne sendnext<br />

movw rl,xmitoff<br />

cmpd $O,blk16cnt<br />

beq setsnd16<br />

subb $1,blk16cnt<br />

jump popal!<br />

movd $16,blk16cnt<br />

jump popal!<br />

movd $O,rl<br />

jump finish<br />

#************************ LINE STATOS<br />

Isint:<br />

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

movd $4,rO<br />

addr message6,rl<br />

movd $25,r2<br />

movd $O,r3<br />

svc<br />

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

movb Isr,r3<br />

jump rdai<br />

#****.******************* MODEM STATUS<br />

ms1nt:<br />

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

movd $4,rO<br />

adde message7,rl<br />

movd $26,r2<br />

movd $O,r3<br />

svc<br />

movb OxOd00018,rO<br />

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

jump popal!<br />

#***************************** COMPARE<br />

#RO contalns base pointer<br />

Isetup xmlt ptr offset<br />

ICheck to see lf it is the 16th block<br />

#Yes, send only 15 bytes instead ot 16<br />

#No, send 16 bytes<br />

.Jump around 15 byte load<br />

#Load counter tor 15 byte load<br />

ILoad a byte into the transmitter<br />

I<br />

IAre we one address past end of table<br />

#Yes, reload ptr<br />

tRead modem status reg<br />

IMask all bits except CTS (MSR4)<br />

ICheck for disabled CTS<br />

iLeave on inactive CTS (MSR4=0)<br />

INo, decrement counter and continue<br />

#Is byte counter O?<br />

INo, send next byte<br />

Isave xmit ptr offset 1n ram<br />

.Check to see if it is 16th block<br />

IYes, reload block counter<br />

IOecrement block counter<br />

IF1nished sending 16 bytes<br />

IRe load block counter<br />

.F1nished send1ng 15 bytes<br />

#Reset offset<br />

.Go back and finish<br />

INTERRUPT • ROUTINE ************************<br />

#<br />

I<br />

I<br />

I<br />

#<br />

I<br />

I<br />

#<br />

.Read Isr<br />

#<br />

I<br />

INTERRUPT ROUTINE ***********************<br />

•#<br />

#<br />

#<br />

#<br />

I<br />

I<br />

#<br />

#<br />

I<br />

DATA ROUTINE ****************************<br />

#The rece1ver subrout1ne branches to this • subroutine after it has removed all of<br />

Ithe data from the Rx FIFO. The receive offset (rbufoff) 1s changed to point to<br />

#the last byte received in rbuf. The compare offset (compoff) pOlnts to each<br />

#byte in the recelve buffer and its associated byte ln the compare register.<br />

#Compoff 1s incremented after each successful comparison and the comparisons<br />

TL/C/9313-24<br />

Z<br />

~ ....<br />

4-83

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

Saved successfully!

Ooh no, something went wrong!