Adds test script
This commit is contained in:
parent
f15f5e6906
commit
8985c2a65a
|
@ -79,13 +79,13 @@ Counting number of instructions by `wc -l $file.hack`
|
||||||
|
|
||||||
### Without Symbols
|
### Without Symbols
|
||||||
|
|
||||||
- [ ] `MaxL.asm`
|
- [x] `MaxL.asm`
|
||||||
- [ ] `RectL.asm`
|
- [x] `RectL.asm`
|
||||||
- [ ] `PongL.asm`
|
- [x] `PongL.asm`
|
||||||
|
- [x] `Add.asm`
|
||||||
|
|
||||||
### Symbolic Programs
|
### Symbolic Programs
|
||||||
|
|
||||||
- [ ] `Add.asm`
|
|
||||||
- [ ] `Max.asm`
|
- [ ] `Max.asm`
|
||||||
- [ ] `Rect.asm`
|
- [ ] `Rect.asm`
|
||||||
- [ ] `Pong.asm`
|
- [ ] `Pong.asm`
|
||||||
|
|
|
@ -103,10 +103,10 @@ class Parser
|
||||||
end
|
end
|
||||||
|
|
||||||
def comp
|
def comp
|
||||||
if dest and jump
|
if dest && jump
|
||||||
line.split('=').last.split(';').first
|
line.split('=').last.split(';').first
|
||||||
elsif dest
|
elsif dest
|
||||||
line.split('=').first
|
line.split('=').last
|
||||||
elsif jump
|
elsif jump
|
||||||
line.split(';').first
|
line.split(';').first
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,19 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
pushd ../projects/06/add
|
diff ../projects/06/add/Add.hack <(ruby assembler.rb ../projects/06/add/Add.asm)
|
||||||
../../../tools/Assembler.sh Add.asm
|
diff ../projects/06/max/MaxL.hack <(ruby assembler.rb ../projects/06/max/MaxL.asm)
|
||||||
popd
|
diff ../projects/06/rect/RectL.hack <(ruby assembler.rb ../projects/06/rect/RectL.asm)
|
||||||
|
diff ../projects/06/pong/PongL.hack <(ruby assembler.rb ../projects/06/pong/PongL.asm)
|
||||||
pushd ../projects/06/max
|
|
||||||
../../../tools/Assembler.sh Max.asm
|
|
||||||
../../../tools/Assembler.sh MaxL.asm
|
|
||||||
popd
|
|
||||||
|
|
||||||
pushd ../projects/06/rect
|
|
||||||
../../../tools/Assembler.sh Rect.asm
|
|
||||||
../../../tools/Assembler.sh RectL.asm
|
|
||||||
popd
|
|
||||||
|
|
||||||
pushd ../projects/06/pong
|
|
||||||
../../../tools/Assembler.sh Pong.asm
|
|
||||||
../../../tools/Assembler.sh PongL.asm
|
|
||||||
popd
|
|
||||||
|
|
Loading…
Reference in New Issue