1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-07-23 09:02:32 +10:00
Commit Graph

52 Commits

Author SHA1 Message Date
Virgil Dupras
69f0c6dafd trs80/floppy: implement write 2020-02-22 12:09:43 -05:00
Virgil Dupras
7ca54d179d lib/expr: make EXPR_PARSE "tail" HL
Things are now much simpler.
2019-12-30 19:24:53 -05:00
Virgil Dupras
289037a3dd lib/parse: make parseDecimal "tail" HL
HL, instead of being preserved, is set to the character following
the last read character.
2019-12-30 10:13:55 -05:00
Virgil Dupras
15628da7de lib/expr: make EXPR_PARSE put result in DE instead of IX
Finally getting rid of this bad mistake of using IX for this.
2019-12-29 17:37:04 -05:00
Virgil Dupras
6d88c3a754 parseExprDE --> parseExpr 2019-12-23 19:13:44 -05:00
Virgil Dupras
5301200d6f basic: parseExpr --> parseExprDE 2019-12-23 19:01:03 -05:00
Virgil Dupras
cc754e12aa parseExpr --> parseExprDE: easy ones
Those replacements were trivially equivalent. For the other ones, an
examination of the context is necessary.
2019-12-23 15:59:55 -05:00
Virgil Dupras
43f4c5200e basic: don't choke on ':' in '"' literals 2019-12-12 12:22:38 -05:00
Virgil Dupras
3db38b0d89 basic: add while command 2019-12-12 11:17:10 -05:00
Virgil Dupras
51c977f2ed basic: allow multiple commands on the same line 2019-12-12 10:51:13 -05:00
Virgil Dupras
1710c865dc doc: refer to the new BASIC shell in example
ref #80
2019-12-11 14:57:07 -05:00
Virgil Dupras
25d25d017c Replace old shell with BASIC shell
fixes #80
2019-12-11 14:05:34 -05:00
Virgil Dupras
880775ae69 recipes/rc2014/sdcard: use BASIC shell 2019-12-11 11:18:32 -05:00
Virgil Dupras
beaea6f978 basic: add puth command 2019-12-09 14:34:14 -05:00
Virgil Dupras
105acedab8 basic: improve README
markdown formatting was broken. Also, don't mark it as WIP.
2019-12-01 20:15:45 -05:00
Virgil Dupras
4c07639808 basic: make cmd table more compact
This shaves off quite a few bytes from the binary.
2019-11-30 21:36:34 -05:00
Virgil Dupras
4ba84dac5c basic: add getc/putc commands 2019-11-30 21:13:44 -05:00
Virgil Dupras
77485a0031 basic: change welcome prompt
This is becoming the new shell, it has to step up to its new responsibilities!
2019-11-30 20:50:34 -05:00
Virgil Dupras
fc23a7c4a1 basic: do registers-to-vars transfer after pgm hook call 2019-11-25 23:16:15 -05:00
Virgil Dupras
264e72e0fd basic: add fnew and fdel commands 2019-11-25 22:49:24 -05:00
Virgil Dupras
7c893dada1 basic: can now execute user apps!
Shell replacement sequence beginning in 3, 2, 1...
2019-11-25 22:05:10 -05:00
Virgil Dupras
b29073b01d basic: add fopen command 2019-11-25 21:41:37 -05:00
Virgil Dupras
a0daed6812 basic: add usr command 2019-11-24 21:07:03 -05:00
Virgil Dupras
12bc120375 basic: add bsel, bseek, getb, putb commands 2019-11-24 20:34:23 -05:00
Virgil Dupras
8f1d942e5f basic: add addr command 2019-11-24 15:39:36 -05:00
Virgil Dupras
381d57a513 basic: make variable A the only input variable
Mechanism for assigning inputs to the specified variable is clumsy and uses
binary space. Always using A is much simpler and doesn't seem very limiting to
me. I do that because there's many more "input" commands I'd like to add.
2019-11-24 14:55:50 -05:00
Virgil Dupras
e1df320d44 basic: add ldbas command 2019-11-24 14:26:32 -05:00
Virgil Dupras
13f935aa88 basic: add fls command
Also, add the new `bshell` emulated tool. BASIC is on its way to replace the
shell.
2019-11-24 10:24:15 -05:00
Virgil Dupras
b7d4860acf basic: add in/out commands
Also, fixed the cmd matching algo to not accept partial matches. For example,
to stop matching "input" when the command was "in".
2019-11-23 20:38:56 -05:00
Virgil Dupras
7761cebb0a basic: add sleep command
also fix broken "peek"
2019-11-23 17:07:14 -05:00
Virgil Dupras
9602f9b983 basic: add peek/poke/deek/doke commands 2019-11-23 16:09:34 -05:00
Virgil Dupras
a680fd3328 basic: add support for signed integers 2019-11-23 14:56:23 -05:00
Virgil Dupras
fd5b2ab856 Put app-common documentation in apps/README.md 2019-11-22 14:01:16 -05:00
Virgil Dupras
e17dc1e1e1 basic: add input command 2019-11-21 20:17:55 -05:00
Virgil Dupras
982d20f895 basic: allow printing of quoted strings 2019-11-21 19:56:51 -05:00
Virgil Dupras
704d32279a basic: document better 2019-11-21 17:03:46 -05:00
Virgil Dupras
7262993f14 basic: add if 2019-11-21 16:06:14 -05:00
Virgil Dupras
3f3dd9141e basic: allow multiple args in print 2019-11-20 21:02:11 -05:00
Virgil Dupras
9c400ca642 basic: add goto
Things are getting super cereal...
2019-11-20 15:45:53 -05:00
Virgil Dupras
9d6cbe577c basic: add variables
Things are getting cereal...
2019-11-20 15:10:00 -05:00
Virgil Dupras
9c9484fb88 basic: add run command 2019-11-20 10:49:23 -05:00
Virgil Dupras
9d1003e7a2 basic: keep line index ordered and line numbers unique 2019-11-19 21:55:26 -05:00
Virgil Dupras
62138b12cf basic: add buffer line index 2019-11-19 20:43:01 -05:00
Virgil Dupras
4c6de413df basic: begin implementing a line buffer 2019-11-19 15:14:04 -05:00
Virgil Dupras
f5b04fc02f basic: add expression support to print
Again, same thing as in zasm.
2019-11-18 15:52:44 -05:00
Virgil Dupras
0bd58fd178 basic: parse hex, binary and char literals
Same thing as in zasm.
2019-11-18 15:22:09 -05:00
Virgil Dupras
1cea6e71e0 basic: add a print cmd
It can only print a decimal literal. But still, that's a big step because
I hadn't implemented decimal formatting yet.
2019-11-18 13:40:23 -05:00
Virgil Dupras
019d05f64c Make the shell a userspace app
That's my mega-commit you've all been waiting for.

