In Carcassi's Arpeggio exercises (for guitar) there are passages like this:
Do these half notes are connected with eighth notes? What does the half notes with flag means?
BTW, how to include these in abc notation?
There are no half notes with flags here. Notationally, there are two voices. The lower voice is moving in half notes. The half notes have downward-pointed stems to indicate that they belong to the lower voice, but these are somewhat hard to notice because of the X marks. These half-note stems have no flags.
The upper voice is notated in eighth note implied triplets, with the first of each group of six notes in unison with the coinciding half note. The note head is therefore elided.
They are arpeggios, and the minims (2 beat notes/half notes) are a sort of accompaniment, being played and kept hold of, so they continue to sound, until the next one gets played.
It's common to actually hold down the whole chord (all the notes involved) and play them so they all continue to ring out. Normally, each would be stopped in time to play the next, which is technically how they're written, but the pieces sound better and more cohesive when it all blends together.
So - the first bar would hold an open C chord, while the second would be an open G7 chord.
Since there are dots (. .. ...) under the other notes, indicating index(.) middle (..) and ring (...) fingers of picking hand, I guess the (x) will indicate thumb - which is what most people would use for a bass note - on lower strings - anyway.