E:\Robot\bb2_led.lst - generated by MGTEK Assembler ASM11 V1.22 Build 137 for WIN32 (x86) - Sat Apr 01 01:11:44 2006

    1:                                 *
    2:                                 *       Simple program to get the LED blinking on a BOTBoard 2
    3:                                 *       Tom Dickens  8/16/1998
    4:                                 *
    5:                                 *       Assumes an 'E1 or 'A1 device. 
    6:                                 *       Change $B600 to $F800 for 'E2
    7:                                 *
    8:          =0000B600                      ORG $B600
    9:                                 *
   10:                                 *       set up port D for controlled output
   11:                                 *
   12:     B600 86 07                          ldaa    #$07
   13:     B602 B7 1028                        staa    $1028   ; disable SPI and not wired-OR mode
   14:     B605 86 08                          ldaa    #$08
   15:     B607 B7 1009                        staa    $1009   ; data direction for port D
   16:                                 *
   17:                                 *       The Loop
   18:                                 *
   19:     B60A 86 08                  Top:    ldaa    #$08
   20:     B60C B7 1008                        staa    $1008   ; Turn LED on
   21:     B60F 8D 09                          bsr     Delay
   22:     B611 86 00                          ldaa    #$00
   23:     B613 B7 1008                        staa    $1008   ; Turn LED off
   24:     B616 8D 02                          bsr     Delay
   25:     B618 20 F0                          bra     Top
   26:                                 
   27:     B61A                        Delay:
   28:     B61A 3C                             pshx
   29:     B61B CE 0000                        ldx     #$0000
   30:     B61E                        LoopX:
   31:     B61E 09                             dex
   32:     B61F 26 FD                          bne     LoopX
   33:     B621 38                             pulx
   34:     B622 39                             rts

Symbols:
delay                           *0000b61a
loopx                           *0000b61e
top                             *0000b60a

