Difference between revisions of "Sweet 16"
(Created page with "Sweet 16 Some programs have been using Sweet 16, a pseudo processor implemented originally by Steve Wozniak https://en.wikipedia.org/wiki/Steve_Wozniak Sweet 16 was a pseudo...")
Revision as of 17:43, 8 September 2019
Some programs have been using Sweet 16, a pseudo processor implemented originally by Steve Wozniak https://en.wikipedia.org/wiki/Steve_Wozniak Sweet 16 was a pseudo 16-bit processor, with 16 16-bit registers. It required 32-bytes in the Zero page of the 6502, to hold the values of these registers and needed less instructions than the 6502 for most programs. Typical programs written in SWEET-16 needed about half the size and 5 to 10 times as much time as pure 6502 assembly code. The Sweet 16 executer was implemented in the ROM of the original Apple ][. 6502 assembler and Sweet 16 could be mixed easily: Sweet 16 code was inlined and simply preceeded by a function call to the executer, which was located at a known address (0xF689 or in Apple speech $F689) could easily be started by a subroutine call. Despite its simplicity, Sweet 16 achieved an amazing code density, which is still hard to beat today. For more information on SWEET-16, see http://www.6502.org/source/interpreters/sweet16.htm