Skip to content

Instantly share code, notes, and snippets.

@ianklatzco
Last active Jun 16, 2016
Embed
What would you like to do?
test if lab2 for ECE220 works. download em into the directory containing your lab2.obj, chmod +x both of them, run "hexGenerator.sh > hex" and "test.sh > test" and then "diff test hex". if you get no output, you're golden.
#!/bin/bash
max=65535
for((i=0;i<=max;i++))
do
printf "%.4X\n" $i
done
#!/bin/bash
max=65535
for((i=0;i<=max;i++))
do
x=$(printf "%.4X\n" $i)
printf "r R5 $x\nc" | lc3sim lab2 | grep "(lc3sim) $x" | cut -d " " -f 2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment