100% found this document useful (4 votes)
22 views61 pages

The Story of Wamba Julian of Toledo S Historia Wambae Regis Julianus PDF Download

The document is about 'The Story of Wamba', which is Julian of Toledo's 'Historia Wambae regis', translated by Joaquín Martínez Pizarro. It includes an introduction, notes, and a translation of the historical text, focusing on the Visigothic period in Spain. The publication is by The Catholic University of America Press and includes bibliographic references and an index.

Uploaded by

bxkxrmlkq903
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
22 views61 pages

The Story of Wamba Julian of Toledo S Historia Wambae Regis Julianus PDF Download

The document is about 'The Story of Wamba', which is Julian of Toledo's 'Historia Wambae regis', translated by Joaquín Martínez Pizarro. It includes an introduction, notes, and a translation of the historical text, focusing on the Visigothic period in Spain. The publication is by The Catholic University of America Press and includes bibliographic references and an index.

Uploaded by

bxkxrmlkq903
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

The Story of Wamba Julian of Toledo s Historia

Wambae Regis Julianus pdf download

https://ebookname.com/product/the-story-of-wamba-julian-of-
toledo-s-historia-wambae-regis-julianus/

Get the full ebook with Bonus Features for a Better Reading Experience on ebookname.com
Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Toledo Nanochess The Commented Source Code Oscar Toledo


Gutierrez

https://ebookname.com/product/toledo-nanochess-the-commented-
source-code-oscar-toledo-gutierrez/

The Book of Baphomet Julian Vayne

https://ebookname.com/product/the-book-of-baphomet-julian-vayne/

Heidegger s Philosophy of Art 1st Edition Julian Young

https://ebookname.com/product/heidegger-s-philosophy-of-art-1st-
edition-julian-young/

Greek Reflections on the Nature of Music 1st Edition


Flora R. Levin

https://ebookname.com/product/greek-reflections-on-the-nature-of-
music-1st-edition-flora-r-levin/
Life at the Limits Organisms in Extreme Environments
1st Edition David A. Wharton

https://ebookname.com/product/life-at-the-limits-organisms-in-
extreme-environments-1st-edition-david-a-wharton/

Tools of Violence Guns Tanks and Dirty Bombs 1st


Edition Chris Mcnab

https://ebookname.com/product/tools-of-violence-guns-tanks-and-
dirty-bombs-1st-edition-chris-mcnab/

Code of Practice for Programme Management In the Built


Environment 1st Edition Ciob (The Chartered Institute
Of Building)

https://ebookname.com/product/code-of-practice-for-programme-
management-in-the-built-environment-1st-edition-ciob-the-
chartered-institute-of-building/

The poetics of DNA 1st Edition Judith Roof

https://ebookname.com/product/the-poetics-of-dna-1st-edition-
judith-roof/

Before the Singing Structuring Children s Choirs for


Success 1st Edition Barbara Tagg

https://ebookname.com/product/before-the-singing-structuring-
children-s-choirs-for-success-1st-edition-barbara-tagg/
The Godfather and Sicily Power Honor Family and Evil
1st Edition Raymond Angelo Belliotti

https://ebookname.com/product/the-godfather-and-sicily-power-
honor-family-and-evil-1st-edition-raymond-angelo-belliotti/
The Story of Wamba
The Story of Wamba

‘ Julian of Toledo’s Historia Wambae regis

translated with an introduction and notes by


Joaquín Martínez Pizarro

The Catholic University of America Press


Washington, D.C.
Copyright © 
The Catholic University of America Press
All rights reserved

The paper used in this publication meets the minimum requirements of American
National Standards for Information Science—Permanence of Paper for Printed
Library Materials,  .-.

   -- 


Julianus, Saint, Bp. of Toledo, d. .
[Historia Wambae regis. English]
The story of Wamba : Julian of Toledo’s Historia Wambae regis / translated
with an introduction and notes by Joaquín Martínez Pizarro.— st ed.
p. cm.
Includes bibliographic references and index.
 : ---- (cloth : alk. paper)
 : --- (cloth : alk. paper)
. Wamba, King of the Visigoths, d.  or . . Spain—History—Gothic
period, –. . Julianus, Saint, Bp. of Toledo, d. . Historia Wambae
regis. I. Martínez Pizarro, Joaquín, – II. Title.
. 
´.—dc

A mi hermana Maria Gracia y a mi amigo Gérard Lewitus
Contents

List of Illustrations / ix
Acknowledgments / xi
Abbreviations / xiii

Part I. Introductory Essay


Introduction to the Historia Wambae regis 
History 
. Chindasvind—Reccesvind—Wambam
. From Toledo to Nîmes and Backm
. Julian and Wamba: Two Careersm
Literature 
. Authorshipm
. The Four-Text Sequencem
. Sources and Modelsm
Epistola Pauli perfidi / Historia and Insultatio /
Iudicium /
. Words and Imagesm
. The Historiam
Design / The Refusal of Power (Hist. – and ) /
The King at the Head of His Armies (Hist.  and ) /
The End of Usurpers (Hist.  and –) /
Politics of Clemency (Hist. –) /
. The Insultatiom
Design / Personification: Mother and Monster /
The Children of Gallia and Hispania /
. Iudicium: The Scene of Justicem
. Conclusion (largely conjectural): Julian at Workm
viii Contents
Part II. Translation of Julian of Toledo’s
Historia Wambae regis
The Letter of Paul the Traitor 
The Book of the History of Gallia 
The Humble Historian’s Invective Against
the Usurpation of Gallia 
Judgment Pronounced Against the Treachery
of Usurpers 

Works Cited / 


Index / 
Illustrations

. Votive crown of Reccesvind, from the Guarrazar treasure / xv

. Church of San Juan de Baños (), province of Palencia / xvi

. Nîmes: the castrum arenarum today / xvi

. Nîmes: an interior view of the castrum arenarum / xvii

. Clausurae/Les Cluses: fortifications overlooking the Via


Domitia (fourth century ..) / xvii

. Itinerary of Wamba’s campaign / xviii

ix
Acknowledgments

I wish to thank Paul Meyvaert for constant encouragement,


Gérard Lewitus and family, in Montpellier, and Héliette Paris, in
Paris, for years of summertime hospitality and stimulation, Profes-
sor Hagith Sivan, of the University of Kansas, for letting me read
in typescript her valuable study on the Jews of Visigothic Spain,
since published in the Révue des études juives, Georges Castellvi, of the
Université de Perpignan, for information on the fortifications at
Clausurae/Les Cluses and for the photograph of the site repro-
duced here.
David McGonagle and Susan Needham of the Catholic Uni-
versity of America Press dealt with my manuscript and with me
with exemplary patience and efficiency.
My New York friends Gabriel Pérez, Stacey Olster, Jackie
Geller, Cynthia Capriata, Joshua Sherman and Jorge Martin did
their best to provide me with a social life while I was writing this
book, and I love them for it.

xi
Abbreviations

HWR: Historia Wambae regis

