Difference between revisions of "IOP16 Assembler"

From Land Boards Wiki
Jump to navigation Jump to search
Line 31: Line 31:
  
 
<pre>
 
<pre>
# ['IO_ADDR','DIR','MNEUMONIC']
+
['IO_ADDR','DIR','MNEUMONIC']
 
</pre>
 
</pre>
 
* IO_ADDR = 0XNN
 
* IO_ADDR = 0XNN
 
* DIR = R, W, or RW
 
* DIR = R, W, or RW
 
** Ex: ['0X00','R','LED_RD']
 
** Ex: ['0X00','R','LED_RD']
 +
 +
== Constants file ==
 +
 +
* Optional File named: fileName_CONST.csv
 +
* Constants file Header has to be -
 +
<pre>
 +
['LABEL','STRING']
 +
</pre>
  
 
== Output files ==
 
== Output files ==

Revision as of 20:19, 15 April 2022

IOP16 Assembler

Assembler - Windows executable

  • Windows executable is in this folder
  • Useful for people who don't have Python 3 installed
  • Compiled to executable using
pyinstaller --onefile pyAssemble_cpu_001.py

Input fileName.csv

  • Input file is tightly constrained in CSV file
    • Input File Header has to be
['LABEL', 'OPCODE', 'REG_LABEL', 'OFFSET_ADDR', 'COMMENT']

Memory Map File

  • Optional File named: fileName_MMAP.csv
    • Memory map file Header has to be
['IO_ADDR','DIR','MNEUMONIC']
  • IO_ADDR = 0XNN
  • DIR = R, W, or RW
    • Ex: ['0X00','R','LED_RD']

Constants file

  • Optional File named: fileName_CONST.csv
  • Constants file Header has to be -
['LABEL','STRING']

Output files

  • .mif file - Quartus II ROM Memory Initialization File
  • .lst file - Listing file (with addresses)

Assembler Psuedo-opcodes

  • NOP - No operation
  • HLT - Halt (Jump to self)
  • BEQ - Branch if equal (same as BEZ)
  • BNE - Branch if not equal (Aame as BNZ)

Error Messages

  • Error messages are pretty rudimentary.
  • Dialog box notes that error messages are printed to the command window.
  • The line with the error is printed as a list of the line.
  • Missing labels are presented as a message.
  • Only one error at a time is presented.

Assembler opcodes

Opcodes.PNG

Documentation