Home » CEEFAX disks » telesoftware4.adl » 04-01-88/MANUAL1

04-01-88/MANUAL1

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » CEEFAX disks » telesoftware4.adl
Filename: 04-01-88/MANUAL1
Read OK:
File size: 13EA7 bytes
Load address: 0000
Exec address: FFFFFFFF
File contents















G                      USING THE 65C02 ASSEMBLERH
                            (Version 1.60)










This  guide  describes how to use the 65C02 Assembler produced by Alan
Phillips of the  Department of Computing at Lancaster University.  The
reader  is  assumed to be familiar with the concepts of programming at
assembly level.


The 65C02 Assembler is copyright (C) Alan Phillips  1987.  It  may  be
passed  on  by  anyone,  to anyone,  and used for any peaceful purpose
whether private or commercial. No purchase, licensing or permission is
needed.  It may be distributed in any way or posted  on  any  Bulletin
Board  system  provided  that  it  is  not sold (apart from reasonable
handling and media costs), that due credit is made for authorship, and
that this paragraph is brought to the attention of the recipient.














                                                           Edition 3.2
                                                         December 1987
                                                         Alan Phillips










                               G-CONTENTSH-



     1.  INTRODUCTION                                           1
         1.1  Installing the Assembler                          1
         1.2  The Assembler's CLI mode                          1
         1.3  Creating source files                             2
         1.4  Starting an assembly                              3
              1.4.1  The command line options                   3
              1.4.2  Alternative syntax for the command line    6
         1.5  Assembly on a second processor                    6
         1.6  The object code buffer                            7
         1.7  Returning to the calling language                 7
         1.8  Use of control keys during assembly               8

     2.  SOURCE PROGRAM FORMAT                                  9
         2.1  Syntax of the line                                9
              2.1.1  The label field                            9
              2.1.2  The opcode field                          10
              2.1.3  The operand field                         10
              2.1.4  The comment field                         10
         2.2  The syntax of expressions                        10
              2.2.1  Numeric expressions                       10
              2.2.2  Strings                                   13
              2.2.3  String expressions                        13

     3.  THE OUTPUT LISTING                                    14
         3.1  The source listing level                         14
         3.2  Source listing format                            15
         3.3  Listing object code bytes                        16
         3.4  Symbol table listing format                      17
         3.5  Error reports                                    17
         3.6  Output page control                              17
              3.6.1  Setting page dimensions                   17
              3.6.2  Setting the page title                    18
              3.6.3  Setting the timestamp                     18
              3.6.4  Page layout directives                    19
         3.7  Controlling the output destination               20
              3.7.1  Output to a printer                       20
              3.7.2  Output to a file                          20
              3.7.3  Printer control                           21

     4.  DIRECTIVES DEFINING DATA AND CONSTANTS                22
         4.1  Defining constants                               22
         4.2  Byte and word directives                         22
              4.2.1  Byte directives                           22
              4.2.2  Word directives                           23
              4.2.3  Using repeat counts                       23
         4.3  Character string directives                      24
              4.3.1  The ASC and STR directives                24
              4.3.2  The CASC and CSTR directives              24
              4.3.3  Planting special characters               25
         4.4  The HEX directive                                26
         4.5  The CODE directive                               26





                                  i









     5.  OBJECT FILE CONTROL DIRECTIVES                        27
         5.1  Defining the current address                     27
         5.2  Reading the current address                      28
         5.3  Using dummy sections                             28
              5.3.1  The DS directive                          29
         5.4  Defining object load and execution addresses     30
              5.4.1  Specifying the low word of the addresses  30
              5.4.2  Specifying the processor                  31

     6.  SOURCE FILE CONTROL DIRECTIVES                        32
         6.1  Chaining source files                            32
         6.2  Including one file into another                  32

     7.  CONDITIONAL ASSEMBLY                                  33
         7.1  Assembly conditional on expressions              33
         7.2  Assembly conditional on the existence of symbols 34
         7.3  Nesting conditionals                             35
         7.4  Listing conditionals                             35

     8.  PROGRESS REPORTING DIRECTIVES                         36
         8.1  The DISP, DISP1 and DISP2 directives             36
         8.2  The WAIT, WAIT1 and WAIT2 directives             37
         8.3  The QUERY directive                              37
         8.4  The STOP directive                               38

     9.  WRITING SIMPLE MACROS                                 39
         9.1  Using macro parameters                           39
         9.2  Specifying macro parameters                      40
         9.3  Nesting macros                                   41
         9.4  Redefining opcodes and directives                41
         9.5  Labels within macros                             42

     10. THE MACRO PROGRAMMING LANGUAGE                        43
         10.1 Sequence Symbols                                 43
         10.2 Assembly Time Variables                          44
              10.2.1 Creating Assembly Time Variables          44
                     10.2.1.1 Local and global ATVs            44
                     10.2.1.2 String and numeric values        45
                     10.2.1.3 String slicing                   46
                     10.2.1.4 Efficient use of memory          47
              10.2.2 Simple substitution of ATVs               47
         10.3 Writing complex macros                           49
              10.3.1 Programming macro loops                   49
                     10.3.1.1 Loops controlled by counter      50
                     10.3.1.2 Loops accessing macro parameters 51
              10.3.2 Changing macro parameters                 53
              10.3.3 Setting default macro parameters          54
              10.3.4 Listing control for macros                54
              10.3.5 Exiting a macro prematurely               55
              10.3.6 Comment lines within macros               55
         10.4 System ATVs                                      56





                                  ii









     G-Appendices-H



     A1. Opcodes and addressing modes                          58

     A2. Assembler directives                                  59

     A3. Differences from the ADE Assembler                    75

     A4. Differences from previous releases                    76

     A5. Customising the Assembler                             78
         A5.1 The patch area                                   78
              A5.1.1 The default TAB position list             78
              A5.1.2 Source character translation              79
              A5.1.3 Real time clock handling                  79
              A5.1.4 Character constant and string options     79
              A5.1.5 Page throws at the end of a listing       80





















                           GAcknowledgmentsH

Thanks are due to  Dave Morriss, Neil Mercer, Alan Baker, Peter Vince,
Mike  Tubby,  Scott  Larson  and  Peter  Francis  for   many   helpful
suggestions and comments during the development of the Assembler.











                                 iii





G                      USING THE 65C02 ASSEMBLERH



-G1. INTRODUCTION-H


   The  65C02  Assembler  runs in sideways RAM or as a sideways ROM on
the BBC Models B, B+, B+128, Master 128, and Master Compact,  with  or
without a 6502 Second Processor.  It supports all the opcodes  of  the
6502  and  65C02  processor  families,  and  contains a powerful Macro
Programming Language.

   The Assembler is a disc-oriented system.  Source files must be held
on disc,  and the object code will be written to disc.  It can be used
with the Acorn DFS, ADFS, NFS and any other Acorn-compatible  disc  or
network filing system, but not on cassette-only machines.

   There  are no source editing facilities contained in the Assembler.
However, it is able to accept source produced by most text editors  or
word processor programs.


-1.1 Installing the Assembler-


   The  65C02 Assembler code is completely unprotected.  If you have a
machine with sideways RAM,  you will be able to load it to a  RAM bank
and run it; if not, you will need to program it into a 27128 EPROM and
fit it into a sideways ROM socket.


-1.2 The Assembler's CLI mode-

   If you have the Assembler fitted into the highest priority ROM slot
of  your machine,  pressing GCONTROL-BREAKH or powering on will enter it
as the current language.  In this case the Assembler is said to be  in
"CLI  (Command  Language  Interpreter)  mode".  You  will  see  a  "*"
prompting you for input,  and any lines you type will be sent  to  the
BBC Operating System as MOS commands. In this mode there is no need to
type a "*" yourself in front of the commands, although it won't matter
if you do.

   You can also enter CLI mode by issuing the command

                                *CLI

regardless of the ROM socket the Assembler is in.

   From  CLI  mode  you  can  of  course  start  an  assembly with the
*ASSEMBLE command described  below.  Alternatively,  you  could  enter
another language by typing, say,

                               *BASIC

or

                              *WORDWISE


                                  1





G                      USING THE 65C02 ASSEMBLERH





   Naturally,  you are able to issue DFS commands in CLI mode,  or you
could *TYPE files, and so on.  You can't use the BASIC statement  MODE
to  change  screen  mode,  though,  since  the current language is not
BASIC.  However, for convenience  the  Assembler  will  respond  to  a
command *MODE, so you could type

                               *MODE 3

to set mode 3 if you wished. This command is available either from the
Assembler's CLI mode or from any other language.


-1.3 Creating source files-

   Though  the  Assembler  does not contain any editing facilities, it
will accept files produced on just about any word processor or  source
editor.   The   source   you  create  should  contain  only  printable
characters, spaces and TAB characters, and each line should end with a
carriage return byte  (with optionally a line feed character before or
after it).  The Assembler will also treat the character used in  saved
Wordwise  files  to  indicate a TAB  (ASCII code &DD)  as a "real" TAB
character.

   The Assembler will normally ignore  any  other  characters  in  the
source.  Some word processors, though, may use characters  with  ASCII
codes  in the range 128 to 255 for special purposes: the Assembler can
be configured to change its action  on  encountering  these.  This  is
described in detail in Appendix 5.


   You can create suitable files easily with Wordwise or View:


  a. Using Wordwise

     Files saved by menu option 1 can be used directly as input to the
     Assembler,  provided  that  you  have  not  included any embedded
     commands. The  Wordwise  TAB  character,  which  appears  on  the
     editing  screen  as a right-pointing arrow, will be accepted as a
     TAB by the Assembler. Remember to press RETURN at the end of each
     source line.

     Alternatively,  you can spool the file to disc first,  using menu
     option  8  -  but  this  will create a bigger file that will take
     longer to assemble.  You may need some caution here  if  you  are
     using  the  "|"  character within string constants: remember that
     this is the Wordwise "pad" character, so by default  will  appear
     as  a  space  in  the  spooled  file.  To overcome this,  use the
     Wordwise  "pc"  directive  to  redefine  the  pad  character   to
     something else.




                                  2





G                      USING THE 65C02 ASSEMBLERH



  b. Using View

     A  file  created  by the View SAVE, WRITE or EDIT commands can be
     directly input to the Assembler.  You should not include  rulers,
     stored  commands  or  highlight  codes  in this file.  You should
     always remember to press RETURN at the end of every source  line:
     it  will  be necessary to turn off the Format and Justify options
     when typing the source, otherwise View will interfere with this.


-1.4 Starting an assembly-


   The Assembler is  started  with  the  *ASSEMBLE  command.  This  is
followed by a number of "option flags" that tell the Assembler exactly
how you wish it to operate.

   The simplest use of the command would be, for example:

                           *ASSEMBLE SOURCE

where the source file name is SOURCE.  This format performs a  "syntax
check  run"  -  no  object  code  is produced.  This will give you the
fastest possibly assembly,  and it can be very useful when checking  a
large  program  for  errors.  To produce an object file containing the
assembled code, you need to specify a "-O" option:

                      *ASSEMBLE SOURCE -OPROGRAM

where  the "-O" is followed by the name of the object file you wish to
produce.

   After assembly,  the Assembler will return you to the language  you
were  running  when you issued the  *ASSEMBLE  command.  If you have a
machine  with   shadow   screen   capability,   the   Assembler   will
automatically turn it on to give you the maximum space for symbols. It
will  return  the shadow screen to its initial state when it finishes,
and since this involves clearing the screen in a mode change,  it will
pause for you to press a key before it does so.



     -1.4.1 The command line options-


     The  various  options  you  can specify to the command are listed
     below. Each option flag consists of a "-" character followed by a
     letter, for example "-S".  Some option  flags  must  be  followed
     immediately by numbers or filenames. You must separate one option
     from another by spaces.

     Options can be given in any order, but the first parameter to the
     command  must  always  be  the name of the first (or only) source
     file.


                                  3





G                      USING THE 65C02 ASSEMBLERH



           -A  You -must- specify this option to assemble the source for
               BBC  KERMIT,  and  it  is   recommended   for   sources
               originally written for the ADE Assembler.  It makes the
               syntax  of  labels ADE-compatible,  and treats only the
               first 6 characters of each as significant.  This option
               implies a -R.

               By  default,  all  the  characters  of  a   label   are
               significant.

           -B  Specifies that a memory buffer is to be used for object
               code.  This  must  be followed by a number in the range
               1..16 (see section 1.6)

               By default, no object buffer is  used,  and  bytes  are
               written to the object file one by one.

           -C  Specifies  the default code listing level (see the CLST
               directive). This must be followed by 0, 1 or 2.

               By default, the Assembler will start an assembly with a
               code listing level of 1.

           -F  Specifies the name of a listing file, which must follow
               the option flag.  If you give this option, the assembly
               listing will be written to the file  instead  of  being
               sent to the screen.

               If you do not use either the  -P  or  -F  options,  the
               listing will be sent to the screen only.

               Note  that  if you specify -both- -P and -F options, only
               the -F will take effect.

           -G  Specifies that the Assembler is to restart the  calling
               language immediately the assembly is over. (See section
               1.7)

               By default,  the Assembler pauses after assembly unless
               it is called from BASIC or its own CLI mode.

           -L  Specifies the default source listing level (see the LST
               directive). This must be followed by 0, 1, 2 or 3.  You
               can  also  control  the  list  level  during the actual
               assembly with function keys f0, f1, f2 and f3.

               By default, the Assembler will start an assembly with a
               source listing level of 0.

           -M  Instructs the Assembler to change screen mode before it
               starts to process the source.  The number of  the  mode
               you wish to use should follow the letter M, and must be
               in the range 0..7.



                                  4





G                      USING THE 65C02 ASSEMBLERH



               By  default,  the  Assembler will leave the screen mode
               unchanged.

           -O  Specifies the name  of  the  object  file,  which  must
               follow the option flag. If you omit this, the Assembler
               performs  a  syntax  check only and does not produce an
               object file.

           -P  Specifies that the listing is to be sent to  a  printer
               only.

               If you do not use either the  -P  or  -F  options,  the
               listing will be sent to the screen only.

               Note  that  if you specify -both- -P and -F options, only
               the -F will take effect.

           -R  If this is  specified,  65C02  opcodes  and  addressing
               modes are rejected. If you omit it, all 65C02 codes are
               assembled.

           -S  Specifies  that  lines  skipped in conditionals are not
               listed (see the SFCOND and LFCOND directives).

               By default,  the Assembler will list all skipped  lines
               in conditionals.

           -W  Specifies   that   the   Assembler  should  wait  after
               displaying a line containing an error,  so you can note
               down the details.  To resume assembly,  press any  key.
               This  option has no effect if you are sending output to
               a printer or to a file.  You can change the setting  of
               this  option  at  any  time during assembly by pressing
               CONTROL-W.

               By default,  the Assembler will report all errors,  but
               will not pause.


     As an example, the line:

                  *ASSEMBLE SOURCE -OPROG -P -L2 -B8

     will assemble from file SOURCE, putting the object code into file
     PROG.  The default listing level used will be 2,  and the listing
     will be sent to the printer only.  An 8 kilobyte memory buffer is
     to be used for the object code to speed up assembly.

     The Assembler will leave the screen in  whatever  mode  you  have
     selected,  so that for large assemblies you may need to change to
     mode 7 to provide room in memory for  the  symbol  table.  Shadow
     mode will automatically be selected if it is available,  so  that
     on the  B+,  B+128,  and Master series,  you will always have the
     maximum space available.


                                  5





G                      USING THE 65C02 ASSEMBLERH




     -1.4.2 Alternative syntax forms for the command line-

     The example given  above,  and  the  output  the  Assembler  will
     produce if you type

                           *HELP ASSEMBLER

     detail  the  full  form  of the command line syntax.  As you gain
     experience in using the Assembler,  however,  you might  wish  to
     take  advantage  of  various  ways of specifying the options in a
     more compact form.

     Firstly, the Assembler allows you to specify the options  all  at
     once,  without  the need to put the "-" flag before each of them.
     Thus, you could type either

                     *ASSEMBLE SOURCE -M3 -W -L2

     or the shorter, but less readable

                       *ASSEMBLE SOURCE -M3WL2

     Secondly, the "-O" flag to specify an object  file  is  optional.
     The Assembler will take the -second- parameter of the command as an
     object file name, -unless- it starts with a "-" character. Thus

                       *ASSEMBLE SOURCE -OPROG

     and

                        *ASSEMBLE SOURCE PROG

     are  identical  in  effect.  If you should ever -need- to start the
     object file with a "-" character  (e.g. if  you  wish  to  use  a
     temporary  file system on a Master 128)  you will -have- to specify
     the "-O" flag explicitly.


-1.5 Assembly on a second processor-

   The 65C02 Assembler is  compatible  with  both  the  external  6502
second  processor,  and  with  the  Master Turbo-Card.  Using a second
processor will give a faster assembly due to the higher clock rate  of
the  processor,  and  will  also  give  you more memory for the symbol
table.

   A second processor allows you to organise your source files to take
advantage of a source file memory buffer. Any source file that is less
than 14 kilobytes in size is *LOADed into memory  and  assembled  from
there:  since  the Assembler does not then need to wait for data to be
fetched from disc, assembly will speed up  dramatically.  It  is  well
worth arranging your program so each of its source files will fit into
this buffer area.


                                  6





G                      USING THE 65C02 ASSEMBLERH




   The  source  buffer  is  automatically  switched  on  when a second
processor is in use.


-1.6 The object code buffer-

   The Assembler allows you to select an object code buffer in memory.
Code bytes generated from the source are  written  into  this  buffer,
rather  than being sent directly to the object file,  and this gives a
substantial increase in speed of  assembly.  Whenever  the  buffer  is
full,  the assembly will pause in reading source to write the contents
to the object file.  It then resumes assembly until the  buffer  again
fills, and so on.

   You  can specify the buffer size with the "-B" option.  The flag is
followed by a number between  1 and 16,  giving  the  buffer  size  in
kilobytes.   Note   that   using   a   buffer   means  that  there  is
correspondingly less space available for the symbol table.

   The fastest assembly will be achieved when  the  object  code  fits
entirely into the buffer. In this case, the Assembler will produce the
object  file  with  *SAVE  at  the  very end of an assembly,  which is
substantially faster even than writing it in large blocks.


-1.7 Returning to the calling language-

   When an assembly finishes,  the Assembler will always  restart  the
language ROM that was in use when you issued the *ASSEMBLE command. If
this language was BASIC or the Assembler's own CLI mode, there will be
no  difficulty:  however,  some  languages  such  as  WordWise or View
immediately clear the screen when they start, so you may not have time
to read the final lines that the Assembler displays on the screen.

   To overcome this, the Assembler is able to pause when it ends until
you press a key. It will do this whenever the previous language is not
BASIC or the Assembler's CLI mode.

   If you don't wish it to pause (you may for example not want to read
the final screen,  or the language may not clear the  screen),  simply
specify  a  "-G"  option  in the command line.  Now the Assembler will
immediately restart the previous language without a pause.

   There  are  two  cases  where  the  Assembler  will  -always-   pause
regardless of the "-G" option or the previous language.  These are:

  - When an error is detected in the *ASSEMBLE command you typed

    or

  - On  a  machine  with  a shadow screen that was turned off when you
    began assembly.  The Assembler will  turn  the  shadow  screen  on
    automatically,  and  will  always  turn it off at the end: as this


                                  7





G                      USING THE 65C02 ASSEMBLERH



    requires a mode change which will clear the screen, it will always
    pause.


-1.8 Use of control keys during assembly-

   During an assembly you can use various control  keys  to  check  on
progress or give commands to the Assembler.


  - Function keys Gf0, f1, f2H and Gf3H will force the Assembler to change
    the  source  listing level to 0, 1, 2 or 3 respectively.  Once you
    have pressed one of these keys the level you set  is  locked:  the
    Assembler will process LST directives in the source,  but will not
    implement them.  This lets you, for example, change the list level
    during an assembly to check on what's happening,  or to suppress a
    listing  you  decide you don't want.  To cancel the locking of the
    list level and return to  that  set  by  the  last  LST  directive
    processed, simply press GCONTROL-LH.

  - GCONTROL-HH  displays  some help information to remind you about the
    use of control keys. The Assembler will pause after displaying the
    information: to resume simply press any key.

  - GCONTROL-NH  and  GCONTROL-OH  turn the BBC Computer's paged scrolling
    mode on and off  respectively.  You  could  use  these  keys,  for
    example, to pause a listing on the screen after every screenful at
    some point during an assembly.

  - GCONTROL-PH  controls  whether  the  Assembler  sends  output  to  a
    printer. If it is printing, pressing CONTROL-P will stop it: if it
    is not printing,  CONTROL-P will start it sending  output  to  the
    printer.

    If  you  have used the -F option to send output to a listing file,
    CONTROL-P can be used to switch output between the screen and  the
    file,  but  will  not affect any printer you may have connected to
    your machine.

  - GCONTROL-QH  lets you find out where the Assembler is in the current
    file. It will tell you whether it is on pass 1 or 2, then give you
    the number of the line it is about to process.  If the  number  is
    followed  by  "(M)",  the  source  line  is  a  macro call and the
    Assembler is currently expanding that macro.

  - GCONTROL-WH  reverses the current "wait after error" action  set  by
    the command line's "-W" option.

  - GSPACEH  pauses the assembly.  You can use this to examine a listing
    on screen at your leisure.  To resume assembly,  simply press  any
    key.





                                  8





G                      USING THE 65C02 ASSEMBLERH



-G2. SOURCE PROGRAM FORMAT-H


   The Assembler will read source from files produced by any editor or
word  processor  program,  as described in section 1.3.  The source is
seen as a number of lines,  each ending with a  carriage  return  byte
($0D).  Line  feed  characters  are ignored,  as are all other control
characters and  (unless you have used one of the configuration options
detailed in Appendix 5) any with the most significant bit (bit 7) set.
The general format of a line is:

                   label  opcode  operand  comment

   Depending on circumstances,  the label and operand  fields  may  be
optional or mandatory;  or they may need to be omitted.  All lines may
have a comment field, which is begun with a ";" or a "\" character.

   If you include a label field,  it must begin in the first character
of  the  line.  You  may  separate the fields from each other with any
number of spaces and/or TAB characters.  No line may exceed 132  bytes
in length; any that do will be truncated.

   Any line whose first non-space character is "*", ";", "!" or "\" is
treated as comment.  Lines beginning with "!" are treated specially if
they  occur within the definition of a macro,  as explained in section
9.6.


-2.1 Syntax of the line-


     -2.1.1 The label field-

     A label consists of a  string  of  characters,  starting  with  a
     letter,  and containing any combination of letters,  numbers, and
     the characters ".", "$"  and  "_"  (underscore).  Any  lower-case
     letters  are  translated  to  upper-case.  Labels  may  be of any
     length,  and all are significant unless you  have  specified  the
     "-A"  option  in  the  command  line,  when  only the first 6 are
     significant.

     A label may be terminated  with  a  ":"  character  that  is  not
     considered part of the label.

     Examples of valid labels are:

                         OSWRCH
                         osbyte
                         Program.start
                         ITEM_33:

     A label may be written in a line on its own:  the value it is set
     to will be the value of the current address.



                                  9





G                      USING THE 65C02 ASSEMBLERH



     A  variant  of  the  label  is the Sequence Symbol,  described in
     section 10.1.  This has the same format as a normal  label,  with
     the exception that the first character must be a "%" character.

     Where  the label is a macro name (i.e. in the MACRO directive) it
     may not exceed 8 characters in length.


     -2.1.2 The opcode field-

     The opcode field, if present, is separated from the label by  one
     or  more spaces or TABs.  If there is no label, the field must be
     preceded by at least one space or TAB.

     The opcode field can contain  either  a  normal  opcode  mnemonic
     (such  as  LDA),  an  Assembler  directive or pseudo-op  (such as
     SFCOND), or the name of a macro that you have defined previously.


     -2.1.3 The operand field-

     For some opcodes and directives an operand field may be supplied.
     This will consist of one or more elements,  separated  by  commas
     and  optional  spaces.  Except  within  strings  delimited by the
     single- or double-quote characters, spaces are not significant in
     the operand field.  Thus you can use them to make complex numeric
     expressions more readable: for example you could write

                    LDA   TABLE+(1+FRED/3*(BERT+$1E))

     as

                    LDA   TABLE + (1 + FRED/3 * (BERT + $1E) )

     if you wished.


     -2.1.4 The comment field-

     The comment field can be used to annotate the line.  It is  begun
     with  a  ";"  or  a  "\"  character:  anything  following  is not
     processed by the Assembler.


-2.2 The syntax of expressions-

   Throughout this guide you will see references to "expressions", for
example in the definitions of directives.  The syntax of these  is  as
follows:


     -2.2.1 Numeric expressions-

     These  are  indicated in definitions as "<expr>",  and consist of


                                 10





G                      USING THE 65C02 ASSEMBLERH



     terms separated by arithmetic operators.  For  example,  a  valid
     expression might be

                            FRED*(2+BERT)

     The  Assembler performs all calculations using 16-bit arithmetic.
     Any  results  or  intermediate  values  that  overflow  will   be
     truncated, and no warning will be given.

     The  various elements that you can use in numeric expressions are
     these:

     a. Symbols

        These are the labels that you define in the  label  fields  of
        lines,   and  in  the  evaluation  of  the expression they are
        replaced by the value of the label.

     b. Decimal constants

        These are numbers, composed of the characters '0'..'9'.

        For example,
                                 123

     c. Hexadecimal constants

        These are numbers, composed of hexadecimal digits '0'..'9' and
        'A'..'F', preceded by a "$" or a "&" character.

        For example,
                                $AF34

     d. Binary constants

        These are numbers composed  of  binary  digits  '0'  and  '1',
        preceded by a "%" character.

        For example,
                              %10100111

     e. Character constants

        These  are single characters,  enclosed in single quotes.  The
        Assembler will use the ASCII code of the particular character.
        Note that you -must- always include the final quote character.

        For example,
                                 'X'

        You can specify that a character value is to be used with  bit
        7 set by preceding the character with a "^", and can specify a
        control  character  by preceding it with a "|".  Thus the code
        for an "A" with bit 7 set is represented as '^A' and that  for


                                 11





G                      USING THE 65C02 ASSEMBLERH



        CONTROL-A  as  '|A'.  Since the "|" character actually inverts
        bit 6 of the character that follows,  you can obtain the  code
        for "DEL" (hexadecimal code 7F) by writing '|?'.

        The  character  codes  for "^" and "|" are obtained by writing
        the characters twice (i.e. as '^^' and '||').

        The Assembler does not by default give you a means to  specify
        that  a  character  value is to be used as a control character
        and -also- with bit 7 set.  You may  find  that  this  would  be
        useful  (if  for  example you wished to plant Teletext control
        codes such as $81 in  a  string),  so  the  Assembler  can  be
        configured  to  permit  this  to  be done.  One of the options
        described in Appendix 5 lets you set up the Assembler so  that
        the  "~"  character  (which  appears on a Teletext screen as a
        "divide" sign) causes the next character to  be  output  as  a
        control character with bit 7 set. Thus, to obtain the hex code
        $81,  you would write '~A'.  Naturally, once you have selected
        this option, you will need to double the "~" character as well
        as the other two special characters  should  you  wish  it  to
        appear itself in a string.


     f. Operators

        A  number  of arithmetic operators can be used in expressions.
        They are divided into groups of varying  priority,  which,  in
        decreasing order are:

                    () Parentheses

                    -  Unary minus
                    ~  Unary 1's complement (NOT)

                    &  Bitwise AND
                    !  Bitwise OR

                    =  Equality
                    #  Inequality
                    >  Greater than
                    <  Less than

                    *  Multiplication
                    /  Integer division

                    +  Addition
                    -  Subtraction

        The  "="  and "#" operators return values of -1 and 0 for TRUE
        and FALSE respectively.

        Additionally, expressions  may  be  prefixed  with  two  unary
        operators > and <,  which select the low-byte and high-byte of
        the  result  respectively.  These  operators  have  the lowest


                                 12





G                      USING THE 65C02 ASSEMBLERH



        priority of all. Thus, for example, suppose you have defined a
        table starting at label TABLE.  To load  the  address  of  the
        table  into X (the low byte) and Y (the high byte),  you would
        write

                    LDX   #>TABLE   ; load low  byte
                    LDY   #<TABLE   ; load high byte

        Note that the MOD and DIV operators  used  in  the  BBC  Basic
        assembler to achieve this result cannot be used.


     g. Current address

        The current value of the address counter may be represented in
        expressions by the "*" character.

        For example:
                                 *-3


     -2.2.2 Strings-

     These  are  indicated in definitions as <string>,  and consist of
     one or more ASCII characters enclosed in  delimiters.   Only  the
     single-  and  double-quote  characters  (' and ")  can be used as
     delimiters, and the start and end delimiter must be the same.

     For example:
                          'This is a string'
                      "And so, you see, is this"

     To include the ' or " character in a string, use the other as the
     delimiter.

     Within a string you can obtain control characters, and characters
     with B7 set, in the way described above for character constants.


     -2.2.3 String expressions-

     These are indicated  in  definitions  as  <stringexpr>,  and  all
     involve comparisons between strings.  The general format is

                        <string> <op> <string>

     where <op> is one of the operators

                         =  Equality
                         #  Inequality
                         >  Greater than
                         <  Less than




                                 13





G                      USING THE 65C02 ASSEMBLERH



-G3. THE OUTPUT LISTING-H


   The assembly listing is produced in pass 2. You can control whether
it  appears  or  not,  whether  it goes to screen or printer,  and the
amount of detail it contains.


-3.1 The source listing level-


   The main control you have over the listing is through  the  "source
listing  level".  This  is  a value in the range 0..3 that you can set
either with the LST directive, the -L command  line  option,  or  with
function keys 0 to 3 during the course of an assembly.

   The listing levels have the following meaning:

  0  This level suppresses all listing except the reporting of errors.

  1  This level will list all source lines that  originate  in  source
     files, but not the expansions of macros.

  2  This level lists all lines from source files and macro expansions
     but not Macro Programming Language statements such as AIF.

  3  This level lists all source lines.

   By  default,  the Assembler sets the source list level to 0, so all
you will see will be error reports. You can change the default setting
in the *ASSEMBLE command by using the "-L" option: thus

                         *ASSEMBLE SOURCE -L2

would cause the Assembler to start with a default listing level of 2.

   Within the source,  you can control the list  level  with  the  LST
directive. Thus:

                                LST  1

would set the list level to 1.

   Simply writing

                                 LST

with no operand field will reset the value to the default, without you
needing to build this value into the actual source.


   Additionally,  you  can  override  the  list  level in use while an
assembly is in progress.   Pressing one of function keys  0 to 3  will
force the  corresponding  list  level  to  be  adopted,  so that,  for


                                 14





G                      USING THE 65C02 ASSEMBLERH



example,  you  could  force  the  Assembler  to  show  you parts of an
assembly to monitor what was being done.  Pressing one of  these  keys
will "lock" the list level to that selected, so that LST directives in
the  source  will  not  be  able  to  turn the listing off again.  The
directives are noted, though, and you can return listing level control
to them at any time by pressing CONTROL-L.


-3.2 Source listing format-

   The listing begins with the source lines,  including any code bytes
they have generated.

   The first character on the line indicates where the line  was  read
from.  If  it  came  from an INCLUDE file or a CODE file the character
will be "I";  if the line is from a macro it will be  "M".  Otherwise,
the character is a space.

   The  next  element  is the line number,  reset to 1 at the start of
each source file.

   Next comes the  address  field.  This  will  normally  contain  the
current value of the address counter; in some directives, though, such
as LST, it contains the value of the operand expression.

   Then comes a hexadecimal representation of the first 3 object bytes
generated by the line; this is followed by the source line itself.  By
default,  if the source line generated more than 3 object bytes, these
will be listed on subsequent lines.

   For example, a listing line might show:

                   I   23 AB34:C9 0A      CMP  #10

where the source line is the 23rd line in an INCLUDE  file  and  reads
"CMP #10".  The  code  bytes  generated are $C9 and $0A,  and they are
planted starting at address $AB34.

   When listing a source line,  the  Assembler  will  expand  any  TAB
characters  it  encounters.  By  default, TAB positions are defined at
characters 8, 16, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97, 115 and 123,
with the first character of the source  line  being  numbered  1.  The
default  TAB  positions have been chosen to give a neat listing layout
using labels of up to 6 characters in length and typical operand field
sizes.  However, the first few TABs  are  not  positioned  at  regular
intervals,  so  you  may  find  that  you cannot easily lay out tables
within comments.

   You can overcome any problems, and choose the layout most  suitable
for your source,  with the TABS directive.  This lets you redefine the
TAB positions used: for example

                      TABS  9,17,25,33,41,49,57



                                 15





G                      USING THE 65C02 ASSEMBLERH



would  set  TAB  stops  at regular positions,  with each field being 8
characters wide.  You can return to the default TAB stops at any  time
with the directive

                                 TABS

with no operands.

   The Assembler can be customised to change the -default- TAB positions
to any value you require: this is described in Appendix 5.


-3.3 Listing object code bytes-


   As  mentioned  above,  the  first  three  code bytes generated by a
source line are listed on that line,  and any others  will  appear  on
subsequent  lines.  This may produce a lot of output,  particularly if
you define lots of strings,  so the Assembler gives you control on how
much it lists.

   The amount is controlled by the  "code listing level".  This  is  a
value  in  the  range  0..2  that  you  can  set  either with the CLST
directive or the -C command line option.

   The code listing levels have the following meaning:

       0  Only the first 3 bytes generated by a line are listed.

       1  All bytes are listed from all lines except the CODE
          directive.

       2  All bytes are listed, however they are generated.


   By default,  the Assembler sets the code list level to 1.  You  can
change the default setting in the *ASSEMBLE command by using the  "-C"
option: thus

                         *ASSEMBLE SOURCE -C0

would  cause  the Assembler to start with a default code listing level
of 0.

   Within the source,  you can control the code listing level with the
CLST directive. Thus:

                               CLST  2

would set the list level to 2.

   Simply writing

                                 CLST


                                 16





G                      USING THE 65C02 ASSEMBLERH




with no operand field will reset the value to the default, without you
needing to build this value into the actual source.


-3.4 Symbol table listing format-

   If the source listing level is not zero at the end of the assembly,
the Assembler will list the symbol table, showing you the value of all
the symbols defined in the source.

   The symbols are listed in alphabetical order, and only the first 13
characters of each will be shown. The value of each symbol is shown in
hexadecimal.

   If the value is shown as "????", the symbol was used  but  was  not
defined.  If  the  value  is "****",  the symbol was defined more than
once.  A "-" character after the value indicates that the  symbol  was
defined, but was not used anywhere else in the source.


-3.5 Error reports-

   The Assembler will list all lines that generate errors,  regardless
of  the  listing level.  The errors are reported with self-explanatory
text messages following the line.

   Where appropriate,  the Assembler will attempt to indicate where on
the line the error  occurred.  The  text  you  might  see  would  look
something like:

         ****** Err : Undeclared symbol at about character 19

   This  indicates  that  the  erroneous  symbol  is at about the 19th
character in the line, which starts at character 1.  Remember, though,
that the number refers to the -source- line:  the listing line will have
expanded any TAB characters you used,  and the number  will  then  not
correspond to what you see on the page.



-3.6 Output page control-


   The  Assembler  provides a number of directives that you can use to
specify the exact format of the output page, and to let you tailor the
listing to your exact needs.


     -3.6.1 Setting page dimensions-

     The PAGE directive defines the size of the page you are using. It
     takes two parameters which are the total depth  of  the  page  in
     lines, and the width in characters you wish printed.


                                 17





G                      USING THE 65C02 ASSEMBLERH




     Thus,

                            PAGE   66,132

     tells the Assembler that the page is 66 lines deep,  and that you
     wish lines to contain a maximum of 132 characters.  The Assembler
     will always allow a small gap at the end of the page to avoid the
     perforations, and will truncate any lines longer than the maximum
     width you specify.

     The  value of the width you define with PAGE becomes effective at
     once.  The depth, though, is not used until the next page  throw,
     so  you would normally follow the directive with a TTL or a SKP H
     directive.

     By default,  the Assembler will print lines of 80  characters  on
     paper that is 66 lines deep. It moves to the top of a new page by
     sending a Form Feed ($0C) character to the printer.


     -3.6.2 Setting the page title-


     The TTL directive lets you set up a page title that is printed on
     the  top  of  every  listing  page.  The  title  can  be up to 20
     characters long, and can contain any printable text.

     For example,

                         TTL  'Screen Dumper'

     will print "Screen Dumper" at the top of each page.

     The TTL directive will cause a page throw to  occur  immediately,
     and the next page output will use the title it defines.



     -3.6.3 Setting the timestamp-


     If  you are using a Master 128,  the Assembler will automatically
     print the current date and time at the top of each  output  page,
     taking  the  values from the built-in real-time clock.  The other
     BBC models do not contain clocks,  so the TIME directive lets you
     simulate the effect by defining the string used.

     The TIME directive allows you to define a  string  of  up  to  25
     characters  that  will appear in the page header.  The string can
     contain any printable characters: it is not constrained to  be  a
     date  and  time  value,  so  you can use it as a sub-title if you
     wish.



                                 18





G                      USING THE 65C02 ASSEMBLERH



     For example, you could use

                        TIME  'Friday at 1030'

     or

                         TIME  'First Module'


     The directive is ignored on a Master 128,  so there is no need to
     change a source that is being assembled on both a model B  and  a
     Master 128.

     It  is  possible  to  customise  the Assembler to use a real-time
     clock fitted to a machine other than a Master  128:  for  details
     see Appendix 5.


     -3.6.4 Page layout directives-


     There are a number of directives that let you lay the output page
     out  in  more  detail,  so you can delimit sections of source for
     easier inspection and configure  the  exact  appearance  of  each
     line.

     The  REP  directive  provides  a  convenient  way  of  separating
     sections of code in the listing. For example,

                               REP  80

     will print a line of "*" characters in the listing for  you  (and
     takes  much  less  space in the source file than that line itself
     would).

     The CHR directive lets you change the character used to make  the
     line,  so  that,  for  example  you  could  select  lines of  "-"
     characters with

                                CHR  -


     The SKP directive lets  you  break  the  listing  up  for  easier
     reading. For example,

                                SKP  5

     would leave a 5 line space on the page. The format

                                SKP  H

     causes  the  Assembler  to  start  a new page.  Note that the SKP
     directive itself will never  be  listed  unless  it  contains  an
     error.


                                 19





G                      USING THE 65C02 ASSEMBLERH



-3.7 Controlling the output destination-


   By default, the Assembler sends the assembly listing to the screen,
in whatever mode you have selected.  You can, though, choose to direct
the assembly listing to a printer; or to output it to a file.



     -3.7.1  Sending the listing to a printer-


     You  can  direct  output  to  the  currently  selected printer by
     specifying the  "-P"  option  in  the  command  line.  Thus,  for
     example,

                       *ASSEMBLE SOURCE -L2 -P

     would  assemble  from source file SOURCE and send the listing, at
     level 2, to the printer only.

     At any time  during  an  assembly,  you  can  change  the  output
     destination  by pressing  CONTROL-P.  This will switch the output
     destination between printer and screen:  you can do this as often
     as you wish.



     -3.7.2 Sending the listing to a file-


     You can direct the assembly listing to a file by using  the  "-F"
     option in the command line. Thus, for example,

                  *ASSEMBLE SOURCE -L1 -F:3.LISTING

     will produce an assembly listing at level 1,  and will send it to
     the file :3.LISTING only.

     Output  sent to a file is laid out exactly as if it were going to
     a real printer.  It will be broken up into pages,  with the  page
     depth and width controlled by the PAGE directive. After assembly,
     you can for example print the file with

                    <CTRL-B>
                    *TYPE :3.LISTING
                    <CTRL-C>

     Any  printer  control  codes  that  you  may send with the SYSVDU
     directive are not stored in the file,  so you can output the file
     to any printer without the need  to  edit  out  unsuitable  codes
     first.




                                 20





G                      USING THE 65C02 ASSEMBLERH



     If you have used the "-F" option,  the action of CONTROL-P during
     assembly  changes  slightly.  You can now use it to switch output
     between the screen and the file,  allowing you,  for example,  to
     suppress listing of some parts of a source.  It has no effect  on
     any printer that you may have fitted.

     If  you  use -both-  the "-P" and "-F" options on the command line,
     only "-F" has effect.



     -3.7.3 Printer control-


     You will often need to send a sequence of control bytes  to  your
     printer  before starting an assembly  (for example to set it into
     condensed print mode).  The assembler gives you three  directives
     to accomplish this automatically: SYSVDU sends a control sequence
     on both passes, and SYSVDU1 and SYSVDU2 do the same,  but only on
     pass 1  or  pass 2  respectively.   If you have not used the "-P"
     command line option to produce a printed listing,  the directives
     will not send any output to it:  there is no need to  alter  your
     source to suit the times when you are printing or not printing.

     To  output a control sequence, simply write the bytes as operands
     to one of the directives,  exactly as you would do in BBC Basic's
     VDU command. Thus

                         SYSVDU1  1,27,1,'E'

     sends the character ESCAPE  (whose  ASCII  code  is  27  decimal)
     followed by 'E' to the printer only, on pass 1 of the assembly.

     Note that you do not need first to send a code of "2" to activate
     printer output:  the assembler itself ensures the bytes go to the
     printer if one is in use.  The "1" codes in the example above act
     exactly  as  in  BASIC's  VDU  command,  and  send  the following
     character to the printer -only-.  You can if you wish use SYSVDU to
     write to -both- printer -and- screen: thus

                           SYSVDU   'A','B'

     sends characters 'A' and 'B' to both. However, the DISP family of
     directives give you a much better means of outputting messages to
     the screen.

     The directives do -not- send any bytes to a listing -file-  that  you
     may  have selected with the "-F" command line option.  This means
     that you can safely print a listing file on any type  of  printer
     without  the  need  to  edit  out  possibly inappropriate control
     sequences first  (but, of course, you may need to set the printer
     up yourself before printing the listing).




                                 21





G                      USING THE 65C02 ASSEMBLERH



-G4. DIRECTIVES DEFINING DATA AND CONSTANTS-H


   The Assembler contains a number of directives  that  allow  you  to
define  values  in  the  object  file.  You  can  specify byte values,
two-byte or word values,  and  character  strings,  and  also  set  up
symbols to hold constants.


-4.1 Defining constants-

Assigning symbols to various constant values is a considerable help in
writing assembly-level programs, both in terms of making a source more
readable and also in helping when you need to change it.

For example, you could refer to an Operating System routine by writing
its address $FFEE every time,  or you could declare a symbol OSWRCH to
stand for that name.

You can declare symbols to use as constants with the EQU directive. In
the example above, you would write

                         OSWRCH  EQU   $FFEE

and then call the routine as, say

                             JSR   OSWRCH

You  can  write any numeric expression in the operand field of the EQU
directive, but the expression must not contain any forward references.



-4.2 Byte and word directives-

There are 6 directives that plant byte and word  values.   DFB  plants
bytes,  and  DFW  and  DFDB  plant  word values.  For convenience, and
compatibility with  other  assemblers,  the  directives  can  also  be
written as DB, DW and DDB respectively.

All the directives can be given one or more expressions in the operand
field,  separated by commas,  and these expressions give the values of
the bytes or words to be planted.  If you specify a label in the label
field  of the line,  it is set to the address of the first byte of the
first value planted.



     -4.2.1 Byte directives-


     The directive DFB (or its equivalent DB)  allows  you  to  define
     single-byte  values  which  are  written directly into the object
     file. The operand field is one or more expressions, each of which


                                 22





G                      USING THE 65C02 ASSEMBLERH



     should lie in the range 0..255.

     For example,

                         DFB  1,2,$FF,FRED+1

     will write 4 bytes to the object file: the values will be  1,  2,
     255, and the value of FRED+1.


     -4.2.2 Word directives-


     The  directives  DFW  (or its equivalent DW)  and  DFDB  (or  its
     equivalent DDB)  allow you to  define  two-byte  or  word  values
     which  are  written  directly  into the object file.  The operand
     field of each is a list of one or more expressions, each of which
     should lie in the range 0..65535.

     The difference between the directives lies in the -order- in  which
     the  two bytes are written to the object file.  The DFW directive
     writes the bytes in low-byte, high-byte order; the DFDB directive
     writes them in high-byte, low byte order.

     Thus, for example,

                          DFW   $1234,$ABCD

     will output the bytes $34, $12, $CD, $AB to the  object  file  in
     that order, but

                          DFDB  $1234,$ABCD

     will output the bytes $12, $34, $AB, $CD.


     -4.2.3 Using repeat counts-


     Occasionally, you will need to use the byte or word directives to
     plant  a number of bytes or words containing the same value.  For
     example, you might need to write

                          DFB  5,5,5,5,5,5,5

     to plant 7 bytes containing the value 5.

     For small numbers of repeats,  this is no problem,  but it can be
     onerous if, say, you needed 49 bytes containing 5.

     The Assembler gives  you  a  very  convenient  shorthand  way  of
     repeating  values  in  all  the  byte and word directives.  Every
     expression you use can be prefixed with a "repeat  count",  which
     tells the Assembler to plant the value itself more than once. The


                                 23





G                      USING THE 65C02 ASSEMBLERH



     repeat count is specified in "[]" brackets: thus, to plant the 49
     bytes mentioned above, you could simply write

                             DFB   [49]5

     Like  the  value itself,  the repeat count can be any expression,
     but it must not contain forward references.  Thus you could write

                        DFB  [(COUNT+27)/2]$FF

     You can freely mix values with and without repeat counts  in  any
     of the byte and word directives.

     A  repeat  count  value  of zero will cause no bytes at all to be
     written to the object file.


-4.3 Character string directives-


The four directives ASC,  CASC,  STR  and  CSTR  allow  you  to  plant
character string values into the object file.

All the directives require you to specify a character string, enclosed
in  single-  or double-quotes, in the operand field.  If you include a
label in the label field of the line,  it is given the  value  of  the
address of the first byte planted.


     -4.3.1 The ASC and STR directives-

     These  directives  plant  simple strings in the object file.  ASC
     plants the string -exactly- as  you  specify  it;  STR  plants  the
     string,  and  then  automatically  plants  a carriage-return byte
     (code $0D) immediately after it.

     Thus

                              ASC  'ABC'

     plants the bytes $41, $42, $43 in the object file, and

                              STR  'ABC'

     plants the bytes $41, $42, $43, $0D.


     -4.3.2 The CASC and CSTR directives-


     These directives plant  "counted strings"  in the operand  field.
     They  are  similar to ASC and STR,  except that the bytes planted
     are -preceded- by a single byte giving the length of the string.



                                 24





G                      USING THE 65C02 ASSEMBLERH



     Thus, to use the same examples as above,

                             CASC  'ABC'

     plants the bytes $03, $41, $42, $43 in the object file, and

                             CSTR  'ABC'

     plants the bytes $04, $41, $42, $43, $0D.

     Note that the count byte planted by CSTR -includes-  the  $0D  byte
     that the directive adds itself.


     -4.3.3 Planting special characters-


     The  strings  you give as the operands to ASC, CASC, STR and CSTR
     must of course be made up of printable characters in  the  source
     file,  but  the  Assembler allows you a way of specifying control
     characters,  and characters with the most significant bit (bit 7)
     set to 1.

     To specify a control character,  you should precede the character
     itself with a "|" character. Thus, if you wish to plant the value
     of CONTROL-A,  the string should contain  "|A".  This  method  is
     identical  to  the way in which you specify control characters in
     Operating System commands such as *KEY.

     To specify a character with bit 7 (the most significant bit) set,
     precede it with a "^" character: thus, to plant an "A" with bit 7
     set, specify it in the string as "^A".

     For example,

                            ASC  'A|AB^B'

     plants the bytes $41, $01, $42, $C2 in the object file.

     Should you -need- to specify the "|" or "^" characters, you  should
     double them in the string (i.e. write them as "||" and "^^")

     The  Assembler  does -not-  by  default  provide  a  means to plant
     characters as control characters -also- with bit  7  set.  However,
     you can use a configuration option described in Appendix 5 to let
     you  do this:  selecting the option makes the "~" character plant
     the character following as a control character with bit 7 set.

     Thus

                              ASC  "~A"

     would plant the byte $81 (i.e. a CONTROL-A with bit 7 set).



                                 25





G                      USING THE 65C02 ASSEMBLERH



-4.4 The HEX directive-


   This directive is rather a hybrid of the DFB and ASC directives. It
plants a series of byte values into the object file, but  you  specify
the values as a string of hexadecimal digits.

   For example,

                           HEX  '1234ABCD'

plants the byte values $12, $34, $AB, $CD into the object file.

   The  string  you supply must contain valid hexadecimal digits (i.e.
'0'..'9' and 'A'..'F').  You can give the letters in either  upper  or
lower case.   If the string contains an odd number of characters,  the
Assembler  will  automatically  append  a  '0'  to  make   the   final
hexadecimal value complete.  Hence  HEX 'ABC'  will plant $AB and $C0.



-4.5 The CODE directive-


   The  code  directive gives you a convenient way of including things
like screen dumps or pre-compiled relocatable  subroutines  into  your
programs.

   Suppose,  for  example,  you had prepared a mode 7 screen dump with
some Teletext editor system,  and wanted to use this as a banner  page
when  your  program  started.  One way of including this into the code
would be to examine the dump and convert it into the  appropriate  DFB
directives, planting each byte explicitly by hand. However, this might
be a very time consuming process, and would be very error prone.

   Using CODE, though, removes the need to translate the dump into DFB
or similar directives.  If, for example, the dump was in file  BANNER,
writing

                             CODE  BANNER

would cause the Assembler to read it in and copy the bytes -directly- to
the object file, without processing them in any way.

   By  default,  the listing will show only the first 3 bytes included
from the  CODE  file,  since  otherwise a considerable amount of paper
might be used. If you -do- want to see all the bytes in the listing, use
the CLST directive to set the code listing level to 2 before using the
CODE directive itself.

   You cannot use the  CODE  directive within  a  macro,  or  from  an
INCLUDE file.




                                 26





G                      USING THE 65C02 ASSEMBLERH



-G5. OBJECT FILE CONTROL DIRECTIVES-H


   The  Assembler  contains  a  number  of directives that control the
object file.  They let you define the actual  address  that  the  code
generated will run at,  map symbol definitions into workspace, and set
the load and execution addresses for the final result.


-5.1 Defining the current address-

   In  almost  all  programs  you  assemble, you will need to tell the
Assembler the actual address at which the resulting code is to run. It
will then be able to assign the correct address values to labels.

   You define the current address with the ORG directive. For example,
you could write

                         ORG    $1900

before the first code line in the source.  This would set the  address
value  to  $1900,  and  the Assembler would produce code based on that
address.

   You can specify the  address  in  the  operand  field  of  the  ORG
directive  as  any  expression  you like: however, since the Assembler
-must- know the value to use on pass 1,  the expression  cannot  contain
forward references.

   Note  that the ORG directive permits you to specify only a two-byte
(or 16 bit) address value.  Disc filing systems use a  32 bit  address
value  to control which processor a file is to be loaded into,  and to
set the top two bytes with the Assembler you should use the  LOAD  and
EXEC directives, described in section 5.4.

   You  can use as many ORG directives as you wish within your program
source, and you can move the current address  value  to  anywhere  you
wish.  However,  you  should  remember  that  the ORG directive has no
effect on where in the object file bytes are written. Thus, the source
lines

                         ORG   $1900
                         LDA   #1
                         ORG   $3000
                         LDA   #2

would set the address to $1900, and write the two bytes  for  the  LDA
instruction to the object file.  It then sets the address to $3000 and
writes  the  bytes  for the second LDA instruction:  however, the four
bytes will be -contiguous- in the object file - the Assembler  will  not
generate  a gap.  You could use this effect, for instance, to write an
object file containing many sections of overlay code  -  each  section
would be assembled to run at the same address,  but they would lie one
after the other in the object file.


                                 27





G                      USING THE 65C02 ASSEMBLERH




If  you -do-  require to leave a gap in the object file, you can use the
DS directive to  generate  the  required  gap  yourself  (see  section
5.3.1).  There is no way of making the Assembler move -backwards- in the
object file.



-5.2 Reading the current address-


   You can use  the  value  of  the  current  address  counter  within
expressions  by referring to it with the special symbol "*".  This can
be used exactly as any other symbol in expressions,  so that, say, you
could work out the size of a data table with

                         TABLE   DFB   1
                                 DFB   2
                                 DFB   3
                         T.SIZE  EQU   *-TABLE

where  T.SIZE  will be set to the  number  of  bytes  defined  in  the
preceding table.



-5.3 Using dummy sections-


   A  "dummy section" is a convenient way of laying out symbols within
the workspace that your  program  needs.  For  example,  suppose  your
program  needed  some page zero workspace.  You could build the actual
numeric addresses into the source,  but it's much  better  programming
practice to define some symbols to identify the locations.

   One  way  of  doing  this  would be to use the EQU directive, which
simply sets up a symbol and gives it a value.  Thus you could write

                         WORK0  EQU   $00
                         WORK1  EQU   $01
                         WORK2  EQU   $02

to set up three symbols.  This is a perfectly adequate technique,  but
suffers  from  the disadvantage that you would have to change a lot of
the source if,  say,  you ever wanted the page zero workspace to start
at some place other than address $00.

   A better technique is to define workspace in a dummy section, which
is a region of the source between DSECT  and  DEND  directives.  DSECT
instructs  the  Assembler  that  a  layout  is  being defined: it will
process anything that follows it, but it won't generate any  code  for
the object file.  All it will do is work out what addresses any labels
will take.



                                 28





G                      USING THE 65C02 ASSEMBLERH



   Thus, you could write the above example as

                                DSECT
                         WORK0  DFB   0
                         WORK1  DFB   0
                         WORK2  DFB   0
                                DEND

   Here  each  of the workspace locations has been defined as one byte
long with a DFB directive.  Since  the  Assembler  generates  no  code
within  a  DSECT,  the  actual value you place in the operand field is
quite arbitrary.  This technique also lets you see clearly that you've
set the locations up as one-byte values.  If you wished, say, to  make
them two-byte values,  you could change the DFB directives to DW.  The
Assembler  would  then  allow two bytes to each label,  and the source
would show this clearly.

   In the example above, we have implicitly taken advantage of how the
Assembler handles the address value within a DSECT..DEND  block.  When
it  meets  the first DSECT in a source,  the Assembler makes a note of
the address value it is using in the code,  and resets it to zero  for
the  DSECT..DEND block.  When it meets the DEND,  it resumes using the
address it saved at the start.

   On the second occurrence of a DSECT, the effect is the same, except
that now the address within the DSECT..DEND block resumes at the value
it reached in the -last- block.

   If you don't wish to operate in this way, you can set  the  address
value  with  the  DSECT..DEND  block  yourself with the ORG directive.
Thus, if you wanted your page zero workspace to begin  at  some  other
location, you could write the source as

                                DSECT
                                ORG   $70
                         WORK0  DFB   0
                         WORK1  DFB   0
                         WORK2  DFB   0
                                DEND



     -5.3.1 The DS directive-


     Quite  often  you  will  need to define a large area of workspace
     within a  DSECT..DEND  block,  for example as a source line input
     buffer.  The DFB and DW directives are convenient ways of  laying
     out byte and word values, but there are no built-in directives to
     lay out, say, a 256-byte buffer.

     To  do this, you can use the DS directive, which lets you lay out
     any number of bytes.  For example, to lay out a  256-byte  buffer
     you could write


                                 29





G                      USING THE 65C02 ASSEMBLERH



                                DSECT
                                ORG    $A00
                         BUFFER DS     256
                                DEND

     The  operand  field  of  the DS directive tells the Assembler how
     much space you wish to lay out.

     Normally the DS directive is used in DSECT..DEND blocks,  but you
     can also use it in the code area of a program as  well.  In  this
     case,  the  Assembler  will write the appropriate number of bytes
     containing the value zero to the object file.


-5.4 Defining object load and execution addresses-


   Every machine-code program on a BBC Computer needs to have  a  load
address and an execution address associated with it.  These values are
stored in the file's catalogue entry: when you then *RUN the file, the
filing system will load it to memory starting at the load address, and
will enter it with a JSR instruction going to the execution address.

   The addresses also tell the filing system whether the program is to
be  run  on  a  second processor,  or on the BBC Computer itself.  The
filing system regards load and execution addresses as 4 byte  (32 bit)
values.  The  lower  two  bytes  or  word of each address represent an
actual address in memory and the top two bytes or word of the  address
is a value that indicates which processor the file is to be loaded on.
The Assembler can handle only two-byte values in its arithmetic, so it
is necessary to set the two parts of each address separately.



     -5.4.1 Specifying the low word of the addresses-


     There  are  two ways of setting up the low words of the addresses
     when you assemble programs.  By default, the Assembler  will  set
     the  low words of both the load and the execution addresses to be
     the value set by the first ORG directive that is not in  a  dummy
     section, and in many cases this is all you need do.

     If,  though, you require something else, you can use the LOAD and
     EXEC directives to set the low word of  the  load  and  execution
     addresses respectively. Thus, for example,


                             LOAD  $1900
                             EXEC  START

     would  set  the low word of the load address to be $1900, and the
     low word of the execution address  to  be  whatever  address  the
     label START is defined as.


                                 30





G                      USING THE 65C02 ASSEMBLERH




     -5.4.2 Specifying the processor-


     If  the top word of the load address is $FFFF, the file is loaded
     into the BBC Computer's own memory, whether or not you are  using
     a  second processor.  If the top word is 0, though, the file will
     be loaded into the second processor if you are using one.

     By default, the Assembler produces object files with the top word
     of the addresses set to $FFFF,  so the files will load to the BBC
     Computer's memory.  The MSW directive, though,  lets  you  change
     this value: thus

                               MSW   0

     lets you change the address to 0.  You should always include this
     directive if you write programs to run on a second processor.






































                                 31





G                      USING THE 65C02 ASSEMBLERH



-G6. SOURCE FILE CONTROL DIRECTIVES-H


   The  Assembler  provides  a  number of directives that allow you to
control the source files which you are assembling. This lets you split
your source up into more than one file.


-6.1 Chaining source files-

   If you are writing a large program,  you will find it convenient to
split the source into a number of small files,  rather than keeping it
in one large one.  This approach not only makes editing  easier,   but
also helps you structure the source to reflect the organisation of the
program.  Additionally, if you have a second processor, keeping source
files to less than 14 kilobytes in size will give a very  considerable
increase in assembly speed (see section 1.5).

   You  can instruct the Assembler to assemble multiple files with the
CHN directive. This tells it to close the current source file and open
the one specified in the operand field.

   Thus, you could write

                              CHN  FILE2

as the last line  in  FILE1.  The  Assembler  will  close  FILE1,  and
continue  assembly  with FILE2.  Note that if the CHN directive is -not-
the last line in a file, anything following it will be ignored.

   You can use CHN as many times as you wish in an assembly.


-6.2 Including one file into another-

   A different way of using  multiple  source  files  is  to  use  the
INCLUDE  directive.  This  tells  the  Assembler  to  start assembling
another source file;  unlike  CHN,  however,  the  first  file  is -not-
closed.  When  the Assembler comes to the end of the included file, it
resumes in the original file at the line after the INCLUDE directive.

   One use of this directive might be to include a  file  of  standard
definitions or routines into a source. You might then write

                           INCLUDE  STDSUBS

to assemble the source of some standard routines.

   Lines  that  result  from assembling an included file are marked in
the listing by having an 'I' in the first column.

   Note that you cannot use an INCLUDE directive inside  a  file  that
you  are  including  already.  Nor  can  you  use  the  CHN  and  CODE
directives.


                                 32





G                      USING THE 65C02 ASSEMBLERH



-G7. CONDITIONAL ASSEMBLY-H


   The 65C02  Assembler  has  full  conditional  assembly  facilities,
allowing you easily to change the source being compiled.


-7.1 Assembly conditional on expressions-


   Conditional  assembly that depends on the value of an expression is
achieved by using the IF, ELSE and FI  directives.  The  most  general
form of construction is this:



                    IF   <expr>
                       .
                       TRUE block
                       .
                    ELSE
                       .
                       FALSE block
                       .
                    FI


   <expr>  can be any numeric expression, as described in section 2.2,
but it must not contain any forward references. If <expr> is non-zero,
the Assembler takes the condition as TRUE, and will assemble the lines
in the TRUE block.  On coming to the  ELSE  it  will  ignore  all  the
subsequent lines, until it reaches the FI; here assembly will continue
normally once more.

   If  <expr>  is  zero,  the  condition is FALSE.  The Assembler will
ignore the lines that follow until it reaches the ELSE;  it then  will
assemble the lines in the FALSE block.

   If you wish,  you can omit the ELSE and the FALSE block of code, to
form


                    IF   <expr>
                       .
                       TRUE block
                       .
                    FI


   Here,  if  the  condition is  FALSE,  the Assembler will ignore all
lines up to the FI, so no code is assembled in this case.





                                 33





G                      USING THE 65C02 ASSEMBLERH




   For example, you might have a symbol DEBUG.MODE defined at the very
start of the source to show if debug code is to be assembled  or  not.
This might be defined as


        DEBUG.MODE  EQU   -1    ;use -1 for TRUE, 0 for FALSE


Then, throughout the rest of the source, you can put the debug code in
an IF condition of the form


                    IF   DEBUG.MODE
                       .
                       debug mode version
                       .
                    ELSE
                       .
                       non-debug mode version
                       .
                    FI

   Depending  on circumstances,  you may wish to reverse the condition
tested to include some code if debug mode is -not- selected. You can use
the unary 1's complement or NOT operator here: thus


                    IF   ~DEBUG.MODE     ;read as "IF NOT DEBUG.MODE"
                       .
                       non-debug mode version
                       .
                    FI

includes code if DEBUG.MODE is set to 0.

   The  IF..ELSE..FI  construction  can  also  be  written  using  the
directives DO..ELSE..FIN (or with any combination of them).


-7.2 Assembly conditional on the existence of symbols-


   Two variants  of the IF directive,  IFDEF and IFNDEF,  allow you to
test for the existence or otherwise of symbols.  IFDEF is TRUE  if the
symbol in the operand field does exist; IFNDEF is TRUE if it does not.

   Thus the example above might have been written as








                                 34





G                      USING THE 65C02 ASSEMBLERH




                    IFDEF  DEBUG.MODE
                       .
                       debug mode version
                       .
                    ELSE
                       .
                       non-debug mode version
                       .
                    FI

where the mere existence of the symbol  DEBUG.MODE  would  select  the
debug code, regardless of its value.


-7.3 Nesting conditionals-

   The  Assembler  allows you to "nest" conditionals.  Within a nested
condition,  an ELSE directive will be associated with the  immediately
preceding IF, IFDEF or IFNDEF.


-7.4 Listing conditionals-

   By default,  the Assembler will list all the lines that it skips in
a conditional, printing an "S" in the address field.

   To  save  paper,  or  make  the  listing clearer,  you can suppress
listing of skipped lines with the SFCOND directive,  or by  specifying
the "-S" option in the command line. You can re-instate the listing of
false conditional branches at any time with the LFCOND directive.

























                                 35



00000000  0d 0d 0d 0d 0d 0d 0d 0d  0d 0d 0d 0d 0d 0d 0d 0d  |................|
00000010  1b 47 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.G              |
00000020  20 20 20 20 20 20 20 20  55 53 49 4e 47 20 54 48  |        USING TH|
00000030  45 20 36 35 43 30 32 20  41 53 53 45 4d 42 4c 45  |E 65C02 ASSEMBLE|
00000040  52 1b 48 0d 20 20 20 20  20 20 20 20 20 20 20 20  |R.H.            |
00000050  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000060  28 56 65 72 73 69 6f 6e  20 31 2e 36 30 29 0d 0d  |(Version 1.60)..|
00000070  0d 0d 0d 0d 0d 0d 0d 0d  0d 54 68 69 73 20 20 67  |.........This  g|
00000080  75 69 64 65 20 20 64 65  73 63 72 69 62 65 73 20  |uide  describes |
00000090  68 6f 77 20 74 6f 20 75  73 65 20 74 68 65 20 36  |how to use the 6|
000000a0  35 43 30 32 20 41 73 73  65 6d 62 6c 65 72 20 70  |5C02 Assembler p|
000000b0  72 6f 64 75 63 65 64 20  62 79 20 41 6c 61 6e 0d  |roduced by Alan.|
000000c0  50 68 69 6c 6c 69 70 73  20 6f 66 20 74 68 65 20  |Phillips of the |
000000d0  20 44 65 70 61 72 74 6d  65 6e 74 20 6f 66 20 43  | Department of C|
000000e0  6f 6d 70 75 74 69 6e 67  20 61 74 20 4c 61 6e 63  |omputing at Lanc|
000000f0  61 73 74 65 72 20 55 6e  69 76 65 72 73 69 74 79  |aster University|
00000100  2e 20 20 54 68 65 0d 72  65 61 64 65 72 20 20 69  |.  The.reader  i|
00000110  73 20 20 61 73 73 75 6d  65 64 20 74 6f 20 62 65  |s  assumed to be|
00000120  20 66 61 6d 69 6c 69 61  72 20 77 69 74 68 20 74  | familiar with t|
00000130  68 65 20 63 6f 6e 63 65  70 74 73 20 6f 66 20 70  |he concepts of p|
00000140  72 6f 67 72 61 6d 6d 69  6e 67 20 61 74 0d 61 73  |rogramming at.as|
00000150  73 65 6d 62 6c 79 20 6c  65 76 65 6c 2e 0d 0d 0d  |sembly level....|
00000160  54 68 65 20 36 35 43 30  32 20 41 73 73 65 6d 62  |The 65C02 Assemb|
00000170  6c 65 72 20 69 73 20 63  6f 70 79 72 69 67 68 74  |ler is copyright|
00000180  20 28 43 29 20 41 6c 61  6e 20 50 68 69 6c 6c 69  | (C) Alan Philli|
00000190  70 73 20 20 31 39 38 37  2e 20 20 49 74 20 20 6d  |ps  1987.  It  m|
000001a0  61 79 20 20 62 65 0d 70  61 73 73 65 64 20 20 6f  |ay  be.passed  o|
000001b0  6e 20 20 62 79 20 20 61  6e 79 6f 6e 65 2c 20 20  |n  by  anyone,  |
000001c0  74 6f 20 61 6e 79 6f 6e  65 2c 20 20 61 6e 64 20  |to anyone,  and |
000001d0  75 73 65 64 20 66 6f 72  20 61 6e 79 20 70 65 61  |used for any pea|
000001e0  63 65 66 75 6c 20 70 75  72 70 6f 73 65 0d 77 68  |ceful purpose.wh|
000001f0  65 74 68 65 72 20 70 72  69 76 61 74 65 20 6f 72  |ether private or|
00000200  20 63 6f 6d 6d 65 72 63  69 61 6c 2e 20 4e 6f 20  | commercial. No |
00000210  70 75 72 63 68 61 73 65  2c 20 6c 69 63 65 6e 73  |purchase, licens|
00000220  69 6e 67 20 6f 72 20 70  65 72 6d 69 73 73 69 6f  |ing or permissio|
00000230  6e 20 69 73 0d 6e 65 65  64 65 64 2e 20 20 49 74  |n is.needed.  It|
00000240  20 6d 61 79 20 62 65 20  64 69 73 74 72 69 62 75  | may be distribu|
00000250  74 65 64 20 69 6e 20 61  6e 79 20 77 61 79 20 6f  |ted in any way o|
00000260  72 20 70 6f 73 74 65 64  20 20 6f 6e 20 20 61 6e  |r posted  on  an|
00000270  79 20 20 42 75 6c 6c 65  74 69 6e 0d 42 6f 61 72  |y  Bulletin.Boar|
00000280  64 20 20 73 79 73 74 65  6d 20 20 70 72 6f 76 69  |d  system  provi|
00000290  64 65 64 20 20 74 68 61  74 20 20 69 74 20 20 69  |ded  that  it  i|
000002a0  73 20 20 6e 6f 74 20 73  6f 6c 64 20 28 61 70 61  |s  not sold (apa|
000002b0  72 74 20 66 72 6f 6d 20  72 65 61 73 6f 6e 61 62  |rt from reasonab|
000002c0  6c 65 0d 68 61 6e 64 6c  69 6e 67 20 61 6e 64 20  |le.handling and |
000002d0  6d 65 64 69 61 20 63 6f  73 74 73 29 2c 20 74 68  |media costs), th|
000002e0  61 74 20 64 75 65 20 63  72 65 64 69 74 20 69 73  |at due credit is|
000002f0  20 6d 61 64 65 20 66 6f  72 20 61 75 74 68 6f 72  | made for author|
00000300  73 68 69 70 2c 20 61 6e  64 0d 74 68 61 74 20 74  |ship, and.that t|
00000310  68 69 73 20 70 61 72 61  67 72 61 70 68 20 69 73  |his paragraph is|
00000320  20 62 72 6f 75 67 68 74  20 74 6f 20 74 68 65 20  | brought to the |
00000330  61 74 74 65 6e 74 69 6f  6e 20 6f 66 20 74 68 65  |attention of the|
00000340  20 72 65 63 69 70 69 65  6e 74 2e 0d 0d 0d 0d 0d  | recipient......|
00000350  0d 0d 0d 0d 0d 0d 0d 0d  0d 0d 20 20 20 20 20 20  |..........      |
00000360  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000390  20 20 20 20 20 45 64 69  74 69 6f 6e 20 33 2e 32  |     Edition 3.2|
000003a0  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
000003b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000003d0  20 20 20 20 20 20 20 20  20 20 44 65 63 65 6d 62  |          Decemb|
000003e0  65 72 20 31 39 38 37 0d  20 20 20 20 20 20 20 20  |er 1987.        |
000003f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000420  20 41 6c 61 6e 20 50 68  69 6c 6c 69 70 73 0d 0d  | Alan Phillips..|
00000430  0d 0d 0d 0d 0d 0d 0d 0d  0d 20 20 20 20 20 20 20  |.........       |
00000440  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000450  20 20 20 20 20 20 20 20  1b 47 1b 2d 01 43 4f 4e  |        .G.-.CON|
00000460  54 45 4e 54 53 1b 48 1b  2d 00 0d 0d 0d 0d 20 20  |TENTS.H.-.....  |
00000470  20 20 20 31 2e 20 20 49  4e 54 52 4f 44 55 43 54  |   1.  INTRODUCT|
00000480  49 4f 4e 20 20 20 20 20  20 20 20 20 20 20 20 20  |ION             |
00000490  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000004a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 31 0d  |              1.|
000004b0  20 20 20 20 20 20 20 20  20 31 2e 31 20 20 49 6e  |         1.1  In|
000004c0  73 74 61 6c 6c 69 6e 67  20 74 68 65 20 41 73 73  |stalling the Ass|
000004d0  65 6d 62 6c 65 72 20 20  20 20 20 20 20 20 20 20  |embler          |
000004e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000004f0  31 0d 20 20 20 20 20 20  20 20 20 31 2e 32 20 20  |1.         1.2  |
00000500  54 68 65 20 41 73 73 65  6d 62 6c 65 72 27 73 20  |The Assembler's |
00000510  43 4c 49 20 6d 6f 64 65  20 20 20 20 20 20 20 20  |CLI mode        |
00000520  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000530  20 20 31 0d 20 20 20 20  20 20 20 20 20 31 2e 33  |  1.         1.3|
00000540  20 20 43 72 65 61 74 69  6e 67 20 73 6f 75 72 63  |  Creating sourc|
00000550  65 20 66 69 6c 65 73 20  20 20 20 20 20 20 20 20  |e files         |
00000560  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000570  20 20 20 20 32 0d 20 20  20 20 20 20 20 20 20 31  |    2.         1|
00000580  2e 34 20 20 53 74 61 72  74 69 6e 67 20 61 6e 20  |.4  Starting an |
00000590  61 73 73 65 6d 62 6c 79  20 20 20 20 20 20 20 20  |assembly        |
000005a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000005b0  20 20 20 20 20 20 33 0d  20 20 20 20 20 20 20 20  |      3.        |
000005c0  20 20 20 20 20 20 31 2e  34 2e 31 20 20 54 68 65  |      1.4.1  The|
000005d0  20 63 6f 6d 6d 61 6e 64  20 6c 69 6e 65 20 6f 70  | command line op|
000005e0  74 69 6f 6e 73 20 20 20  20 20 20 20 20 20 20 20  |tions           |
000005f0  20 20 20 20 20 20 20 20  33 0d 20 20 20 20 20 20  |        3.      |
00000600  20 20 20 20 20 20 20 20  31 2e 34 2e 32 20 20 41  |        1.4.2  A|
00000610  6c 74 65 72 6e 61 74 69  76 65 20 73 79 6e 74 61  |lternative synta|
00000620  78 20 66 6f 72 20 74 68  65 20 63 6f 6d 6d 61 6e  |x for the comman|
00000630  64 20 6c 69 6e 65 20 20  20 20 36 0d 20 20 20 20  |d line    6.    |
00000640  20 20 20 20 20 31 2e 35  20 20 41 73 73 65 6d 62  |     1.5  Assemb|
00000650  6c 79 20 6f 6e 20 61 20  73 65 63 6f 6e 64 20 70  |ly on a second p|
00000660  72 6f 63 65 73 73 6f 72  20 20 20 20 20 20 20 20  |rocessor        |
00000670  20 20 20 20 20 20 20 20  20 20 20 20 36 0d 20 20  |            6.  |
00000680  20 20 20 20 20 20 20 31  2e 36 20 20 54 68 65 20  |       1.6  The |
00000690  6f 62 6a 65 63 74 20 63  6f 64 65 20 62 75 66 66  |object code buff|
000006a0  65 72 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |er              |
000006b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 37 0d  |              7.|
000006c0  20 20 20 20 20 20 20 20  20 31 2e 37 20 20 52 65  |         1.7  Re|
000006d0  74 75 72 6e 69 6e 67 20  74 6f 20 74 68 65 20 63  |turning to the c|
000006e0  61 6c 6c 69 6e 67 20 6c  61 6e 67 75 61 67 65 20  |alling language |
000006f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000700  37 0d 20 20 20 20 20 20  20 20 20 31 2e 38 20 20  |7.         1.8  |
00000710  55 73 65 20 6f 66 20 63  6f 6e 74 72 6f 6c 20 6b  |Use of control k|
00000720  65 79 73 20 64 75 72 69  6e 67 20 61 73 73 65 6d  |eys during assem|
00000730  62 6c 79 20 20 20 20 20  20 20 20 20 20 20 20 20  |bly             |
00000740  20 20 38 0d 0d 20 20 20  20 20 32 2e 20 20 53 4f  |  8..     2.  SO|
00000750  55 52 43 45 20 50 52 4f  47 52 41 4d 20 46 4f 52  |URCE PROGRAM FOR|
00000760  4d 41 54 20 20 20 20 20  20 20 20 20 20 20 20 20  |MAT             |
00000770  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000780  20 20 20 20 20 39 0d 20  20 20 20 20 20 20 20 20  |     9.         |
00000790  32 2e 31 20 20 53 79 6e  74 61 78 20 6f 66 20 74  |2.1  Syntax of t|
000007a0  68 65 20 6c 69 6e 65 20  20 20 20 20 20 20 20 20  |he line         |
000007b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000007c0  20 20 20 20 20 20 20 39  0d 20 20 20 20 20 20 20  |       9.       |
000007d0  20 20 20 20 20 20 20 32  2e 31 2e 31 20 20 54 68  |       2.1.1  Th|
000007e0  65 20 6c 61 62 65 6c 20  66 69 65 6c 64 20 20 20  |e label field   |
000007f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000800  20 20 20 20 20 20 20 20  20 39 0d 20 20 20 20 20  |         9.     |
00000810  20 20 20 20 20 20 20 20  20 32 2e 31 2e 32 20 20  |         2.1.2  |
00000820  54 68 65 20 6f 70 63 6f  64 65 20 66 69 65 6c 64  |The opcode field|
00000830  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000840  20 20 20 20 20 20 20 20  20 20 31 30 0d 20 20 20  |          10.   |
00000850  20 20 20 20 20 20 20 20  20 20 20 32 2e 31 2e 33  |           2.1.3|
00000860  20 20 54 68 65 20 6f 70  65 72 61 6e 64 20 66 69  |  The operand fi|
00000870  65 6c 64 20 20 20 20 20  20 20 20 20 20 20 20 20  |eld             |
00000880  20 20 20 20 20 20 20 20  20 20 20 20 31 30 0d 20  |            10. |
00000890  20 20 20 20 20 20 20 20  20 20 20 20 20 32 2e 31  |             2.1|
000008a0  2e 34 20 20 54 68 65 20  63 6f 6d 6d 65 6e 74 20  |.4  The comment |
000008b0  66 69 65 6c 64 20 20 20  20 20 20 20 20 20 20 20  |field           |
000008c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 31 30  |              10|
000008d0  0d 20 20 20 20 20 20 20  20 20 32 2e 32 20 20 54  |.         2.2  T|
000008e0  68 65 20 73 79 6e 74 61  78 20 6f 66 20 65 78 70  |he syntax of exp|
000008f0  72 65 73 73 69 6f 6e 73  20 20 20 20 20 20 20 20  |ressions        |
00000900  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000910  31 30 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |10.             |
00000920  20 32 2e 32 2e 31 20 20  4e 75 6d 65 72 69 63 20  | 2.2.1  Numeric |
00000930  65 78 70 72 65 73 73 69  6f 6e 73 20 20 20 20 20  |expressions     |
00000940  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000950  20 20 31 30 0d 20 20 20  20 20 20 20 20 20 20 20  |  10.           |
00000960  20 20 20 32 2e 32 2e 32  20 20 53 74 72 69 6e 67  |   2.2.2  String|
00000970  73 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |s               |
00000980  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000990  20 20 20 20 31 33 0d 20  20 20 20 20 20 20 20 20  |    13.         |
000009a0  20 20 20 20 20 32 2e 32  2e 33 20 20 53 74 72 69  |     2.2.3  Stri|
000009b0  6e 67 20 65 78 70 72 65  73 73 69 6f 6e 73 20 20  |ng expressions  |
000009c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000009d0  20 20 20 20 20 20 31 33  0d 0d 20 20 20 20 20 33  |      13..     3|
000009e0  2e 20 20 54 48 45 20 4f  55 54 50 55 54 20 4c 49  |.  THE OUTPUT LI|
000009f0  53 54 49 4e 47 20 20 20  20 20 20 20 20 20 20 20  |STING           |
00000a00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000a10  20 20 20 20 20 20 20 20  20 31 34 0d 20 20 20 20  |         14.    |
00000a20  20 20 20 20 20 33 2e 31  20 20 54 68 65 20 73 6f  |     3.1  The so|
00000a30  75 72 63 65 20 6c 69 73  74 69 6e 67 20 6c 65 76  |urce listing lev|
00000a40  65 6c 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |el              |
00000a50  20 20 20 20 20 20 20 20  20 20 20 31 34 0d 20 20  |           14.  |
00000a60  20 20 20 20 20 20 20 33  2e 32 20 20 53 6f 75 72  |       3.2  Sour|
00000a70  63 65 20 6c 69 73 74 69  6e 67 20 66 6f 72 6d 61  |ce listing forma|
00000a80  74 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |t               |
00000a90  20 20 20 20 20 20 20 20  20 20 20 20 20 31 35 0d  |             15.|
00000aa0  20 20 20 20 20 20 20 20  20 33 2e 33 20 20 4c 69  |         3.3  Li|
00000ab0  73 74 69 6e 67 20 6f 62  6a 65 63 74 20 63 6f 64  |sting object cod|
00000ac0  65 20 62 79 74 65 73 20  20 20 20 20 20 20 20 20  |e bytes         |
00000ad0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 31  |               1|
00000ae0  36 0d 20 20 20 20 20 20  20 20 20 33 2e 34 20 20  |6.         3.4  |
00000af0  53 79 6d 62 6f 6c 20 74  61 62 6c 65 20 6c 69 73  |Symbol table lis|
00000b00  74 69 6e 67 20 66 6f 72  6d 61 74 20 20 20 20 20  |ting format     |
00000b10  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000b20  20 31 37 0d 20 20 20 20  20 20 20 20 20 33 2e 35  | 17.         3.5|
00000b30  20 20 45 72 72 6f 72 20  72 65 70 6f 72 74 73 20  |  Error reports |
00000b40  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000b60  20 20 20 31 37 0d 20 20  20 20 20 20 20 20 20 33  |   17.         3|
00000b70  2e 36 20 20 4f 75 74 70  75 74 20 70 61 67 65 20  |.6  Output page |
00000b80  63 6f 6e 74 72 6f 6c 20  20 20 20 20 20 20 20 20  |control         |
00000b90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000ba0  20 20 20 20 20 31 37 0d  20 20 20 20 20 20 20 20  |     17.        |
00000bb0  20 20 20 20 20 20 33 2e  36 2e 31 20 20 53 65 74  |      3.6.1  Set|
00000bc0  74 69 6e 67 20 70 61 67  65 20 64 69 6d 65 6e 73  |ting page dimens|
00000bd0  69 6f 6e 73 20 20 20 20  20 20 20 20 20 20 20 20  |ions            |
00000be0  20 20 20 20 20 20 20 31  37 0d 20 20 20 20 20 20  |       17.      |
00000bf0  20 20 20 20 20 20 20 20  33 2e 36 2e 32 20 20 53  |        3.6.2  S|
00000c00  65 74 74 69 6e 67 20 74  68 65 20 70 61 67 65 20  |etting the page |
00000c10  74 69 74 6c 65 20 20 20  20 20 20 20 20 20 20 20  |title           |
00000c20  20 20 20 20 20 20 20 20  20 31 38 0d 20 20 20 20  |         18.    |
00000c30  20 20 20 20 20 20 20 20  20 20 33 2e 36 2e 33 20  |          3.6.3 |
00000c40  20 53 65 74 74 69 6e 67  20 74 68 65 20 74 69 6d  | Setting the tim|
00000c50  65 73 74 61 6d 70 20 20  20 20 20 20 20 20 20 20  |estamp          |
00000c60  20 20 20 20 20 20 20 20  20 20 20 31 38 0d 20 20  |           18.  |
00000c70  20 20 20 20 20 20 20 20  20 20 20 20 33 2e 36 2e  |            3.6.|
00000c80  34 20 20 50 61 67 65 20  6c 61 79 6f 75 74 20 64  |4  Page layout d|
00000c90  69 72 65 63 74 69 76 65  73 20 20 20 20 20 20 20  |irectives       |
00000ca0  20 20 20 20 20 20 20 20  20 20 20 20 20 31 39 0d  |             19.|
00000cb0  20 20 20 20 20 20 20 20  20 33 2e 37 20 20 43 6f  |         3.7  Co|
00000cc0  6e 74 72 6f 6c 6c 69 6e  67 20 74 68 65 20 6f 75  |ntrolling the ou|
00000cd0  74 70 75 74 20 64 65 73  74 69 6e 61 74 69 6f 6e  |tput destination|
00000ce0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 32  |               2|
00000cf0  30 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |0.              |
00000d00  33 2e 37 2e 31 20 20 4f  75 74 70 75 74 20 74 6f  |3.7.1  Output to|
00000d10  20 61 20 70 72 69 6e 74  65 72 20 20 20 20 20 20  | a printer      |
00000d20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000d30  20 32 30 0d 20 20 20 20  20 20 20 20 20 20 20 20  | 20.            |
00000d40  20 20 33 2e 37 2e 32 20  20 4f 75 74 70 75 74 20  |  3.7.2  Output |
00000d50  74 6f 20 61 20 66 69 6c  65 20 20 20 20 20 20 20  |to a file       |
00000d60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000d70  20 20 20 32 30 0d 20 20  20 20 20 20 20 20 20 20  |   20.          |
00000d80  20 20 20 20 33 2e 37 2e  33 20 20 50 72 69 6e 74  |    3.7.3  Print|
00000d90  65 72 20 63 6f 6e 74 72  6f 6c 20 20 20 20 20 20  |er control      |
00000da0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000db0  20 20 20 20 20 32 31 0d  0d 20 20 20 20 20 34 2e  |     21..     4.|
00000dc0  20 20 44 49 52 45 43 54  49 56 45 53 20 44 45 46  |  DIRECTIVES DEF|
00000dd0  49 4e 49 4e 47 20 44 41  54 41 20 41 4e 44 20 43  |INING DATA AND C|
00000de0  4f 4e 53 54 41 4e 54 53  20 20 20 20 20 20 20 20  |ONSTANTS        |
00000df0  20 20 20 20 20 20 20 20  32 32 0d 20 20 20 20 20  |        22.     |
00000e00  20 20 20 20 34 2e 31 20  20 44 65 66 69 6e 69 6e  |    4.1  Definin|
00000e10  67 20 63 6f 6e 73 74 61  6e 74 73 20 20 20 20 20  |g constants     |
00000e20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000e30  20 20 20 20 20 20 20 20  20 20 32 32 0d 20 20 20  |          22.   |
00000e40  20 20 20 20 20 20 34 2e  32 20 20 42 79 74 65 20  |      4.2  Byte |
00000e50  61 6e 64 20 77 6f 72 64  20 64 69 72 65 63 74 69  |and word directi|
00000e60  76 65 73 20 20 20 20 20  20 20 20 20 20 20 20 20  |ves             |
00000e70  20 20 20 20 20 20 20 20  20 20 20 20 32 32 0d 20  |            22. |
00000e80  20 20 20 20 20 20 20 20  20 20 20 20 20 34 2e 32  |             4.2|
00000e90  2e 31 20 20 42 79 74 65  20 64 69 72 65 63 74 69  |.1  Byte directi|
00000ea0  76 65 73 20 20 20 20 20  20 20 20 20 20 20 20 20  |ves             |
00000eb0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 32 32  |              22|
00000ec0  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 34  |.              4|
00000ed0  2e 32 2e 32 20 20 57 6f  72 64 20 64 69 72 65 63  |.2.2  Word direc|
00000ee0  74 69 76 65 73 20 20 20  20 20 20 20 20 20 20 20  |tives           |
00000ef0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000f00  32 33 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |23.             |
00000f10  20 34 2e 32 2e 33 20 20  55 73 69 6e 67 20 72 65  | 4.2.3  Using re|
00000f20  70 65 61 74 20 63 6f 75  6e 74 73 20 20 20 20 20  |peat counts     |
00000f30  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000f40  20 20 32 33 0d 20 20 20  20 20 20 20 20 20 34 2e  |  23.         4.|
00000f50  33 20 20 43 68 61 72 61  63 74 65 72 20 73 74 72  |3  Character str|
00000f60  69 6e 67 20 64 69 72 65  63 74 69 76 65 73 20 20  |ing directives  |
00000f70  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000f80  20 20 20 20 32 34 0d 20  20 20 20 20 20 20 20 20  |    24.         |
00000f90  20 20 20 20 20 34 2e 33  2e 31 20 20 54 68 65 20  |     4.3.1  The |
00000fa0  41 53 43 20 61 6e 64 20  53 54 52 20 64 69 72 65  |ASC and STR dire|
00000fb0  63 74 69 76 65 73 20 20  20 20 20 20 20 20 20 20  |ctives          |
00000fc0  20 20 20 20 20 20 32 34  0d 20 20 20 20 20 20 20  |      24.       |
00000fd0  20 20 20 20 20 20 20 34  2e 33 2e 32 20 20 54 68  |       4.3.2  Th|
00000fe0  65 20 43 41 53 43 20 61  6e 64 20 43 53 54 52 20  |e CASC and CSTR |
00000ff0  64 69 72 65 63 74 69 76  65 73 20 20 20 20 20 20  |directives      |
00001000  20 20 20 20 20 20 20 20  32 34 0d 20 20 20 20 20  |        24.     |
00001010  20 20 20 20 20 20 20 20  20 34 2e 33 2e 33 20 20  |         4.3.3  |
00001020  50 6c 61 6e 74 69 6e 67  20 73 70 65 63 69 61 6c  |Planting special|
00001030  20 63 68 61 72 61 63 74  65 72 73 20 20 20 20 20  | characters     |
00001040  20 20 20 20 20 20 20 20  20 20 32 35 0d 20 20 20  |          25.   |
00001050  20 20 20 20 20 20 34 2e  34 20 20 54 68 65 20 48  |      4.4  The H|
00001060  45 58 20 64 69 72 65 63  74 69 76 65 20 20 20 20  |EX directive    |
00001070  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001080  20 20 20 20 20 20 20 20  20 20 20 20 32 36 0d 20  |            26. |
00001090  20 20 20 20 20 20 20 20  34 2e 35 20 20 54 68 65  |        4.5  The|
000010a0  20 43 4f 44 45 20 64 69  72 65 63 74 69 76 65 20  | CODE directive |
000010b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000010c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 32 36  |              26|
000010d0  0d 0d 0d 0d 0d 0d 20 20  20 20 20 20 20 20 20 20  |......          |
000010e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000010f0  20 20 20 20 20 20 20 20  69 0d 0d 0d 0d 0d 0d 0d  |        i.......|
00001100  0d 0d 0d 20 20 20 20 20  35 2e 20 20 4f 42 4a 45  |...     5.  OBJE|
00001110  43 54 20 46 49 4c 45 20  43 4f 4e 54 52 4f 4c 20  |CT FILE CONTROL |
00001120  44 49 52 45 43 54 49 56  45 53 20 20 20 20 20 20  |DIRECTIVES      |
00001130  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001140  20 20 32 37 0d 20 20 20  20 20 20 20 20 20 35 2e  |  27.         5.|
00001150  31 20 20 44 65 66 69 6e  69 6e 67 20 74 68 65 20  |1  Defining the |
00001160  63 75 72 72 65 6e 74 20  61 64 64 72 65 73 73 20  |current address |
00001170  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001180  20 20 20 20 32 37 0d 20  20 20 20 20 20 20 20 20  |    27.         |
00001190  35 2e 32 20 20 52 65 61  64 69 6e 67 20 74 68 65  |5.2  Reading the|
000011a0  20 63 75 72 72 65 6e 74  20 61 64 64 72 65 73 73  | current address|
000011b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000011c0  20 20 20 20 20 20 32 38  0d 20 20 20 20 20 20 20  |      28.       |
000011d0  20 20 35 2e 33 20 20 55  73 69 6e 67 20 64 75 6d  |  5.3  Using dum|
000011e0  6d 79 20 73 65 63 74 69  6f 6e 73 20 20 20 20 20  |my sections     |
000011f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001200  20 20 20 20 20 20 20 20  32 38 0d 20 20 20 20 20  |        28.     |
00001210  20 20 20 20 20 20 20 20  20 35 2e 33 2e 31 20 20  |         5.3.1  |
00001220  54 68 65 20 44 53 20 64  69 72 65 63 74 69 76 65  |The DS directive|
00001230  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001240  20 20 20 20 20 20 20 20  20 20 32 39 0d 20 20 20  |          29.   |
00001250  20 20 20 20 20 20 35 2e  34 20 20 44 65 66 69 6e  |      5.4  Defin|
00001260  69 6e 67 20 6f 62 6a 65  63 74 20 6c 6f 61 64 20  |ing object load |
00001270  61 6e 64 20 65 78 65 63  75 74 69 6f 6e 20 61 64  |and execution ad|
00001280  64 72 65 73 73 65 73 20  20 20 20 20 33 30 0d 20  |dresses     30. |
00001290  20 20 20 20 20 20 20 20  20 20 20 20 20 35 2e 34  |             5.4|
000012a0  2e 31 20 20 53 70 65 63  69 66 79 69 6e 67 20 74  |.1  Specifying t|
000012b0  68 65 20 6c 6f 77 20 77  6f 72 64 20 6f 66 20 74  |he low word of t|
000012c0  68 65 20 61 64 64 72 65  73 73 65 73 20 20 33 30  |he addresses  30|
000012d0  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 35  |.              5|
000012e0  2e 34 2e 32 20 20 53 70  65 63 69 66 79 69 6e 67  |.4.2  Specifying|
000012f0  20 74 68 65 20 70 72 6f  63 65 73 73 6f 72 20 20  | the processor  |
00001300  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001310  33 31 0d 0d 20 20 20 20  20 36 2e 20 20 53 4f 55  |31..     6.  SOU|
00001320  52 43 45 20 46 49 4c 45  20 43 4f 4e 54 52 4f 4c  |RCE FILE CONTROL|
00001330  20 44 49 52 45 43 54 49  56 45 53 20 20 20 20 20  | DIRECTIVES     |
00001340  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001350  20 20 20 33 32 0d 20 20  20 20 20 20 20 20 20 36  |   32.         6|
00001360  2e 31 20 20 43 68 61 69  6e 69 6e 67 20 73 6f 75  |.1  Chaining sou|
00001370  72 63 65 20 66 69 6c 65  73 20 20 20 20 20 20 20  |rce files       |
00001380  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001390  20 20 20 20 20 33 32 0d  20 20 20 20 20 20 20 20  |     32.        |
000013a0  20 36 2e 32 20 20 49 6e  63 6c 75 64 69 6e 67 20  | 6.2  Including |
000013b0  6f 6e 65 20 66 69 6c 65  20 69 6e 74 6f 20 61 6e  |one file into an|
000013c0  6f 74 68 65 72 20 20 20  20 20 20 20 20 20 20 20  |other           |
000013d0  20 20 20 20 20 20 20 33  32 0d 0d 20 20 20 20 20  |       32..     |
000013e0  37 2e 20 20 43 4f 4e 44  49 54 49 4f 4e 41 4c 20  |7.  CONDITIONAL |
000013f0  41 53 53 45 4d 42 4c 59  20 20 20 20 20 20 20 20  |ASSEMBLY        |
00001400  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001410  20 20 20 20 20 20 20 20  20 20 33 33 0d 20 20 20  |          33.   |
00001420  20 20 20 20 20 20 37 2e  31 20 20 41 73 73 65 6d  |      7.1  Assem|
00001430  62 6c 79 20 63 6f 6e 64  69 74 69 6f 6e 61 6c 20  |bly conditional |
00001440  6f 6e 20 65 78 70 72 65  73 73 69 6f 6e 73 20 20  |on expressions  |
00001450  20 20 20 20 20 20 20 20  20 20 20 20 33 33 0d 20  |            33. |
00001460  20 20 20 20 20 20 20 20  37 2e 32 20 20 41 73 73  |        7.2  Ass|
00001470  65 6d 62 6c 79 20 63 6f  6e 64 69 74 69 6f 6e 61  |embly conditiona|
00001480  6c 20 6f 6e 20 74 68 65  20 65 78 69 73 74 65 6e  |l on the existen|
00001490  63 65 20 6f 66 20 73 79  6d 62 6f 6c 73 20 33 34  |ce of symbols 34|
000014a0  0d 20 20 20 20 20 20 20  20 20 37 2e 33 20 20 4e  |.         7.3  N|
000014b0  65 73 74 69 6e 67 20 63  6f 6e 64 69 74 69 6f 6e  |esting condition|
000014c0  61 6c 73 20 20 20 20 20  20 20 20 20 20 20 20 20  |als             |
000014d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000014e0  33 35 0d 20 20 20 20 20  20 20 20 20 37 2e 34 20  |35.         7.4 |
000014f0  20 4c 69 73 74 69 6e 67  20 63 6f 6e 64 69 74 69  | Listing conditi|
00001500  6f 6e 61 6c 73 20 20 20  20 20 20 20 20 20 20 20  |onals           |
00001510  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001520  20 20 33 35 0d 0d 20 20  20 20 20 38 2e 20 20 50  |  35..     8.  P|
00001530  52 4f 47 52 45 53 53 20  52 45 50 4f 52 54 49 4e  |ROGRESS REPORTIN|
00001540  47 20 44 49 52 45 43 54  49 56 45 53 20 20 20 20  |G DIRECTIVES    |
00001550  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001560  20 20 20 20 20 33 36 0d  20 20 20 20 20 20 20 20  |     36.        |
00001570  20 38 2e 31 20 20 54 68  65 20 44 49 53 50 2c 20  | 8.1  The DISP, |
00001580  44 49 53 50 31 20 61 6e  64 20 44 49 53 50 32 20  |DISP1 and DISP2 |
00001590  64 69 72 65 63 74 69 76  65 73 20 20 20 20 20 20  |directives      |
000015a0  20 20 20 20 20 20 20 33  36 0d 20 20 20 20 20 20  |       36.      |
000015b0  20 20 20 38 2e 32 20 20  54 68 65 20 57 41 49 54  |   8.2  The WAIT|
000015c0  2c 20 57 41 49 54 31 20  61 6e 64 20 57 41 49 54  |, WAIT1 and WAIT|
000015d0  32 20 64 69 72 65 63 74  69 76 65 73 20 20 20 20  |2 directives    |
000015e0  20 20 20 20 20 20 20 20  20 33 37 0d 20 20 20 20  |         37.    |
000015f0  20 20 20 20 20 38 2e 33  20 20 54 68 65 20 51 55  |     8.3  The QU|
00001600  45 52 59 20 64 69 72 65  63 74 69 76 65 20 20 20  |ERY directive   |
00001610  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001620  20 20 20 20 20 20 20 20  20 20 20 33 37 0d 20 20  |           37.  |
00001630  20 20 20 20 20 20 20 38  2e 34 20 20 54 68 65 20  |       8.4  The |
00001640  53 54 4f 50 20 64 69 72  65 63 74 69 76 65 20 20  |STOP directive  |
00001650  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001660  20 20 20 20 20 20 20 20  20 20 20 20 20 33 38 0d  |             38.|
00001670  0d 20 20 20 20 20 39 2e  20 20 57 52 49 54 49 4e  |.     9.  WRITIN|
00001680  47 20 53 49 4d 50 4c 45  20 4d 41 43 52 4f 53 20  |G SIMPLE MACROS |
00001690  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000016b0  33 39 0d 20 20 20 20 20  20 20 20 20 39 2e 31 20  |39.         9.1 |
000016c0  20 55 73 69 6e 67 20 6d  61 63 72 6f 20 70 61 72  | Using macro par|
000016d0  61 6d 65 74 65 72 73 20  20 20 20 20 20 20 20 20  |ameters         |
000016e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000016f0  20 20 33 39 0d 20 20 20  20 20 20 20 20 20 39 2e  |  39.         9.|
00001700  32 20 20 53 70 65 63 69  66 79 69 6e 67 20 6d 61  |2  Specifying ma|
00001710  63 72 6f 20 70 61 72 61  6d 65 74 65 72 73 20 20  |cro parameters  |
00001720  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001730  20 20 20 20 34 30 0d 20  20 20 20 20 20 20 20 20  |    40.         |
00001740  39 2e 33 20 20 4e 65 73  74 69 6e 67 20 6d 61 63  |9.3  Nesting mac|
00001750  72 6f 73 20 20 20 20 20  20 20 20 20 20 20 20 20  |ros             |
00001760  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001770  20 20 20 20 20 20 34 31  0d 20 20 20 20 20 20 20  |      41.       |
00001780  20 20 39 2e 34 20 20 52  65 64 65 66 69 6e 69 6e  |  9.4  Redefinin|
00001790  67 20 6f 70 63 6f 64 65  73 20 61 6e 64 20 64 69  |g opcodes and di|
000017a0  72 65 63 74 69 76 65 73  20 20 20 20 20 20 20 20  |rectives        |
000017b0  20 20 20 20 20 20 20 20  34 31 0d 20 20 20 20 20  |        41.     |
000017c0  20 20 20 20 39 2e 35 20  20 4c 61 62 65 6c 73 20  |    9.5  Labels |
000017d0  77 69 74 68 69 6e 20 6d  61 63 72 6f 73 20 20 20  |within macros   |
000017e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000017f0  20 20 20 20 20 20 20 20  20 20 34 32 0d 0d 20 20  |          42..  |
00001800  20 20 20 31 30 2e 20 54  48 45 20 4d 41 43 52 4f  |   10. THE MACRO|
00001810  20 50 52 4f 47 52 41 4d  4d 49 4e 47 20 4c 41 4e  | PROGRAMMING LAN|
00001820  47 55 41 47 45 20 20 20  20 20 20 20 20 20 20 20  |GUAGE           |
00001830  20 20 20 20 20 20 20 20  20 20 20 20 20 34 33 0d  |             43.|
00001840  20 20 20 20 20 20 20 20  20 31 30 2e 31 20 53 65  |         10.1 Se|
00001850  71 75 65 6e 63 65 20 53  79 6d 62 6f 6c 73 20 20  |quence Symbols  |
00001860  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001870  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 34  |               4|
00001880  33 0d 20 20 20 20 20 20  20 20 20 31 30 2e 32 20  |3.         10.2 |
00001890  41 73 73 65 6d 62 6c 79  20 54 69 6d 65 20 56 61  |Assembly Time Va|
000018a0  72 69 61 62 6c 65 73 20  20 20 20 20 20 20 20 20  |riables         |
000018b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000018c0  20 34 34 0d 20 20 20 20  20 20 20 20 20 20 20 20  | 44.            |
000018d0  20 20 31 30 2e 32 2e 31  20 43 72 65 61 74 69 6e  |  10.2.1 Creatin|
000018e0  67 20 41 73 73 65 6d 62  6c 79 20 54 69 6d 65 20  |g Assembly Time |
000018f0  56 61 72 69 61 62 6c 65  73 20 20 20 20 20 20 20  |Variables       |
00001900  20 20 20 34 34 0d 20 20  20 20 20 20 20 20 20 20  |   44.          |
00001910  20 20 20 20 20 20 20 20  20 20 20 31 30 2e 32 2e  |           10.2.|
00001920  31 2e 31 20 4c 6f 63 61  6c 20 61 6e 64 20 67 6c  |1.1 Local and gl|
00001930  6f 62 61 6c 20 41 54 56  73 20 20 20 20 20 20 20  |obal ATVs       |
00001940  20 20 20 20 20 34 34 0d  20 20 20 20 20 20 20 20  |     44.        |
00001950  20 20 20 20 20 20 20 20  20 20 20 20 20 31 30 2e  |             10.|
00001960  32 2e 31 2e 32 20 53 74  72 69 6e 67 20 61 6e 64  |2.1.2 String and|
00001970  20 6e 75 6d 65 72 69 63  20 76 61 6c 75 65 73 20  | numeric values |
00001980  20 20 20 20 20 20 20 34  35 0d 20 20 20 20 20 20  |       45.      |
00001990  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 31  |               1|
000019a0  30 2e 32 2e 31 2e 33 20  53 74 72 69 6e 67 20 73  |0.2.1.3 String s|
000019b0  6c 69 63 69 6e 67 20 20  20 20 20 20 20 20 20 20  |licing          |
000019c0  20 20 20 20 20 20 20 20  20 34 36 0d 20 20 20 20  |         46.    |
000019d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000019e0  20 31 30 2e 32 2e 31 2e  34 20 45 66 66 69 63 69  | 10.2.1.4 Effici|
000019f0  65 6e 74 20 75 73 65 20  6f 66 20 6d 65 6d 6f 72  |ent use of memor|
00001a00  79 20 20 20 20 20 20 20  20 20 20 34 37 0d 20 20  |y          47.  |
00001a10  20 20 20 20 20 20 20 20  20 20 20 20 31 30 2e 32  |            10.2|
00001a20  2e 32 20 53 69 6d 70 6c  65 20 73 75 62 73 74 69  |.2 Simple substi|
00001a30  74 75 74 69 6f 6e 20 6f  66 20 41 54 56 73 20 20  |tution of ATVs  |
00001a40  20 20 20 20 20 20 20 20  20 20 20 20 20 34 37 0d  |             47.|
00001a50  20 20 20 20 20 20 20 20  20 31 30 2e 33 20 57 72  |         10.3 Wr|
00001a60  69 74 69 6e 67 20 63 6f  6d 70 6c 65 78 20 6d 61  |iting complex ma|
00001a70  63 72 6f 73 20 20 20 20  20 20 20 20 20 20 20 20  |cros            |
00001a80  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 34  |               4|
00001a90  39 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |9.              |
00001aa0  31 30 2e 33 2e 31 20 50  72 6f 67 72 61 6d 6d 69  |10.3.1 Programmi|
00001ab0  6e 67 20 6d 61 63 72 6f  20 6c 6f 6f 70 73 20 20  |ng macro loops  |
00001ac0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001ad0  20 34 39 0d 20 20 20 20  20 20 20 20 20 20 20 20  | 49.            |
00001ae0  20 20 20 20 20 20 20 20  20 31 30 2e 33 2e 31 2e  |         10.3.1.|
00001af0  31 20 4c 6f 6f 70 73 20  63 6f 6e 74 72 6f 6c 6c  |1 Loops controll|
00001b00  65 64 20 62 79 20 63 6f  75 6e 74 65 72 20 20 20  |ed by counter   |
00001b10  20 20 20 35 30 0d 20 20  20 20 20 20 20 20 20 20  |   50.          |
00001b20  20 20 20 20 20 20 20 20  20 20 20 31 30 2e 33 2e  |           10.3.|
00001b30  31 2e 32 20 4c 6f 6f 70  73 20 61 63 63 65 73 73  |1.2 Loops access|
00001b40  69 6e 67 20 6d 61 63 72  6f 20 70 61 72 61 6d 65  |ing macro parame|
00001b50  74 65 72 73 20 35 31 0d  20 20 20 20 20 20 20 20  |ters 51.        |
00001b60  20 20 20 20 20 20 31 30  2e 33 2e 32 20 43 68 61  |      10.3.2 Cha|
00001b70  6e 67 69 6e 67 20 6d 61  63 72 6f 20 70 61 72 61  |nging macro para|
00001b80  6d 65 74 65 72 73 20 20  20 20 20 20 20 20 20 20  |meters          |
00001b90  20 20 20 20 20 20 20 35  33 0d 20 20 20 20 20 20  |       53.      |
00001ba0  20 20 20 20 20 20 20 20  31 30 2e 33 2e 33 20 53  |        10.3.3 S|
00001bb0  65 74 74 69 6e 67 20 64  65 66 61 75 6c 74 20 6d  |etting default m|
00001bc0  61 63 72 6f 20 70 61 72  61 6d 65 74 65 72 73 20  |acro parameters |
00001bd0  20 20 20 20 20 20 20 20  20 35 34 0d 20 20 20 20  |         54.    |
00001be0  20 20 20 20 20 20 20 20  20 20 31 30 2e 33 2e 34  |          10.3.4|
00001bf0  20 4c 69 73 74 69 6e 67  20 63 6f 6e 74 72 6f 6c  | Listing control|
00001c00  20 66 6f 72 20 6d 61 63  72 6f 73 20 20 20 20 20  | for macros     |
00001c10  20 20 20 20 20 20 20 20  20 20 20 35 34 0d 20 20  |           54.  |
00001c20  20 20 20 20 20 20 20 20  20 20 20 20 31 30 2e 33  |            10.3|
00001c30  2e 35 20 45 78 69 74 69  6e 67 20 61 20 6d 61 63  |.5 Exiting a mac|
00001c40  72 6f 20 70 72 65 6d 61  74 75 72 65 6c 79 20 20  |ro prematurely  |
00001c50  20 20 20 20 20 20 20 20  20 20 20 20 20 35 35 0d  |             55.|
00001c60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 31 30  |              10|
00001c70  2e 33 2e 36 20 43 6f 6d  6d 65 6e 74 20 6c 69 6e  |.3.6 Comment lin|
00001c80  65 73 20 77 69 74 68 69  6e 20 6d 61 63 72 6f 73  |es within macros|
00001c90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 35  |               5|
00001ca0  35 0d 20 20 20 20 20 20  20 20 20 31 30 2e 34 20  |5.         10.4 |
00001cb0  53 79 73 74 65 6d 20 41  54 56 73 20 20 20 20 20  |System ATVs     |
00001cc0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00001ce0  20 35 36 0d 0d 0d 0d 0d  0d 20 20 20 20 20 20 20  | 56......       |
00001cf0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001d00  20 20 20 20 20 20 20 20  20 20 20 69 69 0d 0d 0d  |           ii...|
00001d10  0d 0d 0d 0d 0d 0d 0d 20  20 20 20 20 1b 47 1b 2d  |.......     .G.-|
00001d20  01 41 70 70 65 6e 64 69  63 65 73 1b 2d 00 1b 48  |.Appendices.-..H|
00001d30  0d 0d 0d 0d 20 20 20 20  20 41 31 2e 20 4f 70 63  |....     A1. Opc|
00001d40  6f 64 65 73 20 61 6e 64  20 61 64 64 72 65 73 73  |odes and address|
00001d50  69 6e 67 20 6d 6f 64 65  73 20 20 20 20 20 20 20  |ing modes       |
00001d60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001d70  20 20 20 35 38 0d 0d 20  20 20 20 20 41 32 2e 20  |   58..     A2. |
00001d80  41 73 73 65 6d 62 6c 65  72 20 64 69 72 65 63 74  |Assembler direct|
00001d90  69 76 65 73 20 20 20 20  20 20 20 20 20 20 20 20  |ives            |
00001da0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001db0  20 20 20 20 20 20 35 39  0d 0d 20 20 20 20 20 41  |      59..     A|
00001dc0  33 2e 20 44 69 66 66 65  72 65 6e 63 65 73 20 66  |3. Differences f|
00001dd0  72 6f 6d 20 74 68 65 20  41 44 45 20 41 73 73 65  |rom the ADE Asse|
00001de0  6d 62 6c 65 72 20 20 20  20 20 20 20 20 20 20 20  |mbler           |
00001df0  20 20 20 20 20 20 20 20  20 37 35 0d 0d 20 20 20  |         75..   |
00001e00  20 20 41 34 2e 20 44 69  66 66 65 72 65 6e 63 65  |  A4. Difference|
00001e10  73 20 66 72 6f 6d 20 70  72 65 76 69 6f 75 73 20  |s from previous |
00001e20  72 65 6c 65 61 73 65 73  20 20 20 20 20 20 20 20  |releases        |
00001e30  20 20 20 20 20 20 20 20  20 20 20 20 37 36 0d 0d  |            76..|
00001e40  20 20 20 20 20 41 35 2e  20 43 75 73 74 6f 6d 69  |     A5. Customi|
00001e50  73 69 6e 67 20 74 68 65  20 41 73 73 65 6d 62 6c  |sing the Assembl|
00001e60  65 72 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |er              |
00001e70  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 37  |               7|
00001e80  38 0d 20 20 20 20 20 20  20 20 20 41 35 2e 31 20  |8.         A5.1 |
00001e90  54 68 65 20 70 61 74 63  68 20 61 72 65 61 20 20  |The patch area  |
00001ea0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00001ec0  20 37 38 0d 20 20 20 20  20 20 20 20 20 20 20 20  | 78.            |
00001ed0  20 20 41 35 2e 31 2e 31  20 54 68 65 20 64 65 66  |  A5.1.1 The def|
00001ee0  61 75 6c 74 20 54 41 42  20 70 6f 73 69 74 69 6f  |ault TAB positio|
00001ef0  6e 20 6c 69 73 74 20 20  20 20 20 20 20 20 20 20  |n list          |
00001f00  20 20 20 37 38 0d 20 20  20 20 20 20 20 20 20 20  |   78.          |
00001f10  20 20 20 20 41 35 2e 31  2e 32 20 53 6f 75 72 63  |    A5.1.2 Sourc|
00001f20  65 20 63 68 61 72 61 63  74 65 72 20 74 72 61 6e  |e character tran|
00001f30  73 6c 61 74 69 6f 6e 20  20 20 20 20 20 20 20 20  |slation         |
00001f40  20 20 20 20 20 37 39 0d  20 20 20 20 20 20 20 20  |     79.        |
00001f50  20 20 20 20 20 20 41 35  2e 31 2e 33 20 52 65 61  |      A5.1.3 Rea|
00001f60  6c 20 74 69 6d 65 20 63  6c 6f 63 6b 20 68 61 6e  |l time clock han|
00001f70  64 6c 69 6e 67 20 20 20  20 20 20 20 20 20 20 20  |dling           |
00001f80  20 20 20 20 20 20 20 37  39 0d 20 20 20 20 20 20  |       79.      |
00001f90  20 20 20 20 20 20 20 20  41 35 2e 31 2e 34 20 43  |        A5.1.4 C|
00001fa0  68 61 72 61 63 74 65 72  20 63 6f 6e 73 74 61 6e  |haracter constan|
00001fb0  74 20 61 6e 64 20 73 74  72 69 6e 67 20 6f 70 74  |t and string opt|
00001fc0  69 6f 6e 73 20 20 20 20  20 37 39 0d 20 20 20 20  |ions     79.    |
00001fd0  20 20 20 20 20 20 20 20  20 20 41 35 2e 31 2e 35  |          A5.1.5|
00001fe0  20 50 61 67 65 20 74 68  72 6f 77 73 20 61 74 20  | Page throws at |
00001ff0  74 68 65 20 65 6e 64 20  6f 66 20 61 20 6c 69 73  |the end of a lis|
00002000  74 69 6e 67 20 20 20 20  20 20 20 38 30 0d 0d 0d  |ting       80...|
00002010  0d 0d 0d 0d 0d 0d 0d 0d  0d 0d 0d 0d 0d 0d 0d 0d  |................|
00002020  0d 0d 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |...             |
00002030  20 20 20 20 20 20 20 20  20 20 20 20 20 20 1b 47  |              .G|
00002040  41 63 6b 6e 6f 77 6c 65  64 67 6d 65 6e 74 73 1b  |Acknowledgments.|
00002050  48 0d 0d 54 68 61 6e 6b  73 20 61 72 65 20 64 75  |H..Thanks are du|
00002060  65 20 74 6f 20 20 44 61  76 65 20 4d 6f 72 72 69  |e to  Dave Morri|
00002070  73 73 2c 20 4e 65 69 6c  20 4d 65 72 63 65 72 2c  |ss, Neil Mercer,|
00002080  20 41 6c 61 6e 20 42 61  6b 65 72 2c 20 50 65 74  | Alan Baker, Pet|
00002090  65 72 20 56 69 6e 63 65  2c 0d 4d 69 6b 65 20 20  |er Vince,.Mike  |
000020a0  54 75 62 62 79 2c 20 20  53 63 6f 74 74 20 20 4c  |Tubby,  Scott  L|
000020b0  61 72 73 6f 6e 20 20 61  6e 64 20 20 50 65 74 65  |arson  and  Pete|
000020c0  72 20 20 46 72 61 6e 63  69 73 20 20 66 6f 72 20  |r  Francis  for |
000020d0  20 20 6d 61 6e 79 20 20  20 68 65 6c 70 66 75 6c  |  many   helpful|
000020e0  0d 73 75 67 67 65 73 74  69 6f 6e 73 20 61 6e 64  |.suggestions and|
000020f0  20 63 6f 6d 6d 65 6e 74  73 20 64 75 72 69 6e 67  | comments during|
00002100  20 74 68 65 20 64 65 76  65 6c 6f 70 6d 65 6e 74  | the development|
00002110  20 6f 66 20 74 68 65 20  41 73 73 65 6d 62 6c 65  | of the Assemble|
00002120  72 2e 0d 0d 0d 0d 0d 0d  0d 0d 0d 0d 0d 0d 20 20  |r.............  |
00002130  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002140  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 69  |               i|
00002150  69 69 0d 0d 0d 0d 0d 0d  1b 47 20 20 20 20 20 20  |ii.......G      |
00002160  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002170  55 53 49 4e 47 20 54 48  45 20 36 35 43 30 32 20  |USING THE 65C02 |
00002180  41 53 53 45 4d 42 4c 45  52 1b 48 0d 0d 0d 0d 1b  |ASSEMBLER.H.....|
00002190  2d 01 1b 47 31 2e 20 49  4e 54 52 4f 44 55 43 54  |-..G1. INTRODUCT|
000021a0  49 4f 4e 1b 2d 00 1b 48  0d 0d 0d 20 20 20 54 68  |ION.-..H...   Th|
000021b0  65 20 20 36 35 43 30 32  20 20 41 73 73 65 6d 62  |e  65C02  Assemb|
000021c0  6c 65 72 20 20 72 75 6e  73 20 69 6e 20 73 69 64  |ler  runs in sid|
000021d0  65 77 61 79 73 20 52 41  4d 20 6f 72 20 61 73 20  |eways RAM or as |
000021e0  61 20 73 69 64 65 77 61  79 73 20 52 4f 4d 20 6f  |a sideways ROM o|
000021f0  6e 0d 74 68 65 20 42 42  43 20 4d 6f 64 65 6c 73  |n.the BBC Models|
00002200  20 42 2c 20 42 2b 2c 20  42 2b 31 32 38 2c 20 4d  | B, B+, B+128, M|
00002210  61 73 74 65 72 20 31 32  38 2c 20 61 6e 64 20 4d  |aster 128, and M|
00002220  61 73 74 65 72 20 43 6f  6d 70 61 63 74 2c 20 20  |aster Compact,  |
00002230  77 69 74 68 20 20 6f 72  0d 77 69 74 68 6f 75 74  |with  or.without|
00002240  20 61 20 36 35 30 32 20  53 65 63 6f 6e 64 20 50  | a 6502 Second P|
00002250  72 6f 63 65 73 73 6f 72  2e 20 20 49 74 20 73 75  |rocessor.  It su|
00002260  70 70 6f 72 74 73 20 61  6c 6c 20 74 68 65 20 6f  |pports all the o|
00002270  70 63 6f 64 65 73 20 20  6f 66 20 20 74 68 65 0d  |pcodes  of  the.|
00002280  36 35 30 32 20 20 61 6e  64 20 20 36 35 43 30 32  |6502  and  65C02|
00002290  20 20 70 72 6f 63 65 73  73 6f 72 20 20 66 61 6d  |  processor  fam|
000022a0  69 6c 69 65 73 2c 20 20  61 6e 64 20 20 63 6f 6e  |ilies,  and  con|
000022b0  74 61 69 6e 73 20 61 20  70 6f 77 65 72 66 75 6c  |tains a powerful|
000022c0  20 4d 61 63 72 6f 0d 50  72 6f 67 72 61 6d 6d 69  | Macro.Programmi|
000022d0  6e 67 20 4c 61 6e 67 75  61 67 65 2e 0d 0d 20 20  |ng Language...  |
000022e0  20 54 68 65 20 41 73 73  65 6d 62 6c 65 72 20 69  | The Assembler i|
000022f0  73 20 61 20 64 69 73 63  2d 6f 72 69 65 6e 74 65  |s a disc-oriente|
00002300  64 20 73 79 73 74 65 6d  2e 20 20 53 6f 75 72 63  |d system.  Sourc|
00002310  65 20 66 69 6c 65 73 20  6d 75 73 74 20 62 65 20  |e files must be |
00002320  68 65 6c 64 0d 6f 6e 20  64 69 73 63 2c 20 20 61  |held.on disc,  a|
00002330  6e 64 20 74 68 65 20 6f  62 6a 65 63 74 20 63 6f  |nd the object co|
00002340  64 65 20 77 69 6c 6c 20  62 65 20 77 72 69 74 74  |de will be writt|
00002350  65 6e 20 74 6f 20 64 69  73 63 2e 20 20 49 74 20  |en to disc.  It |
00002360  63 61 6e 20 62 65 20 75  73 65 64 0d 77 69 74 68  |can be used.with|
00002370  20 74 68 65 20 41 63 6f  72 6e 20 44 46 53 2c 20  | the Acorn DFS, |
00002380  41 44 46 53 2c 20 4e 46  53 20 61 6e 64 20 61 6e  |ADFS, NFS and an|
00002390  79 20 6f 74 68 65 72 20  41 63 6f 72 6e 2d 63 6f  |y other Acorn-co|
000023a0  6d 70 61 74 69 62 6c 65  20 20 64 69 73 63 20 20  |mpatible  disc  |
000023b0  6f 72 0d 6e 65 74 77 6f  72 6b 20 66 69 6c 69 6e  |or.network filin|
000023c0  67 20 73 79 73 74 65 6d  2c 20 62 75 74 20 6e 6f  |g system, but no|
000023d0  74 20 6f 6e 20 63 61 73  73 65 74 74 65 2d 6f 6e  |t on cassette-on|
000023e0  6c 79 20 6d 61 63 68 69  6e 65 73 2e 0d 0d 20 20  |ly machines...  |
000023f0  20 54 68 65 72 65 20 20  61 72 65 20 6e 6f 20 73  | There  are no s|
00002400  6f 75 72 63 65 20 65 64  69 74 69 6e 67 20 66 61  |ource editing fa|
00002410  63 69 6c 69 74 69 65 73  20 63 6f 6e 74 61 69 6e  |cilities contain|
00002420  65 64 20 69 6e 20 74 68  65 20 41 73 73 65 6d 62  |ed in the Assemb|
00002430  6c 65 72 2e 0d 48 6f 77  65 76 65 72 2c 20 69 74  |ler..However, it|
00002440  20 69 73 20 61 62 6c 65  20 74 6f 20 61 63 63 65  | is able to acce|
00002450  70 74 20 73 6f 75 72 63  65 20 70 72 6f 64 75 63  |pt source produc|
00002460  65 64 20 62 79 20 6d 6f  73 74 20 74 65 78 74 20  |ed by most text |
00002470  65 64 69 74 6f 72 73 20  20 6f 72 0d 77 6f 72 64  |editors  or.word|
00002480  20 70 72 6f 63 65 73 73  6f 72 20 70 72 6f 67 72  | processor progr|
00002490  61 6d 73 2e 0d 0d 0d 1b  2d 01 31 2e 31 20 49 6e  |ams.....-.1.1 In|
000024a0  73 74 61 6c 6c 69 6e 67  20 74 68 65 20 41 73 73  |stalling the Ass|
000024b0  65 6d 62 6c 65 72 1b 2d  00 0d 0d 0d 20 20 20 54  |embler.-....   T|
000024c0  68 65 20 20 36 35 43 30  32 20 41 73 73 65 6d 62  |he  65C02 Assemb|
000024d0  6c 65 72 20 63 6f 64 65  20 69 73 20 63 6f 6d 70  |ler code is comp|
000024e0  6c 65 74 65 6c 79 20 75  6e 70 72 6f 74 65 63 74  |letely unprotect|
000024f0  65 64 2e 20 20 49 66 20  79 6f 75 20 68 61 76 65  |ed.  If you have|
00002500  20 61 0d 6d 61 63 68 69  6e 65 20 77 69 74 68 20  | a.machine with |
00002510  73 69 64 65 77 61 79 73  20 52 41 4d 2c 20 20 79  |sideways RAM,  y|
00002520  6f 75 20 77 69 6c 6c 20  62 65 20 61 62 6c 65 20  |ou will be able |
00002530  74 6f 20 6c 6f 61 64 20  69 74 20 74 6f 20 61 20  |to load it to a |
00002540  20 52 41 4d 20 62 61 6e  6b 0d 61 6e 64 20 72 75  | RAM bank.and ru|
00002550  6e 20 69 74 3b 20 69 66  20 6e 6f 74 2c 20 79 6f  |n it; if not, yo|
00002560  75 20 77 69 6c 6c 20 6e  65 65 64 20 74 6f 20 70  |u will need to p|
00002570  72 6f 67 72 61 6d 20 69  74 20 69 6e 74 6f 20 61  |rogram it into a|
00002580  20 32 37 31 32 38 20 45  50 52 4f 4d 20 61 6e 64  | 27128 EPROM and|
00002590  0d 66 69 74 20 69 74 20  69 6e 74 6f 20 61 20 73  |.fit it into a s|
000025a0  69 64 65 77 61 79 73 20  52 4f 4d 20 73 6f 63 6b  |ideways ROM sock|
000025b0  65 74 2e 0d 0d 0d 1b 2d  01 31 2e 32 20 54 68 65  |et.....-.1.2 The|
000025c0  20 41 73 73 65 6d 62 6c  65 72 27 73 20 43 4c 49  | Assembler's CLI|
000025d0  20 6d 6f 64 65 1b 2d 00  0d 0d 20 20 20 49 66 20  | mode.-...   If |
000025e0  79 6f 75 20 68 61 76 65  20 74 68 65 20 41 73 73  |you have the Ass|
000025f0  65 6d 62 6c 65 72 20 66  69 74 74 65 64 20 69 6e  |embler fitted in|
00002600  74 6f 20 74 68 65 20 68  69 67 68 65 73 74 20 70  |to the highest p|
00002610  72 69 6f 72 69 74 79 20  52 4f 4d 20 73 6c 6f 74  |riority ROM slot|
00002620  0d 6f 66 20 20 79 6f 75  72 20 6d 61 63 68 69 6e  |.of  your machin|
00002630  65 2c 20 20 70 72 65 73  73 69 6e 67 20 1b 47 43  |e,  pressing .GC|
00002640  4f 4e 54 52 4f 4c 2d 42  52 45 41 4b 1b 48 20 6f  |ONTROL-BREAK.H o|
00002650  72 20 70 6f 77 65 72 69  6e 67 20 6f 6e 20 77 69  |r powering on wi|
00002660  6c 6c 20 65 6e 74 65 72  20 69 74 0d 61 73 20 74  |ll enter it.as t|
00002670  68 65 20 63 75 72 72 65  6e 74 20 6c 61 6e 67 75  |he current langu|
00002680  61 67 65 2e 20 20 49 6e  20 74 68 69 73 20 63 61  |age.  In this ca|
00002690  73 65 20 74 68 65 20 41  73 73 65 6d 62 6c 65 72  |se the Assembler|
000026a0  20 69 73 20 73 61 69 64  20 74 6f 20 62 65 20 20  | is said to be  |
000026b0  69 6e 0d 22 43 4c 49 20  20 28 43 6f 6d 6d 61 6e  |in."CLI  (Comman|
000026c0  64 20 20 4c 61 6e 67 75  61 67 65 20 20 49 6e 74  |d  Language  Int|
000026d0  65 72 70 72 65 74 65 72  29 20 20 6d 6f 64 65 22  |erpreter)  mode"|
000026e0  2e 20 20 59 6f 75 20 20  77 69 6c 6c 20 20 73 65  |.  You  will  se|
000026f0  65 20 20 61 20 20 22 2a  22 0d 70 72 6f 6d 70 74  |e  a  "*".prompt|
00002700  69 6e 67 20 79 6f 75 20  66 6f 72 20 69 6e 70 75  |ing you for inpu|
00002710  74 2c 20 20 61 6e 64 20  61 6e 79 20 6c 69 6e 65  |t,  and any line|
00002720  73 20 79 6f 75 20 74 79  70 65 20 77 69 6c 6c 20  |s you type will |
00002730  62 65 20 73 65 6e 74 20  20 74 6f 20 20 74 68 65  |be sent  to  the|
00002740  0d 42 42 43 20 4f 70 65  72 61 74 69 6e 67 20 53  |.BBC Operating S|
00002750  79 73 74 65 6d 20 61 73  20 4d 4f 53 20 63 6f 6d  |ystem as MOS com|
00002760  6d 61 6e 64 73 2e 20 49  6e 20 74 68 69 73 20 6d  |mands. In this m|
00002770  6f 64 65 20 74 68 65 72  65 20 69 73 20 6e 6f 20  |ode there is no |
00002780  6e 65 65 64 20 74 6f 0d  74 79 70 65 20 61 20 22  |need to.type a "|
00002790  2a 22 20 79 6f 75 72 73  65 6c 66 20 69 6e 20 66  |*" yourself in f|
000027a0  72 6f 6e 74 20 6f 66 20  74 68 65 20 63 6f 6d 6d  |ront of the comm|
000027b0  61 6e 64 73 2c 20 61 6c  74 68 6f 75 67 68 20 69  |ands, although i|
000027c0  74 20 77 6f 6e 27 74 20  6d 61 74 74 65 72 0d 69  |t won't matter.i|
000027d0  66 20 79 6f 75 20 64 6f  2e 0d 0d 20 20 20 59 6f  |f you do...   Yo|
000027e0  75 20 63 61 6e 20 61 6c  73 6f 20 65 6e 74 65 72  |u can also enter|
000027f0  20 43 4c 49 20 6d 6f 64  65 20 62 79 20 69 73 73  | CLI mode by iss|
00002800  75 69 6e 67 20 74 68 65  20 63 6f 6d 6d 61 6e 64  |uing the command|
00002810  0d 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
00002820  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002830  20 20 2a 43 4c 49 0d 0d  72 65 67 61 72 64 6c 65  |  *CLI..regardle|
00002840  73 73 20 6f 66 20 74 68  65 20 52 4f 4d 20 73 6f  |ss of the ROM so|
00002850  63 6b 65 74 20 74 68 65  20 41 73 73 65 6d 62 6c  |cket the Assembl|
00002860  65 72 20 69 73 20 69 6e  2e 0d 0d 20 20 20 46 72  |er is in...   Fr|
00002870  6f 6d 20 20 43 4c 49 20  20 6d 6f 64 65 20 20 79  |om  CLI  mode  y|
00002880  6f 75 20 20 63 61 6e 20  20 6f 66 20 20 63 6f 75  |ou  can  of  cou|
00002890  72 73 65 20 20 73 74 61  72 74 20 20 61 6e 20 20  |rse  start  an  |
000028a0  61 73 73 65 6d 62 6c 79  20 77 69 74 68 20 74 68  |assembly with th|
000028b0  65 0d 2a 41 53 53 45 4d  42 4c 45 20 63 6f 6d 6d  |e.*ASSEMBLE comm|
000028c0  61 6e 64 20 64 65 73 63  72 69 62 65 64 20 20 62  |and described  b|
000028d0  65 6c 6f 77 2e 20 20 41  6c 74 65 72 6e 61 74 69  |elow.  Alternati|
000028e0  76 65 6c 79 2c 20 20 79  6f 75 20 20 63 6f 75 6c  |vely,  you  coul|
000028f0  64 20 20 65 6e 74 65 72  0d 61 6e 6f 74 68 65 72  |d  enter.another|
00002900  20 6c 61 6e 67 75 61 67  65 20 62 79 20 74 79 70  | language by typ|
00002910  69 6e 67 2c 20 73 61 79  2c 0d 0d 20 20 20 20 20  |ing, say,..     |
00002920  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002930  20 20 20 20 20 20 20 20  20 20 2a 42 41 53 49 43  |          *BASIC|
00002940  0d 0d 6f 72 0d 0d 20 20  20 20 20 20 20 20 20 20  |..or..          |
00002950  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002960  20 20 20 20 2a 57 4f 52  44 57 49 53 45 0d 0d 0d  |    *WORDWISE...|
00002970  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00002990  20 20 31 0d 0d 0d 0d 0d  0d 1b 47 20 20 20 20 20  |  1.......G     |
000029a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000029b0  20 55 53 49 4e 47 20 54  48 45 20 36 35 43 30 32  | USING THE 65C02|
000029c0  20 41 53 53 45 4d 42 4c  45 52 1b 48 0d 0d 0d 0d  | ASSEMBLER.H....|
000029d0  0d 0d 20 20 20 4e 61 74  75 72 61 6c 6c 79 2c 20  |..   Naturally, |
000029e0  20 79 6f 75 20 61 72 65  20 61 62 6c 65 20 74 6f  | you are able to|
000029f0  20 69 73 73 75 65 20 44  46 53 20 63 6f 6d 6d 61  | issue DFS comma|
00002a00  6e 64 73 20 69 6e 20 43  4c 49 20 6d 6f 64 65 2c  |nds in CLI mode,|
00002a10  20 20 6f 72 20 79 6f 75  0d 63 6f 75 6c 64 20 2a  |  or you.could *|
00002a20  54 59 50 45 20 66 69 6c  65 73 2c 20 61 6e 64 20  |TYPE files, and |
00002a30  73 6f 20 6f 6e 2e 20 20  59 6f 75 20 63 61 6e 27  |so on.  You can'|
00002a40  74 20 75 73 65 20 74 68  65 20 42 41 53 49 43 20  |t use the BASIC |
00002a50  73 74 61 74 65 6d 65 6e  74 20 20 4d 4f 44 45 0d  |statement  MODE.|
00002a60  74 6f 20 20 63 68 61 6e  67 65 20 20 73 63 72 65  |to  change  scre|
00002a70  65 6e 20 20 6d 6f 64 65  2c 20 20 74 68 6f 75 67  |en  mode,  thoug|
00002a80  68 2c 20 20 73 69 6e 63  65 20 20 74 68 65 20 63  |h,  since  the c|
00002a90  75 72 72 65 6e 74 20 6c  61 6e 67 75 61 67 65 20  |urrent language |
00002aa0  69 73 20 6e 6f 74 0d 42  41 53 49 43 2e 20 20 48  |is not.BASIC.  H|
00002ab0  6f 77 65 76 65 72 2c 20  66 6f 72 20 63 6f 6e 76  |owever, for conv|
00002ac0  65 6e 69 65 6e 63 65 20  20 74 68 65 20 20 41 73  |enience  the  As|
00002ad0  73 65 6d 62 6c 65 72 20  20 77 69 6c 6c 20 20 72  |sembler  will  r|
00002ae0  65 73 70 6f 6e 64 20 20  74 6f 20 20 61 0d 63 6f  |espond  to  a.co|
00002af0  6d 6d 61 6e 64 20 2a 4d  4f 44 45 2c 20 73 6f 20  |mmand *MODE, so |
00002b00  79 6f 75 20 63 6f 75 6c  64 20 74 79 70 65 0d 0d  |you could type..|
00002b10  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002b20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 2a  |               *|
00002b30  4d 4f 44 45 20 33 0d 0d  74 6f 20 73 65 74 20 6d  |MODE 3..to set m|
00002b40  6f 64 65 20 33 20 69 66  20 79 6f 75 20 77 69 73  |ode 3 if you wis|
00002b50  68 65 64 2e 20 54 68 69  73 20 63 6f 6d 6d 61 6e  |hed. This comman|
00002b60  64 20 69 73 20 61 76 61  69 6c 61 62 6c 65 20 65  |d is available e|
00002b70  69 74 68 65 72 20 66 72  6f 6d 20 74 68 65 0d 41  |ither from the.A|
00002b80  73 73 65 6d 62 6c 65 72  27 73 20 43 4c 49 20 6d  |ssembler's CLI m|
00002b90  6f 64 65 20 6f 72 20 66  72 6f 6d 20 61 6e 79 20  |ode or from any |
00002ba0  6f 74 68 65 72 20 6c 61  6e 67 75 61 67 65 2e 0d  |other language..|
00002bb0  0d 0d 1b 2d 01 31 2e 33  20 43 72 65 61 74 69 6e  |...-.1.3 Creatin|
00002bc0  67 20 73 6f 75 72 63 65  20 66 69 6c 65 73 1b 2d  |g source files.-|
00002bd0  00 0d 0d 20 20 20 54 68  6f 75 67 68 20 20 74 68  |...   Though  th|
00002be0  65 20 20 41 73 73 65 6d  62 6c 65 72 20 20 64 6f  |e  Assembler  do|
00002bf0  65 73 20 6e 6f 74 20 63  6f 6e 74 61 69 6e 20 61  |es not contain a|
00002c00  6e 79 20 65 64 69 74 69  6e 67 20 66 61 63 69 6c  |ny editing facil|
00002c10  69 74 69 65 73 2c 20 69  74 0d 77 69 6c 6c 20 61  |ities, it.will a|
00002c20  63 63 65 70 74 20 66 69  6c 65 73 20 70 72 6f 64  |ccept files prod|
00002c30  75 63 65 64 20 6f 6e 20  6a 75 73 74 20 61 62 6f  |uced on just abo|
00002c40  75 74 20 61 6e 79 20 77  6f 72 64 20 70 72 6f 63  |ut any word proc|
00002c50  65 73 73 6f 72 20 6f 72  20 20 73 6f 75 72 63 65  |essor or  source|
00002c60  0d 65 64 69 74 6f 72 2e  20 20 20 54 68 65 20 20  |.editor.   The  |
00002c70  20 73 6f 75 72 63 65 20  20 20 79 6f 75 20 20 63  | source   you  c|
00002c80  72 65 61 74 65 20 20 73  68 6f 75 6c 64 20 20 63  |reate  should  c|
00002c90  6f 6e 74 61 69 6e 20 20  6f 6e 6c 79 20 20 70 72  |ontain  only  pr|
00002ca0  69 6e 74 61 62 6c 65 0d  63 68 61 72 61 63 74 65  |intable.characte|
00002cb0  72 73 2c 20 73 70 61 63  65 73 20 61 6e 64 20 54  |rs, spaces and T|
00002cc0  41 42 20 63 68 61 72 61  63 74 65 72 73 2c 20 61  |AB characters, a|
00002cd0  6e 64 20 65 61 63 68 20  6c 69 6e 65 20 73 68 6f  |nd each line sho|
00002ce0  75 6c 64 20 65 6e 64 20  77 69 74 68 20 61 0d 63  |uld end with a.c|
00002cf0  61 72 72 69 61 67 65 20  72 65 74 75 72 6e 20 62  |arriage return b|
00002d00  79 74 65 20 20 28 77 69  74 68 20 6f 70 74 69 6f  |yte  (with optio|
00002d10  6e 61 6c 6c 79 20 61 20  6c 69 6e 65 20 66 65 65  |nally a line fee|
00002d20  64 20 63 68 61 72 61 63  74 65 72 20 62 65 66 6f  |d character befo|
00002d30  72 65 20 6f 72 0d 61 66  74 65 72 20 69 74 29 2e  |re or.after it).|
00002d40  20 20 54 68 65 20 41 73  73 65 6d 62 6c 65 72 20  |  The Assembler |
00002d50  77 69 6c 6c 20 61 6c 73  6f 20 74 72 65 61 74 20  |will also treat |
00002d60  74 68 65 20 63 68 61 72  61 63 74 65 72 20 75 73  |the character us|
00002d70  65 64 20 69 6e 20 20 73  61 76 65 64 0d 57 6f 72  |ed in  saved.Wor|
00002d80  64 77 69 73 65 20 20 66  69 6c 65 73 20 20 74 6f  |dwise  files  to|
00002d90  20 20 69 6e 64 69 63 61  74 65 20 61 20 54 41 42  |  indicate a TAB|
00002da0  20 20 28 41 53 43 49 49  20 63 6f 64 65 20 26 44  |  (ASCII code &D|
00002db0  44 29 20 20 61 73 20 61  20 22 72 65 61 6c 22 20  |D)  as a "real" |
00002dc0  54 41 42 0d 63 68 61 72  61 63 74 65 72 2e 0d 0d  |TAB.character...|
00002dd0  20 20 20 54 68 65 20 41  73 73 65 6d 62 6c 65 72  |   The Assembler|
00002de0  20 77 69 6c 6c 20 6e 6f  72 6d 61 6c 6c 79 20 69  | will normally i|
00002df0  67 6e 6f 72 65 20 20 61  6e 79 20 20 6f 74 68 65  |gnore  any  othe|
00002e00  72 20 20 63 68 61 72 61  63 74 65 72 73 20 20 69  |r  characters  i|
00002e10  6e 20 20 74 68 65 0d 73  6f 75 72 63 65 2e 20 20  |n  the.source.  |
00002e20  53 6f 6d 65 20 77 6f 72  64 20 70 72 6f 63 65 73  |Some word proces|
00002e30  73 6f 72 73 2c 20 74 68  6f 75 67 68 2c 20 6d 61  |sors, though, ma|
00002e40  79 20 75 73 65 20 63 68  61 72 61 63 74 65 72 73  |y use characters|
00002e50  20 20 77 69 74 68 20 20  41 53 43 49 49 0d 63 6f  |  with  ASCII.co|
00002e60  64 65 73 20 20 69 6e 20  74 68 65 20 72 61 6e 67  |des  in the rang|
00002e70  65 20 31 32 38 20 74 6f  20 32 35 35 20 66 6f 72  |e 128 to 255 for|
00002e80  20 73 70 65 63 69 61 6c  20 70 75 72 70 6f 73 65  | special purpose|
00002e90  73 3a 20 74 68 65 20 41  73 73 65 6d 62 6c 65 72  |s: the Assembler|
00002ea0  20 63 61 6e 0d 62 65 20  63 6f 6e 66 69 67 75 72  | can.be configur|
00002eb0  65 64 20 74 6f 20 63 68  61 6e 67 65 20 69 74 73  |ed to change its|
00002ec0  20 61 63 74 69 6f 6e 20  20 6f 6e 20 20 65 6e 63  | action  on  enc|
00002ed0  6f 75 6e 74 65 72 69 6e  67 20 20 74 68 65 73 65  |ountering  these|
00002ee0  2e 20 20 54 68 69 73 20  20 69 73 0d 64 65 73 63  |.  This  is.desc|
00002ef0  72 69 62 65 64 20 69 6e  20 64 65 74 61 69 6c 20  |ribed in detail |
00002f00  69 6e 20 41 70 70 65 6e  64 69 78 20 35 2e 0d 0d  |in Appendix 5...|
00002f10  0d 20 20 20 59 6f 75 20  63 61 6e 20 63 72 65 61  |.   You can crea|
00002f20  74 65 20 73 75 69 74 61  62 6c 65 20 66 69 6c 65  |te suitable file|
00002f30  73 20 65 61 73 69 6c 79  20 77 69 74 68 20 57 6f  |s easily with Wo|
00002f40  72 64 77 69 73 65 20 6f  72 20 56 69 65 77 3a 0d  |rdwise or View:.|
00002f50  0d 0d 20 20 61 2e 20 55  73 69 6e 67 20 57 6f 72  |..  a. Using Wor|
00002f60  64 77 69 73 65 0d 0d 20  20 20 20 20 46 69 6c 65  |dwise..     File|
00002f70  73 20 73 61 76 65 64 20  62 79 20 6d 65 6e 75 20  |s saved by menu |
00002f80  6f 70 74 69 6f 6e 20 31  20 63 61 6e 20 62 65 20  |option 1 can be |
00002f90  75 73 65 64 20 64 69 72  65 63 74 6c 79 20 61 73  |used directly as|
00002fa0  20 69 6e 70 75 74 20 74  6f 20 74 68 65 0d 20 20  | input to the.  |
00002fb0  20 20 20 41 73 73 65 6d  62 6c 65 72 2c 20 20 70  |   Assembler,  p|
00002fc0  72 6f 76 69 64 65 64 20  20 74 68 61 74 20 20 79  |rovided  that  y|
00002fd0  6f 75 20 20 68 61 76 65  20 20 6e 6f 74 20 20 69  |ou  have  not  i|
00002fe0  6e 63 6c 75 64 65 64 20  61 6e 79 20 65 6d 62 65  |ncluded any embe|
00002ff0  64 64 65 64 0d 20 20 20  20 20 63 6f 6d 6d 61 6e  |dded.     comman|
00003000  64 73 2e 20 54 68 65 20  20 57 6f 72 64 77 69 73  |ds. The  Wordwis|
00003010  65 20 20 54 41 42 20 20  63 68 61 72 61 63 74 65  |e  TAB  characte|
00003020  72 2c 20 20 77 68 69 63  68 20 20 61 70 70 65 61  |r,  which  appea|
00003030  72 73 20 20 6f 6e 20 20  74 68 65 0d 20 20 20 20  |rs  on  the.    |
00003040  20 65 64 69 74 69 6e 67  20 20 73 63 72 65 65 6e  | editing  screen|
00003050  20 20 61 73 20 61 20 72  69 67 68 74 2d 70 6f 69  |  as a right-poi|
00003060  6e 74 69 6e 67 20 61 72  72 6f 77 2c 20 77 69 6c  |nting arrow, wil|
00003070  6c 20 62 65 20 61 63 63  65 70 74 65 64 20 61 73  |l be accepted as|
00003080  20 61 0d 20 20 20 20 20  54 41 42 20 62 79 20 74  | a.     TAB by t|
00003090  68 65 20 41 73 73 65 6d  62 6c 65 72 2e 20 52 65  |he Assembler. Re|
000030a0  6d 65 6d 62 65 72 20 74  6f 20 70 72 65 73 73 20  |member to press |
000030b0  52 45 54 55 52 4e 20 61  74 20 74 68 65 20 65 6e  |RETURN at the en|
000030c0  64 20 6f 66 20 65 61 63  68 0d 20 20 20 20 20 73  |d of each.     s|
000030d0  6f 75 72 63 65 20 6c 69  6e 65 2e 0d 0d 20 20 20  |ource line...   |
000030e0  20 20 41 6c 74 65 72 6e  61 74 69 76 65 6c 79 2c  |  Alternatively,|
000030f0  20 20 79 6f 75 20 63 61  6e 20 73 70 6f 6f 6c 20  |  you can spool |
00003100  74 68 65 20 66 69 6c 65  20 74 6f 20 64 69 73 63  |the file to disc|
00003110  20 66 69 72 73 74 2c 20  20 75 73 69 6e 67 20 6d  | first,  using m|
00003120  65 6e 75 0d 20 20 20 20  20 6f 70 74 69 6f 6e 20  |enu.     option |
00003130  20 38 20 20 2d 20 20 62  75 74 20 20 74 68 69 73  | 8  -  but  this|
00003140  20 20 77 69 6c 6c 20 63  72 65 61 74 65 20 61 20  |  will create a |
00003150  62 69 67 67 65 72 20 66  69 6c 65 20 74 68 61 74  |bigger file that|
00003160  20 77 69 6c 6c 20 74 61  6b 65 0d 20 20 20 20 20  | will take.     |
00003170  6c 6f 6e 67 65 72 20 74  6f 20 61 73 73 65 6d 62  |longer to assemb|
00003180  6c 65 2e 20 20 59 6f 75  20 6d 61 79 20 6e 65 65  |le.  You may nee|
00003190  64 20 73 6f 6d 65 20 63  61 75 74 69 6f 6e 20 68  |d some caution h|
000031a0  65 72 65 20 20 69 66 20  20 79 6f 75 20 20 61 72  |ere  if  you  ar|
000031b0  65 0d 20 20 20 20 20 75  73 69 6e 67 20 20 74 68  |e.     using  th|
000031c0  65 20 20 22 7c 22 20 20  63 68 61 72 61 63 74 65  |e  "|"  characte|
000031d0  72 20 77 69 74 68 69 6e  20 73 74 72 69 6e 67 20  |r within string |
000031e0  63 6f 6e 73 74 61 6e 74  73 3a 20 72 65 6d 65 6d  |constants: remem|
000031f0  62 65 72 20 74 68 61 74  0d 20 20 20 20 20 74 68  |ber that.     th|
00003200  69 73 20 69 73 20 74 68  65 20 57 6f 72 64 77 69  |is is the Wordwi|
00003210  73 65 20 22 70 61 64 22  20 63 68 61 72 61 63 74  |se "pad" charact|
00003220  65 72 2c 20 73 6f 20 62  79 20 64 65 66 61 75 6c  |er, so by defaul|
00003230  74 20 20 77 69 6c 6c 20  20 61 70 70 65 61 72 0d  |t  will  appear.|
00003240  20 20 20 20 20 61 73 20  20 61 20 20 73 70 61 63  |     as  a  spac|
00003250  65 20 20 69 6e 20 20 74  68 65 20 20 73 70 6f 6f  |e  in  the  spoo|
00003260  6c 65 64 20 20 66 69 6c  65 2e 20 20 54 6f 20 6f  |led  file.  To o|
00003270  76 65 72 63 6f 6d 65 20  74 68 69 73 2c 20 20 75  |vercome this,  u|
00003280  73 65 20 74 68 65 0d 20  20 20 20 20 57 6f 72 64  |se the.     Word|
00003290  77 69 73 65 20 20 22 70  63 22 20 20 64 69 72 65  |wise  "pc"  dire|
000032a0  63 74 69 76 65 20 20 74  6f 20 20 72 65 64 65 66  |ctive  to  redef|
000032b0  69 6e 65 20 20 74 68 65  20 20 70 61 64 20 20 63  |ine  the  pad  c|
000032c0  68 61 72 61 63 74 65 72  20 20 20 74 6f 0d 20 20  |haracter   to.  |
000032d0  20 20 20 73 6f 6d 65 74  68 69 6e 67 20 65 6c 73  |   something els|
000032e0  65 2e 0d 0d 0d 0d 0d 20  20 20 20 20 20 20 20 20  |e......         |
000032f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003300  20 20 20 20 20 20 20 20  20 32 0d 0d 0d 0d 0d 0d  |         2......|
00003310  1b 47 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.G              |
00003320  20 20 20 20 20 20 20 20  55 53 49 4e 47 20 54 48  |        USING TH|
00003330  45 20 36 35 43 30 32 20  41 53 53 45 4d 42 4c 45  |E 65C02 ASSEMBLE|
00003340  52 1b 48 0d 0d 0d 0d 20  20 62 2e 20 55 73 69 6e  |R.H....  b. Usin|
00003350  67 20 56 69 65 77 0d 0d  20 20 20 20 20 41 20 20  |g View..     A  |
00003360  66 69 6c 65 20 20 63 72  65 61 74 65 64 20 20 62  |file  created  b|
00003370  79 20 74 68 65 20 56 69  65 77 20 53 41 56 45 2c  |y the View SAVE,|
00003380  20 57 52 49 54 45 20 6f  72 20 45 44 49 54 20 63  | WRITE or EDIT c|
00003390  6f 6d 6d 61 6e 64 73 20  63 61 6e 20 62 65 0d 20  |ommands can be. |
000033a0  20 20 20 20 64 69 72 65  63 74 6c 79 20 69 6e 70  |    directly inp|
000033b0  75 74 20 74 6f 20 74 68  65 20 41 73 73 65 6d 62  |ut to the Assemb|
000033c0  6c 65 72 2e 20 20 59 6f  75 20 73 68 6f 75 6c 64  |ler.  You should|
000033d0  20 6e 6f 74 20 69 6e 63  6c 75 64 65 20 20 72 75  | not include  ru|
000033e0  6c 65 72 73 2c 0d 20 20  20 20 20 73 74 6f 72 65  |lers,.     store|
000033f0  64 20 20 63 6f 6d 6d 61  6e 64 73 20 20 6f 72 20  |d  commands  or |
00003400  20 68 69 67 68 6c 69 67  68 74 20 20 63 6f 64 65  | highlight  code|
00003410  73 20 20 69 6e 20 74 68  69 73 20 66 69 6c 65 2e  |s  in this file.|
00003420  20 20 59 6f 75 20 73 68  6f 75 6c 64 0d 20 20 20  |  You should.   |
00003430  20 20 61 6c 77 61 79 73  20 72 65 6d 65 6d 62 65  |  always remembe|
00003440  72 20 74 6f 20 70 72 65  73 73 20 52 45 54 55 52  |r to press RETUR|
00003450  4e 20 61 74 20 74 68 65  20 65 6e 64 20 6f 66 20  |N at the end of |
00003460  65 76 65 72 79 20 73 6f  75 72 63 65 20 20 6c 69  |every source  li|
00003470  6e 65 3a 0d 20 20 20 20  20 69 74 20 20 77 69 6c  |ne:.     it  wil|
00003480  6c 20 20 62 65 20 6e 65  63 65 73 73 61 72 79 20  |l  be necessary |
00003490  74 6f 20 74 75 72 6e 20  6f 66 66 20 74 68 65 20  |to turn off the |
000034a0  46 6f 72 6d 61 74 20 61  6e 64 20 4a 75 73 74 69  |Format and Justi|
000034b0  66 79 20 6f 70 74 69 6f  6e 73 0d 20 20 20 20 20  |fy options.     |
000034c0  77 68 65 6e 20 74 79 70  69 6e 67 20 74 68 65 20  |when typing the |
000034d0  73 6f 75 72 63 65 2c 20  6f 74 68 65 72 77 69 73  |source, otherwis|
000034e0  65 20 56 69 65 77 20 77  69 6c 6c 20 69 6e 74 65  |e View will inte|
000034f0  72 66 65 72 65 20 77 69  74 68 20 74 68 69 73 2e  |rfere with this.|
00003500  0d 0d 0d 1b 2d 01 31 2e  34 20 53 74 61 72 74 69  |....-.1.4 Starti|
00003510  6e 67 20 61 6e 20 61 73  73 65 6d 62 6c 79 1b 2d  |ng an assembly.-|
00003520  00 0d 0d 0d 20 20 20 54  68 65 20 41 73 73 65 6d  |....   The Assem|
00003530  62 6c 65 72 20 69 73 20  20 73 74 61 72 74 65 64  |bler is  started|
00003540  20 20 77 69 74 68 20 20  74 68 65 20 20 2a 41 53  |  with  the  *AS|
00003550  53 45 4d 42 4c 45 20 20  63 6f 6d 6d 61 6e 64 2e  |SEMBLE  command.|
00003560  20 20 54 68 69 73 20 20  69 73 0d 66 6f 6c 6c 6f  |  This  is.follo|
00003570  77 65 64 20 62 79 20 61  20 6e 75 6d 62 65 72 20  |wed by a number |
00003580  6f 66 20 22 6f 70 74 69  6f 6e 20 66 6c 61 67 73  |of "option flags|
00003590  22 20 74 68 61 74 20 74  65 6c 6c 20 74 68 65 20  |" that tell the |
000035a0  41 73 73 65 6d 62 6c 65  72 20 65 78 61 63 74 6c  |Assembler exactl|
000035b0  79 0d 68 6f 77 20 79 6f  75 20 77 69 73 68 20 69  |y.how you wish i|
000035c0  74 20 74 6f 20 6f 70 65  72 61 74 65 2e 0d 0d 20  |t to operate... |
000035d0  20 20 54 68 65 20 73 69  6d 70 6c 65 73 74 20 75  |  The simplest u|
000035e0  73 65 20 6f 66 20 74 68  65 20 63 6f 6d 6d 61 6e  |se of the comman|
000035f0  64 20 77 6f 75 6c 64 20  62 65 2c 20 66 6f 72 20  |d would be, for |
00003600  65 78 61 6d 70 6c 65 3a  0d 0d 20 20 20 20 20 20  |example:..      |
00003610  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003620  20 20 20 20 20 2a 41 53  53 45 4d 42 4c 45 20 53  |     *ASSEMBLE S|
00003630  4f 55 52 43 45 0d 0d 77  68 65 72 65 20 74 68 65  |OURCE..where the|
00003640  20 73 6f 75 72 63 65 20  66 69 6c 65 20 6e 61 6d  | source file nam|
00003650  65 20 69 73 20 53 4f 55  52 43 45 2e 20 20 54 68  |e is SOURCE.  Th|
00003660  69 73 20 66 6f 72 6d 61  74 20 70 65 72 66 6f 72  |is format perfor|
00003670  6d 73 20 61 20 20 22 73  79 6e 74 61 78 0d 63 68  |ms a  "syntax.ch|
00003680  65 63 6b 20 20 72 75 6e  22 20 20 2d 20 20 6e 6f  |eck  run"  -  no|
00003690  20 20 6f 62 6a 65 63 74  20 20 63 6f 64 65 20 20  |  object  code  |
000036a0  69 73 20 70 72 6f 64 75  63 65 64 2e 20 20 54 68  |is produced.  Th|
000036b0  69 73 20 77 69 6c 6c 20  67 69 76 65 20 79 6f 75  |is will give you|
000036c0  20 74 68 65 0d 66 61 73  74 65 73 74 20 70 6f 73  | the.fastest pos|
000036d0  73 69 62 6c 79 20 61 73  73 65 6d 62 6c 79 2c 20  |sibly assembly, |
000036e0  20 61 6e 64 20 69 74 20  63 61 6e 20 62 65 20 76  | and it can be v|
000036f0  65 72 79 20 75 73 65 66  75 6c 20 77 68 65 6e 20  |ery useful when |
00003700  63 68 65 63 6b 69 6e 67  20 20 61 0d 6c 61 72 67  |checking  a.larg|
00003710  65 20 20 70 72 6f 67 72  61 6d 20 20 66 6f 72 20  |e  program  for |
00003720  20 65 72 72 6f 72 73 2e  20 20 54 6f 20 70 72 6f  | errors.  To pro|
00003730  64 75 63 65 20 61 6e 20  6f 62 6a 65 63 74 20 66  |duce an object f|
00003740  69 6c 65 20 63 6f 6e 74  61 69 6e 69 6e 67 20 74  |ile containing t|
00003750  68 65 0d 61 73 73 65 6d  62 6c 65 64 20 63 6f 64  |he.assembled cod|
00003760  65 2c 20 79 6f 75 20 6e  65 65 64 20 74 6f 20 73  |e, you need to s|
00003770  70 65 63 69 66 79 20 61  20 22 2d 4f 22 20 6f 70  |pecify a "-O" op|
00003780  74 69 6f 6e 3a 0d 0d 20  20 20 20 20 20 20 20 20  |tion:..         |
00003790  20 20 20 20 20 20 20 20  20 20 20 20 20 2a 41 53  |             *AS|
000037a0  53 45 4d 42 4c 45 20 53  4f 55 52 43 45 20 2d 4f  |SEMBLE SOURCE -O|
000037b0  50 52 4f 47 52 41 4d 0d  0d 77 68 65 72 65 20 20  |PROGRAM..where  |
000037c0  74 68 65 20 22 2d 4f 22  20 69 73 20 66 6f 6c 6c  |the "-O" is foll|
000037d0  6f 77 65 64 20 62 79 20  74 68 65 20 6e 61 6d 65  |owed by the name|
000037e0  20 6f 66 20 74 68 65 20  6f 62 6a 65 63 74 20 66  | of the object f|
000037f0  69 6c 65 20 79 6f 75 20  77 69 73 68 20 74 6f 0d  |ile you wish to.|
00003800  70 72 6f 64 75 63 65 2e  0d 0d 20 20 20 41 66 74  |produce...   Aft|
00003810  65 72 20 61 73 73 65 6d  62 6c 79 2c 20 20 74 68  |er assembly,  th|
00003820  65 20 41 73 73 65 6d 62  6c 65 72 20 77 69 6c 6c  |e Assembler will|
00003830  20 72 65 74 75 72 6e 20  79 6f 75 20 74 6f 20 74  | return you to t|
00003840  68 65 20 6c 61 6e 67 75  61 67 65 20 20 79 6f 75  |he language  you|
00003850  0d 77 65 72 65 20 20 72  75 6e 6e 69 6e 67 20 20  |.were  running  |
00003860  77 68 65 6e 20 79 6f 75  20 69 73 73 75 65 64 20  |when you issued |
00003870  74 68 65 20 20 2a 41 53  53 45 4d 42 4c 45 20 20  |the  *ASSEMBLE  |
00003880  63 6f 6d 6d 61 6e 64 2e  20 20 49 66 20 79 6f 75  |command.  If you|
00003890  20 68 61 76 65 20 61 0d  6d 61 63 68 69 6e 65 20  | have a.machine |
000038a0  20 77 69 74 68 20 20 20  73 68 61 64 6f 77 20 20  | with   shadow  |
000038b0  20 73 63 72 65 65 6e 20  20 20 63 61 70 61 62 69  | screen   capabi|
000038c0  6c 69 74 79 2c 20 20 20  74 68 65 20 20 20 41 73  |lity,   the   As|
000038d0  73 65 6d 62 6c 65 72 20  20 20 77 69 6c 6c 0d 61  |sembler   will.a|
000038e0  75 74 6f 6d 61 74 69 63  61 6c 6c 79 20 74 75 72  |utomatically tur|
000038f0  6e 20 69 74 20 6f 6e 20  74 6f 20 67 69 76 65 20  |n it on to give |
00003900  79 6f 75 20 74 68 65 20  6d 61 78 69 6d 75 6d 20  |you the maximum |
00003910  73 70 61 63 65 20 66 6f  72 20 73 79 6d 62 6f 6c  |space for symbol|
00003920  73 2e 20 49 74 0d 77 69  6c 6c 20 20 72 65 74 75  |s. It.will  retu|
00003930  72 6e 20 20 74 68 65 20  73 68 61 64 6f 77 20 73  |rn  the shadow s|
00003940  63 72 65 65 6e 20 74 6f  20 69 74 73 20 69 6e 69  |creen to its ini|
00003950  74 69 61 6c 20 73 74 61  74 65 20 77 68 65 6e 20  |tial state when |
00003960  69 74 20 66 69 6e 69 73  68 65 73 2c 0d 61 6e 64  |it finishes,.and|
00003970  20 73 69 6e 63 65 20 74  68 69 73 20 69 6e 76 6f  | since this invo|
00003980  6c 76 65 73 20 63 6c 65  61 72 69 6e 67 20 74 68  |lves clearing th|
00003990  65 20 73 63 72 65 65 6e  20 69 6e 20 61 20 6d 6f  |e screen in a mo|
000039a0  64 65 20 63 68 61 6e 67  65 2c 20 20 69 74 20 77  |de change,  it w|
000039b0  69 6c 6c 0d 70 61 75 73  65 20 66 6f 72 20 79 6f  |ill.pause for yo|
000039c0  75 20 74 6f 20 70 72 65  73 73 20 61 20 6b 65 79  |u to press a key|
000039d0  20 62 65 66 6f 72 65 20  69 74 20 64 6f 65 73 20  | before it does |
000039e0  73 6f 2e 0d 0d 0d 0d 20  20 20 20 20 1b 2d 01 31  |so.....     .-.1|
000039f0  2e 34 2e 31 20 54 68 65  20 63 6f 6d 6d 61 6e 64  |.4.1 The command|
00003a00  20 6c 69 6e 65 20 6f 70  74 69 6f 6e 73 1b 2d 00  | line options.-.|
00003a10  0d 0d 0d 20 20 20 20 20  54 68 65 20 20 76 61 72  |...     The  var|
00003a20  69 6f 75 73 20 20 6f 70  74 69 6f 6e 73 20 20 79  |ious  options  y|
00003a30  6f 75 20 20 63 61 6e 20  73 70 65 63 69 66 79 20  |ou  can specify |
00003a40  74 6f 20 74 68 65 20 63  6f 6d 6d 61 6e 64 20 61  |to the command a|
00003a50  72 65 20 6c 69 73 74 65  64 0d 20 20 20 20 20 62  |re listed.     b|
00003a60  65 6c 6f 77 2e 20 45 61  63 68 20 6f 70 74 69 6f  |elow. Each optio|
00003a70  6e 20 66 6c 61 67 20 63  6f 6e 73 69 73 74 73 20  |n flag consists |
00003a80  6f 66 20 61 20 22 2d 22  20 63 68 61 72 61 63 74  |of a "-" charact|
00003a90  65 72 20 66 6f 6c 6c 6f  77 65 64 20 62 79 20 61  |er followed by a|
00003aa0  0d 20 20 20 20 20 6c 65  74 74 65 72 2c 20 66 6f  |.     letter, fo|
00003ab0  72 20 65 78 61 6d 70 6c  65 20 22 2d 53 22 2e 20  |r example "-S". |
00003ac0  20 53 6f 6d 65 20 6f 70  74 69 6f 6e 20 20 66 6c  | Some option  fl|
00003ad0  61 67 73 20 20 6d 75 73  74 20 20 62 65 20 20 66  |ags  must  be  f|
00003ae0  6f 6c 6c 6f 77 65 64 0d  20 20 20 20 20 69 6d 6d  |ollowed.     imm|
00003af0  65 64 69 61 74 65 6c 79  20 62 79 20 6e 75 6d 62  |ediately by numb|
00003b00  65 72 73 20 6f 72 20 66  69 6c 65 6e 61 6d 65 73  |ers or filenames|
00003b10  2e 20 59 6f 75 20 6d 75  73 74 20 73 65 70 61 72  |. You must separ|
00003b20  61 74 65 20 6f 6e 65 20  6f 70 74 69 6f 6e 0d 20  |ate one option. |
00003b30  20 20 20 20 66 72 6f 6d  20 61 6e 6f 74 68 65 72  |    from another|
00003b40  20 62 79 20 73 70 61 63  65 73 2e 0d 0d 20 20 20  | by spaces...   |
00003b50  20 20 4f 70 74 69 6f 6e  73 20 63 61 6e 20 62 65  |  Options can be|
00003b60  20 67 69 76 65 6e 20 69  6e 20 61 6e 79 20 6f 72  | given in any or|
00003b70  64 65 72 2c 20 62 75 74  20 74 68 65 20 66 69 72  |der, but the fir|
00003b80  73 74 20 70 61 72 61 6d  65 74 65 72 20 74 6f 20  |st parameter to |
00003b90  74 68 65 0d 20 20 20 20  20 63 6f 6d 6d 61 6e 64  |the.     command|
00003ba0  20 20 6d 75 73 74 20 20  61 6c 77 61 79 73 20 20  |  must  always  |
00003bb0  62 65 20 20 74 68 65 20  6e 61 6d 65 20 6f 66 20  |be  the name of |
00003bc0  74 68 65 20 66 69 72 73  74 20 28 6f 72 20 6f 6e  |the first (or on|
00003bd0  6c 79 29 20 73 6f 75 72  63 65 0d 20 20 20 20 20  |ly) source.     |
00003be0  66 69 6c 65 2e 0d 0d 0d  20 20 20 20 20 20 20 20  |file....        |
00003bf0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003c00  20 20 20 20 20 20 20 20  20 20 33 0d 0d 0d 0d 0d  |          3.....|
00003c10  0d 1b 47 20 20 20 20 20  20 20 20 20 20 20 20 20  |..G             |
00003c20  20 20 20 20 20 20 20 20  20 55 53 49 4e 47 20 54  |         USING T|
00003c30  48 45 20 36 35 43 30 32  20 41 53 53 45 4d 42 4c  |HE 65C02 ASSEMBL|
00003c40  45 52 1b 48 0d 0d 0d 0d  20 20 20 20 20 20 20 20  |ER.H....        |
00003c50  20 20 20 2d 41 20 20 59  6f 75 20 1b 2d 01 6d 75  |   -A  You .-.mu|
00003c60  73 74 1b 2d 00 20 73 70  65 63 69 66 79 20 74 68  |st.-. specify th|
00003c70  69 73 20 6f 70 74 69 6f  6e 20 74 6f 20 61 73 73  |is option to ass|
00003c80  65 6d 62 6c 65 20 74 68  65 20 73 6f 75 72 63 65  |emble the source|
00003c90  20 66 6f 72 0d 20 20 20  20 20 20 20 20 20 20 20  | for.           |
00003ca0  20 20 20 20 42 42 43 20  20 4b 45 52 4d 49 54 2c  |    BBC  KERMIT,|
00003cb0  20 20 61 6e 64 20 20 69  74 20 20 69 73 20 20 20  |  and  it  is   |
00003cc0  72 65 63 6f 6d 6d 65 6e  64 65 64 20 20 20 66 6f  |recommended   fo|
00003cd0  72 20 20 20 73 6f 75 72  63 65 73 0d 20 20 20 20  |r   sources.    |
00003ce0  20 20 20 20 20 20 20 20  20 20 20 6f 72 69 67 69  |           origi|
00003cf0  6e 61 6c 6c 79 20 77 72  69 74 74 65 6e 20 66 6f  |nally written fo|
00003d00  72 20 74 68 65 20 41 44  45 20 41 73 73 65 6d 62  |r the ADE Assemb|
00003d10  6c 65 72 2e 20 20 49 74  20 6d 61 6b 65 73 20 74  |ler.  It makes t|
00003d20  68 65 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |he.             |
00003d30  20 20 73 79 6e 74 61 78  20 20 6f 66 20 20 6c 61  |  syntax  of  la|
00003d40  62 65 6c 73 20 41 44 45  2d 63 6f 6d 70 61 74 69  |bels ADE-compati|
00003d50  62 6c 65 2c 20 20 61 6e  64 20 74 72 65 61 74 73  |ble,  and treats|
00003d60  20 6f 6e 6c 79 20 74 68  65 0d 20 20 20 20 20 20  | only the.      |
00003d70  20 20 20 20 20 20 20 20  20 66 69 72 73 74 20 36  |         first 6|
00003d80  20 63 68 61 72 61 63 74  65 72 73 20 6f 66 20 65  | characters of e|
00003d90  61 63 68 20 61 73 20 73  69 67 6e 69 66 69 63 61  |ach as significa|
00003da0  6e 74 2e 20 20 54 68 69  73 20 6f 70 74 69 6f 6e  |nt.  This option|
00003db0  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00003dc0  69 6d 70 6c 69 65 73 20  61 20 2d 52 2e 0d 0d 20  |implies a -R... |
00003dd0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 42 79  |              By|
00003de0  20 20 64 65 66 61 75 6c  74 2c 20 20 61 6c 6c 20  |  default,  all |
00003df0  20 74 68 65 20 20 63 68  61 72 61 63 74 65 72 73  | the  characters|
00003e00  20 20 6f 66 20 20 61 20  20 20 6c 61 62 65 6c 20  |  of  a   label |
00003e10  20 20 61 72 65 0d 20 20  20 20 20 20 20 20 20 20  |  are.          |
00003e20  20 20 20 20 20 73 69 67  6e 69 66 69 63 61 6e 74  |     significant|
00003e30  2e 0d 0d 20 20 20 20 20  20 20 20 20 20 20 2d 42  |...           -B|
00003e40  20 20 53 70 65 63 69 66  69 65 73 20 74 68 61 74  |  Specifies that|
00003e50  20 61 20 6d 65 6d 6f 72  79 20 62 75 66 66 65 72  | a memory buffer|
00003e60  20 69 73 20 74 6f 20 62  65 20 75 73 65 64 20 66  | is to be used f|
00003e70  6f 72 20 6f 62 6a 65 63  74 0d 20 20 20 20 20 20  |or object.      |
00003e80  20 20 20 20 20 20 20 20  20 63 6f 64 65 2e 20 20  |         code.  |
00003e90  54 68 69 73 20 20 6d 75  73 74 20 20 62 65 20 66  |This  must  be f|
00003ea0  6f 6c 6c 6f 77 65 64 20  62 79 20 61 20 6e 75 6d  |ollowed by a num|
00003eb0  62 65 72 20 69 6e 20 74  68 65 20 72 61 6e 67 65  |ber in the range|
00003ec0  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00003ed0  31 2e 2e 31 36 20 28 73  65 65 20 73 65 63 74 69  |1..16 (see secti|
00003ee0  6f 6e 20 31 2e 36 29 0d  0d 20 20 20 20 20 20 20  |on 1.6)..       |
00003ef0  20 20 20 20 20 20 20 20  42 79 20 64 65 66 61 75  |        By defau|
00003f00  6c 74 2c 20 6e 6f 20 6f  62 6a 65 63 74 20 62 75  |lt, no object bu|
00003f10  66 66 65 72 20 69 73 20  20 75 73 65 64 2c 20 20  |ffer is  used,  |
00003f20  61 6e 64 20 20 62 79 74  65 73 20 20 61 72 65 0d  |and  bytes  are.|
00003f30  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 77  |               w|
00003f40  72 69 74 74 65 6e 20 74  6f 20 74 68 65 20 6f 62  |ritten to the ob|
00003f50  6a 65 63 74 20 66 69 6c  65 20 6f 6e 65 20 62 79  |ject file one by|
00003f60  20 6f 6e 65 2e 0d 0d 20  20 20 20 20 20 20 20 20  | one...         |
00003f70  20 20 2d 43 20 20 53 70  65 63 69 66 69 65 73 20  |  -C  Specifies |
00003f80  20 74 68 65 20 64 65 66  61 75 6c 74 20 63 6f 64  | the default cod|
00003f90  65 20 6c 69 73 74 69 6e  67 20 6c 65 76 65 6c 20  |e listing level |
00003fa0  28 73 65 65 20 74 68 65  20 43 4c 53 54 0d 20 20  |(see the CLST.  |
00003fb0  20 20 20 20 20 20 20 20  20 20 20 20 20 64 69 72  |             dir|
00003fc0  65 63 74 69 76 65 29 2e  20 54 68 69 73 20 6d 75  |ective). This mu|
00003fd0  73 74 20 62 65 20 66 6f  6c 6c 6f 77 65 64 20 62  |st be followed b|
00003fe0  79 20 30 2c 20 31 20 6f  72 20 32 2e 0d 0d 20 20  |y 0, 1 or 2...  |
00003ff0  20 20 20 20 20 20 20 20  20 20 20 20 20 42 79 20  |             By |
00004000  64 65 66 61 75 6c 74 2c  20 74 68 65 20 41 73 73  |default, the Ass|
00004010  65 6d 62 6c 65 72 20 77  69 6c 6c 20 73 74 61 72  |embler will star|
00004020  74 20 61 6e 20 61 73 73  65 6d 62 6c 79 20 77 69  |t an assembly wi|
00004030  74 68 20 61 0d 20 20 20  20 20 20 20 20 20 20 20  |th a.           |
00004040  20 20 20 20 63 6f 64 65  20 6c 69 73 74 69 6e 67  |    code listing|
00004050  20 6c 65 76 65 6c 20 6f  66 20 31 2e 0d 0d 20 20  | level of 1...  |
00004060  20 20 20 20 20 20 20 20  20 2d 46 20 20 53 70 65  |         -F  Spe|
00004070  63 69 66 69 65 73 20 74  68 65 20 6e 61 6d 65 20  |cifies the name |
00004080  6f 66 20 61 20 6c 69 73  74 69 6e 67 20 66 69 6c  |of a listing fil|
00004090  65 2c 20 77 68 69 63 68  20 6d 75 73 74 20 66 6f  |e, which must fo|
000040a0  6c 6c 6f 77 0d 20 20 20  20 20 20 20 20 20 20 20  |llow.           |
000040b0  20 20 20 20 74 68 65 20  6f 70 74 69 6f 6e 20 66  |    the option f|
000040c0  6c 61 67 2e 20 20 49 66  20 79 6f 75 20 67 69 76  |lag.  If you giv|
000040d0  65 20 74 68 69 73 20 6f  70 74 69 6f 6e 2c 20 74  |e this option, t|
000040e0  68 65 20 61 73 73 65 6d  62 6c 79 0d 20 20 20 20  |he assembly.    |
000040f0  20 20 20 20 20 20 20 20  20 20 20 6c 69 73 74 69  |           listi|
00004100  6e 67 20 77 69 6c 6c 20  62 65 20 77 72 69 74 74  |ng will be writt|
00004110  65 6e 20 74 6f 20 74 68  65 20 66 69 6c 65 20 20  |en to the file  |
00004120  69 6e 73 74 65 61 64 20  20 6f 66 20 20 62 65 69  |instead  of  bei|
00004130  6e 67 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |ng.             |
00004140  20 20 73 65 6e 74 20 74  6f 20 74 68 65 20 73 63  |  sent to the sc|
00004150  72 65 65 6e 2e 0d 0d 20  20 20 20 20 20 20 20 20  |reen...         |
00004160  20 20 20 20 20 20 49 66  20 79 6f 75 20 64 6f 20  |      If you do |
00004170  6e 6f 74 20 75 73 65 20  65 69 74 68 65 72 20 74  |not use either t|
00004180  68 65 20 20 2d 50 20 20  6f 72 20 20 2d 46 20 20  |he  -P  or  -F  |
00004190  6f 70 74 69 6f 6e 73 2c  20 20 74 68 65 0d 20 20  |options,  the.  |
000041a0  20 20 20 20 20 20 20 20  20 20 20 20 20 6c 69 73  |             lis|
000041b0  74 69 6e 67 20 77 69 6c  6c 20 62 65 20 73 65 6e  |ting will be sen|
000041c0  74 20 74 6f 20 74 68 65  20 73 63 72 65 65 6e 20  |t to the screen |
000041d0  6f 6e 6c 79 2e 0d 0d 20  20 20 20 20 20 20 20 20  |only...         |
000041e0  20 20 20 20 20 20 4e 6f  74 65 20 20 74 68 61 74  |      Note  that|
000041f0  20 20 69 66 20 79 6f 75  20 73 70 65 63 69 66 79  |  if you specify|
00004200  20 1b 2d 01 62 6f 74 68  1b 2d 00 20 2d 50 20 61  | .-.both.-. -P a|
00004210  6e 64 20 2d 46 20 6f 70  74 69 6f 6e 73 2c 20 6f  |nd -F options, o|
00004220  6e 6c 79 0d 20 20 20 20  20 20 20 20 20 20 20 20  |nly.            |
00004230  20 20 20 74 68 65 20 2d  46 20 77 69 6c 6c 20 74  |   the -F will t|
00004240  61 6b 65 20 65 66 66 65  63 74 2e 0d 0d 20 20 20  |ake effect...   |
00004250  20 20 20 20 20 20 20 20  2d 47 20 20 53 70 65 63  |        -G  Spec|
00004260  69 66 69 65 73 20 74 68  61 74 20 74 68 65 20 41  |ifies that the A|
00004270  73 73 65 6d 62 6c 65 72  20 69 73 20 74 6f 20 72  |ssembler is to r|
00004280  65 73 74 61 72 74 20 74  68 65 20 20 63 61 6c 6c  |estart the  call|
00004290  69 6e 67 0d 20 20 20 20  20 20 20 20 20 20 20 20  |ing.            |
000042a0  20 20 20 6c 61 6e 67 75  61 67 65 20 69 6d 6d 65  |   language imme|
000042b0  64 69 61 74 65 6c 79 20  74 68 65 20 61 73 73 65  |diately the asse|
000042c0  6d 62 6c 79 20 69 73 20  6f 76 65 72 2e 20 28 53  |mbly is over. (S|
000042d0  65 65 20 73 65 63 74 69  6f 6e 0d 20 20 20 20 20  |ee section.     |
000042e0  20 20 20 20 20 20 20 20  20 20 31 2e 37 29 0d 0d  |          1.7)..|
000042f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 42  |               B|
00004300  79 20 64 65 66 61 75 6c  74 2c 20 20 74 68 65 20  |y default,  the |
00004310  41 73 73 65 6d 62 6c 65  72 20 70 61 75 73 65 73  |Assembler pauses|
00004320  20 61 66 74 65 72 20 61  73 73 65 6d 62 6c 79 20  | after assembly |
00004330  75 6e 6c 65 73 73 0d 20  20 20 20 20 20 20 20 20  |unless.         |
00004340  20 20 20 20 20 20 69 74  20 69 73 20 63 61 6c 6c  |      it is call|
00004350  65 64 20 66 72 6f 6d 20  42 41 53 49 43 20 6f 72  |ed from BASIC or|
00004360  20 69 74 73 20 6f 77 6e  20 43 4c 49 20 6d 6f 64  | its own CLI mod|
00004370  65 2e 0d 0d 20 20 20 20  20 20 20 20 20 20 20 2d  |e...           -|
00004380  4c 20 20 53 70 65 63 69  66 69 65 73 20 74 68 65  |L  Specifies the|
00004390  20 64 65 66 61 75 6c 74  20 73 6f 75 72 63 65 20  | default source |
000043a0  6c 69 73 74 69 6e 67 20  6c 65 76 65 6c 20 28 73  |listing level (s|
000043b0  65 65 20 74 68 65 20 4c  53 54 0d 20 20 20 20 20  |ee the LST.     |
000043c0  20 20 20 20 20 20 20 20  20 20 64 69 72 65 63 74  |          direct|
000043d0  69 76 65 29 2e 20 54 68  69 73 20 6d 75 73 74 20  |ive). This must |
000043e0  62 65 20 66 6f 6c 6c 6f  77 65 64 20 62 79 20 30  |be followed by 0|
000043f0  2c 20 31 2c 20 32 20 6f  72 20 33 2e 20 20 59 6f  |, 1, 2 or 3.  Yo|
00004400  75 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |u.              |
00004410  20 63 61 6e 20 20 61 6c  73 6f 20 20 63 6f 6e 74  | can  also  cont|
00004420  72 6f 6c 20 20 74 68 65  20 20 6c 69 73 74 20 20  |rol  the  list  |
00004430  6c 65 76 65 6c 20 20 64  75 72 69 6e 67 20 74 68  |level  during th|
00004440  65 20 61 63 74 75 61 6c  0d 20 20 20 20 20 20 20  |e actual.       |
00004450  20 20 20 20 20 20 20 20  61 73 73 65 6d 62 6c 79  |        assembly|
00004460  20 77 69 74 68 20 66 75  6e 63 74 69 6f 6e 20 6b  | with function k|
00004470  65 79 73 20 66 30 2c 20  66 31 2c 20 66 32 20 61  |eys f0, f1, f2 a|
00004480  6e 64 20 66 33 2e 0d 0d  20 20 20 20 20 20 20 20  |nd f3...        |
00004490  20 20 20 20 20 20 20 42  79 20 64 65 66 61 75 6c  |       By defaul|
000044a0  74 2c 20 74 68 65 20 41  73 73 65 6d 62 6c 65 72  |t, the Assembler|
000044b0  20 77 69 6c 6c 20 73 74  61 72 74 20 61 6e 20 61  | will start an a|
000044c0  73 73 65 6d 62 6c 79 20  77 69 74 68 20 61 0d 20  |ssembly with a. |
000044d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 73 6f  |              so|
000044e0  75 72 63 65 20 6c 69 73  74 69 6e 67 20 6c 65 76  |urce listing lev|
000044f0  65 6c 20 6f 66 20 30 2e  0d 0d 20 20 20 20 20 20  |el of 0...      |
00004500  20 20 20 20 20 2d 4d 20  20 49 6e 73 74 72 75 63  |     -M  Instruc|
00004510  74 73 20 74 68 65 20 41  73 73 65 6d 62 6c 65 72  |ts the Assembler|
00004520  20 74 6f 20 63 68 61 6e  67 65 20 73 63 72 65 65  | to change scree|
00004530  6e 20 6d 6f 64 65 20 62  65 66 6f 72 65 20 69 74  |n mode before it|
00004540  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00004550  73 74 61 72 74 73 20 74  6f 20 70 72 6f 63 65 73  |starts to proces|
00004560  73 20 74 68 65 20 73 6f  75 72 63 65 2e 20 20 54  |s the source.  T|
00004570  68 65 20 6e 75 6d 62 65  72 20 6f 66 20 20 74 68  |he number of  th|
00004580  65 20 20 6d 6f 64 65 0d  20 20 20 20 20 20 20 20  |e  mode.        |
00004590  20 20 20 20 20 20 20 79  6f 75 20 77 69 73 68 20  |       you wish |
000045a0  74 6f 20 75 73 65 20 73  68 6f 75 6c 64 20 66 6f  |to use should fo|
000045b0  6c 6c 6f 77 20 74 68 65  20 6c 65 74 74 65 72 20  |llow the letter |
000045c0  4d 2c 20 61 6e 64 20 6d  75 73 74 20 62 65 0d 20  |M, and must be. |
000045d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 69 6e  |              in|
000045e0  20 74 68 65 20 72 61 6e  67 65 20 30 2e 2e 37 2e  | the range 0..7.|
000045f0  0d 0d 0d 0d 20 20 20 20  20 20 20 20 20 20 20 20  |....            |
00004600  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00004610  20 20 20 20 20 20 34 0d  0d 0d 0d 0d 0d 1b 47 20  |      4.......G |
00004620  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00004630  20 20 20 20 20 55 53 49  4e 47 20 54 48 45 20 36  |     USING THE 6|
00004640  35 43 30 32 20 41 53 53  45 4d 42 4c 45 52 1b 48  |5C02 ASSEMBLER.H|
00004650  0d 0d 0d 0d 20 20 20 20  20 20 20 20 20 20 20 20  |....            |
00004660  20 20 20 42 79 20 20 64  65 66 61 75 6c 74 2c 20  |   By  default, |
00004670  20 74 68 65 20 20 41 73  73 65 6d 62 6c 65 72 20  | the  Assembler |
00004680  77 69 6c 6c 20 6c 65 61  76 65 20 74 68 65 20 73  |will leave the s|
00004690  63 72 65 65 6e 20 6d 6f  64 65 0d 20 20 20 20 20  |creen mode.     |
000046a0  20 20 20 20 20 20 20 20  20 20 75 6e 63 68 61 6e  |          unchan|
000046b0  67 65 64 2e 0d 0d 20 20  20 20 20 20 20 20 20 20  |ged...          |
000046c0  20 2d 4f 20 20 53 70 65  63 69 66 69 65 73 20 74  | -O  Specifies t|
000046d0  68 65 20 6e 61 6d 65 20  20 6f 66 20 20 74 68 65  |he name  of  the|
000046e0  20 20 6f 62 6a 65 63 74  20 20 66 69 6c 65 2c 20  |  object  file, |
000046f0  20 77 68 69 63 68 20 20  6d 75 73 74 0d 20 20 20  | which  must.   |
00004700  20 20 20 20 20 20 20 20  20 20 20 20 66 6f 6c 6c  |            foll|
00004710  6f 77 20 74 68 65 20 6f  70 74 69 6f 6e 20 66 6c  |ow the option fl|
00004720  61 67 2e 20 49 66 20 79  6f 75 20 6f 6d 69 74 20  |ag. If you omit |
00004730  74 68 69 73 2c 20 74 68  65 20 41 73 73 65 6d 62  |this, the Assemb|
00004740  6c 65 72 0d 20 20 20 20  20 20 20 20 20 20 20 20  |ler.            |
00004750  20 20 20 70 65 72 66 6f  72 6d 73 20 20 61 20 20  |   performs  a  |
00004760  73 79 6e 74 61 78 20 20  63 68 65 63 6b 20 6f 6e  |syntax  check on|
00004770  6c 79 20 61 6e 64 20 64  6f 65 73 20 6e 6f 74 20  |ly and does not |
00004780  70 72 6f 64 75 63 65 20  61 6e 0d 20 20 20 20 20  |produce an.     |
00004790  20 20 20 20 20 20 20 20  20 20 6f 62 6a 65 63 74  |          object|
000047a0  20 66 69 6c 65 2e 0d 0d  20 20 20 20 20 20 20 20  | file...        |
000047b0  20 20 20 2d 50 20 20 53  70 65 63 69 66 69 65 73  |   -P  Specifies|
000047c0  20 74 68 61 74 20 74 68  65 20 6c 69 73 74 69 6e  | that the listin|
000047d0  67 20 69 73 20 74 6f 20  62 65 20 73 65 6e 74 20  |g is to be sent |
000047e0  74 6f 20 20 61 20 20 70  72 69 6e 74 65 72 0d 20  |to  a  printer. |
000047f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 6f 6e  |              on|
00004800  6c 79 2e 0d 0d 20 20 20  20 20 20 20 20 20 20 20  |ly...           |
00004810  20 20 20 20 49 66 20 79  6f 75 20 64 6f 20 6e 6f  |    If you do no|
00004820  74 20 75 73 65 20 65 69  74 68 65 72 20 74 68 65  |t use either the|
00004830  20 20 2d 50 20 20 6f 72  20 20 2d 46 20 20 6f 70  |  -P  or  -F  op|
00004840  74 69 6f 6e 73 2c 20 20  74 68 65 0d 20 20 20 20  |tions,  the.    |
00004850  20 20 20 20 20 20 20 20  20 20 20 6c 69 73 74 69  |           listi|
00004860  6e 67 20 77 69 6c 6c 20  62 65 20 73 65 6e 74 20  |ng will be sent |
00004870  74 6f 20 74 68 65 20 73  63 72 65 65 6e 20 6f 6e  |to the screen on|
00004880  6c 79 2e 0d 0d 20 20 20  20 20 20 20 20 20 20 20  |ly...           |
00004890  20 20 20 20 4e 6f 74 65  20 20 74 68 61 74 20 20  |    Note  that  |
000048a0  69 66 20 79 6f 75 20 73  70 65 63 69 66 79 20 1b  |if you specify .|
000048b0  2d 01 62 6f 74 68 1b 2d  00 20 2d 50 20 61 6e 64  |-.both.-. -P and|
000048c0  20 2d 46 20 6f 70 74 69  6f 6e 73 2c 20 6f 6e 6c  | -F options, onl|
000048d0  79 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |y.              |
000048e0  20 74 68 65 20 2d 46 20  77 69 6c 6c 20 74 61 6b  | the -F will tak|
000048f0  65 20 65 66 66 65 63 74  2e 0d 0d 20 20 20 20 20  |e effect...     |
00004900  20 20 20 20 20 20 2d 52  20 20 49 66 20 74 68 69  |      -R  If thi|
00004910  73 20 69 73 20 20 73 70  65 63 69 66 69 65 64 2c  |s is  specified,|
00004920  20 20 36 35 43 30 32 20  20 6f 70 63 6f 64 65 73  |  65C02  opcodes|
00004930  20 20 61 6e 64 20 20 61  64 64 72 65 73 73 69 6e  |  and  addressin|
00004940  67 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |g.              |
00004950  20 6d 6f 64 65 73 20 61  72 65 20 72 65 6a 65 63  | modes are rejec|
00004960  74 65 64 2e 20 49 66 20  79 6f 75 20 6f 6d 69 74  |ted. If you omit|
00004970  20 69 74 2c 20 61 6c 6c  20 36 35 43 30 32 20 63  | it, all 65C02 c|
00004980  6f 64 65 73 20 61 72 65  0d 20 20 20 20 20 20 20  |odes are.       |
00004990  20 20 20 20 20 20 20 20  61 73 73 65 6d 62 6c 65  |        assemble|
000049a0  64 2e 0d 0d 20 20 20 20  20 20 20 20 20 20 20 2d  |d...           -|
000049b0  53 20 20 53 70 65 63 69  66 69 65 73 20 20 74 68  |S  Specifies  th|
000049c0  61 74 20 20 6c 69 6e 65  73 20 20 73 6b 69 70 70  |at  lines  skipp|
000049d0  65 64 20 69 6e 20 63 6f  6e 64 69 74 69 6f 6e 61  |ed in conditiona|
000049e0  6c 73 20 61 72 65 20 6e  6f 74 0d 20 20 20 20 20  |ls are not.     |
000049f0  20 20 20 20 20 20 20 20  20 20 6c 69 73 74 65 64  |          listed|
00004a00  20 28 73 65 65 20 74 68  65 20 53 46 43 4f 4e 44  | (see the SFCOND|
00004a10  20 61 6e 64 20 4c 46 43  4f 4e 44 20 64 69 72 65  | and LFCOND dire|
00004a20  63 74 69 76 65 73 29 2e  0d 0d 20 20 20 20 20 20  |ctives)...      |
00004a30  20 20 20 20 20 20 20 20  20 42 79 20 64 65 66 61  |         By defa|
00004a40  75 6c 74 2c 20 20 74 68  65 20 41 73 73 65 6d 62  |ult,  the Assemb|
00004a50  6c 65 72 20 77 69 6c 6c  20 6c 69 73 74 20 61 6c  |ler will list al|
00004a60  6c 20 73 6b 69 70 70 65  64 20 20 6c 69 6e 65 73  |l skipped  lines|
00004a70  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00004a80  69 6e 20 63 6f 6e 64 69  74 69 6f 6e 61 6c 73 2e  |in conditionals.|
00004a90  0d 0d 20 20 20 20 20 20  20 20 20 20 20 2d 57 20  |..           -W |
00004aa0  20 53 70 65 63 69 66 69  65 73 20 20 20 74 68 61  | Specifies   tha|
00004ab0  74 20 20 20 74 68 65 20  20 20 41 73 73 65 6d 62  |t   the   Assemb|
00004ac0  6c 65 72 20 20 73 68 6f  75 6c 64 20 20 77 61 69  |ler  should  wai|
00004ad0  74 20 20 61 66 74 65 72  0d 20 20 20 20 20 20 20  |t  after.       |
00004ae0  20 20 20 20 20 20 20 20  64 69 73 70 6c 61 79 69  |        displayi|
00004af0  6e 67 20 61 20 6c 69 6e  65 20 63 6f 6e 74 61 69  |ng a line contai|
00004b00  6e 69 6e 67 20 61 6e 20  65 72 72 6f 72 2c 20 20  |ning an error,  |
00004b10  73 6f 20 79 6f 75 20 63  61 6e 20 6e 6f 74 65 0d  |so you can note.|
00004b20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 64  |               d|
00004b30  6f 77 6e 20 74 68 65 20  64 65 74 61 69 6c 73 2e  |own the details.|
00004b40  20 20 54 6f 20 72 65 73  75 6d 65 20 61 73 73 65  |  To resume asse|
00004b50  6d 62 6c 79 2c 20 20 70  72 65 73 73 20 61 6e 79  |mbly,  press any|
00004b60  20 20 6b 65 79 2e 0d 20  20 20 20 20 20 20 20 20  |  key..         |
00004b70  20 20 20 20 20 20 54 68  69 73 20 20 6f 70 74 69  |      This  opti|
00004b80  6f 6e 20 68 61 73 20 6e  6f 20 65 66 66 65 63 74  |on has no effect|
00004b90  20 69 66 20 79 6f 75 20  61 72 65 20 73 65 6e 64  | if you are send|
00004ba0  69 6e 67 20 6f 75 74 70  75 74 20 74 6f 0d 20 20  |ing output to.  |
00004bb0  20 20 20 20 20 20 20 20  20 20 20 20 20 61 20 70  |             a p|
00004bc0  72 69 6e 74 65 72 20 6f  72 20 74 6f 20 61 20 66  |rinter or to a f|
00004bd0  69 6c 65 2e 20 20 59 6f  75 20 63 61 6e 20 63 68  |ile.  You can ch|
00004be0  61 6e 67 65 20 74 68 65  20 73 65 74 74 69 6e 67  |ange the setting|
00004bf0  20 20 6f 66 0d 20 20 20  20 20 20 20 20 20 20 20  |  of.           |
00004c00  20 20 20 20 74 68 69 73  20 20 6f 70 74 69 6f 6e  |    this  option|
00004c10  20 20 61 74 20 20 61 6e  79 20 20 74 69 6d 65 20  |  at  any  time |
00004c20  64 75 72 69 6e 67 20 61  73 73 65 6d 62 6c 79 20  |during assembly |
00004c30  62 79 20 70 72 65 73 73  69 6e 67 0d 20 20 20 20  |by pressing.    |
00004c40  20 20 20 20 20 20 20 20  20 20 20 43 4f 4e 54 52  |           CONTR|
00004c50  4f 4c 2d 57 2e 0d 0d 20  20 20 20 20 20 20 20 20  |OL-W...         |
00004c60  20 20 20 20 20 20 42 79  20 64 65 66 61 75 6c 74  |      By default|
00004c70  2c 20 20 74 68 65 20 41  73 73 65 6d 62 6c 65 72  |,  the Assembler|
00004c80  20 77 69 6c 6c 20 72 65  70 6f 72 74 20 61 6c 6c  | will report all|
00004c90  20 65 72 72 6f 72 73 2c  20 20 62 75 74 0d 20 20  | errors,  but.  |
00004ca0  20 20 20 20 20 20 20 20  20 20 20 20 20 77 69 6c  |             wil|
00004cb0  6c 20 6e 6f 74 20 70 61  75 73 65 2e 0d 0d 0d 20  |l not pause.... |
00004cc0  20 20 20 20 41 73 20 61  6e 20 65 78 61 6d 70 6c  |    As an exampl|
00004cd0  65 2c 20 74 68 65 20 6c  69 6e 65 3a 0d 0d 20 20  |e, the line:..  |
00004ce0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00004cf0  2a 41 53 53 45 4d 42 4c  45 20 53 4f 55 52 43 45  |*ASSEMBLE SOURCE|
00004d00  20 2d 4f 50 52 4f 47 20  2d 50 20 2d 4c 32 20 2d  | -OPROG -P -L2 -|
00004d10  42 38 0d 0d 20 20 20 20  20 77 69 6c 6c 20 61 73  |B8..     will as|
00004d20  73 65 6d 62 6c 65 20 66  72 6f 6d 20 66 69 6c 65  |semble from file|
00004d30  20 53 4f 55 52 43 45 2c  20 70 75 74 74 69 6e 67  | SOURCE, putting|
00004d40  20 74 68 65 20 6f 62 6a  65 63 74 20 63 6f 64 65  | the object code|
00004d50  20 69 6e 74 6f 20 66 69  6c 65 0d 20 20 20 20 20  | into file.     |
00004d60  50 52 4f 47 2e 20 20 54  68 65 20 64 65 66 61 75  |PROG.  The defau|
00004d70  6c 74 20 6c 69 73 74 69  6e 67 20 6c 65 76 65 6c  |lt listing level|
00004d80  20 75 73 65 64 20 77 69  6c 6c 20 62 65 20 32 2c  | used will be 2,|
00004d90  20 20 61 6e 64 20 74 68  65 20 6c 69 73 74 69 6e  |  and the listin|
00004da0  67 0d 20 20 20 20 20 77  69 6c 6c 20 62 65 20 73  |g.     will be s|
00004db0  65 6e 74 20 74 6f 20 74  68 65 20 70 72 69 6e 74  |ent to the print|
00004dc0  65 72 20 6f 6e 6c 79 2e  20 20 41 6e 20 38 20 6b  |er only.  An 8 k|
00004dd0  69 6c 6f 62 79 74 65 20  6d 65 6d 6f 72 79 20 62  |ilobyte memory b|
00004de0  75 66 66 65 72 20 69 73  0d 20 20 20 20 20 74 6f  |uffer is.     to|
00004df0  20 62 65 20 75 73 65 64  20 66 6f 72 20 74 68 65  | be used for the|
00004e00  20 6f 62 6a 65 63 74 20  63 6f 64 65 20 74 6f 20  | object code to |
00004e10  73 70 65 65 64 20 75 70  20 61 73 73 65 6d 62 6c  |speed up assembl|
00004e20  79 2e 0d 0d 20 20 20 20  20 54 68 65 20 41 73 73  |y...     The Ass|
00004e30  65 6d 62 6c 65 72 20 77  69 6c 6c 20 6c 65 61 76  |embler will leav|
00004e40  65 20 74 68 65 20 73 63  72 65 65 6e 20 69 6e 20  |e the screen in |
00004e50  20 77 68 61 74 65 76 65  72 20 20 6d 6f 64 65 20  | whatever  mode |
00004e60  20 79 6f 75 20 20 68 61  76 65 0d 20 20 20 20 20  | you  have.     |
00004e70  73 65 6c 65 63 74 65 64  2c 20 20 73 6f 20 74 68  |selected,  so th|
00004e80  61 74 20 66 6f 72 20 6c  61 72 67 65 20 61 73 73  |at for large ass|
00004e90  65 6d 62 6c 69 65 73 20  79 6f 75 20 6d 61 79 20  |emblies you may |
00004ea0  6e 65 65 64 20 74 6f 20  63 68 61 6e 67 65 20 74  |need to change t|
00004eb0  6f 0d 20 20 20 20 20 6d  6f 64 65 20 37 20 74 6f  |o.     mode 7 to|
00004ec0  20 70 72 6f 76 69 64 65  20 72 6f 6f 6d 20 69 6e  | provide room in|
00004ed0  20 6d 65 6d 6f 72 79 20  66 6f 72 20 20 74 68 65  | memory for  the|
00004ee0  20 20 73 79 6d 62 6f 6c  20 20 74 61 62 6c 65 2e  |  symbol  table.|
00004ef0  20 20 53 68 61 64 6f 77  0d 20 20 20 20 20 6d 6f  |  Shadow.     mo|
00004f00  64 65 20 77 69 6c 6c 20  61 75 74 6f 6d 61 74 69  |de will automati|
00004f10  63 61 6c 6c 79 20 62 65  20 73 65 6c 65 63 74 65  |cally be selecte|
00004f20  64 20 69 66 20 69 74 20  69 73 20 61 76 61 69 6c  |d if it is avail|
00004f30  61 62 6c 65 2c 20 20 73  6f 20 20 74 68 61 74 0d  |able,  so  that.|
00004f40  20 20 20 20 20 6f 6e 20  74 68 65 20 20 42 2b 2c  |     on the  B+,|
00004f50  20 20 42 2b 31 32 38 2c  20 20 61 6e 64 20 4d 61  |  B+128,  and Ma|
00004f60  73 74 65 72 20 73 65 72  69 65 73 2c 20 20 79 6f  |ster series,  yo|
00004f70  75 20 77 69 6c 6c 20 61  6c 77 61 79 73 20 68 61  |u will always ha|
00004f80  76 65 20 74 68 65 0d 20  20 20 20 20 6d 61 78 69  |ve the.     maxi|
00004f90  6d 75 6d 20 73 70 61 63  65 20 61 76 61 69 6c 61  |mum space availa|
00004fa0  62 6c 65 2e 0d 0d 0d 20  20 20 20 20 20 20 20 20  |ble....         |
00004fb0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00004fc0  20 20 20 20 20 20 20 20  20 35 0d 0d 0d 0d 0d 0d  |         5......|
00004fd0  1b 47 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.G              |
00004fe0  20 20 20 20 20 20 20 20  55 53 49 4e 47 20 54 48  |        USING TH|
00004ff0  45 20 36 35 43 30 32 20  41 53 53 45 4d 42 4c 45  |E 65C02 ASSEMBLE|
00005000  52 1b 48 0d 0d 0d 0d 0d  20 20 20 20 20 1b 2d 01  |R.H.....     .-.|
00005010  31 2e 34 2e 32 20 41 6c  74 65 72 6e 61 74 69 76  |1.4.2 Alternativ|
00005020  65 20 73 79 6e 74 61 78  20 66 6f 72 6d 73 20 66  |e syntax forms f|
00005030  6f 72 20 74 68 65 20 63  6f 6d 6d 61 6e 64 20 6c  |or the command l|
00005040  69 6e 65 1b 2d 00 0d 0d  20 20 20 20 20 54 68 65  |ine.-...     The|
00005050  20 65 78 61 6d 70 6c 65  20 67 69 76 65 6e 20 20  | example given  |
00005060  61 62 6f 76 65 2c 20 20  61 6e 64 20 20 74 68 65  |above,  and  the|
00005070  20 20 6f 75 74 70 75 74  20 20 74 68 65 20 20 41  |  output  the  A|
00005080  73 73 65 6d 62 6c 65 72  20 20 77 69 6c 6c 0d 20  |ssembler  will. |
00005090  20 20 20 20 70 72 6f 64  75 63 65 20 69 66 20 79  |    produce if y|
000050a0  6f 75 20 74 79 70 65 0d  0d 20 20 20 20 20 20 20  |ou type..       |
000050b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000050c0  20 20 20 20 2a 48 45 4c  50 20 41 53 53 45 4d 42  |    *HELP ASSEMB|
000050d0  4c 45 52 0d 0d 20 20 20  20 20 64 65 74 61 69 6c  |LER..     detail|
000050e0  20 20 74 68 65 20 20 66  75 6c 6c 20 20 66 6f 72  |  the  full  for|
000050f0  6d 20 20 6f 66 20 74 68  65 20 63 6f 6d 6d 61 6e  |m  of the comman|
00005100  64 20 6c 69 6e 65 20 73  79 6e 74 61 78 2e 20 20  |d line syntax.  |
00005110  41 73 20 79 6f 75 20 67  61 69 6e 0d 20 20 20 20  |As you gain.    |
00005120  20 65 78 70 65 72 69 65  6e 63 65 20 69 6e 20 75  | experience in u|
00005130  73 69 6e 67 20 74 68 65  20 41 73 73 65 6d 62 6c  |sing the Assembl|
00005140  65 72 2c 20 20 68 6f 77  65 76 65 72 2c 20 20 79  |er,  however,  y|
00005150  6f 75 20 6d 69 67 68 74  20 20 77 69 73 68 20 20  |ou might  wish  |
00005160  74 6f 0d 20 20 20 20 20  74 61 6b 65 20 20 61 64  |to.     take  ad|
00005170  76 61 6e 74 61 67 65 20  20 6f 66 20 20 76 61 72  |vantage  of  var|
00005180  69 6f 75 73 20 20 77 61  79 73 20 6f 66 20 73 70  |ious  ways of sp|
00005190  65 63 69 66 79 69 6e 67  20 74 68 65 20 6f 70 74  |ecifying the opt|
000051a0  69 6f 6e 73 20 69 6e 20  61 0d 20 20 20 20 20 6d  |ions in a.     m|
000051b0  6f 72 65 20 63 6f 6d 70  61 63 74 20 66 6f 72 6d  |ore compact form|
000051c0  2e 0d 0d 20 20 20 20 20  46 69 72 73 74 6c 79 2c  |...     Firstly,|
000051d0  20 74 68 65 20 41 73 73  65 6d 62 6c 65 72 20 61  | the Assembler a|
000051e0  6c 6c 6f 77 73 20 79 6f  75 20 74 6f 20 73 70 65  |llows you to spe|
000051f0  63 69 66 79 20 74 68 65  20 6f 70 74 69 6f 6e 73  |cify the options|
00005200  20 20 61 6c 6c 20 20 61  74 0d 20 20 20 20 20 6f  |  all  at.     o|
00005210  6e 63 65 2c 20 20 77 69  74 68 6f 75 74 20 20 74  |nce,  without  t|
00005220  68 65 20 6e 65 65 64 20  74 6f 20 70 75 74 20 74  |he need to put t|
00005230  68 65 20 22 2d 22 20 66  6c 61 67 20 62 65 66 6f  |he "-" flag befo|
00005240  72 65 20 65 61 63 68 20  6f 66 20 74 68 65 6d 2e  |re each of them.|
00005250  0d 20 20 20 20 20 54 68  75 73 2c 20 79 6f 75 20  |.     Thus, you |
00005260  63 6f 75 6c 64 20 74 79  70 65 20 65 69 74 68 65  |could type eithe|
00005270  72 0d 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |r..             |
00005280  20 20 20 20 20 20 20 20  2a 41 53 53 45 4d 42 4c  |        *ASSEMBL|
00005290  45 20 53 4f 55 52 43 45  20 2d 4d 33 20 2d 57 20  |E SOURCE -M3 -W |
000052a0  2d 4c 32 0d 0d 20 20 20  20 20 6f 72 20 74 68 65  |-L2..     or the|
000052b0  20 73 68 6f 72 74 65 72  2c 20 62 75 74 20 6c 65  | shorter, but le|
000052c0  73 73 20 72 65 61 64 61  62 6c 65 0d 0d 20 20 20  |ss readable..   |
000052d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000052e0  20 20 20 20 2a 41 53 53  45 4d 42 4c 45 20 53 4f  |    *ASSEMBLE SO|
000052f0  55 52 43 45 20 2d 4d 33  57 4c 32 0d 0d 20 20 20  |URCE -M3WL2..   |
00005300  20 20 53 65 63 6f 6e 64  6c 79 2c 20 74 68 65 20  |  Secondly, the |
00005310  22 2d 4f 22 20 66 6c 61  67 20 74 6f 20 73 70 65  |"-O" flag to spe|
00005320  63 69 66 79 20 61 6e 20  6f 62 6a 65 63 74 20 20  |cify an object  |
00005330  66 69 6c 65 20 20 69 73  20 20 6f 70 74 69 6f 6e  |file  is  option|
00005340  61 6c 2e 0d 20 20 20 20  20 54 68 65 20 41 73 73  |al..     The Ass|
00005350  65 6d 62 6c 65 72 20 77  69 6c 6c 20 74 61 6b 65  |embler will take|
00005360  20 74 68 65 20 1b 2d 01  73 65 63 6f 6e 64 1b 2d  | the .-.second.-|
00005370  00 20 70 61 72 61 6d 65  74 65 72 20 6f 66 20 74  |. parameter of t|
00005380  68 65 20 63 6f 6d 6d 61  6e 64 20 61 73 20 61 6e  |he command as an|
00005390  0d 20 20 20 20 20 6f 62  6a 65 63 74 20 66 69 6c  |.     object fil|
000053a0  65 20 6e 61 6d 65 2c 20  1b 2d 01 75 6e 6c 65 73  |e name, .-.unles|
000053b0  73 1b 2d 00 20 69 74 20  73 74 61 72 74 73 20 77  |s.-. it starts w|
000053c0  69 74 68 20 61 20 22 2d  22 20 63 68 61 72 61 63  |ith a "-" charac|
000053d0  74 65 72 2e 20 54 68 75  73 0d 0d 20 20 20 20 20  |ter. Thus..     |
000053e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000053f0  20 20 2a 41 53 53 45 4d  42 4c 45 20 53 4f 55 52  |  *ASSEMBLE SOUR|
00005400  43 45 20 2d 4f 50 52 4f  47 0d 0d 20 20 20 20 20  |CE -OPROG..     |
00005410  61 6e 64 0d 0d 20 20 20  20 20 20 20 20 20 20 20  |and..           |
00005420  20 20 20 20 20 20 20 20  20 20 20 20 20 2a 41 53  |             *AS|
00005430  53 45 4d 42 4c 45 20 53  4f 55 52 43 45 20 50 52  |SEMBLE SOURCE PR|
00005440  4f 47 0d 0d 20 20 20 20  20 61 72 65 20 20 69 64  |OG..     are  id|
00005450  65 6e 74 69 63 61 6c 20  20 69 6e 20 20 65 66 66  |entical  in  eff|
00005460  65 63 74 2e 20 20 49 66  20 79 6f 75 20 73 68 6f  |ect.  If you sho|
00005470  75 6c 64 20 65 76 65 72  20 1b 2d 01 6e 65 65 64  |uld ever .-.need|
00005480  1b 2d 00 20 74 6f 20 73  74 61 72 74 20 74 68 65  |.-. to start the|
00005490  0d 20 20 20 20 20 6f 62  6a 65 63 74 20 66 69 6c  |.     object fil|
000054a0  65 20 77 69 74 68 20 61  20 22 2d 22 20 63 68 61  |e with a "-" cha|
000054b0  72 61 63 74 65 72 20 20  28 65 2e 67 2e 20 69 66  |racter  (e.g. if|
000054c0  20 20 79 6f 75 20 20 77  69 73 68 20 20 74 6f 20  |  you  wish  to |
000054d0  20 75 73 65 20 20 61 0d  20 20 20 20 20 74 65 6d  | use  a.     tem|
000054e0  70 6f 72 61 72 79 20 20  66 69 6c 65 20 73 79 73  |porary  file sys|
000054f0  74 65 6d 20 6f 6e 20 61  20 4d 61 73 74 65 72 20  |tem on a Master |
00005500  31 32 38 29 20 20 79 6f  75 20 77 69 6c 6c 20 1b  |128)  you will .|
00005510  2d 01 68 61 76 65 1b 2d  00 20 74 6f 20 73 70 65  |-.have.-. to spe|
00005520  63 69 66 79 0d 20 20 20  20 20 74 68 65 20 22 2d  |cify.     the "-|
00005530  4f 22 20 66 6c 61 67 20  65 78 70 6c 69 63 69 74  |O" flag explicit|
00005540  6c 79 2e 0d 0d 0d 1b 2d  01 31 2e 35 20 41 73 73  |ly.....-.1.5 Ass|
00005550  65 6d 62 6c 79 20 6f 6e  20 61 20 73 65 63 6f 6e  |embly on a secon|
00005560  64 20 70 72 6f 63 65 73  73 6f 72 1b 2d 00 0d 0d  |d processor.-...|
00005570  20 20 20 54 68 65 20 36  35 43 30 32 20 41 73 73  |   The 65C02 Ass|
00005580  65 6d 62 6c 65 72 20 69  73 20 20 63 6f 6d 70 61  |embler is  compa|
00005590  74 69 62 6c 65 20 20 77  69 74 68 20 20 62 6f 74  |tible  with  bot|
000055a0  68 20 20 74 68 65 20 20  65 78 74 65 72 6e 61 6c  |h  the  external|
000055b0  20 20 36 35 30 32 0d 73  65 63 6f 6e 64 20 20 70  |  6502.second  p|
000055c0  72 6f 63 65 73 73 6f 72  2c 20 20 61 6e 64 20 20  |rocessor,  and  |
000055d0  77 69 74 68 20 20 74 68  65 20 20 4d 61 73 74 65  |with  the  Maste|
000055e0  72 20 54 75 72 62 6f 2d  43 61 72 64 2e 20 20 55  |r Turbo-Card.  U|
000055f0  73 69 6e 67 20 61 20 73  65 63 6f 6e 64 0d 70 72  |sing a second.pr|
00005600  6f 63 65 73 73 6f 72 20  77 69 6c 6c 20 67 69 76  |ocessor will giv|
00005610  65 20 61 20 66 61 73 74  65 72 20 61 73 73 65 6d  |e a faster assem|
00005620  62 6c 79 20 64 75 65 20  74 6f 20 74 68 65 20 68  |bly due to the h|
00005630  69 67 68 65 72 20 63 6c  6f 63 6b 20 72 61 74 65  |igher clock rate|
00005640  20 20 6f 66 0d 74 68 65  20 20 70 72 6f 63 65 73  |  of.the  proces|
00005650  73 6f 72 2c 20 20 61 6e  64 20 20 77 69 6c 6c 20  |sor,  and  will |
00005660  20 61 6c 73 6f 20 20 67  69 76 65 20 20 79 6f 75  | also  give  you|
00005670  20 6d 6f 72 65 20 6d 65  6d 6f 72 79 20 66 6f 72  | more memory for|
00005680  20 74 68 65 20 73 79 6d  62 6f 6c 0d 74 61 62 6c  | the symbol.tabl|
00005690  65 2e 0d 0d 20 20 20 41  20 73 65 63 6f 6e 64 20  |e...   A second |
000056a0  70 72 6f 63 65 73 73 6f  72 20 61 6c 6c 6f 77 73  |processor allows|
000056b0  20 79 6f 75 20 74 6f 20  6f 72 67 61 6e 69 73 65  | you to organise|
000056c0  20 79 6f 75 72 20 73 6f  75 72 63 65 20 66 69 6c  | your source fil|
000056d0  65 73 20 74 6f 20 74 61  6b 65 0d 61 64 76 61 6e  |es to take.advan|
000056e0  74 61 67 65 20 6f 66 20  61 20 73 6f 75 72 63 65  |tage of a source|
000056f0  20 66 69 6c 65 20 6d 65  6d 6f 72 79 20 62 75 66  | file memory buf|
00005700  66 65 72 2e 20 41 6e 79  20 73 6f 75 72 63 65 20  |fer. Any source |
00005710  66 69 6c 65 20 74 68 61  74 20 69 73 20 6c 65 73  |file that is les|
00005720  73 0d 74 68 61 6e 20 31  34 20 6b 69 6c 6f 62 79  |s.than 14 kiloby|
00005730  74 65 73 20 69 6e 20 73  69 7a 65 20 69 73 20 2a  |tes in size is *|
00005740  4c 4f 41 44 65 64 20 69  6e 74 6f 20 6d 65 6d 6f  |LOADed into memo|
00005750  72 79 20 20 61 6e 64 20  20 61 73 73 65 6d 62 6c  |ry  and  assembl|
00005760  65 64 20 20 66 72 6f 6d  0d 74 68 65 72 65 3a 20  |ed  from.there: |
00005770  20 73 69 6e 63 65 20 20  74 68 65 20 41 73 73 65  | since  the Asse|
00005780  6d 62 6c 65 72 20 64 6f  65 73 20 6e 6f 74 20 74  |mbler does not t|
00005790  68 65 6e 20 6e 65 65 64  20 74 6f 20 77 61 69 74  |hen need to wait|
000057a0  20 66 6f 72 20 64 61 74  61 20 74 6f 20 62 65 0d  | for data to be.|
000057b0  66 65 74 63 68 65 64 20  66 72 6f 6d 20 64 69 73  |fetched from dis|
000057c0  63 2c 20 61 73 73 65 6d  62 6c 79 20 77 69 6c 6c  |c, assembly will|
000057d0  20 73 70 65 65 64 20 75  70 20 20 64 72 61 6d 61  | speed up  drama|
000057e0  74 69 63 61 6c 6c 79 2e  20 20 49 74 20 20 69 73  |tically.  It  is|
000057f0  20 20 77 65 6c 6c 0d 77  6f 72 74 68 20 61 72 72  |  well.worth arr|
00005800  61 6e 67 69 6e 67 20 79  6f 75 72 20 70 72 6f 67  |anging your prog|
00005810  72 61 6d 20 73 6f 20 65  61 63 68 20 6f 66 20 69  |ram so each of i|
00005820  74 73 20 73 6f 75 72 63  65 20 66 69 6c 65 73 20  |ts source files |
00005830  77 69 6c 6c 20 66 69 74  20 69 6e 74 6f 0d 74 68  |will fit into.th|
00005840  69 73 20 62 75 66 66 65  72 20 61 72 65 61 2e 0d  |is buffer area..|
00005850  0d 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
00005860  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00005870  20 20 20 20 36 0d 0d 0d  0d 0d 0d 1b 47 20 20 20  |    6.......G   |
00005880  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00005890  20 20 20 55 53 49 4e 47  20 54 48 45 20 36 35 43  |   USING THE 65C|
000058a0  30 32 20 41 53 53 45 4d  42 4c 45 52 1b 48 0d 0d  |02 ASSEMBLER.H..|
000058b0  0d 0d 0d 20 20 20 54 68  65 20 20 73 6f 75 72 63  |...   The  sourc|
000058c0  65 20 20 62 75 66 66 65  72 20 20 69 73 20 20 61  |e  buffer  is  a|
000058d0  75 74 6f 6d 61 74 69 63  61 6c 6c 79 20 20 73 77  |utomatically  sw|
000058e0  69 74 63 68 65 64 20 20  6f 6e 20 20 77 68 65 6e  |itched  on  when|
000058f0  20 61 20 73 65 63 6f 6e  64 0d 70 72 6f 63 65 73  | a second.proces|
00005900  73 6f 72 20 69 73 20 69  6e 20 75 73 65 2e 0d 0d  |sor is in use...|
00005910  0d 1b 2d 01 31 2e 36 20  54 68 65 20 6f 62 6a 65  |..-.1.6 The obje|
00005920  63 74 20 63 6f 64 65 20  62 75 66 66 65 72 1b 2d  |ct code buffer.-|
00005930  00 0d 0d 20 20 20 54 68  65 20 41 73 73 65 6d 62  |...   The Assemb|
00005940  6c 65 72 20 61 6c 6c 6f  77 73 20 79 6f 75 20 74  |ler allows you t|
00005950  6f 20 73 65 6c 65 63 74  20 61 6e 20 6f 62 6a 65  |o select an obje|
00005960  63 74 20 63 6f 64 65 20  62 75 66 66 65 72 20 69  |ct code buffer i|
00005970  6e 20 6d 65 6d 6f 72 79  2e 0d 43 6f 64 65 20 62  |n memory..Code b|
00005980  79 74 65 73 20 67 65 6e  65 72 61 74 65 64 20 66  |ytes generated f|
00005990  72 6f 6d 20 74 68 65 20  73 6f 75 72 63 65 20 61  |rom the source a|
000059a0  72 65 20 20 77 72 69 74  74 65 6e 20 20 69 6e 74  |re  written  int|
000059b0  6f 20 20 74 68 69 73 20  20 62 75 66 66 65 72 2c  |o  this  buffer,|
000059c0  0d 72 61 74 68 65 72 20  20 74 68 61 6e 20 62 65  |.rather  than be|
000059d0  69 6e 67 20 73 65 6e 74  20 64 69 72 65 63 74 6c  |ing sent directl|
000059e0  79 20 74 6f 20 74 68 65  20 6f 62 6a 65 63 74 20  |y to the object |
000059f0  66 69 6c 65 2c 20 20 61  6e 64 20 74 68 69 73 20  |file,  and this |
00005a00  67 69 76 65 73 20 61 0d  73 75 62 73 74 61 6e 74  |gives a.substant|
00005a10  69 61 6c 20 69 6e 63 72  65 61 73 65 20 69 6e 20  |ial increase in |
00005a20  73 70 65 65 64 20 6f 66  20 20 61 73 73 65 6d 62  |speed of  assemb|
00005a30  6c 79 2e 20 20 57 68 65  6e 65 76 65 72 20 20 74  |ly.  Whenever  t|
00005a40  68 65 20 20 62 75 66 66  65 72 20 20 69 73 0d 66  |he  buffer  is.f|
00005a50  75 6c 6c 2c 20 20 74 68  65 20 61 73 73 65 6d 62  |ull,  the assemb|
00005a60  6c 79 20 77 69 6c 6c 20  70 61 75 73 65 20 69 6e  |ly will pause in|
00005a70  20 72 65 61 64 69 6e 67  20 73 6f 75 72 63 65 20  | reading source |
00005a80  74 6f 20 77 72 69 74 65  20 74 68 65 20 63 6f 6e  |to write the con|
00005a90  74 65 6e 74 73 0d 74 6f  20 74 68 65 20 6f 62 6a  |tents.to the obj|
00005aa0  65 63 74 20 66 69 6c 65  2e 20 20 49 74 20 74 68  |ect file.  It th|
00005ab0  65 6e 20 72 65 73 75 6d  65 73 20 61 73 73 65 6d  |en resumes assem|
00005ac0  62 6c 79 20 75 6e 74 69  6c 20 74 68 65 20 20 62  |bly until the  b|
00005ad0  75 66 66 65 72 20 20 61  67 61 69 6e 0d 66 69 6c  |uffer  again.fil|
00005ae0  6c 73 2c 20 61 6e 64 20  73 6f 20 6f 6e 2e 0d 0d  |ls, and so on...|
00005af0  20 20 20 59 6f 75 20 20  63 61 6e 20 73 70 65 63  |   You  can spec|
00005b00  69 66 79 20 74 68 65 20  62 75 66 66 65 72 20 73  |ify the buffer s|
00005b10  69 7a 65 20 77 69 74 68  20 74 68 65 20 22 2d 42  |ize with the "-B|
00005b20  22 20 6f 70 74 69 6f 6e  2e 20 20 54 68 65 20 66  |" option.  The f|
00005b30  6c 61 67 20 69 73 0d 66  6f 6c 6c 6f 77 65 64 20  |lag is.followed |
00005b40  62 79 20 61 20 6e 75 6d  62 65 72 20 62 65 74 77  |by a number betw|
00005b50  65 65 6e 20 20 31 20 61  6e 64 20 31 36 2c 20 20  |een  1 and 16,  |
00005b60  67 69 76 69 6e 67 20 20  74 68 65 20 20 62 75 66  |giving  the  buf|
00005b70  66 65 72 20 20 73 69 7a  65 20 20 69 6e 0d 6b 69  |fer  size  in.ki|
00005b80  6c 6f 62 79 74 65 73 2e  20 20 20 4e 6f 74 65 20  |lobytes.   Note |
00005b90  20 20 74 68 61 74 20 20  20 75 73 69 6e 67 20 20  |  that   using  |
00005ba0  20 61 20 20 20 62 75 66  66 65 72 20 20 20 6d 65  | a   buffer   me|
00005bb0  61 6e 73 20 20 74 68 61  74 20 20 74 68 65 72 65  |ans  that  there|
00005bc0  20 20 69 73 0d 63 6f 72  72 65 73 70 6f 6e 64 69  |  is.correspondi|
00005bd0  6e 67 6c 79 20 6c 65 73  73 20 73 70 61 63 65 20  |ngly less space |
00005be0  61 76 61 69 6c 61 62 6c  65 20 66 6f 72 20 74 68  |available for th|
00005bf0  65 20 73 79 6d 62 6f 6c  20 74 61 62 6c 65 2e 0d  |e symbol table..|
00005c00  0d 20 20 20 54 68 65 20  66 61 73 74 65 73 74 20  |.   The fastest |
00005c10  61 73 73 65 6d 62 6c 79  20 77 69 6c 6c 20 62 65  |assembly will be|
00005c20  20 61 63 68 69 65 76 65  64 20 77 68 65 6e 20 20  | achieved when  |
00005c30  74 68 65 20 20 6f 62 6a  65 63 74 20 20 63 6f 64  |the  object  cod|
00005c40  65 20 20 66 69 74 73 0d  65 6e 74 69 72 65 6c 79  |e  fits.entirely|
00005c50  20 69 6e 74 6f 20 74 68  65 20 62 75 66 66 65 72  | into the buffer|
00005c60  2e 20 49 6e 20 74 68 69  73 20 63 61 73 65 2c 20  |. In this case, |
00005c70  74 68 65 20 41 73 73 65  6d 62 6c 65 72 20 77 69  |the Assembler wi|
00005c80  6c 6c 20 70 72 6f 64 75  63 65 20 74 68 65 0d 6f  |ll produce the.o|
00005c90  62 6a 65 63 74 20 20 66  69 6c 65 20 20 77 69 74  |bject  file  wit|
00005ca0  68 20 20 2a 53 41 56 45  20 20 61 74 20 20 74 68  |h  *SAVE  at  th|
00005cb0  65 20 20 76 65 72 79 20  65 6e 64 20 6f 66 20 61  |e  very end of a|
00005cc0  6e 20 61 73 73 65 6d 62  6c 79 2c 20 20 77 68 69  |n assembly,  whi|
00005cd0  63 68 20 69 73 0d 73 75  62 73 74 61 6e 74 69 61  |ch is.substantia|
00005ce0  6c 6c 79 20 66 61 73 74  65 72 20 65 76 65 6e 20  |lly faster even |
00005cf0  74 68 61 6e 20 77 72 69  74 69 6e 67 20 69 74 20  |than writing it |
00005d00  69 6e 20 6c 61 72 67 65  20 62 6c 6f 63 6b 73 2e  |in large blocks.|
00005d10  0d 0d 0d 1b 2d 01 31 2e  37 20 52 65 74 75 72 6e  |....-.1.7 Return|
00005d20  69 6e 67 20 74 6f 20 74  68 65 20 63 61 6c 6c 69  |ing to the calli|
00005d30  6e 67 20 6c 61 6e 67 75  61 67 65 1b 2d 00 0d 0d  |ng language.-...|
00005d40  20 20 20 57 68 65 6e 20  61 6e 20 61 73 73 65 6d  |   When an assem|
00005d50  62 6c 79 20 66 69 6e 69  73 68 65 73 2c 20 20 74  |bly finishes,  t|
00005d60  68 65 20 41 73 73 65 6d  62 6c 65 72 20 77 69 6c  |he Assembler wil|
00005d70  6c 20 61 6c 77 61 79 73  20 20 72 65 73 74 61 72  |l always  restar|
00005d80  74 20 20 74 68 65 0d 6c  61 6e 67 75 61 67 65 20  |t  the.language |
00005d90  52 4f 4d 20 74 68 61 74  20 77 61 73 20 69 6e 20  |ROM that was in |
00005da0  75 73 65 20 77 68 65 6e  20 79 6f 75 20 69 73 73  |use when you iss|
00005db0  75 65 64 20 74 68 65 20  2a 41 53 53 45 4d 42 4c  |ued the *ASSEMBL|
00005dc0  45 20 63 6f 6d 6d 61 6e  64 2e 20 49 66 0d 74 68  |E command. If.th|
00005dd0  69 73 20 6c 61 6e 67 75  61 67 65 20 77 61 73 20  |is language was |
00005de0  42 41 53 49 43 20 6f 72  20 74 68 65 20 41 73 73  |BASIC or the Ass|
00005df0  65 6d 62 6c 65 72 27 73  20 6f 77 6e 20 43 4c 49  |embler's own CLI|
00005e00  20 6d 6f 64 65 2c 20 74  68 65 72 65 20 77 69 6c  | mode, there wil|
00005e10  6c 20 62 65 0d 6e 6f 20  20 64 69 66 66 69 63 75  |l be.no  difficu|
00005e20  6c 74 79 3a 20 20 68 6f  77 65 76 65 72 2c 20 20  |lty:  however,  |
00005e30  73 6f 6d 65 20 20 6c 61  6e 67 75 61 67 65 73 20  |some  languages |
00005e40  20 73 75 63 68 20 20 61  73 20 20 57 6f 72 64 57  | such  as  WordW|
00005e50  69 73 65 20 6f 72 20 56  69 65 77 0d 69 6d 6d 65  |ise or View.imme|
00005e60  64 69 61 74 65 6c 79 20  63 6c 65 61 72 20 74 68  |diately clear th|
00005e70  65 20 73 63 72 65 65 6e  20 77 68 65 6e 20 74 68  |e screen when th|
00005e80  65 79 20 73 74 61 72 74  2c 20 73 6f 20 79 6f 75  |ey start, so you|
00005e90  20 6d 61 79 20 6e 6f 74  20 68 61 76 65 20 74 69  | may not have ti|
00005ea0  6d 65 0d 74 6f 20 72 65  61 64 20 74 68 65 20 66  |me.to read the f|
00005eb0  69 6e 61 6c 20 6c 69 6e  65 73 20 74 68 61 74 20  |inal lines that |
00005ec0  74 68 65 20 41 73 73 65  6d 62 6c 65 72 20 64 69  |the Assembler di|
00005ed0  73 70 6c 61 79 73 20 6f  6e 20 74 68 65 20 73 63  |splays on the sc|
00005ee0  72 65 65 6e 2e 0d 0d 20  20 20 54 6f 20 6f 76 65  |reen...   To ove|
00005ef0  72 63 6f 6d 65 20 74 68  69 73 2c 20 74 68 65 20  |rcome this, the |
00005f00  41 73 73 65 6d 62 6c 65  72 20 69 73 20 61 62 6c  |Assembler is abl|
00005f10  65 20 74 6f 20 70 61 75  73 65 20 77 68 65 6e 20  |e to pause when |
00005f20  69 74 20 65 6e 64 73 20  75 6e 74 69 6c 0d 79 6f  |it ends until.yo|
00005f30  75 20 70 72 65 73 73 20  61 20 6b 65 79 2e 20 49  |u press a key. I|
00005f40  74 20 77 69 6c 6c 20 64  6f 20 74 68 69 73 20 77  |t will do this w|
00005f50  68 65 6e 65 76 65 72 20  74 68 65 20 70 72 65 76  |henever the prev|
00005f60  69 6f 75 73 20 6c 61 6e  67 75 61 67 65 20 69 73  |ious language is|
00005f70  20 6e 6f 74 0d 42 41 53  49 43 20 6f 72 20 74 68  | not.BASIC or th|
00005f80  65 20 41 73 73 65 6d 62  6c 65 72 27 73 20 43 4c  |e Assembler's CL|
00005f90  49 20 6d 6f 64 65 2e 0d  0d 20 20 20 49 66 20 79  |I mode...   If y|
00005fa0  6f 75 20 64 6f 6e 27 74  20 77 69 73 68 20 69 74  |ou don't wish it|
00005fb0  20 74 6f 20 70 61 75 73  65 20 28 79 6f 75 20 6d  | to pause (you m|
00005fc0  61 79 20 66 6f 72 20 65  78 61 6d 70 6c 65 20 6e  |ay for example n|
00005fd0  6f 74 20 77 61 6e 74 20  74 6f 20 72 65 61 64 0d  |ot want to read.|
00005fe0  74 68 65 20 66 69 6e 61  6c 20 73 63 72 65 65 6e  |the final screen|
00005ff0  2c 20 20 6f 72 20 74 68  65 20 6c 61 6e 67 75 61  |,  or the langua|
00006000  67 65 20 6d 61 79 20 6e  6f 74 20 63 6c 65 61 72  |ge may not clear|
00006010  20 74 68 65 20 20 73 63  72 65 65 6e 29 2c 20 20  | the  screen),  |
00006020  73 69 6d 70 6c 79 0d 73  70 65 63 69 66 79 20 20  |simply.specify  |
00006030  61 20 20 22 2d 47 22 20  20 6f 70 74 69 6f 6e 20  |a  "-G"  option |
00006040  20 69 6e 20 74 68 65 20  63 6f 6d 6d 61 6e 64 20  | in the command |
00006050  6c 69 6e 65 2e 20 20 4e  6f 77 20 74 68 65 20 41  |line.  Now the A|
00006060  73 73 65 6d 62 6c 65 72  20 77 69 6c 6c 0d 69 6d  |ssembler will.im|
00006070  6d 65 64 69 61 74 65 6c  79 20 72 65 73 74 61 72  |mediately restar|
00006080  74 20 74 68 65 20 70 72  65 76 69 6f 75 73 20 6c  |t the previous l|
00006090  61 6e 67 75 61 67 65 20  77 69 74 68 6f 75 74 20  |anguage without |
000060a0  61 20 70 61 75 73 65 2e  0d 0d 20 20 20 54 68 65  |a pause...   The|
000060b0  72 65 20 20 61 72 65 20  20 74 77 6f 20 20 63 61  |re  are  two  ca|
000060c0  73 65 73 20 20 77 68 65  72 65 20 20 74 68 65 20  |ses  where  the |
000060d0  20 41 73 73 65 6d 62 6c  65 72 20 20 77 69 6c 6c  | Assembler  will|
000060e0  20 20 1b 2d 01 61 6c 77  61 79 73 1b 2d 00 20 20  |  .-.always.-.  |
000060f0  20 70 61 75 73 65 0d 72  65 67 61 72 64 6c 65 73  | pause.regardles|
00006100  73 20 6f 66 20 74 68 65  20 22 2d 47 22 20 6f 70  |s of the "-G" op|
00006110  74 69 6f 6e 20 6f 72 20  74 68 65 20 70 72 65 76  |tion or the prev|
00006120  69 6f 75 73 20 6c 61 6e  67 75 61 67 65 2e 20 20  |ious language.  |
00006130  54 68 65 73 65 20 61 72  65 3a 0d 0d 20 20 2d 20  |These are:..  - |
00006140  57 68 65 6e 20 61 6e 20  65 72 72 6f 72 20 69 73  |When an error is|
00006150  20 64 65 74 65 63 74 65  64 20 69 6e 20 74 68 65  | detected in the|
00006160  20 2a 41 53 53 45 4d 42  4c 45 20 63 6f 6d 6d 61  | *ASSEMBLE comma|
00006170  6e 64 20 79 6f 75 20 74  79 70 65 64 0d 0d 20 20  |nd you typed..  |
00006180  20 20 6f 72 0d 0d 20 20  2d 20 4f 6e 20 20 61 20  |  or..  - On  a |
00006190  20 6d 61 63 68 69 6e 65  20 20 77 69 74 68 20 20  | machine  with  |
000061a0  61 20 73 68 61 64 6f 77  20 73 63 72 65 65 6e 20  |a shadow screen |
000061b0  74 68 61 74 20 77 61 73  20 74 75 72 6e 65 64 20  |that was turned |
000061c0  6f 66 66 20 77 68 65 6e  20 79 6f 75 0d 20 20 20  |off when you.   |
000061d0  20 62 65 67 61 6e 20 61  73 73 65 6d 62 6c 79 2e  | began assembly.|
000061e0  20 20 54 68 65 20 41 73  73 65 6d 62 6c 65 72 20  |  The Assembler |
000061f0  77 69 6c 6c 20 20 74 75  72 6e 20 20 74 68 65 20  |will  turn  the |
00006200  20 73 68 61 64 6f 77 20  20 73 63 72 65 65 6e 20  | shadow  screen |
00006210  20 6f 6e 0d 20 20 20 20  61 75 74 6f 6d 61 74 69  | on.    automati|
00006220  63 61 6c 6c 79 2c 20 20  61 6e 64 20 20 77 69 6c  |cally,  and  wil|
00006230  6c 20 20 61 6c 77 61 79  73 20 20 74 75 72 6e 20  |l  always  turn |
00006240  69 74 20 6f 66 66 20 61  74 20 74 68 65 20 65 6e  |it off at the en|
00006250  64 3a 20 61 73 20 74 68  69 73 0d 0d 0d 20 20 20  |d: as this...   |
00006260  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00006270  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 37  |               7|
00006280  0d 0d 0d 0d 0d 0d 1b 47  20 20 20 20 20 20 20 20  |.......G        |
00006290  20 20 20 20 20 20 20 20  20 20 20 20 20 20 55 53  |              US|
000062a0  49 4e 47 20 54 48 45 20  36 35 43 30 32 20 41 53  |ING THE 65C02 AS|
000062b0  53 45 4d 42 4c 45 52 1b  48 0d 0d 0d 0d 20 20 20  |SEMBLER.H....   |
000062c0  20 72 65 71 75 69 72 65  73 20 61 20 6d 6f 64 65  | requires a mode|
000062d0  20 63 68 61 6e 67 65 20  77 68 69 63 68 20 77 69  | change which wi|
000062e0  6c 6c 20 63 6c 65 61 72  20 74 68 65 20 73 63 72  |ll clear the scr|
000062f0  65 65 6e 2c 20 69 74 20  77 69 6c 6c 20 61 6c 77  |een, it will alw|
00006300  61 79 73 0d 20 20 20 20  70 61 75 73 65 2e 0d 0d  |ays.    pause...|
00006310  0d 1b 2d 01 31 2e 38 20  55 73 65 20 6f 66 20 63  |..-.1.8 Use of c|
00006320  6f 6e 74 72 6f 6c 20 6b  65 79 73 20 64 75 72 69  |ontrol keys duri|
00006330  6e 67 20 61 73 73 65 6d  62 6c 79 1b 2d 00 0d 0d  |ng assembly.-...|
00006340  20 20 20 44 75 72 69 6e  67 20 61 6e 20 61 73 73  |   During an ass|
00006350  65 6d 62 6c 79 20 79 6f  75 20 63 61 6e 20 75 73  |embly you can us|
00006360  65 20 76 61 72 69 6f 75  73 20 63 6f 6e 74 72 6f  |e various contro|
00006370  6c 20 20 6b 65 79 73 20  20 74 6f 20 20 63 68 65  |l  keys  to  che|
00006380  63 6b 20 20 6f 6e 0d 70  72 6f 67 72 65 73 73 20  |ck  on.progress |
00006390  6f 72 20 67 69 76 65 20  63 6f 6d 6d 61 6e 64 73  |or give commands|
000063a0  20 74 6f 20 74 68 65 20  41 73 73 65 6d 62 6c 65  | to the Assemble|
000063b0  72 2e 0d 0d 0d 20 20 2d  20 46 75 6e 63 74 69 6f  |r....  - Functio|
000063c0  6e 20 6b 65 79 73 20 1b  47 66 30 2c 20 66 31 2c  |n keys .Gf0, f1,|
000063d0  20 66 32 1b 48 20 61 6e  64 20 1b 47 66 33 1b 48  | f2.H and .Gf3.H|
000063e0  20 77 69 6c 6c 20 66 6f  72 63 65 20 74 68 65 20  | will force the |
000063f0  41 73 73 65 6d 62 6c 65  72 20 74 6f 20 63 68 61  |Assembler to cha|
00006400  6e 67 65 0d 20 20 20 20  74 68 65 20 20 73 6f 75  |nge.    the  sou|
00006410  72 63 65 20 20 6c 69 73  74 69 6e 67 20 6c 65 76  |rce  listing lev|
00006420  65 6c 20 74 6f 20 30 2c  20 31 2c 20 32 20 6f 72  |el to 0, 1, 2 or|
00006430  20 33 20 72 65 73 70 65  63 74 69 76 65 6c 79 2e  | 3 respectively.|
00006440  20 20 4f 6e 63 65 20 79  6f 75 0d 20 20 20 20 68  |  Once you.    h|
00006450  61 76 65 20 70 72 65 73  73 65 64 20 6f 6e 65 20  |ave pressed one |
00006460  6f 66 20 74 68 65 73 65  20 6b 65 79 73 20 74 68  |of these keys th|
00006470  65 20 6c 65 76 65 6c 20  79 6f 75 20 73 65 74 20  |e level you set |
00006480  20 69 73 20 20 6c 6f 63  6b 65 64 3a 20 20 74 68  | is  locked:  th|
00006490  65 0d 20 20 20 20 41 73  73 65 6d 62 6c 65 72 20  |e.    Assembler |
000064a0  77 69 6c 6c 20 70 72 6f  63 65 73 73 20 4c 53 54  |will process LST|
000064b0  20 64 69 72 65 63 74 69  76 65 73 20 69 6e 20 74  | directives in t|
000064c0  68 65 20 73 6f 75 72 63  65 2c 20 20 62 75 74 20  |he source,  but |
000064d0  77 69 6c 6c 20 6e 6f 74  0d 20 20 20 20 69 6d 70  |will not.    imp|
000064e0  6c 65 6d 65 6e 74 20 74  68 65 6d 2e 20 20 54 68  |lement them.  Th|
000064f0  69 73 20 6c 65 74 73 20  79 6f 75 2c 20 66 6f 72  |is lets you, for|
00006500  20 65 78 61 6d 70 6c 65  2c 20 63 68 61 6e 67 65  | example, change|
00006510  20 74 68 65 20 6c 69 73  74 20 6c 65 76 65 6c 0d  | the list level.|
00006520  20 20 20 20 64 75 72 69  6e 67 20 61 6e 20 61 73  |    during an as|
00006530  73 65 6d 62 6c 79 20 74  6f 20 63 68 65 63 6b 20  |sembly to check |
00006540  6f 6e 20 77 68 61 74 27  73 20 68 61 70 70 65 6e  |on what's happen|
00006550  69 6e 67 2c 20 20 6f 72  20 74 6f 20 73 75 70 70  |ing,  or to supp|
00006560  72 65 73 73 20 61 0d 20  20 20 20 6c 69 73 74 69  |ress a.    listi|
00006570  6e 67 20 20 79 6f 75 20  20 64 65 63 69 64 65 20  |ng  you  decide |
00006580  79 6f 75 20 64 6f 6e 27  74 20 77 61 6e 74 2e 20  |you don't want. |
00006590  20 54 6f 20 63 61 6e 63  65 6c 20 74 68 65 20 6c  | To cancel the l|
000065a0  6f 63 6b 69 6e 67 20 6f  66 20 74 68 65 0d 20 20  |ocking of the.  |
000065b0  20 20 6c 69 73 74 20 6c  65 76 65 6c 20 61 6e 64  |  list level and|
000065c0  20 72 65 74 75 72 6e 20  74 6f 20 20 74 68 61 74  | return to  that|
000065d0  20 20 73 65 74 20 20 62  79 20 20 74 68 65 20 20  |  set  by  the  |
000065e0  6c 61 73 74 20 20 4c 53  54 20 20 64 69 72 65 63  |last  LST  direc|
000065f0  74 69 76 65 0d 20 20 20  20 70 72 6f 63 65 73 73  |tive.    process|
00006600  65 64 2c 20 73 69 6d 70  6c 79 20 70 72 65 73 73  |ed, simply press|
00006610  20 1b 47 43 4f 4e 54 52  4f 4c 2d 4c 1b 48 2e 0d  | .GCONTROL-L.H..|
00006620  0d 20 20 2d 20 1b 47 43  4f 4e 54 52 4f 4c 2d 48  |.  - .GCONTROL-H|
00006630  1b 48 20 20 64 69 73 70  6c 61 79 73 20 20 73 6f  |.H  displays  so|
00006640  6d 65 20 68 65 6c 70 20  69 6e 66 6f 72 6d 61 74  |me help informat|
00006650  69 6f 6e 20 74 6f 20 72  65 6d 69 6e 64 20 79 6f  |ion to remind yo|
00006660  75 20 61 62 6f 75 74 20  74 68 65 0d 20 20 20 20  |u about the.    |
00006670  75 73 65 20 6f 66 20 63  6f 6e 74 72 6f 6c 20 6b  |use of control k|
00006680  65 79 73 2e 20 54 68 65  20 41 73 73 65 6d 62 6c  |eys. The Assembl|
00006690  65 72 20 77 69 6c 6c 20  70 61 75 73 65 20 61 66  |er will pause af|
000066a0  74 65 72 20 64 69 73 70  6c 61 79 69 6e 67 20 74  |ter displaying t|
000066b0  68 65 0d 20 20 20 20 69  6e 66 6f 72 6d 61 74 69  |he.    informati|
000066c0  6f 6e 3a 20 74 6f 20 72  65 73 75 6d 65 20 73 69  |on: to resume si|
000066d0  6d 70 6c 79 20 70 72 65  73 73 20 61 6e 79 20 6b  |mply press any k|
000066e0  65 79 2e 0d 0d 20 20 2d  20 1b 47 43 4f 4e 54 52  |ey...  - .GCONTR|
000066f0  4f 4c 2d 4e 1b 48 20 20  61 6e 64 20 20 1b 47 43  |OL-N.H  and  .GC|
00006700  4f 4e 54 52 4f 4c 2d 4f  1b 48 20 20 74 75 72 6e  |ONTROL-O.H  turn|
00006710  20 74 68 65 20 42 42 43  20 43 6f 6d 70 75 74 65  | the BBC Compute|
00006720  72 27 73 20 70 61 67 65  64 20 73 63 72 6f 6c 6c  |r's paged scroll|
00006730  69 6e 67 0d 20 20 20 20  6d 6f 64 65 20 6f 6e 20  |ing.    mode on |
00006740  61 6e 64 20 6f 66 66 20  20 72 65 73 70 65 63 74  |and off  respect|
00006750  69 76 65 6c 79 2e 20 20  59 6f 75 20 20 63 6f 75  |ively.  You  cou|
00006760  6c 64 20 20 75 73 65 20  20 74 68 65 73 65 20 20  |ld  use  these  |
00006770  6b 65 79 73 2c 20 20 66  6f 72 0d 20 20 20 20 65  |keys,  for.    e|
00006780  78 61 6d 70 6c 65 2c 20  74 6f 20 70 61 75 73 65  |xample, to pause|
00006790  20 61 20 6c 69 73 74 69  6e 67 20 6f 6e 20 74 68  | a listing on th|
000067a0  65 20 73 63 72 65 65 6e  20 61 66 74 65 72 20 65  |e screen after e|
000067b0  76 65 72 79 20 73 63 72  65 65 6e 66 75 6c 20 61  |very screenful a|
000067c0  74 0d 20 20 20 20 73 6f  6d 65 20 70 6f 69 6e 74  |t.    some point|
000067d0  20 64 75 72 69 6e 67 20  61 6e 20 61 73 73 65 6d  | during an assem|
000067e0  62 6c 79 2e 0d 0d 20 20  2d 20 1b 47 43 4f 4e 54  |bly...  - .GCONT|
000067f0  52 4f 4c 2d 50 1b 48 20  20 63 6f 6e 74 72 6f 6c  |ROL-P.H  control|
00006800  73 20 20 77 68 65 74 68  65 72 20 20 74 68 65 20  |s  whether  the |
00006810  20 41 73 73 65 6d 62 6c  65 72 20 20 73 65 6e 64  | Assembler  send|
00006820  73 20 20 6f 75 74 70 75  74 20 20 74 6f 20 20 61  |s  output  to  a|
00006830  0d 20 20 20 20 70 72 69  6e 74 65 72 2e 20 49 66  |.    printer. If|
00006840  20 69 74 20 69 73 20 70  72 69 6e 74 69 6e 67 2c  | it is printing,|
00006850  20 70 72 65 73 73 69 6e  67 20 43 4f 4e 54 52 4f  | pressing CONTRO|
00006860  4c 2d 50 20 77 69 6c 6c  20 73 74 6f 70 20 69 74  |L-P will stop it|
00006870  3a 20 69 66 20 69 74 0d  20 20 20 20 69 73 20 6e  |: if it.    is n|
00006880  6f 74 20 70 72 69 6e 74  69 6e 67 2c 20 20 43 4f  |ot printing,  CO|
00006890  4e 54 52 4f 4c 2d 50 20  77 69 6c 6c 20 73 74 61  |NTROL-P will sta|
000068a0  72 74 20 69 74 20 73 65  6e 64 69 6e 67 20 20 6f  |rt it sending  o|
000068b0  75 74 70 75 74 20 20 74  6f 20 20 74 68 65 0d 20  |utput  to  the. |
000068c0  20 20 20 70 72 69 6e 74  65 72 2e 0d 0d 20 20 20  |   printer...   |
000068d0  20 49 66 20 20 79 6f 75  20 20 68 61 76 65 20 75  | If  you  have u|
000068e0  73 65 64 20 74 68 65 20  2d 46 20 6f 70 74 69 6f  |sed the -F optio|
000068f0  6e 20 74 6f 20 73 65 6e  64 20 6f 75 74 70 75 74  |n to send output|
00006900  20 74 6f 20 61 20 6c 69  73 74 69 6e 67 20 66 69  | to a listing fi|
00006910  6c 65 2c 0d 20 20 20 20  43 4f 4e 54 52 4f 4c 2d  |le,.    CONTROL-|
00006920  50 20 63 61 6e 20 62 65  20 75 73 65 64 20 74 6f  |P can be used to|
00006930  20 73 77 69 74 63 68 20  6f 75 74 70 75 74 20 62  | switch output b|
00006940  65 74 77 65 65 6e 20 74  68 65 20 73 63 72 65 65  |etween the scree|
00006950  6e 20 61 6e 64 20 20 74  68 65 0d 20 20 20 20 66  |n and  the.    f|
00006960  69 6c 65 2c 20 20 62 75  74 20 20 77 69 6c 6c 20  |ile,  but  will |
00006970  20 6e 6f 74 20 61 66 66  65 63 74 20 61 6e 79 20  | not affect any |
00006980  70 72 69 6e 74 65 72 20  79 6f 75 20 6d 61 79 20  |printer you may |
00006990  68 61 76 65 20 63 6f 6e  6e 65 63 74 65 64 20 74  |have connected t|
000069a0  6f 0d 20 20 20 20 79 6f  75 72 20 6d 61 63 68 69  |o.    your machi|
000069b0  6e 65 2e 0d 0d 20 20 2d  20 1b 47 43 4f 4e 54 52  |ne...  - .GCONTR|
000069c0  4f 4c 2d 51 1b 48 20 20  6c 65 74 73 20 79 6f 75  |OL-Q.H  lets you|
000069d0  20 66 69 6e 64 20 6f 75  74 20 77 68 65 72 65 20  | find out where |
000069e0  74 68 65 20 41 73 73 65  6d 62 6c 65 72 20 69 73  |the Assembler is|
000069f0  20 69 6e 20 74 68 65 20  63 75 72 72 65 6e 74 0d  | in the current.|
00006a00  20 20 20 20 66 69 6c 65  2e 20 49 74 20 77 69 6c  |    file. It wil|
00006a10  6c 20 74 65 6c 6c 20 79  6f 75 20 77 68 65 74 68  |l tell you wheth|
00006a20  65 72 20 69 74 20 69 73  20 6f 6e 20 70 61 73 73  |er it is on pass|
00006a30  20 31 20 6f 72 20 32 2c  20 74 68 65 6e 20 67 69  | 1 or 2, then gi|
00006a40  76 65 20 79 6f 75 0d 20  20 20 20 74 68 65 20 6e  |ve you.    the n|
00006a50  75 6d 62 65 72 20 6f 66  20 74 68 65 20 6c 69 6e  |umber of the lin|
00006a60  65 20 69 74 20 69 73 20  61 62 6f 75 74 20 74 6f  |e it is about to|
00006a70  20 70 72 6f 63 65 73 73  2e 20 20 49 66 20 74 68  | process.  If th|
00006a80  65 20 20 6e 75 6d 62 65  72 20 20 69 73 0d 20 20  |e  number  is.  |
00006a90  20 20 66 6f 6c 6c 6f 77  65 64 20 20 62 79 20 20  |  followed  by  |
00006aa0  22 28 4d 29 22 2c 20 20  74 68 65 20 20 73 6f 75  |"(M)",  the  sou|
00006ab0  72 63 65 20 20 6c 69 6e  65 20 20 69 73 20 20 61  |rce  line  is  a|
00006ac0  20 20 6d 61 63 72 6f 20  63 61 6c 6c 20 61 6e 64  |  macro call and|
00006ad0  20 74 68 65 0d 20 20 20  20 41 73 73 65 6d 62 6c  | the.    Assembl|
00006ae0  65 72 20 69 73 20 63 75  72 72 65 6e 74 6c 79 20  |er is currently |
00006af0  65 78 70 61 6e 64 69 6e  67 20 74 68 61 74 20 6d  |expanding that m|
00006b00  61 63 72 6f 2e 0d 0d 20  20 2d 20 1b 47 43 4f 4e  |acro...  - .GCON|
00006b10  54 52 4f 4c 2d 57 1b 48  20 20 72 65 76 65 72 73  |TROL-W.H  revers|
00006b20  65 73 20 74 68 65 20 63  75 72 72 65 6e 74 20 22  |es the current "|
00006b30  77 61 69 74 20 61 66 74  65 72 20 65 72 72 6f 72  |wait after error|
00006b40  22 20 61 63 74 69 6f 6e  20 20 73 65 74 20 20 62  |" action  set  b|
00006b50  79 0d 20 20 20 20 74 68  65 20 63 6f 6d 6d 61 6e  |y.    the comman|
00006b60  64 20 6c 69 6e 65 27 73  20 22 2d 57 22 20 6f 70  |d line's "-W" op|
00006b70  74 69 6f 6e 2e 0d 0d 20  20 2d 20 1b 47 53 50 41  |tion...  - .GSPA|
00006b80  43 45 1b 48 20 20 70 61  75 73 65 73 20 74 68 65  |CE.H  pauses the|
00006b90  20 61 73 73 65 6d 62 6c  79 2e 20 20 59 6f 75 20  | assembly.  You |
00006ba0  63 61 6e 20 75 73 65 20  74 68 69 73 20 74 6f 20  |can use this to |
00006bb0  65 78 61 6d 69 6e 65 20  61 20 6c 69 73 74 69 6e  |examine a listin|
00006bc0  67 0d 20 20 20 20 6f 6e  20 73 63 72 65 65 6e 20  |g.    on screen |
00006bd0  61 74 20 79 6f 75 72 20  6c 65 69 73 75 72 65 2e  |at your leisure.|
00006be0  20 20 54 6f 20 72 65 73  75 6d 65 20 61 73 73 65  |  To resume asse|
00006bf0  6d 62 6c 79 2c 20 20 73  69 6d 70 6c 79 20 70 72  |mbly,  simply pr|
00006c00  65 73 73 20 20 61 6e 79  0d 20 20 20 20 6b 65 79  |ess  any.    key|
00006c10  2e 0d 0d 0d 0d 0d 0d 20  20 20 20 20 20 20 20 20  |.......         |
00006c20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00006c30  20 20 20 20 20 20 20 20  20 38 0d 0d 0d 0d 0d 0d  |         8......|
00006c40  1b 47 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.G              |
00006c50  20 20 20 20 20 20 20 20  55 53 49 4e 47 20 54 48  |        USING TH|
00006c60  45 20 36 35 43 30 32 20  41 53 53 45 4d 42 4c 45  |E 65C02 ASSEMBLE|
00006c70  52 1b 48 0d 0d 0d 0d 1b  2d 01 1b 47 32 2e 20 53  |R.H.....-..G2. S|
00006c80  4f 55 52 43 45 20 50 52  4f 47 52 41 4d 20 46 4f  |OURCE PROGRAM FO|
00006c90  52 4d 41 54 1b 2d 00 1b  48 0d 0d 0d 20 20 20 54  |RMAT.-..H...   T|
00006ca0  68 65 20 41 73 73 65 6d  62 6c 65 72 20 77 69 6c  |he Assembler wil|
00006cb0  6c 20 72 65 61 64 20 73  6f 75 72 63 65 20 66 72  |l read source fr|
00006cc0  6f 6d 20 66 69 6c 65 73  20 70 72 6f 64 75 63 65  |om files produce|
00006cd0  64 20 62 79 20 61 6e 79  20 65 64 69 74 6f 72 20  |d by any editor |
00006ce0  6f 72 0d 77 6f 72 64 20  20 70 72 6f 63 65 73 73  |or.word  process|
00006cf0  6f 72 20 20 70 72 6f 67  72 61 6d 2c 20 20 61 73  |or  program,  as|
00006d00  20 64 65 73 63 72 69 62  65 64 20 69 6e 20 73 65  | described in se|
00006d10  63 74 69 6f 6e 20 31 2e  33 2e 20 20 54 68 65 20  |ction 1.3.  The |
00006d20  73 6f 75 72 63 65 20 69  73 0d 73 65 65 6e 20 61  |source is.seen a|
00006d30  73 20 61 20 6e 75 6d 62  65 72 20 6f 66 20 6c 69  |s a number of li|
00006d40  6e 65 73 2c 20 20 65 61  63 68 20 65 6e 64 69 6e  |nes,  each endin|
00006d50  67 20 77 69 74 68 20 61  20 20 63 61 72 72 69 61  |g with a  carria|
00006d60  67 65 20 20 72 65 74 75  72 6e 20 20 62 79 74 65  |ge  return  byte|
00006d70  0d 28 24 30 44 29 2e 20  20 4c 69 6e 65 20 20 66  |.($0D).  Line  f|
00006d80  65 65 64 20 20 63 68 61  72 61 63 74 65 72 73 20  |eed  characters |
00006d90  20 61 72 65 20 69 67 6e  6f 72 65 64 2c 20 20 61  | are ignored,  a|
00006da0  73 20 61 72 65 20 61 6c  6c 20 6f 74 68 65 72 20  |s are all other |
00006db0  63 6f 6e 74 72 6f 6c 0d  63 68 61 72 61 63 74 65  |control.characte|
00006dc0  72 73 20 61 6e 64 20 20  28 75 6e 6c 65 73 73 20  |rs and  (unless |
00006dd0  79 6f 75 20 68 61 76 65  20 75 73 65 64 20 6f 6e  |you have used on|
00006de0  65 20 6f 66 20 74 68 65  20 63 6f 6e 66 69 67 75  |e of the configu|
00006df0  72 61 74 69 6f 6e 20 6f  70 74 69 6f 6e 73 0d 64  |ration options.d|
00006e00  65 74 61 69 6c 65 64 20  69 6e 20 41 70 70 65 6e  |etailed in Appen|
00006e10  64 69 78 20 35 29 20 61  6e 79 20 77 69 74 68 20  |dix 5) any with |
00006e20  74 68 65 20 6d 6f 73 74  20 73 69 67 6e 69 66 69  |the most signifi|
00006e30  63 61 6e 74 20 62 69 74  20 28 62 69 74 20 37 29  |cant bit (bit 7)|
00006e40  20 73 65 74 2e 0d 54 68  65 20 67 65 6e 65 72 61  | set..The genera|
00006e50  6c 20 66 6f 72 6d 61 74  20 6f 66 20 61 20 6c 69  |l format of a li|
00006e60  6e 65 20 69 73 3a 0d 0d  20 20 20 20 20 20 20 20  |ne is:..        |
00006e70  20 20 20 20 20 20 20 20  20 20 20 6c 61 62 65 6c  |           label|
00006e80  20 20 6f 70 63 6f 64 65  20 20 6f 70 65 72 61 6e  |  opcode  operan|
00006e90  64 20 20 63 6f 6d 6d 65  6e 74 0d 0d 20 20 20 44  |d  comment..   D|
00006ea0  65 70 65 6e 64 69 6e 67  20 6f 6e 20 63 69 72 63  |epending on circ|
00006eb0  75 6d 73 74 61 6e 63 65  73 2c 20 20 74 68 65 20  |umstances,  the |
00006ec0  6c 61 62 65 6c 20 61 6e  64 20 6f 70 65 72 61 6e  |label and operan|
00006ed0  64 20 20 66 69 65 6c 64  73 20 20 6d 61 79 20 20  |d  fields  may  |
00006ee0  62 65 0d 6f 70 74 69 6f  6e 61 6c 20 6f 72 20 6d  |be.optional or m|
00006ef0  61 6e 64 61 74 6f 72 79  3b 20 20 6f 72 20 74 68  |andatory;  or th|
00006f00  65 79 20 6d 61 79 20 6e  65 65 64 20 74 6f 20 62  |ey may need to b|
00006f10  65 20 6f 6d 69 74 74 65  64 2e 20 20 41 6c 6c 20  |e omitted.  All |
00006f20  6c 69 6e 65 73 20 6d 61  79 0d 68 61 76 65 20 61  |lines may.have a|
00006f30  20 63 6f 6d 6d 65 6e 74  20 66 69 65 6c 64 2c 20  | comment field, |
00006f40  77 68 69 63 68 20 69 73  20 62 65 67 75 6e 20 77  |which is begun w|
00006f50  69 74 68 20 61 20 22 3b  22 20 6f 72 20 61 20 22  |ith a ";" or a "|
00006f60  5c 22 20 63 68 61 72 61  63 74 65 72 2e 0d 0d 20  |\" character... |
00006f70  20 20 49 66 20 79 6f 75  20 69 6e 63 6c 75 64 65  |  If you include|
00006f80  20 61 20 6c 61 62 65 6c  20 66 69 65 6c 64 2c 20  | a label field, |
00006f90  20 69 74 20 6d 75 73 74  20 62 65 67 69 6e 20 69  | it must begin i|
00006fa0  6e 20 74 68 65 20 66 69  72 73 74 20 63 68 61 72  |n the first char|
00006fb0  61 63 74 65 72 0d 6f 66  20 20 74 68 65 20 20 6c  |acter.of  the  l|
00006fc0  69 6e 65 2e 20 20 59 6f  75 20 20 6d 61 79 20 20  |ine.  You  may  |
00006fd0  73 65 70 61 72 61 74 65  20 74 68 65 20 66 69 65  |separate the fie|
00006fe0  6c 64 73 20 66 72 6f 6d  20 65 61 63 68 20 6f 74  |lds from each ot|
00006ff0  68 65 72 20 77 69 74 68  20 61 6e 79 0d 6e 75 6d  |her with any.num|
00007000  62 65 72 20 6f 66 20 73  70 61 63 65 73 20 61 6e  |ber of spaces an|
00007010  64 2f 6f 72 20 54 41 42  20 63 68 61 72 61 63 74  |d/or TAB charact|
00007020  65 72 73 2e 20 20 4e 6f  20 6c 69 6e 65 20 6d 61  |ers.  No line ma|
00007030  79 20 65 78 63 65 65 64  20 31 33 32 20 20 62 79  |y exceed 132  by|
00007040  74 65 73 0d 69 6e 20 6c  65 6e 67 74 68 3b 20 61  |tes.in length; a|
00007050  6e 79 20 74 68 61 74 20  64 6f 20 77 69 6c 6c 20  |ny that do will |
00007060  62 65 20 74 72 75 6e 63  61 74 65 64 2e 0d 0d 20  |be truncated... |
00007070  20 20 41 6e 79 20 6c 69  6e 65 20 77 68 6f 73 65  |  Any line whose|
00007080  20 66 69 72 73 74 20 6e  6f 6e 2d 73 70 61 63 65  | first non-space|
00007090  20 63 68 61 72 61 63 74  65 72 20 69 73 20 22 2a  | character is "*|
000070a0  22 2c 20 22 3b 22 2c 20  22 21 22 20 6f 72 20 22  |", ";", "!" or "|
000070b0  5c 22 20 69 73 0d 74 72  65 61 74 65 64 20 61 73  |\" is.treated as|
000070c0  20 63 6f 6d 6d 65 6e 74  2e 20 20 4c 69 6e 65 73  | comment.  Lines|
000070d0  20 62 65 67 69 6e 6e 69  6e 67 20 77 69 74 68 20  | beginning with |
000070e0  22 21 22 20 61 72 65 20  74 72 65 61 74 65 64 20  |"!" are treated |
000070f0  73 70 65 63 69 61 6c 6c  79 20 69 66 0d 74 68 65  |specially if.the|
00007100  79 20 20 6f 63 63 75 72  20 77 69 74 68 69 6e 20  |y  occur within |
00007110  74 68 65 20 64 65 66 69  6e 69 74 69 6f 6e 20 6f  |the definition o|
00007120  66 20 61 20 6d 61 63 72  6f 2c 20 20 61 73 20 65  |f a macro,  as e|
00007130  78 70 6c 61 69 6e 65 64  20 69 6e 20 73 65 63 74  |xplained in sect|
00007140  69 6f 6e 0d 39 2e 36 2e  0d 0d 0d 1b 2d 01 32 2e  |ion.9.6.....-.2.|
00007150  31 20 53 79 6e 74 61 78  20 6f 66 20 74 68 65 20  |1 Syntax of the |
00007160  6c 69 6e 65 1b 2d 00 0d  0d 0d 20 20 20 20 20 1b  |line.-....     .|
00007170  2d 01 32 2e 31 2e 31 20  54 68 65 20 6c 61 62 65  |-.2.1.1 The labe|
00007180  6c 20 66 69 65 6c 64 1b  2d 00 0d 0d 20 20 20 20  |l field.-...    |
00007190  20 41 20 6c 61 62 65 6c  20 63 6f 6e 73 69 73 74  | A label consist|
000071a0  73 20 6f 66 20 61 20 20  73 74 72 69 6e 67 20 20  |s of a  string  |
000071b0  6f 66 20 20 63 68 61 72  61 63 74 65 72 73 2c 20  |of  characters, |
000071c0  20 73 74 61 72 74 69 6e  67 20 20 77 69 74 68 20  | starting  with |
000071d0  20 61 0d 20 20 20 20 20  6c 65 74 74 65 72 2c 20  | a.     letter, |
000071e0  20 61 6e 64 20 63 6f 6e  74 61 69 6e 69 6e 67 20  | and containing |
000071f0  61 6e 79 20 63 6f 6d 62  69 6e 61 74 69 6f 6e 20  |any combination |
00007200  6f 66 20 6c 65 74 74 65  72 73 2c 20 20 6e 75 6d  |of letters,  num|
00007210  62 65 72 73 2c 20 61 6e  64 0d 20 20 20 20 20 74  |bers, and.     t|
00007220  68 65 20 63 68 61 72 61  63 74 65 72 73 20 22 2e  |he characters ".|
00007230  22 2c 20 22 24 22 20 20  61 6e 64 20 20 22 5f 22  |", "$"  and  "_"|
00007240  20 20 28 75 6e 64 65 72  73 63 6f 72 65 29 2e 20  |  (underscore). |
00007250  20 41 6e 79 20 20 6c 6f  77 65 72 2d 63 61 73 65  | Any  lower-case|
00007260  0d 20 20 20 20 20 6c 65  74 74 65 72 73 20 20 61  |.     letters  a|
00007270  72 65 20 20 74 72 61 6e  73 6c 61 74 65 64 20 20  |re  translated  |
00007280  74 6f 20 20 75 70 70 65  72 2d 63 61 73 65 2e 20  |to  upper-case. |
00007290  20 4c 61 62 65 6c 73 20  20 6d 61 79 20 20 62 65  | Labels  may  be|
000072a0  20 6f 66 20 61 6e 79 0d  20 20 20 20 20 6c 65 6e  | of any.     len|
000072b0  67 74 68 2c 20 20 61 6e  64 20 61 6c 6c 20 61 72  |gth,  and all ar|
000072c0  65 20 73 69 67 6e 69 66  69 63 61 6e 74 20 75 6e  |e significant un|
000072d0  6c 65 73 73 20 79 6f 75  20 20 68 61 76 65 20 20  |less you  have  |
000072e0  73 70 65 63 69 66 69 65  64 20 20 74 68 65 0d 20  |specified  the. |
000072f0  20 20 20 20 22 2d 41 22  20 20 6f 70 74 69 6f 6e  |    "-A"  option|
00007300  20 20 69 6e 20 20 74 68  65 20 20 63 6f 6d 6d 61  |  in  the  comma|
00007310  6e 64 20 20 6c 69 6e 65  2c 20 20 77 68 65 6e 20  |nd  line,  when |
00007320  20 6f 6e 6c 79 20 74 68  65 20 66 69 72 73 74 20  | only the first |
00007330  36 20 61 72 65 0d 20 20  20 20 20 73 69 67 6e 69  |6 are.     signi|
00007340  66 69 63 61 6e 74 2e 0d  0d 20 20 20 20 20 41 20  |ficant...     A |
00007350  6c 61 62 65 6c 20 6d 61  79 20 62 65 20 74 65 72  |label may be ter|
00007360  6d 69 6e 61 74 65 64 20  20 77 69 74 68 20 20 61  |minated  with  a|
00007370  20 20 22 3a 22 20 20 63  68 61 72 61 63 74 65 72  |  ":"  character|
00007380  20 20 74 68 61 74 20 20  69 73 20 20 6e 6f 74 0d  |  that  is  not.|
00007390  20 20 20 20 20 63 6f 6e  73 69 64 65 72 65 64 20  |     considered |
000073a0  70 61 72 74 20 6f 66 20  74 68 65 20 6c 61 62 65  |part of the labe|
000073b0  6c 2e 0d 0d 20 20 20 20  20 45 78 61 6d 70 6c 65  |l...     Example|
000073c0  73 20 6f 66 20 76 61 6c  69 64 20 6c 61 62 65 6c  |s of valid label|
000073d0  73 20 61 72 65 3a 0d 0d  20 20 20 20 20 20 20 20  |s are:..        |
000073e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000073f0  20 4f 53 57 52 43 48 0d  20 20 20 20 20 20 20 20  | OSWRCH.        |
00007400  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00007410  20 6f 73 62 79 74 65 0d  20 20 20 20 20 20 20 20  | osbyte.        |
00007420  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00007430  20 50 72 6f 67 72 61 6d  2e 73 74 61 72 74 0d 20  | Program.start. |
00007440  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00007450  20 20 20 20 20 20 20 20  49 54 45 4d 5f 33 33 3a  |        ITEM_33:|
00007460  0d 0d 20 20 20 20 20 41  20 6c 61 62 65 6c 20 6d  |..     A label m|
00007470  61 79 20 62 65 20 77 72  69 74 74 65 6e 20 69 6e  |ay be written in|
00007480  20 61 20 6c 69 6e 65 20  6f 6e 20 69 74 73 20 6f  | a line on its o|
00007490  77 6e 3a 20 20 74 68 65  20 76 61 6c 75 65 20 69  |wn:  the value i|
000074a0  74 20 69 73 20 73 65 74  0d 20 20 20 20 20 74 6f  |t is set.     to|
000074b0  20 77 69 6c 6c 20 62 65  20 74 68 65 20 76 61 6c  | will be the val|
000074c0  75 65 20 6f 66 20 74 68  65 20 63 75 72 72 65 6e  |ue of the curren|
000074d0  74 20 61 64 64 72 65 73  73 2e 0d 0d 0d 0d 20 20  |t address.....  |
000074e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00007500  39 0d 0d 0d 0d 0d 0d 1b  47 20 20 20 20 20 20 20  |9.......G       |
00007510  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 55  |               U|
00007520  53 49 4e 47 20 54 48 45  20 36 35 43 30 32 20 41  |SING THE 65C02 A|
00007530  53 53 45 4d 42 4c 45 52  1b 48 0d 0d 0d 0d 20 20  |SSEMBLER.H....  |
00007540  20 20 20 41 20 20 76 61  72 69 61 6e 74 20 20 6f  |   A  variant  o|
00007550  66 20 20 74 68 65 20 20  6c 61 62 65 6c 20 20 69  |f  the  label  i|
00007560  73 20 74 68 65 20 53 65  71 75 65 6e 63 65 20 53  |s the Sequence S|
00007570  79 6d 62 6f 6c 2c 20 20  64 65 73 63 72 69 62 65  |ymbol,  describe|
00007580  64 20 69 6e 0d 20 20 20  20 20 73 65 63 74 69 6f  |d in.     sectio|
00007590  6e 20 31 30 2e 31 2e 20  20 54 68 69 73 20 68 61  |n 10.1.  This ha|
000075a0  73 20 74 68 65 20 73 61  6d 65 20 66 6f 72 6d 61  |s the same forma|
000075b0  74 20 61 73 20 61 20 6e  6f 72 6d 61 6c 20 20 6c  |t as a normal  l|
000075c0  61 62 65 6c 2c 20 20 77  69 74 68 0d 20 20 20 20  |abel,  with.    |
000075d0  20 74 68 65 20 65 78 63  65 70 74 69 6f 6e 20 74  | the exception t|
000075e0  68 61 74 20 74 68 65 20  66 69 72 73 74 20 63 68  |hat the first ch|
000075f0  61 72 61 63 74 65 72 20  6d 75 73 74 20 62 65 20  |aracter must be |
00007600  61 20 22 25 22 20 63 68  61 72 61 63 74 65 72 2e  |a "%" character.|
00007610  0d 0d 20 20 20 20 20 57  68 65 72 65 20 20 74 68  |..     Where  th|
00007620  65 20 6c 61 62 65 6c 20  69 73 20 61 20 6d 61 63  |e label is a mac|
00007630  72 6f 20 6e 61 6d 65 20  28 69 2e 65 2e 20 69 6e  |ro name (i.e. in|
00007640  20 74 68 65 20 4d 41 43  52 4f 20 64 69 72 65 63  | the MACRO direc|
00007650  74 69 76 65 29 20 69 74  0d 20 20 20 20 20 6d 61  |tive) it.     ma|
00007660  79 20 6e 6f 74 20 65 78  63 65 65 64 20 38 20 63  |y not exceed 8 c|
00007670  68 61 72 61 63 74 65 72  73 20 69 6e 20 6c 65 6e  |haracters in len|
00007680  67 74 68 2e 0d 0d 0d 20  20 20 20 20 1b 2d 01 32  |gth....     .-.2|
00007690  2e 31 2e 32 20 54 68 65  20 6f 70 63 6f 64 65 20  |.1.2 The opcode |
000076a0  66 69 65 6c 64 1b 2d 00  0d 0d 20 20 20 20 20 54  |field.-...     T|
000076b0  68 65 20 6f 70 63 6f 64  65 20 66 69 65 6c 64 2c  |he opcode field,|
000076c0  20 69 66 20 70 72 65 73  65 6e 74 2c 20 69 73 20  | if present, is |
000076d0  73 65 70 61 72 61 74 65  64 20 66 72 6f 6d 20 74  |separated from t|
000076e0  68 65 20 6c 61 62 65 6c  20 62 79 20 20 6f 6e 65  |he label by  one|
000076f0  0d 20 20 20 20 20 6f 72  20 20 6d 6f 72 65 20 73  |.     or  more s|
00007700  70 61 63 65 73 20 6f 72  20 54 41 42 73 2e 20 20  |paces or TABs.  |
00007710  49 66 20 74 68 65 72 65  20 69 73 20 6e 6f 20 6c  |If there is no l|
00007720  61 62 65 6c 2c 20 74 68  65 20 66 69 65 6c 64 20  |abel, the field |
00007730  6d 75 73 74 20 62 65 0d  20 20 20 20 20 70 72 65  |must be.     pre|
00007740  63 65 64 65 64 20 62 79  20 61 74 20 6c 65 61 73  |ceded by at leas|
00007750  74 20 6f 6e 65 20 73 70  61 63 65 20 6f 72 20 54  |t one space or T|
00007760  41 42 2e 0d 0d 20 20 20  20 20 54 68 65 20 6f 70  |AB...     The op|
00007770  63 6f 64 65 20 66 69 65  6c 64 20 63 61 6e 20 63  |code field can c|
00007780  6f 6e 74 61 69 6e 20 20  65 69 74 68 65 72 20 20  |ontain  either  |
00007790  61 20 20 6e 6f 72 6d 61  6c 20 20 6f 70 63 6f 64  |a  normal  opcod|
000077a0  65 20 20 6d 6e 65 6d 6f  6e 69 63 0d 20 20 20 20  |e  mnemonic.    |
000077b0  20 28 73 75 63 68 20 20  61 73 20 20 4c 44 41 29  | (such  as  LDA)|
000077c0  2c 20 20 61 6e 20 20 41  73 73 65 6d 62 6c 65 72  |,  an  Assembler|
000077d0  20 20 64 69 72 65 63 74  69 76 65 20 6f 72 20 70  |  directive or p|
000077e0  73 65 75 64 6f 2d 6f 70  20 20 28 73 75 63 68 20  |seudo-op  (such |
000077f0  61 73 0d 20 20 20 20 20  53 46 43 4f 4e 44 29 2c  |as.     SFCOND),|
00007800  20 6f 72 20 74 68 65 20  6e 61 6d 65 20 6f 66 20  | or the name of |
00007810  61 20 6d 61 63 72 6f 20  74 68 61 74 20 79 6f 75  |a macro that you|
00007820  20 68 61 76 65 20 64 65  66 69 6e 65 64 20 70 72  | have defined pr|
00007830  65 76 69 6f 75 73 6c 79  2e 0d 0d 0d 20 20 20 20  |eviously....    |
00007840  20 1b 2d 01 32 2e 31 2e  33 20 54 68 65 20 6f 70  | .-.2.1.3 The op|
00007850  65 72 61 6e 64 20 66 69  65 6c 64 1b 2d 00 0d 0d  |erand field.-...|
00007860  20 20 20 20 20 46 6f 72  20 73 6f 6d 65 20 6f 70  |     For some op|
00007870  63 6f 64 65 73 20 61 6e  64 20 64 69 72 65 63 74  |codes and direct|
00007880  69 76 65 73 20 61 6e 20  6f 70 65 72 61 6e 64 20  |ives an operand |
00007890  66 69 65 6c 64 20 6d 61  79 20 62 65 20 73 75 70  |field may be sup|
000078a0  70 6c 69 65 64 2e 0d 20  20 20 20 20 54 68 69 73  |plied..     This|
000078b0  20 77 69 6c 6c 20 63 6f  6e 73 69 73 74 20 6f 66  | will consist of|
000078c0  20 6f 6e 65 20 6f 72 20  6d 6f 72 65 20 65 6c 65  | one or more ele|
000078d0  6d 65 6e 74 73 2c 20 20  73 65 70 61 72 61 74 65  |ments,  separate|
000078e0  64 20 20 62 79 20 20 63  6f 6d 6d 61 73 0d 20 20  |d  by  commas.  |
000078f0  20 20 20 61 6e 64 20 20  6f 70 74 69 6f 6e 61 6c  |   and  optional|
00007900  20 20 73 70 61 63 65 73  2e 20 20 45 78 63 65 70  |  spaces.  Excep|
00007910  74 20 20 77 69 74 68 69  6e 20 20 73 74 72 69 6e  |t  within  strin|
00007920  67 73 20 20 64 65 6c 69  6d 69 74 65 64 20 62 79  |gs  delimited by|
00007930  20 74 68 65 0d 20 20 20  20 20 73 69 6e 67 6c 65  | the.     single|
00007940  2d 20 6f 72 20 64 6f 75  62 6c 65 2d 71 75 6f 74  |- or double-quot|
00007950  65 20 63 68 61 72 61 63  74 65 72 73 2c 20 73 70  |e characters, sp|
00007960  61 63 65 73 20 61 72 65  20 6e 6f 74 20 73 69 67  |aces are not sig|
00007970  6e 69 66 69 63 61 6e 74  20 69 6e 0d 20 20 20 20  |nificant in.    |
00007980  20 74 68 65 20 6f 70 65  72 61 6e 64 20 66 69 65  | the operand fie|
00007990  6c 64 2e 20 20 54 68 75  73 20 79 6f 75 20 63 61  |ld.  Thus you ca|
000079a0  6e 20 75 73 65 20 74 68  65 6d 20 74 6f 20 6d 61  |n use them to ma|
000079b0  6b 65 20 63 6f 6d 70 6c  65 78 20 6e 75 6d 65 72  |ke complex numer|
000079c0  69 63 0d 20 20 20 20 20  65 78 70 72 65 73 73 69  |ic.     expressi|
000079d0  6f 6e 73 20 6d 6f 72 65  20 72 65 61 64 61 62 6c  |ons more readabl|
000079e0  65 3a 20 66 6f 72 20 65  78 61 6d 70 6c 65 20 79  |e: for example y|
000079f0  6f 75 20 63 6f 75 6c 64  20 77 72 69 74 65 0d 0d  |ou could write..|
00007a00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00007a10  20 20 20 20 4c 44 41 20  20 20 54 41 42 4c 45 2b  |    LDA   TABLE+|
00007a20  28 31 2b 46 52 45 44 2f  33 2a 28 42 45 52 54 2b  |(1+FRED/3*(BERT+|
00007a30  24 31 45 29 29 0d 0d 20  20 20 20 20 61 73 0d 0d  |$1E))..     as..|
00007a40  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00007a50  20 20 20 20 4c 44 41 20  20 20 54 41 42 4c 45 20  |    LDA   TABLE |
00007a60  2b 20 28 31 20 2b 20 46  52 45 44 2f 33 20 2a 20  |+ (1 + FRED/3 * |
00007a70  28 42 45 52 54 20 2b 20  24 31 45 29 20 29 0d 0d  |(BERT + $1E) )..|
00007a80  20 20 20 20 20 69 66 20  79 6f 75 20 77 69 73 68  |     if you wish|
00007a90  65 64 2e 0d 0d 0d 20 20  20 20 20 1b 2d 01 32 2e  |ed....     .-.2.|
00007aa0  31 2e 34 20 54 68 65 20  63 6f 6d 6d 65 6e 74 20  |1.4 The comment |
00007ab0  66 69 65 6c 64 1b 2d 00  0d 0d 20 20 20 20 20 54  |field.-...     T|
00007ac0  68 65 20 63 6f 6d 6d 65  6e 74 20 66 69 65 6c 64  |he comment field|
00007ad0  20 63 61 6e 20 62 65 20  75 73 65 64 20 74 6f 20  | can be used to |
00007ae0  61 6e 6e 6f 74 61 74 65  20 74 68 65 20 6c 69 6e  |annotate the lin|
00007af0  65 2e 20 20 49 74 20 69  73 20 20 62 65 67 75 6e  |e.  It is  begun|
00007b00  0d 20 20 20 20 20 77 69  74 68 20 20 61 20 20 22  |.     with  a  "|
00007b10  3b 22 20 20 6f 72 20 20  61 20 20 22 5c 22 20 20  |;"  or  a  "\"  |
00007b20  63 68 61 72 61 63 74 65  72 3a 20 20 61 6e 79 74  |character:  anyt|
00007b30  68 69 6e 67 20 20 66 6f  6c 6c 6f 77 69 6e 67 20  |hing  following |
00007b40  20 69 73 20 6e 6f 74 0d  20 20 20 20 20 70 72 6f  | is not.     pro|
00007b50  63 65 73 73 65 64 20 62  79 20 74 68 65 20 41 73  |cessed by the As|
00007b60  73 65 6d 62 6c 65 72 2e  0d 0d 0d 1b 2d 01 32 2e  |sembler.....-.2.|
00007b70  32 20 54 68 65 20 73 79  6e 74 61 78 20 6f 66 20  |2 The syntax of |
00007b80  65 78 70 72 65 73 73 69  6f 6e 73 1b 2d 00 0d 0d  |expressions.-...|
00007b90  20 20 20 54 68 72 6f 75  67 68 6f 75 74 20 74 68  |   Throughout th|
00007ba0  69 73 20 67 75 69 64 65  20 79 6f 75 20 77 69 6c  |is guide you wil|
00007bb0  6c 20 73 65 65 20 72 65  66 65 72 65 6e 63 65 73  |l see references|
00007bc0  20 74 6f 20 22 65 78 70  72 65 73 73 69 6f 6e 73  | to "expressions|
00007bd0  22 2c 20 66 6f 72 0d 65  78 61 6d 70 6c 65 20 69  |", for.example i|
00007be0  6e 20 74 68 65 20 64 65  66 69 6e 69 74 69 6f 6e  |n the definition|
00007bf0  73 20 6f 66 20 64 69 72  65 63 74 69 76 65 73 2e  |s of directives.|
00007c00  20 20 54 68 65 20 73 79  6e 74 61 78 20 6f 66 20  |  The syntax of |
00007c10  74 68 65 73 65 20 20 69  73 20 20 61 73 0d 66 6f  |these  is  as.fo|
00007c20  6c 6c 6f 77 73 3a 0d 0d  0d 20 20 20 20 20 1b 2d  |llows:...     .-|
00007c30  01 32 2e 32 2e 31 20 4e  75 6d 65 72 69 63 20 65  |.2.2.1 Numeric e|
00007c40  78 70 72 65 73 73 69 6f  6e 73 1b 2d 00 0d 0d 20  |xpressions.-... |
00007c50  20 20 20 20 54 68 65 73  65 20 20 61 72 65 20 20  |    These  are  |
00007c60  69 6e 64 69 63 61 74 65  64 20 69 6e 20 64 65 66  |indicated in def|
00007c70  69 6e 69 74 69 6f 6e 73  20 61 73 20 22 3c 65 78  |initions as "<ex|
00007c80  70 72 3e 22 2c 20 20 61  6e 64 20 63 6f 6e 73 69  |pr>",  and consi|
00007c90  73 74 20 6f 66 0d 0d 0d  20 20 20 20 20 20 20 20  |st of...        |
00007ca0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00007cb0  20 20 20 20 20 20 20 20  20 31 30 0d 0d 0d 0d 0d  |         10.....|
00007cc0  0d 1b 47 20 20 20 20 20  20 20 20 20 20 20 20 20  |..G             |
00007cd0  20 20 20 20 20 20 20 20  20 55 53 49 4e 47 20 54  |         USING T|
00007ce0  48 45 20 36 35 43 30 32  20 41 53 53 45 4d 42 4c  |HE 65C02 ASSEMBL|
00007cf0  45 52 1b 48 0d 0d 0d 0d  20 20 20 20 20 74 65 72  |ER.H....     ter|
00007d00  6d 73 20 73 65 70 61 72  61 74 65 64 20 62 79 20  |ms separated by |
00007d10  61 72 69 74 68 6d 65 74  69 63 20 6f 70 65 72 61  |arithmetic opera|
00007d20  74 6f 72 73 2e 20 20 46  6f 72 20 20 65 78 61 6d  |tors.  For  exam|
00007d30  70 6c 65 2c 20 20 61 20  20 76 61 6c 69 64 0d 20  |ple,  a  valid. |
00007d40  20 20 20 20 65 78 70 72  65 73 73 69 6f 6e 20 6d  |    expression m|
00007d50  69 67 68 74 20 62 65 0d  0d 20 20 20 20 20 20 20  |ight be..       |
00007d60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00007d70  20 20 20 20 20 46 52 45  44 2a 28 32 2b 42 45 52  |     FRED*(2+BER|
00007d80  54 29 0d 0d 20 20 20 20  20 54 68 65 20 20 41 73  |T)..     The  As|
00007d90  73 65 6d 62 6c 65 72 20  70 65 72 66 6f 72 6d 73  |sembler performs|
00007da0  20 61 6c 6c 20 63 61 6c  63 75 6c 61 74 69 6f 6e  | all calculation|
00007db0  73 20 75 73 69 6e 67 20  31 36 2d 62 69 74 20 61  |s using 16-bit a|
00007dc0  72 69 74 68 6d 65 74 69  63 2e 0d 20 20 20 20 20  |rithmetic..     |
00007dd0  41 6e 79 20 20 72 65 73  75 6c 74 73 20 20 6f 72  |Any  results  or|
00007de0  20 20 69 6e 74 65 72 6d  65 64 69 61 74 65 20 20  |  intermediate  |
00007df0  76 61 6c 75 65 73 20 20  74 68 61 74 20 20 6f 76  |values  that  ov|
00007e00  65 72 66 6c 6f 77 20 20  77 69 6c 6c 20 20 20 62  |erflow  will   b|
00007e10  65 0d 20 20 20 20 20 74  72 75 6e 63 61 74 65 64  |e.     truncated|
00007e20  2c 20 61 6e 64 20 6e 6f  20 77 61 72 6e 69 6e 67  |, and no warning|
00007e30  20 77 69 6c 6c 20 62 65  20 67 69 76 65 6e 2e 0d  | will be given..|
00007e40  0d 20 20 20 20 20 54 68  65 20 20 76 61 72 69 6f  |.     The  vario|
00007e50  75 73 20 65 6c 65 6d 65  6e 74 73 20 74 68 61 74  |us elements that|
00007e60  20 79 6f 75 20 63 61 6e  20 75 73 65 20 69 6e 20  | you can use in |
00007e70  6e 75 6d 65 72 69 63 20  65 78 70 72 65 73 73 69  |numeric expressi|
00007e80  6f 6e 73 20 61 72 65 0d  20 20 20 20 20 74 68 65  |ons are.     the|
00007e90  73 65 3a 0d 0d 20 20 20  20 20 61 2e 20 53 79 6d  |se:..     a. Sym|
00007ea0  62 6f 6c 73 0d 0d 20 20  20 20 20 20 20 20 54 68  |bols..        Th|
00007eb0  65 73 65 20 61 72 65 20  74 68 65 20 6c 61 62 65  |ese are the labe|
00007ec0  6c 73 20 74 68 61 74 20  79 6f 75 20 64 65 66 69  |ls that you defi|
00007ed0  6e 65 20 69 6e 20 74 68  65 20 20 6c 61 62 65 6c  |ne in the  label|
00007ee0  20 20 66 69 65 6c 64 73  20 20 6f 66 0d 20 20 20  |  fields  of.   |
00007ef0  20 20 20 20 20 6c 69 6e  65 73 2c 20 20 20 61 6e  |     lines,   an|
00007f00  64 20 20 69 6e 20 20 74  68 65 20 20 65 76 61 6c  |d  in  the  eval|
00007f10  75 61 74 69 6f 6e 20 20  6f 66 20 20 74 68 65 20  |uation  of  the |
00007f20  65 78 70 72 65 73 73 69  6f 6e 20 74 68 65 79 20  |expression they |
00007f30  61 72 65 0d 20 20 20 20  20 20 20 20 72 65 70 6c  |are.        repl|
00007f40  61 63 65 64 20 62 79 20  74 68 65 20 76 61 6c 75  |aced by the valu|
00007f50  65 20 6f 66 20 74 68 65  20 6c 61 62 65 6c 2e 0d  |e of the label..|
00007f60  0d 20 20 20 20 20 62 2e  20 44 65 63 69 6d 61 6c  |.     b. Decimal|
00007f70  20 63 6f 6e 73 74 61 6e  74 73 0d 0d 20 20 20 20  | constants..    |
00007f80  20 20 20 20 54 68 65 73  65 20 61 72 65 20 6e 75  |    These are nu|
00007f90  6d 62 65 72 73 2c 20 63  6f 6d 70 6f 73 65 64 20  |mbers, composed |
00007fa0  6f 66 20 74 68 65 20 63  68 61 72 61 63 74 65 72  |of the character|
00007fb0  73 20 27 30 27 2e 2e 27  39 27 2e 0d 0d 20 20 20  |s '0'..'9'...   |
00007fc0  20 20 20 20 20 46 6f 72  20 65 78 61 6d 70 6c 65  |     For example|
00007fd0  2c 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |,.              |
00007fe0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00007ff0  20 20 20 31 32 33 0d 0d  20 20 20 20 20 63 2e 20  |   123..     c. |
00008000  48 65 78 61 64 65 63 69  6d 61 6c 20 63 6f 6e 73  |Hexadecimal cons|
00008010  74 61 6e 74 73 0d 0d 20  20 20 20 20 20 20 20 54  |tants..        T|
00008020  68 65 73 65 20 61 72 65  20 6e 75 6d 62 65 72 73  |hese are numbers|
00008030  2c 20 63 6f 6d 70 6f 73  65 64 20 6f 66 20 68 65  |, composed of he|
00008040  78 61 64 65 63 69 6d 61  6c 20 64 69 67 69 74 73  |xadecimal digits|
00008050  20 27 30 27 2e 2e 27 39  27 20 61 6e 64 0d 20 20  | '0'..'9' and.  |
00008060  20 20 20 20 20 20 27 41  27 2e 2e 27 46 27 2c 20  |      'A'..'F', |
00008070  70 72 65 63 65 64 65 64  20 62 79 20 61 20 22 24  |preceded by a "$|
00008080  22 20 6f 72 20 61 20 22  26 22 20 63 68 61 72 61  |" or a "&" chara|
00008090  63 74 65 72 2e 0d 0d 20  20 20 20 20 20 20 20 46  |cter...        F|
000080a0  6f 72 20 65 78 61 6d 70  6c 65 2c 0d 20 20 20 20  |or example,.    |
000080b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000080c0  20 20 20 20 20 20 20 20  20 20 20 20 24 41 46 33  |            $AF3|
000080d0  34 0d 0d 20 20 20 20 20  64 2e 20 42 69 6e 61 72  |4..     d. Binar|
000080e0  79 20 63 6f 6e 73 74 61  6e 74 73 0d 0d 20 20 20  |y constants..   |
000080f0  20 20 20 20 20 54 68 65  73 65 20 61 72 65 20 6e  |     These are n|
00008100  75 6d 62 65 72 73 20 63  6f 6d 70 6f 73 65 64 20  |umbers composed |
00008110  20 6f 66 20 20 62 69 6e  61 72 79 20 20 64 69 67  | of  binary  dig|
00008120  69 74 73 20 20 27 30 27  20 20 61 6e 64 20 20 27  |its  '0'  and  '|
00008130  31 27 2c 0d 20 20 20 20  20 20 20 20 70 72 65 63  |1',.        prec|
00008140  65 64 65 64 20 62 79 20  61 20 22 25 22 20 63 68  |eded by a "%" ch|
00008150  61 72 61 63 74 65 72 2e  0d 0d 20 20 20 20 20 20  |aracter...      |
00008160  20 20 46 6f 72 20 65 78  61 6d 70 6c 65 2c 0d 20  |  For example,. |
00008170  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00008180  20 20 20 20 20 20 20 20  20 20 20 20 20 25 31 30  |             %10|
00008190  31 30 30 31 31 31 0d 0d  20 20 20 20 20 65 2e 20  |100111..     e. |
000081a0  43 68 61 72 61 63 74 65  72 20 63 6f 6e 73 74 61  |Character consta|
000081b0  6e 74 73 0d 0d 20 20 20  20 20 20 20 20 54 68 65  |nts..        The|
000081c0  73 65 20 20 61 72 65 20  73 69 6e 67 6c 65 20 63  |se  are single c|
000081d0  68 61 72 61 63 74 65 72  73 2c 20 20 65 6e 63 6c  |haracters,  encl|
000081e0  6f 73 65 64 20 69 6e 20  73 69 6e 67 6c 65 20 71  |osed in single q|
000081f0  75 6f 74 65 73 2e 20 20  54 68 65 0d 20 20 20 20  |uotes.  The.    |
00008200  20 20 20 20 41 73 73 65  6d 62 6c 65 72 20 77 69  |    Assembler wi|
00008210  6c 6c 20 75 73 65 20 74  68 65 20 41 53 43 49 49  |ll use the ASCII|
00008220  20 63 6f 64 65 20 6f 66  20 74 68 65 20 70 61 72  | code of the par|
00008230  74 69 63 75 6c 61 72 20  63 68 61 72 61 63 74 65  |ticular characte|
00008240  72 2e 0d 20 20 20 20 20  20 20 20 4e 6f 74 65 20  |r..        Note |
00008250  74 68 61 74 20 79 6f 75  20 1b 2d 01 6d 75 73 74  |that you .-.must|
00008260  1b 2d 00 20 61 6c 77 61  79 73 20 69 6e 63 6c 75  |.-. always inclu|
00008270  64 65 20 74 68 65 20 66  69 6e 61 6c 20 71 75 6f  |de the final quo|
00008280  74 65 20 63 68 61 72 61  63 74 65 72 2e 0d 0d 20  |te character... |
00008290  20 20 20 20 20 20 20 46  6f 72 20 65 78 61 6d 70  |       For examp|
000082a0  6c 65 2c 0d 20 20 20 20  20 20 20 20 20 20 20 20  |le,.            |
000082b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000082c0  20 20 20 20 20 27 58 27  0d 0d 20 20 20 20 20 20  |     'X'..      |
000082d0  20 20 59 6f 75 20 63 61  6e 20 73 70 65 63 69 66  |  You can specif|
000082e0  79 20 74 68 61 74 20 61  20 63 68 61 72 61 63 74  |y that a charact|
000082f0  65 72 20 76 61 6c 75 65  20 69 73 20 74 6f 20 62  |er value is to b|
00008300  65 20 75 73 65 64 20 77  69 74 68 20 20 62 69 74  |e used with  bit|
00008310  0d 20 20 20 20 20 20 20  20 37 20 73 65 74 20 62  |.        7 set b|
00008320  79 20 70 72 65 63 65 64  69 6e 67 20 74 68 65 20  |y preceding the |
00008330  63 68 61 72 61 63 74 65  72 20 77 69 74 68 20 61  |character with a|
00008340  20 22 5e 22 2c 20 61 6e  64 20 63 61 6e 20 73 70  | "^", and can sp|
00008350  65 63 69 66 79 20 61 0d  20 20 20 20 20 20 20 20  |ecify a.        |
00008360  63 6f 6e 74 72 6f 6c 20  20 63 68 61 72 61 63 74  |control  charact|
00008370  65 72 20 20 62 79 20 70  72 65 63 65 64 69 6e 67  |er  by preceding|
00008380  20 69 74 20 77 69 74 68  20 61 20 22 7c 22 2e 20  | it with a "|". |
00008390  20 54 68 75 73 20 74 68  65 20 63 6f 64 65 0d 20  | Thus the code. |
000083a0  20 20 20 20 20 20 20 66  6f 72 20 61 6e 20 22 41  |       for an "A|
000083b0  22 20 77 69 74 68 20 62  69 74 20 37 20 73 65 74  |" with bit 7 set|
000083c0  20 69 73 20 72 65 70 72  65 73 65 6e 74 65 64 20  | is represented |
000083d0  61 73 20 27 5e 41 27 20  61 6e 64 20 74 68 61 74  |as '^A' and that|
000083e0  20 20 66 6f 72 0d 0d 0d  20 20 20 20 20 20 20 20  |  for...        |
000083f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00008400  20 20 20 20 20 20 20 20  20 31 31 0d 0d 0d 0d 0d  |         11.....|
00008410  0d 1b 47 20 20 20 20 20  20 20 20 20 20 20 20 20  |..G             |
00008420  20 20 20 20 20 20 20 20  20 55 53 49 4e 47 20 54  |         USING T|
00008430  48 45 20 36 35 43 30 32  20 41 53 53 45 4d 42 4c  |HE 65C02 ASSEMBL|
00008440  45 52 1b 48 0d 0d 0d 0d  20 20 20 20 20 20 20 20  |ER.H....        |
00008450  43 4f 4e 54 52 4f 4c 2d  41 20 20 61 73 20 20 27  |CONTROL-A  as  '|
00008460  7c 41 27 2e 20 20 53 69  6e 63 65 20 74 68 65 20  ||A'.  Since the |
00008470  22 7c 22 20 63 68 61 72  61 63 74 65 72 20 61 63  |"|" character ac|
00008480  74 75 61 6c 6c 79 20 69  6e 76 65 72 74 73 0d 20  |tually inverts. |
00008490  20 20 20 20 20 20 20 62  69 74 20 36 20 6f 66 20  |       bit 6 of |
000084a0  74 68 65 20 63 68 61 72  61 63 74 65 72 20 74 68  |the character th|
000084b0  61 74 20 66 6f 6c 6c 6f  77 73 2c 20 20 79 6f 75  |at follows,  you|
000084c0  20 63 61 6e 20 6f 62 74  61 69 6e 20 74 68 65 20  | can obtain the |
000084d0  20 63 6f 64 65 0d 20 20  20 20 20 20 20 20 66 6f  | code.        fo|
000084e0  72 20 22 44 45 4c 22 20  28 68 65 78 61 64 65 63  |r "DEL" (hexadec|
000084f0  69 6d 61 6c 20 63 6f 64  65 20 37 46 29 20 62 79  |imal code 7F) by|
00008500  20 77 72 69 74 69 6e 67  20 27 7c 3f 27 2e 0d 0d  | writing '|?'...|
00008510  20 20 20 20 20 20 20 20  54 68 65 20 20 63 68 61  |        The  cha|
00008520  72 61 63 74 65 72 20 20  63 6f 64 65 73 20 20 66  |racter  codes  f|
00008530  6f 72 20 22 5e 22 20 61  6e 64 20 22 7c 22 20 61  |or "^" and "|" a|
00008540  72 65 20 6f 62 74 61 69  6e 65 64 20 62 79 20 77  |re obtained by w|
00008550  72 69 74 69 6e 67 0d 20  20 20 20 20 20 20 20 74  |riting.        t|
00008560  68 65 20 63 68 61 72 61  63 74 65 72 73 20 74 77  |he characters tw|
00008570  69 63 65 20 28 69 2e 65  2e 20 61 73 20 27 5e 5e  |ice (i.e. as '^^|
00008580  27 20 61 6e 64 20 27 7c  7c 27 29 2e 0d 0d 20 20  |' and '||')...  |
00008590  20 20 20 20 20 20 54 68  65 20 41 73 73 65 6d 62  |      The Assemb|
000085a0  6c 65 72 20 64 6f 65 73  20 6e 6f 74 20 62 79 20  |ler does not by |
000085b0  64 65 66 61 75 6c 74 20  67 69 76 65 20 79 6f 75  |default give you|
000085c0  20 61 20 6d 65 61 6e 73  20 74 6f 20 20 73 70 65  | a means to  spe|
000085d0  63 69 66 79 0d 20 20 20  20 20 20 20 20 74 68 61  |cify.        tha|
000085e0  74 20 20 61 20 20 63 68  61 72 61 63 74 65 72 20  |t  a  character |
000085f0  20 76 61 6c 75 65 20 69  73 20 74 6f 20 62 65 20  | value is to be |
00008600  75 73 65 64 20 61 73 20  61 20 63 6f 6e 74 72 6f  |used as a contro|
00008610  6c 20 63 68 61 72 61 63  74 65 72 0d 20 20 20 20  |l character.    |
00008620  20 20 20 20 61 6e 64 20  1b 2d 01 61 6c 73 6f 1b  |    and .-.also.|
00008630  2d 00 20 77 69 74 68 20  62 69 74 20 37 20 73 65  |-. with bit 7 se|
00008640  74 2e 20 20 59 6f 75 20  6d 61 79 20 20 66 69 6e  |t.  You may  fin|
00008650  64 20 20 74 68 61 74 20  20 74 68 69 73 20 20 77  |d  that  this  w|
00008660  6f 75 6c 64 20 20 62 65  0d 20 20 20 20 20 20 20  |ould  be.       |
00008670  20 75 73 65 66 75 6c 20  20 28 69 66 20 20 66 6f  | useful  (if  fo|
00008680  72 20 20 65 78 61 6d 70  6c 65 20 79 6f 75 20 77  |r  example you w|
00008690  69 73 68 65 64 20 74 6f  20 70 6c 61 6e 74 20 54  |ished to plant T|
000086a0  65 6c 65 74 65 78 74 20  63 6f 6e 74 72 6f 6c 0d  |eletext control.|
000086b0  20 20 20 20 20 20 20 20  63 6f 64 65 73 20 73 75  |        codes su|
000086c0  63 68 20 61 73 20 24 38  31 20 69 6e 20 20 61 20  |ch as $81 in  a |
000086d0  20 73 74 72 69 6e 67 29  2c 20 20 73 6f 20 20 74  | string),  so  t|
000086e0  68 65 20 20 41 73 73 65  6d 62 6c 65 72 20 20 63  |he  Assembler  c|
000086f0  61 6e 20 20 62 65 0d 20  20 20 20 20 20 20 20 63  |an  be.        c|
00008700  6f 6e 66 69 67 75 72 65  64 20 20 74 6f 20 20 70  |onfigured  to  p|
00008710  65 72 6d 69 74 20 20 74  68 69 73 20 20 74 6f 20  |ermit  this  to |
00008720  20 62 65 20 64 6f 6e 65  2e 20 20 4f 6e 65 20 6f  | be done.  One o|
00008730  66 20 74 68 65 20 6f 70  74 69 6f 6e 73 0d 20 20  |f the options.  |
00008740  20 20 20 20 20 20 64 65  73 63 72 69 62 65 64 20  |      described |
00008750  69 6e 20 41 70 70 65 6e  64 69 78 20 35 20 6c 65  |in Appendix 5 le|
00008760  74 73 20 79 6f 75 20 73  65 74 20 75 70 20 74 68  |ts you set up th|
00008770  65 20 41 73 73 65 6d 62  6c 65 72 20 73 6f 20 20  |e Assembler so  |
00008780  74 68 61 74 0d 20 20 20  20 20 20 20 20 74 68 65  |that.        the|
00008790  20 20 22 7e 22 20 20 63  68 61 72 61 63 74 65 72  |  "~"  character|
000087a0  20 20 28 77 68 69 63 68  20 20 61 70 70 65 61 72  |  (which  appear|
000087b0  73 20 6f 6e 20 61 20 54  65 6c 65 74 65 78 74 20  |s on a Teletext |
000087c0  73 63 72 65 65 6e 20 61  73 20 61 0d 20 20 20 20  |screen as a.    |
000087d0  20 20 20 20 22 64 69 76  69 64 65 22 20 73 69 67  |    "divide" sig|
000087e0  6e 29 20 63 61 75 73 65  73 20 74 68 65 20 6e 65  |n) causes the ne|
000087f0  78 74 20 63 68 61 72 61  63 74 65 72 20 74 6f 20  |xt character to |
00008800  20 62 65 20 20 6f 75 74  70 75 74 20 20 61 73 20  | be  output  as |
00008810  20 61 0d 20 20 20 20 20  20 20 20 63 6f 6e 74 72  | a.        contr|
00008820  6f 6c 20 63 68 61 72 61  63 74 65 72 20 77 69 74  |ol character wit|
00008830  68 20 62 69 74 20 37 20  73 65 74 2e 20 54 68 75  |h bit 7 set. Thu|
00008840  73 2c 20 74 6f 20 6f 62  74 61 69 6e 20 74 68 65  |s, to obtain the|
00008850  20 68 65 78 20 63 6f 64  65 0d 20 20 20 20 20 20  | hex code.      |
00008860  20 20 24 38 31 2c 20 20  79 6f 75 20 77 6f 75 6c  |  $81,  you woul|
00008870  64 20 77 72 69 74 65 20  27 7e 41 27 2e 20 20 4e  |d write '~A'.  N|
00008880  61 74 75 72 61 6c 6c 79  2c 20 6f 6e 63 65 20 79  |aturally, once y|
00008890  6f 75 20 68 61 76 65 20  73 65 6c 65 63 74 65 64  |ou have selected|
000088a0  0d 20 20 20 20 20 20 20  20 74 68 69 73 20 6f 70  |.        this op|
000088b0  74 69 6f 6e 2c 20 79 6f  75 20 77 69 6c 6c 20 6e  |tion, you will n|
000088c0  65 65 64 20 74 6f 20 64  6f 75 62 6c 65 20 74 68  |eed to double th|
000088d0  65 20 22 7e 22 20 63 68  61 72 61 63 74 65 72 20  |e "~" character |
000088e0  61 73 20 77 65 6c 6c 0d  20 20 20 20 20 20 20 20  |as well.        |
000088f0  61 73 20 74 68 65 20 6f  74 68 65 72 20 74 77 6f  |as the other two|
00008900  20 73 70 65 63 69 61 6c  20 63 68 61 72 61 63 74  | special charact|
00008910  65 72 73 20 20 73 68 6f  75 6c 64 20 20 79 6f 75  |ers  should  you|
00008920  20 20 77 69 73 68 20 20  69 74 20 20 74 6f 0d 20  |  wish  it  to. |
00008930  20 20 20 20 20 20 20 61  70 70 65 61 72 20 69 74  |       appear it|
00008940  73 65 6c 66 20 69 6e 20  61 20 73 74 72 69 6e 67  |self in a string|
00008950  2e 0d 0d 0d 20 20 20 20  20 66 2e 20 4f 70 65 72  |....     f. Oper|
00008960  61 74 6f 72 73 0d 0d 20  20 20 20 20 20 20 20 41  |ators..        A|
00008970  20 20 6e 75 6d 62 65 72  20 20 6f 66 20 61 72 69  |  number  of ari|
00008980  74 68 6d 65 74 69 63 20  6f 70 65 72 61 74 6f 72  |thmetic operator|
00008990  73 20 63 61 6e 20 62 65  20 75 73 65 64 20 69 6e  |s can be used in|
000089a0  20 65 78 70 72 65 73 73  69 6f 6e 73 2e 0d 20 20  | expressions..  |
000089b0  20 20 20 20 20 20 54 68  65 79 20 61 72 65 20 64  |      They are d|
000089c0  69 76 69 64 65 64 20 69  6e 74 6f 20 67 72 6f 75  |ivided into grou|
000089d0  70 73 20 6f 66 20 76 61  72 79 69 6e 67 20 20 70  |ps of varying  p|
000089e0  72 69 6f 72 69 74 79 2c  20 20 77 68 69 63 68 2c  |riority,  which,|
000089f0  20 20 69 6e 0d 20 20 20  20 20 20 20 20 64 65 63  |  in.        dec|
00008a00  72 65 61 73 69 6e 67 20  6f 72 64 65 72 20 61 72  |reasing order ar|
00008a10  65 3a 0d 0d 20 20 20 20  20 20 20 20 20 20 20 20  |e:..            |
00008a20  20 20 20 20 20 20 20 20  28 29 20 50 61 72 65 6e  |        () Paren|
00008a30  74 68 65 73 65 73 0d 0d  20 20 20 20 20 20 20 20  |theses..        |
00008a40  20 20 20 20 20 20 20 20  20 20 20 20 2d 20 20 55  |            -  U|
00008a50  6e 61 72 79 20 6d 69 6e  75 73 0d 20 20 20 20 20  |nary minus.     |
00008a60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 7e  |               ~|
00008a70  20 20 55 6e 61 72 79 20  31 27 73 20 63 6f 6d 70  |  Unary 1's comp|
00008a80  6c 65 6d 65 6e 74 20 28  4e 4f 54 29 0d 0d 20 20  |lement (NOT)..  |
00008a90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00008aa0  20 20 26 20 20 42 69 74  77 69 73 65 20 41 4e 44  |  &  Bitwise AND|
00008ab0  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00008ac0  20 20 20 20 20 21 20 20  42 69 74 77 69 73 65 20  |     !  Bitwise |
00008ad0  4f 52 0d 0d 20 20 20 20  20 20 20 20 20 20 20 20  |OR..            |
00008ae0  20 20 20 20 20 20 20 20  3d 20 20 45 71 75 61 6c  |        =  Equal|
00008af0  69 74 79 0d 20 20 20 20  20 20 20 20 20 20 20 20  |ity.            |
00008b00  20 20 20 20 20 20 20 20  23 20 20 49 6e 65 71 75  |        #  Inequ|
00008b10  61 6c 69 74 79 0d 20 20  20 20 20 20 20 20 20 20  |ality.          |
00008b20  20 20 20 20 20 20 20 20  20 20 3e 20 20 47 72 65  |          >  Gre|
00008b30  61 74 65 72 20 74 68 61  6e 0d 20 20 20 20 20 20  |ater than.      |
00008b40  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3c 20  |              < |
00008b50  20 4c 65 73 73 20 74 68  61 6e 0d 0d 20 20 20 20  | Less than..    |
00008b60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00008b70  2a 20 20 4d 75 6c 74 69  70 6c 69 63 61 74 69 6f  |*  Multiplicatio|
00008b80  6e 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |n.              |
00008b90  20 20 20 20 20 20 2f 20  20 49 6e 74 65 67 65 72  |      /  Integer|
00008ba0  20 64 69 76 69 73 69 6f  6e 0d 0d 20 20 20 20 20  | division..     |
00008bb0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 2b  |               +|
00008bc0  20 20 41 64 64 69 74 69  6f 6e 0d 20 20 20 20 20  |  Addition.     |
00008bd0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 2d  |               -|
00008be0  20 20 53 75 62 74 72 61  63 74 69 6f 6e 0d 0d 20  |  Subtraction.. |
00008bf0  20 20 20 20 20 20 20 54  68 65 20 20 22 3d 22 20  |       The  "=" |
00008c00  20 61 6e 64 20 22 23 22  20 6f 70 65 72 61 74 6f  | and "#" operato|
00008c10  72 73 20 72 65 74 75 72  6e 20 76 61 6c 75 65 73  |rs return values|
00008c20  20 6f 66 20 2d 31 20 61  6e 64 20 30 20 66 6f 72  | of -1 and 0 for|
00008c30  20 54 52 55 45 0d 20 20  20 20 20 20 20 20 61 6e  | TRUE.        an|
00008c40  64 20 46 41 4c 53 45 20  72 65 73 70 65 63 74 69  |d FALSE respecti|
00008c50  76 65 6c 79 2e 0d 0d 20  20 20 20 20 20 20 20 41  |vely...        A|
00008c60  64 64 69 74 69 6f 6e 61  6c 6c 79 2c 20 65 78 70  |dditionally, exp|
00008c70  72 65 73 73 69 6f 6e 73  20 20 6d 61 79 20 20 62  |ressions  may  b|
00008c80  65 20 20 70 72 65 66 69  78 65 64 20 20 77 69 74  |e  prefixed  wit|
00008c90  68 20 20 74 77 6f 20 20  75 6e 61 72 79 0d 20 20  |h  two  unary.  |
00008ca0  20 20 20 20 20 20 6f 70  65 72 61 74 6f 72 73 20  |      operators |
00008cb0  3e 20 61 6e 64 20 3c 2c  20 20 77 68 69 63 68 20  |> and <,  which |
00008cc0  73 65 6c 65 63 74 20 74  68 65 20 6c 6f 77 2d 62  |select the low-b|
00008cd0  79 74 65 20 61 6e 64 20  68 69 67 68 2d 62 79 74  |yte and high-byt|
00008ce0  65 20 6f 66 0d 20 20 20  20 20 20 20 20 74 68 65  |e of.        the|
00008cf0  20 20 72 65 73 75 6c 74  20 20 72 65 73 70 65 63  |  result  respec|
00008d00  74 69 76 65 6c 79 2e 20  20 54 68 65 73 65 20 20  |tively.  These  |
00008d10  6f 70 65 72 61 74 6f 72  73 20 20 68 61 76 65 20  |operators  have |
00008d20  20 74 68 65 20 6c 6f 77  65 73 74 0d 0d 0d 20 20  | the lowest...  |
00008d30  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00008d40  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 31  |               1|
00008d50  32 0d 0d 0d 0d 0d 0d 1b  47 20 20 20 20 20 20 20  |2.......G       |
00008d60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 55  |               U|
00008d70  53 49 4e 47 20 54 48 45  20 36 35 43 30 32 20 41  |SING THE 65C02 A|
00008d80  53 53 45 4d 42 4c 45 52  1b 48 0d 0d 0d 0d 20 20  |SSEMBLER.H....  |
00008d90  20 20 20 20 20 20 70 72  69 6f 72 69 74 79 20 6f  |      priority o|
00008da0  66 20 61 6c 6c 2e 20 54  68 75 73 2c 20 66 6f 72  |f all. Thus, for|
00008db0  20 65 78 61 6d 70 6c 65  2c 20 73 75 70 70 6f 73  | example, suppos|
00008dc0  65 20 79 6f 75 20 68 61  76 65 20 64 65 66 69 6e  |e you have defin|
00008dd0  65 64 20 61 0d 20 20 20  20 20 20 20 20 74 61 62  |ed a.        tab|
00008de0  6c 65 20 73 74 61 72 74  69 6e 67 20 61 74 20 6c  |le starting at l|
00008df0  61 62 65 6c 20 54 41 42  4c 45 2e 20 20 54 6f 20  |abel TABLE.  To |
00008e00  6c 6f 61 64 20 20 74 68  65 20 20 61 64 64 72 65  |load  the  addre|
00008e10  73 73 20 20 6f 66 20 20  74 68 65 0d 20 20 20 20  |ss  of  the.    |
00008e20  20 20 20 20 74 61 62 6c  65 20 20 69 6e 74 6f 20  |    table  into |
00008e30  58 20 28 74 68 65 20 6c  6f 77 20 62 79 74 65 29  |X (the low byte)|
00008e40  20 61 6e 64 20 59 20 28  74 68 65 20 68 69 67 68  | and Y (the high|
00008e50  20 62 79 74 65 29 2c 20  20 79 6f 75 20 77 6f 75  | byte),  you wou|
00008e60  6c 64 0d 20 20 20 20 20  20 20 20 77 72 69 74 65  |ld.        write|
00008e70  0d 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
00008e80  20 20 20 20 20 20 4c 44  58 20 20 20 23 3e 54 41  |      LDX   #>TA|
00008e90  42 4c 45 20 20 20 3b 20  6c 6f 61 64 20 6c 6f 77  |BLE   ; load low|
00008ea0  20 20 62 79 74 65 0d 20  20 20 20 20 20 20 20 20  |  byte.         |
00008eb0  20 20 20 20 20 20 20 20  20 20 20 4c 44 59 20 20  |           LDY  |
00008ec0  20 23 3c 54 41 42 4c 45  20 20 20 3b 20 6c 6f 61  | #<TABLE   ; loa|
00008ed0  64 20 68 69 67 68 20 62  79 74 65 0d 0d 20 20 20  |d high byte..   |
00008ee0  20 20 20 20 20 4e 6f 74  65 20 74 68 61 74 20 74  |     Note that t|
00008ef0  68 65 20 4d 4f 44 20 61  6e 64 20 44 49 56 20 6f  |he MOD and DIV o|
00008f00  70 65 72 61 74 6f 72 73  20 20 75 73 65 64 20 20  |perators  used  |
00008f10  69 6e 20 20 74 68 65 20  20 42 42 43 20 20 42 61  |in  the  BBC  Ba|
00008f20  73 69 63 0d 20 20 20 20  20 20 20 20 61 73 73 65  |sic.        asse|
00008f30  6d 62 6c 65 72 20 74 6f  20 61 63 68 69 65 76 65  |mbler to achieve|
00008f40  20 74 68 69 73 20 72 65  73 75 6c 74 20 63 61 6e  | this result can|
00008f50  6e 6f 74 20 62 65 20 75  73 65 64 2e 0d 0d 0d 20  |not be used.... |
00008f60  20 20 20 20 67 2e 20 43  75 72 72 65 6e 74 20 61  |    g. Current a|
00008f70  64 64 72 65 73 73 0d 0d  20 20 20 20 20 20 20 20  |ddress..        |
00008f80  54 68 65 20 63 75 72 72  65 6e 74 20 76 61 6c 75  |The current valu|
00008f90  65 20 6f 66 20 74 68 65  20 61 64 64 72 65 73 73  |e of the address|
00008fa0  20 63 6f 75 6e 74 65 72  20 6d 61 79 20 62 65 20  | counter may be |
00008fb0  72 65 70 72 65 73 65 6e  74 65 64 20 69 6e 0d 20  |represented in. |
00008fc0  20 20 20 20 20 20 20 65  78 70 72 65 73 73 69 6f  |       expressio|
00008fd0  6e 73 20 62 79 20 74 68  65 20 22 2a 22 20 63 68  |ns by the "*" ch|
00008fe0  61 72 61 63 74 65 72 2e  0d 0d 20 20 20 20 20 20  |aracter...      |
00008ff0  20 20 46 6f 72 20 65 78  61 6d 70 6c 65 3a 0d 20  |  For example:. |
00009000  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00009020  2a 2d 33 0d 0d 0d 20 20  20 20 20 1b 2d 01 32 2e  |*-3...     .-.2.|
00009030  32 2e 32 20 53 74 72 69  6e 67 73 1b 2d 00 0d 0d  |2.2 Strings.-...|
00009040  20 20 20 20 20 54 68 65  73 65 20 20 61 72 65 20  |     These  are |
00009050  20 69 6e 64 69 63 61 74  65 64 20 69 6e 20 64 65  | indicated in de|
00009060  66 69 6e 69 74 69 6f 6e  73 20 61 73 20 3c 73 74  |finitions as <st|
00009070  72 69 6e 67 3e 2c 20 20  61 6e 64 20 63 6f 6e 73  |ring>,  and cons|
00009080  69 73 74 20 6f 66 0d 20  20 20 20 20 6f 6e 65 20  |ist of.     one |
00009090  6f 72 20 6d 6f 72 65 20  41 53 43 49 49 20 63 68  |or more ASCII ch|
000090a0  61 72 61 63 74 65 72 73  20 65 6e 63 6c 6f 73 65  |aracters enclose|
000090b0  64 20 69 6e 20 20 64 65  6c 69 6d 69 74 65 72 73  |d in  delimiters|
000090c0  2e 20 20 20 4f 6e 6c 79  20 20 74 68 65 0d 20 20  |.   Only  the.  |
000090d0  20 20 20 73 69 6e 67 6c  65 2d 20 20 61 6e 64 20  |   single-  and |
000090e0  20 64 6f 75 62 6c 65 2d  71 75 6f 74 65 20 20 63  | double-quote  c|
000090f0  68 61 72 61 63 74 65 72  73 20 20 28 27 20 61 6e  |haracters  (' an|
00009100  64 20 22 29 20 20 63 61  6e 20 62 65 20 75 73 65  |d ")  can be use|
00009110  64 20 61 73 0d 20 20 20  20 20 64 65 6c 69 6d 69  |d as.     delimi|
00009120  74 65 72 73 2c 20 61 6e  64 20 74 68 65 20 73 74  |ters, and the st|
00009130  61 72 74 20 61 6e 64 20  65 6e 64 20 64 65 6c 69  |art and end deli|
00009140  6d 69 74 65 72 20 6d 75  73 74 20 62 65 20 74 68  |miter must be th|
00009150  65 20 73 61 6d 65 2e 0d  0d 20 20 20 20 20 46 6f  |e same...     Fo|
00009160  72 20 65 78 61 6d 70 6c  65 3a 0d 20 20 20 20 20  |r example:.     |
00009170  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00009180  20 20 20 20 20 27 54 68  69 73 20 69 73 20 61 20  |     'This is a |
00009190  73 74 72 69 6e 67 27 0d  20 20 20 20 20 20 20 20  |string'.        |
000091a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 22 41  |              "A|
000091b0  6e 64 20 73 6f 2c 20 79  6f 75 20 73 65 65 2c 20  |nd so, you see, |
000091c0  69 73 20 74 68 69 73 22  0d 0d 20 20 20 20 20 54  |is this"..     T|
000091d0  6f 20 69 6e 63 6c 75 64  65 20 74 68 65 20 27 20  |o include the ' |
000091e0  6f 72 20 22 20 63 68 61  72 61 63 74 65 72 20 69  |or " character i|
000091f0  6e 20 61 20 73 74 72 69  6e 67 2c 20 75 73 65 20  |n a string, use |
00009200  74 68 65 20 6f 74 68 65  72 20 61 73 20 74 68 65  |the other as the|
00009210  0d 20 20 20 20 20 64 65  6c 69 6d 69 74 65 72 2e  |.     delimiter.|
00009220  0d 0d 20 20 20 20 20 57  69 74 68 69 6e 20 61 20  |..     Within a |
00009230  73 74 72 69 6e 67 20 79  6f 75 20 63 61 6e 20 6f  |string you can o|
00009240  62 74 61 69 6e 20 63 6f  6e 74 72 6f 6c 20 63 68  |btain control ch|
00009250  61 72 61 63 74 65 72 73  2c 20 61 6e 64 20 63 68  |aracters, and ch|
00009260  61 72 61 63 74 65 72 73  0d 20 20 20 20 20 77 69  |aracters.     wi|
00009270  74 68 20 42 37 20 73 65  74 2c 20 69 6e 20 74 68  |th B7 set, in th|
00009280  65 20 77 61 79 20 64 65  73 63 72 69 62 65 64 20  |e way described |
00009290  61 62 6f 76 65 20 66 6f  72 20 63 68 61 72 61 63  |above for charac|
000092a0  74 65 72 20 63 6f 6e 73  74 61 6e 74 73 2e 0d 0d  |ter constants...|
000092b0  0d 20 20 20 20 20 1b 2d  01 32 2e 32 2e 33 20 53  |.     .-.2.2.3 S|
000092c0  74 72 69 6e 67 20 65 78  70 72 65 73 73 69 6f 6e  |tring expression|
000092d0  73 1b 2d 00 0d 0d 20 20  20 20 20 54 68 65 73 65  |s.-...     These|
000092e0  20 61 72 65 20 69 6e 64  69 63 61 74 65 64 20 20  | are indicated  |
000092f0  69 6e 20 20 64 65 66 69  6e 69 74 69 6f 6e 73 20  |in  definitions |
00009300  20 61 73 20 20 3c 73 74  72 69 6e 67 65 78 70 72  | as  <stringexpr|
00009310  3e 2c 20 20 61 6e 64 20  20 61 6c 6c 0d 20 20 20  |>,  and  all.   |
00009320  20 20 69 6e 76 6f 6c 76  65 20 63 6f 6d 70 61 72  |  involve compar|
00009330  69 73 6f 6e 73 20 62 65  74 77 65 65 6e 20 73 74  |isons between st|
00009340  72 69 6e 67 73 2e 20 20  54 68 65 20 67 65 6e 65  |rings.  The gene|
00009350  72 61 6c 20 66 6f 72 6d  61 74 20 69 73 0d 0d 20  |ral format is.. |
00009360  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00009370  20 20 20 20 20 20 20 3c  73 74 72 69 6e 67 3e 20  |       <string> |
00009380  3c 6f 70 3e 20 3c 73 74  72 69 6e 67 3e 0d 0d 20  |<op> <string>.. |
00009390  20 20 20 20 77 68 65 72  65 20 3c 6f 70 3e 20 69  |    where <op> i|
000093a0  73 20 6f 6e 65 20 6f 66  20 74 68 65 20 6f 70 65  |s one of the ope|
000093b0  72 61 74 6f 72 73 0d 0d  20 20 20 20 20 20 20 20  |rators..        |
000093c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000093d0  20 3d 20 20 45 71 75 61  6c 69 74 79 0d 20 20 20  | =  Equality.   |
000093e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000093f0  20 20 20 20 20 20 23 20  20 49 6e 65 71 75 61 6c  |      #  Inequal|
00009400  69 74 79 0d 20 20 20 20  20 20 20 20 20 20 20 20  |ity.            |
00009410  20 20 20 20 20 20 20 20  20 20 20 20 20 3e 20 20  |             >  |
00009420  47 72 65 61 74 65 72 20  74 68 61 6e 0d 20 20 20  |Greater than.   |
00009430  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00009440  20 20 20 20 20 20 3c 20  20 4c 65 73 73 20 74 68  |      <  Less th|
00009450  61 6e 0d 0d 0d 0d 0d 20  20 20 20 20 20 20 20 20  |an.....         |
00009460  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00009470  20 20 20 20 20 20 20 20  31 33 0d 0d 0d 0d 0d 0d  |        13......|
00009480  1b 47 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.G              |
00009490  20 20 20 20 20 20 20 20  55 53 49 4e 47 20 54 48  |        USING TH|
000094a0  45 20 36 35 43 30 32 20  41 53 53 45 4d 42 4c 45  |E 65C02 ASSEMBLE|
000094b0  52 1b 48 0d 0d 0d 0d 1b  2d 01 1b 47 33 2e 20 54  |R.H.....-..G3. T|
000094c0  48 45 20 4f 55 54 50 55  54 20 4c 49 53 54 49 4e  |HE OUTPUT LISTIN|
000094d0  47 1b 2d 00 1b 48 0d 0d  0d 20 20 20 54 68 65 20  |G.-..H...   The |
000094e0  61 73 73 65 6d 62 6c 79  20 6c 69 73 74 69 6e 67  |assembly listing|
000094f0  20 69 73 20 70 72 6f 64  75 63 65 64 20 69 6e 20  | is produced in |
00009500  70 61 73 73 20 32 2e 20  59 6f 75 20 63 61 6e 20  |pass 2. You can |
00009510  63 6f 6e 74 72 6f 6c 20  77 68 65 74 68 65 72 0d  |control whether.|
00009520  69 74 20 20 61 70 70 65  61 72 73 20 20 6f 72 20  |it  appears  or |
00009530  20 6e 6f 74 2c 20 20 77  68 65 74 68 65 72 20 20  | not,  whether  |
00009540  69 74 20 67 6f 65 73 20  74 6f 20 73 63 72 65 65  |it goes to scree|
00009550  6e 20 6f 72 20 70 72 69  6e 74 65 72 2c 20 20 61  |n or printer,  a|
00009560  6e 64 20 74 68 65 0d 61  6d 6f 75 6e 74 20 6f 66  |nd the.amount of|
00009570  20 64 65 74 61 69 6c 20  69 74 20 63 6f 6e 74 61  | detail it conta|
00009580  69 6e 73 2e 0d 0d 0d 1b  2d 01 33 2e 31 20 54 68  |ins.....-.3.1 Th|
00009590  65 20 73 6f 75 72 63 65  20 6c 69 73 74 69 6e 67  |e source listing|
000095a0  20 6c 65 76 65 6c 1b 2d  00 0d 0d 0d 20 20 20 54  | level.-....   T|
000095b0  68 65 20 6d 61 69 6e 20  63 6f 6e 74 72 6f 6c 20  |he main control |
000095c0  79 6f 75 20 68 61 76 65  20 6f 76 65 72 20 74 68  |you have over th|
000095d0  65 20 6c 69 73 74 69 6e  67 20 69 73 20 74 68 72  |e listing is thr|
000095e0  6f 75 67 68 20 20 74 68  65 20 20 22 73 6f 75 72  |ough  the  "sour|
000095f0  63 65 0d 6c 69 73 74 69  6e 67 20 20 6c 65 76 65  |ce.listing  leve|
00009600  6c 22 2e 20 20 54 68 69  73 20 20 69 73 20 20 61  |l".  This  is  a|
00009610  20 76 61 6c 75 65 20 69  6e 20 74 68 65 20 72 61  | value in the ra|
00009620  6e 67 65 20 30 2e 2e 33  20 74 68 61 74 20 79 6f  |nge 0..3 that yo|
00009630  75 20 63 61 6e 20 73 65  74 0d 65 69 74 68 65 72  |u can set.either|
00009640  20 77 69 74 68 20 74 68  65 20 4c 53 54 20 64 69  | with the LST di|
00009650  72 65 63 74 69 76 65 2c  20 74 68 65 20 2d 4c 20  |rective, the -L |
00009660  63 6f 6d 6d 61 6e 64 20  20 6c 69 6e 65 20 20 6f  |command  line  o|
00009670  70 74 69 6f 6e 2c 20 20  6f 72 20 20 77 69 74 68  |ption,  or  with|
00009680  0d 66 75 6e 63 74 69 6f  6e 20 6b 65 79 73 20 30  |.function keys 0|
00009690  20 74 6f 20 33 20 64 75  72 69 6e 67 20 74 68 65  | to 3 during the|
000096a0  20 63 6f 75 72 73 65 20  6f 66 20 61 6e 20 61 73  | course of an as|
000096b0  73 65 6d 62 6c 79 2e 0d  0d 20 20 20 54 68 65 20  |sembly...   The |
000096c0  6c 69 73 74 69 6e 67 20  6c 65 76 65 6c 73 20 68  |listing levels h|
000096d0  61 76 65 20 74 68 65 20  66 6f 6c 6c 6f 77 69 6e  |ave the followin|
000096e0  67 20 6d 65 61 6e 69 6e  67 3a 0d 0d 20 20 30 20  |g meaning:..  0 |
000096f0  20 54 68 69 73 20 6c 65  76 65 6c 20 73 75 70 70  | This level supp|
00009700  72 65 73 73 65 73 20 61  6c 6c 20 6c 69 73 74 69  |resses all listi|
00009710  6e 67 20 65 78 63 65 70  74 20 74 68 65 20 72 65  |ng except the re|
00009720  70 6f 72 74 69 6e 67 20  6f 66 20 65 72 72 6f 72  |porting of error|
00009730  73 2e 0d 0d 20 20 31 20  20 54 68 69 73 20 6c 65  |s...  1  This le|
00009740  76 65 6c 20 77 69 6c 6c  20 6c 69 73 74 20 61 6c  |vel will list al|
00009750  6c 20 73 6f 75 72 63 65  20 6c 69 6e 65 73 20 74  |l source lines t|
00009760  68 61 74 20 20 6f 72 69  67 69 6e 61 74 65 20 20  |hat  originate  |
00009770  69 6e 20 20 73 6f 75 72  63 65 0d 20 20 20 20 20  |in  source.     |
00009780  66 69 6c 65 73 2c 20 62  75 74 20 6e 6f 74 20 74  |files, but not t|
00009790  68 65 20 65 78 70 61 6e  73 69 6f 6e 73 20 6f 66  |he expansions of|
000097a0  20 6d 61 63 72 6f 73 2e  0d 0d 20 20 32 20 20 54  | macros...  2  T|
000097b0  68 69 73 20 6c 65 76 65  6c 20 6c 69 73 74 73 20  |his level lists |
000097c0  61 6c 6c 20 6c 69 6e 65  73 20 66 72 6f 6d 20 73  |all lines from s|
000097d0  6f 75 72 63 65 20 66 69  6c 65 73 20 61 6e 64 20  |ource files and |
000097e0  6d 61 63 72 6f 20 65 78  70 61 6e 73 69 6f 6e 73  |macro expansions|
000097f0  0d 20 20 20 20 20 62 75  74 20 6e 6f 74 20 4d 61  |.     but not Ma|
00009800  63 72 6f 20 50 72 6f 67  72 61 6d 6d 69 6e 67 20  |cro Programming |
00009810  4c 61 6e 67 75 61 67 65  20 73 74 61 74 65 6d 65  |Language stateme|
00009820  6e 74 73 20 73 75 63 68  20 61 73 20 41 49 46 2e  |nts such as AIF.|
00009830  0d 0d 20 20 33 20 20 54  68 69 73 20 6c 65 76 65  |..  3  This leve|
00009840  6c 20 6c 69 73 74 73 20  61 6c 6c 20 73 6f 75 72  |l lists all sour|
00009850  63 65 20 6c 69 6e 65 73  2e 0d 0d 20 20 20 42 79  |ce lines...   By|
00009860  20 20 64 65 66 61 75 6c  74 2c 20 20 74 68 65 20  |  default,  the |
00009870  41 73 73 65 6d 62 6c 65  72 20 73 65 74 73 20 74  |Assembler sets t|
00009880  68 65 20 73 6f 75 72 63  65 20 6c 69 73 74 20 6c  |he source list l|
00009890  65 76 65 6c 20 74 6f 20  30 2c 20 73 6f 20 61 6c  |evel to 0, so al|
000098a0  6c 0d 79 6f 75 20 77 69  6c 6c 20 73 65 65 20 77  |l.you will see w|
000098b0  69 6c 6c 20 62 65 20 65  72 72 6f 72 20 72 65 70  |ill be error rep|
000098c0  6f 72 74 73 2e 20 59 6f  75 20 63 61 6e 20 63 68  |orts. You can ch|
000098d0  61 6e 67 65 20 74 68 65  20 64 65 66 61 75 6c 74  |ange the default|
000098e0  20 73 65 74 74 69 6e 67  0d 69 6e 20 74 68 65 20  | setting.in the |
000098f0  2a 41 53 53 45 4d 42 4c  45 20 63 6f 6d 6d 61 6e  |*ASSEMBLE comman|
00009900  64 20 62 79 20 75 73 69  6e 67 20 74 68 65 20 22  |d by using the "|
00009910  2d 4c 22 20 6f 70 74 69  6f 6e 3a 20 74 68 75 73  |-L" option: thus|
00009920  0d 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
00009930  20 20 20 20 20 20 20 20  20 20 20 2a 41 53 53 45  |           *ASSE|
00009940  4d 42 4c 45 20 53 4f 55  52 43 45 20 2d 4c 32 0d  |MBLE SOURCE -L2.|
00009950  0d 77 6f 75 6c 64 20 63  61 75 73 65 20 74 68 65  |.would cause the|
00009960  20 41 73 73 65 6d 62 6c  65 72 20 74 6f 20 73 74  | Assembler to st|
00009970  61 72 74 20 77 69 74 68  20 61 20 64 65 66 61 75  |art with a defau|
00009980  6c 74 20 6c 69 73 74 69  6e 67 20 6c 65 76 65 6c  |lt listing level|
00009990  20 6f 66 20 32 2e 0d 0d  20 20 20 57 69 74 68 69  | of 2...   Withi|
000099a0  6e 20 74 68 65 20 73 6f  75 72 63 65 2c 20 20 79  |n the source,  y|
000099b0  6f 75 20 63 61 6e 20 63  6f 6e 74 72 6f 6c 20 74  |ou can control t|
000099c0  68 65 20 6c 69 73 74 20  20 6c 65 76 65 6c 20 20  |he list  level  |
000099d0  77 69 74 68 20 20 74 68  65 20 20 4c 53 54 0d 64  |with  the  LST.d|
000099e0  69 72 65 63 74 69 76 65  2e 20 54 68 75 73 3a 0d  |irective. Thus:.|
000099f0  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00009a00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00009a10  20 4c 53 54 20 20 31 0d  0d 77 6f 75 6c 64 20 73  | LST  1..would s|
00009a20  65 74 20 74 68 65 20 6c  69 73 74 20 6c 65 76 65  |et the list leve|
00009a30  6c 20 74 6f 20 31 2e 0d  0d 20 20 20 53 69 6d 70  |l to 1...   Simp|
00009a40  6c 79 20 77 72 69 74 69  6e 67 0d 0d 20 20 20 20  |ly writing..    |
00009a50  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00009a60  20 20 20 20 20 20 20 20  20 20 20 20 20 4c 53 54  |             LST|
00009a70  0d 0d 77 69 74 68 20 6e  6f 20 6f 70 65 72 61 6e  |..with no operan|
00009a80  64 20 66 69 65 6c 64 20  77 69 6c 6c 20 72 65 73  |d field will res|
00009a90  65 74 20 74 68 65 20 76  61 6c 75 65 20 74 6f 20  |et the value to |
00009aa0  74 68 65 20 64 65 66 61  75 6c 74 2c 20 77 69 74  |the default, wit|
00009ab0  68 6f 75 74 20 79 6f 75  0d 6e 65 65 64 69 6e 67  |hout you.needing|
00009ac0  20 74 6f 20 62 75 69 6c  64 20 74 68 69 73 20 76  | to build this v|
00009ad0  61 6c 75 65 20 69 6e 74  6f 20 74 68 65 20 61 63  |alue into the ac|
00009ae0  74 75 61 6c 20 73 6f 75  72 63 65 2e 0d 0d 0d 20  |tual source.... |
00009af0  20 20 41 64 64 69 74 69  6f 6e 61 6c 6c 79 2c 20  |  Additionally, |
00009b00  20 79 6f 75 20 20 63 61  6e 20 20 6f 76 65 72 72  | you  can  overr|
00009b10  69 64 65 20 20 74 68 65  20 20 6c 69 73 74 20 20  |ide  the  list  |
00009b20  6c 65 76 65 6c 20 69 6e  20 75 73 65 20 77 68 69  |level in use whi|
00009b30  6c 65 20 61 6e 0d 61 73  73 65 6d 62 6c 79 20 69  |le an.assembly i|
00009b40  73 20 69 6e 20 70 72 6f  67 72 65 73 73 2e 20 20  |s in progress.  |
00009b50  20 50 72 65 73 73 69 6e  67 20 6f 6e 65 20 6f 66  | Pressing one of|
00009b60  20 66 75 6e 63 74 69 6f  6e 20 6b 65 79 73 20 20  | function keys  |
00009b70  30 20 74 6f 20 33 20 20  77 69 6c 6c 0d 66 6f 72  |0 to 3  will.for|
00009b80  63 65 20 74 68 65 20 20  63 6f 72 72 65 73 70 6f  |ce the  correspo|
00009b90  6e 64 69 6e 67 20 20 6c  69 73 74 20 20 6c 65 76  |nding  list  lev|
00009ba0  65 6c 20 20 74 6f 20 20  62 65 20 20 61 64 6f 70  |el  to  be  adop|
00009bb0  74 65 64 2c 20 20 73 6f  20 74 68 61 74 2c 20 20  |ted,  so that,  |
00009bc0  66 6f 72 0d 0d 0d 20 20  20 20 20 20 20 20 20 20  |for...          |
00009bd0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00009be0  20 20 20 20 20 20 20 31  34 0d 0d 0d 0d 0d 0d 1b  |       14.......|
00009bf0  47 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |G               |
00009c00  20 20 20 20 20 20 20 55  53 49 4e 47 20 54 48 45  |       USING THE|
00009c10  20 36 35 43 30 32 20 41  53 53 45 4d 42 4c 45 52  | 65C02 ASSEMBLER|
00009c20  1b 48 0d 0d 0d 0d 65 78  61 6d 70 6c 65 2c 20 20  |.H....example,  |
00009c30  79 6f 75 20 20 63 6f 75  6c 64 20 20 66 6f 72 63  |you  could  forc|
00009c40  65 20 20 74 68 65 20 20  41 73 73 65 6d 62 6c 65  |e  the  Assemble|
00009c50  72 20 20 74 6f 20 20 73  68 6f 77 20 20 79 6f 75  |r  to  show  you|
00009c60  20 70 61 72 74 73 20 6f  66 20 61 6e 0d 61 73 73  | parts of an.ass|
00009c70  65 6d 62 6c 79 20 74 6f  20 6d 6f 6e 69 74 6f 72  |embly to monitor|
00009c80  20 77 68 61 74 20 77 61  73 20 62 65 69 6e 67 20  | what was being |
00009c90  64 6f 6e 65 2e 20 20 50  72 65 73 73 69 6e 67 20  |done.  Pressing |
00009ca0  6f 6e 65 20 6f 66 20 20  74 68 65 73 65 20 20 6b  |one of  these  k|
00009cb0  65 79 73 0d 77 69 6c 6c  20 22 6c 6f 63 6b 22 20  |eys.will "lock" |
00009cc0  74 68 65 20 6c 69 73 74  20 6c 65 76 65 6c 20 74  |the list level t|
00009cd0  6f 20 74 68 61 74 20 73  65 6c 65 63 74 65 64 2c  |o that selected,|
00009ce0  20 73 6f 20 74 68 61 74  20 4c 53 54 20 64 69 72  | so that LST dir|
00009cf0  65 63 74 69 76 65 73 20  69 6e 0d 74 68 65 20 20  |ectives in.the  |
00009d00  73 6f 75 72 63 65 20 20  77 69 6c 6c 20 20 6e 6f  |source  will  no|
00009d10  74 20 20 62 65 20 20 61  62 6c 65 20 20 74 6f 20  |t  be  able  to |
00009d20  20 74 75 72 6e 20 74 68  65 20 6c 69 73 74 69 6e  | turn the listin|
00009d30  67 20 6f 66 66 20 61 67  61 69 6e 2e 20 20 54 68  |g off again.  Th|
00009d40  65 0d 64 69 72 65 63 74  69 76 65 73 20 61 72 65  |e.directives are|
00009d50  20 6e 6f 74 65 64 2c 20  74 68 6f 75 67 68 2c 20  | noted, though, |
00009d60  61 6e 64 20 79 6f 75 20  63 61 6e 20 72 65 74 75  |and you can retu|
00009d70  72 6e 20 6c 69 73 74 69  6e 67 20 6c 65 76 65 6c  |rn listing level|
00009d80  20 63 6f 6e 74 72 6f 6c  0d 74 6f 20 74 68 65 6d  | control.to them|
00009d90  20 61 74 20 61 6e 79 20  74 69 6d 65 20 62 79 20  | at any time by |
00009da0  70 72 65 73 73 69 6e 67  20 43 4f 4e 54 52 4f 4c  |pressing CONTROL|
00009db0  2d 4c 2e 0d 0d 0d 1b 2d  01 33 2e 32 20 53 6f 75  |-L.....-.3.2 Sou|
00009dc0  72 63 65 20 6c 69 73 74  69 6e 67 20 66 6f 72 6d  |rce listing form|
00009dd0  61 74 1b 2d 00 0d 0d 20  20 20 54 68 65 20 6c 69  |at.-...   The li|
00009de0  73 74 69 6e 67 20 62 65  67 69 6e 73 20 77 69 74  |sting begins wit|
00009df0  68 20 74 68 65 20 73 6f  75 72 63 65 20 6c 69 6e  |h the source lin|
00009e00  65 73 2c 20 20 69 6e 63  6c 75 64 69 6e 67 20 61  |es,  including a|
00009e10  6e 79 20 63 6f 64 65 20  62 79 74 65 73 0d 74 68  |ny code bytes.th|
00009e20  65 79 20 68 61 76 65 20  67 65 6e 65 72 61 74 65  |ey have generate|
00009e30  64 2e 0d 0d 20 20 20 54  68 65 20 66 69 72 73 74  |d...   The first|
00009e40  20 63 68 61 72 61 63 74  65 72 20 6f 6e 20 74 68  | character on th|
00009e50  65 20 6c 69 6e 65 20 69  6e 64 69 63 61 74 65 73  |e line indicates|
00009e60  20 77 68 65 72 65 20 74  68 65 20 6c 69 6e 65 20  | where the line |
00009e70  20 77 61 73 20 20 72 65  61 64 0d 66 72 6f 6d 2e  | was  read.from.|
00009e80  20 20 49 66 20 20 69 74  20 20 63 61 6d 65 20 20  |  If  it  came  |
00009e90  66 72 6f 6d 20 61 6e 20  49 4e 43 4c 55 44 45 20  |from an INCLUDE |
00009ea0  66 69 6c 65 20 6f 72 20  61 20 43 4f 44 45 20 66  |file or a CODE f|
00009eb0  69 6c 65 20 74 68 65 20  63 68 61 72 61 63 74 65  |ile the characte|
00009ec0  72 0d 77 69 6c 6c 20 62  65 20 22 49 22 3b 20 20  |r.will be "I";  |
00009ed0  69 66 20 74 68 65 20 6c  69 6e 65 20 69 73 20 66  |if the line is f|
00009ee0  72 6f 6d 20 61 20 6d 61  63 72 6f 20 69 74 20 77  |rom a macro it w|
00009ef0  69 6c 6c 20 62 65 20 20  22 4d 22 2e 20 20 4f 74  |ill be  "M".  Ot|
00009f00  68 65 72 77 69 73 65 2c  0d 74 68 65 20 63 68 61  |herwise,.the cha|
00009f10  72 61 63 74 65 72 20 69  73 20 61 20 73 70 61 63  |racter is a spac|
00009f20  65 2e 0d 0d 20 20 20 54  68 65 20 20 6e 65 78 74  |e...   The  next|
00009f30  20 20 65 6c 65 6d 65 6e  74 20 20 69 73 20 74 68  |  element  is th|
00009f40  65 20 6c 69 6e 65 20 6e  75 6d 62 65 72 2c 20 20  |e line number,  |
00009f50  72 65 73 65 74 20 74 6f  20 31 20 61 74 20 74 68  |reset to 1 at th|
00009f60  65 20 73 74 61 72 74 20  6f 66 0d 65 61 63 68 20  |e start of.each |
00009f70  73 6f 75 72 63 65 20 66  69 6c 65 2e 0d 0d 20 20  |source file...  |
00009f80  20 4e 65 78 74 20 63 6f  6d 65 73 20 74 68 65 20  | Next comes the |
00009f90  20 61 64 64 72 65 73 73  20 20 66 69 65 6c 64 2e  | address  field.|
00009fa0  20 20 54 68 69 73 20 20  77 69 6c 6c 20 20 6e 6f  |  This  will  no|
00009fb0  72 6d 61 6c 6c 79 20 20  63 6f 6e 74 61 69 6e 20  |rmally  contain |
00009fc0  20 74 68 65 0d 63 75 72  72 65 6e 74 20 76 61 6c  | the.current val|
00009fd0  75 65 20 6f 66 20 74 68  65 20 61 64 64 72 65 73  |ue of the addres|
00009fe0  73 20 63 6f 75 6e 74 65  72 3b 20 69 6e 20 73 6f  |s counter; in so|
00009ff0  6d 65 20 64 69 72 65 63  74 69 76 65 73 2c 20 74  |me directives, t|
0000a000  68 6f 75 67 68 2c 20 73  75 63 68 0d 61 73 20 4c  |hough, such.as L|
0000a010  53 54 2c 20 69 74 20 63  6f 6e 74 61 69 6e 73 20  |ST, it contains |
0000a020  74 68 65 20 76 61 6c 75  65 20 6f 66 20 74 68 65  |the value of the|
0000a030  20 6f 70 65 72 61 6e 64  20 65 78 70 72 65 73 73  | operand express|
0000a040  69 6f 6e 2e 0d 0d 20 20  20 54 68 65 6e 20 63 6f  |ion...   Then co|
0000a050  6d 65 73 20 61 20 68 65  78 61 64 65 63 69 6d 61  |mes a hexadecima|
0000a060  6c 20 72 65 70 72 65 73  65 6e 74 61 74 69 6f 6e  |l representation|
0000a070  20 6f 66 20 74 68 65 20  66 69 72 73 74 20 33 20  | of the first 3 |
0000a080  6f 62 6a 65 63 74 20 62  79 74 65 73 0d 67 65 6e  |object bytes.gen|
0000a090  65 72 61 74 65 64 20 62  79 20 74 68 65 20 6c 69  |erated by the li|
0000a0a0  6e 65 3b 20 74 68 69 73  20 69 73 20 66 6f 6c 6c  |ne; this is foll|
0000a0b0  6f 77 65 64 20 62 79 20  74 68 65 20 73 6f 75 72  |owed by the sour|
0000a0c0  63 65 20 6c 69 6e 65 20  69 74 73 65 6c 66 2e 20  |ce line itself. |
0000a0d0  20 42 79 0d 64 65 66 61  75 6c 74 2c 20 20 69 66  | By.default,  if|
0000a0e0  20 74 68 65 20 73 6f 75  72 63 65 20 6c 69 6e 65  | the source line|
0000a0f0  20 67 65 6e 65 72 61 74  65 64 20 6d 6f 72 65 20  | generated more |
0000a100  74 68 61 6e 20 33 20 6f  62 6a 65 63 74 20 62 79  |than 3 object by|
0000a110  74 65 73 2c 20 74 68 65  73 65 0d 77 69 6c 6c 20  |tes, these.will |
0000a120  62 65 20 6c 69 73 74 65  64 20 6f 6e 20 73 75 62  |be listed on sub|
0000a130  73 65 71 75 65 6e 74 20  6c 69 6e 65 73 2e 0d 0d  |sequent lines...|
0000a140  20 20 20 46 6f 72 20 65  78 61 6d 70 6c 65 2c 20  |   For example, |
0000a150  61 20 6c 69 73 74 69 6e  67 20 6c 69 6e 65 20 6d  |a listing line m|
0000a160  69 67 68 74 20 73 68 6f  77 3a 0d 0d 20 20 20 20  |ight show:..    |
0000a170  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 49  |               I|
0000a180  20 20 20 32 33 20 41 42  33 34 3a 43 39 20 30 41  |   23 AB34:C9 0A|
0000a190  20 20 20 20 20 20 43 4d  50 20 20 23 31 30 0d 0d  |      CMP  #10..|
0000a1a0  77 68 65 72 65 20 74 68  65 20 73 6f 75 72 63 65  |where the source|
0000a1b0  20 6c 69 6e 65 20 69 73  20 74 68 65 20 32 33 72  | line is the 23r|
0000a1c0  64 20 6c 69 6e 65 20 69  6e 20 61 6e 20 49 4e 43  |d line in an INC|
0000a1d0  4c 55 44 45 20 20 66 69  6c 65 20 20 61 6e 64 20  |LUDE  file  and |
0000a1e0  20 72 65 61 64 73 0d 22  43 4d 50 20 23 31 30 22  | reads."CMP #10"|
0000a1f0  2e 20 20 54 68 65 20 20  63 6f 64 65 20 20 62 79  |.  The  code  by|
0000a200  74 65 73 20 20 67 65 6e  65 72 61 74 65 64 20 61  |tes  generated a|
0000a210  72 65 20 24 43 39 20 61  6e 64 20 24 30 41 2c 20  |re $C9 and $0A, |
0000a220  20 61 6e 64 20 74 68 65  79 20 61 72 65 0d 70 6c  | and they are.pl|
0000a230  61 6e 74 65 64 20 73 74  61 72 74 69 6e 67 20 61  |anted starting a|
0000a240  74 20 61 64 64 72 65 73  73 20 24 41 42 33 34 2e  |t address $AB34.|
0000a250  0d 0d 20 20 20 57 68 65  6e 20 6c 69 73 74 69 6e  |..   When listin|
0000a260  67 20 61 20 73 6f 75 72  63 65 20 6c 69 6e 65 2c  |g a source line,|
0000a270  20 20 74 68 65 20 20 41  73 73 65 6d 62 6c 65 72  |  the  Assembler|
0000a280  20 20 77 69 6c 6c 20 20  65 78 70 61 6e 64 20 20  |  will  expand  |
0000a290  61 6e 79 20 20 54 41 42  0d 63 68 61 72 61 63 74  |any  TAB.charact|
0000a2a0  65 72 73 20 20 69 74 20  20 65 6e 63 6f 75 6e 74  |ers  it  encount|
0000a2b0  65 72 73 2e 20 20 42 79  20 20 64 65 66 61 75 6c  |ers.  By  defaul|
0000a2c0  74 2c 20 54 41 42 20 70  6f 73 69 74 69 6f 6e 73  |t, TAB positions|
0000a2d0  20 61 72 65 20 64 65 66  69 6e 65 64 20 61 74 0d  | are defined at.|
0000a2e0  63 68 61 72 61 63 74 65  72 73 20 38 2c 20 31 36  |characters 8, 16|
0000a2f0  2c 20 32 35 2c 20 33 33  2c 20 34 31 2c 20 34 39  |, 25, 33, 41, 49|
0000a300  2c 20 35 37 2c 20 36 35  2c 20 37 33 2c 20 38 31  |, 57, 65, 73, 81|
0000a310  2c 20 38 39 2c 20 39 37  2c 20 31 31 35 20 61 6e  |, 89, 97, 115 an|
0000a320  64 20 31 32 33 2c 0d 77  69 74 68 20 74 68 65 20  |d 123,.with the |
0000a330  66 69 72 73 74 20 63 68  61 72 61 63 74 65 72 20  |first character |
0000a340  6f 66 20 74 68 65 20 73  6f 75 72 63 65 20 20 6c  |of the source  l|
0000a350  69 6e 65 20 20 62 65 69  6e 67 20 20 6e 75 6d 62  |ine  being  numb|
0000a360  65 72 65 64 20 20 31 2e  20 20 54 68 65 0d 64 65  |ered  1.  The.de|
0000a370  66 61 75 6c 74 20 20 54  41 42 20 20 70 6f 73 69  |fault  TAB  posi|
0000a380  74 69 6f 6e 73 20 68 61  76 65 20 62 65 65 6e 20  |tions have been |
0000a390  63 68 6f 73 65 6e 20 74  6f 20 67 69 76 65 20 61  |chosen to give a|
0000a3a0  20 6e 65 61 74 20 6c 69  73 74 69 6e 67 20 6c 61  | neat listing la|
0000a3b0  79 6f 75 74 0d 75 73 69  6e 67 20 6c 61 62 65 6c  |yout.using label|
0000a3c0  73 20 6f 66 20 75 70 20  74 6f 20 36 20 63 68 61  |s of up to 6 cha|
0000a3d0  72 61 63 74 65 72 73 20  69 6e 20 6c 65 6e 67 74  |racters in lengt|
0000a3e0  68 20 61 6e 64 20 74 79  70 69 63 61 6c 20 6f 70  |h and typical op|
0000a3f0  65 72 61 6e 64 20 66 69  65 6c 64 0d 73 69 7a 65  |erand field.size|
0000a400  73 2e 20 20 48 6f 77 65  76 65 72 2c 20 74 68 65  |s.  However, the|
0000a410  20 66 69 72 73 74 20 66  65 77 20 54 41 42 73 20  | first few TABs |
0000a420  20 61 72 65 20 20 6e 6f  74 20 20 70 6f 73 69 74  | are  not  posit|
0000a430  69 6f 6e 65 64 20 20 61  74 20 20 72 65 67 75 6c  |ioned  at  regul|
0000a440  61 72 0d 69 6e 74 65 72  76 61 6c 73 2c 20 20 73  |ar.intervals,  s|
0000a450  6f 20 20 79 6f 75 20 20  6d 61 79 20 20 66 69 6e  |o  you  may  fin|
0000a460  64 20 20 74 68 61 74 20  20 79 6f 75 20 63 61 6e  |d  that  you can|
0000a470  6e 6f 74 20 65 61 73 69  6c 79 20 6c 61 79 20 6f  |not easily lay o|
0000a480  75 74 20 74 61 62 6c 65  73 0d 77 69 74 68 69 6e  |ut tables.within|
0000a490  20 63 6f 6d 6d 65 6e 74  73 2e 0d 0d 20 20 20 59  | comments...   Y|
0000a4a0  6f 75 20 63 61 6e 20 6f  76 65 72 63 6f 6d 65 20  |ou can overcome |
0000a4b0  61 6e 79 20 70 72 6f 62  6c 65 6d 73 2c 20 61 6e  |any problems, an|
0000a4c0  64 20 63 68 6f 6f 73 65  20 74 68 65 20 6c 61 79  |d choose the lay|
0000a4d0  6f 75 74 20 6d 6f 73 74  20 20 73 75 69 74 61 62  |out most  suitab|
0000a4e0  6c 65 0d 66 6f 72 20 79  6f 75 72 20 73 6f 75 72  |le.for your sour|
0000a4f0  63 65 2c 20 20 77 69 74  68 20 74 68 65 20 54 41  |ce,  with the TA|
0000a500  42 53 20 64 69 72 65 63  74 69 76 65 2e 20 20 54  |BS directive.  T|
0000a510  68 69 73 20 6c 65 74 73  20 79 6f 75 20 72 65 64  |his lets you red|
0000a520  65 66 69 6e 65 20 74 68  65 0d 54 41 42 20 70 6f  |efine the.TAB po|
0000a530  73 69 74 69 6f 6e 73 20  75 73 65 64 3a 20 66 6f  |sitions used: fo|
0000a540  72 20 65 78 61 6d 70 6c  65 0d 0d 20 20 20 20 20  |r example..     |
0000a550  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000a560  20 54 41 42 53 20 20 39  2c 31 37 2c 32 35 2c 33  | TABS  9,17,25,3|
0000a570  33 2c 34 31 2c 34 39 2c  35 37 0d 0d 0d 0d 20 20  |3,41,49,57....  |
0000a580  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000a590  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 31  |               1|
0000a5a0  35 0d 0d 0d 0d 0d 0d 1b  47 20 20 20 20 20 20 20  |5.......G       |
0000a5b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 55  |               U|
0000a5c0  53 49 4e 47 20 54 48 45  20 36 35 43 30 32 20 41  |SING THE 65C02 A|
0000a5d0  53 53 45 4d 42 4c 45 52  1b 48 0d 0d 0d 0d 77 6f  |SSEMBLER.H....wo|
0000a5e0  75 6c 64 20 20 73 65 74  20 20 54 41 42 20 20 73  |uld  set  TAB  s|
0000a5f0  74 6f 70 73 20 20 61 74  20 72 65 67 75 6c 61 72  |tops  at regular|
0000a600  20 70 6f 73 69 74 69 6f  6e 73 2c 20 20 77 69 74  | positions,  wit|
0000a610  68 20 65 61 63 68 20 66  69 65 6c 64 20 62 65 69  |h each field bei|
0000a620  6e 67 20 38 0d 63 68 61  72 61 63 74 65 72 73 20  |ng 8.characters |
0000a630  77 69 64 65 2e 20 20 59  6f 75 20 63 61 6e 20 72  |wide.  You can r|
0000a640  65 74 75 72 6e 20 74 6f  20 74 68 65 20 64 65 66  |eturn to the def|
0000a650  61 75 6c 74 20 54 41 42  20 73 74 6f 70 73 20 61  |ault TAB stops a|
0000a660  74 20 61 6e 79 20 20 74  69 6d 65 0d 77 69 74 68  |t any  time.with|
0000a670  20 74 68 65 20 64 69 72  65 63 74 69 76 65 0d 0d  | the directive..|
0000a680  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
0000a6a0  20 54 41 42 53 0d 0d 77  69 74 68 20 6e 6f 20 6f  | TABS..with no o|
0000a6b0  70 65 72 61 6e 64 73 2e  0d 0d 20 20 20 54 68 65  |perands...   The|
0000a6c0  20 41 73 73 65 6d 62 6c  65 72 20 63 61 6e 20 62  | Assembler can b|
0000a6d0  65 20 63 75 73 74 6f 6d  69 73 65 64 20 74 6f 20  |e customised to |
0000a6e0  63 68 61 6e 67 65 20 74  68 65 20 1b 2d 01 64 65  |change the .-.de|
0000a6f0  66 61 75 6c 74 1b 2d 00  20 54 41 42 20 70 6f 73  |fault.-. TAB pos|
0000a700  69 74 69 6f 6e 73 0d 74  6f 20 61 6e 79 20 76 61  |itions.to any va|
0000a710  6c 75 65 20 79 6f 75 20  72 65 71 75 69 72 65 3a  |lue you require:|
0000a720  20 74 68 69 73 20 69 73  20 64 65 73 63 72 69 62  | this is describ|
0000a730  65 64 20 69 6e 20 41 70  70 65 6e 64 69 78 20 35  |ed in Appendix 5|
0000a740  2e 0d 0d 0d 1b 2d 01 33  2e 33 20 4c 69 73 74 69  |.....-.3.3 Listi|
0000a750  6e 67 20 6f 62 6a 65 63  74 20 63 6f 64 65 20 62  |ng object code b|
0000a760  79 74 65 73 1b 2d 00 0d  0d 0d 20 20 20 41 73 20  |ytes.-....   As |
0000a770  20 6d 65 6e 74 69 6f 6e  65 64 20 20 61 62 6f 76  | mentioned  abov|
0000a780  65 2c 20 20 74 68 65 20  20 66 69 72 73 74 20 20  |e,  the  first  |
0000a790  74 68 72 65 65 20 20 63  6f 64 65 20 62 79 74 65  |three  code byte|
0000a7a0  73 20 67 65 6e 65 72 61  74 65 64 20 62 79 20 61  |s generated by a|
0000a7b0  0d 73 6f 75 72 63 65 20  6c 69 6e 65 20 61 72 65  |.source line are|
0000a7c0  20 6c 69 73 74 65 64 20  6f 6e 20 74 68 61 74 20  | listed on that |
0000a7d0  6c 69 6e 65 2c 20 20 61  6e 64 20 61 6e 79 20 6f  |line,  and any o|
0000a7e0  74 68 65 72 73 20 20 77  69 6c 6c 20 20 61 70 70  |thers  will  app|
0000a7f0  65 61 72 20 20 6f 6e 0d  73 75 62 73 65 71 75 65  |ear  on.subseque|
0000a800  6e 74 20 20 6c 69 6e 65  73 2e 20 20 54 68 69 73  |nt  lines.  This|
0000a810  20 6d 61 79 20 70 72 6f  64 75 63 65 20 61 20 6c  | may produce a l|
0000a820  6f 74 20 6f 66 20 6f 75  74 70 75 74 2c 20 20 70  |ot of output,  p|
0000a830  61 72 74 69 63 75 6c 61  72 6c 79 20 69 66 0d 79  |articularly if.y|
0000a840  6f 75 20 64 65 66 69 6e  65 20 6c 6f 74 73 20 6f  |ou define lots o|
0000a850  66 20 73 74 72 69 6e 67  73 2c 20 20 73 6f 20 74  |f strings,  so t|
0000a860  68 65 20 41 73 73 65 6d  62 6c 65 72 20 67 69 76  |he Assembler giv|
0000a870  65 73 20 79 6f 75 20 63  6f 6e 74 72 6f 6c 20 6f  |es you control o|
0000a880  6e 20 68 6f 77 0d 6d 75  63 68 20 69 74 20 6c 69  |n how.much it li|
0000a890  73 74 73 2e 0d 0d 20 20  20 54 68 65 20 61 6d 6f  |sts...   The amo|
0000a8a0  75 6e 74 20 69 73 20 63  6f 6e 74 72 6f 6c 6c 65  |unt is controlle|
0000a8b0  64 20 62 79 20 74 68 65  20 20 22 63 6f 64 65 20  |d by the  "code |
0000a8c0  6c 69 73 74 69 6e 67 20  6c 65 76 65 6c 22 2e 20  |listing level". |
0000a8d0  20 54 68 69 73 20 20 69  73 20 20 61 0d 76 61 6c  | This  is  a.val|
0000a8e0  75 65 20 20 69 6e 20 20  74 68 65 20 20 72 61 6e  |ue  in  the  ran|
0000a8f0  67 65 20 20 30 2e 2e 32  20 20 74 68 61 74 20 20  |ge  0..2  that  |
0000a900  79 6f 75 20 20 63 61 6e  20 20 73 65 74 20 20 65  |you  can  set  e|
0000a910  69 74 68 65 72 20 77 69  74 68 20 74 68 65 20 43  |ither with the C|
0000a920  4c 53 54 0d 64 69 72 65  63 74 69 76 65 20 6f 72  |LST.directive or|
0000a930  20 74 68 65 20 2d 43 20  63 6f 6d 6d 61 6e 64 20  | the -C command |
0000a940  6c 69 6e 65 20 6f 70 74  69 6f 6e 2e 0d 0d 20 20  |line option...  |
0000a950  20 54 68 65 20 63 6f 64  65 20 6c 69 73 74 69 6e  | The code listin|
0000a960  67 20 6c 65 76 65 6c 73  20 68 61 76 65 20 74 68  |g levels have th|
0000a970  65 20 66 6f 6c 6c 6f 77  69 6e 67 20 6d 65 61 6e  |e following mean|
0000a980  69 6e 67 3a 0d 0d 20 20  20 20 20 20 20 30 20 20  |ing:..       0  |
0000a990  4f 6e 6c 79 20 74 68 65  20 66 69 72 73 74 20 33  |Only the first 3|
0000a9a0  20 62 79 74 65 73 20 67  65 6e 65 72 61 74 65 64  | bytes generated|
0000a9b0  20 62 79 20 61 20 6c 69  6e 65 20 61 72 65 20 6c  | by a line are l|
0000a9c0  69 73 74 65 64 2e 0d 0d  20 20 20 20 20 20 20 31  |isted...       1|
0000a9d0  20 20 41 6c 6c 20 62 79  74 65 73 20 61 72 65 20  |  All bytes are |
0000a9e0  6c 69 73 74 65 64 20 66  72 6f 6d 20 61 6c 6c 20  |listed from all |
0000a9f0  6c 69 6e 65 73 20 65 78  63 65 70 74 20 74 68 65  |lines except the|
0000aa00  20 43 4f 44 45 0d 20 20  20 20 20 20 20 20 20 20  | CODE.          |
0000aa10  64 69 72 65 63 74 69 76  65 2e 0d 0d 20 20 20 20  |directive...    |
0000aa20  20 20 20 32 20 20 41 6c  6c 20 62 79 74 65 73 20  |   2  All bytes |
0000aa30  61 72 65 20 6c 69 73 74  65 64 2c 20 68 6f 77 65  |are listed, howe|
0000aa40  76 65 72 20 74 68 65 79  20 61 72 65 20 67 65 6e  |ver they are gen|
0000aa50  65 72 61 74 65 64 2e 0d  0d 0d 20 20 20 42 79 20  |erated....   By |
0000aa60  64 65 66 61 75 6c 74 2c  20 20 74 68 65 20 41 73  |default,  the As|
0000aa70  73 65 6d 62 6c 65 72 20  73 65 74 73 20 74 68 65  |sembler sets the|
0000aa80  20 63 6f 64 65 20 6c 69  73 74 20 6c 65 76 65 6c  | code list level|
0000aa90  20 74 6f 20 31 2e 20 20  59 6f 75 20 20 63 61 6e  | to 1.  You  can|
0000aaa0  0d 63 68 61 6e 67 65 20  74 68 65 20 64 65 66 61  |.change the defa|
0000aab0  75 6c 74 20 73 65 74 74  69 6e 67 20 69 6e 20 74  |ult setting in t|
0000aac0  68 65 20 2a 41 53 53 45  4d 42 4c 45 20 63 6f 6d  |he *ASSEMBLE com|
0000aad0  6d 61 6e 64 20 62 79 20  75 73 69 6e 67 20 74 68  |mand by using th|
0000aae0  65 20 20 22 2d 43 22 0d  6f 70 74 69 6f 6e 3a 20  |e  "-C".option: |
0000aaf0  74 68 75 73 0d 0d 20 20  20 20 20 20 20 20 20 20  |thus..          |
0000ab00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 2a  |               *|
0000ab10  41 53 53 45 4d 42 4c 45  20 53 4f 55 52 43 45 20  |ASSEMBLE SOURCE |
0000ab20  2d 43 30 0d 0d 77 6f 75  6c 64 20 20 63 61 75 73  |-C0..would  caus|
0000ab30  65 20 20 74 68 65 20 41  73 73 65 6d 62 6c 65 72  |e  the Assembler|
0000ab40  20 74 6f 20 73 74 61 72  74 20 77 69 74 68 20 61  | to start with a|
0000ab50  20 64 65 66 61 75 6c 74  20 63 6f 64 65 20 6c 69  | default code li|
0000ab60  73 74 69 6e 67 20 6c 65  76 65 6c 0d 6f 66 20 30  |sting level.of 0|
0000ab70  2e 0d 0d 20 20 20 57 69  74 68 69 6e 20 74 68 65  |...   Within the|
0000ab80  20 73 6f 75 72 63 65 2c  20 20 79 6f 75 20 63 61  | source,  you ca|
0000ab90  6e 20 63 6f 6e 74 72 6f  6c 20 74 68 65 20 63 6f  |n control the co|
0000aba0  64 65 20 6c 69 73 74 69  6e 67 20 6c 65 76 65 6c  |de listing level|
0000abb0  20 77 69 74 68 20 74 68  65 0d 43 4c 53 54 20 64  | with the.CLST d|
0000abc0  69 72 65 63 74 69 76 65  2e 20 54 68 75 73 3a 0d  |irective. Thus:.|
0000abd0  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
0000abe0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000abf0  43 4c 53 54 20 20 32 0d  0d 77 6f 75 6c 64 20 73  |CLST  2..would s|
0000ac00  65 74 20 74 68 65 20 6c  69 73 74 20 6c 65 76 65  |et the list leve|
0000ac10  6c 20 74 6f 20 32 2e 0d  0d 20 20 20 53 69 6d 70  |l to 2...   Simp|
0000ac20  6c 79 20 77 72 69 74 69  6e 67 0d 0d 20 20 20 20  |ly writing..    |
0000ac30  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000ac40  20 20 20 20 20 20 20 20  20 20 20 20 20 43 4c 53  |             CLS|
0000ac50  54 0d 0d 0d 20 20 20 20  20 20 20 20 20 20 20 20  |T...            |
0000ac60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000ac70  20 20 20 20 20 31 36 0d  0d 0d 0d 0d 0d 1b 47 20  |     16.......G |
0000ac80  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000ac90  20 20 20 20 20 55 53 49  4e 47 20 54 48 45 20 36  |     USING THE 6|
0000aca0  35 43 30 32 20 41 53 53  45 4d 42 4c 45 52 1b 48  |5C02 ASSEMBLER.H|
0000acb0  0d 0d 0d 0d 0d 77 69 74  68 20 6e 6f 20 6f 70 65  |.....with no ope|
0000acc0  72 61 6e 64 20 66 69 65  6c 64 20 77 69 6c 6c 20  |rand field will |
0000acd0  72 65 73 65 74 20 74 68  65 20 76 61 6c 75 65 20  |reset the value |
0000ace0  74 6f 20 74 68 65 20 64  65 66 61 75 6c 74 2c 20  |to the default, |
0000acf0  77 69 74 68 6f 75 74 20  79 6f 75 0d 6e 65 65 64  |without you.need|
0000ad00  69 6e 67 20 74 6f 20 62  75 69 6c 64 20 74 68 69  |ing to build thi|
0000ad10  73 20 76 61 6c 75 65 20  69 6e 74 6f 20 74 68 65  |s value into the|
0000ad20  20 61 63 74 75 61 6c 20  73 6f 75 72 63 65 2e 0d  | actual source..|
0000ad30  0d 0d 1b 2d 01 33 2e 34  20 53 79 6d 62 6f 6c 20  |...-.3.4 Symbol |
0000ad40  74 61 62 6c 65 20 6c 69  73 74 69 6e 67 20 66 6f  |table listing fo|
0000ad50  72 6d 61 74 1b 2d 00 0d  0d 20 20 20 49 66 20 74  |rmat.-...   If t|
0000ad60  68 65 20 73 6f 75 72 63  65 20 6c 69 73 74 69 6e  |he source listin|
0000ad70  67 20 6c 65 76 65 6c 20  69 73 20 6e 6f 74 20 7a  |g level is not z|
0000ad80  65 72 6f 20 61 74 20 74  68 65 20 65 6e 64 20 6f  |ero at the end o|
0000ad90  66 20 74 68 65 20 61 73  73 65 6d 62 6c 79 2c 0d  |f the assembly,.|
0000ada0  74 68 65 20 41 73 73 65  6d 62 6c 65 72 20 77 69  |the Assembler wi|
0000adb0  6c 6c 20 6c 69 73 74 20  74 68 65 20 73 79 6d 62  |ll list the symb|
0000adc0  6f 6c 20 74 61 62 6c 65  2c 20 73 68 6f 77 69 6e  |ol table, showin|
0000add0  67 20 79 6f 75 20 74 68  65 20 76 61 6c 75 65 20  |g you the value |
0000ade0  6f 66 20 61 6c 6c 0d 74  68 65 20 73 79 6d 62 6f  |of all.the symbo|
0000adf0  6c 73 20 64 65 66 69 6e  65 64 20 69 6e 20 74 68  |ls defined in th|
0000ae00  65 20 73 6f 75 72 63 65  2e 0d 0d 20 20 20 54 68  |e source...   Th|
0000ae10  65 20 73 79 6d 62 6f 6c  73 20 61 72 65 20 6c 69  |e symbols are li|
0000ae20  73 74 65 64 20 69 6e 20  61 6c 70 68 61 62 65 74  |sted in alphabet|
0000ae30  69 63 61 6c 20 6f 72 64  65 72 2c 20 61 6e 64 20  |ical order, and |
0000ae40  6f 6e 6c 79 20 74 68 65  20 66 69 72 73 74 20 31  |only the first 1|
0000ae50  33 0d 63 68 61 72 61 63  74 65 72 73 20 6f 66 20  |3.characters of |
0000ae60  65 61 63 68 20 77 69 6c  6c 20 62 65 20 73 68 6f  |each will be sho|
0000ae70  77 6e 2e 20 54 68 65 20  76 61 6c 75 65 20 6f 66  |wn. The value of|
0000ae80  20 65 61 63 68 20 73 79  6d 62 6f 6c 20 69 73 20  | each symbol is |
0000ae90  73 68 6f 77 6e 20 69 6e  0d 68 65 78 61 64 65 63  |shown in.hexadec|
0000aea0  69 6d 61 6c 2e 0d 0d 20  20 20 49 66 20 74 68 65  |imal...   If the|
0000aeb0  20 76 61 6c 75 65 20 69  73 20 73 68 6f 77 6e 20  | value is shown |
0000aec0  61 73 20 22 3f 3f 3f 3f  22 2c 20 74 68 65 20 73  |as "????", the s|
0000aed0  79 6d 62 6f 6c 20 77 61  73 20 75 73 65 64 20 20  |ymbol was used  |
0000aee0  62 75 74 20 20 77 61 73  20 20 6e 6f 74 0d 64 65  |but  was  not.de|
0000aef0  66 69 6e 65 64 2e 20 20  49 66 20 20 74 68 65 20  |fined.  If  the |
0000af00  20 76 61 6c 75 65 20 20  69 73 20 22 2a 2a 2a 2a  | value  is "****|
0000af10  22 2c 20 20 74 68 65 20  73 79 6d 62 6f 6c 20 77  |",  the symbol w|
0000af20  61 73 20 64 65 66 69 6e  65 64 20 6d 6f 72 65 20  |as defined more |
0000af30  74 68 61 6e 0d 6f 6e 63  65 2e 20 20 41 20 22 2d  |than.once.  A "-|
0000af40  22 20 63 68 61 72 61 63  74 65 72 20 61 66 74 65  |" character afte|
0000af50  72 20 74 68 65 20 76 61  6c 75 65 20 69 6e 64 69  |r the value indi|
0000af60  63 61 74 65 73 20 74 68  61 74 20 74 68 65 20 20  |cates that the  |
0000af70  73 79 6d 62 6f 6c 20 20  77 61 73 0d 64 65 66 69  |symbol  was.defi|
0000af80  6e 65 64 2c 20 62 75 74  20 77 61 73 20 6e 6f 74  |ned, but was not|
0000af90  20 75 73 65 64 20 61 6e  79 77 68 65 72 65 20 65  | used anywhere e|
0000afa0  6c 73 65 20 69 6e 20 74  68 65 20 73 6f 75 72 63  |lse in the sourc|
0000afb0  65 2e 0d 0d 0d 1b 2d 01  33 2e 35 20 45 72 72 6f  |e.....-.3.5 Erro|
0000afc0  72 20 72 65 70 6f 72 74  73 1b 2d 00 0d 0d 20 20  |r reports.-...  |
0000afd0  20 54 68 65 20 41 73 73  65 6d 62 6c 65 72 20 77  | The Assembler w|
0000afe0  69 6c 6c 20 6c 69 73 74  20 61 6c 6c 20 6c 69 6e  |ill list all lin|
0000aff0  65 73 20 74 68 61 74 20  67 65 6e 65 72 61 74 65  |es that generate|
0000b000  20 65 72 72 6f 72 73 2c  20 20 72 65 67 61 72 64  | errors,  regard|
0000b010  6c 65 73 73 0d 6f 66 20  20 74 68 65 20 20 6c 69  |less.of  the  li|
0000b020  73 74 69 6e 67 20 6c 65  76 65 6c 2e 20 20 54 68  |sting level.  Th|
0000b030  65 20 65 72 72 6f 72 73  20 61 72 65 20 72 65 70  |e errors are rep|
0000b040  6f 72 74 65 64 20 77 69  74 68 20 73 65 6c 66 2d  |orted with self-|
0000b050  65 78 70 6c 61 6e 61 74  6f 72 79 0d 74 65 78 74  |explanatory.text|
0000b060  20 6d 65 73 73 61 67 65  73 20 66 6f 6c 6c 6f 77  | messages follow|
0000b070  69 6e 67 20 74 68 65 20  6c 69 6e 65 2e 0d 0d 20  |ing the line... |
0000b080  20 20 57 68 65 72 65 20  61 70 70 72 6f 70 72 69  |  Where appropri|
0000b090  61 74 65 2c 20 20 74 68  65 20 41 73 73 65 6d 62  |ate,  the Assemb|
0000b0a0  6c 65 72 20 77 69 6c 6c  20 61 74 74 65 6d 70 74  |ler will attempt|
0000b0b0  20 74 6f 20 69 6e 64 69  63 61 74 65 20 77 68 65  | to indicate whe|
0000b0c0  72 65 20 6f 6e 0d 74 68  65 20 6c 69 6e 65 20 74  |re on.the line t|
0000b0d0  68 65 20 65 72 72 6f 72  20 20 6f 63 63 75 72 72  |he error  occurr|
0000b0e0  65 64 2e 20 20 54 68 65  20 20 74 65 78 74 20 20  |ed.  The  text  |
0000b0f0  79 6f 75 20 20 6d 69 67  68 74 20 20 73 65 65 20  |you  might  see |
0000b100  20 77 6f 75 6c 64 20 20  6c 6f 6f 6b 0d 73 6f 6d  | would  look.som|
0000b110  65 74 68 69 6e 67 20 6c  69 6b 65 3a 0d 0d 20 20  |ething like:..  |
0000b120  20 20 20 20 20 20 20 2a  2a 2a 2a 2a 2a 20 45 72  |       ****** Er|
0000b130  72 20 3a 20 55 6e 64 65  63 6c 61 72 65 64 20 73  |r : Undeclared s|
0000b140  79 6d 62 6f 6c 20 61 74  20 61 62 6f 75 74 20 63  |ymbol at about c|
0000b150  68 61 72 61 63 74 65 72  20 31 39 0d 0d 20 20 20  |haracter 19..   |
0000b160  54 68 69 73 20 20 69 6e  64 69 63 61 74 65 73 20  |This  indicates |
0000b170  20 74 68 61 74 20 20 74  68 65 20 20 65 72 72 6f  | that  the  erro|
0000b180  6e 65 6f 75 73 20 20 73  79 6d 62 6f 6c 20 20 69  |neous  symbol  i|
0000b190  73 20 61 74 20 61 62 6f  75 74 20 74 68 65 20 31  |s at about the 1|
0000b1a0  39 74 68 0d 63 68 61 72  61 63 74 65 72 20 69 6e  |9th.character in|
0000b1b0  20 74 68 65 20 6c 69 6e  65 2c 20 77 68 69 63 68  | the line, which|
0000b1c0  20 73 74 61 72 74 73 20  61 74 20 63 68 61 72 61  | starts at chara|
0000b1d0  63 74 65 72 20 31 2e 20  20 52 65 6d 65 6d 62 65  |cter 1.  Remembe|
0000b1e0  72 2c 20 74 68 6f 75 67  68 2c 0d 74 68 61 74 20  |r, though,.that |
0000b1f0  74 68 65 20 6e 75 6d 62  65 72 20 72 65 66 65 72  |the number refer|
0000b200  73 20 74 6f 20 74 68 65  20 1b 2d 01 73 6f 75 72  |s to the .-.sour|
0000b210  63 65 1b 2d 00 20 6c 69  6e 65 3a 20 20 74 68 65  |ce.-. line:  the|
0000b220  20 6c 69 73 74 69 6e 67  20 6c 69 6e 65 20 77 69  | listing line wi|
0000b230  6c 6c 20 68 61 76 65 0d  65 78 70 61 6e 64 65 64  |ll have.expanded|
0000b240  20 61 6e 79 20 54 41 42  20 63 68 61 72 61 63 74  | any TAB charact|
0000b250  65 72 73 20 79 6f 75 20  75 73 65 64 2c 20 20 61  |ers you used,  a|
0000b260  6e 64 20 74 68 65 20 6e  75 6d 62 65 72 20 20 77  |nd the number  w|
0000b270  69 6c 6c 20 20 74 68 65  6e 20 20 6e 6f 74 0d 63  |ill  then  not.c|
0000b280  6f 72 72 65 73 70 6f 6e  64 20 74 6f 20 77 68 61  |orrespond to wha|
0000b290  74 20 79 6f 75 20 73 65  65 20 6f 6e 20 74 68 65  |t you see on the|
0000b2a0  20 70 61 67 65 2e 0d 0d  0d 0d 1b 2d 01 33 2e 36  | page......-.3.6|
0000b2b0  20 4f 75 74 70 75 74 20  70 61 67 65 20 63 6f 6e  | Output page con|
0000b2c0  74 72 6f 6c 1b 2d 00 0d  0d 0d 20 20 20 54 68 65  |trol.-....   The|
0000b2d0  20 20 41 73 73 65 6d 62  6c 65 72 20 20 70 72 6f  |  Assembler  pro|
0000b2e0  76 69 64 65 73 20 61 20  6e 75 6d 62 65 72 20 6f  |vides a number o|
0000b2f0  66 20 64 69 72 65 63 74  69 76 65 73 20 74 68 61  |f directives tha|
0000b300  74 20 79 6f 75 20 63 61  6e 20 75 73 65 20 74 6f  |t you can use to|
0000b310  0d 73 70 65 63 69 66 79  20 74 68 65 20 65 78 61  |.specify the exa|
0000b320  63 74 20 66 6f 72 6d 61  74 20 6f 66 20 74 68 65  |ct format of the|
0000b330  20 6f 75 74 70 75 74 20  70 61 67 65 2c 20 61 6e  | output page, an|
0000b340  64 20 74 6f 20 6c 65 74  20 79 6f 75 20 74 61 69  |d to let you tai|
0000b350  6c 6f 72 20 74 68 65 0d  6c 69 73 74 69 6e 67 20  |lor the.listing |
0000b360  74 6f 20 79 6f 75 72 20  65 78 61 63 74 20 6e 65  |to your exact ne|
0000b370  65 64 73 2e 0d 0d 0d 20  20 20 20 20 1b 2d 01 33  |eds....     .-.3|
0000b380  2e 36 2e 31 20 53 65 74  74 69 6e 67 20 70 61 67  |.6.1 Setting pag|
0000b390  65 20 64 69 6d 65 6e 73  69 6f 6e 73 1b 2d 00 0d  |e dimensions.-..|
0000b3a0  0d 20 20 20 20 20 54 68  65 20 50 41 47 45 20 64  |.     The PAGE d|
0000b3b0  69 72 65 63 74 69 76 65  20 64 65 66 69 6e 65 73  |irective defines|
0000b3c0  20 74 68 65 20 73 69 7a  65 20 6f 66 20 74 68 65  | the size of the|
0000b3d0  20 70 61 67 65 20 79 6f  75 20 61 72 65 20 75 73  | page you are us|
0000b3e0  69 6e 67 2e 20 49 74 0d  20 20 20 20 20 74 61 6b  |ing. It.     tak|
0000b3f0  65 73 20 74 77 6f 20 70  61 72 61 6d 65 74 65 72  |es two parameter|
0000b400  73 20 77 68 69 63 68 20  61 72 65 20 74 68 65 20  |s which are the |
0000b410  74 6f 74 61 6c 20 64 65  70 74 68 20 20 6f 66 20  |total depth  of |
0000b420  20 74 68 65 20 20 70 61  67 65 20 20 69 6e 0d 20  | the  page  in. |
0000b430  20 20 20 20 6c 69 6e 65  73 2c 20 61 6e 64 20 74  |    lines, and t|
0000b440  68 65 20 77 69 64 74 68  20 69 6e 20 63 68 61 72  |he width in char|
0000b450  61 63 74 65 72 73 20 79  6f 75 20 77 69 73 68 20  |acters you wish |
0000b460  70 72 69 6e 74 65 64 2e  0d 0d 0d 20 20 20 20 20  |printed....     |
0000b470  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000b480  20 20 20 20 20 20 20 20  20 20 20 20 31 37 0d 0d  |            17..|
0000b490  0d 0d 0d 0d 1b 47 20 20  20 20 20 20 20 20 20 20  |.....G          |
0000b4a0  20 20 20 20 20 20 20 20  20 20 20 20 55 53 49 4e  |            USIN|
0000b4b0  47 20 54 48 45 20 36 35  43 30 32 20 41 53 53 45  |G THE 65C02 ASSE|
0000b4c0  4d 42 4c 45 52 1b 48 0d  0d 0d 0d 0d 20 20 20 20  |MBLER.H.....    |
0000b4d0  20 54 68 75 73 2c 0d 0d  20 20 20 20 20 20 20 20  | Thus,..        |
0000b4e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000b4f0  20 20 20 20 50 41 47 45  20 20 20 36 36 2c 31 33  |    PAGE   66,13|
0000b500  32 0d 0d 20 20 20 20 20  74 65 6c 6c 73 20 74 68  |2..     tells th|
0000b510  65 20 41 73 73 65 6d 62  6c 65 72 20 74 68 61 74  |e Assembler that|
0000b520  20 74 68 65 20 70 61 67  65 20 69 73 20 36 36 20  | the page is 66 |
0000b530  6c 69 6e 65 73 20 64 65  65 70 2c 20 20 61 6e 64  |lines deep,  and|
0000b540  20 74 68 61 74 20 79 6f  75 0d 20 20 20 20 20 77  | that you.     w|
0000b550  69 73 68 20 6c 69 6e 65  73 20 74 6f 20 63 6f 6e  |ish lines to con|
0000b560  74 61 69 6e 20 61 20 6d  61 78 69 6d 75 6d 20 6f  |tain a maximum o|
0000b570  66 20 31 33 32 20 63 68  61 72 61 63 74 65 72 73  |f 132 characters|
0000b580  2e 20 20 54 68 65 20 41  73 73 65 6d 62 6c 65 72  |.  The Assembler|
0000b590  0d 20 20 20 20 20 77 69  6c 6c 20 61 6c 77 61 79  |.     will alway|
0000b5a0  73 20 61 6c 6c 6f 77 20  61 20 73 6d 61 6c 6c 20  |s allow a small |
0000b5b0  67 61 70 20 61 74 20 74  68 65 20 65 6e 64 20 6f  |gap at the end o|
0000b5c0  66 20 74 68 65 20 70 61  67 65 20 74 6f 20 61 76  |f the page to av|
0000b5d0  6f 69 64 20 74 68 65 0d  20 20 20 20 20 70 65 72  |oid the.     per|
0000b5e0  66 6f 72 61 74 69 6f 6e  73 2c 20 61 6e 64 20 77  |forations, and w|
0000b5f0  69 6c 6c 20 74 72 75 6e  63 61 74 65 20 61 6e 79  |ill truncate any|
0000b600  20 6c 69 6e 65 73 20 6c  6f 6e 67 65 72 20 74 68  | lines longer th|
0000b610  61 6e 20 74 68 65 20 6d  61 78 69 6d 75 6d 0d 20  |an the maximum. |
0000b620  20 20 20 20 77 69 64 74  68 20 79 6f 75 20 73 70  |    width you sp|
0000b630  65 63 69 66 79 2e 0d 0d  20 20 20 20 20 54 68 65  |ecify...     The|
0000b640  20 20 76 61 6c 75 65 20  6f 66 20 74 68 65 20 77  |  value of the w|
0000b650  69 64 74 68 20 79 6f 75  20 64 65 66 69 6e 65 20  |idth you define |
0000b660  77 69 74 68 20 50 41 47  45 20 62 65 63 6f 6d 65  |with PAGE become|
0000b670  73 20 65 66 66 65 63 74  69 76 65 20 61 74 0d 20  |s effective at. |
0000b680  20 20 20 20 6f 6e 63 65  2e 20 20 54 68 65 20 64  |    once.  The d|
0000b690  65 70 74 68 2c 20 74 68  6f 75 67 68 2c 20 69 73  |epth, though, is|
0000b6a0  20 6e 6f 74 20 75 73 65  64 20 75 6e 74 69 6c 20  | not used until |
0000b6b0  74 68 65 20 6e 65 78 74  20 70 61 67 65 20 20 74  |the next page  t|
0000b6c0  68 72 6f 77 2c 0d 20 20  20 20 20 73 6f 20 20 79  |hrow,.     so  y|
0000b6d0  6f 75 20 77 6f 75 6c 64  20 6e 6f 72 6d 61 6c 6c  |ou would normall|
0000b6e0  79 20 66 6f 6c 6c 6f 77  20 74 68 65 20 64 69 72  |y follow the dir|
0000b6f0  65 63 74 69 76 65 20 77  69 74 68 20 61 20 54 54  |ective with a TT|
0000b700  4c 20 6f 72 20 61 20 53  4b 50 20 48 0d 20 20 20  |L or a SKP H.   |
0000b710  20 20 64 69 72 65 63 74  69 76 65 2e 0d 0d 20 20  |  directive...  |
0000b720  20 20 20 42 79 20 64 65  66 61 75 6c 74 2c 20 20  |   By default,  |
0000b730  74 68 65 20 41 73 73 65  6d 62 6c 65 72 20 77 69  |the Assembler wi|
0000b740  6c 6c 20 70 72 69 6e 74  20 6c 69 6e 65 73 20 6f  |ll print lines o|
0000b750  66 20 38 30 20 20 63 68  61 72 61 63 74 65 72 73  |f 80  characters|
0000b760  20 20 6f 6e 0d 20 20 20  20 20 70 61 70 65 72 20  |  on.     paper |
0000b770  74 68 61 74 20 69 73 20  36 36 20 6c 69 6e 65 73  |that is 66 lines|
0000b780  20 64 65 65 70 2e 20 49  74 20 6d 6f 76 65 73 20  | deep. It moves |
0000b790  74 6f 20 74 68 65 20 74  6f 70 20 6f 66 20 61 20  |to the top of a |
0000b7a0  6e 65 77 20 70 61 67 65  20 62 79 0d 20 20 20 20  |new page by.    |
0000b7b0  20 73 65 6e 64 69 6e 67  20 61 20 46 6f 72 6d 20  | sending a Form |
0000b7c0  46 65 65 64 20 28 24 30  43 29 20 63 68 61 72 61  |Feed ($0C) chara|
0000b7d0  63 74 65 72 20 74 6f 20  74 68 65 20 70 72 69 6e  |cter to the prin|
0000b7e0  74 65 72 2e 0d 0d 0d 20  20 20 20 20 1b 2d 01 33  |ter....     .-.3|
0000b7f0  2e 36 2e 32 20 53 65 74  74 69 6e 67 20 74 68 65  |.6.2 Setting the|
0000b800  20 70 61 67 65 20 74 69  74 6c 65 1b 2d 00 0d 0d  | page title.-...|
0000b810  0d 20 20 20 20 20 54 68  65 20 54 54 4c 20 64 69  |.     The TTL di|
0000b820  72 65 63 74 69 76 65 20  6c 65 74 73 20 79 6f 75  |rective lets you|
0000b830  20 73 65 74 20 75 70 20  61 20 70 61 67 65 20 74  | set up a page t|
0000b840  69 74 6c 65 20 74 68 61  74 20 69 73 20 70 72 69  |itle that is pri|
0000b850  6e 74 65 64 20 6f 6e 0d  20 20 20 20 20 74 68 65  |nted on.     the|
0000b860  20 20 74 6f 70 20 20 6f  66 20 20 65 76 65 72 79  |  top  of  every|
0000b870  20 20 6c 69 73 74 69 6e  67 20 20 70 61 67 65 2e  |  listing  page.|
0000b880  20 20 54 68 65 20 20 74  69 74 6c 65 20 20 63 61  |  The  title  ca|
0000b890  6e 20 20 62 65 20 75 70  20 74 6f 20 32 30 0d 20  |n  be up to 20. |
0000b8a0  20 20 20 20 63 68 61 72  61 63 74 65 72 73 20 6c  |    characters l|
0000b8b0  6f 6e 67 2c 20 61 6e 64  20 63 61 6e 20 63 6f 6e  |ong, and can con|
0000b8c0  74 61 69 6e 20 61 6e 79  20 70 72 69 6e 74 61 62  |tain any printab|
0000b8d0  6c 65 20 74 65 78 74 2e  0d 0d 20 20 20 20 20 46  |le text...     F|
0000b8e0  6f 72 20 65 78 61 6d 70  6c 65 2c 0d 0d 20 20 20  |or example,..   |
0000b8f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000b900  20 20 20 20 20 20 54 54  4c 20 20 27 53 63 72 65  |      TTL  'Scre|
0000b910  65 6e 20 44 75 6d 70 65  72 27 0d 0d 20 20 20 20  |en Dumper'..    |
0000b920  20 77 69 6c 6c 20 70 72  69 6e 74 20 22 53 63 72  | will print "Scr|
0000b930  65 65 6e 20 44 75 6d 70  65 72 22 20 61 74 20 74  |een Dumper" at t|
0000b940  68 65 20 74 6f 70 20 6f  66 20 65 61 63 68 20 70  |he top of each p|
0000b950  61 67 65 2e 0d 0d 20 20  20 20 20 54 68 65 20 54  |age...     The T|
0000b960  54 4c 20 64 69 72 65 63  74 69 76 65 20 77 69 6c  |TL directive wil|
0000b970  6c 20 63 61 75 73 65 20  61 20 70 61 67 65 20 74  |l cause a page t|
0000b980  68 72 6f 77 20 74 6f 20  20 6f 63 63 75 72 20 20  |hrow to  occur  |
0000b990  69 6d 6d 65 64 69 61 74  65 6c 79 2c 0d 20 20 20  |immediately,.   |
0000b9a0  20 20 61 6e 64 20 74 68  65 20 6e 65 78 74 20 70  |  and the next p|
0000b9b0  61 67 65 20 6f 75 74 70  75 74 20 77 69 6c 6c 20  |age output will |
0000b9c0  75 73 65 20 74 68 65 20  74 69 74 6c 65 20 69 74  |use the title it|
0000b9d0  20 64 65 66 69 6e 65 73  2e 0d 0d 0d 0d 20 20 20  | defines.....   |
0000b9e0  20 20 1b 2d 01 33 2e 36  2e 33 20 53 65 74 74 69  |  .-.3.6.3 Setti|
0000b9f0  6e 67 20 74 68 65 20 74  69 6d 65 73 74 61 6d 70  |ng the timestamp|
0000ba00  1b 2d 00 0d 0d 0d 20 20  20 20 20 49 66 20 20 79  |.-....     If  y|
0000ba10  6f 75 20 61 72 65 20 75  73 69 6e 67 20 61 20 4d  |ou are using a M|
0000ba20  61 73 74 65 72 20 31 32  38 2c 20 20 74 68 65 20  |aster 128,  the |
0000ba30  41 73 73 65 6d 62 6c 65  72 20 77 69 6c 6c 20 61  |Assembler will a|
0000ba40  75 74 6f 6d 61 74 69 63  61 6c 6c 79 0d 20 20 20  |utomatically.   |
0000ba50  20 20 70 72 69 6e 74 20  74 68 65 20 63 75 72 72  |  print the curr|
0000ba60  65 6e 74 20 64 61 74 65  20 61 6e 64 20 74 69 6d  |ent date and tim|
0000ba70  65 20 61 74 20 74 68 65  20 74 6f 70 20 6f 66 20  |e at the top of |
0000ba80  65 61 63 68 20 20 6f 75  74 70 75 74 20 20 70 61  |each  output  pa|
0000ba90  67 65 2c 0d 20 20 20 20  20 74 61 6b 69 6e 67 20  |ge,.     taking |
0000baa0  20 74 68 65 20 20 76 61  6c 75 65 73 20 66 72 6f  | the  values fro|
0000bab0  6d 20 74 68 65 20 62 75  69 6c 74 2d 69 6e 20 72  |m the built-in r|
0000bac0  65 61 6c 2d 74 69 6d 65  20 63 6c 6f 63 6b 2e 20  |eal-time clock. |
0000bad0  20 54 68 65 20 6f 74 68  65 72 0d 20 20 20 20 20  | The other.     |
0000bae0  42 42 43 20 6d 6f 64 65  6c 73 20 64 6f 20 6e 6f  |BBC models do no|
0000baf0  74 20 63 6f 6e 74 61 69  6e 20 63 6c 6f 63 6b 73  |t contain clocks|
0000bb00  2c 20 20 73 6f 20 74 68  65 20 54 49 4d 45 20 64  |,  so the TIME d|
0000bb10  69 72 65 63 74 69 76 65  20 6c 65 74 73 20 79 6f  |irective lets yo|
0000bb20  75 0d 20 20 20 20 20 73  69 6d 75 6c 61 74 65 20  |u.     simulate |
0000bb30  74 68 65 20 65 66 66 65  63 74 20 62 79 20 64 65  |the effect by de|
0000bb40  66 69 6e 69 6e 67 20 74  68 65 20 73 74 72 69 6e  |fining the strin|
0000bb50  67 20 75 73 65 64 2e 0d  0d 20 20 20 20 20 54 68  |g used...     Th|
0000bb60  65 20 54 49 4d 45 20 64  69 72 65 63 74 69 76 65  |e TIME directive|
0000bb70  20 61 6c 6c 6f 77 73 20  79 6f 75 20 74 6f 20 64  | allows you to d|
0000bb80  65 66 69 6e 65 20 61 20  20 73 74 72 69 6e 67 20  |efine a  string |
0000bb90  20 6f 66 20 20 75 70 20  20 74 6f 20 20 32 35 0d  | of  up  to  25.|
0000bba0  20 20 20 20 20 63 68 61  72 61 63 74 65 72 73 20  |     characters |
0000bbb0  20 74 68 61 74 20 20 77  69 6c 6c 20 61 70 70 65  | that  will appe|
0000bbc0  61 72 20 69 6e 20 74 68  65 20 70 61 67 65 20 68  |ar in the page h|
0000bbd0  65 61 64 65 72 2e 20 20  54 68 65 20 73 74 72 69  |eader.  The stri|
0000bbe0  6e 67 20 63 61 6e 0d 20  20 20 20 20 63 6f 6e 74  |ng can.     cont|
0000bbf0  61 69 6e 20 61 6e 79 20  70 72 69 6e 74 61 62 6c  |ain any printabl|
0000bc00  65 20 63 68 61 72 61 63  74 65 72 73 3a 20 69 74  |e characters: it|
0000bc10  20 69 73 20 6e 6f 74 20  63 6f 6e 73 74 72 61 69  | is not constrai|
0000bc20  6e 65 64 20 74 6f 20 20  62 65 20 20 61 0d 20 20  |ned to  be  a.  |
0000bc30  20 20 20 64 61 74 65 20  20 61 6e 64 20 20 74 69  |   date  and  ti|
0000bc40  6d 65 20 20 76 61 6c 75  65 2c 20 20 73 6f 20 20  |me  value,  so  |
0000bc50  79 6f 75 20 63 61 6e 20  75 73 65 20 69 74 20 61  |you can use it a|
0000bc60  73 20 61 20 73 75 62 2d  74 69 74 6c 65 20 69 66  |s a sub-title if|
0000bc70  20 79 6f 75 0d 20 20 20  20 20 77 69 73 68 2e 0d  | you.     wish..|
0000bc80  0d 0d 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |...             |
0000bc90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000bca0  20 20 20 20 31 38 0d 0d  0d 0d 0d 0d 1b 47 20 20  |    18.......G  |
0000bcb0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000bcc0  20 20 20 20 55 53 49 4e  47 20 54 48 45 20 36 35  |    USING THE 65|
0000bcd0  43 30 32 20 41 53 53 45  4d 42 4c 45 52 1b 48 0d  |C02 ASSEMBLER.H.|
0000bce0  0d 0d 0d 20 20 20 20 20  46 6f 72 20 65 78 61 6d  |...     For exam|
0000bcf0  70 6c 65 2c 20 79 6f 75  20 63 6f 75 6c 64 20 75  |ple, you could u|
0000bd00  73 65 0d 0d 20 20 20 20  20 20 20 20 20 20 20 20  |se..            |
0000bd10  20 20 20 20 20 20 20 20  20 20 20 20 54 49 4d 45  |            TIME|
0000bd20  20 20 27 46 72 69 64 61  79 20 61 74 20 31 30 33  |  'Friday at 103|
0000bd30  30 27 0d 0d 20 20 20 20  20 6f 72 0d 0d 20 20 20  |0'..     or..   |
0000bd40  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000bd50  20 20 20 20 20 20 54 49  4d 45 20 20 27 46 69 72  |      TIME  'Fir|
0000bd60  73 74 20 4d 6f 64 75 6c  65 27 0d 0d 0d 20 20 20  |st Module'...   |
0000bd70  20 20 54 68 65 20 64 69  72 65 63 74 69 76 65 20  |  The directive |
0000bd80  69 73 20 69 67 6e 6f 72  65 64 20 6f 6e 20 61 20  |is ignored on a |
0000bd90  4d 61 73 74 65 72 20 31  32 38 2c 20 20 73 6f 20  |Master 128,  so |
0000bda0  74 68 65 72 65 20 69 73  20 6e 6f 20 6e 65 65 64  |there is no need|
0000bdb0  20 74 6f 0d 20 20 20 20  20 63 68 61 6e 67 65 20  | to.     change |
0000bdc0  61 20 73 6f 75 72 63 65  20 74 68 61 74 20 69 73  |a source that is|
0000bdd0  20 62 65 69 6e 67 20 61  73 73 65 6d 62 6c 65 64  | being assembled|
0000bde0  20 6f 6e 20 62 6f 74 68  20 61 20 6d 6f 64 65 6c  | on both a model|
0000bdf0  20 42 20 20 61 6e 64 20  20 61 0d 20 20 20 20 20  | B  and  a.     |
0000be00  4d 61 73 74 65 72 20 31  32 38 2e 0d 0d 20 20 20  |Master 128...   |
0000be10  20 20 49 74 20 20 69 73  20 20 70 6f 73 73 69 62  |  It  is  possib|
0000be20  6c 65 20 20 74 6f 20 20  63 75 73 74 6f 6d 69 73  |le  to  customis|
0000be30  65 20 20 74 68 65 20 41  73 73 65 6d 62 6c 65 72  |e  the Assembler|
0000be40  20 74 6f 20 75 73 65 20  61 20 72 65 61 6c 2d 74  | to use a real-t|
0000be50  69 6d 65 0d 20 20 20 20  20 63 6c 6f 63 6b 20 66  |ime.     clock f|
0000be60  69 74 74 65 64 20 74 6f  20 61 20 6d 61 63 68 69  |itted to a machi|
0000be70  6e 65 20 6f 74 68 65 72  20 74 68 61 6e 20 61 20  |ne other than a |
0000be80  4d 61 73 74 65 72 20 20  31 32 38 3a 20 20 66 6f  |Master  128:  fo|
0000be90  72 20 20 64 65 74 61 69  6c 73 0d 20 20 20 20 20  |r  details.     |
0000bea0  73 65 65 20 41 70 70 65  6e 64 69 78 20 35 2e 0d  |see Appendix 5..|
0000beb0  0d 0d 20 20 20 20 20 1b  2d 01 33 2e 36 2e 34 20  |..     .-.3.6.4 |
0000bec0  50 61 67 65 20 6c 61 79  6f 75 74 20 64 69 72 65  |Page layout dire|
0000bed0  63 74 69 76 65 73 1b 2d  00 0d 0d 0d 20 20 20 20  |ctives.-....    |
0000bee0  20 54 68 65 72 65 20 61  72 65 20 61 20 6e 75 6d  | There are a num|
0000bef0  62 65 72 20 6f 66 20 64  69 72 65 63 74 69 76 65  |ber of directive|
0000bf00  73 20 74 68 61 74 20 6c  65 74 20 79 6f 75 20 6c  |s that let you l|
0000bf10  61 79 20 74 68 65 20 6f  75 74 70 75 74 20 70 61  |ay the output pa|
0000bf20  67 65 0d 20 20 20 20 20  6f 75 74 20 20 69 6e 20  |ge.     out  in |
0000bf30  20 6d 6f 72 65 20 20 64  65 74 61 69 6c 2c 20 20  | more  detail,  |
0000bf40  73 6f 20 79 6f 75 20 63  61 6e 20 64 65 6c 69 6d  |so you can delim|
0000bf50  69 74 20 73 65 63 74 69  6f 6e 73 20 6f 66 20 73  |it sections of s|
0000bf60  6f 75 72 63 65 20 66 6f  72 0d 20 20 20 20 20 65  |ource for.     e|
0000bf70  61 73 69 65 72 20 69 6e  73 70 65 63 74 69 6f 6e  |asier inspection|
0000bf80  20 61 6e 64 20 63 6f 6e  66 69 67 75 72 65 20 20  | and configure  |
0000bf90  74 68 65 20 20 65 78 61  63 74 20 20 61 70 70 65  |the  exact  appe|
0000bfa0  61 72 61 6e 63 65 20 20  6f 66 20 20 65 61 63 68  |arance  of  each|
0000bfb0  0d 20 20 20 20 20 6c 69  6e 65 2e 0d 0d 20 20 20  |.     line...   |
0000bfc0  20 20 54 68 65 20 20 52  45 50 20 20 64 69 72 65  |  The  REP  dire|
0000bfd0  63 74 69 76 65 20 20 70  72 6f 76 69 64 65 73 20  |ctive  provides |
0000bfe0  20 61 20 20 63 6f 6e 76  65 6e 69 65 6e 74 20 20  | a  convenient  |
0000bff0  77 61 79 20 20 6f 66 20  20 73 65 70 61 72 61 74  |way  of  separat|
0000c000  69 6e 67 0d 20 20 20 20  20 73 65 63 74 69 6f 6e  |ing.     section|
0000c010  73 20 6f 66 20 63 6f 64  65 20 69 6e 20 74 68 65  |s of code in the|
0000c020  20 6c 69 73 74 69 6e 67  2e 20 46 6f 72 20 65 78  | listing. For ex|
0000c030  61 6d 70 6c 65 2c 0d 0d  20 20 20 20 20 20 20 20  |ample,..        |
0000c040  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000c050  20 20 20 20 20 20 20 52  45 50 20 20 38 30 0d 0d  |       REP  80..|
0000c060  20 20 20 20 20 77 69 6c  6c 20 70 72 69 6e 74 20  |     will print |
0000c070  61 20 6c 69 6e 65 20 6f  66 20 22 2a 22 20 63 68  |a line of "*" ch|
0000c080  61 72 61 63 74 65 72 73  20 69 6e 20 74 68 65 20  |aracters in the |
0000c090  6c 69 73 74 69 6e 67 20  66 6f 72 20 20 79 6f 75  |listing for  you|
0000c0a0  20 20 28 61 6e 64 0d 20  20 20 20 20 74 61 6b 65  |  (and.     take|
0000c0b0  73 20 20 6d 75 63 68 20  20 6c 65 73 73 20 20 73  |s  much  less  s|
0000c0c0  70 61 63 65 20 69 6e 20  74 68 65 20 73 6f 75 72  |pace in the sour|
0000c0d0  63 65 20 66 69 6c 65 20  74 68 61 6e 20 74 68 61  |ce file than tha|
0000c0e0  74 20 6c 69 6e 65 20 69  74 73 65 6c 66 0d 20 20  |t line itself.  |
0000c0f0  20 20 20 77 6f 75 6c 64  29 2e 0d 0d 20 20 20 20  |   would)...    |
0000c100  20 54 68 65 20 43 48 52  20 64 69 72 65 63 74 69  | The CHR directi|
0000c110  76 65 20 6c 65 74 73 20  79 6f 75 20 63 68 61 6e  |ve lets you chan|
0000c120  67 65 20 74 68 65 20 63  68 61 72 61 63 74 65 72  |ge the character|
0000c130  20 75 73 65 64 20 74 6f  20 6d 61 6b 65 20 20 74  | used to make  t|
0000c140  68 65 0d 20 20 20 20 20  6c 69 6e 65 2c 20 20 73  |he.     line,  s|
0000c150  6f 20 20 74 68 61 74 2c  20 20 66 6f 72 20 20 65  |o  that,  for  e|
0000c160  78 61 6d 70 6c 65 20 20  79 6f 75 20 20 63 6f 75  |xample  you  cou|
0000c170  6c 64 20 20 73 65 6c 65  63 74 20 20 6c 69 6e 65  |ld  select  line|
0000c180  73 20 6f 66 20 20 22 2d  22 0d 20 20 20 20 20 63  |s of  "-".     c|
0000c190  68 61 72 61 63 74 65 72  73 20 77 69 74 68 0d 0d  |haracters with..|
0000c1a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
0000c1c0  43 48 52 20 20 2d 0d 0d  0d 20 20 20 20 20 54 68  |CHR  -...     Th|
0000c1d0  65 20 53 4b 50 20 64 69  72 65 63 74 69 76 65 20  |e SKP directive |
0000c1e0  6c 65 74 73 20 20 79 6f  75 20 20 62 72 65 61 6b  |lets  you  break|
0000c1f0  20 20 74 68 65 20 20 6c  69 73 74 69 6e 67 20 20  |  the  listing  |
0000c200  75 70 20 20 66 6f 72 20  20 65 61 73 69 65 72 0d  |up  for  easier.|
0000c210  20 20 20 20 20 72 65 61  64 69 6e 67 2e 20 46 6f  |     reading. Fo|
0000c220  72 20 65 78 61 6d 70 6c  65 2c 0d 0d 20 20 20 20  |r example,..    |
0000c230  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000c240  20 20 20 20 20 20 20 20  20 20 20 20 53 4b 50 20  |            SKP |
0000c250  20 35 0d 0d 20 20 20 20  20 77 6f 75 6c 64 20 6c  | 5..     would l|
0000c260  65 61 76 65 20 61 20 35  20 6c 69 6e 65 20 73 70  |eave a 5 line sp|
0000c270  61 63 65 20 6f 6e 20 74  68 65 20 70 61 67 65 2e  |ace on the page.|
0000c280  20 54 68 65 20 66 6f 72  6d 61 74 0d 0d 20 20 20  | The format..   |
0000c290  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000c2a0  20 20 20 20 20 20 20 20  20 20 20 20 20 53 4b 50  |             SKP|
0000c2b0  20 20 48 0d 0d 20 20 20  20 20 63 61 75 73 65 73  |  H..     causes|
0000c2c0  20 20 74 68 65 20 20 41  73 73 65 6d 62 6c 65 72  |  the  Assembler|
0000c2d0  20 20 74 6f 20 20 73 74  61 72 74 20 20 61 20 6e  |  to  start  a n|
0000c2e0  65 77 20 70 61 67 65 2e  20 20 4e 6f 74 65 20 74  |ew page.  Note t|
0000c2f0  68 61 74 20 74 68 65 20  53 4b 50 0d 20 20 20 20  |hat the SKP.    |
0000c300  20 64 69 72 65 63 74 69  76 65 20 69 74 73 65 6c  | directive itsel|
0000c310  66 20 77 69 6c 6c 20 6e  65 76 65 72 20 20 62 65  |f will never  be|
0000c320  20 20 6c 69 73 74 65 64  20 20 75 6e 6c 65 73 73  |  listed  unless|
0000c330  20 20 69 74 20 20 63 6f  6e 74 61 69 6e 73 20 20  |  it  contains  |
0000c340  61 6e 0d 20 20 20 20 20  65 72 72 6f 72 2e 0d 0d  |an.     error...|
0000c350  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
0000c360  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000c370  20 20 31 39 0d 0d 0d 0d  0d 0d 1b 47 20 20 20 20  |  19.......G    |
0000c380  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000c390  20 20 55 53 49 4e 47 20  54 48 45 20 36 35 43 30  |  USING THE 65C0|
0000c3a0  32 20 41 53 53 45 4d 42  4c 45 52 1b 48 0d 0d 0d  |2 ASSEMBLER.H...|
0000c3b0  0d 1b 2d 01 33 2e 37 20  43 6f 6e 74 72 6f 6c 6c  |..-.3.7 Controll|
0000c3c0  69 6e 67 20 74 68 65 20  6f 75 74 70 75 74 20 64  |ing the output d|
0000c3d0  65 73 74 69 6e 61 74 69  6f 6e 1b 2d 00 0d 0d 0d  |estination.-....|
0000c3e0  20 20 20 42 79 20 64 65  66 61 75 6c 74 2c 20 74  |   By default, t|
0000c3f0  68 65 20 41 73 73 65 6d  62 6c 65 72 20 73 65 6e  |he Assembler sen|
0000c400  64 73 20 74 68 65 20 61  73 73 65 6d 62 6c 79 20  |ds the assembly |
0000c410  6c 69 73 74 69 6e 67 20  74 6f 20 74 68 65 20 73  |listing to the s|
0000c420  63 72 65 65 6e 2c 0d 69  6e 20 77 68 61 74 65 76  |creen,.in whatev|
0000c430  65 72 20 6d 6f 64 65 20  79 6f 75 20 68 61 76 65  |er mode you have|
0000c440  20 73 65 6c 65 63 74 65  64 2e 20 20 59 6f 75 20  | selected.  You |
0000c450  63 61 6e 2c 20 74 68 6f  75 67 68 2c 20 63 68 6f  |can, though, cho|
0000c460  6f 73 65 20 74 6f 20 64  69 72 65 63 74 0d 74 68  |ose to direct.th|
0000c470  65 20 61 73 73 65 6d 62  6c 79 20 6c 69 73 74 69  |e assembly listi|
0000c480  6e 67 20 74 6f 20 61 20  70 72 69 6e 74 65 72 3b  |ng to a printer;|
0000c490  20 6f 72 20 74 6f 20 6f  75 74 70 75 74 20 69 74  | or to output it|
0000c4a0  20 74 6f 20 61 20 66 69  6c 65 2e 0d 0d 0d 0d 20  | to a file..... |
0000c4b0  20 20 20 20 1b 2d 01 33  2e 37 2e 31 20 20 53 65  |    .-.3.7.1  Se|
0000c4c0  6e 64 69 6e 67 20 74 68  65 20 6c 69 73 74 69 6e  |nding the listin|
0000c4d0  67 20 74 6f 20 61 20 70  72 69 6e 74 65 72 1b 2d  |g to a printer.-|
0000c4e0  00 0d 0d 0d 20 20 20 20  20 59 6f 75 20 20 63 61  |....     You  ca|
0000c4f0  6e 20 20 64 69 72 65 63  74 20 20 6f 75 74 70 75  |n  direct  outpu|
0000c500  74 20 20 74 6f 20 20 74  68 65 20 20 63 75 72 72  |t  to  the  curr|
0000c510  65 6e 74 6c 79 20 20 73  65 6c 65 63 74 65 64 20  |ently  selected |
0000c520  70 72 69 6e 74 65 72 20  62 79 0d 20 20 20 20 20  |printer by.     |
0000c530  73 70 65 63 69 66 79 69  6e 67 20 74 68 65 20 20  |specifying the  |
0000c540  22 2d 50 22 20 20 6f 70  74 69 6f 6e 20 20 69 6e  |"-P"  option  in|
0000c550  20 20 74 68 65 20 20 63  6f 6d 6d 61 6e 64 20 20  |  the  command  |
0000c560  6c 69 6e 65 2e 20 20 54  68 75 73 2c 20 20 66 6f  |line.  Thus,  fo|
0000c570  72 0d 20 20 20 20 20 65  78 61 6d 70 6c 65 2c 0d  |r.     example,.|
0000c580  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
0000c590  20 20 20 20 20 20 20 20  2a 41 53 53 45 4d 42 4c  |        *ASSEMBL|
0000c5a0  45 20 53 4f 55 52 43 45  20 2d 4c 32 20 2d 50 0d  |E SOURCE -L2 -P.|
0000c5b0  0d 20 20 20 20 20 77 6f  75 6c 64 20 20 61 73 73  |.     would  ass|
0000c5c0  65 6d 62 6c 65 20 20 66  72 6f 6d 20 73 6f 75 72  |emble  from sour|
0000c5d0  63 65 20 66 69 6c 65 20  53 4f 55 52 43 45 20 61  |ce file SOURCE a|
0000c5e0  6e 64 20 73 65 6e 64 20  74 68 65 20 6c 69 73 74  |nd send the list|
0000c5f0  69 6e 67 2c 20 61 74 0d  20 20 20 20 20 6c 65 76  |ing, at.     lev|
0000c600  65 6c 20 32 2c 20 74 6f  20 74 68 65 20 70 72 69  |el 2, to the pri|
0000c610  6e 74 65 72 20 6f 6e 6c  79 2e 0d 0d 20 20 20 20  |nter only...    |
0000c620  20 41 74 20 61 6e 79 20  74 69 6d 65 20 20 64 75  | At any time  du|
0000c630  72 69 6e 67 20 20 61 6e  20 20 61 73 73 65 6d 62  |ring  an  assemb|
0000c640  6c 79 2c 20 20 79 6f 75  20 20 63 61 6e 20 20 63  |ly,  you  can  c|
0000c650  68 61 6e 67 65 20 20 74  68 65 20 20 6f 75 74 70  |hange  the  outp|
0000c660  75 74 0d 20 20 20 20 20  64 65 73 74 69 6e 61 74  |ut.     destinat|
0000c670  69 6f 6e 20 20 62 79 20  70 72 65 73 73 69 6e 67  |ion  by pressing|
0000c680  20 20 43 4f 4e 54 52 4f  4c 2d 50 2e 20 20 54 68  |  CONTROL-P.  Th|
0000c690  69 73 20 77 69 6c 6c 20  73 77 69 74 63 68 20 74  |is will switch t|
0000c6a0  68 65 20 6f 75 74 70 75  74 0d 20 20 20 20 20 64  |he output.     d|
0000c6b0  65 73 74 69 6e 61 74 69  6f 6e 20 62 65 74 77 65  |estination betwe|
0000c6c0  65 6e 20 70 72 69 6e 74  65 72 20 61 6e 64 20 73  |en printer and s|
0000c6d0  63 72 65 65 6e 3a 20 20  79 6f 75 20 63 61 6e 20  |creen:  you can |
0000c6e0  64 6f 20 74 68 69 73 20  61 73 20 6f 66 74 65 6e  |do this as often|
0000c6f0  0d 20 20 20 20 20 61 73  20 79 6f 75 20 77 69 73  |.     as you wis|
0000c700  68 2e 0d 0d 0d 0d 20 20  20 20 20 1b 2d 01 33 2e  |h.....     .-.3.|
0000c710  37 2e 32 20 53 65 6e 64  69 6e 67 20 74 68 65 20  |7.2 Sending the |
0000c720  6c 69 73 74 69 6e 67 20  74 6f 20 61 20 66 69 6c  |listing to a fil|
0000c730  65 1b 2d 00 0d 0d 0d 20  20 20 20 20 59 6f 75 20  |e.-....     You |
0000c740  63 61 6e 20 64 69 72 65  63 74 20 74 68 65 20 61  |can direct the a|
0000c750  73 73 65 6d 62 6c 79 20  6c 69 73 74 69 6e 67 20  |ssembly listing |
0000c760  74 6f 20 61 20 66 69 6c  65 20 62 79 20 75 73 69  |to a file by usi|
0000c770  6e 67 20 20 74 68 65 20  20 22 2d 46 22 0d 20 20  |ng  the  "-F".  |
0000c780  20 20 20 6f 70 74 69 6f  6e 20 69 6e 20 74 68 65  |   option in the|
0000c790  20 63 6f 6d 6d 61 6e 64  20 6c 69 6e 65 2e 20 54  | command line. T|
0000c7a0  68 75 73 2c 20 66 6f 72  20 65 78 61 6d 70 6c 65  |hus, for example|
0000c7b0  2c 0d 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |,..             |
0000c7c0  20 20 20 20 20 2a 41 53  53 45 4d 42 4c 45 20 53  |     *ASSEMBLE S|
0000c7d0  4f 55 52 43 45 20 2d 4c  31 20 2d 46 3a 33 2e 4c  |OURCE -L1 -F:3.L|
0000c7e0  49 53 54 49 4e 47 0d 0d  20 20 20 20 20 77 69 6c  |ISTING..     wil|
0000c7f0  6c 20 70 72 6f 64 75 63  65 20 61 6e 20 61 73 73  |l produce an ass|
0000c800  65 6d 62 6c 79 20 6c 69  73 74 69 6e 67 20 61 74  |embly listing at|
0000c810  20 6c 65 76 65 6c 20 31  2c 20 20 61 6e 64 20 77  | level 1,  and w|
0000c820  69 6c 6c 20 73 65 6e 64  20 69 74 20 74 6f 0d 20  |ill send it to. |
0000c830  20 20 20 20 74 68 65 20  66 69 6c 65 20 3a 33 2e  |    the file :3.|
0000c840  4c 49 53 54 49 4e 47 20  6f 6e 6c 79 2e 0d 0d 20  |LISTING only... |
0000c850  20 20 20 20 4f 75 74 70  75 74 20 20 73 65 6e 74  |    Output  sent|
0000c860  20 74 6f 20 61 20 66 69  6c 65 20 69 73 20 6c 61  | to a file is la|
0000c870  69 64 20 6f 75 74 20 65  78 61 63 74 6c 79 20 61  |id out exactly a|
0000c880  73 20 69 66 20 69 74 20  77 65 72 65 20 67 6f 69  |s if it were goi|
0000c890  6e 67 20 74 6f 0d 20 20  20 20 20 61 20 72 65 61  |ng to.     a rea|
0000c8a0  6c 20 70 72 69 6e 74 65  72 2e 20 20 49 74 20 77  |l printer.  It w|
0000c8b0  69 6c 6c 20 62 65 20 62  72 6f 6b 65 6e 20 75 70  |ill be broken up|
0000c8c0  20 69 6e 74 6f 20 70 61  67 65 73 2c 20 20 77 69  | into pages,  wi|
0000c8d0  74 68 20 74 68 65 20 20  70 61 67 65 0d 20 20 20  |th the  page.   |
0000c8e0  20 20 64 65 70 74 68 20  61 6e 64 20 77 69 64 74  |  depth and widt|
0000c8f0  68 20 63 6f 6e 74 72 6f  6c 6c 65 64 20 62 79 20  |h controlled by |
0000c900  74 68 65 20 50 41 47 45  20 64 69 72 65 63 74 69  |the PAGE directi|
0000c910  76 65 2e 20 41 66 74 65  72 20 61 73 73 65 6d 62  |ve. After assemb|
0000c920  6c 79 2c 0d 20 20 20 20  20 79 6f 75 20 63 61 6e  |ly,.     you can|
0000c930  20 66 6f 72 20 65 78 61  6d 70 6c 65 20 70 72 69  | for example pri|
0000c940  6e 74 20 74 68 65 20 66  69 6c 65 20 77 69 74 68  |nt the file with|
0000c950  0d 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
0000c960  20 20 20 20 20 20 3c 43  54 52 4c 2d 42 3e 0d 20  |      <CTRL-B>. |
0000c970  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000c980  20 20 20 2a 54 59 50 45  20 3a 33 2e 4c 49 53 54  |   *TYPE :3.LIST|
0000c990  49 4e 47 0d 20 20 20 20  20 20 20 20 20 20 20 20  |ING.            |
0000c9a0  20 20 20 20 20 20 20 20  3c 43 54 52 4c 2d 43 3e  |        <CTRL-C>|
0000c9b0  0d 0d 20 20 20 20 20 41  6e 79 20 20 70 72 69 6e  |..     Any  prin|
0000c9c0  74 65 72 20 20 63 6f 6e  74 72 6f 6c 20 20 63 6f  |ter  control  co|
0000c9d0  64 65 73 20 20 74 68 61  74 20 20 79 6f 75 20 20  |des  that  you  |
0000c9e0  6d 61 79 20 73 65 6e 64  20 77 69 74 68 20 74 68  |may send with th|
0000c9f0  65 20 53 59 53 56 44 55  0d 20 20 20 20 20 64 69  |e SYSVDU.     di|
0000ca00  72 65 63 74 69 76 65 20  61 72 65 20 6e 6f 74 20  |rective are not |
0000ca10  73 74 6f 72 65 64 20 69  6e 20 74 68 65 20 66 69  |stored in the fi|
0000ca20  6c 65 2c 20 20 73 6f 20  79 6f 75 20 63 61 6e 20  |le,  so you can |
0000ca30  6f 75 74 70 75 74 20 74  68 65 20 66 69 6c 65 0d  |output the file.|
0000ca40  20 20 20 20 20 74 6f 20  61 6e 79 20 70 72 69 6e  |     to any prin|
0000ca50  74 65 72 20 77 69 74 68  6f 75 74 20 74 68 65 20  |ter without the |
0000ca60  6e 65 65 64 20 20 74 6f  20 20 65 64 69 74 20 20  |need  to  edit  |
0000ca70  6f 75 74 20 20 75 6e 73  75 69 74 61 62 6c 65 20  |out  unsuitable |
0000ca80  20 63 6f 64 65 73 0d 20  20 20 20 20 66 69 72 73  | codes.     firs|
0000ca90  74 2e 0d 0d 0d 0d 0d 20  20 20 20 20 20 20 20 20  |t......         |
0000caa0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000cab0  20 20 20 20 20 20 20 20  32 30 0d 0d 0d 0d 0d 0d  |        20......|
0000cac0  1b 47 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.G              |
0000cad0  20 20 20 20 20 20 20 20  55 53 49 4e 47 20 54 48  |        USING TH|
0000cae0  45 20 36 35 43 30 32 20  41 53 53 45 4d 42 4c 45  |E 65C02 ASSEMBLE|
0000caf0  52 1b 48 0d 0d 0d 0d 20  20 20 20 20 49 66 20 79  |R.H....     If y|
0000cb00  6f 75 20 68 61 76 65 20  75 73 65 64 20 74 68 65  |ou have used the|
0000cb10  20 22 2d 46 22 20 6f 70  74 69 6f 6e 2c 20 20 74  | "-F" option,  t|
0000cb20  68 65 20 61 63 74 69 6f  6e 20 6f 66 20 43 4f 4e  |he action of CON|
0000cb30  54 52 4f 4c 2d 50 20 64  75 72 69 6e 67 0d 20 20  |TROL-P during.  |
0000cb40  20 20 20 61 73 73 65 6d  62 6c 79 20 20 63 68 61  |   assembly  cha|
0000cb50  6e 67 65 73 20 20 73 6c  69 67 68 74 6c 79 2e 20  |nges  slightly. |
0000cb60  20 59 6f 75 20 63 61 6e  20 6e 6f 77 20 75 73 65  | You can now use|
0000cb70  20 69 74 20 74 6f 20 73  77 69 74 63 68 20 6f 75  | it to switch ou|
0000cb80  74 70 75 74 0d 20 20 20  20 20 62 65 74 77 65 65  |tput.     betwee|
0000cb90  6e 20 74 68 65 20 73 63  72 65 65 6e 20 61 6e 64  |n the screen and|
0000cba0  20 74 68 65 20 66 69 6c  65 2c 20 20 61 6c 6c 6f  | the file,  allo|
0000cbb0  77 69 6e 67 20 79 6f 75  2c 20 20 66 6f 72 20 65  |wing you,  for e|
0000cbc0  78 61 6d 70 6c 65 2c 20  20 74 6f 0d 20 20 20 20  |xample,  to.    |
0000cbd0  20 73 75 70 70 72 65 73  73 20 6c 69 73 74 69 6e  | suppress listin|
0000cbe0  67 20 6f 66 20 73 6f 6d  65 20 70 61 72 74 73 20  |g of some parts |
0000cbf0  6f 66 20 61 20 73 6f 75  72 63 65 2e 20 20 49 74  |of a source.  It|
0000cc00  20 68 61 73 20 6e 6f 20  65 66 66 65 63 74 20 20  | has no effect  |
0000cc10  6f 6e 0d 20 20 20 20 20  61 6e 79 20 70 72 69 6e  |on.     any prin|
0000cc20  74 65 72 20 74 68 61 74  20 79 6f 75 20 6d 61 79  |ter that you may|
0000cc30  20 68 61 76 65 20 66 69  74 74 65 64 2e 0d 0d 20  | have fitted... |
0000cc40  20 20 20 20 49 66 20 20  79 6f 75 20 20 75 73 65  |    If  you  use|
0000cc50  20 1b 2d 01 62 6f 74 68  1b 2d 00 20 20 74 68 65  | .-.both.-.  the|
0000cc60  20 22 2d 50 22 20 61 6e  64 20 22 2d 46 22 20 6f  | "-P" and "-F" o|
0000cc70  70 74 69 6f 6e 73 20 6f  6e 20 74 68 65 20 63 6f  |ptions on the co|
0000cc80  6d 6d 61 6e 64 20 6c 69  6e 65 2c 0d 20 20 20 20  |mmand line,.    |
0000cc90  20 6f 6e 6c 79 20 22 2d  46 22 20 68 61 73 20 65  | only "-F" has e|
0000cca0  66 66 65 63 74 2e 0d 0d  0d 0d 20 20 20 20 20 1b  |ffect.....     .|
0000ccb0  2d 01 33 2e 37 2e 33 20  50 72 69 6e 74 65 72 20  |-.3.7.3 Printer |
0000ccc0  63 6f 6e 74 72 6f 6c 1b  2d 00 0d 0d 0d 20 20 20  |control.-....   |
0000ccd0  20 20 59 6f 75 20 77 69  6c 6c 20 6f 66 74 65 6e  |  You will often|
0000cce0  20 6e 65 65 64 20 74 6f  20 73 65 6e 64 20 61 20  | need to send a |
0000ccf0  73 65 71 75 65 6e 63 65  20 6f 66 20 63 6f 6e 74  |sequence of cont|
0000cd00  72 6f 6c 20 62 79 74 65  73 20 20 74 6f 20 20 79  |rol bytes  to  y|
0000cd10  6f 75 72 0d 20 20 20 20  20 70 72 69 6e 74 65 72  |our.     printer|
0000cd20  20 20 62 65 66 6f 72 65  20 73 74 61 72 74 69 6e  |  before startin|
0000cd30  67 20 61 6e 20 61 73 73  65 6d 62 6c 79 20 20 28  |g an assembly  (|
0000cd40  66 6f 72 20 65 78 61 6d  70 6c 65 20 74 6f 20 73  |for example to s|
0000cd50  65 74 20 69 74 20 69 6e  74 6f 0d 20 20 20 20 20  |et it into.     |
0000cd60  63 6f 6e 64 65 6e 73 65  64 20 70 72 69 6e 74 20  |condensed print |
0000cd70  6d 6f 64 65 29 2e 20 20  54 68 65 20 61 73 73 65  |mode).  The asse|
0000cd80  6d 62 6c 65 72 20 67 69  76 65 73 20 79 6f 75 20  |mbler gives you |
0000cd90  74 68 72 65 65 20 20 64  69 72 65 63 74 69 76 65  |three  directive|
0000cda0  73 0d 20 20 20 20 20 74  6f 20 61 63 63 6f 6d 70  |s.     to accomp|
0000cdb0  6c 69 73 68 20 74 68 69  73 20 61 75 74 6f 6d 61  |lish this automa|
0000cdc0  74 69 63 61 6c 6c 79 3a  20 53 59 53 56 44 55 20  |tically: SYSVDU |
0000cdd0  73 65 6e 64 73 20 61 20  63 6f 6e 74 72 6f 6c 20  |sends a control |
0000cde0  73 65 71 75 65 6e 63 65  0d 20 20 20 20 20 6f 6e  |sequence.     on|
0000cdf0  20 62 6f 74 68 20 70 61  73 73 65 73 2c 20 61 6e  | both passes, an|
0000ce00  64 20 53 59 53 56 44 55  31 20 61 6e 64 20 53 59  |d SYSVDU1 and SY|
0000ce10  53 56 44 55 32 20 64 6f  20 74 68 65 20 73 61 6d  |SVDU2 do the sam|
0000ce20  65 2c 20 20 62 75 74 20  6f 6e 6c 79 20 6f 6e 0d  |e,  but only on.|
0000ce30  20 20 20 20 20 70 61 73  73 20 31 20 20 6f 72 20  |     pass 1  or |
0000ce40  20 70 61 73 73 20 32 20  20 72 65 73 70 65 63 74  | pass 2  respect|
0000ce50  69 76 65 6c 79 2e 20 20  20 49 66 20 79 6f 75 20  |ively.   If you |
0000ce60  68 61 76 65 20 6e 6f 74  20 75 73 65 64 20 74 68  |have not used th|
0000ce70  65 20 22 2d 50 22 0d 20  20 20 20 20 63 6f 6d 6d  |e "-P".     comm|
0000ce80  61 6e 64 20 6c 69 6e 65  20 6f 70 74 69 6f 6e 20  |and line option |
0000ce90  74 6f 20 70 72 6f 64 75  63 65 20 61 20 70 72 69  |to produce a pri|
0000cea0  6e 74 65 64 20 6c 69 73  74 69 6e 67 2c 20 20 74  |nted listing,  t|
0000ceb0  68 65 20 64 69 72 65 63  74 69 76 65 73 0d 20 20  |he directives.  |
0000cec0  20 20 20 77 69 6c 6c 20  6e 6f 74 20 73 65 6e 64  |   will not send|
0000ced0  20 61 6e 79 20 6f 75 74  70 75 74 20 74 6f 20 69  | any output to i|
0000cee0  74 3a 20 20 74 68 65 72  65 20 69 73 20 6e 6f 20  |t:  there is no |
0000cef0  6e 65 65 64 20 74 6f 20  20 61 6c 74 65 72 20 20  |need to  alter  |
0000cf00  79 6f 75 72 0d 20 20 20  20 20 73 6f 75 72 63 65  |your.     source|
0000cf10  20 74 6f 20 73 75 69 74  20 74 68 65 20 74 69 6d  | to suit the tim|
0000cf20  65 73 20 77 68 65 6e 20  79 6f 75 20 61 72 65 20  |es when you are |
0000cf30  70 72 69 6e 74 69 6e 67  20 6f 72 20 6e 6f 74 20  |printing or not |
0000cf40  70 72 69 6e 74 69 6e 67  2e 0d 0d 20 20 20 20 20  |printing...     |
0000cf50  54 6f 20 20 6f 75 74 70  75 74 20 61 20 63 6f 6e  |To  output a con|
0000cf60  74 72 6f 6c 20 73 65 71  75 65 6e 63 65 2c 20 73  |trol sequence, s|
0000cf70  69 6d 70 6c 79 20 77 72  69 74 65 20 74 68 65 20  |imply write the |
0000cf80  62 79 74 65 73 20 61 73  20 6f 70 65 72 61 6e 64  |bytes as operand|
0000cf90  73 0d 20 20 20 20 20 74  6f 20 6f 6e 65 20 6f 66  |s.     to one of|
0000cfa0  20 74 68 65 20 64 69 72  65 63 74 69 76 65 73 2c  | the directives,|
0000cfb0  20 20 65 78 61 63 74 6c  79 20 61 73 20 79 6f 75  |  exactly as you|
0000cfc0  20 77 6f 75 6c 64 20 64  6f 20 69 6e 20 42 42 43  | would do in BBC|
0000cfd0  20 42 61 73 69 63 27 73  0d 20 20 20 20 20 56 44  | Basic's.     VD|
0000cfe0  55 20 63 6f 6d 6d 61 6e  64 2e 20 54 68 75 73 0d  |U command. Thus.|
0000cff0  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
0000d000  20 20 20 20 20 20 20 20  20 20 53 59 53 56 44 55  |          SYSVDU|
0000d010  31 20 20 31 2c 32 37 2c  31 2c 27 45 27 0d 0d 20  |1  1,27,1,'E'.. |
0000d020  20 20 20 20 73 65 6e 64  73 20 74 68 65 20 63 68  |    sends the ch|
0000d030  61 72 61 63 74 65 72 20  45 53 43 41 50 45 20 20  |aracter ESCAPE  |
0000d040  28 77 68 6f 73 65 20 20  41 53 43 49 49 20 20 63  |(whose  ASCII  c|
0000d050  6f 64 65 20 20 69 73 20  20 32 37 20 20 64 65 63  |ode  is  27  dec|
0000d060  69 6d 61 6c 29 0d 20 20  20 20 20 66 6f 6c 6c 6f  |imal).     follo|
0000d070  77 65 64 20 62 79 20 27  45 27 20 74 6f 20 74 68  |wed by 'E' to th|
0000d080  65 20 70 72 69 6e 74 65  72 20 6f 6e 6c 79 2c 20  |e printer only, |
0000d090  6f 6e 20 70 61 73 73 20  31 20 6f 66 20 74 68 65  |on pass 1 of the|
0000d0a0  20 61 73 73 65 6d 62 6c  79 2e 0d 0d 20 20 20 20  | assembly...    |
0000d0b0  20 4e 6f 74 65 20 74 68  61 74 20 79 6f 75 20 64  | Note that you d|
0000d0c0  6f 20 6e 6f 74 20 6e 65  65 64 20 66 69 72 73 74  |o not need first|
0000d0d0  20 74 6f 20 73 65 6e 64  20 61 20 63 6f 64 65 20  | to send a code |
0000d0e0  6f 66 20 22 32 22 20 74  6f 20 61 63 74 69 76 61  |of "2" to activa|
0000d0f0  74 65 0d 20 20 20 20 20  70 72 69 6e 74 65 72 20  |te.     printer |
0000d100  6f 75 74 70 75 74 3a 20  20 74 68 65 20 61 73 73  |output:  the ass|
0000d110  65 6d 62 6c 65 72 20 69  74 73 65 6c 66 20 65 6e  |embler itself en|
0000d120  73 75 72 65 73 20 74 68  65 20 62 79 74 65 73 20  |sures the bytes |
0000d130  67 6f 20 74 6f 20 74 68  65 0d 20 20 20 20 20 70  |go to the.     p|
0000d140  72 69 6e 74 65 72 20 69  66 20 6f 6e 65 20 69 73  |rinter if one is|
0000d150  20 69 6e 20 75 73 65 2e  20 20 54 68 65 20 22 31  | in use.  The "1|
0000d160  22 20 63 6f 64 65 73 20  69 6e 20 74 68 65 20 65  |" codes in the e|
0000d170  78 61 6d 70 6c 65 20 61  62 6f 76 65 20 61 63 74  |xample above act|
0000d180  0d 20 20 20 20 20 65 78  61 63 74 6c 79 20 20 61  |.     exactly  a|
0000d190  73 20 20 69 6e 20 20 42  41 53 49 43 27 73 20 20  |s  in  BASIC's  |
0000d1a0  56 44 55 20 20 63 6f 6d  6d 61 6e 64 2c 20 20 61  |VDU  command,  a|
0000d1b0  6e 64 20 20 73 65 6e 64  20 20 74 68 65 20 66 6f  |nd  send  the fo|
0000d1c0  6c 6c 6f 77 69 6e 67 0d  20 20 20 20 20 63 68 61  |llowing.     cha|
0000d1d0  72 61 63 74 65 72 20 74  6f 20 74 68 65 20 70 72  |racter to the pr|
0000d1e0  69 6e 74 65 72 20 1b 2d  01 6f 6e 6c 79 1b 2d 00  |inter .-.only.-.|
0000d1f0  2e 20 20 59 6f 75 20 63  61 6e 20 69 66 20 79 6f  |.  You can if yo|
0000d200  75 20 77 69 73 68 20 75  73 65 20 53 59 53 56 44  |u wish use SYSVD|
0000d210  55 20 74 6f 0d 20 20 20  20 20 77 72 69 74 65 20  |U to.     write |
0000d220  74 6f 20 1b 2d 01 62 6f  74 68 1b 2d 00 20 70 72  |to .-.both.-. pr|
0000d230  69 6e 74 65 72 20 1b 2d  01 61 6e 64 1b 2d 00 20  |inter .-.and.-. |
0000d240  73 63 72 65 65 6e 3a 20  74 68 75 73 0d 0d 20 20  |screen: thus..  |
0000d250  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000d260  20 20 20 20 20 20 20 20  20 53 59 53 56 44 55 20  |         SYSVDU |
0000d270  20 20 27 41 27 2c 27 42  27 0d 0d 20 20 20 20 20  |  'A','B'..     |
0000d280  73 65 6e 64 73 20 63 68  61 72 61 63 74 65 72 73  |sends characters|
0000d290  20 27 41 27 20 61 6e 64  20 27 42 27 20 74 6f 20  | 'A' and 'B' to |
0000d2a0  62 6f 74 68 2e 20 48 6f  77 65 76 65 72 2c 20 74  |both. However, t|
0000d2b0  68 65 20 44 49 53 50 20  66 61 6d 69 6c 79 20 6f  |he DISP family o|
0000d2c0  66 0d 20 20 20 20 20 64  69 72 65 63 74 69 76 65  |f.     directive|
0000d2d0  73 20 67 69 76 65 20 79  6f 75 20 61 20 6d 75 63  |s give you a muc|
0000d2e0  68 20 62 65 74 74 65 72  20 6d 65 61 6e 73 20 6f  |h better means o|
0000d2f0  66 20 6f 75 74 70 75 74  74 69 6e 67 20 6d 65 73  |f outputting mes|
0000d300  73 61 67 65 73 20 74 6f  0d 20 20 20 20 20 74 68  |sages to.     th|
0000d310  65 20 73 63 72 65 65 6e  2e 0d 0d 20 20 20 20 20  |e screen...     |
0000d320  54 68 65 20 64 69 72 65  63 74 69 76 65 73 20 64  |The directives d|
0000d330  6f 20 1b 2d 01 6e 6f 74  1b 2d 00 20 73 65 6e 64  |o .-.not.-. send|
0000d340  20 61 6e 79 20 62 79 74  65 73 20 74 6f 20 61 20  | any bytes to a |
0000d350  6c 69 73 74 69 6e 67 20  1b 2d 01 66 69 6c 65 1b  |listing .-.file.|
0000d360  2d 00 20 20 74 68 61 74  20 20 79 6f 75 0d 20 20  |-.  that  you.  |
0000d370  20 20 20 6d 61 79 20 20  68 61 76 65 20 73 65 6c  |   may  have sel|
0000d380  65 63 74 65 64 20 77 69  74 68 20 74 68 65 20 22  |ected with the "|
0000d390  2d 46 22 20 63 6f 6d 6d  61 6e 64 20 6c 69 6e 65  |-F" command line|
0000d3a0  20 6f 70 74 69 6f 6e 2e  20 20 54 68 69 73 20 6d  | option.  This m|
0000d3b0  65 61 6e 73 0d 20 20 20  20 20 74 68 61 74 20 79  |eans.     that y|
0000d3c0  6f 75 20 63 61 6e 20 73  61 66 65 6c 79 20 70 72  |ou can safely pr|
0000d3d0  69 6e 74 20 61 20 6c 69  73 74 69 6e 67 20 66 69  |int a listing fi|
0000d3e0  6c 65 20 6f 6e 20 61 6e  79 20 74 79 70 65 20 20  |le on any type  |
0000d3f0  6f 66 20 20 70 72 69 6e  74 65 72 0d 20 20 20 20  |of  printer.    |
0000d400  20 77 69 74 68 6f 75 74  20 20 74 68 65 20 20 6e  | without  the  n|
0000d410  65 65 64 20 20 74 6f 20  20 65 64 69 74 20 20 6f  |eed  to  edit  o|
0000d420  75 74 20 20 70 6f 73 73  69 62 6c 79 20 69 6e 61  |ut  possibly ina|
0000d430  70 70 72 6f 70 72 69 61  74 65 20 63 6f 6e 74 72  |ppropriate contr|
0000d440  6f 6c 0d 20 20 20 20 20  73 65 71 75 65 6e 63 65  |ol.     sequence|
0000d450  73 20 66 69 72 73 74 20  20 28 62 75 74 2c 20 6f  |s first  (but, o|
0000d460  66 20 63 6f 75 72 73 65  2c 20 79 6f 75 20 6d 61  |f course, you ma|
0000d470  79 20 6e 65 65 64 20 74  6f 20 73 65 74 20 74 68  |y need to set th|
0000d480  65 20 70 72 69 6e 74 65  72 0d 20 20 20 20 20 75  |e printer.     u|
0000d490  70 20 79 6f 75 72 73 65  6c 66 20 62 65 66 6f 72  |p yourself befor|
0000d4a0  65 20 70 72 69 6e 74 69  6e 67 20 74 68 65 20 6c  |e printing the l|
0000d4b0  69 73 74 69 6e 67 29 2e  0d 0d 0d 0d 0d 20 20 20  |isting)......   |
0000d4c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000d4d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 32 31  |              21|
0000d4e0  0d 0d 0d 0d 0d 0d 1b 47  20 20 20 20 20 20 20 20  |.......G        |
0000d4f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 55 53  |              US|
0000d500  49 4e 47 20 54 48 45 20  36 35 43 30 32 20 41 53  |ING THE 65C02 AS|
0000d510  53 45 4d 42 4c 45 52 1b  48 0d 0d 0d 0d 1b 2d 01  |SEMBLER.H.....-.|
0000d520  1b 47 34 2e 20 44 49 52  45 43 54 49 56 45 53 20  |.G4. DIRECTIVES |
0000d530  44 45 46 49 4e 49 4e 47  20 44 41 54 41 20 41 4e  |DEFINING DATA AN|
0000d540  44 20 43 4f 4e 53 54 41  4e 54 53 1b 2d 00 1b 48  |D CONSTANTS.-..H|
0000d550  0d 0d 0d 20 20 20 54 68  65 20 41 73 73 65 6d 62  |...   The Assemb|
0000d560  6c 65 72 20 63 6f 6e 74  61 69 6e 73 20 61 20 6e  |ler contains a n|
0000d570  75 6d 62 65 72 20 6f 66  20 64 69 72 65 63 74 69  |umber of directi|
0000d580  76 65 73 20 20 74 68 61  74 20 20 61 6c 6c 6f 77  |ves  that  allow|
0000d590  20 20 79 6f 75 20 20 74  6f 0d 64 65 66 69 6e 65  |  you  to.define|
0000d5a0  20 20 76 61 6c 75 65 73  20 20 69 6e 20 20 74 68  |  values  in  th|
0000d5b0  65 20 20 6f 62 6a 65 63  74 20 20 66 69 6c 65 2e  |e  object  file.|
0000d5c0  20 20 59 6f 75 20 20 63  61 6e 20 20 73 70 65 63  |  You  can  spec|
0000d5d0  69 66 79 20 62 79 74 65  20 76 61 6c 75 65 73 2c  |ify byte values,|
0000d5e0  0d 74 77 6f 2d 62 79 74  65 20 6f 72 20 77 6f 72  |.two-byte or wor|
0000d5f0  64 20 76 61 6c 75 65 73  2c 20 20 61 6e 64 20 20  |d values,  and  |
0000d600  63 68 61 72 61 63 74 65  72 20 20 73 74 72 69 6e  |character  strin|
0000d610  67 73 2c 20 20 61 6e 64  20 20 61 6c 73 6f 20 20  |gs,  and  also  |
0000d620  73 65 74 20 20 75 70 0d  73 79 6d 62 6f 6c 73 20  |set  up.symbols |
0000d630  74 6f 20 68 6f 6c 64 20  63 6f 6e 73 74 61 6e 74  |to hold constant|
0000d640  73 2e 0d 0d 0d 1b 2d 01  34 2e 31 20 44 65 66 69  |s.....-.4.1 Defi|
0000d650  6e 69 6e 67 20 63 6f 6e  73 74 61 6e 74 73 1b 2d  |ning constants.-|
0000d660  00 0d 0d 41 73 73 69 67  6e 69 6e 67 20 73 79 6d  |...Assigning sym|
0000d670  62 6f 6c 73 20 74 6f 20  76 61 72 69 6f 75 73 20  |bols to various |
0000d680  63 6f 6e 73 74 61 6e 74  20 76 61 6c 75 65 73 20  |constant values |
0000d690  69 73 20 61 20 63 6f 6e  73 69 64 65 72 61 62 6c  |is a considerabl|
0000d6a0  65 20 68 65 6c 70 20 69  6e 0d 77 72 69 74 69 6e  |e help in.writin|
0000d6b0  67 20 61 73 73 65 6d 62  6c 79 2d 6c 65 76 65 6c  |g assembly-level|
0000d6c0  20 70 72 6f 67 72 61 6d  73 2c 20 62 6f 74 68 20  | programs, both |
0000d6d0  69 6e 20 74 65 72 6d 73  20 6f 66 20 6d 61 6b 69  |in terms of maki|
0000d6e0  6e 67 20 61 20 73 6f 75  72 63 65 20 6d 6f 72 65  |ng a source more|
0000d6f0  0d 72 65 61 64 61 62 6c  65 20 61 6e 64 20 61 6c  |.readable and al|
0000d700  73 6f 20 69 6e 20 68 65  6c 70 69 6e 67 20 77 68  |so in helping wh|
0000d710  65 6e 20 79 6f 75 20 6e  65 65 64 20 74 6f 20 63  |en you need to c|
0000d720  68 61 6e 67 65 20 69 74  2e 0d 0d 46 6f 72 20 65  |hange it...For e|
0000d730  78 61 6d 70 6c 65 2c 20  79 6f 75 20 63 6f 75 6c  |xample, you coul|
0000d740  64 20 72 65 66 65 72 20  74 6f 20 61 6e 20 4f 70  |d refer to an Op|
0000d750  65 72 61 74 69 6e 67 20  53 79 73 74 65 6d 20 72  |erating System r|
0000d760  6f 75 74 69 6e 65 20 62  79 20 77 72 69 74 69 6e  |outine by writin|
0000d770  67 0d 69 74 73 20 61 64  64 72 65 73 73 20 24 46  |g.its address $F|
0000d780  46 45 45 20 65 76 65 72  79 20 74 69 6d 65 2c 20  |FEE every time, |
0000d790  20 6f 72 20 79 6f 75 20  63 6f 75 6c 64 20 64 65  | or you could de|
0000d7a0  63 6c 61 72 65 20 61 20  73 79 6d 62 6f 6c 20 4f  |clare a symbol O|
0000d7b0  53 57 52 43 48 20 74 6f  0d 73 74 61 6e 64 20 66  |SWRCH to.stand f|
0000d7c0  6f 72 20 74 68 61 74 20  6e 61 6d 65 2e 0d 0d 59  |or that name...Y|
0000d7d0  6f 75 20 63 61 6e 20 64  65 63 6c 61 72 65 20 73  |ou can declare s|
0000d7e0  79 6d 62 6f 6c 73 20 74  6f 20 75 73 65 20 61 73  |ymbols to use as|
0000d7f0  20 63 6f 6e 73 74 61 6e  74 73 20 77 69 74 68 20  | constants with |
0000d800  74 68 65 20 45 51 55 20  64 69 72 65 63 74 69 76  |the EQU directiv|
0000d810  65 2e 20 49 6e 0d 74 68  65 20 65 78 61 6d 70 6c  |e. In.the exampl|
0000d820  65 20 61 62 6f 76 65 2c  20 79 6f 75 20 77 6f 75  |e above, you wou|
0000d830  6c 64 20 77 72 69 74 65  0d 0d 20 20 20 20 20 20  |ld write..      |
0000d840  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000d850  20 20 20 4f 53 57 52 43  48 20 20 45 51 55 20 20  |   OSWRCH  EQU  |
0000d860  20 24 46 46 45 45 0d 0d  61 6e 64 20 74 68 65 6e  | $FFEE..and then|
0000d870  20 63 61 6c 6c 20 74 68  65 20 72 6f 75 74 69 6e  | call the routin|
0000d880  65 20 61 73 2c 20 73 61  79 0d 0d 20 20 20 20 20  |e as, say..     |
0000d890  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000d8a0  20 20 20 20 20 20 20 20  4a 53 52 20 20 20 4f 53  |        JSR   OS|
0000d8b0  57 52 43 48 0d 0d 59 6f  75 20 20 63 61 6e 20 20  |WRCH..You  can  |
0000d8c0  77 72 69 74 65 20 61 6e  79 20 6e 75 6d 65 72 69  |write any numeri|
0000d8d0  63 20 65 78 70 72 65 73  73 69 6f 6e 20 69 6e 20  |c expression in |
0000d8e0  74 68 65 20 6f 70 65 72  61 6e 64 20 66 69 65 6c  |the operand fiel|
0000d8f0  64 20 6f 66 20 74 68 65  20 45 51 55 0d 64 69 72  |d of the EQU.dir|
0000d900  65 63 74 69 76 65 2c 20  62 75 74 20 74 68 65 20  |ective, but the |
0000d910  65 78 70 72 65 73 73 69  6f 6e 20 6d 75 73 74 20  |expression must |
0000d920  6e 6f 74 20 63 6f 6e 74  61 69 6e 20 61 6e 79 20  |not contain any |
0000d930  66 6f 72 77 61 72 64 20  72 65 66 65 72 65 6e 63  |forward referenc|
0000d940  65 73 2e 0d 0d 0d 0d 1b  2d 01 34 2e 32 20 42 79  |es......-.4.2 By|
0000d950  74 65 20 61 6e 64 20 77  6f 72 64 20 64 69 72 65  |te and word dire|
0000d960  63 74 69 76 65 73 1b 2d  00 0d 0d 54 68 65 72 65  |ctives.-...There|
0000d970  20 61 72 65 20 36 20 64  69 72 65 63 74 69 76 65  | are 6 directive|
0000d980  73 20 74 68 61 74 20 70  6c 61 6e 74 20 62 79 74  |s that plant byt|
0000d990  65 20 61 6e 64 20 77 6f  72 64 20 20 76 61 6c 75  |e and word  valu|
0000d9a0  65 73 2e 20 20 20 44 46  42 20 20 70 6c 61 6e 74  |es.   DFB  plant|
0000d9b0  73 0d 62 79 74 65 73 2c  20 20 61 6e 64 20 20 44  |s.bytes,  and  D|
0000d9c0  46 57 20 20 61 6e 64 20  20 44 46 44 42 20 20 70  |FW  and  DFDB  p|
0000d9d0  6c 61 6e 74 20 20 77 6f  72 64 20 76 61 6c 75 65  |lant  word value|
0000d9e0  73 2e 20 20 46 6f 72 20  63 6f 6e 76 65 6e 69 65  |s.  For convenie|
0000d9f0  6e 63 65 2c 20 61 6e 64  0d 63 6f 6d 70 61 74 69  |nce, and.compati|
0000da00  62 69 6c 69 74 79 20 77  69 74 68 20 20 6f 74 68  |bility with  oth|
0000da10  65 72 20 20 61 73 73 65  6d 62 6c 65 72 73 2c 20  |er  assemblers, |
0000da20  20 74 68 65 20 20 64 69  72 65 63 74 69 76 65 73  | the  directives|
0000da30  20 20 63 61 6e 20 20 61  6c 73 6f 20 20 62 65 0d  |  can  also  be.|
0000da40  77 72 69 74 74 65 6e 20  61 73 20 44 42 2c 20 44  |written as DB, D|
0000da50  57 20 61 6e 64 20 44 44  42 20 72 65 73 70 65 63  |W and DDB respec|
0000da60  74 69 76 65 6c 79 2e 0d  0d 41 6c 6c 20 74 68 65  |tively...All the|
0000da70  20 64 69 72 65 63 74 69  76 65 73 20 63 61 6e 20  | directives can |
0000da80  62 65 20 67 69 76 65 6e  20 6f 6e 65 20 6f 72 20  |be given one or |
0000da90  6d 6f 72 65 20 65 78 70  72 65 73 73 69 6f 6e 73  |more expressions|
0000daa0  20 69 6e 20 74 68 65 20  6f 70 65 72 61 6e 64 0d  | in the operand.|
0000dab0  66 69 65 6c 64 2c 20 20  73 65 70 61 72 61 74 65  |field,  separate|
0000dac0  64 20 62 79 20 63 6f 6d  6d 61 73 2c 20 20 61 6e  |d by commas,  an|
0000dad0  64 20 74 68 65 73 65 20  65 78 70 72 65 73 73 69  |d these expressi|
0000dae0  6f 6e 73 20 67 69 76 65  20 74 68 65 20 76 61 6c  |ons give the val|
0000daf0  75 65 73 20 6f 66 0d 74  68 65 20 62 79 74 65 73  |ues of.the bytes|
0000db00  20 6f 72 20 77 6f 72 64  73 20 74 6f 20 62 65 20  | or words to be |
0000db10  70 6c 61 6e 74 65 64 2e  20 20 49 66 20 79 6f 75  |planted.  If you|
0000db20  20 73 70 65 63 69 66 79  20 61 20 6c 61 62 65 6c  | specify a label|
0000db30  20 69 6e 20 74 68 65 20  6c 61 62 65 6c 0d 66 69  | in the label.fi|
0000db40  65 6c 64 20 20 6f 66 20  74 68 65 20 6c 69 6e 65  |eld  of the line|
0000db50  2c 20 20 69 74 20 69 73  20 73 65 74 20 74 6f 20  |,  it is set to |
0000db60  74 68 65 20 61 64 64 72  65 73 73 20 6f 66 20 74  |the address of t|
0000db70  68 65 20 66 69 72 73 74  20 62 79 74 65 20 6f 66  |he first byte of|
0000db80  20 74 68 65 0d 66 69 72  73 74 20 76 61 6c 75 65  | the.first value|
0000db90  20 70 6c 61 6e 74 65 64  2e 0d 0d 0d 0d 20 20 20  | planted.....   |
0000dba0  20 20 1b 2d 01 34 2e 32  2e 31 20 42 79 74 65 20  |  .-.4.2.1 Byte |
0000dbb0  64 69 72 65 63 74 69 76  65 73 1b 2d 00 0d 0d 0d  |directives.-....|
0000dbc0  20 20 20 20 20 54 68 65  20 64 69 72 65 63 74 69  |     The directi|
0000dbd0  76 65 20 44 46 42 20 28  6f 72 20 69 74 73 20 65  |ve DFB (or its e|
0000dbe0  71 75 69 76 61 6c 65 6e  74 20 44 42 29 20 20 61  |quivalent DB)  a|
0000dbf0  6c 6c 6f 77 73 20 20 79  6f 75 20 20 74 6f 20 20  |llows  you  to  |
0000dc00  64 65 66 69 6e 65 0d 20  20 20 20 20 73 69 6e 67  |define.     sing|
0000dc10  6c 65 2d 62 79 74 65 20  20 76 61 6c 75 65 73 20  |le-byte  values |
0000dc20  20 77 68 69 63 68 20 20  61 72 65 20 20 77 72 69  | which  are  wri|
0000dc30  74 74 65 6e 20 64 69 72  65 63 74 6c 79 20 69 6e  |tten directly in|
0000dc40  74 6f 20 74 68 65 20 6f  62 6a 65 63 74 0d 20 20  |to the object.  |
0000dc50  20 20 20 66 69 6c 65 2e  20 54 68 65 20 6f 70 65  |   file. The ope|
0000dc60  72 61 6e 64 20 66 69 65  6c 64 20 69 73 20 6f 6e  |rand field is on|
0000dc70  65 20 6f 72 20 6d 6f 72  65 20 65 78 70 72 65 73  |e or more expres|
0000dc80  73 69 6f 6e 73 2c 20 65  61 63 68 20 6f 66 20 77  |sions, each of w|
0000dc90  68 69 63 68 0d 0d 0d 20  20 20 20 20 20 20 20 20  |hich...         |
0000dca0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000dcb0  20 20 20 20 20 20 20 20  32 32 0d 0d 0d 0d 0d 0d  |        22......|
0000dcc0  1b 47 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.G              |
0000dcd0  20 20 20 20 20 20 20 20  55 53 49 4e 47 20 54 48  |        USING TH|
0000dce0  45 20 36 35 43 30 32 20  41 53 53 45 4d 42 4c 45  |E 65C02 ASSEMBLE|
0000dcf0  52 1b 48 0d 0d 0d 0d 20  20 20 20 20 73 68 6f 75  |R.H....     shou|
0000dd00  6c 64 20 6c 69 65 20 69  6e 20 74 68 65 20 72 61  |ld lie in the ra|
0000dd10  6e 67 65 20 30 2e 2e 32  35 35 2e 0d 0d 20 20 20  |nge 0..255...   |
0000dd20  20 20 46 6f 72 20 65 78  61 6d 70 6c 65 2c 0d 0d  |  For example,..|
0000dd30  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000dd40  20 20 20 20 20 20 20 20  20 44 46 42 20 20 31 2c  |         DFB  1,|
0000dd50  32 2c 24 46 46 2c 46 52  45 44 2b 31 0d 0d 20 20  |2,$FF,FRED+1..  |
0000dd60  20 20 20 77 69 6c 6c 20  77 72 69 74 65 20 34 20  |   will write 4 |
0000dd70  62 79 74 65 73 20 74 6f  20 74 68 65 20 6f 62 6a  |bytes to the obj|
0000dd80  65 63 74 20 66 69 6c 65  3a 20 74 68 65 20 76 61  |ect file: the va|
0000dd90  6c 75 65 73 20 77 69 6c  6c 20 62 65 20 20 31 2c  |lues will be  1,|
0000dda0  20 20 32 2c 0d 20 20 20  20 20 32 35 35 2c 20 61  |  2,.     255, a|
0000ddb0  6e 64 20 74 68 65 20 76  61 6c 75 65 20 6f 66 20  |nd the value of |
0000ddc0  46 52 45 44 2b 31 2e 0d  0d 0d 20 20 20 20 20 1b  |FRED+1....     .|
0000ddd0  2d 01 34 2e 32 2e 32 20  57 6f 72 64 20 64 69 72  |-.4.2.2 Word dir|
0000dde0  65 63 74 69 76 65 73 1b  2d 00 0d 0d 0d 20 20 20  |ectives.-....   |
0000ddf0  20 20 54 68 65 20 20 64  69 72 65 63 74 69 76 65  |  The  directive|
0000de00  73 20 20 44 46 57 20 20  28 6f 72 20 69 74 73 20  |s  DFW  (or its |
0000de10  65 71 75 69 76 61 6c 65  6e 74 20 44 57 29 20 20  |equivalent DW)  |
0000de20  61 6e 64 20 20 44 46 44  42 20 20 28 6f 72 20 20  |and  DFDB  (or  |
0000de30  69 74 73 0d 20 20 20 20  20 65 71 75 69 76 61 6c  |its.     equival|
0000de40  65 6e 74 20 44 44 42 29  20 20 61 6c 6c 6f 77 20  |ent DDB)  allow |
0000de50  79 6f 75 20 74 6f 20 20  64 65 66 69 6e 65 20 20  |you to  define  |
0000de60  74 77 6f 2d 62 79 74 65  20 20 6f 72 20 20 77 6f  |two-byte  or  wo|
0000de70  72 64 20 20 76 61 6c 75  65 73 0d 20 20 20 20 20  |rd  values.     |
0000de80  77 68 69 63 68 20 20 61  72 65 20 20 77 72 69 74  |which  are  writ|
0000de90  74 65 6e 20 20 64 69 72  65 63 74 6c 79 20 20 69  |ten  directly  i|
0000dea0  6e 74 6f 20 74 68 65 20  6f 62 6a 65 63 74 20 66  |nto the object f|
0000deb0  69 6c 65 2e 20 20 54 68  65 20 6f 70 65 72 61 6e  |ile.  The operan|
0000dec0  64 0d 20 20 20 20 20 66  69 65 6c 64 20 6f 66 20  |d.     field of |
0000ded0  65 61 63 68 20 69 73 20  61 20 6c 69 73 74 20 6f  |each is a list o|
0000dee0  66 20 6f 6e 65 20 6f 72  20 6d 6f 72 65 20 65 78  |f one or more ex|
0000def0  70 72 65 73 73 69 6f 6e  73 2c 20 65 61 63 68 20  |pressions, each |
0000df00  6f 66 20 77 68 69 63 68  0d 20 20 20 20 20 73 68  |of which.     sh|
0000df10  6f 75 6c 64 20 6c 69 65  20 69 6e 20 74 68 65 20  |ould lie in the |
0000df20  72 61 6e 67 65 20 30 2e  2e 36 35 35 33 35 2e 0d  |range 0..65535..|
0000df30  0d 20 20 20 20 20 54 68  65 20 64 69 66 66 65 72  |.     The differ|
0000df40  65 6e 63 65 20 62 65 74  77 65 65 6e 20 74 68 65  |ence between the|
0000df50  20 64 69 72 65 63 74 69  76 65 73 20 6c 69 65 73  | directives lies|
0000df60  20 69 6e 20 74 68 65 20  1b 2d 01 6f 72 64 65 72  | in the .-.order|
0000df70  1b 2d 00 20 69 6e 20 20  77 68 69 63 68 0d 20 20  |.-. in  which.  |
0000df80  20 20 20 74 68 65 20 20  74 77 6f 20 62 79 74 65  |   the  two byte|
0000df90  73 20 61 72 65 20 77 72  69 74 74 65 6e 20 74 6f  |s are written to|
0000dfa0  20 74 68 65 20 6f 62 6a  65 63 74 20 66 69 6c 65  | the object file|
0000dfb0  2e 20 20 54 68 65 20 44  46 57 20 64 69 72 65 63  |.  The DFW direc|
0000dfc0  74 69 76 65 0d 20 20 20  20 20 77 72 69 74 65 73  |tive.     writes|
0000dfd0  20 74 68 65 20 62 79 74  65 73 20 69 6e 20 6c 6f  | the bytes in lo|
0000dfe0  77 2d 62 79 74 65 2c 20  68 69 67 68 2d 62 79 74  |w-byte, high-byt|
0000dff0  65 20 6f 72 64 65 72 3b  20 74 68 65 20 44 46 44  |e order; the DFD|
0000e000  42 20 64 69 72 65 63 74  69 76 65 0d 20 20 20 20  |B directive.    |
0000e010  20 77 72 69 74 65 73 20  74 68 65 6d 20 69 6e 20  | writes them in |
0000e020  68 69 67 68 2d 62 79 74  65 2c 20 6c 6f 77 20 62  |high-byte, low b|
0000e030  79 74 65 20 6f 72 64 65  72 2e 0d 0d 20 20 20 20  |yte order...    |
0000e040  20 54 68 75 73 2c 20 66  6f 72 20 65 78 61 6d 70  | Thus, for examp|
0000e050  6c 65 2c 0d 0d 20 20 20  20 20 20 20 20 20 20 20  |le,..           |
0000e060  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 44  |               D|
0000e070  46 57 20 20 20 24 31 32  33 34 2c 24 41 42 43 44  |FW   $1234,$ABCD|
0000e080  0d 0d 20 20 20 20 20 77  69 6c 6c 20 6f 75 74 70  |..     will outp|
0000e090  75 74 20 74 68 65 20 62  79 74 65 73 20 24 33 34  |ut the bytes $34|
0000e0a0  2c 20 24 31 32 2c 20 24  43 44 2c 20 24 41 42 20  |, $12, $CD, $AB |
0000e0b0  74 6f 20 74 68 65 20 20  6f 62 6a 65 63 74 20 20  |to the  object  |
0000e0c0  66 69 6c 65 20 20 69 6e  0d 20 20 20 20 20 74 68  |file  in.     th|
0000e0d0  61 74 20 6f 72 64 65 72  2c 20 62 75 74 0d 0d 20  |at order, but.. |
0000e0e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000e0f0  20 20 20 20 20 20 20 20  20 44 46 44 42 20 20 24  |         DFDB  $|
0000e100  31 32 33 34 2c 24 41 42  43 44 0d 0d 20 20 20 20  |1234,$ABCD..    |
0000e110  20 77 69 6c 6c 20 6f 75  74 70 75 74 20 74 68 65  | will output the|
0000e120  20 62 79 74 65 73 20 24  31 32 2c 20 24 33 34 2c  | bytes $12, $34,|
0000e130  20 24 41 42 2c 20 24 43  44 2e 0d 0d 0d 20 20 20  | $AB, $CD....   |
0000e140  20 20 1b 2d 01 34 2e 32  2e 33 20 55 73 69 6e 67  |  .-.4.2.3 Using|
0000e150  20 72 65 70 65 61 74 20  63 6f 75 6e 74 73 1b 2d  | repeat counts.-|
0000e160  00 0d 0d 0d 20 20 20 20  20 4f 63 63 61 73 69 6f  |....     Occasio|
0000e170  6e 61 6c 6c 79 2c 20 79  6f 75 20 77 69 6c 6c 20  |nally, you will |
0000e180  6e 65 65 64 20 74 6f 20  75 73 65 20 74 68 65 20  |need to use the |
0000e190  62 79 74 65 20 6f 72 20  77 6f 72 64 20 64 69 72  |byte or word dir|
0000e1a0  65 63 74 69 76 65 73 20  74 6f 0d 20 20 20 20 20  |ectives to.     |
0000e1b0  70 6c 61 6e 74 20 20 61  20 6e 75 6d 62 65 72 20  |plant  a number |
0000e1c0  6f 66 20 62 79 74 65 73  20 6f 72 20 77 6f 72 64  |of bytes or word|
0000e1d0  73 20 63 6f 6e 74 61 69  6e 69 6e 67 20 74 68 65  |s containing the|
0000e1e0  20 73 61 6d 65 20 76 61  6c 75 65 2e 20 20 46 6f  | same value.  Fo|
0000e1f0  72 0d 20 20 20 20 20 65  78 61 6d 70 6c 65 2c 20  |r.     example, |
0000e200  79 6f 75 20 6d 69 67 68  74 20 6e 65 65 64 20 74  |you might need t|
0000e210  6f 20 77 72 69 74 65 0d  0d 20 20 20 20 20 20 20  |o write..       |
0000e220  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000e230  20 20 20 44 46 42 20 20  35 2c 35 2c 35 2c 35 2c  |   DFB  5,5,5,5,|
0000e240  35 2c 35 2c 35 0d 0d 20  20 20 20 20 74 6f 20 70  |5,5,5..     to p|
0000e250  6c 61 6e 74 20 37 20 62  79 74 65 73 20 63 6f 6e  |lant 7 bytes con|
0000e260  74 61 69 6e 69 6e 67 20  74 68 65 20 76 61 6c 75  |taining the valu|
0000e270  65 20 35 2e 0d 0d 20 20  20 20 20 46 6f 72 20 73  |e 5...     For s|
0000e280  6d 61 6c 6c 20 6e 75 6d  62 65 72 73 20 6f 66 20  |mall numbers of |
0000e290  72 65 70 65 61 74 73 2c  20 20 74 68 69 73 20 69  |repeats,  this i|
0000e2a0  73 20 6e 6f 20 70 72 6f  62 6c 65 6d 2c 20 20 62  |s no problem,  b|
0000e2b0  75 74 20 69 74 20 63 61  6e 20 62 65 0d 20 20 20  |ut it can be.   |
0000e2c0  20 20 6f 6e 65 72 6f 75  73 20 69 66 2c 20 73 61  |  onerous if, sa|
0000e2d0  79 2c 20 79 6f 75 20 6e  65 65 64 65 64 20 34 39  |y, you needed 49|
0000e2e0  20 62 79 74 65 73 20 63  6f 6e 74 61 69 6e 69 6e  | bytes containin|
0000e2f0  67 20 35 2e 0d 0d 20 20  20 20 20 54 68 65 20 41  |g 5...     The A|
0000e300  73 73 65 6d 62 6c 65 72  20 67 69 76 65 73 20 20  |ssembler gives  |
0000e310  79 6f 75 20 20 61 20 20  76 65 72 79 20 20 63 6f  |you  a  very  co|
0000e320  6e 76 65 6e 69 65 6e 74  20 20 73 68 6f 72 74 68  |nvenient  shorth|
0000e330  61 6e 64 20 20 77 61 79  20 20 6f 66 0d 20 20 20  |and  way  of.   |
0000e340  20 20 72 65 70 65 61 74  69 6e 67 20 20 76 61 6c  |  repeating  val|
0000e350  75 65 73 20 20 69 6e 20  20 61 6c 6c 20 20 74 68  |ues  in  all  th|
0000e360  65 20 20 62 79 74 65 20  61 6e 64 20 77 6f 72 64  |e  byte and word|
0000e370  20 64 69 72 65 63 74 69  76 65 73 2e 20 20 45 76  | directives.  Ev|
0000e380  65 72 79 0d 20 20 20 20  20 65 78 70 72 65 73 73  |ery.     express|
0000e390  69 6f 6e 20 79 6f 75 20  75 73 65 20 63 61 6e 20  |ion you use can |
0000e3a0  62 65 20 70 72 65 66 69  78 65 64 20 77 69 74 68  |be prefixed with|
0000e3b0  20 61 20 22 72 65 70 65  61 74 20 20 63 6f 75 6e  | a "repeat  coun|
0000e3c0  74 22 2c 20 20 77 68 69  63 68 0d 20 20 20 20 20  |t",  which.     |
0000e3d0  74 65 6c 6c 73 20 74 68  65 20 41 73 73 65 6d 62  |tells the Assemb|
0000e3e0  6c 65 72 20 74 6f 20 70  6c 61 6e 74 20 74 68 65  |ler to plant the|
0000e3f0  20 76 61 6c 75 65 20 69  74 73 65 6c 66 20 6d 6f  | value itself mo|
0000e400  72 65 20 74 68 61 6e 20  6f 6e 63 65 2e 20 54 68  |re than once. Th|
0000e410  65 0d 0d 0d 20 20 20 20  20 20 20 20 20 20 20 20  |e...            |
0000e420  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000e430  20 20 20 20 20 32 33 0d  0d 0d 0d 0d 0d 1b 47 20  |     23.......G |
0000e440  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000e450  20 20 20 20 20 55 53 49  4e 47 20 54 48 45 20 36  |     USING THE 6|
0000e460  35 43 30 32 20 41 53 53  45 4d 42 4c 45 52 1b 48  |5C02 ASSEMBLER.H|
0000e470  0d 0d 0d 0d 20 20 20 20  20 72 65 70 65 61 74 20  |....     repeat |
0000e480  63 6f 75 6e 74 20 69 73  20 73 70 65 63 69 66 69  |count is specifi|
0000e490  65 64 20 69 6e 20 22 5b  5d 22 20 62 72 61 63 6b  |ed in "[]" brack|
0000e4a0  65 74 73 3a 20 74 68 75  73 2c 20 74 6f 20 70 6c  |ets: thus, to pl|
0000e4b0  61 6e 74 20 74 68 65 20  34 39 0d 20 20 20 20 20  |ant the 49.     |
0000e4c0  62 79 74 65 73 20 6d 65  6e 74 69 6f 6e 65 64 20  |bytes mentioned |
0000e4d0  61 62 6f 76 65 2c 20 79  6f 75 20 63 6f 75 6c 64  |above, you could|
0000e4e0  20 73 69 6d 70 6c 79 20  77 72 69 74 65 0d 0d 20  | simply write.. |
0000e4f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000e500  20 20 20 20 20 20 20 20  20 20 20 20 44 46 42 20  |            DFB |
0000e510  20 20 5b 34 39 5d 35 0d  0d 20 20 20 20 20 4c 69  |  [49]5..     Li|
0000e520  6b 65 20 20 74 68 65 20  20 76 61 6c 75 65 20 69  |ke  the  value i|
0000e530  74 73 65 6c 66 2c 20 20  74 68 65 20 72 65 70 65  |tself,  the repe|
0000e540  61 74 20 63 6f 75 6e 74  20 63 61 6e 20 62 65 20  |at count can be |
0000e550  61 6e 79 20 65 78 70 72  65 73 73 69 6f 6e 2c 0d  |any expression,.|
0000e560  20 20 20 20 20 62 75 74  20 69 74 20 6d 75 73 74  |     but it must|
0000e570  20 6e 6f 74 20 63 6f 6e  74 61 69 6e 20 66 6f 72  | not contain for|
0000e580  77 61 72 64 20 72 65 66  65 72 65 6e 63 65 73 2e  |ward references.|
0000e590  20 20 54 68 75 73 20 79  6f 75 20 63 6f 75 6c 64  |  Thus you could|
0000e5a0  20 77 72 69 74 65 0d 0d  20 20 20 20 20 20 20 20  | write..        |
0000e5b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000e5c0  44 46 42 20 20 5b 28 43  4f 55 4e 54 2b 32 37 29  |DFB  [(COUNT+27)|
0000e5d0  2f 32 5d 24 46 46 0d 0d  20 20 20 20 20 59 6f 75  |/2]$FF..     You|
0000e5e0  20 63 61 6e 20 66 72 65  65 6c 79 20 6d 69 78 20  | can freely mix |
0000e5f0  76 61 6c 75 65 73 20 77  69 74 68 20 61 6e 64 20  |values with and |
0000e600  77 69 74 68 6f 75 74 20  72 65 70 65 61 74 20 63  |without repeat c|
0000e610  6f 75 6e 74 73 20 20 69  6e 20 20 61 6e 79 0d 20  |ounts  in  any. |
0000e620  20 20 20 20 6f 66 20 74  68 65 20 62 79 74 65 20  |    of the byte |
0000e630  61 6e 64 20 77 6f 72 64  20 64 69 72 65 63 74 69  |and word directi|
0000e640  76 65 73 2e 0d 0d 20 20  20 20 20 41 20 20 72 65  |ves...     A  re|
0000e650  70 65 61 74 20 20 63 6f  75 6e 74 20 20 76 61 6c  |peat  count  val|
0000e660  75 65 20 20 6f 66 20 7a  65 72 6f 20 77 69 6c 6c  |ue  of zero will|
0000e670  20 63 61 75 73 65 20 6e  6f 20 62 79 74 65 73 20  | cause no bytes |
0000e680  61 74 20 61 6c 6c 20 74  6f 20 62 65 0d 20 20 20  |at all to be.   |
0000e690  20 20 77 72 69 74 74 65  6e 20 74 6f 20 74 68 65  |  written to the|
0000e6a0  20 6f 62 6a 65 63 74 20  66 69 6c 65 2e 0d 0d 0d  | object file....|
0000e6b0  1b 2d 01 34 2e 33 20 43  68 61 72 61 63 74 65 72  |.-.4.3 Character|
0000e6c0  20 73 74 72 69 6e 67 20  64 69 72 65 63 74 69 76  | string directiv|
0000e6d0  65 73 1b 2d 00 0d 0d 0d  54 68 65 20 66 6f 75 72  |es.-....The four|
0000e6e0  20 64 69 72 65 63 74 69  76 65 73 20 41 53 43 2c  | directives ASC,|
0000e6f0  20 20 43 41 53 43 2c 20  20 53 54 52 20 20 61 6e  |  CASC,  STR  an|
0000e700  64 20 20 43 53 54 52 20  20 61 6c 6c 6f 77 20 20  |d  CSTR  allow  |
0000e710  79 6f 75 20 20 74 6f 20  20 70 6c 61 6e 74 0d 63  |you  to  plant.c|
0000e720  68 61 72 61 63 74 65 72  20 73 74 72 69 6e 67 20  |haracter string |
0000e730  76 61 6c 75 65 73 20 69  6e 74 6f 20 74 68 65 20  |values into the |
0000e740  6f 62 6a 65 63 74 20 66  69 6c 65 2e 0d 0d 41 6c  |object file...Al|
0000e750  6c 20 74 68 65 20 64 69  72 65 63 74 69 76 65 73  |l the directives|
0000e760  20 72 65 71 75 69 72 65  20 79 6f 75 20 74 6f 20  | require you to |
0000e770  73 70 65 63 69 66 79 20  61 20 63 68 61 72 61 63  |specify a charac|
0000e780  74 65 72 20 73 74 72 69  6e 67 2c 20 65 6e 63 6c  |ter string, encl|
0000e790  6f 73 65 64 0d 69 6e 20  20 73 69 6e 67 6c 65 2d  |osed.in  single-|
0000e7a0  20 20 6f 72 20 64 6f 75  62 6c 65 2d 71 75 6f 74  |  or double-quot|
0000e7b0  65 73 2c 20 69 6e 20 74  68 65 20 6f 70 65 72 61  |es, in the opera|
0000e7c0  6e 64 20 66 69 65 6c 64  2e 20 20 49 66 20 79 6f  |nd field.  If yo|
0000e7d0  75 20 69 6e 63 6c 75 64  65 20 61 0d 6c 61 62 65  |u include a.labe|
0000e7e0  6c 20 69 6e 20 74 68 65  20 6c 61 62 65 6c 20 66  |l in the label f|
0000e7f0  69 65 6c 64 20 6f 66 20  74 68 65 20 6c 69 6e 65  |ield of the line|
0000e800  2c 20 20 69 74 20 69 73  20 67 69 76 65 6e 20 74  |,  it is given t|
0000e810  68 65 20 20 76 61 6c 75  65 20 20 6f 66 20 20 74  |he  value  of  t|
0000e820  68 65 0d 61 64 64 72 65  73 73 20 6f 66 20 74 68  |he.address of th|
0000e830  65 20 66 69 72 73 74 20  62 79 74 65 20 70 6c 61  |e first byte pla|
0000e840  6e 74 65 64 2e 0d 0d 0d  20 20 20 20 20 1b 2d 01  |nted....     .-.|
0000e850  34 2e 33 2e 31 20 54 68  65 20 41 53 43 20 61 6e  |4.3.1 The ASC an|
0000e860  64 20 53 54 52 20 64 69  72 65 63 74 69 76 65 73  |d STR directives|
0000e870  1b 2d 00 0d 0d 20 20 20  20 20 54 68 65 73 65 20  |.-...     These |
0000e880  20 64 69 72 65 63 74 69  76 65 73 20 20 70 6c 61  | directives  pla|
0000e890  6e 74 20 20 73 69 6d 70  6c 65 20 73 74 72 69 6e  |nt  simple strin|
0000e8a0  67 73 20 69 6e 20 74 68  65 20 6f 62 6a 65 63 74  |gs in the object|
0000e8b0  20 66 69 6c 65 2e 20 20  41 53 43 0d 20 20 20 20  | file.  ASC.    |
0000e8c0  20 70 6c 61 6e 74 73 20  74 68 65 20 73 74 72 69  | plants the stri|
0000e8d0  6e 67 20 1b 2d 01 65 78  61 63 74 6c 79 1b 2d 00  |ng .-.exactly.-.|
0000e8e0  20 61 73 20 20 79 6f 75  20 20 73 70 65 63 69 66  | as  you  specif|
0000e8f0  79 20 20 69 74 3b 20 20  53 54 52 20 20 70 6c 61  |y  it;  STR  pla|
0000e900  6e 74 73 20 20 74 68 65  0d 20 20 20 20 20 73 74  |nts  the.     st|
0000e910  72 69 6e 67 2c 20 20 61  6e 64 20 20 74 68 65 6e  |ring,  and  then|
0000e920  20 20 61 75 74 6f 6d 61  74 69 63 61 6c 6c 79 20  |  automatically |
0000e930  20 70 6c 61 6e 74 73 20  20 61 20 63 61 72 72 69  | plants  a carri|
0000e940  61 67 65 2d 72 65 74 75  72 6e 20 62 79 74 65 0d  |age-return byte.|
0000e950  20 20 20 20 20 28 63 6f  64 65 20 24 30 44 29 20  |     (code $0D) |
0000e960  69 6d 6d 65 64 69 61 74  65 6c 79 20 61 66 74 65  |immediately afte|
0000e970  72 20 69 74 2e 0d 0d 20  20 20 20 20 54 68 75 73  |r it...     Thus|
0000e980  0d 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
0000e990  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000e9a0  41 53 43 20 20 27 41 42  43 27 0d 0d 20 20 20 20  |ASC  'ABC'..    |
0000e9b0  20 70 6c 61 6e 74 73 20  74 68 65 20 62 79 74 65  | plants the byte|
0000e9c0  73 20 24 34 31 2c 20 24  34 32 2c 20 24 34 33 20  |s $41, $42, $43 |
0000e9d0  69 6e 20 74 68 65 20 6f  62 6a 65 63 74 20 66 69  |in the object fi|
0000e9e0  6c 65 2c 20 61 6e 64 0d  0d 20 20 20 20 20 20 20  |le, and..       |
0000e9f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000ea00  20 20 20 20 20 20 20 53  54 52 20 20 27 41 42 43  |       STR  'ABC|
0000ea10  27 0d 0d 20 20 20 20 20  70 6c 61 6e 74 73 20 74  |'..     plants t|
0000ea20  68 65 20 62 79 74 65 73  20 24 34 31 2c 20 24 34  |he bytes $41, $4|
0000ea30  32 2c 20 24 34 33 2c 20  24 30 44 2e 0d 0d 0d 20  |2, $43, $0D.... |
0000ea40  20 20 20 20 1b 2d 01 34  2e 33 2e 32 20 54 68 65  |    .-.4.3.2 The|
0000ea50  20 43 41 53 43 20 61 6e  64 20 43 53 54 52 20 64  | CASC and CSTR d|
0000ea60  69 72 65 63 74 69 76 65  73 1b 2d 00 0d 0d 0d 20  |irectives.-.... |
0000ea70  20 20 20 20 54 68 65 73  65 20 64 69 72 65 63 74  |    These direct|
0000ea80  69 76 65 73 20 70 6c 61  6e 74 20 20 22 63 6f 75  |ives plant  "cou|
0000ea90  6e 74 65 64 20 73 74 72  69 6e 67 73 22 20 20 69  |nted strings"  i|
0000eaa0  6e 20 74 68 65 20 6f 70  65 72 61 6e 64 20 20 66  |n the operand  f|
0000eab0  69 65 6c 64 2e 0d 20 20  20 20 20 54 68 65 79 20  |ield..     They |
0000eac0  20 61 72 65 20 20 73 69  6d 69 6c 61 72 20 74 6f  | are  similar to|
0000ead0  20 41 53 43 20 61 6e 64  20 53 54 52 2c 20 20 65  | ASC and STR,  e|
0000eae0  78 63 65 70 74 20 74 68  61 74 20 74 68 65 20 62  |xcept that the b|
0000eaf0  79 74 65 73 20 70 6c 61  6e 74 65 64 0d 20 20 20  |ytes planted.   |
0000eb00  20 20 61 72 65 20 1b 2d  01 70 72 65 63 65 64 65  |  are .-.precede|
0000eb10  64 1b 2d 00 20 62 79 20  61 20 73 69 6e 67 6c 65  |d.-. by a single|
0000eb20  20 62 79 74 65 20 67 69  76 69 6e 67 20 74 68 65  | byte giving the|
0000eb30  20 6c 65 6e 67 74 68 20  6f 66 20 74 68 65 20 73  | length of the s|
0000eb40  74 72 69 6e 67 2e 0d 0d  0d 0d 20 20 20 20 20 20  |tring.....      |
0000eb50  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000eb60  20 20 20 20 20 20 20 20  20 20 20 32 34 0d 0d 0d  |           24...|
0000eb70  0d 0d 0d 1b 47 20 20 20  20 20 20 20 20 20 20 20  |....G           |
0000eb80  20 20 20 20 20 20 20 20  20 20 20 55 53 49 4e 47  |           USING|
0000eb90  20 54 48 45 20 36 35 43  30 32 20 41 53 53 45 4d  | THE 65C02 ASSEM|
0000eba0  42 4c 45 52 1b 48 0d 0d  0d 0d 20 20 20 20 20 54  |BLER.H....     T|
0000ebb0  68 75 73 2c 20 74 6f 20  75 73 65 20 74 68 65 20  |hus, to use the |
0000ebc0  73 61 6d 65 20 65 78 61  6d 70 6c 65 73 20 61 73  |same examples as|
0000ebd0  20 61 62 6f 76 65 2c 0d  0d 20 20 20 20 20 20 20  | above,..       |
0000ebe0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000ebf0  20 20 20 20 20 20 43 41  53 43 20 20 27 41 42 43  |      CASC  'ABC|
0000ec00  27 0d 0d 20 20 20 20 20  70 6c 61 6e 74 73 20 74  |'..     plants t|
0000ec10  68 65 20 62 79 74 65 73  20 24 30 33 2c 20 24 34  |he bytes $03, $4|
0000ec20  31 2c 20 24 34 32 2c 20  24 34 33 20 69 6e 20 74  |1, $42, $43 in t|
0000ec30  68 65 20 6f 62 6a 65 63  74 20 66 69 6c 65 2c 20  |he object file, |
0000ec40  61 6e 64 0d 0d 20 20 20  20 20 20 20 20 20 20 20  |and..           |
0000ec50  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000ec60  20 20 43 53 54 52 20 20  27 41 42 43 27 0d 0d 20  |  CSTR  'ABC'.. |
0000ec70  20 20 20 20 70 6c 61 6e  74 73 20 74 68 65 20 62  |    plants the b|
0000ec80  79 74 65 73 20 24 30 34  2c 20 24 34 31 2c 20 24  |ytes $04, $41, $|
0000ec90  34 32 2c 20 24 34 33 2c  20 24 30 44 2e 0d 0d 20  |42, $43, $0D... |
0000eca0  20 20 20 20 4e 6f 74 65  20 74 68 61 74 20 74 68  |    Note that th|
0000ecb0  65 20 63 6f 75 6e 74 20  62 79 74 65 20 70 6c 61  |e count byte pla|
0000ecc0  6e 74 65 64 20 62 79 20  43 53 54 52 20 1b 2d 01  |nted by CSTR .-.|
0000ecd0  69 6e 63 6c 75 64 65 73  1b 2d 00 20 20 74 68 65  |includes.-.  the|
0000ece0  20 20 24 30 44 20 20 62  79 74 65 0d 20 20 20 20  |  $0D  byte.    |
0000ecf0  20 74 68 61 74 20 74 68  65 20 64 69 72 65 63 74  | that the direct|
0000ed00  69 76 65 20 61 64 64 73  20 69 74 73 65 6c 66 2e  |ive adds itself.|
0000ed10  0d 0d 0d 20 20 20 20 20  1b 2d 01 34 2e 33 2e 33  |...     .-.4.3.3|
0000ed20  20 50 6c 61 6e 74 69 6e  67 20 73 70 65 63 69 61  | Planting specia|
0000ed30  6c 20 63 68 61 72 61 63  74 65 72 73 1b 2d 00 0d  |l characters.-..|
0000ed40  0d 0d 20 20 20 20 20 54  68 65 20 20 73 74 72 69  |..     The  stri|
0000ed50  6e 67 73 20 20 79 6f 75  20 67 69 76 65 20 61 73  |ngs  you give as|
0000ed60  20 74 68 65 20 6f 70 65  72 61 6e 64 73 20 74 6f  | the operands to|
0000ed70  20 41 53 43 2c 20 43 41  53 43 2c 20 53 54 52 20  | ASC, CASC, STR |
0000ed80  61 6e 64 20 43 53 54 52  0d 20 20 20 20 20 6d 75  |and CSTR.     mu|
0000ed90  73 74 20 6f 66 20 63 6f  75 72 73 65 20 62 65 20  |st of course be |
0000eda0  6d 61 64 65 20 75 70 20  6f 66 20 70 72 69 6e 74  |made up of print|
0000edb0  61 62 6c 65 20 63 68 61  72 61 63 74 65 72 73 20  |able characters |
0000edc0  69 6e 20 20 74 68 65 20  20 73 6f 75 72 63 65 0d  |in  the  source.|
0000edd0  20 20 20 20 20 66 69 6c  65 2c 20 20 62 75 74 20  |     file,  but |
0000ede0  20 74 68 65 20 20 41 73  73 65 6d 62 6c 65 72 20  | the  Assembler |
0000edf0  61 6c 6c 6f 77 73 20 79  6f 75 20 61 20 77 61 79  |allows you a way|
0000ee00  20 6f 66 20 73 70 65 63  69 66 79 69 6e 67 20 63  | of specifying c|
0000ee10  6f 6e 74 72 6f 6c 0d 20  20 20 20 20 63 68 61 72  |ontrol.     char|
0000ee20  61 63 74 65 72 73 2c 20  20 61 6e 64 20 63 68 61  |acters,  and cha|
0000ee30  72 61 63 74 65 72 73 20  77 69 74 68 20 74 68 65  |racters with the|
0000ee40  20 6d 6f 73 74 20 73 69  67 6e 69 66 69 63 61 6e  | most significan|
0000ee50  74 20 62 69 74 20 28 62  69 74 20 37 29 0d 20 20  |t bit (bit 7).  |
0000ee60  20 20 20 73 65 74 20 74  6f 20 31 2e 0d 0d 20 20  |   set to 1...  |
0000ee70  20 20 20 54 6f 20 73 70  65 63 69 66 79 20 61 20  |   To specify a |
0000ee80  63 6f 6e 74 72 6f 6c 20  63 68 61 72 61 63 74 65  |control characte|
0000ee90  72 2c 20 20 79 6f 75 20  73 68 6f 75 6c 64 20 70  |r,  you should p|
0000eea0  72 65 63 65 64 65 20 74  68 65 20 63 68 61 72 61  |recede the chara|
0000eeb0  63 74 65 72 0d 20 20 20  20 20 69 74 73 65 6c 66  |cter.     itself|
0000eec0  20 77 69 74 68 20 61 20  22 7c 22 20 63 68 61 72  | with a "|" char|
0000eed0  61 63 74 65 72 2e 20 54  68 75 73 2c 20 69 66 20  |acter. Thus, if |
0000eee0  79 6f 75 20 77 69 73 68  20 74 6f 20 70 6c 61 6e  |you wish to plan|
0000eef0  74 20 74 68 65 20 76 61  6c 75 65 0d 20 20 20 20  |t the value.    |
0000ef00  20 6f 66 20 43 4f 4e 54  52 4f 4c 2d 41 2c 20 20  | of CONTROL-A,  |
0000ef10  74 68 65 20 73 74 72 69  6e 67 20 73 68 6f 75 6c  |the string shoul|
0000ef20  64 20 63 6f 6e 74 61 69  6e 20 20 22 7c 41 22 2e  |d contain  "|A".|
0000ef30  20 20 54 68 69 73 20 20  6d 65 74 68 6f 64 20 20  |  This  method  |
0000ef40  69 73 0d 20 20 20 20 20  69 64 65 6e 74 69 63 61  |is.     identica|
0000ef50  6c 20 20 74 6f 20 20 74  68 65 20 77 61 79 20 69  |l  to  the way i|
0000ef60  6e 20 77 68 69 63 68 20  79 6f 75 20 73 70 65 63  |n which you spec|
0000ef70  69 66 79 20 63 6f 6e 74  72 6f 6c 20 63 68 61 72  |ify control char|
0000ef80  61 63 74 65 72 73 20 69  6e 0d 20 20 20 20 20 4f  |acters in.     O|
0000ef90  70 65 72 61 74 69 6e 67  20 53 79 73 74 65 6d 20  |perating System |
0000efa0  63 6f 6d 6d 61 6e 64 73  20 73 75 63 68 20 61 73  |commands such as|
0000efb0  20 2a 4b 45 59 2e 0d 0d  20 20 20 20 20 54 6f 20  | *KEY...     To |
0000efc0  73 70 65 63 69 66 79 20  61 20 63 68 61 72 61 63  |specify a charac|
0000efd0  74 65 72 20 77 69 74 68  20 62 69 74 20 37 20 28  |ter with bit 7 (|
0000efe0  74 68 65 20 6d 6f 73 74  20 73 69 67 6e 69 66 69  |the most signifi|
0000eff0  63 61 6e 74 20 62 69 74  29 20 73 65 74 2c 0d 20  |cant bit) set,. |
0000f000  20 20 20 20 70 72 65 63  65 64 65 20 69 74 20 77  |    precede it w|
0000f010  69 74 68 20 61 20 22 5e  22 20 63 68 61 72 61 63  |ith a "^" charac|
0000f020  74 65 72 3a 20 74 68 75  73 2c 20 74 6f 20 70 6c  |ter: thus, to pl|
0000f030  61 6e 74 20 61 6e 20 22  41 22 20 77 69 74 68 20  |ant an "A" with |
0000f040  62 69 74 20 37 0d 20 20  20 20 20 73 65 74 2c 20  |bit 7.     set, |
0000f050  73 70 65 63 69 66 79 20  69 74 20 69 6e 20 74 68  |specify it in th|
0000f060  65 20 73 74 72 69 6e 67  20 61 73 20 22 5e 41 22  |e string as "^A"|
0000f070  2e 0d 0d 20 20 20 20 20  46 6f 72 20 65 78 61 6d  |...     For exam|
0000f080  70 6c 65 2c 0d 0d 20 20  20 20 20 20 20 20 20 20  |ple,..          |
0000f090  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000f0a0  20 20 41 53 43 20 20 27  41 7c 41 42 5e 42 27 0d  |  ASC  'A|AB^B'.|
0000f0b0  0d 20 20 20 20 20 70 6c  61 6e 74 73 20 74 68 65  |.     plants the|
0000f0c0  20 62 79 74 65 73 20 24  34 31 2c 20 24 30 31 2c  | bytes $41, $01,|
0000f0d0  20 24 34 32 2c 20 24 43  32 20 69 6e 20 74 68 65  | $42, $C2 in the|
0000f0e0  20 6f 62 6a 65 63 74 20  66 69 6c 65 2e 0d 0d 20  | object file... |
0000f0f0  20 20 20 20 53 68 6f 75  6c 64 20 79 6f 75 20 1b  |    Should you .|
0000f100  2d 01 6e 65 65 64 1b 2d  00 20 74 6f 20 73 70 65  |-.need.-. to spe|
0000f110  63 69 66 79 20 74 68 65  20 22 7c 22 20 6f 72 20  |cify the "|" or |
0000f120  22 5e 22 20 63 68 61 72  61 63 74 65 72 73 2c 20  |"^" characters, |
0000f130  79 6f 75 20 20 73 68 6f  75 6c 64 0d 20 20 20 20  |you  should.    |
0000f140  20 64 6f 75 62 6c 65 20  74 68 65 6d 20 69 6e 20  | double them in |
0000f150  74 68 65 20 73 74 72 69  6e 67 20 28 69 2e 65 2e  |the string (i.e.|
0000f160  20 77 72 69 74 65 20 74  68 65 6d 20 61 73 20 22  | write them as "|
0000f170  7c 7c 22 20 61 6e 64 20  22 5e 5e 22 29 0d 0d 20  |||" and "^^").. |
0000f180  20 20 20 20 54 68 65 20  20 41 73 73 65 6d 62 6c  |    The  Assembl|
0000f190  65 72 20 20 64 6f 65 73  20 1b 2d 01 6e 6f 74 1b  |er  does .-.not.|
0000f1a0  2d 00 20 20 62 79 20 20  64 65 66 61 75 6c 74 20  |-.  by  default |
0000f1b0  20 70 72 6f 76 69 64 65  20 20 61 20 20 6d 65 61  | provide  a  mea|
0000f1c0  6e 73 20 74 6f 20 70 6c  61 6e 74 0d 20 20 20 20  |ns to plant.    |
0000f1d0  20 63 68 61 72 61 63 74  65 72 73 20 61 73 20 63  | characters as c|
0000f1e0  6f 6e 74 72 6f 6c 20 63  68 61 72 61 63 74 65 72  |ontrol character|
0000f1f0  73 20 1b 2d 01 61 6c 73  6f 1b 2d 00 20 77 69 74  |s .-.also.-. wit|
0000f200  68 20 62 69 74 20 20 37  20 20 73 65 74 2e 20 20  |h bit  7  set.  |
0000f210  48 6f 77 65 76 65 72 2c  0d 20 20 20 20 20 79 6f  |However,.     yo|
0000f220  75 20 63 61 6e 20 75 73  65 20 61 20 63 6f 6e 66  |u can use a conf|
0000f230  69 67 75 72 61 74 69 6f  6e 20 6f 70 74 69 6f 6e  |iguration option|
0000f240  20 64 65 73 63 72 69 62  65 64 20 69 6e 20 41 70  | described in Ap|
0000f250  70 65 6e 64 69 78 20 35  20 74 6f 20 6c 65 74 0d  |pendix 5 to let.|
0000f260  20 20 20 20 20 79 6f 75  20 20 64 6f 20 74 68 69  |     you  do thi|
0000f270  73 3a 20 20 73 65 6c 65  63 74 69 6e 67 20 74 68  |s:  selecting th|
0000f280  65 20 6f 70 74 69 6f 6e  20 6d 61 6b 65 73 20 74  |e option makes t|
0000f290  68 65 20 22 7e 22 20 63  68 61 72 61 63 74 65 72  |he "~" character|
0000f2a0  20 70 6c 61 6e 74 0d 20  20 20 20 20 74 68 65 20  | plant.     the |
0000f2b0  63 68 61 72 61 63 74 65  72 20 66 6f 6c 6c 6f 77  |character follow|
0000f2c0  69 6e 67 20 61 73 20 61  20 63 6f 6e 74 72 6f 6c  |ing as a control|
0000f2d0  20 63 68 61 72 61 63 74  65 72 20 77 69 74 68 20  | character with |
0000f2e0  62 69 74 20 37 20 73 65  74 2e 0d 0d 20 20 20 20  |bit 7 set...    |
0000f2f0  20 54 68 75 73 0d 0d 20  20 20 20 20 20 20 20 20  | Thus..         |
0000f300  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000f310  20 20 20 20 20 41 53 43  20 20 22 7e 41 22 0d 0d  |     ASC  "~A"..|
0000f320  20 20 20 20 20 77 6f 75  6c 64 20 70 6c 61 6e 74  |     would plant|
0000f330  20 74 68 65 20 62 79 74  65 20 24 38 31 20 28 69  | the byte $81 (i|
0000f340  2e 65 2e 20 61 20 43 4f  4e 54 52 4f 4c 2d 41 20  |.e. a CONTROL-A |
0000f350  77 69 74 68 20 62 69 74  20 37 20 73 65 74 29 2e  |with bit 7 set).|
0000f360  0d 0d 0d 0d 20 20 20 20  20 20 20 20 20 20 20 20  |....            |
0000f370  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000f380  20 20 20 20 20 32 35 0d  0d 0d 0d 0d 0d 1b 47 20  |     25.......G |
0000f390  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000f3a0  20 20 20 20 20 55 53 49  4e 47 20 54 48 45 20 36  |     USING THE 6|
0000f3b0  35 43 30 32 20 41 53 53  45 4d 42 4c 45 52 1b 48  |5C02 ASSEMBLER.H|
0000f3c0  0d 0d 0d 0d 1b 2d 01 34  2e 34 20 54 68 65 20 48  |.....-.4.4 The H|
0000f3d0  45 58 20 64 69 72 65 63  74 69 76 65 1b 2d 00 0d  |EX directive.-..|
0000f3e0  0d 0d 20 20 20 54 68 69  73 20 64 69 72 65 63 74  |..   This direct|
0000f3f0  69 76 65 20 69 73 20 72  61 74 68 65 72 20 61 20  |ive is rather a |
0000f400  68 79 62 72 69 64 20 6f  66 20 74 68 65 20 44 46  |hybrid of the DF|
0000f410  42 20 61 6e 64 20 41 53  43 20 64 69 72 65 63 74  |B and ASC direct|
0000f420  69 76 65 73 2e 20 49 74  0d 70 6c 61 6e 74 73 20  |ives. It.plants |
0000f430  61 20 73 65 72 69 65 73  20 6f 66 20 62 79 74 65  |a series of byte|
0000f440  20 76 61 6c 75 65 73 20  69 6e 74 6f 20 74 68 65  | values into the|
0000f450  20 6f 62 6a 65 63 74 20  66 69 6c 65 2c 20 62 75  | object file, bu|
0000f460  74 20 20 79 6f 75 20 20  73 70 65 63 69 66 79 0d  |t  you  specify.|
0000f470  74 68 65 20 76 61 6c 75  65 73 20 61 73 20 61 20  |the values as a |
0000f480  73 74 72 69 6e 67 20 6f  66 20 68 65 78 61 64 65  |string of hexade|
0000f490  63 69 6d 61 6c 20 64 69  67 69 74 73 2e 0d 0d 20  |cimal digits... |
0000f4a0  20 20 46 6f 72 20 65 78  61 6d 70 6c 65 2c 0d 0d  |  For example,..|
0000f4b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000f4c0  20 20 20 20 20 20 20 20  20 20 20 48 45 58 20 20  |           HEX  |
0000f4d0  27 31 32 33 34 41 42 43  44 27 0d 0d 70 6c 61 6e  |'1234ABCD'..plan|
0000f4e0  74 73 20 74 68 65 20 62  79 74 65 20 76 61 6c 75  |ts the byte valu|
0000f4f0  65 73 20 24 31 32 2c 20  24 33 34 2c 20 24 41 42  |es $12, $34, $AB|
0000f500  2c 20 24 43 44 20 69 6e  74 6f 20 74 68 65 20 6f  |, $CD into the o|
0000f510  62 6a 65 63 74 20 66 69  6c 65 2e 0d 0d 20 20 20  |bject file...   |
0000f520  54 68 65 20 20 73 74 72  69 6e 67 20 20 79 6f 75  |The  string  you|
0000f530  20 73 75 70 70 6c 79 20  6d 75 73 74 20 63 6f 6e  | supply must con|
0000f540  74 61 69 6e 20 76 61 6c  69 64 20 68 65 78 61 64  |tain valid hexad|
0000f550  65 63 69 6d 61 6c 20 64  69 67 69 74 73 20 28 69  |ecimal digits (i|
0000f560  2e 65 2e 0d 27 30 27 2e  2e 27 39 27 20 61 6e 64  |.e..'0'..'9' and|
0000f570  20 27 41 27 2e 2e 27 46  27 29 2e 20 20 59 6f 75  | 'A'..'F').  You|
0000f580  20 63 61 6e 20 67 69 76  65 20 74 68 65 20 6c 65  | can give the le|
0000f590  74 74 65 72 73 20 69 6e  20 65 69 74 68 65 72 20  |tters in either |
0000f5a0  20 75 70 70 65 72 20 20  6f 72 0d 6c 6f 77 65 72  | upper  or.lower|
0000f5b0  20 63 61 73 65 2e 20 20  20 49 66 20 74 68 65 20  | case.   If the |
0000f5c0  73 74 72 69 6e 67 20 63  6f 6e 74 61 69 6e 73 20  |string contains |
0000f5d0  61 6e 20 6f 64 64 20 6e  75 6d 62 65 72 20 6f 66  |an odd number of|
0000f5e0  20 63 68 61 72 61 63 74  65 72 73 2c 20 20 74 68  | characters,  th|
0000f5f0  65 0d 41 73 73 65 6d 62  6c 65 72 20 20 77 69 6c  |e.Assembler  wil|
0000f600  6c 20 20 61 75 74 6f 6d  61 74 69 63 61 6c 6c 79  |l  automatically|
0000f610  20 20 61 70 70 65 6e 64  20 20 61 20 20 27 30 27  |  append  a  '0'|
0000f620  20 20 74 6f 20 20 6d 61  6b 65 20 20 20 74 68 65  |  to  make   the|
0000f630  20 20 20 66 69 6e 61 6c  0d 68 65 78 61 64 65 63  |   final.hexadec|
0000f640  69 6d 61 6c 20 76 61 6c  75 65 20 63 6f 6d 70 6c  |imal value compl|
0000f650  65 74 65 2e 20 20 48 65  6e 63 65 20 20 48 45 58  |ete.  Hence  HEX|
0000f660  20 27 41 42 43 27 20 20  77 69 6c 6c 20 70 6c 61  | 'ABC'  will pla|
0000f670  6e 74 20 24 41 42 20 61  6e 64 20 24 43 30 2e 0d  |nt $AB and $C0..|
0000f680  0d 0d 0d 1b 2d 01 34 2e  35 20 54 68 65 20 43 4f  |....-.4.5 The CO|
0000f690  44 45 20 64 69 72 65 63  74 69 76 65 1b 2d 00 0d  |DE directive.-..|
0000f6a0  0d 0d 20 20 20 54 68 65  20 20 63 6f 64 65 20 20  |..   The  code  |
0000f6b0  64 69 72 65 63 74 69 76  65 20 67 69 76 65 73 20  |directive gives |
0000f6c0  79 6f 75 20 61 20 63 6f  6e 76 65 6e 69 65 6e 74  |you a convenient|
0000f6d0  20 77 61 79 20 6f 66 20  69 6e 63 6c 75 64 69 6e  | way of includin|
0000f6e0  67 20 74 68 69 6e 67 73  0d 6c 69 6b 65 20 73 63  |g things.like sc|
0000f6f0  72 65 65 6e 20 64 75 6d  70 73 20 6f 72 20 70 72  |reen dumps or pr|
0000f700  65 2d 63 6f 6d 70 69 6c  65 64 20 72 65 6c 6f 63  |e-compiled reloc|
0000f710  61 74 61 62 6c 65 20 20  73 75 62 72 6f 75 74 69  |atable  subrouti|
0000f720  6e 65 73 20 20 69 6e 74  6f 20 20 79 6f 75 72 0d  |nes  into  your.|
0000f730  70 72 6f 67 72 61 6d 73  2e 0d 0d 20 20 20 53 75  |programs...   Su|
0000f740  70 70 6f 73 65 2c 20 20  66 6f 72 20 20 65 78 61  |ppose,  for  exa|
0000f750  6d 70 6c 65 2c 20 20 79  6f 75 20 68 61 64 20 70  |mple,  you had p|
0000f760  72 65 70 61 72 65 64 20  61 20 6d 6f 64 65 20 37  |repared a mode 7|
0000f770  20 73 63 72 65 65 6e 20  64 75 6d 70 20 77 69 74  | screen dump wit|
0000f780  68 0d 73 6f 6d 65 20 54  65 6c 65 74 65 78 74 20  |h.some Teletext |
0000f790  65 64 69 74 6f 72 20 73  79 73 74 65 6d 2c 20 20  |editor system,  |
0000f7a0  61 6e 64 20 77 61 6e 74  65 64 20 74 6f 20 75 73  |and wanted to us|
0000f7b0  65 20 74 68 69 73 20 61  73 20 61 20 62 61 6e 6e  |e this as a bann|
0000f7c0  65 72 20 20 70 61 67 65  0d 77 68 65 6e 20 20 79  |er  page.when  y|
0000f7d0  6f 75 72 20 20 70 72 6f  67 72 61 6d 20 20 73 74  |our  program  st|
0000f7e0  61 72 74 65 64 2e 20 20  4f 6e 65 20 77 61 79 20  |arted.  One way |
0000f7f0  6f 66 20 69 6e 63 6c 75  64 69 6e 67 20 74 68 69  |of including thi|
0000f800  73 20 69 6e 74 6f 20 74  68 65 20 63 6f 64 65 0d  |s into the code.|
0000f810  77 6f 75 6c 64 20 62 65  20 74 6f 20 65 78 61 6d  |would be to exam|
0000f820  69 6e 65 20 74 68 65 20  64 75 6d 70 20 61 6e 64  |ine the dump and|
0000f830  20 63 6f 6e 76 65 72 74  20 69 74 20 69 6e 74 6f  | convert it into|
0000f840  20 74 68 65 20 20 61 70  70 72 6f 70 72 69 61 74  | the  appropriat|
0000f850  65 20 20 44 46 42 0d 64  69 72 65 63 74 69 76 65  |e  DFB.directive|
0000f860  73 2c 20 70 6c 61 6e 74  69 6e 67 20 65 61 63 68  |s, planting each|
0000f870  20 62 79 74 65 20 65 78  70 6c 69 63 69 74 6c 79  | byte explicitly|
0000f880  20 62 79 20 68 61 6e 64  2e 20 48 6f 77 65 76 65  | by hand. Howeve|
0000f890  72 2c 20 74 68 69 73 20  6d 69 67 68 74 0d 62 65  |r, this might.be|
0000f8a0  20 61 20 76 65 72 79 20  74 69 6d 65 20 63 6f 6e  | a very time con|
0000f8b0  73 75 6d 69 6e 67 20 70  72 6f 63 65 73 73 2c 20  |suming process, |
0000f8c0  61 6e 64 20 77 6f 75 6c  64 20 62 65 20 76 65 72  |and would be ver|
0000f8d0  79 20 65 72 72 6f 72 20  70 72 6f 6e 65 2e 0d 0d  |y error prone...|
0000f8e0  20 20 20 55 73 69 6e 67  20 43 4f 44 45 2c 20 74  |   Using CODE, t|
0000f8f0  68 6f 75 67 68 2c 20 72  65 6d 6f 76 65 73 20 74  |hough, removes t|
0000f900  68 65 20 6e 65 65 64 20  74 6f 20 74 72 61 6e 73  |he need to trans|
0000f910  6c 61 74 65 20 74 68 65  20 64 75 6d 70 20 69 6e  |late the dump in|
0000f920  74 6f 20 44 46 42 0d 6f  72 20 73 69 6d 69 6c 61  |to DFB.or simila|
0000f930  72 20 64 69 72 65 63 74  69 76 65 73 2e 20 20 49  |r directives.  I|
0000f940  66 2c 20 66 6f 72 20 65  78 61 6d 70 6c 65 2c 20  |f, for example, |
0000f950  74 68 65 20 64 75 6d 70  20 77 61 73 20 69 6e 20  |the dump was in |
0000f960  66 69 6c 65 20 20 42 41  4e 4e 45 52 2c 0d 77 72  |file  BANNER,.wr|
0000f970  69 74 69 6e 67 0d 0d 20  20 20 20 20 20 20 20 20  |iting..         |
0000f980  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000f990  20 20 20 20 43 4f 44 45  20 20 42 41 4e 4e 45 52  |    CODE  BANNER|
0000f9a0  0d 0d 77 6f 75 6c 64 20  63 61 75 73 65 20 74 68  |..would cause th|
0000f9b0  65 20 41 73 73 65 6d 62  6c 65 72 20 74 6f 20 72  |e Assembler to r|
0000f9c0  65 61 64 20 69 74 20 69  6e 20 61 6e 64 20 63 6f  |ead it in and co|
0000f9d0  70 79 20 74 68 65 20 62  79 74 65 73 20 1b 2d 01  |py the bytes .-.|
0000f9e0  64 69 72 65 63 74 6c 79  1b 2d 00 20 74 6f 0d 74  |directly.-. to.t|
0000f9f0  68 65 20 6f 62 6a 65 63  74 20 66 69 6c 65 2c 20  |he object file, |
0000fa00  77 69 74 68 6f 75 74 20  70 72 6f 63 65 73 73 69  |without processi|
0000fa10  6e 67 20 74 68 65 6d 20  69 6e 20 61 6e 79 20 77  |ng them in any w|
0000fa20  61 79 2e 0d 0d 20 20 20  42 79 20 20 64 65 66 61  |ay...   By  defa|
0000fa30  75 6c 74 2c 20 20 74 68  65 20 6c 69 73 74 69 6e  |ult,  the listin|
0000fa40  67 20 77 69 6c 6c 20 73  68 6f 77 20 6f 6e 6c 79  |g will show only|
0000fa50  20 74 68 65 20 66 69 72  73 74 20 33 20 62 79 74  | the first 3 byt|
0000fa60  65 73 20 69 6e 63 6c 75  64 65 64 0d 66 72 6f 6d  |es included.from|
0000fa70  20 74 68 65 20 20 43 4f  44 45 20 20 66 69 6c 65  | the  CODE  file|
0000fa80  2c 20 20 73 69 6e 63 65  20 20 6f 74 68 65 72 77  |,  since  otherw|
0000fa90  69 73 65 20 61 20 63 6f  6e 73 69 64 65 72 61 62  |ise a considerab|
0000faa0  6c 65 20 61 6d 6f 75 6e  74 20 6f 66 20 70 61 70  |le amount of pap|
0000fab0  65 72 0d 6d 69 67 68 74  20 62 65 20 75 73 65 64  |er.might be used|
0000fac0  2e 20 49 66 20 79 6f 75  20 1b 2d 01 64 6f 1b 2d  |. If you .-.do.-|
0000fad0  00 20 77 61 6e 74 20 74  6f 20 73 65 65 20 61 6c  |. want to see al|
0000fae0  6c 20 74 68 65 20 62 79  74 65 73 20 69 6e 20 74  |l the bytes in t|
0000faf0  68 65 20 6c 69 73 74 69  6e 67 2c 20 75 73 65 0d  |he listing, use.|
0000fb00  74 68 65 20 43 4c 53 54  20 64 69 72 65 63 74 69  |the CLST directi|
0000fb10  76 65 20 74 6f 20 73 65  74 20 74 68 65 20 63 6f  |ve to set the co|
0000fb20  64 65 20 6c 69 73 74 69  6e 67 20 6c 65 76 65 6c  |de listing level|
0000fb30  20 74 6f 20 32 20 62 65  66 6f 72 65 20 75 73 69  | to 2 before usi|
0000fb40  6e 67 20 74 68 65 0d 43  4f 44 45 20 64 69 72 65  |ng the.CODE dire|
0000fb50  63 74 69 76 65 20 69 74  73 65 6c 66 2e 0d 0d 20  |ctive itself... |
0000fb60  20 20 59 6f 75 20 63 61  6e 6e 6f 74 20 75 73 65  |  You cannot use|
0000fb70  20 74 68 65 20 20 43 4f  44 45 20 20 64 69 72 65  | the  CODE  dire|
0000fb80  63 74 69 76 65 20 77 69  74 68 69 6e 20 20 61 20  |ctive within  a |
0000fb90  20 6d 61 63 72 6f 2c 20  20 6f 72 20 20 66 72 6f  | macro,  or  fro|
0000fba0  6d 20 20 61 6e 0d 49 4e  43 4c 55 44 45 20 66 69  |m  an.INCLUDE fi|
0000fbb0  6c 65 2e 0d 0d 0d 0d 0d  20 20 20 20 20 20 20 20  |le......        |
0000fbc0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
0000fbd0  20 20 20 20 20 20 20 20  20 32 36 0d 0d 0d 0d 0d  |         26.....|
0000fbe0  0d 1b 47 20 20 20 20 20  20 20 20 20 20 20 20 20  |..G             |
0000fbf0  20 20 20 20 20 20 20 20  20 55 53 49 4e 47 20 54  |         USING T|
0000fc00  48 45 20 36 35 43 30 32  20 41 53 53 45 4d 42 4c  |HE 65C02 ASSEMBL|
0000fc10  45 52 1b 48 0d 0d 0d 0d  1b 2d 01 1b 47 35 2e 20  |ER.H.....-..G5. |
0000fc20  4f 42 4a 45 43 54 20 46  49 4c 45 20 43 4f 4e 54  |OBJECT FILE CONT|
0000fc30  52 4f 4c 20 44 49 52 45  43 54 49 56 45 53 1b 2d  |ROL DIRECTIVES.-|
0000fc40  00 1b 48 0d 0d 0d 20 20  20 54 68 65 20 20 41 73  |..H...   The  As|
0000fc50  73 65 6d 62 6c 65 72 20  20 63 6f 6e 74 61 69 6e  |sembler  contain|
0000fc60  73 20 20 61 20 20 6e 75  6d 62 65 72 20 20 6f 66  |s  a  number  of|
0000fc70  20 64 69 72 65 63 74 69  76 65 73 20 74 68 61 74  | directives that|
0000fc80  20 63 6f 6e 74 72 6f 6c  20 74 68 65 0d 6f 62 6a  | control the.obj|
0000fc90  65 63 74 20 66 69 6c 65  2e 20 20 54 68 65 79 20  |ect file.  They |
0000fca0  6c 65 74 20 79 6f 75 20  64 65 66 69 6e 65 20 74  |let you define t|
0000fcb0  68 65 20 61 63 74 75 61  6c 20 20 61 64 64 72 65  |he actual  addre|
0000fcc0  73 73 20 20 74 68 61 74  20 20 74 68 65 20 20 63  |ss  that  the  c|
0000fcd0  6f 64 65 0d 67 65 6e 65  72 61 74 65 64 20 77 69  |ode.generated wi|
0000fce0  6c 6c 20 72 75 6e 20 61  74 2c 20 20 6d 61 70 20  |ll run at,  map |
0000fcf0  73 79 6d 62 6f 6c 20 64  65 66 69 6e 69 74 69 6f  |symbol definitio|
0000fd00  6e 73 20 69 6e 74 6f 20  77 6f 72 6b 73 70 61 63  |ns into workspac|
0000fd10  65 2c 20 61 6e 64 20 73  65 74 0d 74 68 65 20 6c  |e, and set.the l|
0000fd20  6f 61 64 20 61 6e 64 20  65 78 65 63 75 74 69 6f  |oad and executio|
0000fd30  6e 20 61 64 64 72 65 73  73 65 73 20 66 6f 72 20  |n addresses for |
0000fd40  74 68 65 20 66 69 6e 61  6c 20 72 65 73 75 6c 74  |the final result|
0000fd50  2e 0d 0d 0d 1b 2d 01 35  2e 31 20 44 65 66 69 6e  |.....-.5.1 Defin|
0000fd60  69 6e 67 20 74 68 65 20  63 75 72 72 65 6e 74 20  |ing the current |
0000fd70  61 64 64 72 65 73 73 1b  2d 00 0d 0d 20 20 20 49  |address.-...   I|
0000fd80  6e 20 20 61 6c 6d 6f 73  74 20 20 61 6c 6c 20 20  |n  almost  all  |
0000fd90  70 72 6f 67 72 61 6d 73  20 20 79 6f 75 20 20 61  |programs  you  a|
0000fda0  73 73 65 6d 62 6c 65 2c  20 79 6f 75 20 77 69 6c  |ssemble, you wil|
0000fdb0  6c 20 6e 65 65 64 20 74  6f 20 74 65 6c 6c 20 74  |l need to tell t|
0000fdc0  68 65 0d 41 73 73 65 6d  62 6c 65 72 20 74 68 65  |he.Assembler the|
0000fdd0  20 61 63 74 75 61 6c 20  61 64 64 72 65 73 73 20  | actual address |
0000fde0  61 74 20 77 68 69 63 68  20 74 68 65 20 72 65 73  |at which the res|
0000fdf0  75 6c 74 69 6e 67 20 63  6f 64 65 20 69 73 20 74  |ulting code is t|
0000fe00  6f 20 72 75 6e 2e 20 49  74 0d 77 69 6c 6c 20 74  |o run. It.will t|
0000fe10  68 65 6e 20 62 65 20 61  62 6c 65 20 74 6f 20 61  |hen be able to a|
0000fe20  73 73 69 67 6e 20 74 68  65 20 63 6f 72 72 65 63  |ssign the correc|
0000fe30  74 20 61 64 64 72 65 73  73 20 76 61 6c 75 65 73  |t address values|
0000fe40  20 74 6f 20 6c 61 62 65  6c 73 2e 0d 0d 20 20 20  | to labels...   |
0000fe50  59 6f 75 20 64 65 66 69  6e 65 20 74 68 65 20 63  |You define the c|
0000fe60  75 72 72 65 6e 74 20 61  64 64 72 65 73 73 20 77  |urrent address w|
0000fe70  69 74 68 20 74 68 65 20  4f 52 47 20 64 69 72 65  |ith the ORG dire|
0000fe80  63 74 69 76 65 2e 20 46  6f 72 20 65 78 61 6d 70  |ctive. For examp|
0000fe90  6c 65 2c 0d 79 6f 75 20  63 6f 75 6c 64 20 77 72  |le,.you could wr|
0000fea0  69 74 65 0d 0d 20 20 20  20 20 20 20 20 20 20 20  |ite..           |
0000feb0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 4f 52  |              OR|
0000fec0  47 20 20 20 20 24 31 39  30 30 0d 0d 62 65 66 6f  |G    $1900..befo|
0000fed0  72 65 20 74 68 65 20 66  69 72 73 74 20 63 6f 64  |re the first cod|
0000fee0  65 20 6c 69 6e 65 20 69  6e 20 74 68 65 20 73 6f  |e line in the so|
0000fef0  75 72 63 65 2e 20 20 54  68 69 73 20 77 6f 75 6c  |urce.  This woul|
0000ff00  64 20 73 65 74 20 74 68  65 20 20 61 64 64 72 65  |d set the  addre|
0000ff10  73 73 0d 76 61 6c 75 65  20 20 74 6f 20 20 24 31  |ss.value  to  $1|
0000ff20  39 30 30 2c 20 20 61 6e  64 20 20 74 68 65 20 41  |900,  and  the A|
0000ff30  73 73 65 6d 62 6c 65 72  20 77 6f 75 6c 64 20 70  |ssembler would p|
0000ff40  72 6f 64 75 63 65 20 63  6f 64 65 20 62 61 73 65  |roduce code base|
0000ff50  64 20 6f 6e 20 74 68 61  74 0d 61 64 64 72 65 73  |d on that.addres|
0000ff60  73 2e 0d 0d 20 20 20 59  6f 75 20 63 61 6e 20 73  |s...   You can s|
0000ff70  70 65 63 69 66 79 20 74  68 65 20 20 61 64 64 72  |pecify the  addr|
0000ff80  65 73 73 20 20 69 6e 20  20 74 68 65 20 20 6f 70  |ess  in  the  op|
0000ff90  65 72 61 6e 64 20 20 66  69 65 6c 64 20 20 6f 66  |erand  field  of|
0000ffa0  20 20 74 68 65 20 20 4f  52 47 0d 64 69 72 65 63  |  the  ORG.direc|
0000ffb0  74 69 76 65 20 20 61 73  20 20 61 6e 79 20 20 65  |tive  as  any  e|
0000ffc0  78 70 72 65 73 73 69 6f  6e 20 20 79 6f 75 20 6c  |xpression  you l|
0000ffd0  69 6b 65 3a 20 68 6f 77  65 76 65 72 2c 20 73 69  |ike: however, si|
0000ffe0  6e 63 65 20 74 68 65 20  41 73 73 65 6d 62 6c 65  |nce the Assemble|
0000fff0  72 0d 1b 2d 01 6d 75 73  74 1b 2d 00 20 6b 6e 6f  |r..-.must.-. kno|
00010000  77 20 74 68 65 20 76 61  6c 75 65 20 74 6f 20 75  |w the value to u|
00010010  73 65 20 6f 6e 20 70 61  73 73 20 31 2c 20 20 74  |se on pass 1,  t|
00010020  68 65 20 65 78 70 72 65  73 73 69 6f 6e 20 20 63  |he expression  c|
00010030  61 6e 6e 6f 74 20 20 63  6f 6e 74 61 69 6e 0d 66  |annot  contain.f|
00010040  6f 72 77 61 72 64 20 72  65 66 65 72 65 6e 63 65  |orward reference|
00010050  73 2e 0d 0d 20 20 20 4e  6f 74 65 20 20 74 68 61  |s...   Note  tha|
00010060  74 20 74 68 65 20 4f 52  47 20 64 69 72 65 63 74  |t the ORG direct|
00010070  69 76 65 20 70 65 72 6d  69 74 73 20 79 6f 75 20  |ive permits you |
00010080  74 6f 20 73 70 65 63 69  66 79 20 6f 6e 6c 79 20  |to specify only |
00010090  61 20 74 77 6f 2d 62 79  74 65 0d 28 6f 72 20 31  |a two-byte.(or 1|
000100a0  36 20 62 69 74 29 20 61  64 64 72 65 73 73 20 76  |6 bit) address v|
000100b0  61 6c 75 65 2e 20 20 44  69 73 63 20 66 69 6c 69  |alue.  Disc fili|
000100c0  6e 67 20 73 79 73 74 65  6d 73 20 75 73 65 20 61  |ng systems use a|
000100d0  20 20 33 32 20 62 69 74  20 20 61 64 64 72 65 73  |  32 bit  addres|
000100e0  73 0d 76 61 6c 75 65 20  20 74 6f 20 63 6f 6e 74  |s.value  to cont|
000100f0  72 6f 6c 20 77 68 69 63  68 20 70 72 6f 63 65 73  |rol which proces|
00010100  73 6f 72 20 61 20 66 69  6c 65 20 69 73 20 74 6f  |sor a file is to|
00010110  20 62 65 20 6c 6f 61 64  65 64 20 69 6e 74 6f 2c  | be loaded into,|
00010120  20 20 61 6e 64 20 74 6f  0d 73 65 74 20 74 68 65  |  and to.set the|
00010130  20 74 6f 70 20 74 77 6f  20 62 79 74 65 73 20 77  | top two bytes w|
00010140  69 74 68 20 74 68 65 20  41 73 73 65 6d 62 6c 65  |ith the Assemble|
00010150  72 20 79 6f 75 20 73 68  6f 75 6c 64 20 75 73 65  |r you should use|
00010160  20 74 68 65 20 20 4c 4f  41 44 20 20 61 6e 64 0d  | the  LOAD  and.|
00010170  45 58 45 43 20 64 69 72  65 63 74 69 76 65 73 2c  |EXEC directives,|
00010180  20 64 65 73 63 72 69 62  65 64 20 69 6e 20 73 65  | described in se|
00010190  63 74 69 6f 6e 20 35 2e  34 2e 0d 0d 20 20 20 59  |ction 5.4...   Y|
000101a0  6f 75 20 20 63 61 6e 20  75 73 65 20 61 73 20 6d  |ou  can use as m|
000101b0  61 6e 79 20 4f 52 47 20  64 69 72 65 63 74 69 76  |any ORG directiv|
000101c0  65 73 20 61 73 20 79 6f  75 20 77 69 73 68 20 77  |es as you wish w|
000101d0  69 74 68 69 6e 20 79 6f  75 72 20 70 72 6f 67 72  |ithin your progr|
000101e0  61 6d 0d 73 6f 75 72 63  65 2c 20 61 6e 64 20 79  |am.source, and y|
000101f0  6f 75 20 63 61 6e 20 6d  6f 76 65 20 74 68 65 20  |ou can move the |
00010200  63 75 72 72 65 6e 74 20  61 64 64 72 65 73 73 20  |current address |
00010210  20 76 61 6c 75 65 20 20  74 6f 20 20 61 6e 79 77  | value  to  anyw|
00010220  68 65 72 65 20 20 79 6f  75 0d 77 69 73 68 2e 20  |here  you.wish. |
00010230  20 48 6f 77 65 76 65 72  2c 20 20 79 6f 75 20 20  | However,  you  |
00010240  73 68 6f 75 6c 64 20 20  72 65 6d 65 6d 62 65 72  |should  remember|
00010250  20 20 74 68 61 74 20 20  74 68 65 20 4f 52 47 20  |  that  the ORG |
00010260  64 69 72 65 63 74 69 76  65 20 68 61 73 20 6e 6f  |directive has no|
00010270  0d 65 66 66 65 63 74 20  6f 6e 20 77 68 65 72 65  |.effect on where|
00010280  20 69 6e 20 74 68 65 20  6f 62 6a 65 63 74 20 66  | in the object f|
00010290  69 6c 65 20 62 79 74 65  73 20 61 72 65 20 77 72  |ile bytes are wr|
000102a0  69 74 74 65 6e 2e 20 54  68 75 73 2c 20 74 68 65  |itten. Thus, the|
000102b0  20 73 6f 75 72 63 65 0d  6c 69 6e 65 73 0d 0d 20  | source.lines.. |
000102c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000102d0  20 20 20 20 20 20 20 20  4f 52 47 20 20 20 24 31  |        ORG   $1|
000102e0  39 30 30 0d 20 20 20 20  20 20 20 20 20 20 20 20  |900.            |
000102f0  20 20 20 20 20 20 20 20  20 20 20 20 20 4c 44 41  |             LDA|
00010300  20 20 20 23 31 0d 20 20  20 20 20 20 20 20 20 20  |   #1.          |
00010310  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 4f  |               O|
00010320  52 47 20 20 20 24 33 30  30 30 0d 20 20 20 20 20  |RG   $3000.     |
00010330  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00010340  20 20 20 20 4c 44 41 20  20 20 23 32 0d 0d 77 6f  |    LDA   #2..wo|
00010350  75 6c 64 20 73 65 74 20  74 68 65 20 61 64 64 72  |uld set the addr|
00010360  65 73 73 20 74 6f 20 24  31 39 30 30 2c 20 61 6e  |ess to $1900, an|
00010370  64 20 77 72 69 74 65 20  74 68 65 20 74 77 6f 20  |d write the two |
00010380  62 79 74 65 73 20 20 66  6f 72 20 20 74 68 65 20  |bytes  for  the |
00010390  20 4c 44 41 0d 69 6e 73  74 72 75 63 74 69 6f 6e  | LDA.instruction|
000103a0  20 74 6f 20 74 68 65 20  6f 62 6a 65 63 74 20 66  | to the object f|
000103b0  69 6c 65 2e 20 20 49 74  20 74 68 65 6e 20 73 65  |ile.  It then se|
000103c0  74 73 20 74 68 65 20 61  64 64 72 65 73 73 20 74  |ts the address t|
000103d0  6f 20 24 33 30 30 30 20  61 6e 64 0d 77 72 69 74  |o $3000 and.writ|
000103e0  65 73 20 20 74 68 65 20  20 62 79 74 65 73 20 20  |es  the  bytes  |
000103f0  66 6f 72 20 74 68 65 20  73 65 63 6f 6e 64 20 4c  |for the second L|
00010400  44 41 20 69 6e 73 74 72  75 63 74 69 6f 6e 3a 20  |DA instruction: |
00010410  20 68 6f 77 65 76 65 72  2c 20 74 68 65 20 66 6f  | however, the fo|
00010420  75 72 0d 62 79 74 65 73  20 77 69 6c 6c 20 62 65  |ur.bytes will be|
00010430  20 1b 2d 01 63 6f 6e 74  69 67 75 6f 75 73 1b 2d  | .-.contiguous.-|
00010440  00 20 69 6e 20 74 68 65  20 6f 62 6a 65 63 74 20  |. in the object |
00010450  66 69 6c 65 20 2d 20 74  68 65 20 41 73 73 65 6d  |file - the Assem|
00010460  62 6c 65 72 20 20 77 69  6c 6c 20 20 6e 6f 74 0d  |bler  will  not.|
00010470  67 65 6e 65 72 61 74 65  20 20 61 20 67 61 70 2e  |generate  a gap.|
00010480  20 20 59 6f 75 20 63 6f  75 6c 64 20 75 73 65 20  |  You could use |
00010490  74 68 69 73 20 65 66 66  65 63 74 2c 20 66 6f 72  |this effect, for|
000104a0  20 69 6e 73 74 61 6e 63  65 2c 20 74 6f 20 77 72  | instance, to wr|
000104b0  69 74 65 20 61 6e 0d 6f  62 6a 65 63 74 20 66 69  |ite an.object fi|
000104c0  6c 65 20 63 6f 6e 74 61  69 6e 69 6e 67 20 6d 61  |le containing ma|
000104d0  6e 79 20 73 65 63 74 69  6f 6e 73 20 6f 66 20 6f  |ny sections of o|
000104e0  76 65 72 6c 61 79 20 63  6f 64 65 20 20 2d 20 20  |verlay code  -  |
000104f0  65 61 63 68 20 20 73 65  63 74 69 6f 6e 0d 77 6f  |each  section.wo|
00010500  75 6c 64 20 62 65 20 61  73 73 65 6d 62 6c 65 64  |uld be assembled|
00010510  20 74 6f 20 72 75 6e 20  61 74 20 74 68 65 20 73  | to run at the s|
00010520  61 6d 65 20 61 64 64 72  65 73 73 2c 20 20 62 75  |ame address,  bu|
00010530  74 20 74 68 65 79 20 77  6f 75 6c 64 20 6c 69 65  |t they would lie|
00010540  20 6f 6e 65 0d 61 66 74  65 72 20 74 68 65 20 6f  | one.after the o|
00010550  74 68 65 72 20 69 6e 20  74 68 65 20 6f 62 6a 65  |ther in the obje|
00010560  63 74 20 66 69 6c 65 2e  0d 0d 0d 20 20 20 20 20  |ct file....     |
00010570  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00010580  20 20 20 20 20 20 20 20  20 20 20 20 32 37 0d 0d  |            27..|
00010590  0d 0d 0d 0d 1b 47 20 20  20 20 20 20 20 20 20 20  |.....G          |
000105a0  20 20 20 20 20 20 20 20  20 20 20 20 55 53 49 4e  |            USIN|
000105b0  47 20 54 48 45 20 36 35  43 30 32 20 41 53 53 45  |G THE 65C02 ASSE|
000105c0  4d 42 4c 45 52 1b 48 0d  0d 0d 0d 0d 49 66 20 20  |MBLER.H.....If  |
000105d0  79 6f 75 20 1b 2d 01 64  6f 1b 2d 00 20 20 72 65  |you .-.do.-.  re|
000105e0  71 75 69 72 65 20 74 6f  20 6c 65 61 76 65 20 61  |quire to leave a|
000105f0  20 67 61 70 20 69 6e 20  74 68 65 20 6f 62 6a 65  | gap in the obje|
00010600  63 74 20 66 69 6c 65 2c  20 79 6f 75 20 63 61 6e  |ct file, you can|
00010610  20 75 73 65 20 74 68 65  0d 44 53 20 64 69 72 65  | use the.DS dire|
00010620  63 74 69 76 65 20 74 6f  20 20 67 65 6e 65 72 61  |ctive to  genera|
00010630  74 65 20 20 74 68 65 20  20 72 65 71 75 69 72 65  |te  the  require|
00010640  64 20 20 67 61 70 20 20  79 6f 75 72 73 65 6c 66  |d  gap  yourself|
00010650  20 20 28 73 65 65 20 20  73 65 63 74 69 6f 6e 0d  |  (see  section.|
00010660  35 2e 33 2e 31 29 2e 20  20 54 68 65 72 65 20 69  |5.3.1).  There i|
00010670  73 20 6e 6f 20 77 61 79  20 6f 66 20 6d 61 6b 69  |s no way of maki|
00010680  6e 67 20 74 68 65 20 41  73 73 65 6d 62 6c 65 72  |ng the Assembler|
00010690  20 6d 6f 76 65 20 1b 2d  01 62 61 63 6b 77 61 72  | move .-.backwar|
000106a0  64 73 1b 2d 00 20 69 6e  20 74 68 65 0d 6f 62 6a  |ds.-. in the.obj|
000106b0  65 63 74 20 66 69 6c 65  2e 0d 0d 0d 0d 1b 2d 01  |ect file......-.|
000106c0  35 2e 32 20 52 65 61 64  69 6e 67 20 74 68 65 20  |5.2 Reading the |
000106d0  63 75 72 72 65 6e 74 20  61 64 64 72 65 73 73 1b  |current address.|
000106e0  2d 00 0d 0d 0d 20 20 20  59 6f 75 20 63 61 6e 20  |-....   You can |
000106f0  75 73 65 20 20 74 68 65  20 20 76 61 6c 75 65 20  |use  the  value |
00010700  20 6f 66 20 20 74 68 65  20 20 63 75 72 72 65 6e  | of  the  curren|
00010710  74 20 20 61 64 64 72 65  73 73 20 20 63 6f 75 6e  |t  address  coun|
00010720  74 65 72 20 20 77 69 74  68 69 6e 0d 65 78 70 72  |ter  within.expr|
00010730  65 73 73 69 6f 6e 73 20  20 62 79 20 72 65 66 65  |essions  by refe|
00010740  72 72 69 6e 67 20 74 6f  20 69 74 20 77 69 74 68  |rring to it with|
00010750  20 74 68 65 20 73 70 65  63 69 61 6c 20 73 79 6d  | the special sym|
00010760  62 6f 6c 20 22 2a 22 2e  20 20 54 68 69 73 20 63  |bol "*".  This c|
00010770  61 6e 0d 62 65 20 75 73  65 64 20 65 78 61 63 74  |an.be used exact|
00010780  6c 79 20 61 73 20 61 6e  79 20 6f 74 68 65 72 20  |ly as any other |
00010790  73 79 6d 62 6f 6c 20 69  6e 20 65 78 70 72 65 73  |symbol in expres|
000107a0  73 69 6f 6e 73 2c 20 20  73 6f 20 74 68 61 74 2c  |sions,  so that,|
000107b0  20 73 61 79 2c 20 79 6f  75 0d 63 6f 75 6c 64 20  | say, you.could |
000107c0  77 6f 72 6b 20 6f 75 74  20 74 68 65 20 73 69 7a  |work out the siz|
000107d0  65 20 6f 66 20 61 20 64  61 74 61 20 74 61 62 6c  |e of a data tabl|
000107e0  65 20 77 69 74 68 0d 0d  20 20 20 20 20 20 20 20  |e with..        |
000107f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00010800  20 54 41 42 4c 45 20 20  20 44 46 42 20 20 20 31  | TABLE   DFB   1|
00010810  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00010820  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00010830  20 20 44 46 42 20 20 20  32 0d 20 20 20 20 20 20  |  DFB   2.      |
00010840  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00010850  20 20 20 20 20 20 20 20  20 20 20 44 46 42 20 20  |           DFB  |
00010860  20 33 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  | 3.             |
00010870  20 20 20 20 20 20 20 20  20 20 20 20 54 2e 53 49  |            T.SI|
00010880  5a 45 20 20 45 51 55 20  20 20 2a 2d 54 41 42 4c  |ZE  EQU   *-TABL|
00010890  45 0d 0d 77 68 65 72 65  20 20 54 2e 53 49 5a 45  |E..where  T.SIZE|
000108a0  20 20 77 69 6c 6c 20 62  65 20 73 65 74 20 74 6f  |  will be set to|
000108b0  20 74 68 65 20 20 6e 75  6d 62 65 72 20 20 6f 66  | the  number  of|
000108c0  20 20 62 79 74 65 73 20  20 64 65 66 69 6e 65 64  |  bytes  defined|
000108d0  20 20 69 6e 20 20 74 68  65 0d 70 72 65 63 65 64  |  in  the.preced|
000108e0  69 6e 67 20 74 61 62 6c  65 2e 0d 0d 0d 0d 1b 2d  |ing table......-|
000108f0  01 35 2e 33 20 55 73 69  6e 67 20 64 75 6d 6d 79  |.5.3 Using dummy|
00010900  20 73 65 63 74 69 6f 6e  73 1b 2d 00 0d 0d 0d 20  | sections.-.... |
00010910  20 20 41 20 20 22 64 75  6d 6d 79 20 73 65 63 74  |  A  "dummy sect|
00010920  69 6f 6e 22 20 69 73 20  61 20 63 6f 6e 76 65 6e  |ion" is a conven|
00010930  69 65 6e 74 20 77 61 79  20 6f 66 20 6c 61 79 69  |ient way of layi|
00010940  6e 67 20 6f 75 74 20 73  79 6d 62 6f 6c 73 20 77  |ng out symbols w|
00010950  69 74 68 69 6e 0d 74 68  65 20 77 6f 72 6b 73 70  |ithin.the worksp|
00010960  61 63 65 20 74 68 61 74  20 79 6f 75 72 20 20 70  |ace that your  p|
00010970  72 6f 67 72 61 6d 20 20  6e 65 65 64 73 2e 20 20  |rogram  needs.  |
00010980  46 6f 72 20 20 65 78 61  6d 70 6c 65 2c 20 20 73  |For  example,  s|
00010990  75 70 70 6f 73 65 20 20  79 6f 75 72 0d 70 72 6f  |uppose  your.pro|
000109a0  67 72 61 6d 20 20 6e 65  65 64 65 64 20 20 73 6f  |gram  needed  so|
000109b0  6d 65 20 70 61 67 65 20  7a 65 72 6f 20 77 6f 72  |me page zero wor|
000109c0  6b 73 70 61 63 65 2e 20  20 59 6f 75 20 63 6f 75  |kspace.  You cou|
000109d0  6c 64 20 62 75 69 6c 64  20 74 68 65 20 61 63 74  |ld build the act|
000109e0  75 61 6c 0d 6e 75 6d 65  72 69 63 20 61 64 64 72  |ual.numeric addr|
000109f0  65 73 73 65 73 20 69 6e  74 6f 20 74 68 65 20 73  |esses into the s|
00010a00  6f 75 72 63 65 2c 20 20  62 75 74 20 69 74 27 73  |ource,  but it's|
00010a10  20 6d 75 63 68 20 20 62  65 74 74 65 72 20 20 70  | much  better  p|
00010a20  72 6f 67 72 61 6d 6d 69  6e 67 0d 70 72 61 63 74  |rogramming.pract|
00010a30  69 63 65 20 74 6f 20 64  65 66 69 6e 65 20 73 6f  |ice to define so|
00010a40  6d 65 20 73 79 6d 62 6f  6c 73 20 74 6f 20 69 64  |me symbols to id|
00010a50  65 6e 74 69 66 79 20 74  68 65 20 6c 6f 63 61 74  |entify the locat|
00010a60  69 6f 6e 73 2e 0d 0d 20  20 20 4f 6e 65 20 20 77  |ions...   One  w|
00010a70  61 79 20 20 6f 66 20 20  64 6f 69 6e 67 20 20 74  |ay  of  doing  t|
00010a80  68 69 73 20 20 77 6f 75  6c 64 20 62 65 20 74 6f  |his  would be to|
00010a90  20 75 73 65 20 74 68 65  20 45 51 55 20 64 69 72  | use the EQU dir|
00010aa0  65 63 74 69 76 65 2c 20  77 68 69 63 68 0d 73 69  |ective, which.si|
00010ab0  6d 70 6c 79 20 73 65 74  73 20 75 70 20 61 20 73  |mply sets up a s|
00010ac0  79 6d 62 6f 6c 20 61 6e  64 20 67 69 76 65 73 20  |ymbol and gives |
00010ad0  69 74 20 61 20 76 61 6c  75 65 2e 20 20 54 68 75  |it a value.  Thu|
00010ae0  73 20 79 6f 75 20 63 6f  75 6c 64 20 77 72 69 74  |s you could writ|
00010af0  65 0d 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |e..             |
00010b00  20 20 20 20 20 20 20 20  20 20 20 20 57 4f 52 4b  |            WORK|
00010b10  30 20 20 45 51 55 20 20  20 24 30 30 0d 20 20 20  |0  EQU   $00.   |
00010b20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00010b30  20 20 20 20 20 20 57 4f  52 4b 31 20 20 45 51 55  |      WORK1  EQU|
00010b40  20 20 20 24 30 31 0d 20  20 20 20 20 20 20 20 20  |   $01.         |
00010b50  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00010b60  57 4f 52 4b 32 20 20 45  51 55 20 20 20 24 30 32  |WORK2  EQU   $02|
00010b70  0d 0d 74 6f 20 73 65 74  20 75 70 20 74 68 72 65  |..to set up thre|
00010b80  65 20 73 79 6d 62 6f 6c  73 2e 20 20 54 68 69 73  |e symbols.  This|
00010b90  20 69 73 20 61 20 70 65  72 66 65 63 74 6c 79 20  | is a perfectly |
00010ba0  61 64 65 71 75 61 74 65  20 74 65 63 68 6e 69 71  |adequate techniq|
00010bb0  75 65 2c 20 20 62 75 74  0d 73 75 66 66 65 72 73  |ue,  but.suffers|
00010bc0  20 20 66 72 6f 6d 20 20  74 68 65 20 64 69 73 61  |  from  the disa|
00010bd0  64 76 61 6e 74 61 67 65  20 74 68 61 74 20 79 6f  |dvantage that yo|
00010be0  75 20 77 6f 75 6c 64 20  68 61 76 65 20 74 6f 20  |u would have to |
00010bf0  63 68 61 6e 67 65 20 61  20 6c 6f 74 20 6f 66 0d  |change a lot of.|
00010c00  74 68 65 20 73 6f 75 72  63 65 20 69 66 2c 20 20  |the source if,  |
00010c10  73 61 79 2c 20 20 79 6f  75 20 65 76 65 72 20 77  |say,  you ever w|
00010c20  61 6e 74 65 64 20 74 68  65 20 70 61 67 65 20 7a  |anted the page z|
00010c30  65 72 6f 20 77 6f 72 6b  73 70 61 63 65 20 74 6f  |ero workspace to|
00010c40  20 73 74 61 72 74 0d 61  74 20 73 6f 6d 65 20 70  | start.at some p|
00010c50  6c 61 63 65 20 6f 74 68  65 72 20 74 68 61 6e 20  |lace other than |
00010c60  61 64 64 72 65 73 73 20  24 30 30 2e 0d 0d 20 20  |address $00...  |
00010c70  20 41 20 62 65 74 74 65  72 20 74 65 63 68 6e 69  | A better techni|
00010c80  71 75 65 20 69 73 20 74  6f 20 64 65 66 69 6e 65  |que is to define|
00010c90  20 77 6f 72 6b 73 70 61  63 65 20 69 6e 20 61 20  | workspace in a |
00010ca0  64 75 6d 6d 79 20 73 65  63 74 69 6f 6e 2c 20 77  |dummy section, w|
00010cb0  68 69 63 68 0d 69 73 20  61 20 72 65 67 69 6f 6e  |hich.is a region|
00010cc0  20 6f 66 20 74 68 65 20  73 6f 75 72 63 65 20 62  | of the source b|
00010cd0  65 74 77 65 65 6e 20 44  53 45 43 54 20 20 61 6e  |etween DSECT  an|
00010ce0  64 20 20 44 45 4e 44 20  20 64 69 72 65 63 74 69  |d  DEND  directi|
00010cf0  76 65 73 2e 20 20 44 53  45 43 54 0d 69 6e 73 74  |ves.  DSECT.inst|
00010d00  72 75 63 74 73 20 20 74  68 65 20 20 41 73 73 65  |ructs  the  Asse|
00010d10  6d 62 6c 65 72 20 20 74  68 61 74 20 20 61 20 20  |mbler  that  a  |
00010d20  6c 61 79 6f 75 74 20 20  69 73 20 20 62 65 69 6e  |layout  is  bein|
00010d30  67 20 64 65 66 69 6e 65  64 3a 20 69 74 20 77 69  |g defined: it wi|
00010d40  6c 6c 0d 70 72 6f 63 65  73 73 20 61 6e 79 74 68  |ll.process anyth|
00010d50  69 6e 67 20 74 68 61 74  20 66 6f 6c 6c 6f 77 73  |ing that follows|
00010d60  20 69 74 2c 20 62 75 74  20 69 74 20 77 6f 6e 27  | it, but it won'|
00010d70  74 20 67 65 6e 65 72 61  74 65 20 61 6e 79 20 20  |t generate any  |
00010d80  63 6f 64 65 20 20 66 6f  72 0d 74 68 65 20 6f 62  |code  for.the ob|
00010d90  6a 65 63 74 20 66 69 6c  65 2e 20 20 41 6c 6c 20  |ject file.  All |
00010da0  69 74 20 77 69 6c 6c 20  64 6f 20 69 73 20 77 6f  |it will do is wo|
00010db0  72 6b 20 6f 75 74 20 77  68 61 74 20 61 64 64 72  |rk out what addr|
00010dc0  65 73 73 65 73 20 61 6e  79 20 6c 61 62 65 6c 73  |esses any labels|
00010dd0  0d 77 69 6c 6c 20 74 61  6b 65 2e 0d 0d 0d 0d 20  |.will take..... |
00010de0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00010e00  32 38 0d 0d 0d 0d 0d 0d  1b 47 20 20 20 20 20 20  |28.......G      |
00010e10  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00010e20  55 53 49 4e 47 20 54 48  45 20 36 35 43 30 32 20  |USING THE 65C02 |
00010e30  41 53 53 45 4d 42 4c 45  52 1b 48 0d 0d 0d 0d 20  |ASSEMBLER.H.... |
00010e40  20 20 54 68 75 73 2c 20  79 6f 75 20 63 6f 75 6c  |  Thus, you coul|
00010e50  64 20 77 72 69 74 65 20  74 68 65 20 61 62 6f 76  |d write the abov|
00010e60  65 20 65 78 61 6d 70 6c  65 20 61 73 0d 0d 20 20  |e example as..  |
00010e70  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00010e80  20 20 20 20 20 20 20 20  20 20 20 20 20 20 44 53  |              DS|
00010e90  45 43 54 0d 20 20 20 20  20 20 20 20 20 20 20 20  |ECT.            |
00010ea0  20 20 20 20 20 20 20 20  20 20 20 20 20 57 4f 52  |             WOR|
00010eb0  4b 30 20 20 44 46 42 20  20 20 30 0d 20 20 20 20  |K0  DFB   0.    |
00010ec0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00010ed0  20 20 20 20 20 57 4f 52  4b 31 20 20 44 46 42 20  |     WORK1  DFB |
00010ee0  20 20 30 0d 20 20 20 20  20 20 20 20 20 20 20 20  |  0.            |
00010ef0  20 20 20 20 20 20 20 20  20 20 20 20 20 57 4f 52  |             WOR|
00010f00  4b 32 20 20 44 46 42 20  20 20 30 0d 20 20 20 20  |K2  DFB   0.    |
00010f10  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00010f20  20 20 20 20 20 20 20 20  20 20 20 20 44 45 4e 44  |            DEND|
00010f30  0d 0d 20 20 20 48 65 72  65 20 20 65 61 63 68 20  |..   Here  each |
00010f40  20 6f 66 20 74 68 65 20  77 6f 72 6b 73 70 61 63  | of the workspac|
00010f50  65 20 6c 6f 63 61 74 69  6f 6e 73 20 68 61 73 20  |e locations has |
00010f60  62 65 65 6e 20 64 65 66  69 6e 65 64 20 61 73 20  |been defined as |
00010f70  6f 6e 65 20 62 79 74 65  0d 6c 6f 6e 67 20 77 69  |one byte.long wi|
00010f80  74 68 20 61 20 44 46 42  20 64 69 72 65 63 74 69  |th a DFB directi|
00010f90  76 65 2e 20 20 53 69 6e  63 65 20 20 74 68 65 20  |ve.  Since  the |
00010fa0  20 41 73 73 65 6d 62 6c  65 72 20 20 67 65 6e 65  | Assembler  gene|
00010fb0  72 61 74 65 73 20 20 6e  6f 20 20 63 6f 64 65 0d  |rates  no  code.|
00010fc0  77 69 74 68 69 6e 20 20  61 20 20 44 53 45 43 54  |within  a  DSECT|
00010fd0  2c 20 20 74 68 65 20 20  61 63 74 75 61 6c 20 76  |,  the  actual v|
00010fe0  61 6c 75 65 20 79 6f 75  20 70 6c 61 63 65 20 69  |alue you place i|
00010ff0  6e 20 74 68 65 20 6f 70  65 72 61 6e 64 20 66 69  |n the operand fi|
00011000  65 6c 64 20 69 73 0d 71  75 69 74 65 20 61 72 62  |eld is.quite arb|
00011010  69 74 72 61 72 79 2e 20  20 54 68 69 73 20 74 65  |itrary.  This te|
00011020  63 68 6e 69 71 75 65 20  61 6c 73 6f 20 6c 65 74  |chnique also let|
00011030  73 20 79 6f 75 20 73 65  65 20 63 6c 65 61 72 6c  |s you see clearl|
00011040  79 20 74 68 61 74 20 79  6f 75 27 76 65 0d 73 65  |y that you've.se|
00011050  74 20 74 68 65 20 6c 6f  63 61 74 69 6f 6e 73 20  |t the locations |
00011060  75 70 20 61 73 20 6f 6e  65 2d 62 79 74 65 20 76  |up as one-byte v|
00011070  61 6c 75 65 73 2e 20 20  49 66 20 79 6f 75 20 77  |alues.  If you w|
00011080  69 73 68 65 64 2c 20 73  61 79 2c 20 74 6f 20 20  |ished, say, to  |
00011090  6d 61 6b 65 0d 74 68 65  6d 20 74 77 6f 2d 62 79  |make.them two-by|
000110a0  74 65 20 76 61 6c 75 65  73 2c 20 20 79 6f 75 20  |te values,  you |
000110b0  63 6f 75 6c 64 20 63 68  61 6e 67 65 20 74 68 65  |could change the|
000110c0  20 44 46 42 20 64 69 72  65 63 74 69 76 65 73 20  | DFB directives |
000110d0  74 6f 20 44 57 2e 20 20  54 68 65 0d 41 73 73 65  |to DW.  The.Asse|
000110e0  6d 62 6c 65 72 20 20 77  6f 75 6c 64 20 20 74 68  |mbler  would  th|
000110f0  65 6e 20 20 61 6c 6c 6f  77 20 74 77 6f 20 62 79  |en  allow two by|
00011100  74 65 73 20 74 6f 20 65  61 63 68 20 6c 61 62 65  |tes to each labe|
00011110  6c 2c 20 20 61 6e 64 20  74 68 65 20 73 6f 75 72  |l,  and the sour|
00011120  63 65 0d 77 6f 75 6c 64  20 73 68 6f 77 20 74 68  |ce.would show th|
00011130  69 73 20 63 6c 65 61 72  6c 79 2e 0d 0d 20 20 20  |is clearly...   |
00011140  49 6e 20 74 68 65 20 65  78 61 6d 70 6c 65 20 61  |In the example a|
00011150  62 6f 76 65 2c 20 77 65  20 68 61 76 65 20 69 6d  |bove, we have im|
00011160  70 6c 69 63 69 74 6c 79  20 74 61 6b 65 6e 20 61  |plicitly taken a|
00011170  64 76 61 6e 74 61 67 65  20 6f 66 20 68 6f 77 20  |dvantage of how |
00011180  74 68 65 0d 41 73 73 65  6d 62 6c 65 72 20 68 61  |the.Assembler ha|
00011190  6e 64 6c 65 73 20 74 68  65 20 61 64 64 72 65 73  |ndles the addres|
000111a0  73 20 76 61 6c 75 65 20  77 69 74 68 69 6e 20 61  |s value within a|
000111b0  20 44 53 45 43 54 2e 2e  44 45 4e 44 20 20 62 6c  | DSECT..DEND  bl|
000111c0  6f 63 6b 2e 20 20 57 68  65 6e 0d 69 74 20 20 6d  |ock.  When.it  m|
000111d0  65 65 74 73 20 20 74 68  65 20 66 69 72 73 74 20  |eets  the first |
000111e0  44 53 45 43 54 20 69 6e  20 61 20 73 6f 75 72 63  |DSECT in a sourc|
000111f0  65 2c 20 20 74 68 65 20  41 73 73 65 6d 62 6c 65  |e,  the Assemble|
00011200  72 20 6d 61 6b 65 73 20  61 20 6e 6f 74 65 20 6f  |r makes a note o|
00011210  66 0d 74 68 65 20 61 64  64 72 65 73 73 20 76 61  |f.the address va|
00011220  6c 75 65 20 69 74 20 69  73 20 75 73 69 6e 67 20  |lue it is using |
00011230  69 6e 20 74 68 65 20 63  6f 64 65 2c 20 20 61 6e  |in the code,  an|
00011240  64 20 72 65 73 65 74 73  20 69 74 20 74 6f 20 7a  |d resets it to z|
00011250  65 72 6f 20 20 66 6f 72  0d 74 68 65 20 20 44 53  |ero  for.the  DS|
00011260  45 43 54 2e 2e 44 45 4e  44 20 62 6c 6f 63 6b 2e  |ECT..DEND block.|
00011270  20 20 57 68 65 6e 20 69  74 20 6d 65 65 74 73 20  |  When it meets |
00011280  74 68 65 20 44 45 4e 44  2c 20 20 69 74 20 72 65  |the DEND,  it re|
00011290  73 75 6d 65 73 20 75 73  69 6e 67 20 74 68 65 0d  |sumes using the.|
000112a0  61 64 64 72 65 73 73 20  69 74 20 73 61 76 65 64  |address it saved|
000112b0  20 61 74 20 74 68 65 20  73 74 61 72 74 2e 0d 0d  | at the start...|
000112c0  20 20 20 4f 6e 20 74 68  65 20 73 65 63 6f 6e 64  |   On the second|
000112d0  20 6f 63 63 75 72 72 65  6e 63 65 20 6f 66 20 61  | occurrence of a|
000112e0  20 44 53 45 43 54 2c 20  74 68 65 20 65 66 66 65  | DSECT, the effe|
000112f0  63 74 20 69 73 20 74 68  65 20 73 61 6d 65 2c 20  |ct is the same, |
00011300  65 78 63 65 70 74 0d 74  68 61 74 20 6e 6f 77 20  |except.that now |
00011310  74 68 65 20 61 64 64 72  65 73 73 20 77 69 74 68  |the address with|
00011320  69 6e 20 74 68 65 20 44  53 45 43 54 2e 2e 44 45  |in the DSECT..DE|
00011330  4e 44 20 62 6c 6f 63 6b  20 72 65 73 75 6d 65 73  |ND block resumes|
00011340  20 61 74 20 74 68 65 20  76 61 6c 75 65 0d 69 74  | at the value.it|
00011350  20 72 65 61 63 68 65 64  20 69 6e 20 74 68 65 20  | reached in the |
00011360  1b 2d 01 6c 61 73 74 1b  2d 00 20 62 6c 6f 63 6b  |.-.last.-. block|
00011370  2e 0d 0d 20 20 20 49 66  20 79 6f 75 20 64 6f 6e  |...   If you don|
00011380  27 74 20 77 69 73 68 20  74 6f 20 6f 70 65 72 61  |'t wish to opera|
00011390  74 65 20 69 6e 20 74 68  69 73 20 77 61 79 2c 20  |te in this way, |
000113a0  79 6f 75 20 63 61 6e 20  73 65 74 20 20 74 68 65  |you can set  the|
000113b0  20 20 61 64 64 72 65 73  73 0d 76 61 6c 75 65 20  |  address.value |
000113c0  20 77 69 74 68 20 20 74  68 65 20 20 44 53 45 43  | with  the  DSEC|
000113d0  54 2e 2e 44 45 4e 44 20  20 62 6c 6f 63 6b 20 20  |T..DEND  block  |
000113e0  79 6f 75 72 73 65 6c 66  20 77 69 74 68 20 74 68  |yourself with th|
000113f0  65 20 4f 52 47 20 64 69  72 65 63 74 69 76 65 2e  |e ORG directive.|
00011400  0d 54 68 75 73 2c 20 69  66 20 79 6f 75 20 77 61  |.Thus, if you wa|
00011410  6e 74 65 64 20 79 6f 75  72 20 70 61 67 65 20 7a  |nted your page z|
00011420  65 72 6f 20 77 6f 72 6b  73 70 61 63 65 20 74 6f  |ero workspace to|
00011430  20 62 65 67 69 6e 20 20  61 74 20 20 73 6f 6d 65  | begin  at  some|
00011440  20 20 6f 74 68 65 72 0d  6c 6f 63 61 74 69 6f 6e  |  other.location|
00011450  2c 20 79 6f 75 20 63 6f  75 6c 64 20 77 72 69 74  |, you could writ|
00011460  65 20 74 68 65 20 73 6f  75 72 63 65 20 61 73 0d  |e the source as.|
00011470  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00011480  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00011490  20 44 53 45 43 54 0d 20  20 20 20 20 20 20 20 20  | DSECT.         |
000114a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000114b0  20 20 20 20 20 20 20 4f  52 47 20 20 20 24 37 30  |       ORG   $70|
000114c0  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
000114d0  20 20 20 20 20 20 20 20  20 20 57 4f 52 4b 30 20  |          WORK0 |
000114e0  20 44 46 42 20 20 20 30  0d 20 20 20 20 20 20 20  | DFB   0.       |
000114f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00011500  20 20 57 4f 52 4b 31 20  20 44 46 42 20 20 20 30  |  WORK1  DFB   0|
00011510  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00011520  20 20 20 20 20 20 20 20  20 20 57 4f 52 4b 32 20  |          WORK2 |
00011530  20 44 46 42 20 20 20 30  0d 20 20 20 20 20 20 20  | DFB   0.       |
00011540  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00011550  20 20 20 20 20 20 20 20  20 44 45 4e 44 0d 0d 0d  |         DEND...|
00011560  0d 20 20 20 20 20 1b 2d  01 35 2e 33 2e 31 20 54  |.     .-.5.3.1 T|
00011570  68 65 20 44 53 20 64 69  72 65 63 74 69 76 65 1b  |he DS directive.|
00011580  2d 00 0d 0d 0d 20 20 20  20 20 51 75 69 74 65 20  |-....     Quite |
00011590  20 6f 66 74 65 6e 20 20  79 6f 75 20 20 77 69 6c  | often  you  wil|
000115a0  6c 20 20 6e 65 65 64 20  74 6f 20 64 65 66 69 6e  |l  need to defin|
000115b0  65 20 61 20 6c 61 72 67  65 20 61 72 65 61 20 6f  |e a large area o|
000115c0  66 20 77 6f 72 6b 73 70  61 63 65 0d 20 20 20 20  |f workspace.    |
000115d0  20 77 69 74 68 69 6e 20  61 20 20 44 53 45 43 54  | within a  DSECT|
000115e0  2e 2e 44 45 4e 44 20 20  62 6c 6f 63 6b 2c 20 20  |..DEND  block,  |
000115f0  66 6f 72 20 65 78 61 6d  70 6c 65 20 61 73 20 61  |for example as a|
00011600  20 73 6f 75 72 63 65 20  6c 69 6e 65 20 69 6e 70  | source line inp|
00011610  75 74 0d 20 20 20 20 20  62 75 66 66 65 72 2e 20  |ut.     buffer. |
00011620  20 54 68 65 20 44 46 42  20 61 6e 64 20 44 57 20  | The DFB and DW |
00011630  64 69 72 65 63 74 69 76  65 73 20 61 72 65 20 63  |directives are c|
00011640  6f 6e 76 65 6e 69 65 6e  74 20 77 61 79 73 20 6f  |onvenient ways o|
00011650  66 20 20 6c 61 79 69 6e  67 0d 20 20 20 20 20 6f  |f  laying.     o|
00011660  75 74 20 62 79 74 65 20  61 6e 64 20 77 6f 72 64  |ut byte and word|
00011670  20 76 61 6c 75 65 73 2c  20 62 75 74 20 74 68 65  | values, but the|
00011680  72 65 20 61 72 65 20 6e  6f 20 62 75 69 6c 74 2d  |re are no built-|
00011690  69 6e 20 64 69 72 65 63  74 69 76 65 73 20 74 6f  |in directives to|
000116a0  0d 20 20 20 20 20 6c 61  79 20 6f 75 74 2c 20 73  |.     lay out, s|
000116b0  61 79 2c 20 61 20 32 35  36 2d 62 79 74 65 20 62  |ay, a 256-byte b|
000116c0  75 66 66 65 72 2e 0d 0d  20 20 20 20 20 54 6f 20  |uffer...     To |
000116d0  20 64 6f 20 74 68 69 73  2c 20 79 6f 75 20 63 61  | do this, you ca|
000116e0  6e 20 75 73 65 20 74 68  65 20 44 53 20 64 69 72  |n use the DS dir|
000116f0  65 63 74 69 76 65 2c 20  77 68 69 63 68 20 6c 65  |ective, which le|
00011700  74 73 20 79 6f 75 20 6c  61 79 20 6f 75 74 0d 20  |ts you lay out. |
00011710  20 20 20 20 61 6e 79 20  6e 75 6d 62 65 72 20 6f  |    any number o|
00011720  66 20 62 79 74 65 73 2e  20 20 46 6f 72 20 65 78  |f bytes.  For ex|
00011730  61 6d 70 6c 65 2c 20 74  6f 20 6c 61 79 20 6f 75  |ample, to lay ou|
00011740  74 20 61 20 20 32 35 36  2d 62 79 74 65 20 20 62  |t a  256-byte  b|
00011750  75 66 66 65 72 0d 20 20  20 20 20 79 6f 75 20 63  |uffer.     you c|
00011760  6f 75 6c 64 20 77 72 69  74 65 0d 0d 0d 20 20 20  |ould write...   |
00011770  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00011780  20 20 20 20 20 20 20 20  20 20 20 20 20 20 32 39  |              29|
00011790  0d 0d 0d 0d 0d 0d 1b 47  20 20 20 20 20 20 20 20  |.......G        |
000117a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 55 53  |              US|
000117b0  49 4e 47 20 54 48 45 20  36 35 43 30 32 20 41 53  |ING THE 65C02 AS|
000117c0  53 45 4d 42 4c 45 52 1b  48 0d 0d 0d 0d 20 20 20  |SEMBLER.H....   |
000117d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000117e0  20 20 20 20 20 20 20 20  20 20 20 20 20 44 53 45  |             DSE|
000117f0  43 54 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |CT.             |
00011800  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00011810  20 20 20 4f 52 47 20 20  20 20 24 41 30 30 0d 20  |   ORG    $A00. |
00011820  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00011830  20 20 20 20 20 20 20 20  42 55 46 46 45 52 20 44  |        BUFFER D|
00011840  53 20 20 20 20 20 32 35  36 0d 20 20 20 20 20 20  |S     256.      |
00011850  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00011860  20 20 20 20 20 20 20 20  20 20 44 45 4e 44 0d 0d  |          DEND..|
00011870  20 20 20 20 20 54 68 65  20 20 6f 70 65 72 61 6e  |     The  operan|
00011880  64 20 20 66 69 65 6c 64  20 20 6f 66 20 20 74 68  |d  field  of  th|
00011890  65 20 44 53 20 64 69 72  65 63 74 69 76 65 20 74  |e DS directive t|
000118a0  65 6c 6c 73 20 74 68 65  20 41 73 73 65 6d 62 6c  |ells the Assembl|
000118b0  65 72 20 68 6f 77 0d 20  20 20 20 20 6d 75 63 68  |er how.     much|
000118c0  20 73 70 61 63 65 20 79  6f 75 20 77 69 73 68 20  | space you wish |
000118d0  74 6f 20 6c 61 79 20 6f  75 74 2e 0d 0d 20 20 20  |to lay out...   |
000118e0  20 20 4e 6f 72 6d 61 6c  6c 79 20 74 68 65 20 44  |  Normally the D|
000118f0  53 20 64 69 72 65 63 74  69 76 65 20 69 73 20 75  |S directive is u|
00011900  73 65 64 20 69 6e 20 44  53 45 43 54 2e 2e 44 45  |sed in DSECT..DE|
00011910  4e 44 20 62 6c 6f 63 6b  73 2c 20 20 62 75 74 20  |ND blocks,  but |
00011920  79 6f 75 0d 20 20 20 20  20 63 61 6e 20 61 6c 73  |you.     can als|
00011930  6f 20 75 73 65 20 69 74  20 69 6e 20 74 68 65 20  |o use it in the |
00011940  63 6f 64 65 20 61 72 65  61 20 6f 66 20 61 20 70  |code area of a p|
00011950  72 6f 67 72 61 6d 20 61  73 20 20 77 65 6c 6c 2e  |rogram as  well.|
00011960  20 20 49 6e 20 20 74 68  69 73 0d 20 20 20 20 20  |  In  this.     |
00011970  63 61 73 65 2c 20 20 74  68 65 20 20 41 73 73 65  |case,  the  Asse|
00011980  6d 62 6c 65 72 20 20 77  69 6c 6c 20 77 72 69 74  |mbler  will writ|
00011990  65 20 74 68 65 20 61 70  70 72 6f 70 72 69 61 74  |e the appropriat|
000119a0  65 20 6e 75 6d 62 65 72  20 6f 66 20 62 79 74 65  |e number of byte|
000119b0  73 0d 20 20 20 20 20 63  6f 6e 74 61 69 6e 69 6e  |s.     containin|
000119c0  67 20 74 68 65 20 76 61  6c 75 65 20 7a 65 72 6f  |g the value zero|
000119d0  20 74 6f 20 74 68 65 20  6f 62 6a 65 63 74 20 66  | to the object f|
000119e0  69 6c 65 2e 0d 0d 0d 1b  2d 01 35 2e 34 20 44 65  |ile.....-.5.4 De|
000119f0  66 69 6e 69 6e 67 20 6f  62 6a 65 63 74 20 6c 6f  |fining object lo|
00011a00  61 64 20 61 6e 64 20 65  78 65 63 75 74 69 6f 6e  |ad and execution|
00011a10  20 61 64 64 72 65 73 73  65 73 1b 2d 00 0d 0d 0d  | addresses.-....|
00011a20  20 20 20 45 76 65 72 79  20 6d 61 63 68 69 6e 65  |   Every machine|
00011a30  2d 63 6f 64 65 20 70 72  6f 67 72 61 6d 20 6f 6e  |-code program on|
00011a40  20 61 20 42 42 43 20 43  6f 6d 70 75 74 65 72 20  | a BBC Computer |
00011a50  6e 65 65 64 73 20 74 6f  20 68 61 76 65 20 20 61  |needs to have  a|
00011a60  20 20 6c 6f 61 64 0d 61  64 64 72 65 73 73 20 61  |  load.address a|
00011a70  6e 64 20 61 6e 20 65 78  65 63 75 74 69 6f 6e 20  |nd an execution |
00011a80  61 64 64 72 65 73 73 20  61 73 73 6f 63 69 61 74  |address associat|
00011a90  65 64 20 77 69 74 68 20  69 74 2e 20 20 54 68 65  |ed with it.  The|
00011aa0  73 65 20 76 61 6c 75 65  73 20 61 72 65 0d 73 74  |se values are.st|
00011ab0  6f 72 65 64 20 69 6e 20  74 68 65 20 66 69 6c 65  |ored in the file|
00011ac0  27 73 20 63 61 74 61 6c  6f 67 75 65 20 65 6e 74  |'s catalogue ent|
00011ad0  72 79 3a 20 77 68 65 6e  20 79 6f 75 20 74 68 65  |ry: when you the|
00011ae0  6e 20 2a 52 55 4e 20 74  68 65 20 66 69 6c 65 2c  |n *RUN the file,|
00011af0  20 74 68 65 0d 66 69 6c  69 6e 67 20 73 79 73 74  | the.filing syst|
00011b00  65 6d 20 77 69 6c 6c 20  6c 6f 61 64 20 69 74 20  |em will load it |
00011b10  74 6f 20 6d 65 6d 6f 72  79 20 73 74 61 72 74 69  |to memory starti|
00011b20  6e 67 20 61 74 20 74 68  65 20 6c 6f 61 64 20 61  |ng at the load a|
00011b30  64 64 72 65 73 73 2c 20  61 6e 64 0d 77 69 6c 6c  |ddress, and.will|
00011b40  20 65 6e 74 65 72 20 69  74 20 77 69 74 68 20 61  | enter it with a|
00011b50  20 4a 53 52 20 69 6e 73  74 72 75 63 74 69 6f 6e  | JSR instruction|
00011b60  20 67 6f 69 6e 67 20 74  6f 20 74 68 65 20 65 78  | going to the ex|
00011b70  65 63 75 74 69 6f 6e 20  61 64 64 72 65 73 73 2e  |ecution address.|
00011b80  0d 0d 20 20 20 54 68 65  20 61 64 64 72 65 73 73  |..   The address|
00011b90  65 73 20 61 6c 73 6f 20  74 65 6c 6c 20 74 68 65  |es also tell the|
00011ba0  20 66 69 6c 69 6e 67 20  73 79 73 74 65 6d 20 77  | filing system w|
00011bb0  68 65 74 68 65 72 20 74  68 65 20 70 72 6f 67 72  |hether the progr|
00011bc0  61 6d 20 69 73 20 74 6f  0d 62 65 20 20 72 75 6e  |am is to.be  run|
00011bd0  20 20 6f 6e 20 20 61 20  20 73 65 63 6f 6e 64 20  |  on  a  second |
00011be0  70 72 6f 63 65 73 73 6f  72 2c 20 20 6f 72 20 6f  |processor,  or o|
00011bf0  6e 20 74 68 65 20 42 42  43 20 43 6f 6d 70 75 74  |n the BBC Comput|
00011c00  65 72 20 69 74 73 65 6c  66 2e 20 20 54 68 65 0d  |er itself.  The.|
00011c10  66 69 6c 69 6e 67 20 73  79 73 74 65 6d 20 72 65  |filing system re|
00011c20  67 61 72 64 73 20 6c 6f  61 64 20 61 6e 64 20 65  |gards load and e|
00011c30  78 65 63 75 74 69 6f 6e  20 61 64 64 72 65 73 73  |xecution address|
00011c40  65 73 20 61 73 20 34 20  62 79 74 65 20 20 28 33  |es as 4 byte  (3|
00011c50  32 20 62 69 74 29 0d 76  61 6c 75 65 73 2e 20 20  |2 bit).values.  |
00011c60  54 68 65 20 20 6c 6f 77  65 72 20 20 74 77 6f 20  |The  lower  two |
00011c70  20 62 79 74 65 73 20 20  6f 72 20 20 77 6f 72 64  | bytes  or  word|
00011c80  20 6f 66 20 65 61 63 68  20 61 64 64 72 65 73 73  | of each address|
00011c90  20 72 65 70 72 65 73 65  6e 74 20 61 6e 0d 61 63  | represent an.ac|
00011ca0  74 75 61 6c 20 61 64 64  72 65 73 73 20 69 6e 20  |tual address in |
00011cb0  6d 65 6d 6f 72 79 20 61  6e 64 20 74 68 65 20 74  |memory and the t|
00011cc0  6f 70 20 74 77 6f 20 62  79 74 65 73 20 6f 72 20  |op two bytes or |
00011cd0  77 6f 72 64 20 6f 66 20  74 68 65 20 20 61 64 64  |word of the  add|
00011ce0  72 65 73 73 0d 69 73 20  61 20 76 61 6c 75 65 20  |ress.is a value |
00011cf0  74 68 61 74 20 69 6e 64  69 63 61 74 65 73 20 77  |that indicates w|
00011d00  68 69 63 68 20 70 72 6f  63 65 73 73 6f 72 20 74  |hich processor t|
00011d10  68 65 20 66 69 6c 65 20  69 73 20 74 6f 20 62 65  |he file is to be|
00011d20  20 6c 6f 61 64 65 64 20  6f 6e 2e 0d 54 68 65 20  | loaded on..The |
00011d30  41 73 73 65 6d 62 6c 65  72 20 63 61 6e 20 68 61  |Assembler can ha|
00011d40  6e 64 6c 65 20 6f 6e 6c  79 20 74 77 6f 2d 62 79  |ndle only two-by|
00011d50  74 65 20 76 61 6c 75 65  73 20 69 6e 20 69 74 73  |te values in its|
00011d60  20 61 72 69 74 68 6d 65  74 69 63 2c 20 73 6f 20  | arithmetic, so |
00011d70  69 74 0d 69 73 20 6e 65  63 65 73 73 61 72 79 20  |it.is necessary |
00011d80  74 6f 20 73 65 74 20 74  68 65 20 74 77 6f 20 70  |to set the two p|
00011d90  61 72 74 73 20 6f 66 20  65 61 63 68 20 61 64 64  |arts of each add|
00011da0  72 65 73 73 20 73 65 70  61 72 61 74 65 6c 79 2e  |ress separately.|
00011db0  0d 0d 0d 0d 20 20 20 20  20 1b 2d 01 35 2e 34 2e  |....     .-.5.4.|
00011dc0  31 20 53 70 65 63 69 66  79 69 6e 67 20 74 68 65  |1 Specifying the|
00011dd0  20 6c 6f 77 20 77 6f 72  64 20 6f 66 20 74 68 65  | low word of the|
00011de0  20 61 64 64 72 65 73 73  65 73 1b 2d 00 0d 0d 0d  | addresses.-....|
00011df0  20 20 20 20 20 54 68 65  72 65 20 20 61 72 65 20  |     There  are |
00011e00  20 74 77 6f 20 77 61 79  73 20 6f 66 20 73 65 74  | two ways of set|
00011e10  74 69 6e 67 20 75 70 20  74 68 65 20 6c 6f 77 20  |ting up the low |
00011e20  77 6f 72 64 73 20 6f 66  20 74 68 65 20 61 64 64  |words of the add|
00011e30  72 65 73 73 65 73 0d 20  20 20 20 20 77 68 65 6e  |resses.     when|
00011e40  20 79 6f 75 20 61 73 73  65 6d 62 6c 65 20 70 72  | you assemble pr|
00011e50  6f 67 72 61 6d 73 2e 20  20 42 79 20 64 65 66 61  |ograms.  By defa|
00011e60  75 6c 74 2c 20 74 68 65  20 41 73 73 65 6d 62 6c  |ult, the Assembl|
00011e70  65 72 20 20 77 69 6c 6c  20 20 73 65 74 0d 20 20  |er  will  set.  |
00011e80  20 20 20 74 68 65 20 20  6c 6f 77 20 77 6f 72 64  |   the  low word|
00011e90  73 20 6f 66 20 62 6f 74  68 20 74 68 65 20 6c 6f  |s of both the lo|
00011ea0  61 64 20 61 6e 64 20 74  68 65 20 65 78 65 63 75  |ad and the execu|
00011eb0  74 69 6f 6e 20 61 64 64  72 65 73 73 65 73 20 74  |tion addresses t|
00011ec0  6f 20 62 65 0d 20 20 20  20 20 74 68 65 20 76 61  |o be.     the va|
00011ed0  6c 75 65 20 73 65 74 20  62 79 20 74 68 65 20 66  |lue set by the f|
00011ee0  69 72 73 74 20 4f 52 47  20 64 69 72 65 63 74 69  |irst ORG directi|
00011ef0  76 65 20 74 68 61 74 20  69 73 20 6e 6f 74 20 69  |ve that is not i|
00011f00  6e 20 20 61 20 20 64 75  6d 6d 79 0d 20 20 20 20  |n  a  dummy.    |
00011f10  20 73 65 63 74 69 6f 6e  2c 20 61 6e 64 20 69 6e  | section, and in|
00011f20  20 6d 61 6e 79 20 63 61  73 65 73 20 74 68 69 73  | many cases this|
00011f30  20 69 73 20 61 6c 6c 20  79 6f 75 20 6e 65 65 64  | is all you need|
00011f40  20 64 6f 2e 0d 0d 20 20  20 20 20 49 66 2c 20 20  | do...     If,  |
00011f50  74 68 6f 75 67 68 2c 20  79 6f 75 20 72 65 71 75  |though, you requ|
00011f60  69 72 65 20 73 6f 6d 65  74 68 69 6e 67 20 65 6c  |ire something el|
00011f70  73 65 2c 20 79 6f 75 20  63 61 6e 20 75 73 65 20  |se, you can use |
00011f80  74 68 65 20 4c 4f 41 44  20 61 6e 64 0d 20 20 20  |the LOAD and.   |
00011f90  20 20 45 58 45 43 20 64  69 72 65 63 74 69 76 65  |  EXEC directive|
00011fa0  73 20 74 6f 20 73 65 74  20 74 68 65 20 6c 6f 77  |s to set the low|
00011fb0  20 77 6f 72 64 20 6f 66  20 20 74 68 65 20 20 6c  | word of  the  l|
00011fc0  6f 61 64 20 20 61 6e 64  20 20 65 78 65 63 75 74  |oad  and  execut|
00011fd0  69 6f 6e 0d 20 20 20 20  20 61 64 64 72 65 73 73  |ion.     address|
00011fe0  65 73 20 72 65 73 70 65  63 74 69 76 65 6c 79 2e  |es respectively.|
00011ff0  20 54 68 75 73 2c 20 66  6f 72 20 65 78 61 6d 70  | Thus, for examp|
00012000  6c 65 2c 0d 0d 0d 20 20  20 20 20 20 20 20 20 20  |le,...          |
00012010  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00012020  20 20 20 4c 4f 41 44 20  20 24 31 39 30 30 0d 20  |   LOAD  $1900. |
00012030  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00012040  20 20 20 20 20 20 20 20  20 20 20 20 45 58 45 43  |            EXEC|
00012050  20 20 53 54 41 52 54 0d  0d 20 20 20 20 20 77 6f  |  START..     wo|
00012060  75 6c 64 20 20 73 65 74  20 20 74 68 65 20 6c 6f  |uld  set  the lo|
00012070  77 20 77 6f 72 64 20 6f  66 20 74 68 65 20 6c 6f  |w word of the lo|
00012080  61 64 20 61 64 64 72 65  73 73 20 74 6f 20 62 65  |ad address to be|
00012090  20 24 31 39 30 30 2c 20  61 6e 64 20 74 68 65 0d  | $1900, and the.|
000120a0  20 20 20 20 20 6c 6f 77  20 77 6f 72 64 20 6f 66  |     low word of|
000120b0  20 74 68 65 20 65 78 65  63 75 74 69 6f 6e 20 61  | the execution a|
000120c0  64 64 72 65 73 73 20 20  74 6f 20 20 62 65 20 20  |ddress  to  be  |
000120d0  77 68 61 74 65 76 65 72  20 20 61 64 64 72 65 73  |whatever  addres|
000120e0  73 20 20 74 68 65 0d 20  20 20 20 20 6c 61 62 65  |s  the.     labe|
000120f0  6c 20 53 54 41 52 54 20  69 73 20 64 65 66 69 6e  |l START is defin|
00012100  65 64 20 61 73 2e 0d 0d  0d 20 20 20 20 20 20 20  |ed as....       |
00012110  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00012120  20 20 20 20 20 20 20 20  20 20 33 30 0d 0d 0d 0d  |          30....|
00012130  0d 0d 1b 47 20 20 20 20  20 20 20 20 20 20 20 20  |...G            |
00012140  20 20 20 20 20 20 20 20  20 20 55 53 49 4e 47 20  |          USING |
00012150  54 48 45 20 36 35 43 30  32 20 41 53 53 45 4d 42  |THE 65C02 ASSEMB|
00012160  4c 45 52 1b 48 0d 0d 0d  0d 0d 20 20 20 20 20 1b  |LER.H.....     .|
00012170  2d 01 35 2e 34 2e 32 20  53 70 65 63 69 66 79 69  |-.5.4.2 Specifyi|
00012180  6e 67 20 74 68 65 20 70  72 6f 63 65 73 73 6f 72  |ng the processor|
00012190  1b 2d 00 0d 0d 0d 20 20  20 20 20 49 66 20 20 74  |.-....     If  t|
000121a0  68 65 20 74 6f 70 20 77  6f 72 64 20 6f 66 20 74  |he top word of t|
000121b0  68 65 20 6c 6f 61 64 20  61 64 64 72 65 73 73 20  |he load address |
000121c0  69 73 20 24 46 46 46 46  2c 20 74 68 65 20 66 69  |is $FFFF, the fi|
000121d0  6c 65 20 69 73 20 6c 6f  61 64 65 64 0d 20 20 20  |le is loaded.   |
000121e0  20 20 69 6e 74 6f 20 74  68 65 20 42 42 43 20 43  |  into the BBC C|
000121f0  6f 6d 70 75 74 65 72 27  73 20 6f 77 6e 20 6d 65  |omputer's own me|
00012200  6d 6f 72 79 2c 20 77 68  65 74 68 65 72 20 6f 72  |mory, whether or|
00012210  20 6e 6f 74 20 79 6f 75  20 61 72 65 20 20 75 73  | not you are  us|
00012220  69 6e 67 0d 20 20 20 20  20 61 20 20 73 65 63 6f  |ing.     a  seco|
00012230  6e 64 20 70 72 6f 63 65  73 73 6f 72 2e 20 20 49  |nd processor.  I|
00012240  66 20 74 68 65 20 74 6f  70 20 77 6f 72 64 20 69  |f the top word i|
00012250  73 20 30 2c 20 74 68 6f  75 67 68 2c 20 74 68 65  |s 0, though, the|
00012260  20 66 69 6c 65 20 77 69  6c 6c 0d 20 20 20 20 20  | file will.     |
00012270  62 65 20 6c 6f 61 64 65  64 20 69 6e 74 6f 20 74  |be loaded into t|
00012280  68 65 20 73 65 63 6f 6e  64 20 70 72 6f 63 65 73  |he second proces|
00012290  73 6f 72 20 69 66 20 79  6f 75 20 61 72 65 20 75  |sor if you are u|
000122a0  73 69 6e 67 20 6f 6e 65  2e 0d 0d 20 20 20 20 20  |sing one...     |
000122b0  42 79 20 64 65 66 61 75  6c 74 2c 20 74 68 65 20  |By default, the |
000122c0  41 73 73 65 6d 62 6c 65  72 20 70 72 6f 64 75 63  |Assembler produc|
000122d0  65 73 20 6f 62 6a 65 63  74 20 66 69 6c 65 73 20  |es object files |
000122e0  77 69 74 68 20 74 68 65  20 74 6f 70 20 77 6f 72  |with the top wor|
000122f0  64 0d 20 20 20 20 20 6f  66 20 74 68 65 20 61 64  |d.     of the ad|
00012300  64 72 65 73 73 65 73 20  73 65 74 20 74 6f 20 24  |dresses set to $|
00012310  46 46 46 46 2c 20 20 73  6f 20 74 68 65 20 66 69  |FFFF,  so the fi|
00012320  6c 65 73 20 77 69 6c 6c  20 6c 6f 61 64 20 74 6f  |les will load to|
00012330  20 74 68 65 20 42 42 43  0d 20 20 20 20 20 43 6f  | the BBC.     Co|
00012340  6d 70 75 74 65 72 27 73  20 6d 65 6d 6f 72 79 2e  |mputer's memory.|
00012350  20 20 54 68 65 20 4d 53  57 20 64 69 72 65 63 74  |  The MSW direct|
00012360  69 76 65 2c 20 74 68 6f  75 67 68 2c 20 20 6c 65  |ive, though,  le|
00012370  74 73 20 20 79 6f 75 20  20 63 68 61 6e 67 65 0d  |ts  you  change.|
00012380  20 20 20 20 20 74 68 69  73 20 76 61 6c 75 65 3a  |     this value:|
00012390  20 74 68 75 73 0d 0d 20  20 20 20 20 20 20 20 20  | thus..         |
000123a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000123b0  20 20 20 20 20 20 4d 53  57 20 20 20 30 0d 0d 20  |      MSW   0.. |
000123c0  20 20 20 20 6c 65 74 73  20 79 6f 75 20 63 68 61  |    lets you cha|
000123d0  6e 67 65 20 74 68 65 20  61 64 64 72 65 73 73 20  |nge the address |
000123e0  74 6f 20 30 2e 20 20 59  6f 75 20 73 68 6f 75 6c  |to 0.  You shoul|
000123f0  64 20 61 6c 77 61 79 73  20 69 6e 63 6c 75 64 65  |d always include|
00012400  20 74 68 69 73 0d 20 20  20 20 20 64 69 72 65 63  | this.     direc|
00012410  74 69 76 65 20 69 66 20  79 6f 75 20 77 72 69 74  |tive if you writ|
00012420  65 20 70 72 6f 67 72 61  6d 73 20 74 6f 20 72 75  |e programs to ru|
00012430  6e 20 6f 6e 20 61 20 73  65 63 6f 6e 64 20 70 72  |n on a second pr|
00012440  6f 63 65 73 73 6f 72 2e  0d 0d 0d 0d 0d 0d 0d 0d  |ocessor.........|
00012450  0d 0d 0d 0d 0d 0d 0d 0d  0d 0d 0d 0d 0d 0d 0d 0d  |................|
00012460  0d 0d 0d 0d 0d 0d 0d 0d  0d 0d 0d 0d 0d 0d 0d 20  |............... |
00012470  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00012490  33 31 0d 0d 0d 0d 0d 0d  1b 47 20 20 20 20 20 20  |31.......G      |
000124a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000124b0  55 53 49 4e 47 20 54 48  45 20 36 35 43 30 32 20  |USING THE 65C02 |
000124c0  41 53 53 45 4d 42 4c 45  52 1b 48 0d 0d 0d 0d 1b  |ASSEMBLER.H.....|
000124d0  2d 01 1b 47 36 2e 20 53  4f 55 52 43 45 20 46 49  |-..G6. SOURCE FI|
000124e0  4c 45 20 43 4f 4e 54 52  4f 4c 20 44 49 52 45 43  |LE CONTROL DIREC|
000124f0  54 49 56 45 53 1b 2d 00  1b 48 0d 0d 0d 20 20 20  |TIVES.-..H...   |
00012500  54 68 65 20 20 41 73 73  65 6d 62 6c 65 72 20 20  |The  Assembler  |
00012510  70 72 6f 76 69 64 65 73  20 20 61 20 20 6e 75 6d  |provides  a  num|
00012520  62 65 72 20 6f 66 20 64  69 72 65 63 74 69 76 65  |ber of directive|
00012530  73 20 74 68 61 74 20 61  6c 6c 6f 77 20 79 6f 75  |s that allow you|
00012540  20 74 6f 0d 63 6f 6e 74  72 6f 6c 20 74 68 65 20  | to.control the |
00012550  73 6f 75 72 63 65 20 66  69 6c 65 73 20 77 68 69  |source files whi|
00012560  63 68 20 79 6f 75 20 61  72 65 20 61 73 73 65 6d  |ch you are assem|
00012570  62 6c 69 6e 67 2e 20 54  68 69 73 20 6c 65 74 73  |bling. This lets|
00012580  20 79 6f 75 20 73 70 6c  69 74 0d 79 6f 75 72 20  | you split.your |
00012590  73 6f 75 72 63 65 20 75  70 20 69 6e 74 6f 20 6d  |source up into m|
000125a0  6f 72 65 20 74 68 61 6e  20 6f 6e 65 20 66 69 6c  |ore than one fil|
000125b0  65 2e 0d 0d 0d 1b 2d 01  36 2e 31 20 43 68 61 69  |e.....-.6.1 Chai|
000125c0  6e 69 6e 67 20 73 6f 75  72 63 65 20 66 69 6c 65  |ning source file|
000125d0  73 1b 2d 00 0d 0d 20 20  20 49 66 20 79 6f 75 20  |s.-...   If you |
000125e0  61 72 65 20 77 72 69 74  69 6e 67 20 61 20 6c 61  |are writing a la|
000125f0  72 67 65 20 70 72 6f 67  72 61 6d 2c 20 20 79 6f  |rge program,  yo|
00012600  75 20 77 69 6c 6c 20 66  69 6e 64 20 69 74 20 63  |u will find it c|
00012610  6f 6e 76 65 6e 69 65 6e  74 20 74 6f 0d 73 70 6c  |onvenient to.spl|
00012620  69 74 20 74 68 65 20 73  6f 75 72 63 65 20 69 6e  |it the source in|
00012630  74 6f 20 61 20 6e 75 6d  62 65 72 20 6f 66 20 73  |to a number of s|
00012640  6d 61 6c 6c 20 66 69 6c  65 73 2c 20 20 72 61 74  |mall files,  rat|
00012650  68 65 72 20 74 68 61 6e  20 6b 65 65 70 69 6e 67  |her than keeping|
00012660  20 69 74 0d 69 6e 20 6f  6e 65 20 6c 61 72 67 65  | it.in one large|
00012670  20 6f 6e 65 2e 20 20 54  68 69 73 20 61 70 70 72  | one.  This appr|
00012680  6f 61 63 68 20 6e 6f 74  20 6f 6e 6c 79 20 6d 61  |oach not only ma|
00012690  6b 65 73 20 65 64 69 74  69 6e 67 20 20 65 61 73  |kes editing  eas|
000126a0  69 65 72 2c 20 20 20 62  75 74 0d 61 6c 73 6f 20  |ier,   but.also |
000126b0  68 65 6c 70 73 20 79 6f  75 20 73 74 72 75 63 74  |helps you struct|
000126c0  75 72 65 20 74 68 65 20  73 6f 75 72 63 65 20 74  |ure the source t|
000126d0  6f 20 72 65 66 6c 65 63  74 20 74 68 65 20 6f 72  |o reflect the or|
000126e0  67 61 6e 69 73 61 74 69  6f 6e 20 6f 66 20 74 68  |ganisation of th|
000126f0  65 0d 70 72 6f 67 72 61  6d 2e 20 20 41 64 64 69  |e.program.  Addi|
00012700  74 69 6f 6e 61 6c 6c 79  2c 20 69 66 20 79 6f 75  |tionally, if you|
00012710  20 68 61 76 65 20 61 20  73 65 63 6f 6e 64 20 70  | have a second p|
00012720  72 6f 63 65 73 73 6f 72  2c 20 6b 65 65 70 69 6e  |rocessor, keepin|
00012730  67 20 73 6f 75 72 63 65  0d 66 69 6c 65 73 20 74  |g source.files t|
00012740  6f 20 6c 65 73 73 20 74  68 61 6e 20 31 34 20 6b  |o less than 14 k|
00012750  69 6c 6f 62 79 74 65 73  20 69 6e 20 73 69 7a 65  |ilobytes in size|
00012760  20 77 69 6c 6c 20 67 69  76 65 20 61 20 76 65 72  | will give a ver|
00012770  79 20 20 63 6f 6e 73 69  64 65 72 61 62 6c 65 0d  |y  considerable.|
00012780  69 6e 63 72 65 61 73 65  20 69 6e 20 61 73 73 65  |increase in asse|
00012790  6d 62 6c 79 20 73 70 65  65 64 20 28 73 65 65 20  |mbly speed (see |
000127a0  73 65 63 74 69 6f 6e 20  31 2e 35 29 2e 0d 0d 20  |section 1.5)... |
000127b0  20 20 59 6f 75 20 20 63  61 6e 20 69 6e 73 74 72  |  You  can instr|
000127c0  75 63 74 20 74 68 65 20  41 73 73 65 6d 62 6c 65  |uct the Assemble|
000127d0  72 20 74 6f 20 61 73 73  65 6d 62 6c 65 20 6d 75  |r to assemble mu|
000127e0  6c 74 69 70 6c 65 20 66  69 6c 65 73 20 77 69 74  |ltiple files wit|
000127f0  68 20 74 68 65 0d 43 48  4e 20 64 69 72 65 63 74  |h the.CHN direct|
00012800  69 76 65 2e 20 54 68 69  73 20 74 65 6c 6c 73 20  |ive. This tells |
00012810  69 74 20 74 6f 20 63 6c  6f 73 65 20 74 68 65 20  |it to close the |
00012820  63 75 72 72 65 6e 74 20  73 6f 75 72 63 65 20 66  |current source f|
00012830  69 6c 65 20 61 6e 64 20  6f 70 65 6e 0d 74 68 65  |ile and open.the|
00012840  20 6f 6e 65 20 73 70 65  63 69 66 69 65 64 20 69  | one specified i|
00012850  6e 20 74 68 65 20 6f 70  65 72 61 6e 64 20 66 69  |n the operand fi|
00012860  65 6c 64 2e 0d 0d 20 20  20 54 68 75 73 2c 20 79  |eld...   Thus, y|
00012870  6f 75 20 63 6f 75 6c 64  20 77 72 69 74 65 0d 0d  |ou could write..|
00012880  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00012890  20 20 20 20 20 20 20 20  20 20 20 20 20 20 43 48  |              CH|
000128a0  4e 20 20 46 49 4c 45 32  0d 0d 61 73 20 74 68 65  |N  FILE2..as the|
000128b0  20 6c 61 73 74 20 6c 69  6e 65 20 20 69 6e 20 20  | last line  in  |
000128c0  46 49 4c 45 31 2e 20 20  54 68 65 20 20 41 73 73  |FILE1.  The  Ass|
000128d0  65 6d 62 6c 65 72 20 20  77 69 6c 6c 20 20 63 6c  |embler  will  cl|
000128e0  6f 73 65 20 20 46 49 4c  45 31 2c 20 20 61 6e 64  |ose  FILE1,  and|
000128f0  0d 63 6f 6e 74 69 6e 75  65 20 20 61 73 73 65 6d  |.continue  assem|
00012900  62 6c 79 20 20 77 69 74  68 20 46 49 4c 45 32 2e  |bly  with FILE2.|
00012910  20 20 4e 6f 74 65 20 74  68 61 74 20 69 66 20 74  |  Note that if t|
00012920  68 65 20 43 48 4e 20 64  69 72 65 63 74 69 76 65  |he CHN directive|
00012930  20 69 73 20 1b 2d 01 6e  6f 74 1b 2d 00 0d 74 68  | is .-.not.-..th|
00012940  65 20 6c 61 73 74 20 6c  69 6e 65 20 69 6e 20 61  |e last line in a|
00012950  20 66 69 6c 65 2c 20 61  6e 79 74 68 69 6e 67 20  | file, anything |
00012960  66 6f 6c 6c 6f 77 69 6e  67 20 69 74 20 77 69 6c  |following it wil|
00012970  6c 20 62 65 20 69 67 6e  6f 72 65 64 2e 0d 0d 20  |l be ignored... |
00012980  20 20 59 6f 75 20 63 61  6e 20 75 73 65 20 43 48  |  You can use CH|
00012990  4e 20 61 73 20 6d 61 6e  79 20 74 69 6d 65 73 20  |N as many times |
000129a0  61 73 20 79 6f 75 20 77  69 73 68 20 69 6e 20 61  |as you wish in a|
000129b0  6e 20 61 73 73 65 6d 62  6c 79 2e 0d 0d 0d 1b 2d  |n assembly.....-|
000129c0  01 36 2e 32 20 49 6e 63  6c 75 64 69 6e 67 20 6f  |.6.2 Including o|
000129d0  6e 65 20 66 69 6c 65 20  69 6e 74 6f 20 61 6e 6f  |ne file into ano|
000129e0  74 68 65 72 1b 2d 00 0d  0d 20 20 20 41 20 64 69  |ther.-...   A di|
000129f0  66 66 65 72 65 6e 74 20  77 61 79 20 6f 66 20 75  |fferent way of u|
00012a00  73 69 6e 67 20 20 6d 75  6c 74 69 70 6c 65 20 20  |sing  multiple  |
00012a10  73 6f 75 72 63 65 20 20  66 69 6c 65 73 20 20 69  |source  files  i|
00012a20  73 20 20 74 6f 20 20 75  73 65 20 20 74 68 65 0d  |s  to  use  the.|
00012a30  49 4e 43 4c 55 44 45 20  20 64 69 72 65 63 74 69  |INCLUDE  directi|
00012a40  76 65 2e 20 20 54 68 69  73 20 20 74 65 6c 6c 73  |ve.  This  tells|
00012a50  20 20 74 68 65 20 20 41  73 73 65 6d 62 6c 65 72  |  the  Assembler|
00012a60  20 20 74 6f 20 20 73 74  61 72 74 20 61 73 73 65  |  to  start asse|
00012a70  6d 62 6c 69 6e 67 0d 61  6e 6f 74 68 65 72 20 73  |mbling.another s|
00012a80  6f 75 72 63 65 20 66 69  6c 65 3b 20 20 75 6e 6c  |ource file;  unl|
00012a90  69 6b 65 20 20 43 48 4e  2c 20 20 68 6f 77 65 76  |ike  CHN,  howev|
00012aa0  65 72 2c 20 20 74 68 65  20 20 66 69 72 73 74 20  |er,  the  first |
00012ab0  20 66 69 6c 65 20 20 69  73 20 1b 2d 01 6e 6f 74  | file  is .-.not|
00012ac0  1b 2d 00 0d 63 6c 6f 73  65 64 2e 20 20 57 68 65  |.-..closed.  Whe|
00012ad0  6e 20 20 74 68 65 20 41  73 73 65 6d 62 6c 65 72  |n  the Assembler|
00012ae0  20 63 6f 6d 65 73 20 74  6f 20 74 68 65 20 65 6e  | comes to the en|
00012af0  64 20 6f 66 20 74 68 65  20 69 6e 63 6c 75 64 65  |d of the include|
00012b00  64 20 66 69 6c 65 2c 20  69 74 0d 72 65 73 75 6d  |d file, it.resum|
00012b10  65 73 20 69 6e 20 74 68  65 20 6f 72 69 67 69 6e  |es in the origin|
00012b20  61 6c 20 66 69 6c 65 20  61 74 20 74 68 65 20 6c  |al file at the l|
00012b30  69 6e 65 20 61 66 74 65  72 20 74 68 65 20 49 4e  |ine after the IN|
00012b40  43 4c 55 44 45 20 64 69  72 65 63 74 69 76 65 2e  |CLUDE directive.|
00012b50  0d 0d 20 20 20 4f 6e 65  20 75 73 65 20 6f 66 20  |..   One use of |
00012b60  74 68 69 73 20 64 69 72  65 63 74 69 76 65 20 6d  |this directive m|
00012b70  69 67 68 74 20 62 65 20  74 6f 20 69 6e 63 6c 75  |ight be to inclu|
00012b80  64 65 20 61 20 20 66 69  6c 65 20 20 6f 66 20 20  |de a  file  of  |
00012b90  73 74 61 6e 64 61 72 64  0d 64 65 66 69 6e 69 74  |standard.definit|
00012ba0  69 6f 6e 73 20 6f 72 20  72 6f 75 74 69 6e 65 73  |ions or routines|
00012bb0  20 69 6e 74 6f 20 61 20  73 6f 75 72 63 65 2e 20  | into a source. |
00012bc0  59 6f 75 20 6d 69 67 68  74 20 74 68 65 6e 20 77  |You might then w|
00012bd0  72 69 74 65 0d 0d 20 20  20 20 20 20 20 20 20 20  |rite..          |
00012be0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00012bf0  20 49 4e 43 4c 55 44 45  20 20 53 54 44 53 55 42  | INCLUDE  STDSUB|
00012c00  53 0d 0d 74 6f 20 61 73  73 65 6d 62 6c 65 20 74  |S..to assemble t|
00012c10  68 65 20 73 6f 75 72 63  65 20 6f 66 20 73 6f 6d  |he source of som|
00012c20  65 20 73 74 61 6e 64 61  72 64 20 72 6f 75 74 69  |e standard routi|
00012c30  6e 65 73 2e 0d 0d 20 20  20 4c 69 6e 65 73 20 20  |nes...   Lines  |
00012c40  74 68 61 74 20 20 72 65  73 75 6c 74 20 20 66 72  |that  result  fr|
00012c50  6f 6d 20 61 73 73 65 6d  62 6c 69 6e 67 20 61 6e  |om assembling an|
00012c60  20 69 6e 63 6c 75 64 65  64 20 66 69 6c 65 20 61  | included file a|
00012c70  72 65 20 6d 61 72 6b 65  64 20 69 6e 0d 74 68 65  |re marked in.the|
00012c80  20 6c 69 73 74 69 6e 67  20 62 79 20 68 61 76 69  | listing by havi|
00012c90  6e 67 20 61 6e 20 27 49  27 20 69 6e 20 74 68 65  |ng an 'I' in the|
00012ca0  20 66 69 72 73 74 20 63  6f 6c 75 6d 6e 2e 0d 0d  | first column...|
00012cb0  20 20 20 4e 6f 74 65 20  74 68 61 74 20 79 6f 75  |   Note that you|
00012cc0  20 63 61 6e 6e 6f 74 20  75 73 65 20 61 6e 20 49  | cannot use an I|
00012cd0  4e 43 4c 55 44 45 20 64  69 72 65 63 74 69 76 65  |NCLUDE directive|
00012ce0  20 69 6e 73 69 64 65 20  20 61 20 20 66 69 6c 65  | inside  a  file|
00012cf0  20 20 74 68 61 74 0d 79  6f 75 20 20 61 72 65 20  |  that.you  are |
00012d00  20 69 6e 63 6c 75 64 69  6e 67 20 20 61 6c 72 65  | including  alre|
00012d10  61 64 79 2e 20 20 4e 6f  72 20 20 63 61 6e 20 20  |ady.  Nor  can  |
00012d20  79 6f 75 20 20 75 73 65  20 20 74 68 65 20 20 43  |you  use  the  C|
00012d30  48 4e 20 20 61 6e 64 20  20 43 4f 44 45 0d 64 69  |HN  and  CODE.di|
00012d40  72 65 63 74 69 76 65 73  2e 0d 0d 0d 20 20 20 20  |rectives....    |
00012d50  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00012d60  20 20 20 20 20 20 20 20  20 20 20 20 20 33 32 0d  |             32.|
00012d70  0d 0d 0d 0d 0d 1b 47 20  20 20 20 20 20 20 20 20  |......G         |
00012d80  20 20 20 20 20 20 20 20  20 20 20 20 20 55 53 49  |             USI|
00012d90  4e 47 20 54 48 45 20 36  35 43 30 32 20 41 53 53  |NG THE 65C02 ASS|
00012da0  45 4d 42 4c 45 52 1b 48  0d 0d 0d 0d 1b 2d 01 1b  |EMBLER.H.....-..|
00012db0  47 37 2e 20 43 4f 4e 44  49 54 49 4f 4e 41 4c 20  |G7. CONDITIONAL |
00012dc0  41 53 53 45 4d 42 4c 59  1b 2d 00 1b 48 0d 0d 0d  |ASSEMBLY.-..H...|
00012dd0  20 20 20 54 68 65 20 36  35 43 30 32 20 20 41 73  |   The 65C02  As|
00012de0  73 65 6d 62 6c 65 72 20  20 68 61 73 20 20 66 75  |sembler  has  fu|
00012df0  6c 6c 20 20 63 6f 6e 64  69 74 69 6f 6e 61 6c 20  |ll  conditional |
00012e00  20 61 73 73 65 6d 62 6c  79 20 20 66 61 63 69 6c  | assembly  facil|
00012e10  69 74 69 65 73 2c 0d 61  6c 6c 6f 77 69 6e 67 20  |ities,.allowing |
00012e20  79 6f 75 20 65 61 73 69  6c 79 20 74 6f 20 63 68  |you easily to ch|
00012e30  61 6e 67 65 20 74 68 65  20 73 6f 75 72 63 65 20  |ange the source |
00012e40  62 65 69 6e 67 20 63 6f  6d 70 69 6c 65 64 2e 0d  |being compiled..|
00012e50  0d 0d 1b 2d 01 37 2e 31  20 41 73 73 65 6d 62 6c  |...-.7.1 Assembl|
00012e60  79 20 63 6f 6e 64 69 74  69 6f 6e 61 6c 20 6f 6e  |y conditional on|
00012e70  20 65 78 70 72 65 73 73  69 6f 6e 73 1b 2d 00 0d  | expressions.-..|
00012e80  0d 0d 20 20 20 43 6f 6e  64 69 74 69 6f 6e 61 6c  |..   Conditional|
00012e90  20 20 61 73 73 65 6d 62  6c 79 20 74 68 61 74 20  |  assembly that |
00012ea0  64 65 70 65 6e 64 73 20  6f 6e 20 74 68 65 20 76  |depends on the v|
00012eb0  61 6c 75 65 20 6f 66 20  61 6e 20 65 78 70 72 65  |alue of an expre|
00012ec0  73 73 69 6f 6e 20 69 73  0d 61 63 68 69 65 76 65  |ssion is.achieve|
00012ed0  64 20 62 79 20 75 73 69  6e 67 20 74 68 65 20 49  |d by using the I|
00012ee0  46 2c 20 45 4c 53 45 20  61 6e 64 20 46 49 20 20  |F, ELSE and FI  |
00012ef0  64 69 72 65 63 74 69 76  65 73 2e 20 20 54 68 65  |directives.  The|
00012f00  20 20 6d 6f 73 74 20 20  67 65 6e 65 72 61 6c 0d  |  most  general.|
00012f10  66 6f 72 6d 20 6f 66 20  63 6f 6e 73 74 72 75 63  |form of construc|
00012f20  74 69 6f 6e 20 69 73 20  74 68 69 73 3a 0d 0d 0d  |tion is this:...|
00012f30  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00012f40  20 20 20 20 20 49 46 20  20 20 3c 65 78 70 72 3e  |     IF   <expr>|
00012f50  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00012f60  20 20 20 20 20 20 20 20  2e 0d 20 20 20 20 20 20  |        ..      |
00012f70  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00012f80  20 54 52 55 45 20 62 6c  6f 63 6b 0d 20 20 20 20  | TRUE block.    |
00012f90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00012fa0  20 20 20 2e 0d 20 20 20  20 20 20 20 20 20 20 20  |   ..           |
00012fb0  20 20 20 20 20 20 20 20  20 45 4c 53 45 0d 20 20  |         ELSE.  |
00012fc0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00012fd0  20 20 20 20 20 2e 0d 20  20 20 20 20 20 20 20 20  |     ..         |
00012fe0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 46 41  |              FA|
00012ff0  4c 53 45 20 62 6c 6f 63  6b 0d 20 20 20 20 20 20  |LSE block.      |
00013000  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00013010  20 2e 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  | ..             |
00013020  20 20 20 20 20 20 20 46  49 0d 0d 0d 20 20 20 3c  |       FI...   <|
00013030  65 78 70 72 3e 20 20 63  61 6e 20 62 65 20 61 6e  |expr>  can be an|
00013040  79 20 6e 75 6d 65 72 69  63 20 65 78 70 72 65 73  |y numeric expres|
00013050  73 69 6f 6e 2c 20 61 73  20 64 65 73 63 72 69 62  |sion, as describ|
00013060  65 64 20 69 6e 20 73 65  63 74 69 6f 6e 20 32 2e  |ed in section 2.|
00013070  32 2c 0d 62 75 74 20 69  74 20 6d 75 73 74 20 6e  |2,.but it must n|
00013080  6f 74 20 63 6f 6e 74 61  69 6e 20 61 6e 79 20 66  |ot contain any f|
00013090  6f 72 77 61 72 64 20 72  65 66 65 72 65 6e 63 65  |orward reference|
000130a0  73 2e 20 49 66 20 3c 65  78 70 72 3e 20 69 73 20  |s. If <expr> is |
000130b0  6e 6f 6e 2d 7a 65 72 6f  2c 0d 74 68 65 20 41 73  |non-zero,.the As|
000130c0  73 65 6d 62 6c 65 72 20  74 61 6b 65 73 20 74 68  |sembler takes th|
000130d0  65 20 63 6f 6e 64 69 74  69 6f 6e 20 61 73 20 54  |e condition as T|
000130e0  52 55 45 2c 20 61 6e 64  20 77 69 6c 6c 20 61 73  |RUE, and will as|
000130f0  73 65 6d 62 6c 65 20 74  68 65 20 6c 69 6e 65 73  |semble the lines|
00013100  0d 69 6e 20 74 68 65 20  54 52 55 45 20 62 6c 6f  |.in the TRUE blo|
00013110  63 6b 2e 20 20 4f 6e 20  63 6f 6d 69 6e 67 20 74  |ck.  On coming t|
00013120  6f 20 74 68 65 20 20 45  4c 53 45 20 20 69 74 20  |o the  ELSE  it |
00013130  20 77 69 6c 6c 20 20 69  67 6e 6f 72 65 20 20 61  | will  ignore  a|
00013140  6c 6c 20 20 74 68 65 0d  73 75 62 73 65 71 75 65  |ll  the.subseque|
00013150  6e 74 20 6c 69 6e 65 73  2c 20 75 6e 74 69 6c 20  |nt lines, until |
00013160  69 74 20 72 65 61 63 68  65 73 20 74 68 65 20 46  |it reaches the F|
00013170  49 3b 20 68 65 72 65 20  61 73 73 65 6d 62 6c 79  |I; here assembly|
00013180  20 77 69 6c 6c 20 63 6f  6e 74 69 6e 75 65 0d 6e  | will continue.n|
00013190  6f 72 6d 61 6c 6c 79 20  6f 6e 63 65 20 6d 6f 72  |ormally once mor|
000131a0  65 2e 0d 0d 20 20 20 49  66 20 20 3c 65 78 70 72  |e...   If  <expr|
000131b0  3e 20 20 69 73 20 20 7a  65 72 6f 2c 20 20 74 68  |>  is  zero,  th|
000131c0  65 20 20 63 6f 6e 64 69  74 69 6f 6e 20 69 73 20  |e  condition is |
000131d0  46 41 4c 53 45 2e 20 20  54 68 65 20 41 73 73 65  |FALSE.  The Asse|
000131e0  6d 62 6c 65 72 20 77 69  6c 6c 0d 69 67 6e 6f 72  |mbler will.ignor|
000131f0  65 20 74 68 65 20 6c 69  6e 65 73 20 74 68 61 74  |e the lines that|
00013200  20 66 6f 6c 6c 6f 77 20  75 6e 74 69 6c 20 69 74  | follow until it|
00013210  20 72 65 61 63 68 65 73  20 74 68 65 20 45 4c 53  | reaches the ELS|
00013220  45 3b 20 20 69 74 20 74  68 65 6e 20 20 77 69 6c  |E;  it then  wil|
00013230  6c 0d 61 73 73 65 6d 62  6c 65 20 74 68 65 20 6c  |l.assemble the l|
00013240  69 6e 65 73 20 69 6e 20  74 68 65 20 46 41 4c 53  |ines in the FALS|
00013250  45 20 62 6c 6f 63 6b 2e  0d 0d 20 20 20 49 66 20  |E block...   If |
00013260  79 6f 75 20 77 69 73 68  2c 20 20 79 6f 75 20 63  |you wish,  you c|
00013270  61 6e 20 6f 6d 69 74 20  74 68 65 20 45 4c 53 45  |an omit the ELSE|
00013280  20 61 6e 64 20 74 68 65  20 46 41 4c 53 45 20 62  | and the FALSE b|
00013290  6c 6f 63 6b 20 6f 66 20  63 6f 64 65 2c 20 74 6f  |lock of code, to|
000132a0  0d 66 6f 72 6d 0d 0d 0d  20 20 20 20 20 20 20 20  |.form...        |
000132b0  20 20 20 20 20 20 20 20  20 20 20 20 49 46 20 20  |            IF  |
000132c0  20 3c 65 78 70 72 3e 0d  20 20 20 20 20 20 20 20  | <expr>.        |
000132d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 2e  |               .|
000132e0  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
000132f0  20 20 20 20 20 20 20 20  54 52 55 45 20 62 6c 6f  |        TRUE blo|
00013300  63 6b 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |ck.             |
00013310  20 20 20 20 20 20 20 20  20 20 2e 0d 20 20 20 20  |          ..    |
00013320  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00013330  46 49 0d 0d 0d 20 20 20  48 65 72 65 2c 20 20 69  |FI...   Here,  i|
00013340  66 20 20 74 68 65 20 20  63 6f 6e 64 69 74 69 6f  |f  the  conditio|
00013350  6e 20 69 73 20 20 46 41  4c 53 45 2c 20 20 74 68  |n is  FALSE,  th|
00013360  65 20 41 73 73 65 6d 62  6c 65 72 20 77 69 6c 6c  |e Assembler will|
00013370  20 69 67 6e 6f 72 65 20  61 6c 6c 0d 6c 69 6e 65  | ignore all.line|
00013380  73 20 75 70 20 74 6f 20  74 68 65 20 46 49 2c 20  |s up to the FI, |
00013390  73 6f 20 6e 6f 20 63 6f  64 65 20 69 73 20 61 73  |so no code is as|
000133a0  73 65 6d 62 6c 65 64 20  69 6e 20 74 68 69 73 20  |sembled in this |
000133b0  63 61 73 65 2e 0d 0d 0d  0d 0d 0d 20 20 20 20 20  |case.......     |
000133c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000133d0  20 20 20 20 20 20 20 20  20 20 20 20 33 33 0d 0d  |            33..|
000133e0  0d 0d 0d 0d 1b 47 20 20  20 20 20 20 20 20 20 20  |.....G          |
000133f0  20 20 20 20 20 20 20 20  20 20 20 20 55 53 49 4e  |            USIN|
00013400  47 20 54 48 45 20 36 35  43 30 32 20 41 53 53 45  |G THE 65C02 ASSE|
00013410  4d 42 4c 45 52 1b 48 0d  0d 0d 0d 0d 20 20 20 46  |MBLER.H.....   F|
00013420  6f 72 20 65 78 61 6d 70  6c 65 2c 20 79 6f 75 20  |or example, you |
00013430  6d 69 67 68 74 20 68 61  76 65 20 61 20 73 79 6d  |might have a sym|
00013440  62 6f 6c 20 44 45 42 55  47 2e 4d 4f 44 45 20 64  |bol DEBUG.MODE d|
00013450  65 66 69 6e 65 64 20 61  74 20 74 68 65 20 76 65  |efined at the ve|
00013460  72 79 0d 73 74 61 72 74  20 6f 66 20 74 68 65 20  |ry.start of the |
00013470  73 6f 75 72 63 65 20 74  6f 20 73 68 6f 77 20 69  |source to show i|
00013480  66 20 64 65 62 75 67 20  63 6f 64 65 20 69 73 20  |f debug code is |
00013490  74 6f 20 62 65 20 61 73  73 65 6d 62 6c 65 64 20  |to be assembled |
000134a0  20 6f 72 20 20 6e 6f 74  2e 0d 54 68 69 73 20 6d  | or  not..This m|
000134b0  69 67 68 74 20 62 65 20  64 65 66 69 6e 65 64 20  |ight be defined |
000134c0  61 73 0d 0d 0d 20 20 20  20 20 20 20 20 44 45 42  |as...        DEB|
000134d0  55 47 2e 4d 4f 44 45 20  20 45 51 55 20 20 20 2d  |UG.MODE  EQU   -|
000134e0  31 20 20 20 20 3b 75 73  65 20 2d 31 20 66 6f 72  |1    ;use -1 for|
000134f0  20 54 52 55 45 2c 20 30  20 66 6f 72 20 46 41 4c  | TRUE, 0 for FAL|
00013500  53 45 0d 0d 0d 54 68 65  6e 2c 20 74 68 72 6f 75  |SE...Then, throu|
00013510  67 68 6f 75 74 20 74 68  65 20 72 65 73 74 20 6f  |ghout the rest o|
00013520  66 20 74 68 65 20 73 6f  75 72 63 65 2c 20 79 6f  |f the source, yo|
00013530  75 20 63 61 6e 20 70 75  74 20 74 68 65 20 64 65  |u can put the de|
00013540  62 75 67 20 63 6f 64 65  20 69 6e 0d 61 6e 20 49  |bug code in.an I|
00013550  46 20 63 6f 6e 64 69 74  69 6f 6e 20 6f 66 20 74  |F condition of t|
00013560  68 65 20 66 6f 72 6d 0d  0d 0d 20 20 20 20 20 20  |he form...      |
00013570  20 20 20 20 20 20 20 20  20 20 20 20 20 20 49 46  |              IF|
00013580  20 20 20 44 45 42 55 47  2e 4d 4f 44 45 0d 20 20  |   DEBUG.MODE.  |
00013590  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000135a0  20 20 20 20 20 2e 0d 20  20 20 20 20 20 20 20 20  |     ..         |
000135b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 64 65  |              de|
000135c0  62 75 67 20 6d 6f 64 65  20 76 65 72 73 69 6f 6e  |bug mode version|
000135d0  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
000135e0  20 20 20 20 20 20 20 20  2e 0d 20 20 20 20 20 20  |        ..      |
000135f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 45 4c  |              EL|
00013600  53 45 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |SE.             |
00013610  20 20 20 20 20 20 20 20  20 20 2e 0d 20 20 20 20  |          ..    |
00013620  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00013630  20 20 20 6e 6f 6e 2d 64  65 62 75 67 20 6d 6f 64  |   non-debug mod|
00013640  65 20 76 65 72 73 69 6f  6e 0d 20 20 20 20 20 20  |e version.      |
00013650  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00013660  20 2e 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  | ..             |
00013670  20 20 20 20 20 20 20 46  49 0d 0d 20 20 20 44 65  |       FI..   De|
00013680  70 65 6e 64 69 6e 67 20  20 6f 6e 20 63 69 72 63  |pending  on circ|
00013690  75 6d 73 74 61 6e 63 65  73 2c 20 20 79 6f 75 20  |umstances,  you |
000136a0  6d 61 79 20 77 69 73 68  20 74 6f 20 72 65 76 65  |may wish to reve|
000136b0  72 73 65 20 74 68 65 20  63 6f 6e 64 69 74 69 6f  |rse the conditio|
000136c0  6e 0d 74 65 73 74 65 64  20 74 6f 20 69 6e 63 6c  |n.tested to incl|
000136d0  75 64 65 20 73 6f 6d 65  20 63 6f 64 65 20 69 66  |ude some code if|
000136e0  20 64 65 62 75 67 20 6d  6f 64 65 20 69 73 20 1b  | debug mode is .|
000136f0  2d 01 6e 6f 74 1b 2d 00  20 73 65 6c 65 63 74 65  |-.not.-. selecte|
00013700  64 2e 20 59 6f 75 20 63  61 6e 20 75 73 65 0d 74  |d. You can use.t|
00013710  68 65 20 75 6e 61 72 79  20 31 27 73 20 63 6f 6d  |he unary 1's com|
00013720  70 6c 65 6d 65 6e 74 20  6f 72 20 4e 4f 54 20 6f  |plement or NOT o|
00013730  70 65 72 61 74 6f 72 20  68 65 72 65 3a 20 74 68  |perator here: th|
00013740  75 73 0d 0d 0d 20 20 20  20 20 20 20 20 20 20 20  |us...           |
00013750  20 20 20 20 20 20 20 20  20 49 46 20 20 20 7e 44  |         IF   ~D|
00013760  45 42 55 47 2e 4d 4f 44  45 20 20 20 20 20 3b 72  |EBUG.MODE     ;r|
00013770  65 61 64 20 61 73 20 22  49 46 20 4e 4f 54 20 44  |ead as "IF NOT D|
00013780  45 42 55 47 2e 4d 4f 44  45 22 0d 20 20 20 20 20  |EBUG.MODE".     |
00013790  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000137a0  20 20 2e 0d 20 20 20 20  20 20 20 20 20 20 20 20  |  ..            |
000137b0  20 20 20 20 20 20 20 20  20 20 20 6e 6f 6e 2d 64  |           non-d|
000137c0  65 62 75 67 20 6d 6f 64  65 20 76 65 72 73 69 6f  |ebug mode versio|
000137d0  6e 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |n.              |
000137e0  20 20 20 20 20 20 20 20  20 2e 0d 20 20 20 20 20  |         ..     |
000137f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 46  |               F|
00013800  49 0d 0d 69 6e 63 6c 75  64 65 73 20 63 6f 64 65  |I..includes code|
00013810  20 69 66 20 44 45 42 55  47 2e 4d 4f 44 45 20 69  | if DEBUG.MODE i|
00013820  73 20 73 65 74 20 74 6f  20 30 2e 0d 0d 20 20 20  |s set to 0...   |
00013830  54 68 65 20 20 49 46 2e  2e 45 4c 53 45 2e 2e 46  |The  IF..ELSE..F|
00013840  49 20 20 63 6f 6e 73 74  72 75 63 74 69 6f 6e 20  |I  construction |
00013850  20 63 61 6e 20 20 61 6c  73 6f 20 20 62 65 20 20  | can  also  be  |
00013860  77 72 69 74 74 65 6e 20  20 75 73 69 6e 67 20 20  |written  using  |
00013870  74 68 65 0d 64 69 72 65  63 74 69 76 65 73 20 44  |the.directives D|
00013880  4f 2e 2e 45 4c 53 45 2e  2e 46 49 4e 20 28 6f 72  |O..ELSE..FIN (or|
00013890  20 77 69 74 68 20 61 6e  79 20 63 6f 6d 62 69 6e  | with any combin|
000138a0  61 74 69 6f 6e 20 6f 66  20 74 68 65 6d 29 2e 0d  |ation of them)..|
000138b0  0d 0d 1b 2d 01 37 2e 32  20 41 73 73 65 6d 62 6c  |...-.7.2 Assembl|
000138c0  79 20 63 6f 6e 64 69 74  69 6f 6e 61 6c 20 6f 6e  |y conditional on|
000138d0  20 74 68 65 20 65 78 69  73 74 65 6e 63 65 20 6f  | the existence o|
000138e0  66 20 73 79 6d 62 6f 6c  73 1b 2d 00 0d 0d 0d 20  |f symbols.-.... |
000138f0  20 20 54 77 6f 20 76 61  72 69 61 6e 74 73 20 20  |  Two variants  |
00013900  6f 66 20 74 68 65 20 49  46 20 64 69 72 65 63 74  |of the IF direct|
00013910  69 76 65 2c 20 20 49 46  44 45 46 20 61 6e 64 20  |ive,  IFDEF and |
00013920  49 46 4e 44 45 46 2c 20  20 61 6c 6c 6f 77 20 79  |IFNDEF,  allow y|
00013930  6f 75 20 74 6f 0d 74 65  73 74 20 66 6f 72 20 74  |ou to.test for t|
00013940  68 65 20 65 78 69 73 74  65 6e 63 65 20 6f 72 20  |he existence or |
00013950  6f 74 68 65 72 77 69 73  65 20 6f 66 20 73 79 6d  |otherwise of sym|
00013960  62 6f 6c 73 2e 20 20 49  46 44 45 46 20 69 73 20  |bols.  IFDEF is |
00013970  54 52 55 45 20 20 69 66  20 74 68 65 0d 73 79 6d  |TRUE  if the.sym|
00013980  62 6f 6c 20 69 6e 20 74  68 65 20 6f 70 65 72 61  |bol in the opera|
00013990  6e 64 20 66 69 65 6c 64  20 64 6f 65 73 20 65 78  |nd field does ex|
000139a0  69 73 74 3b 20 49 46 4e  44 45 46 20 69 73 20 54  |ist; IFNDEF is T|
000139b0  52 55 45 20 69 66 20 69  74 20 64 6f 65 73 20 6e  |RUE if it does n|
000139c0  6f 74 2e 0d 0d 20 20 20  54 68 75 73 20 74 68 65  |ot...   Thus the|
000139d0  20 65 78 61 6d 70 6c 65  20 61 62 6f 76 65 20 6d  | example above m|
000139e0  69 67 68 74 20 68 61 76  65 20 62 65 65 6e 20 77  |ight have been w|
000139f0  72 69 74 74 65 6e 20 61  73 0d 0d 0d 0d 0d 0d 0d  |ritten as.......|
00013a00  0d 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
00013a10  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00013a20  20 20 20 33 34 0d 0d 0d  0d 0d 0d 1b 47 20 20 20  |   34.......G   |
00013a30  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00013a40  20 20 20 55 53 49 4e 47  20 54 48 45 20 36 35 43  |   USING THE 65C|
00013a50  30 32 20 41 53 53 45 4d  42 4c 45 52 1b 48 0d 0d  |02 ASSEMBLER.H..|
00013a60  0d 0d 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |...             |
00013a70  20 20 20 20 20 20 20 49  46 44 45 46 20 20 44 45  |       IFDEF  DE|
00013a80  42 55 47 2e 4d 4f 44 45  0d 20 20 20 20 20 20 20  |BUG.MODE.       |
00013a90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00013aa0  2e 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
00013ab0  20 20 20 20 20 20 20 20  20 64 65 62 75 67 20 6d  |         debug m|
00013ac0  6f 64 65 20 76 65 72 73  69 6f 6e 0d 20 20 20 20  |ode version.    |
00013ad0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00013ae0  20 20 20 2e 0d 20 20 20  20 20 20 20 20 20 20 20  |   ..           |
00013af0  20 20 20 20 20 20 20 20  20 45 4c 53 45 0d 20 20  |         ELSE.  |
00013b00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00013b10  20 20 20 20 20 2e 0d 20  20 20 20 20 20 20 20 20  |     ..         |
00013b20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 6e 6f  |              no|
00013b30  6e 2d 64 65 62 75 67 20  6d 6f 64 65 20 76 65 72  |n-debug mode ver|
00013b40  73 69 6f 6e 0d 20 20 20  20 20 20 20 20 20 20 20  |sion.           |
00013b50  20 20 20 20 20 20 20 20  20 20 20 20 2e 0d 20 20  |            ..  |
00013b60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00013b70  20 20 46 49 0d 0d 77 68  65 72 65 20 74 68 65 20  |  FI..where the |
00013b80  6d 65 72 65 20 65 78 69  73 74 65 6e 63 65 20 6f  |mere existence o|
00013b90  66 20 74 68 65 20 73 79  6d 62 6f 6c 20 20 44 45  |f the symbol  DE|
00013ba0  42 55 47 2e 4d 4f 44 45  20 20 77 6f 75 6c 64 20  |BUG.MODE  would |
00013bb0  20 73 65 6c 65 63 74 20  20 74 68 65 0d 64 65 62  | select  the.deb|
00013bc0  75 67 20 63 6f 64 65 2c  20 72 65 67 61 72 64 6c  |ug code, regardl|
00013bd0  65 73 73 20 6f 66 20 69  74 73 20 76 61 6c 75 65  |ess of its value|
00013be0  2e 0d 0d 0d 1b 2d 01 37  2e 33 20 4e 65 73 74 69  |.....-.7.3 Nesti|
00013bf0  6e 67 20 63 6f 6e 64 69  74 69 6f 6e 61 6c 73 1b  |ng conditionals.|
00013c00  2d 00 0d 0d 20 20 20 54  68 65 20 20 41 73 73 65  |-...   The  Asse|
00013c10  6d 62 6c 65 72 20 20 61  6c 6c 6f 77 73 20 79 6f  |mbler  allows yo|
00013c20  75 20 74 6f 20 22 6e 65  73 74 22 20 63 6f 6e 64  |u to "nest" cond|
00013c30  69 74 69 6f 6e 61 6c 73  2e 20 20 57 69 74 68 69  |itionals.  Withi|
00013c40  6e 20 61 20 6e 65 73 74  65 64 0d 63 6f 6e 64 69  |n a nested.condi|
00013c50  74 69 6f 6e 2c 20 20 61  6e 20 45 4c 53 45 20 64  |tion,  an ELSE d|
00013c60  69 72 65 63 74 69 76 65  20 77 69 6c 6c 20 62 65  |irective will be|
00013c70  20 61 73 73 6f 63 69 61  74 65 64 20 77 69 74 68  | associated with|
00013c80  20 74 68 65 20 20 69 6d  6d 65 64 69 61 74 65 6c  | the  immediatel|
00013c90  79 0d 70 72 65 63 65 64  69 6e 67 20 49 46 2c 20  |y.preceding IF, |
00013ca0  49 46 44 45 46 20 6f 72  20 49 46 4e 44 45 46 2e  |IFDEF or IFNDEF.|
00013cb0  0d 0d 0d 1b 2d 01 37 2e  34 20 4c 69 73 74 69 6e  |....-.7.4 Listin|
00013cc0  67 20 63 6f 6e 64 69 74  69 6f 6e 61 6c 73 1b 2d  |g conditionals.-|
00013cd0  00 0d 0d 20 20 20 42 79  20 64 65 66 61 75 6c 74  |...   By default|
00013ce0  2c 20 20 74 68 65 20 41  73 73 65 6d 62 6c 65 72  |,  the Assembler|
00013cf0  20 77 69 6c 6c 20 6c 69  73 74 20 61 6c 6c 20 74  | will list all t|
00013d00  68 65 20 6c 69 6e 65 73  20 74 68 61 74 20 69 74  |he lines that it|
00013d10  20 73 6b 69 70 73 20 69  6e 0d 61 20 63 6f 6e 64  | skips in.a cond|
00013d20  69 74 69 6f 6e 61 6c 2c  20 70 72 69 6e 74 69 6e  |itional, printin|
00013d30  67 20 61 6e 20 22 53 22  20 69 6e 20 74 68 65 20  |g an "S" in the |
00013d40  61 64 64 72 65 73 73 20  66 69 65 6c 64 2e 0d 0d  |address field...|
00013d50  20 20 20 54 6f 20 20 73  61 76 65 20 20 70 61 70  |   To  save  pap|
00013d60  65 72 2c 20 20 6f 72 20  20 6d 61 6b 65 20 20 74  |er,  or  make  t|
00013d70  68 65 20 20 6c 69 73 74  69 6e 67 20 63 6c 65 61  |he  listing clea|
00013d80  72 65 72 2c 20 20 79 6f  75 20 63 61 6e 20 73 75  |rer,  you can su|
00013d90  70 70 72 65 73 73 0d 6c  69 73 74 69 6e 67 20 6f  |ppress.listing o|
00013da0  66 20 73 6b 69 70 70 65  64 20 6c 69 6e 65 73 20  |f skipped lines |
00013db0  77 69 74 68 20 74 68 65  20 53 46 43 4f 4e 44 20  |with the SFCOND |
00013dc0  64 69 72 65 63 74 69 76  65 2c 20 20 6f 72 20 62  |directive,  or b|
00013dd0  79 20 20 73 70 65 63 69  66 79 69 6e 67 0d 74 68  |y  specifying.th|
00013de0  65 20 22 2d 53 22 20 6f  70 74 69 6f 6e 20 69 6e  |e "-S" option in|
00013df0  20 74 68 65 20 63 6f 6d  6d 61 6e 64 20 6c 69 6e  | the command lin|
00013e00  65 2e 20 59 6f 75 20 63  61 6e 20 72 65 2d 69 6e  |e. You can re-in|
00013e10  73 74 61 74 65 20 74 68  65 20 6c 69 73 74 69 6e  |state the listin|
00013e20  67 20 6f 66 0d 66 61 6c  73 65 20 63 6f 6e 64 69  |g of.false condi|
00013e30  74 69 6f 6e 61 6c 20 62  72 61 6e 63 68 65 73 20  |tional branches |
00013e40  61 74 20 61 6e 79 20 74  69 6d 65 20 77 69 74 68  |at any time with|
00013e50  20 74 68 65 20 4c 46 43  4f 4e 44 20 64 69 72 65  | the LFCOND dire|
00013e60  63 74 69 76 65 2e 0d 0d  0d 0d 0d 0d 0d 0d 0d 0d  |ctive...........|
00013e70  0d 0d 0d 0d 0d 0d 0d 0d  0d 0d 0d 0d 0d 0d 0d 0d  |................|
00013e80  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00013ea0  20 33 35 0d 0d 0d 0d                              | 35....|
00013ea7