[comp.sys.amiga] Hack "Z" to get 80 column text

adam@cbmvax.UUCP (Adam Levin CATS) (02/28/89)

Manx's vi editor clone "Z" can be hacked to work with 80 columns of text
(rather than its usual 77) on a normal Workbench screen.  In the binary
code ("Z" version 2.3), two non-critical console control sequences (CCS) can
be replaced with CCS that allow text to go from edge to edge of the window.
The CCS that are overwritten turn the cursor off before screen updating
and on after, which speeds the rendering.  Without this feature, scrolling
through a document takes only slightly longer than usual.

Make and use this hack at your own risk.  Use a _copy_ of the "Z" program.
Neither the kludger nor Commodore-Amiga, Inc. take responsibility for
the correctness and/or reliability of this hack.


If you're still with us, here are the steps:

copy "Z" to "Z80"

Filezap "Z80" as follows.

NOTES:
Byte offsets and byte values are given in hexadecimal.
Byte offsets are counted from zero, the first byte of the sector.

Both changes take place in the fifth (5th) sector of the file.
One sector equals 512 bytes.  Count sectors starting with one, not zero.

Change the bytes at offsets 0x1bb through 0x1bd from their original
values of 0x30, 0x20, 0x70 to the values 0x38, 0x30, 0x75 respectively.
This replaces the CCS which tells the console device to turn off the
cursor with one which tells it that the window is 80 characters wide.

Change the bytes at offsets 0x1c0 and 0x1c1 from their original values
of 0x20, 0x70 to the values 0x30, 0x78.  This replaces the CCS which
tells the console device to turn on the cursor with one which tells it
that text should begin at the very left edge of the window.

Save the changes.

Each time you start up "Z80", click on the sizing gadget (no need to
actually resize the window).  This forces the original CON: or RAW: window
to be redrawn with the new text limits.

Even if you resize the window, these limits will remain in effect.
If you resize the window such that it extends from the left side of the
screen to midway across the screen, the document will _NOT_ be reformatted
to fit in the new width, but instead only the left half of each line
will be displayed.   This _is_ a hack to get 80 columns, right?  Simply
resize the window to its full width to be able to edit all the text again.

If "Z80" does not open its own window for the editing session (by being "Run"),
the text limits of the window it was started from will remain at 80 columns
even after "Z80" has exited.

-- 
     Adam Keith Levin  --  CATS   Commodore-Amiga Technical Support
     1200 Wilson Drive / West Chester, PA  19380     (215) 431-9180
     BIX: aklevin        UUCP: ...{amiga|rutgers|uunet}!cbmvax!adam