Skip to content

Instantly share code, notes, and snippets.

View sergev's full-sized avatar

Serge Vakulenko sergev

View GitHub Profile
@sergev
sergev / hello.lst
Created March 5, 2025 00:01
hello.pascal compiled with besmc
04 MAP 25 16.00
ЙOKCEЛ БЭCM-6/5 ШИФP-12
MOHИTOPHAЯ CИCTEMA ′Д Y Б H A′ - 20/10/88
@sergev
sergev / retrobsd-startup-syscalls.log
Created February 9, 2025 23:44
Log of syscalls at RetroBSD startup
Syscall Return
------------------------------------------------------------------------------------
execv(7f008040 "/sbin/init", 7f008058) (no return)
gettimeofday(7f01ff30, 00000000) return 0
getuid() return 0
getpid() return 1
sigaction(12, 7f01ff2c, 7f01ff20) return 0
sigaction(15, 7f01040c, 00000000) return 0
sigaction(18, 7f01ff2c, 7f01ff20) return 0
sigaction(17, 7f01ff2c, 7f01ff20) return -1 = 0xffffffff
@sergev
sergev / man_or_boy.trace
Created August 23, 2024 07:39
Trace of Man-or-boy test on Algol X1
This file has been truncated, but you can view the full file.
Memory Write [23500] = 00 00 00140
Memory Write [23501] = 52 20 23600
Memory Write [23502] = 42 20 00001
Memory Write [23503] = 00 00 00131
Memory Write [23504] = 12 20 00241
Memory Write [23505] = 00 00 00020
Memory Write [23506] = 12 20 00241
Memory Write [23507] = 00 00 00043
Memory Write [23510] = 00 00 00125
Memory Write [23511] = 52 20 23556
@sergev
sergev / man-or-boy.trace
Created August 20, 2024 06:45
Trace of man-or-boy test
A called, k = 10
B called, k = 10
k := 9
A called, k = 9
B called, k = 9
k := 8
A called, k = 8
B called, k = 8
k := 7
A called, k = 7
@sergev
sergev / all-minifloat8.txt
Created November 2, 2023 00:07
List of all minifloat8 values
0 0000 000 = 0.000
0 0000 001 = 0.001953
0 0000 010 = 0.003906
0 0000 011 = 0.005859
0 0000 100 = 0.007812
0 0000 101 = 0.009766
0 0000 110 = 0.01172
0 0000 111 = 0.01367
0 0001 000 = 0.01562
0 0001 001 = 0.01758
@sergev
sergev / rp2040-hello-uart-quick.trace
Created October 3, 2023 07:36
Run 'hello world' on RP2040 simulator, skip ROM
RP2040 Simulator, Version 0.1
Code 0x10000000-0x10001e23 size 7716 bytes
Code 0x10001e24-0x10001fa3 size 384 bytes
(0) Read ROM [0] = 20041f00
(1) msp = 20041f00
(2) 100001f6: 481f ldr r0, [pc, #124]
(2) Read Flash [10000274] = d0000000
(3) r0 = d0000000
(4) 100001f8: 6800 ldr r0, [r0, #0]
(4) Read CPUID = 00000000
@sergev
sergev / rp2040-hello-uart-full.trace
Created October 3, 2023 07:27
Run 'hello world' on RP2040 simulator, with full tracing
This file has been truncated, but you can view the full file.
RP2040 Simulator, Version 0.1
Code 0x10000000-0x10001e23 size 7716 bytes
Code 0x10001e24-0x10001fa3 size 384 bytes
(0) Read ROM [0] = 20041f00
(1) msp = 20041f00
(1) Read ROM [4] = 000000eb
(3) 000000ea: 487d ldr r0, [pc, #500]
(3) Read ROM [2e0] = d0000000
(4) r0 = d0000000
(5) 000000ec: 6801 ldr r1, [r0, #0]
@sergev
sergev / all-positive-bfloat16.txt
Created March 2, 2023 01:23
List of all bfloat16 values, non-negative
This file has been truncated, but you can view the full file.
0 00000000 0000000 = 0.0
0 00000001 0000000 = 1.175e-38
0 00000001 0000001 = 1.185e-38
0 00000001 0000010 = 1.194e-38
0 00000001 0000011 = 1.203e-38
0 00000001 0000100 = 1.212e-38
0 00000001 0000101 = 1.221e-38
0 00000001 0000110 = 1.231e-38
0 00000001 0000111 = 1.24e-38
0 00000001 0001000 = 1.249e-38
@sergev
sergev / dispak-copy-paste-detector.txt
Created August 26, 2022 23:31
Find code duplications in besm6/dispak sources.
$ cd dispak
$ pmd cpd --minimum-tokens 100 --language cpp --files .
Found a 21 line (327 tokens) duplication in the following files:
Starting at line 583 of /Users/vak/Project/Besm-6/dispak/dispak/./encoding.c
Starting at line 1093 of /Users/vak/Project/Besm-6/dispak/dispak/./encoding.c
static unsigned char tab0 [256] = {
/* 00 - 07 */ 0, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
/* 08 - 0f */ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
/* 10 - 17 */ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
@sergev
sergev / mac-m1-mini-system-info.txt
Created February 3, 2022 02:34
Configuration of Mac M1 mini as reported by system_profiler
$ system_profiler -detailLevel mini
Apple Pay:
Apple Pay Information:
Platform ID: N5B2M002C3A50000
SEID: 040F305B636480021015133413308606BDD1D899F7E660AE
Device: 0xd2
Production Signed: Yes
Restricted Mode: No
Hardware: 0x00000007