# This file tests all of the error messages! ...or maybe just some. # Section's limit exceeded. # This *will not* cause the error... range not_too_small 0 20 # range name start_address last_address data "This is not an error!" # String is 21 bytes, addresses 0 - 20 # This *will* cause the error... section too_small 0 20 # section name start_address size_of_section data "Let's cause an error!" # String is 21 bytes, addresses 0 - 20 # This subsequent error should not be reported: data "This shouldn't be reported." goto $0000 # This should not cause the error: data "This is some text!" # This again should cause the error: data "Error again!" # No more section errors... range large $0000 $FFFF # Section already defined. section not_too_small 0 21 # No error for identical definitions. section stuff $0000 $1000 section stuff $0000 $2000 # Null sections (which should work until data is added) range null_section $1000 $0FFF first; data "w" section zero_size $2000 $0000 second; data 'x' # section operand errors section no_error $1000 0 section one $1000 -1 range two $1000 $0FFE range not_an_error $1000 $0FFF section three $F000 $1001 range not_an_error_either $F000 $FFFF range error_two $F000 $10000 section negative first - second 100 goto $FFF0 # this should work, despite an invalid section. # Relative section address error: range too_far some_label $100 range cool_no_error $FFF0 $FFFF some_label; data "whatever" jp cool_no_error # Multiple errors... section whateverthe -$1000 $11001 goto $10000; data '!' # Valid only in invaid segments. data 'yes' # ...but this won't fly. section not_yet_defined section not_yet_defined $0000 $10000 # Address not in section. section silly $1000 $1000; goto $4000 # data statement requires numbers in the form of... data +55 -9876 data some_label # Incorrect number of operands for directive. section wherever $4400 # Error generated elsewhere... jp somewhere else # Instruction of form 'egho' not found. jp [hl] # I hate this label name! hateful.yes.no suck..it # Label is also at namespace better this_again this_again