Unit tests for 45gs02.
61 files changed, 678 insertions(+), 60 deletions(-)

A => jasm/unit_tests/results/test_instruction_data_label_offsets_45gs02.bin
A => jasm/unit_tests/results/test_instruction_data_label_sizes_45gs02.bin
M jasm/unit_tests/test_addressing_mode_branch_too_long_1_65ce02.asm
M jasm/unit_tests/test_addressing_mode_branch_too_long_2_65ce02.asm
M jasm/unit_tests/test_addressing_mode_expected_x_in_indirect_65ce02.asm
M jasm/unit_tests/test_addressing_mode_expected_y_or_z_in_indirect_65ce02.asm
M jasm/unit_tests/test_addressing_mode_immediate_value_too_large_65ce02.asm
M jasm/unit_tests/test_addressing_mode_immediate_value_too_small_65ce02.asm
M jasm/unit_tests/test_addressing_mode_is_illegal_65ce02.asm
M jasm/unit_tests/test_addressing_mode_needs_bit_size_argument_65c02.asm
M jasm/unit_tests/test_addressing_mode_needs_byte_argument_1_6502.asm
M jasm/unit_tests/test_addressing_mode_needs_byte_argument_2_6502.asm
M jasm/unit_tests/test_addressing_mode_needs_byte_argument_3_65c02.asm
M jasm/unit_tests/test_addressing_mode_needs_integer_argument_1_6502.asm
M jasm/unit_tests/test_addressing_mode_needs_integer_argument_2_65c02.asm
M jasm/unit_tests/test_addressing_mode_needs_integer_argument_3_65c02.asm
M jasm/unit_tests/test_addressing_mode_needs_integer_argument_4_65c02.asm
M jasm/unit_tests/test_addressing_mode_needs_positive_argument_1_6502.asm
M jasm/unit_tests/test_addressing_mode_needs_positive_argument_2_65c02.asm
M jasm/unit_tests/test_addressing_mode_needs_positive_argument_3_65c02.asm
M jasm/unit_tests/test_addressing_mode_needs_word_size_argument_1_6502.asm
M jasm/unit_tests/test_addressing_mode_needs_word_size_argument_2_6502.asm
M jasm/unit_tests/test_generate_data_in_instruction_1_6502.asm
M jasm/unit_tests/test_instruction_data_global_label_6502.asm
M jasm/unit_tests/test_instruction_data_label_cant_have_implied_addressing_mode_6502.asm
M jasm/unit_tests/test_instruction_data_label_for_wrong_argument_type_3_65c02.asm
M jasm/unit_tests/test_instruction_data_label_has_lo_hi_properties_6502.asm
A => jasm/unit_tests/test_instruction_data_label_offsets_45gs02.asm
M jasm/unit_tests/test_instruction_data_label_offsets_6502.asm
M jasm/unit_tests/test_instruction_data_label_offsets_65ce02.asm
A => jasm/unit_tests/test_instruction_data_label_sizes_45gs02.asm
M jasm/unit_tests/test_instruction_data_label_sizes_6502.asm
M jasm/unit_tests/test_instruction_data_label_sizes_65ce02.asm
M jasm/unit_tests/test_instruction_data_label_with_export_6502.asm
M jasm/unit_tests/test_instruction_data_label_with_local_export_6502.asm
M jasm/unit_tests/test_instruction_data_local_label_6502.asm
M jasm/unit_tests/test_instruction_ends_at_newline_1_6502.asm
M jasm/unit_tests/test_instruction_ends_at_newline_2_6502.asm
M jasm/unit_tests/test_instruction_names_can_be_used_in_local_variables_6502.asm
M jasm/unit_tests/test_instructions_must_be_in_code_sections_1_6502.asm
M jasm/unit_tests/test_instructions_must_be_in_code_sections_2_6502.asm
M jasm/unit_tests/test_pseudo_instructions_for_branching_6502.asm
M jasm/unit_tests/test_pseudo_instructions_for_branching_65ce02.asm
M jasm/unit_tests/test_pseudo_instructions_for_incrementing_65c02.asm
M jasm/unit_tests/test_pseudo_instructions_in_standard_mode_6502.asm
M jasm/unit_tests/test_pseudo_instructions_in_standard_mode_65c02.asm
M jasm/unit_tests/test_pseudo_instructions_in_standard_mode_65ce02.asm
M jasm/unit_tests/test_pseudo_instructions_use_names_in_standard_mode_6502.asm
M jasm/unit_tests/test_register_names_can_be_used_in_local_names_6502.asm
M jasm/unit_tests/test_register_names_cant_be_used_as_global_variables_6502.asm
M jasm/unit_tests/test_subroutine_call_6502.asm
M jasm/unit_tests/test_subroutine_call_must_be_in_code_section_6502.asm
M jasm/unit_tests/test_subroutine_call_negative_argument_6502.asm
M jasm/unit_tests/test_subroutine_call_recursive_data_generation_6502.asm
M jasm/unit_tests/test_subroutine_call_too_large_argument_6502.asm
M jasm/unit_tests/test_subroutine_call_with_arguments_6502.asm
M jasm/unit_tests/test_subroutine_falls_through_1_6502.asm
M jasm/unit_tests/test_subroutine_falls_through_2_6502.asm
M jasm/unit_tests/test_subroutine_falls_through_3_6502.asm
M jasm/unit_tests/test_subroutine_falls_through_4_6502.asm
M jasm/unit_tests/test_subroutine_falls_through_5_65ce02.asm
A => jasm/unit_tests/results/test_instruction_data_label_offsets_45gs02.bin +1 -0
@@ 0,0 1,1 @@ 
+rBBeBBmBBrBBr2BB%BB-BB2BB2BBBBBBBBBBDBBTBB$BB,BBBBBBBBBBBBBBBBRBBEBBMBBRBBRBBBBBBBBBBBBBBBBBBBBBBBBBBBBFBBVBBNBB^BB	BBBB
BBBBBB&BB6BB.BB>BBfBBvBBnBB~BBBBBBBBBBBBBBBBBB
  No newline at end of file

          
