40 Commits

Author SHA1 Message Date
nils polek
509dc5e947 Added the correct version to --version funktion 2024-01-14 15:28:46 +00:00
nils polek
c6ae64250d Added a nja and njc goal to Makefile 2024-01-14 15:24:31 +00:00
nils polek
ffc04172ae Added a Makefile for better use 2024-01-14 13:47:08 +00:00
Nils Polek
f5cab7c013 Testing 2023-12-09 17:48:51 +01:00
de248a5943 update x 2023-12-09 17:19:43 +01:00
4994bd6071 add call and ret function
add drop (idk if it is working right)
add prog5 and prog6
2023-12-07 03:01:24 +01:00
0b042fb912 fix jmp not working
fix arithmetic operations
add prog3 and prog4
add debug to instructions
2023-12-07 00:05:36 +01:00
nils polek
77cae7467e Added Instruktions 2023-12-06 18:03:07 +01:00
6ea2a7e735 move programs to a separate folder
fix pushg, popg, pushl and popl
2023-12-04 02:39:23 +01:00
8a89c6bf70 add prog1 and prog2, asm and bin files 2023-12-04 01:21:36 +01:00
88271c91ca fix prog1.bin not working
add debug parameter
add nja-mac
2023-12-04 01:20:41 +01:00
nils polek
fb8497fbee changed path 2023-12-03 19:39:50 +01:00
dc16504cd7 Aufgabe 2 fertig 2023-12-03 19:30:38 +01:00
2a427a2563 Aufgabe 2 fertig 2023-12-03 18:19:39 +01:00
0e52973475 Aufgabe 2 fertig 2023-12-03 18:14:27 +01:00
nils polek
8b3770df80 added codeReader and consts.c 2023-12-03 16:10:33 +01:00
dc33e46e24 update help 2023-12-03 14:59:02 +01:00
c900a0444f fix printing negative numbers 2023-12-03 14:29:07 +01:00
c16fe6349b add error message if no program selected
fix error with negative numbers
2023-12-03 14:24:22 +01:00
1363db7c11 Finished cleaning up the code 2023-10-30 12:51:42 +01:00
dfedf2e717 test 2023-10-30 11:59:56 +01:00
4d547cca6a #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "instruktion.c"
#include "code.c"
#include "stack.c"

//Comment to disable debug

// #define DEBUG

// Stack
struct stack stack;
#define SIZE 1000

unsigned int* programmSpeicher;

void copyToProgramm(unsigned int codeToCopy[]){
  programmSpeicher = codeToCopy;
}

void version(void) {
    printf("Ninja Virtual Machine version %i (compiled %s, %s)\n", 0, __DATE__, __TIME__);
}

void help(void) {
    printf("usage: ./njvm [option] [option] ...\n\t--version\tshow version and exit\n\t--help\t\tshow this help and exit\n");
}
void printProgramm(){
  int i = 0;
  char c[10];
  while (programmSpeicher[i] != 0)
  {
    switch (programmSpeicher[i] >> 24) {
      case PUSHC:
        strcpy(c,"pushc");
      break;
      case ADD:
        strcpy(c,"add");
      break;
      case SUB:
        strcpy(c,"sub");
      break;
      case MUL:
        strcpy(c,"mul");
      break;
      case DIV:
        strcpy(c,"div");
      break;
      case MOD:
        strcpy(c,"mod");
      break;
      case RDINT:
        strcpy(c,"rdint");
      break;
      case WRINT:
        strcpy(c,"wrint");
      break;
      case RDCHR:
        strcpy(c,"rdchr");
      break;
      case WRCHR:
        strcpy(c,"wrchr");
      break;
      default:
        strcpy(c,"halt");
      break;
    }
    IMMEDIATE(programmSpeicher[i])? printf("%03i:\t%s\t%i\n",i,c,IMMEDIATE(programmSpeicher[i])) : printf("%03i:\t%s\n",i,c);
       i++;
  }
  printf("%03i:\thalt\n",i);
}
void execute(void) {
    int i = 0;
    int intInput;
    int temp;
    char charInput;
    while (1) {

        switch (programmSpeicher[i] >> 24) {
            case HALT:
                  goto end;
                break;
            case PUSHC:
                  push(stack,IMMEDIATE(programmSpeicher[i]));
                break;
            case ADD:
                  push(stack,pop(stack)+pop(stack));
                break;
            case SUB:
                  temp = pop(stack);
                  push(stack,pop(stack) - temp);
                break;
            case MUL:
                  push(stack,pop(stack)*pop(stack));
                break;
            case DIV:
                  temp = pop(stack);
                  push(stack,pop(stack)/temp);
                break;
            case MOD:
                  temp = pop(stack);
                  push(stack,pop(stack)%temp);
                break;
            case RDINT:
                  scanf("%i",&intInput);
                  push(stack,intInput);
                break;
            case WRINT:
                  printf("%i",pop(stack));
                break;
            case RDCHR:
                  scanf("%c",&charInput);
                  push(stack,charInput);
                break;
            case WRCHR:
                  printf("%c",pop(stack));
                break;
        }
        i++;
    }
end:
  return;
}
#ifdef DEBUG

void tests(void){
  printf("Runnig debug mode\n");
  copyToProgramm(code1);
  printProgramm();
  execute();
}

#endif /* ifdef DEBUG */

int main(int argc, char *argv[]) {
  int size = SIZE;
  int current = 0;
  unsigned int s[SIZE];
  stack.size = &size;
  stack.current = &current;
  stack.stack = s;
    #ifdef DEBUG
      tests();
    #endif /* ifdef DEBUG */
     if (argc > 1) {
        if (strcmp(argv[1], "--version") == 0) {
            version();
        } else if (strcmp(argv[1], "--help") == 0) {
            help();
        } else if (strcmp(argv[1], "--prog1") == 0) {
            copyToProgramm(code1);
            goto run;
        } else if (strcmp(argv[1],"--prog2") == 0) {
            copyToProgramm(code2);
            goto run;
        }else if (strcmp(argv[1],"--prog3") == 0) {
            copyToProgramm(code3);
            goto run;
        }else {
            printf("unknown command line argument '%s', try './njvm --help'", argv[1]);
        }
    } else {
  run:
//    Started
        printf("Ninja Virtual Machine started\n");
        printProgramm();
        execute();
//    Stopped
        printf("Ninja Virtual Machine stopped\n");
        return 0;
    }
}
2023-10-30 00:24:55 +01:00
6740f41edc stack organized 2023-10-30 00:17:17 +01:00
9890324ea5 Structurized the code 2023-10-26 22:36:54 +02:00
efe7663637 Print program 2023-10-26 17:26:59 +02:00
4e629a6ca7 orginized projekt 2023-10-26 14:49:57 +02:00
d947afdf03 Test 2023-10-26 14:03:31 +02:00
d05c415295 Now HALT works correctly 2023-10-22 13:51:32 +02:00
d23727f6da Added the 3 progamms 2023-10-21 21:31:04 +02:00
62ede37645 Operations now work 2023-10-21 21:09:01 +02:00
9f7b69e5f7 Added the option to test and basic math to execute() 2023-10-21 19:14:48 +02:00
nplk84
7d7b67f7f2 Stack overflow errors get detected correctly 2023-10-16 11:56:38 +02:00
nplk84
655da552de Added Keys 2023-10-15 19:08:12 +02:00
4f23944408 fix some warnings 2023-10-15 19:05:43 +02:00
19de6c2dbc remove config.h.in 2023-10-15 19:01:28 +02:00
49b064d74d remove config file
update CMakeLists.txt
update gitignore file
2023-10-15 19:00:46 +02:00
nplk84
119b5be760 deleated some shit 2023-10-15 18:50:37 +02:00
nplk84
23690576ea Added Keys 2023-10-15 18:23:32 +02:00
nplk84
8a7d900d9a Added the Stack 2023-10-12 14:42:31 +02:00
nplk84
1b742e0007 Added the Stack 2023-10-12 12:57:51 +02:00
94 changed files with 1122 additions and 4139 deletions

4
.gitignore vendored
View File

@@ -1,2 +1,6 @@
.idea
cmake-build-debug
njvm
njvm.dSYM
njvm.exe
njvm2

View File

@@ -2,11 +2,8 @@ cmake_minimum_required(VERSION 3.0)
project(ninja LANGUAGES C)
set(CMAKE_C_STANDARD 99)
set(PROJECT_VERSION 0)
configure_file(
${CMAKE_SOURCE_DIR}/config.h.in
${CMAKE_BINARY_DIR}/config.h
)
include_directories(${CMAKE_BINARY_DIR})
add_executable(ninja
njvm.c config.h.in)
add_compile_options(-g -Wall -pedantic)
add_executable(ninja njvm.c
SDA.c)

29
Makefile Normal file
View File

@@ -0,0 +1,29 @@
# Makefile for a simple C program
# Compiler
CC = gcc
# Compiler flags
CFLAGS = -g -Wall -std=c99 -pedantic
# Source file
SRC = njvm.c
# Executable name
TARGET = njvm
# Default target
all:
$(CC) $(CFLAGS) -o $(TARGET) $(SRC)
# Clean up
clean:
rm -f $(OBJ) $(TARGET)
run: all
./$(TARGET)
nja: ./nja/nja$(V)
./nja/nja$(V) $(IN) $(OUT)
njc: ./njc/njc$(V)
./njc/njc$(V) $(IN) $(OUT)

28
SDA.c Normal file
View File

@@ -0,0 +1,28 @@
//
// Created by Nils on 03.12.2023
//
#ifndef SDA
#define SDA
#include <stdio.h>
struct sda {
unsigned int *sda;
int size;
};
int getSDA(unsigned int offset, struct sda *sda) {
return sda->sda[offset];
}
void setSDA(unsigned int offset, int value, struct sda *sda) {
sda->sda[offset] = value;
}
void printSDA(struct sda *sda) {
printf("SDA:\n");
for (int i = 0; i < sda->size; ++i) {
printf("[%d] = %d\n", i, sda->sda[i]);
}
}
#endif

File diff suppressed because one or more lines are too long

View File

@@ -1,134 +0,0 @@
{
"inputs" :
[
{
"path" : "CMakeLists.txt"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.25.2/CMakeSystem.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeSystemSpecificInitialize.cmake"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.25.2/CMakeCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeSystemSpecificInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeGenericSystem.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeInitializeConfigs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/WindowsPaths.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeFindCodeBlocks.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/ProcessorCount.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeCInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeLanguageInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/GNU-C.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/GNU.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU-C.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU.cmake"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.25.2/CMakeRCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeRCInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-windres.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU-C-ABI.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeCommonLanguageInclude.cmake"
},
{
"path" : "config.h.in"
}
],
"kind" : "cmakeFiles",
"paths" :
{
"build" : "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug",
"source" : "C:/Users/Nilss/CLionProjects/ninja"
},
"version" :
{
"major" : 1,
"minor" : 0
}
}

View File

@@ -1,60 +0,0 @@
{
"configurations" :
[
{
"directories" :
[
{
"build" : ".",
"jsonFile" : "directory-.-Debug-d0094a50bb2071803777.json",
"minimumCMakeVersion" :
{
"string" : "3.0"
},
"projectIndex" : 0,
"source" : ".",
"targetIndexes" :
[
0
]
}
],
"name" : "Debug",
"projects" :
[
{
"directoryIndexes" :
[
0
],
"name" : "ninja",
"targetIndexes" :
[
0
]
}
],
"targets" :
[
{
"directoryIndex" : 0,
"id" : "ninja::@6890427a1f51a3e7e1df",
"jsonFile" : "target-ninja-Debug-f292f08edd698e5009d2.json",
"name" : "ninja",
"projectIndex" : 0
}
]
}
],
"kind" : "codemodel",
"paths" :
{
"build" : "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug",
"source" : "C:/Users/Nilss/CLionProjects/ninja"
},
"version" :
{
"major" : 2,
"minor" : 4
}
}

View File

@@ -1,14 +0,0 @@
{
"backtraceGraph" :
{
"commands" : [],
"files" : [],
"nodes" : []
},
"installers" : [],
"paths" :
{
"build" : ".",
"source" : "."
}
}

View File

@@ -1,108 +0,0 @@
{
"cmake" :
{
"generator" :
{
"multiConfig" : false,
"name" : "MinGW Makefiles"
},
"paths" :
{
"cmake" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/bin/cmake.exe",
"cpack" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/bin/cpack.exe",
"ctest" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/bin/ctest.exe",
"root" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25"
},
"version" :
{
"isDirty" : false,
"major" : 3,
"minor" : 25,
"patch" : 2,
"string" : "3.25.2",
"suffix" : ""
}
},
"objects" :
[
{
"jsonFile" : "codemodel-v2-23072077a90ad9331d20.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 4
}
},
{
"jsonFile" : "cache-v2-04d7c2d5c2c139b5c81c.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
{
"jsonFile" : "cmakeFiles-v1-b12e026c23bbd32d623a.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 0
}
},
{
"jsonFile" : "toolchains-v1-0a3201452b7e265c1bfb.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
],
"reply" :
{
"cache-v2" :
{
"jsonFile" : "cache-v2-04d7c2d5c2c139b5c81c.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
"cmakeFiles-v1" :
{
"jsonFile" : "cmakeFiles-v1-b12e026c23bbd32d623a.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 0
}
},
"codemodel-v2" :
{
"jsonFile" : "codemodel-v2-23072077a90ad9331d20.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 4
}
},
"toolchains-v1" :
{
"jsonFile" : "toolchains-v1-0a3201452b7e265c1bfb.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
}
}

View File

@@ -1,135 +0,0 @@
{
"artifacts" :
[
{
"path" : "ninja.exe"
},
{
"path" : "ninja.pdb"
}
],
"backtrace" : 1,
"backtraceGraph" :
{
"commands" :
[
"add_executable",
"include_directories"
],
"files" :
[
"CMakeLists.txt"
],
"nodes" :
[
{
"file" : 0
},
{
"command" : 0,
"file" : 0,
"line" : 11,
"parent" : 0
},
{
"command" : 1,
"file" : 0,
"line" : 10,
"parent" : 0
}
]
},
"compileGroups" :
[
{
"compileCommandFragments" :
[
{
"fragment" : "-g -fdiagnostics-color=always"
},
{
"fragment" : "-std=gnu99"
}
],
"includes" :
[
{
"backtrace" : 2,
"path" : "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"
}
],
"language" : "C",
"languageStandard" :
{
"backtraces" :
[
1
],
"standard" : "99"
},
"sourceIndexes" :
[
0
]
}
],
"id" : "ninja::@6890427a1f51a3e7e1df",
"link" :
{
"commandFragments" :
[
{
"fragment" : "-g",
"role" : "flags"
},
{
"fragment" : "",
"role" : "flags"
},
{
"fragment" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32",
"role" : "libraries"
}
],
"language" : "C"
},
"name" : "ninja",
"nameOnDisk" : "ninja.exe",
"paths" :
{
"build" : ".",
"source" : "."
},
"sourceGroups" :
[
{
"name" : "Source Files",
"sourceIndexes" :
[
0
]
},
{
"name" : "Header Files",
"sourceIndexes" :
[
1
]
}
],
"sources" :
[
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "njvm.c",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"path" : "config.h.in",
"sourceGroupIndex" : 1
}
],
"type" : "EXECUTABLE"
}

View File

@@ -1,75 +0,0 @@
{
"kind" : "toolchains",
"toolchains" :
[
{
"compiler" :
{
"id" : "GNU",
"implicit" :
{
"includeDirectories" :
[
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/include",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/include"
],
"linkDirectories" :
[
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/lib",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib"
],
"linkFrameworkDirectories" : [],
"linkLibraries" :
[
"mingw32",
"gcc",
"moldname",
"mingwex",
"kernel32",
"pthread",
"advapi32",
"shell32",
"user32",
"kernel32",
"iconv",
"mingw32",
"gcc",
"moldname",
"mingwex",
"kernel32"
]
},
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc.exe",
"version" : "11.2.0"
},
"language" : "C",
"sourceFileExtensions" :
[
"c",
"m"
]
},
{
"compiler" :
{
"implicit" : {},
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/windres.exe"
},
"language" : "RC",
"sourceFileExtensions" :
[
"rc",
"RC"
]
}
],
"version" :
{
"major" : 1,
"minor" : 0
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,72 +0,0 @@
set(CMAKE_C_COMPILER "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc.exe")
set(CMAKE_C_COMPILER_ARG1 "")
set(CMAKE_C_COMPILER_ID "GNU")
set(CMAKE_C_COMPILER_VERSION "11.2.0")
set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
set(CMAKE_C_COMPILER_WRAPPER "")
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17")
set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON")
set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17;c_std_23")
set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
set(CMAKE_C17_COMPILE_FEATURES "c_std_17")
set(CMAKE_C23_COMPILE_FEATURES "c_std_23")
set(CMAKE_C_PLATFORM_ID "MinGW")
set(CMAKE_C_SIMULATE_ID "")
set(CMAKE_C_COMPILER_FRONTEND_VARIANT "")
set(CMAKE_C_SIMULATE_VERSION "")
set(CMAKE_AR "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/ar.exe")
set(CMAKE_C_COMPILER_AR "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc-ar.exe")
set(CMAKE_RANLIB "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/ranlib.exe")
set(CMAKE_C_COMPILER_RANLIB "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc-ranlib.exe")
set(CMAKE_LINKER "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/ld.exe")
set(CMAKE_MT "")
set(CMAKE_COMPILER_IS_GNUCC 1)
set(CMAKE_C_COMPILER_LOADED 1)
set(CMAKE_C_COMPILER_WORKS TRUE)
set(CMAKE_C_ABI_COMPILED TRUE)
set(CMAKE_C_COMPILER_ENV_VAR "CC")
set(CMAKE_C_COMPILER_ID_RUN 1)
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
set(CMAKE_C_LINKER_PREFERENCE 10)
# Save compiler ABI information.
set(CMAKE_C_SIZEOF_DATA_PTR "8")
set(CMAKE_C_COMPILER_ABI "")
set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN")
set(CMAKE_C_LIBRARY_ARCHITECTURE "")
if(CMAKE_C_SIZEOF_DATA_PTR)
set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
endif()
if(CMAKE_C_COMPILER_ABI)
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
endif()
if(CMAKE_C_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "")
endif()
set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
endif()
set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/include;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/include")
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "mingw32;gcc;moldname;mingwex;kernel32;pthread;advapi32;shell32;user32;kernel32;iconv;mingw32;gcc;moldname;mingwex;kernel32")
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/lib;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib")
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")

View File

@@ -1,6 +0,0 @@
set(CMAKE_RC_COMPILER "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/windres.exe")
set(CMAKE_RC_COMPILER_ARG1 "")
set(CMAKE_RC_COMPILER_LOADED 1)
set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc;RC)
set(CMAKE_RC_OUTPUT_EXTENSION .obj)
set(CMAKE_RC_COMPILER_ENV_VAR "RC")

View File

@@ -1,15 +0,0 @@
set(CMAKE_HOST_SYSTEM "Windows-10.0.22621")
set(CMAKE_HOST_SYSTEM_NAME "Windows")
set(CMAKE_HOST_SYSTEM_VERSION "10.0.22621")
set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64")
set(CMAKE_SYSTEM "Windows-10.0.22621")
set(CMAKE_SYSTEM_NAME "Windows")
set(CMAKE_SYSTEM_VERSION "10.0.22621")
set(CMAKE_SYSTEM_PROCESSOR "AMD64")
set(CMAKE_CROSSCOMPILING "FALSE")
set(CMAKE_SYSTEM_LOADED 1)

View File

