The .org command is used to change the internal location of SPASM's program counter. This is mostly used when calculating addresses for absolute jumps or calls. Note: changing pc via .org does NOT change any actual data. If you are at location $8000 and you change to $C000 SPASM does not insert $4000 bytes of data. If you want to add these bytes of data, look at the .block or .fill commands.
Example:
;pc = 0
Label0: ;pc = 0
jp Label3
Label3: ;pc = 3
.org $2000
jp Label6
;when loaded on the device this will be at address $0006
;you will need to copy any data between Label6 and Label6End to $2000
Label6: ;pc = 2003
ld a,Label3
ret
Label6End:
;this will set the internal pc back to where it normally is
;to do this dynamically look at the relocate include file
.org 9
.org address
The location you want to change SPASM's pc to.