Asm kodu hex'e çevirmede yardım

Başlatan overlok, 22 Mart 2015, 15:24:12

overlok

Selamlar arkadaşlar, nasıl olduysa daha önce derlediğim kodları bugün hex'e çeviremiyorum. MPLAB IDE ve
MPASMWIN da denedim sonuç hüsran. Kodu hex çevirebilir misiniz?

Asm kodu bu:

list p=16F628
include <P16F628.INC>

;TITLE "Smazlogio v1.7"
;AUTHOR Santelelle


 ;min 1 porta.2
 ;min 2 porta.3
 ;min 4 porta.4
 ;min 8 portb.0
 ;min 16 portb.1
 ;min 32 portb.3

 ;portb minutes b'00001011'
 ;porta minutes b'00011100'

 ;ore 1 porta.1
 ;ore 2 porta.0
 ;ore 4 porta.7
 ;ore 8 porta.6

 ;portb hours b'00000000'
 ;porta hours b'11000011'

 ;pulsante sinistro  portb.4
 ;pulsante destro    portb.5

 ;led MODE portb.3

SEC   EQU  0x20
MIN  EQU   0x21
ORE EQU   0x22
W_TEMP EQU 0x23
S_TEMP EQU 0x24
TMR1_INTERRUPT_FLAG EQU 0x25
LED_ON EQU 0x26
CONTATORE_PULSANTE1 EQU 0x27
PROGRAM EQU 0x28
DELAY_COUNTER EQU 0x29
TMR0_INTERRUPT_FLAG EQU 0x2A
CONTATORE EQU 0x2B
PORTB_INTERRUPT_FLAG EQU 0x2C
CONTATORE_PULSANTE2 EQU 0x2D

  ORG   0000H
    goto  START
;

  ORG   0004H            ;interrupt occurred
      BTFSC PIR1, TMR1IF   ;Timer1 overflowed?
         call T1_OVERFL    ;YES, Service the Timer1 Overflow Interrupt
      BTFSC INTCON,RBIF        ;portb changed?
         call PORTB_INTERRUPT  ;goto portb_interrupt routine
      BTFSC INTCON,TMR0IF        ;portb changed?
         call TMR0_INTERRUPT  ;goto portb_interrupt routine
      retfie
;
; Should NEVER get here
;
  ERROR1 ; NO, Unknown Interrupt Source
  BSF PORTA , 4 ; Toggle a port pin to indicate error
  BCF PORTA , 4
  GOTO ERROR1

START

;inizializzazione variabili
      bcf INTCON,GIE            ;global interrupt enable

      clrf SEC
      clrf MIN
      clrf ORE
      clrf TMR1_INTERRUPT_FLAG
      clrf LED_ON
      clrf PROGRAM
      clrf TMR0_INTERRUPT_FLAG
      clrf CONTATORE
      clrf PORTB_INTERRUPT_FLAG
      clrf DELAY_COUNTER

;fine inizializzazione variabili

;settaggio registri
      bcf   STATUS,RP0   ; select bank0
      clrf  PORTA
      bsf   STATUS,RP0   ; select bank1
      movlw b'00100000'
      movwf TRISA
    
      bcf  STATUS,RP0  ; select bank0
      clrf PORTB
      bsf  STATUS,RP0  ; select bank1
      movlw b'11110000'
      movwf TRISB
    

      bsf  STATUS,RP0  ; select bank1
      movlw b'00000111'
      movwf OPTION_REG 

      movlw b'00000001'  ; enable TMR1 overflow
      movwf PIE1

      movlw b'00000011'
      movwf PCON

      bcf  STATUS,RP0  ; select bank0

      movlw b'00000111'
      movwf CMCON 

      clrf PORTA      ; accende tutti i led
      clrf PORTB      ; accende tutti i led
;fine settaggio registri


ASPETTA_PULS                     ;until the button isn't pushed the program doesn't start
     btfsc PORTB,4               ;
         goto ASPETTA_PULS       ;

      movlw b'11111111'          ;turn off all portb
      movwf PORTA                ;
      movlw b'11111111'          ;turn off all portb
      movwf PORTB                ;

      ;movlw b'00001111'          ;set timer1 as external asyncronous counter
      movlw b'00111111'          ;16 seconds
      movwf T1CON                ;

      goto PROGRAMMING_MODE
    


m_cicle                          ;main cicle

      btfsc TMR1_INTERRUPT_FLAG,0     ;if an interrupt occurred
         call AGGIORNA_ORA       ;upgrade time
  
      btfss TMR0_INTERRUPT_FLAG,0
         goto NO_TMR0_INTERRUPT
      bcf TMR0_INTERRUPT_FLAG,0
      clrf CONTATORE
      bcf LED_ON,0
      clrf CONTATORE
