This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can anyone tell me why there are the following errors in my asembling programe?

Can anyone tell me why there are the following errors in my asembling programe?
1)where there is a RETI instruction and it belongs to an interrupt sequence actually.

warning A80: 'INTERRUPT RETURN' IN NON INTERRUPT PROCEDURE
2)in a CALLS plus RETS sequence,there is an error as follow
C167BK32.ASM(9770): warning A78: 'FAR RETURN' IN NON FAR PROCEDURE

Thank you!

Parents
  • This makes no sense at all without seeing the actual code!

    Post the smallest complete code example that illustrates the problem, being sure to follow the instructions for posting code.
    Also be sure to cut & paste the code - do not re-type!

Reply
  • This makes no sense at all without seeing the actual code!

    Post the smallest complete code example that illustrates the problem, being sure to follow the instructions for posting code.
    Also be sure to cut & paste the code - do not re-type!

Children
  • Thank you, and I appreciate your help. To be mentioned it, it is a portion of a disassemble programme decoding from a *.dat by IDA tool
    Example 1:

    ADCINT:
    add r0, r0
    add r0, r0
    ADEINT:
    add r0, r0
    add r0, r0
    S0TINT:
    jmps 0, S0TINT_handler
    S0TINT_handler: ; CODE XREF: ROM:00A8 J
    push r4
    movb rl4, #1
    movb 0B316h, rl4 ; 103316h
    pop r4
    locret_3366: ; DATA XREF: sub_90000+1C2 r
    reti
    warning A80: 'INTERRUPT RETURN' IN NON INTERRUPT PROCEDURE

    Example 2:
    calls 0, sub_CFEA
    mov r6, #72h ; 'r'
    sub_CFEA: ; CODE XREF: sub_4ECE+48 P
    mov r4, r8
    sub r8, #1
    loc_CFEE: ; CODE XREF: sub_CFEA+E j
    add r8, #1
    exts r11, #1
    movb rl5, [r10+]
    exts r9, #1
    movb [r8], rl5
    jmpr cc_NZ, loc_CFEE
    mov r5, r9
    rets
    warning A78: 'FAR RETURN' IN NON FAR PROCEDURE

  • I'm very grateful for your help,thanks a lot.But I can't the following example:

    example:
    C101 SECTION CODEP101 PROC NEAR CALL P102 ; far call for P102 RET ; near return
    P101
    ENDP

    P102 PROC FAR CALL P101 ; near call for P101 TRAP #I10 ; call int10 RET ; far returnP102 ENDPC101 ENDS

    in C101 it is Far call for P102,but it uses NEAR return,yet in C102 it is NEAR call for P102,but it uses Far return,why?Perhaps I need to read some topics about memory type.

  • sorry,the format of the previous note is too bad,so I resend it.

    C101 SECTION CODE
    P101 PROC NEAR
    CALL P102;far call for P102 RET ;near return
    P101 ENDP

    P102 PROC FAR
    CALL P101;near call for P101
    TRAP #I10;call int10
    RET ;far returnP102 ENDP