A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 1 DOS MACRO ASSEMBLER A166 V3.10 OBJECT MODULE PLACED IN INT.OBJ ASSEMBLER INVOKED BY: C:\C166\BIN\A166.EXE INT.SRC CASE MOD167 SEGMENTED SET(LARGE) LOC OBJ LINE SOURCE 1 $NOMACRO 2 $SEGMENTED CASE MOD167 3 ; 4 ; 'INT.SRC' GENERATED FROM INPUT FILE 'INT.C' 5 ; COMPILER INVOKED BY: 6 ; C:\C166\BIN\C166.EXE INT.C MOD167 NOINIT LARGE FLOAT64 SYMBOLS CODE PREPRINT SRC 7 ; 8 $MODINF (183) 9 NAME INT 10 11 CC19IC DEFR 0F166H 12 CC28IC DEFR 0F178H 13 BUSCON1 DEFR 0FF14H 14 CC18IC DEFR 0F164H 15 CC27IC DEFR 0F176H 16 BUSCON0 DEFR 0FF0CH 17 CC17IC DEFR 0F162H 18 CC26IC DEFR 0F174H 19 CC16IC DEFR 0F160H 20 CC25IC DEFR 0F172H 21 PSW DEFR 0FF10H 22 CC15IC DEFR 0FF96H 23 CC24IC DEFR 0F170H 24 CC14IC DEFR 0FF94H 25 CC23IC DEFR 0F16EH 26 CC13IC DEFR 0FF92H 27 CC22IC DEFR 0F16CH 28 CC31IC DEFR 0F194H 29 CC12IC DEFR 0FF90H 30 CC21IC DEFR 0F16AH 31 CC30IC DEFR 0F18CH 32 CC11IC DEFR 0FF8EH 33 CC20IC DEFR 0F168H 34 CC10IC DEFR 0FF8CH 35 TFR DEFR 0FFACH 36 T6CON DEFR 0FF48H 37 T5CON DEFR 0FF46H 38 T4CON DEFR 0FF44H 39 T3CON DEFR 0FF42H 40 XP3IC DEFR 0F19EH 41 T2CON DEFR 0FF40H 42 XP2IC DEFR 0F196H 43 ADCON DEFR 0FFA0H 44 XP1IC DEFR 0F18EH 45 XP0IC DEFR 0F186H 46 S0CON DEFR 0FFB0H 47 S0TIC DEFR 0FF6CH 48 S0RIC DEFR 0FF6EH 49 SYSCON DEFR 0FF12H 50 ADEIC DEFR 0FF9AH 51 ADCIC DEFR 0FF98H 52 S0EIC DEFR 0FF70H 53 MDC DEFR 0FF0EH 54 WDTCON DEFR 0FFAEH 55 CC9IC DEFR 0FF8AH 56 DP8 DEFR 0FFD6H 57 CC8IC DEFR 0FF88H 58 DP7 DEFR 0FFD2H 59 SSCTIC DEFR 0FF72H A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 2 60 SSCCON DEFR 0FFB2H 61 CC7IC DEFR 0FF86H 62 CC6IC DEFR 0FF84H 63 SSCRIC DEFR 0FF74H 64 CC5IC DEFR 0FF82H 65 EXICON DEFR 0F1C0H 66 CC4IC DEFR 0FF80H 67 DP3 DEFR 0FFC6H 68 CC3IC DEFR 0FF7EH 69 DP2 DEFR 0FFC2H 70 CC2IC DEFR 0FF7CH 71 CC1IC DEFR 0FF7AH 72 CC0IC DEFR 0FF78H 73 SSCEIC DEFR 0FF76H 74 ISNC DEFR 0F1DEH 75 S0TBIC DEFR 0F19CH 76 T78CON DEFR 0FF20H 77 CRIC DEFR 0FF6AH 78 T8IC DEFR 0F17CH 79 T7IC DEFR 0F17AH 80 T01CON DEFR 0FF50H 81 T6IC DEFR 0FF68H 82 T5IC DEFR 0FF66H 83 T4IC DEFR 0FF64H 84 T3IC DEFR 0FF62H 85 T2IC DEFR 0FF60H 86 T1IC DEFR 0FF9EH 87 T0IC DEFR 0FF9CH 88 CCM7 DEFR 0FF28H 89 CCM6 DEFR 0FF26H 90 CCM5 DEFR 0FF24H 91 CCM4 DEFR 0FF22H 92 P8 DEFR 0FFD4H 93 T4 DEFR 0FE44H 94 PWMCON1 DEFR 0FF32H 95 CCM3 DEFR 0FF58H 96 T3 DEFR 0FE42H 97 PWMCON0 DEFR 0FF30H 98 CCM2 DEFR 0FF56H 99 CCM1 DEFR 0FF54H 100 P5 DEFR 0FFA2H 101 CCM0 DEFR 0FF52H 102 P3 DEFR 0FFC4H 103 P2 DEFR 0FFC0H 104 PWMIC DEFR 0F17EH 105 BUSCON4 DEFR 0FF1AH 106 BUSCON3 DEFR 0FF18H 107 CC29IC DEFR 0F184H 108 BUSCON2 DEFR 0FF16H 109 DP2_9 BIT DP2.9 110 DP2_8 BIT DP2.8 111 DP2_11 BIT DP2.11 112 DP2_10 BIT DP2.10 113 114 SDATA DGROUP ?BD?INT,?ID?INT,SYSTEM 115 116 ASSUME DPP3 : SDATA 117 118 ?ID?INT SECTION DATA WORD 'IDATA' 000000 119 HSTEP_HO DSW 1 120 PUBLIC HSTEP_HO 000002 121 CUR_ARC10_HO DSW 2 122 PUBLIC CUR_ARC10_HO 000006 123 CFG_HSTS_VE DSW 4 124 PUBLIC CFG_HSTS_VE 00000E 125 SPEED_VE DSW 1 A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 3 126 PUBLIC SPEED_VE 000010 127 CFG_HSTS_FR DSW 4 128 PUBLIC CFG_HSTS_FR 000018 129 CFG_HSTS_HO DSW 4 130 PUBLIC CFG_HSTS_HO 000020 131 ENC_ARC10_VE DSW 2 132 PUBLIC ENC_ARC10_VE 000024 133 SPEED_FR DSW 1 134 PUBLIC SPEED_FR 000026 135 SPEED_HO DSW 1 136 PUBLIC SPEED_HO 000028 137 ENC_ARC10_HO DSW 2 138 PUBLIC ENC_ARC10_HO 00002C 139 SPEED_VE_CT DSW 1 140 PUBLIC SPEED_VE_CT 00002E 141 TIMER10 DSW 1 142 PUBLIC TIMER10 000030 143 SPEED_FR_CT DSW 1 144 PUBLIC SPEED_FR_CT 000032 145 SPEED_HO_CT DSW 1 146 PUBLIC SPEED_HO_CT 000034 147 DAY DSW 1 148 PUBLIC DAY 000036 149 MINUTE DSW 1 150 PUBLIC MINUTE 000038 151 HOUR DSW 1 152 PUBLIC HOUR 00003A 153 SECOND DSW 1 154 PUBLIC SECOND 00003C 155 THISMDAYS DSW 1 156 PUBLIC THISMDAYS 00003E 157 YEAR DSW 1 158 PUBLIC YEAR 000040 159 DITMP2 DSW 4 160 PUBLIC DITMP2 000048 161 DITMP1 DSW 4 162 PUBLIC DITMP1 000050 163 TRG_HSTEPS_VE DSW 2 164 PUBLIC TRG_HSTEPS_VE 000054 165 CUR_HSTEPS_VE DSW 2 166 PUBLIC CUR_HSTEPS_VE 000058 167 TRG_HSTEPS_HO DSW 2 168 PUBLIC TRG_HSTEPS_HO 00005C 169 CUR_HSTEPS_HO DSW 2 170 PUBLIC CUR_HSTEPS_HO 000060 171 hsteps DSB 8 172 PUBLIC hsteps 000068 173 ARC10PERENCVE DSW 1 174 PUBLIC ARC10PERENCVE 00006A 175 HSTEPSHO359 DSW 2 176 PUBLIC HSTEPSHO359 00006E 177 ARC10PERENCHO DSW 1 178 PUBLIC ARC10PERENCHO 000070 179 MSECOND DSW 1 180 PUBLIC MSECOND 000072 181 HSTEPSHO090 DSW 2 182 PUBLIC HSTEPSHO090 000076 183 HSTEPSHO180 DSW 2 184 PUBLIC HSTEPSHO180 00007A 185 HSTEPSHO270 DSW 2 186 PUBLIC HSTEPSHO270 00007E 187 MONTH DSW 1 188 PUBLIC MONTH 000080 189 CFG_ENC_VE DSW 1 190 PUBLIC CFG_ENC_VE 000082 191 HSTEP_VE DSW 1 A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 4 192 PUBLIC HSTEP_VE 000084 193 CFG_ENC_HO DSW 1 194 PUBLIC CFG_ENC_HO 000086 195 CUR_ARC10_VE DSW 2 196 PUBLIC CUR_ARC10_VE 00008A 197 HSTEP_FR DSW 1 198 PUBLIC HSTEP_FR 199 ?ID?INT ENDS 200 201 ?BD?INT SECTION DATA BITADDRESSABLE 'BDATA' 000000 202 MOT_FLAGS DSB 1 203 PUBLIC MOT_FLAGS 000001 204 ENC_FLAGS DSB 1 205 PUBLIC ENC_FLAGS 206 ?BD?INT ENDS 207 208 ?C_INITSEC SECTION HDATA WORD GLOBAL 209 000000 0840 210 DW 04008H 000002 0000 R 211 DW DPP3:POF (hsteps) 000004 EE 212 DB 0EEH ; uchar 000005 AA 213 DB 0AAH ; uchar 000006 BB 214 DB 0BBH ; uchar 000007 99 215 DB 099H ; uchar 000008 DD 216 DB 0DDH ; uchar 000009 55 217 DB 055H ; uchar 00000A 77 218 DB 077H ; uchar 00000B 66 219 DB 066H ; uchar 220 ?C_INITSEC ENDS 221 222 EXTRN modf : FAR 223 EXTRN ?C_DCAST : FAR 224 EXTRN ?C_DPDIV : FAR 225 EXTRN ?C_CASTD : FAR 226 MOTVE_RUN BIT MOT_FLAGS.1 227 PUBLIC MOTVE_RUN 228 MOTHO_RUN BIT MOT_FLAGS.0 229 PUBLIC MOTHO_RUN 230 MOTFR_USE BIT MOT_FLAGS.2 231 PUBLIC MOTFR_USE 232 MOT_CORRECTION BIT MOT_FLAGS.7 233 PUBLIC MOT_CORRECTION 234 MOTVE_DIR BIT MOT_FLAGS.4 235 PUBLIC MOTVE_DIR 236 MOTFR_DIR BIT MOT_FLAGS.5 237 PUBLIC MOTFR_DIR 238 MOTHO_DIR BIT MOT_FLAGS.3 239 PUBLIC MOTHO_DIR 240 ENCVE_USE BIT ENC_FLAGS.1 241 PUBLIC ENCVE_USE 242 ENCHO_USE BIT ENC_FLAGS.0 243 PUBLIC ENCHO_USE 244 ENCVE_COR BIT ENC_FLAGS.3 245 PUBLIC ENCVE_COR 246 ENCHO_COR BIT ENC_FLAGS.2 247 PUBLIC ENCHO_COR 248 ENCVE_DIR BIT ENC_FLAGS.5 249 PUBLIC ENCVE_DIR 250 ENCHO_DIR BIT ENC_FLAGS.4 251 PUBLIC ENCHO_DIR 252 ENCVE_CORUSE BIT ENC_FLAGS.7 253 PUBLIC ENCVE_CORUSE 254 ENCHO_CORUSE BIT ENC_FLAGS.6 255 PUBLIC ENCHO_CORUSE 256 MOT_GOTO BIT MOT_FLAGS.6 257 PUBLIC MOT_GOTO A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 5 258 259 260 REGDEF R0 - R15 261 TIMER_BANK REGBANK R0 - R15 262 ENCODER10_BANK REGBANK R0 - R15 263 ENCODER11_BANK REGBANK R0 - R15 264 ENCODER20_BANK REGBANK R0 - R15 265 ENCODER21_BANK REGBANK R0 - R15 266 267 268 ?PR?INT SECTION CODE WORD 'FCODE' 269 ; line 1: 270 ; line 2: #ifndef _int_c_ 271 ; line 3: #define _int_c_ 272 ; line 4: 273 ; line 5: #include "int.h" 274 ; line 6: 275 ; line 7: #pragma SRC 276 ; line 8: 277 ; line 9: 278 ; line 10: 279 ; line 11: unsigned char bdata ENC_FLAGS; 280 ; line 12: 281 ; line 13: sbit ENCHO_USE = ENC_FLAGS^0; 282 ; line 14: sbit ENCVE_USE = ENC_FLAGS^1; 283 ; line 15: 284 ; line 16: sbit ENCHO_COR = ENC_FLAGS^2; 285 ; line 17: sbit ENCVE_COR = ENC_FLAGS^3; 286 ; line 18: 287 ; line 19: sbit ENCHO_DIR = ENC_FLAGS^4; 288 ; line 20: sbit ENCVE_DIR = ENC_FLAGS^5; 289 ; line 21: 290 ; line 22: sbit ENCHO_CORUSE = ENC_FLAGS^6; 291 ; line 23: sbit ENCVE_CORUSE = ENC_FLAGS^7; 292 ; line 24: 293 ; line 25: 294 ; line 26: unsigned char bdata MOT_FLAGS; 295 ; line 27: 296 ; line 28: sbit MOTHO_RUN = MOT_FLAGS^0; 297 ; line 29: sbit MOTVE_RUN = MOT_FLAGS^1; 298 ; line 30: sbit MOTFR_USE = MOT_FLAGS^2; 299 ; line 31: sbit MOTHO_DIR = MOT_FLAGS^3; 300 ; line 32: sbit MOTVE_DIR = MOT_FLAGS^4; 301 ; line 33: sbit MOTFR_DIR = MOT_FLAGS^5; 302 ; line 34: sbit MOT_GOTO = MOT_FLAGS^6; 303 ; line 35: sbit MOT_CORRECTION = MOT_FLAGS^7; 304 ; line 36: 305 ; line 37: 306 ; line 38: 307 ; line 39: volatile int idata YEAR; 308 ; line 40: volatile int idata MONTH; 309 ; line 41: volatile int idata DAY; 310 ; line 42: volatile int idata HOUR; 311 ; line 43: volatile int idata MINUTE; 312 ; line 44: volatile int idata SECOND; 313 ; line 45: volatile int idata MSECOND; 314 ; line 46: 315 ; line 47: volatile int idata TIMER10; 316 ; line 48: volatile int idata THISMDAYS; 317 ; line 49: 318 ; line 50: volatile int idata CFG_ENC_HO; 319 ; line 51: volatile int idata CFG_ENC_VE; 320 ; line 52: 321 ; line 53: volatile int idata ARC10PERENCHO; 322 ; line 54: volatile int idata ARC10PERENCVE; 323 ; line 55: A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 6 324 ; line 56: volatile long idata ENC_ARC10_HO; 325 ; line 57: volatile long idata ENC_ARC10_VE; 326 ; line 58: 327 ; line 59: 328 ; line 60: volatile long idata HSTEPSHO090; 329 ; line 61: volatile long idata HSTEPSHO180; 330 ; line 62: volatile long idata HSTEPSHO270; 331 ; line 63: volatile long idata HSTEPSHO359; 332 ; line 64: 333 ; line 65: volatile long idata CUR_HSTEPS_HO; 334 ; line 66: volatile long idata CUR_HSTEPS_VE; 335 ; line 67: volatile long idata TRG_HSTEPS_HO; 336 ; line 68: volatile long idata TRG_HSTEPS_VE; 337 ; line 69: 338 ; line 70: volatile long idata CUR_ARC10_HO; 339 ; line 71: volatile long idata CUR_ARC10_VE; 340 ; line 72: 341 ; line 73: volatile int idata SPEED_HO; 342 ; line 74: volatile int idata SPEED_VE; 343 ; line 75: volatile int idata SPEED_FR; 344 ; line 76: 345 ; line 77: volatile int idata SPEED_HO_CT; 346 ; line 78: volatile int idata SPEED_VE_CT; 347 ; line 79: volatile int idata SPEED_FR_CT; 348 ; line 80: 349 ; line 81: 350 ; line 82: volatile unsigned char idata hsteps[8] = { HSTEP1, HSTEP2, HSTEP3, HSTEP4, HSTE P5, HSTEP6, HSTEP7, HSTEP8 }; 351 ; line 83: volatile int idata HSTEP_HO; 352 ; line 84: volatile int idata HSTEP_VE; 353 ; line 85: volatile int idata HSTEP_FR; 354 ; line 86: 355 ; line 87: volatile double idata CFG_HSTS_HO; 356 ; line 88: volatile double idata CFG_HSTS_VE; 357 ; line 89: volatile double idata CFG_HSTS_FR; 358 ; line 90: 359 ; line 91: volatile double idata DITMP1; 360 ; line 92: volatile double idata DITMP2; 361 ; line 93: 362 ; line 94: 363 ; line 95: 364 ; line 96: 365 ; line 97: void initTimerInt( void ) { 366 367 initTimerInt PROC FAR 368 PUBLIC initTimerInt 369 ; FUNCTION initTimerInt (BEGIN RMASK = @0x8000) 370 ; line 98: 371 ; line 99: T3IC = TIMERINTOFF; 000000 E6B1A700 372 MOV T3IC,#167 373 ; line 100: T3CON = TIMERSTOP; 000004 E6A10104 374 MOV T3CON,#1025 375 ; line 101: T4CON = TIMERSET; 000008 E6A22700 376 MOV T4CON,#39 377 ; line 102: T4 = TIMERRELOAD; 00000C E62283FF 378 MOV T4,#65411 379 ; line 103: T3 = TIMERRELOAD; 000010 E62183FF 380 MOV T3,#65411 381 ; line 104: 382 ; line 105: } 000014 DB00 383 RETS 384 ; FUNCTION initTimerInt (END RMASK = @0x8000) 385 initTimerInt ENDP 386 ; line 106: 387 ; line 107: 388 ; line 108: void startTimerInt( void ) { A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 7 389 390 startTimerInt PROC FAR 391 PUBLIC startTimerInt 392 ; FUNCTION startTimerInt (BEGIN RMASK = @0x8000) 393 ; line 109: 394 ; line 110: TIMER10 = 0; 000016 F68E2E00 R 395 MOV WORD TIMER10,ZEROS 396 ; line 111: T3 = TIMERRELOAD; 00001A E62183FF 397 MOV T3,#65411 398 ; line 112: T4 = TIMERRELOAD; 00001E E62283FF 399 MOV T4,#65411 400 ; line 113: T3CON = TIMERSTART; 000022 E6A14104 401 MOV T3CON,#1089 402 ; line 114: T3IC = TIMERINTON; 000026 E6B1E700 403 MOV T3IC,#231 404 ; line 115: } 00002A DB00 405 RETS 406 ; FUNCTION startTimerInt (END RMASK = @0x8000) 407 startTimerInt ENDP 408 ; line 116: 409 ; line 117: 410 ; line 118: 411 ; line 119: 412 ; line 120: void stopTimerInt( void ) { 413 414 stopTimerInt PROC FAR 415 PUBLIC stopTimerInt 416 ; FUNCTION stopTimerInt (BEGIN RMASK = @0x8000) 417 ; line 121: 418 ; line 122: T3IC = TIMERINTOFF; 00002C E6B1A700 419 MOV T3IC,#167 420 ; line 123: T3CON = TIMERSTOP; 000030 E6A10104 421 MOV T3CON,#1025 422 ; line 124: } 000034 DB00 423 RETS 424 ; FUNCTION stopTimerInt (END RMASK = @0x8000) 425 stopTimerInt ENDP 426 ; line 125: 427 ; line 126: 428 ; line 127: 429 ; line 128: #pragma ASM 430 ; line 129: 431 ; line 130: ;P2 DEFR 0FFC0H 432 ;P2 DEFR 0FFC0H 433 ; line 131: P7 DEFR 0FFD0H 434 P7 DEFR 0FFD0H 435 ; line 132: P8 DEFR 0FFD4H 436 P8 DEFR 0FFD4H 437 ; line 133: 438 ; line 134: #pragma ENDASM 439 ; line 135: 440 ; line 136: 441 ; line 137: 442 ; line 138: //interrupt every 1/10000 second 443 ; line 139: void timer_int (void) interrupt TIMER_INT = 0x23 using TIMER_BANK { 444 445 timer_int PROC INTERRUPT TIMER_INT = 35 USING TIMER_BANK 446 GLOBAL timer_int 447 ; FUNCTION timer_int (BEGIN RMASK = @0x3FFF) 000036 C6030300 448 SCXT DPP3,#3 00003A CC00 449 NOP 00003C F6F00000 R 450 MOV TIMER_BANK,R0 000040 C6080000 R 451 SCXT CP,#TIMER_BANK 000044 CC00 452 NOP 000046 EC00 453 PUSH DPP0 000048 C6871000 454 SCXT MDC,#16 A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 8 00004C EC06 455 PUSH MDH 00004E EC07 456 PUSH MDL 457 ; line 140: 458 ; line 141: TIMER10++; 000050 248F2E00 R 459 SUB TIMER10,ONES 460 ; line 142: 461 ; line 143: if( TIMER10 >= 10 ){ 000054 F2F42E00 R 462 MOV R4,WORD TIMER10 000058 46F40A00 463 CMP R4,#10 00005C CD3C 464 JMP cc_SLT,?C0001 465 ; line 144: 466 ; line 145: TIMER10 = 0; 00005E F68E2E00 R 467 MOV WORD TIMER10,ZEROS 468 ; line 146: MSECOND++; 000062 248F7000 R 469 SUB MSECOND,ONES 470 ; line 147: 471 ; line 148: if( MSECOND >= 1000 ){ 000066 F2F47000 R 472 MOV R4,WORD MSECOND 00006A 46F4E803 473 CMP R4,#1000 00006E CD33 474 JMP cc_SLT,?C0001 475 ; line 149: 476 ; line 150: MSECOND = 0; 000070 F68E7000 R 477 MOV WORD MSECOND,ZEROS 478 ; line 151: SECOND++; 000074 248F3A00 R 479 SUB SECOND,ONES 480 ; line 152: 481 ; line 153: if( SECOND >= 60 ){ 000078 F2F43A00 R 482 MOV R4,WORD SECOND 00007C 46F43C00 483 CMP R4,#60 000080 CD2A 484 JMP cc_SLT,?C0001 485 ; line 154: 486 ; line 155: SECOND = 0; 000082 F68E3A00 R 487 MOV WORD SECOND,ZEROS 488 ; line 156: MINUTE++; 000086 248F3600 R 489 SUB MINUTE,ONES 490 ; line 157: 491 ; line 158: if( MINUTE >= 60 ){ 00008A F2F43600 R 492 MOV R4,WORD MINUTE 00008E 46F43C00 493 CMP R4,#60 000092 CD21 494 JMP cc_SLT,?C0001 495 ; line 159: 496 ; line 160: MINUTE = 0; 000094 F68E3600 R 497 MOV WORD MINUTE,ZEROS 498 ; line 161: HOUR++; 000098 248F3800 R 499 SUB HOUR,ONES 500 ; line 162: 501 ; line 163: if( HOUR >= 24 ){ 00009C F2F43800 R 502 MOV R4,WORD HOUR 0000A0 46F41800 503 CMP R4,#24 0000A4 CD18 504 JMP cc_SLT,?C0001 505 ; line 164: 506 ; line 165: HOUR = 0; 0000A6 F68E3800 R 507 MOV WORD HOUR,ZEROS 508 ; line 166: DAY++; 0000AA 248F3400 R 509 SUB DAY,ONES 510 ; line 167: 511 ; line 168: if( DAY > THISMDAYS ) { 0000AE F2F43C00 R 512 MOV R4,WORD THISMDAYS 0000B2 42F43400 R 513 CMP R4,WORD DAY 0000B6 DD0F 514 JMP cc_SGE,?C0001 515 ; line 169: 516 ; line 170: DAY = 1; 0000B8 E014 517 MOV R4,#1 0000BA F6F43400 R 518 MOV WORD DAY,R4 519 ; line 171: MONTH++; 0000BE 248F7E00 R 520 SUB MONTH,ONES A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 9 521 ; line 172: 522 ; line 173: if( MONTH > 12 ){ 0000C2 F2F47E00 R 523 MOV R4,WORD MONTH 0000C6 46F40C00 524 CMP R4,#12 0000CA BD05 525 JMP cc_SLE,?C0001 526 ; line 174: 527 ; line 175: MONTH = 1; 0000CC E014 528 MOV R4,#1 0000CE F6F47E00 R 529 MOV WORD MONTH,R4 530 ; line 176: YEAR++; 0000D2 248F3E00 R 531 SUB YEAR,ONES 532 ; line 177: } 533 ; line 178: } 534 ; line 179: } 535 ; line 180: } 536 ; line 181: } 537 ; line 182: } 538 ; line 183: } 539 ?C0001: 540 ; line 184: 541 ; line 185: 542 ; line 186: /// so updating of date/time is down 543 ; line 187: /// here we do the work for motors 544 ; line 188: /// 545 ; line 189: /// 546 ; line 190: 547 ; line 191: 548 ; line 192: 549 ; line 193: if( ENCHO_COR == ON ) { 0000D6 9A005200 R 550 JNB ENCHO_COR,?C0008 551 ; line 194: if( ENCHO_CORUSE == ON ) { 0000DA 9A004F00 R 552 JNB ENCHO_CORUSE,?C0009 553 ; line 195: DITMP1 = (double)ENC_ARC10_HO / (double)10; 0000DE F2F42800 R 554 MOV R4,WORD ENC_ARC10_HO 0000E2 F2F52A00 R 555 MOV R5,WORD ENC_ARC10_HO+2 0000E6 F065 556 MOV R6,R5 0000E8 DA000000 E 557 CALL ?C_DCAST 0000EC E008 558 MOV R8,#0 0000EE E009 559 MOV R9,#0 0000F0 E00A 560 MOV R10,#0 0000F2 E6FB2440 561 MOV R11,#16420 0000F6 DA000000 E 562 CALL ?C_DPDIV 0000FA F6F44800 R 563 MOV WORD DITMP1,R4 0000FE F6F54A00 R 564 MOV WORD DITMP1+2,R5 000102 F6F64C00 R 565 MOV WORD DITMP1+4,R6 000106 F6F74E00 R 566 MOV WORD DITMP1+6,R7 567 ; line 196: DITMP1 = (double)DITMP1 / (double)CFG_HSTS_HO; 00010A F2F81800 R 568 MOV R8,WORD CFG_HSTS_HO 00010E F2F91A00 R 569 MOV R9,WORD CFG_HSTS_HO+2 000112 F2FA1C00 R 570 MOV R10,WORD CFG_HSTS_HO+4 000116 F2FB1E00 R 571 MOV R11,WORD CFG_HSTS_HO+6 00011A F2F44800 R 572 MOV R4,WORD DITMP1 00011E F2F54A00 R 573 MOV R5,WORD DITMP1+2 000122 F2F64C00 R 574 MOV R6,WORD DITMP1+4 000126 F2F74E00 R 575 MOV R7,WORD DITMP1+6 00012A DA000000 E 576 CALL ?C_DPDIV 00012E F6F44800 R 577 MOV WORD DITMP1,R4 000132 F6F54A00 R 578 MOV WORD DITMP1+2,R5 000136 F6F64C00 R 579 MOV WORD DITMP1+4,R6 00013A F6F74E00 R 580 MOV WORD DITMP1+6,R7 581 ; line 197: modf( DITMP1, &DITMP2); 00013E E6F40000 R 582 MOV R4,#POF (DITMP2) 000142 E6F50000 R 583 MOV R5,#PAG (DITMP2) 000146 8850 584 MOV [-R0],R5 A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 10 000148 F0C4 585 MOV R12,R4 00014A F2F84800 R 586 MOV R8,WORD DITMP1 00014E F2F94A00 R 587 MOV R9,WORD DITMP1+2 000152 F2FA4C00 R 588 MOV R10,WORD DITMP1+4 000156 F2FB4E00 R 589 MOV R11,WORD DITMP1+6 00015A DA000000 E 590 CALL modf 00015E 0802 591 ADD R0,#2 592 ; line 198: CUR_HSTEPS_HO = ( long )DITMP2; 000160 F2F44000 R 593 MOV R4,WORD DITMP2 000164 F2F54200 R 594 MOV R5,WORD DITMP2+2 000168 F2F64400 R 595 MOV R6,WORD DITMP2+4 00016C F2F74600 R 596 MOV R7,WORD DITMP2+6 000170 DA000000 E 597 CALL ?C_CASTD 000174 F6F45C00 R 598 MOV WORD CUR_HSTEPS_HO,R4 000178 F6F55E00 R 599 MOV WORD CUR_HSTEPS_HO+2,R5 600 ; line 199: } 601 ?C0009: 602 ; line 200: ENCHO_COR = OFF; 00017C 0E00 R 603 BCLR ENCHO_COR 604 ; line 201: } 605 ?C0008: 606 ; line 202: 607 ; line 203: 608 ; line 204: if( ENCVE_COR == ON ) { 00017E 9A005200 R 609 JNB ENCVE_COR,?C0010 610 ; line 205: if( ENCVE_CORUSE == ON ) { 000182 9A004F00 R 611 JNB ENCVE_CORUSE,?C0011 612 ; line 206: DITMP1 = (double)ENC_ARC10_VE / (double)10; 000186 F2F42000 R 613 MOV R4,WORD ENC_ARC10_VE 00018A F2F52200 R 614 MOV R5,WORD ENC_ARC10_VE+2 00018E F065 615 MOV R6,R5 000190 DA000000 E 616 CALL ?C_DCAST 000194 E008 617 MOV R8,#0 000196 E009 618 MOV R9,#0 000198 E00A 619 MOV R10,#0 00019A E6FB2440 620 MOV R11,#16420 00019E DA000000 E 621 CALL ?C_DPDIV 0001A2 F6F44800 R 622 MOV WORD DITMP1,R4 0001A6 F6F54A00 R 623 MOV WORD DITMP1+2,R5 0001AA F6F64C00 R 624 MOV WORD DITMP1+4,R6 0001AE F6F74E00 R 625 MOV WORD DITMP1+6,R7 626 ; line 207: DITMP1 = (double)DITMP1 / (double)CFG_HSTS_VE; 0001B2 F2F80600 R 627 MOV R8,WORD CFG_HSTS_VE 0001B6 F2F90800 R 628 MOV R9,WORD CFG_HSTS_VE+2 0001BA F2FA0A00 R 629 MOV R10,WORD CFG_HSTS_VE+4 0001BE F2FB0C00 R 630 MOV R11,WORD CFG_HSTS_VE+6 0001C2 F2F44800 R 631 MOV R4,WORD DITMP1 0001C6 F2F54A00 R 632 MOV R5,WORD DITMP1+2 0001CA F2F64C00 R 633 MOV R6,WORD DITMP1+4 0001CE F2F74E00 R 634 MOV R7,WORD DITMP1+6 0001D2 DA000000 E 635 CALL ?C_DPDIV 0001D6 F6F44800 R 636 MOV WORD DITMP1,R4 0001DA F6F54A00 R 637 MOV WORD DITMP1+2,R5 0001DE F6F64C00 R 638 MOV WORD DITMP1+4,R6 0001E2 F6F74E00 R 639 MOV WORD DITMP1+6,R7 640 ; line 208: modf( DITMP1, &DITMP2); 0001E6 E6F40000 R 641 MOV R4,#POF (DITMP2) 0001EA E6F50000 R 642 MOV R5,#PAG (DITMP2) 0001EE 8850 643 MOV [-R0],R5 0001F0 F0C4 644 MOV R12,R4 0001F2 F2F84800 R 645 MOV R8,WORD DITMP1 0001F6 F2F94A00 R 646 MOV R9,WORD DITMP1+2 0001FA F2FA4C00 R 647 MOV R10,WORD DITMP1+4 0001FE F2FB4E00 R 648 MOV R11,WORD DITMP1+6 000202 DA000000 E 649 CALL modf 000206 0802 650 ADD R0,#2 A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 11 651 ; line 209: CUR_HSTEPS_VE = ( long )DITMP2; 000208 F2F44000 R 652 MOV R4,WORD DITMP2 00020C F2F54200 R 653 MOV R5,WORD DITMP2+2 000210 F2F64400 R 654 MOV R6,WORD DITMP2+4 000214 F2F74600 R 655 MOV R7,WORD DITMP2+6 000218 DA000000 E 656 CALL ?C_CASTD 00021C F6F45400 R 657 MOV WORD CUR_HSTEPS_VE,R4 000220 F6F55600 R 658 MOV WORD CUR_HSTEPS_VE+2,R5 659 ; line 210: } 660 ?C0011: 661 ; line 211: ENCVE_COR = OFF; 000224 0E00 R 662 BCLR ENCVE_COR 663 ; line 212: } 664 ?C0010: 665 ; line 213: 666 ; line 214: 667 ; line 215: 668 ; line 216: if( MOT_GOTO == ON ) { 000226 9A001800 R 669 JNB MOT_GOTO,?C0012 670 ; line 217: 671 ; line 218: if( MOTHO_RUN == ON ) { 00022A 9A000A00 R 672 JNB MOTHO_RUN,?C0013 673 ; line 219: 674 ; line 220: if( (long)CUR_HSTEPS_HO == (long)TRG_HSTEPS_HO ){ 00022E F2F45800 R 675 MOV R4,WORD TRG_HSTEPS_HO 000232 F2F55A00 R 676 MOV R5,WORD TRG_HSTEPS_HO+2 000236 22F45C00 R 677 SUB R4,WORD CUR_HSTEPS_HO 00023A 32F55E00 R 678 SUBC R5,WORD CUR_HSTEPS_HO+2 00023E 3D01 679 JMP cc_NZ,?C0013 680 ; line 221: MOTHO_RUN = OFF; 000240 0E00 R 681 BCLR MOTHO_RUN 682 ; line 222: } 683 ?C0013: 684 ; line 223: 685 ; line 224: } 686 ; line 225: 687 ; line 226: 688 ; line 227: if( MOTVE_RUN == ON ) { 000242 9A000A00 R 689 JNB MOTVE_RUN,?C0012 690 ; line 228: 691 ; line 229: if( (long)CUR_HSTEPS_VE == (long)TRG_HSTEPS_VE ){ 000246 F2F45000 R 692 MOV R4,WORD TRG_HSTEPS_VE 00024A F2F55200 R 693 MOV R5,WORD TRG_HSTEPS_VE+2 00024E 22F45400 R 694 SUB R4,WORD CUR_HSTEPS_VE 000252 32F55600 R 695 SUBC R5,WORD CUR_HSTEPS_VE+2 000256 3D01 696 JMP cc_NZ,?C0012 697 ; line 230: MOTVE_RUN = OFF; 000258 0E00 R 698 BCLR MOTVE_RUN 699 ; line 231: } 700 ; line 232: 701 ; line 233: } 702 ; line 234: 703 ; line 235: } 704 ?C0012: 705 ; line 236: 706 ; line 237: 707 ; line 238: 708 ; line 239: if( ( MOT_GOTO == ON ) || ( MOT_CORRECTION == ON ) ) { 00025A 8A000400 R 709 JB MOT_GOTO,?C0018 00025E 8A000200 R 710 JB MOT_CORRECTION,$+8 000262 EA000000 R 711 JMPA cc_UC,?C0017 712 ?C0018: 713 ; line 240: 714 ; line 241: 715 ; line 242: if( MOTHO_RUN == ON ) { 000266 9A004E00 R 716 JNB MOTHO_RUN,?C0019 A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 12 717 ; line 243: SPEED_HO_CT++; 00026A 248F3200 R 718 SUB SPEED_HO_CT,ONES 719 ; line 244: 720 ; line 245: if( SPEED_HO_CT >= SPEED_HO ){ 00026E F2F42600 R 721 MOV R4,WORD SPEED_HO 000272 42F43200 R 722 CMP R4,WORD SPEED_HO_CT 000276 AD47 723 JMP cc_SGT,?C0019 724 ; line 246: 725 ; line 247: SPEED_HO_CT = 0; 000278 F68E3200 R 726 MOV WORD SPEED_HO_CT,ZEROS 727 ; line 248: 728 ; line 249: 729 ; line 250: if( MOTHO_DIR == LEFT ) { 00027C 9A001C00 R 730 JNB MOTHO_DIR,?C0021 731 ; line 251: HSTEP_HO--; 000280 048F0000 R 732 ADD HSTEP_HO,ONES 733 ; line 252: if( HSTEP_HO < 0 ){ 000284 F2F40000 R 734 MOV R4,WORD HSTEP_HO 000288 7D03 735 JMP cc_NN,?C0022 736 ; line 253: HSTEP_HO = 7; 00028A E074 737 MOV R4,#7 00028C F6F40000 R 738 MOV WORD HSTEP_HO,R4 739 ; line 254: } 740 ?C0022: 741 ; line 255: 742 ; line 256: CUR_HSTEPS_HO = (long)CUR_HSTEPS_HO - (lon g)1; 000290 048F5C00 R 743 ADD CUR_HSTEPS_HO,ONES 000294 148F5E00 R 744 ADDC CUR_HSTEPS_HO+2,ONES 745 ; line 257: 746 ; line 258: if( CUR_HSTEPS_HO < (long)0 ){ 000298 F2F45C00 R 747 MOV R4,WORD CUR_HSTEPS_HO 00029C F2F55E00 R 748 MOV R5,WORD CUR_HSTEPS_HO+2 0002A0 2840 749 SUB R4,#0 0002A2 3850 750 SUBC R5,#0 0002A4 DD22 751 JMP cc_SGE,?C0024 752 ; line 259: CUR_HSTEPS_HO = (long)HSTEPSHO359; 0002A6 F2F46A00 R 753 MOV R4,WORD HSTEPSHO359 0002AA F2F56C00 R 754 MOV R5,WORD HSTEPSHO359+2 0002AE F6F45C00 R 755 MOV WORD CUR_HSTEPS_HO,R4 0002B2 F6F55E00 R 756 MOV WORD CUR_HSTEPS_HO+2,R5 757 ; line 260: } 0002B6 0D19 758 JMP cc_UC,?C0024 759 ?C0021: 760 ; line 261: 761 ; line 262: } 762 ; line 263: else { 763 ; line 264: HSTEP_HO++; 0002B8 248F0000 R 764 SUB HSTEP_HO,ONES 765 ; line 265: if( HSTEP_HO > 7 ){ 0002BC F2F40000 R 766 MOV R4,WORD HSTEP_HO 0002C0 4847 767 CMP R4,#7 0002C2 BD02 768 JMP cc_SLE,?C0025 769 ; line 266: HSTEP_HO = 0; 0002C4 F68E0000 R 770 MOV WORD HSTEP_HO,ZEROS 771 ; line 267: } 772 ?C0025: 773 ; line 268: 774 ; line 269: CUR_HSTEPS_HO = (long)CUR_HSTEPS_HO + (lon g)1; 0002C8 248F5C00 R 775 SUB CUR_HSTEPS_HO,ONES 0002CC 348F5E00 R 776 SUBC CUR_HSTEPS_HO+2,ONES 777 ; line 270: 778 ; line 271: if( CUR_HSTEPS_HO > (long)HSTEPSHO359 ){ 0002D0 F2F46A00 R 779 MOV R4,WORD HSTEPSHO359 0002D4 F2F56C00 R 780 MOV R5,WORD HSTEPSHO359+2 A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 13 0002D8 22F45C00 R 781 SUB R4,WORD CUR_HSTEPS_HO 0002DC 32F55E00 R 782 SUBC R5,WORD CUR_HSTEPS_HO+2 0002E0 DD04 783 JMP cc_SGE,?C0024 784 ; line 272: CUR_HSTEPS_HO = (long)0; 0002E2 F68E5C00 R 785 MOV WORD CUR_HSTEPS_HO,ZEROS 0002E6 F68E5E00 R 786 MOV WORD CUR_HSTEPS_HO+2,ZEROS 787 ; line 273: } 788 ?C0024: 789 ; line 274: } 790 ; line 275: 791 ; line 276: 792 ; line 277: #pragma ASM 793 ; line 278: MOV R7,#hsteps 0002EA E6F76000 R 794 MOV R7,#hsteps 795 ; line 279: ADD R7,HSTEP_HO 0002EE 02F70000 R 796 ADD R7,HSTEP_HO 797 ; line 280: MOVB RL6,[R7] 0002F2 A9C7 798 MOVB RL6,[R7] 799 ; line 281: ANDB RL6,#15 0002F4 67FC0F00 800 ANDB RL6,#15 801 ; line 282: MOVB RL5,P7 0002F8 F3FAD0FF 802 MOVB RL5,P7 803 ; line 283: ANDB RL5,#240 0002FC 67FAF000 804 ANDB RL5,#240 805 ; line 284: ORB RL6,RL5 000300 71CA 806 ORB RL6,RL5 807 ; line 285: MOVB P7,RL6 000302 F7FCD0FF 808 MOVB P7,RL6 809 ; line 286: #pragma ENDASM 810 ; line 287: 811 ; line 288: 812 ; line 289: } 813 ?C0019: 814 ; line 290: } 815 ; line 291: 816 ; line 292: 817 ; line 293: 818 ; line 294: if( MOTVE_RUN == ON ) { 000306 9A003200 R 819 JNB MOTVE_RUN,?C0027 820 ; line 295: SPEED_VE_CT++; 00030A 248F2C00 R 821 SUB SPEED_VE_CT,ONES 822 ; line 296: if( SPEED_VE_CT >= SPEED_VE ){ 00030E F2F40E00 R 823 MOV R4,WORD SPEED_VE 000312 42F42C00 R 824 CMP R4,WORD SPEED_VE_CT 000316 AD2B 825 JMP cc_SGT,?C0027 826 ; line 297: SPEED_VE_CT = 0; 000318 F68E2C00 R 827 MOV WORD SPEED_VE_CT,ZEROS 828 ; line 298: 829 ; line 299: 830 ; line 300: if( MOTVE_DIR == DOWN ) { 00031C 9A000D00 R 831 JNB MOTVE_DIR,?C0029 832 ; line 301: HSTEP_VE--; 000320 048F8200 R 833 ADD HSTEP_VE,ONES 834 ; line 302: if( HSTEP_VE < 0 ){ 000324 F2F48200 R 835 MOV R4,WORD HSTEP_VE 000328 7D03 836 JMP cc_NN,?C0030 837 ; line 303: HSTEP_VE = 7; 00032A E074 838 MOV R4,#7 00032C F6F48200 R 839 MOV WORD HSTEP_VE,R4 840 ; line 304: } 841 ?C0030: 842 ; line 305: 843 ; line 306: CUR_HSTEPS_VE = (long)CUR_HSTEPS_VE - (lon g)1; 000330 048F5400 R 844 ADD CUR_HSTEPS_VE,ONES 000334 148F5600 R 845 ADDC CUR_HSTEPS_VE+2,ONES A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 14 846 ; line 307: } 000338 0D0C 847 JMP cc_UC,?C0031 848 ?C0029: 849 ; line 308: else { 850 ; line 309: HSTEP_VE++; 00033A 248F8200 R 851 SUB HSTEP_VE,ONES 852 ; line 310: if( HSTEP_VE > 7 ){ 00033E F2F48200 R 853 MOV R4,WORD HSTEP_VE 000342 4847 854 CMP R4,#7 000344 BD02 855 JMP cc_SLE,?C0032 856 ; line 311: HSTEP_VE = 0; 000346 F68E8200 R 857 MOV WORD HSTEP_VE,ZEROS 858 ; line 312: } 859 ?C0032: 860 ; line 313: 861 ; line 314: CUR_HSTEPS_VE = (long)CUR_HSTEPS_VE + (lon g)1; 00034A 248F5400 R 862 SUB CUR_HSTEPS_VE,ONES 00034E 348F5600 R 863 SUBC CUR_HSTEPS_VE+2,ONES 864 ; line 315: } 865 ?C0031: 866 ; line 316: 867 ; line 317: 868 ; line 318: #pragma ASM 869 ; line 319: MOV R7,#hsteps 000352 E6F76000 R 870 MOV R7,#hsteps 871 ; line 320: ADD R7,HSTEP_VE 000356 02F78200 R 872 ADD R7,HSTEP_VE 873 ; line 321: MOVB RL6,[R7] 00035A A9C7 874 MOVB RL6,[R7] 875 ; line 322: ANDB RL6,#240 00035C 67FCF000 876 ANDB RL6,#240 877 ; line 323: MOVB RL5,P7 000360 F3FAD0FF 878 MOVB RL5,P7 879 ; line 324: ANDB RL5,#15 000364 67FA0F00 880 ANDB RL5,#15 881 ; line 325: ORB RL6,RL5 000368 71CA 882 ORB RL6,RL5 883 ; line 326: MOVB P7,RL6 00036A F7FCD0FF 884 MOVB P7,RL6 885 ; line 327: #pragma ENDASM 886 ; line 328: 887 ; line 329: 888 ; line 330: 889 ; line 331: } 890 ?C0027: 891 ; line 332: 892 ; line 333: } 893 ; line 334: 894 ; line 335: 895 ; line 336: 896 ; line 337: if( ( MOTFR_USE == ON ) && ( MOT_GOTO == ON ) ){ 00036E 9A002C00 R 897 JNB MOTFR_USE,?C0017 000372 9A002A00 R 898 JNB MOT_GOTO,?C0017 899 ; line 338: SPEED_FR_CT++; 000376 248F3000 R 900 SUB SPEED_FR_CT,ONES 901 ; line 339: if( SPEED_FR_CT >= SPEED_FR ){ 00037A F2F42400 R 902 MOV R4,WORD SPEED_FR 00037E 42F43000 R 903 CMP R4,WORD SPEED_FR_CT 000382 AD23 904 JMP cc_SGT,?C0017 905 ; line 340: SPEED_FR_CT = 0; 000384 F68E3000 R 906 MOV WORD SPEED_FR_CT,ZEROS 907 ; line 341: 908 ; line 342: 909 ; line 343: if( MOTFR_DIR == LEFT ) { 000388 9A000900 R 910 JNB MOTFR_DIR,?C0035 A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 15 911 ; line 344: HSTEP_FR--; 00038C 048F8A00 R 912 ADD HSTEP_FR,ONES 913 ; line 345: if( HSTEP_FR < 0 ){ 000390 F2F48A00 R 914 MOV R4,WORD HSTEP_FR 000394 7D0C 915 JMP cc_NN,?C0037 916 ; line 346: HSTEP_FR = 7; 000396 E074 917 MOV R4,#7 000398 F6F48A00 R 918 MOV WORD HSTEP_FR,R4 919 ; line 347: } 00039C 0D08 920 JMP cc_UC,?C0037 921 ?C0035: 922 ; line 348: 923 ; line 349: } 924 ; line 350: else { 925 ; line 351: HSTEP_FR++; 00039E 248F8A00 R 926 SUB HSTEP_FR,ONES 927 ; line 352: if( HSTEP_FR > 7 ){ 0003A2 F2F48A00 R 928 MOV R4,WORD HSTEP_FR 0003A6 4847 929 CMP R4,#7 0003A8 BD02 930 JMP cc_SLE,?C0037 931 ; line 353: HSTEP_FR = 0; 0003AA F68E8A00 R 932 MOV WORD HSTEP_FR,ZEROS 933 ; line 354: } 934 ?C0037: 935 ; line 355: 936 ; line 356: } 937 ; line 357: 938 ; line 358: #pragma ASM 939 ; line 359: MOV R7,#hsteps 0003AE E6F76000 R 940 MOV R7,#hsteps 941 ; line 360: ADD R7,HSTEP_FR 0003B2 02F78A00 R 942 ADD R7,HSTEP_FR 943 ; line 361: MOVB RL6,[R7] 0003B6 A9C7 944 MOVB RL6,[R7] 945 ; line 362: ANDB RL6,#15 0003B8 67FC0F00 946 ANDB RL6,#15 947 ; line 363: MOVB RL5,P8 0003BC F3FAD4FF 948 MOVB RL5,P8 949 ; line 364: ANDB RL5,#240 0003C0 67FAF000 950 ANDB RL5,#240 951 ; line 365: ORB RL6,RL5 0003C4 71CA 952 ORB RL6,RL5 953 ; line 366: MOVB P8,RL6 0003C6 F7FCD4FF 954 MOVB P8,RL6 955 ; line 367: #pragma ENDASM 956 ; line 368: 957 ; line 369: 958 ; line 370: 959 ; line 371: } 960 ; line 372: 961 ; line 373: 962 ; line 374: } 963 ; line 375: 964 ; line 376: } 965 ?C0017: 966 ; line 377: 967 ; line 378: 968 ; line 379: } 0003CA FC07 969 POP MDL 0003CC FC06 970 POP MDH 0003CE FC87 971 POP MDC 0003D0 FC00 972 POP DPP0 0003D2 FC08 973 POP CP 0003D4 FC03 974 POP DPP3 0003D6 FB88 975 RETI 976 ; FUNCTION timer_int (END RMASK = @0x3FFF) A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 16 977 timer_int ENDP 978 ; line 380: 979 ; line 381: 980 ; line 382: 981 ; line 383: 982 ; line 384: void initEncoderInts(void) { 983 984 initEncoderInts PROC FAR 985 PUBLIC initEncoderInts 986 ; FUNCTION initEncoderInts (BEGIN RMASK = @0x8000) 987 ; line 385: 988 ; line 386: DP2_8 = INPUT; 0003D8 8EE1 989 BCLR DP2_8 990 ; line 387: DP2_9 = INPUT; 0003DA 9EE1 991 BCLR DP2_9 992 ; line 388: DP2_10 = INPUT; 0003DC AEE1 993 BCLR DP2_10 994 ; line 389: DP2_11 = INPUT; 0003DE BEE1 995 BCLR DP2_11 996 ; line 390: 997 ; line 391: CC8IC = ENC1_0INTOFF; 0003E0 E6C4B700 998 MOV CC8IC,#183 999 ; line 392: CC9IC = ENC1_1INTOFF; 0003E4 E6C5B300 1000 MOV CC9IC,#179 1001 ; line 393: CC10IC = ENC2_0INTOFF; 0003E8 E6C6AF00 1002 MOV CC10IC,#175 1003 ; line 394: CC11IC = ENC2_1INTOFF; 0003EC E6C7AB00 1004 MOV CC11IC,#171 1005 ; line 395: 1006 ; line 396: EXICON = 0x00ff; 0003F0 D180 1007 EXTR #1 0003F2 E6E0FF00 1008 MOV EXICON,#255 1009 ; line 397: } 0003F6 DB00 1010 RETS 1011 ; FUNCTION initEncoderInts (END RMASK = @0x8000) 1012 initEncoderInts ENDP 1013 ; line 398: 1014 ; line 399: 1015 ; line 400: 1016 ; line 401: void startEncoderIntsHo(void) { 1017 1018 startEncoderIntsHo PROC FAR 1019 PUBLIC startEncoderIntsHo 1020 ; FUNCTION startEncoderIntsHo (BEGIN RMASK = @0x8000) 1021 ; line 402: 1022 ; line 403: ENCHO_COR = OFF; 0003F8 0E00 R 1023 BCLR ENCHO_COR 1024 ; line 404: ENCHO_DIR = RIGHT; 0003FA 0E00 R 1025 BCLR ENCHO_DIR 1026 ; line 405: 1027 ; line 406: CC8IC = ENC1_0INTON; 0003FC E6C4F700 1028 MOV CC8IC,#247 1029 ; line 407: CC9IC = ENC1_1INTON; 000400 E6C5F300 1030 MOV CC9IC,#243 1031 ; line 408: 1032 ; line 409: } 000404 DB00 1033 RETS 1034 ; FUNCTION startEncoderIntsHo (END RMASK = @0x8000) 1035 startEncoderIntsHo ENDP 1036 ; line 410: 1037 ; line 411: 1038 ; line 412: void startEncoderIntsVe(void) { 1039 1040 startEncoderIntsVe PROC FAR 1041 PUBLIC startEncoderIntsVe 1042 ; FUNCTION startEncoderIntsVe (BEGIN RMASK = @0x8000) A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 17 1043 ; line 413: 1044 ; line 414: ENCVE_COR = OFF; 000406 0E00 R 1045 BCLR ENCVE_COR 1046 ; line 415: ENCVE_DIR = UP; 000408 0E00 R 1047 BCLR ENCVE_DIR 1048 ; line 416: 1049 ; line 417: CC10IC = ENC2_0INTON; 00040A E6C6EF00 1050 MOV CC10IC,#239 1051 ; line 418: CC11IC = ENC2_1INTON; 00040E E6C7EB00 1052 MOV CC11IC,#235 1053 ; line 419: 1054 ; line 420: } 000412 DB00 1055 RETS 1056 ; FUNCTION startEncoderIntsVe (END RMASK = @0x8000) 1057 startEncoderIntsVe ENDP 1058 ; line 421: 1059 ; line 422: 1060 ; line 423: 1061 ; line 424: void stopEncoderInts(void) { 1062 1063 stopEncoderInts PROC FAR 1064 PUBLIC stopEncoderInts 1065 ; FUNCTION stopEncoderInts (BEGIN RMASK = @0x8000) 1066 ; line 425: 1067 ; line 426: CC8IC = ENC1_0INTOFF; 000414 E6C4B700 1068 MOV CC8IC,#183 1069 ; line 427: CC9IC = ENC1_1INTOFF; 000418 E6C5B300 1070 MOV CC9IC,#179 1071 ; line 428: CC10IC = ENC2_0INTOFF; 00041C E6C6AF00 1072 MOV CC10IC,#175 1073 ; line 429: CC11IC = ENC2_1INTOFF; 000420 E6C7AB00 1074 MOV CC11IC,#171 1075 ; line 430: 1076 ; line 431: ENCHO_COR = OFF; 000424 0E00 R 1077 BCLR ENCHO_COR 1078 ; line 432: ENCVE_COR = OFF; 000426 0E00 R 1079 BCLR ENCVE_COR 1080 ; line 433: 1081 ; line 434: } 000428 DB00 1082 RETS 1083 ; FUNCTION stopEncoderInts (END RMASK = @0x8000) 1084 stopEncoderInts ENDP 1085 ; line 435: 1086 ; line 436: 1087 ; line 437: 1088 ; line 438: 1089 ; line 439: 1090 ; line 440: void encoder1_0_int (void) interrupt ENCODER1_0_INT = 0x18 using ENCODER10_BAN K { 1091 1092 encoder1_0_int PROC INTERRUPT ENCODER1_0_INT = 24 USING ENCODER10_BANK 1093 GLOBAL encoder1_0_int 1094 ; FUNCTION encoder1_0_int (BEGIN RMASK = @0x0030) 00042A C6030300 1095 SCXT DPP3,#3 00042E CC00 1096 NOP 000430 F6F00000 R 1097 MOV ENCODER10_BANK,R0 000434 C6080000 R 1098 SCXT CP,#ENCODER10_BANK 000438 CC00 1099 NOP 1100 ; line 441: #pragma ASM 1101 ; line 442: 1102 ; line 443: jb P2.8,LENC10HIGH 00043A 8AE00380 1103 jb P2.8,LENC10HIGH 1104 ; line 444: 1105 ; line 445: jnb P2.9,LENC10RIGHT 00043E 9AE01C90 1106 jnb P2.9,LENC10RIGHT 1107 ; line 446: A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 18 1108 ; line 447: JMPR cc_UC,LENC10LEFT 000442 0D02 1109 JMPR cc_UC,LENC10LEFT 1110 ; line 448: LENC10HIGH: 1111 LENC10HIGH: 1112 ; line 449: 1113 ; line 450: jb P2.9,LENC10RIGHT 000444 8AE01990 1114 jb P2.9,LENC10RIGHT 1115 ; line 451: 1116 ; line 452: LENC10LEFT: 1117 LENC10LEFT: 1118 ; line 453: 1119 ; line 454: BSET ENC_FLAGS.4 000448 0F00 R 1120 BSET ENC_FLAGS.4 1121 ; line 455: 1122 ; line 456: #pragma ENDASM 1123 ; line 457: ENC_ARC10_HO = (long)ENC_ARC10_HO - (long)ARC10PERENCHO; 00044A F2F46E00 R 1124 MOV R4,WORD ARC10PERENCHO 00044E F054 1125 MOV R5,R4 000450 BCF5 1126 ASHR R5,#15 000452 24F42800 R 1127 SUB WORD ENC_ARC10_HO,R4 000456 34F52A00 R 1128 SUBC WORD ENC_ARC10_HO+2,R5 1129 ; line 458: if( ENC_ARC10_HO < (long)0){ 00045A F2F42800 R 1130 MOV R4,WORD ENC_ARC10_HO 00045E F2F52A00 R 1131 MOV R5,WORD ENC_ARC10_HO+2 000462 2840 1132 SUB R4,#0 000464 3850 1133 SUBC R5,#0 000466 DD08 1134 JMP cc_SGE,?C0039 1135 ; line 459: ENC_ARC10_HO = (long)12960000 + (long)ENC_ARC10_HO; 000468 E6F400C1 1136 MOV R4,#49408 00046C E6F5C500 1137 MOV R5,#197 000470 04F42800 R 1138 ADD WORD ENC_ARC10_HO,R4 000474 14F52A00 R 1139 ADDC WORD ENC_ARC10_HO+2,R5 1140 ; line 460: // ENC_ARC10_HO = (long)12959999 + (long)ENC_ARC10_HO; 1141 ; line 461: } 1142 ?C0039: 1143 ; line 462: #pragma ASM 1144 ; line 463: 1145 ; line 464: jmpr cc_UC,LENC10END 000478 0D1A 1146 jmpr cc_UC,LENC10END 1147 ; line 465: LENC10RIGHT: 1148 LENC10RIGHT: 1149 ; line 466: 1150 ; line 467: BCLR ENC_FLAGS.4 00047A 0E00 R 1151 BCLR ENC_FLAGS.4 1152 ; line 468: 1153 ; line 469: #pragma ENDASM 1154 ; line 470: ENC_ARC10_HO = (long)ENC_ARC10_HO + (long)ARC10PERENCHO; 00047C F2F46E00 R 1155 MOV R4,WORD ARC10PERENCHO 000480 F054 1156 MOV R5,R4 000482 BCF5 1157 ASHR R5,#15 000484 04F42800 R 1158 ADD WORD ENC_ARC10_HO,R4 000488 14F52A00 R 1159 ADDC WORD ENC_ARC10_HO+2,R5 1160 ; line 471: if( ENC_ARC10_HO > (long)12959999 ){ 00048C F2F42800 R 1161 MOV R4,WORD ENC_ARC10_HO 000490 F2F52A00 R 1162 MOV R5,WORD ENC_ARC10_HO+2 000494 26F4FFC0 1163 SUB R4,#49407 000498 36F5C500 1164 SUBC R5,#197 00049C BD08 1165 JMP cc_SLE,?C0040 1166 ; line 472: ENC_ARC10_HO = (long)ENC_ARC10_HO - (long)12960000; 00049E E6F400C1 1167 MOV R4,#49408 0004A2 E6F5C500 1168 MOV R5,#197 0004A6 24F42800 R 1169 SUB WORD ENC_ARC10_HO,R4 0004AA 34F52A00 R 1170 SUBC WORD ENC_ARC10_HO+2,R5 1171 ; line 473: // ENC_ARC10_HO = (long)ENC_ARC10_HO - (long)12959999; 1172 ; line 474: } A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 19 1173 ?C0040: 1174 ; line 475: #pragma ASM 1175 ; line 476: 1176 ; line 477: 1177 ; line 478: LENC10END: 1178 LENC10END: 1179 ; line 479: BSET ENC_FLAGS.2 0004AE 0F00 R 1180 BSET ENC_FLAGS.2 1181 ; line 480: #pragma ENDASM 1182 ; line 481: // max ~4us 1183 ; line 482: } 0004B0 FC08 1184 POP CP 0004B2 FC03 1185 POP DPP3 0004B4 FB88 1186 RETI 1187 ; FUNCTION encoder1_0_int (END RMASK = @0x0030) 1188 encoder1_0_int ENDP 1189 ; line 483: 1190 ; line 484: 1191 ; line 485: 1192 ; line 486: 1193 ; line 487: void encoder1_1_int (void) interrupt ENCODER1_1_INT = 0x19 using ENCODER11_BAN K { 1194 1195 encoder1_1_int PROC INTERRUPT ENCODER1_1_INT = 25 USING ENCODER11_BANK 1196 GLOBAL encoder1_1_int 1197 ; FUNCTION encoder1_1_int (BEGIN RMASK = @0x0030) 0004B6 C6030300 1198 SCXT DPP3,#3 0004BA CC00 1199 NOP 0004BC F6F00000 R 1200 MOV ENCODER11_BANK,R0 0004C0 C6080000 R 1201 SCXT CP,#ENCODER11_BANK 0004C4 CC00 1202 NOP 1203 ; line 488: #pragma ASM 1204 ; line 489: 1205 ; line 490: jb P2.9,LENC11HIGH 0004C6 8AE00390 1206 jb P2.9,LENC11HIGH 1207 ; line 491: 1208 ; line 492: jb P2.8,LENC11RIGHT 0004CA 8AE01C80 1209 jb P2.8,LENC11RIGHT 1210 ; line 493: 1211 ; line 494: JMPR cc_UC,LENC11LEFT 0004CE 0D02 1212 JMPR cc_UC,LENC11LEFT 1213 ; line 495: LENC11HIGH: 1214 LENC11HIGH: 1215 ; line 496: 1216 ; line 497: jnb P2.8,LENC11RIGHT 0004D0 9AE01980 1217 jnb P2.8,LENC11RIGHT 1218 ; line 498: 1219 ; line 499: LENC11LEFT: 1220 LENC11LEFT: 1221 ; line 500: 1222 ; line 501: BSET ENC_FLAGS.4 0004D4 0F00 R 1223 BSET ENC_FLAGS.4 1224 ; line 502: 1225 ; line 503: #pragma ENDASM 1226 ; line 504: ENC_ARC10_HO = (long)ENC_ARC10_HO - (long)ARC10PERENCHO; 0004D6 F2F46E00 R 1227 MOV R4,WORD ARC10PERENCHO 0004DA F054 1228 MOV R5,R4 0004DC BCF5 1229 ASHR R5,#15 0004DE 24F42800 R 1230 SUB WORD ENC_ARC10_HO,R4 0004E2 34F52A00 R 1231 SUBC WORD ENC_ARC10_HO+2,R5 1232 ; line 505: if( ENC_ARC10_HO < (long)0){ 0004E6 F2F42800 R 1233 MOV R4,WORD ENC_ARC10_HO 0004EA F2F52A00 R 1234 MOV R5,WORD ENC_ARC10_HO+2 0004EE 2840 1235 SUB R4,#0 0004F0 3850 1236 SUBC R5,#0 0004F2 DD08 1237 JMP cc_SGE,?C0041 A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 20 1238 ; line 506: ENC_ARC10_HO = (long)12960000 + (long)ENC_ARC10_HO; 0004F4 E6F400C1 1239 MOV R4,#49408 0004F8 E6F5C500 1240 MOV R5,#197 0004FC 04F42800 R 1241 ADD WORD ENC_ARC10_HO,R4 000500 14F52A00 R 1242 ADDC WORD ENC_ARC10_HO+2,R5 1243 ; line 507: // ENC_ARC10_HO = (long)12959999 + (long)ENC_ARC10_HO; 1244 ; line 508: } 1245 ?C0041: 1246 ; line 509: #pragma ASM 1247 ; line 510: 1248 ; line 511: jmpr cc_UC,LENC11END 000504 0D1A 1249 jmpr cc_UC,LENC11END 1250 ; line 512: LENC11RIGHT: 1251 LENC11RIGHT: 1252 ; line 513: 1253 ; line 514: BCLR ENC_FLAGS.4 000506 0E00 R 1254 BCLR ENC_FLAGS.4 1255 ; line 515: 1256 ; line 516: #pragma ENDASM 1257 ; line 517: ENC_ARC10_HO = (long)ENC_ARC10_HO + (long)ARC10PERENCHO; 000508 F2F46E00 R 1258 MOV R4,WORD ARC10PERENCHO 00050C F054 1259 MOV R5,R4 00050E BCF5 1260 ASHR R5,#15 000510 04F42800 R 1261 ADD WORD ENC_ARC10_HO,R4 000514 14F52A00 R 1262 ADDC WORD ENC_ARC10_HO+2,R5 1263 ; line 518: if( ENC_ARC10_HO > (long)12959999 ){ 000518 F2F42800 R 1264 MOV R4,WORD ENC_ARC10_HO 00051C F2F52A00 R 1265 MOV R5,WORD ENC_ARC10_HO+2 000520 26F4FFC0 1266 SUB R4,#49407 000524 36F5C500 1267 SUBC R5,#197 000528 BD08 1268 JMP cc_SLE,?C0042 1269 ; line 519: ENC_ARC10_HO = (long)ENC_ARC10_HO - (long)12960000; 00052A E6F400C1 1270 MOV R4,#49408 00052E E6F5C500 1271 MOV R5,#197 000532 24F42800 R 1272 SUB WORD ENC_ARC10_HO,R4 000536 34F52A00 R 1273 SUBC WORD ENC_ARC10_HO+2,R5 1274 ; line 520: // ENC_ARC10_HO = (long)ENC_ARC10_HO - (long)12959999; 1275 ; line 521: } 1276 ?C0042: 1277 ; line 522: #pragma ASM 1278 ; line 523: 1279 ; line 524: LENC11END: 1280 LENC11END: 1281 ; line 525: BSET ENC_FLAGS.2 00053A 0F00 R 1282 BSET ENC_FLAGS.2 1283 ; line 526: #pragma ENDASM 1284 ; line 527: 1285 ; line 528: } 00053C FC08 1286 POP CP 00053E FC03 1287 POP DPP3 000540 FB88 1288 RETI 1289 ; FUNCTION encoder1_1_int (END RMASK = @0x0030) 1290 encoder1_1_int ENDP 1291 ; line 529: 1292 ; line 530: 1293 ; line 531: 1294 ; line 532: 1295 ; line 533: void encoder2_0_int (void) interrupt ENCODER2_0_INT = 0x1A using ENCODER20_BAN K { 1296 1297 encoder2_0_int PROC INTERRUPT ENCODER2_0_INT = 26 USING ENCODER20_BANK 1298 GLOBAL encoder2_0_int 1299 ; FUNCTION encoder2_0_int (BEGIN RMASK = @0x0030) 000542 C6030300 1300 SCXT DPP3,#3 000546 CC00 1301 NOP A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 21 000548 F6F00000 R 1302 MOV ENCODER20_BANK,R0 00054C C6080000 R 1303 SCXT CP,#ENCODER20_BANK 000550 CC00 1304 NOP 1305 ; line 534: #pragma ASM 1306 ; line 535: 1307 ; line 536: jb P2.10,LENC20HIGH 000552 8AE003A0 1308 jb P2.10,LENC20HIGH 1309 ; line 537: 1310 ; line 538: jb P2.11,LENC20RIGHT 000556 8AE00DB0 1311 jb P2.11,LENC20RIGHT 1312 ; line 539: 1313 ; line 540: JMPR cc_UC,LENC20LEFT 00055A 0D02 1314 JMPR cc_UC,LENC20LEFT 1315 ; line 541: LENC20HIGH: 1316 LENC20HIGH: 1317 ; line 542: 1318 ; line 543: jnb P2.11,LENC20RIGHT 00055C 9AE00AB0 1319 jnb P2.11,LENC20RIGHT 1320 ; line 544: 1321 ; line 545: LENC20LEFT: 1322 LENC20LEFT: 1323 ; line 546: 1324 ; line 547: BSET ENC_FLAGS.5 000560 0F00 R 1325 BSET ENC_FLAGS.5 1326 ; line 548: 1327 ; line 549: #pragma ENDASM 1328 ; line 550: ENC_ARC10_VE = (long)ENC_ARC10_VE - (long)ARC10PERENCVE; 000562 F2F46800 R 1329 MOV R4,WORD ARC10PERENCVE 000566 F054 1330 MOV R5,R4 000568 BCF5 1331 ASHR R5,#15 00056A 24F42000 R 1332 SUB WORD ENC_ARC10_VE,R4 00056E 34F52200 R 1333 SUBC WORD ENC_ARC10_VE+2,R5 1334 ; line 551: #pragma ASM 1335 ; line 552: 1336 ; line 553: jmpr cc_UC,LENC20END 000572 0D09 1337 jmpr cc_UC,LENC20END 1338 ; line 554: LENC20RIGHT: 1339 LENC20RIGHT: 1340 ; line 555: 1341 ; line 556: BCLR ENC_FLAGS.5 000574 0E00 R 1342 BCLR ENC_FLAGS.5 1343 ; line 557: 1344 ; line 558: #pragma ENDASM 1345 ; line 559: ENC_ARC10_VE = (long)ENC_ARC10_VE + (long)ARC10PERENCVE; 000576 F2F46800 R 1346 MOV R4,WORD ARC10PERENCVE 00057A F054 1347 MOV R5,R4 00057C BCF5 1348 ASHR R5,#15 00057E 04F42000 R 1349 ADD WORD ENC_ARC10_VE,R4 000582 14F52200 R 1350 ADDC WORD ENC_ARC10_VE+2,R5 1351 ; line 560: #pragma ASM 1352 ; line 561: 1353 ; line 562: LENC20END: 1354 LENC20END: 1355 ; line 563: BSET ENC_FLAGS.3 000586 0F00 R 1356 BSET ENC_FLAGS.3 1357 ; line 564: #pragma ENDASM 1358 ; line 565: 1359 ; line 566: //max 3.2 us 1360 ; line 567: } 000588 FC08 1361 POP CP 00058A FC03 1362 POP DPP3 00058C FB88 1363 RETI 1364 ; FUNCTION encoder2_0_int (END RMASK = @0x0030) 1365 encoder2_0_int ENDP 1366 ; line 568: 1367 ; line 569: A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 22 1368 ; line 570: 1369 ; line 571: 1370 ; line 572: void encoder2_1_int (void) interrupt ENCODER2_1_INT = 0x1B using ENCODER21_BAN K { 1371 1372 encoder2_1_int PROC INTERRUPT ENCODER2_1_INT = 27 USING ENCODER21_BANK 1373 GLOBAL encoder2_1_int 1374 ; FUNCTION encoder2_1_int (BEGIN RMASK = @0x0030) 00058E C6030300 1375 SCXT DPP3,#3 000592 CC00 1376 NOP 000594 F6F00000 R 1377 MOV ENCODER21_BANK,R0 000598 C6080000 R 1378 SCXT CP,#ENCODER21_BANK 00059C CC00 1379 NOP 1380 ; line 573: 1381 ; line 574: #pragma ASM 1382 ; line 575: 1383 ; line 576: jb P2.11,LENC21HIGH 00059E 8AE003B0 1384 jb P2.11,LENC21HIGH 1385 ; line 577: 1386 ; line 578: jnb P2.10,LENC21RIGHT 0005A2 9AE00DA0 1387 jnb P2.10,LENC21RIGHT 1388 ; line 579: 1389 ; line 580: JMPR cc_UC,LENC21LEFT 0005A6 0D02 1390 JMPR cc_UC,LENC21LEFT 1391 ; line 581: LENC21HIGH: 1392 LENC21HIGH: 1393 ; line 582: 1394 ; line 583: jb P2.10,LENC21RIGHT 0005A8 8AE00AA0 1395 jb P2.10,LENC21RIGHT 1396 ; line 584: 1397 ; line 585: LENC21LEFT: 1398 LENC21LEFT: 1399 ; line 586: 1400 ; line 587: BSET ENC_FLAGS.5 0005AC 0F00 R 1401 BSET ENC_FLAGS.5 1402 ; line 588: 1403 ; line 589: #pragma ENDASM 1404 ; line 590: ENC_ARC10_VE = (long)ENC_ARC10_VE - (long)ARC10PERENCVE; 0005AE F2F46800 R 1405 MOV R4,WORD ARC10PERENCVE 0005B2 F054 1406 MOV R5,R4 0005B4 BCF5 1407 ASHR R5,#15 0005B6 24F42000 R 1408 SUB WORD ENC_ARC10_VE,R4 0005BA 34F52200 R 1409 SUBC WORD ENC_ARC10_VE+2,R5 1410 ; line 591: #pragma ASM 1411 ; line 592: jmpr cc_UC,LENC21END 0005BE 0D09 1412 jmpr cc_UC,LENC21END 1413 ; line 593: LENC21RIGHT: 1414 LENC21RIGHT: 1415 ; line 594: 1416 ; line 595: BCLR ENC_FLAGS.5 0005C0 0E00 R 1417 BCLR ENC_FLAGS.5 1418 ; line 596: 1419 ; line 597: #pragma ENDASM 1420 ; line 598: ENC_ARC10_VE = (long)ENC_ARC10_VE + (long)ARC10PERENCVE; 0005C2 F2F46800 R 1421 MOV R4,WORD ARC10PERENCVE 0005C6 F054 1422 MOV R5,R4 0005C8 BCF5 1423 ASHR R5,#15 0005CA 04F42000 R 1424 ADD WORD ENC_ARC10_VE,R4 0005CE 14F52200 R 1425 ADDC WORD ENC_ARC10_VE+2,R5 1426 ; line 599: #pragma ASM 1427 ; line 600: 1428 ; line 601: LENC21END: 1429 LENC21END: 1430 ; line 602: BSET ENC_FLAGS.3 0005D2 0F00 R 1431 BSET ENC_FLAGS.3 1432 ; line 603: #pragma ENDASM A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 23 1433 ; line 604: } 0005D4 FC08 1434 POP CP 0005D6 FC03 1435 POP DPP3 0005D8 FB88 1436 RETI 1437 ; FUNCTION encoder2_1_int (END RMASK = @0x0030) 1438 encoder2_1_int ENDP 1439 ?PR?INT ENDS 1440 1441 1442 ; line 605: 1443 ; line 606: 1444 ; line 607: #endif 1445 ; line 608: 1446 ; line 609: 1447 ; line 610: 1448 ; line 611: 1449 ; line 612: 1450 ; line 613: 1451 ; line 614: 1452 ; line 615: 1453 1454 END A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 24 SYMBOL TABLE LISTING ------ ----- ------- N A M E TYPE VALUE I ATTRIBUTES ?BD?INT. . . . . . ---- ---- SECTION ?C0001 . . . . . . NEAR D6H R SEC=?PR?INT ?C0008 . . . . . . NEAR 17EH R SEC=?PR?INT ?C0009 . . . . . . NEAR 17CH R SEC=?PR?INT ?C0010 . . . . . . NEAR 226H R SEC=?PR?INT ?C0011 . . . . . . NEAR 224H R SEC=?PR?INT ?C0012 . . . . . . NEAR 25AH R SEC=?PR?INT ?C0013 . . . . . . NEAR 242H R SEC=?PR?INT ?C0017 . . . . . . NEAR 3CAH R SEC=?PR?INT ?C0018 . . . . . . NEAR 266H R SEC=?PR?INT ?C0019 . . . . . . NEAR 306H R SEC=?PR?INT ?C0021 . . . . . . NEAR 2B8H R SEC=?PR?INT ?C0022 . . . . . . NEAR 290H R SEC=?PR?INT ?C0024 . . . . . . NEAR 2EAH R SEC=?PR?INT ?C0025 . . . . . . NEAR 2C8H R SEC=?PR?INT ?C0027 . . . . . . NEAR 36EH R SEC=?PR?INT ?C0029 . . . . . . NEAR 33AH R SEC=?PR?INT ?C0030 . . . . . . NEAR 330H R SEC=?PR?INT ?C0031 . . . . . . NEAR 352H R SEC=?PR?INT ?C0032 . . . . . . NEAR 34AH R SEC=?PR?INT ?C0035 . . . . . . NEAR 39EH R SEC=?PR?INT ?C0037 . . . . . . NEAR 3AEH R SEC=?PR?INT ?C0039 . . . . . . NEAR 478H R SEC=?PR?INT ?C0040 . . . . . . NEAR 4AEH R SEC=?PR?INT ?C0041 . . . . . . NEAR 504H R SEC=?PR?INT ?C0042 . . . . . . NEAR 53AH R SEC=?PR?INT ?C_CASTD . . . . . FAR ---- EXT ?C_DCAST . . . . . FAR ---- EXT ?C_DPDIV . . . . . FAR ---- EXT ?C_INITSEC . . . . ---- ---- SECTION ?ID?INT. . . . . . ---- ---- SECTION ?PR?INT. . . . . . ---- ---- SECTION ADCIC. . . . . . . WORD FF98H A SFR ADCON. . . . . . . WORD FFA0H A SFR ADEIC. . . . . . . WORD FF9AH A SFR ARC10PERENCHO. . . WORD 6EH R PUB SEC=?ID?INT ARC10PERENCVE. . . WORD 68H R PUB SEC=?ID?INT BUSCON0. . . . . . WORD FF0CH A SFR BUSCON1. . . . . . WORD FF14H A SFR BUSCON2. . . . . . WORD FF16H A SFR BUSCON3. . . . . . WORD FF18H A SFR BUSCON4. . . . . . WORD FF1AH A SFR CC0IC. . . . . . . WORD FF78H A SFR CC10IC . . . . . . WORD FF8CH A SFR CC11IC . . . . . . WORD FF8EH A SFR CC12IC . . . . . . WORD FF90H A SFR CC13IC . . . . . . WORD FF92H A SFR CC14IC . . . . . . WORD FF94H A SFR CC15IC . . . . . . WORD FF96H A SFR CC16IC . . . . . . WORD F160H A ESF CC17IC . . . . . . WORD F162H A ESF CC18IC . . . . . . WORD F164H A ESF CC19IC . . . . . . WORD F166H A ESF CC1IC. . . . . . . WORD FF7AH A SFR CC20IC . . . . . . WORD F168H A ESF CC21IC . . . . . . WORD F16AH A ESF CC22IC . . . . . . WORD F16CH A ESF CC23IC . . . . . . WORD F16EH A ESF CC24IC . . . . . . WORD F170H A ESF CC25IC . . . . . . WORD F172H A ESF A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 25 CC26IC . . . . . . WORD F174H A ESF CC27IC . . . . . . WORD F176H A ESF CC28IC . . . . . . WORD F178H A ESF CC29IC . . . . . . WORD F184H A ESF CC2IC. . . . . . . WORD FF7CH A SFR CC30IC . . . . . . WORD F18CH A ESF CC31IC . . . . . . WORD F194H A ESF CC3IC. . . . . . . WORD FF7EH A SFR CC4IC. . . . . . . WORD FF80H A SFR CC5IC. . . . . . . WORD FF82H A SFR CC6IC. . . . . . . WORD FF84H A SFR CC7IC. . . . . . . WORD FF86H A SFR CC8IC. . . . . . . WORD FF88H A SFR CC9IC. . . . . . . WORD FF8AH A SFR CCM0 . . . . . . . WORD FF52H A SFR CCM1 . . . . . . . WORD FF54H A SFR CCM2 . . . . . . . WORD FF56H A SFR CCM3 . . . . . . . WORD FF58H A SFR CCM4 . . . . . . . WORD FF22H A SFR CCM5 . . . . . . . WORD FF24H A SFR CCM6 . . . . . . . WORD FF26H A SFR CCM7 . . . . . . . WORD FF28H A SFR CFG_ENC_HO . . . . WORD 84H R PUB SEC=?ID?INT CFG_ENC_VE . . . . WORD 80H R PUB SEC=?ID?INT CFG_HSTS_FR. . . . WORD 10H R PUB SEC=?ID?INT CFG_HSTS_HO. . . . WORD 18H R PUB SEC=?ID?INT CFG_HSTS_VE. . . . WORD 6H R PUB SEC=?ID?INT CP . . . . . . . . WORD FE10H A SFR CRIC . . . . . . . WORD FF6AH A SFR CUR_ARC10_HO . . . WORD 2H R PUB SEC=?ID?INT CUR_ARC10_VE . . . WORD 86H R PUB SEC=?ID?INT CUR_HSTEPS_HO. . . WORD 5CH R PUB SEC=?ID?INT CUR_HSTEPS_VE. . . WORD 54H R PUB SEC=?ID?INT DAY. . . . . . . . WORD 34H R PUB SEC=?ID?INT DITMP1 . . . . . . WORD 48H R PUB SEC=?ID?INT DITMP2 . . . . . . WORD 40H R PUB SEC=?ID?INT DP2. . . . . . . . WORD FFC2H A SFR DP2_10 . . . . . . BIT E1H.10 A DP2_11 . . . . . . BIT E1H.11 A DP2_8. . . . . . . BIT E1H.8 A DP2_9. . . . . . . BIT E1H.9 A DP3. . . . . . . . WORD FFC6H A SFR DP7. . . . . . . . WORD FFD2H A SFR DP8. . . . . . . . WORD FFD6H A SFR DPP0 . . . . . . . WORD FE00H A SFR DPP3 . . . . . . . WORD FE06H A SFR ENCHO_COR. . . . . BIT 18 R PUB SEC=?BD?INT ENCHO_CORUSE . . . BIT 22 R PUB SEC=?BD?INT ENCHO_DIR. . . . . BIT 20 R PUB SEC=?BD?INT ENCHO_USE. . . . . BIT 16 R PUB SEC=?BD?INT ENCODER10_BANK . . ---- ---- REGBANK ENCODER11_BANK . . ---- ---- REGBANK ENCODER1_0_INT . . INTNO 0018H ENCODER1_1_INT . . INTNO 0019H ENCODER20_BANK . . ---- ---- REGBANK ENCODER21_BANK . . ---- ---- REGBANK ENCODER2_0_INT . . INTNO 001AH ENCODER2_1_INT . . INTNO 001BH ENCVE_COR. . . . . BIT 19 R PUB SEC=?BD?INT ENCVE_CORUSE . . . BIT 23 R PUB SEC=?BD?INT ENCVE_DIR. . . . . BIT 21 R PUB SEC=?BD?INT ENCVE_USE. . . . . BIT 17 R PUB SEC=?BD?INT ENC_ARC10_HO . . . WORD 28H R PUB SEC=?ID?INT ENC_ARC10_VE . . . WORD 20H R PUB SEC=?ID?INT ENC_FLAGS. . . . . BYTE 1H R PUB SEC=?BD?INT EXICON . . . . . . WORD F1C0H A ESF A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 26 HOUR . . . . . . . WORD 38H R PUB SEC=?ID?INT HSTEPSHO090. . . . WORD 72H R PUB SEC=?ID?INT HSTEPSHO180. . . . WORD 76H R PUB SEC=?ID?INT HSTEPSHO270. . . . WORD 7AH R PUB SEC=?ID?INT HSTEPSHO359. . . . WORD 6AH R PUB SEC=?ID?INT HSTEP_FR . . . . . WORD 8AH R PUB SEC=?ID?INT HSTEP_HO . . . . . WORD 0H R PUB SEC=?ID?INT HSTEP_VE . . . . . WORD 82H R PUB SEC=?ID?INT ISNC . . . . . . . WORD F1DEH A ESF LENC10END. . . . . NEAR 4AEH R SEC=?PR?INT LENC10HIGH . . . . NEAR 444H R SEC=?PR?INT LENC10LEFT . . . . NEAR 448H R SEC=?PR?INT LENC10RIGHT. . . . NEAR 47AH R SEC=?PR?INT LENC11END. . . . . NEAR 53AH R SEC=?PR?INT LENC11HIGH . . . . NEAR 4D0H R SEC=?PR?INT LENC11LEFT . . . . NEAR 4D4H R SEC=?PR?INT LENC11RIGHT. . . . NEAR 506H R SEC=?PR?INT LENC20END. . . . . NEAR 586H R SEC=?PR?INT LENC20HIGH . . . . NEAR 55CH R SEC=?PR?INT LENC20LEFT . . . . NEAR 560H R SEC=?PR?INT LENC20RIGHT. . . . NEAR 574H R SEC=?PR?INT LENC21END. . . . . NEAR 5D2H R SEC=?PR?INT LENC21HIGH . . . . NEAR 5A8H R SEC=?PR?INT LENC21LEFT . . . . NEAR 5ACH R SEC=?PR?INT LENC21RIGHT. . . . NEAR 5C0H R SEC=?PR?INT MDC. . . . . . . . WORD FF0EH A SFR MDH. . . . . . . . WORD FE0CH A SFR MDL. . . . . . . . WORD FE0EH A SFR MINUTE . . . . . . WORD 36H R PUB SEC=?ID?INT MONTH. . . . . . . WORD 7EH R PUB SEC=?ID?INT MOTFR_DIR. . . . . BIT 5 R PUB SEC=?BD?INT MOTFR_USE. . . . . BIT 2 R PUB SEC=?BD?INT MOTHO_DIR. . . . . BIT 3 R PUB SEC=?BD?INT MOTHO_RUN. . . . . BIT 0 R PUB SEC=?BD?INT MOTVE_DIR. . . . . BIT 4 R PUB SEC=?BD?INT MOTVE_RUN. . . . . BIT 1 R PUB SEC=?BD?INT MOT_CORRECTION . . BIT 7 R PUB SEC=?BD?INT MOT_FLAGS. . . . . BYTE 0H R PUB SEC=?BD?INT MOT_GOTO . . . . . BIT 6 R PUB SEC=?BD?INT MSECOND. . . . . . WORD 70H R PUB SEC=?ID?INT ONES . . . . . . . WORD FF1EH A SFR P2 . . . . . . . . WORD FFC0H A SFR P3 . . . . . . . . WORD FFC4H A SFR P5 . . . . . . . . WORD FFA2H A SFR P7 . . . . . . . . WORD FFD0H A SFR P8 . . . . . . . . WORD FFD4H A SFR PSW. . . . . . . . WORD FF10H A SFR PWMCON0. . . . . . WORD FF30H A SFR PWMCON1. . . . . . WORD FF32H A SFR PWMIC. . . . . . . WORD F17EH A ESF S0CON. . . . . . . WORD FFB0H A SFR S0EIC. . . . . . . WORD FF70H A SFR S0RIC. . . . . . . WORD FF6EH A SFR S0TBIC . . . . . . WORD F19CH A ESF S0TIC. . . . . . . WORD FF6CH A SFR SDATA. . . . . . . ---- ---- GROUP SECOND . . . . . . WORD 3AH R PUB SEC=?ID?INT SPEED_FR . . . . . WORD 24H R PUB SEC=?ID?INT SPEED_FR_CT. . . . WORD 30H R PUB SEC=?ID?INT SPEED_HO . . . . . WORD 26H R PUB SEC=?ID?INT SPEED_HO_CT. . . . WORD 32H R PUB SEC=?ID?INT SPEED_VE . . . . . WORD EH R PUB SEC=?ID?INT SPEED_VE_CT. . . . WORD 2CH R PUB SEC=?ID?INT SSCCON . . . . . . WORD FFB2H A SFR SSCEIC . . . . . . WORD FF76H A SFR SSCRIC . . . . . . WORD FF74H A SFR A166 MACRO ASSEMBLER INT 08/28/03 20:15:50 PAGE 27 SSCTIC . . . . . . WORD FF72H A SFR SYSCON . . . . . . WORD FF12H A SFR T01CON . . . . . . WORD FF50H A SFR T0IC . . . . . . . WORD FF9CH A SFR T1IC . . . . . . . WORD FF9EH A SFR T2CON. . . . . . . WORD FF40H A SFR T2IC . . . . . . . WORD FF60H A SFR T3 . . . . . . . . WORD FE42H A SFR T3CON. . . . . . . WORD FF42H A SFR T3IC . . . . . . . WORD FF62H A SFR T4 . . . . . . . . WORD FE44H A SFR T4CON. . . . . . . WORD FF44H A SFR T4IC . . . . . . . WORD FF64H A SFR T5CON. . . . . . . WORD FF46H A SFR T5IC . . . . . . . WORD FF66H A SFR T6CON. . . . . . . WORD FF48H A SFR T6IC . . . . . . . WORD FF68H A SFR T78CON . . . . . . WORD FF20H A SFR T7IC . . . . . . . WORD F17AH A ESF T8IC . . . . . . . WORD F17CH A ESF TFR. . . . . . . . WORD FFACH A SFR THISMDAYS. . . . . WORD 3CH R PUB SEC=?ID?INT TIMER10. . . . . . WORD 2EH R PUB SEC=?ID?INT TIMER_BANK . . . . ---- ---- REGBANK TIMER_INT. . . . . INTNO 0023H TRG_HSTEPS_HO. . . WORD 58H R PUB SEC=?ID?INT TRG_HSTEPS_VE. . . WORD 50H R PUB SEC=?ID?INT WDTCON . . . . . . WORD FFAEH A SFR XP0IC. . . . . . . WORD F186H A ESF XP1IC. . . . . . . WORD F18EH A ESF XP2IC. . . . . . . WORD F196H A ESF XP3IC. . . . . . . WORD F19EH A ESF YEAR . . . . . . . WORD 3EH R PUB SEC=?ID?INT ZEROS. . . . . . . WORD FF1CH A SFR encoder1_0_int . . FAR 42AH R GLB SEC=?PR?INT encoder1_1_int . . FAR 4B6H R GLB SEC=?PR?INT encoder2_0_int . . FAR 542H R GLB SEC=?PR?INT encoder2_1_int . . FAR 58EH R GLB SEC=?PR?INT hsteps . . . . . . BYTE 60H R PUB SEC=?ID?INT initEncoderInts. . FAR 3D8H R PUB SEC=?PR?INT initTimerInt . . . FAR 0H R PUB SEC=?PR?INT modf . . . . . . . FAR ---- EXT startEncoderIntsHo FAR 3F8H R PUB SEC=?PR?INT startEncoderIntsVe FAR 406H R PUB SEC=?PR?INT startTimerInt. . . FAR 16H R PUB SEC=?PR?INT stopEncoderInts. . FAR 414H R PUB SEC=?PR?INT stopTimerInt . . . FAR 2CH R PUB SEC=?PR?INT timer_int. . . . . FAR 36H R GLB SEC=?PR?INT ASSEMBLY COMPLETE. 0 WARNING(S), 0 ERROR(S)