Ep.: Epistola Pauli perfidi, qui tyrannice rebellionem in Gallias


fecit Wambani principis magni

Hist.: Historia excellentissimi Wambae regis de expeditione et


victoria, qua revellantem contra se provinciam Galliae celebri
triumpho perdomuit

Ins.: Insultatio vilis storici in tyrannidem Galliae

Iud.: Iudicium in tyrannorum perfidiam promulgatum

CCSL: Corpus christianorum. Series latina. Turnhout: Brepols, –

Claude, Adel, Kirche und Königtum: Dietrich Claude, Adel, Kirche und
Königtum im Westgotenreich. Sigmaringen: Thorbecke, 
CSEL: Corpus scriptorum ecclesiasticorum latinorum. Vienna, –

Díaz y Díaz: Pedro Rafael Díaz y Díaz, “Historia del Rey Wamba
(Traducción y Notas),” Florentia Iliberritana  (), –

HG: Isidori ivnioris episcopi hispalensis historia Gothorvm Wandalorvm Sveborvm


ad A. DCXXIV, ed. Theodor Mommsen. MGH AA .. Berlin:
Weidmann, 
Levison: Historia Wambae regis auctore Iuliano episcopo toletano, ed. Wilhelm
Levison. MGH SSRM V. ed. Wilhelm Levison. MGH SSRM, V. Pas-
siones vitaeque sanctorum aevi Merovingici, ed. B. Krusch and W. Levison.
Leipzig: Hahn, 

xiii
xiv Abbreviations
LV: Leges Visigothorum, ed. Karl Zeumer. MGH LNG I.. Hanover:
Hahn, 

MGH: Monumenta Germaniae historica

AA: Auctores antiquissimi

Epist.: Epistolae

LNG: Leges nationum Germanicarum

SSRM: Scriptores rerum Merovingicarum

Panégyriques: Panégyriques latins, ed. Edouard Galletier.  vols. Paris: Les


Belles Lettres, –

PL: Patrologia latina, ed. J. P. Migne. Paris: –

Powers: Sister Theresa Joseph Powers, “A Translation of Julian of


Toledo’s Historia Wambae regis with Introduction and Notes.” M.A. dis-
sertation, The Catholic University of America. Washington, D.C., 
Prosopografía: L. A. García Moreno, Prosopografía del reino visigodo de Toledo.
Salamanca: Universidad de Salamanca, 

Reydellet, La royauté: Marc Reydellet, La royauté dans la littèrature latine de


Sidoine Apollinaire à Isidore de Seville. Bibliothèque des écoles françaises
d’Athènes et de Rome . Rome: École française de Rome, 
Settimane: Settimane di studio del centro italiano di studi sull’alto medioevo. Spole-
to: Centro italiano di studi sull’ alto medioevo, –
Teillet, Des Goths: Suzanne Teillet, Des Goths à la nation gothique. Les origines
de l’idée de nation en Occident du Ve au VIIe siècle. Paris: Les Belles Lettres,


Topographie chrétienne: Paul-Albert Fevrier and Xavier Barral i Altet,


Topographie chrétienne des cités de la Gaule VII. Province ecclésiastique de Narbonne
(Narbonensis prima). Paris: De Boccard, 
Vives: Concilios visigóticos e hispano-romanos, ed. José Vives. Barcelona and
Madrid: Consejo superior de investigaciones científicas, 
Votive crown of Reccesvind from the Guarrazar treasure.
Photo courtesy of Museo Arqueológico Nacional, Madrid.

xv
Church of San Juan de Baños (), province of Palencia. Photo courtesy
of Foto Marburg/Art Resource, NY.

Nı̂ mes: the castrum arenarum today. Photo courtesy of Vanni/Art Resource, NY.

xvi
An interior view of the castrum arenarum. Photo courtesy of Vanni/Art Resource,
NY.

Clausurae/Les Cluses: fortifications overlooking the Via Domitia.


Photo courtesy of Georges Castellvi.

xvii
.
.
...
Nîmes
IA
LL Maguelone
GABéziers
FRANCIA

in partibus
Cantabriae
.
. . . Pamplona
HISPA
NIA
Narbonne

