This geoSHELL command can do what BASIC's PEEK and POKE commands do. You can use it to peek a value that is in a specific memory location or you can also use it to poke a value to a memory location. Let's first see how to peek a memory location:
mem 1025
This performs the same function as PRINT PEEK 1025 would from BASIC. The mem command will display the value that is currently located at 1025.
You can only view locations of memory that are currently visible to the system. In GEOS 64, this would be most of the ram areas, including all of the GEOS kernal and all of geoSHELL and it's variables. On the 128, you are only looking at about half of the ram in the machine. This is BANK 1, or in GEOS terminology, FrontRam as well as a good share of the GEOS kernal, but not all of it.
To use the mem command to poke a value into memory, use it like this:
mem 1025=9
As you can see, the syntax is quite simple. In fact, that particular memory location is where geoSHELL keeps track of the currently active drive that the user is seeing. By poking a 9 to this location we can simulate the same thing as if we entered a 'b' followed by a colon. Try putting anything from an 8 to an 11 here. The advantage to using a drive letter followed by a colon instead of just poking the value at 1025 is that geoSHELL will check to make sure that the device is really there.
However, if you use mem to put a 4 into location 1025, you can now fool geoSHELL into sending DOS wedge commands to your printer or interface with the '@' key from geoSHELL. Some interfaces will accept commands via a command channel this way.
So far, we have used decimal numbers with the mem command. You can also enter numbers using the hexidecimal format as in the next two examples:
mem $401
mem $401=$9
These two examples accomplish the same thing that the previous examples did.
With a little knowledge of the GEOS operating system and some geoSHELL locations, you might be a
With a little knowledge of the GEOS operating system and some geoSHELL locations, you might be able to do some special stuff with this command. Memory location $0491 is where geoSHELL's pconf command stores the secondary address that is sent whenever geoSHELL sends output to a serial printer. You can use the mem command to also change this. Or if you put zeros at $0750 and $88c5, geoSHELL will then think that you have just booted your system. Just type 'run geoSHELL' and when it restarts itself, any commands following 'onboot' in your startup file will be executed.
For most purposes this command won't be needed, but for some very specific reasons, it might also be one of the most useful. Just be sure that you know where you are poking to.