forked from envenomator/agon-ez80asm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7499991
commit f4a2270
Showing
81 changed files
with
386 additions
and
463 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
All (1) files assembled succesfully |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
# Positive test - assembler needs to pass all tests in all subfolders | ||
# return 0 on succesfull tests (all passed) | ||
# return 1 on issue during test (one or more tests didn't pass correctly) | ||
# return 2 on error in test SETUP | ||
# | ||
|
||
test_number=0 | ||
tests_successfull=0 | ||
|
||
cd tests | ||
rm -f *.bin | ||
for FILE in *; do | ||
if [ -f "$FILE" ]; then | ||
test_number=$((test_number+1)) | ||
../$ASMBIN $FILE -b FF > ../asm.output | ||
if [ $? -eq 1 ]; then | ||
echo "Error in" \'$FILE\' | ||
else | ||
tests_successfull=$((tests_successfull+1)) | ||
fi | ||
fi | ||
done | ||
rm -f *.bin | ||
cd .. | ||
|
||
rm -f asm.output | ||
if [ $test_number -eq $tests_successfull ]; then | ||
echo "All ($test_number) files assembled succesfully" | ||
exit 0 | ||
else | ||
exit 1 | ||
fi | ||
exit 0 |
16 changes: 8 additions & 8 deletions
16
tests/conditional/test.s → tests/Conditional_asm/tests/basic_ifelse.s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
TEST: EQU 1 | ||
|
||
.if TEST | ||
ld a,1 | ||
.else | ||
ld a,2 | ||
.endif | ||
|
||
TEST: EQU 1 | ||
|
||
.if TEST | ||
ld a,1 | ||
.else | ||
ld a,2 | ||
.endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
# Negative test - assembler needs to fail tests in all subfolders | ||
# return 0 on succesfull test (all failed) | ||
# return 1 on issue during test (one or more tests didn't fail correctly) | ||
# return 2 on error in test SETUP | ||
# | ||
|
||
test_number=0 | ||
negtest_failed_successfull=0 | ||
|
||
cd tests | ||
rm -f *.bin | ||
for FILE in *; do | ||
if [ -f "$FILE" ]; then | ||
test_number=$((test_number+1)) | ||
../$ASMBIN $FILE -b FF > ../asm.output | ||
if [ $? -eq 0 ]; then | ||
echo "Failed to detect error in" \'$FILE\' | ||
else | ||
negtest_failed_successfull=$((negtest_failed_successfull+1)) | ||
fi | ||
fi | ||
done | ||
rm -f *.bin | ||
cd .. | ||
|
||
rm -f asm.output | ||
if [ $test_number -eq $negtest_failed_successfull ]; then | ||
echo "Detected all ($test_number) errors succesfully" | ||
exit 0 | ||
else | ||
exit 1 | ||
fi | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Detected all errors succesfully | ||
Detected all (5) errors succesfully |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
# Negative test - assembler needs to fail tests in all subfolders | ||
# return 0 on succesfull test (all failed) | ||
# return 1 on issue during test (one or more tests didn't fail correctly) | ||
# return 2 on error in test SETUP | ||
# | ||
|
||
test_number=0 | ||
negtest_failed_successfull=0 | ||
|
||
cd tests | ||
rm -f *.bin | ||
for FILE in *; do | ||
if [ -f "$FILE" ]; then | ||
test_number=$((test_number+1)) | ||
../$ASMBIN $FILE -b FF > ../asm.output | ||
if [ $? -eq 0 ]; then | ||
echo "Failed to detect error in" \'$FILE\' | ||
else | ||
negtest_failed_successfull=$((negtest_failed_successfull+1)) | ||
fi | ||
fi | ||
done | ||
rm -f *.bin | ||
cd .. | ||
|
||
rm -f asm.output | ||
if [ $test_number -eq $negtest_failed_successfull ]; then | ||
echo "Detected all ($test_number) errors succesfully" | ||
exit 0 | ||
else | ||
exit 1 | ||
fi | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Failed to detect error in 'illegal_shift_left.s' | ||
Failed to detect error in 'illegal_shift_right.s' | ||
Failed to detect error in 'illegal_unary_times.s' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
# Negative test - assembler needs to fail tests in all subfolders | ||
# return 0 on succesfull test (all failed) | ||
# return 1 on issue during test (one or more tests didn't fail correctly) | ||
# return 2 on error in test SETUP | ||
# | ||
|
||
test_number=0 | ||
negtest_failed_successfull=0 | ||
|
||
cd tests | ||
rm -f *.bin | ||
for FILE in *; do | ||
if [ -f "$FILE" ]; then | ||
test_number=$((test_number+1)) | ||
../$ASMBIN $FILE -b FF > ../asm.output | ||
if [ $? -eq 0 ]; then | ||
echo "Failed to detect error in" \'$FILE\' | ||
else | ||
negtest_failed_successfull=$((negtest_failed_successfull+1)) | ||
fi | ||
fi | ||
done | ||
rm -f *.bin | ||
cd .. | ||
|
||
rm -f asm.output | ||
if [ $test_number -eq $negtest_failed_successfull ]; then | ||
echo "Detected all ($test_number) errors succesfully" | ||
exit 0 | ||
else | ||
exit 1 | ||
fi | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ld a, 8 < 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ld a, 8 > 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
All (11) files assembled succesfully |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
# Positive test - assembler needs to pass all tests in all subfolders | ||
# return 0 on succesfull tests (all passed) | ||
# return 1 on issue during test (one or more tests didn't pass correctly) | ||
# return 2 on error in test SETUP | ||
# | ||
|
||
test_number=0 | ||
tests_successfull=0 | ||
|
||
cd tests | ||
rm -f *.bin | ||
for FILE in *; do | ||
if [ -f "$FILE" ]; then | ||
test_number=$((test_number+1)) | ||
../$ASMBIN $FILE -b FF > ../asm.output | ||
if [ $? -eq 1 ]; then | ||
echo "Error in" \'$FILE\' | ||
else | ||
tests_successfull=$((tests_successfull+1)) | ||
fi | ||
fi | ||
done | ||
rm -f *.bin | ||
cd .. | ||
|
||
rm -f asm.output | ||
if [ $test_number -eq $tests_successfull ]; then | ||
echo "All ($test_number) files assembled succesfully" | ||
exit 0 | ||
else | ||
exit 1 | ||
fi | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
back: | ||
ld a,b | ||
jp back | ||
newlabel: | ||
ld a,b | ||
jp back |
Oops, something went wrong.