@@ -1,868 +0,0 @@
#ifdef __cplusplus
# error "A C++ compiler has been selected for C."
#endif
#if defined(__18CXX)
# define ID_VOID_MAIN
#endif
#if defined(__CLASSIC_C__)
/* cv-qualifiers did not exist in K&R C */
# define const
# define volatile
#endif
#if !defined(__has_include)
/* If the compiler does not have __has_include, pretend the answer is
always no. */
# define __has_include(x) 0
#endif
/* Version number components: V=Version, R=Revision, P=Patch
Version date components: YYYY=Year, MM=Month, DD=Day */
#if defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# if defined(__GNUC__)
# define SIMULATE_ID "GNU"
# endif
/* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
except that a few beta releases use the old format with V=2021. */
# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
# if defined(__INTEL_COMPILER_UPDATE)
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
# else
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
# endif
# else
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
/* The third version component from --version is an update index,
but no macro is provided for it. */
# define COMPILER_VERSION_PATCH DEC(0)
# endif
# if defined(__INTEL_COMPILER_BUILD_DATE)
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
# endif
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
# if defined(__GNUC__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
# elif defined(__GNUG__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
# endif
# if defined(__GNUC_MINOR__)
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
# endif
# if defined(__GNUC_PATCHLEVEL__)
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
# endif
#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
# define COMPILER_ID "IntelLLVM"
#if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
#endif
#if defined(__GNUC__)
# define SIMULATE_ID "GNU"
#endif
/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
* later. Look for 6 digit vs. 8 digit version number to decide encoding.
* VVVV is no smaller than the current year when a version is released.
*/
#if __INTEL_LLVM_COMPILER < 1000000L
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
#else
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
#endif
#if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
#endif
#if defined(__GNUC__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
#elif defined(__GNUG__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
#endif
#if defined(__GNUC_MINOR__)
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
#endif
#if defined(__GNUC_PATCHLEVEL__)
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
#endif
#elif defined(__PATHCC__)
# define COMPILER_ID "PathScale"
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
# if defined(__PATHCC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
# endif
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
# define COMPILER_ID "Embarcadero"
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"
/* __BORLANDC__ = 0xVRR */
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
# define COMPILER_ID "Watcom"
/* __WATCOMC__ = VVRR */
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
# if (__WATCOMC__ % 10) > 0
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
# endif
#elif defined(__WATCOMC__)
# define COMPILER_ID "OpenWatcom"
/* __WATCOMC__ = VVRP + 1100 */
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
# if (__WATCOMC__ % 10) > 0
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
# endif
#elif defined(__SUNPRO_C)
# define COMPILER_ID "SunPro"
# if __SUNPRO_C >= 0x5100
/* __SUNPRO_C = 0xVRRP */
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
# else
/* __SUNPRO_CC = 0xVRP */
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
# endif
#elif defined(__HP_cc)
# define COMPILER_ID "HP"
/* __HP_cc = VVRRPP */
# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
#elif defined(__DECC)
# define COMPILER_ID "Compaq"
/* __DECC_VER = VVRRTPPPP */
# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
#elif defined(__IBMC__) && defined(__COMPILER_VER__)
# define COMPILER_ID "zOS"
/* __IBMC__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
#elif defined(__open_xl__) && defined(__clang__)
# define COMPILER_ID "IBMClang"
# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__)
# define COMPILER_VERSION_MINOR DEC(__open_xl_release__)
# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__)
# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__)
#elif defined(__ibmxl__) && defined(__clang__)
# define COMPILER_ID "XLClang"
# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
# define COMPILER_ID "XL"
/* __IBMC__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
# define COMPILER_ID "VisualAge"
/* __IBMC__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
#elif defined(__NVCOMPILER)
# define COMPILER_ID "NVHPC"
# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
# if defined(__NVCOMPILER_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
# endif
#elif defined(__PGI)
# define COMPILER_ID "PGI"
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
# if defined(__PGIC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
# endif
#elif defined(_CRAYC)
# define COMPILER_ID "Cray"
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
#elif defined(__TI_COMPILER_VERSION__)
# define COMPILER_ID "TI"
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
#elif defined(__CLANG_FUJITSU)
# define COMPILER_ID "FujitsuClang"
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
# define COMPILER_VERSION_INTERNAL_STR __clang_version__
#elif defined(__FUJITSU)
# define COMPILER_ID "Fujitsu"
# if defined(__FCC_version__)
# define COMPILER_VERSION __FCC_version__
# elif defined(__FCC_major__)
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
# endif
# if defined(__fcc_version)
# define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
# elif defined(__FCC_VERSION)
# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
# endif
#elif defined(__ghs__)
# define COMPILER_ID "GHS"
/* __GHS_VERSION_NUMBER = VVVVRP */
# ifdef __GHS_VERSION_NUMBER
# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
# endif
#elif defined(__TASKING__)
# define COMPILER_ID "Tasking"
# define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000)
# define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100)
# define COMPILER_VERSION_INTERNAL DEC(__VERSION__)
#elif defined(__TINYC__)
# define COMPILER_ID "TinyCC"
#elif defined(__BCC__)
# define COMPILER_ID "Bruce"
#elif defined(__SCO_VERSION__)
# define COMPILER_ID "SCO"
#elif defined(__ARMCC_VERSION) && !defined(__clang__)
# define COMPILER_ID "ARMCC"
#if __ARMCC_VERSION >= 1000000
/* __ARMCC_VERSION = VRRPPPP */
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
#else
/* __ARMCC_VERSION = VRPPPP */
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
#endif
#elif defined(__clang__) && defined(__apple_build_version__)
# define COMPILER_ID "AppleClang"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
# define COMPILER_ID "ARMClang"
# define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
# define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
# define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
#elif defined(__clang__)
# define COMPILER_ID "Clang"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))
# define COMPILER_ID "LCC"
# define COMPILER_VERSION_MAJOR DEC(1)
# if defined(__LCC__)
# define COMPILER_VERSION_MINOR DEC(__LCC__- 100)
# endif
# if defined(__LCC_MINOR__)
# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__)
# endif
# if defined(__GNUC__) && defined(__GNUC_MINOR__)
# define SIMULATE_ID "GNU"
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
# if defined(__GNUC_PATCHLEVEL__)
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
# endif
# endif
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
# if defined(__GNUC_MINOR__)
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
# endif
# if defined(__GNUC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
# endif
#elif defined(_MSC_VER)
# define COMPILER_ID "MSVC"
/* _MSC_VER = VVRR */
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
# if defined(_MSC_FULL_VER)
# if _MSC_VER >= 1400
/* _MSC_FULL_VER = VVRRPPPPP */
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
# else
/* _MSC_FULL_VER = VVRRPPPP */
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
# endif
# endif
# if defined(_MSC_BUILD)
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
# endif
#elif defined(_ADI_COMPILER)
# define COMPILER_ID "ADSP"
#if defined(__VERSIONNUM__)
/* __VERSIONNUM__ = 0xVVRRPPTT */
# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF)
# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF)
# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF)
# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF)
#endif
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
# define COMPILER_ID "IAR"
# if defined(__VER__) && defined(__ICCARM__)
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
# endif
#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
# define COMPILER_ID "SDCC"
# if defined(__SDCC_VERSION_MAJOR)
# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
# else
/* SDCC = VRP */
# define COMPILER_VERSION_MAJOR DEC(SDCC/100)
# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
# define COMPILER_VERSION_PATCH DEC(SDCC % 10)
# endif
/* These compilers are either not known or too old to define an
identification macro. Try to identify the platform and guess that
it is the native compiler. */
#elif defined(__hpux) || defined(__hpua)
# define COMPILER_ID "HP"
#else /* unknown compiler */
# define COMPILER_ID ""
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
#ifdef SIMULATE_ID
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
#endif
#ifdef __QNXNTO__
char const* qnxnto = "INFO" ":" "qnxnto[]";
#endif
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
#endif
#define STRINGIFY_HELPER(X) #X
#define STRINGIFY(X) STRINGIFY_HELPER(X)
/* Identify known platforms by name. */
#if defined(__linux) || defined(__linux__) || defined(linux)
# define PLATFORM_ID "Linux"
#elif defined(__MSYS__)
# define PLATFORM_ID "MSYS"
#elif defined(__CYGWIN__)
# define PLATFORM_ID "Cygwin"
#elif defined(__MINGW32__)
# define PLATFORM_ID "MinGW"
#elif defined(__APPLE__)
# define PLATFORM_ID "Darwin"
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
# define PLATFORM_ID "Windows"
#elif defined(__FreeBSD__) || defined(__FreeBSD)
# define PLATFORM_ID "FreeBSD"
#elif defined(__NetBSD__) || defined(__NetBSD)
# define PLATFORM_ID "NetBSD"
#elif defined(__OpenBSD__) || defined(__OPENBSD)
# define PLATFORM_ID "OpenBSD"
#elif defined(__sun) || defined(sun)
# define PLATFORM_ID "SunOS"
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
# define PLATFORM_ID "AIX"
#elif defined(__hpux) || defined(__hpux__)
# define PLATFORM_ID "HP-UX"
#elif defined(__HAIKU__)
# define PLATFORM_ID "Haiku"
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
# define PLATFORM_ID "BeOS"
#elif defined(__QNX__) || defined(__QNXNTO__)
# define PLATFORM_ID "QNX"
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
# define PLATFORM_ID "Tru64"
#elif defined(__riscos) || defined(__riscos__)
# define PLATFORM_ID "RISCos"
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
# define PLATFORM_ID "SINIX"
#elif defined(__UNIX_SV__)
# define PLATFORM_ID "UNIX_SV"
#elif defined(__bsdos__)
# define PLATFORM_ID "BSDOS"
#elif defined(_MPRAS) || defined(MPRAS)
# define PLATFORM_ID "MP-RAS"
#elif defined(__osf) || defined(__osf__)
# define PLATFORM_ID "OSF1"
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
# define PLATFORM_ID "SCO_SV"
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
# define PLATFORM_ID "ULTRIX"
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
# define PLATFORM_ID "Xenix"
#elif defined(__WATCOMC__)
# if defined(__LINUX__)
# define PLATFORM_ID "Linux"
# elif defined(__DOS__)
# define PLATFORM_ID "DOS"
# elif defined(__OS2__)
# define PLATFORM_ID "OS2"
# elif defined(__WINDOWS__)
# define PLATFORM_ID "Windows3x"
# elif defined(__VXWORKS__)
# define PLATFORM_ID "VxWorks"
# else /* unknown platform */
# define PLATFORM_ID
# endif
#elif defined(__INTEGRITY)
# if defined(INT_178B)
# define PLATFORM_ID "Integrity178"
# else /* regular Integrity */
# define PLATFORM_ID "Integrity"
# endif
# elif defined(_ADI_COMPILER)
# define PLATFORM_ID "ADSP"
#else /* unknown platform */
# define PLATFORM_ID
#endif
/* For windows compilers MSVC and Intel we can determine
the architecture of the compiler being used. This is because
the compilers do not have flags that can change the architecture,
but rather depend on which compiler is being used
*/
#if defined(_WIN32) && defined(_MSC_VER)
# if defined(_M_IA64)
# define ARCHITECTURE_ID "IA64"
# elif defined(_M_ARM64EC)
# define ARCHITECTURE_ID "ARM64EC"
# elif defined(_M_X64) || defined(_M_AMD64)
# define ARCHITECTURE_ID "x64"
# elif defined(_M_IX86)
# define ARCHITECTURE_ID "X86"
# elif defined(_M_ARM64)
# define ARCHITECTURE_ID "ARM64"
# elif defined(_M_ARM)
# if _M_ARM == 4
# define ARCHITECTURE_ID "ARMV4I"
# elif _M_ARM == 5
# define ARCHITECTURE_ID "ARMV5I"
# else
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
# endif
# elif defined(_M_MIPS)
# define ARCHITECTURE_ID "MIPS"
# elif defined(_M_SH)
# define ARCHITECTURE_ID "SHx"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__WATCOMC__)
# if defined(_M_I86)
# define ARCHITECTURE_ID "I86"
# elif defined(_M_IX86)
# define ARCHITECTURE_ID "X86"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
# if defined(__ICCARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__ICCRX__)
# define ARCHITECTURE_ID "RX"
# elif defined(__ICCRH850__)
# define ARCHITECTURE_ID "RH850"
# elif defined(__ICCRL78__)
# define ARCHITECTURE_ID "RL78"
# elif defined(__ICCRISCV__)
# define ARCHITECTURE_ID "RISCV"
# elif defined(__ICCAVR__)
# define ARCHITECTURE_ID "AVR"
# elif defined(__ICC430__)
# define ARCHITECTURE_ID "MSP430"
# elif defined(__ICCV850__)
# define ARCHITECTURE_ID "V850"
# elif defined(__ICC8051__)
# define ARCHITECTURE_ID "8051"
# elif defined(__ICCSTM8__)
# define ARCHITECTURE_ID "STM8"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__ghs__)
# if defined(__PPC64__)
# define ARCHITECTURE_ID "PPC64"
# elif defined(__ppc__)
# define ARCHITECTURE_ID "PPC"
# elif defined(__ARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__x86_64__)
# define ARCHITECTURE_ID "x64"
# elif defined(__i386__)
# define ARCHITECTURE_ID "X86"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__TI_COMPILER_VERSION__)
# if defined(__TI_ARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__MSP430__)
# define ARCHITECTURE_ID "MSP430"
# elif defined(__TMS320C28XX__)
# define ARCHITECTURE_ID "TMS320C28x"
# elif defined(__TMS320C6X__) || defined(_TMS320C6X)
# define ARCHITECTURE_ID "TMS320C6x"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
# elif defined(__ADSPSHARC__)
# define ARCHITECTURE_ID "SHARC"
# elif defined(__ADSPBLACKFIN__)
# define ARCHITECTURE_ID "Blackfin"
#elif defined(__TASKING__)
# if defined(__CTC__) || defined(__CPTC__)
# define ARCHITECTURE_ID "TriCore"
# elif defined(__CMCS__)
# define ARCHITECTURE_ID "MCS"
# elif defined(__CARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__CARC__)
# define ARCHITECTURE_ID "ARC"
# elif defined(__C51__)
# define ARCHITECTURE_ID "8051"
# elif defined(__CPCP__)
# define ARCHITECTURE_ID "PCP"
# else
# define ARCHITECTURE_ID ""
# endif
#else
# define ARCHITECTURE_ID
#endif
/* Convert integer to decimal digit literals. */
#define DEC(n) \
('0' + (((n) / 10000000)%10)), \
('0' + (((n) / 1000000)%10)), \
('0' + (((n) / 100000)%10)), \
('0' + (((n) / 10000)%10)), \
('0' + (((n) / 1000)%10)), \
('0' + (((n) / 100)%10)), \
('0' + (((n) / 10)%10)), \
('0' + ((n) % 10))
/* Convert integer to hex digit literals. */
#define HEX(n) \
('0' + ((n)>>28 & 0xF)), \
('0' + ((n)>>24 & 0xF)), \
('0' + ((n)>>20 & 0xF)), \
('0' + ((n)>>16 & 0xF)), \
('0' + ((n)>>12 & 0xF)), \
('0' + ((n)>>8 & 0xF)), \
('0' + ((n)>>4 & 0xF)), \
('0' + ((n) & 0xF))
/* Construct a string literal encoding the version number. */
#ifdef COMPILER_VERSION
char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
/* Construct a string literal encoding the version number components. */
#elif defined(COMPILER_VERSION_MAJOR)
char const info_version[] = {
'I', 'N', 'F', 'O', ':',
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
COMPILER_VERSION_MAJOR,
# ifdef COMPILER_VERSION_MINOR
'.', COMPILER_VERSION_MINOR,
# ifdef COMPILER_VERSION_PATCH
'.', COMPILER_VERSION_PATCH,
# ifdef COMPILER_VERSION_TWEAK
'.', COMPILER_VERSION_TWEAK,
# endif
# endif
# endif
']','\0'};
#endif
/* Construct a string literal encoding the internal version number. */
#ifdef COMPILER_VERSION_INTERNAL
char const info_version_internal[] = {
'I', 'N', 'F', 'O', ':',
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
'i','n','t','e','r','n','a','l','[',
COMPILER_VERSION_INTERNAL,']','\0'};
#elif defined(COMPILER_VERSION_INTERNAL_STR)
char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
#endif
/* Construct a string literal encoding the version number components. */
#ifdef SIMULATE_VERSION_MAJOR
char const info_simulate_version[] = {
'I', 'N', 'F', 'O', ':',
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
SIMULATE_VERSION_MAJOR,
# ifdef SIMULATE_VERSION_MINOR
'.', SIMULATE_VERSION_MINOR,
# ifdef SIMULATE_VERSION_PATCH
'.', SIMULATE_VERSION_PATCH,
# ifdef SIMULATE_VERSION_TWEAK
'.', SIMULATE_VERSION_TWEAK,
# endif
# endif
# endif
']','\0'};
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
#if !defined(__STDC__) && !defined(__clang__)
# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__)
# define C_VERSION "90"
# else
# define C_VERSION
# endif
#elif __STDC_VERSION__ > 201710L
# define C_VERSION "23"
#elif __STDC_VERSION__ >= 201710L
# define C_VERSION "17"
#elif __STDC_VERSION__ >= 201000L
# define C_VERSION "11"
#elif __STDC_VERSION__ >= 199901L
# define C_VERSION "99"
#else
# define C_VERSION "90"
#endif
const char* info_language_standard_default =
"INFO" ":" "standard_default[" C_VERSION "]";
const char* info_language_extensions_default = "INFO" ":" "extensions_default["
#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \
defined(__TI_COMPILER_VERSION__)) && \
!defined(__STRICT_ANSI__)
"ON"
#else
"OFF"
#endif
"]";
/*--------------------------------------------------------------------------*/
#ifdef ID_VOID_MAIN
void main() {}
#else
# if defined(__CLASSIC_C__)
int main(argc, argv) int argc; char *argv[];
# else
int main(int argc, char* argv[])
# endif
{
int require = 0;
require += info_compiler[argc];
require += info_platform[argc];
require += info_arch[argc];
#ifdef COMPILER_VERSION_MAJOR
require += info_version[argc];
#endif
#ifdef COMPILER_VERSION_INTERNAL
require += info_version_internal[argc];
#endif
#ifdef SIMULATE_ID
require += info_simulate[argc];
#endif
#ifdef SIMULATE_VERSION_MAJOR
require += info_simulate_version[argc];
#endif
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
require += info_cray[argc];
#endif
require += info_language_standard_default[argc];
require += info_language_extensions_default[argc];
(void)argv;
return require;
}
#endif

View File

@@ -1,16 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# Relative path conversion top directories.
set(CMAKE_RELATIVE_PATH_TOP_SOURCE "C:/Users/Nilss/CLionProjects/ninja")
set(CMAKE_RELATIVE_PATH_TOP_BINARY "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug")
# Force unix paths in dependencies.
set(CMAKE_FORCE_UNIX_PATHS 1)
# The C and CXX include file regular expressions for this directory.
set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})

View File

@@ -1,230 +0,0 @@
The system is: Windows - 10.0.22621 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc.exe
Build flags:
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"
The C compiler identification is GNU, found in "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/3.25.2/CompilerIdC/a.exe"
Detecting C compiler ABI info compiled with the following output:
Change Dir: C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-04r8wz
Run Build Command(s):C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f Makefile cmTC_be6eb/fast && C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f CMakeFiles\cmTC_be6eb.dir\build.make CMakeFiles/cmTC_be6eb.dir/build
mingw32-make[1]: Entering directory 'C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-04r8wz'
Building C object CMakeFiles/cmTC_be6eb.dir/CMakeCCompilerABI.c.obj
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe -fdiagnostics-color=always -v -o CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj -c "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\share\cmake-3.25\Modules\CMakeCCompilerABI.c"
Using built-in specs.
COLLECT_GCC=C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-11.2.0/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=x86_64-alpine-linux-musl --prefix=/win --enable-checking=release --enable-fully-dynamic-string --enable-languages=c,c++ --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --enable-seh-exceptions --enable-shared --enable-static --enable-threads=posix --enable-version-specific-runtime-libs --disable-bootstrap --disable-graphite --disable-libada --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-libquadmath --disable-lto --disable-nls --disable-multilib --disable-rpath --disable-symvers --disable-werror --disable-win32-registry --with-gnu-as --with-gnu-ld --with-system-libiconv --with-system-libz --with-gmp=/win/makedepends --with-mpfr=/win/makedepends --with-mpc=/win/makedepends
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (GCC)
COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\'
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/cc1.exe -quiet -v -iprefix C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/ -D_REENTRANT C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\share\cmake-3.25\Modules\CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles\cmTC_be6eb.dir\ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mtune=generic -march=x86-64 -version -fdiagnostics-color=always -o C:\Users\Nilss\AppData\Local\Temp\ccWSJGTn.s
GNU C17 (GCC) version 11.2.0 (x86_64-w64-mingw32)
compiled by GNU C version 11.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/include"
ignoring nonexistent directory "/win/include"
ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../include"
ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed"
ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include
End of search list.
GNU C17 (GCC) version 11.2.0 (x86_64-w64-mingw32)
compiled by GNU C version 11.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 23424b72d090e8b977a96775bde79257
COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\'
as -v -o CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj C:\Users\Nilss\AppData\Local\Temp\ccWSJGTn.s
GNU assembler version 2.37 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.37
COMPILER_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/
LIBRARY_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../
COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.'
Linking C executable cmTC_be6eb.exe
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_be6eb.dir\link.txt --verbose=1
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f CMakeFiles\cmTC_be6eb.dir/objects.a
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\ar.exe qc CMakeFiles\cmTC_be6eb.dir/objects.a @CMakeFiles\cmTC_be6eb.dir\objects1
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe -v -Wl,--whole-archive CMakeFiles\cmTC_be6eb.dir/objects.a -Wl,--no-whole-archive -o cmTC_be6eb.exe -Wl,--out-implib,libcmTC_be6eb.dll.a -Wl,--major-image-version,0,--minor-image-version,0
Using built-in specs.
COLLECT_GCC=C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-11.2.0/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=x86_64-alpine-linux-musl --prefix=/win --enable-checking=release --enable-fully-dynamic-string --enable-languages=c,c++ --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --enable-seh-exceptions --enable-shared --enable-static --enable-threads=posix --enable-version-specific-runtime-libs --disable-bootstrap --disable-graphite --disable-libada --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-libquadmath --disable-lto --disable-nls --disable-multilib --disable-rpath --disable-symvers --disable-werror --disable-win32-registry --with-gnu-as --with-gnu-ld --with-system-libiconv --with-system-libz --with-gmp=/win/makedepends --with-mpfr=/win/makedepends --with-mpc=/win/makedepends
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (GCC)
COMPILER_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/
LIBRARY_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_be6eb.exe' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_be6eb.'
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/collect2.exe -m i386pep -Bdynamic -o cmTC_be6eb.exe C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtbegin.o -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0 -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../.. --whole-archive CMakeFiles\cmTC_be6eb.dir/objects.a --no-whole-archive --out-implib libcmTC_be6eb.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtend.o
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_be6eb.exe' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_be6eb.'
mingw32-make[1]: Leaving directory 'C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-04r8wz'
Parsed C implicit include dir info from above output: rv=done
found start of include info
found start of implicit include info
add: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include]
add: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include]
add: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed]
add: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include]
end of search list found
collapse include dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include]
collapse include dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/include]
collapse include dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed]
collapse include dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/include]
implicit include dirs: [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/include;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/include]
Parsed C implicit link information from above output:
link line regex: [^( *|.*[/\])(ld\.exe|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
ignore line: [Change Dir: C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-04r8wz]
ignore line: []
ignore line: [Run Build Command(s):C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f Makefile cmTC_be6eb/fast && C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f CMakeFiles\cmTC_be6eb.dir\build.make CMakeFiles/cmTC_be6eb.dir/build]
ignore line: [mingw32-make[1]: Entering directory 'C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-04r8wz']
ignore line: [Building C object CMakeFiles/cmTC_be6eb.dir/CMakeCCompilerABI.c.obj]
ignore line: [C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe -fdiagnostics-color=always -v -o CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj -c "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\share\cmake-3.25\Modules\CMakeCCompilerABI.c"]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe]
ignore line: [Target: x86_64-w64-mingw32]
ignore line: [Configured with: ../gcc-11.2.0/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=x86_64-alpine-linux-musl --prefix=/win --enable-checking=release --enable-fully-dynamic-string --enable-languages=c,c++ --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --enable-seh-exceptions --enable-shared --enable-static --enable-threads=posix --enable-version-specific-runtime-libs --disable-bootstrap --disable-graphite --disable-libada --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-libquadmath --disable-lto --disable-nls --disable-multilib --disable-rpath --disable-symvers --disable-werror --disable-win32-registry --with-gnu-as --with-gnu-ld --with-system-libiconv --with-system-libz --with-gmp=/win/makedepends --with-mpfr=/win/makedepends --with-mpc=/win/makedepends]
ignore line: [Thread model: posix]
ignore line: [Supported LTO compression algorithms: zlib]
ignore line: [gcc version 11.2.0 (GCC) ]
ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\']
ignore line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/cc1.exe -quiet -v -iprefix C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/ -D_REENTRANT C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\share\cmake-3.25\Modules\CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles\cmTC_be6eb.dir\ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mtune=generic -march=x86-64 -version -fdiagnostics-color=always -o C:\Users\Nilss\AppData\Local\Temp\ccWSJGTn.s]
ignore line: [GNU C17 (GCC) version 11.2.0 (x86_64-w64-mingw32)]
ignore line: [ compiled by GNU C version 11.2.0 GMP version 6.2.1 MPFR version 4.1.0 MPC version 1.2.1 isl version none]
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
ignore line: [ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/include"]
ignore line: [ignoring nonexistent directory "/win/include"]
ignore line: [ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../include"]
ignore line: [ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed"]
ignore line: [ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include"]
ignore line: [ignoring nonexistent directory "/mingw/include"]
ignore line: [#include "..." search starts here:]
ignore line: [#include <...> search starts here:]
ignore line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include]
ignore line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include]
ignore line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed]
ignore line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include]
ignore line: [End of search list.]
ignore line: [GNU C17 (GCC) version 11.2.0 (x86_64-w64-mingw32)]
ignore line: [ compiled by GNU C version 11.2.0 GMP version 6.2.1 MPFR version 4.1.0 MPC version 1.2.1 isl version none]
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
ignore line: [Compiler executable checksum: 23424b72d090e8b977a96775bde79257]
ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\']
ignore line: [ as -v -o CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj C:\Users\Nilss\AppData\Local\Temp\ccWSJGTn.s]
ignore line: [GNU assembler version 2.37 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.37]
ignore line: [COMPILER_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/]
ignore line: [LIBRARY_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../]
ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.']
ignore line: [Linking C executable cmTC_be6eb.exe]
ignore line: ["C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_be6eb.dir\link.txt --verbose=1]
ignore line: ["C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f CMakeFiles\cmTC_be6eb.dir/objects.a]
ignore line: [C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\ar.exe qc CMakeFiles\cmTC_be6eb.dir/objects.a @CMakeFiles\cmTC_be6eb.dir\objects1]
ignore line: [C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe -v -Wl --whole-archive CMakeFiles\cmTC_be6eb.dir/objects.a -Wl --no-whole-archive -o cmTC_be6eb.exe -Wl --out-implib libcmTC_be6eb.dll.a -Wl --major-image-version 0 --minor-image-version 0 ]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe]
ignore line: [COLLECT_LTO_WRAPPER=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/lto-wrapper.exe]
ignore line: [Target: x86_64-w64-mingw32]
ignore line: [Configured with: ../gcc-11.2.0/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=x86_64-alpine-linux-musl --prefix=/win --enable-checking=release --enable-fully-dynamic-string --enable-languages=c,c++ --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --enable-seh-exceptions --enable-shared --enable-static --enable-threads=posix --enable-version-specific-runtime-libs --disable-bootstrap --disable-graphite --disable-libada --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-libquadmath --disable-lto --disable-nls --disable-multilib --disable-rpath --disable-symvers --disable-werror --disable-win32-registry --with-gnu-as --with-gnu-ld --with-system-libiconv --with-system-libz --with-gmp=/win/makedepends --with-mpfr=/win/makedepends --with-mpc=/win/makedepends]
ignore line: [Thread model: posix]
ignore line: [Supported LTO compression algorithms: zlib]
ignore line: [gcc version 11.2.0 (GCC) ]
ignore line: [COMPILER_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/]
ignore line: [LIBRARY_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_be6eb.exe' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_be6eb.']
link line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/collect2.exe -m i386pep -Bdynamic -o cmTC_be6eb.exe C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtbegin.o -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0 -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../.. --whole-archive CMakeFiles\cmTC_be6eb.dir/objects.a --no-whole-archive --out-implib libcmTC_be6eb.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtend.o]
arg [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/collect2.exe] ==> ignore
arg [-m] ==> ignore
arg [i386pep] ==> ignore
arg [-Bdynamic] ==> search dynamic
arg [-o] ==> ignore
arg [cmTC_be6eb.exe] ==> ignore
arg [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o] ==> obj [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o]
arg [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtbegin.o] ==> obj [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtbegin.o]
arg [-LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0] ==> dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0]
arg [-LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc] ==> dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc]

