I don't have much idea about Mac. There is Lazarus for Mac. It is like Delphi for windows. You can start a new project. Place a button on the form, double click on the button and try the code bellow:
//Start of code
procedure TForm1.Button1Click(Sender: TObject);
var
AFile, BFile, CFile: TStringList;
i: integer;
Begin
AFile:= TStringList.Create;
BFile:= TStringList.Create;
CFile:= TStringList.Create;
AFile.LoadFromFile('afile.txt'); // Path to File: A
BFile.LoadFromFile('bfile.txt'); // Path to File: B
//Take the larger file here. Assume AFile is bigger than BFile.
For i := 0 to (AFile.Count - 1) Do
//To do opposite "if BFile.IndexOf(AFile[i]) > -1 then"
if BFile.IndexOf(AFile[i]) = -1 then
CFile.Add(AFile[i]);
CFile.SaveToFile('cfile.txt'); // Save the result File as: C
AFile.Free;
BFile.Free;
CFile.Free;
ShowMessage('OK');
End;
//End of code
After entering the code click on Run -> Run, or press F9
Best of luck :)