public static void string_cppOutputLiteral(String string) {
    { int free = Stella.$CPP_MAX_STRING_LITERAL_LENGTH$;

      ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.print("\"");
      { char ch = Stella.NULL_CHARACTER;
        String vector000 = string;
        int index000 = 0;
        int length000 = vector000.length();

        for (;index000 < length000; index000 = index000 + 1) {
          ch = vector000.charAt(index000);
          if (free <= 1) {
            ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.print("\" \"");
            free = Stella.$CPP_MAX_STRING_LITERAL_LENGTH$;
          }
          switch (ch) {
            case '\\': 
            case '"': 
              ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.print("\\");
              free = free - 1;
            break;
            case '\n': 
              ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.print("\\");
              free = free - 1;
              ch = 'n';
            break;
            case '\r': 
              ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.print("\\");
              free = free - 1;
              ch = 'r';
            break;
            default:
            break;
          }
          ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.print(ch);
          free = free - 1;
        }
      }
      ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.print("\"");
    }
  }