EDINBURGH -- Muriel Spark flew in from Italy the other day to have her portrait painted for Scottish posterity, and we had an evening of minor nostalgia. She and I both ingested our semi-colons at the Edinburgh school in which Miss Jean Brodie taught. It was a long time ago. If the art master was getting up to all that, nobody told me at the time: he has since grown old and slipped off the mortal coil without, presumably, seeing Robert Stephens in the film ro~le. Those were the days when a telephone ringing at 2 in the morning in Edinburgh could herald a summons from Sir Compton Mackenzie, holding court in a four-poster bed attended (from outside the bed) by literati: Eric Linklater, Maurice Lindsay, George Bruce. Those were the days when Edinburgh pubs were stuffed full of poets.

They still are. In Glasgow they build the pubs round them. And in the pubs (and the tenements and the villas and the arts clubs) are not only poets but writers of film scripts and novels and plays, all of them arguing about something. Outside the cities they argue too, but more philosophically, and frequently in Gaelic. Then they publish. Over a thousand books by Scottish-based or Scottish-born writers were published last year. I have a large number of them presently lodged on the carpet (the books, not the authors) in eight plastic mop buckets: competitors for a supreme Scottish literary prize of

5,000 established this year by a firm that makes biscuits. I don't yet know what the winning work is likely to be, or even what language it will be written in. I see from my mop buckets that it could be either in English, in Gaelic or in the Scottish vernacular. In Gaelic, for example, we have a number of good and sensitive writers, and one named Sorley MacLean who ranks with the major European poets of this century. We also have a Gaelic author, Iain Crichton Smith, who is a grand master of the English novel as well.

They are outnumbered, of course, by the non-Gaels. Apart from expatriates like Muriel Spark and "Flashman" George MacDonald Fraser and Alistair Maclean (whose last thriller is now being pummeled into shape for posthumous publication), the mop buckets show that the resident scribes are split between the cheery brashness of the urban west, centered on Glasgow, and the cooler academic and literary climate of the east, with particular mention of this perjink capital.

Separated by 40 miles, Glasgow and Edinburgh have always bared their teeth when smiling at one another over the cultural divide. Edinburgh has the International Festival of Music and the Arts; Glasgow has the Burrell Collection and the Scottish Opera. Edinburgh has writers in Lallans, which is the classic form of vernacular Scots. It produces books on the subject, as does Aberdeen. (One of the best sellers of all time has been the Concise Scots Dictionary in one volume, which is the kind of book you pick up to consult, and spend two hours chortling into. It is different from the Dictionary of the Older Scottish Tongue which has in any case only got to Part 36, Quently to Quhytclem). Glasgow has writers in vernacular Scots, known locally as The Patter. A small paperback guide to The Patter, diffidently put on sale by Glasgow District Libraries last year, turned into a roaring best-seller. But anyone brought up in Glasgow (or married to a Glaswegian, I can assure you) doesn't need a dictionary; one acquires the argot like breathing.

BEFORE WE get into all that, I should say that there are, of course, douce writers in English spread across the central belt and beyond. Edinburgh has David Daiches (also a world expert on Robert Burns) to celebrate its splendors between scholarly covers; Allan Massie, accomplished reviewer, has produced piercingly well-written books on Augustus and the imperial Caesars; Joan Lingard, reared in Belfast, is a storyteller with a shrewd and affectionate eye for the plight of women in ordinary middle-class life. Rosalind K. Marshall, an elegant eminence in the Scottish National Portrait Gallery has just added a book on Mary Queen of Scots to the excellent biography she has already produced on Mary of Guise -- both adorned with the kind of illustrations only a museum expert finds easy to capture. And of course, there is the classicist Norman MacCaig, holder of one of the rare Queen's gold medals for his wry, clear, warm-hearted poetry, and a shattering teller of party jokes. Edinburgh also publishes a quantity of polemic in English about the circumstance of sharing an island with the English. My favorite is Paul H. Scott's book, simply titled In Bed With an Elephant.

And outside Edinburgh, I have to admit there's a lot going on. On the east coast lives the bearded Douglas Dunn, now in his mid-forties, who burst into fame with "Elegies," poems written after the death of his wife, which won, among other prizes, the prestigious national Whitbread Award, worth over

17,000. In the far north, George Mackay Brown crafts his poems and prose to tell of the islands about him. An opera drawn from his work opened the annual St. Magnus Festival in Orkney one evening last week. I attended, entranced with hundreds of others, while the perpetual midsummer light glowed upon singers and orchestra through the cathedral's rose window. South and west lives Naomi Mitchison, that brilliant Haldane who has just added a book on Orkney to the flood of other writing which has marked her 90 years. On the west too, lives one of our clutch of Irishmen, Bernard MacLaverty, author of Lamb and Cal, the latter now filmed as a spare understated love story set in Northern Ireland. (And, of course, an eminent Irishman also in our midst is Derry Jeffares, the recognised source of all wisdom on Yeats).

And so to Glasgow, and Edwin Morgan the poet, veteran novelist Robin Jenkins and new novelist Ronald Frame -- and those who write quite differently from everyone else, because they use both English and the language of Glasgow. The Patter, if you like. Wild, angry, funny, explosive books about urban life which have burst into print in the last few years, and led some critics to talk of a cult of new Glasgow writers -- Alasdair Gray, Jim Kelman, Tom Leonard, Liz Lochhead, Agnes Ownes, William McIlvanney, Stephen Mulrine -- comparable to the cult of international Scots rock bands: Simple Minds, Big Country.

The affinity, in fact, is with art rather than music. Alasdair Gray was a professional artist for 30 years before his amazing, prize-winning Lanark, and does the artwork for all his novels. Cutting, wildly funny, Liz Lochhead's poems, plays and revues also come by courtesy of early training in the School of Art, Glasgow. So does the work of John Byrne, whose Tutti Frutti series about an aging rock band convulsed BBC television last year, and whose former tutors remember him as one of the most gifted young artists in decades.

Many of these writers were ushered into print for the first time by an equally new crop of small Scottish publishers, led by Canongate and Polygon and mostly in Edinburgh. But small publishers don't have the marketing and distribution facilities that a best seller needs and Canongate, having nursed Alasdair Gray, have had to see him move elsewhere to be published. Ian Rankin, after his successful The Flood has now also sold his work to the south. Now Canongate has tried to solve the problem by joining an established English group publisher, Musterlin. Local authors and well-wishers wait to see what will result.

It ought to be noted, however, that once every two years bookish London -- indeed, the bookish world -- comes to Scotland for a fortnight. In August, the most beautiful garden square in Europe will house the Edinburgh Book Festival, Britain's biggest offering for the reader, not for the trade. Ten thousand different titles will be on display -- and can be bought -- in a series of glamorous tents. There is a Theater Tent, a Children's Tent and a Spiegeltent, which is a Dutch dance salon of the 1920s converted to a cafe' bar and folk-singing center and the venue, in the second week, of a jazz festival. One hundred and ninety authors are coming, and Acker Bilk. Maya Angelou is coming, and Marilyn French, and Hunter Thompson. Clowns are coming. A quarter of the Festival is devoted to children because they are the readers of next year, and we spend a lot of time, in these parts, dressing up in funny hats and shunting book trains about to tempt youngsters to read. We have some good children's authors, too. Some are in Glasgow. Well, if you must, some of the best, like Lavinia Derwent, are in Glasgow. I will even add, since you are twisting my arm, that while our exquisite Adams-built Square is being graced by the Edinburgh Book Festival, and Acker Bilk, Glasgow is preparing for something specially for children, called The Great Glasgow Book Bonanza 1988. But that's Glasgow for you. Crude.

Dorothy Dunnett is the author of many historical novels, including "Niccolo' Rising" and the forthcoming "Spring of the Ram."