from the memory location whose address now resides in Rn. Rn is again decremented by 1 and the low-order ACC byte is loaded from the corresponding memory location. Branch conditions reflect the final ACC contents. The carry is cleared. Because Rn is decremented prior to loading each of the ACC halves, double-byte stacks may be implemented with the STD @Rn and POPD @Rn ops

(Rn is the stack pointer).

EXAMPLE:

15

34

A0

SET

R5

$A034

;Init stack pointer

10

12

AA

SET

R0

$AA12

;Load $AA12 into ACC

75

 

 

STD

@R5

 

;Push $AA12 onto stack

10

34

BB

SET

R0

$BB34

;Load $BB34 into ACC

75

 

 

STD

@R5

 

;Push $BB34 onto stack

C5

 

 

POPD

@R5

 

;Pop $BB34 off stack

C5

 

 

POPD

@R5

 

;Pop $AA12 off stack

COMPARE:

CPR Rn

[ Dn ]

The ACC (R0) contents are compared to Rn by performing the 16 bit binary subtraction ACC-Rn and storing the low order 16 difference bits in R13 for subsequent branch tests. If the 16 bit unsigned ACC contents are greater than or equal to the 16 bit unsigned Rn contents, then the carry is set, otherwise it is cleared. No other registers, including ACC and Rn, are disturbed.

EXAMPLE:

15

34

A0

 

SET

R5

$A034

;Pointer to memory

16

BF A0

 

SET

R6

$A0BF

;Limit address

B0

 

 

LOOP1

SUB

R0

 

;Zero data

75

 

 

 

STD

@R5

 

;clear 2 locations

 

 

 

 

 

 

 

;increment R5 by 2

25

 

 

 

LD

R5

 

;Compare pointer R5

D6

 

 

 

CPR

R6

 

;to limit R6

02

FA

 

 

BNC

LOOP1

 

;loop if C clear

INCREMENT:

INR Rn

[ En ]

The contents of Rn are incremented by 1. The carry is cleared and other branch conditions reflect the incremented value.

EXAMPLE:

15

34 A0

SET

R5

$A034

;(Pointer)

B0

 

SUB

R0

 

;Zero to R0

55

 

ST

@R5

 

;Clr Location $A034

E5

 

INR

R5

 

;Incr R5 to $A036

55

 

ST

@R5

 

;Clrs location $A036

 

 

 

 

 

;(not $A035)

 

 

 

 

 

 

Page 49
Image 49
Apple II manual Compare, BF A0 SET $A0BF, LOOP1 SUB, BNC LOOP1, Increment

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.