mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-28 08:48:05 +11:00
recipes/ti84: use the BASIC shell
This commit is contained in:
parent
572e3566eb
commit
10864afa96
@ -1,5 +1,9 @@
|
||||
# shell
|
||||
|
||||
**This shell is currently being replaced with the
|
||||
[BASIC shell](../basic/README.md). While it's still used in many places, it's
|
||||
being phased out.**
|
||||
|
||||
The shell is a text interface giving you access to commands to control your
|
||||
machine. It is not built to be user friendly, but to minimize binary space and
|
||||
maximize code simplicity.
|
||||
|
@ -8,6 +8,7 @@
|
||||
## User guide
|
||||
|
||||
* [The shell](../apps/shell/README.md)
|
||||
* [The BASIC shell](../apps/basic/README.md)
|
||||
* [Load code in RAM and run it](load-run-code.md)
|
||||
* [Using block devices](blockdev.md)
|
||||
* [Using the filesystem](fs.md)
|
||||
|
@ -51,6 +51,7 @@ init:
|
||||
|
||||
call aciaInit
|
||||
ei
|
||||
call basInit
|
||||
jp basStart
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@ There is, however, a built-in USB controller that might prove very handy.
|
||||
|
||||
## Recipe
|
||||
|
||||
This recipe gets the Collapse OS shell to run on the TI-84+, using its LCD
|
||||
This recipe gets the Collapse OS BASIC shell to run on the TI-84+, using its LCD
|
||||
screen as output and its builtin keyboard as input.
|
||||
|
||||
## Gathering parts
|
||||
@ -66,9 +66,19 @@ Press "1" to continue.
|
||||
|
||||
When this is done, you can press the ON button to see Collapse OS' prompt!
|
||||
|
||||
## Validation errors
|
||||
|
||||
Sometimes, when uploading an upgrade file to your calculator, you'll get a
|
||||
validation error. You can always try again, but in my own experience, some
|
||||
specific binaries will simply always be refused by the calculator. Adding
|
||||
random `nop` or reordering lines (when it makes sense, of course) should fix
|
||||
the problem.
|
||||
|
||||
I'm not sure whether it's a bug with the calculator or with `mktiupgrade`.
|
||||
|
||||
## Usage
|
||||
|
||||
The shell works like a normal shell, but with very tight screen space.
|
||||
The shell works like a normal BASIC shell, but with very tight screen space.
|
||||
|
||||
When pressing a "normal" key, it spits the symbol associated to it depending
|
||||
on the current mode. In normal mode, it spits the digit/symbol. In Alpha mode,
|
||||
|
@ -37,19 +37,31 @@
|
||||
.equ STDIO_PUTC lcdPutC
|
||||
.inc "stdio.asm"
|
||||
|
||||
; *** Shell ***
|
||||
.inc "lib/util.asm"
|
||||
.inc "lib/parse.asm"
|
||||
.inc "lib/args.asm"
|
||||
.inc "lib/stdio.asm"
|
||||
.equ SHELL_RAMSTART STDIO_RAMEND
|
||||
.equ SHELL_EXTRA_CMD_COUNT 0
|
||||
.inc "shell/main.asm"
|
||||
; *** BASIC ***
|
||||
|
||||
; RAM space used in different routines for short term processing.
|
||||
.equ SCRATCHPAD_SIZE 0x20
|
||||
.equ SCRATCHPAD STDIO_RAMEND
|
||||
.inc "lib/util.asm"
|
||||
.inc "lib/ari.asm"
|
||||
.inc "lib/parse.asm"
|
||||
.inc "lib/fmt.asm"
|
||||
.equ EXPR_PARSE parseLiteralOrVar
|
||||
.inc "lib/expr.asm"
|
||||
.inc "basic/util.asm"
|
||||
.inc "basic/parse.asm"
|
||||
.inc "basic/tok.asm"
|
||||
.equ VAR_RAMSTART SCRATCHPAD+SCRATCHPAD_SIZE
|
||||
.inc "basic/var.asm"
|
||||
.equ BUF_RAMSTART VAR_RAMEND
|
||||
.inc "basic/buf.asm"
|
||||
.equ BAS_RAMSTART BUF_RAMEND
|
||||
.inc "basic/main.asm"
|
||||
|
||||
.out BAS_RAMEND
|
||||
boot:
|
||||
di
|
||||
ld hl, RAMEND
|
||||
ld sp, hl
|
||||
ld sp, RAMEND
|
||||
im 1
|
||||
|
||||
; enable ON key interrupt
|
||||
@ -67,12 +79,15 @@ boot:
|
||||
halt
|
||||
|
||||
main:
|
||||
; Fun fact: if I place this line just above basStart like I would
|
||||
; normally do, my TI-84+ refuses to validate the binary. But placed
|
||||
; here, validation works fine.
|
||||
call basInit
|
||||
call kbdInit
|
||||
call lcdInit
|
||||
xor a
|
||||
call lcdSetCol
|
||||
call shellInit
|
||||
jp shellLoop
|
||||
jp basStart
|
||||
|
||||
handleInterrupt:
|
||||
di
|
||||
|
Loading…
Reference in New Issue
Block a user