On Sat, Apr 11, 2026 at 3:24 PM John R. Hogerhuis <[email protected]> wrote:

>
>
> On Sat, Apr 11, 2026 at 3:37 AM B 9 <[email protected]> wrote:
>
>> P.S. One of the ways I've been learning about how the Rx hook works is by
>> reading the code for HTERM. Is the gen_reloc.pl program supposed to work
>> as-is? I ended up redoing the Makefile so it works with the `asmx`
>> assembler — the hterm.asm file and supporting files actually didn't need
>> any changes, only the Makefile was having trouble.  Let me know if you're
>> interested in the changes and I'll share them back with you.
>>
>>
> Does gen_reloc.pl work as-is... haven't used it in a while but I assume I
> had it working and I guess the big dependency is TASM. If you want to use
> some other assembler you'd have to deal with whatever its output file
> formats are.
>

Thanks. Although gen_reloc looks like it was originally tightly tied to
TASM's symfile format, the default Makefile doesn't even pass the symfile
to gen_reloc. It appears that the version of gen_reloc released with HTERM
uses only the binary object files with ORG=0 and ORG=1, which my Makefile
does create. That implies to me gen_reloc should work with any assembler.
It certainly goes through the motions when I run it: gen_reloc creates a
.DO file that looks vaguely right (using %-escapes to mark addresses to be
relocated), but once it has poked everything into RAM, calling SYS just
gives a "?SN Error".  (For reference, the .CO file that gets compiled runs
fine on my T200.)

Since you don't recall it being broken, I'm going to presume I'm doing
something wrong.

But you may not need a relocating loader, you may be better off working
> around it.


Both are likely true. But I've become more interested in relocating loaders
since that's one of the things my co2do script doesn't yet handle — except
internally for its own M/L decoder in a string. (Currently, it relies on
parsing the .LST file from asmx which seems too fragile.) It also seems
like a relocating loader might be the only way I can have a single program
larger than 2.4K that can run on any of the Kyotronic sisters.

—b9

Reply via email to