1. Not old. Vintage. :)
Timothy Kline

Z*Magazine: 25-Jun-86 #6

Z*Magazine: 25-Jun-86 #6

  1. Timothy Kline
    Article #12 (214 is last):
    From: xx004@cleveland.Freenet.Edu (Atari SIG)
    Newsgroups: freenet.sci.comp.atari.product.8bit.zmag
    Subject: Z*Magazine: 25-Jun-86 #6
    Reply-To: xx004@cleveland.Freenet.Edu (Atari SIG)
    Date: Sat Jul 3 20:27:29 1993



    ________________________^^^________
    Zmagazine June 25 1986 HOT Atari
    Vol 1, No.6 News Plus++
    Ron Kovacs-Publisher/Editor
    Middlesex, New Jersey
    ___________________________________
    Xx In this Issue!!!
    This is our biggest issue to date,
    due to the many text files sent in
    during the past week, I thought I
    would include everything I had.

    I was also thinking of writing this
    weeks edition in 80 column format.
    But do to the time required to re-
    format all the uploaded information
    I received this week, I will try to
    do it for next week.

    CONTENTS:
    Legislation in Congress??
    Atari ST news
    Beginners Column by Steve Godun
    Part 3 of Assembly Programming
    Zmag BBS Watch
    and more!!!!!!!!

    Xx Editors Notes
    Next week I will update our Zmag
    BBS list. We will also have a BBS
    review of two BBS Systems.

    ZPRINT2 has been released and I am
    looking for someone to modify it
    for various printers. When we go
    to 80 column format, I would like
    readers to be able to print out
    the issue (if they choose), I
    would like to put the config for
    their printers in the program.
    Anyone who can help, I will include
    their name in Zmag and in the
    ZPRINT title screen.

    -----------------------------------
    Xx Atari News Part One
    [Reprinted from InfoWorld]

    Atari: $99.95 Modem
    by Karen Sorensen InfoWorld

    Atari Corp. announaced it is
    developing a Hayes-compatible
    1,200(bps) modem that will retail
    for $99.95 and will run on a
    variety of personal computers.

    The modem will feature an RS-232
    serial port, which will allow it to
    run with the Atari line and other
    machines, such as the IBM PC, said
    Neil Harris, Atari's hardware
    products manager. The device will
    also have a serial input/output
    port, which will allow Atari's 8-
    bit computers to work with it,
    Harris said.

    Users will be able to select from
    either 1,200 or 300-bps rates. The
    modem will support all standard
    Hayes commands, except for one that
    allows users to store phone numbers
    on nonerasable memory, according to
    Harris. Atari plans to offer
    separate accessory kits, as well as
    software that will allow the
    computer to emulate specific
    terminals, Harris said. Atari now
    hopes to introduce the modem by
    late summer.

    Atari is also developing a cart-
    ridge that will plug into the ST
    and allow it to operate like a DEC
    VT100 terminal. Many large corp-
    orations are interested in using
    the St solely as a terminal, Harris
    said. Currently, VT100 emulation
    is available through a $124 program
    called PC/Intercomm from Mark of
    the Unicorn, in Cambridge,Mass.

    Xx Spelling Aide
    by Scott Mace InfoWorld Staff

    Batteries Included released Thunder
    a 50,000-word real-time spelling
    checker for the Atari ST that works
    from within most GEM-based applica-
    tions.

    Thunder checks words as the user
    types and allows users to correct
    words within 80 characters of mis-
    spelling them, said Mark Skapinker,
    director of product development for
    Batteries Included and the programs
    designer.

    Skapinker said Thunder's process of
    checking spellings and retrieving a
    list of possible correct spellings
    is a quicker, one-step process than
    that used by Turbo Lightning, an
    IBM PC program from Borland Inter-
    national of scotts Valey,CA.
    Like Turbo Lightning, Thunder can
    reside in memory at all times,
    Skapinker said. But Turbo Lightning
    does its initial screening from a
    5,000-root-word dictionary, and
    users may have to branch to a
    50,000 word, disk-based synonym
    directory, he said. "But the
    Thunder dictionary is always loaded
    completely into memory,"

    Thunder does not include a synonym
    dictionary, said Skapinker, and the
    program works only with GEM-based
    (Graphics Environment Manager)
    applications on the Atari St, such
    as Homepak, Paperclip Elite, ST
    Talk, BTS The Spreadsheet, and
    Timelink from Batteries Included;
    Habawriter from Haba/Arrays Inc. of
    Van Nuys, California; Regent Base
    from Regent Software of Canoga
    Park, Caifornia; and 1st Word from
    Atari Corp. of Sunnyvale,CA.

    On the GEM desktop, Thunder appears
    as a desk accessory, Skapinker
    said. Thunder will not work as a
    desk accessory with non-GEM Atari
    ST programs, said Skapinker. But
    the program can be run alone to
    check spelling on files from
    virtually any ST application.

    The program also allows users to
    predefine two-character
    abbreviations for longer words.
    When the users types the
    abbreviaton followed by a space,
    Thunder automatically expands it to
    the full word.

    Thunder also includes a document
    analyzer, which reports on each
    document's word count, character
    count, percentage of words with
    more than three syllables, number
    of sentences, average words per
    sentence, and readability ratings.


    Xx Legislation

    HOUSE PASSES COMPUTER CRIME BILL
    June 1986

    The House of Representatives today
    made quick work of a new computer
    crime bill that would establish
    severe penalties for illegally
    accessing government computers,
    while cracking down on illegal
    computer bulletin board systems.

    The bill (HR 4718), sponsored by
    Rep. William Hughes (D-N.J.),
    passed under an expedited procedure
    called suspension of the rules
    which limits debate and prohibits
    amendments. It now must go to the
    Senate, where a companion measure
    has been languishing in committee,
    before going to the president for
    his consideration. The fast-track
    House procedure requires a two-
    thirds vote, but there was no
    objection voiced to the bill during
    debate. The measure was reported
    out last month by the House
    Judiciary Committee after hearings
    before its crime subcommittee.

    Hughes, who chairs the crime
    subcommittee, said he expects quick
    action on the measure on the
    Senate. He predicted that the bill
    will become law before the end of
    the 99th Congress in December.

    The changes in the law, Hughes
    said, are needed to eliminate
    another glaring example of the
    failure of existing law to keep
    pace with technological advances.
    "With computer crimes," he said,
    "the trespassing or theft is done
    electronically, not physically.
    Although the losses are often just
    as great or even greater than
    property crime, our laws are not
    current enough to keep pace with
    the changing technology used by the
    criminals."

    Hughes was the author of the
    nation's first computer crime law
    in 1984, a measure that established
    a new federal crime for un-
    authorized access to classified
    information in government computers
    and a misdemeanor for accessing any
    federal computer or computer
    containing financial or credit
    information. Hughes said he hopes
    the new bill will build on the
    existing federal statute.

    The new measure would establish a:

    -:- New felony for trespassing into
    federal interest computers, those
    run by or for the federal
    government, banks, or states.
    Offenders would face five-year
    prison terms.

    -:- Second felony for "maliciously
    trespassing" into a federal
    interest computer and causing more
    than $1,000 in damage.

    -:-Category of federal misdemeanors
    involving the use of illegal BBSes
    to post private information, such
    as credit card data, phone account
    information and passwords.

    "We need to establish clear
    guidelines," Hughes said, "for
    protecting the information stored
    in computers and for cracking down
    on those who knowingly put computers
    to criminal of malicious use."

    The Judiciary Committee, having
    completed its work on computer
    crime for the year, next is
    expected to turn its attention to
    the issue of privacy protection for
    databases, electronic mail and
    other forms of telecommunications.

    The Judiciary subcommittee on the
    courts, civil liberties and the
    administration of justice has
    reported out a bill, sponsored by
    its chairman Rep. Robert W.
    Kastenmeier (D-Wis.) that would
    extend the same protections as
    first class mail to tele-
    communications. That bill, however,
    has yet to be brought up before the
    full committee, but staffers for
    Judiciary Committee Chairman Rep.
    Peter Rodino (D-N.J.) said the
    measure will be on the panel's
    summer agenda.

    A companion bill is moving through
    the Senate.
    --J. S. Orr

    Electronic Privacy

    ELECTRONIC PRIVACY ACT HEADED FOR
    HOUSE FLOOR
    June 1986

    The House is preparing to act on a
    bill that extends protections under
    the 1968 federal wiretap act to all
    kinds of data communications,
    including electronic mail.

    The Electronic Communication
    Privacy Act (HR 4952) was reported
    out last week by the House
    Judiciary Committee and could find
    its way to the floor as early as
    this week, according to committee
    sources. The measure is a "clean
    bill," replacing HR 3378, also
    called the Electronic Communication
    Privacy Act, introduced by Rep.
    Robert Kastenmeier (D-Wis.) last
    September.

    The new bill, also sponsored by
    Kastenmeier, who chairs the panel's
    subcommittee on civil liberties,
    received a unanimous endorsement
    from the full Judiciary Committee
    as well as praise from its chairman
    Rep. Peter Rodino (D-N.J.).

    "Almost 20 years ago, Congress
    passed legislation to protect the
    privacy rights of telephone users,"
    Rodino said. "Since then, the
    communication industry has been
    revolutionized by new technology,
    including cellular and cordless
    phones, electronic mail sent by
    computers, paging devices and other
    electronic information systems,"

    The problem of privacy protections
    for computer data and forms of
    electronic communications has long
    worried civil libertarians as well
    as private and commercial computer
    users.

    The 1968 wiretap law makes it a
    crime to intercept telephone
    conversations and forces law
    enforcement authorities to seek
    permission from the courts to
    install wiretaps. However, the law
    refers only to oral communication
    meaning data transmissions are
    without protection against wiretaps
    by government authorities or
    private individuals.

    The new bill "gives paramount
    attention to protecting the basic
    privacy interests of all Americans,
    It also meets the needs of law
    enforcement officials who must
    resort to court-approved
    surveillance in order to apprehend
    suspected criminals, and it ensures
    fair competition among
    industry-users of new communication
    technologies.

    Specifically, the bill would:

    -:-extend protection against
    intercepts to cover all electronic
    communications

    -:-eliminate the distinction
    between common carriers and private
    carriers

    -:-create penalties for persons who
    obtain unauthorized access to
    electronic communications

    -:-require government authorities
    to obtain court orders before
    obtaining access to third-party
    computer records.

    -:-expand the list of crimes for
    which a wiretap court order may be
    obtained.

    -:-require government authorities
    to obtain a court order based upon
    "reasonable cause" before it can
    use a device to record phone
    numbers dialed from a certain
    phone.

    -:-require government authorities
    to show "probable cause" to obtain
    a court order authorizing a
    tracking device.

    --J. Scott Orr

    Xx Atari News from Current Notes
    Excerpts from Current Notes June
    1986. By: Joe Waters/Frank Sommers

    Hard Disk Drives??

    Atari has thousands of the long
    awaited hard disk drives piling up
    in warehouses. The targeted shipping
    date was end of May, so these drives
    should be in your local store soon.
    We'll see...

    1200 Baud Modem??

    Expect to see the Atari 1200 baud
    modem late this month or early July.
    Sources indicate that the MS-DOS
    emulator has received FCC approval.
    The hardware seems to be in fine
    shape, but the software still needs
    tuning. Probably wont see this
    until fall.

    New Monitor??

    The SPI3000 will be the same as the
    current color monitor with one
    significant difference--a built in
    disk drive. Final price has not been
    set, but should be in the neighborhood
    of $500.00. The EST, the next generation
    ST, will feature a very high
    resolution monitor (1280 x 960??).
    However, monitors of this kind of
    resolution are very expensive.
    Currently priced at $1000.00. Atari
    is searching the world to see if it
    can find a supplier who can make a
    more economical HR monitor. Dont
    look for the EST before, at best,
    early in 1987.

    Personal Prolog??

    If you are anxiously awaiting for
    Personal Prolog from OSS, you'll
    have to wait awhile longer. The
    first release of PP will be OSS's
    first product for the MacIntosh.
    The ST version won't be ready till
    the end of the summer. OSS also
    noted that they have dropped plans
    to produce Personal Diskit -- there
    are already too many programs
    around performing similar functions.


    Xx BEGINNERS' COLUMN: POKEing AROUND
    By Steve Godun
    Written Exclusively for Z-MAG

    Greetings, all!!
    This column is for all of the
    people who wanted to learn BASIC,
    but always thought it was too hard,
    or it wasn't worth it, or you
    didn't have the time, or you were
    just too lazy to learn it. But
    before I go on, let me say that
    learning BASIC is like learning to
    do anything else: It takes practice
    but once mastered, you can make it
    do anything you want.

    If you're reading this, chances
    are you've had some experience with
    BASIC programs, even if just typing
    in a program from ANTIC. But many
    beginners, when writing a program
    mown, at times will overlook (some-
    times on purpose) the ever-useful
    POKE command. This "fear of POKEs"
    (POKEphobia?) tends to arise from
    statements in BASIC manuals that
    may read "...The first expression,
    aexp1, must be an integer or
    arithmatic expression that
    evaluates to an integer that
    represents the memory address of
    the machine language routine to be
    performed..." (Taken from ATARI
    BASIC REFERENCE MANUAL, Page 36).
    Now, if you were (or are) a
    beginner BASIC programmer and you
    saw this, wouldn't you say "Huh?"
    I know I did!

    So, in this article, I'll try to
    explain POKEs with a little more
    clarity. Note that this article is
    intended for beginning programmers
    only, but feel free to read on if
    you're not a beginner.

    Basically, a POKE is just
    changing, or redefining, the value
    of a memory location in the Atari's
    Operating System (OS). That's it.
    Nothing else. Simple, eh?

    So, now you're about ready to
    fool around with those POKEs. Boot
    up DOS, turn on yor monitor, and
    let's get on with it.

    In direct mode (NO LINE NUMBER),
    it works like this:

    POKE x,y [RETURN]

    Here, x is the memory location,
    and y is the value for that
    location. To put a POKE in a
    program, just type it like you
    would any other program.
    Here's an example:

    10 POKE x,y

    Note that nothing except the line
    number was changed, added, or taken
    away. When run, this will act the
    same way it would if it were
    entered in direct mode, but the
    program would continue to execute
    the rest of the program after
    performing the POKE.

    If you were to look through some
    BASIC programs from, let's say,
    ANTIC, you might be able to find a
    few common POKEs there. The most
    commonly used POKEs are these:

    POKE 752,1 (CURSOR - Turns cursor
    off: Replace the 1 with a
    0 to turn it back on.)
    POKE 710,x (BACKGROUND - Changes the
    background color. The x is any
    number from 0-255. Each number will
    change the color of the back-
    ground. Experiment a little and
    find a setting that you like!
    More about colors later on.)

    POKE 580,1 (COLD START - Type this
    in direct mode and press RESET on
    your Atari. The computer will act
    as if it were turned off and on
    again. A very useful POKE commonly
    used to prevent LISTing of a
    program. Put a 0 where the 1 is to
    return to normal setting.)

    POKE 16,64 & POKE 53774,64 (BREAK
    KEY - Type both in to disable the
    BREAK key. Usually used in
    conjunction with the above to keep
    programs away from "prying eyes".)

    POKE 65,0 (I/O FLAG - Type this in
    and quiet the "beep beep" from disk
    and cassette reading and writing.
    Substitute a 1 where the 0 is to
    return to normal

    POKE 82,x (MARGINS) in Atari
    BASIC, enter this POKE and put
    a number from 0-39 to set the
    margin. 0 is at the far left,
    while moving to the right increases
    the left margin space. The default
    setting is 2.)

    POKE 83,x (RIGHT MARGIN - Same as
    above, but for the right margin.
    The default is 39.)

    Of course, there are many, many
    more POKE locations. These are just
    a few to start you off. For a near
    complete list of POKEs, I suggest
    you buy a copy of "MASTER MEMORY
    MAP" by EDUCATIONAL SOFTWARE, Inc.
    Almost all of the Atari POKEs are
    listed there, along with an
    explanation of each.

    So, experiment!! Just be sure
    that, when you start your experi-
    ments, your disk is out of the
    drive, no program is in memory that
    hasn't been saved (In case you
    screw up the computer and have to
    reboot), and that you have a paper
    and pencil handy for writing down
    all those important POKEs.
    - - - - - - - - - - - - - - - - - -
    Want to see the internal workings
    of your Atari? Type in this program
    and RUN it:
    10 GRAPHICS 0
    15 POKE 88,0
    20 PRINT "I LOVE TO POKE!"
    25 GOTO 20

    The POKE 88,0 opens a "window" to
    the internals of the Atari. To get
    out of this, hit RESET. Try other
    words or phrases in line 20 and see
    what happens.
    - - - - - - - - - - - - - - - - - -
    Well, that's all for now. Have
    fun POKEing around your Atari, and
    remember that POKEing is not
    illegal. See ya soon...
    -Steve the Kid
    Sys0p of MJAC BBS
    (201)469-4474
    -----------------------------------
    [Ed. In addition to the book that
    Steve recommended, Look for "Mapping
    The Atari" By: Ian Chadwick,
    Published by Compute Publications,
    Inc, ABC Publishing Company.
    $16.95]

    Xx Zmag BBS Watch
    This is a new column that will be
    dedicated to messages of interest
    from Zmag Message bases on systems
    carrying Zmag and/or a Zmag Base.

    Following text taken from the NYC
    BBS.
    TO->COMPUTER WIZZZ
    FROM->RATBANE
    SUBJ->Z-MAG

    Everyone thanks you for your kind
    thoughts. How exactly do you read
    ZMAG in computer class? Does your
    teacher acquire a file and then let
    everybody read it? Is it read as
    part of class time or study time,
    or after-school club time? Ask
    your teacher if there is anything
    we could do to be of help to him in
    teaching computers and programming.
    There is a Basic class being taught
    on Atomic boards by Woden, Sysop of
    the Valhalla BBS. We have a lot of
    Public Domain utilites, and
    firsthand access to many goodies
    here in the great city of New York.
    Do let us know what your teacher
    says. Try to get him/her to log on
    here, too.
    RATBANE

    TO->ALL
    FROM->COMPUTER WIZZZ
    SUBJ->Z-MAG

    WELL HELLO FROM THE GREAT STATE OF
    VERMONT, COMPUTER WIZZZ HERE
    RESPONDING TO Z-MAG ARTICLES ABOUT
    THE ATOMIC NETWORK,N.Y.CITY BBS AND
    B.A.T. ALSO Z-MAG ITSELF. Z-MAG IS
    THE BEST THING TO HAPPEN ON BBS'S
    SINCE MODEMS. I HAVE BEEN LOOKING
    AROUND AND HAVE COME TO THE
    CONCLUSION THAT N.Y.CITY BBS AND
    THE ATOMIC NETWORK ARE IN THE FORE-
    FRONT OF PUBLIC SERVICE BBS'S. AS
    FOR ME I READ Z-MAG IN MY COMPUTER
    CLASS IN SCHOOL, INTERESTING.
    B-C-IN-YA
    *COMPU-WIZZZ*

    TO->SYSUSR:0
    FROM->[[The*Mayor]]
    SUBJ->NYC*AMUSMENTS

    ANOTHER WELCOME CHANGE TO THE N.Y.
    CITY BBS WILL BE HERE SHORTLY,SINCE
    THE FORMER CO-SYSOP OF NYC
    *AMUSMENTS BASE #3 HAS LEFT US,I AM
    CHANGEING THE NAME OF THE BASE TO
    REFLECT THE GROWTH OF THE ATOMIC
    NETWORK AND N.Y.CITY BBS. THE MAIN
    REASON FOR OUR SUCCESS BESIDES ALL
    YOU GREAT USERS IS THE POPULARITY
    OF ZMAG ALL ACROSS THE COUNTRY,
    WHICH CARRIES INFORMATION OF ATOMIC
    AND N.Y.CITY AND B.A.T. SO
    THEREFORE BASE #3 WILL BECOME
    |NYC|Z-MAG|BASE| OR SOMETHING CLOSE
    TO THAT,IF ANY OF YOU HAVE ANY
    SUGGESTIONS ON THE NAME,LET ME KNOW
    DURING THE WEEK,ALSO IF ANY OF YOU
    ARE BIG FANS OF Z-MAG AND CANT SEEM
    TO KEEP QUIET ABOUT HOW GREAT IT
    REALLY IS,LET ME KNOW THAT TOO,THAT
    USER MAYBE OUR NEXT NYC|Z-MAG|
    CORRESPONDENT.
    KEEP SMILING
    THE MAYOR

    TO->ALL
    FROM->WODEN
    SUBJ->ZMAG

    THE LATEST ISSUE OF ZMAG IS NOW
    AVAILABLE FOR DOWNLOADING. THE FILE
    IS ZMAG611. THIS ISSUE HAS A
    SECTION ON BEGINING ASSEMBLY
    LANGUAGE PROGRAMMING. LOOK FOR IT
    IN THE DOWLOAD SECTION. IF ANYONE
    HAS ANYTHING THAT THEY WOULD LIKE
    DONATE TO ZMAG. YOU CAN UPLOAD IT
    HERE, LEAVE ME A MESSAGE AND I'LL
    SEE THAT THE NEWS DEPARTMENT
    RECIEVES IT. HERE IS YOUR CHANCE TO
    HAVE YOUR WORK SHOWN WITHIN THE
    FASTEST GROWING BULLETIN BOARD
    MAGAZINE AROUND.

    -----------------------------------
    Xx Assembly Language

    ANTIC PUBLISHING INC., COPYRIGHT
    1985. REPRINTED BY PERMISSION.

    CHRIS CRAWFORD ASSEMBLY LANGUAGE

    LESSON THREE: LOGIC

    BOOLEAN LOGIC

    A great deal of programming
    involves the use of Boolean logic.
    This is a standardized system for
    handling logical manipulations.
    It's sort of like algebra for logic
    You must understand Boolean logic
    if you are to write assembly
    language programs, so let's get
    started.

    Where algebra deals with numbers
    Boolean logic deals with
    propositions. A proposition is just
    a statement such as "Fred eats
    worms." It can take only two
    possible values -- True or False.
    In our programs we seldom bother
    with broad and glorious
    propositions such as "Love is the
    universal language of truth" or
    "War is the extension of policy by
    other means". Instead, we normally
    deal with propositions such as "The
    joystick trigger has been pressed,"
    or "There is a diskette in the disk
    drive."

    When we use Boolean logic with a
    computer, we may think in terms of
    true and false, but the computer is
    actually working with 1's and 0's.
    We use the following convention: a
    1 corresponds to a Boolean value of
    "true", while a 0 corresponds to a
    Boolean "false".

    Using this system we can
    represent propositions inside the
    computer. However, programming
    requires more than the mere
    representation of data; we must
    also be able to manipulate that
    data. This brings us to the Boolean
    operators. There are four common
    Boolean operations necessary for
    most programming practices:

    Not
    This is the simplest of Boolean
    operators. It takes a single
    Boolean value as an input and
    produces as its output the logical
    converse of the input. Thus, a true
    input yields output, while a false
    input generates a true input.

    Or
    This Boolean operator takes two
    Boolean values as its input and
    generates a single Boolean value as
    its output. The value of the
    output depends on the values of the
    inputs according to the following
    rule: If one input is true OR the
    other value is true, then the
    output is true. Otherwise, the
    output is false.

    And
    This Boolean operator is just like
    the or-operator, except that it
    uses a different rule. Its rule
    is: If one input is true AND the
    other input is true, then the
    output is true; otherwise the
    output is false.

    Exclusive-Or
    This Boolean operator is just like
    the or-operator, except that its
    rule is: If one input is true, OR
    the other input is true, BUT not
    both are true, then the output is
    true; otherwise, the output is
    false.

    When we use the 6502 for Boolean
    operations, you must remember that
    the operations are eight bits wide.
    Instead of working with one bit at
    a time, we use all eight bits of a
    word in parallel. The bits in a
    byte are independent and do not
    affect each other in any way -- at
    least as far as Boolean operations
    are concerned.

    The 6502 has three instructions
    for performing Boolean operations.
    These are AND, EOR, and ORA. The
    first performs an and-operation.
    For example, consider the following
    code:

    LDA FISH
    AND GOAT

    This will first Load the
    accumulator with the value of FISH.
    It will then And the contents of
    the accumulator with the contents
    of GOAT. The result of the and-
    operation will be left in the
    accumulator.

    The AND-instruction can use an
    immediate operand if you desire,
    just as the ADC-instruction can.

    The EOR-instruction provides the
    exclusive-or operator. It works
    just like the AND-instruction. The
    ORA instruction provides the or-
    operator in just the same way.

    If you wish to obtain the NOT-
    operation, just use EOR #$FF; this
    will invert each bit in the
    accumulator. Because NOT is so
    easily reproduced with EOR, there
    is no special NOT instruction in
    the 6502.

    APPLICATIONS OF BOOLEAN LOGIC

    If you have any sense at all,
    you are probably asking, "What good
    is all this Boolean nonsense? What
    would I use it for?" Four
    applications are available:

    Program Logic

    Many times our programs
    encounter rather complex logical
    situations. The program must be
    able to load a file; if the FMS is
    in place and there is a diskette in
    the disk drive, and the diskette
    has the file we are looking for, or
    the file specification calls for a
    cassette load, then we will load
    the program. Many programming
    problems involve such Boolean
    operations, Keeping them straight
    is certainly a headache.

    Masking Bits

    Sometimes we need to isolate
    particular bits in a byte. For
    example, in Eastern Front (1941) I
    used the character value to store
    the unit type. The color of the
    unit was encoded in the upper two
    bits of the byte, the type in the
    lower six bits. If I wanted to get
    only the unit type, I had to mask
    out the upper two bits. This I did
    with the following code fragment:

    LDA UNITCODE
    AND #$3F

    The AND-instruction eliminated
    the upper two bits, leaving me with
    just the unit type. Bit-masking
    like this is useful in many
    situations. We use it frequently
    when we pack bits into a byte to
    save memory. It is also handy with
    input handling. If you want to
    read the joystick port, you
    frequently mask out the bits in
    turn to see which is active.

    By the way, you mask out bits
    set to 1 with the AND-instruction.
    You mask out bits set to 0 with the
    ORA instruction. The logic is
    reversed.

    Setting and Clearing Individual
    Bits

    We also use the AND and ORA
    instructions to set or clear
    individual bits within a byte.
    This is most often useful for
    handling arrays of flag bits.

    Folding Bytes Together

    This little fragment of code
    will fold bytes together:

    LDA FISH
    EOR GOAT
    AND MASK
    EOR GOAT
    STA ANSWER

    This is a magical piece of code.
    See if you can figure out what it
    does. Experiment with two values
    of MASK: $OF and $FO.

    SHIFT AND ROTATE INSTRUCTIONS

    The 6502 also has instructions
    that allow you to shift the bits
    around inside a byte. The first of
    these are the shift instructions.
    One, ASL, shifts a byte to the
    left; the other, LSR, shifts a byte
    to the right. Thus, the byte
    %01101011, when shifted left,
    becomes %11010110. Each bit is
    shifted one position to the left.
    The leftmost bit is rudely pushed
    right out of the byte and falls
    away ("Aaaaaaaaarrrrrggggg!"). A
    zero is shifted into the rightmost
    bit. The LSR instruction does the
    same thing in the opposite
    direction.

    Note that ASL also doubles the
    value of the byte, while LSR halves
    it. Two ASL's multiply by four;
    three multiply by eight. This
    makes it easy to do simple
    multiplication, but be careful with
    round-off error here. What happens
    if you try to multiply by 256?
    What do you get if you halve 3?

    A variation on the shift
    instructions are the rotate
    instructions. There are two:
    rotate left (ROL) and rotate right
    (ROR). These function just like
    the shift instructions, except that
    the bit that gets shoved into the
    bottom is not necessarily a zero;
    it is the contents of the Carry
    bit. The bit that gets pushed off
    the edge of the byte goes into the
    Carry bit, so it is not lost.
    Thus, if you rotate either way nine
    times, you'll be right back where
    you started.

    Rotate instructions are a handy
    way to get a particular bit into
    the carry bit where you can work on
    it. Conversely, once you get your
    desired bit into the carry bit the
    way you want it, you can put it
    back into a byte with some rotate
    instructions.

    INCREMENT AND DECREMENT INSTRUCTIONS

    The last instructions I will
    cover are the increment and
    decrement instructions. These allow
    you to add one (increment) or
    subtract one (decrement) from a
    memory location. These are not
    considered to be arithmetic
    operations so they do not affect
    the Carry flag, nor are they
    affected by it.

    You cannot increment or
    decrement the accumulator, only RAM
    locations.


    Next week Part 4

    Xx Fine Tuning DOS
    By: Divemaster

    A) How to delete "Twin" files

    Have you ever ended up with 2
    (or more) files on your disk with
    the same filename? Do you end up
    cursing and screaming when you try
    to delete one of them? There is a
    way around that, folks:

    1) Boot up DOS with BASIC in.
    2) In the immediate mode, type
    POKE 3118,0
    3) Type DOS, and press RETURN.

    Now, you'll be able to delete
    without losing both files, because
    by POKEing 3118,0, DOS will erase
    ONLY the first "TWIN" file.


    [Reprinted from the March Issue of
    the Alamo Area Atari Users Group
    Newsletter]

    Xx Zmag Notes
    Well there you have it. Our longest
    issue and hopefully one of our best
    to date.

    Please pass the word about Zmag,
    if you know of a BBS that is
    interested, please have them leave
    me a message on The Syndicate BBS
    201-968-8148 or any of the other
    Systems carrying Zmag.

    Thanks for reading... See you next
    week.
    -----------------------------------
    Zmagazine June 25, 1986
    Please contribute!!
    -----------------------------------
    (c)1986 Ron Kovacs
    (c)1988 SPC/Ron Kovacs