Listing 1. Beginning of the program.
#include <allegro.h>

int main(){
  allegro_init();//Allegro initialization
  install_keyboard();//Set up for keyboard input
  //Need to set the color depth before setting the
  // graphics mode.
  set_color_depth(32);
  //Set the graphics mode to a 256x256-pixel window.
  set_gfx_mode(GFX_AUTODETECT_WINDOWED,256,256,0,0);