M6800 Co Resident Assembler Reference Manual 1976

M6800_Co-Resident_Assembler_Reference_Manual_1976 M6800_Co-Resident_Assembler_Reference_Manual_1976

User Manual: manual pdf -FilePursuit

Open the PDF directly: View PDF PDF.
Page Count: 53

DownloadM6800 Co-Resident Assembler Reference Manual 1976
Open PDF In BrowserView PDF
>l68CRA(D)
Nov., 1976

>16800
CO- RESIDENT ASSEI>ffiLER

•

REFERENCE MANUAL

The information in this manual 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 or others.
EXORciser, EXbug , MIKBUG , and MINIBUG are trademarks of l>1otoro!a,

Inc .

Firs t Edi tion

Motorola , Inc ., 1976
" All Rights Reserved 11

TABLE OF CONTENTS

CHAPTER 1:

1.1
1.2
1.2.1
1. 2. 2
1.3
1. 3. 1
1. 3. 2
1.4
1.5
1. 5.1
1.5 . 2
CHAPTER 2 :

2.1
2. 1.1
2.1. 2
2.1.3
2.1. 4
2.1.5
2.2
2 . 2.1
2.2.2
2.3
2.4
2.4 . 1
2.4 . 2
2.4 . 3
2. 4.4
2. 4.5
2.5
2.5.1
2.5.2
CHAPTER 3:

3.1
3.2
3.3
3.4
3.5
3. 6

GENERAL INFORMATION

1-1

Introduction
M6800 Co- Resident Assembler Language
Machine Operation Codes
Directives
H6800 Co-Resident Assembler
Assembler Aims
Assembler Operation
Ordering Information
Operating Environments
Equipment Requirements
Software Requirements

1-1
1- 1

CODING M6800 CO- RESIDENT
LANGUAGE PROGRAMS

ASS~mLER

1-1
1-1

1- 2
1-2
1-2
1- 2
1- 2
1-2
1-3
2-1
2- 1
2-1
2-1

Source Statement Format
Sequence Numbers
Label Field
Operation Field
Operand Fie Id
Comment Field
Expressions
Constants
ASCII Literals
Symbols
N6800 Addressing Modes
Inheren t and Accumulator Addressing Node
Immediate Addressing Mode
Relative Addressing Mode
Indexed Addressing Mode
Direct and Extended Addressing Mode
Assembler Lis ting
Assembly Listing
Object Program

2-3
2-3
2-3
2-4
2-4
2-4
2- 4
2-4
2-4
2-5
2-5
2-5
2- 5
2- 5
2- 6

ASSEMBLER DIRECTIVES

3- 1

Introduction

3-1
3-4
3- 4
3- 5
3-6
3-7

End
EQU
FCB
FCC
FDB

Equa te Symbol Value
Form Cons tan t Byte
Form Constant Character
Form Double Constant Byte

i

2- 2

TABLE OF CONTENTS (CONT INUED)
3. 7
3. 8
3.9
3 .10
3 . 11
3. 1 2
CHAPTER 4:

NAN - - Pro gram Name

RMB
Reserve Memory Bytes
SPC -- Space

3-8
3- 8
3- 9
3-11
3-11
3- 12

ASSEMBLY INFORMATION

4- 1

OPT -- Output Option
ORG -- Origin

PAGE -- Top of Page

4 .1
4.2

General Information
Co-Resident Assembler Tape/Cassette
Operating Procedures
Loadin g Co-Resident Assembler From
4 .2. 1
Tape/Cassette
4 . 2. 1.1 Loading Tape/Cassette Into EXORciser
4.2 . 1.2 Loading Tape/Cassette Into Evaluation

4 . 2.2
4.2 . 3
4.3
4.3.1
4 . 3 .2

APPENDIX A:
APPENDIX B:
APPENDIX C:
APPE.i~DIX D:

APPENDIX E:
APPENDIX F:
APPENDIX G:

APPENDIX H:
APP ENDIX I:

l-Iodule Memory
Assembly loitia tian

4- 1
4-1
4-1
4- 1
4- 1
4- 2

Tape/Casset t e Co- Resident Assembler
Operation
Co- Resident Assembler Diskette
Operating Procedures
Diskette Co- Resident Assembler
Operating Characteristics
Diskette Co-Resident Assembler
Operation

CHARACTER SET
S~~L\RY

OF M6800 INSTRUCTIONS
M6800 CO- RESIDENT ASSEMBLY DIRECTIVES SUMMARY
ASSEMBLER ERROR MESSAGES
ABSOLUTE OBJECT RECORD FORMAT
SA}1PLE PROGRAH
USING MIKBUG VERSION OF THE H6800 CO- RESIDENT SOF'mARE
USE OF OTHER PERIPHERALS WITH THE CO- RESIDENT SOFTH'ARE
PRm! VERSION OF CO- RESIDENT ASSEMBLER/EDITOR

11

4-4

A- 1
B- 1
C-l
D- 1
E-1
F-1

G-1
H-l
1-1

CHAPTER 1
GENERAL INFORNATION
1.1

INTRODUCTION

The H6800 Co-Resident Assembler is a program that processes
source program statements written in H6800 Assembly Language, translates
these source statements into object programs compatible with the H6800
Firw.ware loaders , and produces a formatted listing of the source program .
The H6800 Co - Resident Assembler is compatible t.,rith the HPCASH and H68SAN
cross - assemblers . This Assembler can co-reside in memory with the N6800
Co-Resident Editor . The editor is described in the H6800 Co-Resident
Editor Hanual.
1.2

N6800 CO- RESIDENT ASSEHBLER LANGUAGE

The symbolic language used to code source programs to be processed
by the assembler is called the H6800 Co - Resident Assembler Language .
The language is a collection of mnemonic symbols representing:
Operations
}16800 machine-instruction operation codes
- N6800 Co - Resident Assembler directives
Symbolic names (labels)
Operators
Special symbols
1. 2 . 1

t-lachine Operation Codes

The assembly language provides mnemonic machine- instruction
operation codes for all machine instructions in the M6800 instruction
set . The H6S00 instructions are described in detail in the H6800
Prograrmning Reference Manual. Refer to Appendix B for a surmnary of the
M6800 instructions.
1.2.2

Directives

The assembly language also includes mnemonic directives which
specify auxiliary actions to be performed by the assembler . Directives
are no t always translated into machine language . (Directives are described
in Chapter 3 and a summary of directives is included in Appendix C.)

1- 1

1.3

1'16800 CO- RESIDENT ASSEHBLER

The M680D Co-Resident Assembler translates source statement s
written in H6800 Assembly Language into machine language. assigns
storage locations to instructions and data, and performs auxilia r y
assembler actions designated by the programmer.
1. 3 . 1

Assemble r Aims
The two basic aims of the 1-16800 Co - Resident Assembler are :
To translate source programs into object code in the
format required by the N6800 resident loaders or an
EXORciser-compatible loader.
To provide a printed listing containing the source
language input , assembler object code, and addi t ional
information (such as error codes , if any) useful in
program analysis.

1. 3. 2

Assembler Operation

The assembler reads the source program twice : first , to
develop the symbol table; second, to assemble the object program
with reference to the symbol table developed in Pass 1. During Pass
2. the object code and the assembly listing are generated. Each
source language line is processed before the next line is read .
As each line is processed, the assembler examines the location ,
operation , and operand fields. The operation code table is scanned for
a match with the ope r ation field . If a standard machine operation code
is being processed , the proper data is inserted into the object code .
If a directive is specified, the proper action is taken. The objec t
code and the assembly listing are formed for output , with any detected
actual or po t ential errors flagged before the li ne containing the e r ror
is printed .
1. 4

ORDERING

INFO&~TION

The N6800 Co- Resident Assembler may be used with the ~!6800
EXORciser, Evaluation Nodule I , Evaluation Nodule II and Evalua t ion Kit .
Table 1-1 identifies the options of the Assembler , their part numb er s ,
and the hardware they are designed to wor k with.
1.5

