Sitan wrote: ↑Wed May 24, 2023 7:54 pm
Would be cool to have implemented some kind of linux features like history commands and !10 to reuse command number 10 in the history
another feature that would have been cool is some kind of debug cartridge emulation like the final cartridge, or like action replay from the Amiga 500 times.
The BASIC environment that the X16 starts up in has a built-in history feature. After executing a command in immediate mode, you can use the cursor-up key to go back to that line and execute it again.
Here's a quick demonstration:
After the emulator starts up, the real time clock has no value, and will not update. The time is stored in a special BASIC variable called TI$ (short for TIME$, because X16 BASIC only supports two-letter variable names). To assign a value to it, then, enter the following line of code, and press Enter afterward:
TI$="000000"
That sets the time to 00:00:00 (it just doesn't bother with the colons). Now that it has been assigned a value, the real time clock will start updating, so you can ask the X16 what time it is by telling it to print the value of TI$ (again, remember to press Enter after typing in this line of BASIC code):
PRINT TI$
Here's where we see the 'history' function in action. After the X16 prints out the current value of TI$, well, it just sits there, doesn't it. Because it just prints the value as it was when we asked for it. But we
can update it. Use the cursor-up key to bring the cursor up to the line that says PRINT TI$ and press Enter again.
Et voilà! The number changed. And you can just keep doing that, over and over again, putting the cursor back to that line and pressing Enter, and it'll update with the current value of TI$.
And if you want to reset the value of TI$ to all zeroes again, then go cursor-up to
that line, where it says TI$="000000", and press Enter twice (once to reset TI$ to 000000, and then the cursor winds up on the PRINT TI$ line again, so pressing Enter again is just like when we used the cursor to get back to it).