1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-17 06:08:05 +11:00

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

More reliable.
This commit is contained in:
Virgil Dupras 2020-04-26 08:37:12 -04:00
parent 898684a795
commit 4b7247a971
2 changed files with 3 additions and 2 deletions

View File

@ -113,7 +113,9 @@ int main(int argc, char *argv[])
#ifndef DEBUG #ifndef DEBUG
// We're done, now let's spit dict data // We're done, now let's spit dict data
if (start_here == 0) { 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++) { for (int i=start_here; i<end_here; i++) {
putchar(m->mem[i]); putchar(m->mem[i]);

View File

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