🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: net.micro.atari
1 messages
1 total messages Started by utzooutcsrgvnewman Fri, 28 Jan 1983 21:15
6502 compilers
#95
Author: utzooutcsrgvnewman
Date: Fri, 28 Jan 1983 21:15
45 lines
2235 bytes
The topic of why the 6502 can't support a compiler seems to
have come up again. The standard reasons given (no 16-bit
registers, 8-bit sp) don't seem convincing to me. The 6502
intentionally traded off on-chip registers for addressing
modes. The Z80 has more registers, but the 6502 has many
more addressing modes; the 6809 has both (oversimplified).
The reason the 6502 has no 16-bit registers is that you
are supposed to use the indexed indirect and indirect
indexed modes to use page zero as a large register bank,
essentially giving you 128 16-bit pointer registers. If
you look at the instruction timings, you can access an
absolute memory location through a two-byte zero-page
pointer (register) with a one-byte offset in as few as
5 cycles. Another benefit of few registers is fast state
saving (interrupt handling has little overhead). The
shortcoming of the dumb 8-bit stack pointer would 
seem to be naturally implemented in software, with a
bit of a loss in speed. Also a useful capability I believe
not provided in the Z80 is the 6502's memory-to-memory
instructions; you can incr/decr, shift or rotate absolute
locations without using the limited registers.

As proof that the 6502 CAN support a compiler, the company
below claims to have a native 6502 C compiler available
(I posted this to the net some time ago - I don't know
any inside details on the compiler, so don't ask me. Also
I am realistic enough to realize that any time-critical
operation on 8-bit processors at low clock rates is best
done in assembler, so I haven't looked into the product).

Optimized Systems Software, Inc.,
10379 Lansdale Ave.,
Cupertino, CA 95014
(408) 446-3099

C/65 - "The first native mode C compiler ever produced
        for Atari and Apple computers."

(This company was the one that developed Atari Basic,
Atari Assembler/Editor, the first Atari DOS, and the
first Apple DOS).

Ken Newman
Univ. of Toronto
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads