PIC to SX conversion

Program Memory, the 12bit wide instructions means that jumps and calls can only operate within limited page boundaries unless you manually set the page bits in the status register or use the PAGE command. This is like the original PIC16C54 series of devices.  Fortunately the stack is 11bits wide so the RETURN commands operate correctly, but you must remember to restore the PAGE bits before you make any further calls. You should also make sure the page bits are set correctly after reset. See section 15.10

Data Memory, a further consequence of the small instruction width is that only one SRAM file bank can be directly addressed at a time (eg: 10-1F).  To access different file banks you must change bits 5-7 in the file select register – FSR. See section 6.0

Port Configuration, Setting up PORTS is completely different as you use must first use the MODE command to select the port function you want to change and then use the Wreg and TRIS command to configure the function.  For PORTA/C there are three functions, 0D-TTL/CMOS inputs, 0E-Pin pull up enable,  0F-Pin direction.  For PORTB there is also four additional registers. See section 3.2.

Example: to set port B pins to all inputs,

    MODE        0x0F
    MOVLW     0xFF
    TRIS           PORTB

Option Register,  when OPTIONX in the FUSE word is cleared Bits 7/6 of the option register are enabled.  Bit 6 enables interrupts, while Bit 7 determines what register is seen at address 01 (W or RTCC).  Note that PORTB week pull-ups are set through the MODE and TRIS commands not OPTION Bit7.  See section 4.3

Crystal/Ceramic Oscillator, a parallel resistor is required across the oscillator pins to make the oscillator work, also the capacitor values are different. See section 9.1.

FUSE settings,  the FUSE and FUSEX words are set in the assembler to configure general device operation.  FUSE is like the Configuration word but has additional bits such as RC divider/OPTIONX/TURBO, see section 5.1.  The FUSEX is completely new as it configures RAM/EEPROM size, ADD/SUB carry result and a brownout feature. See section 5.2

Data EPROM, there is no data EEPROM available for storing values during power down.

RESET, the reset address is to the top of memory eg:0x07FF.

Assembler labels, the fluffy assembler gets confused if it finds a label ending in 0, so always start from 1.