From a01ad9be2dcd5da03013bfbdcbcce2e05b20acf8 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Thu, 26 Jan 2023 21:07:56 +0000 Subject: [PATCH] assembly --- assembly | 1 - assembly/Dockerfile | 20 ++++++++++++++++++++ assembly/code/helloworld.hla | 8 ++++++++ assembly/start.sh | 4 ++++ 4 files changed, 32 insertions(+), 1 deletion(-) delete mode 160000 assembly create mode 100644 assembly/Dockerfile create mode 100644 assembly/code/helloworld.hla create mode 100755 assembly/start.sh diff --git a/assembly b/assembly deleted file mode 160000 index 6f2e572..0000000 --- a/assembly +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6f2e5724071da0df10a7c2a8cfd646701cc07ab6 diff --git a/assembly/Dockerfile b/assembly/Dockerfile new file mode 100644 index 0000000..2160e84 --- /dev/null +++ b/assembly/Dockerfile @@ -0,0 +1,20 @@ +FROM i686/ubuntu + +RUN apt update +RUN apt install -y build-essential wget vim zsh + +RUN mkdir -p /code +WORKDIR /code + +RUN wget https://www.plantation-productions.com/Webster/HighLevelAsm/HLAv2.16/linux.hla.tar.gz --no-check-certificate + +RUN tar -xzvf linux.hla.tar.gz +RUN mv usr/hla /usr/ + +RUN cp /usr/hla/hla /bin +RUN cp /usr/hla/hlacmp /bin +RUN rm -rf usr + +RUN rm linux.hla.tar.gz + +CMD ["/bin/zsh"] diff --git a/assembly/code/helloworld.hla b/assembly/code/helloworld.hla new file mode 100644 index 0000000..a6b6c18 --- /dev/null +++ b/assembly/code/helloworld.hla @@ -0,0 +1,8 @@ +program helloWorld; +#include( "stdlib.hhf" ); + +begin helloWorld; + + stdout.put( "Hello, world", nl ); + +end helloWorld; diff --git a/assembly/start.sh b/assembly/start.sh new file mode 100755 index 0000000..a27c797 --- /dev/null +++ b/assembly/start.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +docker build . -t workspace +docker run --rm -it --mount=type=bind,source="$(pwd)"/code,target=/code workspace