AOH :: HACKER.TXT
PC Hacker Hints (Very dated - 1983)
|
.FO HACKER HINTS (August, 1983 Through October, 1983)
Hacker Hints is a regular column of the APCU newsletter. Each of the
items in this column worked for the original contributor. Each item
should be evaluated for use in YOUR environment, as the editor(s) cannot
retest each submission. (Although we do use the really good ones
ourselves). If you have tips or tricks to contribute, please send them to
the newsletter editor, indicating the configuration(s) which are
applicable to the item. Please also indicate if you want "byline" credit
for the item(s) you submit.
Freeware Assembler
A "Freeware" concept assembler is available. Send a self-addressed return
mailer and diskette, (be sure you put stamps on the mailer) to:
David Whitman
Dept. of Chemistry
Dartmouth University
Hanover NH 03755.
Replacement Basic Manuals
For a limited time, and in limited quantity, IBM will supply the dealer
network with Basic 1.1 manuals to replace 1.0 version manuals for owners
of DOS 2.0. To take advantage of this offer, you must provide your dealer
with a copy of the DOS 2.0 purchase receipt, and the brown front cover of
the Basic 1.0 manual. Note that YOUR DEALER must send in for the new
manual. There is no charge for this service.
XT Power Supply
Greencastle (317) 658-2022 will ship you the XT power supply, which fits
in the old PC-1, for $290 plus shipping. You must ask for part Number
8529247, as the people answering the phone don't know what an "XT power
supply" is, they are just parts supply folks. This number has worked, so
if you try #1501439, which is on some XT supplies, you're on your own.
RAMdrive Bug
The DOS 2.0 sample RAMDRIVE has a bug in it. When COPY has enough memory
to do max length copies, and you're copying files greater than 64K in
length, COPY will attempt to move 64K at a time. when using the example
RAMDRIVE, the last byte of the 65536 block doesn't get moved. Anybody out
there with a fix, let us here from you!
Silent DISKCOPY
If you are using a RAMDRIVE, you may want to copy an entire disk onto the
electronic disk at startup. the patch below will remove the operator
prompting and waits from DISKCOPY.
*** NOTE THAT THIS IS FOR DOS 2.0 VERSION ***
A>copy diskcopy.com dc.com
A>debug dc.com
-f 5D1 l 3 90
-e 649
????:0649 01.6E 0C.00 CD.90 21.90
-W
Writing 098C Bytes
-Q
A> .....Good Luck !!!
.pa
Format Volume Labeling
IBM has a compatibility fetish. In the DOS 2.0 version of FORMAT,
everything works just like it did in the previous release, even those
things that most people want to work differently. Do YOU remember to
specify "/V" all the time so you'll be prompted for a volume label? I
got tired of that real fast. Here's a modification to FORMAT to default
to prompting for volume label.
A>copy format.com oldfmt.com
a>debug format.com
-d7c7 l 2
????:07c7 74F0
-e7c7,75F0
-w
Writing xxxx Bytes
-q
A> .. FORMAT will now always prompt for volume label
You should, by the way, get in the habit of Labeling your diskettes, as
it will simplify cataloging them. There are now two disk catalog systems
that support the Microsoft volume label format, "Diskette Catalog" (DC),
from Creative Programs, and XDIR, a public domain cataloger found on the
Compuserv network.
QUADBOARD Mod for Expansion Interface
The older Quadram QUADBOARD will not work with the IBM expansion
interface installed. The Clock port conflicts with the bus extender
address. The old address is 210, and must be changed to 310 by doing the
following:
1) locate U51 on SOLDER SIDE and cut trace on pin # 1.
2) Add a wire from U51 pin 1 to U59 pin # 2.
3) Secure the wire to the board with glue.
This is Quadram Engineering change # 102, and is necessary ONLY IF YOU
HAVE AN EXPANSION CHASSIS. it is not needed for the XT. You will also
need new software to support the clock. You should contact your dealer to
determine the cost of having Quadram perform this modification. Only
experienced electronics technicians should attempt this modification.
.pa
Personal Editor Logo Removal
Tired of seeing the Logo every time you invoke the Personal Editor? The
DEBUG script below will eliminate the display and delay ...
A>rename pe.exe xpe.dta
a>debug xpe.dta
-Ud95
????:0D95 FF3604F4 PUSH [F404]
????:0D99 FF3606F4 PUSH [F406]
.
.
(more instructions print)
-ed95
????:0D95 FF.EB 36.61 04.90
????:0D98 F4.90
-ud95,d9a
????:0D95 3B61 JMPS 0DF8
????:0D97 90 NOP
????:0D98 90 NOP
????0D99 FF3606F4 PUSH [F406]
-w
Writing B280 Bytes
-q
A>rename xpe.dta xpe.exe
The command XPE now invokes the Personal editor without the display and
delay of the Logo screen.
Hard Disk Patch for 1,2,3
The patch below is for Release 1A of 123.EXE that effectively unprotected
the copy-protected disk and allowed hard-disk to run without the floppy.
To unprotect 123.EXE Version 1A,
1. Rename 123.EXE 123.XYZ
2. DEBUG 123.XYZ
3. type U ABA9
4. you should see INT 13 at that address
5. type E ABA9 90 90
6. type W
7. type Q
8. Rename 123.XYZ 123.EXE
That's it. Good Luck.
.pa
Almost a working "SHELL" Command"
There is an undocumented BASIC function called "shell" in Basic 2.0 which
allows the execution (sometimes) of a DOS command, and return to the
BASIC interpreter environment. It is undocumented because the apparent
failure rate for its use is 80%. The code sequence below allows use of
the SHELL function for TRIVIAL and INTERNAL (to command.com) DOS commands
with relatively low risk. Almost any .EXE file invoked through SHELL will
blow you away:
mmmmm A$ = 'CD \DBASE'
..
..
nnn10 DEF SEG
nnn20 A=PEEK (&H30)
nnn30 B=PEEK (&H31)
nnn50 SHELL A$
nnn60 POKE &H30, A
nnn70 POKE &H31, B
...... AND HOPEFULLY CONTINUE ON ........
This code sequence doesn't work ALL the time, but it's enough to allow
invocation of trivial commands with a fairly high success rate.
.pa
1-2-3 WITH JRAM AND THE IBM-XT
The following procedure allows Lotus 1-2-3 v1.0 to be used with the 512k
JRAM memory board in the IBM-PCXT. Maximum system memory with this
configuration appears to be 589,824 bytes.
Step Keystrokes or other action Explanation
---- ----------------------------------- -----------------------
1. Cold boot with JDOS 1.78 *S Initializes JRAM memory
2. Remove JDOS 1.78 disk *S
3. Inert IBM DOS 2.0 system disk
into drive A.
4. {Ctrl-Alt-Del
*S Warm boot to DOS 2.0
5. Enter date and time *S
6. From A>c:{rtn
Change default to hard
disk (drive C).
7. From C>md\lotus{rtn
Set up Lotus directory
8. From C>cd\lotus{rtn
*S Access Lotus directory
9. Remove disk and insert 1-2-3
system disk into drive A.
10. From C>copy a:*.* c:{rtn
Copies1-2-3 to Lotus
directory on drive C.
11. Remove 1-2-3 System Disk
12. Insert IBM DOS 1.1
system disk into drive A. *S
13. From C>copy a:command.com c:{rtn
Copies DOS 1.1 to Lotus
directory in drive C.
14. From C>command{rtn
{rtn
{rtn
*S Run DOS 1.1 & accept
previous date & time.
15. Remove disk and insert 1-2-3
system disk into drive A. *S
16. From C>123{rtn
{rtn
*S You are now in 1-2-3.
Notes
---------
A. The Lotus Access System is bypassed using this method.
B. Steps 1,2,4,5,8,12,14,15, & 16 must be repeated each time you
wish to run 1-2-3. (marked *S above)
C. Maximum 1-2-3 worksheet will have 476,588 bytes available.
D. Files can be retrieved or saved on either the floppy or hard
drive by resetting the default drive setting in 1-2-3.
For example to use the hard drive and save worksheets on the
\Lotus directory:
in 1-2-3 at READY enter /WGDDCUQ
E. Steps 11,4,5 must be repeated in that order to leave 1-2-3 or
get back to DOS 2.0 since Quit from 1-2-3 will leave you
with a mixed operating system. However, if you accidentally
Quit you can get back to 1-2-3 by repeating steps 11,12,14,
15 & 16 from the C> prompt.
.pa
Color and the Personal Editor
This document up is aimed at those people or persons who have the color
card and a color monitor and the IBM Personal Editor. I'll show you how to
change some values in the .EXE file to give you colors while in the Personal
Editor that you probably weren't of.
This mod must be done (even if you do own DOS 2.00) from or with DOS
1.10. The reason for this is that the first step in the mod process is to
rename PE.EXE to PE.COM. The main reason for renaming the file extension
from .EXE to .COM is that the DEBUG program will not allow you to write the
changed file back to disk if the file name had or has the extension of .EXE.
There would be no reason NOT to use DOS 2.00 in this mod except that
I've noticed that if you rename a .EXE file to fname.COM and load it into
the DEBUGger then the DEBUG program recognizes that the file used to be of
extension .EXE because, (in my best guess), of the header in all .EXE files.
There is a byte in the .EXE header that tells the command. processor whether
or not it is a valid .EXE file. I'm sure that the DOS 2.00 version of DEBUG
checks that or the command processor checks it and tells DEBUG that even
though the file had the extension of .COM that it's really a .EXE file. The
end result is that DEBUG won't let you write the file back off to the disk
after you load it.
DOS 1.10 version of the DEBUG program isn't that smart. You can change
the extension from .EXE to.COM and the DEBUG program will go ahead and load
it at location 'X':0100. That's why the file is renamed and DOS 1.10 is
used.
------------------------------------------------------------------------------
What to do, how to do it and why it's done.
First, copy PE.EXE and PE.PRO and DEBUG.COM over to a WORK-DISK. Assume
that the work disk is in drive A>.
From Drive A>.
A>RENAME PE.EXE PE.COM <CR>
A>DEBUG <CR>
-N PE.COM <CR>
-L <CR>
-D A260 L10 <CR>
this is the output you should see;
'X':A260 07 0 17 71 71 07 04 00-BA 03 00 B0 50 00 28 00 [whatever]
Doing this modification does not affect the performance of your per-
sonal editor in regards to functions that it performs. It only causes the
color(s) of text either entered by you or text output by the Personal Editor
to show up in colors of your choosing.
.pa
location: Value: Function:
--------- ------ ---------
you load into the editor or
something that you type in yourself.
A261 70 Color the text becomes when you mark it for either
moving or copying or what-have-you.
A262 17 Color used when you press the ESCAPE KEY to leave
entering text in the editor to the COMMAND LINE. The
character where the cursor was is left 'MARKED' on
the edit screen. This is the color value for that
'marker'. Specifically, this is the color value used
when leaving the edit screen if the cursor is on an
unmarked (for block copy or move etc..) area of text.
A263 71 Color used when you press the ESCAPE KEY to leave
entering text in the editor to the COMMAND LINE. The
character where the cursor was is left 'MARKED' on
the edit screen. Unlike above (A262) this color value
is used if the cursor was resting on a marked area of
text (for block copy or move etc..).
A264 71 Color of text on the COMMAND LINE as you type it on
the command line. The '7' in the '71' is the color
used for the COMMAND LINE. On every monitor I've
seen, this color is low intensity white or gray.
A265 07 Color of text beneath the COMMAND LINE. This color is
used for the text 'Replace' and 'Insert' and the
numbers that tell you what row and what column your
currently type at.
A266 04 Color used for the error messages.
.pa
-----------------------------------------------------------------------------
******************** EXACT DEBUG PROCEDURE ********************
------------------------------------------------------------------------------
COPY B:DEBUG.COM <cr>
1 File(s) copied
A>COPY B:PE.* <cr>
PE EXE
PE PRO
2 File(s) copied
A>RENAME PE.EXE PE.COM <cr>
A>DEBUG <cr>
-F100 FFFF 00 <cr>
-N PE.COM <cr>
-L <cr>
-DA260 L10 <cr>
0C39:A260 07 70 17 71 71 07 04 00-BA 03 00 B0 50 00 28 00 .p.qq...:..0P.(.
-EA260 <cr>
0C39:A260 07.0F 70. 17.7C 71.1E 71.1E 07.0A 04.0C <cr>
-W <cr>
Writing B280 bytes
-Q <cr>
A>RENAME PE.COM PE.EXE <cr>
A>PE fname.exe <cr>and check it out!!!
.pa
Things to keep in mind if you want to change the color values to get different
colors for the areas they affect.
First, you must understand what the format is for the color values that we've
just looked at. The values were of course in hex and of course we're two(2)
digit values, two numbers or letters, (in our case numbers).
Lets look at two locations, A260 and A261 to understand the color value
format.
Location A260. The value there is 07. On the AMDEK COLOR II and NEC JC1202 RGB
monitors (and more than likely the new IBM Color Monitor), 07 is the attribute
for Low Intensity White, or gray if you like. Lets take it apart.
The zero(0) of the '07' is the color used for the Background color.
The seven(7) of the '07' is the color used for the Foreground color.
You should understand that any number, 0 through 7 in the Background part of
the value does not cause the Foreground characters to blink. Number eight(8),
number nine(9) and characters 'A through F' in the Background part of the
value will cause the Foreground characters to BLINK. So, unless you like blink-
ing Foreground characters on your screen, don't use number eight(8) or number
nine(9) or characters 'A through F' in the Background part of the attribute
value.
Also, you should be aware that numbers zero(0) through seven(7) in the For-
ground part of the value (on every monitor I've ever seen color on), cause the
color of the text displayed on the screen to be of low intensity. I'm sure
that the hardware on these monitors are 'seeing' that if the 'I' bit is OFF
(numbers zero(0) through seven(7)) that there is no added intensity. That
seems to make sense and in fact that is how it appears on the AMDEK COLOR II
and the modified NEC JC1202 RGB's.
Numbers eight(8) and nine(9) and characters 'A through F' in the Foreground
part of the attribute value cause the Foreground characters to be of a brighter
intensity.
If your undecided about what colors you would like for what, then take my
suggestion and enter the values into the locations outlined below.
example to try----after all, you can always change them if you don't like it.
From DEBUG
If you aren't familiar with DEBGS' E)nter command then please read that sec-
tion in the DOS manual before attempting to ENTER the values for this example
below.
-E A260 <cr>
L = Low Intensity
H = High Intensity
Preceding character is first letter of color name except for 'Z' which is
Black.
Color Color
location: Old Value: Forgnd Bakgnd location: New Value: Forgnd Bakgnd
--------- ---------- ----------------- --------- ---------- -----------------
A260 07 W L Z L A260 0F W H Z L
A261 70 Z L W L A261 1B C H B L
A262 17 W L B L A262 7C R H W L
A263 71 B L W L A263 1E Y H B L
A264 71 B L W L A264 1E Y H B L
A265 07 W L Z L A265 0A G H Z L
A266 04 R L Z L A266 0C R H Z L
------------------------------------------------------------------------------
TABLE OF COLOR VALUES TO CHOOSE FROM
LOW INTENSITY NONBLINKING Foreground | HIGH INTENSITY NONBLINKING Foreground
COLORS WITH BLACK BACKGROUNDS | COLORS WITH BLAC BACKGROUNDS
------------------------------------------------------------------------------
BLACK 00 |BLACK 08
BLUE 01 |BLUE 09
GREEN 02 |GREEN 0A
CYAN 03 |CYAN 0B
RED 04 |RED 0C
MAGENTA 05 |MAGENTA 0D
YELLOW 06 looks brown |YELLOW 0E
WHITE 07 looks gray |WHITE 0F
LOW INTENSITY BLINKING Foreground | HIGH INTENSITY BLINKING Foreground
COLORS WITH BLACK BACKGROUNDS | COLORS WITH BLACK BACKGROUNDS
------------------------------------------------------------------------------
BLACK 80 |BLACK 88
BLUE 81 |BLUE 89
GREEN 82 |GREEN 8A
CYAN 83 |CYAN 8B
RED 84 |RED 8C
MAGENTA 85 |MAGENTA 8D
YELLOW 86 |YELLOW 8E
WHITE 87 |WHITE 8F
BACKGROUND COLORS WITH A BLACK Foreground COLOR [all are Low Intensity]
------------------------------------------------------------------------------
BLACK 00 Note: You can substitute any of the
BLUE 10 columns that either have an '8' or a
GREEN 20 '0' in it with any o the numbers
CYAN 30 listed to the left for a background
RED 40 color to go with the Foreground color
MAGENTA 50 you choose. Remember any number in the
YELLOW 60 left column with a value of at least
WHITE 70 '8' but not greater than 'F' hex will
cause the Foreground character to
.pa
Patches for the IBM Basic Compiler
Here are a few of the patches from IBM related to the
IBM PC BASIC Compiler
-----CHAIN with COMMON-----
The use of CHAIN with COMMON when CHAINing frm a large program
with a large data area to a small program with a large data
area may produce an incorrect "Out of memory" error.
Here is the patch procedure:
A>rename basrun.exe basrun.tmp
A>b:debug basrun.tmp
-e1951
xxxx:1951 3B.72 C1.09 77.3b 03.c1 E9.77 CA.05 FB.e9
xxxx:1958 A3.ca 7A.fb 07.00 0B.00 FF.a3 74.7a 38.07
-w
Writing 7C00 bytes
-q
A>rename basrun.tmp basrun.exe
-----MOD-----
MOD (and others??) does not return the correct value under the
following conditions:
1) Using a binary non-commutative operator such as MOD, IMP,
of \ (integer division with the backslash)
2) The left operand is simpler than te right operand
3) The result is required in the BX register
The following example shows the problem:
10 A=3 : B=4 : C=10
20 PRINT "10 MOD (3 + 4) = "; C MOD (A + B)
In the upatched compiler, it will return 7 (the right operand,
A + B). The correct value is 3.
The patch procedure:
A>b:debug bascom.com
-e7450
xxxx:7450 F6.86 87.47 02.02 00.24 08.08
-w
Writing A280 bytes
-q
A>
-----ARRAYS and OPTIMIZING-----
When using arrays and making calculations such as:
T(J,L)$= G(J)*E(L)+T(J+1,I)
the compiler may give an Internal Error or the calculation
may be performed incorrectly. I think the error is in the
optimization process. I wanted to compare the generated code
before and after the patch but the unpatched compiler bombed
on that statement with "Internal Error".
The patch procedure:
A>b:debug bascom.com
-e8ab3
xxxx:8AB3 0C.1f
-w
Writing A280 bytes
-q
A>
-------------
How to get patches for a problem with IBM software.
If you are having a problem with one of IBM's software products for the
PC, you should do the following. Try to isolate the simplest conditions
that will cause the problem. If the problem is with a language product,
isolate it to one line (if possible) and have a very short program
available that will demonstrate the problem. Then, take this information
to your friendly dealer who sold you the product.
There should be someone at the dealership who can understand your
problem. If he can't see anything wrong with your sample program, he
will have to contact IBM. He will call the IBM hotline and tell them what
product the problem is with. The support people are usually all busy, so
they will take the phone number of the dealer and will call him back when
someone is available (i.e. you will have to come back/call back later for
the answer). When the dealer gets in touch with IBM, they will try to
find a patch that deals with the area of your problem. If one is found,
IBM will print the update description and procedure and send it to the
dealer. These are titled "IBM Personal Computer Programming
Clarifications" and are usually a couple of pages long, printed on an
IBM/Epson printer. If they can find no match for your problem, they will
ask for an example of the problem, and work from there.
XA 1: X-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-X
Make REAL money with your website!
The entire AOH site is optimized to look best in Firefox® 2.0 on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2008 AOH
We do not send spam. If you have received spam bearing an artofhacking.com email address, please forward it with full headers to abuse@artofhacking.com.
