frequently asked questions


question:  is it acceptable to have the  snake move right whenever the user is
not pressing down any keys?

answer:  no, the snake has to move in the direction the user chose in his last
keypress.


question: what initial register states can i count on?

answer: ax==0, bx==0, ch==0, di==0fffeh, si==100h, directionflag==0.


question:  "delay,  using the vertical retrace.  to guarantee that every entry
has  the  same speed use the following  program-code." i trust i don't have to
use  those  exact lines, but rather utilize  that way of checking for vertical
retrace.  i.e  can  i "test al,bl" instead of  "test  al,8"  if i feel like it
(provided that the same result is achieved)?

answer:  yeah,  it's  allowed  to  replace  the  waitretrace-routine  with  an
equivalent one, e.g.:

mov dx,3dah
mov bl,8
delay_l1:
in al,dx
test al,bl
jne delay_l1
delay_l2:
in al,dx
test al,bl
je delay_l2

at  first you have to wait until a vertical retrace that is currently going on
is  over.  then  you  have  to wait till  a  new  one  starts. don't try using
vbe-2.0-interrupts  for  this  task - they don't  work  on  my pc. but i allow
interrupt 10h, function 0bh.


question:  hey, i'm gonna make a 45-bytes-nibbles!  i simply draw a fat border
and  leave only a few pixels for the  snake. if the snake hits the border, the
program will quit of course.

answer:  well, you are allowed to draw a fat border but the snake must not die
until  it  has  reached  one  of the  pixels  where  this  thin border that is
described in the rules is.


question:  here is my contribution... 44 bytes. you must run the runme.bat. it
passes  some  command  line parameters to  the  program, otherwise it wouldn't
work. is this way legal?

answer:  yes. but then the size of your bat-file will be added to your program
size. therefore it is not a good solution.


note: some nice trick some people are using is not only drawing the border but
filling the whole screen (border included) in a color different than 0. if the
program  quits after the snake has hit the pixels where usually the border is,
the entry is accepted.


question:  i was wondering if the border of the screen can be black or not. if
the  border  was black, the inside of  the screen would be a different colour,
obviously.   is   that  allowed?  having  a   coloured  inside,  and  a  black
one-pixel-width border?

answer: no, no, no black border, no matter what the inside color is!


question: assume all code must be in your com (or exe) file, correct? we can't
find some code in the bios and call/jump to it, correct?

answer:  you can use some code in the bios and call/jump to it, if it does not
only work on your or a few other pcs.


question:  our  nibbles' size could go down a  lot.  but the case is: when the
proggy  starts enter is automatically pressed. if  you hurry and press down or
something it works, but otherwise problems occur. does that follow the rules?

answer:  yes, that's okay! quite a few entries work this way. using a bat-file
one  of  the  competitors sent to me, it's  no  problem  for me to check these
entries  without  trying to start them hundreds  of times and not suceeding in
doing so because i didn't press enter sharply enough :)


question:  is it ok to draw the border using more than one color? you say that
i  can  choose "any color i want". (what i'd  like to do is to fill the border
with stosw, where al does not equal ah.)

answer: no, the whole border has to be in one color.


question:  do  the borders have to be  drawn like the example program does (by
plotting  pixels)?  or  could one modify  the  border  color (for example "mov
ah,10h;  mov al,01h; mov bh,color_value; int  10h"), fill the screen with some
color  different than 0 thus getting the overscan border to be the "border" or
fill  the  whole screen except for just  the  first and last columns and lines
(the  border color would be 0 then, but it'd still be different than the other
screen)? what are the exact rules?

answer: the border has to be drawn by plotting pixels.


question:  as my program is a com-file, ds equals cs at startup. is it allowed
to use this information?

answer: yes.


question:  do i have to flush the  keyboard-buffer or doesn't it matter if the
game starts beeping?

answer:  you  don't  have  to flush the  keybuf  if  the  game works correctly
nevertheless.


question: what instructions can i use? 386?

answer: you can use all instructions till pentium.


question: may the snake snart anywhere on screen?

answer:  yes.  but  it  must not "die"  at  once  without  the user having the
possibility to interact.


question:  can  i  let erroneous keys wreak  havoc  onto the world? i.e is the
program allowed to crash or if the user presses the 'q' key during flight? you
say  "the  program  doesn't  have to react". i  ask  then  if it is ok for the
program to react... [wildly] ;)

answer: yes.
