Contents    Page-10    Prev    Next    Page+10    Index   

Running Generated Code

Programs can be run using driver.c as the runtime library:


% cc driver.c triv.s -lm
% a.out
calling graph1
exit from graph1

driver.c is quite simple:


void main()
  { printf("calling graph1\n");
    graph1();
    printf("exit from graph1\n");
  }

void write(char str[])
  {  printf("%s", str);  }

void writeln(char str[])
  {  printf("%s\n", str);  }

int iround(double x) ...