Reclaiming DAT space?
It seems to me that after I send my assembly language DAT code to the various cogs, it's just taking up valuable hub memory. I need 12k contiguous bytes for screen memory and I'm getting dangerously close to running out of memory. Is there some way to arrange for my assembly code to be next to some large buffer space so that I can use the buffer and the DAT space together as one contiguous memory space?
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
DAT org 0 theBuffer theASM NOP NOP theEnd LONG 0[noparse][[/noparse]512- (theEnd-theASM)]
Note that assembly labels count COG cells , not "bytes"
Post Edited (deSilva) : 8/28/2007 4:34:23 PM GMT
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
obj N2 : "n2" PUB N1 return 1 return 2 return 3 return 4 return 5 return 6 return 7 return 8 DAT NN1 long $11111111[noparse][[/noparse]10]
PUB N2 return 1 return 2 return 3 return 4 return 5 return 6 return 7 return 8 DAT NN2 long $22222222[noparse][[/noparse]10]
'' Top object CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 OBJ myobj : "my_object" PUB start myobj.start(@myobjasm) cognew(@mylocalasm, 0) DAT org 0 mylocalasm mov dira,#1 :loop mov outa,#1 mov outa,#0 jmp #:loop org 0 myobjasm mov dira,#2 :loop mov outa,#2 nop mov outa,#0 jmp #:loop ''___________________________________________ '' my_object.spin (separate file) PUB start(asmaddr) cognew(asmaddr, 0)
It's not exactly what you'd call "object encapsulation" but it does force all the assembly code into one contiguous block.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Michael Park
PS, BTW, and FYI:
To search the forum, use search.parallax.com (do not use the Search button).
Check out the Propeller Wiki: propeller.wikispaces.com/
@deSilva: You're still missed
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.co.uk
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
BTW: I type as I'm thinking, so please don't take any offense at my writing style