vladism / m2tools Goto Github PK
View Code? Open in Web Editor NEWSimple and portable assembler toolchain for custom CPUs.
License: Do What The F*ck You Want To Public License
Simple and portable assembler toolchain for custom CPUs.
License: Do What The F*ck You Want To Public License
At this moment, linker is storing symbols in double linked list. It is easy and lazy way, but performance is suffering from this solution. It would be great to generate binary tree from symbols and use this for searching symbols in linking phase.
At this moment, linker is emitting LDM file, which is custom format used in place where ELF format usually can be found. But for some real work with this toolchain, way to handle LDM files and convert it to some useful format is needed. I would like to see tool for at least MIF files used by Quartus and binary files.
Also consider possibility of binary output.
Symbols from linker script, computed one, will get evaluated in order as they appear in linker script file. But when symbol that is not evaluated yet is used in another, zero value is used and no warning or error is emitted.
Expected behaviour: Error will be emitted.
Following sequence in linker script will cause this behaviour.
SET FOO 1
SET VAR_A EVAL VAR_B ENDEVAL
SET VAR_B EVAL FOO ENDEVAL
With capabilities that linker script and its set eval is offering at this moment it is not possible to write fully functional crt0 routine as there is no way to get informations about how big BSS section is. There should be commands in eval environment that will return size of section or memory. Also start address of section or memory.
Another missing feature of linker script is ability to put data into two memories. Because, data section have to be stored in memory where code is located, thus it will be distributed with binary, and have to be linker against RAM as data section is used for initialized variables and its content is often copied from read only memory into read write memory.
TODO list
As i8080 support exist try to find a way how to elegantly add support for i8085 CPU. Maybe use some optional argument to assembler and linker to be passed into platformlib? Something like --arch=i8085?
For some reason comments in assembler source code doesn't work. They get treated as with potential instructions and then back-end going to throw syntax error as its input isn't valid instruction.
According to usage document comment start with semicolon and continues till end of line. But for example source, file test.asm containing following:
; This is comment
parsed by assembler like so:
$ i8080-assembler -o test.o test.asm
will emit following.
Token ';' from test.asm+1 is not recognized as valid instruction, label or pseudoinstruction!
Failed to complete pass1 on file test.asm!
Failed to run assembler on test.asm
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.