Commit Graph

10 Commits

Author SHA1 Message Date
Virgil Dupras ac3629b817 Make BLK@* and BLK!* into ialiases 2021-01-02 15:51:12 -05:00
Virgil Dupras d09de0a0d3 Integrate RDLN input buffer into sysvars
In the beginning of Collapse OS' Forth version, the readline sub-
system was optional. This is why we had this separate RDLN$ routine
and that the input buffer was allocated at boot time.

It's been a while since the RDLN system has been made mandatory, but
we still paid the complexity tax of this separation. Not anymore.
2021-01-02 14:32:03 -05:00
Virgil Dupras 80d1b59050 Add words |M and |L
Splitting a word into MSB/LSB pairs happens often and is worth, I
think, native words. Also, I'm going to need it in the upcoming
commits.
2020-12-07 20:11:49 -05:00
Virgil Dupras 224e9183fb cvm: fix NEWLN behavior
I hadn't noticed yet, but making CVM use the Grid subsystem made
me lose scrolling. It's fine because that scrolling was "artificial"
in the sense that it was provided by curses, not Collapse OS and I
prefer having something that closer emulates a real machine.

However, CVM didn't properly clear the new line when entering it.
Fixed.

Scrolling behavior will come back when it's implemented in the Grid
subsystem.
2020-11-17 11:52:54 -05:00
Virgil Dupras cf79ceefea sms: add cursor visual indicator in VDP mode 4
This required the change of CURSOR! signature: we now supply it
with both old and new cursor positions.

Also, fix broken _bs in Grid subsystem.
2020-11-16 10:05:48 -05:00
Virgil Dupras b1e162b8a3 grid: change the meaning of CELL!
Replace the "g" arg (glyph) with "c" (character). The reason why "g"
was used was to save a "0x20 -" operation at all CELL! implementations,
but this came with too big a drawback: it made CELL! hardly usable
outside of the Grid subsystem, mostly because the user of CELL! would
often have to do "0x20 -".

For example, I want the SMS's Pad driver to use CELL! directly instead
of having to do EMIT+XYPOS-messing-around. I would have had to do a
"0x20 -" there.
2020-11-16 09:11:47 -05:00
Virgil Dupras 7bfec5d9e9 grid: Add CURSOR! to the grid protocol
With the move of CVM's forth to the grid protocol, we've lost the
cursor's visual indication. Now, we have it back.

The challenge now is in implementing it in SMS' text mode. In mode
4, it's easy to mark a cell as inverted, but in text mode, that's
not possible.
2020-11-16 08:41:09 -05:00
Virgil Dupras d3049b2404 grid: add XYMODE
In VE on the SMS, the first contents line would always be cleared
because of NEWLN being called when the FBUF would spit its last
char. Inconvenient...

I've added a "graphical" mode to the grid subsystem to inhibit this
behavior in a graphical situation such as in VE.

Also, write a more complete Grid documentation.
2020-11-14 22:35:08 -05:00
Virgil Dupras c939c7e84a cvm: use Grid in /cvm/forth
Also, fixed broken AT-XY in Grid...
2020-11-14 20:08:18 -05:00
Virgil Dupras 532bcc7e78 cvm: split stage and forth xcomp units
I wanted to make CVM's forth use the Grid subsystem, but doing so
would break the stage binary. Hence, this split.
2020-11-14 15:00:03 -05:00