View Single Post
Old 07 September 2019, 04:28   #11
Registered User
Join Date: May 2013
Location: Grimstad / Norway
Posts: 625
Sounds like what you need is an optimizing assembler. Or perhaps an "assembler compiler" would be closer to the mark. Something that can analyze code flow between entry points and discard dead statements.

Then all you need is to replace Z80 instructions with 68K macros and let the compiler chew on it.

I worked a lot on a 6502 emulator (the original Xformer from the ST), optimizing register and memory layout. Some of the saddest about it was looking at all the code for tracking status bits that you just _had_ to update for every opcode.
Sending static ROM-able code through a converter should cut down the resulting size by a lot if you can drop the un-needed stuff.

Why don't we have assemblers that can spot dead code?

Last edited by NorthWay; 07 September 2019 at 20:47.
NorthWay is online now  
Page generated in 0.05658 seconds with 11 queries