.importzp TEMP, PPU_CTRL_VAR, PPU_CTRL_VAR1, SCROLL_X1, SCROLL_Y1 .import popax .include "nes.inc" .include "zpvars.inc" .export _splitxy ;;void __fastcall__ splitxy(unsigned int x,unsigned int y); WRITE1=TEMP+1 WRITE2=TEMP+2 _splitxy: ; Extract SCROLL_Y1, SCROLL_X1, WRITE1 from parameters. sta > 3) lda > 3) ora > 3) | ((Y & $F8) << 2) sta