Skip to content

Instantly share code, notes, and snippets.

Avatar

J.B. Langston jblang

  • DataStax
  • Dallas, TX
View GitHub Profile
@jblang
jblang / a2advgraf.bas
Last active February 1, 2022 06:59
AppleSoft Advanced Graphics Techniques
View a2advgraf.bas
1 REM Advanced Graphics Techniques--Part II by Bob Boothe
2 REM 80 Microcomputing Magazine, May 1981, Page 119-142
3 REM https://archive.org/details/80-microcomputing-magazine-1981-05/page/n121/mode/2up
4 REM Converted to AppleSoft by J.B. Langston, January 2022
10 HOME : HGR : HCOLOR= 3: POKE 49234,0
20 PI = 3.14:XC = 139:YC = 95:SC = YC
30 R1 = SC:R2 = SC:V = 18: GOSUB 100: GOSUB 2000
40 GOSUB 200: GOSUB 300: GOSUB 400: GOSUB 500: GOSUB 600
50 SD = 76:TD = 3:TM = 2: GOSUB 700
60 SD = 60:TD = 2:TM = 2: GOSUB 700
@jblang
jblang / pcjr.md
Created June 5, 2019 12:57
IBM PCjr Resources
View pcjr.md
@jblang
jblang / lcd.bas
Created November 27, 2018 18:53
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 January 18, 2023 02:46
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 01:04
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 February 23, 2018 00:07
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 October 7, 2022 06:59
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 November 25, 2022 20:27
RC2014 Links
View rc2014.md