#ECOBJ update. FIXUPP records in OMF files can now be read! It's the bare minimum implementation for translating files, but it's good enough for me to see what's going on. I should now have enough information to work out how to replicate what Psion's ECOBJ.EXE does.
The latest update is here. The code is atrocious, but I'm nowhere near the final app yet. "Make it work, etc etc etc." https://codeberg.org/thelastpsion/ecobj/commit/f28f19ee647dbb4699d27aefcd9d48c938da0b11
I also found a few open source tools that can analyse OMF files. My challenge was to not look at the source code and only use their output as a guide. (I succeeded.) They are:
- OMF-Parser, written in Python. https://github.com/HK47196/OMF-Parser
- DumpOMF, a Win32 app, but runs with WINE. https://github.com/Baron-von-Riedesel/DumpOMF
My next challenge is to work out how to store each record sensibly in memory. I can use #Pascal's TList type, dynamic arrays, and records (structs) to build out the structure. From there, I should be able to work out what moves where, and then generate new files.
This will require a lot of refactoring work. I also want to put most of the code in a class or two for portability - some of the code could easily be reused in other related projects, such as an assembler or a disassembler. Any future compiler will need to be able to build object files with the class information in the code segment. All of this work helps.
I think I said it was going to take me two weeks of work to complete. I think three is more realistic now. But I do need to get one with some $dayjob work this week, so Week 2 might end up being drawn out over January.

