Programming the 68000
From the originals
13 scansMachine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.
These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.
Image 1
HAYDEN Macintosh Library Programming the 68000 Macintosh Assembly Language $24.95 Edwin Rosenzweig & Harland Harrison
A surreal close-up of a stylized eye with an orange-red eyelid, in which a beige Macintosh computer with keyboard and mouse appears against a blue sky with clouds, set on a dark blue-to-green gradient background with a cyan wavy line.
Reading notes: The price sticker '$24.95' is partially obscured and slightly skewed; the trailing characters on the sticker are small and may be a currency or code mark rather than part of the price. The 'HAYDEN' and 'Macintosh Library' top banner text is stylized script and was read as 'Macintosh Library'. Author names on the bottom are in a spaced-out light typeface overlapping a worn area and may have minor letter uncertainty.
- Printed prices
- $24.95
- Languages
- English
PDF page 1
HAYDEN Macintosh Library Programming the 68000 Macintosh Assembly Language $24.95 EA Edwin Rosenzweig & Harland Harrison
A book cover with a dark blue-to-green gradient background, an orange-bordered central image of a stylized eye with a beige Macintosh computer, keyboard and mouse visible in the iris against a blue sky, and cyan wavy lines on either side.
Reading notes: The price sticker '$24.95 EA' is partially obscured by a white label and its characters are slightly worn; the reading is best-effort. The series name 'Macintosh Library' in the top banner is in script and was read as 'Macintosh Library'.
- Printed product names
- Programming the 68000
- Printed prices
- $24.95 EA
- Languages
- English
PDF page 2
The image is an entirely blank white page with no visible artwork, layout elements, or text.
PDF page 3
Programming the68000 Macintosh™ Assembly Language Edwin Rosenzweig and Harland Harrison [[] Hayden Book Company A DIVISION OF HAYDEN PUBLISHING COMPANY, INC. HASBROUCK HEIGHTS, NEW JERSEY
Reading notes: Garbled character sequence '[[]' between author line and publisher block Publisher name and location partially unclear in reading order
- Languages
- English
PDF page 4
Acquisitions Editor: B1LL GROUT Production Editor: RoNNIE GROFF Cover design: JIM BERNARD Cover photo: Lou ODoR/GEoRGE BAQUERO Composition: ELIZABETH l'YPESE'JTING COMPANY Printed and bound by: COMMAND WEB OFFSET, INC. Library of Congress Cataloging-in-Publication Data Rosenzweig, EJ. (Edwin J.) Programming the 68000. Includes index. 1. Motorola 68000 (Microprocessor)-Programming. 2. Assembler language (Computer program language) I. Hamson, Harland. II. Title. QA76.8.M6895R67 1986 005.265 86-3085 ISBN 0·8104-6310·5 Quik Circuit is a trademark of Bishop Graphics, Inc., Westlake Village, CA. People in Places is a trademark of Data and Information Software Company. Inc. San Francisco, CA. PCMacBASIC is a trademark of Pterodactyl Software, Fairfax, CA. Copyright © 1986 by Hayden Book Company. All rights reserved. No part of this book may be reprinted, or reproduced, or utilized in any form or by any elec- tronic, mechanical, or other means, now known or hereafter invented, including photocopying and recording, or in any information storage and retrieval system, without permission in writing from the Publisher, with the exception that programs may be stored and retrieved electronically for personal use. Printed in the United States of America 1 2 3 4 5 6 7 8 9 Printing 86 87 88 89 90 91 92 93 94 Year
Reading notes: OCR-like spacing and character substitutions in the copyright and cataloging block (e.g., 'B1LL GROUT', 'Lou ODoR', 'GEoRGE BAQUERO', 'Hamson' for Harland Hamson, 'EJ.' for E.J.), so exact spelling of names may be unreliable. The printed year sequence '86 87 88 ... 94 Year' and 'QA76.8.M6895R67 1986' call-number fragment are not clearly advertised dates; included only as printed.
- Printed product names
- Quik Circuit · People in Places · PCMacBASIC
- Printed dates
- 1986 · 86-3085 · 86 · 87 · 88 · 89 · 90 · 91 · 92 · 93 · 94
- Languages
- English
PDF page 5
Preface This book assumes that you have some knowledge of programming. We expect you to know how to code a simple BASIC or Pascal program. If you know how to program in assembler, so much the better. However, we also realize that you may never have programmed in assembler before, don't know what a linker is, etc. Tupics such as binary and hexadecimal are covered in appendices so the less advanced program- mer can go there for additional knowledge about assembly language programming. If you know another assembler language such as the 8080, 6502, 8088, Z80, or even 360/370, then you will find this book that much easier-you can skip most of the appendices. There are two essential processes involved in reading this book. One is the process of learning about 68000 assembly language. The other process is learning your way around the Macintosh operating system-its "guts" which make all the graphics, menus, and windows possible. Assembler is the gateway to the heart of the Macintosh. If you program in Pascal or BASIC and want to keep programming in those languages, a knowledge of assembler is very useful-especially m debugging. You will find that certain routines have to be made fast and compact-your knowledge of assembler will be invaluable then. However, the main reason that any assembler language programmer gives for wanting to program in assembler is the feeling of POWER. You can actually get down into the insides of the machine and make it perform to its maximum capability. With the sophistication of 68000 assembler and the Macintosh ROMs, your coding won't be that much slower than coding in a higher-level language and your debugging will probably be faster. There is also a certain FUN in programming in assembler which you don't get when programming in a higher-level language. We suppose it is
Reading notes: Line-break hyphenation and spacing irregularities in the excerpt (e.g., 'Tupics', 'm debugging') may affect reading accuracy
- Printed product names
- Macintosh · Pascal · BASIC · 68000 · 8080 · 6502 · 8088 · Z80 · 360/370
- Languages
- English
PDF page 6
the same thrill a mechanic gets from tuning up a fine race car or any mad tinkerer gets from a new invention. We look forward to helping people learn to program in 68000 as- sembler on the Macintosh without having to struggle as we did. Of course, _ we didn't have this book to help us! This book was written just the way Pterodactyl Software, the company of which we are both part, is run. Ed Rosenzweig wrote the less technical chapters while Harland Harrison wrote the more technical, detailed chapters and the sample program. EDWIN RoSENZWEIG AND HARLAND HARRISON (Fairfax and Belmont, California)
Reading notes: Source contains irregular spacing and capitalization in the name 'RoSENZWEIG', preserved as printed.
- Printed product names
- 68000 · Macintosh · Pterodactyl Software
- Languages
- English
PDF page 7
Acknowledgments w. would like to thank the following people: Mike McGrath, Bill Grout, and the people at Hayden-for all their help. April Post-for helping with the illustrations. Kirk Austin and Bruce Southwick-for proving, by reading the manu- script and immediately starting to write code, that one could learn Macintosh assembler and the 68000 through this book. Reina Harrison-for patience and understanding. Lori Sweet-for patience 'Yhile an author struggled.
Reading notes: Garbled spacing in the opening line 'w. would like to thank the' may indicate a missing name or initial.
- Languages
- English
PDF page 8
Organization of this Book book is written so that people who want to learn assembly language on the Macintosh computer can learn at their own pace. If you know a higher level language such as Pascal, BASIC, or C but have never programmed in assembler then you should read all the chapters in sequence with detours to the appendices where appropriate. If you have programmed in assembler before, you can skim the first chapter, skip the appendix on binary and hexadecimal, and start your in-depth reading with Chapter 2, The Addressing Modes of the 68000. You an also skim the sections on assemblers and linkers in Chapter 6. The section on 68000 hardware is very interesting (it explains why all addresses must start on even boundaries, for example) but it, too, can be skimmed.
Reading notes: Source text is a book organization passage with no visible headline, products, prices, or dates.
- Languages
- English
PDF page 9
Summary of the Chapters The first chapter, Introduction to Assembly Language, shows how assembly language relates to higher level languages, what a linker does, how the Macintosh editor and assemblers work, what the format of an assembler file is, what addresses are, and some information about the registers and stack of the 68000. This chapter gets you up to speed with the tools and concepts necessary to start learning 68000 assembler. People not previously exposed to assembly language may want to read Appendix A, The Binary Numbering System, at this time. The second chapter, The Addressing Modes of the 68000, describes all the various ways of finding where the data is located. When using the 68000 there are twelve different ways you can address data including modes as powerful as Program Counter relative with index and displacement. This chapter is one of the building blocks of the rest of the book; it must be understood completely before continuing. The third chapter, The 68000 Instruction Set, describes every 68000 op code (short for operation code) and related operands. The op codes are arranged by frequency of use. As a reference, Appendix B contains timing information and complete formats. Appendix B is an alphabetical listing. Appendix C contains effects on condition codes for each 68000 instruction. The fourth chapter, Sample Programs, contains a series of simple subprograms so that you can see concrete examples of how 68000 assembler is put t9gether into workable programs. This chapter shows how to compare two strings, how to optimize assembler, how to convert from hexadecimal to decimal, how to write a key stroke handler, how to do simple arithmetic operations. The fifth chapter, Overview of the 68000 Hardware, describes how the 68000 looks to a programmer. Here such questions as why instructions
Reading notes: Line-break hyphenation and spacing in the source text may affect reading order (e.g., 't9gether' appears to be a damaged word).
- Languages
- English
PDF page 10
must start on an even byte and what a bus line does are answered. This information is helpful to the programmer who wants to better understand the idiosyncrasies of the 68000 microprocessor. The sixth chapter, Macintosh 'lbols, describes the assembler, linker, and resource compiler in detail. Here you will learn the steps necessary to create working Macintosh programs once you have assembled a program. The seventh chapter, The Mac Environment, describes how windows, menus, and dialog boxes are handled, what events are, Update and Activate events, resource files, memory and jump tables. The eighth chapter, Macintosh ROM Calls, explains how Macintosh ROM calls are made via traps. How to make a ROM call in assembler is illustrated. Heaps and handles are discussed, sample QuickDraw ROM calls are described. The ninth chapter, SimpleCalc, has a complete sample program and an explanation of its internals. SimpleCalc is a simple integer spreadsheet program written in MDS assembler. Many of the procedures you will need to program a Macintosh application are shown in this example. The tenth chapter, Some Advanced Subroutines Not in SimpleCalc, shows sample assembler code to make 'lbolBox calls for such functions as using the Memory Manager, creating variable text in a dialog box, cursor handling, dragging selections with the mouse, changing menu items, printing, and using the SANE floating point package.
Reading notes: Chapter heading text contains OCR-like garbling ('Macintosh 'lbols', 'Mac Environment' spacing) and the 'lbolBox' term appears to be a corrupted 'ToolBox'.
- Printed product names
- Macintosh · SimpleCalc · SANE
- Languages
- English
PDF page 11
Contents Chapter 1 Introduction to Assembly Language 1 Who Will Find This Book Helpful 1 Assembler Used in This Book 1 Why Should You Use Assembly Language? 1 Relationship oi Higher Level Languages to Assembler 2 How to Program in 68000 on a Mac 7 The Editor 8 The Assembler 9 Getting Closer to the Hardware 12 Addresses 12 Internals oi the 68000 Microprocessor 13 Condition Code R>rtion oi Status Register 19 Machine Language 21 Chapter 2 'Ihe Addressing Modes of the 68000 23 Inherent Mode 23 1. Immediate Mode 25 2. Data Register Direct Mode 26 3. Address Register Direct Mode 26 4. Absolute Short Mode 27 5. Absolute Long Mode 29 6. Addressing Register Indirect Mode 30
Reading notes: Spacing within some words in the table of contents (e.g., 'Ihe', 'oi', 'R>rtion') appears damaged or OCR-garbled.
- Languages
- English