update asm3/4 slides and exercises as well as asm-project
authorChristian Grothoff <christian@grothoff.org>
Thu, 4 Oct 2018 22:13:04 +0000 (00:13 +0200)
committerChristian Grothoff <christian@grothoff.org>
Thu, 4 Oct 2018 22:13:04 +0000 (00:13 +0200)
asm-3-memory/slides/slides-linux-2x2.pdf
asm-3-memory/slides/slides-linux.pdf
asm-3-memory/slides/slides-memory-2x2.pdf
asm-3-memory/slides/slides-memory.pdf
asm-4-codification/exercises/exercises-codification.pdf
asm-4-codification/slides/slides-developmentProcess-2x2.pdf
asm-4-codification/slides/slides-developmentProcess.pdf
asm-project/homework-asm-HS1819.pdf
asm-project/test.sh [new file with mode: 0755]

index cb7216c..baf5db0 100644 (file)
Binary files a/asm-3-memory/slides/slides-linux-2x2.pdf and b/asm-3-memory/slides/slides-linux-2x2.pdf differ
index 962e263..3496de2 100644 (file)
Binary files a/asm-3-memory/slides/slides-linux.pdf and b/asm-3-memory/slides/slides-linux.pdf differ
index d142892..63825a6 100644 (file)
Binary files a/asm-3-memory/slides/slides-memory-2x2.pdf and b/asm-3-memory/slides/slides-memory-2x2.pdf differ
index 14b787f..2d9e249 100644 (file)
Binary files a/asm-3-memory/slides/slides-memory.pdf and b/asm-3-memory/slides/slides-memory.pdf differ
index 8ac2664..a1b97dc 100644 (file)
Binary files a/asm-4-codification/exercises/exercises-codification.pdf and b/asm-4-codification/exercises/exercises-codification.pdf differ
index c5c948d..1061054 100644 (file)
Binary files a/asm-4-codification/slides/slides-developmentProcess-2x2.pdf and b/asm-4-codification/slides/slides-developmentProcess-2x2.pdf differ
index c8f3299..fcf0509 100644 (file)
Binary files a/asm-4-codification/slides/slides-developmentProcess.pdf and b/asm-4-codification/slides/slides-developmentProcess.pdf differ
index c861612..23703b6 100644 (file)
Binary files a/asm-project/homework-asm-HS1819.pdf and b/asm-project/homework-asm-HS1819.pdf differ
diff --git a/asm-project/test.sh b/asm-project/test.sh
new file mode 100755 (executable)
index 0000000..f5013fd
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh
+# This is an example shell script showing how your code will
+# be graded. It compiles _both_ Assembly programs, but only
+# tests ONE of them.  The real grading script will test BOTH.
+# You should extend this script to test the decoder as well.
+# (Testing is part of the job of writing code.)
+# Note that if you pass this script, you will receive at
+# least 50% of the points for the Assembler homework!
+
+# Assemble and link encoder
+nasm -f elf64 -g -F dwarf base32enc.asm -o b32e.o || { echo "Assembly code base32enc.asm failed to compile"; exit 1; }
+ld -o b32e b32e.o || { echo "Object failed to link"; exit 1; }
+# Assemble and link decoder
+nasm -f elf64 -g -F dwarf base32dec.asm -o b32d.o || { echo "Assembly code base32dec.asm failed to compile"; exit 1; }
+ld -o b32d b32d.o || { echo "Object failed to link"; exit 1; }
+
+# run tests
+total=0
+for n in A AA AB bc D13 FOO foxy lalalalalal4242
+do
+  points=1
+  timeout -s SIGKILL 1s echo -n $n | ./b32e > $n.out || { echo "Your 'b32' command failed to run: $?" ; points=0 ; }
+  echo -n $n | base32 > $n.want || { echo "System 'base32' failed to run"; exit 1; }
+  diff -w $n.want $n.out > $n.delta || { echo "Encode failed on $n" ; points=0; }
+  if test $points = 1
+  then
+    echo "Test $n passed"
+    total=`expr $total + $points`
+  fi
+done
+# Output grade
+echo "Final grade: $total/8"
+exit 0