[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is it possilble to use timer interrupt in Apple II?
On 12/6/09 4:32 AM, in article NSKSm.40366$ZF3.941@newsfe13.iad, "Albert D.
Kallal" <PleaseNOOOsPAMmkallal@msn.com> wrote:
>
> You cannot imagine what a delightful experience it was to work on the apple
> II using UCSD and Pascal.
>
> Not only was code editing and writing of programs absolutely beautiful and
> butter smooth with type-ahead, you also had the ability to have parts of the
> applications dynamically load right off the floppy drive.
>
> I once compiled one of my text input routines to be dynamically loaded on
> the Apple II. This would mean that as long as you typed on the keyboard the
> floppy drive would actually spin and run for every character you typed (as
> it loaded the code). Really amazing, but the REST of the os (screen,
> keyboard input) etc. ALL continued to run butter smooth WHILE the floppy
> disk drive was running and loading code. If you kept typing, the floppy
> would spin! (and, that it was pretty cool because you made sure you type a
> few more characters before the floppy drive timeout occurred! If the floppy
> drive stopped, then type the a character, it took quite a while for the
> floppy drive spin back up to speed).
>
> Contrast the above behavior as to when using Applesoft BASIC and you
> executed a load from the floppy drive - all the code and virtually
> everything else like the display froze during the disk drive load/activity .
>
> So, just to be clear here you CAN write a OS on the Apple II. And, you can
> even write an multitasking system on the apple II. However, without a timer,
> it's going to be very difficult (if not impossible) without interrupts to
> write a preemptive multitasking system. In theory inserting some type of
> board with a timer would allow the interrupts to force the os to move on to
> the next program that requires servicing. (that next program might be disk
> i/o, display, or another user program).
I'm impressed. The only version of UCSD I've used, IV.0 on a TI-99/4A, the
type-ahead buffer does not work during disk access. So, if I'm typing during
disk access, characters are dropped (usually all during the actual
read/write) and then it picks up from there.
I have to wonder if other concurrency is affected (such as sprite lists,
where you can program a series of sprite commands to be executed
concurrently with your program).
And the TI has a timer interrupt. As a matter of fact, the TI-99/4 did not,
and required such a modification to add one to use UCSD Pascal in the first
place. And the system configuration file (whose name fails me now) has the
proper setting for "Uses Clock=YES", which supposedly helps make disk
updates more efficient.
But your example of disk reads during keyboard typing is a bit strange to
me, an apparent physical access to the drive for each keystroke? I would
expect some buffering to take place - so that even on the TI I could type
without character loss until the next block is read into the buffer
(blocksize being 512 bytes on the P-system).