{{basic addition in pasm using the add directive. Page259 propeller manual}} CON _clkmode = xtal1 + pll16x '_xinfreq = 6_250_000 'MY BOARD AT 1OOMHZ DIFFERENT CRYSTAL _xinfreq = 5_000_000 'QUICKSTART 80 MHZ NORMAL CRYSTAL var 'VARIABLE IN THE PAR ADDRESS TO BE PASSED long x long y long product obj pst:"parallax serial terminal" pub main x := 30 y := 45 pst.start(115000) waitcnt(clkfreq*5 +cnt)'hold five sec to open the 'serial terminal and enable it cognew(@asm,@x)'start cog at the first variable address waitcnt(clkfreq*2 +cnt) 'give pasm time to do the work pst.str(string("product:")) pst.dec(product~) pst.newline dat asm org mov tempvar, par 'get the address of x from par mov xvar, tempvar 'assign the address to the xvar in pasm rdlong xvar, tempvar 'read the value that is in x add tempvar, #4 'move over one long to get y's address mov yvar, tempvar 'assign that address to yvar rdlong yvar, tempvar 'read the value that is in y add tempvar, #4 'move over one long to get the address of product mov productvar, tempvar 'assign the address to productvar add xvar,yvar 'add x and y together answer will be in x wrlong xvar, productvar 'write x into the product variable and print tempvar long 0 xvar long 0 yvar long 0 productvar long 0 flag long 0