Terephthalic acid (TPA) deposited on Si(111)-7 x 7, Si(111)-root 3 x root 3-Ag and Ag(111) has been studied as a model system to understand how much passivated semiconductor surfaces differ from semiconductor and metal surfaces in respect of supramolecular self assembly. By scanning tunneling microscopy it is found that TPA molecules do not form any ordered supramolecular structure on the pristine semiconductor surface, due to a strong molecule-substrate interaction. On the contrary, TPA has a weaker interaction with Si(111)-root 3 x root 3-Ag, leading to the formation of an ordered supramolecular layer stabilized by carboxyl hydrogen bonds. These structures are very similar to the supramolecular layer of TPA formed on Ag(111), indicating that the two substrates behave similarly for what concerns the adsorption of functional organic molecules. However, the deposition of Fe on the TPA layers on Si(111)-root 3 x root 3-Ag does not induce the formation of two-dimensional metal-organic frameworks which, on the contrary, readily develop on Ag(111). Possible origins of this difference are discussed.