I want to build somethhing like a ms-dos shell.
So when my program is running, I want to be able to load another program into memory and then run that program.
I have this in mind:
- My program loads a small program into memory, lets say $9000 (tsr)
- I jump to $9000 to start executing this program.
- This program loads the program I actualy want to run into memory at $8001 ("LOAD"X.PRG")
- I jsr to $8001 to start executing.
- When this program normaly returns to basic, it returns to the program in the $9000 location, which then loads my main program in $8001 and start executing it again
- I'll manipulate a byte string in the $9000 program to hold the program it needs to load and run.
- To start de $9000-tsr programI actualy jmp to $9019 as it seems the programs first opcodes are stored there
- To start de $8001-program I jsr to $8013 as it seems that is the start of that program.
I hope the above is clear enough
I'm able to load the programs in de desired memory locations. However the jumps and jsr do work partialy. I verified the tsr-program runs correctly at that memoryt location via debug mode.
I think my knowledge about the header of prg-files is to basic.
Any thoughts?
OPEN and RUN program
Re: OPEN and RUN program
There is a solution which works without a tsr program:
https://www.commanderx16.com/forum/view ... 869#p29869
https://www.commanderx16.com/forum/view ... 869#p29869
Re: OPEN and RUN program
Nice trick.
However, I'm unable to find a way to put the CR on the keyboard buffer.
Any thoughts?
However, I'm unable to find a way to put the CR on the keyboard buffer.
Any thoughts?