home | links
Garth's own articles
- simple methods for multitasking without a multitasking OS, for systems that lack the resources
for a multitasking OS, or where hard realtime requirements would rule one out anyway
- program structures in 65c02 assembly, through macros Improve assembly-language
productivity and maintainability, and reduce bugs, with, in most cases, absolutely no penalty in run speed or memory. Absolutely no
control is lost.
- Self-modifying code on 65xx
- Large look-up tables for hyperfast, accurate 16-Bit scaled-integer math, including trig & log
functions. You can probably implement them even if your computer is already built up, the address space is full, and your I/O is
almost all taken. See how. Besides the tables themselves given in Intel Hex files, this section of the website has the
following pages:
- 6502 PRIMER: Building your own 6502 computer This is actually a set of 22 articles,
with many of them applying equally well to other computers too:
- 6502 stacks treatise 6502 Stacks: More than you thought! This is
actually a set of 19 articles plus appendices:
- definition and very basics
- subroutine return addresses and nesting
- interrupts (plus link to interrupts primer)
- virtual stacks and various ways to implement them
- stack addressing, both hardware and virtual
- passing parameters, and comparison of methods
- having a subroutine find inlined data, using the return address
- doing math and other operations by stacks in RPN
- RPN efficiency
- 65c02's added instructions that are useful in stacks
- using RTS, RTI,
and JSR to synthesize other instructions
- where-am-I routines, for self-relocatable code
- a peek at the 816's new instructions and capabilities that are relevant to stacks, and 65c02 code
which partially synthesizes some of them
- local variables and environments
- recursion
- enough stack space?
- compiling or assembling program structures
- stack potpourri
- for further reading
Appendix A. StackOps.ASM
Appendix B. 816StackOps.ASM
Appendix C. RPN calculators, a production test application, assembly language, and Forth
Appendix D. My Problem With the C Programming Language (You don't have to agree)
- Circuit Potpourri This is actually part of the 6502 primer above, but I've
been told it needs more attention almost as a stand-alone article.
- article on interrupts. 6502 has outstanding interrupt performance compared to other
processors. Take advantage! (Enjoy my out-of-date cartoons, too! :) ) It's also
on 6502.org
- 65c02 interrupt service in high-level Forth, with zero overhead! (also
on 6502.org)
- The 65816 microprocessor: Common Misunderstandings, Plus Attractions
- my project pages on 6502.org. The workbench computer portion is outdated,
so use this page instead for that. I use it as kind of a Swiss army knife for the workbench.
- "Tip of the Day" column for 6502 development (42 tips)
- unsigned division of a 32-bit dividend by a 16-bit
divisor, resulting in a 16-bit quotient and a 16-bit remainder. Presented for the 65C02 (with changes for use on 6502) and 65816,
with notes of interest to Forth users (for UM/MOD).
- unsigned multiplication (on forum), with 16-bit factors and
32-bit result, correcting a bug in the public-domain 6502 Forth multiplication, as the division article above
- D< bug in common
Forths, plus a fix (on forum)
- hex-to-decimal conversion (There's more discussion on it at
this forum topic.)
- quick-n-dirty 8-bit log conversion forum post, with
an improvement four posts down from there, and the inverse log
function on the next page, here
- Efficient nybble swap on 6502, taking only 8 bytes and 12 clock cycles, and
no variables, no stack usage, no look-up table, no X or Y usage. It uses only the accumulator and status register.
- Assembly Language: Still Relevant Today
plus: My feature requests for if you write an assembler
- NMOS v. CMOS 6502 differences
- How I got into 6502 and workbench computing
- How I got into Forth
- My workbench computers
- my slide rules I used in my early years, plus a couple of recent acquisitions of
tiny ones (including a working tie-clasp slide rule!)
- How I got into the HP-41cx calculator/computer
- My HP-41 alarms and daytimer program
- My HP-41 program to track time spent on various jobs
- concise comparison of synchronous-serial interface types
(forum post)
- 65SIB spec. (serial interface bus, compatible with
SPI but more flexible)
- SS22 spec. (6522 synchronous-serial data link between
computers)
- I2C-6: proposed hobbyist-friendly connector standard for
small I²C modules, suitable for common perfboard
- SPI-10: proposed hobbyist-friendly connector standard for
small SPI modules, suitable for common perfboard
- RS-232 primer
- 6502 v. 65816 code length comparison
- 6502 v. PIC16 code length comparisons
- techniques for construction of reliable high-speed digital
circuits (forum topic, with lots of good resources)
- raster graphics on an analog oscilloscope
- 32-bit DO LOOP & related words in 6502 ITC Forth
- ALLOC, FREE, and
RESIZE in Forth, for a buffer chain that never gets fragmented
- Why I do this web site (and why I do it the way I do)
- Things I do and don't like, relating to the computer hobbyist (You don't have to agree.)
- How to write your résumé (Take it from someone who had to read a
thousand of them and hire a lot of technicians and a few engineers.)
- my paraffin-and-graphite chain-lube method which gives me 20,000+ miles on a chain and cassette,
and keeps itself clean
- a bicycle potpourri, with my early cycling history (brief), plus
musings on industry progress, unexpected solutions and facts, physiology, safety, science, terminology, and short stories that are cool,
funny, scary, or just interesting
last updated Nov 18, 2024