Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
rr(R)

Homepage E-mail

Berlin, Germany,
20.11.2017, 00:23
 

UPXDUMP version 19-NOV-2017 available (Announce)

I, Robert Riebisch, have released UPXDUMP version 19-NOV-2017.

Reasons for the update: I was just curious to review my 8-year old code and it ended up with some fixes and a Win32 console version. :-P

Home page & download: http://www.bttr-software.de/upxdump/

Rugxulo(R)

Homepage

Usono,
21.11.2017, 01:38

@ rr

UPXDUMP version 19-NOV-2017 available

> I, Robert Riebisch, have released UPXDUMP version 19-NOV-2017.
>
> Reasons for the update: I was just curious to review my 8-year old code and
> it ended up with some fixes and a Win32 console version. :-P

I do find this tool useful and use it occasionally. And yes, a Win32 .EXE is also good to have (instead of having to load DOSBox just for this).

But I do wonder why you have two separate DOS .EXEs, though. If you wanted LFN support, you could use i8086-msdos cross-target, which supports it. Of course, the .EXE would be bigger than bare-bones TP, but only floppy users would complain. (Yes, we could probably argue that LFNs need 386+ in almost all environments anyways. Not sure, ROM DOS claims "186", but I don't know if that is the LFN version. Also, I think StarLFN could maybe be reassembled for 8086 with a few small tweaks, too.)

Heck, you could (in theory) just compile with Virtual Pascal and use the DOS .EXE as stub. That way you'd only have one main .EXE, but it would transparently run in DOS and Windows environments. (Remember when that wasn't necessary? Sigh.)

Anyways, since I'd already mirrored the previous version for us, I've gone ahead and updated it to have this latest version. I assume that's okay with you? (GPL!) :-P

rr(R)

Homepage E-mail

Berlin, Germany,
21.11.2017, 23:44

@ Rugxulo

UPXDUMP version 19-NOV-2017 available

> I do find this tool useful and use it occasionally. And yes, a Win32 .EXE
> is also good to have (instead of having to load DOSBox just for this).

So at least one user under the sun. ;-)

> But I do wonder why you have two separate DOS .EXEs, though. If you wanted
> LFN support, you could use i8086-msdos cross-target, which supports it. Of
> course, the .EXE would be bigger than bare-bones TP, but only floppy users
> would complain. (Yes, we could probably argue that LFNs need 386+ in almost
> all environments anyways. Not sure, ROM DOS claims "186", but I don't know
> if that is the LFN version. Also, I think StarLFN could maybe be
> reassembled for 8086 with a few small tweaks, too.)

1) I still love my tiny Turbo Pascal.
2) IIRC i8086-msdos cross-target is new to Free Pascal 3.x, but I used 2.4.0, because I ran out of time. Feel free to experiment and tell me (us) the results.

> Heck, you could (in theory) just compile with Virtual Pascal and use the
> DOS .EXE as stub. That way you'd only have one main .EXE, but it would
> transparently run in DOS and Windows environments. (Remember when that
> wasn't necessary? Sigh.)

Running XP x86 here, so no problem at all. :-D

> Anyways, since I'd already
> mirrored
> the previous version for us, I've gone ahead and updated it to have this
> latest version. I assume that's okay with you? (GPL!) :-P

Honestly? I was looking forward to that moment! :-P

Btw:
1) Why is Insight mirrored at https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/devel/tools/insight/ and not at 'https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/devel/debug(gers)/insight/'?
2) lib-sk32.zip is in 'tools' too. Why not 'lib' or 'librarians'? (We have 'make' and 'link'!)

Rugxulo(R)

Homepage

Usono,
22.11.2017, 07:23

@ rr

UPXDUMP version 19-NOV-2017 available

> > But I do wonder why you have two separate DOS .EXEs, though. If you wanted
> > LFN support, you could use i8086-msdos cross-target, which supports it.
> > Of course, the .EXE would be bigger than bare-bones TP, but only floppy
> > users would complain.
>
> 1) I still love my tiny Turbo Pascal.

I don't blame you.

Anyways, VP21 doesn't like "inline" (because it has, limited, inline functions). So you'd need a more portable SwapEndian func. Also, some things by default are the wrong size, e.g. bytes_read for BlockRead would be longint instead of word. (Maybe {&Use32+} would avoid that? Bah, I don't have VP installed on this laptop anyways.)

Even ppcross8086 (in default Small model) doesn't like this (where "buf: Pointer"):

> upxdump.pas(126,7) Warning: Conversion between ordinals and pointers is not portable
> upxdump.pas(126,22) Error: Can't take the address of constant expressions
>
> Inc(Longint(buf), 4); { 4 }

But it shuts up if you use "-WmLarge" instead. The resulting .EXE is roughly 49 kb (or 19 kb UPX'd). But I think it has some small discrepancies reporting UPX filters used.

So this may need a further look. It may not be quite as obvious as I presumed.

> 2) IIRC i8086-msdos cross-target is new to Free Pascal 3.x,

Yes, "new" from almost two years ago, in Nov. 2015. :hungry:

> but I used 2.4.0, because I ran out of time. Feel free to experiment and
> tell me (us) the results.

It may not be worth the hassle, just telling you out of curiosity and completeness.

> > Heck, you could (in theory) just compile with Virtual Pascal and use the
> > DOS .EXE as stub. That way you'd only have one main .EXE, but it would
> > transparently run in DOS and Windows environments. (Remember when that
> > wasn't necessary? Sigh.)
>
> Running XP x86 here, so no problem at all. :-D

Bah, it would probably get flagged by Avast. Trying my own dual file like that does get scanned but it eventually lets it run anyways. Renaming the file, just to trick it, and now it says "IDP.ARES.Generic, Move to Virus Chest", ugh! (This file only reads text files, doesn't do anything else except simple stdin+stdout writes.)

But if even FPC gets flagged, then VP isn't worse, just equally as "bad". :-P

> Btw:
> 1) Why is Insight mirrored at
> https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/devel/tools/insight/
> and not at
> 'https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/devel/debug(gers)/insight/'?
> 2) lib-sk32.zip is in 'tools' too. Why not 'lib' or
> 'librarians'? (We have 'make' and 'link'!)

FreeDOS usually tries not to break potential links (however few they may be). But sometimes things can get renamed or moved around. There's not much pressing need to do so (yet). I would probably ask Jim Hall (and/or Jerome, Mateusz) for advice before doing any such restructuring.

marcov(R)

22.11.2017, 11:29

@ Rugxulo

UPXDUMP version 19-NOV-2017 available

> Even ppcross8086 (in default Small model) doesn't like this (where "buf:
> Pointer"):
>
> > upxdump.pas(126,7) Warning: Conversion between ordinals and pointers is
> not portable
> > upxdump.pas(126,22) Error: Can't take the address of constant
> expressions
> >
> > Inc(Longint(buf), 4); { 4 }

There is an identifier for that:
- ptrint is the integer equivalent of pointer for all FPC2+ versions.
- intptr is the same, but Delphi XE2+ (and added as alias in FPC 2.6.0 or so)

So probably it is a matter of putting

{$ifndef fpc}
type ptrint = longint;
{$endif}

somewhere central and then doing

inc(ptrint(buf),4);

The situation to support both Delphi 64-bit AND to support old FPC (2.4) versions is more complicated, as well as TP3 that iirc could do small mm?

Back to the board
Thread view  Mix view  Order
15192 Postings in 1365 Threads, 250 registered users, 13 users online (0 registered, 13 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum