home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Generous Efforts of Many
/
gemcd.zip
/
GEM.CD.A.po
/
FEATURES:BEAGLE
/
UTIL.CITY.DOC
/
T.UTILITY.CITY
Wrap
Text File
|
1990-02-15
|
11KB
|
291 lines
UTILITY CITY INSTRUCTIONS
-------------------------
AN OVERVIEW
-----------
Welcome to Utility City! What you have here is a large
collection of utilities that I'm sure you will find useful.
I hop you can and will use them for their intended purposes,
AND to learn something about what makes your Apple tick.
THE CATALOG
-----------
As you will see in the catalog, many of the U-City programs
(the ones that do something TO one of YOUR programs) consist
of two or more files, usually a Text file and an Applesoft
file. See the instructions for DOUBLE LOADER for an
explanation of what's happening here. The file names that
end in ".A" are the Applesoft programs that run AFTER you
load one of your own programs and EXEC the text file
(without the ".A"). If this sounds confusing, forget it.
Just read the instructions for each program you use, and ...
DO NOT RUN THE PROGRAMS THAT END IN ".A"
----------------------------------------
You may LOAD them, LIST (most of) them, and change (most of)
them, but RUNning them with no other in memory will possibly
foul up a pointer or two and crash around inside of your
Apple (nothing serious).
TRANSFERRING PROGRAMS TO OTHER DISKS
------------------------------------
Use the FID program on your System Master to transfer
programs. Remember to transfer both the Text file AND the
Applesoft file (with the ".A") when both exist. For example,
to transfer the BFIND FID, and enter "BFIND=" as the file
name. Now, both BFIND and BFIND.A will be copied for you.
See your DOS Manual for more FID details.
"WRITE" PROGRAMS
----------------
The Applesoft files that end in ".WRITE" can be LOADed and
then RUN to write a Text file to your disk.
APPLESOFT ONLY, PLEASE
----------------------
Integer programs will not function with most of the files on
this disk (except INT CONVERT, which is an Integer program
itself).
LIMITATIONS
-----------
I have tried to think of everything each program CANNOT do,
as well as what it can do.
BUGLIST
-------
Run the Buglist program on the U-City disk to see a list of
the any changes, additions, or revelations we have
encountered since this book was printed.
Have some fun!
FILENAME ZAP
------------
WHAT IT DOES: Allows you to rename any file with an
invisible file name OR with a trick file name made of any
combination of inverse, flash & normal characters.
HOW TO USE IT: <1> SAVE your program on disk with an
ordinary file name (no control characters please). <2>
UNLOCK the file (or leave it unlocked). <3> RUN FILENAME
ZAP. <4> Select from the options shown, and follow the
instructions on the screen.
LIMITATIONS: <1> You can't have inverse or flashing
characters in a file name that backspaces over itself
(erases characters). <2> The only way you can load or run a
file name with inverse or flash characters is from the
immediate mode--Catalog and type LOAD or RUN, then trace
over the file name in the catalog. <3> The only way you can
load or run an invisible file name is under program control.
Your invisible file name's visible name (with CHR$(8)'s)
will be displayed on the screen after the conversion is
made. WRITE THIS NAME DOWN or remember it, or you might have
end up with an inaccessible file. You can temporarily expose
the ctrl-H's (backspaces) by running the CTRL-FIND program
on the U-City disk.
SUGGESTED USES: <1> Use inverse or flashing file names as
decorative touches or accents to your catalogs. Don't overdo
the flashing, o.k.? <2> Use invisible file names to disguise
what's really on your disk. Some file, like binary files,
need not be seen by the user, so why show them in the
catalog?
HOW IT WORKS? <1> Inverse and flashing file name characters
are recognized by DOS when you trace over them with the
cursor. The program simply puts the names you want on the
screen so you can trace over them to rename a file. <2> File
names are made to erase themselves and/or file codes by
inserting backspaces (ctrl-H's or CHR&(8)'s) into the name.
Since DOS adds spaces after every file name to make it 30
characters long, these spaces follow your backspaces and
ERASE whatever was on the screen. If you've got good
opticals and watch carefully, you can see it happen!
COMMAND ZAP
-----------
WHAT IT DOES: Allows you to put invisible commands or rem
statements in your programs.
HOW TO USE IT: The best way is to type NEW, and try this
test-- Type in a Line 100:
100 PRINT "GOTCHA!": REM^
Type the "^" immediately following the word REM, as shown
above. When you LIST 100, a space will be added before the
^. This is important. When you LIST, you have--
100 PRINT "GOTCHA!": REM^^^^^^^
^^^^^^^^^^^^^^IF X = 256 THE N GOSUB 12345
Now EXEC COMMAND ZAP. When asked "Which Line?", enter 100.
When asked "Another Line?", answer N. Now LIST 100, and you
should see--
100 IF X = 256 THEN GOSUB 12345
RUN the program, and it will print-- GOTCHA!
Your command executes, even though it has been hidden in the
listing by fake command. The fake command you see in the
listing could be a rem statement or any thing long enough to
hide your command (the fake statement can't function since
it follows a rem). Make the fake command spaced the same way
Applesoft would do it (notice the two spaces between "THEN"
and "GOSUB") so everything looks authentic. Now type--
SPEED=99: LIST
The listing is slowed down so you can see your trickery in
action! "SPEED=225" sets the speed to normal after the
LIST. You can hide the LINE NUMBER too if you want. Just add
five more ^'s to make 26. Maybe try typing--
100 PRINT "GOTCHA!": REM ^^^^^^^^^^^^^^^^^^^^^^^^^^
THIS IS A NICE TITLE, ISN'T IT?
EXEC COMMAND ZAP again. Then LIST. The command as well as
the line number is now hidden! Longer line numbers will
require more ^'s, so count carefully.
SUGGESTED USES: <1> Hide your name in your programs to
identify illegal copies. <2> Hide commands that will bomb a
program if any tampering is done. <3> Make rem statements
that are more predominant and easier to read because they
are flush left hiding the line number and the word "rem".
LIMITATIONS: You cannot hide a command longer than two or
three words (it must be shorter than one line). CALLs,
GOSUBs and GOTOs work just fine.
HOW IT WORKS: The program looks for ^s (token #94) in the
selected line number, and pokes backspaces (ctrl-H's or
token #8) in their place. Applesoft's LIST feature takes the
backspaces literally and backs up. Your rem statement then
overprints the real statement.
LINE SEARCH
-----------
WHAT IT DOES: Allows you to locate Applesoft program lines
in memory.
HOW TO USE IT: <1> LOAD your program and write down the line
numbers you wish to find. <2> EXEC LINE SEARCH. <3> Follow
the instructions on the screen.
SUGGESTED USE: Repair garbaged program lines, or make
"illegal" changes to Applesoft programs (see "Token Tricks"
in this book).
LIMITATIONS: Line Search will not work on Integer BASIC
programs, since the language structure is entirely different
from Applesoft.
HOW IT WORKS: Let's take a look at a very small program.
Type this in and follow along-
1 REM COUNT
2 FOR I = 1 TO 10
100 PRINT I: NEXT I
1000 PRINT "END": END
Line Search first finds the start of your programs by
PEEKing at locations 103 & 104. Try it yourself--
PRINT PEEK(103) + PEEK(104) *256
This will usually give you a 2049 or hex $801. Now find the
END OF PROGRAM with--
PRINT PEEK(175) + PEEK(176) *256
The longer your program, the higher this number will be. In
this case, we get 2097 or hex $831. Now, let's look at the
entire program in the monitor, by listing just before and
just after the start and end points--
CALL -151
*800.832
You will now see something like--
800- 00 0C 08 01 00 B2 43 4F
808- 55 4E 54 00 18 08 02 00
810- 81 49 D0 31 C1 31 30 00
820- 00 2E 08 E8 03 BA 22 45
828- 4E 44 22 3A 80 00 00 00
830- 0A 4E 44
Each two digit hex number above represents part of your
program; a line number, character or command toke. Let's
take a look at each one--
Location Value
800 00 There is always a zero before the
start of a program.
801-802 0C 08 These two numbers tell us that the
NEXT program line starts at location
$080C (Apple's two byte hex numbers
are always backwards in this strange
form).
803-804 01 00 This is the first Line Number, 1
(00001).
805 B2 This is the symbol or TOKEN for the
word "REM". Each word Applesoft knows
has a token number.
806-80A 43 4F 55 These five numbers ar the ASCII values
4E 54 for the characters C-O-U-N-T.
80B 00 A zero token means end of line, so Line
1 is finished.
80C-80D 18 08 This is the start of the next program
line, the location that was referred
to up in 801. The values 18 & 08 tell
us that the NEXT program line starts at
$818.
80E-80F 02 00 Line number 2 ($0002).
810 81 Token for FOR.
811 49 Character "I".
812 D0 Token for "=".
813 31 Character for "1".
814 C1 Token for TO.
815-816 31 30 Characters "1" & "0". Applesoft handles
numbers in a program as words, spelling
them out digit by digit.
817 00 End of line.
818-819 21 08 Next line starts at $821.
81A-81B 64 00 Line number 100 ($0064).
81C BA Token for PRINT.
81D 49 Character "I".
81E 30 Character ":".
81F 82 Token for NEXT.
820 00 End of line.
821-822 2E 08 Next line starts at $82E.
823-824 EB 03 Line number for 1000 ($3E8).
825 BA Token for PRINT.
826 22 Quote mark.
827-829 45 4E 44 Characters "E", "N", & "D".
82A 22 Quote mark.
82B 3A Character ":".
82C 80 Token for END.
82D 00 End of line.
82E-82F 00 00 Two zeros as at this point mean
end of program.
830-832 ?? ?? ?? Could be part of an old program.
TAKING OUT THE GARBAGE
----------------------
Occasionally, a program will be zapped by mysterious forces
and become inoperable. In the listing, you will find illegal
line numbers or nonsense statements, like "COLOR= GOSUB
HPLOT". What has probably happened is that ONE BYTE has been
changed in a line number or LINE LOCATION NUMBER. If the
latter is true, your program will jump to where it's told
which is now some random place in memory. The numbers it
finds there are interpreted as tokens, and thus the garbage.
Use line and/or the last good line in the program.