View File

@@ -1,52 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# The generator used is:
set(CMAKE_DEPENDS_GENERATOR "MinGW Makefiles")
# The top level Makefile was generated from the following files:
set(CMAKE_MAKEFILE_DEPENDS
"CMakeCache.txt"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeCInformation.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeCommonLanguageInclude.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeFindCodeBlocks.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeGenericSystem.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeInitializeConfigs.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeLanguageInformation.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeRCInformation.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeSystemSpecificInformation.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeSystemSpecificInitialize.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/GNU-C.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/GNU.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU-C-ABI.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU-C.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-windres.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/WindowsPaths.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/ProcessorCount.cmake"
"C:/Users/Nilss/CLionProjects/ninja/CMakeLists.txt"
"CMakeFiles/3.25.2/CMakeCCompiler.cmake"
"CMakeFiles/3.25.2/CMakeRCCompiler.cmake"
"CMakeFiles/3.25.2/CMakeSystem.cmake"
"C:/Users/Nilss/CLionProjects/ninja/config.h.in"
)
# The corresponding makefile is:
set(CMAKE_MAKEFILE_OUTPUTS
"Makefile"
"CMakeFiles/cmake.check_cache"
)
# Byproducts of CMake generate step:
set(CMAKE_MAKEFILE_PRODUCTS
"config.h"
"CMakeFiles/CMakeDirectoryInformation.cmake"
)
# Dependency information for all targets:
set(CMAKE_DEPEND_INFO_FILES
"CMakeFiles/ninja.dir/DependInfo.cmake"
)

View File

@@ -1,111 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Disable VCS-based implicit rules.
% : %,v
# Disable VCS-based implicit rules.
% : RCS/%
# Disable VCS-based implicit rules.
% : RCS/%,v
# Disable VCS-based implicit rules.
% : SCCS/s.%
# Disable VCS-based implicit rules.
% : s.%
.SUFFIXES: .hpux_make_needs_suffix_list
# Command-line flag to silence nested $(MAKE).
$(VERBOSE)MAKESILENT = -s
#Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
SHELL = cmd.exe
# The CMake executable.
CMAKE_COMMAND = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe"
# The command to remove a file.
RM = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = C:\Users\Nilss\CLionProjects\ninja
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug
#=============================================================================
# Directory level rules for the build root directory
# The main recursive "all" target.
all: CMakeFiles/ninja.dir/all
.PHONY : all
# The main recursive "preinstall" target.
preinstall:
.PHONY : preinstall
# The main recursive "clean" target.
clean: CMakeFiles/ninja.dir/clean
.PHONY : clean
#=============================================================================
# Target rules for target CMakeFiles/ninja.dir
# All Build rule for target.
CMakeFiles/ninja.dir/all:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/depend
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/build
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles --progress-num=1,2 "Built target ninja"
.PHONY : CMakeFiles/ninja.dir/all
# Build rule for subdir invocation for target.
CMakeFiles/ninja.dir/rule: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles 2
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 CMakeFiles/ninja.dir/all
$(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles 0
.PHONY : CMakeFiles/ninja.dir/rule
# Convenience name for target.
ninja: CMakeFiles/ninja.dir/rule
.PHONY : ninja
# clean rule for target.
CMakeFiles/ninja.dir/clean:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/clean
.PHONY : CMakeFiles/ninja.dir/clean
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 0
.PHONY : cmake_check_build_system

View File

@@ -1,3 +0,0 @@
C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/ninja.dir
C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/edit_cache.dir
C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/rebuild_cache.dir

View File

@@ -1,4 +0,0 @@
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" -S C:\Users\Nilss\CLionProjects\ninja -B C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug

View File

@@ -1,4 +0,0 @@
ToolSet: w64 9.0 (local)@C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\mingw
Options:
Options:

View File

@@ -1 +0,0 @@
# This file is generated by cmake for dependency checking of the CMakeCache.txt file

View File

@@ -1,19 +0,0 @@
# Consider dependencies only in project.
set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF)
# The set of languages for which implicit dependencies are needed:
set(CMAKE_DEPENDS_LANGUAGES
)
# The set of dependency files which are needed:
set(CMAKE_DEPENDS_DEPENDENCY_FILES
"C:/Users/Nilss/CLionProjects/ninja/njvm.c" "CMakeFiles/ninja.dir/njvm.c.obj" "gcc" "CMakeFiles/ninja.dir/njvm.c.obj.d"
)
# Targets to which this target links.
set(CMAKE_TARGET_LINKED_INFO_FILES
)
# Fortran module output directory.
set(CMAKE_Fortran_TARGET_MODULE_DIR "")

View File

@@ -1,112 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# Delete rule output on recipe failure.
.DELETE_ON_ERROR:
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Disable VCS-based implicit rules.
% : %,v
# Disable VCS-based implicit rules.
% : RCS/%
# Disable VCS-based implicit rules.
% : RCS/%,v
# Disable VCS-based implicit rules.
% : SCCS/s.%
# Disable VCS-based implicit rules.
% : s.%
.SUFFIXES: .hpux_make_needs_suffix_list
# Command-line flag to silence nested $(MAKE).
$(VERBOSE)MAKESILENT = -s
#Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
SHELL = cmd.exe
# The CMake executable.
CMAKE_COMMAND = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe"
# The command to remove a file.
RM = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = C:\Users\Nilss\CLionProjects\ninja
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug
# Include any dependencies generated for this target.
include CMakeFiles/ninja.dir/depend.make
# Include any dependencies generated by the compiler for this target.
include CMakeFiles/ninja.dir/compiler_depend.make
# Include the progress variables for this target.
include CMakeFiles/ninja.dir/progress.make
# Include the compile flags for this target's objects.
include CMakeFiles/ninja.dir/flags.make
CMakeFiles/ninja.dir/njvm.c.obj: CMakeFiles/ninja.dir/flags.make
CMakeFiles/ninja.dir/njvm.c.obj: CMakeFiles/ninja.dir/includes_C.rsp
CMakeFiles/ninja.dir/njvm.c.obj: C:/Users/Nilss/CLionProjects/ninja/njvm.c
CMakeFiles/ninja.dir/njvm.c.obj: CMakeFiles/ninja.dir/compiler_depend.ts
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object CMakeFiles/ninja.dir/njvm.c.obj"
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT CMakeFiles/ninja.dir/njvm.c.obj -MF CMakeFiles\ninja.dir\njvm.c.obj.d -o CMakeFiles\ninja.dir\njvm.c.obj -c C:\Users\Nilss\CLionProjects\ninja\njvm.c
CMakeFiles/ninja.dir/njvm.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ninja.dir/njvm.c.i"
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E C:\Users\Nilss\CLionProjects\ninja\njvm.c > CMakeFiles\ninja.dir\njvm.c.i
CMakeFiles/ninja.dir/njvm.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ninja.dir/njvm.c.s"
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S C:\Users\Nilss\CLionProjects\ninja\njvm.c -o CMakeFiles\ninja.dir\njvm.c.s
# Object files for target ninja
ninja_OBJECTS = \
"CMakeFiles/ninja.dir/njvm.c.obj"
# External object files for target ninja
ninja_EXTERNAL_OBJECTS =
ninja.exe: CMakeFiles/ninja.dir/njvm.c.obj
ninja.exe: CMakeFiles/ninja.dir/build.make
ninja.exe: CMakeFiles/ninja.dir/linkLibs.rsp
ninja.exe: CMakeFiles/ninja.dir/objects1
ninja.exe: CMakeFiles/ninja.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking C executable ninja.exe"
$(CMAKE_COMMAND) -E cmake_link_script CMakeFiles\ninja.dir\link.txt --verbose=$(VERBOSE)
# Rule to build all files generated by this target.
CMakeFiles/ninja.dir/build: ninja.exe
.PHONY : CMakeFiles/ninja.dir/build
CMakeFiles/ninja.dir/clean:
$(CMAKE_COMMAND) -P CMakeFiles\ninja.dir\cmake_clean.cmake
.PHONY : CMakeFiles/ninja.dir/clean
CMakeFiles/ninja.dir/depend:
$(CMAKE_COMMAND) -E cmake_depends "MinGW Makefiles" C:\Users\Nilss\CLionProjects\ninja C:\Users\Nilss\CLionProjects\ninja C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles\ninja.dir\DependInfo.cmake --color=$(COLOR)
.PHONY : CMakeFiles/ninja.dir/depend

View File

@@ -1,13 +0,0 @@
file(REMOVE_RECURSE
"CMakeFiles/ninja.dir/njvm.c.obj"
"CMakeFiles/ninja.dir/njvm.c.obj.d"
"libninja.dll.a"
"ninja.exe"
"ninja.exe.manifest"
"ninja.pdb"
)
# Per-language clean rules from dependency scanning.
foreach(lang C)
include(CMakeFiles/ninja.dir/cmake_clean_${lang}.cmake OPTIONAL)
endforeach()

View File

@@ -1,2 +0,0 @@
# Empty compiler generated dependencies file for ninja.
# This may be replaced when dependencies are built.

View File

@@ -1,2 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Timestamp file for compiler generated dependencies management for ninja.

View File

@@ -1,2 +0,0 @@
# Empty dependencies file for ninja.
# This may be replaced when dependencies are built.

View File

@@ -1,10 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# compile C with C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc.exe
C_DEFINES =
C_INCLUDES = @CMakeFiles/ninja.dir/includes_C.rsp
C_FLAGS = -g -fdiagnostics-color=always -std=gnu99

View File

@@ -1 +0,0 @@
-I"C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"

View File

@@ -1,3 +0,0 @@
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f CMakeFiles\ninja.dir/objects.a
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\ar.exe qc CMakeFiles\ninja.dir/objects.a @CMakeFiles\ninja.dir\objects1
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe -g -Wl,--whole-archive CMakeFiles\ninja.dir/objects.a -Wl,--no-whole-archive -o ninja.exe -Wl,--out-implib,libninja.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\ninja.dir\linkLibs.rsp

View File

@@ -1 +0,0 @@
-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32

View File

@@ -1,17 +0,0 @@
CMakeFiles/ninja.dir/njvm.c.obj: \
C:\Users\Nilss\CLionProjects\ninja\njvm.c \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/stdio.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/corecrt_stdio_config.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/corecrt.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/_mingw.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/_mingw_mac.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/_mingw_secapi.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/vadefs.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/sdks/_mingw_ddk.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/_mingw_off_t.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/swprintf.inl \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/sec_api/stdio_s.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/string.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/crtdefs.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/sec_api/string_s.h \
C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/config.h

View File

@@ -1 +0,0 @@
CMakeFiles/ninja.dir/njvm.c.obj

View File

@@ -1,3 +0,0 @@
CMAKE_PROGRESS_1 = 1
CMAKE_PROGRESS_2 = 2

View File

@@ -1 +0,0 @@
2

View File

@@ -1,180 +0,0 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Disable VCS-based implicit rules.
% : %,v
# Disable VCS-based implicit rules.
% : RCS/%
# Disable VCS-based implicit rules.
% : RCS/%,v
# Disable VCS-based implicit rules.
% : SCCS/s.%
# Disable VCS-based implicit rules.
% : s.%
.SUFFIXES: .hpux_make_needs_suffix_list
# Command-line flag to silence nested $(MAKE).
$(VERBOSE)MAKESILENT = -s
#Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
SHELL = cmd.exe
# The CMake executable.
CMAKE_COMMAND = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe"
# The command to remove a file.
RM = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = C:\Users\Nilss\CLionProjects\ninja
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E echo "No interactive CMake dialog available."
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\\CMakeFiles\progress.marks
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles 0
.PHONY : all
# The main clean target
clean:
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 preinstall
.PHONY : preinstall/fast
# clear depends
depend:
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 1
.PHONY : depend
#=============================================================================
# Target rules for targets named ninja
# Build rule for target.
ninja: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 ninja
.PHONY : ninja
# fast build rule for target.
ninja/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/build
.PHONY : ninja/fast
njvm.obj: njvm.c.obj
.PHONY : njvm.obj
# target to build an object file
njvm.c.obj:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/njvm.c.obj
.PHONY : njvm.c.obj
njvm.i: njvm.c.i
.PHONY : njvm.i
# target to preprocess a source file
njvm.c.i:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/njvm.c.i
.PHONY : njvm.c.i
njvm.s: njvm.c.s
.PHONY : njvm.s
# target to generate assembly for a file
njvm.c.s:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/njvm.c.s
.PHONY : njvm.c.s
# Help Target
help:
@echo The following are some of the valid targets for this Makefile:
@echo ... all (the default if no target is provided)
@echo ... clean
@echo ... depend
@echo ... edit_cache
@echo ... rebuild_cache
@echo ... ninja
@echo ... njvm.obj
@echo ... njvm.i
@echo ... njvm.s
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 0
.PHONY : cmake_check_build_system

View File

@@ -1,3 +0,0 @@
Start testing: Oct 12 12:13 Mitteleuropäische Sommerzeit
----------------------------------------------------------
End testing: Oct 12 12:13 Mitteleuropäische Sommerzeit

View File

@@ -1,49 +0,0 @@
# Install script for directory: C:/Users/Nilss/CLionProjects/ninja
# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/ninja")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Set the install configuration name.
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
if(BUILD_TYPE)
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
else()
set(CMAKE_INSTALL_CONFIG_NAME "Debug")
endif()
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
endif()
# Set the component getting installed.
if(NOT CMAKE_INSTALL_COMPONENT)
if(COMPONENT)
message(STATUS "Install component: \"${COMPONENT}\"")
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
else()
set(CMAKE_INSTALL_COMPONENT)
endif()
endif()
# Is this installation the result of a crosscompile?
if(NOT DEFINED CMAKE_CROSSCOMPILING)
set(CMAKE_CROSSCOMPILING "FALSE")
endif()
# Set default install directory permissions.
if(NOT DEFINED CMAKE_OBJDUMP)
set(CMAKE_OBJDUMP "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/objdump.exe")
endif()
if(CMAKE_INSTALL_COMPONENT)
set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
else()
set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
endif()
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
"${CMAKE_INSTALL_MANIFEST_FILES}")
file(WRITE "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}"
"${CMAKE_INSTALL_MANIFEST_CONTENT}")

View File

@@ -1 +0,0 @@
#define PROJECT_VERSION 0

View File

@@ -1,94 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6"/>
<Project>
<Option title="ninja"/>
<Option makefile_is_custom="1"/>
<Option compiler="gcc"/>
<Option virtualFolders="CMake Files\;"/>
<Build>
<Target title="all">
<Option working_dir="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Option type="4"/>
<MakeCommands>
<Build command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 all"/>
<CompileFile command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="ninja">
<Option output="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/ninja.exe" prefix_auto="0" extension_auto="0"/>
<Option working_dir="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Option object_output="./"/>
<Option type="1"/>
<Option compiler="gcc"/>
<Compiler>
<Add directory="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include"/>
</Compiler>
<MakeCommands>
<Build command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 ninja"/>
<CompileFile command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="ninja/fast">
<Option output="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/ninja.exe" prefix_auto="0" extension_auto="0"/>
<Option working_dir="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Option object_output="./"/>
<Option type="1"/>
<Option compiler="gcc"/>
<Compiler>
<Add directory="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include"/>
</Compiler>
<MakeCommands>
<Build command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 ninja/fast"/>
<CompileFile command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="edit_cache">
<Option working_dir="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Option type="4"/>
<MakeCommands>
<Build command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 edit_cache"/>
<CompileFile command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="rebuild_cache">
<Option working_dir="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Option type="4"/>
<MakeCommands>
<Build command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 rebuild_cache"/>
<CompileFile command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
</Build>
<Unit filename="C:/Users/Nilss/CLionProjects/ninja/config.h.in">
<Option target="ninja"/>
</Unit>
<Unit filename="C:/Users/Nilss/CLionProjects/ninja/njvm.c">
<Option target="ninja"/>
</Unit>
<Unit filename="C:/Users/Nilss/CLionProjects/ninja/CMakeLists.txt">
<Option virtualFolder="CMake Files\"/>
</Unit>
<Unit filename="C:/Users/Nilss/CLionProjects/ninja/config.h.in">
<Option virtualFolder="CMake Files\"/>
</Unit>
</Project>
</CodeBlocks_project_file>

Binary file not shown.

38
code.c Normal file
View File

@@ -0,0 +1,38 @@
#ifndef CODE
#define CODE
#include "instruktion.c"
unsigned int code1[] = {
(PUSHC << 24) | IMMEDIATE(3),
(PUSHC << 24) | IMMEDIATE(4),
(ADD << 24),
(PUSHC << 24) | IMMEDIATE(10),
(PUSHC << 24) | IMMEDIATE(6),
(SUB << 24),
(MUL << 24),
(WRINT << 24),
(PUSHC << 24) | IMMEDIATE(10),
(WRCHR << 24),
(HALT)
};
unsigned int code2[] = {
(PUSHC << 24) | IMMEDIATE(SIGN_EXTEND(-2)),
(RDINT << 24),
(MUL << 24),
(PUSHC << 24) | IMMEDIATE(3),
(ADD << 24),
(WRINT << 24),
(PUSHC << 24) | IMMEDIATE('\n'),
(WRCHR << 24),
(HALT << 24)
};
unsigned int code3[] = {
(RDCHR << 24),
(WRINT << 24),
(PUSHC << 24) | IMMEDIATE('\n'),
(WRCHR << 24),
(HALT << 24)
};
#endif

37
codeReader.c Normal file
View File

@@ -0,0 +1,37 @@
#ifndef CODEREADER
#define CODEREADER
#include "consts.c"
#include <stdio.h>
#include <stdlib.h>
#include "program.c"
unsigned int fromFile(char *path, struct program *program) {
unsigned int countInstructions;
unsigned int staticVars;
FILE *fptr;
fptr = fopen(path, "r");
if (fptr == NULL) {
printf("Error: cannot open code file %s\n", path);
exit(EXIT_FAILURE);
}
unsigned int buffer[4];
fread(buffer, 4, 4, fptr);
// Check file type
if (buffer[0] != 0x46424A4E) {
printf("Error: wrong file type");
exit(EXIT_FAILURE);
}
if (buffer[1] != VERSION) {
printf("Error: wrong version");
exit(EXIT_FAILURE);
}
countInstructions = buffer[2];
staticVars = buffer[3];
unsigned int instBuffer[countInstructions];
fread(instBuffer, 4, countInstructions, fptr);
copyToProgram(instBuffer, countInstructions, program);
return staticVars;
}
#endif /* ifdef CODEREADER */

View File

@@ -1 +0,0 @@
#define PROJECT_VERSION @PROJECT_VERSION@

5
consts.c Normal file
View File

@@ -0,0 +1,5 @@
#ifndef CONSTS
#define CONSTS
#define VERSION 4
#endif

38
instruktion.c Normal file
View File

@@ -0,0 +1,38 @@
#ifndef INSREUKTION
#define INSREUKTION
#define IMMEDIATE(x) ((x) & 0x00FFFFFF)
#define SIGN_EXTEND(i) ((i) & 0x00800000 ? (i) | 0xFF000000 : (i))
#define HALT 0
#define PUSHC 1
#define ADD 2
#define SUB 3
#define MUL 4
#define DIV 5
#define MOD 6
#define RDINT 7
#define WRINT 8
#define RDCHR 9
#define WRCHR 10
#define PUSHG 11
#define POPG 12
#define ASF 13
#define RSF 14
#define PUSHL 15
#define POPL 16
#define EQ 17
#define NE 18
#define LT 19
#define LE 20
#define GT 21
#define GE 22
#define JMP 23
#define BRF 24
#define BRT 25
#define CALL 26
#define RET 27
#define DROP 28
#endif /* ifndef INSREUKTION */

BIN
nja-mac Executable file

Binary file not shown.

BIN
nja/nja2 Executable file

Binary file not shown.

BIN
nja/nja3 Executable file

Binary file not shown.

13
nja/nja4 Executable file
View File

@@ -0,0 +1,13 @@
--2024-01-14 15:04:22-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a4/nja?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 56947 (56K) [application/octet-stream]
Saving to: nja?inline=false
0K .......... .......... .......... .......... .......... 89% 1.02M 0s
50K ..... 100% 18.3M=0.05s
2024-01-14 15:04:22 (1.13 MB/s) - nja?inline=false saved [56947/56947]

13
nja/nja5 Executable file
View File

@@ -0,0 +1,13 @@
--2024-01-14 15:04:59-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a5/nja?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 56947 (56K) [application/octet-stream]
Saving to: nja?inline=false
0K .......... .......... .......... .......... .......... 89% 1.07M 0s
50K ..... 100% 18.4M=0.05s
2024-01-14 15:05:00 (1.18 MB/s) - nja?inline=false saved [56947/56947]

13
nja/nja6 Executable file
View File

@@ -0,0 +1,13 @@
--2024-01-14 15:05:08-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a6/nja?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 56947 (56K) [application/octet-stream]
Saving to: nja?inline=false.1
0K .......... .......... .......... .......... .......... 89% 1.04M 0s
50K ..... 100% 25.8M=0.05s
2024-01-14 15:05:08 (1.15 MB/s) - nja?inline=false.1 saved [56947/56947]

13
nja/nja7 Executable file
View File

@@ -0,0 +1,13 @@
--2024-01-14 15:05:15-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a7/nja?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 57195 (56K) [application/octet-stream]
Saving to: nja?inline=false.2
0K .......... .......... .......... .......... .......... 89% 1.23M 0s
50K ..... 100% 11.7M=0.04s
2024-01-14 15:05:16 (1.36 MB/s) - nja?inline=false.2 saved [57195/57195]

13
nja/nja8 Executable file
View File