OPERATING ENVIRONMENTS

1. 5 . 1

Equipment Requirements
Ninimum equipment requirements fo r the N6800 Co - Res i dent Assembler

include :

1-2

EXORciser , Evaluation Nodule I, Evaluation Nodule II,
or Evaluation Kit
8k bytes of RAN
Terminal with TTY (20m A neutral loop current) or RS-232C
interface and equipped with an automatic reader/punch
control.
Software Requirements

1. 5. 2

The N6800 Co-Resident Assembler operates with the EXbug
Firmware , the NIKBUG Firmware, and the NINIBUG Firmware. This Assembler
also may be used with EXORdisk and the EDOSII software operating system.

Hhen using the Co- Resident software Iodth Evaluation Nodule I
or the Evaluation Kit modify this hardware in accordance with
Appendix G.
TABLE 1-1 .

HARDHARE
1.

Co - Resident Assembler Packages

SOFnolARE
PACKAGE MANE

EXORciser

SOFTWARE PACKAGE
PART NUl'IBER*

Co- Resident Assembler

N68ASNR013 A, B. 0

Co- Resident
Assembler/Editor

N68ASH6813 A, B

Co- Resident Assembler

N68ASHR213 A, B

(EXbug)

2.

Evaluation
Nodule I
(HIKBUG)

3.

Evaluation
Hodule II
(MINIBUC II)

*A

= Cassette ,

B - Paper Tape, D - Diskette

1-3

CHAPTER 2
CODING M6800 CO- RESIDENT ASSEr-ffiLER
LANGUAGE PROGRAMS
2.1

SOURCE STATEMENT FORMAT

Programs writ t en in assembly language consis t of a sequence of
source statements . Each source statement consists of a sequence of
ASCII characters end i ng wi th a carriage return . Refer to Appendix A
for a listing of the suppor t ed ASCII character set .
Each source statement may include up to five fields :
Sequence number
Label (or ,, *11 i mp l ying a comment)
Operation
Operand
Comment
Sequence Numbers

2 . 1. 1

The sequence number field is an option pr ovi ded as a programmer
convenience . The sequence number field starts at the beginning of a
source line and consists of up to five decima l d i gits (the value must be
less than 65 , 536) . Sequence numbe r s must be followed by a space .
Although sequence numbers are optional, they must be consistentl y
used or not used for an entire program . If t he first source statement
includes a sequence number , then every succeeding statement must also
include a sequence number. If the first sour ce statement is unnumbered ,
then no other statement may be numbered. In this case the Assemble r will
provide sequential line numbers on the assembly listing .
Label Field

2 . 1.2

•

The label field occurs directly after the sequence number field
(if there is one) or as the fi r st f i eld of a source line . The label
field may take one of the following forms:
(1)

(*) as the first char acter indicates tha t
the rest of the source line is a comment and should be
ignored (except for listing pur poses ) by the assembler .

(2)

A blank (b) as the first character indicates that the
label field is empty (the line is not a comment and does
not have a label) .

An asterisk

2-1

(3)

A symbol.

The attributes of a symbol are :
consists of I to 6 characters
valid characters in a symbol are A through Z
and 0 through 9 .
the first character of a symbol must be
alphabetic .
the symbols "A" , "B" , and " XII are special symbols
used by the assembler and should never be used in
the label field .

A symbol may occur only once in the label field . If a symbol does
occur in more than one label field, then each reference to that symbol will
cause an error .
A label (symbol in the label field) is normally assigned the
value of the program location counter of the first byte of the instruction
or data being assembled .
The label of an EQU directive is assigned the value of the
expression in the operand field .
Some directives must not have a label in the label field .
directives include: ORG, NA}I, END, OPT, PAGE, and SPC .

These

Each symbol in a program is allocated an eight byte block in the
symbol table.
2.1. 3

Operation Field

