MOS6502 Version 1.00
Copyright © 1997-2001 BTTR Software
[Under GNU GENERAL PUBLIC LICENSE]


  C O N T E N T S


1 INTRODUCTION
2 LICENSE & DISCLAIMER
3 SYSTEM REQUIREMENTS
4 FEATURES
5 SYNTAX
6 HISTORY
7 TECHNICAL SUPPORT & UPDATES
8 ADDITIONAL INFORMATION
9 DOWNLOAD


1 I N T R O D U C T I O N toc

This software called MOS6502 is a simple (non-macro) DOS-based assembly language translator (assembler) for the MOS 6502 microprocessor and its numerous clones. We tried to keep its syntax as simple as possible.

MOS6502 supports numeric constants as well as regular expressions and outputs pure binary code.


2 L I C E N S E  &  D I S C L A I M E R toc

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Trademarks of companies mentioned in this software appear for identification purposes only and are the property of their respective owners.


3 S Y S T E M  R E Q U I R E M E N T S toc

- Intel i80386 microprocessor (or compatibles)
- Microsoft DOS Version 5.00 (or higher)

Main memory requirements depend on source file size and symbol table size.


4 F E A T U R E S toc

- supports local labels
- supports simple conditional assembling


5 S Y N T A X toc

Keywords:

  equ - define label
example: label_01 equ 1234 (label_01 is now 1234)
       
  org - set program origin
example: org = 0x100 (set program origin to 0x100)
       
  bss - enter bss section (default is code section)
       
  times - repeat current statement
example: times 10 db 'abcd' ('abcdabcdabcd'...)
       
  ifdef - start conditional assembling
example: ifdef OK (if OK is defined, then assemble the
following statement, otherwise not)
       
  ifndef - start conditional assembling
example: ifndef OK (if OK is NOT defined, then assemble the
following statement, otherwise not)
       
  endif - mark end of conditional assembling
       
  db - define byte
example: db 1, 2, 1 + 2, 3 + label_01, 10 * 4 (byte alignment)
       
  dw - define word
example: dw 1 + 2, 3 + label_01, 10 * 4 (word alignment)
       
  dd - define dword
example: dd 3 + label_01, 10 * 4, 1.234 (dword alignment)
       
  resb - reserve byte
example: resb 100 (reserve 100 bytes of uninitialized space)
       
  resw - reserve word
example: resw 100 (reserve 200 bytes of uninitialized space)
       
  resd - reserve dword
example: resd 100 (reserve 400 bytes of uninitialized space)

Constants:

  MOS6502 supports a wide variety of numeric constants and string constants.
         
  Examples: 0x12, $12, 12h = hexadecimal number
    12 = decimal number
    12o, 12q = octal number
    1010b = binary number
    "abc" = string
    'abc' = string

Some other short examples:

  org = 0x100 ; set program origin
     
  b equ 5678 ; define a label, its value is 5678
  OK: ; define a label too
     
  ifdef OK ; conditional assembling
    adc [(1 + b) * 2, x] ; pre-indexed indirect
    times 10 dw b, 1234, 'ab', 2 * (1 + 3)
  endif  
     
  bss ; enter bss section
  c resw 10 ; 20 bytes of uninitialized memory


6 H I S T O R Y toc

Version 1.00 (February 06, 2001)
   - first public release


7 T E C H N I C A L  S U P P O R T  &  U P D A T E S toc

  Technical Support:
   
  support@bttr-software.de
   
  Updates:
   
  http://www.bttr-software.de/mos6502/


8 A D D I T I O N A L  I N F O R M A T I O N toc

MOS6502 was created using Aurora Editor, EDIT, Netwide Assembler/NASM and Ultimate Packer for eXecutables/UPX as well as some information from the official MOS 6502 website.


9 D O W N L O A D toc

Binaries & Manual: mos6502b.zip (14.1K bytes)
Source code: mos6502s.zip (10.0K bytes)


Last modified: February 06, 2001
Copyright © 1997-2001 BTTR Software. All rights reserved.