Text preview for : Motorola_M6800_Programming_Reference_Manual_M68PRM(D)_Nov76.pdf part of motorola Motorola M6800 Programming Reference Manual M68PRM(D) Nov76 motorola 6800 Motorola_M6800_Programming_Reference_Manual_M68PRM(D)_Nov76.pdf



Back to : Motorola_M6800_Programmin | Home

M68PRM{D)
Nov., 1976




M6800
PROGRAMMING
REFERENCE MANUAL




The information in this document has been carefully checked
and is believed to be entirely reliable. However, no responsibility
is assumed for inaccuracies. Furthermore, such information does
not convey to the purchaser of the product described any license
under the patent rights of Motorola, Inco or others.
Motorola reserves the right to change specifications without
notice.
EXORciser, EXORdisk, and EXORtape are trademarks of Motorola Inc.




First Edition
Motorola, Inc. 1976
"All Rights Reserved"
ii
TABLE OF CONTENTS
CHAPTER 1: INTRODUCTION 1-1

CHAPTER 2: HARDWARE DESCRiPTION 2-1
2.0 Introduction 2-1
2.1 The Basic Microcomputer Components 2-1
2.1.1 A Minimum System 2-1
2.1.1.1 MPU - Microprocessor Unit 2-2
2.1.1.2 ROM - 1024 x 8-Bit Read Only Memory 2-4
2.1.1.3 RAM - 128 x 8-Bit Static Random Access 2-4
2.1.1.4 PIA - Peripheral Interface Adapter 2-4
2.1.2 Expanding the Basic System 2-6
2.1.2.1 ACIA - Asynchronous Communications Interface Adapter 2-6

CHAPTER 3: PROGRAMMING THE M6800 MiCROPROCESSOR 3-1


3.0 Machine Code 3-1
3.1 Stack and Stack Pointer 3-1
3.2 Saving MPU Status 3-3
3.3 Interrupt Pointers 3-4
3.3.1 Reset (or Power On) 3-4
3.3.2 Non-Maskable Interrupt - NMI 3-5
3.3.3 Software Interrupt - SWI 3-5
3.3.4 Interrupt Request 3-5
3.3.5 Wait Instruction - WAI 3-6
3.3.6 Manipulation of the Interrupt Mask Bit 3-6
3.3.7 Special Programming Requirements 3-7
3.3.8 Look-Ahead Feature 3-7
3.3.9 Return from Interrupt - RTI 3-7
3.4 Subroutine Linkage 3-8
3.4.1 Call Subroutine - BSR or JSR 3-8
3.4.2 Return from Subroutine - RTS 3-8
3.5 Data Storage in the Stack ~ 3-9
3.6 Reentrant Code 3-9
3.7 Manipulation of the Stack Pointer 3-9

CHAPTER 4: M6800 MICROPROCESSOR ADDRESSING MODES 4-1
4.0 Addressing Modes 4-1
4.1 Dual Addressing 4-1
4.2 Accumulator Addressing (Single Operand) 4-1
4.3 Inherent Addressing 4-1
4.4 Immediate Addressing 4-2
4.5 Relative Addressing 4-4
4.6 Indexed Addressing 4-4
4.7 Direct and Extended Addressing 4-6


iii
TABLE OF CONTENTS (Continued)
APPENDIX A: DEFINITION OF THE EXECUTABLE INSTRUCTIONS A-1
APPENDIX B: EXbug AND MAID COMMANDS B-1
APPENDIX C: MIKbug COMMANDS C-1
APPENDIX 0: MINIbug II COMMANDS D-1
APPENDIX E: MINlbug III COMMANDS E-1
APPENDIX F: ASCII CODE CONVERSION TABLE F-1
APPENDIX G: HEXADECIMAL AND DECIMAL CONVERSiON G-1




iv
CHAPTER 1
INTRODUCTION
1.0 INTRODUCTION

Motorola Microsystem's software and development tools for the M68DO have been de-
signed to simplify the implementation of systems using the M68DO Microcomputer Family. The M68DO
Programming Reference Manual is the basic software reference document to be used as a supple-
ment to reference manuals for specific software products. It includes descriptions of: