next up previous contents
Next: The sections Up: Anatomy of a unit Previous: reading ppufiles

The Header

The header consists of a record containing 24 bytes:

tppuheader=packed record                                                      
    id       : array[1..3] of char; { = 'PPU' }                                 
    ver      : array[1..3] of char;                                             
    compiler : word;                                                            
    cpu      : word;                                                            
    target   : word;                                                            
    flags    : longint;                                                         
    size     : longint; { size of the ppufile without header }                  
    checksum : longint; { checksum for this ppufile }                           
  end;

The header is already read by the ppufile.open command. You can access all fields using ppufile.header which holds the current header record.

field

description
id this is allways 'PPU', can be checked with function ppufile.CheckPPUId:boolean;
ver ppu version, currently '015', can be checked with function ppufile.GetPPUVersion:longint; (returns 15)
compiler compiler version used to create the unit. Doesn't contain the patchlevel. Currently 0.99 where 0 is the high byte and 99 the low byte
cpu cpu for which this unit is created. 0 = i386 1 = m68k
target target for which this unit is created, this depends also on the cpu! For i386:
0 Go32v1
1 Go32V2
2 Linux-i386
3 OS/2
4 Win32
For m68k:
0 Amiga
1 Mac68k
2 Atari
3 Linux-m68k
flag the unit flags, contains a combination of the uf_ constants which are definied in ppu.pas
size size of this unit without this header
checksum checksum of the interface parts of this unit, which determine if a unit is changed or not, so other units can see if they need to be recompiled


next up previous contents
Next: The sections Up: Anatomy of a unit Previous: reading ppufiles

Michael Van Canneyt
Thu Sep 10 14:04:11 CEST 1998