#include <vectrex.h>


const char romtext[]={'R','O','M',0x80,0};

/* Check copy of init data */
char ramtext[]={'R','A','M',0x80,0};

/* __main() omits C library initializations */
void __main()
{
  char i,m=0,d=31;
  Intensity_a(d);
  while(1){
   for(i=-127;i<127;i++){
    Wait_Recal();
    Print_Str_d(__D(0,0),romtext);
    Print_Str_d(__D(0,0x20),ramtext);
    Moveto_d(__D(0,0));
    switch(m){
    case 0: Draw_Line_ab(i,127); break;
    case 1: Draw_Line_ab(127,-i); break;
    case 2: Draw_Line_d(__D(-i,-127)); break;
    case 3: Draw_Line_d(__D(-127,i)); break;
    }
   }
   m=(m+1)&3;
   d=(d+32)&127;
   Intensity_a(d);
 }
}

