Assemblers Exit

Introduction

With the Mops 68k and PowerPC Assemblers you can write colon definitions and method definitions in assembly code and you can also reference Mops data and executable words. The older Macintosh models use a Motorola 68000, 68020, 68030 or 68040 microprocessor, usually collectively dubbed ‘68k’. The 68k assembler syntax is based on standard 68000 assembly language. The newer Macintoshes use a PowerPC microprocessor. The PowerPC Assembler uses a postfix-style syntax, which is more normal for Forth-based assemblers.

This is not a tutorial—we assume a basic knowledge of 680x0 and PowerPC assembly programming. 68k manuals might now be a little hard to come by, but we give an outline of the 68000 processor later in this manual. The PowerPC is a much more complex processor, but there is a huge amount of information, including manuals, available for downloading from the Motorola web site. Only the 68000 instruction set is supported by the 68k Assembler. The 68020 and later have some additional instructions and addressing modes. If you were to use these, however, your program would not run on earlier Macs which have a 68000 processor (Mac Plus, SE, Classic, and PowerBook 100).

*** WARNING ***
While the Assemblers give you absolute control over the machine, there is a major downside—if you write a definition in assembly, it will only run on Macs with that particular microprocessor (68k or PowerPC). High-level Mops code is quite fast anyway, so you should really only be using assembly code if you just want to learn assembly, or if you're doing some very low-level machine-specific things. You may have perfectly good reasons for doing this and if so, fine.

Contents

Chapter 1
PowerPC Assembler and Disassembler
Assembler colon definitions
Accessing the dictionary
Executing colon definitions from code
Executing other code definitions from code
Assembler source
PowerPC register usage
Example
PowerPC Disassembler
Chapter 2
68k Assembler
Getting started
Assembler colon definitions
Assembler method definitions
Accessing the dictionary
Executing Mops-defined words
Toolbox calls
Syntax
Chapter 3
68k registers and addressing modes
Registers Data Registers
Address Registers
Uses of Data and Address Registers
Condition Codes Interrupt Mask
Supervisor Bit
Trace Bit
Data Addressing Modes Addressing Modes
Data Register Direct
Address Register Direct
Other Register Direct
Address Register Indirect
Address Register Indirect with PostIncrement
Address Register Indirect with PreDecrement
Address Register Indirect with Displacement
Address Register Indirect with Displacement and Index
Program Counter Indirect with Displacement
Program Counter Indirect with Displacement and Index
Absolute Short Address
Absolute Long Address
Immediate Data
Implicit Reference
Chapter 4
68000 Instructions
About this chapter
Motorola 68000 Instructions
Instruction Descriptions
Chapter 5
68k Assembler error messages

 

Previous Index Opener Next Index
This page online:  http://PowerMops.com/MopsManual/Assemblers/Contents.html