mant1 and act as floating point registers. On entry to the subroutines these registers contain the numbers to be operated upon and contain the result on return, The function of the registers is given before each entry point in the source listing. There are three error traps which will cause a software interrupts. ERROT (1D06) is encountered if the argument in the log routine is less than or equal to zero. OVFLW (1E3B) will be executed if the argument of EXP is too large. Overflow detected by the basic floating point routines will cause OVFL (1FE4) to be executed. The routines do not give underflow errors, but set the number to zero if underflow occurs.

Readers of Dr. Dobbs's journal should note that when these routines were published in that journal the math function LOG contained an error which prevented the correct result from being given if the argument was less than 1. This error has been correted in the present list- ing and marked with "MOD 9/76."

1

 

*

SEPTEMBER 11, 1976

 

2

 

*

BASIC FLOATING POINT ROUTINES

 

3

 

*

FOR 6502 MICROPROCESSOR

 

4

 

*

BY R. RANKIN AND S. WOZNIAK

 

5

 

*

 

 

 

6

 

*

CONSISTING OF:

 

7

 

*

NATURAL LOG

 

8

 

*

COMMON LOG

 

9

 

*

EXPONENTIAL (E**X)

 

10

 

*

FLOAT

FIX

 

11

 

*

FADD

FSUB

 

12

 

*

FMUL

FDIV

 

13

 

*

 

 

 

14

 

*

 

 

 

15

 

*

FLOATING POINT REPRESENTATION (4-BYTES)

16

 

*

 

EXPONENT BYTE 1

 

17

 

*

 

MANTISSA BYTES 2-4

 

18

 

*

 

 

 

19

 

*

MANTISSA:

TWO'S COMPLIMENT REPRESENTATION WITH SIGN IN

20

 

*

MSB OF HIGH-ORDER BYTE. MANTISSA IS NORMALIZED WITH AN

21

 

*

ASSUMED DECIMAL POINT BETWEEN BITS 5 AND 6 OF THE HIGH-ORDER

22

 

*

BYTE.

THUS THE MANTISSA IS IN THE RANGE 1. TO 2. EXCEPT

23

 

*

WHEN THE NUMBER IS LESS THAN 2**(-128).

24

 

*

 

 

 

25

 

*

EXPONENT:

THE EXPONENT REPRESENTS POWERS OF TWO. THE

26

 

*

REPRESENTATION IS 2'S COMPLIMENT EXCEPT THAT THE SIGN

27

 

*

BIT (BIT 7) IS COMPLIMENTED. THIS ALLOWS DIRECT COMPARISON

28

 

*

OF EXPONENTS FOR SIZE SINCE THEY ARE STORED IN INCREASING

29

 

*

NUMERICAL SEQUENCE RANGING FROM $00 (-128) TO $FF (+127)

30

 

*

($ MEANS NUMBER IS HEXADECIMAL).

 

31

 

*

 

 

 

32

 

*

REPRESENTATION OF DECIMAL NUMBERS:

THE PRESENT FLOATING

33

 

*

POINT REPRESENTATION ALLOWS DECIMAL NUMBERS IN THE

APPROXIMATE

 

 

 

 

34

 

*

RANGE OF 10**(-38) THROUGH 10**(38) WITH 6 TO 7 SIGNIFICANT

35

 

*

DIGITS.

 

 

36

 

*

 

 

 

37

 

*

 

 

 

38

0003

 

ORG 3

SET BASE PAGE ADRESSES

 

 

 

 

 

 

 

Page 93
Image 93
Apple II manual Mantissa, Exponent

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.