~crc_/retro-napia

94d5526d5edf14f70031e3dd4742d1956f35b81b — crc 22 days ago 1865643 master
add additional napia instructions to pali.c

FossilOrigin-Name: 3e676e036d00dba81a991972fcfb6385204b469b214f2c6046290cd4d09a4c3f
2 files changed, 8 insertions(+), 3 deletions(-)

M TODO.txt
M tools/pali.c
M TODO.txt => TODO.txt +1 -1
@@ 9,7 9,7 @@ RetroForth/napia :: Todo List
[-] build fully adapted image
    [x] import existing ilo image sources
    [x] import existing ilo tools
    [ ] extend pali to cover napia instruction set
    [x] extend pali to cover napia instruction set
    [x] use napia tooling to build the image
    [x] adapt memory layout to use the full memory space
    [ ] make use of napia instructions in base image

M tools/pali.c => tools/pali.c +7 -2
@@ 94,10 94,15 @@ int encode(char *s) {
                5863210, 5863821, 5863623,
                5863314, 5863220, 5863686,
                5863980, 5863812, 5863818,
                5863288, 5863297, 5863485, };
                5863288, 5863297, 5863485,
                5863473, 5863209, 5863704,
                5863803, 5863785, 5863950,
                5863626, 5863822, 5863842,
                5863809, 5863446
 };
  int op = hash(s);
  int i = 0;
  for (i = 0; i <= 30; i++) if (ops[i] == op) return i;
  for (i = 0; i <= 40; i++) if (ops[i] == op) return i;
  return 0;
}