() Function names must have brackets. :name Lables must not begin with a colon. In P1 a colon is used at the beginning of temporary labels, in P2 it's a period. || Absolute Value; p 156. ABS >| Encode long into magnitude (0 - 32) as high-bit priority; p 160. ENCOD |< Decode value (modulus of 32; 0-31) into single-high-bit long; p 160 DECOD ~>= ~> --or-- ~>= Bitwise: Shift arithmetic right; p 158. x SAR= 1 x ~>= 1 'get root exponent X := X ~> 1 | --or-- |= Bitwise: OR; p 165 Short form of X := X | $F result |= root equals result := result | root ** --or-- **= Multiply and return upper 32 bits (signed); p 153 if (z scas z) > m returns the upper 32 bits of the 64-bit result. SCA (unsigned) and SCAS (signed) SCAS here because the P1 doesn't do unsigned multiplying or dividing. <-= <- --or-- <-= Bitwise: Rotate left; p 162 ROL ~ Sign-extend from bit 7 (~X) or post-clear to 0 (X~); p 156. Y := ~X + 25 data := data <- 8 ' puts the 8MSB to the 8LSB data := ~data ' extend sign data := data SIGNX 7 ' for P2 Changed =< and => to <= and >= PAR use ptra via coginit CNT use getct() or waitms() jmpret in P1 has no equivalent in P2. Can be difficult to translate. One solution: transmit jmpret txcode,rxcode 'run chunk of rx code, then return translates to: transmit mov txcode,#transmit_ret jmp rxcode transmit_ret mov t1,par 'check for head <> tail Replace: _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 With: CLK_FREQ = 200_000_000 ' system freq as a constant MS_001 = CLK_FREQ / 1_000 ' ticks in 1ms US_001 = CLK_FREQ / 1_000_000 ' ticks in 1us Neither Spin1 or Spin2 support default/optional function parameters but FastSpin does. pub null() ' This is not a top-level object D:\Arduino\GY-85\ADXL345ObjectDemo-All-SPIN2\ C:\flexgui-413\kgsamples\PNut1-ILI9341\ D:\PASM\pilot0315 P2 PASM TUTORIAL part 1.pdf (see page 21) https://www.parallax.com/sites/default/files/downloads/AN014-Coroutines-v1.0.pdf \\kgwin7\D Drive WIN 10\PASM\JonnyMac-CHANGES-P1toP2.txt https://github.com/totalspectrum/spin2cpp/blob/master/doc/spin.md