Skip to content

Instantly share code, notes, and snippets.

View dfischer's full-sized avatar

0x44 0x46 dfischer

View GitHub Profile
@dfischer
dfischer / octal_x86.txt
Created March 21, 2021 04:08 — forked from seanjensengrey/octal_x86.txt
x86 is an octal machine
# source:http://reocities.com/SiliconValley/heights/7052/opcode.txt
From: mark@omnifest.uwm.edu (Mark Hopkins)
Newsgroups: alt.lang.asm
Subject: A Summary of the 80486 Opcodes and Instructions
(1) The 80x86 is an Octal Machine
This is a follow-up and revision of an article posted in alt.lang.asm on
7-5-92 concerning the 80x86 instruction encoding.
The only proper way to understand 80x86 coding is to realize that ALL 80x86
@dfischer
dfischer / coinswap.txt
Created March 19, 2021 23:40 — forked from adlai/coinswap.txt
Adapting CoinSwap for a Fungibility Market
In the protocol all parties are assumed to have private communications channels.
Phase 0. Sets up the escrows and their timeout refunds.
Phase 1. Makes it so that if Bob gets paid there is no way for Alice to fail to get paid.
Phase 2. Just releases the escrows directly because everyone is happy that cheating isn't possible.
Alice Bob
=========================================================
0. Compute TX_0: A>2of2{A,B'} | Compute TX_1: B>2of2{B,A'} \
1. Send TX_0 TXID ------------> |
@dfischer
dfischer / null.py
Created March 10, 2021 17:50 — forked from kernc/null.py
Null object pattern (Python)
"""
This module provides the Null class for the null object design pattern.
"""
from collections import MutableMapping, MutableSequence
class _MetaNull(type): pass
class Null(type):
"""Null object design pattern.
@dfischer
dfischer / lbForth.c
Created February 8, 2021 13:38 — forked from lbruder/lbForth.c
A minimal Forth compiler in ANSI C
/*******************************************************************************
*
* A minimal Forth compiler in C
* By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com
* Release 2014-04-04
*
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial
*
* PUBLIC DOMAIN
*
@dfischer
dfischer / SIMPL_MSP430ASM_6
Created February 6, 2021 09:19 — forked from monsonite/SIMPL_MSP430ASM_6
SIMPL - a tiny forth like language implemented in under 900 bytes of MSP430 Assembly Language (For MSP430G2553 Launchpad)
;-------------------------------------------------------------------------------
; SIMPL - a very small Forth Inspired Extensible Language
; Implementing the Initialisation, TextTead, TextEval and UART routines in MSP430 assembly language
;
; A Forth-Like Language in under 1024 bytes
; Ken Boak May 22nd/23rd 2017
; Loops, I/O, Strings and Delays added
; This version 888 bytes
; SIMPL_430ASM_6
@dfischer
dfischer / TinyForth.asm
Created February 6, 2021 09:18 — forked from anonymous/TinyForth.asm
A Tiny Implementation of forth in AVR assebly language by T. Nakagawa - assembles to about 1800 bytes
; Tiny FORTH
; T. NAKAGAWA
; 2004/08/02-05
; Register
; r0: temporary
; r1-15: input buffer (terminated by 0x00, separated by 0x20)
; r16: temporary
; r17: temporary
; r18: temporary
; r19: temporary
@dfischer
dfischer / SIMPL_430ASM_5
Created February 6, 2021 08:43 — forked from monsonite/SIMPL_430ASM_5
A Tiny Forth-Like interactive language for MSP430
;-------------------------------------------------------------------------------
; SIMPL - a very small Forth Inspired Extensible Language
; Implementing the Initialisation, TextTead, TextEval and UART routines in MSP430 assembly language
;
; A Forth-Like Language in under 1024 bytes
; Ken Boak May 2017
; Loops, I/O, Strings and Delays added
; This version 888 bytes
; SIMPL_430ASM_5
I believe this is correct. Please let me know if there are errors.
X | - 0 +
---------
- | + 0 -
0 | - 0 +
+ | 0 + -
Call this gate "R". It's universal, assuming we have fan-out (trit-copying) and the constants. That is, a circuit of R's can be built
to represent any function f: T^n -> T where T = {-, 0, +}.
@dfischer
dfischer / README.md
Created September 22, 2020 03:51 — forked from hornc/README.md
Thue-Mirr esolang Interpreter

Thue-Mirr interpreter,

https://esolangs.org/wiki/Thue-Mirr

usage: thue-mirr.py [-h] [--debug] [--char] [--num NUM] file

Thue-Mirr https://esolangs.org/wiki/Thue-Mirr Interpreter v1.0 by Salpynx. 2019 CC0

positional arguments:
 file source file to process
@dfischer
dfischer / README.md
Created September 22, 2020 03:51 — forked from hornc/README.md
Thue-Mirr esolang Interpreter

Thue-Mirr interpreter,

https://esolangs.org/wiki/Thue-Mirr

usage: thue-mirr.py [-h] [--debug] [--char] [--num NUM] file

Thue-Mirr https://esolangs.org/wiki/Thue-Mirr Interpreter v1.0 by Salpynx. 2019 CC0

positional arguments:
 file source file to process