M README.md => README.md +5 -42
@@ 3,6 3,7 @@
[Orca](https://wiki.xxiivv.com/orca) is an esoteric programming language, written in [Uxntal](https://wiki.xxiivv.com/site/uxntal.html).
In Orca, every letter of the alphabet is an operation, where lowercase letters operate on bang, uppercase letters operate each frame.
+For more details, see the complete [operation manual](https://wiki.xxiivv.com/site/orca.html).
## Build
@@ 63,46 64,8 @@ To display the list of operators inside of Orca, use `CmdOrCtrl+G`.
- `/` **byte**(hb lb): Sends a single byte.
- `$` **self**(path): Inject file in grid.
-#### Advanced
-
-Orca listens to stdin events and inputs the byte values as keyboard inputs. The cursor can also be moved with special bytes:
-
-- `#11` **up**
-- `#12` **down**
-- `#13` **left**
-- `#14` **right**
-
-## Controls
-
-### Mouse
-
-- `mouse1` select cell
-
-### Arrows
+## Support
-- `arrow` move
-- `shift+arrow` scale selection
-- `ctrl+arrow` drag selection
-
-### Ctrl
-
-- `ctrl+n` new
-- `ctrl+r` rename
-- `ctrl+o` open
-- `ctrl+s` save
-- `ctrl+c` copy
-- `ctrl+v` paste
-- `ctrl+x` cut
-- `ctrl+h` toggle guide
-- `ctrl+i` toggle insert
-- `ctrl+a` select all
-
-### Misc
-
-- `space` toggle play
-- `backspace` erase
-- `escape` deselect
-
-## Help
-
-For more details, see the complete [operation manual](https://wiki.xxiivv.com/site/orca.html).
+- [theme](https://wiki.xxiivv.com/site/theme.html)
+- [snarf](https://wiki.xxiivv.com/site/snarf.html)
+- [manifest](https://wiki.xxiivv.com/site/manifest.html)
A etc/console-input.tal => etc/console-input.tal +14 -0
@@ 0,0 1,14 @@
+
+@on-console-listen ( -> )
+
+ .Console/read DEI
+ [ #11 ] NEQk NIP ,&no-u JCN #00ff #00 ;mod-sel JSR2 &no-u
+ [ #12 ] NEQk NIP ,&no-d JCN #0001 #00 ;mod-sel JSR2 &no-d
+ [ #13 ] NEQk NIP ,&no-l JCN #ff00 #00 ;mod-sel JSR2 &no-l
+ [ #14 ] NEQk NIP ,&no-r JCN #0100 #00 ;mod-sel JSR2 &no-r
+ DUP ;ci-key JSR2 #00 EQU ,&no-key JCN
+ STHk .selection LDZ2 STHr ;set-cell JSR2
+ &no-key
+ POP
+
+BRK
M src/orca.tal => src/orca.tal +18 -14
@@ 170,15 170,20 @@ JMP2r
@on-console ( -> )
+ #00 ;draw-filepath JSR2
+ ( start )
+ [ LIT &listening $1 ] ,&no-start JCN
+ #01 ,&listening STR
+ ;filepath #0040 ;mclr JSR2
+ &no-start
+ ( end )
.Console/read DEI
- [ #11 ] NEQk NIP ,&no-u JCN #00ff #00 ;mod-sel JSR2 &no-u
- [ #12 ] NEQk NIP ,&no-d JCN #0001 #00 ;mod-sel JSR2 &no-d
- [ #13 ] NEQk NIP ,&no-l JCN #ff00 #00 ;mod-sel JSR2 &no-l
- [ #14 ] NEQk NIP ,&no-r JCN #0100 #00 ;mod-sel JSR2 &no-r
- DUP ;ci-key JSR2 #00 EQU ,&no-key JCN
- STHk .selection LDZ2 STHr ;set-cell JSR2
- &no-key
- POP
+ DUPk #1f GTH SWP #7f LTH AND ,&no-end JCN
+ #00 ,&listening STR
+ &no-end
+ ( capture )
+ ,capture-trap JSR
+ #01 ;draw-filepath JSR2
BRK
@@ 710,11 715,10 @@ JMP2r
( value )
.timer/speed LDZ #01 ;draw-byte JSR2
( th )
- #03 ;draw-chr/color STA
- LIT 't ;draw-chr JSR2
- LIT 'h ;draw-chr JSR2
+ ;&th #03 ;draw-str-color JSR2
JMP2r
+ &th "th $1
@draw-state ( -- )
@@ 730,7 734,7 @@ JMP2r
.toolbar/y1 LDZ2 .Screen/y DEO2
.toolbar/x1 LDZ2 #0078 ADD2 .Screen/x DEO2
( icon )
- ;filepath ROT ;draw-str-color JSR2 POP2
+ ;filepath ROT ;draw-str-color JSR2
JMP2r
@@ 836,7 840,7 @@ JMP2r
( space )
#00 .Screen/sprite DEO
( text )
- INC2 #01 ;draw-str-color JSR2 POP2
+ INC2 #01 ;draw-str-color JSR2
INC2 GTH2k ,&loop JCN
POP2 POP2
@@ 876,7 880,7 @@ JMP2r
@draw-str-color ( str* color -- )
,draw-chr/color STR
- ;draw-str JSR2
+ ;draw-str JSR2 POP2
JMP2r