View disz80.asm
SECTION code_clib
PUBLIC disz80
PUBLIC _disz80
EXTERN fputc_cons
; This code is been found in a ZX Spectrum tool called UTILITY3 v1.3
View disasm.c
#include <stdint.h>
char registers[] = {
'B' +0x80,
'C' +0x80,
'D' +0x80,
'E' +0x80,
'H' +0x80,
'L' +0x80,
'(','C',')' +0x80,
View apa102.asm
; Control APA102 LEDs attached to the YM2149 sound chip's
; IO port A on pins 0 (data) and 1 (clock) by bit banging a shift register
; Yes, I have turned my RC2014 into the world's most Rube Goldbergesque Arduino
ymaddr equ 0d8h ; address port on YM2149
ymdata equ 0d0h ; data port on YM2149
mixer equ 7h ; mixer/IO control register
iodira equ 40h ; port A direction bit
View mandel.asm
;
; Compute a Mandelbrot set on a simple Z80 computer.
;
; From https://rosettacode.org/wiki/Mandelbrot_set#Z80_Assembly
; Adapted to CP/M and colorzied by J.B. Langston
; Latest version at https://gist.github.com/jblang/3b17598ccfa0f7e5cca79ad826a399a9
; Assemble with sjasm
;
; Porting this program to another Z80 platform should be easy and straight-
; forward: The only dependencies on my homebrew machine are the system-calls
View rc2014.md
View ROMDump.ino
#define bytesPerLine 16
#define dataSize 131072
#define A16 10
#define _CE 11
#define _OE 12
#define _WE 13
void setupPorts() {
// Set disable writing and output, enable chip
digitalWrite(_WE, HIGH);
View new_ram.v
module ram(clk, addr, data_in, data_out, cs, we);
parameter ADDR_WIDTH = 11;
parameter DATA_WIDTH = 8;
parameter INIT_FILE = "";
input clk;
input [ADDR_WIDTH-1:0] addr;
input [DATA_WIDTH-1:0] data_in;
output reg [DATA_WIDTH-1:0] data_out;
View test.asm
leds = $D000
dips = $D001
* = $F000
begin lda dips
sta leds
jmp begin
* = $FFFA
View ram.v
module ram(clk, addr, data_in, data_out, cs, we);
parameter ADDR_WIDTH = 11;
parameter DATA_WIDTH = 8;
parameter INIT_FILE = "";
input clk;
input [ADDR_WIDTH-1:0] addr;
input [DATA_WIDTH-1:0] data_in;
output [DATA_WIDTH-1:0] data_out;