From 98877d610063af318c8e92484acb0fe5afdbf218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D1=8B=D1=82=D0=BA=D0=BE=D0=B2=20=D0=A0=D0=BE=D0=BC?= =?UTF-8?q?=D0=B0=D0=BD?= Date: Sat, 20 Sep 2025 20:17:31 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=BA=D1=80=D1=83=D0=B6=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D1=81=D1=82=D0=B0=D0=BB=D0=BE=20=D1=81=D0=B8?= =?UTF-8?q?=D0=BB=D1=8C=D0=BD=D0=BE=20=D1=83=D0=B4=D0=BE=D0=B1=D0=BD=D0=B5?= =?UTF-8?q?=D0=B5,=20lldb=20=D0=B7=D0=B0=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- casm/.vscode/launch.json | 17 +++++++++++++++++ casm/CMakePresets.json | 17 +++++++++++++++++ casm/asm.asm | 2 +- casm/c.c | 6 ++++++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 casm/.vscode/launch.json create mode 100644 casm/CMakePresets.json 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