NO_TMR0_INTERRUPT


      btfss PORTB_INTERRUPT_FLAG,0 
         goto NO_PORTB_INTERRUPT
      bcf PORTB_INTERRUPT_FLAG,0 

      btfss PORTB,4
         incf CONTATORE

   bsf LED_ON,0
      clrf TMR0
      bcf INTCON,T0IF           ;clear the interrupt TMR0 flag
      bsf INTCON,T0IE           ;activate timer0 interrupt
NO_PORTB_INTERRUPT


      movlw b'00001000'
      subwf CONTATORE,0
      btfsc STATUS,Z
         goto PROGRAMMING_MODE

      btfss LED_ON,0             ;se è attivo il flag accende i led
         goto NO_OUTPUT
      call OUTPUT_MINUTI
      call OUTPUT_ORE
      goto  m_cicle

NO_OUTPUT
      
       call ALL_LED_OFF

       sleep;

goto   m_cicle             ;end main cicle


PROGRAMMING_MODE

     bcf INTCON,GIE        ;disables interrupt

     bcf INTCON,RBIF
     bcf INTCON,TMR0IF
     bcf PIR1, TMR1IF

     call ALL_LED_OFF
     bcf PORTB,2         ;turn on blue led
     clrf MIN
     clrf ORE
     call DELAY

     clrf CONTATORE_PULSANTE1
     clrf CONTATORE_PULSANTE2
     clrf CONTATORE

PROG_MINUTI
;
     btfss PORTB,4
        incf CONTATORE_PULSANTE1
     btfsc PORTB,4
        clrf CONTATORE_PULSANTE1
     movlw b'00001110'
     subwf CONTATORE_PULSANTE1,w
     btfsc STATUS,Z
        goto RELASE_CYCLE1R_
;
     btfss PORTB,5
        incf CONTATORE_PULSANTE2
     btfsc PORTB,5
        clrf CONTATORE_PULSANTE2 
     movlw b'00001110'
     subwf CONTATORE_PULSANTE2,w
     btfsc STATUS,Z
        goto RELASE_CYCLE1L_

     goto PROG_MINUTI
;
RELASE_CYCLE1R_
    incf MIN
    call OUTPUT_MINUTI
    clrf CONTATORE_PULSANTE1
    clrf CONTATORE_PULSANTE2
RELASE_CYCLE1R
    btfss PORTB,4
       clrf CONTATORE_PULSANTE1
    btfsc PORTB,4
       incf CONTATORE_PULSANTE1
    movlw b'00001110'
    subwf CONTATORE_PULSANTE1,w
    btfsc STATUS,Z
        goto PROG_MINUTI
    goto RELASE_CYCLE1R
;
  
RELASE_CYCLE1L_
    clrf CONTATORE_PULSANTE1
    clrf CONTATORE_PULSANTE2
RELASE_CYCLE1L
    btfss PORTB,5
       clrf CONTATORE_PULSANTE2
    btfsc PORTB,5
       incf CONTATORE_PULSANTE2
    movlw b'00001110'
    subwf CONTATORE_PULSANTE2,w
    btfsc STATUS,Z
        goto PROG_HOUR_
    goto RELASE_CYCLE1L
;;
PROG_HOUR_
    clrf CONTATORE_PULSANTE1
    clrf CONTATORE_PULSANTE2
PROG_HOUR
     btfss PORTB,4
        incf CONTATORE_PULSANTE1
     btfsc PORTB,4
        clrf CONTATORE_PULSANTE1
     movlw b'00001110'
     subwf CONTATORE_PULSANTE1,w
     btfsc STATUS,Z
        goto RELASE_CYCLE2R_

     btfss PORTB,5
        incf CONTATORE_PULSANTE2
     btfsc PORTB,5
        clrf CONTATORE_PULSANTE2 
    movlw b'00001110'
    subwf CONTATORE_PULSANTE2,w
     btfsc STATUS,Z
        goto RELASE_CYCLE2L_
     goto PROG_HOUR

RELASE_CYCLE2R_
    incf ORE
     call OUTPUT_ORE
    clrf CONTATORE_PULSANTE1
    clrf CONTATORE_PULSANTE2
RELASE_CYCLE2R
    btfss PORTB,4
       clrf CONTATORE_PULSANTE1
    btfsc PORTB,4
       incf CONTATORE_PULSANTE1
    movlw b'00001110'
    subwf CONTATORE_PULSANTE1,w
    btfsc STATUS,Z
        goto PROG_HOUR
    goto RELASE_CYCLE2R

  
