diff --git a/casm/.vscode/launch.json b/casm/.vscode/launch.json new file mode 100644 index 0000000..9a128b1 --- /dev/null +++ b/casm/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "(lldb) Launch", + "type": "lldb", + "request": "launch", + // Resolved by CMake Tools: + "program": "${command:cmake.launchTargetPath}", + "args": [], + "cwd": "${workspaceFolder}", + "env": { + "PATH": "${env:PATH}:${command:cmake.getLaunchTargetDirectory}" + } + } + ] +} \ No newline at end of file diff --git a/casm/CMakePresets.json b/casm/CMakePresets.json new file mode 100644 index 0000000..7d59c37 --- /dev/null +++ b/casm/CMakePresets.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "configurePresets": [ + { + "name": "debug-gcc", + "displayName": "debug-gcc", + "description": "Using compilers: C = /usr/bin/gcc, CXX = /usr/bin/g++", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "cacheVariables": { + "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}", + "CMAKE_C_COMPILER": "/usr/bin/gcc", + "CMAKE_CXX_COMPILER": "/usr/bin/g++", + "CMAKE_BUILD_TYPE": "Debug" + } + } + ] +} \ No newline at end of file diff --git a/casm/asm.asm b/casm/asm.asm index 98cbc28..fa0b1cc 100644 --- a/casm/asm.asm +++ b/casm/asm.asm @@ -2,6 +2,6 @@ global main section .text main: - mov rdi, 5 + mov rdi, 125 mov rax, 60 syscall \ No newline at end of file diff --git a/casm/c.c b/casm/c.c index 6381571..bca2640 100644 --- a/casm/c.c +++ b/casm/c.c @@ -1,3 +1,9 @@ +#include + int sum(int a, int b) { return a+b; +} + +void print(int num) { + printf("%d", num); } \ No newline at end of file