From: Phlip Date: 2007-08-18T04:41:44+09:00 Subject: Re: 8086 simulator in ruby Vasil Vangelovski wrote: > I'm thinking of writing a simulator for the intel 8086 processor in > ruby. At first I'm interested in implementing basic instruction > execution and memory access, no interrupts. The interface may later be > implemented with Tk maybe even as an ajax application on rails. My buest > guess is using metaprogramming for interpreting the assembly > instructions. I'm not wery experienced with design patterns, so I need > some ideas on the levels of abstraction (the classes) i need to start > with this. Any ideas? Woo-hoo! Like Larry Wall said (he'd know), Real programmers can write assembler in any language! Try: cpu = CPU.new cpu.push 42 cpu.shift :b and away you go! (Oh, and use Test Driven Development to write it all. I think that's generally how Intel invents chips, too!) -- Phlip http://www.oreilly.com/catalog/9780596510657/ ^ assert_xpath http://tinyurl.com/yrc77g <-- assert_latest Model