Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #2

Merged
merged 44 commits into from
Aug 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0e8a59e
Start implementing line editor.
Ismael-VC Jul 27, 2024
0f72a44
Fix banner
Ismael-VC Jul 28, 2024
65388e9
Work on readline like editing.
Ismael-VC Jul 31, 2024
8f305d0
Improve multiline prompt.
Ismael-VC Jul 31, 2024
451ca2c
Implement DEL.
Ismael-VC Jul 31, 2024
9ec4d66
Improve repl
Ismael-VC Aug 2, 2024
80e6b98
Improve makefile
Ismael-VC Aug 2, 2024
889b681
Update banner.
Ismael-VC Aug 2, 2024
753877b
Update banner.
Ismael-VC Aug 2, 2024
367190c
Update banner.
Ismael-VC Aug 2, 2024
a9edd19
Rename to TalOS.
Ismael-VC Aug 3, 2024
e1eee5b
Add workspace file.
Ismael-VC Aug 3, 2024
63be85f
Update memory map diagram.
Ismael-VC Aug 3, 2024
e5b0cc8
Update readme.
Ismael-VC Aug 3, 2024
d05a233
Test braketed paste mode.
Ismael-VC Aug 3, 2024
eaf852e
Update gitignore.
Ismael-VC Aug 4, 2024
17ad4dc
Update gitignore.
Ismael-VC Aug 4, 2024
69bb903
Improve makefile.
Ismael-VC Aug 4, 2024
746fe0f
Improve build.sh script.
Ismael-VC Aug 4, 2024
ac12f5c
Add ansi test for uxn38
Ismael-VC Aug 4, 2024
09aab7e
Test in uxn38
Ismael-VC Aug 5, 2024
d0af95f
Add build script for uxn38
Ismael-VC Aug 5, 2024
1d36b19
Use C preprocessor for conditional debugging.
Ismael-VC Aug 5, 2024
90138ef
Update gitignore
Ismael-VC Aug 5, 2024
5d5cc0d
Untrack rom
Ismael-VC Aug 5, 2024
05ea325
Untrack rom
Ismael-VC Aug 5, 2024
0c1885d
*
Ismael-VC Aug 5, 2024
3a33f31
Translate \n to \r\n on output.
Ismael-VC Aug 5, 2024
946d87b
Translate \n to \r\n on output.
Ismael-VC Aug 5, 2024
ed8d8a6
Translate \n to \r\n on output.
Ismael-VC Aug 5, 2024
73a1726
Bump version.
Ismael-VC Aug 5, 2024
39039b6
Update build script.
Ismael-VC Aug 5, 2024
f1241bf
use syshem uxnasm
Ismael-VC Aug 5, 2024
bd4856b
*
Ismael-VC Aug 6, 2024
f95d433
Alt+Enter toggles multiline.
Ismael-VC Aug 6, 2024
6d1a8af
support braketed paste mode
Ismael-VC Aug 6, 2024
6822c7d
add raven binaries
Ismael-VC Aug 6, 2024
3d32c9d
Order etc
Ismael-VC Aug 11, 2024
cec80f2
Update bin
Ismael-VC Aug 11, 2024
ed2cfd2
fix cobments
Ismael-VC Aug 14, 2024
10aef40
change default settings.
Ismael-VC Aug 14, 2024
897117f
*
Ismael-VC Aug 17, 2024
bbf2018
fix ctrl-l
Ismael-VC Aug 18, 2024
8798d30
Merge pull request #1 from Ismael-VC/dev2
Ismael-VC Aug 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update readme.
Ismael-VC committed Aug 3, 2024
commit e5b0cc89ee3d4d7dcf78105ec79e7347c9aea325
63 changes: 28 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -75,55 +75,48 @@ A parent label starts assembly mode, this will do the following:
**Note**: `[` and `]` allow multiline input.

```
uxn> @star ( -- ) [
փ > @star ( -- )
... [ LIT2 "* -Console/write ] DEO
... JMP2r
... ]

WST 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|<
RST 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|<

uxn> star
փ > star
*
WST 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|<
RST 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|<

uxn>
փ >
```

**Doubts**:
* `star` JSI semantics (but not syntax) will need to be adapted to jump
to an absolute address in REPL mode?
* How to allow multiline input without using `[ ]`?

### `@here`
### `@heap`

The assembled code area will be concatenated as if assembling Uxntal normally.

```
| @here ( 1337 )
| @heap-ptr ( 1337 )
| a0 2a 18 17 6c ( #2a18 DEO JMP2r )
|
∨ @here ( 133c )
∨ @heap-ptr ( 133c )
```

### `@dict`
### `@pit`

The dictionary will grow in the contrary direction at a constant size for each
entry. Instead of a linked list in tipycal Threaded Interpretive Languages
(TILs), concatenating in inverse order to an array. When searching for a routine
searching from **last entry** to first as done by TILs is accomplished by
starting the search from the "physical beginning" of the array, where the
current `@dict` pointer points to.
current `@pit-ptr` points to.

```
∧ @dict ( ????-n entry bytes )
∧ @pit-ptr ( ????-n entry bytes )
|
| identifier addr
| s t a r ( pad to n max bytes ) 1337
| 73 74 61 72 00 00 00 00 00 00 00 00 13 37
| @dict ( ???? )
| ( primitives )
| @pit ( ???? )
```

## ANSI Control Codes
@@ -154,30 +147,30 @@ and not another Uxntal like language with new or different syntax though some
semantics may need to be adapted.

```
uxn> [
... @<pdec> ( dec* -- )
... DUP #64 DIV <pnum>/try
... DUP #0a DIV <pnum>/try
... ( >> )
փ > :paste
INFO: Multiline paste mode enabled.

փ > @<pdec> ( dec* -- )
... DUP #64 DIV <pnum>/try
... DUP #0a DIV <pnum>/try
... ( >> )
...
... @<pnum> ( num* -- )
... #0a MOD [ LIT "0 ] ADD .Console/write DEO
... JMP2r
... @<pnum> ( num* -- )
... #0a MOD [ LIT "0 ] ADD .Console/write DEO
... JMP2r
...
... &try ( num* -- )
... DUP ?<pnum>
... POP JMP2r
... ]
... &try ( num* -- )
... DUP ?<pnum>
... POP JMP2r
... ( Alt+Enter: Evaluate multiline input )

WST 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|<
RST 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|<
փ > :paste
INFO: Multiline paste mode disabled.

uxn> #002a <pdec>
փ > #002a pdec ( Enter: Evaluate line input )
42
WST 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|<
RST 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|<

uxn>
փ >
```

In this case calling `<pdec>` would fall through to `<pnum>` body as in normal