[net.micro.apple] Reply to Eddie Kessler

ags@pucc-i (Seaman) (07/16/84)

This is intended for Eddie Kessler (ARPA:  eddie%su-psych@su-score).
Sorry about posting to the net, but I can't mail to ARPA.

My terminal emulator is in Modula-2 (Volition Systems) which runs under
Pascal 1.1.  Of course the interrupt handler and the time-critical code
is in assembly language.  I don't have the source on line, because the file 
transfer routines are not implemented yet.  I can certainly sympathize with 
your remarks about lack of time!

I do not use an ATTACH driver to handle the interrupts because the
terminal emulator is the only program I have which needs to use
interrupts or the serial port, and it seems to be easier, probably
faster, and certainly more space-efficient to put the interrupt logic
into the program itself.  This also means I can write an interrupt handler
that does not need to reference the I/O locations on page 1, so interrupts
can be left on all the time.  Modula-2 automatically enables interrupts
except when doing disk I/O.  I believe Pascal 1.1 has a few problems
with interrupts.

If you want to disable interrupts when page 2 is swapped in, you might
use the ROM listings as a starting point.  To clear the screen, for example,
the scheme is

  1.  Clear page 1, leaving interrupts enabled.
  2.  Disable interrupts and swap in page 2.
  3.  Clear page 2.
  4.  Swap in page 1 and enable interrupts.

Step 3 takes enough time to cause problems at 1200 baud.  For a possible
fix, look at the routine BASCALC (the one in the 80-column firmware, not
the routine by the same name in the F8 ROM).  This routine is called each
time you move to a new row to compute the base address.  BASCALC checks
what language is running (BASIC or Pascal) and if BASIC is running it calls
a routine in the F8 ROM which "sniffs" IRQ.  This is not done under Pascal
because the F8 ROM is not active.  Since you almost have to duplicate the
ROM code in your terminal emulator anyway in order to make changes, this
one probably fits right in.  The same modified BASCALC should also fix
your scrolling problems.

I have not run into any assembler or linker problems with Pascal, but I
did find one that seems to show up only under Modula-2.  There are some
updates in the wind, both hardware and software:

1.  Look for a //c-compatible ROM to plug into the //e Real Soon Now.  If
    you don't run canned software you may never need it, but some new
    programs being developed for the //c may not run on a //e with the old
    ROM.

2.  Apple Pascal 1.2 is apparently being shipped now after some delays,
    though I have not received mine yet.  I heard that an unacceptable
    number of bugs were found in 1.2 when it first came out.  This version
    is supposed to support 128K and double density graphics on a //e, as
    well as fix some problems in 1.1.

3.  Volition Systems has announced a new Modula-2 to work under Pascal 1.2,
    but the release apparently has been delayed because of the problems with
    1.2.

4.  You will probably need a new ATTACH document for 1.2, but it may not
    be available yet.  I called International Apple Core about two months
    ago and they knew nothing about it.

Hope this helps.
-- 

Dave Seaman			My hovercraft is no longer full of 
..!pur-ee!pucc-i:ags		eels (thanks to my confused cat).