как раз с макросами проблем нет. а дизассемблер с самого начала программы выдаёт какую то хрень --- D:\1_Progect\video_502\Video_502.s ---------------------------------------------------------
1:
2:
3: .include "p24hj128gp502.inc"
4:
5: .equiv rgb_port,LATB ; define RGB output port here
6: .equiv vsync_port,LATA ; define VSYNC port...
7: .equiv vsync_bit,0 ; ...and bit at VSYNC port here
8: .equiv kbd_port,PORTB ; define KBD Clock and Data port...
9: .equiv kbd_clk,7 ; ...and Clock input port bit...
10: .equiv kbd_data,8 ; ...and Data input port bit
0118E 0414DC goto 0x0014dc 11: .equiv oc_byte,IFS0 ; OC1IF byte
01190 000000 nop
12: .equiv oc_bit,0x0002 ; OC1IF bit
13: ;-------------------------------------------------------------------------------------------------------------------------------------------------------------
01192 265905 mov.w #0x6590,0x000a 14: config __FBS, RBS_NO_RAM & BSS_NO_FLASH & BWRP_WRPROTECT_OFF
15: config __FSS, RSS_NO_RAM & SSS_NO_FLASH & SWRP_WRPROTECT_OFF
01194 093A98 repeat #15000 16: config __FGS, GSS_OFF & GCP_OFF & GWRP_OFF
01196 000000 nop 17: config __FOSCSEL, FNOSC_PRIPLL & IESO_OFF
01198 E90285 dec.w 0x000a,0x000a 18: config __FOSC, FCKSM_CSDCMD & OSCIOFNC_OFF & POSCMD_XT
0119A 3AFFFC bra nz, 0x001194 19: config __FWDT, FWDTEN_OFF & WINDIS_OFF
0119C 060000 return 20: config __FPOR, FPWRT_PWR128
21: config __FICD, JTAGEN_OFF & ICS_PGD2
22: ;--------------------------------------------------------------------------------------------------------------------------------------------------------------
0119E 0212AE call 0x0012ae 23: .bss
011A0 000000 nop
011A2 022F78 call 0x002f78 24: .align (0x100)
011A4 000000 nop
25: RX_CIRCULAR: .space 0x100 ; MUST BE ALIGNED TO 0x100
011A6 AF2A2A btsc.b 0x0a2a,#1 26:
011A8 3700AB bra 0x001300 27: .align (0x100)
011AA AF4A2A btsc.b 0x0a2a,#2 28: TX_CIRCULAR: .space 0x100 ; MUST BE ALIGNED TO 0x100
011AC 3700FD bra 0x0013a8 29:
30: .align (0x100)
011AE 200201 mov.w #0x20,0x0002 31: BITTAB1 : .space 0x22 ; MUST BE ALIGNED TO 0x100
011B0 E10401 cp.b 0x0000,0x0002 32:
011B2 39014E bra nc, 0x001450 33: RX_WR: .space 1 ; UART receive write pointer (low byte only)
011B4 200801 mov.w #0x80,0x0002 34: RX_RD: .space 1 ; UART receive read pointer (low byte only)
011B6 E10401 cp.b 0x0000,0x0002 35: TX_WR: .space 1 ; UART transmit write pointer (low byte only)
011B8 310169 bra c, 0x00148c 36: TX_RD: .space 1 ; UART transmit read pointer (low byte only)
37:
011BA 780080 mov.w 0x0000,0x0002 38: FLAG: .space 2 ; bit 0: mode (reset:95.6%, set:4%)
011BC 022E90 call 0x002e90 39: ; bit 1: kbd handshaking (set if KBDBUF ready)
011BE 000000 nop