<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div class="moz-cite-prefix">On 2019-03-14 3:40 p.m., Kevin Cozens
via talk wrote:<br>
</div>
<blockquote type="cite"
cite="mid:da0ec033-91a7-276a-733d-2a5056159384@ve3syb.ca">I've
tried several decompilers but they didn't work, or wouldn't even
compile. I looked at boomerang, Hopper, snowman, retdec, and reko.
The ones that work wouldn't handle the architecture. The ghidra
decompiler has been the only one that has proven useful. I haven't
read enough about it to know how to save source code out of it but
I can browse decompiled output which is at least the first step in
reconstituting source code.
<br>
</blockquote>
<p>In a previous life, I wrote a z80 decompiler that used printf to
format the output. After a little whille futzing with assembler
syntax, I changed it to produce output like</p>
<blockquote>
<pre>1132 *hl ?= '\n'</pre>
<pre>1133 if !== goto 1135</pre>
<pre>1134 hl++
</pre>
<pre>1135 return</pre>
</blockquote>
<p>which made it easy for me to create c programs that did the same
thing, modulo bugs.</p>
<blockquote>
<pre>if (*hl == '\n') {</pre>
<pre> hl++
}
</pre>
<pre>return
</pre>
</blockquote>
<p>--dave<br>
</p>
<pre class="moz-signature" cols="72">--
David Collier-Brown, | Always do right. This will gratify
System Programmer and Author | some people and astonish the rest
<a class="moz-txt-link-abbreviated" href="mailto:davecb@spamcop.net">davecb@spamcop.net</a> | -- Mark Twain
</pre>
</body>
</html>