
;  GNU C 2.7.2 [AL 1.1, MM 40] RISC NEWS-OS compiled by CC

;  Cc1 defaults:
;  -mmemcpy

;  Cc1 arguments (-G value = 0, Cpu = 3000, ISA = 1):
;  -quiet -dumpbase -O2 -Wall -o

gcc2_compiled.:
__gnu_compiled_c:
	.global	m6502_op_table
	.code
	.align	2
m6502_op_table:
	.word	m6502op_BRK_IMPLIED
	.byte	0
	.byte	7
	.half	407
	.word	m6502op_ORA_ADDRESS
	.byte	7
	.byte	6
	.half	1398
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ORA_ADDRESS
	.byte	4
	.byte	3
	.half	1428
	.word	m6502op_ASL_ADDRESS
	.byte	4
	.byte	5
	.half	275
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_PHP_IMPLIED
	.byte	0
	.byte	3
	.half	1468
	.word	m6502op_ORA_IMMEDIATE
	.byte	2
	.byte	2
	.half	1384
	.word	m6502op_ASL_ACCUMULATOR
	.byte	1
	.byte	2
	.half	259
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ORA_ADDRESS
	.byte	9
	.byte	4
	.half	1341
	.word	m6502op_ASL_ADDRESS
	.byte	9
	.byte	6
	.half	231
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_BPL_ADDRESS
	.byte	3
	.byte	2
	.half	394
	.word	m6502op_ORA_ADDRESS
	.byte	8
	.byte	5
	.half	1413
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ORA_ADDRESS
	.byte	5
	.byte	4
	.half	1441
	.word	m6502op_ASL_ADDRESS
	.byte	5
	.byte	6
	.half	288
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_CLC_IMPLIED
	.byte	0
	.byte	2
	.half	445
	.word	m6502op_ORA_ADDRESS
	.byte	11
	.byte	4
	.half	1369
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ORA_ADDRESS
	.byte	10
	.byte	4
	.half	1354
	.word	m6502op_ASL_ADDRESS
	.byte	10
	.byte	7
	.half	244
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_JSR_ADDRESS
	.byte	9
	.byte	6
	.half	989
	.word	m6502op_AND_ADDRESS
	.byte	7
	.byte	6
	.half	173
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_BIT_ADDRESS
	.byte	4
	.byte	3
	.half	355
	.word	m6502op_AND_ADDRESS
	.byte	4
	.byte	3
	.half	203
	.word	m6502op_ROL_ADDRESS
	.byte	4
	.byte	5
	.half	1548
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_PLP_IMPLIED
	.byte	0
	.byte	4
	.half	1492
	.word	m6502op_AND_IMMEDIATE
	.byte	2
	.byte	2
	.half	159
	.word	m6502op_ROL_ACCUMULATOR
	.byte	1
	.byte	2
	.half	1532
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_BIT_ADDRESS
	.byte	9
	.byte	4
	.half	342
	.word	m6502op_AND_ADDRESS
	.byte	9
	.byte	4
	.half	116
	.word	m6502op_ROL_ADDRESS
	.byte	9
	.byte	6
	.half	1504
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_BMI_ADDRESS
	.byte	3
	.byte	2
	.half	368
	.word	m6502op_AND_ADDRESS
	.byte	8
	.byte	5
	.half	188
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_AND_ADDRESS
	.byte	5
	.byte	4
	.half	216
	.word	m6502op_ROL_ADDRESS
	.byte	5
	.byte	6
	.half	1561
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_SEC_IMPLIED
	.byte	0
	.byte	2
	.half	1787
	.word	m6502op_AND_ADDRESS
	.byte	11
	.byte	4
	.half	144
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_AND_ADDRESS
	.byte	10
	.byte	4
	.half	129
	.word	m6502op_ROL_ADDRESS
	.byte	10
	.byte	7
	.half	1517
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_RTI_IMPLIED
	.byte	0
	.byte	6
	.half	1648
	.word	m6502op_EOR_ADDRESS
	.byte	7
	.byte	6
	.half	825
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_EOR_ADDRESS
	.byte	4
	.byte	3
	.half	855
	.word	m6502op_LSR_ADDRESS
	.byte	4
	.byte	5
	.half	1301
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_PHA_IMPLIED
	.byte	0
	.byte	3
	.half	1456
	.word	m6502op_EOR_IMMEDIATE
	.byte	2
	.byte	2
	.half	811
	.word	m6502op_LSR_ACCUMULATOR
	.byte	1
	.byte	2
	.half	1285
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_JMP_ADDRESS
	.byte	9
	.byte	3
	.half	963
	.word	m6502op_EOR_ADDRESS
	.byte	9
	.byte	4
	.half	768
	.word	m6502op_LSR_ADDRESS
	.byte	9
	.byte	6
	.half	1257
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_BVC_ADDRESS
	.byte	3
	.byte	2
	.half	419
	.word	m6502op_EOR_ADDRESS
	.byte	8
	.byte	5
	.half	840
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_EOR_ADDRESS
	.byte	5
	.byte	4
	.half	868
	.word	m6502op_LSR_ADDRESS
	.byte	5
	.byte	6
	.half	1314
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_CLI_IMPLIED
	.byte	0
	.byte	2
	.half	469
	.word	m6502op_EOR_ADDRESS
	.byte	11
	.byte	4
	.half	796
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_EOR_ADDRESS
	.byte	10
	.byte	4
	.half	781
	.word	m6502op_LSR_ADDRESS
	.byte	10
	.byte	7
	.half	1270
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_RTS_IMPLIED
	.byte	0
	.byte	6
	.half	1660
	.word	m6502op_ADC_ADDRESS
	.byte	7
	.byte	6
	.half	58
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ADC_ADDRESS
	.byte	4
	.byte	3
	.half	88
	.word	m6502op_ROR_ADDRESS
	.byte	4
	.byte	5
	.half	1620
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_PLA_IMPLIED
	.byte	0
	.byte	4
	.half	1480
	.word	m6502op_ADC_IMMEDIATE
	.byte	2
	.byte	2
	.half	44
	.word	m6502op_ROR_ACCUMULATOR
	.byte	1
	.byte	2
	.half	1604
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_JMP_ADDRESS
	.byte	12
	.byte	5
	.half	976
	.word	m6502op_ADC_ADDRESS
	.byte	9
	.byte	4
	.half	1
	.word	m6502op_ROR_ADDRESS
	.byte	9
	.byte	6
	.half	1576
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_BVS_ADDRESS
	.byte	3
	.byte	2
	.half	432
	.word	m6502op_ADC_ADDRESS
	.byte	8
	.byte	5
	.half	73
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ADC_ADDRESS
	.byte	5
	.byte	4
	.half	101
	.word	m6502op_ROR_ADDRESS
	.byte	5
	.byte	6
	.half	1633
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_SEI_IMPLIED
	.byte	0
	.byte	2
	.half	1811
	.word	m6502op_ADC_ADDRESS
	.byte	11
	.byte	4
	.half	29
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ADC_ADDRESS
	.byte	10
	.byte	4
	.half	14
	.word	m6502op_ROR_ADDRESS
	.byte	10
	.byte	7
	.half	1589
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_STA_ADDRESS
	.byte	7
	.byte	6
	.half	1866
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_STY_ADDRESS
	.byte	4
	.byte	3
	.half	1978
	.word	m6502op_STA_ADDRESS
	.byte	4
	.byte	3
	.half	1896
	.word	m6502op_STX_ADDRESS
	.byte	4
	.byte	3
	.half	1937
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_DEY_IMPLIED
	.byte	0
	.byte	2
	.half	756
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_TXA_IMPLIED
	.byte	0
	.byte	2
	.half	2042
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_STY_ADDRESS
	.byte	9
	.byte	4
	.half	1965
	.word	m6502op_STA_ADDRESS
	.byte	9
	.byte	4
	.half	1823
	.word	m6502op_STX_ADDRESS
	.byte	9
	.byte	4
	.half	1924
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_BCC_ADDRESS
	.byte	3
	.byte	2
	.half	303
	.word	m6502op_STA_ADDRESS
	.byte	8
	.byte	6
	.half	1881
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_STY_ADDRESS
	.byte	5
	.byte	4
	.half	1991
	.word	m6502op_STA_ADDRESS
	.byte	5
	.byte	4
	.half	1909
	.word	m6502op_STX_ADDRESS
	.byte	6
	.byte	4
	.half	1950
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_TYA_IMPLIED
	.byte	0
	.byte	2
	.half	2066
	.word	m6502op_STA_ADDRESS
	.byte	11
	.byte	5
	.half	1851
	.word	m6502op_TXS_IMPLIED
	.byte	0
	.byte	2
	.half	2054
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_STA_ADDRESS
	.byte	10
	.byte	5
	.half	1836
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_LDY_IMMEDIATE
	.byte	2
	.byte	2
	.half	1215
	.word	m6502op_LDA_ADDRESS
	.byte	7
	.byte	6
	.half	1059
	.word	m6502op_LDX_IMMEDIATE
	.byte	2
	.byte	2
	.half	1145
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_LDY_ADDRESS
	.byte	4
	.byte	3
	.half	1229
	.word	m6502op_LDA_ADDRESS
	.byte	4
	.byte	3
	.half	1089
	.word	m6502op_LDX_ADDRESS
	.byte	4
	.byte	3
	.half	1159
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_TAY_IMPLIED
	.byte	0
	.byte	2
	.half	2018
	.word	m6502op_LDA_IMMEDIATE
	.byte	2
	.byte	2
	.half	1045
	.word	m6502op_TAX_IMPLIED
	.byte	0
	.byte	2
	.half	2006
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_LDY_ADDRESS
	.byte	9
	.byte	4
	.half	1187
	.word	m6502op_LDA_ADDRESS
	.byte	9
	.byte	4
	.half	1002
	.word	m6502op_LDX_ADDRESS
	.byte	9
	.byte	4
	.half	1117
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_BCS_ADDRESS
	.byte	3
	.byte	2
	.half	316
	.word	m6502op_LDA_ADDRESS
	.byte	8
	.byte	5
	.half	1074
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_LDY_ADDRESS
	.byte	5
	.byte	4
	.half	1242
	.word	m6502op_LDA_ADDRESS
	.byte	5
	.byte	4
	.half	1102
	.word	m6502op_LDX_ADDRESS
	.byte	6
	.byte	4
	.half	1172
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_CLV_IMPLIED
	.byte	0
	.byte	2
	.half	481
	.word	m6502op_LDA_ADDRESS
	.byte	11
	.byte	4
	.half	1030
	.word	m6502op_TSX_IMPLIED
	.byte	0
	.byte	2
	.half	2030
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_LDY_ADDRESS
	.byte	10
	.byte	4
	.half	1200
	.word	m6502op_LDA_ADDRESS
	.byte	10
	.byte	4
	.half	1015
	.word	m6502op_LDX_ADDRESS
	.byte	11
	.byte	4
	.half	1130
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_CPY_IMMEDIATE
	.byte	2
	.byte	2
	.half	661
	.word	m6502op_CMP_ADDRESS
	.byte	7
	.byte	6
	.half	550
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_CPY_ADDRESS
	.byte	4
	.byte	3
	.half	675
	.word	m6502op_CMP_ADDRESS
	.byte	4
	.byte	3
	.half	580
	.word	m6502op_DEC_ADDRESS
	.byte	4
	.byte	5
	.half	716
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_INY_IMPLIED
	.byte	0
	.byte	2
	.half	951
	.word	m6502op_CMP_IMMEDIATE
	.byte	2
	.byte	2
	.half	536
	.word	m6502op_DEX_IMPLIED
	.byte	0
	.byte	2
	.half	744
	.word	m6502op_WAI_IMPLIED
	.byte	0
	.byte	3
	.half	2078
	.word	m6502op_CPY_ADDRESS
	.byte	9
	.byte	4
	.half	648
	.word	m6502op_CMP_ADDRESS
	.byte	9
	.byte	4
	.half	493
	.word	m6502op_DEC_ADDRESS
	.byte	9
	.byte	6
	.half	688
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_BNE_ADDRESS
	.byte	3
	.byte	2
	.half	381
	.word	m6502op_CMP_ADDRESS
	.byte	8
	.byte	5
	.half	565
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_CMP_ADDRESS
	.byte	5
	.byte	4
	.half	593
	.word	m6502op_DEC_ADDRESS
	.byte	5
	.byte	6
	.half	729
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_CLD_IMPLIED
	.byte	0
	.byte	2
	.half	457
	.word	m6502op_CMP_ADDRESS
	.byte	11
	.byte	4
	.half	521
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_CMP_ADDRESS
	.byte	10
	.byte	4
	.half	506
	.word	m6502op_DEC_ADDRESS
	.byte	10
	.byte	7
	.half	701
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_CPX_IMMEDIATE
	.byte	2
	.byte	2
	.half	621
	.word	m6502op_SBC_ADDRESS
	.byte	7
	.byte	6
	.half	1729
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_CPX_ADDRESS
	.byte	4
	.byte	3
	.half	635
	.word	m6502op_SBC_ADDRESS
	.byte	4
	.byte	3
	.half	1759
	.word	m6502op_INC_ADDRESS
	.byte	4
	.byte	5
	.half	911
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_INX_IMPLIED
	.byte	0
	.byte	2
	.half	939
	.word	m6502op_SBC_IMMEDIATE
	.byte	2
	.byte	2
	.half	1715
	.word	m6502op_NOP_IMPLIED
	.byte	0
	.byte	2
	.half	1329
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_CPX_ADDRESS
	.byte	9
	.byte	4
	.half	608
	.word	m6502op_SBC_ADDRESS
	.byte	9
	.byte	4
	.half	1672
	.word	m6502op_INC_ADDRESS
	.byte	9
	.byte	6
	.half	883
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_BEQ_ADDRESS
	.byte	3
	.byte	2
	.half	329
	.word	m6502op_SBC_ADDRESS
	.byte	8
	.byte	5
	.half	1744
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_SBC_ADDRESS
	.byte	5
	.byte	4
	.half	1772
	.word	m6502op_INC_ADDRESS
	.byte	5
	.byte	6
	.half	924
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_SED_IMPLIED
	.byte	0
	.byte	2
	.half	1799
	.word	m6502op_SBC_ADDRESS
	.byte	11
	.byte	4
	.half	1700
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.word	m6502op_SBC_ADDRESS
	.byte	10
	.byte	4
	.half	1685
	.word	m6502op_INC_ADDRESS
	.byte	10
	.byte	7
	.half	896
	.word	m6502op_ERR_IMPLIED
	.byte	0
	.byte	0
	.half	0
	.global	m6502_op_name_table
	.align	2
