mirror of
https://git.sr.ht/~crc_/retroforth
synced 2024-11-16 19:48:56 +01:00
ri: now embeds the image
FossilOrigin-Name: c8abac0f0e055525797cb12f0870aa99e06f088c523b6ebb7eef4b0947bb4018
This commit is contained in:
parent
ca6ff280d1
commit
59d820d6e9
4 changed files with 23 additions and 1 deletions
|
@ -24,6 +24,7 @@ Interfaces:
|
|||
- Build script no longer links this against libm
|
||||
|
||||
- pascal/listener is a Free Pascal implementation by Rob Judd
|
||||
- ri is a new (n)curses based interface
|
||||
|
||||
Other:
|
||||
|
||||
|
|
6
build.sh
6
build.sh
|
@ -27,6 +27,12 @@ cd ..
|
|||
./bin/muri literate/Rx.md
|
||||
./bin/extend literate/RetroForth.md
|
||||
|
||||
cp ngaImage interfaces/ri
|
||||
cd interfaces/ri
|
||||
../../bin/embedimage >image.c
|
||||
rm ngaImage
|
||||
cd ../..
|
||||
|
||||
cp ngaImage interfaces
|
||||
cd interfaces
|
||||
../bin/extend rre_windows.forth
|
||||
|
|
3
interfaces/ri/image.c
Normal file
3
interfaces/ri/image.c
Normal file
File diff suppressed because one or more lines are too long
|
@ -78,6 +78,14 @@ CELL memory[IMAGE_SIZE + 1]; /* The memory for the image */
|
|||
#define TORS address[rp] /* Shortcut for top item on address stack */
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------
|
||||
`ri` embeds the image into the binary. This includes the image data
|
||||
(converted to a .c file by an external tool).
|
||||
---------------------------------------------------------------------*/
|
||||
|
||||
#include "image.c"
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------
|
||||
Moving forward, a few variables. These are updated to point to the
|
||||
latest values in the image.
|
||||
|
@ -420,7 +428,11 @@ int main() {
|
|||
int n = 0; /* Index to input buffer */
|
||||
|
||||
ngaPrepare();
|
||||
ngaLoadImage("ngaImage");
|
||||
|
||||
for (n = 0; n < ngaImageCells; n++) /* Copy the embedded image to */
|
||||
memory[n] = ngaImage[n]; /* the Nga VM memory */
|
||||
n = 0;
|
||||
|
||||
update_rx();
|
||||
|
||||
setup_interface();
|
||||
|
|
Loading…
Reference in a new issue