Theory of Operation:

--------------------

SWEET 16 execution mode begins with a subroutine call to SW16. All 6502 registers are saved at this time, to be restored when a SWEET

16 RTN instruction returns control to the 6502. If you can tolerate indefinate 6502 register contents upon exit, approximately 30 usec may be saved by entering at SW16 + 3. Because this might cause an inadvertant switch from Hex to Decimal mode, it is advisable to enter at SW16 the first time through.

After saving the 6502 registers, SWEET 16 initializes its PC (R15) with the subroutine return address off the 6502 stack. SWEET 16's PC points to the location preceding the next instruction to be executed. Following the subroutine call are 1-,2-, and 3-byte SWEET 16 instructions, stored in ascending memory like 6502 instructions. the main loop at SW16B repeatedly calls the 'execute instruction' routine to execute it.

Subroutine SW16C increments the PC (R15) and fetches the next opcode, which is either a register op of the form OP REG with OP between 1 and 15 or a non-register op of the form 0 OP with OP between 0 and 13. Assuming a register op, the register specification is doubled to account for the 3 byte SWEET 16 registers and placed in the X-reg

for indexing. Then the instruction type is determined. Register ops place the doubled register specification in the high order byte of R14 indicating the 'prior result register' to subsequent branch instructions. Non-register ops treat the register specifcation (right-hand half-byte) as their opcode, increment the SWEET 16 PC to point at the displacement byte of branch instructions, load the A-reg with the 'prior result register' index for branch condition testing, and clear the Y-reg.

When is an RTS really a JSR?

----------------------------

Each instruction type has a corresponding subroutine. The subroutine entry points are stored in a table which is directly indexed into by the opcode. By assigning all the entries to a common page, only a single byte to address need be stored per routine. The 6502 indirect jump might have been used as follows to transfer control to the appropriate subroutine.

LDA

#ADRH

;High-order byte.

STA

IND+1

 

LDA

OPTBL,X

;Low-order byte.

STA

IND

 

JMP

(IND)

 

 

 

 

Page 53
Image 53
Apple II manual Lda #Adrh, STA IND+1 LDA OPTBL,X, Sta Ind Jmp

II specifications

The Apple II, launched in April 1977, was one of the first highly successful mass-produced microcomputer products. It marked a significant leap in personal computing, setting standards for future developments in the industry. Created by Steve Wozniak and Steve Jobs, the Apple II differentiated itself with its user-friendly design, appealing aesthetics, and robust capabilities.

One of the standout features of the Apple II was its open architecture, which allowed users to expand and enhance the computer's functionality. This design enabled hundreds of third-party hardware and software developers to contribute to its ecosystem, resulting in an array of peripherals, including printers, modems, and storage devices. The Apple II utilized a MOS Technology 6502 microprocessor running at a clock speed of 1 MHz. Initially equipped with 4 KB of RAM, the machine could be expanded to 48 KB, accommodating more complex applications and programs.

The Apple II was also notable for its colorful graphics. It was one of the first computers to support color display, offering a 6-color palette with a resolution of 280x192 pixels in 16 colors when using its Color Graphics Card. This feature significantly enhanced the visual appeal of games and educational software developed for the platform, making computing more accessible and entertaining for various audiences.

Apple's commitment to user experience was evident in the design of the machine. It featured an integrated keyboard and a plastic case, which was both durable and visually appealing. The self-contained design included drive bays for floppy disk drives, allowing for quicker data access than traditional tape drives. It also supported audio output, enabling sound effects and music, a novelty at the time.

The introduction of the Apple DOS operating system further underscored the machine's capabilities. DOS streamlined file management and made it easier for users to navigate and manage their data. The combination of hardware and software positioned the Apple II as an educational tool and a gaming platform, fostering a vibrant software ecosystem.

The Apple II family continued to evolve, with variations like the Apple II+, IIe, and IIgs being introduced over the years. These iterations brought enhancements in memory, processing power, and graphics capabilities. The legacy of the Apple II endures, not only as a foundational product in personal computing but also as a symbol of innovation that paved the way for future advancements in technology. Its impact is still felt today, as it inspired countless developers and shaped the trajectory of the computer industry.