Skip to content

Instantly share code, notes, and snippets.

Avatar

J.B. Langston jblang

  • DataStax
  • Dallas, TX
View GitHub Profile
@jblang
jblang / pcjr.md
Created Jun 5, 2019
IBM PCjr Resources
View pcjr.md
@jblang
jblang / lcd.bas
Created Nov 27, 2018
AppleSoft BASIC program to control an LCD
View lcd.bas
10 IR = 47104: REM CONTROL REGISTER $B800
20 DR = 47360: REM DATA REGISTER $B900
30 GOSUB 100
40 INPUT "WHAT DO YOU WANT TO PRINT? ";S$
50 GOSUB 200
60 END
100 REM INITIALIZE LCD
110 FOR I = 1 TO 4
120 POKE IR,56: REM 8-BIT BUS, 5X8 FONT, 2 LINES
@jblang
jblang / a2apple30th.asm
Last active Dec 31, 2021
Apple 30th Anniversary
View a2apple30th.asm
; Apple 30th Anniversary Tribute for Apple II by Dave Schmenk
; Original at https://www.applefritter.com/node/24600#comment-60100
; Disassembled, Commented, and ported to Apple II by J.B. Langston
; Assemble with `64tass -b -o a2apple30th.bin -L a2apple30th.lst`
KEYBD = $C000 ; keyboard register
STROBE = $C010 ; keyboard strobe register
PTR = $06 ; pointer to current image
* = $0C00
@jblang
jblang / disz80.asm
Created May 14, 2018
John Kerr's DIS-Z80 with Comments
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
@jblang
jblang / apa102.asm
Last active Feb 23, 2018
Z80 APA102 LED control via AY2149 GPIO port
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
@jblang
jblang / mandel.asm
Last active Oct 19, 2021
Z80 Color Mandelbrot
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
@jblang
jblang / rc2014.md
Last active Jun 10, 2021
RC2014 Links
View rc2014.md
@jblang
jblang / ROMDump.ino
Created Jan 4, 2018
Arduino ROM dump routine
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);