The operation field occurs directly after the label field in an
assembly language source statement . This field consists of an operation
code of three or four characters . The rules governing symbols also apply
to entries in the operation code field.
Entries in the operation code field may be one of two types:
machine mnemonic operation code - these correspond directly
to N6800 machine instructions . This operation code field
includes the "A" or "B" character for the "dual" or
"accumulator" addressing modes. For compatibility with
other H6800 assemblers, a space may separate the operator
f r om the accumulator designation (i . e . , LOA A is the same
as LOAA).
directive - special operation codes known to the assembler
which control the assembly process rather than being translated
directly to machine language.

2-2

•

The assembler searches for opera tion codes in t he table of
machine operation codes and directives. If not found. an error message
is printed.
2 . 1. 4

Operand Field

Interpretation of the operand field is dependent on the
operation field . For the H6800 machine instructions, the operand
fi eld must specify the addressing mode . The ope r and field formats and
the corresponding addressing modes are as fol lows:
N6800 Machine Instruction

Operand Format
no operand
exp ression

11< exp ression >

< expression >. X

Addressing I'!ode
inherent and accumulator
direct or extended
(direct will be used if possible)
immediate
indexed

Addressing modes and expressions are described in the 1'16800
Programming l'~nual . Assembler directives can take on anot her form .
These directives are described in Chapter 3.
2.1.5

Comment Field

The last field of an 1'16800 Assembly Language source line is the
comment field . This field is optional and is ignored by the assembler
except for being included in the listing . The comment field is separated
from the operand field (o r the operator field if there is no operand) by
one or more blanks and may consist of any ASCII charac t er. This field
is important in document ing the operation of a program.
2.2

EXPRESSIONS

An expression is a combination of symbols and/or numbers separated
by one of the arithmetic operators ( +, -, *, or / ).
The assembler evaluates expressions algebraically from left to
righ t without parenthetical grouping . There is no precedence hierarchy
among the arithmetic operators. A fractional result, or intermediate
result obtained during the evaluation of an expression, will be truncated
to an integer value .

2-3

2 . 2.1

Constants
Decimal:
Hexidecimal:

2. 2.2

< number>
$ < number>

<

or
number> H
(first digit in latter case must be 0 - 9)

Octal :

@

< number>

or

< number>

0

Binary :

% 

or



B

or

< number>

Q

ASCII Literals
I iOG
(No Generate)

Causes only 1 line of data
to be listed from the assembler
directions FCC, FCB , and FOB.

•

3-2

TABLE 3-1 .

Assembly Directives (Continued)

FUNCTION

DIRECTIVE

All data generated by the

OPT G

FCC . FCB. and FDB directions
will be printed (selec ted by
defau lt) .
DATA

DEFINITION/STORAGE ALLOCATION

SY~mOL

FCC

Character string data

FCB

One by te da ta

FDB

Double byte data

R}!B

Reserve memory bytes

DEFINITION
Assign permanent value

EQU

3- 3

3.2

END
FORMAT:

END

DESCRIPTION :

3.3

The END directive ind i cates to the Assembler that
the source is finished . Subsequent source statements are ignored . The END directive encountered
at the end of the first pass through the source
program causes the Assembler to start the second
pass .

EQU - Equate Symbol Value
FOro-tAT:



DESCRIPTION:

.EQU'

< e x p ressio n> [ (CQHUnents>]

The EQU directive assigns the value of the expression
in the operand field to the symbol in the label field.
The label and expression follow the rules given in
a previous section . Note that EQU is one operator
that assigns a value other than the program location
counter to the label. The label and operand fields
are both required and the label cannot be defined
anywhere else in the program.
The expression in the operand field of an EQU cannot
include a symbol that is undefined or not yet defined
(no forward reference s are allowed) .

3-4

3. 4

FCB - Form Constant Byte
FORMAT:

[< label>]

FeB

>}

expr


[]
,


DESCRIPTION :

The FeB directive may have one or more operands,
separated by commas. An a- bit unsigned binary
number corresponding to the value of. each operand
is stored in a byte of the object pr ogram .

If

there is more than one operand , they are stored
in successive bytes . The operand field may contain
the actual value (decimal, hexadecimal , octal , or
binary), Alternatively, the operand may be a
symbol or an expression which can be assigned a
numerical value by the Assembler.

