1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-10 02:38:05 +11:00
Commit Graph

8 Commits

Author SHA1 Message Date
Clanmaster21
9fb1467ee5 cpHLDE and writeHLinDE improvements (#33)
Pretty major improvements to both of these, cpHLDE is now 5 bytes shorter and between 9 and 12 cycles faster due to branching, and writeHLinDE is now 2 bytes shorter and 21 cycles faster.
2019-10-16 20:39:38 -04:00
Clanmaster21
6281e2036f Optimised intoXX functions (#19)
* Optimised intoXX functions

Rewrote intoXX functions to mainly rely on intoHL, as the HL instructions are smaller and faster. Also removed some redundant push and pop instructions. I edited the given unit tests to test these, and they seem to work as expected.

* Doesn't use self-modifying code

The number of bytes is the same as my previous attempt, with 11 more cycles in intoHL, so although I don't feel as clever this time it's still a good optimisation. I found an equivalent method for intoDE, however relying on intoHL still allows for  `ex (sp), hl` to be used in intoIX, which is smaller and faster.

* Update core.asm

* Tried harder to follow coding convention

Added tabs between mnemonics and operands, and replaced a new line I accidentally removed.
2019-10-10 14:44:23 -04:00
Virgil Dupras
985d56ca5a core: preserve A in cpHLDE 2019-07-23 22:59:10 -04:00
Virgil Dupras
605c631dc0 shell: add support for backspace
It doesn't sound like much, but that backspace key is often useful...
2019-06-14 22:14:09 -04:00
Virgil Dupras
ae028e3a86 blockdev: make implementors "random access"
This huge refactoring remove the Seek and Tell routine from blockdev
implementation requirements and change GetC and PutC's API so that they
take an address to read and write (through HL/DE) at each call.

The "PTR" approach in blockdev implementation was very redundant from
device to device and it made more sense to generalize. It's possible
that future device aren't "random access", but we'll be able to add more
device types later.

Another important change in this commit is that the "blockdev handle" is
now opaque. Previously, consumers of the API would happily call routines
directly from one of the 4 offsets. We can't do that any more. This
makes the API more solid for future improvements.

This change forced me to change a lot of things in fs, but overall,
things are now simpler. No more `FS_PTR`: the "device handle" now holds
the active pointer.

Lots, lots of changes, but it also feels a lot cleaner and solid.
2019-06-04 15:36:20 -04:00
Virgil Dupras
83771b538f fs: check for file size bounds in GetC 2019-05-31 11:12:29 -04:00
Virgil Dupras
328f44814e Make blockdev pointers 32 bits
This allows us to break through the 64K limit for includes CFS in zasm,
a limit we were dangerously close to breaking. In fact, this commit
makes us go over that limit. Right in time!
2019-05-28 19:42:35 -04:00
Virgil Dupras
7fad3b0c90 Move /parts/z80 to /kernel
Let go of that "meta os" thing. it's not as meta as I made it sound
like. It's a kernel.
2019-05-19 11:19:41 -04:00