SWEET16
   HOME

TheInfoList



OR:

SWEET16 is an interpreted
byte-code Bytecode (also called portable code or p-code) is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references (normall ...
instruction set invented by
Steve Wozniak Stephen Gary Wozniak (; born August 11, 1950), also known by his nickname "Woz", is an American electronics engineer, computer programmer, philanthropist, inventor, and entrepreneur, technology entrepreneur. In 1976, with business partner Steve ...
and implemented as part of the
Integer BASIC Integer BASIC is a BASIC interpreter written by Steve Wozniak for the Apple I and Apple II computers. Originally available on cassette for the Apple I in 1976, then included in ROM on the Apple II from its release in 1977, it was the first versi ...
ROM in the
Apple II series The Apple II series (trademarked with square brackets as "Apple ] ''" and rendered on later models as "Apple //") is a family of home computers, one of the first highly successful mass-produced microcomputer products, designed primaril ...
of computers. It was created because Wozniak needed to manipulate 16-
bit The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represente ...
pointer data, and the Apple II was an 8-bit computer. SWEET16 was not used by the core BASIC code, but was later used to implement several utilities. Notable among these was the line renumbering routine, which was included in the Programmer's Aid #1 ROM, added to later Apple II models and available for user installation on earlier examples. SWEET16 code is executed as if it were running on a 16-bit
processor Processor may refer to: Computing Hardware * Processor (computing) **Central processing unit (CPU), the hardware within a computer that executes a program *** Microprocessor, a central processing unit contained on a single integrated circuit (I ...
with sixteen internal 16-bit
little-endian In computing, endianness, also known as byte sex, is the order or sequence of bytes of a word of digital data in computer memory. Endianness is primarily expressed as big-endian (BE) or little-endian (LE). A big-endian system stores the most si ...
registers, named through . Some registers have well-defined functions: *  – accumulator *  – subroutine
stack pointer In computer science, a call stack is a stack data structure that stores information about the active subroutines of a computer program. This kind of stack is also known as an execution stack, program stack, control stack, run-time stack, or mach ...
*  – stores the result of all comparison operations for
branch A branch, sometimes called a ramus in botany, is a woody structural member connected to the central trunk of a tree (or sometimes a shrub). Large branches are known as boughs and small branches are known as twigs. The term ''twig'' usually ...
testing *  –
status register A status register, flag register, or condition code register (CCR) is a collection of status flag bits for a processor. Examples of such registers include FLAGS register in the x86 architecture, flags in the program status word (PSW) register in ...
*  – program counter The 16 virtual registers, 32 bytes in total, are located in the
zero page The zero page or base page is the block of memory at the very beginning of a computer's address space; that is, the page whose starting address is zero. The size of a page depends on the context, and the significance of zero page memory versus h ...
of the Apple II's real, physical memory map (at –), with values stored as low byte followed by high byte. The SWEET16 interpreter itself is located from to in the
Integer BASIC Integer BASIC is a BASIC interpreter written by Steve Wozniak for the Apple I and Apple II computers. Originally available on cassette for the Apple I in 1976, then included in ROM on the Apple II from its release in 1977, it was the first versi ...
ROM. According to Wozniak, the SWEET16 implementation is a model of frugal coding, taking up only about 300
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable uni ...
s in memory. SWEET16 runs at about one-tenth the speed of the equivalent native
6502 The MOS Technology 6502 (typically pronounced "sixty-five-oh-two" or "six-five-oh-two") William Mensch and the moderator both pronounce the 6502 microprocessor as ''"sixty-five-oh-two"''. is an 8-bit microprocessor that was designed by a small te ...
code.


Operators


References


External links


Call-A.P.P.L.E. Wozpak II
— 1979 '' Call-A.P.P.L.E.'' booklet that includes "SWEET 16 Introduction" by Dick Sedgewick and a version of "SWEET 16: The 6502 Dream Machine" by
Steve Wozniak Stephen Gary Wozniak (; born August 11, 1950), also known by his nickname "Woz", is an American electronics engineer, computer programmer, philanthropist, inventor, and entrepreneur, technology entrepreneur. In 1976, with business partner Steve ...
with longer descriptions of each opcode * {{DEFAULTSORT:Sweet16 Apple II software Interpreters (computing) Register-based virtual machines