An FCB directive followed by one or more null
operands separated by commas will store zeros for
the null operands .

•

3- 5

3. 5

FCC - Form Constant Character
FCC

FORNAT:

[ d

< ASCII

string>

l 
< comments>
NOTE :

DESCRIPTION :

1.

lid" is any non- numeric character (used

2.

as a delimiter).
ASCII string may not include a carriage
return .

The FCC directive translates strings of characters
into their 7- bit ASCII codes . Any of the characters
which correspond to ASCII hexadecimal codes 20 (SP)

tllrough SF (__ ) can be processed by this directive .
1 . Count . comma , text . Where the count specifies
how many ASCII characters to generate and the
text begins following the first comma of the
operand. Should the count be longer than the
text . spaces will be inserted to fill the count .

2.

Haximum count 1s 255 .
Text enclosed between identical delimiters . each
being any single character . ( I f the delimiters
are numbers, the text must not begin with a
comma. )

3-6

3. 6

FOB - Form Double Constant Byte
FORHAT :

FDB

< label >


{< null >


:}

< comments)

DESCRIPTION :

The FOB directive may have one or more operands
separated by commas . The 16- bit unsigned binary
numbe r corresponding to the value of each ope r and
is stored in two bytes of the object program . If
there is more than one operand , they are sto r ed
in successive bytes. The operand fi e ld may contain
the actual val ue (decimal , hexadecimal , octal , or
binary), Alterna t ively , the operand may be a
symbol or an exp r ession which can be assigned a
numerical value by the Assembler .
An FOB directive followed by one or mo r e null
operands separated by commas will store zeros fo r

the null operands .
The label is optional .

O(,,71':-'~~

[lL::' t'I2'.~
IJ ·30(~:

F-'R '_" ~!"'r!!'!

TO ! L!....US '"! Pf~T~ USE:. e'F F OP!'! ~":'U8!....E
E:',.'T!.... C':'i'b·! ,-!t·!T [ ' IF:U:: '"! I'·/E

0(1@O:i 4
(11;:' (1~1 5

•

.f'

@(h~l ;;,r;:'

,~,,::,, ,~,~-::

~..:.' ~:~'::' .-:::

L:it1~1 <:"::::

. .ji.:.":,-.2

'::"0 (~O

·~·F.·

(::; .:::,,:;:' ..~ '::''::''''F

0[":'O~'

-:'"0.:",::' 0::.

,~ (; ~

('(' I2>~':'.

'oC'~

Ij ';:" '31~

(.::'I I.~H.:.' (~

'::,'("JE

~'(H:::":

f

FF

,::o-;:, .!.-Z' I::-':.:.,,:,{
(:~';:l:L 2

'::"::;':':Lf'

~~10'::,1 ';::

EtE '

3-7

·f·FF.· 'f.FFF .· .' '+-FFFF

3.7

NAN - Program Name

FORMAT:

NAN

DESCRIPTION:

< program

name>

[ J.

The NAH directive must be the first statement

of a H6800 Co- Resident Assembler source program .
The NAN directive does not allow a label, but i t

does require an operand -- a program name (oneeight characters) .

The program name from the NAN directive is printed
on the header line for each listing page .
3.8

OPT - Output Option
FORMAT:

OPT

DESCRIPTION :

< option>

[. 

Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.6
Linearized                      : No
Create Date                     : 2016:06:23 00:38:18-04:00
Modify Date                     : 2016:06:23 11:10:33-07:00
XMP Toolkit                     : Adobe XMP Core 4.2.1-c041 52.342996, 2008/05/07-21:37:19
Metadata Date                   : 2016:06:23 11:10:33-07:00
Document ID                     : uuid:7dcbf1cd-3253-4c85-810f-c53221f1a440
Instance ID                     : uuid:25748f64-a92e-b84b-883c-f08e93be6fa4
Format                          : application/pdf
Producer                        : Adobe Acrobat 9.0 Paper Capture Plug-in
Page Count                      : 53
EXIF Metadata provided by EXIF.tools

Navigation menu