Can anyone think of the easiest way to load a basic file into my Javascript emulator, given my emulator has no drives attached.
I'm thinking I could just load the file into ram at the correct basic location, and send a SYS command via keyboard events to emulator.
Is there's SYS location that would recognise the basic file and intialise it correctly?
Or, maybe, do I just have to load the file to the correct place in ram, and adjust some basic memory so that it is recognised?
I don't want to travel down the snapshot road.
Help with autostarting prg basic file with my JS emulator
Moderator: Moderators
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm
- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Provided the program is copied into memory, and the pointers 43 .. 46 are set correctly, you can run it by executing this small ML program with a SYS from the READY prompt:
This code can conveniently be put at address 320.
If the program is exactly placed in the position it was saved from, the relink step isn't necessary, and it suffices to place "RUN"+RETURN into the keyboard buffer. The pointers 43 .. 46 still must be correct.
Greetings,
Michael
Code: Select all
JSR $C533 ; relink line pointers
JSR $C659 ; CLR, reset TXTPTR
JMP $C7AE ; execute next statement ("RUN")
If the program is exactly placed in the position it was saved from, the relink step isn't necessary, and it suffices to place "RUN"+RETURN into the keyboard buffer. The pointers 43 .. 46 still must be correct.
Greetings,
Michael
-
- Omega Star Commander
- Posts: 1375
- Joined: Thu Jan 31, 2008 2:12 pm
- Website: https://robert.hurst-ri.us
- Location: Providence, RI
- Occupation: Tech & Innovation
Thanks Mike, that's great info ... and that should be simpler to implement Matthew. Let us know if you have any issues with it, good luck!
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
https://robert.hurst-ri.us/rob/retrocomputing
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm
Oops, 45 and 46 need to be set to the end of where the basic program loaded... some programs weren't working for some reason and I just figured out why. Just wasn't paying enough attention.Mike wrote:Provided the program is copied into memory, and the pointers 43 .. 46 are set correctly, you can run it by executing...