Shop OBEX P1 Docs P2 Docs Learn Events
assembly crashes — Parallax Forums

assembly crashes

Erik FriesenErik Friesen Posts: 1,071
edited 2008-07-09 21:00 in Propeller 1
Why in the world would adding an unused object in the top cog crash the assembly cog?· For example why should adding an object to fullduplexserial cause a crash?·

Is there anyway aside from using wr-byte-word-long the crash outside cogs?

Here is some code.· It is not complete, only to show how I am passing and using my pointers.· It may very well be flawed.

I am calling it like this,· object.start(@led,@code,@batlow,@bathigh)
var
long pointers[noparse][[/noparse]4]
 
pub start (ledpointer, codeokpointer,batlow,bathigh)
pointers[noparse][[/noparse]0]:=ledpointer
pointers[noparse][[/noparse]1]:=codeokpionter
pointers[noparse][[/noparse]2]:=bathigh
pointers[noparse][[/noparse]3]:=batlow
 
cognew(@entry, @pointers)
 
dat
 
                    org
entry   mov     t1,par
        rdlong  ledp,t1
        add     t1,#4
        rdlong  codep,t1 
        add     t1,#4
        rdlong  bathip,t1
        add     t1,#4
        rdlong  batlop,t1
 
'to send to the outside world
 
        wrlong    missed,codep
        wrlong    blo,batlop
        wrlong    bhi,bathip

Comments

  • hippyhippy Posts: 1,981
    edited 2008-07-09 02:17
    That code looks okay to me, so the problem is likely elsewhere.
  • AleAle Posts: 2,363
    edited 2008-07-09 09:53
    And what happens when the last wrlong is executed ? is there a cogstop instruction, and endless loop or just nothing ? Chrashing may happen when the clk register is rewritten.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-07-09 16:09
    It was a (call main) instead of (call #main). duh.
  • AleAle Posts: 2,363
    edited 2008-07-09 21:00
    call main, without '#' gives a compiling error last time I checked....
Sign In or Register to comment.