Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
roytam

18.01.2025, 04:08
 

patcherfcb (Announce)

I never think I made a DOS program in 2025.

patcherfcb(patchfcb) is a program to (reverse) apply (binary) patch from output of DOS command "fc /b".
It is forked from http://seanriddle.com/patcherfcb.c with some fixes, and I added reverse-patching function to it.

src+bin: http://o.rthost.win/gpc/files1.rt/patcherfcb.zip
repo: https://github.com/roytam1/rtoss/tree/master/patcherfcb

to compile:
- for DOS version, I used MSC 8.0 with command "CL /AT /O2 patcherfcb.c" to produce PATCHFCB.COM
- for win32 version, I used MSVC 2.2 with command "CL /O2 patcherfcb.c" to produce patcherfcb.exe

DosWorld

18.01.2025, 14:48

@ roytam

patcherfcb

Also, someone have archive of old .crk files? (was wide published in Fido and bbs)

---
Make DOS great again!
Make Russia small again!

Rugxulo

Homepage

Usono,
01.02.2025, 00:14

@ roytam

binhack, bytefix

> patcherfcb(patchfcb) is a program to (reverse) apply (binary) patch from
> output of DOS command "fc /b".
> It is forked from http://seanriddle.com/patcherfcb.c with some fixes, and I
> added reverse-patching function to it.

I had my own BINHACK.C on MetaDOS, with examples, that worked similarly, primarily run via DJGPP build of PICOC.

I also wrote a much-smaller BYTEFIX program in NASM to only change one byte at a time. It was 512 bytes.

roytam

01.02.2025, 00:26

@ Rugxulo

binhack, bytefix

> > patcherfcb(patchfcb) is a program to (reverse) apply (binary) patch from
> > output of DOS command "fc /b".
> > It is forked from http://seanriddle.com/patcherfcb.c with some fixes, and
> I
> > added reverse-patching function to it.
>
> I had my own BINHACK.C on MetaDOS, with examples, that worked similarly,
> primarily run via DJGPP build of PICOC.
>
> I also wrote a much-smaller BYTEFIX program in NASM to only change one byte
> at a time. It was 512 bytes.

yeah, but I want `--dry-run` and `--reverse` and run on win32(running on DOS is extra for me) so patcherfcb is easier for me to hack on.

DosWorld

03.02.2025, 18:24

@ roytam

patcherfcb

Sorry for the grumbling, but https://en.wikipedia.org/wiki/File_Control_Block

---
Make DOS great again!
Make Russia small again!

Rugxulo

Homepage

Usono,
22.02.2025, 21:37

@ roytam

binhack, bytefix

> > I had my own BINHACK.C on MetaDOS, with examples, that worked similarly,
> > primarily run via DJGPP build of PICOC.
>
> yeah, but I want `--dry-run` and `--reverse` and run on win32(running on
> DOS is extra for me) so patcherfcb is easier for me to hack on.

PicoC has obvious limitations (although runs on other OSes too), but my particular source is still ANSI C, so it compiles file with OpenWatcom for Win32. Also, it can reverse patches.

Not trying to nitpick or complain, but ...

1). patcherfcb.exe triggers Win7's UAC (unless I rename to P.EXE)
2). strupr() is not ANSI C (among other warnings)
3). because of excess whitespace in *.PAT, FreeDOS FC output won't work here
4). *printf() functions are overkill here
5). TinyC (Win32) might give smaller output (here it gives 5 kb vs. 27 kb)

roytam

23.02.2025, 03:37

@ Rugxulo

binhack, bytefix

> > > I had my own BINHACK.C on MetaDOS, with examples, that worked
> similarly,
> > > primarily run via DJGPP build of PICOC.
> >
> > yeah, but I want `--dry-run` and `--reverse` and run on win32(running on
> > DOS is extra for me) so patcherfcb is easier for me to hack on.
>
> PicoC has obvious limitations (although runs on other OSes too), but my
> particular source is still ANSI C, so it compiles file with OpenWatcom for
> Win32. Also, it can reverse patches.
>
> Not trying to nitpick or complain, but ...
>
> 1). patcherfcb.exe triggers Win7's UAC (unless I rename to P.EXE)
> 2). strupr() is not ANSI C (among other warnings)
> 3). because of excess whitespace in *.PAT, FreeDOS FC output won't work
> here
> 4). *printf() functions are overkill here
> 5). TinyC (Win32) might give smaller output (here it gives 5 kb vs. 27 kb)

yeah I know TinyC can produce smaller EXE, but it depends on MSVCRT.DLL which doesn't available in NT 3.10.

Back to the board
Thread view  Mix view  Order
22287 Postings in 2062 Threads, 399 registered users, 217 users online (1 registered, 216 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum