Shop OBEX P1 Docs P2 Docs Learn Events
ASM typing error not picked up by Spin Tool — Parallax Forums

ASM typing error not picked up by Spin Tool

mike101videomike101video Posts: 43
edited 2006-11-29 21:18 in Propeller 1
The following example code will compile cleanly - Spin tool reports "compilation successful". I missed typing the RET in an asm routine, and when called it didn't return! ( This is just example code extracted from the real code I am using.)

Seems that an error should be reported?

pub pubtest

dat
org
call #sr

sr mov aaaa, #$31
sr_ret

' Note NO RET on the above line. - The CALL happens, but never comes back.

aaaa res 1

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-11-29 20:59
    Mike,

    This is not a shortcoming of the assembler. There are times when you actually want empty return lines. For example, when a routine has several entry points with different names but the same exit point, viz:

    do_and     [b]and[/b]  a,mask
               [b]jmp[/b]  do_and_ret
    
    do_or      [b]or[/b]   a,mask
    do_and_ret
    do_or_ret  [b]ret[/b]
    
    
    



    -Phil
  • mike101videomike101video Posts: 43
    edited 2006-11-29 21:18
    Sounds reasonable, but a warning would be nice - just to cover the cases when it isn't deliberate.

    Mike
Sign In or Register to comment.