m6502_op_name_table:
	.ascii	"\000ADC Absolute\000ADC Absolute,X\000ADC Absolute,Y\000"
	.ascii	"ADC Immediate\000ADC Indirect,X\000ADC Indirect,Y\000ADC"
	.ascii	" ZeroPage\000ADC ZeroPage,X\000AND Absolute\000AND Absol"
	.ascii	"ute,X\000AND Absolute,Y\000AND Immediate\000AND Indirect"
	.ascii	",X\000AND Indirect,Y\000AND ZeroPage\000AND ZeroPage,X\000"
	.ascii	"ASL Absolute\000ASL Absolute,X\000ASL Accumulator\000ASL"
	.ascii	" ZeroPage\000ASL ZeroPage,X\000BCC Relative\000BCS Relat"
	.ascii	"ive\000BEQ Relative\000BIT Absolute\000BIT ZeroPage\000B"
	.ascii	"MI Relative\000BNE Relative\000BPL Relative\000BRK Impli"
	.ascii	"ed\000BVC Relative\000BVS Relative\000CLC Implied\000CLD"
	.ascii	" Implied\000CLI Implied\000CLV Implied\000CMP Absolute\000"
	.ascii	"CMP Absolute,X\000CMP Absolute,Y\000CMP Immediate\000CMP"
	.ascii	" Indirect,X\000CMP Indirect,Y\000CMP ZeroPage\000CMP Zer"
	.ascii	"oPage,X\000CPX Absolute\000CPX Immediate\000CPX ZeroPage"
	.ascii	"\000CPY Absolute\000CPY Immediate\000CPY ZeroPage\000DEC"
	.ascii	" Absolute\000DEC Absolute,X\000DEC ZeroPage\000DEC ZeroP"
	.ascii	"age,X\000DEX Implied\000DEY Implied\000EOR Absolute\000E"
	.ascii	"OR Absolute,X\000EOR Absolute,Y\000EOR Immediate\000EOR "
	.ascii	"Indirect,X\000EOR Indirect,Y\000EOR ZeroPage\000EOR Zero"
	.ascii	"Page,X\000INC Absolute\000INC Absolute,X\000INC ZeroPage"
	.ascii	"\000INC ZeroPage,X\000INX Implied\000INY Implied\000JMP "
	.ascii	"Absolute\000JMP Indirect\000JSR Absolute\000LDA Absolute"
	.ascii	"\000LDA Absolute,X\000LDA Absolute,Y\000LDA Immediate\000"
	.ascii	"LDA Indirect,X\000LDA Indirect,Y\000LDA ZeroPage\000LDA "
	.ascii	"ZeroPage,X\000LDX Absolute\000LDX Absolute,Y\000LDX Imme"
	.ascii	"diate\000LDX ZeroPage\000LDX ZeroPage,Y\000LDY Absolute\000"
	.ascii	"LDY Absolute,X\000LDY Immediate\000LDY ZeroPage\000LDY Z"
	.ascii	"eroPage,X\000LSR Absolute\000LSR Absolute,X\000LSR Accum"
	.ascii	"ulator\000LSR ZeroPage\000LSR ZeroPage,X\000NOP Implied\000"
	.ascii	"ORA Absolute\000ORA Absolute,X\000ORA Absolute,Y\000ORA "
	.ascii	"Immediate\000ORA Indirect,X\000ORA Indirect,Y\000ORA Zer"
	.ascii	"oPage\000ORA ZeroPage,X\000PHA Implied\000PHP Implied\000"
	.ascii	"PLA Implied\000PLP Implied\000ROL Absolute\000ROL Absolu"
	.ascii	"te,X\000ROL Accumulator\000ROL ZeroPage\000ROL ZeroPage,"
	.ascii	"X\000ROR Absolute\000ROR Absolute,X\000ROR Accumulator\000"
	.ascii	"ROR ZeroPage\000ROR ZeroPage,X\000RTI Implied\000RTS Imp"
	.ascii	"lied\000SBC Absolute\000SBC Absolute,X\000SBC Absolute,Y"
	.ascii	"\000SBC Immediate\000SBC Indirect,X\000SBC Indirect,Y\000"
	.ascii	"SBC ZeroPage\000SBC ZeroPage,X\000SEC Implied\000SED Imp"
	.ascii	"lied\000SEI Implied\000STA Absolute\000STA Absolute,X\000"
	.ascii	"STA Absolute,Y\000STA Indirect,X\000STA Indirect,Y\000ST"
	.ascii	"A ZeroPage\000STA ZeroPage,X\000STX Absolute\000STX Zero"
	.ascii	"Page\000STX ZeroPage,Y\000STY Absolute\000STY ZeroPage\000"
	.ascii	"STY ZeroP"
	.ascii	"age,X\000TAX Implied\000TAY Implied\000TSX Implied\000TX"
	.ascii	"A Implied\000TXS Implied\000TYA Implied\000WAI Implied\000"
	.ascii	"\000"
	.code
	.align	1
	.global	m6502_reset
