#include <perms.h>

//          Edinburgh IMP77 Compiler - Version 8.4
//
//     1  %begin

int main(int argc, char **argv) { /*%begin*/
  _imp_initialise(argc, argv);

  //     2
  //     3    %string (255) big string = "Hello World, this is a long string"

  _imp_string255 BIGSTRING;

  _imp_strncpy(/*?*/ &BIGSTRING, ({
                 __typeof__(_imp_string255) tmp; /*B*/
                 tmp = _imp_str_literal("Hello World, this is a long string");
                 (void *)&tmp;
               }),
               /*max:*/ 255);

  //     4
  //     5    print string(big string); newline

  _imp_PRINTSTRING(
      *({
        __typeof__(_imp_string255) tmp = BIGSTRING /*q*/;
        (_imp_string255 *)&tmp;
      })
  );
  _imp_NEWLINE();

  //     6
  //     7    length(big string) = 11

  *_imp_LENGTH((_imp_string255 *)/*p*/ /*?*/ &BIGSTRING) = 11;

  //     8
  //     9    print string(big string); newline

  _imp_PRINTSTRING(
      *({
        __typeof__(_imp_string255) tmp = BIGSTRING /*q*/;
        (_imp_string255 *)&tmp;
      })
  );
  _imp_NEWLINE();

  //    10
  //    11  %endofprogram

  _imp_stop(0);
  return 0;
end_0:;
}