@@ -0,0 +1,13 @@
--2024-01-14 15:05:26-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a8/nja?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 57195 (56K) [application/octet-stream]
Saving to: nja?inline=false.3
0K .......... .......... .......... .......... .......... 89% 1.22M 0s
50K ..... 100% 14.5M=0.04s
2024-01-14 15:05:27 (1.35 MB/s) - nja?inline=false.3 saved [57195/57195]

14
njc/njc4 Executable file
View File

@@ -0,0 +1,14 @@
--2024-01-14 15:07:13-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a4/njc?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 137095 (134K) [application/octet-stream]
Saving to: njc?inline=false
0K .......... .......... .......... .......... .......... 37% 1.23M 0s
50K .......... .......... .......... .......... .......... 74% 2.63M 0s
100K .......... .......... .......... ... 100% 9.98M=0.06s
2024-01-14 15:07:14 (2.13 MB/s) - njc?inline=false saved [137095/137095]

14
njc/njc5 Executable file
View File

@@ -0,0 +1,14 @@
--2024-01-14 15:07:20-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a5/njc?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 137095 (134K) [application/octet-stream]
Saving to: njc?inline=false.1
0K .......... .......... .......... .......... .......... 37% 1.21M 0s
50K .......... .......... .......... .......... .......... 74% 2.51M 0s
100K .......... .......... .......... ... 100% 11.2M=0.06s
2024-01-14 15:07:21 (2.08 MB/s) - njc?inline=false.1 saved [137095/137095]

14
njc/njc6 Executable file
View File

@@ -0,0 +1,14 @@
--2024-01-14 15:07:28-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a6/njc?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 137095 (134K) [application/octet-stream]
Saving to: njc?inline=false.2
0K .......... .......... .......... .......... .......... 37% 1.02M 0s
50K .......... .......... .......... .......... .......... 74% 2.03M 0s
100K .......... .......... .......... ... 100% 11.4M=0.07s
2024-01-14 15:07:28 (1.74 MB/s) - njc?inline=false.2 saved [137095/137095]

15
njc/njc7 Executable file
View File

@@ -0,0 +1,15 @@
--2024-01-14 15:07:49-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a7/njc?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 166681 (163K) [application/octet-stream]
Saving to: njc?inline=false.6
0K .......... .......... .......... .......... .......... 30% 1.04M 0s
50K .......... .......... .......... .......... .......... 61% 2.13M 0s
100K .......... .......... .......... .......... .......... 92% 11.2M 0s
150K .......... .. 100% 14.2M=0.08s
2024-01-14 15:07:49 (2.11 MB/s) - njc?inline=false.6 saved [166681/166681]

15
njc/njc8 Executable file
View File

@@ -0,0 +1,15 @@
--2024-01-14 15:07:46-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a8/njc?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 166681 (163K) [application/octet-stream]
Saving to: njc?inline=false.5
0K .......... .......... .......... .......... .......... 30% 1.20M 0s
50K .......... .......... .......... .......... .......... 61% 2.53M 0s
100K .......... .......... .......... .......... .......... 92% 6.70M 0s
150K .......... .. 100% 8.97M=0.07s
2024-01-14 15:07:47 (2.31 MB/s) - njc?inline=false.5 saved [166681/166681]

BIN
njvm-3 Executable file

Binary file not shown.

354
njvm.c
View File

