Oberon/M 1.2 (OMF output) ... die, REGINT, die! (Developers)
> If you patch a single byte at offset CB1Fh from 70h to 88h in OC.EXE, you
> will no longer need your external patcher.
Good to know, but ....
> For anyone unfamiliar with topic. What we are doing here is changing the
> OMF REGINT (70h) to a COMENT (88h) record. The REGINT record takes this
> form:
> 70h,
> 00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h
>
> where 00h,00h is a word for the size of the record and the
> bytes following are the initial register values (6 * word). Fortunately
> the COMENT record also has a word for record length following the record
> type byte. So all that happens is the REGINT record becomes a COMENT
> record:
> 88h, 00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h
>
> Real world example, this REGINT record:
> 70 0D 00 01 04 01 01 41 04 05 05 81 04 02 02
>
> becomes a COMENT record:
> 88 0D 00 01 04 01 01 41 04 05 05 81 04 02 02
>
> This is what Rugxulo utility does after the OBJ file has been created by
> the compiler, obviously what the patch above does is allow the compiler to
> be updated so that Rugxulo's external utility isn't required for new OBJ
> files.
Actually, the real problem is that the COMENT record is how MS and Borland had previously extended the format. So there are many subrecords of the 88h form, so I we have to be really careful not to confuse the linker. And I'm afraid just changing 70h to 88h has the potential to do that. Hence why I just put a bunch of blanks (20h) in there. Perhaps I should've used a different method (e.g. there is a subrecord for copyright, I think, which is just plain text). Yes, comment class 0xDA ("random comment") might've been better, but I don't know (without testing) if it would make things work better (heavily doubt it).
(quoting OMF.PDF from OpenWatcom's FTP server, aka TIS 1.1):
"Note: The presence of any unrecognized subtype causes the linker to generate a fatal error."
"A COMENT record cannot be the first or last record in an object module. (The first record must always be THEADR or LHEADR and the last must always be MODEND.)"
"(Appendix 3, Obsolete Records) When linkers encounter these records, they are free to process them, ignore them, or generate an error."
"(Obsolete Records) 70h REGINT Register Initialization Record This record provides information about the 8086 register/register-pairs: CS and IP, SS and SP, DS and ES. The purpose of this information is for a loader to set the necessary registers for initiation of execution."
> An alternative to patching for OBJ files which removes the redundant record
> completely via an external tool is to code such a util to do the
> following:
What I really should've done was go record by record (sequentially from the top) and remove unnecessary ones, but that was much more complicated and slower, so I didn't bother.
> Personally I prefer the OC.EXE patch or Rugxulo method.
Well, none of it is perfectly ideal.
P.S. ALINK 1.6 works (with a warning), but it's ALINK 1.7 that errors out, sadly. (And yes, you still need HACKOMF there.) Since the default .EXE is RSX bloatware, I just recompiled with DJGPP and used UPX (though I had to delete a spurious line in ALINK.H that said "#define strdup _strdup").
Complete thread:
- OMF records - Rugxulo, 15.02.2012, 16:14 (Developers)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- Just some research about the name "E. R. Videki" - rr, 15.02.2012, 21:09
- Just some research about the name "E. R. Videki" - Arjay, 15.02.2012, 22:08
- Just some research about the name "E. R. Videki" - Rugxulo, 15.02.2012, 23:19
- Just some research about the name "E. R. Videki" - Arjay, 16.02.2012, 00:47
- Just some research about the name "E. R. Videki" - Rugxulo, 15.02.2012, 23:19
- Just some research about the name "E. R. Videki" - Arjay, 15.02.2012, 22:08
- OMF records - Arjay, 15.02.2012, 22:36
- OMF records - Rugxulo, 15.02.2012, 23:29
- OMF records - Arjay, 16.02.2012, 01:09
- OMF records - Rugxulo, 16.02.2012, 08:00
- OMF records - rr, 16.02.2012, 09:51
- OMF records - Arjay, 16.02.2012, 21:37
- OMF records - marcov, 18.02.2012, 17:16
- OMF records - Rugxulo, 18.02.2012, 17:32
- OMF records - Rugxulo, 18.02.2012, 17:54
- OMF records - marcov, 19.02.2012, 16:47
- OMF records - RayeR, 19.02.2012, 17:19
- OMF records - marcov, 20.02.2012, 10:33
- OMF records - Rugxulo, 19.02.2012, 21:33
- OMF records - marcov, 20.02.2012, 18:23
- OMF records - RayeR, 19.02.2012, 17:19
- OMF records - marcov, 19.02.2012, 16:47
- OMF records - marcov, 19.02.2012, 16:43
- OMF records - Rugxulo, 19.02.2012, 21:15
- OMF records - marcov, 20.02.2012, 10:54
- OMF records - Rugxulo, 20.02.2012, 17:50
- OMF records - marcov, 20.02.2012, 18:54
- OMF records - Rugxulo, 20.02.2012, 20:09
- OMF records - marcov, 20.02.2012, 18:54
- OMF records - Rugxulo, 20.02.2012, 17:50
- OMF records - marcov, 20.02.2012, 10:54
- OMF records - Rugxulo, 19.02.2012, 21:15
- OMF records - Rugxulo, 18.02.2012, 17:54
- OMF records - Rugxulo, 18.02.2012, 17:32
- OMF records - rr, 16.02.2012, 09:51
- OMF records - Rugxulo, 16.02.2012, 08:00
- OMF records - Arjay, 16.02.2012, 01:09
- OMF records - Rugxulo, 15.02.2012, 23:29
- OMF records - Japheth, 16.02.2012, 18:08
- OMF records - Rugxulo, 16.02.2012, 19:48
- OMF records - Arjay, 16.02.2012, 21:27
- OMF records - Arjay, 16.02.2012, 21:52
- OMF records - Rugxulo, 16.02.2012, 23:09
- OMF records - Arjay, 16.02.2012, 21:52
- OMF records - Arjay, 16.02.2012, 21:27
- OMF records - Rugxulo, 17.02.2012, 02:15
- OMF records - Japheth, 17.02.2012, 08:08
- OMF records - Rugxulo, 17.02.2012, 20:21
- OMF records - Japheth, 18.02.2012, 09:05
- OMF records - Rugxulo, 18.02.2012, 16:39
- OMF records - Japheth, 18.02.2012, 17:55
- jwlinkd updated - Japheth, 20.02.2012, 14:31
- Oberon subtyping (was: JWlinkD updated) - Rugxulo, 20.02.2012, 20:14
- BEFI 3H (Oberon-M fully supported) - Rugxulo, 06.03.2012, 23:30
- Oberon subtyping (was: JWlinkD updated) - Rugxulo, 20.02.2012, 20:14
- jwlinkd updated - Japheth, 20.02.2012, 14:31
- OMF records - Japheth, 18.02.2012, 17:55
- OMF records - Rugxulo, 18.02.2012, 16:39
- OMF records - processing SYS.OBJ with tdstrip - Arjay, 18.02.2012, 14:22
- OMF records - processing SYS.OBJ with tdstrip - Arjay, 18.02.2012, 15:47
- OMF records - processing SYS.OBJ with tdstrip - Rugxulo, 18.02.2012, 17:12
- OMF records - processing SYS.OBJ with tdstrip - Rugxulo, 18.02.2012, 16:56
- OMF records - processing SYS.OBJ with tdstrip - Arjay, 19.02.2012, 10:16
- OMF records - processing SYS.OBJ with tdstrip - Rugxulo, 19.02.2012, 17:58
- OMF records - processing SYS.OBJ with tdstrip - Arjay, 19.02.2012, 10:16
- OMF records - processing SYS.OBJ with tdstrip - Arjay, 18.02.2012, 15:47
- OMF records - Japheth, 18.02.2012, 09:05
- OMF records - Rugxulo, 17.02.2012, 20:21
- OMF records - Japheth, 17.02.2012, 08:08
- OMF records - Rugxulo, 16.02.2012, 19:48
- Oberon 1.2 OC (compiler) patch - Arjay, 18.02.2012, 23:37
- Oberon/M 1.2 (OMF output) ... die, REGINT, die! - Rugxulo, 19.02.2012, 00:54
- Oberon/M 1.2 (OMF output) ... die, REGINT, die! - Arjay, 19.02.2012, 10:05
- Oberon/M 1.2 (OMF output) ... die, REGINT, die! - Rugxulo, 19.02.2012, 00:54
- Just some research about the name "E. R. Videki" - rr, 15.02.2012, 21:09
Mix view