Начинающий (04.03.2009 13:08, просмотров: 1) ответил MBedder на Ну и что прикажешь телепатить по поводу rjmp OLD_NASTROIKI?
Вот что есть include "m2561def.inc"
.include "Def.asm"
//******************************************************************************
.LISTMAC
.CSEG
.org 0x0000
rjmp RESET ;Reset Handler
;reti
.org INT0addr
; rjmp RESET ;EXT_INT0 ; IRQ0 Handler
reti
.org INT1addr
; rjmp RESET ;EXT_INT1 ; IRQ1 Handler
reti
.org INT2addr
; rjmp RESET ;EXT_INT2 ; IRQ2 Handler
reti
.org INT3addr
; rjmp RESET ;EXT_INT3 ; IRQ3 Handler
reti
.org INT4addr
; rjmp RESET ;EXT_INT4 ; IRQ4 Handler
reti
.org INT5addr
; rjmp RESET ;EXT_INT5 ; IRQ5 Handler
reti
.org INT6addr
; rjmp RESET ;EXT_INT6 ; IRQ6 Handler
reti
.org PCI0addr
; rjmp RESET ;PCINT0 ; PCINT0 Handler
reti
.org PCI1addr
; rjmp RESET ;PCINT1 ; PCINT1 Handler
reti
.org PCI2addr
; rjmp RESET ;PCINT2 ; PCINT2 Handler
reti
.org WDTaddr
; rjmp RESET ;WDT ; Watchdog Timer Handler
reti
.org OC2Aaddr
; rjmp RESET ;TIM2_COMPA ; Timer2 Compare A Handler
reti
.org OC2Baddr
; rjmp RESET ;TIM2_COMPB ; Timer2 Compare B Handler
reti
.org OVF2addr
; rjmp RESET ;TIM2_OVF ; Timer2 Overflow Handler
reti
.org ICP1addr
; rjmp RESET ;TIM1_CAPT ; Timer1 Capture Handler
reti
.org OC1Aaddr
; rjmp RESET ;TIM1_COMPA ; Timer1 Compare A Handler
reti
.org OC1Baddr
; rjmp RESET ;TIM1_COMPB ; Timer1 Compare B Handler
reti
.org OC1Caddr
; rjmp RESET ;TIM1_COMPC ; Timer1 Compare C Handler
reti
.org OVF1addr
rjmp TIM1_OVF ; Timer1 Overflow Handler
; reti
.org OC0Aaddr
; rjmp RESET ;TIM0_COMPA ; Timer0 Compare A Handler
reti
.org OC0Baddr
; rjmp RESET ;TIM0_COMPB ; Timer0 Compare B Handler
reti
.org OVF0addr
rjmp TIM0_OVF ;Timer0 Overflow Handler
;reti
.org SPIaddr
; rjmp RESET ;SPI_IO ; SPI Transfer Complete Handler
reti
.org URXC0addr
; rjmp USART0_RXC ; USART0, RX Complete Handler
reti
.org UDRE0addr
; rjmp RESET ;USART0_UDRE ; USART, UDR Empty Handler
reti
.org UTXC0addr
; rjmp USART0_TXC ; USART0, TX Complete Handler
reti
.org ACIaddr
; rjmp RESET ;ANA_COMP ; Analog Comparator Handler
reti
;.org ADCaddr
; rjmp RESET ;ADCInt ; ADC Conversion Complete Handler
reti
.org ERDYaddr
; rjmp RESET ;EE_RDY ; EEPROM Ready Handler
reti
.org ICP3addr
; rjmp RESET ;TIM3_CAPT ; Timer3 Capture Handler
reti
.org OC3Aaddr
; rjmp RESET ;TIM3_COMPA ; Timer3 Compare A Handler
reti
.org OC3Baddr
; rjmp RESET ;TIM3_COMPB ; Timer3 Compare B Handler
reti
.org OC3Caddr
; rjmp RESET ;TIM3_COMPC ; Timer3 Compare C Handler
reti
.org OVF3addr
; rjmp RESET ;TIM3_OVF ; Timer3 Overflow Handler
reti
.org URXC1addr
rjmp USART1_RXC ; USART1, RX Complete Handler
;reti
.org UDRE1addr
; rjmp RESET ;USART1_UDRE ; USART1, UDR Empty Handler
reti
.org UTXC1addr
rjmp USART1_TXC ; USART1, TX Complete Handler
;reti
.org TWIaddr
; rjmp RESET ;TWI ; 2-wire Serial Interface Handler
reti
.org SPMRaddr
; rjmp RESET ;SPM_RDY ; Store Program Memory Ready Handler
reti
.org ICP4addr
; rjmp RESET ;TIM4_CAPT ; Timer4 Capture Handler
reti
.org OC4Aaddr
; rjmp RESET ;TIM4_COMPA ; Timer4 Compare A Handler
reti
.org OC4Baddr
; rjmp RESET ;TIM4_COMPB ; Timer4 Compare B Handler
reti
.org OC4Caddr
; rjmp RESET ;TIM4_COMPB ; Timer4 Compare C Handler
reti
.org OVF4addr
rjmp TIM4_OVF ; Timer4 Overflow Handler
reti
.org ICP5addr
; rjmp RESET ;TIM4_CAPT ; Timer4 Capture Handler
reti
.org OC5Aaddr
; rjmp RESET ;TIM5_COMPA ; Timer5 Compare A Handler
reti
.org OC5Baddr
; rjmp RESET ;TIM5_COMPB ; Timer5 Compare B Handler
reti
.org OC5Caddr
; rjmp RESET ;TIM5_COMPC ; Timer5 Compare C Handler
reti
.org OVF5addr
; rjmp RESET ;TIM5_OVF ; Timer5 Overflow Handler
reti
;------------------------------------------
; стек
.org 0x00067
// Точка входа в программу
RESET:
CLI
ldi TMP_1, high(RAMEND-1)
out SPH, TMP_1
ldi TMP_1, low(RAMEND-1)
out SPL, TMP_1
ldi TMP_1,0xAA
sts LAST_ADDR,TMP_1
//******************************************************************************
// MAIN
//******************************************************************************
//******************************************************************************
// Подгрузка файлов
//******************************************************************************
.include "Init.asm"
.include "ReStart.asm"
.include "Interapt.asm"
.include "Connect.asm"
.include "Delay.asm"
//******************************************************************************
sei
rcall RESTART
rcall CONECT_PROV
rjmp MAIN
MAIN:
rjmp MAIN
//--------------------------------------------------------------------
RESTART:
lds TMP_1,MCUSR
sbrc TMP_1,3 ;WDRF
rcall OLD_NASTROIKI
sbrc TMP_1,2 ;BORF
rcall OLD_NASTROIKI
sbrc TMP_1,1 ;EXTRF
rcall OLD_NASTROIKI
ret
OLD_NASTROIKI:
ret
//--------------------------------------------------------------------------------------------------
CONECT_PROV:
ret
Вот все что пока есть и уже не работает