The Stellar Dynamics SD-8516 represents a categorical reimagining of microprocessor architecture. This 16-bit CPU, implemented in AssemblyScript for the VC-3 computer system, delivers performance exceeding conventional silicon constraints through advanced cross-boundary resonance microcascades.
Key Specifications:
The SD-8516 PROGRAMMER'S REFERENCE GUIDE has been developed as a working tool and reference source for those of you who want to maximize your use of the built-in capabilitiesof your VC-3 Computer System. This manual contains the information you need for your programs, from the simplest example allthe way to the most complex. The PROGRAMMER'S REFERENCE GUIDE is designed so that everyone from the beginning BASIC programmer to the professional experienced in SD-8516 machine language can get information to develop his or her own creative programs. At the same time this book shows you how clever your SD-8516 really is.
This REFERENCE GUIDE is not designed to teach the BASIC programming language or the SD-8516 machine language. There is, however, an extensive glossary of terms and a “semi-tutorial” approach to many of the sections in the book. If you don't already have a working knowledge of BASIC and how to use it to program, we suggest that you study the SD-8516 USER'S GUIDE that came with your computer. The USER'S GUIDE gives you an easy to read introduction to the BASIC programming language. If you still have difficulty understanding how to use BASIC then turn to the back of this book (or Appendix N in the USER'S GUIDE) and check out the Bibliography.
The SD-8516 PROGRAMMER'S REFERENCE GUIDE is just that; a reference. Like most reference books, your ability to apply the information creatively really depends on how much knowledge you have about the subject. In other words if you are a novice programmer you will not be able to use all the facts and figures in this book until you expand your current programming knowledge.
What you can do with this book is to find a considerable amount of valuable programming reference information written in easy to read, plain English with the programmer's jargon explained. On the other hand the programming professional will find all the information needed to use the capabilities of the SD-8516 effectively.
WHAT'S INCLUDED?
Our complete “BASIC dictionary” includes Commodore BASIC language commands, statements and functions listed in alphabetical order. We've created a “quick list” which contains all the words and their abbreviations. This is followed by a section containing a more detailed definition of each word along with sample BASIC programs to illustrate how they work. If you need an introduction to using machine language with BASIC programs our layman's overview will get you started. A powerful feature of all VC systems is called the KERNAL. It helps insure that the programs you write today can also be used on the VC-3 system of tomorrow. The Input/Output Programming section gives you the opportunity to use your computer to the limit. It describes how to hook-up and use everything from disk drives, to telecommunication devices called modems. You can explore the world of SPRITES, programmable characters, and high resolution graphics for the most detailed and advanced animated pictures in the microcomputer industry. You can also enter the world of music synthesis and create your own songs and sound effects with the best built-in synthesizer available in any personal computer. If you're an experienced programmer, the soft load language section gives you information about the 64's ability to run C and other high level languages. This is in addition to BASIC.Think of your SD-8516 PROGRAMMER'S REFERENCE GUIDE as a useful tool to help you and you will enjoy the hours of programming ahead of you.
Since the days of the first minicomputers, Stellar Dynamics has been at the forefront of microarchitecture design. The SD-8516 is not simply an iteration upon its predecessors; it is a categorical reimagining of what a “processor” can be when unshackled from quantum locality.
While our earliest designs struggled with resonance cascade instability, the SD-8516 delivers stable, predictable cross-boundary resonance microcascades at clock rates exceeding the theoretical limits of conventional silicon.
These advancements position the Stellar Dynamics SD-8516 as the definitive architecture for next-generation computation: a bridge between classical logic engines and the emergent technologies of multidimensional processing.
The SD-8516 features sixteen 16-bit registers:
| Register | Name | Primary Use |
|---|---|---|
| R0 | A | Accumulator |
| R1 | B | Accumulator |
| R2 | X | Index/General |
| R3 | Y | Index/General |
| R4 | I | Loop/General |
| R5 | J | Loop/General |
| R6 | K | Loop/General |
| R7 | T | Temporary/General |
| R8 | M | Memory Pointer |
| R9 | D | Memory Pointer |
| R10 | E | Extra/General |
| R11 | C | Counter/General |
| R12 | F | Function Register |
| R13 | G | General Purpose |
| R14 | L | General Purpose |
| R15 | Z | General Purpose |
Note: The SD-8516 does not use register pairing except for multiplication operations, which store results in the AB register pair.
Registers are encoded as 4-bit values (0-15), allowing two registers per byte:
Example: ADD A, B encodes as 0x01 (A=0, B=1)
The 16-bit FLAGS register contains:
Arithmetic Flags (Byte 1):
Control Flags (Byte 2):
Layout: Z N C V - - - - H T B E P I S -
| Address Range | Description |
|---|---|
| $0000-$00FF | Zero page / System variables |
| $0100-$DFFF | User program space |
| $E000-$EFFF | KERNAL ROM (4KB) |
| $F000-$F3E7 | Video text buffer (1000 bytes) |
| $F800-$FBFF | Video color buffer (1000 bytes) |
| $E800-$E8FF | Character ROM (2048 bytes) |
The SD-8516 supports 4 banks of 64KB each (256KB total) through special addressing modes:
LDA [I:J] ; Load from bank I, offset J STA [2:$1000] ; Store to bank 2, offset $1000
Bank allocation:
Banks 2 and 3 are free for use in text mode and bank 3 is usually free in the lower-resolution video modes.
| Address | Description |
|---|---|
| $EF00 | Video mode register |
| $EF01 | Column count (40 or 80) |
| $EF02 | Row count (25) |
| $EF03 | Character width (8) |
| $EF04 | Character height (8) |
| $EF05-$EF08 | Hardware clock (32-bit milliseconds) |
| $EF09 | Default character color |
| $EF0A | Cursor color |
| $EF0B | Color palette mode (0=COLORDORE, 1=CGA 5153) |
| $EF10 | Cursor X position |
| $EF11 | Cursor Y position |
| $EF12 | Cursor blink state |
| $EF20 | Keyboard status flags |
| $EF21 | Keyboard buffer count |
| $EF22-$EF31 | Keyboard buffer (16 bytes) |
| Opcode | Mnemonic | Description | Bytes |
|---|---|---|---|
| 00 | LD_IMM | Load immediate word | 3 |
| 01 | LD_IMMB | Load immediate byte | 2 |
| 02 | LD_IMMW | Load immediate word | 3 |
| 03 | LD_MEM | Load from memory (indirect) | 3 |
| 04 | LD_MEMB | Load byte from memory | 3 |
| 05 | LD_MEMW | Load word from memory | 3 |
| 06 | LD_RI | Load from register indirect | 2 |
| 07 | LD_RIB | Load byte from register indirect | 2 |
| 08 | LD_RIW | Load word from register indirect | 2 |
| 09 | ST_MEM | Store to memory | 5 |
| 0A | ST_MEMB | Store byte to memory | 5 |
| 0B | ST_MEMW | Store word to memory | 5 |
Examples:
LDA #$1234 ; Load immediate $1234 into A LDAL #$42 ; Load immediate byte $42 into AL LDA [$F000] ; Load word from address $F000 STA [2:$1000] ; Store A to bank 2, offset $1000
| Instruction | Description | Flags Affected |
|---|---|---|
| ADD | Add | Z, N, C, V |
| SUB | Subtract | Z, N, C, V |
| MUL | Multiply (result in AB) | Z, N |
| DIV | Divide (quotient in A, remainder in B) | Z, N |
| MOD | Modulo | Z, N |
| INC | Increment | Z, N |
| DEC | Decrement | Z, N |
| Instruction | Description | Flags Affected |
|---|---|---|
| AND | Bitwise AND | Z, N |
| OR | Bitwise OR | Z, N |
| XOR | Bitwise XOR | Z, N |
| NOT | Bitwise NOT | Z, N |
| TEST | Bitwise AND (no write) | Z, N |
| Instruction | Description | Flags Affected |
|---|---|---|
| SHL | Shift left | Z, N, C |
| SHR | Shift right | Z, N, C |
| ROL | Rotate left | Z, N, C |
| ROR | Rotate right | Z, N, C |
| Instruction | Description | Flags Affected |
|---|---|---|
| CMP | Compare (subtract, discard result) | Z, N, C, V |
| JMP | Unconditional jump | None |
| JZ | Jump if zero | None |
| JNZ | Jump if not zero | None |
| JC | Jump if carry set | None |
| JNC | Jump if carry clear | None |
| Instruction | Description |
|---|---|
| CALL | Call subroutine (push IP, jump) |
| RET | Return from subroutine (pop IP) |
| PUSH | Push register to stack |
| POP | Pop from stack to register |
| PUSHA | Push all registers |
| POPA | Pop all registers |
| INT | Software interrupt |
| Instruction | Description |
|---|---|
| SSI | Enable Sound System Interrupts |
| CSI | Clear Sound System Interrupts |
| SEC | Set carry flag |
| CLC | Clear carry flag |
| SEZ | Set zero flag |
| CLZ | Clear zero flag |
| SEN | Set negative flag |
| CLN | Clear negative flag |
| SEV | Set overflow flag |
| CLV | Clear overflow flag |
| Instruction | Description |
|---|---|
| CART | Cartridge trigger, used for Cartridge BASIC and others. |
| YIELD | Poll UI, System Clock, Sound Chip, Video Chip, and others |
| NOP | No operation |
| HALT | Halt CPU (set H flag) |
The SD-8516 is paired with the SD-450 sound subsystem, featuring 4 independent voices with ADSR envelopes.
Each voice occupies 16 bytes of memory in Bank 1:
| Offset | Register | Description |
|---|---|---|
| +$00 | FREQ_LO | Frequency low byte |
| +$01 | FREQ_HI | Frequency high byte |
| +$02 | GATE | Waveform/gate control |
| +$03 | VOLUME | Volume (0-255) |
| +$04 | ATTACK | Attack time |
| +$05 | DECAY | Decay time |
| +$06 | SUSTAIN | Sustain level |
| +$07 | RELEASE | Release time |
| +$08 | DATA1 | Pulse width / noise type |
| +$09-$0F | Reserved | Future expansion |
Voice base addresses:
$1ED00$1ED10$1ED20$1ED30Gate register values:
The Attack-Decay-Sustain-Release envelope shapes each note:
Example:
; Play middle C on voice 0 LDA $112B ; C4 frequency (262 Hz / 0.0596) STA [$1ED00] ; FREQ_LO/HI LDAL $01 ; Square wave STAL [$1ED02] ; GATE LDAL $4D ; ~30% volume STAL [$1ED03] ; VOLUME
The VC-3 supports both text and graphics modes:
| Mode | Resolution | Colors | Description |
|---|---|---|---|
| 1 | 40×25 text | 16 | Character mode, COLORDORE palette |
| 2 | 80×25 text | 16 | High-res text, CGA 5153 palette |
| 3 | 320×200 | 16 | Packed pixels (4-bit) |
| 4 | 256×224 | 256 | SNES-style mode |
| 8 | 128×128 | 16 | Low-res mode |
Mode 1 (40×25):
$F000-$F3E7 (1000 bytes)$F800-$FBE7 (1000 bytes)$E800-$E8FF (256 characters × 8 bytes)
Color byte format: (bg_color << 4) | fg_color
Mode 2 (80×25):
Mode 3 (320×200×16):
$00000-$07CFF (32,000 bytes)$F000-$F02F (16 colors × 3 bytes RGB)Pixel addressing:
offset = (y × 160) + (x ÷ 2) address = Bank 2 + offset
Mode 4 (256×224×256):
$00000-$DFFFF (57,344 bytes)$F000-$F2FF (256 colors × 3 bytes RGB)
Each palette entry is 3 bytes (RGB):
Offset +0: Red (0-255)
Offset +1: Green (0-255)
Offset +2: Blue (0-255)
The KERNAL ROM provides system services at $E000:
GETKEY - Read keyboard buffer
IN: None
OUT: A = ASCII character (if available)
B = previous buffer count
WRITE_CHAR - Write character to screen
IN: A = character code
X = column (0-39/79)
Y = row (0-24)
WRITE_STRING - Write null-terminated string
IN: A = string address (low byte)
B = string address (high byte)
X = column
Y = row
CTOXY - Move cursor
IN: X = column
Y = row
GETCURSOR - Read cursor position
OUT: X = column
Y = row
STRLEN - Get string length
IN: A = string address (low byte)
B = string address (high byte)
OUT: A = length (low byte)
B = length (high byte)
C = carry flag if > 256 bytes
BYTETOSTR - Convert byte to decimal string
IN: A = byte value (0-255)
X = destination address (low)
Y = destination address (high)
OUT: Zero-terminated string at XY
Labels:
loop: ; Define label
JMP @loop ; Reference label with @
Immediates:
LDA #$1234 ; Hexadecimal LDA #100 ; Decimal LDAL #'A' ; Character literal
Comments:
; Single-line comment
Data Directives:
.equ CONSTANT $1234 ; Define constant .bytes "Hello", 0 ; Byte array .word $1234, $5678 ; Word array
Hello World:
LDA @MSG
LDX #0
LDY #0
CALL @WRITE_STRING
RET
MSG:
.bytes "HELLO WORLD!", 0
Fill Screen with Stars:
LDAL #'*' ; Character to draw
LDX #0 ; Start column
LDY #0 ; Start row
loop:
CALL @WRITE_CHAR
INC X
CMP X, #40
JNZ @loop
LDX #0 ; Reset column
INC Y
CMP Y, #25
JNZ @loop
RET
Random Number Generator (Galois LFSR):
.equ RND_SEED $EFF0
rnd_init:
LDA [$EF05] ; Hardware clock
LDB [$EF06]
XOR A, B
STA [@RND_SEED]
RET
rnd_byte:
LDA [@RND_SEED]
MOV B, A
ANDB BL, $01 ; Check LSB
SHR A ; Shift right
CMPB BL, $00
JZ @no_xor
LDB $B400 ; Polynomial
XOR A, B
no_xor:
STA [@RND_SEED]
RET
Measured Performance:
Optimization Notes:
Architecture: WebAssembly-based virtual CPU Languages: AssemblyScript (CPU core), JavaScript (I/O systems) Memory Model: 4 banks of 64k RAM Audio Backend: SD-450 4 voice polyphonic 5 waveform Audio System Video Backend: 9 mode Text and Graphics pixel-perfect render engine
—
SD-8516 Technical Manual - Revision 1.0 Copyright © 2025 Appledog Hu All specifications subject to change as quantum resonance research continues.