m6502_reset:
;	.frame	%sp,16,$31		# vars= 0, regs= 4/0, args= 0, extra= 0
;	.mask	0x80070000,-4
;	.fmask	0x00000000,0
	pushn	%r2
	ld.w	%r1,%r12
	ld.w	%r0,%r13
	ld.w	%r2,%r14
	ld.w	%r13,0x0
	ld.w	%r14,0x18	; 	xld.w	%r14,0x00000018		; 24
	ext	memset@rm	; 	xcall	memset
	call	memset@rl
	cmp	%r0,0x0
	jrne	__LX71		; 	xjrne	__L71
	ext	m6502_internal_read+0x0@h	; 	xld.w	%r0,m6502_internal_read
	ext	m6502_internal_read+0x0@m
	ld.w	%r0,m6502_internal_read+0x0@l
__LX71:				; __L71:
	ext	0x10		; 	xld.w	[%r1+16],%r0
	ld.w	[%r1],%r0
	ld.w	%r14,%r2
	cmp	%r14,0x0
	jrne	__LX72		; 	xjrne	__L72
	ext	m6502_internal_write+0x0@h	; 	xld.w	%r14,m6502_internal_write
	ext	m6502_internal_write+0x0@m
	ld.w	%r14,m6502_internal_write+0x0@l
__LX72:				; __L72:
	ext	0x14		; 	xld.w	[%r1+20],%r14
	ld.w	[%r1],%r14
	ext	0x0		; 	xld.w	%r10,0x00000026		; 38
	ld.w	%r10,0x26
	ext	0x7		; 	xld.b	[%r1+7],%r10
	ld.b	[%r1],%r10
	ext	0x10		; 	xld.w	%r10,[%r1+16]
	ld.w	%r10,[%r1]
	ld.w	%r12,%r1
	ext	0x3ff		; 	xld.w	%r13,0x0000fffc		; 65532
	ld.w	%r13,0x3c
	call	%r10
	ld.w	%r0,%r10
	ext	0x10		; 	xld.w	%r10,[%r1+16]
	ld.w	%r10,[%r1]
	ld.w	%r12,%r1
	ext	0x3ff		; 	xld.w	%r13,0x0000fffd		; 65533
	ld.w	%r13,0x3d
	call	%r10
	ld.ub	%r0,%r0
	ld.ub	%r10,%r10
	sll	%r10,0x8	; 	xsll	%r10,8
	or	%r0,%r10
	ext	0x4		; 	xld.h	[%r1+4],%r0
	ld.h	[%r1],%r0
	ext	0x3		; 	xld.w	%r10,0x000000ff		; 255
	ld.w	%r10,0x3f
	ext	0x6		; 	xld.b	[%r1+6],%r10
	ld.b	[%r1],%r10
	popn	%r2
	ret
	.align	1
	.global	m6502_int
m6502_int:
;	.frame	%sp,20,$31		# vars= 8, regs= 3/0, args= 0, extra= 0
;	.mask	0x80030000,-4
;	.fmask	0x00000000,0
	pushn	%r1
	sub	%sp,0x2		; 	xsub	%sp,%sp,8
	ld.w	%r1,%r12
	ext	0x7		; 	xbtst	[%r1+7],0x2
	btst	[%r1],0x2
	jrne	__LX73		; 	xjrne	__L73
	ext	0x6		; 	xld.ub	%r13,[%r1+6]
	ld.ub	%r13,[%r1]
	ext	0x5		; 	xld.ub	%r14,[%r1+5]
	ld.ub	%r14,[%r1]
	ext	0x14		; 	xld.w	%r10,[%r1+20]
	ld.w	%r10,[%r1]
	ext	0x4		; 	xoor	%r13,%r13,0x00000100
	or	%r13,0x0
	call	%r10
	ext	0x6		; 	xld.ub	%r13,[%r1+6]
	ld.ub	%r13,[%r1]
	sub	%r13,0x1	; 	xsub	%r13,%r13,1
	ext	0x6		; 	xld.b	[%r1+6],%r13
	ld.b	[%r1],%r13
	ld.ub	%r13,%r13
	ext	0x4		; 	xld.ub	%r14,[%r1+4]
	ld.ub	%r14,[%r1]
	ext	0x14		; 	xld.w	%r10,[%r1+20]
	ld.w	%r10,[%r1]
	ld.w	%r12,%r1
	ext	0x4		; 	xoor	%r13,%r13,0x00000100
	or	%r13,0x0
	call	%r10
	ext	0x6		; 	xld.ub	%r13,[%r1+6]
	ld.ub	%r13,[%r1]
	sub	%r13,0x1	; 	xsub	%r13,%r13,1
	ext	0x6		; 	xld.b	[%r1+6],%r13
	ld.b	[%r1],%r13
	ld.ub	%r13,%r13
	ext	0x14		; 	xld.w	%r10,[%r1+20]
	ld.w	%r10,[%r1]
	ld.w	%r12,%r1
	ext	0x4		; 	xoor	%r13,%r13,0x00000100
	or	%r13,0x0
	ext	0x7		; 	xld.ub	%r14,[%r1+7]
	ld.ub	%r14,[%r1]
	ext	0x3		; 	xand	%r14,%r14,0x000000ef
	and	%r14,0x2f
	call	%r10
	ext	0x6		; 	xld.ub	%r10,[%r1+6]
	ld.ub	%r10,[%r1]
	sub	%r10,0x1	; 	xsub	%r10,%r10,1
	ext	0x6		; 	xld.b	[%r1+6],%r10
	ld.b	[%r1],%r10
	ext	0x7		; 	xbset	[%r1+7],0x2
	bset	[%r1],0x2
	ext	0x10		; 	xld.w	%r10,[%r1+16]
	ld.w	%r10,[%r1]
	ld.w	%r12,%r1
	ext	0x3ff		; 	xld.w	%r13,0x0000fffe		; 65534
	ld.w	%r13,0x3e
	call	%r10
	ld.w	%r0,%r10
	ext	0x10		; 	xld.w	%r10,[%r1+16]
	ld.w	%r10,[%r1]
	ld.w	%r12,%r1
	ext	0x3ff		; 	xld.w	%r13,0x0000ffff		; 65535
	ld.w	%r13,0x3f
	call	%r10
	ld.ub	%r0,%r0
	ld.ub	%r10,%r10
	sll	%r10,0x8	; 	xsll	%r10,8
	or	%r0,%r10
	ext	0x4		; 	xld.h	[%r1+4],%r0
	ld.h	[%r1],%r0
	ld.w	%r11,0x0
	ext	0xc		; 	xld.b	[%r1+12],%r11
	ld.b	[%r1],%r11
__LX73:				; __L73:
	add	%sp,0x2		; 	xadd	%sp,%sp,8
	popn	%r1
	ret
	.align	1
	.global	m6502_brk
m6502_brk:
;	.frame	%sp,20,$31		# vars= 8, regs= 3/0, args= 0, extra= 0
;	.mask	0x80030000,-4
;	.fmask	0x00000000,0
	pushn	%r1
	sub	%sp,0x2		; 	xsub	%sp,%sp,8
	ld.w	%r0,%r12
	ext	0x4		; 	xld.uh	%r10,[%r0+4]
	ld.uh	%r10,[%r0]
	add	%r10,0x1	; 	xadd	%r10,%r10,1
	ext	0x4		; 	xld.h	[%r0+4],%r10
	ld.h	[%r0],%r10
	ext	0x6		; 	xld.ub	%r13,[%r0+6]
	ld.ub	%r13,[%r0]
	ext	0x5		; 	xld.ub	%r14,[%r0+5]
	ld.ub	%r14,[%r0]
	ext	0x14		; 	xld.w	%r10,[%r0+20]
	ld.w	%r10,[%r0]
	ext	0x4		; 	xoor	%r13,%r13,0x00000100
	or	%r13,0x0
	call	%r10
	ext	0x6		; 	xld.ub	%r13,[%r0+6]
	ld.ub	%r13,[%r0]
	sub	%r13,0x1	; 	xsub	%r13,%r13,1
	ext	0x6		; 	xld.b	[%r0+6],%r13
	ld.b	[%r0],%r13
	ld.ub	%r13,%r13
	ext	0x4		; 	xld.ub	%r14,[%r0+4]
	ld.ub	%r14,[%r0]
	ext	0x14		; 	xld.w	%r10,[%r0+20]
	ld.w	%r10,[%r0]
	ld.w	%r12,%r0
	ext	0x4		; 	xoor	%r13,%r13,0x00000100
	or	%r13,0x0
	call	%r10
	ext	0x6		; 	xld.ub	%r13,[%r0+6]
	ld.ub	%r13,[%r0]
	sub	%r13,0x1	; 	xsub	%r13,%r13,1
	ext	0x6		; 	xld.b	[%r0+6],%r13
	ld.b	[%r0],%r13
	ld.ub	%r13,%r13
	ext	0x14		; 	xld.w	%r10,[%r0+20]
	ld.w	%r10,[%r0]
	ld.w	%r12,%r0
	ext	0x4		; 	xoor	%r13,%r13,0x00000100
	or	%r13,0x0
	ext	0x7		; 	xld.ub	%r14,[%r0+7]
	ld.ub	%r14,[%r0]
	or	%r14,0x10	; 	xoor	%r14,%r14,0x00000010
	call	%r10
	ext	0x6		; 	xld.ub	%r10,[%r0+6]
	ld.ub	%r10,[%r0]
	sub	%r10,0x1	; 	xsub	%r10,%r10,1
	ext	0x6		; 	xld.b	[%r0+6],%r10
	ld.b	[%r0],%r10
	ext	0x7		; 	xbset	[%r0+7],0x2
	bset	[%r0],0x2
	ext	0x10		; 	xld.w	%r10,[%r0+16]
	ld.w	%r10,[%r0]
	ld.w	%r12,%r0
	ext	0x3ff		; 	xld.w	%r13,0x0000fffe		; 65534
	ld.w	%r13,0x3e
	call	%r10
	ld.w	%r1,%r10
	ext	0x10		; 	xld.w	%r10,[%r0+16]
	ld.w	%r10,[%r0]
	ld.w	%r12,%r0
	ext	0x3ff		; 	xld.w	%r13,0x0000ffff		; 65535
	ld.w	%r13,0x3f
	call	%r10
	ld.ub	%r1,%r1
	ld.ub	%r10,%r10
	sll	%r10,0x8	; 	xsll	%r10,8
	or	%r1,%r10
	ext	0x4		; 	xld.h	[%r0+4],%r1
	ld.h	[%r0],%r1
	add	%sp,0x2		; 	xadd	%sp,%sp,8
	popn	%r1
	ret
	.align	1
	.global	m6502_nmi
