PicoSim draft 40 - trying the simulated Pico from the command box
==================================================================

These commands only work at the command prompt, so type them in the command box
under the Pico picture. Open View > Pico Device first to watch what happens.

1. Program memory and drive A:
     NEW                       the code window empties (it asks to save changes first)
     AUTOSAVE                  a window opens: paste a program, press F1 (F2 = save and run)
     LIST                      the program is listed in the console
     SAVE "hello"              written to drive A: as hello.bas
     NEW
     LOAD "hello"              back in the code window (LOAD "hello", R runs it too)
     RUN "hello", "abc"        loads and runs it; MM.CMDLINE$ is "abc"
     EDIT "notes.txt"          opens (or starts) a file from drive A: in the code window
     EDIT                      puts the cursor in the code window

2. Flash slots (kept in the PicoSim\Flash folder, so they survive a restart)
     FLASH SAVE 1              FLASH OVERWRITE 1 replaces a slot that is in use
     FLASH LIST                FLASH LIST 1 lists the program in slot 1
     FLASH LOAD 1              FLASH RUN 1 / FLASH CHAIN 1 from a program
     FLASH ERASE 1             FLASH ERASE ALL
     OPTION AUTORUN 1          then press Reset in the Pico Device window: slot 1 runs
     OPTION AUTORUN OFF

3. Library (uses flash slot 3)
     LIBRARY SAVE              the program's SUBs and FUNCTIONs move into the library
     LIBRARY LIST              every program can now call them
     LIBRARY DELETE

4. Transfers between the PC and the Pico (a file dialog stands in for Tera Term)
     XMODEM RECEIVE            a PC file becomes the program in memory
     XMODEM RECEIVE "a.bas"    a PC file is copied to drive A: as a.bas
     XMODEM SEND "a.bas"       drive A:'s a.bas is copied to the PC
     ZMODEM RECEIVE "*"        several PC files at once (the Pico Device "From PC..." button)
     YMODEM SEND               the program in memory; the PC gets FILE1.DAT unless it came from drive A:

5. Firmware
     UPDATE FIRMWARE           BOOTSEL mode: MMBasic stops; in the Pico Device window use
                               Copy UF2 File (any real .uf2 file) or Reset
     CPU RESTART               the same as the Reset button

Then run tests\device_test.bas for SAVE, LIST, FLASH, LIBRARY DISK LOAD and CHAIN
inside a program.
