Page 1 of 1

Alternate Assembler

Posted: Mon Jun 26, 2017 8:50 am
by ndf
For anyone looking for an alternative assembler to the one provided with SpinIDE, here are some tools to let you program the DSP, and hopefully get a ltitle closer to the chip: asfv1/disfv1

asfv1 is an alternate assembler for the Spin Semi FV-1. This assembler is pure python3, so it should run on anything that can run python. It mostly replicates behaviour of the SpinIDE, with a few minor caveats. The biggest difference is that you can specify unsigned integer values for all operands, you can specify real arguments for any of the 24bit accumulator instructions, and you can insert arbitrary binary code if required.

Assembler:

pip3 install asfv1
https://pypi.org/project/asfv1
https://github.com/ndf-zz/asfv1

Disassembler:

pip3 install disfv1
https://pypi.org/project/disfv1
https://github.com/ndf-zz/disfv1

Development Makefile:

https://github.com/ndf-zz/fv1build

Re: Alternate Assembler

Posted: Fri May 31, 2019 8:45 pm
by ndf
I just released a new version of this assembler (1.0.7), which now allows you to get Spin style real number behaviour for the literals '1' and '2', and allows direct insertion of raw code. It does not, however, replicate the undocumented multiplication and division arithmetic of the Spin IDE.

Updates on github and pypi:

https://github.com/ndf-zz/asfv1

I've also posted a Makefile with build scripts and examples that can help when putting together a bank of programs:

https://github.com/ndf-zz/fv1build

Re: Alternate Assembler

Posted: Mon Jul 29, 2019 2:46 pm
by ndf
There's a new version now available at links above which now supports arbitrary arithmetic, powers, bitwise logic and shifts on instruction operands. The documentation (see README) has been expanded, error handling improved and there's much better support for assembling SpinASM code using the '-s' option.

You can now assemble directly into a bank file eg:

$ asfv1 -p 0 prog0.asm bank.bin
$ asfv1 -p 1 prog1.asm bank.bin
...
$ asfv1 -p 7 prog7.asm bank.bin

Any questions or comment, please don't hesitate to ask :) Cheers and thanks!

Re: Alternate Assembler

Posted: Tue Aug 27, 2019 1:57 pm
by knutolai
This looks very interesting. I've been having issues with SpinAsm recently and will check this out as soon as possible. Is it possible to compile projects and build .hex files the same way as with SpinAsm IDE or will I need to know Python to operate the IDE?

Re: Alternate Assembler

Posted: Sun Sep 08, 2019 5:46 am
by ndf
knutolai wrote: Tue Aug 27, 2019 1:57 pmIs it possible to compile projects and build .hex files the same way as with SpinAsm IDE or will I need to know Python to operate the IDE?
No, no. The asfv1 assembler is not an IDE, it is just the assembler. It runs as a standalone command line program and does not require you to know any python at all. You edit your spin source files in a text editor (or another IDE), run the assembler on your source files and then upload the resulting binary (or hex) file(s) using your chosen tool. Check out the readme for more information.

Re: Alternate Assembler

Posted: Sat Sep 28, 2019 2:48 am
by igorrr
This gain of 1000

log 1.0,0.625
exp 1.0,0.0

is not working with it, but works as intended with the spin compiler.

Re: Alternate Assembler

Posted: Sat Sep 28, 2019 7:43 am
by ndf
Sorry, I incorrectly used S4_6 real format for the log offset instead of S_10. This has been corrected in the current version. Thanks for pointing it out!