xor2003 / masm2c

x86 assembler (MASM syntax) to C translator
Other
82 stars 16 forks source link

Convert multiple .asm files with data segments distributed across files #7

Closed LowLevelMahn closed 3 years ago

LowLevelMahn commented 3 years ago

last time we talked you just started the real MASM parser based on the grammar

still fighting?

xor2003 commented 3 years ago

This one is mostly finished. And it is already great move forward. I think the whole source code can be parsed now. Tool produces C++ code. I was adding/fixing structures support and converting many ASM -> C++ files so they can be compiled together. Also need to properly test structures support and make it all compile. Busy with personal life currently.

LowLevelMahn commented 3 years ago

This one is mostly finished. And it is already great move forward.

sounds great, thanks for all the hard work so far

Also need to properly test structures support and make it all compile.

i hope i can help with testing or getting it finished also the stunts community will be of great help if you reach someday the state of testing the results

Busy with personal life currently.

we all :)

xor2003 commented 3 years ago

Ok I will make sure you can start to use it.

xor2003 commented 3 years ago

Current issue with restunts: when converting several .asm files the masm behaviour is to merge several segement which are part of segment group into single data segment. Or just to have data segment in different files. The current masm2c implementation was: data is a single structure without gaps. (all the segments). Previously it was designed to convert single file. The solutions I see:

  1. Make some preprocessing. Separate cpp file with data will include all data from all data segments. Masm2c will mimic masm behaviour. Complex to implement. I already implemented a lot of complexities...
  2. Merge all the files and produce single cpp.

What is your view?

xor2003 commented 3 years ago

I mean you probably can convert each file. And it should be enough to convert separate functions. Just to need to manual merge to compile togheher.

LowLevelMahn commented 3 years ago

i hope i can to do some testing on the weekend - currently very busy

a complete-all-files solution would be great - but i think its currently enough to get an idea how far one will come using your tool

xor2003 commented 3 years ago

Finally it can compile 90% of restunts code!

LowLevelMahn commented 3 years ago

Great news, i think your converter will play a big role in reversing of 16bit code games in the future

xor2003 commented 3 years ago

Merging data segments implemented. Case closed