Декопилятор Z80 / 8080 / 6502 в Си.

Использование и разработка софта (преимущественно на ПЦ)

Moderator: Shaos

alemorf
Senior
Posts: 132
Joined: 03 Jan 2017 08:58
Location: SPb

Декопилятор Z80 / 8080 / 6502 в Си.

Post by alemorf »

Скучно. Хочется найти задачу, которой будет интересно заниматься. Думаю, может сделать декомпилятор, который позволит делать красивый и понятный код на Си?

Я хоть и знаю ассемблер и писал даже компилятор, но мой мог просто отказывается переваривать чужие программы на ассемблере. А в чужие программы на Си я вникаю очень быстро.
VGrad
Maniac
Posts: 208
Joined: 18 Nov 2013 15:15
Location: все оттуда ;)

Re: Декопилятор Z80 / 8080 / 6502 в Си.

Post by VGrad »

IDA в помощь ;)
alemorf
Senior
Posts: 132
Joined: 03 Jan 2017 08:58
Location: SPb

Re: Декопилятор Z80 / 8080 / 6502 в Си.

Post by alemorf »

VGrad wrote:IDA в помощь ;)
Я могу любую 8 битную игру в IDA поделить на данные, код, подпрограммы. Найти какие то нужные переменные. Но вот потом всё равно всеё картины не вижу. Полная картина - это когда ты видишь все баги, фичи и можешь написать аналог.
Mixa64
Doomed
Posts: 481
Joined: 25 Aug 2009 07:02
Location: Москва

Re: Декопилятор Z80 / 8080 / 6502 в Си.

Post by Mixa64 »

Вот навскидку. Ассемблер всеми любимого 80-го, преобразователь кода, исходный код на аккумуляторе, результат там же.

Code: Select all

                ani     0Fh
                adi     90h
                daa
                aci     40h
                daa
Как оно красиво на Си будет выглядеть?
VGrad
Maniac
Posts: 208
Joined: 18 Nov 2013 15:15
Location: все оттуда ;)

Re: Декопилятор Z80 / 8080 / 6502 в Си.

Post by VGrad »

http://microapl.com/asm2c/index.html

Relogix™ Assembler-to-C translator

RelogixTM is an advanced software conversion tool which can port assembly-language source files, automatically re-coding them into naturally-structured, readable, maintainable C, complete with meaningful variable names and types.

Unlike most other attempts at automated migration from assembler to C, Relogix produces results close to what a skilled human programmer would produce if asked to re-write an assembler source file in C - only with fewer bugs and in a very much shorter time.

Relogix is available in a number of versions to convert assembler code for a range of different architectures:

IBM mainframes (HLASM)
Desktop systems and 32-bit embedded processors, including the 680x0, CPU32 and ColdFire family, and the Intel 80x86 (IA32) family
Microcontrollers including the 8051 and derivatives, the PIC 16/18 family and the 6502.

Some of these are currently available only as code migration services carried out by MicroAPL staff - please contact us for more information. Assembler code for other processor families, including the Z80 and AVR, can also be converted.
User avatar
Shaos
Admin
Posts: 24080
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Re: Декопилятор Z80 / 8080 / 6502 в Си.

Post by Shaos »

Where is PDP-11? :mrgreen:
Я тут за главного - если что шлите мыло на me собака shaos точка net