The code for the shell share more routines with userspace apps than with kernel
units, because, well, its behavior is that of a userspace app, not a device
driver.

This created a weird situation with libraries and jump tables. Some routine
belonging to the `kernel/` directory felt weird there.

And then comes `apps/basic`, which will likely share even more code with the
shell. I was seeing myself creating huge jump tables to reuse code from the
shell. It didn't feel right.

Moreover, we'll probably want basic-like apps to optionnally replace the shell.

So here I am with this huge change in the project structure. I didn't test all
recipes on hardware yet, I will do later. I might have broken some...

But now, the structure feels better and the line between what belongs to
`kernel` and what belongs to `apps` feels clearer.
2019-11-15 15:37:49 -05:00
Virgil Dupras
cdd0b64570 Modify userspace .org and RAMSTART expectations
Instead of expecting a `USER_CODE` symbol to be set, we expect `.org` to be
set in all userspace glue code. This gives us more flexibility with regards to
how we manage that.

Moreover, instead of making `USER_RAMSTART` mandatory, we make it default to
the end of the binary, which is adequate in a majority of cases.

Will be useful for my upcoming mega-commit... :)
2019-11-15 10:33:13 -05:00
Virgil Dupras
7cf3ed38da Extract str.asm from core.asm and make core included by userspace
Most of register fiddling routines (which is now the only thing contained
in care.asm) are used by almost all userspace apps, often in inner loops.

That makes the penalty of using jump tables for those a bit too high.
Moreover, it burdens jump tables needlessly.

Because this unit is very small (now that string routines are out), it makes
sense to always include it in binaries.
2019-11-14 10:14:15 -05:00