9cddaf1b59
* String functions optimised A few functions have been tweaked, but the biggest changes are in strlen, strskip and toWS, which take around two third of the cycles they used to (although strskip has more overhead). 10 bytes saved total. toWS had two bytes added inlining the isWS call, and a jump to unsetZ was inlined too, saving a byte. This saved 29 cycles, with the original function being 90 cycles. I looked at other uses of isWS and it's difficult to inline it effectively in every situation, so I haven't inlined it elsewhere. rdWS had a byte and two cycles saved by inlining a jump to unsetZ. strskip is the same size, with the loop cut down from 35 cycles to 21 cycles, but 18 cycles are added outside the loop. I expect one character strings are in the minority, so this should save cycles overall. strlen had 8 bytes saved, with the loop cut down from 38 cycles to 21 cycles, and 18 cycles removed outside the loop. * Fixed strskip Strskip wasn't preserving a properly. The new code uses the shadow af register, so whilst a byte and 4 cycles have been added outside the loop, it's safer and cleaner. The flags register isn't affected, but since the search goes for up to 64Kb I think it's safe to say the end of the string will always be reached. * Remove inlining of isWS |
||
---|---|---|
apps | ||
avr | ||
doc | ||
emul | ||
fonts | ||
kernel | ||
recipes | ||
tests | ||
tools | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
CODE.md | ||
CONTRIBUTING.md | ||
COPYING | ||
README.md | ||
runtests.sh | ||
TRICKS.txt |
Collapse OS
Bootstrap post-collapse technology
Collapse OS is a z80 kernel and a collection of programs, tools and documentation that allows you to assemble an OS that, when completed, will be able to:
- Run on minimal and improvised machines.
- Interface through improvised means (serial, keyboard, display).
- Edit text files.
- Compile assembler source files for a wide range of MCUs and CPUs.
- Read and write from a wide range of storage devices.
- Replicate itself.
Additionally, the goal of this project is to be as self-contained as possible. With a copy of this project, a capable and creative person should be able to manage to build and install Collapse OS without external resources (i.e. internet) on a machine of her design, built from scavenged parts with low-tech tools.
See it in action
Michael Schierl has put together a set of emulators running in the browser that run Collapse OS in different contexts.
Using those while following along with the User Guide is your quickest path to giving Collapse OS a try.
Organisation of this repository
kernel
: Pieces of code to be assembled by the user into a kernel.apps
: Pieces of code to be assembled into "userspace" application.recipes
: collection of recipes that assemble parts together on a specific machine.doc
: User guide for when you've successfully installed Collapse OS.tools
: Tools for working with Collapse OS from "modern" environments. For example, tools for facilitating data upload to a Collapse OS machine through a serial port.emul
: Emulated applications, such as zasm and the shell.tests
: Automated test suite for the whole project.
Status
The project unfinished but is progressing well! See Collapse OS' website for more information.
Discussion
For a general discussion of Collapse OS and the ecosystem of technologies and ideas that may develop around it refer to r/collapseos
A more traditional mailing list and IRC (#collapseos on freenode) channels are also maintained.