+------------------------------------------------------------------------

TOPIC -- Apple II -- Red Book Floating point listing

+------------------------------------------------------------------------

Apple II Reference Manual (Red Book), January 1978, pages 94-95.

 

***********************

 

*

 

 

 

*

 

*

APPLE-II FLOATING

*

 

*

POINT ROUTINES

*

 

*

 

 

 

*

 

*

COPYRIGHT 1977 BY

*

 

* APPLE COMPUTER INC. *

 

*

 

 

 

*

 

* ALL RIGHTS RESERVED *

 

*

 

 

 

*

 

*

S. WOZNIAK

*

 

*

 

 

 

*

 

***********************

 

TITLE "FLOATING POINT ROUTINES"

 

SIGN

EPZ

$F3

 

 

X2

 

EPZ

$F4

 

 

M2

 

EPZ

$F5

 

 

X1

 

EPZ

$F8

 

 

M1

 

EPZ

$F9

 

 

E

 

EPZ

$FC

 

 

OVLOC

EQU

$3F5

 

 

 

 

ORG

$F425

 

F425: 18

ADD

 

CLC

 

CLEAR CARRY

F426: A2 02

 

 

LDX

#$2

INDEX FOR 3-BYTE ADD.

F428: B5 F9

ADD1

LDA

M1,X

 

F42A: 75 F5

 

 

ADC

M2,X

ADD A BYTE OF MANT2 TO MANT1

F42C: 95 F9

 

 

STA

M1,X

 

F42E: CA

 

 

DEX

 

INDEX TO NEXT MORE SIGNIF. BYTE.

F42F: 10 F7

 

 

BPL

ADD1

LOOP UNTIL DONE.

F431: 60

 

 

RTS

 

RETURN

F432: 06 F3

MD1

 

ASL

SIGN

CLEAR LSB OF SIGN.

F434: 20 37 F4

 

 

JSR

ABSWAP

ABS VAL OF M1, THEN SWAP WITH M2

F437: 24 F9

ABSWAP

BIT

M1

MANT1 NEGATIVE?

F439: 10 05

 

 

BPL

ABSWAP1

NO, SWAP WITH MANT2 AND RETURN.

F43B: 20 A4 F4

 

 

JSR

FCOMPL

YES, COMPLEMENT IT.

F43E: E6 F3

 

 

INC

SIGN

INCR SIGN, COMPLEMENTING LSB.

F440: 38

ABSWAP1

SEC

 

SET CARRY FOR RETURN TO MUL/DIV.

F441: A2 04

SWAP

LDX

#$4

INDEX FOR 4 BYTE SWAP.

F443: 94 FB

SWAP1

STY

E-1,X

 

F445: B5 F7

 

 

LDA

X1-1,X

SWAP A BYTE OF EXP/MANT1 WITH

F447: B4 F3

 

 

LDY

X2-1,X

EXP/MANT2 AND LEAVE A COPY OF

F449: 94 F7

 

 

STY

X1-1,X

MANT1 IN E (3 BYTES). E+3 USED

F44B: 95 F3

 

 

STA

X2-1,X

 

F44D: CA

 

 

DEX

 

ADVANCE INDEX TO NEXT BYTE

F44E: D0 F3

 

 

BNE

SWAP1

LOOP UNTIL DONE.

F450: 60

 

 

RTS

 

RETURN

F451: A9 8E

FLOAT

LDA

#$8E

INIT EXP1 TO 14,

F453: 85 F8

 

 

STA

X1

THEN NORMALIZE TO FLOAT.

F455: A5 F9

NORM1

LDA

M1

HIGH-ORDER MANT1 BYTE.

F457: C9 C0

 

 

CMP

#$C0

UPPER TWO BITS UNEQUAL?

F459: 30 0C

 

 

BMI

RTS1

YES, RETURN WITH MANT1 NORMALIZED

F45B: C6 F8

 

 

DEC

X1

DECREMENT EXP1.

F45D: 06 FB

 

 

ASL

M1+2

 

F45F: 26 FA

 

 

ROL

M1+1

SHIFT MANT1 (3 BYTES) LEFT.

 

 

 

 

 

 

Page 65
Image 65
Apple II manual Org, Clc, Sta, Bne, Bmi, Dec, Rol

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.