Stas Sergeev

Results 1169 comments of Stas Sergeev

I think the easiest is to have a com file. First, it loads itself via 4b one but sets the "no execute" mode. But it will create&change PSP. Then you...

Even simpler is to just use the static variable to count the number of times you returned from do_int21(): ``` AX=4b01; do_int21(); if (cnt++ == 0) do_int20(); else printf("Test FAILED\n");...

Yes, good point. Indeed freedosish asm replaces int20 with int21/00, and later the C code does another morphing: ``` /* Terminate Program */ case 0x00: lr.AX = 0x4c00; /* End...

Hope there is none. Which is why fixing this "bug" is not very tempting. :) But certainly a test can be written that reveals an "incompatibility".

This can't work because int21 can be hooked. In that case you may see CS of a hooker on stack. Also debugger may put an additional iret frame... Overall checking...

Thanks for info! That's really helpful. I built the experimental nasm but I don't know how to emit the relative relocation. `readelf -r kernel.o` doesn't show either one is emitted....

> What exactly are the kind of ELF files you want to build? I already do: I switched fdpp to elf recently. Its just a normal `ELF 32-bit LSB executable,...

I tried partial linking: it produces hundreds of relocations besides TGROUP. Not sure why that is the case. Also it seems to change the ELF type from executable to relocatable.

Basically I think partial linking doesn't resolve any relocations at all. Which is then not what we need.

> until nasm really gets segelf support What are the pre-requisites for segrelative? I remember that HPA wanted something from ia16-binutils for a full thing, but just for segrelative I...