Llivia . ... `
Ultrere
Collioure
Clausurae

.
Calahorra Gerona
Huesca
Rio
Ebr Barcelona
o

Itinerary of Wamba’s campaign.

xviii
‘ Part I

Introductory Essay
Introduction to the Historia Wambae regis

The Historia Wambae regis (HWR) of Julian of Toledo is a se-


quence of four closely related prose texts which can be regarded as
a single composition. Elaborate incipits and explicits as well as the
authority of the two main branches of the entirely Spanish manu-
script tradition (derived from the Soria and Oviedo manuscripts)
indicate that the parts stand in the following order:
a. The Epistola (Ep.) opens the series and is the only one of its
four elements to lack an explicit. It presents itself as a letter of
challenge from the usurper Paul to Wamba, Visigothic king of
Spain (–), daring him to cross the Pyrenees and meet his ri-
val at the fortress of Clausurae in Visigothic Gaul (Gallia), where
they will fight for the Eastern kingdom, which Paul claims as his
own and which comprises most of Gallia and part of the Tarraco-
nensis.
b. The Historia proper (Hist.), by far the longest part of the se-
quence, is a third-person narrative that opens with Wamba’s election
to the throne and royal unction at Toledo in  and goes on to
cover in some detail a rebellion against him that arose the following
year in Gallia, led by Hildericus, the count of Nîmes, and later by
Wamba’s own general, Paul, who brought some leaders of the Tar-
raconensis into the conspiracy. The Historia describes Wamba’s vic-
torious campaign against the usurper, which ends with the taking of
Nîmes by the Spanish forces, followed by a public trial of the lead-
ers of the rebellion and Wamba’s triumphal return to Toledo.
c. The Insultatio (Ins.) that follows is a highly rhetorical invective
or vituperation addressed by a “humble historian” (most likely the


 Introductory Essay
narrator of the Historia) to defeated Gallia, personified as the moth-
er or nurse of the insurrection. This oration also contains what can
be described as a balance-sheet of the historical relations between
Spain and its Gallic enclave, characterized by magnanimity and pro-
tection on one hand and by systematic betrayal on the other.
d. The Iudicium (Iud.), which closes the series, takes the form of
a third-person narrative of Wamba’s campaign by a member of the
king’s palatine office who took part in the expedition. It goes over
the events covered in the Historia, adding lists of names of those in-
volved in the rebellion, and ends with an account of the trial of the
chief conspirators in the vicinity of Nîmes, which had been men-
tioned only in passing in the Historia.
The singularity of the HWR, which has discouraged literary
criticism, could be attributed to our fragmentary knowledge of
Visigothic literature but also, more speculatively, to a search for for-
mal originality on the part of the author, a motivation rarely ex-
pressed in seventh-century Europe. The Historia proper, the actual
narrative of the rebellion that begins with the death of Reccesvind
and the election of his successor and ends with Wamba’s pageant of
victory in Toledo, is in itself unprecedented. No other work of sec-
ular history in late antiquity and the early middle ages focuses in
this way on a single uprising or centers as the Historia does on the
event itself rather than its royal protagonist. No other work of the
period stylizes a military chronicle into this heroic and surprisingly
classical mold, to the point that the most commonly suggested
model has been the Sallustian monograph.1 And the sequence as a
whole, a series of four generically heterogeneous texts, is even more
anomalous.
The two chapters that follow are intended to reduce the appar-
ent singularity of the HWR by providing contexts for Julian’s work
. See Fontaine, “Die westgotische lateinische Literatur,” ; Berschin, Bi-
ographie und Epochenstil II, –; Collins, “Julian of Toledo and the Education
of Kings,” ; Brunhölzl, Geschichte I, .
Introduction to the Historia Wambae regis 
in political and literary history. Although the first chapter stresses
extra-literary features, and in particular the secular and religious
government of seventh-century Spain, and the second consists
largely of literary analysis and interpretation, the separation of
“History” and “Literature” is a purely pragmatic expository device.
A rigorous division of these two spheres would be impracticable,
especially for a narrative as closely implicated as the HWR in the
struggles of the period it describes.
The historical backdrop to Julian’s vivid account must be drawn
from the materials available for the period, which present very char-
acteristic limitations, but also exceptional strengths. They are essen-
tially prescriptive, consisting mostly of laws and of the acts of
church councils; the context they provide for any particular episode
is therefore an abstract and idealized one. But they have been pre-
served in uniquely full and systematic collections which, read his-
torically, with attention to changes, tensions, and internal contra-
dictions in their rulings, may help us to make political sense of
Julian’s appealing but isolated narrative, both for the events it
claims to represent and for the author’s aims in undertaking to por-
tray them.
Visigothic secular law goes back to the Code of Euric, com-
posed in the kingdom of Toulouse circa –, though the text
of the Code contains references to earlier written legislation of Eu-
ric’s father, Theoderic I (–). Euric’s son, Alaric II, published
a Breviary of Roman law. Whether or not these legal compilations
were used on a personal/national basis, Euric’s Code for the Visig-
oths and Alaric’s Breviary for their Roman subjects, remains a con-
troverted subject today.2 What seems certain is that they were in-
tended to replace all other laws on Visigothic territory. Later, King

. Most recently Harries, “Not the Theodosian Code,” , argues, “The
question .l.l. of whether Euric’s law was expected to be observed by Goths only
or by Romans and Goths is largely immaterial. It was a statement of what peo-
ple living in his dominions were expected to do; .l.l.”
 Introductory Essay
Leovigild (–) published a Revised Code (Codex revisus) based
on Euric’s and Alaric’s collections, which included and reformulat-
ed laws given since their time, after the loss of Gaul and the cre-
ation of the kingdom of Toledo. That Leovigild meant his Revised
Code to replace Euric’s Code and Alaric’s Breviary is made evident
by the fact that the former survives only in fragments and the latter,
copied all over Western Europe in the early middle ages as a source
for Roman law, can be found in Spain only in one manuscript of
the period, and that a palimpsest. That is more than was granted to
Leovigild’s own Revised Code, no copy of which is extant. His
laws, and those of his predecessors, are incorporated as antiquae in
the next great revision of the Visigothic law, the Book of Judg-
ments (Liber iudiciorum) published by Reccesvind in .3 In it new
laws, from Reccesvind’s father Chindasvind on, are attributed by
name to their givers, and this practice is continued in the last com-
prehensive revision, published by Ervig in .
Despite the cumulative nature of these collections, which pre-
serve earlier legislation only in revised form, and selectively, the
Book of Judgments presents a fairly transparent record of innova-
tions and shifting political imperatives. Conciliar acts were collect-
ed on a very different principle, set next to each other with their
differences and contradictions unreduced, and they call therefore
for another approach. The Spanish church had already held coun-
cils in Roman times, long before the arrival of the Visigoths. The
Collectio hispana, first assembled circa  in Seville and extant in its
later Iuliana () and Vulgata () versions, preserves, with many
other ecclesiastical documents, acts of the Spanish councils from
that of Iliberris (–) to Toledo XII and XVII, in addition to
acts of councils held in the Eastern empire, Gaul, and Africa.4 For
. But note a possible missing link, Chindasvind’s lost compilation of
– argued for in King, “King Chindasvind and the First Territorial Law-
Code.” King assumes that until that year Alaric’s Breviary and Leovigild’s Revised
Code would have been used as national/ethnic codes.
. See Martínez Díez, La colección canónica hispana I. Estudio, –.
Introduction to the Historia Wambae regis 
the present study, however, the acts of the general or national coun-
cils of Toledo, from Toledo III (), in which King Reccared an-
nounced the conversion of the Goths to Catholicism and the rejec-
tion of their traditional Arianism, to Toledo XII () and XIII
(), summoned by Wamba’s successor Ervig, are of particular im-
portance.
With Toledo III and the conversion, the very meaning of coun-
cils changes. Brought together by kings who, now orthodox, claim
the prerogative of summoning the bishops of their realm, these as-
semblies will function throughout the seventh century as the high-
est instance of ecclesiastical administration and legislation, but also
as a forum for dialogue and collaboration between the church and
the crown in a kingdom no longer riven by confessional differ-
ences.5 In , at Toledo VIII, King Reccesvind, in an attempt to in-
crease the power of the crown over the gathered bishops, intro-
duced three changes in the protocol of the councils, inspired by
elements already present in Toledo III, which are clearly reflected
from then on in conciliar acts. In the first place, at the opening of a
council a letter from the king (tomus) is read to the assembly, setting
an agenda for their deliberations, a list of issues on which the ruler
requires the counsel, the support, or even merely the assent of the
church. The sessions of the council, which follow, usually last sever-
al days and are largely concerned with subjects of exclusively eccle-
siastical interest, not covered by the tomus. The bishops’ decisions
on all matters are listed in the acts as numbered canons. Secondly,
courtiers from the palatine office are to attend the meetings of the
council and sign the acts at the end, after the bishops and abbots
have done so. Finally, a “law in confirmation of the council” (lex in
confirmatione concilii) is passed by the king, incorporating all or some
of the decisions of the council into the laws of the kingdom. A

. The Jews, as the only remaining non-Catholic group, were from then on
exposed to increasing discrimination by the law, and bore the brunt of this in-
terpenetration of church and state.
 Introductory Essay
sharp turn in church-state relations after Reccesvind and Wamba
became manifest at Toledo XII, when Ervig, soon to publish his
own recension of the Book of Judgments, preserved the conciliar
format introduced by Reccesvind, but asked the council in his tomus
to correct his laws or write new laws themselves.6
In secular legislation, the king is presented as the only source of
the law, the giver and creator of every ruling, as indicated by the
constant use of the first person plural of majesty (“our glory,” “our
reign,” “our peace”).7 His role in summoning the general councils
gave him also great influence over the deliberations of the assem-
bled clergy, an influence that he put to use on the matters submit-
ted in the tomus. But the very need for a law in confirmation of the
council indicates that, to the very end of the Visigothic kingdom,
conciliar acts were understood to proceed from an independent
spiritual instance that might cooperate with the crown and overlap
with it in many of its measures, but that was in no way to be iden-
tified or confused with the secular authority.

. Toledo XII, tomus (Vives, ): “De ceteris autem causis atque negotiis
quae novella conpetant institutionem firmari, evidentium sententiarum titulis
exaranda conscribite .l.l.”
. On this aspect of the laws, see King, Law and Society, chapter , “The
King and the Law.”
I. History

. Chindasvind—Reccesvind—Wamba
The narrative of Visigothic history is derived largely from non-
narrative sources, most of them law codes or the acts of church
councils. The abstract and normative character of Spanish history
before  can be traced to this circumstance, which makes it sound
very different from the history of Gaul or Italy in the same period.1
The chief narrative account, Isidore of Seville’s Historia Gothorum
(HG) which covers—however thinly—events from the first clash
of the Goths with the Roman empire in the Balkans in the middle
of the third century to the reign of Suinthila (–) and his
recovery of the last imperial territories in southeast Spain, has
played a decisive role in shaping the story of the Visigoths as we
know it today. If we think of it in terms of individual kings and
their achievements, this is because Isidore, filled with admiration
for Leovigild’s consolidation of the kingship (–) and of his
hold on the territory of the peninsula, as well as for Suinthila’s re-
conquest, cast the previous history of the Visigoths retrospectively
as directed and defined by royal policy.2 And yet there is consider-
able evidence that before Leovigild Visigothic kings had at best a
very imperfect control of the kingdom of Toulouse and later of

. Collins, “Julian of Toledo and the Education of Kings,” , sums up the


problem as follows: “.l.l. the bulk of this evidence is normative rather than de-
scriptive. It is concerned with what its author felt ought to be true about this
society, and has only limited applicability to the study of more concrete reali-
ties.”
. Cf. Reydellet, La royauté, .


 Introductory Essay
Toledo, and that kingship was an unstable and embattled institu-
tion, defined and redefined in conflicting ways by the ruler, the
Gothic nobility, and the clergy, and destined to remain a subject of
contention until the fall of the kingdom to the Arabs.
Isidore’s outline has also determined what historians regard as
the milestones or turning points of Visigothic history. If the retreat
from Gaul into Spain is the result of Frankish initiative and aggres-
sion (i.e. Alaric defeated by Clovis at Vouillé in ),3 Leovigild’s
construction of a powerful monarchy,4 and his son Reccared’s deci-
sion to have the Goths give up their Arianism and convert to the
Catholicism of the Hispano-Roman majority (at the Third Council
of Toledo in ),5 are royal policies that must be interpreted and
evaluated in any modern account of sixth-century Spain. One way
to do so would be to say that these measures address two overlap-
ping divisions in the population of the realm—that between Ro-
mans and Goths and that between Catholics and Arians6—and that
in attempting to erase them the Gothic rulers were acting to acquire
the loyalty and support of their largely Roman and Catholic popu-
lation in view of possible conflicts with Catholic powers, and
chiefly with their Frankish neighbors and the Byzantine empire. The
fate of the Ostrogoths in Italy had been taken as a lesson, at a point
when the Eastern empire still held possessions in Baetica and the

. HG  (ed. Mommsen, –): “Adversus quem Fluduicus (i.e. Clovis)


Francorum princeps Galliae regnum affectans .l.l. bellum movit fusisque
Gothorum copiis ipsum postremum regem (i.e. Alaric) apud Pictavis supera-
tum interfecit.”
. HG  (ed. Mommsen, ): “Levvigildus .l.l. ampliare regnum bello et
augere opes statuit. studio quippe exercitus concordante favore victoriarum
multa praeclare sortitus est.”
. HG – (ed. Mommsen, ): “.l.l. in ipsis enim regni sui exordiis
catholicam fidem adeptus totius Gothicae gentis populos inoliti erroris labe de-
tersa ad cultum rectae fidei revocat.”
. The overlap is not perfect, as there is evidence of Catholic Goths from
well before the conversion of —for instance the chronicler John of Biclaro
(cf. Prosopografía, no. ) and Bishop Masona of Mérida (ibid., no. ).
History 
southern Cartaginensis. The religious mutation of  was in this
sense an enormous success, as the dichotomy of Arian and Catholic
disappears from Spanish history. There is, in any case, no usurpa-
tion, rebellion, or internal division in the succeeding years that can
be attributed to religious disunity. The differences between Romans
and Goths are another matter. Leovigild before the conversion had
done much to bridge them, reformulating Arian dogma to make it
more acceptable to Catholics7 and cancelling the laws that forbade
marriages between Romans and Goths.8 In spite of a growing con-
sensus in contemporary scholarship that by the mid-seventh centu-
ry the ethnic difference was resolved, so that one could say that Ro-
mans and Goths had now become Spaniards, a single nation under a
Gothic and Catholic ruler,9 it can be argued that the evidence is not
univocal and suggests at best an unfinished and imperfect fusion.
The Historia Wambae regis of Julian of Toledo, which is the only
other narrative source for secular history composed in Visigothic
Spain, covers events of  and , the accession of King Wamba
and his crushing of a rebellion against him in Visigothic Gaul and
the Tarraconensis. The historical context needed to understand
these events includes the reigns of Wamba’s predecessors Chin-
dasvind (–) and Reccesvind (–) and the remainder of
Wamba’s own rule, which ended when he was deposed in . In
addition to the abundant legislation created by these rulers—the
first territorial rather than national code of the kingdom, according
to received opinion10—and the acts of the church councils held in

. See Stroheker, “Leowigild,” –, and Collins, “Leovigild and the


Conversion.”
. LV III, ,  (ed. Zeumer, ): “.l.l. hac in perpetuum valitura lege
sancimus: ut tam Gotus Romanam, quam etiam Gotam Romanus si coniugem
habere voluerit, premissa petitione dignissimam, facultas eis nubendi subiaceat
.l.l.”; see also Zeumer, “Geschichte (III),” –.
. Teillet, Des Goths, –; Claude, “Gentile und territoriale Staatsideen”;
Collins, Early Medieval Spain, –.
. Received opinion has taken a beating in recent years; it is handled very
Exploring the Variety of Random
Documents with Different Content
PROGRAM DEVELOPMENT value, high byte first. It is
normally used for 16-bit data rather than 16-bit addresses. The next
three directives are used to control the input/output: Input/ Output
Directives The input/output directives are: .PAGE, .SKIP, .OPT. PAGE
causes the assembler to finish the page, i.e., move to the top of the
next page. In addition a title may be specified for the page. For
example: .PAGE "page title.' ' SKIP is used to insert blank lines in the
listing. The number of lines to be skipped may be specified. For
example: .SKIP 3. OPT specifies four options: list, generate, errors,
symbol. List will generate a list. Generate is used to print object code
for strings with the .BYT directive. Error specifies whether error
diagnostics should be printed. Symbol specifies whether the symbol
table should be listed. The last two directives control the assembler
listing format: .FILE and .END Directives In the development of a
large program, several portions of the program will typically be
written and debugged separately. At some point it will be necessary
to assemble these files together. The last statement of the first file
will then include the directive .FILE NAME/1, where 1 is the number
of the disk unit, and NAME is the name of the next file. The next file
may be linked, in turn, to more files. At the end of the last file, there
will be the directive: .END NAME/1, which is a pointer back to the
first one. Finally, a facility exists for inserting additional comments
with the listing:";" ";" m&y be used to enter comments at will within
a line rather than enter an instruction. This is an important facility if
programs are to be correctly documented. MACROS A macro facility
is currently not available on most existing 6502 assemblers.
However, we will define a macro here and explain its benefits. It is
hoped that a macro facility will 363
Fig. 10-7: AIM65 is a Board with Mini-Printer and Full
Keyboard Fig. 10-8-. Ohio Scientific is a Personal Microcomputer 364
PROGRAM DEVELOPMENT soon be available on most 6502
assemblers. A macro is simply a name assigned to a group of
instructions. It is essentially a convenience to the programmer. For
example, if a group of five instructions is used several times in a
program, we could define a macro instead of always having to write
these five instructions. As an example, we could write: SAVREG
MACRO PHA TXA PHA TYA PHA ENDM Thereafter, we could write the
name SAVREG instead of the above instructions. Any time that we
write SAVREG, the five corresponding lines will get substituted
instead of the name. An assembler equipped with a macro facility is
called a macro assembler. When the macro assembler encounters
SAVREG, it will perform a mere physical substitution of the
equivalent lines. Macro or Subroutine? At this point, a macro may
seem to operate in a way analogous to a subroutine. This is not the
case. When the assembler is used to produce the object code, any
time that a macro name is encountered, it will be replaced by the
actual instructions that it stands for. At execution time, the group of
instructions will appear as many times as the name of the macro did.
By contrast, a subroutine is defined only once, and then it can be
used repeatedly: the program will jump to the subroutine address. A
macro is called an assembly-time facility. A subroutine is an
execution-time facility. Their operation is quite different. Macro
Parameters Each macro may be equipped with a number of
parameters. As an example, let us consider the following macro:
SWAP MACRO M, N, T LDA M STA T LDA N STA M 365
PROGRAMMING THE 6502 LDA T STA N ENDM This macro
will result in swapping (exchanging) the contents of memory
locations M and N. A swap between two registers, or two memory
locations, is an operation which is not provided by the 6502. A
macro may be used to implement it. "TV in this instance, is simply
the name for a temporary storage location required by the program.
As an example, let us swap the contents of memory locations ALPHA
and BETA. The instruction which does this appears below: SWAP
ALPHA, BETA, TEMP In this instruction, TEMP is the name of some
temporary storage location which we know to be available and which
can be used by the macro. The resulting expansion of the macro
appears below: LDA ALPHA STA TEMP LDA BETA STA ALPHA LDA
TEMP STA BETA The value of a macro should now be apparent: it is
a tremendous convenience for the programmer to be able to use
pseudo-instructions which have been defined with macros. In this
way, the apparent instruction set of the 6502 can be expanded at
will. Unfortunately, one must bear in mind that each macro directive
will expand into whatever number of instructions were used. A
macro will, therefore, run more slowly than any single instruction.
Because of its convenience for the development of any long
program, a macro facility is highly desirable for such an application.
Additional Macro Facilities Many other directives and syntactic
facilities may be added to a simple macro facility. For instance,
macros may be nested, i.e., a macro-call may appear within a macro
definition. Using this facility, a macro may modify itself with a nested
definition! A first call will produce one expansion, whereas
subsequent calls will produce a modified expansion of the same
macro. 366
PROGRAM DEVELOPMENT CONDITIONAL ASSEMBLY
Conditional assembly is another assembler facility which is so far
lacking on most 6502 assemblers. A conditional assembler facility
allows the programmer to use the special instructions "IF," followed
by an expression, then (optionally) "ELSE," and terminated by
"ENDIF." Whenever the expression following the IF is true, then the
instructions between the IF and the ELSE, or the IF and the ENDIF
(if there is no ELSE), will be assembled. In the case in which IF
followed by ELSE is used, either one of the twc blocks of instructions
will be assembled, depending on the value of the expression being
tested. With a conditional assembler facility, the programmer can
devise programs for a variety of cases, and then conditionally
assemble the segments of codes required by a specific application.
As an example, an industrial user might design programs to take
care of any number of traffic lights at an intersection for a variety of
control algorithms. He/she will then receive the specifications from
the local traffic engineer, who specifies how many traffic lights there
should be, and which algorithms should be used. The programmer
will then simply set parameters in his/her program, and assemble
conditionally. The conditional assembly will result in a "customized"
program which will retain only those routines which are necessary
for the solution to the problem. Conditional assembly is, therefore, of
specific value to industrial program generation in an environment
where many options exist and where the programmer wishes to
assemble portions of programs quickly and automatically in response
to external parameters. SUMMARY This chapter has presented an
explanation of the techniques and the hardware and software tools
required to develop a program, along with the various trade-offs and
alternatives. These range at the hardware level from the single-
board microcomputer to the full development system. At the
software level they range from binary coding to high-level
programming. You will have to select from these tools and
techniques in accordance with your goals and budget. 367
CHAPTER 11 CONCLUSION We have now covered all
important aspects of programming, including the definitions and
basic concepts, the internal manipulations of the 6502 registers, the
management of input/output devices, and the characteristics of
software development aids. What is the next step? Two views can be
offered, the first one relating to the development of technology, the
second one relating to the development of your own knowledge and
skill. Let us address these two points. TECHNOLOGICAL
DEVELOPMENT The progress of integration in MOS technology
makes it possible to implement more and more complex chips. The
cost of implementing the processor function itself is constantly
decreasing. The result is that many of the input/output chips, as well
as the peripheral-controller chips, used in a system, now incorporate
a simple processor. This means that most LSI chips now used in the
system are becoming programmable. An interesting conceptual
dilemma is thus developing. In order to simplify the software design
task as well as to reduce the component count, the new I/O chips
now incorporate sophisticated programmable capabilities: many
programmed algorithms are now integrated within the chip.
However, as a result, the development of programs is complicated by
the fact that all these input/output chips are very different and need
to be studied in detail by the programmer! Programming the system
is no longer programming the micro368
Fig. 11-1: PET is an Integrated Unit Fig. 11-2: APPLE II
uses a conventional TV
PROGRAMMING THE 6502 processor alone, but also
programming all the various other chips attached to it The learning
time for every chip can be significant. Naturally, this is only an
apparent dilemma. If these chips were not available, the complexity
of the interface to be realized, as well as the corresponding
programs, would be still greater. The new complexity that is
introduced is that one has to program more than just a processor,
and learn the various features of the different chips in a system to
make effective use of them. However, it is hoped that the techniques
and concepts presented in this book should make this a reasonably
easy task. THE NEXT STEP You have now learned the basic
techniques required in order to program simple applications on
paper. This was the goal of this book. The next step is to actually
practice. There is no substitute for it. It is impossible to learn
programming completely on paper, and experience is required. You
should now be in a position to start writing your own programs. It is
hoped that this journey will be a pleasant one. For those who feel
they would benefit from the guidance of additional books, the
companion volume to this one in the series is the "6502 Applications
Book" (ref D302), which presents a range of actual applications
which can be executed on a real microcomputer. Next is the "6502
Games Book" (ref G402), which presents programming techniques
for complex algorithms . A 6502 assembler, written in standard
Microsoft BASIC is also available. 370
APPENDIX APPENDIX A HEXADECIMAL CONVERSION
TABLE HEX 0 12 3 4 56789ABCDEF 00 000 0 0 12 3 4 5 6 7 8 9 10
11 12 13 14 15 0 0 1 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
31 256 4096 2 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
512 8192 3 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 768
12288 4 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 1024
16384 5 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 1280
20480 6 96 97 98 99 100 101 102 103 104 105 106 107 108 109
110 111 1536 24576 7 112 113 114 115 116 117 118 119 120 T21
122 123 124 125 126 127 1792 28672 8 128 129 130 131 132 133
134 135 136 137 138 139 140 141 142 143 2048 32768 9 144 145
146 147 148 149 150 151 152 153 154 155 156 157 158 159 2304
36864 A 160 161 162 163 164 165 166 167 168 169 170 171 172
173 174 175 2560 40960 B 176 177 178 179 180 181 182 183 184
185 186 187 188 189 190 191 2816 45056 C 192 193 194 195 196
197 198 199 200 201 202 203 204 205 206 207 3072 49152 D 208
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
•3328 53248 E 224 225 226 227 228 229 230 231 232 233 234 235
236 237 238 239 3584 57344 F 240 241 242 243 244 245 246 247
248 249 250 251 252 253 254 255 3840 61440 5 4 3 2 1 0 HEX |
DEC HE> :| DEC HEX | DEC HEX | DEC HEX| DEC HEX| DEC 0 0 1
1,048,576 0 1 0 65,536 0 1 0 4,096 0 1 0 256 0 1 0 16 0 1 0 1 2
2,097,152 3 3,145,728 2 3 131,072 196,608 2 3 8,192 12,288 2 3
512 768 2 3 32 48 2 3 2 3 4 4,194,304 5 5,242,880 4 5 262,144
327,680 4 5 16,384 20,480 4 5 1,024 1,280 4 5 64 80 4 5 4 5 6
6,291,456 7 7,340,032 6 7 393.216 458,752 6 7 24,576 28,672 6 7
1,536 1,792 6 7 96 112 6 7 6 7 8 8,388,608 9 9,437,184 8 9 524,288
589,824 8 9 32,768 36,864 8 9 2,048 2,304 8 9 128 144 8 9 8 9 A
10,485,760 B 11,534,336 A B 655,360 720,896 A B 40,960 45,056 A
B 2,560 2,816 A B 160 176 A B 10 11 C 12,582,912 D 13,631,488 C
D 786,432 851,968 C D 49,152 53,248 C D 3,072 3,328 C D 192 208
C D 12 13 E 14,680,064 F 15,728,640 E F 917,504 983,040 E F
57,344 61,440 E F 3,584 3,840 E F 224 240 E F 14 15 371
PROGRAMMING THE 6502 APPENDIX B 6502
INSTRUCTIONS- ALPHABETIC ADC Add with carry JSR Jump to
subroutine AND Logical AND LDA Load accumulator ASL Arithmetic
shift left LDX LoadX BCC Branch if carry clear LDY LoadY BCS Branch
if carry set LSR Logical shift right BEQ Branch if result = 0 NOP No
operation BIT Test bit ORA Logical OR BMI Branch if minus PHA
Push A BNE Branch if not equal to 0 PHP Push P status BPL Branch if
plus PLA Pull A BRK Break PLP Pull P status BVC Branch if overflow
clear ROL Rotate left BVS Branch if overflow set ROR Rotate right
CLC Clear carry RTI Return from interrupt CLD Clear decimal flag
RTS Return from subroutine CLI Clear interrupt disable SBC Subtract
with carry CLV Clear overflow SEC Set carry CMP Compare to
accumulator SED Set decimal CPX Compare to X SEI Set interrupt
disable CPY Compare to Y STA Store accumulator DEC Decrement
memory STX Store X DEX Decrement X STY Store Y DEY Decrement
Y TAX Transfer A to X EOR Exclusive OR TAY Transfer A to Y INC
Increment memory TSX Transfer SP to X INX Increment X TXA
Transfer X to A INY Increment Y TXS Transfer X to SP JMP Jump TYA
Transfer Y to A 372
APPENDIX APPENDIX C BINARY LISTING OF 6502
INSTRUCTIONS ADC OllbbbOl JSR 00100000 AND OOlbbbOl LDA
lOlbbbOl ASL OOObbblO LDX lOlbbblO BCC 10010000 LDY lOlbbbOO
BCS 10110000 LSR OlObbblO BEQ 11110000 NOP OlbbbllO BIT
OOlOblOO ORA OOObbbOl BMI 00110000 PHA 01001000 BNE
11010000 PHP 00001000 BPL 00010000 PLA 01101000 BRK
00000000 PLP 00101000 BVC 01010000 ROL OOlbbblO BVS
01110000 ROR OllbbblO CLC 00011000 RTI 01000000 CLD
11011000 RTS 01100000 CLI 01011000 SBC lllbbbOl CLV 10111000
SEC 00111000 CMP HObbbOl SED 11111000 CPX HlObbOO SEI
01111000 CPY HOObbOO STA, lOObbbOl DEC HObbllO STX
lOObbllO DEX 11001010 STY lOObblOO DEY 10001000 TAX
10101010 EOR HObbbOl TAY 10101000 INC lllbbllO TSX 10111010
INX 11101000 TXA 10001010 INY 11001000 TXS 10011010 JMP
OlbOllOO TYA 10011000 373
PROGRAMMING THE 6502 APPENDIX D 6502-
INSTRUCTION SET: HEX AND TIMING n = number of cycles # =
number of bytes IMPLIED ACCUM. ABSOLUTE ZERO PAGE
IMMEDIATE ABS. X ABS. Y MNEMONIC OP " U OP " u OP " # OP " «
OP " 0 OP " # OP " tt ADC AND A S L B C C B C S (1) (1) (2) (2) OA
2 1 6D 2D OE 6 3 3 3 65 25 06 3 3 5 2 2 2 69 29 2 2 2 2 70 3D IE 4
4 7 3 3 3 79 39 4 3 3 B E Q B 1 T B M 1 B N E B P I (2) (2) 13) 2C 4
3 24 3 2 B P K B V C B V S C L C C L D (2) (2) 00 18 D8 7 2 2 1 1 1
C L 1 C L V C MP C P X C P Y 58 B8 2 2 1 1 CD EC CC 4 4 3 3 3 C5
E4 C4 3 3 3 2 2 2 C9 EO CO 2 2 2 2 2 2 DD 4 3 09 4 3 D E C D E X
D £ Y E O R 1 N C (1) CA 88 2 2 1 CE 4D EE 6 4 6 3 3 3 C6 45 E6 5
3 5 2 2 2 49 2 2 DE 5D FE 7 4 7 3 3 3 59 4 3 1 N X 1 N Y J M P J S R
L D A ID E8 C8 2 2 1 4C 20 AD 3 6 4 3 3 3 45 3 2 A9 2 2 BD 4 3 B9
4 3 L D X L D Y L S R NO P O R A 0) (1) EA 2 1 4A 2 1 AE AC 4E 0D
4 4 6 4 3 3 3 3 A6 A4 46 05 3 3 5 3 2 2 2 2 A2 A0 09 2 2 2 2 2 2 BC
5E ID 4 7 4 3 3 3 BE 19 4 3 3 P H A PHP P L A P L P R O L 48 08 68
28 3 3 4 4 1 1 1 1 2A 2 1 2E 6 3 26 5 2 3E 7 3 R OR R T 1 R T S
SBC S E C S E D ID 40 60 38 F8 6 6 2 2 1 1 1 6A 2 1 6E ED 6 4 3 3
66 E5 5 3 2 2 E9 2 2 /b FD 7 4 3 3 F9 4 3 . S E 1 S T A S T X S T Y T
A X 78 AA 2 2 1 1 8D 8E 8C 4 4 3 3 3 85 86 B4 2 2 2 9D 5 3 99 5 3
T A Y T S X T X A T X S T Y A A8 BA 8A 9A 98 2 2 2 2 2 t 1 1 ( i )
Add ? fo n if crossing page boundary 374
The text on this page is estimated to be only 29.84%
accurate

APPENDIX (IND. X) (IND)Y 2. PAGE. X RELATIVE INDIRECT


Z. PAGE. Y PROCESSOR STATUS COOES OP n 0 OP n » OP n # OP n
« OP n # OP n # N V B D 1 Z C MNEMONIC 61 21 6 6 2 2 71 31 5 5
2 2 75 35 16 4 4 6 2 2 2 90 BO 2 2 2 2 • • • • • • • • • ADC AND A S
I B C C BC S FO 30 DO 10 2 2 2 2 2 2 2 2 M»M» • B E Q B 1 T B M 1
B N E B P L 50 70 2 2 2 2 1 1 0 0 BRK B VC B VS CLC CLD CI 6 2 D1
5 2 D5 4 2 0 0 • • • • • • • • • C I 1 C L V C MP C PX CP Y 41 6 2 51
5 2 D6 55 F6 46 4 6 2 2 2 • • • • • • • • • • DEC DE X DE Y EOR I N
C Al 6 2 B1 5 2 B5 4 2 6C 5 3 • • • • • • i N X 1 N Y J M P J S R L D
A 01 6 2 11 5 2 B4 56 15 4 6 4 2 2 2 B6 4 2 • • • • o •• • • I D X I D
Y I S R NO P O R A 36 6 2 • • •••••••• • • • P H A PHP PL A PL P RO
I El 6 2 F1 5 2 76 F5 6 4 2 2 • • • • • • • 1 ROR R T 1 RT S SBC SE C
SE D 81 6 2 VI 6 2 95 94 4 4 2 2 96 4 2 1 • • S E 1 ST A S T X ST Y
TAX • • • • • • • • T A Y TSX T X A T X S T Y A Add 1 to n if branch
within page Add 2 to n if branch to another page 375
PROGRAMMING THE 6502 APPENDIX E ASCII
CONVERSION TABLE CODE CHAR CODE CHAR CODE CHAR CODE
CHAR 00 NUL 20' 40 @ 605 01 SOH 21 ! 41 A 61 a 02 STX 22 42 B
62 b 03 ETX 23 # 43 C 63 c 04 EOT 24 $ 44 D 64 d 05 ENQ 25 %
45 E 65 e 06 ACK 26 & 46 F 66 f 07 BEL 27a ' 47 G 67 g 08 BS 28 (
48 H 68 h 09 TAB 29 ) 49 1 69 i 0A LF 2A 4A J 6A j 0B VT 2B + 4B K
6B k OC FF 2C3 , 4C L 6C 1 OD CR 2D 4D M 6D m od so 2E 4E N 6E
n OF SI 2F / 4F O 6F o 10 DLE 30 0 50 P 70 p 11 DC1 31 1 51 Q 71
q 12 DC2 32 2 52 R 72 r 13 DC3 33 3 53 S 73 s 14 DC4 34 4 54 T 74
t 15 NAK 35 5 55 U 75 u 16 SYN 36 6 56 V 76 v 17 ETB 37 7 57 W
77 w 18 CAN 38 8 58 X 78 x 19 EM 39 9 59 Y 79 y 1A SUB 3A 5A Z
7A z IB ESC 3B 5B [ 7B { 1C FS 3C < 5C \ 7C I ID GS 3D 5D ] 7D6 }
IE RS 3E > 5E ^ 7E ~ IF US 3F ? 5F-
APPENDIX APPENDIX F RELATIVE BRANCH TABLES
FORWARD RELATIVE BRANCH VsLSD 0 1 2 3 4 5 6 7 8 9 A B C D E F
0 1 0 16 1 17 2 18 3 19 4 20 5 21 6 22 7 23 8 24 9 25 10 26 11 27
12 28 13 29 14 30 15 31 2 3 32 48 33 49 34 50 35 51 36 52 37 53
38 54 39 55 40 56 41 57 42 58 43 59 44 60 45 61 46 62 47 63 4 5
64 80 65 81 66 82 67 83 68 84 69 85 70 86 71 87 72 88 73 89 74
90 75 91 76 92 77 93 78 94 79 95 6 7 96 112 97 113 98 114 99 115
100 116 101 117 102 118 103 119 104 120 105 121 106 122 107
123 108 124 109 125 110 126 111 127 BACKWARD RELATIVE
BRANCH TABLE XLSD AASlK 0 1 2 3 4 5 6 7 8 9 A B C D E F 8 9 128
112 127 126 111 110 125 109 124 108 123 107 122 106 121 105
120 104 119 103 118 102 117 101 116 100 115 99 114 98 113 97 A
B 96 80 95 94 79 78 93 77 92 76 91 75 90 74 89 73 88 72 87 71 86
70 85 69 84 68 83 67 82 66 81 65 C D 64 48 63 62 47 46 61 45 60
44 59 43 58 42 57 41 56 40 55 39 54 38 53 37 52 36 51 35 50 34
49 33 E F 32 16 31 30 15 14 29 13 28 12 27 11 26 10 25 9 24 8 23
7 22 6 21 5 20 4 19 3 18 2 17 1 377
PROGRAMMING THE 6502 APPENDIX G: HEX OPCODE
LISTING 'VSD MSDs, 0 1 2 3 4 5 6 7 0 1 BRK BPl ORA-I. X ORAI. Y
ORA0-P ORA-0-P. X ASI-0-P ASI-0-P. X 2 JSR ANO-I. X BIT0P AND-0P
ROI-0P 3 BMI ANDI. Y AND0P. X ROL-0P. X 4 RTI EORI. X EOR-0P
LSR-0P 5 BVC EORI, Y EOR-0P. X LSR-0-P, X 6 RTS ADCI. X ADC-0-P
ROR-0P 7 BVS ADCI. Y AOC-0P. X 8 STA-I. X STY-0-P STA-0-P STX.0P
9 BCC STA.I. Y STY-0-P. X STA-0P. X STX.0P. Y A tDY-IMM IDAI. X
LDXIMM IOY0-P IDA-0.P IOX-0P B BCS IDA-I. Y IDY-0-P. X IDA.0-P. X
IDX-0P. Y C CPYIMM CMP-I, X CPY-0-P CMP-0-P DEC-0P 0 BNE CMP-
I. Y CMP-0-P, X DEC-0-P, X E CPX-IMM SBC-I, X CPX-0-P SBC-0-P
INC-0-P F BEO SBC-I. Y SBC-0P. X INC-0P. X 8 9 A B C D E F isp/
/MSD PHP ORA-IMM ASLA ORA ASl 0 CLC ORA.Y ORA, X ASl.X PIP
AND-IMAA ROl-A BIT AND ROL SEC AND. Y AND, X ROL.X PHA EOR-
IAAM LSRA JMP EOR LSR CLI EOR. Y EOR. X LSR. X PIA ADC-IAAM
RORA JMP-I ADC ROR SEI ADC. Y ADC, X MY TXA STY STA STX 8
TYA STA. Y TXS STA.X 9 TAY LDA-IMM TAX IDY IDA LDX A CLV IDA,
Y TSX LDY.X IDA.X LDX.Y B INY CMP-IMM DEX CPY CMP DEC C CLD
CMP, Y CMP, X DEC.X D INX SBC-IMM NOP CPX SBC INC E SED SBC.
Y SBC. X INC. X F I = indirect f-P = zero page 378
APPENDIX APPENDIX H: DECIMAL TO BCD CONVERSION
DECIMAL BCD DEC BCD DEC BCD 0 0000 10 00010000 90 10010000
1 0001 11 00010001 91 10010001 2 0010 12 00010010 92
10010010 3 0011 13 00010011 93 10010011 4 0100 14 00010100
94 10010100 5 0101 15 00010101 95 10010101 6 0110 16
00010110 96 10010110 7 0111 17 00010111 97 10010111 8 1000
18 00011000 98 10011000 9 1001 19 00011001 99 10011001 379
PROGRAMMING THE 6502 APPENDIX I EXERCISE
ANSWERS CHAPTER 1 1.1: 252 1.2: 100000001 1.3: 19 + 2 = 9
remainder 1 -* 1 9-5-2 = 4 remainder 1 -*• 1 4 + 2 = 2 remainder 0
-*■ 0 2 + 2=1 remainder 0 -* 0 1 + 2 = 0 remainder 1 -»• 1
Answer: 10011 1x1=1 1x2=2 0x4=0 0x8=0 + 1 x 16 = 16 Answer:
19 1.4: 0101 = 5 + 1010 = 10 1111 = 15 1X1 = 1 1x2 = 2 1x4 = 4
+1x8=8 Answer: 15 380
APPENDIX 1.5: 1111 + 0001 (1)0000 Answer: No, the
result does not hold in 4 bits. 1.6: +5 = 00000101 -5 = 10000101
1.7: +6 = 00000110 -6 = 11111001 1.8: +127 = 01111111 1.9: +
128 = 10000000 01111111 (one's complement) + 1 - 128 =
10000000 (two's complement) 1.10: Smallest: -128 Largest: + 127
1.11: +20 = 00010100 1 1 10101 1 (one's complement) + 1 -20=
11101100 (two's complement) 00010011 (one's complement) + 1 20
= 00010100 Answer: Yes 1.12: 10111111 + 11000001 10000000
V:0 C:l B CORRECT 381
PROGRAMMING THE 6502 11111010 + 11111001
11110011 V:0 C:l H CORRECT 00010000 + 01000000 01010000 V:0
C:0 El CORRECT 01111110 + 00101010 10101000 V:l C:0 El ERROR
1.13: No, you cannot generate an overflow when adding a positive
and a negative number, because they will tend to cancel each other;
thus, the result will always be within range of 1 byte. 1.14: Largest:
32767 Smallest: -32768 1.15: -8388608 1.16: 29 = 00101001 91 =
10010001 1.17: 10100000 is not a valid BCD representation,
because the high order nibble is 1010, which is unused. 1.18:
-23123 = 5 2 3 1 2 3 = 00000101 00010010 00110001 00100011
382
APPENDIX 1.19: 222 = 111 = 3 + 2 2 2 3 + 1 1 1 222 X
111 = 24642 24642 = 5 + 2 4 6 4 2 1.20: 9999 in BCD: 24 bits (3
bytes): 4 + 9999 9999 in two's complement: 14 bits (~ 2 bytes)
1.21: 223 - 1 = 8388607. This is 6 digits of absolute accuracy, or 6+
digits. 1.22: 0 = 00110000 1 = 10110001 2= 10110010 3 =
00110011 4= 10110100 5 = 00110101 6 = 00110110 7 = 10110111
8= 10111000 9 = 00111001 1.23: A = 01000001 B = 01000010 C =
11000011 D = 01000100 E = 11000101 F = 11000110 1.24: "A"
=01000001 "T" =01010100 "S" =01010011 "X" = 01011000 1.25:
10101010 = AA (hexadecimal) 383
PROGRAMMING THE 6502 1.26: FA = 11111010 1.27:
01000001 = 101 (octal) 1.28: Negative numbers represented in
two's complement produce results that do not need to be corrected
when added. 1.29: 1024= 10000000000 (direct binary) =
01000000000 (signed binary) = 01000000000 (two's complement)
1.30: The overflow (V) flag is set when the carry out of bit 6 does
not equal the carry out of bit 7 (exclusive OR). It should be tested
after any addition or subtraction involving numbers represented in
two's complement notation. 1.31: + 16 = 010000 + 17 = 010001 +
18 = 010010 -16 = 110000 -17 = 101111 -18 = 101110 1.32: M =
4D E =45 S =53 S =53 A =41 G =47 E =45 CHAPTER 3 3.1: Left to
reader. 384
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like