electric550
07-20-2009, 02:29 AM
I was wondering if anyone had a recommendation on formatting assembly code for two cogs in on document. Does it require two org statements and two fit statements. Or should I split the two programs into two different files and call them as objects? If there is an example that someone could point me to, or a suggestion would be good.
For example
CON
...........
OBJ
..........
Var
long var1
long var2
Pub Start
cognew(@Assembly1,@var1)
cognew(@Assembly2,@var2)
DAT
'--------------------------------------------------------------
org 0
Assembly1
MOV V1, PAR
V1 res 1
FIT 496
'--------------------------------------------------------------
org 0
Assembly2
MOV V2, PAR
V2 res 1
FIT 496
I am just trying to make sure that assembly gets loaded into its own cog. I assume that when cog new gets called it loads the assembly from the specified identifier until it reaches the fit statement?
For example
CON
...........
OBJ
..........
Var
long var1
long var2
Pub Start
cognew(@Assembly1,@var1)
cognew(@Assembly2,@var2)
DAT
'--------------------------------------------------------------
org 0
Assembly1
MOV V1, PAR
V1 res 1
FIT 496
'--------------------------------------------------------------
org 0
Assembly2
MOV V2, PAR
V2 res 1
FIT 496
I am just trying to make sure that assembly gets loaded into its own cog. I assume that when cog new gets called it loads the assembly from the specified identifier until it reaches the fit statement?