EUG PD


SP64 Screen Icon Stripper

Categories: Description: Utility

 
Author: Derek Walker
Published in EUG #13

One utility that is missing from both the AMX and Slogger Stop Press packages is a means of removing the unwanted border from a saved screen so it can be used in other applications. e.g. this magazine.

The program is split into three parts:

  1. the !BOOT file,
  2. the program body "STRIPER" and
  3. a screen "OVERol" and will work in both DFS and ADFS.

They are all stored in the U(tilities) Directory.

Place these three files on a new formatted disk along with the screen files that are to stripped. The new files created will also be stored on this disk. Set the disk to auto boot by typing *OPT 4 3 (RETURN) to run the program, just press SHIFT-BREAK. Using this method ensures the FS map is read in for ADFS users without having to add extra commands to the program.

You are presented with a screen asking you to type in the filename of your Screen, then the filename for which the stripped screen is to saved under. The program will then load the Screen, strip it and save it then return you to the opening screen so you can strip another screen.

How it works

The program body is only 28 lines long. Print out the listing and look at it while I explain what each line does.

LineDescription
10States I wrote the program
20 Changes screen to MODE 0
30 Makes the Background (Paper) colour to Red
40 Loads the file 'OVERLAY' into the MODE 0 Screen memory. This is the Stop Press border.
50 Prints title message at the top of the screen
60 Prints a note regarding saving files in Stop Press
70 Question? Takes the name of the Screen file that is typed in and holds it in the variable name$
80 Question? Takes the new file name and holds it in variable name1$
90 Changes the Background back to black
100 Sets the variable X to 3000
110 Sets the variable Y to 8000, X & Y are used to define the Mode 0 screen area
120 Loads the screen File who's name is stored in the variable name$ at address stored in variable X
130 Calls the procedures 'topbot' and 'sides' to strip the icons
140 Saves the striped screen between the values in variable X & Y using the name stored in variable name1$
150 Returns you to the beginning of the program
160 END
170 The start of procedure 'topbot'
180 Prints a line of spaces on the top line (0) of the screen
190 Prints a line of spaces on the second top line (1) of the screen
200 Prints a line of spaces on the third line (2) of the screen
210 Prints a line of spaces on the bottom line of the screen
220 END the procedure and returns to line 130
230 The start of procedure 'sides'
240 Sets the Variable N to zero spaces at the end of the line defined by the variable N
260 Increments N
270 Checks to find out if it has reached the bottom of the screen. If it has it ends the procedure & if not it loops round to (line 250) print the next line of spaces

The Stripper program can easily be modified to strip the icons from AMX Art screens by altering the Mode in line 20, removing line 40 the overlay, modifying the value of X at line 100 to suit the screen mode of the drawing (eg 5600 for Mode 4) and the amount of spaces printed around the border in procedures 'topbot' and 'sides'.

Happy stripping!

Derek Walker, EUG #13

Derek Walker