test_mes.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* This file is part of asmc, a bootstrapping OS with minimal seed
  2. Copyright (C) 2018 Giovanni Mascellani <gio@debian.org>
  3. https://gitlab.com/giomasce/asmc
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <https://www.gnu.org/licenses/>. */
  14. int main2();
  15. int main(int argc, char **argv) {
  16. return main2();
  17. }
  18. int do_sum(int x, char y) {
  19. return x+y;
  20. }
  21. int sum_numbers(int x) {
  22. int i;
  23. int sum;
  24. i = 0;
  25. sum = 0;
  26. while (i < 200) {
  27. i = i + 1;
  28. if (i == 1) continue;
  29. sum = do_sum(sum, i);
  30. int x;
  31. if (i == 100) break;
  32. }
  33. return sum;
  34. }
  35. int main2() {
  36. "test string";
  37. int a;
  38. return sum_numbers(0);
  39. }
  40. /*
  41. int sub(int x, int y);
  42. int main(int argc, char **argv) {
  43. int z = sub(argc, 1);
  44. return z;
  45. }
  46. int sub(int x, int y) {
  47. return x - y;
  48. }
  49. */