I believe what you are looking for is units.

Units are a great main-stay of the Pascal and Object Pascal languages. All you simply have to do to use them is

[pascal]uses
TheNameOfYourNewUnit;[/pascal]

and you're ready to go.

More than one unit...

[pascal]uses
FirstUnit, SecondUnit;[/pascal]

Easy as pi.

As far as making your game more 'modular' I'd recommend taking a look at OOP. (Object Pascal being of the best at this!)

The idea of OOP is that everything in your game is made into an object. Each object in your game is of a specific class. An easy way to think about this concept is that all your game objects are like ships and each of them of a specific type of ship, which is your class.

Each object has a way to be made with a constructor and unmade with a destructor. There are basically functions and procedures as you learn from Standard Pascal only they are for the purpose of creating and managing your objects.

The coolest part of OOP is that each class can be a parent of a new class. ie.

[pascal]type
TSon = class(TDad)
StuffInside: Integer;
// etc...
constructor BeMade(stuff: Boolean);
destructor BeUnmade(stuff: Integer);
end;[/pascal]

See? Thats your basic object class definition. Easy stuff isn't it? You can have as mand constructors/destructors and all that fun gooie stuff inside as you like, it's your object!

Cool thing is that TSon will have everything from TDad as well, so if there are constructors, etc in TDad TSon can use them. TObject is the most basic of object classes though. Think of it like a base class.

Anyhow it can get a lot more complex than that, but I figured it would give you an idea of what OOP would do for you in making things more modular and flexible.

If some of this went over your head don't worry, just grab a good book that probably explains it a lot better than I have.