The code for this game is fairly simple, but there are is one interesting technique - we use an image as buffer for the horizontal barriers. Barriers are drawn directly to this buffer which is then copied directly to the screen and then the player overlaid at the bottom. The buffer is shifted down every few frames to give the illusion of movement. This buffer technique is great because we don't need to keep track of each barrier, we just draw it the buffer and forget about it. The alternative solution would be to remember each barrier's position and re-draw it every frame, which would be much more work.
Here's the code:
And here are the source and hex files: