๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

6502 systems programming

โœ Scribed by Windeknecht, Thomas G.


Publisher
Little, Brown and Company
Year
1994
Tongue
English
Leaves
253
Series
Little Brown computer systems series
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Synopsis


Move down into the bits and bytes of 6502 systems programming!
Now there's a practical, do-it-yourself guide for anyone who's
interested in learning the basics of elementary systems programming โ€” and has a
6502 based personal microcomputer (like those from Apple, Atari, Commodore, Ohio
Scientific, Rockwell, and Supertek).

6502 SYSTEMS PROGRAMMING completely, clearly, and thoroughly explains the design of
asmall, single-user operating system. Here's how.

First, it focuses exclusively on microcomputer systems programming, rather
than interfacing. It not only describes program structures, debugging strategies, and
documentation โ€” it also presents the gamut of systems programs from tape VO
programs to the step-by-step coding of an assembler.

Second, it uses BREVITY, a very appropriately named nonstandard assembly lan-
guage, tor the 6502 microprocessor. BREVITY was specifically designed for maximum
efficiency in assembly language programming on 6502 systems containing no more
than 12-16K bytes of primary memory and only tape cassette secondary storage. (Of
course, with a 48K byte primary memory and a floppy disk, using BREVITY means
there's lots of room left over for your systems programs.) It is precise, readable, and
extremely easy to learn and has these novel features:

ยฎ Two-character labels, one-character mathematical opcodes, one-character address-
ing mode syntax, and locally defined labels.

ยฎ No statement is longer than eight characters โ€” so a source program is only three or
four times as long as the object program it produces.

ยฎ A 300 line BREVITY program can be listed on a single page.

Third, no other book gives the kind of current, in-depth treatment of assembly
language design and assembler design. This unique, Conventional coverage fully
demonstrates assembly language design and addresses detailed assembler design,
including all coding,

Cover design by Peter deAngeli

โœฆ Table of Contents


1 6502 Architecture and Machine Code
1.1 Introduction 1
1.2 Nibbles, Bytes, and Addresses 2
1.3 Hexadecimal Arithmetic 3
1.4 6502 Architecture and Instruction Types 6
1.5 6502 Addressing Modes 14
1.6 6502 Arithmetic and Logic 20
1.7 Example Machine Code Programs 26
References 32
2 BREVITY: A 6502 Assembly Language
2.1 Introduction 33
2.2 Overview of Assembly Languages 34
2.3 BREVITY Assembler Directives and Literals 38
2.4 Denotation of CPU Devices, Databytes, and Memory Contents
2.5 BREVITY Register, Memory, and Flag Instructions 42
2.6 BREVITY Jump and Branching Instructions 45
2.7 The Complete BREVITY Syntax 48
2.8 Example BREVITY Programs 50
Reference 53
3 Fundamentals of 6502 Systems Programming
3.1 Introduction 54
3.2 Design of 6502 Pointers 55
3.3 BREVITY Macros for Pointer Operations 59
3.4 Program Branching Structures 61
3.5 Stepwise Refinement 63
3.6 Program Subroutine Structure 66
3.7 Program Development and Testing 68
3.8 Program Documentation 71
3.9 Reference 73
4 Elementary Subroutines
4.1 Introduction 77
4.2 Programming a Simple Parallel Interface 78
4.3 Programming a Standard Serial Interface 81
4.4 Character Encoding and Decoding 84
4.5 Programming Time Delays 86
4.6 Programming an Alphanumerics CRT Display 88
4.7 Programming a Standard CRT Controller 92
4.8 Filling and Copying Memory Blocks 96
4.9 Design Considerations for the Elementary Subroutines Package
References 105
J Design of a Relocator, a Monitor, and a Text Editor
5.1 Introduction 107
5.2 Relocation of Machine Code Programs 107
5.3 Design of a Limited Machine Code Relocator 111
5.4 Design of a CRT-Based Monitor 114
5.5 Coding the Monitor Program 120
5.6 Design of a CRT-Based Text Editor 123
5.7 Coding the Text Editor 129
5.8 Program Listings 134
6 Design of a BREVITY Assembler
6.1 The Primary Parsing of BREVITY Statements 137
6.2 Design of the Label Table 139
6.3 Design of the Hole Table 143
6.4 Design of the Opcode Tables 149
6.5 Code and Error Message Generation 154
6.6 Detailed Assembly of Instructions 157
6.7 Complete BREVITY Assembler Listing 162
6.8 One-Pass versus Two-Pass Assemblers 167
/ Design of Trace, Tape I/O, and Printer Control Programs
7.1 Introduction 169
7.2 Design of the Trace Subroutine 169
7.3 Design of a Tape Output Program 174
7.4 Design of a Tape Input Program 178
7.5 Design of a BREVITY Listing Program 180
7.6 Program Listings 185
References 185
Design of a BREVITY Disassembler 188
8.1 Introduction 188
8.2 Conceptual Design 190
8.3 Development of the Disassembly Algorithm 193
8.4 Disassembler Tables and Table Lookup 198
8.5 Low-Level Subroutines 202
8.6 Complete BREVITY Disassembler Listing 203
Appendix A: The MOS Technology Assembly Language 207
A. 1 Instruction Format 207
A.2 Addressing Mode Syntax 208
A.3 Assembler Directives 209
A.4 Example Programs 210
A.5 Line Number-Oriented Text Editors 211
A.6 A Critique of Standard Text Editor/Assemblers 213
References 215
Appendix B: Creating a BREVITY Software
Development System 216
B.l Introduction 216
B.2 Design of the BREVITY Kernel 217
B.3 Two Additional Development Programs 219
B.4 BREVITY Kernel Listing 221
Index 239

โœฆ Subjects


6520(Computer) -- Programming


๐Ÿ“œ SIMILAR VOLUMES


Programming the 65816: Including the 650
โœ David Eyes, Ron Lichty ๐Ÿ“‚ Library ๐Ÿ“… 2015 ๐Ÿ› Brady Publishing ๐ŸŒ English

<p>This is the republication of a well-known microprocessor programming guide, first published in 1986 at the launch of the Western Design Centerโ€™s revolutionary new 65816 and 65802 processors.</p> <p>With a keen understanding of the learning process, software designers David Eyes and Ron Lichty pro

Programming the 65816 : including the 65
โœ Eyes, David; Lichty, Ron ๐Ÿ“‚ Library ๐Ÿ“… 1986 ๐Ÿ› Prentice Hall ๐ŸŒ English

Get to the power source of your Apple with this detailed look at the next generation of the 6500 microprocessor series! Including the 6502, 65C02, and 65802 by David Eyes and Ron Lichty The enormous potential of the Apple is yours to command with this guide that takes you inside your machine

Programming the 65816: Including the 650
โœ David Eyes, Ron Lichty ๐Ÿ“‚ Library ๐Ÿ“… 2007 ๐Ÿ› Western Design Center ๐ŸŒ English

<p>This is the republication of a well-known microprocessor programming guide, first published in 1986 at the launch of the Western Design Centerโ€™s revolutionary new 65816 and 65802 processors.</p> <p>With a keen understanding of the learning process, software designers David Eyes and Ron Lichty pro

Programming the 6502
โœ Zaks, Rodnay ๐Ÿ“‚ Library ๐Ÿ“… 1979 ๐Ÿ› SYBEX ๐ŸŒ English

THIS BOOK is an educational text designed to teach you programming from the ground up. Already one of the most successful programming books ever published, it has been revised and expanded at both the low end and high end of the spectrum. The range of programming con- cepts and techniques presen

Programming the 6502
โœ Rodnay Zaks ๐Ÿ“‚ Library ๐Ÿ“… 1979 ๐Ÿ› Sybex Inc.,U.S. ๐ŸŒ English

Book by Zaks, Rodnay

Advanced 6502 Programming
โœ Rodnay Zaks ๐Ÿ“‚ Library ๐Ÿ“… 1982 ๐Ÿ› Longman Higher Education ๐ŸŒ English

Book by Zaks, Rodnay