m6502_nmi:
;	.frame	%sp,20,$31		# vars= 8, regs= 3/0, args= 0, extra= 0
;	.mask	0x80030000,-4
;	.fmask	0x00000000,0
	pushn	%r1
	sub	%sp,0x2		; 	xsub	%sp,%sp,8
	ld.w	%r0,%r12
	ext	0x6		; 	xld.ub	%r13,[%r0+6]
	ld.ub	%r13,[%r0]
	ext	0x5		; 	xld.ub	%r14,[%r0+5]
	ld.ub	%r14,[%r0]
	ext	0x14		; 	xld.w	%r10,[%r0+20]
	ld.w	%r10,[%r0]
	ext	0x4		; 	xoor	%r13,%r13,0x00000100
	or	%r13,0x0
	call	%r10
	ext	0x6		; 	xld.ub	%r13,[%r0+6]
	ld.ub	%r13,[%r0]
	sub	%r13,0x1	; 	xsub	%r13,%r13,1
	ext	0x6		; 	xld.b	[%r0+6],%r13
	ld.b	[%r0],%r13
	ld.ub	%r13,%r13
	ext	0x4		; 	xld.ub	%r14,[%r0+4]
	ld.ub	%r14,[%r0]
	ext	0x14		; 	xld.w	%r10,[%r0+20]
	ld.w	%r10,[%r0]
	ld.w	%r12,%r0
	ext	0x4		; 	xoor	%r13,%r13,0x00000100
	or	%r13,0x0
	call	%r10
	ext	0x6		; 	xld.ub	%r13,[%r0+6]
	ld.ub	%r13,[%r0]
	sub	%r13,0x1	; 	xsub	%r13,%r13,1
	ext	0x6		; 	xld.b	[%r0+6],%r13
	ld.b	[%r0],%r13
	ld.ub	%r13,%r13
	ext	0x14		; 	xld.w	%r10,[%r0+20]
	ld.w	%r10,[%r0]
	ld.w	%r12,%r0
	ext	0x4		; 	xoor	%r13,%r13,0x00000100
	or	%r13,0x0
	ext	0x7		; 	xld.ub	%r14,[%r0+7]
	ld.ub	%r14,[%r0]
	ext	0x3		; 	xand	%r14,%r14,0x000000ef
	and	%r14,0x2f
	call	%r10
	ext	0x6		; 	xld.ub	%r10,[%r0+6]
	ld.ub	%r10,[%r0]
	sub	%r10,0x1	; 	xsub	%r10,%r10,1
	ext	0x6		; 	xld.b	[%r0+6],%r10
	ld.b	[%r0],%r10
	ext	0x7		; 	xbset	[%r0+7],0x2
	bset	[%r0],0x2
	ext	0x10		; 	xld.w	%r10,[%r0+16]
	ld.w	%r10,[%r0]
	ld.w	%r12,%r0
	ext	0x3ff		; 	xld.w	%r13,0x0000fffa		; 65530
	ld.w	%r13,0x3a
	call	%r10
	ld.w	%r1,%r10
	ext	0x10		; 	xld.w	%r10,[%r0+16]
	ld.w	%r10,[%r0]
	ld.w	%r12,%r0
	ext	0x3ff		; 	xld.w	%r13,0x0000fffb		; 65531
	ld.w	%r13,0x3b
	call	%r10
	ld.ub	%r1,%r1
	ld.ub	%r10,%r10
	sll	%r10,0x8	; 	xsll	%r10,8
	or	%r1,%r10
	ext	0x4		; 	xld.h	[%r0+4],%r1
	ld.h	[%r0],%r1
	ld.w	%r11,0x0
	ext	0xc		; 	xld.b	[%r0+12],%r11
	ld.b	[%r0],%r11
	add	%sp,0x2		; 	xadd	%sp,%sp,8
	popn	%r1
	ret
	.align	1
	.global	m6502_dump
m6502_dump:
;	.frame	%sp,4,$31		# vars= 0, regs= 1/0, args= 0, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0
	ret
; APP
	
	.code
	.global m6502_run2
m6502_run2:
	pushn %r0
	ld.w %r0, %sp		; スタック退避
	ext	0x40		; 	xld.w %r10, 0x1000	; 0x0e00〜0x1000にスタック切替
	ld.w	%r10,0x0
	ld.w %sp, %r10
	ext	m6502_run@rm	; 	xcall m6502_run
	call	m6502_run@rl
	ld.w %sp, %r0		; スタック復元
	popn %r0
	ret

