Pong was my first attempt to write a complete program in 8086 assembly language.  I won't claim that it was very original, but hey, it's only 666 bytes big! I really never paid too much attention to who actually won the contest that this was entered in (it wasn't me, I know that much =-).  This was written in my Sophomore year of high school, when I realized that QB4.5 just didn't have the oomph I needed to write cool graphics programs.  Of course, I had a lot of time to code in high school, mostly because I attended class, well, lets say - less then frequently.  That turned out to be a good thing though,  because out of all my time in school I learned more during 10th grade  (you know, just reading, and coding), then in all 4 years of college.



; Ax = Color
Paddle_Stuff PROC
  mov cx , 4
  Y_loop:
  push cx
  mov cx , 8
  rep stosw ; blt the paddle onto the screen
  add di , 304
  pop cx
  loop y_loop
  ret
Paddle_Stuff ENDP




Notice how well I used to name procedures?  Isn't stuff descriptive?  Actually, this function was responsible for drawing the paddles to the screen, and it's dependent on es:di pointing to video memory (0x0a000 in mode 0x13).  Notice too that I used the rep stosw instruction, which means the mov cx, 8 is deceiving.  This actually draws a 16x4 pixel paddle, not an 8x4 paddle.

You can get the source here.

Have fun!