lib/D65.rb in dsktool-0.2.1 vs lib/D65.rb in dsktool-0.4.1

- old
+ new

@@ -121,13 +121,13 @@ when :aby then ["$%04X,Y",next_word] when :zpg then ["$%02X",next_byte] when :zpx then ["$%02X,X",next_byte] when :zpy then ["$%02X,Y",next_byte] when :ind then ["($%04X)",next_word] - when :inx then ["($%04X),X",next_word] - when :iny then ["($%04X),Y",next_word] - when :inz then ["($%02X),Y",next_byte] + when :inx then ["($%02X),X",next_byte] + when :iny then ["($%02X),Y",next_byte] + when :inz then ["($%02X)",next_byte] when :rel then ["$%04X",(current_address+next_byte.chr.unpack("c")[0]+2)%0x10000] else abort("unknown symbol #{operand_type}") end operand = sprintf(operand_format,operand_address) @@ -137,15 +137,15 @@ when 2 then sprintf("%02X %02X ",byte,next_byte) when 3 then sprintf("%02X %02X %02X",byte,next_byte,next_word>>8) end - s+=sprintf("%04X: %s %s %s ; ",current_address,instruction_bytes,opcode_name,operand.ljust(10)) + s<<sprintf("%04X: %s %s %s ; ",current_address,instruction_bytes,opcode_name,operand.ljust(10)) annotation=annotations[operand_address] if (annotation && (operand_type!=:imm)) then - s+=" "+annotation.to_s + s<<" "+annotation.to_s end - s+= "\n" + s<< "\n" index+=opcode_size end s end