Skip to content

Instantly share code, notes, and snippets.

View wraithgar's full-sized avatar

Gar wraithgar

  • GitHub Staff
  • Tri-Cities, WA
View GitHub Profile
@wraithgar
wraithgar / nespad.a86
Created February 6, 2023 15:57
nes pad DOS driver
.radix 16
org 100
clockoff equ 000000xb
pad_init equ 001001xb
pad_clockon equ 010010xb
pad_power equ 100100xb
const breads = [
['toast','pieces of toast'],
['muffin','muffins'],
['teacake','teacakes'],
['bun','buns'],
['bap','baps'],
['baguette','baguettes'],
['bagel','bagels'],
['croissant','croissants'],
['crumpet','crumpets'],
#!/usr/bin/env node
const https = require('node:https')
const es = require('event-stream')
const JSONStream = require('JSONStream')
const main = async () => {
const r = []
for (let i = 0; i < 10; i++) {
r.push(new Promise((resolve, reject) => {
if (process.argv[2] === 'stream') {
@wraithgar
wraithgar / colors.js
Created April 5, 2024 17:22
3-4 bit and 256-color ansi output
console.log('3-4 bit:')
const lows = []
for (let c = 30;c<=37;c++) {
lows.push(`\x1b[${c}m${c}\x1b[0m`)
}
console.log(lows.join(' '))
console.log('256 color:')
let mediums = []
for (let c = 0;c<=231;c++) {
if (!(c % 16)) { // new row