Skip to content

Instantly share code, notes, and snippets.

View Juvar1's full-sized avatar

Juvar1

  • Turku, Finland
View GitHub Profile
@Juvar1
Juvar1 / tinybasic.c
Last active July 25, 2023 03:00 — forked from pmachapman/tinybasic.c
A tiny BASIC Interpreter
/* A tiny BASIC interpreter */
// heavily modified from:
// https://gist.github.com/pmachapman/661f0fff9814231fde48
//
// Now it works with doubles instead of ints. Also fixed some bugs.
#include <string.h>
#include <stdio.h>
#include <setjmp.h>
@Juvar1
Juvar1 / run.py
Last active May 2, 2018 14:05 — forked from mumrah/run.py
Python script to decode AX.25 from KISS frames over a serial TNC without kiss module
import hexdump
import serial
import struct
def decode_addr(data, cursor):
(a1, a2, a3, a4, a5, a6, a7) = struct.unpack("<BBBBBBB", data[cursor:cursor+7])
hrr = a7 >> 5
ssid = (a7 >> 1) & 0xf
ext = a7 & 0x1