Browse Source

emul: use LATEST instead of binary size as start addr in stage

More reliable.
pull/102/head
Virgil Dupras 4 years ago
parent
commit
4b7247a971
2 changed files with 3 additions and 2 deletions
  1. +3
    -1
      emul/stage.c
  2. +0
    -1
      emul/stage1.fs

+ 3
- 1
emul/stage.c View File

@@ -113,7 +113,9 @@ int main(int argc, char *argv[])
#ifndef DEBUG
// We're done, now let's spit dict data
if (start_here == 0) {
start_here = sizeof(KERNEL);
// No starting offset? Let's use LATEST
start_here = m->mem[0x08];
start_here += m->mem[0x09] << 8;
}
for (int i=start_here; i<end_here; i++) {
putchar(m->mem[i]);


+ 0
- 1
emul/stage1.fs View File

@@ -1,5 +1,4 @@
CURRENT @ HERE !
HERE @ 256 /MOD 2 PC! 2 PC!
: EMIT 0 PC! ;
: KEY 0 PC@ ;
CURRENT @ 12 RAM+ !

Loading…
Cancel
Save