From ab42f181f72ed692919bb7dc67d79c7c0efae47a Mon Sep 17 00:00:00 2001 From: xolatile Date: Fri, 23 Feb 2024 12:50:42 -0500 Subject: [PATCH] Removed examples... --- example/example_ada.adb | 45 ---------------------------------- example/example_c.c | 28 ---------------------- example/example_cpp.cpp | 1 - example/example_flat_assembly.fasm | 49 -------------------------------------- example/testing.sh | 10 -------- 5 files changed, 133 deletions(-) delete mode 100644 example/example_ada.adb delete mode 100644 example/example_c.c delete mode 100644 example/example_cpp.cpp delete mode 100644 example/example_flat_assembly.fasm delete mode 100644 example/testing.sh diff --git a/example/example_ada.adb b/example/example_ada.adb deleted file mode 100644 index 344a4f9..0000000 --- a/example/example_ada.adb +++ /dev/null @@ -1,45 +0,0 @@ --- gnatmake -o example_ada example_ada.adb - -with ada.text_io, ada.command_line; -use ada.text_io, ada.command_line; - -procedure example_ada is - - type colours is (RED, GREEN, YELLOW); - - type structure is record - x : integer := -1; - y : natural := 1; - end record; - - escape : constant character := character'val (27); - - procedure put_colour (colour : colours) is - code : integer := colours'pos (colour) + 49; - begin - put (escape & "[0;3" & character'val (code) & "m"); - end put_colour; - - procedure put_cancel is - begin - put (escape & "[0m"); - end put_cancel; - - heyo : structure := (-103, 107); - -begin - - for colour in colours - loop - put_colour (colour); - - put_line ("x = " & integer'image (heyo.x)); - put_line ("y = " & natural'image (heyo.y)); - - heyo.x := heyo.x - 1; - heyo.y := heyo.y + 1; - - put_cancel; - end loop; - -end example_ada; diff --git a/example/example_c.c b/example/example_c.c deleted file mode 100644 index 476cf98..0000000 --- a/example/example_c.c +++ /dev/null @@ -1,28 +0,0 @@ -/* gcc -o example_c example_c.c */ - -#include - -static struct { - char * x; - int y; - int z; -} const data [3] = { - { "-- 1", 2, 3 }, - { "-- 4", 5, 6 }, - { "-- 7", 8, 9 } -}; - -int main (void) { - int i; - - for (i = 0; i != 3; ++i) { - printf ("\033[%c;3%cm%s%i%i\033[0m\n", - i + '1', - i + '1', - data [i]. x, - data [i]. y, - data [i]. z); - } - - return (0); -} diff --git a/example/example_cpp.cpp b/example/example_cpp.cpp deleted file mode 100644 index 237dc49..0000000 --- a/example/example_cpp.cpp +++ /dev/null @@ -1 +0,0 @@ -// I hate this language so much it's unreal... diff --git a/example/example_flat_assembly.fasm b/example/example_flat_assembly.fasm deleted file mode 100644 index 0e7ff1f..0000000 --- a/example/example_flat_assembly.fasm +++ /dev/null @@ -1,49 +0,0 @@ -; fasm example_flat_assembly.fasm example_flat_assembly && chmod +x example_flat_assembly - -format ELF64 executable 3 - -entry main - -TERMINAL_INPUT = 0 -TERMINAL_OUTPUT = 1 - -EXIT_SUCCESS = 0 -EXIT_FAILURE = 1 - -macro write file, data, size { - mov rax, 1 - mov rdi, file - mov rsi, data - mov rdx, size - syscall -} - -macro exit code { - mov rax, 60 - mov rdi, code - syscall -} - -segment readable executable - -colour: - write TERMINAL_OUTPUT, colour_red, 7 - ret - -cancel: - write TERMINAL_OUTPUT, colour_end, 4 - ret - -main: - call colour - write TERMINAL_OUTPUT, string, length - call cancel - exit EXIT_SUCCESS - -segment readable writable - -colour_red db 27, "[1;31m" -colour_end db 27, "[0m" - -string db "Heyo world!", 10, 0 -length dq $ - string diff --git a/example/testing.sh b/example/testing.sh deleted file mode 100644 index 30f1786..0000000 --- a/example/testing.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -set -xe - -xighlight -a -i ./example/example_ada.adb -xighlight -c -i ./example/example_c.c -xighlight -C -i ./example/example_cpp.cpp -xighlight -F -i ./example/example_flat_assembly.fasm - -exit