sandhi contraction: ayaṃ + assa
Analysis. ayaṃ (demonstrative pronoun, nominative singular masculine, 'this') + assa (genitive singular masculine of tad, 'of that/him'). The final -ṃ of ayaṃ is elided before the vowel opening assa, giving ayamassa in sandhi.
Etymology. ayaṃ is a proximal demonstrative (related to Sanskrit ayaṃ); assa is the genitive of the remote demonstrative pronoun (Sanskrit tasya, from the root *tad-, which enters English 'that' and Latin 'is'). The spatial contrast between 'this' (near speaker) and 'that' (remote) drives the two pronouns.
Meanings from the Digital Pāḷi Dictionary; morphology and etymology by Claude.
Lite mode — plain HTML for e-readers and old browsers. Full version