Crossassembler
The crossassembler ans32k for a Windows PC is used to generate Series 32000 binary code for different purposes. The output can be used in a simulator, to configure a FPGA system with boot ROM or to generate test programs for a real system. The following output formats are available:
- hexadecimal, textfile, 32 bit hex values with MSD in left place, one value per line, default format
- binary, option "-bin"
- Altera MIF format, textfile, used in Quartus for definition of ROM content, option "-mif"
- Intel Hex format, textfile, used to transfer programs or data to TRIPUTER or programming hardware, option "-ihex"
The crossassembler is executed in a command (cmd) window on a PC. Write "ans32k inputfile" to execute it. The result file is named "boot_rom.txt". It can be used as an initialisation file for a ROM with 32 bits word-width and 256 words deep. If you want to get a list file with the addresses of your code add the option "-list". If you want to know the hex code of the resulting opcodes use the option "-list -code". Use "ans32k" to see all options.
ans32k.exe - version 1.2 from 8 April 2020 (bug fix)
Here is an example input file. The syntax is like many other assemblers. But it is not compatible in some aspects with the GNU assembler "gas". The code executes a MMU abort during program fetch due to an invalid page table entry.
example.32K - text file
Here is the output of the crossassembler for the example. You should see the same result.
boot_rom.txt - text file
This is the list file of the example together with the opcodes in hexadecimal form.
example.32K.LST - text file
This chapter was last modified on 8 April 2020. Next chapter: Definicon