1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 18:48:07 +11:00
Mirror of CollapseOS
Go to file
Clanmaster21 927d5f2392 Reworked parseHexadecimal and parseDecimal, other minor tweaks (#85)
I've tweaked nearly every function in this file, so I'll go through them one by one.
parseDecimal has been reworked a little so that `a` can be used instead of `b` for checking for overflow. I had originally intended to redo it to work like the old parseDecimal, but I think the current method (once reworked a little) is cleaner and smaller, and should be just as fast. 7 bytes and 27 cycles saved.
parseHexadecimal has been changed to load hex digits into `b` `d` `c` `e` from the right (so all the digits move along to the left so the new digit can be inserted on the right), and then only at the end is any shifting done, using the faster `add a, a` to do left shifts. 9 bytes saved and 78 cycles saved inside the loop, and then 49 cycles added after the loop. 
parseBinaryLiteral had a few instructions moved around, saving two bytes and 5 cycles inside the loop, and a further 15 cycles saved on error.
parseLiteral has been reworked slightly, the isDigit call has been replaced with an inline parseDecimalDigit, saving a byte and around 20-30 cycles, with around 16 more cycles saved if the number is a decimal. The .char routine has been reduced by a byte, and 6 cycles saved on success, but 5 cycles added on error.
isDigit has been reduced by 4 bytes and 10 cycles on success, with a few more cycles saved on fail (hard to estimate due to branching).
2020-01-08 16:12:40 -05:00
apps Reworked parseHexadecimal and parseDecimal, other minor tweaks (#85) 2020-01-08 16:12:40 -05:00
avr avra: add LSL 2019-12-22 18:36:15 -05:00
doc doc: add "Understanding the code" walkthrough 2020-01-05 10:47:23 -05:00
emul recipes: add "make emul" targets where appropriate 2020-01-02 16:59:38 -05:00
fonts sms/vdp: use fonts from kernel/fnt 2020-01-07 22:15:35 -05:00
kernel sms/vdp: use fonts from kernel/fnt 2020-01-07 22:15:35 -05:00
recipes sms/vdp: use fonts from kernel/fnt 2020-01-07 22:15:35 -05:00
tests tests/shell: bring back the static test.cfs 2019-12-31 15:17:22 -05:00
tools Rewrite font_compile.pl to C 2020-01-07 18:26:40 -05:00
.gitignore cfspack: make into a library 2019-12-31 13:57:52 -05:00
.gitmodules Move "emul" folder to root 2019-12-31 13:34:24 -05:00
.travis.yml Add travis support 2019-10-30 19:12:02 -04:00
CODE.md basic: add buffer line index 2019-11-19 20:43:01 -05:00
CONTRIBUTING.md Add CONTRIBUTING.md (#53) 2019-10-18 15:50:38 -04:00
COPYING Re-license to GPLv3 2019-05-08 20:18:05 -04:00
README.md Move "emul" folder to root 2019-12-31 13:34:24 -05:00
runtests.sh Move "emul" folder to root 2019-12-31 13:34:24 -05:00
TRICKS.txt basic: add a print cmd 2019-11-18 13:40:23 -05:00

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:

  1. Run on minimal and improvised machines.
  2. Interface through improvised means (serial, keyboard, display).
  3. Edit text files.
  4. Compile assembler source files for a wide range of MCUs and CPUs.
  5. Read and write from a wide range of storage devices.
  6. 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.