[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 6502 illegal opcodes questions



"Linards Ticmanis" wrote ...

> Paul Schlyter wrote:
>
>> Using soft interrupts as entry points on the Apple II would have been
>> infeasible -- but Apple could have used a JMP table instead, positioned
>> near the beginning or the end of the ROM address space.  CP/M used that
>> method for entry points to its BIOS: a series of JMP operations at the
>> very beginning of the memory block used by the CP/M BIOS.
>
> Commodore did the same by the way; they have that "kernal" jump table at
> the end of the ROMs which stayed fairly stable throughout their 8-bit
> line, and which is easy to "hook" since most of the important entry
> points use indirect JMPs through a RAM vector. Didn't actually make the
> machines very compatible with each other, though.

But the Kernel jump table did make it easier for a C64 programmer to adapt to
programming the C128.  Going back a little farther in time, the jump table
made it easy for VIC-20 programmers to adapt to the C64.    :-)

As others pointed out in this thread, when you have giga Hertz processors and
giga-bytes of RAM, excessive use of OS calls may not be good programming
practice.  But, back in the days of one Mega Hertz processors and 64 KB of
RAM, coding right "down to the metal" made good sense.

8-bit machines may not be as useful today as they were 20 years ago, but they
are still a fun hobby.  Twenty year old programming practices are obsolete on
modern machines, but still good practice on the machines of yesteryear.
:-)
-- 
Best regards,

Sam Gillett

Change is inevitable,
except from vending machines!