RELASE_CYCLE2L_
    clrf CONTATORE_PULSANTE1
    clrf CONTATORE_PULSANTE2
RELASE_CYCLE2L
    btfss PORTB,5
       clrf CONTATORE_PULSANTE2
    btfsc PORTB,5
       incf CONTATORE_PULSANTE2
    movlw b'00001110'
    subwf CONTATORE_PULSANTE2,w
    btfsc STATUS,Z
        goto END_PROGRAMMING
    goto RELASE_CYCLE2L

END_PROGRAMMING

     call ALL_LED_OFF
     bcf T1CON,T1OSCEN
     clrf TMR1H
     clrf TMR1L
     bsf T1CON,T1OSCEN

     bsf INTCON,RBIE           ;portb interrupt on change enable
     bsf INTCON,PEIE           ;peripheral interrupt enable
     bsf INTCON,GIE            ;global interrupt enable

goto m_cicle


ALL_LED_OFF
   movlw b'11111111'
   movwf PORTA
   movwf PORTB
return


OUTPUT_MINUTI

      movlw b'00001011'
      iorwf PORTB,f
      movlw b'00011100'
      iorwf PORTA,f

      btfsc MIN,0
         bcf PORTA,2
      btfsc MIN,1
         bcf PORTA,3
      btfsc MIN,2
         bcf PORTA,4
      btfsc MIN,3
         bcf PORTB,0
      btfsc MIN,4
         bcf PORTB,1
      btfsc MIN,5
         bcf PORTB,3
return

OUTPUT_ORE

      movlw b'11000011'
      iorwf PORTA,f

      btfsc ORE,0
         bcf PORTA,1
      btfsc ORE,1
         bcf PORTA,0
      btfsc ORE,2
         bcf PORTA,7
      btfsc ORE,3
         bcf PORTA,6
    
return


AGGIORNA_ORA

      bcf TMR1_INTERRUPT_FLAG,0        ;clear interrupt TMR1 flag

      ;incf SEC                    ;inc seconds
      ;incf SEC                    ;inc seconds

      movlw b'00010000'
      addwf SEC,f

      movlw b'00111100'           ;are seconds >= 60?
      subwf SEC,W                 ;
      btfsc STATUS,C              ;
      call INC_MIN             ; call the function that increment minutes

      movlw b'00111100'           ;are minutes >= 60?
      subwf MIN,W                 ;
      btfsc STATUS,Z              ;
      call INC_ORE             ; call the function that increment hours
      movlw b'11111111'
    
return                           ;return to main

INC_MIN                           ;increment minutes
      incf MIN,f 
      movlw b'00111100'           ;seconds = seconds - 60                 
      subwf SEC , f               ;
return

INC_ORE                           ;increment minutes
      incf ORE                    ;inc ore
      movlw b'00111100'           ;minutes = minutes - 60                 
      subwf MIN , f               ;

      movlw b'00001100'           ;are hours = 12?
      subwf ORE,W                 ;
      btfsc STATUS,Z              ;
      clrf ORE                 ; if hours=12 then hours=0
return


TMR0_INTERRUPT
      bsf TMR0_INTERRUPT_FLAG,0
      bcf INTCON,T0IF
      bcf INTCON,T0IE
      bsf INTCON,7        ;enable interrupt
return

PORTB_INTERRUPT
      movf PORTB,w
      bcf INTCON,RBIF

      btfss PORTB,4
         goto SET_PORTB_FLAG
      btfss PORTB,5
         goto SET_PORTB_FLAG
      bsf INTCON,7        ;enable interrupt
      return

SET_PORTB_FLAG
      bsf PORTB_INTERRUPT_FLAG,0 
      bsf INTCON,7        ;enable interrupt
return

T1_OVERFL                        ;TMR1 overflowed
      bsf TMR1_INTERRUPT_FLAG,0
      bcf PIR1, TMR1IF ; Clear Timer1 Interrupt Flag
      bsf INTCON,7        ;enable interrupt
return

DELAY
     clrf DELAY_COUNTER
DELAY_CYCLE
     incf DELAY_COUNTER
     btfss STATUS,Z
        goto DELAY_CYCLE
return



end




hata kodu da bu:

Warning[205] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 1 : Found directive in column 1. (list)
Warning[205] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 2 : Found directive in column 1. (include)
Error[113]   C:\USERS\ARTIN\DESKTOP\BINARY.ASM 55 : Symbol not previously defined (TMR0IF)
Warning[207] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 61 : Found label after column 1. (ERROR1)
Message[302] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 89 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Message[302] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 95 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Message[302] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 100 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Message[302] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 103 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Message[302] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 106 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Message[305] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 154 : Using default destination of 1 (file).
Warning[203] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 180 : Found opcode in column 1. (goto)
Error[113]   C:\USERS\ARTIN\DESKTOP\BINARY.ASM 188 : Symbol not previously defined (TMR0IF)
Message[305] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 204 : Using default destination of 1 (file).
Message[305] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 213 : Using default destination of 1 (file).
Message[305] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 224 : Using default destination of 1 (file).
Message[305] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 232 : Using default destination of 1 (file).
Message[305] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 247 : Using default destination of 1 (file).
Message[305] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 259 : Using default destination of 1 (file).
Message[305] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 268 : Using default destination of 1 (file).
Message[305] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 278 : Using default destination of 1 (file).
Message[305] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 286 : Using default destination of 1 (file).
Message[305] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 301 : Using default destination of 1 (file).
Warning[203] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 320 : Found opcode in column 1. (goto)
Warning[203] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 327 : Found opcode in column 1. (return)
Warning[203] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 349 : Found opcode in column 1. (return)
Warning[203] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 365 : Found opcode in column 1. (return)
Warning[203] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 389 : Found opcode in column 1. (return)
Warning[203] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 395 : Found opcode in column 1. (return)
Message[305] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 398 : Using default destination of 1 (file).
Warning[203] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 406 : Found opcode in column 1. (return)
Warning[203] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 414 : Found opcode in column 1. (return)
Warning[203] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 430 : Found opcode in column 1. (return)
Warning[203] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 436 : Found opcode in column 1. (return)
Message[305] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 441 : Using default destination of 1 (file).
Warning[203] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 444 : Found opcode in column 1. (return)
Warning[205] C:\USERS\ARTIN\DESKTOP\BINARY.ASM 448 : Found directive in column 1. (end)
Hanımların dikkatine, overlok makinesi ayağınıza geldi!

FEHMİ_ASM

  Proje dosyanızı masaüstünden çalıştırmayın, sürücüye (c,d..) atıp ordan açın.
Hz.Hamza'nın Belinde İki Kılıç Duruyor ! Attığı Her Adım Bir Kalbi Durduruyor ! Ey Hamza ! Gördüğün Hiçbir Şeyden Korkmazsın , Bu Doğru Ama Heybetini Gizli Tut , Yürüyüşün Ölümü Korkutuyor !  İşte Hz.Ömer ve Hz.Ali , Biri Hattaboğlu , Biri Haydâr-ı Kerrar ! Ve Kolkola Ölümün Ağzına Giriyorlar !  Azrai

overlok

Hanımların dikkatine, overlok makinesi ayağınıza geldi!

FEHMİ_ASM

 Aldığın hata halen aynı mı ?
Hz.Hamza'nın Belinde İki Kılıç Duruyor ! Attığı Her Adım Bir Kalbi Durduruyor ! Ey Hamza ! Gördüğün Hiçbir Şeyden Korkmazsın , Bu Doğru Ama Heybetini Gizli Tut , Yürüyüşün Ölümü Korkutuyor !  İşte Hz.Ömer ve Hz.Ali , Biri Hattaboğlu , Biri Haydâr-ı Kerrar ! Ve Kolkola Ölümün Ağzına Giriyorlar !  Azrai

overlok

Aynen hocam, aynı hatayı alıyorum.
Hanımların dikkatine, overlok makinesi ayağınıza geldi!

FEHMİ_ASM

 Halen aynı hatayı alıyorsan, projeyi sürücüye halen atmamış oluyorsun. Şimdi projeyi komple sürücüye kopyala ve o dosyanın içinden aç.
Hz.Hamza'nın Belinde İki Kılıç Duruyor ! Attığı Her Adım Bir Kalbi Durduruyor ! Ey Hamza ! Gördüğün Hiçbir Şeyden Korkmazsın , Bu Doğru Ama Heybetini Gizli Tut , Yürüyüşün Ölümü Korkutuyor !  İşte Hz.Ömer ve Hz.Ali , Biri Hattaboğlu , Biri Haydâr-ı Kerrar ! Ve Kolkola Ölümün Ağzına Giriyorlar !  Azrai

overlok

C ye de D ye de kopyaladım, direkt sürücünün içinden açtım,  olmadı yeni klasöre kopyalayıp denedim, hatta gene C ve D.  sürücülerinin içinden direkt sağ tıklayıp birlikte aç dedim ama sonuç hep aynı.
Hanımların dikkatine, overlok makinesi ayağınıza geldi!

FEHMİ_ASM

    Kodun derleniyor. Proje dosyanı komple buraya at bir bakalım.
Hz.Hamza'nın Belinde İki Kılıç Duruyor ! Attığı Her Adım Bir Kalbi Durduruyor ! Ey Hamza ! Gördüğün Hiçbir Şeyden Korkmazsın , Bu Doğru Ama Heybetini Gizli Tut , Yürüyüşün Ölümü Korkutuyor !  İşte Hz.Ömer ve Hz.Ali , Biri Hattaboğlu , Biri Haydâr-ı Kerrar ! Ve Kolkola Ölümün Ağzına Giriyorlar !  Azrai

overlok

#8
Hocam elimde bir tek asm kodu var, onuda ilk mesajımda eklemiştim, başka dosya yok.
Ama derleme ile oluşan, COD , ERR , LST dosyalarınıda linkten indirebilirsiniz hocam

http://s4.dosya.tc/server/1H4lc5/binary.rar.html

list p=16F628
include <P16F628.INC>

;TITLE "Smazlogio v1.7"
;AUTHOR Santelelle

 ;min 1 porta.2
 ;min 2 porta.3
 ;min 4 porta.4
 ;min 8 portb.0
 ;min 16 portb.1
 ;min 32 portb.3

 ;portb minutes b'00001011'
 ;porta minutes b'00011100'

 ;ore 1 porta.1
 ;ore 2 porta.0
 ;ore 4 porta.7
 ;ore 8 porta.6

 ;portb hours b'00000000'
 ;porta hours b'11000011'

 ;pulsante sinistro  portb.4
 ;pulsante destro    portb.5

 ;led MODE portb.3

SEC   EQU  0x20
MIN  EQU   0x21
ORE EQU   0x22
W_TEMP EQU 0x23
S_TEMP EQU 0x24
TMR1_INTERRUPT_FLAG EQU 0x25
LED_ON EQU 0x26
CONTATORE_PULSANTE1 EQU 0x27
PROGRAM EQU 0x28
DELAY_COUNTER EQU 0x29
TMR0_INTERRUPT_FLAG EQU 0x2A
CONTATORE EQU 0x2B
PORTB_INTERRUPT_FLAG EQU 0x2C
CONTATORE_PULSANTE2 EQU 0x2D

  ORG   0000H
    goto  START
;

  ORG   0004H            ;interrupt occurred
      BTFSC PIR1, TMR1IF   ;Timer1 overflowed?
         call T1_OVERFL    ;YES, Service the Timer1 Overflow Interrupt
      BTFSC INTCON,RBIF        ;portb changed?
         call PORTB_INTERRUPT  ;goto portb_interrupt routine
      BTFSC INTCON,TMR0IF        ;portb changed?
         call TMR0_INTERRUPT  ;goto portb_interrupt routine
      retfie
;
; Should NEVER get here
;
  ERROR1 ; NO, Unknown Interrupt Source
  BSF PORTA , 4 ; Toggle a port pin to indicate error
  BCF PORTA , 4
  GOTO ERROR1

START

;inizializzazione variabili
      bcf INTCON,GIE            ;global interrupt enable

      clrf SEC
      clrf MIN
      clrf ORE
      clrf TMR1_INTERRUPT_FLAG
      clrf LED_ON
      clrf PROGRAM
      clrf TMR0_INTERRUPT_FLAG
      clrf CONTATORE
      clrf PORTB_INTERRUPT_FLAG
      clrf DELAY_COUNTER

;fine inizializzazione variabili

;settaggio registri
      bcf   STATUS,RP0   ; select bank0
      clrf  PORTA
      bsf   STATUS,RP0   ; select bank1
      movlw b'00100000'
      movwf TRISA
    
      bcf  STATUS,RP0  ; select bank0
      clrf PORTB
      bsf  STATUS,RP0  ; select bank1
      movlw b'11110000'
      movwf TRISB
    

      bsf  STATUS,RP0  ; select bank1
      movlw b'00000111'
      movwf OPTION_REG 

      movlw b'00000001'  ; enable TMR1 overflow
      movwf PIE1

      movlw b'00000011'
      movwf PCON

      bcf  STATUS,RP0  ; select bank0

      movlw b'00000111'
      movwf CMCON 

      clrf PORTA      ; accende tutti i led
      clrf PORTB      ; accende tutti i led
;fine settaggio registri


ASPETTA_PULS                     ;until the button isn't pushed the program doesn't start
     btfsc PORTB,4               ;
         goto ASPETTA_PULS       ;

      movlw b'11111111'          ;turn off all portb
      movwf PORTA                ;
      movlw b'11111111'          ;turn off all portb
      movwf PORTB                ;

      ;movlw b'00001111'          ;set timer1 as external asyncronous counter
      movlw b'00111111'          ;16 seconds
      movwf T1CON                ;

      goto PROGRAMMING_MODE
    


