1 ;-------------------------------------------------------- 2 ; File Created by SDCC : free open source ANSI-C Compiler 3 ; Version 3.2.0 #8008 (Jul 6 2012) (MINGW32) 4 ; This file was generated Mon Oct 19 17:27:13 2015 5 ;-------------------------------------------------------- 6 .module test_sio 7 .optsdcc -mmcs51 --model-small 8 9 ;-------------------------------------------------------- 10 ; Public variables in this module 11 ;-------------------------------------------------------- 12 .globl _main 13 .globl _SetVector 14 .globl _SIO_ISR 15 .globl _TIMER_KB 16 .globl _TIMER_T2 17 .globl _fantom_mis 18 .globl _mistake 19 .globl _moderes 20 .globl _ScanKBOnce 21 .globl _getQ 22 .globl _insertQ 23 .globl _read_max 24 .globl _write_max 25 .globl _readdip 26 .globl _leds 27 .globl _init_sio_timer 28 .globl _type 29 .globl _SPR0 30 .globl _SPR1 31 .globl _CPHA 32 .globl _CPOL 33 .globl _SPIM 34 .globl _SPE 35 .globl _WCOL 36 .globl _ISPI 37 .globl _I2CI 38 .globl _I2CTX 39 .globl _I2CRS 40 .globl _I2CM 41 .globl _MDI 42 .globl _MCO 43 .globl _MDE 44 .globl _MDO 45 .globl _CS0 46 .globl _CS1 47 .globl _CS2 48 .globl _CS3 49 .globl _SCONV 50 .globl _CCONV 51 .globl _DMA 52 .globl _ADCI 53 .globl _P 54 .globl _F1 55 .globl _OV 56 .globl _RS0 57 .globl _RS1 58 .globl _F0 59 .globl _AC 60 .globl _CY 61 .globl _CAP2 62 .globl _CNT2 63 .globl _TR2 64 .globl _XEN 65 .globl _TCLK 66 .globl _RCLK 67 .globl _EXF2 68 .globl _TF2 69 .globl _WDE 70 .globl _WDS 71 .globl _WDR2 72 .globl _WDR1 73 .globl _PRE0 74 .globl _PRE1 75 .globl _PRE2 76 .globl _PX0 77 .globl _PT0 78 .globl _PX1 79 .globl _PT1 80 .globl _PS 81 .globl _PT2 82 .globl _PADC 83 .globl _PSI 84 .globl _RXD 85 .globl _TXD 86 .globl _INT0 87 .globl _INT1 88 .globl _T0 89 .globl _T1 90 .globl _WR 91 .globl _RD 92 .globl _EX0 93 .globl _ET0 94 .globl _EX1 95 .globl _ET1 96 .globl _ES 97 .globl _ET2 98 .globl _EADC 99 .globl _EA 100 .globl _RI 101 .globl _TI 102 .globl _RB8 103 .globl _TB8 104 .globl _REN 105 .globl _SM2 106 .globl _SM1 107 .globl _SM0 108 .globl _T2 109 .globl _T2EX 110 .globl _IT0 111 .globl _IE0 112 .globl _IT1 113 .globl _IE1 114 .globl _TR0 115 .globl _TF0 116 .globl _TR1 117 .globl _TF1 118 .globl _DACCON 119 .globl _DAC1H 120 .globl _DAC1L 121 .globl _DAC0H 122 .globl _DAC0L 123 .globl _SPICON 124 .globl _SPIDAT 125 .globl _ADCCON3 126 .globl _ADCGAINH 127 .globl _ADCGAINL 128 .globl _ADCOFSH 129 .globl _ADCOFSL 130 .globl _B 131 .globl _ADCCON1 132 .globl _I2CCON 133 .globl _ACC 134 .globl _PSMCON 135 .globl _ADCDATAH 136 .globl _ADCDATAL 137 .globl _ADCCON2 138 .globl _DMAP 139 .globl _DMAH 140 .globl _DMAL 141 .globl _PSW 142 .globl _TH2 143 .globl _TL2 144 .globl _RCAP2H 145 .globl _RCAP2L 146 .globl _T2CON 147 .globl _EADRL 148 .globl _WDCON 149 .globl _EDATA4 150 .globl _EDATA3 151 .globl _EDATA2 152 .globl _EDATA1 153 .globl _ETIM3 154 .globl _ETIM2 155 .globl _ETIM1 156 .globl _ECON 157 .globl _IP 158 .globl _P3 159 .globl _IE2 160 .globl _IE 161 .globl _P2 162 .globl _I2CADD 163 .globl _I2CDAT 164 .globl _SBUF 165 .globl _SCON 166 .globl _P1 167 .globl _TH1 168 .globl _TH0 169 .globl _TL1 170 .globl _TL0 171 .globl _TMOD 172 .globl _TCON 173 .globl _PCON 174 .globl _DPP 175 .globl _DPH 176 .globl _DPL 177 .globl _SP 178 .globl _P0 179 .globl _KBTable 180 .globl _colnum 181 .globl _dipmod 182 .globl _endQ 183 .globl _frontQ 184 .globl _queue 185 .globl _temo 186 .globl _temp 187 .globl _time_count 188 .globl _drebezg 189 .globl _d2 190 .globl _d1 191 .globl _result 192 .globl _mode 193 ;-------------------------------------------------------- 194 ; special function registers 195 ;-------------------------------------------------------- 196 .area RSEG (ABS,DATA) 0000 197 .org 0x0000 0080 198 _P0 = 0x0080 0081 199 _SP = 0x0081 0082 200 _DPL = 0x0082 0083 201 _DPH = 0x0083 0084 202 _DPP = 0x0084 0087 203 _PCON = 0x0087 0088 204 _TCON = 0x0088 0089 205 _TMOD = 0x0089 008A 206 _TL0 = 0x008a 008B 207 _TL1 = 0x008b 008C 208 _TH0 = 0x008c 008D 209 _TH1 = 0x008d 0090 210 _P1 = 0x0090 0098 211 _SCON = 0x0098 0099 212 _SBUF = 0x0099 009A 213 _I2CDAT = 0x009a 009B 214 _I2CADD = 0x009b 00A0 215 _P2 = 0x00a0 00A8 216 _IE = 0x00a8 00A9 217 _IE2 = 0x00a9 00B0 218 _P3 = 0x00b0 00B8 219 _IP = 0x00b8 00B9 220 _ECON = 0x00b9 00BA 221 _ETIM1 = 0x00ba 00BB 222 _ETIM2 = 0x00bb 00C4 223 _ETIM3 = 0x00c4 00BC 224 _EDATA1 = 0x00bc 00BD 225 _EDATA2 = 0x00bd 00BE 226 _EDATA3 = 0x00be 00BF 227 _EDATA4 = 0x00bf 00C0 228 _WDCON = 0x00c0 00C6 229 _EADRL = 0x00c6 00C8 230 _T2CON = 0x00c8 00CA 231 _RCAP2L = 0x00ca 00CB 232 _RCAP2H = 0x00cb 00CC 233 _TL2 = 0x00cc 00CD 234 _TH2 = 0x00cd 00D0 235 _PSW = 0x00d0 00D2 236 _DMAL = 0x00d2 00D3 237 _DMAH = 0x00d3 00D4 238 _DMAP = 0x00d4 00D8 239 _ADCCON2 = 0x00d8 00D9 240 _ADCDATAL = 0x00d9 00DA 241 _ADCDATAH = 0x00da 00DF 242 _PSMCON = 0x00df 00E0 243 _ACC = 0x00e0 00E8 244 _I2CCON = 0x00e8 00EF 245 _ADCCON1 = 0x00ef 00F0 246 _B = 0x00f0 00F1 247 _ADCOFSL = 0x00f1 00F2 248 _ADCOFSH = 0x00f2 00F3 249 _ADCGAINL = 0x00f3 00F4 250 _ADCGAINH = 0x00f4 00F5 251 _ADCCON3 = 0x00f5 00F7 252 _SPIDAT = 0x00f7 00F8 253 _SPICON = 0x00f8 00F9 254 _DAC0L = 0x00f9 00FA 255 _DAC0H = 0x00fa 00FB 256 _DAC1L = 0x00fb 00FC 257 _DAC1H = 0x00fc 00FD 258 _DACCON = 0x00fd 259 ;-------------------------------------------------------- 260 ; special function bits 261 ;-------------------------------------------------------- 262 .area RSEG (ABS,DATA) 0000 263 .org 0x0000 008F 264 _TF1 = 0x008f 008E 265 _TR1 = 0x008e 008D 266 _TF0 = 0x008d 008C 267 _TR0 = 0x008c 008B 268 _IE1 = 0x008b 008A 269 _IT1 = 0x008a 0089 270 _IE0 = 0x0089 0088 271 _IT0 = 0x0088 0091 272 _T2EX = 0x0091 0090 273 _T2 = 0x0090 009F 274 _SM0 = 0x009f 009E 275 _SM1 = 0x009e 009D 276 _SM2 = 0x009d 009C 277 _REN = 0x009c 009B 278 _TB8 = 0x009b 009A 279 _RB8 = 0x009a 0099 280 _TI = 0x0099 0098 281 _RI = 0x0098 00AF 282 _EA = 0x00af 00AE 283 _EADC = 0x00ae 00AD 284 _ET2 = 0x00ad 00AC 285 _ES = 0x00ac 00AB 286 _ET1 = 0x00ab 00AA 287 _EX1 = 0x00aa 00A9 288 _ET0 = 0x00a9 00A8 289 _EX0 = 0x00a8 00B7 290 _RD = 0x00b7 00B6 291 _WR = 0x00b6 00B5 292 _T1 = 0x00b5 00B4 293 _T0 = 0x00b4 00B3 294 _INT1 = 0x00b3 00B2 295 _INT0 = 0x00b2 00B1 296 _TXD = 0x00b1 00B0 297 _RXD = 0x00b0 00BF 298 _PSI = 0x00bf 00BE 299 _PADC = 0x00be 00BD 300 _PT2 = 0x00bd 00BC 301 _PS = 0x00bc 00BB 302 _PT1 = 0x00bb 00BA 303 _PX1 = 0x00ba 00B9 304 _PT0 = 0x00b9 00B8 305 _PX0 = 0x00b8 00C7 306 _PRE2 = 0x00c7 00C6 307 _PRE1 = 0x00c6 00C5 308 _PRE0 = 0x00c5 00C3 309 _WDR1 = 0x00c3 00C2 310 _WDR2 = 0x00c2 00C1 311 _WDS = 0x00c1 00C0 312 _WDE = 0x00c0 00CF 313 _TF2 = 0x00cf 00CE 314 _EXF2 = 0x00ce 00CD 315 _RCLK = 0x00cd 00CC 316 _TCLK = 0x00cc 00CB 317 _XEN = 0x00cb 00CA 318 _TR2 = 0x00ca 00C9 319 _CNT2 = 0x00c9 00C8 320 _CAP2 = 0x00c8 00D7 321 _CY = 0x00d7 00D6 322 _AC = 0x00d6 00D5 323 _F0 = 0x00d5 00D4 324 _RS1 = 0x00d4 00D3 325 _RS0 = 0x00d3 00D2 326 _OV = 0x00d2 00D1 327 _F1 = 0x00d1 00D0 328 _P = 0x00d0 00DF 329 _ADCI = 0x00df 00DE 330 _DMA = 0x00de 00DD 331 _CCONV = 0x00dd 00DC 332 _SCONV = 0x00dc 00DB 333 _CS3 = 0x00db 00DA 334 _CS2 = 0x00da 00D9 335 _CS1 = 0x00d9 00D8 336 _CS0 = 0x00d8 00EF 337 _MDO = 0x00ef 00EE 338 _MDE = 0x00ee 00ED 339 _MCO = 0x00ed 00EC 340 _MDI = 0x00ec 00EB 341 _I2CM = 0x00eb 00EA 342 _I2CRS = 0x00ea 00E9 343 _I2CTX = 0x00e9 00E8 344 _I2CI = 0x00e8 00FF 345 _ISPI = 0x00ff 00FE 346 _WCOL = 0x00fe 00FD 347 _SPE = 0x00fd 00FC 348 _SPIM = 0x00fc 00FB 349 _CPOL = 0x00fb 00FA 350 _CPHA = 0x00fa 00F9 351 _SPR1 = 0x00f9 00F8 352 _SPR0 = 0x00f8 353 ;-------------------------------------------------------- 354 ; overlayable register banks 355 ;-------------------------------------------------------- 356 .area REG_BANK_0 (REL,OVR,DATA) 0000 357 .ds 8 358 ;-------------------------------------------------------- 359 ; overlayable bit register bank 360 ;-------------------------------------------------------- 361 .area BIT_BANK (REL,OVR,DATA) 0000 362 bits: 0000 363 .ds 1 8000 364 b0 = bits[0] 8100 365 b1 = bits[1] 8200 366 b2 = bits[2] 8300 367 b3 = bits[3] 8400 368 b4 = bits[4] 8500 369 b5 = bits[5] 8600 370 b6 = bits[6] 8700 371 b7 = bits[7] 372 ;-------------------------------------------------------- 373 ; internal ram data 374 ;-------------------------------------------------------- 375 .area DSEG (DATA) 0000 376 _mode:: 0000 377 .ds 1 0001 378 _result:: 0001 379 .ds 1 0002 380 _d1:: 0002 381 .ds 1 0003 382 _d2:: 0003 383 .ds 1 0004 384 _drebezg:: 0004 385 .ds 16 0014 386 _time_count:: 0014 387 .ds 32 0034 388 _temp:: 0034 389 .ds 1 0035 390 _temo:: 0035 391 .ds 1 0036 392 _queue:: 0036 393 .ds 20 004A 394 _frontQ:: 004A 395 .ds 1 004B 396 _endQ:: 004B 397 .ds 1 004C 398 _dipmod:: 004C 399 .ds 1 004D 400 _colnum:: 004D 401 .ds 1 004E 402 _KBTable:: 004E 403 .ds 17 404 ;-------------------------------------------------------- 405 ; overlayable items in internal ram 406 ;-------------------------------------------------------- 407 ;-------------------------------------------------------- 408 ; Stack segment in internal ram 409 ;-------------------------------------------------------- 410 .area SSEG (DATA) 0000 411 __start__stack: 0000 412 .ds 1 413 414 ;-------------------------------------------------------- 415 ; indirectly addressable internal ram data 416 ;-------------------------------------------------------- 417 .area ISEG (DATA) 418 ;-------------------------------------------------------- 419 ; absolute internal ram data 420 ;-------------------------------------------------------- 421 .area IABS (ABS,DATA) 422 .area IABS (ABS,DATA) 423 ;-------------------------------------------------------- 424 ; bit data 425 ;-------------------------------------------------------- 426 .area BSEG (BIT) 427 ;-------------------------------------------------------- 428 ; paged external ram data 429 ;-------------------------------------------------------- 430 .area PSEG (PAG,XDATA) 431 ;-------------------------------------------------------- 432 ; external ram data 433 ;-------------------------------------------------------- 434 .area XSEG (XDATA) 435 ;-------------------------------------------------------- 436 ; absolute external ram data 437 ;-------------------------------------------------------- 438 .area XABS (ABS,XDATA) 439 ;-------------------------------------------------------- 440 ; external initialized ram data 441 ;-------------------------------------------------------- 442 .area XISEG (XDATA) 443 .area HOME (CODE) 444 .area GSINIT0 (CODE) 445 .area GSINIT1 (CODE) 446 .area GSINIT2 (CODE) 447 .area GSINIT3 (CODE) 448 .area GSINIT4 (CODE) 449 .area GSINIT5 (CODE) 450 .area GSINIT (CODE) 451 .area GSFINAL (CODE) 452 .area CSEG (CODE) 453 ;-------------------------------------------------------- 454 ; interrupt vector 455 ;-------------------------------------------------------- 456 .area HOME (CODE) 0000 457 __interrupt_vect: 0000 02s00r00 458 ljmp __sdcc_gsinit_startup 0003 32 459 reti 0004 460 .ds 7 000B 32 461 reti 000C 462 .ds 7 0013 02s01r31 463 ljmp _TIMER_KB 0016 464 .ds 5 001B 02s00rE5 465 ljmp _TIMER_T2 001E 466 .ds 5 0023 02s03r12 467 ljmp _SIO_ISR 468 ;-------------------------------------------------------- 469 ; global & static initialisations 470 ;-------------------------------------------------------- 471 .area HOME (CODE) 472 .area GSINIT (CODE) 473 .area GSFINAL (CODE) 474 .area GSINIT (CODE) 475 .globl __sdcc_gsinit_startup 476 .globl __sdcc_program_startup 477 .globl __start__stack 478 .globl __mcs51_genXINIT 479 .globl __mcs51_genXRAMCLEAR 480 .globl __mcs51_genRAMCLEAR 481 ; SRC/test_sio.c:43: unsigned char temo = 0x00; 0000 75*35 00 482 mov _temo,#0x00 483 ; SRC/test_sio.c:47: char frontQ = -1; 0003 75*4A FF 484 mov _frontQ,#0xFF 485 ; SRC/test_sio.c:48: char endQ = -1; 0006 75*4B FF 486 mov _endQ,#0xFF 487 ; SRC/test_sio.c:49: char dipmod=0; 0009 75*4C 00 488 mov _dipmod,#0x00 489 ; SRC/test_sio.c:51: unsigned char colnum=3; 000C 75*4D 03 490 mov _colnum,#0x03 491 ; SRC/test_sio.c:52: char KBTable[]="147*2580369#ABCD"; 000F 75*4E 31 492 mov _KBTable,#0x31 0012 75*4F 34 493 mov (_KBTable + 0x0001),#0x34 0015 75*50 37 494 mov (_KBTable + 0x0002),#0x37 0018 75*51 2A 495 mov (_KBTable + 0x0003),#0x2A 001B 75*52 32 496 mov (_KBTable + 0x0004),#0x32 001E 75*53 35 497 mov (_KBTable + 0x0005),#0x35 0021 75*54 38 498 mov (_KBTable + 0x0006),#0x38 0024 75*55 30 499 mov (_KBTable + 0x0007),#0x30 0027 75*56 33 500 mov (_KBTable + 0x0008),#0x33 002A 75*57 36 501 mov (_KBTable + 0x0009),#0x36 002D 75*58 39 502 mov (_KBTable + 0x000a),#0x39 0030 75*59 23 503 mov (_KBTable + 0x000b),#0x23 0033 75*5A 41 504 mov (_KBTable + 0x000c),#0x41 0036 75*5B 42 505 mov (_KBTable + 0x000d),#0x42 0039 75*5C 43 506 mov (_KBTable + 0x000e),#0x43 003C 75*5D 44 507 mov (_KBTable + 0x000f),#0x44 003F 75*5E 00 508 mov (_KBTable + 0x0010),#0x00 509 .area GSFINAL (CODE) 0000 02s00r26 510 ljmp __sdcc_program_startup 511 ;-------------------------------------------------------- 512 ; Home 513 ;-------------------------------------------------------- 514 .area HOME (CODE) 515 .area HOME (CODE) 0026 516 __sdcc_program_startup: 0026 12s04r0C 517 lcall _main 518 ; return from main will lock up 0029 80 FE 519 sjmp . 520 ;-------------------------------------------------------- 521 ; code 522 ;-------------------------------------------------------- 523 .area CSEG (CODE) 524 ;------------------------------------------------------------ 525 ;Allocation info for local variables in function 'insertQ' 526 ;------------------------------------------------------------ 527 ;a Allocated to registers r7 528 ;------------------------------------------------------------ 529 ; SRC/test_sio.c:54: void insertQ(unsigned char a) { 530 ; ----------------------------------------- 531 ; function insertQ 532 ; ----------------------------------------- 0000 533 _insertQ: 0007 534 ar7 = 0x07 0006 535 ar6 = 0x06 0005 536 ar5 = 0x05 0004 537 ar4 = 0x04 0003 538 ar3 = 0x03 0002 539 ar2 = 0x02 0001 540 ar1 = 0x01 0000 541 ar0 = 0x00 0000 AF 82 542 mov r7,dpl 543 ; SRC/test_sio.c:55: if (frontQ == 19) 0002 74 13 544 mov a,#0x13 0004 B5*4A 03 545 cjne a,_frontQ,00102$ 546 ; SRC/test_sio.c:56: frontQ = -1; 0007 75*4A FF 547 mov _frontQ,#0xFF 000A 548 00102$: 549 ; SRC/test_sio.c:57: queue[++frontQ] = a; 000A 05*4A 550 inc _frontQ 000C E5*4A 551 mov a,_frontQ 000E 24r36 552 add a,#_queue 0010 F8 553 mov r0,a 0011 A6 07 554 mov @r0,ar7 0013 22 555 ret 556 ;------------------------------------------------------------ 557 ;Allocation info for local variables in function 'getQ' 558 ;------------------------------------------------------------ 559 ;symbol Allocated to registers 560 ;------------------------------------------------------------ 561 ; SRC/test_sio.c:60: unsigned char getQ() { 562 ; ----------------------------------------- 563 ; function getQ 564 ; ----------------------------------------- 0014 565 _getQ: 566 ; SRC/test_sio.c:62: if (endQ == 19) 0014 74 13 567 mov a,#0x13 0016 B5*4B 03 568 cjne a,_endQ,00102$ 569 ; SRC/test_sio.c:63: endQ = -1; 0019 75*4B FF 570 mov _endQ,#0xFF 001C 571 00102$: 572 ; SRC/test_sio.c:64: symbol = queue[++endQ]; 001C 05*4B 573 inc _endQ 001E E5*4B 574 mov a,_endQ 0020 24r36 575 add a,#_queue 0022 F9 576 mov r1,a 0023 87 82 577 mov dpl,@r1 578 ; SRC/test_sio.c:65: return symbol; 0025 22 579 ret 580 ;------------------------------------------------------------ 581 ;Allocation info for local variables in function 'ScanKBOnce' 582 ;------------------------------------------------------------ 583 ;row Allocated to registers r7 584 ;col Allocated to registers r7 585 ;rownum Allocated to stack - _bp +3 586 ;i Allocated to stack - _bp +4 587 ;------------------------------------------------------------ 588 ; SRC/test_sio.c:69: unsigned char ScanKBOnce() 589 ; ----------------------------------------- 590 ; function ScanKBOnce 591 ; ----------------------------------------- 0026 592 _ScanKBOnce: 593 ; SRC/test_sio.c:74: if (colnum==3) 0026 74 03 594 mov a,#0x03 0028 B5*4D 05 595 cjne a,_colnum,00102$ 596 ; SRC/test_sio.c:75: colnum=0; 002B 75*4D 00 597 mov _colnum,#0x00 002E 80 02 598 sjmp 00103$ 0030 599 00102$: 600 ; SRC/test_sio.c:77: colnum++; 0030 05*4D 601 inc _colnum 0032 602 00103$: 603 ; SRC/test_sio.c:78: col = 0x1 << colnum; //0001,0010,0100,1000,0001,... 0032 85*4D F0 604 mov b,_colnum 0035 05 F0 605 inc b 0037 74 01 606 mov a,#0x01 0039 80 02 607 sjmp 00112$ 003B 608 00110$: 003B 25 E0 609 add a,acc 003D 610 00112$: 003D D5 F0 FB 611 djnz b,00110$ 612 ; SRC/test_sio.c:80: write_max(KB, ~col); //11111110,11111101,11111011,11110111,11111110,... 0040 F4 613 cpl a 0041 FF 614 mov r7,a 0042 C0 07 615 push ar7 0044 90 00 00 616 mov dptr,#0x0000 0047 12s00r00 617 lcall _write_max 004A 15 81 618 dec sp 619 ; SRC/test_sio.c:82: row=read_max(KB) & (0xF0); 004C 90 00 00 620 mov dptr,#0x0000 004F 12s00r00 621 lcall _read_max 0052 AF 82 622 mov r7,dpl 0054 53 07 F0 623 anl ar7,#0xF0 624 ; SRC/test_sio.c:83: row=~row>>4; 0057 8F 05 625 mov ar5,r7 0059 7E 00 626 mov r6,#0x00 005B ED 627 mov a,r5 005C F4 628 cpl a 005D FD 629 mov r5,a 005E EE 630 mov a,r6 005F F4 631 cpl a 0060 FE 632 mov r6,a 0061 C4 633 swap a 0062 CD 634 xch a,r5 0063 C4 635 swap a 0064 54 0F 636 anl a,#0x0F 0066 6D 637 xrl a,r5 0067 CD 638 xch a,r5 0068 54 0F 639 anl a,#0x0F 006A CD 640 xch a,r5 006B 6D 641 xrl a,r5 006C CD 642 xch a,r5 006D 30 E3 02 643 jnb acc.3,00113$ 0070 44 F0 644 orl a,#0xF0 0072 645 00113$: 0072 8D 07 646 mov ar7,r5 647 ; SRC/test_sio.c:84: return row; 0074 8F 82 648 mov dpl,r7 0076 22 649 ret 650 ;------------------------------------------------------------ 651 ;Allocation info for local variables in function 'moderes' 652 ;------------------------------------------------------------ 653 ; SRC/test_sio.c:88: void moderes() { 654 ; ----------------------------------------- 655 ; function moderes 656 ; ----------------------------------------- 0077 657 _moderes: 658 ; SRC/test_sio.c:89: mode = 1; 0077 75*00 01 659 mov _mode,#0x01 660 ; SRC/test_sio.c:90: d1 = 0xFF; 007A 75*02 FF 661 mov _d1,#0xFF 662 ; SRC/test_sio.c:91: d2 = 0xFF; 007D 75*03 FF 663 mov _d2,#0xFF 664 ; SRC/test_sio.c:92: result = 0xFF; 0080 75*01 FF 665 mov _result,#0xFF 0083 22 666 ret 667 ;------------------------------------------------------------ 668 ;Allocation info for local variables in function 'mistake' 669 ;------------------------------------------------------------ 670 ; SRC/test_sio.c:96: void mistake() { 671 ; ----------------------------------------- 672 ; function mistake 673 ; ----------------------------------------- 0084 674 _mistake: 675 ; SRC/test_sio.c:97: EA = 0; //блокируем прерывания 0084 C2 AF 676 clr _EA 677 ; SRC/test_sio.c:98: ES = 0; 0086 C2 AC 678 clr _ES 679 ; SRC/test_sio.c:99: type ("Mistake has happend\n"); 0088 90s00r00 680 mov dptr,#__str_0 008B 75 F0 80 681 mov b,#0x80 008E 12s00r00 682 lcall _type 683 ; SRC/test_sio.c:100: leds(0xFF); 0091 75 82 FF 684 mov dpl,#0xFF 0094 12s00r00 685 lcall _leds 686 ; SRC/test_sio.c:101: frontQ=-1; 0097 75*4A FF 687 mov _frontQ,#0xFF 688 ; SRC/test_sio.c:102: endQ=-1; 009A 75*4B FF 689 mov _endQ,#0xFF 690 ; SRC/test_sio.c:103: moderes(); 009D 12s00r77 691 lcall _moderes 692 ; SRC/test_sio.c:104: EA = 1; 00A0 D2 AF 693 setb _EA 694 ; SRC/test_sio.c:105: ES = 1;// разрешаем прерывания от таймера для опроса 00A2 D2 AC 695 setb _ES 00A4 22 696 ret 697 ;------------------------------------------------------------ 698 ;Allocation info for local variables in function 'fantom_mis' 699 ;------------------------------------------------------------ 700 ;i Allocated to registers r7 701 ;j Allocated to registers r4 702 ;------------------------------------------------------------ 703 ; SRC/test_sio.c:107: void fantom_mis(){ 704 ; ----------------------------------------- 705 ; function fantom_mis 706 ; ----------------------------------------- 00A5 707 _fantom_mis: 708 ; SRC/test_sio.c:109: EA=0; 00A5 C2 AF 709 clr _EA 710 ; SRC/test_sio.c:110: type("fantom mistake\n"); 00A7 90s00r15 711 mov dptr,#__str_1 00AA 75 F0 80 712 mov b,#0x80 00AD 12s00r00 713 lcall _type 714 ; SRC/test_sio.c:112: for(i=0;i<4;i++) 00B0 7F 00 715 mov r7,#0x00 00B2 716 00105$: 00B2 BF 04 00 717 cjne r7,#0x04,00121$ 00B5 718 00121$: 00B5 50 2B 719 jnc 00108$ 720 ; SRC/test_sio.c:113: for(j=0;j<4;j++){ 00B7 EF 721 mov a,r7 00B8 2F 722 add a,r7 00B9 25 E0 723 add a,acc 00BB 24r04 724 add a,#_drebezg 00BD FE 725 mov r6,a 00BE EF 726 mov a,r7 00BF C4 727 swap a 00C0 03 728 rr a 00C1 54 F8 729 anl a,#0xF8 00C3 24r14 730 add a,#_time_count 00C5 FD 731 mov r5,a 00C6 7C 00 732 mov r4,#0x00 00C8 733 00101$: 00C8 BC 04 00 734 cjne r4,#0x04,00123$ 00CB 735 00123$: 00CB 50 12 736 jnc 00107$ 737 ; SRC/test_sio.c:114: drebezg[i][j]=0; 00CD EC 738 mov a,r4 00CE 2E 739 add a,r6 00CF F8 740 mov r0,a 00D0 76 00 741 mov @r0,#0x00 742 ; SRC/test_sio.c:115: time_count[i][j]=0; 00D2 EC 743 mov a,r4 00D3 2C 744 add a,r4 00D4 FB 745 mov r3,a 00D5 2D 746 add a,r5 00D6 F8 747 mov r0,a 00D7 76 00 748 mov @r0,#0x00 00D9 08 749 inc r0 00DA 76 00 750 mov @r0,#0x00 751 ; SRC/test_sio.c:113: for(j=0;j<4;j++){ 00DC 0C 752 inc r4 00DD 80 E9 753 sjmp 00101$ 00DF 754 00107$: 755 ; SRC/test_sio.c:112: for(i=0;i<4;i++) 00DF 0F 756 inc r7 00E0 80 D0 757 sjmp 00105$ 00E2 758 00108$: 759 ; SRC/test_sio.c:117: EA=1; 00E2 D2 AF 760 setb _EA 00E4 22 761 ret 762 ;------------------------------------------------------------ 763 ;Allocation info for local variables in function 'TIMER_T2' 764 ;------------------------------------------------------------ 765 ; SRC/test_sio.c:120: void TIMER_T2(void) __interrupt( 3 ){ 766 ; ----------------------------------------- 767 ; function TIMER_T2 768 ; ----------------------------------------- 00E5 769 _TIMER_T2: 00E5 C0*00 770 push bits 00E7 C0 E0 771 push acc 00E9 C0 F0 772 push b 00EB C0 82 773 push dpl 00ED C0 83 774 push dph 00EF C0 07 775 push (0+7) 00F1 C0 06 776 push (0+6) 00F3 C0 05 777 push (0+5) 00F5 C0 04 778 push (0+4) 00F7 C0 03 779 push (0+3) 00F9 C0 02 780 push (0+2) 00FB C0 01 781 push (0+1) 00FD C0 00 782 push (0+0) 00FF C0 D0 783 push psw 0101 75 D0 00 784 mov psw,#0x00 785 ; SRC/test_sio.c:121: EA = 0; 0104 C2 AF 786 clr _EA 787 ; SRC/test_sio.c:128: TH2 = 0xFE; 0106 75 CD FE 788 mov _TH2,#0xFE 789 ; SRC/test_sio.c:129: TL2 = 0x00; 0109 75 CC 00 790 mov _TL2,#0x00 791 ; SRC/test_sio.c:130: leds(0xFF); 010C 75 82 FF 792 mov dpl,#0xFF 010F 12s00r00 793 lcall _leds 794 ; SRC/test_sio.c:131: EA = 1; 0112 D2 AF 795 setb _EA 0114 D0 D0 796 pop psw 0116 D0 00 797 pop (0+0) 0118 D0 01 798 pop (0+1) 011A D0 02 799 pop (0+2) 011C D0 03 800 pop (0+3) 011E D0 04 801 pop (0+4) 0120 D0 05 802 pop (0+5) 0122 D0 06 803 pop (0+6) 0124 D0 07 804 pop (0+7) 0126 D0 83 805 pop dph 0128 D0 82 806 pop dpl 012A D0 F0 807 pop b 012C D0 E0 808 pop acc 012E D0*00 809 pop bits 0130 32 810 reti 811 ;------------------------------------------------------------ 812 ;Allocation info for local variables in function 'TIMER_KB' 813 ;------------------------------------------------------------ 814 ;i Allocated to registers r4 815 ;j Allocated to registers r7 816 ;count Allocated to registers r5 817 ;input Allocated to stack - _bp +1 818 ;rownum Allocated to registers r6 819 ;------------------------------------------------------------ 820 ; SRC/test_sio.c:134: void TIMER_KB(void) __interrupt( 2 ){ 821 ; ----------------------------------------- 822 ; function TIMER_KB 823 ; ----------------------------------------- 0131 824 _TIMER_KB: 0131 C0*00 825 push bits 0133 C0 E0 826 push acc 0135 C0 F0 827 push b 0137 C0 82 828 push dpl 0139 C0 83 829 push dph 013B C0 07 830 push (0+7) 013D C0 06 831 push (0+6) 013F C0 05 832 push (0+5) 0141 C0 04 833 push (0+4) 0143 C0 03 834 push (0+3) 0145 C0 02 835 push (0+2) 0147 C0 01 836 push (0+1) 0149 C0 00 837 push (0+0) 014B C0 D0 838 push psw 014D 75 D0 00 839 mov psw,#0x00 0150 C0*00 840 push _bp 0152 85 81*00 841 mov _bp,sp 0155 05 81 842 inc sp 843 ; SRC/test_sio.c:138: input=ScanKBOnce();//&(0x0f) 0157 12s00r26 844 lcall _ScanKBOnce 015A AF 82 845 mov r7,dpl 015C A8*00 846 mov r0,_bp 015E 08 847 inc r0 015F A6 07 848 mov @r0,ar7 849 ; SRC/test_sio.c:140: for(rownum=0;rownum<4;rownum++) 0161 7E 00 850 mov r6,#0x00 0163 851 00132$: 0163 BE 04 00 852 cjne r6,#0x04,00173$ 0166 853 00173$: 0166 40 03 854 jc 00174$ 0168 02s02rEB 855 ljmp 00135$ 016B 856 00174$: 857 ; SRC/test_sio.c:142: count=0; 016B 7D 00 858 mov r5,#0x00 859 ; SRC/test_sio.c:143: if(input&(0x01<0) 01D0 E5*4D 934 mov a,_colnum 01D2 25*4D 935 add a,_colnum 01D4 25 E0 936 add a,acc 01D6 FC 937 mov r4,a 01D7 24r04 938 add a,#_drebezg 01D9 2E 939 add a,r6 01DA F9 940 mov r1,a 01DB 87 03 941 mov ar3,@r1 01DD C3 942 clr c 01DE E4 943 clr a 01DF 64 80 944 xrl a,#0x80 01E1 8B F0 945 mov b,r3 01E3 63 F0 80 946 xrl b,#0x80 01E6 95 F0 947 subb a,b 01E8 50 0B 948 jnc 00109$ 949 ; SRC/test_sio.c:153: drebezg[colnum][rownum]--; 01EA EC 950 mov a,r4 01EB 24r04 951 add a,#_drebezg 01ED 2E 952 add a,r6 01EE F9 953 mov r1,a 01EF E7 954 mov a,@r1 01F0 FB 955 mov r3,a 01F1 14 956 dec a 01F2 F7 957 mov @r1,a 01F3 80 38 958 sjmp 00148$ 01F5 959 00109$: 960 ; SRC/test_sio.c:154: else if (drebezg[colnum][rownum]==0) 01F5 EC 961 mov a,r4 01F6 24r04 962 add a,#_drebezg 01F8 FC 963 mov r4,a 01F9 2E 964 add a,r6 01FA F9 965 mov r1,a 01FB E7 966 mov a,@r1 01FC 70 2F 967 jnz 00148$ 968 ; SRC/test_sio.c:155: if(time_count[colnum][rownum]>0) 01FE E5*4D 969 mov a,_colnum 0200 C4 970 swap a 0201 03 971 rr a 0202 54 F8 972 anl a,#0xF8 0204 FC 973 mov r4,a 0205 24r14 974 add a,#_time_count 0207 FB 975 mov r3,a 0208 EE 976 mov a,r6 0209 2E 977 add a,r6 020A FA 978 mov r2,a 020B 2B 979 add a,r3 020C F9 980 mov r1,a 020D 87 03 981 mov ar3,@r1 020F 09 982 inc r1 0210 87 07 983 mov ar7,@r1 0212 19 984 dec r1 0213 C3 985 clr c 0214 E4 986 clr a 0215 9B 987 subb a,r3 0216 E4 988 clr a 0217 64 80 989 xrl a,#0x80 0219 8F F0 990 mov b,r7 021B 63 F0 80 991 xrl b,#0x80 021E 95 F0 992 subb a,b 0220 50 0B 993 jnc 00148$ 994 ; SRC/test_sio.c:156: time_count[colnum][rownum]=0; 0222 EC 995 mov a,r4 0223 24r14 996 add a,#_time_count 0225 FC 997 mov r4,a 0226 2A 998 add a,r2 0227 F8 999 mov r0,a 0228 76 00 1000 mov @r0,#0x00 022A 08 1001 inc r0 022B 76 00 1002 mov @r0,#0x00 1003 ; SRC/test_sio.c:160: for(i=0;i<4;i++) 022D 1004 00148$: 022D 7C 00 1005 mov r4,#0x00 022F 1006 00128$: 022F BC 04 00 1007 cjne r4,#0x04,00184$ 0232 1008 00184$: 0232 50 2B 1009 jnc 00131$ 1010 ; SRC/test_sio.c:161: for(j=0;j<4;j++) 0234 EC 1011 mov a,r4 0235 2C 1012 add a,r4 0236 25 E0 1013 add a,acc 0238 24r04 1014 add a,#_drebezg 023A FB 1015 mov r3,a 023B 8D 02 1016 mov ar2,r5 023D 7F 00 1017 mov r7,#0x00 023F 1018 00124$: 023F BF 04 00 1019 cjne r7,#0x04,00186$ 0242 1020 00186$: 0242 50 16 1021 jnc 00154$ 1022 ; SRC/test_sio.c:162: if(drebezg[i][j] == 5) 0244 C0 02 1023 push ar2 0246 EF 1024 mov a,r7 0247 2B 1025 add a,r3 0248 F9 1026 mov r1,a 0249 87 02 1027 mov ar2,@r1 024B BA 05 02 1028 cjne r2,#0x05,00188$ 024E 80 04 1029 sjmp 00189$ 0250 1030 00188$: 0250 D0 02 1031 pop ar2 0252 80 03 1032 sjmp 00126$ 0254 1033 00189$: 0254 D0 02 1034 pop ar2 1035 ; SRC/test_sio.c:163: count = count + 1; //for multyple pushed buttons*/ 0256 0A 1036 inc r2 0257 1037 00126$: 1038 ; SRC/test_sio.c:161: for(j=0;j<4;j++) 0257 0F 1039 inc r7 0258 80 E5 1040 sjmp 00124$ 025A 1041 00154$: 025A 8A 05 1042 mov ar5,r2 1043 ; SRC/test_sio.c:160: for(i=0;i<4;i++) 025C 0C 1044 inc r4 025D 80 D0 1045 sjmp 00128$ 025F 1046 00131$: 1047 ; SRC/test_sio.c:166: if(count > MAX_KEYS_PRESSED) //sSHIIIEEEET 025F ED 1048 mov a,r5 0260 24 FC 1049 add a,#0xff - 0x03 0262 50 0A 1050 jnc 00122$ 1051 ; SRC/test_sio.c:167: fantom_mis(); 0264 C0 06 1052 push ar6 0266 12s00rA5 1053 lcall _fantom_mis 0269 D0 06 1054 pop ar6 026B 02s02rE7 1055 ljmp 00134$ 026E 1056 00122$: 1057 ; SRC/test_sio.c:171: if(time_count[colnum][rownum]==1 && drebezg[colnum][rownum]==5) //first enterance 026E E5*4D 1058 mov a,_colnum 0270 C4 1059 swap a 0271 03 1060 rr a 0272 54 F8 1061 anl a,#0xF8 0274 24r14 1062 add a,#_time_count 0276 FF 1063 mov r7,a 0277 EE 1064 mov a,r6 0278 2E 1065 add a,r6 0279 FD 1066 mov r5,a 027A 2F 1067 add a,r7 027B F9 1068 mov r1,a 027C 87 04 1069 mov ar4,@r1 027E 09 1070 inc r1 027F 87 07 1071 mov ar7,@r1 0281 19 1072 dec r1 0282 BC 01 25 1073 cjne r4,#0x01,00117$ 0285 BF 00 22 1074 cjne r7,#0x00,00117$ 0288 E5*4D 1075 mov a,_colnum 028A 25*4D 1076 add a,_colnum 028C 25 E0 1077 add a,acc 028E FF 1078 mov r7,a 028F 24r04 1079 add a,#_drebezg 0291 2E 1080 add a,r6 0292 F9 1081 mov r1,a 0293 87 04 1082 mov ar4,@r1 0295 BC 05 12 1083 cjne r4,#0x05,00117$ 1084 ; SRC/test_sio.c:173: insertQ(KBTable[colnum*4+rownum]); 0298 EE 1085 mov a,r6 0299 2F 1086 add a,r7 029A 24r4E 1087 add a,#_KBTable 029C F9 1088 mov r1,a 029D 87 82 1089 mov dpl,@r1 029F C0 06 1090 push ar6 02A1 C0 05 1091 push ar5 02A3 12s00r00 1092 lcall _insertQ 02A6 D0 05 1093 pop ar5 02A8 D0 06 1094 pop ar6 02AA 1095 00117$: 1096 ; SRC/test_sio.c:175: if(time_count[colnum][rownum]==100) 02AA E5*4D 1097 mov a,_colnum 02AC C4 1098 swap a 02AD 03 1099 rr a 02AE 54 F8 1100 anl a,#0xF8 02B0 24r14 1101 add a,#_time_count 02B2 2D 1102 add a,r5 02B3 F9 1103 mov r1,a 02B4 87 04 1104 mov ar4,@r1 02B6 09 1105 inc r1 02B7 87 07 1106 mov ar7,@r1 02B9 19 1107 dec r1 02BA BC 64 2A 1108 cjne r4,#0x64,00134$ 02BD BF 00 27 1109 cjne r7,#0x00,00134$ 1110 ; SRC/test_sio.c:177: insertQ(KBTable[colnum*4+rownum]); 02C0 E5*4D 1111 mov a,_colnum 02C2 25*4D 1112 add a,_colnum 02C4 25 E0 1113 add a,acc 02C6 2E 1114 add a,r6 02C7 24r4E 1115 add a,#_KBTable 02C9 F9 1116 mov r1,a 02CA 87 82 1117 mov dpl,@r1 02CC C0 06 1118 push ar6 02CE C0 05 1119 push ar5 02D0 12s00r00 1120 lcall _insertQ 02D3 D0 05 1121 pop ar5 02D5 D0 06 1122 pop ar6 1123 ; SRC/test_sio.c:178: time_count[colnum][rownum]=80; //once 250 02D7 E5*4D 1124 mov a,_colnum 02D9 C4 1125 swap a 02DA 03 1126 rr a 02DB 54 F8 1127 anl a,#0xF8 02DD 24r14 1128 add a,#_time_count 02DF FF 1129 mov r7,a 02E0 2D 1130 add a,r5 02E1 F8 1131 mov r0,a 02E2 76 50 1132 mov @r0,#0x50 02E4 08 1133 inc r0 02E5 76 00 1134 mov @r0,#0x00 02E7 1135 00134$: 1136 ; SRC/test_sio.c:140: for(rownum=0;rownum<4;rownum++) 02E7 0E 1137 inc r6 02E8 02s01r63 1138 ljmp 00132$ 02EB 1139 00135$: 1140 ; SRC/test_sio.c:183: TH0 = 0xFE; // Инициализация таймера 0 d8 fe 02EB 75 8C FE 1141 mov _TH0,#0xFE 1142 ; SRC/test_sio.c:184: TL0 = 0xB0; //частота=10кГц(1 в 10млсек) 02EE 75 8A B0 1143 mov _TL0,#0xB0 02F1 15 81 1144 dec sp 02F3 D0*00 1145 pop _bp 02F5 D0 D0 1146 pop psw 02F7 D0 00 1147 pop (0+0) 02F9 D0 01 1148 pop (0+1) 02FB D0 02 1149 pop (0+2) 02FD D0 03 1150 pop (0+3) 02FF D0 04 1151 pop (0+4) 0301 D0 05 1152 pop (0+5) 0303 D0 06 1153 pop (0+6) 0305 D0 07 1154 pop (0+7) 0307 D0 83 1155 pop dph 0309 D0 82 1156 pop dpl 030B D0 F0 1157 pop b 030D D0 E0 1158 pop acc 030F D0*00 1159 pop bits 0311 32 1160 reti 1161 ;------------------------------------------------------------ 1162 ;Allocation info for local variables in function 'SIO_ISR' 1163 ;------------------------------------------------------------ 1164 ; SRC/test_sio.c:191: void SIO_ISR( void ) __interrupt ( 4 ) 1165 ; ----------------------------------------- 1166 ; function SIO_ISR 1167 ; ----------------------------------------- 0312 1168 _SIO_ISR: 0312 C0*00 1169 push bits 0314 C0 E0 1170 push acc 0316 C0 F0 1171 push b 0318 C0 82 1172 push dpl 031A C0 83 1173 push dph 031C C0 07 1174 push (0+7) 031E C0 06 1175 push (0+6) 0320 C0 05 1176 push (0+5) 0322 C0 04 1177 push (0+4) 0324 C0 03 1178 push (0+3) 0326 C0 02 1179 push (0+2) 0328 C0 01 1180 push (0+1) 032A C0 00 1181 push (0+0) 032C C0 D0 1182 push psw 032E 75 D0 00 1183 mov psw,#0x00 1184 ; SRC/test_sio.c:193: if(TI) 0331 20 99 03 1185 jb _TI,00167$ 0334 02s03rAE 1186 ljmp 00130$ 0337 1187 00167$: 1188 ; SRC/test_sio.c:195: if(dipmod==0){ //just send 0337 E5*4C 1189 mov a,_dipmod 0339 70 17 1190 jnz 00127$ 1191 ; SRC/test_sio.c:196: temp=getQ(); 033B 12s00r14 1192 lcall _getQ 1193 ; SRC/test_sio.c:197: leds(temp); 033E 85 82*34 1194 mov _temp,dpl 0341 12s00r00 1195 lcall _leds 1196 ; SRC/test_sio.c:198: SBUF=temp; 0344 85*34 99 1197 mov _SBUF,_temp 1198 ; SRC/test_sio.c:199: TI=0; 0347 C2 99 1199 clr _TI 1200 ; SRC/test_sio.c:200: while(!TI); 0349 1201 00101$: 0349 30 99 FD 1202 jnb _TI,00101$ 1203 ; SRC/test_sio.c:201: ES=0; 034C C2 AC 1204 clr _ES 1205 ; SRC/test_sio.c:202: ET0=1; 034E D2 A9 1206 setb _ET0 0350 80 5C 1207 sjmp 00130$ 0352 1208 00127$: 1209 ; SRC/test_sio.c:204: else if (dipmod==1){ 0352 74 01 1210 mov a,#0x01 0354 B5*4C 57 1211 cjne a,_dipmod,00130$ 1212 ; SRC/test_sio.c:205: if ( result != DEFAULT_VAL ) 0357 74 FF 1213 mov a,#0xFF 0359 B5*01 02 1214 cjne a,_result,00172$ 035C 80 4E 1215 sjmp 00122$ 035E 1216 00172$: 1217 ; SRC/test_sio.c:209: if ( result > MAX_RESULT ) 035E E5*01 1218 mov a,_result 0360 24 9C 1219 add a,#0xff - 0x63 0362 50 11 1220 jnc 00119$ 1221 ; SRC/test_sio.c:211: SBUF = NEWLINE; 0364 75 99 0A 1222 mov _SBUF,#0x0A 1223 ; SRC/test_sio.c:212: moderes(); 0367 12s00r77 1224 lcall _moderes 1225 ; SRC/test_sio.c:213: TI=0; 036A C2 99 1226 clr _TI 1227 ; SRC/test_sio.c:214: while(!TI); 036C 1228 00104$: 036C 30 99 FD 1229 jnb _TI,00104$ 1230 ; SRC/test_sio.c:215: ES=0; 036F C2 AC 1231 clr _ES 1232 ; SRC/test_sio.c:216: ET0=1; 0371 D2 A9 1233 setb _ET0 0373 80 39 1234 sjmp 00130$ 0375 1235 00119$: 1236 ; SRC/test_sio.c:219: else if ( result >= 10 ) 0375 C3 1237 clr c 0376 E5*01 1238 mov a,_result 0378 94 0A 1239 subb a,#0x0A 037A E4 1240 clr a 037B 33 1241 rlc a 037C FF 1242 mov r7,a 037D 70 1A 1243 jnz 00116$ 1244 ; SRC/test_sio.c:222: SBUF = ( result / 10 ) + 0x30; 037F 75 F0 0A 1245 mov b,#0x0A 0382 E5*01 1246 mov a,_result 0384 84 1247 div ab 0385 24 30 1248 add a,#0x30 0387 F5 99 1249 mov _SBUF,a 1250 ; SRC/test_sio.c:223: result = result % 10; 0389 75 F0 0A 1251 mov b,#0x0A 038C E5*01 1252 mov a,_result 038E 84 1253 div ab 038F 85 F0*01 1254 mov _result,b 1255 ; SRC/test_sio.c:224: TI = 0; 0392 C2 99 1256 clr _TI 1257 ; SRC/test_sio.c:225: while(!TI); 0394 1258 00107$: 0394 20 99 17 1259 jb _TI,00130$ 0397 80 FB 1260 sjmp 00107$ 0399 1261 00116$: 1262 ; SRC/test_sio.c:228: else if (result <10) 0399 EF 1263 mov a,r7 039A 60 12 1264 jz 00130$ 1265 ; SRC/test_sio.c:230: SBUF = result + 0x30; 039C 74 30 1266 mov a,#0x30 039E 25*01 1267 add a,_result 03A0 F5 99 1268 mov _SBUF,a 1269 ; SRC/test_sio.c:231: result = 0xAA; 03A2 75*01 AA 1270 mov _result,#0xAA 1271 ; SRC/test_sio.c:232: TI = 0; 03A5 C2 99 1272 clr _TI 1273 ; SRC/test_sio.c:233: while(!TI); 03A7 1274 00110$: 03A7 30 99 FD 1275 jnb _TI,00110$ 03AA 80 02 1276 sjmp 00130$ 03AC 1277 00122$: 1278 ; SRC/test_sio.c:237: else TI=0; 03AC C2 99 1279 clr _TI 03AE 1280 00130$: 1281 ; SRC/test_sio.c:243: if(RI) 03AE 30 98 06 1282 jnb _RI,00133$ 1283 ; SRC/test_sio.c:245: leds(0xAA); 03B1 75 82 AA 1284 mov dpl,#0xAA 03B4 12s00r00 1285 lcall _leds 03B7 1286 00133$: 03B7 D0 D0 1287 pop psw 03B9 D0 00 1288 pop (0+0) 03BB D0 01 1289 pop (0+1) 03BD D0 02 1290 pop (0+2) 03BF D0 03 1291 pop (0+3) 03C1 D0 04 1292 pop (0+4) 03C3 D0 05 1293 pop (0+5) 03C5 D0 06 1294 pop (0+6) 03C7 D0 07 1295 pop (0+7) 03C9 D0 83 1296 pop dph 03CB D0 82 1297 pop dpl 03CD D0 F0 1298 pop b 03CF D0 E0 1299 pop acc 03D1 D0*00 1300 pop bits 03D3 32 1301 reti 1302 ;------------------------------------------------------------ 1303 ;Allocation info for local variables in function 'SetVector' 1304 ;------------------------------------------------------------ 1305 ;Vector Allocated to stack - _bp -5 1306 ;Address Allocated to registers r6 r7 1307 ;TmpVector Allocated to registers r6 r7 1308 ;------------------------------------------------------------ 1309 ; SRC/test_sio.c:251: void SetVector(unsigned char __xdata * Address, void * Vector) 1310 ; ----------------------------------------- 1311 ; function SetVector 1312 ; ----------------------------------------- 03D4 1313 _SetVector: 03D4 C0*00 1314 push _bp 03D6 85 81*00 1315 mov _bp,sp 1316 ; SRC/test_sio.c:256: *Address = 0x02; 03D9 AE 82 1317 mov r6,dpl 03DB AF 83 1318 mov r7,dph 03DD 74 02 1319 mov a,#0x02 03DF F0 1320 movx @dptr,a 1321 ; SRC/test_sio.c:258: TmpVector = (unsigned char __xdata *) (Address + 1); 03E0 0E 1322 inc r6 03E1 BE 00 01 1323 cjne r6,#0x00,00103$ 03E4 0F 1324 inc r7 03E5 1325 00103$: 1326 ; SRC/test_sio.c:259: *TmpVector = (unsigned char) ((unsigned short)Vector >> 8); 03E5 E5*00 1327 mov a,_bp 03E7 24 FB 1328 add a,#0xfb 03E9 F8 1329 mov r0,a 03EA 86 04 1330 mov ar4,@r0 03EC 08 1331 inc r0 03ED 86 05 1332 mov ar5,@r0 03EF 8D 04 1333 mov ar4,r5 03F1 8E 82 1334 mov dpl,r6 03F3 8F 83 1335 mov dph,r7 03F5 EC 1336 mov a,r4 03F6 F0 1337 movx @dptr,a 03F7 A3 1338 inc dptr 03F8 AE 82 1339 mov r6,dpl 03FA AF 83 1340 mov r7,dph 1341 ; SRC/test_sio.c:260: ++TmpVector; 1342 ; SRC/test_sio.c:261: *TmpVector = (unsigned char) Vector; 03FC E5*00 1343 mov a,_bp 03FE 24 FB 1344 add a,#0xfb 0400 F8 1345 mov r0,a 0401 86 05 1346 mov ar5,@r0 0403 8E 82 1347 mov dpl,r6 0405 8F 83 1348 mov dph,r7 0407 ED 1349 mov a,r5 0408 F0 1350 movx @dptr,a 0409 D0*00 1351 pop _bp 040B 22 1352 ret 1353 ;------------------------------------------------------------ 1354 ;Allocation info for local variables in function 'main' 1355 ;------------------------------------------------------------ 1356 ;c Allocated to registers r6 r7 1357 ;i Allocated to stack - _bp +3 1358 ;dipval Allocated to stack - _bp +4 1359 ;------------------------------------------------------------ 1360 ; SRC/test_sio.c:268: void main( void ) 1361 ; ----------------------------------------- 1362 ; function main 1363 ; ----------------------------------------- 040C 1364 _main: 1365 ; SRC/test_sio.c:274: SetVector( 0x2023, (void *)SIO_ISR ); 040C 7Dr12 1366 mov r5,#_SIO_ISR 040E 7Es03 1367 mov r6,#(_SIO_ISR >> 8) 0410 7F 80 1368 mov r7,#0x80 0412 C0 05 1369 push ar5 0414 C0 06 1370 push ar6 0416 C0 07 1371 push ar7 0418 90 20 23 1372 mov dptr,#0x2023 041B 12s03rD4 1373 lcall _SetVector 041E 15 81 1374 dec sp 0420 15 81 1375 dec sp 0422 15 81 1376 dec sp 1377 ; SRC/test_sio.c:275: SetVector( 0x200B, (void *)TIMER_KB); 0424 7Dr31 1378 mov r5,#_TIMER_KB 0426 7Es01 1379 mov r6,#(_TIMER_KB >> 8) 0428 7F 80 1380 mov r7,#0x80 042A C0 05 1381 push ar5 042C C0 06 1382 push ar6 042E C0 07 1383 push ar7 0430 90 20 0B 1384 mov dptr,#0x200B 0433 12s03rD4 1385 lcall _SetVector 0436 15 81 1386 dec sp 0438 15 81 1387 dec sp 043A 15 81 1388 dec sp 1389 ; SRC/test_sio.c:276: SetVector( 0x202B, (void *)TIMER_T2); 043C 7DrE5 1390 mov r5,#_TIMER_T2 043E 7Es00 1391 mov r6,#(_TIMER_T2 >> 8) 0440 7F 80 1392 mov r7,#0x80 0442 C0 05 1393 push ar5 0444 C0 06 1394 push ar6 0446 C0 07 1395 push ar7 0448 90 20 2B 1396 mov dptr,#0x202B 044B 12s03rD4 1397 lcall _SetVector 044E 15 81 1398 dec sp 0450 15 81 1399 dec sp 0452 15 81 1400 dec sp 1401 ; SRC/test_sio.c:277: init_sio_timer( S2400 ); 0454 75 82 F4 1402 mov dpl,#0xF4 0457 12s00r00 1403 lcall _init_sio_timer 1404 ; SRC/test_sio.c:279: moderes(); 045A 12s00r77 1405 lcall _moderes 1406 ; SRC/test_sio.c:281: while(1){ 045D 1407 00145$: 1408 ; SRC/test_sio.c:282: if(readdip()==0x01){ //CALC 045D 12s00r00 1409 lcall _readdip 0460 AF 82 1410 mov r7,dpl 0462 BF 01 02 1411 cjne r7,#0x01,00185$ 0465 80 03 1412 sjmp 00186$ 0467 1413 00185$: 0467 02s05r73 1414 ljmp 00142$ 046A 1415 00186$: 1416 ; SRC/test_sio.c:283: dipmod=1; 046A 75*4C 01 1417 mov _dipmod,#0x01 1418 ; SRC/test_sio.c:284: if(frontQ!=endQ){ 046D E5*4B 1419 mov a,_endQ 046F B5*4A 03 1420 cjne a,_frontQ,00187$ 0472 02s05r6C 1421 ljmp 00136$ 0475 1422 00187$: 1423 ; SRC/test_sio.c:286: ET0=0; //запрещем прерывания таймера. 0475 C2 A9 1424 clr _ET0 1425 ; SRC/test_sio.c:287: c = getQ(); //считываем значения из буфера 0477 12s00r14 1426 lcall _getQ 1427 ; SRC/test_sio.c:288: leds(c); 047A AE 82 1428 mov r6,dpl 047C 7F 00 1429 mov r7,#0x00 047E C0 07 1430 push ar7 0480 C0 06 1431 push ar6 0482 12s00r00 1432 lcall _leds 0485 D0 06 1433 pop ar6 0487 D0 07 1434 pop ar7 1435 ; SRC/test_sio.c:290: if (c>=0x30 &&c<=0x39 ) { 0489 C3 1436 clr c 048A EE 1437 mov a,r6 048B 94 30 1438 subb a,#0x30 048D EF 1439 mov a,r7 048E 64 80 1440 xrl a,#0x80 0490 94 80 1441 subb a,#0x80 0492 50 03 1442 jnc 00188$ 0494 02s05r1C 1443 ljmp 00132$ 0497 1444 00188$: 0497 C3 1445 clr c 0498 74 39 1446 mov a,#0x39 049A 9E 1447 subb a,r6 049B E4 1448 clr a 049C 64 80 1449 xrl a,#0x80 049E 8F F0 1450 mov b,r7 04A0 63 F0 80 1451 xrl b,#0x80 04A3 95 F0 1452 subb a,b 04A5 40 75 1453 jc 00132$ 1454 ; SRC/test_sio.c:291: switch (mode) { 04A7 74 01 1455 mov a,#0x01 04A9 B5*00 02 1456 cjne a,_mode,00190$ 04AC 80 07 1457 sjmp 00101$ 04AE 1458 00190$: 04AE 74 02 1459 mov a,#0x02 1460 ; SRC/test_sio.c:292: case 1: 04B0 B5*00 63 1461 cjne a,_mode,00115$ 04B3 80 30 1462 sjmp 00108$ 04B5 1463 00101$: 1464 ; SRC/test_sio.c:293: if (d1 == 0xFF) 04B5 74 FF 1465 mov a,#0xFF 04B7 B5*02 09 1466 cjne a,_d1,00106$ 1467 ; SRC/test_sio.c:294: d1 = (c-0x30); 04BA 8E 05 1468 mov ar5,r6 04BC ED 1469 mov a,r5 04BD 24 D0 1470 add a,#0xD0 04BF F5*02 1471 mov _d1,a 04C1 80 9A 1472 sjmp 00145$ 04C3 1473 00106$: 1474 ; SRC/test_sio.c:295: else if (d1 < 10) { 04C3 74 F6 1475 mov a,#0x100 - 0x0A 04C5 25*02 1476 add a,_d1 04C7 40 16 1477 jc 00103$ 1478 ; SRC/test_sio.c:296: d1 *= 10; 04C9 E5*02 1479 mov a,_d1 04CB 75 F0 0A 1480 mov b,#0x0A 04CE A4 1481 mul ab 04CF F5*02 1482 mov _d1,a 1483 ; SRC/test_sio.c:297: d1 += (c - 0x30); 04D1 8E 05 1484 mov ar5,r6 04D3 ED 1485 mov a,r5 04D4 24 D0 1486 add a,#0xD0 04D6 FD 1487 mov r5,a 04D7 AC*02 1488 mov r4,_d1 04D9 2C 1489 add a,r4 04DA F5*02 1490 mov _d1,a 04DC 02s04r5D 1491 ljmp 00145$ 04DF 1492 00103$: 1493 ; SRC/test_sio.c:300: mistake(); 04DF 12s00r84 1494 lcall _mistake 1495 ; SRC/test_sio.c:301: break; 04E2 02s04r5D 1496 ljmp 00145$ 1497 ; SRC/test_sio.c:303: case 2: 04E5 1498 00108$: 1499 ; SRC/test_sio.c:304: if (d2 == 0xFF) 04E5 74 FF 1500 mov a,#0xFF 04E7 B5*03 0A 1501 cjne a,_d2,00113$ 1502 ; SRC/test_sio.c:305: d2 = (c-0x30); 04EA 8E 05 1503 mov ar5,r6 04EC ED 1504 mov a,r5 04ED 24 D0 1505 add a,#0xD0 04EF F5*03 1506 mov _d2,a 04F1 02s04r5D 1507 ljmp 00145$ 04F4 1508 00113$: 1509 ; SRC/test_sio.c:306: else if (d2 < 10){ 04F4 74 F6 1510 mov a,#0x100 - 0x0A 04F6 25*03 1511 add a,_d2 04F8 40 16 1512 jc 00110$ 1513 ; SRC/test_sio.c:307: d2 *= 10; 04FA E5*03 1514 mov a,_d2 04FC 75 F0 0A 1515 mov b,#0x0A 04FF A4 1516 mul ab 0500 F5*03 1517 mov _d2,a 1518 ; SRC/test_sio.c:308: d2 += (c - 0x30); 0502 8E 05 1519 mov ar5,r6 0504 ED 1520 mov a,r5 0505 24 D0 1521 add a,#0xD0 0507 FD 1522 mov r5,a 0508 AC*03 1523 mov r4,_d2 050A 2C 1524 add a,r4 050B F5*03 1525 mov _d2,a 050D 02s04r5D 1526 ljmp 00145$ 0510 1527 00110$: 1528 ; SRC/test_sio.c:311: mistake(); 0510 12s00r84 1529 lcall _mistake 1530 ; SRC/test_sio.c:312: break; 0513 02s04r5D 1531 ljmp 00145$ 1532 ; SRC/test_sio.c:313: default: 0516 1533 00115$: 1534 ; SRC/test_sio.c:314: mistake(); 0516 12s00r84 1535 lcall _mistake 1536 ; SRC/test_sio.c:316: } 0519 02s04r5D 1537 ljmp 00145$ 051C 1538 00132$: 1539 ; SRC/test_sio.c:319: else if (c == 'D') { //replace to D 051C BE 44 16 1540 cjne r6,#0x44,00129$ 051F BF 00 13 1541 cjne r7,#0x00,00129$ 1542 ; SRC/test_sio.c:320: if(mode!=2) 0522 74 02 1543 mov a,#0x02 0524 B5*00 02 1544 cjne a,_mode,00200$ 0527 80 06 1545 sjmp 00118$ 0529 1546 00200$: 1547 ; SRC/test_sio.c:321: mode = 2; 0529 75*00 02 1548 mov _mode,#0x02 052C 02s04r5D 1549 ljmp 00145$ 052F 1550 00118$: 1551 ; SRC/test_sio.c:323: mistake(); 052F 12s00r84 1552 lcall _mistake 0532 02s04r5D 1553 ljmp 00145$ 0535 1554 00129$: 1555 ; SRC/test_sio.c:325: else if (c == '#') { 0535 BE 23 2E 1556 cjne r6,#0x23,00126$ 0538 BF 00 2B 1557 cjne r7,#0x00,00126$ 1558 ; SRC/test_sio.c:326: if ( d1 < 100 && d2 > 0 && d2 < 100 ){ 053B 74 9C 1559 mov a,#0x100 - 0x64 053D 25*02 1560 add a,_d1 053F 40 1F 1561 jc 00121$ 0541 E5*03 1562 mov a,_d2 0543 60 1B 1563 jz 00121$ 0545 74 9C 1564 mov a,#0x100 - 0x64 0547 25*03 1565 add a,_d2 0549 40 15 1566 jc 00121$ 1567 ; SRC/test_sio.c:327: result = d1/d2; 054B 85*03 F0 1568 mov b,_d2 054E E5*02 1569 mov a,_d1 0550 84 1570 div ab 0551 F5*01 1571 mov _result,a 1572 ; SRC/test_sio.c:328: leds(result); 0553 85*01 82 1573 mov dpl,_result 0556 12s00r00 1574 lcall _leds 1575 ; SRC/test_sio.c:329: ES=1; 0559 D2 AC 1576 setb _ES 1577 ; SRC/test_sio.c:330: TI=1; 055B D2 99 1578 setb _TI 055D 02s04r5D 1579 ljmp 00145$ 0560 1580 00121$: 1581 ; SRC/test_sio.c:334: mistake(); 0560 12s00r84 1582 lcall _mistake 0563 02s04r5D 1583 ljmp 00145$ 0566 1584 00126$: 1585 ; SRC/test_sio.c:341: moderes(); 0566 12s00r77 1586 lcall _moderes 0569 02s04r5D 1587 ljmp 00145$ 056C 1588 00136$: 1589 ; SRC/test_sio.c:348: ES=0; 056C C2 AC 1590 clr _ES 1591 ; SRC/test_sio.c:349: ET0=1; 056E D2 A9 1592 setb _ET0 0570 02s04r5D 1593 ljmp 00145$ 0573 1594 00142$: 1595 ; SRC/test_sio.c:354: dipmod=0; 0573 75*4C 00 1596 mov _dipmod,#0x00 1597 ; SRC/test_sio.c:355: if(frontQ!=endQ){ 0576 E5*4B 1598 mov a,_endQ 0578 B5*4A 02 1599 cjne a,_frontQ,00206$ 057B 80 09 1600 sjmp 00139$ 057D 1601 00206$: 1602 ; SRC/test_sio.c:356: ES=1; 057D D2 AC 1603 setb _ES 1604 ; SRC/test_sio.c:357: ET0=0; 057F C2 A9 1605 clr _ET0 1606 ; SRC/test_sio.c:358: TI=1; 0581 D2 99 1607 setb _TI 0583 02s04r5D 1608 ljmp 00145$ 0586 1609 00139$: 1610 ; SRC/test_sio.c:361: ES=0; 0586 C2 AC 1611 clr _ES 1612 ; SRC/test_sio.c:362: ET0=1; 0588 D2 A9 1613 setb _ET0 058A 02s04r5D 1614 ljmp 00145$ 1615 .area CSEG (CODE) 1616 .area CONST (CODE) 0000 1617 __str_0: 0000 4D 69 73 74 61 6B 1618 .ascii "Mistake has happend" 65 20 68 61 73 20 68 61 70 70 65 6E 64 0013 0A 1619 .db 0x0A 0014 00 1620 .db 0x00 0015 1621 __str_1: 0015 66 61 6E 74 6F 6D 1622 .ascii "fantom mistake" 20 6D 69 73 74 61 6B 65 0023 0A 1623 .db 0x0A 0024 00 1624 .db 0x00 1625 .area XINIT (CODE) 1626 .area CABS (ABS,CODE)