BGOFS, SPOFS, and LOCATE change the screen positions for background, sprites, and printed text, respectively. If you check the help screen for these commands, you'll see that there's an option to position these things along a Z axis. A negative Z value makes things pop out of the screen, and a positive value pushes them into the screen.