                         .module mbs1.c
 0000                   .dbfile mbs1.c
                         .area data
 0000                 _servo_limits::
 0000                   .blkb 2
                         .area idata
 0000 0258              .word 600
                         .area data
 0002                   .blkb 2
                         .area idata
 0002 12C0              .word 4800
                         .area data
 0004                   .blkb 2
                         .area idata
 0004 0258              .word 600
                         .area data
 0006                   .blkb 2
                         .area idata
 0006 12C0              .word 4800
                         .area data
 0008                   .blkb 2
                         .area idata
 0008 0258              .word 600
                         .area data
 000A                   .blkb 2
                         .area idata
 000A 12C0              .word 4800
                         .area data
 000C                   .blkb 2
                         .area idata
 000C 0258              .word 600
                         .area data
 000E                   .blkb 2
                         .area idata
 000E 12C0              .word 4800
                         .area data
 0010                   .blkb 2
                         .area idata
 0010 0258              .word 600
                         .area data
 0012                   .blkb 2
                         .area idata
 0012 12C0              .word 4800
                         .area data
 0014                 _srv_lim_default::
 0014                   .blkb 1
                         .area idata
 0014 01                .byte 1
                         .area text
                       ;  IX -> 0,x
 0000                 _SCI_isr::
 0000                   .dbfile C:\ICCME\include/isrdecl.h
 0000                   .dbfunc SCI_isr
 0000                   .dbline 41
                       ; /***************INCLUDES**********************/
                       ; 
                       ; #include <analog.h>
                       ; #include <clocktjp.h>
                       ; #include <motorme.h>
                       ; #include <servome.h>
                       ; #include <serialtp.h>
                       ; #include <isrdecl.h>
                       ; #include <vectors.h>
                       ; #include <stdio.h>
                       ; 
                       ; 
                       ; /*************END INCLUDES*****************/
                       ; //notes:  Needs to move a little longer before it scans each bit.  Also check the thresholds.
                       ; /**************CONSTANTS*********************/
                       ; 
                       ; #define LEFT_MOTOR 0
                       ; #define RIGHT_MOTOR 1
                       ; #define MAX_SPEED 100
                       ; #define MIN_SPEED 0
                       ; #define AVOID_THRESHOLD 120
                       ; #define SCAN_THRESHOLD 20
                       ; #define LEFT_IR analog(3)
                       ; #define MID_IR analog(4)
                       ; #define RIGHT_IR analog(5)
                       ; #define SCAN analog(6)
                       ; #define BACK_IR analog(0)
                       ; #define REAR_IR analog(1)
                       ; #define FRONT_IR analog(2)
                       ; #define IRE *(unsigned char *) (0x7000)
                       ; /***********END CONSTANTS**************/
                       ; 
                       ; void do_scan(void);
                       ; 
                       ; void main(void)
                       ; {
                       ; 
                       ; int irdr, irdl,irdb,irdsf, diff,irdsr, irdm, speedr, speedl;
                       ; 
                       ; init_analog();
                       ; init_motorme();
 0000                 L2:
 0000 3B                rti
                       ;  IX -> 0,x
 0001                 _SPI_isr::
 0001                   .dbfunc SPI_isr
 0001                   .dbline 47
                       ; init_servome();
                       ; init_clocktjp();
                       ; init_serial();
                       ; IRE = 0x07;
                       ; 
                       ; 
 0001                 L3:
 0001 3B                rti
                       ;  IX -> 0,x
 0002                 _PAIE_isr::
 0002                   .dbfunc PAIE_isr
 0002                   .dbline 53
                       ; 
                       ; while(1)
                       ; {
                       ; 
                       ;     irdr= RIGHT_IR;
                       ;     irdl= LEFT_IR;
 0002                 L4:
 0002 3B                rti
                       ;  IX -> 0,x
 0003                 _PAV_isr::
 0003                   .dbfunc PAV_isr
 0003                   .dbline 59
                       ;     irdm= MID_IR;
                       ;     irdb= BACK_IR;
                       ;     irdsr= REAR_IR;
                       ;     irdsf= FRONT_IR;
                       ;     diff = irdsf - irdsr; 
                       ;    
 0003                 L5:
 0003 3B                rti
                       ;  IX -> 0,x
 0004                 _TOF_isr::
 0004                   .dbfunc TOF_isr
 0004                   .dbline 65
                       ;     if (diff== 0)
                       ;     {
                       ;         if (irdm < AVOID_THRESHOLD)
                       ;         {
                       ;         printf("diff is 0 %d\n", SCAN);
                       ;         if (SCAN < SCAN_THRESHOLD)
 0004                 L6:
 0004 3B                rti
                       ;  IX -> 0,x
 0005                 _TOC2_isr::
 0005                   .dbfunc TOC2_isr
 0005                   .dbline 83
                       ;             do_scan();
                       ;         speedl = 70;
                       ;         speedr = 70;
                       ;         }
                       ;         else 
                       ;         {
                       ;         speedl = 100;
                       ;         speedr = -100;
                       ;         }
                       ;         
                       ;     }
                       ;     else if ((irdm > AVOID_THRESHOLD)&&(irdl > AVOID_THRESHOLD))
                       ;     {
                       ;     speedl = 100;
                       ;     speedr = -100;
                       ;     }else if ((irdsf > 110)&&(diff < 0)) 
                       ;     {
                       ;     printf("front is is higher %d\n", SCAN);
 0005                 L7:
 0005 3B                rti
                       ;  IX -> 0,x
 0006                 _TOC3_isr::
 0006                   .dbfunc TOC3_isr
 0006                   .dbline 89
                       ;     if (SCAN < SCAN_THRESHOLD)
                       ;             do_scan();
                       ;     speedl = 70;
                       ;     speedr = 60;
                       ;     }
                       ;     else if ((irdsr > 110)&&(diff>-5))
 0006                 L8:
 0006 3B                rti
                       ;  IX -> 0,x
 0007                 _TIC3_isr::
 0007                   .dbfunc TIC3_isr
 0007                   .dbline 101
                       ;     {
                       ;     printf("rear is higher %d\n", SCAN);
                       ;     if (SCAN < SCAN_THRESHOLD)
                       ;             do_scan();
                       ;     speedl = 60;
                       ;     speedr = 70;
                       ;     }
                       ;     else
                       ;     {
                       ;         if (irdr < AVOID_THRESHOLD)
                       ;             speedl = 100;
                       ;             else 
 0007                 L9:
 0007 3B                rti
                       ;  IX -> 0,x
 0008                 _TIC2_isr::
 0008                   .dbfunc TIC2_isr
 0008                   .dbline 107
                       ;             speedl = -100;
                       ;          if (irdl < AVOID_THRESHOLD)
                       ;             speedr = 100;
                       ;             else
                       ;             speedr = -100;
                       ;     }
 0008                 L10:
 0008 3B                rti
                       ;  IX -> 0,x
 0009                 _TIC1_isr::
 0009                   .dbfunc TIC1_isr
 0009                   .dbline 113
                       ;     motorme(LEFT_MOTOR, speedl);
                       ;     motorme(RIGHT_MOTOR, speedr);
                       ;     wait(150);
                       ;     motorme(LEFT_MOTOR, 0);
                       ;     motorme(RIGHT_MOTOR, 0);
                       ;     
 0009                 L11:
 0009 3B                rti
                       ;  IX -> 0,x
 000A                 _RTI_isr::
 000A                   .dbfunc RTI_isr
 000A                   .dbline 119
                       ;     
                       ; }
                       ; }
                       ; 
                       ; void do_scan()
                       ; {
 000A                 L12:
 000A 3B                rti
                       ;  IX -> 0,x
 000B                 _IRQ_isr::
 000B                   .dbfunc IRQ_isr
 000B                   .dbline 125
                       ;  int sbone,sbtwo;
                       ;   motorme(RIGHT_MOTOR, 0);
                       ;  motorme(LEFT_MOTOR, 0);
                       ;  printf("Rolled backed to: %d\n", SCAN);
                       ;  wait(3000);
                       ;  motorme(RIGHT_MOTOR, 50);
 000B                 L13:
 000B 3B                rti
                       ;  IX -> 0,x
 000C                 _XIRQ_isr::
 000C                   .dbfunc XIRQ_isr
 000C                   .dbline 131
                       ;  motorme(LEFT_MOTOR, 50);   
                       ;  wait(215);
                       ;  motorme(RIGHT_MOTOR, 0);
                       ;  motorme(LEFT_MOTOR, 0);    
                       ;  wait(1000);
                       ;  sbtwo = (SCAN < 20);
 000C                 L14:
 000C 3B                rti
                       ;  IX -> 0,x
 000D                 _SWI_isr::
 000D                   .dbfunc SWI_isr
 000D                   .dbline 137
                       ;  printf("Bit Two : %d\n", SCAN);
                       ;  wait(4000);
                       ;  motorme(RIGHT_MOTOR, 50);
                       ;  motorme(LEFT_MOTOR, 50);   
                       ;  wait(210);
                       ;  motorme(RIGHT_MOTOR, 0);
 000D                 L15:
 000D 3B                rti
                       ;  IX -> 0,x
 000E                 _ILLOP_isr::
 000E                   .dbfunc ILLOP_isr
 000E                   .dbline 143
                       ;  motorme(LEFT_MOTOR, 0);    
                       ;  wait(1000);
                       ;  sbone = (SCAN < 20);
                       ;  printf("Bit One : %d\n", SCAN);
                       ;   wait(4000);
                       ;  if ((sbone)&&(sbtwo))
 000E                 L16:
 000E 3B                rti
                       ;  IX -> 0,x
 000F                 _COP_isr::
 000F                   .dbfunc COP_isr
 000F                   .dbline 149
                       ;     IRE = 0x1f;
                       ;  else if (sbtwo)
                       ;     IRE = 0x17;
                       ;  else if (sbone)
                       ;     IRE = 0x0f;
                       ;  wait (700);
 000F                 L17:
 000F 3B                rti
                       ;  IX -> 0,x
 0010                 _CLMON_isr::
 0010                   .dbfunc CLMON_isr
 0010                   .dbline 155
                       ;  motorme(RIGHT_MOTOR, 40);
                       ;  motorme(LEFT_MOTOR, 40);
                       ;  wait(50);
                       ;  }
                       ;   
                       ;   
 0010                 L18:
 0010 3B                rti
                         .area data
 0015                 _drew::
 0015                   .blkw 1
                         .area idata
 0015 0000              .word _interrupt_vectors
                         .area text
                       ;  IX -> 0,x
                       ;           irdb -> 2,x
                       ;           irdr -> 4,x
                       ;           irdl -> 6,x
                       ;         speedl -> 8,x
                       ;         speedr -> 10,x
                       ;           irdm -> 12,x
                       ;          irdsr -> 14,x
                       ;          irdsf -> 16,x
                       ;           diff -> 18,x
 0011                 _main::
 0011 BD0000            jsr __enterb
 0014 14                .byte 0x14
 0015                   .dbfile mbs1.c
 0015                   .dbfunc main
 0015                   .dbline 40
 0015 BD0000            jsr _init_analog
 0018                   .dbline 41
 0018 BD0000            jsr _init_motorme
 001B                   .dbline 42
 001B BD0000            jsr _init_servome
 001E                   .dbline 43
 001E BD0000            jsr _init_clocktjp
 0021                   .dbline 44
 0021 BD0000            jsr _init_serial
 0024                   .dbline 45
 0024 C607              ldab #7
 0026 F77000            stab 0x7000
 0029 7E0196            jmp L21
 002C                 L20:
 002C                   .dbline 52
 002C CC0005            ldd #5
 002F BD0000            jsr _analog
 0032 ED04              std 4,x
 0034                   .dbline 53
 0034 CC0003            ldd #3
 0037 BD0000            jsr _analog
 003A ED06              std 6,x
 003C                   .dbline 54
 003C CC0004            ldd #4
 003F BD0000            jsr _analog
 0042 ED0C              std 12,x
 0044                   .dbline 55
 0044 CC0000            ldd #0
 0047 BD0000            jsr _analog
 004A ED02              std 2,x
 004C                   .dbline 56
 004C CC0001            ldd #1
 004F BD0000            jsr _analog
 0052 ED0E              std 14,x
 0054                   .dbline 57
 0054 CC0002            ldd #2
 0057 BD0000            jsr _analog
 005A ED10              std 16,x
 005C                   .dbline 58
 005C EC10              ldd 16,x
 005E A30E              subd 14,x
 0060 ED12              std 18,x
 0062                   .dbline 60
 0062 EC12              ldd 18,x
 0064 2641              bne L23
 0066                   .dbline 62
 0066 EC0C              ldd 12,x
 0068 1A830078          cpd #120
 006C 2C2C              bge L25
 006E                   .dbline 64
 006E CC0006            ldd #6
 0071 BD0000            jsr _analog
 0074 37                pshb
 0075 36                psha
 0076 CC0366            ldd #L27
 0079 BD0000            jsr _printf
 007C 1838              puly
 007E                   .dbline 65
 007E CC0006            ldd #6
 0081 BD0000            jsr _analog
 0084 1A830014          cpd #20
 0088 2C03              bge L28
 008A                   .dbline 66
 008A BD01A1            jsr _do_scan
 008D                 L28:
 008D                   .dbline 67
 008D CC0046            ldd #70
 0090 ED08              std 8,x
 0092                   .dbline 68
 0092 CC0046            ldd #70
 0095 ED0A              std 10,x
 0097                   .dbline 69
 0097 7E015E            jmp L24
 009A                 L25:
 009A                   .dbline 72
 009A CC0064            ldd #100
 009D ED08              std 8,x
 009F                   .dbline 73
 009F CCFF9C            ldd #-100
 00A2 ED0A              std 10,x
 00A4                   .dbline 76
 00A4 7E015E            jmp L24
 00A7                 L23:
 00A7                   .dbline 77
 00A7 EC0C              ldd 12,x
 00A9 1A830078          cpd #120
 00AD 2F15              ble L30
 00AF EC06              ldd 6,x
 00B1 1A830078          cpd #120
 00B5 2F0D              ble L30
 00B7                   .dbline 79
 00B7 CC0064            ldd #100
 00BA ED08              std 8,x
 00BC                   .dbline 80
 00BC CCFF9C            ldd #-100
 00BF ED0A              std 10,x
 00C1                   .dbline 81
 00C1 7E015E            jmp L31
 00C4                 L30:
 00C4 EC10              ldd 16,x
 00C6 1A83006E          cpd #110
 00CA 2F2F              ble L32
 00CC EC12              ldd 18,x
 00CE 2C2B              bge L32
 00D0                   .dbline 83
 00D0 CC0006            ldd #6
 00D3 BD0000            jsr _analog
 00D6 37                pshb
 00D7 36                psha
 00D8 CC034F            ldd #L34
 00DB BD0000            jsr _printf
 00DE 1838              puly
 00E0                   .dbline 84
 00E0 CC0006            ldd #6
 00E3 BD0000            jsr _analog
 00E6 1A830014          cpd #20
 00EA 2C03              bge L35
 00EC                   .dbline 85
 00EC BD01A1            jsr _do_scan
 00EF                 L35:
 00EF                   .dbline 86
 00EF CC0046            ldd #70
 00F2 ED08              std 8,x
 00F4                   .dbline 87
 00F4 CC003C            ldd #60
 00F7 ED0A              std 10,x
 00F9                   .dbline 88
 00F9 2063              bra L33
 00FB                 L32:
 00FB                   .dbline 89
 00FB EC0E              ldd 14,x
 00FD 1A83006E          cpd #110
 0101 2F33              ble L37
 0103 EC12              ldd 18,x
 0105 1A83FFFB          cpd #-5
 0109 2F2B              ble L37
 010B                   .dbline 91
 010B CC0006            ldd #6
 010E BD0000            jsr _analog
 0111 37                pshb
 0112 36                psha
 0113 CC033C            ldd #L39
 0116 BD0000            jsr _printf
 0119 1838              puly
 011B                   .dbline 92
 011B CC0006            ldd #6
 011E BD0000            jsr _analog
 0121 1A830014          cpd #20
 0125 2C03              bge L40
 0127                   .dbline 93
 0127 BD01A1            jsr _do_scan
 012A                 L40:
 012A                   .dbline 94
 012A CC003C            ldd #60
 012D ED08              std 8,x
 012F                   .dbline 95
 012F CC0046            ldd #70
 0132 ED0A              std 10,x
 0134                   .dbline 96
 0134 2028              bra L38
 0136                 L37:
 0136                   .dbline 99
 0136 EC04              ldd 4,x
 0138 1A830078          cpd #120
 013C 2C07              bge L42
 013E                   .dbline 100
 013E CC0064            ldd #100
 0141 ED08              std 8,x
 0143 2005              bra L43
 0145                 L42:
 0145                   .dbline 102
 0145 CCFF9C            ldd #-100
 0148 ED08              std 8,x
 014A                 L43:
 014A                   .dbline 103
 014A EC06              ldd 6,x
 014C 1A830078          cpd #120
 0150 2C07              bge L44
 0152                   .dbline 104
 0152 CC0064            ldd #100
 0155 ED0A              std 10,x
 0157 2005              bra L45
 0159                 L44:
 0159                   .dbline 106
 0159 CCFF9C            ldd #-100
 015C ED0A              std 10,x
 015E                 L45:
 015E                   .dbline 107
 015E                 L38:
 015E                 L33:
 015E                 L31:
 015E                 L24:
 015E                   .dbline 108
 015E EC08              ldd 8,x
 0160 37                pshb
 0161 36                psha
 0162 CC0000            ldd #0
 0165 BD0000            jsr _motorme
 0168 1838              puly
 016A                   .dbline 109
 016A EC0A              ldd 10,x
 016C 37                pshb
 016D 36                psha
 016E CC0001            ldd #1
 0171 BD0000            jsr _motorme
 0174 1838              puly
 0176                   .dbline 110
 0176 CC0096            ldd #150
 0179 BD0000            jsr _wait
 017C                   .dbline 111
 017C CC0000            ldd #0
 017F 37                pshb
 0180 36                psha
 0181 CC0000            ldd #0
 0184 BD0000            jsr _motorme
 0187 1838              puly
 0189                   .dbline 112
 0189 CC0000            ldd #0
 018C 37                pshb
 018D 36                psha
 018E CC0001            ldd #1
 0191 BD0000            jsr _motorme
 0194 1838              puly
 0196                   .dbline 115
 0196                 L21:
 0196                   .dbline 49
 0196 7E002C            jmp L20
 0199                 L19:
 0199 8F                xgdx
 019A C30014            addd #20
 019D 8F                xgdx
 019E 35                txs
 019F 38                pulx
 01A0 39                rts
                       ;  IX -> 0,x
                       ;          ?temp -> 2,x
                       ;          ?temp -> 4,x
                       ;          sbone -> 6,x
                       ;          sbtwo -> 8,x
 01A1                 _do_scan::
 01A1 BD0000            jsr __enterb
 01A4 0A                .byte 0xa
 01A5                   .dbfunc do_scan
 01A5                   .dbline 121
 01A5 CC0000            ldd #0
 01A8 37                pshb
 01A9 36                psha
 01AA CC0001            ldd #1
 01AD BD0000            jsr _motorme
 01B0 1838              puly
 01B2                   .dbline 122
 01B2 CC0000            ldd #0
 01B5 37                pshb
 01B6 36                psha
 01B7 CC0000            ldd #0
 01BA BD0000            jsr _motorme
 01BD 1838              puly
 01BF                   .dbline 123
 01BF CC0006            ldd #6
 01C2 BD0000            jsr _analog
 01C5 37                pshb
 01C6 36                psha
 01C7 CC0326            ldd #L47
 01CA BD0000            jsr _printf
 01CD 1838              puly
 01CF                   .dbline 124
 01CF CC0BB8            ldd #3000
 01D2 BD0000            jsr _wait
 01D5                   .dbline 125
 01D5 CC0032            ldd #50
 01D8 37                pshb
 01D9 36                psha
 01DA CC0001            ldd #1
 01DD BD0000            jsr _motorme
 01E0 1838              puly
 01E2                   .dbline 126
 01E2 CC0032            ldd #50
 01E5 37                pshb
 01E6 36                psha
 01E7 CC0000            ldd #0
 01EA BD0000            jsr _motorme
 01ED 1838              puly
 01EF                   .dbline 127
 01EF CC00D7            ldd #215
 01F2 BD0000            jsr _wait
 01F5                   .dbline 128
 01F5 CC0000            ldd #0
 01F8 37                pshb
 01F9 36                psha
 01FA CC0001            ldd #1
 01FD BD0000            jsr _motorme
 0200 1838              puly
 0202                   .dbline 129
 0202 CC0000            ldd #0
 0205 37                pshb
 0206 36                psha
 0207 CC0000            ldd #0
 020A BD0000            jsr _motorme
 020D 1838              puly
 020F                   .dbline 130
 020F CC03E8            ldd #1000
 0212 BD0000            jsr _wait
 0215                   .dbline 131
 0215 CC0006            ldd #6
 0218 BD0000            jsr _analog
 021B 1A830014          cpd #20
 021F 2C07              bge L49
 0221 CC0001            ldd #1
 0224 ED04              std 4,x
 0226 2005              bra L50
 0228                 L49:
 0228 CC0000            ldd #0
 022B ED04              std 4,x
 022D                 L50:
 022D EC04              ldd 4,x
 022F ED08              std 8,x
 0231                   .dbline 132
 0231 CC0006            ldd #6
 0234 BD0000            jsr _analog
 0237 37                pshb
 0238 36                psha
 0239 CC0318            ldd #L51
 023C BD0000            jsr _printf
 023F 1838              puly
 0241                   .dbline 133
 0241 CC0FA0            ldd #4000
 0244 BD0000            jsr _wait
 0247                   .dbline 134
 0247 CC0032            ldd #50
 024A 37                pshb
 024B 36                psha
 024C CC0001            ldd #1
 024F BD0000            jsr _motorme
 0252 1838              puly
 0254                   .dbline 135
 0254 CC0032            ldd #50
 0257 37                pshb
 0258 36                psha
 0259 CC0000            ldd #0
 025C BD0000            jsr _motorme
 025F 1838              puly
 0261                   .dbline 136
 0261 CC00D2            ldd #210
 0264 BD0000            jsr _wait
 0267                   .dbline 137
 0267 CC0000            ldd #0
 026A 37                pshb
 026B 36                psha
 026C CC0001            ldd #1
 026F BD0000            jsr _motorme
 0272 1838              puly
 0274                   .dbline 138
 0274 CC0000            ldd #0
 0277 37                pshb
 0278 36                psha
 0279 CC0000            ldd #0
 027C BD0000            jsr _motorme
 027F 1838              puly
 0281                   .dbline 139
 0281 CC03E8            ldd #1000
 0284 BD0000            jsr _wait
 0287                   .dbline 140
 0287 CC0006            ldd #6
 028A BD0000            jsr _analog
 028D 1A830014          cpd #20
 0291 2C07              bge L53
 0293 CC0001            ldd #1
 0296 ED02              std 2,x
 0298 2005              bra L54
 029A                 L53:
 029A CC0000            ldd #0
 029D ED02              std 2,x
 029F                 L54:
 029F EC02              ldd 2,x
 02A1 ED06              std 6,x
 02A3                   .dbline 141
 02A3 CC0006            ldd #6
 02A6 BD0000            jsr _analog
 02A9 37                pshb
 02AA 36                psha
 02AB CC030A            ldd #L55
 02AE BD0000            jsr _printf
 02B1 1838              puly
 02B3                   .dbline 142
 02B3 CC0FA0            ldd #4000
 02B6 BD0000            jsr _wait
 02B9                   .dbline 143
 02B9 EC06              ldd 6,x
 02BB 270B              beq L56
 02BD EC08              ldd 8,x
 02BF 2707              beq L56
 02C1                   .dbline 144
 02C1 C61F              ldab #31
 02C3 F77000            stab 0x7000
 02C6 2014              bra L57
 02C8                 L56:
 02C8                   .dbline 145
 02C8 EC08              ldd 8,x
 02CA 2707              beq L58
 02CC                   .dbline 146
 02CC C617              ldab #23
 02CE F77000            stab 0x7000
 02D1 2009              bra L59
 02D3                 L58:
 02D3                   .dbline 147
 02D3 EC06              ldd 6,x
 02D5 2705              beq L60
 02D7                   .dbline 148
 02D7 C60F              ldab #15
 02D9 F77000            stab 0x7000
 02DC                 L60:
 02DC                 L59:
 02DC                 L57:
 02DC                   .dbline 149
 02DC CC02BC            ldd #700
 02DF BD0000            jsr _wait
 02E2                   .dbline 150
 02E2 CC0028            ldd #40
 02E5 37                pshb
 02E6 36                psha
 02E7 CC0001            ldd #1
 02EA BD0000            jsr _motorme
 02ED 1838              puly
 02EF                   .dbline 151
 02EF CC0028            ldd #40
 02F2 37                pshb
 02F3 36                psha
 02F4 CC0000            ldd #0
 02F7 BD0000            jsr _motorme
 02FA 1838              puly
 02FC                   .dbline 152
 02FC CC0032            ldd #50
 02FF BD0000            jsr _wait
 0302                   .dbline 153
 0302                 L46:
 0302 8F                xgdx
 0303 C3000A            addd #10
 0306 8F                xgdx
 0307 35                txs
 0308 38                pulx
 0309 39                rts
                         .area bss
 0000                 _servo_width::
 0000                   .blkb 10
 000A                 _timertjp::
 000A                   .blkb 2
 000C                 _days::
 000C                   .blkb 2
 000E                 _hours::
 000E                   .blkb 2
 0010                 _minutes::
 0010                   .blkb 2
 0012                 _seconds::
 0012                   .blkb 2
 0014                 _msec::
 0014                   .blkb 2
                         .area text
 030A                 L55:
 030A 426974204F6E65203A2025640A00  .byte 'B,'i,'t,32,'O,'n,'e,32,58,32,37,'d,10,0
 0318                 L51:
 0318 4269742054776F203A2025640A00  .byte 'B,'i,'t,32,'T,'w,'o,32,58,32,37,'d,10,0
 0326                 L47:
 0326 526F6C6C6564206261636B656420746F  .byte 'R,'o,'l,'l,'e,'d,32,'b,'a,'c,'k,'e,'d,32,'t,'o
 0336 3A2025640A00      .byte 58,32,37,'d,10,0
 033C                 L39:
 033C 72656172206973206869676865722025  .byte 'r,'e,'a,'r,32,'i,'s,32,'h,'i,'g,'h,'e,'r,32,37
 034C 640A00            .byte 'd,10,0
 034F                 L34:
 034F 66726F6E742069732069732068696768  .byte 'f,'r,'o,'n,'t,32,'i,'s,32,'i,'s,32,'h,'i,'g,'h
 035F 65722025640A00    .byte 'e,'r,32,37,'d,10,0
 0366                 L27:
 0366 6469666620697320302025640A00  .byte 'd,'i,'f,'f,32,'i,'s,32,48,32,37,'d,10,0
