To use Slammer, all you need are ten special REM statements in lines 0-9 (which, if you use an emulator, you can copy and paste from here). These statements look like an ASCII scramble when listed, but they are all legal, typeable characters. You can also use EXEC SLAMMER.EXEC on the Slammer disk, which will add the lines to a program in memory, if any.
Then, anywhere in your program and as often as you wish, CALL 2107 followed by monitor prompt commands in REM statements. Lines are executed until a blank REM, non-REM, or end of program is reached. Lines that begin with colon use the address after the last byte entered. Comments can follow a semicolon. An example, which turns the hi-res screen blue:
500 CALL 2107 : REM Slammer
501 REM 2000:D5 AA ;seven blue pixels
502 REM 2002<2000.3FFDM ;repeat pixels
503 REM C057:0 N C053:0 N C050:0 ;show
To store a relocatable routine dynamically between program end and variable storage space, use **** to start a line instead of an address (this will destroy any variables), and start subsequent lines with a colon. CALL 250 will execute the routine. (NuInput uses this feature; see example).
If you like what Slammer does, but wish to use less memory or don't like the special lines 0-9, and you don't need a self-contained Applesoft program, you can instead BLOAD LAMMER from the Slammer disk, and CALL 768 (instead of 2107), or specify an address in the BLOAD and CALL that.
Or, if you want to embed a single routine in lines 0-9 without the need for additional monitor command lines, you can run SLAMMER.UTIL from the Slammer disk, and it will create an embedded Slammer for you. CALL 2107 will execute your routine.
Other things to know when using Slammer:
- CALL 2107 must be at the start of a line, and anything which follows a colon on the same line will be executed after the REM statements below it have been processed.
- Lines 0 through 9 must be left unmodified (unless you use BLOAD LAMMER).
- Don't enter bytes into $200-$2FF, as Slammer uses this area to process the monitor commands.
- Don't use control-Y within your monitor command lines, as Slammer uses it internally to terminate the line.
- If Slammer tries to process a monitor prompt command which can't be understood, your program will stop executing and enter the monitor immediately.
- Slammer (and Lammer) make use of several zero page memory locations which are typically unused but which may conflict with other utilities or programs.
- The special lines 0-9 occupy about 2K of memory.
- If you wish to install multiple relocatable routines with Slammer: between each, POKE the current values of PEEK(64) and PEEK(65) elsewhere into memory, in order to save the starting address of the routine which will immediately follow. Start each additional routine with a colon only. After the last routine is entered, you can assign variables to the addresses of each additional routine (e.g. V=PEEK(766)+PEEK(767)*256) ), and CALL the variable names. CALL 250 will still execute the first routine.
back to Slammer!