@@ -1,43 +1,345 @@
#include <stdio.h>
#include <string.h>
#include "config.h"
#include "consts.c"
#include "instruktion.c"
#include "code.c"
#include "stack.c"
#include "program.c"
#include "codeReader.c"
#include "SDA.c"
void version() {
printf("Ninja Virtual Machine version %i (compiled %s, %s)\n", PROJECT_VERSION, __DATE__, __TIME__);
// Program
struct program *program;
// SDA
int fp;
int debug = 0;
void version(void) {
printf("Ninja Virtual Machine version %i (compiled %s, %s)\n", VERSION, __DATE__, __TIME__);
}
void help() {
printf("usage: ./njvm [option] [option] ...\n\t--version\tshow version and exit\n\t--help\t\tshow this help and exit");
void help(void) {
printf("Usage: ./njvm [options] <code file>\n\t--debug\tstart virtual machine in debug mode\n\t--version\tshow version and exit\n\t--help\t\tshow this help and exit\n");
}
void printArgs(int argc, char *argv[]){
for (int i = 0; i < argc; ++i) {
printf("%s\n", argv[i]);
void execute(struct program *program, struct sda *sda) {
struct stack stack;
stack.size = 1000;
stack.currentFrame = 0;
struct stack callStack;
callStack.size = 1000;
callStack.currentFrame = 0;
for (int i = 0; i < stack.size; ++i) {
struct stackFrame *frame = malloc(sizeof(struct stackFrame));
frame->fp = malloc(sizeof(int) * stack.size);
frame->sp = malloc(sizeof(int) * stack.size);
frame->bp = NULL;
stack.frames[i] = frame;
}
for (int i = 0; i < callStack.size; ++i) {
struct stackFrame *frame = malloc(sizeof(struct stackFrame));
frame->fp = malloc(sizeof(int) * stack.size);
frame->sp = malloc(sizeof(int) * stack.size);
frame->bp = NULL;
callStack.frames[i] = frame;
}
struct stackFrame *currentFrame = NULL;
//struct stackFrame *currentCallFrame = NULL;
unsigned int tmp;
int intInput;
char charInput;
for (int i = 0; i < program->size; ++i) {
unsigned int instruction = program->program[i];
if (i >= program->size) {
printf("Error: Jump out of program memory\n");
goto end;
}
switch (instruction >> 24) {
case HALT:
goto end;
case PUSHC:
if (debug == 1) printf("PUSHC %d\n", SIGN_EXTEND(IMMEDIATE(instruction)));
push(&stack, SIGN_EXTEND(IMMEDIATE(instruction)));
break;
case ADD:
if (debug == 1) printf("ADD\n");
push(&stack, pop(&stack) + pop(&stack));
break;
case SUB:
tmp = pop(&stack);
if (debug == 1) printf("SUB\n");
if (debug == 1) printf("tmp: %d\n", tmp);
push(&stack, pop(&stack) - tmp);
break;
case MUL:
if (debug == 1) printf("MUL\n");
push(&stack, pop(&stack) * pop(&stack));
break;
case DIV:
tmp = pop(&stack);
if (debug == 1) printf("DIV\n");
if (debug == 1) printf("tmp: %d\n", tmp);
push(&stack, pop(&stack) / tmp);
break;
case MOD:
tmp = pop(&stack);
if (debug == 1) printf("MOD\n");
if (debug == 1) printf("tmp: %d\n", tmp);
push(&stack, pop(&stack) % tmp);
break;
case RDINT:
scanf("%i", &intInput);
if (debug == 1) printf("RDINT %d\n", intInput);
push(&stack, intInput);
break;
case WRINT:
if (debug == 1) printf("WRINT\n");
printf("%i", pop(&stack));
break;
case RDCHR:
scanf("%c", &charInput);
if (debug == 1) printf("RDCHR %c\n", charInput);
push(&stack, charInput);
break;
case WRCHR:
if (debug == 1) printf("WRCHR\n");
printf("%c", pop(&stack));
break;
case PUSHG:
if (debug == 1) printf("PUSHG %d\n", SIGN_EXTEND(IMMEDIATE(instruction)));
currentFrame = stack.frames[stack.currentFrame];
currentFrame->bp = currentFrame->sp;
*currentFrame->sp++ = getSDA(SIGN_EXTEND(IMMEDIATE(instruction)), sda);
break;
case POPG:
if (debug == 1) printf("POPG %d\n", SIGN_EXTEND(IMMEDIATE(instruction)));
currentFrame = stack.frames[stack.currentFrame];
currentFrame->bp = currentFrame->sp;
setSDA(SIGN_EXTEND(IMMEDIATE(instruction)), pop(&stack), sda);
break;
case ASF:
if (debug == 1) printf("ASF %d\n", SIGN_EXTEND(IMMEDIATE(instruction)));
currentFrame = stack.frames[stack.currentFrame];
push(&stack, *currentFrame->sp);
*currentFrame->sp = stack.currentFrame;
currentFrame->bp = currentFrame->sp;
stack.currentFrame += SIGN_EXTEND(IMMEDIATE(instruction));
break;
case RSF:
if (debug == 1) printf("RSF\n");
stack.currentFrame = pop(&stack);
currentFrame = stack.frames[stack.currentFrame];
currentFrame->bp = NULL;
break;
case PUSHL:
printf("PUSHL %d\n", SIGN_EXTEND(IMMEDIATE(instruction)));
currentFrame = stack.frames[stack.currentFrame];
currentFrame->bp = currentFrame->sp;
int x = SIGN_EXTEND(IMMEDIATE(instruction));
push(&stack, currentFrame->fp[x]);
break;
case POPL:
if (debug == 1) printf("POPL %d\n", SIGN_EXTEND(IMMEDIATE(instruction)));
currentFrame = stack.frames[stack.currentFrame];
currentFrame->fp[SIGN_EXTEND(IMMEDIATE(instruction))] = pop(&stack);
break;
case EQ:
if (debug == 1) printf("EQ\n");
if (pop(&stack) == pop(&stack)) {
push(&stack, 1);
} else {
push(&stack, 0);
}
break;
case NE:
if (debug == 1) printf("NE\n");
if (pop(&stack) != pop(&stack)) {
push(&stack, 1);
} else {
push(&stack, 0);
}
break;
case LT:
if (debug == 1) printf("LT\n");
tmp = pop(&stack);
if (pop(&stack) < tmp) {
push(&stack, 1);
} else {
push(&stack, 0);
}
break;
case LE:
if (debug == 1) printf("LE\n");
tmp = pop(&stack);
if (pop(&stack) <= tmp) {
push(&stack, 1);
} else {
push(&stack, 0);
}
break;
case GT:
if (debug == 1) printf("GT\n");
if (debug == 1) printf("peek(1): %d\n", peek(&stack, 1));
if (debug == 1) printf("peek(2): %d\n", peek(&stack, 2));
if (debug == 1) printf("peek(1) > peek(2): %d\n", peek(&stack, 2) > peek(&stack, 1));
tmp = pop(&stack);
if (pop(&stack) > tmp) {
push(&stack, 1);
} else {
push(&stack, 0);
}
break;
case GE:
if (debug == 1) printf("GE\n");
tmp = pop(&stack);
if (pop(&stack) >= tmp) {
push(&stack, 1);
} else {
push(&stack, 0);
}
break;
case JMP:
if (debug == 1) printf("JMP %d\n", SIGN_EXTEND(IMMEDIATE(instruction)));
int j = SIGN_EXTEND(IMMEDIATE(program->program[i]));
if (debug == 1) printf("JMP %d\n", j);
if (j-- >= program->size) {
printf("Error: Jump out of program memory\n");
goto end;
}
i = j;
break;
case BRF: // branch on false
if (debug == 1) printf("BRF %d\nStack: %d\n", SIGN_EXTEND(IMMEDIATE(instruction)), pop(&stack));
if (pop(&stack) == 0) {
int j = SIGN_EXTEND(IMMEDIATE(program->program[i]));
if (j-- >= program->size) {
printf("Error: BRF out of program memory\n");
goto end;
}
i = j;
}
break;
case BRT:
if (debug == 1) printf("BRT %d\n", SIGN_EXTEND(IMMEDIATE(instruction)));
if (pop(&stack) == 1) {
int j = SIGN_EXTEND(IMMEDIATE(program->program[i]));
if (j-- >= program->size) {
printf("Error: BRT out of program memory\n");
goto end;
}
i = j;
}
break;
case CALL:
tmp = SIGN_EXTEND(IMMEDIATE(program->program[i]));
if (j-- >= program->size) {
printf("Error: Call out of program memory\n");
goto end;
}
push(&callStack, i + 1);
i = tmp;
break;
case RET:
if (debug == 1) printf("RET\n");
tmp = pop(&callStack);
if (tmp-- >= program->size) {
printf("Error: Return out of program memory\n");
goto end;
}
i = tmp;
break;
case DROP:
tmp = SIGN_EXTEND(IMMEDIATE(instruction));
if (debug == 1) printf("DROP %d\n", tmp);
for (int b = 0; b < tmp; ++b) {
pop(&stack);
}
break;
}
}
end:
return;
}
void useption(int argc, char *argv[]){
if (argc > 1) {
if (strcmp(argv[1], "--version") == 0) {
version();
} else if (strcmp(argv[1], "--help") == 0) {
help();
} else if (argc != 0) {
printf("unknown command line argument '%s', try './njvm --help'", argv[1]);
}
}
// run prog2.bin
void tests(void) {
printf("Test started\n");
/*struct sda *sda = malloc(sizeof(struct sda));
unsigned int s[1000];
sda->size = 1000;
sda->sda = s;
fromFile("prog2.bin", program);
execute(program, (struct sda *) &sda);*/
printf("Test finished\n");
}
int main(int argc, char *argv[]) {
printArgs(argc,argv);
if (argc > 1) useption(argc,argv);
else {
// Initialize the Stack
struct stack stack;
int size = SIZE;
stack.size = size;
stack.currentFrame = 0;
// Started
printf("Ninja Virtual Machine started\n");
// Initialize ProgrammSpeicher
int psize = SIZE;
unsigned int p[1000];
program = malloc(sizeof(struct program));
program->size = psize;
program->program = p;
// Initialize runtime variables
int run = 0;
int sizeSDA;
// Stopped
printf("Ninja Virtual Machine stopped\n");
if (argc > 1) {
for (int i = 1; i < argc; ++i) {
if (strcmp(argv[i], "--debug") == 0) {
debug = 1;
} else if (strcmp(argv[i], "--version") == 0) {
version();
return 0;
} else if (strcmp(argv[i], "--help") == 0) {
help();
return 0;
} else {
sizeSDA = fromFile(argv[i], program);
run = 1;
}
}
}
/*
* Debug mode
*/
if (debug) {
tests();
}
/*
* Run program
*/
if (run) {
printf("Ninja Virtual Machine started\n");
struct sda *sda = malloc(sizeof(struct sda));
unsigned int s[sizeSDA];
sda->size = sizeSDA;
sda->sda = s;
if (debug == 1) printProgram(program);
execute(program, (struct sda *) &sda);
printf("Ninja Virtual Machine stopped\n");
} else {
printf("Error: no code file specified\n");
return 1;
}
return 0;
}

120
program.c Normal file
View File

@@ -0,0 +1,120 @@
/*
* Created by Nils on 30.10.2023.
*/
#ifndef PROGRAM
#define PROGRAM
#include <string.h>
#include "instruktion.c"
#include <stdio.h>
struct program {
unsigned int *program;
int size;
};
void copyToProgram(const unsigned int codeToCopy[], int size, struct program *program) {
for (int i = 0; i < size; ++i) {
program->program[i] = codeToCopy[i];
}
program->size = size;
}
void printProgram(struct program *program) {
char c[10];
for (int i = 0; i < program->size; i++) {
switch (program->program[i] >> 24) {
case PUSHC:
strcpy(c, "pushc");
break;
case ADD:
strcpy(c, "add");
break;
case SUB:
strcpy(c, "sub");
break;
case MUL:
strcpy(c, "mul");
break;
case DIV:
strcpy(c, "div");
break;
case MOD:
strcpy(c, "mod");
break;
case RDINT:
strcpy(c, "rdint");
break;
case WRINT:
strcpy(c, "wrint");
break;
case RDCHR:
strcpy(c, "rdchr");
break;
case WRCHR:
strcpy(c, "wrchr");
break;
case HALT:
strcpy(c, "halt");
break;
case PUSHG :
strcpy(c, "pushg");
break;
case POPG:
strcpy(c, "popg");
break;
case ASF:
strcpy(c, "asf");
break;
case RSF:
strcpy(c, "rsf");
break;
case PUSHL:
strcpy(c, "pushl");
break;
case POPL:
strcpy(c, "popl");
break;
case EQ:
strcpy(c,"eq");
break;
case NE:
strcpy(c,"ne");
break;
case LT:
strcpy(c,"lt");
break;
case GT:
strcpy(c,"gt");
break;
case GE:
strcpy(c,"ge");
break;
case JMP:
strcpy(c,"jmp");
break;
case BRF:
strcpy(c, "brf");
break;
case BRT:
strcpy(c,"brt");
break;
case CALL:
strcpy(c,"call");
break;
case RET:
strcpy(c,"ret");
break;
case DROP:
strcpy(c,"drop");
break;
default:
strcpy(c, "ERROR");
break;
}
IMMEDIATE(program->program[i]) ? printf("%03i:\t%s\t%i\n", i, c, SIGN_EXTEND(IMMEDIATE(program->program[i]))) : printf(
"%03i:\t%s\n", i, c);
}
}
#endif /* ifndef PROGRAMM */

11
programs/prog-test-1.asm Normal file
View File

@@ -0,0 +1,11 @@
pushc 3
pushc 4
add
pushc 10
pushc 6
sub
mul
wrint
pushc 10
wrchr
halt

BIN
programs/prog-test-1.bin Normal file

Binary file not shown.

9
programs/prog-test-2.asm Normal file
View File

@@ -0,0 +1,9 @@
pushc -2
rdint
mul
pushc 3
add
wrint
pushc '\n'
wrchr
halt

BIN
programs/prog-test-2.bin Normal file

Binary file not shown.

5
programs/prog-test-3.asm Normal file
View File

@@ -0,0 +1,5 @@
rdchr
wrint
pushc '\n'
wrchr
halt

BIN
programs/prog-test-3.bin Normal file

Binary file not shown.

31
programs/prog1.asm Normal file
View File

@@ -0,0 +1,31 @@
//
// prog1.asm -- an assembler example with global variables
//
// global Integer x;
// global Integer y;
// x = 2;
// y = x + 3;
// x = 7 * y + x;
// writeInteger(x + -33);
// writeCharacter('\n');
pushc 2
popg 0
pushg 0
pushc 3
add
popg 1
pushc 7
pushg 1
mul
pushg 0
add
popg 0
pushg 0
pushc -33
add
wrint
pushc '\n'
wrchr
halt

BIN
programs/prog1.bin Normal file

Binary file not shown.

33
programs/prog2.asm Normal file
View File

@@ -0,0 +1,33 @@
//
// prog2.asm -- an assembler example with local variables
//
// local Integer x;
// local Integer y;
// x = 2;
// y = x + 3;
// x = 7 * y + x;
// writeInteger(x + -33);
// writeCharacter('\n');
asf 2
pushc 2
popl 0
pushl 0
pushc 3
add
popl 1
pushc 7
pushl 1
mul
pushl 0
add
popl 0
pushl 0
pushc -33
add
wrint
pushc '\n'
wrchr
rsf
halt

BIN
programs/prog2.bin Normal file

Binary file not shown.

61
programs/prog3.asm Normal file
View File

@@ -0,0 +1,61 @@
//
// prog1.asm -- an assembler example with global variables
//
//
// compute the gcd of two positive numbers
//
// global Integer x;
// global Integer y;
// x = readInteger();
// y = readInteger();
// while (x != y) {
// if (x > y) {
// x = x - y;
// } else {
// y = y - x;
// }
// }
// writeInteger(x);
// writeCharacter('\n');
// x = readInteger();
rdint
popg 0
// y = readInteger();
rdint
popg 1
// while ...
L1:
// x != y
pushg 0 // 4
pushg 1
ne
brf L2
// if ...
pushg 0
pushg 1
gt
brf L3
// x = x - y
pushg 0
pushg 1
sub
popg 0
jmp L4
L3:
// y = y - x
pushg 1 // 17
pushg 0
sub
popg 1
L4:
jmp L1 // 21
L2:
// writeInteger(x);
pushg 0 // 22
wrint
// writeCharacter('\n');
pushc '\n'
wrchr
halt

BIN
programs/prog3.bin Normal file

Binary file not shown.

63
programs/prog4.asm Normal file
View File

@@ -0,0 +1,63 @@
//
// prog2.asm -- an assembler example with local variables
//
//
// compute the gcd of two positive numbers
//
// local Integer x;
// local Integer y;
// x = readInteger();
// y = readInteger();
// while (x != y) {
// if (x > y) {
// x = x - y;
// } else {
// y = y - x;
// }
// }
// writeInteger(x);
// writeCharacter('\n');
asf 2
// x = readInteger();
rdint
popl 0
// y = readInteger();
rdint
popl 1
// while ...
L1:
// x != y
pushl 0
pushl 1
ne
brf L2
// if ...
pushl 0
pushl 1
gt
brf L3
// x = x - y
pushl 0
pushl 1
sub
popl 0
jmp L4
L3:
// y = y - x
pushl 1
pushl 0
sub
popl 1
L4:
jmp L1
L2:
// writeInteger(x);
pushl 0
wrint
// writeCharacter('\n');
pushc '\n'
wrchr
rsf
halt

BIN
programs/prog4.bin Normal file

Binary file not shown.

35
programs/prog5.asm Normal file
View File

@@ -0,0 +1,35 @@
//
// prog01.asm -- call/ret without args, and without ret value
//
asf 3
pushc 11
wrint
pushc '\n'
wrchr
call proc
pushc 44
wrint
pushc '\n'
wrchr
rsf
halt
proc:
asf 2
pushc 22
wrint
pushc '\n'
wrchr
call proctwo
rsf
ret
proctwo:
asf 2
pushc 33
wrint
pushc '\n'
wrchr
rsf
ret

BIN
programs/prog5.bin Normal file

Binary file not shown.

28
programs/prog6.asm Normal file
View File

@@ -0,0 +1,28 @@
//
// prog02.asm -- call/ret with args, but without ret value
//
asf 3
pushc 11
pushc 33
call proc
drop 2
rsf
halt
proc:
asf 2
pushl -4
wrint
pushc '\n'
wrchr
pushc 22
wrint
pushc '\n'
wrchr
pushl -3
wrint
pushc '\n'
wrchr
rsf
ret

BIN
programs/prog6.bin Normal file

Binary file not shown.

28
programs/prog7.asm Normal file
View File

@@ -0,0 +1,28 @@
//
// prog02.asm -- call/ret with args, but without ret value
//
asf 3
pushc 11
pushc 33
call proc
drop 2
rsf
halt
proc:
asf 2
pushl 4
wrint
pushc '\n'
wrchr
pushc 22
wrint
pushc '\n'
wrchr
pushl 3
wrint
pushc '\n'
wrchr
rsf
ret

BIN
programs/prog7.bin Normal file

Binary file not shown.

48
stack.c Executable file
View File

@@ -0,0 +1,48 @@
//
// Created by Nils on 29.10.2023.
//
#ifndef STACK
#define STACK
#define SIZE 1000
#include <stdio.h>
#include <stdlib.h>
struct stackFrame {
int *fp; // Frame pointer
int *sp; // Stack pointer
int *bp; // Base pointer
};
struct stack {
int size;
int currentFrame;
struct stackFrame *frames[SIZE];
};
void printStack(struct stack *stack) {
printf("Stack:\n");
for (int i = 0; i < stack->size; ++i) {
printf("[%d] = %d\n", i, stack->frames[stack->currentFrame]->sp[i]);
}
}
void push(struct stack *stack, unsigned int value) {
struct stackFrame *currentFrame = stack->frames[stack->currentFrame];
*(currentFrame->sp) = value;
currentFrame->sp++;
}
int pop(struct stack *stack) {
struct stackFrame *currentFrame = stack->frames[stack->currentFrame];
currentFrame->sp--;
return *(currentFrame->sp);
}
int peek(struct stack *stack, int steps) { // peek is pop without removing the value
struct stackFrame *currentFrame = stack->frames[stack->currentFrame];
return *(currentFrame->sp - steps);
}
#endif