
Application Note
Technical Considerations When Implementing LocalTalk Link Access Protocol
14-10
LISTING 2
600 ;*************************************************
601 ;Subroutine to transmit the llapenq packet
602 ;*************************************************
00000244 603 txenq:
604
00000244 f5 605 push af ;save status and a reg
00000245 c5 606 push bc ;save
00000246 e5 607 push hl ;save
608 ;
00000247 f3 609 di ;make sure that
610 ;no interrupt routine
611 ;nor should interrupt
612 ;occur during
613 ;this subroutine.
00000248 3e03 614 ld a,03h
0000024a d3e8 615 out (scc_cont),a ;WR3
0000024c 3ecc 616 ld a,0cch
0000024e d3e8 617 out (scc_cont),a ;8b/char,rx crc
618 ;enable,addrs src
619 ;and rx disabled
620
00000250 3e0a 621 ld a,0ah ;select WR10
00000252 d3e8 622 out (scc_cont),a
00000254 3ee0 623 ld a,11100000b ;idle with flags
00000256 d3e8 624 out (scc_cont),a
625
626 ;****enable transmitter *****
00000258 3e05 627 ld a,05h ;select WR5
0000025a d3e8 628 out (scc_cont),a
0000025c 3e68 629 ld a,01101000b ;enable tx
0000025e d3e8 630 out (scc_cont),a
631 ;
632 ;
633 ;****enable rs-422 driver *****
00000260 3e05 634 ld a,05h ;select WR5
00000262 d3e8 635 out (scc_cont),a
00000264 3e6a 636 ld a,01101010b ;enable tx,
00000266 d3e8 637 out (scc_cont),a ;reset rts
00000268 00 638 nop
00000269 00 639 nop
640 ;nop’s needed to complete 4.3 usec
641 ;for 1 bit time enable of transmitter.
642 ;total delay=2*(7+11+4) T states at 10 MHZ
643 ;
644 ;****disable rs-422 driver for 2 bit times*****
0000026a 3e05 645 ld a,05h ;select WR5
0000026c d3e8 646 out (scc_cont),a
0000026e 3e68 647 ld a,01101000b ;enable tx, set rts
00000270 d3e8 648 out (scc_cont),a
649 ;
00000272 3e80 650 ld a,10000000b ;reset txcrc
00000274 d3e8 651 out (scc_cont),a
00000276 0601 652 ld b,01h ;delay count
00000278 653 csloop:
00000278 10fe 654 djnz csloop ;loop needed
655 ;to complete
656 ;8.6 usec min.
657 ;or 2 bit times.
658 ;****enable rs-422 driver for llap transmission*****
0000027a 3e05 659 ld a,05h ;select WR5
Kommentare zu diesen Handbüchern