From: Vasil Vangelovski Date: 2007-08-20T07:38:08+09:00 Subject: Re: 8086 simulator in ruby How about this? class CPU def mov(dest,src) dest = src end end #asm interpreter def interpret(line) puts line.downcase.scan(/\w+/) instuct = line.downcase.scan(/\w+/)[0] op1 = line.downcase.scan(/\w+/)[1] op2 = line.downcase.scan(/\w+/)[2] Processor.new.method(instruct).call(op1,op2) end I have no idea tho as to how to implement the registers and memmory. Simon gave some ideas. -- Posted via http://www.ruby-forum.com/.