m_cicle                          ;main cicle

      btfsc TMR1_INTERRUPT_FLAG,0     ;if an interrupt occurred
         call AGGIORNA_ORA       ;upgrade time
  
      btfss TMR0_INTERRUPT_FLAG,0
         goto NO_TMR0_INTERRUPT
      bcf TMR0_INTERRUPT_FLAG,0
      clrf CONTATORE
      bcf LED_ON,0
      clrf CONTATORE
NO_TMR0_INTERRUPT


      btfss PORTB_INTERRUPT_FLAG,0 
         goto NO_PORTB_INTERRUPT
      bcf PORTB_INTERRUPT_FLAG,0 

      btfss PORTB,4
         incf CONTATORE

   bsf LED_ON,0
      clrf TMR0
      bcf INTCON,T0IF           ;clear the interrupt TMR0 flag
      bsf INTCON,T0IE           ;activate timer0 interrupt
NO_PORTB_INTERRUPT


      movlw b'00001000'
      subwf CONTATORE,0
      btfsc STATUS,Z
         goto PROGRAMMING_MODE

      btfss LED_ON,0             ;se è attivo il flag accende i led
         goto NO_OUTPUT
      call OUTPUT_MINUTI
      call OUTPUT_ORE
      goto  m_cicle

NO_OUTPUT
      
       call ALL_LED_OFF

       sleep;

goto   m_cicle             ;end main cicle


PROGRAMMING_MODE

     bcf INTCON,GIE        ;disables interrupt

     bcf INTCON,RBIF
     bcf INTCON,TMR0IF
     bcf PIR1, TMR1IF

     call ALL_LED_OFF
     bcf PORTB,2         ;turn on blue led
     clrf MIN
     clrf ORE
     call DELAY

     clrf CONTATORE_PULSANTE1
     clrf CONTATORE_PULSANTE2
     clrf CONTATORE

PROG_MINUTI
;
     btfss PORTB,4
        incf CONTATORE_PULSANTE1
     btfsc PORTB,4
        clrf CONTATORE_PULSANTE1
     movlw b'00001110'
     subwf CONTATORE_PULSANTE1,w
     btfsc STATUS,Z
        goto RELASE_CYCLE1R_
;
     btfss PORTB,5
        incf CONTATORE_PULSANTE2
     btfsc PORTB,5
        clrf CONTATORE_PULSANTE2 
     movlw b'00001110'
     subwf CONTATORE_PULSANTE2,w
     btfsc STATUS,Z
        goto RELASE_CYCLE1L_

     goto PROG_MINUTI
;
RELASE_CYCLE1R_
    incf MIN
    call OUTPUT_MINUTI
    clrf CONTATORE_PULSANTE1
    clrf CONTATORE_PULSANTE2
RELASE_CYCLE1R
    btfss PORTB,4
       clrf CONTATORE_PULSANTE1
    btfsc PORTB,4
       incf CONTATORE_PULSANTE1
    movlw b'00001110'
    subwf CONTATORE_PULSANTE1,w
    btfsc STATUS,Z
        goto PROG_MINUTI
    goto RELASE_CYCLE1R
;
  
RELASE_CYCLE1L_
    clrf CONTATORE_PULSANTE1
    clrf CONTATORE_PULSANTE2
RELASE_CYCLE1L
    btfss PORTB,5
       clrf CONTATORE_PULSANTE2
    btfsc PORTB,5
       incf CONTATORE_PULSANTE2
    movlw b'00001110'
    subwf CONTATORE_PULSANTE2,w
    btfsc STATUS,Z
        goto PROG_HOUR_
    goto RELASE_CYCLE1L
;;
PROG_HOUR_
    clrf CONTATORE_PULSANTE1
    clrf CONTATORE_PULSANTE2
PROG_HOUR
     btfss PORTB,4
        incf CONTATORE_PULSANTE1
     btfsc PORTB,4
        clrf CONTATORE_PULSANTE1
     movlw b'00001110'
     subwf CONTATORE_PULSANTE1,w
     btfsc STATUS,Z
        goto RELASE_CYCLE2R_

     btfss PORTB,5
        incf CONTATORE_PULSANTE2
     btfsc PORTB,5
        clrf CONTATORE_PULSANTE2 
    movlw b'00001110'
    subwf CONTATORE_PULSANTE2,w
     btfsc STATUS,Z
        goto RELASE_CYCLE2L_
     goto PROG_HOUR

RELASE_CYCLE2R_
    incf ORE
     call OUTPUT_ORE
    clrf CONTATORE_PULSANTE1
    clrf CONTATORE_PULSANTE2
RELASE_CYCLE2R
    btfss PORTB,4
       clrf CONTATORE_PULSANTE1
    btfsc PORTB,4
       incf CONTATORE_PULSANTE1
    movlw b'00001110'
    subwf CONTATORE_PULSANTE1,w
    btfsc STATUS,Z
        goto PROG_HOUR
    goto RELASE_CYCLE2R

  
RELASE_CYCLE2L_
    clrf CONTATORE_PULSANTE1
    clrf CONTATORE_PULSANTE2
RELASE_CYCLE2L
    btfss PORTB,5
       clrf CONTATORE_PULSANTE2
    btfsc PORTB,5
       incf CONTATORE_PULSANTE2
    movlw b'00001110'
    subwf CONTATORE_PULSANTE2,w
    btfsc STATUS,Z
        goto END_PROGRAMMING
    goto RELASE_CYCLE2L

END_PROGRAMMING

     call ALL_LED_OFF
     bcf T1CON,T1OSCEN
     clrf TMR1H
     clrf TMR1L
     bsf T1CON,T1OSCEN

     bsf INTCON,RBIE           ;portb interrupt on change enable
     bsf INTCON,PEIE           ;peripheral interrupt enable
     bsf INTCON,GIE            ;global interrupt enable

goto m_cicle


ALL_LED_OFF
   movlw b'11111111'
   movwf PORTA
   movwf PORTB
return


OUTPUT_MINUTI

      movlw b'00001011'
      iorwf PORTB,f
      movlw b'00011100'
      iorwf PORTA,f

      btfsc MIN,0
         bcf PORTA,2
      btfsc MIN,1
         bcf PORTA,3
      btfsc MIN,2
         bcf PORTA,4
      btfsc MIN,3
         bcf PORTB,0
      btfsc MIN,4
         bcf PORTB,1
      btfsc MIN,5
         bcf PORTB,3
return

OUTPUT_ORE

      movlw b'11000011'
      iorwf PORTA,f

      btfsc ORE,0
         bcf PORTA,1
      btfsc ORE,1
         bcf PORTA,0
      btfsc ORE,2
         bcf PORTA,7
      btfsc ORE,3
         bcf PORTA,6
    
return


AGGIORNA_ORA

      bcf TMR1_INTERRUPT_FLAG,0        ;clear interrupt TMR1 flag

      ;incf SEC                    ;inc seconds
      ;incf SEC                    ;inc seconds

      movlw b'00010000'
      addwf SEC,f

      movlw b'00111100'           ;are seconds >= 60?
      subwf SEC,W                 ;
      btfsc STATUS,C              ;
      call INC_MIN             ; call the function that increment minutes

      movlw b'00111100'           ;are minutes >= 60?
      subwf MIN,W                 ;
      btfsc STATUS,Z              ;
      call INC_ORE             ; call the function that increment hours
      movlw b'11111111'
    
return                           ;return to main

INC_MIN                           ;increment minutes
      incf MIN,f 
      movlw b'00111100'           ;seconds = seconds - 60                 
      subwf SEC , f               ;
return

INC_ORE                           ;increment minutes
      incf ORE                    ;inc ore
      movlw b'00111100'           ;minutes = minutes - 60                 
      subwf MIN , f               ;

      movlw b'00001100'           ;are hours = 12?
      subwf ORE,W                 ;
      btfsc STATUS,Z              ;
      clrf ORE                 ; if hours=12 then hours=0
return


TMR0_INTERRUPT
      bsf TMR0_INTERRUPT_FLAG,0
      bcf INTCON,T0IF
      bcf INTCON,T0IE
      bsf INTCON,7        ;enable interrupt
return

PORTB_INTERRUPT
      movf PORTB,w
      bcf INTCON,RBIF

      btfss PORTB,4
         goto SET_PORTB_FLAG
      btfss PORTB,5
         goto SET_PORTB_FLAG
      bsf INTCON,7        ;enable interrupt
      return

SET_PORTB_FLAG
      bsf PORTB_INTERRUPT_FLAG,0 
      bsf INTCON,7        ;enable interrupt
return

T1_OVERFL                        ;TMR1 overflowed
      bsf TMR1_INTERRUPT_FLAG,0
      bcf PIR1, TMR1IF ; Clear Timer1 Interrupt Flag
      bsf INTCON,7        ;enable interrupt
return

DELAY
     clrf DELAY_COUNTER
DELAY_CYCLE
     incf DELAY_COUNTER
     btfss STATUS,Z
        goto DELAY_CYCLE
return



end



hata kodu:

Warning[205] D:\BINARY.ASM 1 : Found directive in column 1. (list)
Warning[205] D:\BINARY.ASM 2 : Found directive in column 1. (include)
Error[113]   D:\BINARY.ASM 55 : Symbol not previously defined (TMR0IF)
Warning[207] D:\BINARY.ASM 61 : Found label after column 1. (ERROR1)
Message[302] D:\BINARY.ASM 89 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Message[302] D:\BINARY.ASM 95 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Message[302] D:\BINARY.ASM 100 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Message[302] D:\BINARY.ASM 103 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Message[302] D:\BINARY.ASM 106 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Message[305] D:\BINARY.ASM 154 : Using default destination of 1 (file).
Warning[203] D:\BINARY.ASM 180 : Found opcode in column 1. (goto)
Error[113]   D:\BINARY.ASM 188 : Symbol not previously defined (TMR0IF)
Message[305] D:\BINARY.ASM 204 : Using default destination of 1 (file).
Message[305] D:\BINARY.ASM 213 : Using default destination of 1 (file).
Message[305] D:\BINARY.ASM 224 : Using default destination of 1 (file).
Message[305] D:\BINARY.ASM 232 : Using default destination of 1 (file).
Message[305] D:\BINARY.ASM 247 : Using default destination of 1 (file).
Message[305] D:\BINARY.ASM 259 : Using default destination of 1 (file).
Message[305] D:\BINARY.ASM 268 : Using default destination of 1 (file).
Message[305] D:\BINARY.ASM 278 : Using default destination of 1 (file).
Message[305] D:\BINARY.ASM 286 : Using default destination of 1 (file).
Message[305] D:\BINARY.ASM 301 : Using default destination of 1 (file).
Warning[203] D:\BINARY.ASM 320 : Found opcode in column 1. (goto)
Warning[203] D:\BINARY.ASM 327 : Found opcode in column 1. (return)
Warning[203] D:\BINARY.ASM 349 : Found opcode in column 1. (return)
Warning[203] D:\BINARY.ASM 365 : Found opcode in column 1. (return)
Warning[203] D:\BINARY.ASM 389 : Found opcode in column 1. (return)
Warning[203] D:\BINARY.ASM 395 : Found opcode in column 1. (return)
Message[305] D:\BINARY.ASM 398 : Using default destination of 1 (file).
Warning[203] D:\BINARY.ASM 406 : Found opcode in column 1. (return)
Warning[203] D:\BINARY.ASM 414 : Found opcode in column 1. (return)
Warning[203] D:\BINARY.ASM 430 : Found opcode in column 1. (return)
Warning[203] D:\BINARY.ASM 436 : Found opcode in column 1. (return)
Message[305] D:\BINARY.ASM 441 : Using default destination of 1 (file).
Warning[203] D:\BINARY.ASM 444 : Found opcode in column 1. (return)
Warning[205] D:\BINARY.ASM 448 : Found directive in column 1. (end)

Hanımların dikkatine, overlok makinesi ayağınıza geldi!

FEHMİ_ASM

#9
Aşağıdaki dosyayı D'ye atın ve çalıştırın.

http://s2.dosya.tc/server/t52KJe/Binary.rar.html
şifre : picproje

Hz.Hamza'nın Belinde İki Kılıç Duruyor ! Attığı Her Adım Bir Kalbi Durduruyor ! Ey Hamza ! Gördüğün Hiçbir Şeyden Korkmazsın , Bu Doğru Ama Heybetini Gizli Tut , Yürüyüşün Ölümü Korkutuyor !  İşte Hz.Ömer ve Hz.Ali , Biri Hattaboğlu , Biri Haydâr-ı Kerrar ! Ve Kolkola Ölümün Ağzına Giriyorlar !  Azrai

diversant

Alıntı yapılan: overlok - 22 Mart 2015, 19:11:59


Error[113]   D:\BINARY.ASM 55 : Symbol not previously defined (TMR0IF)

Error[113]   D:\BINARY.ASM 188 : Symbol not previously defined (TMR0IF)


TMR0IF daha önceden tanımlanmamış diyor

overlok

Alıntı yapılan: FEHMİ_ASM - 22 Mart 2015, 19:37:20
Aşağıdaki dosyayı D'ye atın ve çalıştırın.

http://s2.dosya.tc/server/t52KJe/Binary.rar.html
şifre : picproje

Hocam çok teşekkür ederim, çalıştı sonunda be :-)  kesin benim pc bozuk (suçu pc ye atimde, beceriksizliğim gölgede kalsın :-) :-) )

Sizide ugraştırdım, elinize sağlık tekrar.
Hanımların dikkatine, overlok makinesi ayağınıza geldi!