I write them with Delphi 6. I believe you can get the Personal Edition for free, certainly the one I am using came free with PCPlus.
They are not "patches", but DLLs (which are like exes but their functions can be accessed by other programs / DLLs) which DBP can use like normal DBP commands. When it compiles the program, if you use a command contained in this DLL, it packs it into the exe and replaces your written command, eg "SCTOASCII", with a link to your DLL command.
The Delphi source code looks something like this:
uses Windows,SysUtils;
{$R 'project.res' 'project.rc'}
function MyFunction():returntype:cdecl;
begin
// Code here
end;
exports
MyFunction;
end.
The project.res file is automatically created, the project.rc file tells DBP which DB code command (MY FUNCTION) links up with which DLL command (MyFunction)
project.rc:
STRINGTABLE
{
1, "MY FUNCTION%L%MyFunction%"
}