A => jasm/unit_tests/results/test_instruction_data_label_sizes_45gs02.bin +1 -0
@@ 0,0 1,1 @@ 
+rBBeBBm4BBrBBr2BB%BB-4BB2BB2BBBBBB4BB4BBDBBTBB$BB,4BBBB4BBBBBBBBBB4BB4RBBEBBM4BBRBBRBBBBBB4BB4BBBBBB4BB4BB4BBBBBBBBBBFBBVBBN4BB^4BB	BBBB
4BBBBBB&BB6BB.4BB>4BBfBBvBBn4BB~4BBBB4BBBBBBBB4BBBBBB
  No newline at end of file

          
M jasm/unit_tests/test_addressing_mode_branch_too_long_1_65ce02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65ce02 [-v0]
+// assembler command line arguments: 65ce02 45gs02 [-v0]
 
 section code, "main", $8000
 {

          
M jasm/unit_tests/test_addressing_mode_branch_too_long_2_65ce02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65ce02 [-v0]
+// assembler command line arguments: 65ce02 45gs02 [-v0]
 
 section code, "main", $1000
 {

          
M jasm/unit_tests/test_addressing_mode_expected_x_in_indirect_65ce02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65ce02 [-v0 -hla]
+// assembler command line arguments: 65ce02 45gs02 [-v0 -hla]
 
 section code, "main", $8000 {
 	lda (55,q

          
M jasm/unit_tests/test_addressing_mode_expected_y_or_z_in_indirect_65ce02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65ce02 [-v0 -hla]
+// assembler command line arguments: 65ce02 45gs02 [-v0 -hla]
 
 section code, "main", $8000 {
 	lda (55),1

          
M jasm/unit_tests/test_addressing_mode_immediate_value_too_large_65ce02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65ce02 [-v0]
+// assembler command line arguments: 65ce02 45gs02 [-v0]
 
 section code, "main", $1000
 {

          
M jasm/unit_tests/test_addressing_mode_immediate_value_too_small_65ce02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65ce02 [-v0]
+// assembler command line arguments: 65ce02 45gs02 [-v0]
 
 section code, "main", $1000
 {

          
M jasm/unit_tests/test_addressing_mode_is_illegal_65ce02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65ce02 [-v0 -hla]
+// assembler command line arguments: 65ce02 45gs02 [-v0 -hla]
 
 section code, "main", $8000
 {

          
M jasm/unit_tests/test_addressing_mode_needs_bit_size_argument_65c02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 65c02 65ce02 45gs02 [-v0 -hla]
 
 section code, "main", $8000 {
 	rmb 8,0

          
M jasm/unit_tests/test_addressing_mode_needs_byte_argument_1_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0 -hla]
 
 section code, "main", $8000 {
 	lda #256

          
M jasm/unit_tests/test_addressing_mode_needs_byte_argument_2_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0 -hla]
 
 section code, "main", $8000 {
 	ldx #0

          
M jasm/unit_tests/test_addressing_mode_needs_byte_argument_3_65c02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 65c02 65ce02 45gs02 [-v0 -hla]
 
 section code, "main", $8000 {
 	rmb 0, 256

          
M jasm/unit_tests/test_addressing_mode_needs_integer_argument_1_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0 -hla]
 
 section code, "main", $1000, $2000 {
 	lda #5.5

          
M jasm/unit_tests/test_addressing_mode_needs_integer_argument_2_65c02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65c02 65ce02 [-v0]
+// assembler command line arguments: 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $8000 {
 	smb 0, "H"

          
M jasm/unit_tests/test_addressing_mode_needs_integer_argument_3_65c02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65c02 65ce02 [-v0]
+// assembler command line arguments: 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $8000 {
 	bbr 0, 0, "H"

          
M jasm/unit_tests/test_addressing_mode_needs_integer_argument_4_65c02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65c02 65ce02 [-v0]
+// assembler command line arguments: 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $8000 {
 	smb "H", 0

          
M jasm/unit_tests/test_addressing_mode_needs_positive_argument_1_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0 -hla]
 
 section code, "main", $8000 {
 	lda #0

          
M jasm/unit_tests/test_addressing_mode_needs_positive_argument_2_65c02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65c02 65ce02 [-v0]
+// assembler command line arguments: 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $8000 {
 	smb 0, -1

          
M jasm/unit_tests/test_addressing_mode_needs_positive_argument_3_65c02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65c02 65ce02 [-v0]
+// assembler command line arguments: 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $8000 {
 	smb -1, 0

          
M jasm/unit_tests/test_addressing_mode_needs_word_size_argument_1_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0 -hla]
 
 section code, "main", $8000 {
 	ldx #0

          
M jasm/unit_tests/test_addressing_mode_needs_word_size_argument_2_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0 -hla]
 
 section code, "main", $8000 {
 	jmp ($c0000)

          
M jasm/unit_tests/test_generate_data_in_instruction_1_6502.asm +2 -2
@@ 1,10 1,10 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $8000
 {
 	macro generate()
 	{
-		nop
+		inx
 		return 0
 	}
 	lda #generate()

          
M jasm/unit_tests/test_instruction_data_global_label_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0 -hla]
 
 section code, "main", $8000
 {

          
M jasm/unit_tests/test_instruction_data_label_cant_have_implied_addressing_mode_6502.asm +2 -2
@@ 1,7 1,7 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0 -hla]
 
 section code, "main", $8000
 {
-	nop bulle:
+	inx bulle:
 	rts
 }

          
M jasm/unit_tests/test_instruction_data_label_for_wrong_argument_type_3_65c02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 65c02 65ce02 45gs02 [-v0 -hla]
 
 section code, "main", $8000 {
 	bbr .lbl:0, 0, *

          
M jasm/unit_tests/test_instruction_data_label_has_lo_hi_properties_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $8000
 {

          
A => jasm/unit_tests/test_instruction_data_label_offsets_45gs02.asm +309 -0
@@ 0,0 1,309 @@ 
+// assembler command line arguments: 45gs02 [-v0]
+
+const address nn = $01
+const address nnnn = $0302
+
+section code, "main", $1000
+{
+	// 45gs02 specific
+	{
+		static_assert(.lbl == * + 2, "wrong instruction data offset")
+		adc .lbl:[nn],z		// ea72
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		adcq .lbl:nn		// 424265
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		adcq .lbl:nnnn		// 42426d
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		adcq .lbl:(nn)		// 424272
+	}
+	{
+		static_assert(.lbl == * + 4, "wrong instruction data offset")
+		adcq .lbl:[nn]		// 4242ea72
+	}
+	{
+		static_assert(.lbl == * + 2, "wrong instruction data offset")
+		and .lbl:[nn],z		// ea32
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		andq .lbl:nn		// 424225
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		andq .lbl:nnnn		// 42422d
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		andq .lbl:(nn)		// 424232
+	}
+	{
+		static_assert(.lbl == * + 4, "wrong instruction data offset")
+		andq .lbl:[nn]		// 4242ea32
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		aslq .lbl:nn		// 424206
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		aslq .lbl:nn,x		// 424216
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		aslq .lbl:nnnn		// 42420e
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		aslq .lbl:nnnn,x	// 42421e
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		asrq .lbl:nn		// 424244
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		asrq .lbl:nn,x		// 424254
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		bitq .lbl:nn		// 424224
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		bitq .lbl:nnnn		// 42422c
+	}
+	{
+		static_assert(.lbl == * + 2, "wrong instruction data offset")
+		cmp .lbl:[nn],z		// ead2
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		cmpq .lbl:nn		// 4242c5
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		cmpq .lbl:nnnn		// 4242cd
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		cmpq .lbl:(nn)		// 4242d2
+	}
+	{
+		static_assert(.lbl == * + 4, "wrong instruction data offset")
+		cmpq .lbl:[nn]		// 4242ead2
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		deq .lbl:nn			// 4242c6
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		deq .lbl:nn,x		// 4242d6
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		deq .lbl:nnnn		// 4242ce
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		deq .lbl:nnnn,x		// 4242de
+	}
+	{
+		static_assert(.lbl == * + 2, "wrong instruction data offset")
+		eor .lbl:[nn],z		// ea52
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		eorq .lbl:nn		// 424245
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		eorq .lbl:nnnn		// 42424d
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		eorq .lbl:(nn)		// 424252
+	}
+	{
+		static_assert(.lbl == * + 4, "wrong instruction data offset")
+		eorq .lbl:[nn]		// 4242ea52
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		inq .lbl:nn			// 4242e6
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		inq .lbl:nn,x		// 4242f6
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		inq .lbl:nnnn		// 4242ee
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		inq .lbl:nnnn,x		// 4242fe
+	}
+	{
+		static_assert(.lbl == * + 2, "wrong instruction data offset")
+		lda .lbl:[nn],z		// eab2
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		ldq .lbl:nn			// 4242a5
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		ldq .lbl:nn,x		// 4242b5
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		ldq .lbl:nnnn		// 4242ad
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		ldq .lbl:nnnn,x		// 4242bd
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		ldq .lbl:nnnn,y		// 4242b9
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		ldq .lbl:(nn)		// 4242b2
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		ldq .lbl:(nn),y		// 4242b1
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		ldq .lbl:(nn,sp),y	// 4242e2
+	}
+	{
+		static_assert(.lbl == * + 4, "wrong instruction data offset")
+		ldq .lbl:[nn]		// 4242eab2
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		lsrq .lbl:nn		// 424246
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		lsrq .lbl:nn,x		// 424256
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		lsrq .lbl:nnnn		// 42424e
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		lsrq .lbl:nnnn,x	// 42425e
+	}
+	{
+		static_assert(.lbl == * + 2, "wrong instruction data offset")
+		ora .lbl:[nn],z		// ea12
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		orq .lbl:#nn		// 424209
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		orq .lbl:nn			// 424205
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		orq .lbl:nnnn		// 42420d
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		orq .lbl:(nn)		// 424212
+	}
+	{
+		static_assert(.lbl == * + 4, "wrong instruction data offset")
+		orq .lbl:[nn]		// 4242ea12
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		rolq .lbl:nn		// 424226
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		rolq .lbl:nn,x		// 424236
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		rolq .lbl:nnnn		// 42422e
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		rolq .lbl:nnnn,x	// 42423e
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		rorq .lbl:nn		// 424266
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		rorq .lbl:nn,x		// 424276
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		rorq .lbl:nnnn		// 42426e
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		rorq .lbl:nnnn,x	// 42427e
+	}
+	{
+		static_assert(.lbl == * + 2, "wrong instruction data offset")
+		sbc .lbl:[nn],z		// eaf2
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		sbcq .lbl:nn		// 4242e5
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		sbcq .lbl:nnnn		// 4242ed
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		sbcq .lbl:(nn)		// 4242f2
+	}
+	{
+		static_assert(.lbl == * + 4, "wrong instruction data offset")
+		sbcq .lbl:[nn]		// 4242eaf2
+	}
+	{
+		static_assert(.lbl == * + 2, "wrong instruction data offset")
+		sta .lbl:[nn],z		// ea92
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		stq .lbl:nn			// 424285
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		stq .lbl:nnnn		// 42428d
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		stq .lbl:(nn)		// 424292
+	}
+	{
+		static_assert(.lbl == * + 3, "wrong instruction data offset")
+		stq .lbl:(nn,sp),y	// 424282
+	}
+	{
+		static_assert(.lbl == * + 4, "wrong instruction data offset")
+		stq .lbl:[nn]		// 4242ea92
+	}
+}

          
M jasm/unit_tests/test_instruction_data_label_offsets_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 const n = 2
 const nn = $1234

          
M jasm/unit_tests/test_instruction_data_label_offsets_65ce02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65ce02 [-v0]
+// assembler command line arguments: 65ce02 45gs02 [-v0]
 
 const n = 2
 const nn = $1234

          
A => jasm/unit_tests/test_instruction_data_label_sizes_45gs02.asm +307 -0
@@ 0,0 1,307 @@ 
+// assembler command line arguments: 45gs02 [-v0]
+
+const nn = 2
+const nnnn = $1234
+
+section code,	 "main",	 $8000 {
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		adc .lbl:[nn],z		// ea72
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		adcq .lbl:nn		// 424265
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		adcq .lbl:nnnn		// 42426d
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		adcq .lbl:(nn)		// 424272
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		adcq .lbl:[nn]		// 4242ea72
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		and .lbl:[nn],z		// ea32
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		andq .lbl:nn		// 424225
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		andq .lbl:nnnn		// 42422d
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		andq .lbl:(nn)		// 424232
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		andq .lbl:[nn]		// 4242ea32
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		aslq .lbl:nn		// 424206
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		aslq .lbl:nn,x		// 424216
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		aslq .lbl:nnnn		// 42420e
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		aslq .lbl:nnnn,x	// 42421e
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		asrq .lbl:nn		// 424244
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		asrq .lbl:nn,x		// 424254
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		bitq .lbl:nn		// 424224
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		bitq .lbl:nnnn		// 42422c
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		cmp .lbl:[nn],z		// ead2
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		cmpq .lbl:nn		// 4242c5
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		cmpq .lbl:nnnn		// 4242cd
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		cmpq .lbl:(nn)		// 4242d2
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		cmpq .lbl:[nn]		// 4242ead2
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		deq .lbl:nn			// 4242c6
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		deq .lbl:nn,x		// 4242d6
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		deq .lbl:nnnn		// 4242ce
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		deq .lbl:nnnn,x		// 4242de
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		eor .lbl:[nn],z		// ea52
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		eorq .lbl:nn		// 424245
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		eorq .lbl:nnnn		// 42424d
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		eorq .lbl:(nn)		// 424252
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		eorq .lbl:[nn]		// 4242ea52
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		inq .lbl:nn			// 4242e6
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		inq .lbl:nn,x		// 4242f6
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		inq .lbl:nnnn		// 4242ee
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		inq .lbl:nnnn,x		// 4242fe
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		lda .lbl:[nn],z		// eab2
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		ldq .lbl:nn			// 4242a5
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		ldq .lbl:nn,x		// 4242b5
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		ldq .lbl:nnnn		// 4242ad
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		ldq .lbl:nnnn,x		// 4242bd
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		ldq .lbl:nnnn,y		// 4242b9
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		ldq .lbl:(nn)		// 4242b2
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		ldq .lbl:(nn),y		// 4242b1
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		ldq .lbl:(nn,sp),y	// 4242e2
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		ldq .lbl:[nn]		// 4242eab2
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		lsrq .lbl:nn		// 424246
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		lsrq .lbl:nn,x		// 424256
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		lsrq .lbl:nnnn		// 42424e
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		lsrq .lbl:nnnn,x	// 42425e
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		ora .lbl:[nn],z		// ea12
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		orq .lbl:#nn		// 424209
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		orq .lbl:nn			// 424205
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		orq .lbl:nnnn		// 42420d
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		orq .lbl:(nn)		// 424212
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		orq .lbl:[nn]		// 4242ea12
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		rolq .lbl:nn		// 424226
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		rolq .lbl:nn,x		// 424236
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		rolq .lbl:nnnn		// 42422e
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		rolq .lbl:nnnn,x	// 42423e
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		rorq .lbl:nn		// 424266
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		rorq .lbl:nn,x		// 424276
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		rorq .lbl:nnnn		// 42426e
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		rorq .lbl:nnnn,x	// 42427e
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		sbc .lbl:[nn],z		// eaf2
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		sbcq .lbl:nn		// 4242e5
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		sbcq .lbl:nnnn		// 4242ed
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		sbcq .lbl:(nn)		// 4242f2
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		sbcq .lbl:[nn]		// 4242eaf2
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		sta .lbl:[nn],z		// ea92
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		stq .lbl:nn			// 424285
+	}
+	{
+		static_assert(sizeof(.lbl) == 2, "wrong instruction data size")
+		stq .lbl:nnnn		// 42428d
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		stq .lbl:(nn)		// 424292
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		stq .lbl:(nn,sp),y	// 424282
+	}
+	{
+		static_assert(sizeof(.lbl) == 1, "wrong instruction data size")
+		stq .lbl:[nn]		// 4242ea92
+	}
+}

          
M jasm/unit_tests/test_instruction_data_label_sizes_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 const n = 2
 const nn = $1234

          
M jasm/unit_tests/test_instruction_data_label_sizes_65ce02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65ce02 [-v0]
+// assembler command line arguments: 65ce02 45gs02 [-v0]
 
 const n = 2
 const nn = $1234

          
M jasm/unit_tests/test_instruction_data_label_with_export_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $8000
 {

          
M jasm/unit_tests/test_instruction_data_label_with_local_export_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $8000
 {

          
M jasm/unit_tests/test_instruction_data_local_label_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0 -hla]
 
 section code, "main", $8000
 {

          
M jasm/unit_tests/test_instruction_ends_at_newline_1_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0 -hla]
 
 var a = 1
 

          
M jasm/unit_tests/test_instruction_ends_at_newline_2_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0 -hla]
 
 var a = 1
 

          
M jasm/unit_tests/test_instruction_names_can_be_used_in_local_variables_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $1000
 {

          
M jasm/unit_tests/test_instructions_must_be_in_code_sections_1_6502.asm +1 -1
@@ 1,3 1,3 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0 -hla]
 
 rol

          
M jasm/unit_tests/test_instructions_must_be_in_code_sections_2_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0 -hla]
 
 section bss, "data", $8000 {
 	rol

          
M jasm/unit_tests/test_pseudo_instructions_for_branching_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0 -pi]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0 -pi]
 
 section code, "main", $8000
 {

          
M jasm/unit_tests/test_pseudo_instructions_for_branching_65ce02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65ce02 [-v0 -pi]
+// assembler command line arguments: 65ce02 45gs02 [-v0 -pi]
 
 section code, "main", $8000
 {

          
M jasm/unit_tests/test_pseudo_instructions_for_incrementing_65c02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65c02 65ce02 [-v0 -pi]
+// assembler command line arguments: 65c02 65ce02 45gs02 [-v0 -pi]
 
 section code, "main", $8000
 {

          
M jasm/unit_tests/test_pseudo_instructions_in_standard_mode_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $8000
 {

          
M jasm/unit_tests/test_pseudo_instructions_in_standard_mode_65c02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65c02 65ce02 [-v0]
+// assembler command line arguments: 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $8000
 {

          
M jasm/unit_tests/test_pseudo_instructions_in_standard_mode_65ce02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65ce02 [-v0]
+// assembler command line arguments: 65ce02 45gs02 [-v0]
 
 section code, "main", $8000
 {

          
M jasm/unit_tests/test_pseudo_instructions_use_names_in_standard_mode_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $8000
 {

          
M jasm/unit_tests/test_register_names_can_be_used_in_local_names_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $1000
 {

          
M jasm/unit_tests/test_register_names_cant_be_used_as_global_variables_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $1000
 {

          
M jasm/unit_tests/test_subroutine_call_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $8000, $9000
 {

          
M jasm/unit_tests/test_subroutine_call_must_be_in_code_section_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 test()
 

          
M jasm/unit_tests/test_subroutine_call_negative_argument_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", -4, $9000
 {

          
M jasm/unit_tests/test_subroutine_call_recursive_data_generation_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $8000, $9000
 {

          
M jasm/unit_tests/test_subroutine_call_too_large_argument_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $fffd
 {

          
M jasm/unit_tests/test_subroutine_call_with_arguments_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v0]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v0]
 
 section code, "main", $8000
 {

          
M jasm/unit_tests/test_subroutine_falls_through_1_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v2 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v2 -hla]
 
 section code, "main", $8000 {
 

          
M jasm/unit_tests/test_subroutine_falls_through_2_6502.asm +2 -2
@@ 1,10 1,10 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v2 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v2 -hla]
 
 section code, "main", $8000 {
 
 	subroutine test
 	{
-		nop
+		inx
 	}
 
 	rts

          
M jasm/unit_tests/test_subroutine_falls_through_3_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v2 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v2 -hla]
 
 section code, "main", $8000 {
 

          
M jasm/unit_tests/test_subroutine_falls_through_4_6502.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 6502 65c02 65ce02 [-v2 -hla]
+// assembler command line arguments: 6502 65c02 65ce02 45gs02 [-v2 -hla]
 
 section code, "main", $8000 {
 

          
M jasm/unit_tests/test_subroutine_falls_through_5_65ce02.asm +1 -1
@@ 1,4 1,4 @@ 
-// assembler command line arguments: 65ce02 [-v2 -hla]
+// assembler command line arguments: 65ce02 45gs02 [-v2 -hla]
 
 section code, "main", $8000 {