On 07/01/2012 04:05 PM, Philipp Klaus Krause wrote:
>> Can
>> anyone point me a general direction to begin?
> 
> Look at the structure of the existing ports: Is the 8085 similar enough
> to one so th eports can share a lot of code (hc08 and s08 similar enough
> to each other; z80, z180, gbz80, r2k and r3ka are similar enough to each
> other).

  The Z80 and the 8085 are both outgrowths of the 8080.

  The Z80's instruction set is a superset of that of the 8080, and it
can run 8080 code unmodified.  The same applies to the 8085 the
exception of two "new" instructions that were added to the 8085 over the
8080 instruction set.

  If the code generation backend can simply be prevented from issuing
certain instructions (namely the ones that the Z80 implements over the
8080) it will generate 8080 code, which will run unmodified on an 8085.

  Later, it may be possible to allow for the use of the 8085's two
additional instructions, perhaps via the peephole optimizer.  I don't
recall what those two additional instructions do, or if they're worth
bothering with.

             -Dave

-- 
Dave McGuire, AK4HZ
New Kensington, PA



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to