diff --git a/CGI.pas b/CGI.pas index 225e231..8d9d339 100644 --- a/CGI.pas +++ b/CGI.pas @@ -119,6 +119,7 @@ const m_ora_dir = 5; m_ora_dirX = 21; m_ora_imm = 9; + m_ora_long = 15; m_ora_longX = 31; m_ora_s = 3; m_pea = 244; diff --git a/Gen.pas b/Gen.pas index 4578189..6b38858 100644 --- a/Gen.pas +++ b/Gen.pas @@ -1375,15 +1375,21 @@ var begin {DoOr} with op^ do begin if opcode = pc_ldo then begin - GenNative(m_lda_abs, absolute, q, lab, 0); - GenNative(m_ora_abs, absolute, q+2, lab, 0); + if smallMemoryModel then begin + GenNative(m_lda_abs, absolute, q, lab, 0); + GenNative(m_ora_abs, absolute, q+2, lab, 0); + end {if} + else begin + GenNative(m_lda_long, longabsolute, q, lab, 0); + GenNative(m_ora_long, longabsolute, q+2, lab, 0); + end; {else} end {if} else begin disp := LabelToDisp(r) + q; if disp < 254 then begin GenNative(m_lda_dir, direct, disp, nil, 0); GenNative(m_ora_dir, direct, disp+2, nil, 0); - end {else if} + end {if} else begin GenNative(m_ldx_imm, immediate, disp, nil, 0); GenNative(m_lda_dirX, direct, 0, nil, 0); diff --git a/Native.pas b/Native.pas index c709c63..63d7ee3 100644 --- a/Native.pas +++ b/Native.pas @@ -765,8 +765,8 @@ case p_opcode of m_adc_abs,m_adc_dir,m_adc_imm,m_adc_s,m_and_abs,m_and_dir,m_and_imm, m_and_s,m_asl_a,m_dea,m_eor_abs,m_eor_dir,m_eor_imm,m_eor_s,m_lda_absx, m_lda_dirx,m_lda_indl,m_lda_indly,m_lda_longx,m_lda_s,m_lsr_a,m_ora_abs, - m_ora_dir,m_ora_dirX,m_ora_imm,m_ora_longX,m_ora_s,m_pla,m_sbc_abs, - m_sbc_dir,m_sbc_imm,m_sbc_s,m_tdc,m_tsc,m_tsb_dir,m_tsb_abs: + m_ora_dir,m_ora_dirX,m_ora_imm,m_ora_long,m_ora_longX,m_ora_s,m_pla, + m_sbc_abs,m_sbc_dir,m_sbc_imm,m_sbc_s,m_tdc,m_tsc,m_tsb_dir,m_tsb_abs: aRegister.condition := regUnknown; m_ldy_absX,m_ldy_dirX,m_ply: