Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

UPXDUMP version 19-NOV-2017 available (Announce)

posted by marcov(R), 22.11.2017, 11:29

> 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?

 

Complete thread:

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