Skip to content

Instantly share code, notes, and snippets.

View Iftimie's full-sized avatar
🐒

Iftimie Florentin Alexandru Iftimie

🐒
  • Bucharest, Romania
View GitHub Profile
$ 1 0.000005 382.76258214399064 50 5 43 5e-11
! 74177 0 Clk,/Ld,/Clr,A,B,C,D QA,QB,QC,QD 74177\scounter ??0????\s????\q0000\n?0?ABCD\s????\qABCD\n-??????\s0ABC\q1ABC\n-??????\s10AB\q01AB\n-??????\s110A\q001A\n-??????\s1110\q0001\n-??????\s1111\q0000\n???????\sABCD\qABCD\n
208 752 -96 848 -96 0 74177 5 5 5 0
R 752 -96 704 -96 1 2 8000 2.5 2.5 0 0.5
R 752 -32 704 -32 0 0 40 5 0 0 0.5
R 752 -64 704 -64 0 0 40 5 0 0 0.5
208 752 160 848 160 0 74177 5 0 0 0
w 848 0 848 128 0
w 848 128 752 128 0
w 752 128 752 160 0
@Iftimie
Iftimie / JMP CMP.txt
Created February 21, 2026 17:47
JMP CMP
$ 3 1.5625e-8 382.76258214399064 50 5 43 5e-11
x 3584 876 3938 879 4 48 ProgramCounter
R 3792 528 3744 528 0 0 40 5 0 0 0.5
w 3840 528 3872 528 0
207 3872 528 3920 528 4 CLK
s 3792 528 3840 528 0 1 true
207 3952 608 4000 608 4 EXEC
I 3856 608 3952 608 0 0.5 5
w 3824 608 3856 608 0
w 3824 672 3824 608 0
@Iftimie
Iftimie / picoasm.py
Created February 21, 2026 17:41
picoasm with CMP and JZ
#!/usr/bin/env python3
"""
picoasm.py — tiny assembler for the 8-bit MCU ROM
Instruction format:
IR[7:5] = opcode (3 bits)
IR[4:0] = operand (5 bits)
Opcodes:
NOP = 000
@Iftimie
Iftimie / Add refactored.txt
Created February 21, 2026 17:31
Add refactored
$ 3 1.5625e-8 382.76258214399064 50 5 43 5e-11
x 3584 876 3938 879 4 48 ProgramCounter
R 3792 528 3744 528 0 0 40 5 0 0 0.5
w 3840 528 3872 528 0
207 3872 528 3920 528 4 CLK
s 3792 528 3840 528 0 1 true
207 3952 608 4000 608 4 EXEC
I 3856 608 3952 608 0 0.5 5
w 3824 608 3856 608 0
w 3824 672 3824 608 0
@Iftimie
Iftimie / picoasm.py
Created February 21, 2026 17:28
Assembler for picocontroller
#!/usr/bin/env python3
"""
picoasm.py — tiny assembler for the 8-bit MCU ROM
Instruction format:
IR[7:5] = opcode (3 bits)
IR[4:0] = operand (5 bits)
Opcodes:
NOP = 000
@Iftimie
Iftimie / ADD example
Created February 21, 2026 17:05
ADD example
$ 3 1.5625e-8 382.76258214399064 50 5 43 5e-11
x 4053 530 4089 533 4 24 W3
x 4054 447 4090 450 4 24 W2
x 4055 360 4091 363 4 24 W1
x 4051 279 4087 282 4 24 W0
x 2365 -85 2719 -82 4 48 ProgramCounter
R 3248 -368 3200 -368 0 0 40 5 0 0 0.5
w 3296 -368 3328 -368 0
207 3328 -368 3376 -368 4 CLK
s 3248 -368 3296 -368 0 1 true
@Iftimie
Iftimie / JMP example.txt
Last active February 21, 2026 16:35
JMP example
$ 1 0.000005 10.20027730826997 50 5 43 5e-11
x 4053 530 4089 533 4 24 W3
x 4054 447 4090 450 4 24 W2
x 4055 360 4091 363 4 24 W1
x 4051 279 4087 282 4 24 W0
x 2365 -85 2719 -82 4 48 ProgramCounter
R 3248 -368 3200 -368 0 0 40 5 0 0 0.5
w 3296 -368 3328 -368 0
207 3328 -368 3376 -368 4 CLK
s 3248 -368 3296 -368 0 1 true
@Iftimie
Iftimie / first_program.txt
Created February 21, 2026 15:51
first_program
$ 1 0.000005 10.20027730826997 50 5 43 5e-11
w 3376 432 3376 304 0
x 4053 530 4089 533 4 24 W3
x 4054 447 4090 450 4 24 W2
150 3952 544 4064 544 0 2 0 5
x 4055 360 4091 363 4 24 W1
150 3952 464 4064 464 0 2 0 5
150 3952 384 4064 384 0 2 0 5
150 3952 304 4064 304 0 2 0 5
x 4051 279 4087 282 4 24 W0
@Iftimie
Iftimie / 2A4Dbits_ROM.txt
Created February 21, 2026 14:42
2A4Dbits_ROM
$ 1 0.000005 10.20027730826997 50 5 43 5e-11
152 7616 -320 7616 -240 0 2 0 5
150 7552 -336 7552 -240 0 2 0 5
s 5856 -368 5920 -368 0 1 false
x 6325 -94 6361 -91 4 24 W3
x 6326 -177 6362 -174 4 24 W2
w 5952 -64 6224 -64 0
w 5952 -224 5952 -64 0
w 5968 -96 6224 -96 0
w 5968 -176 5968 -96 0
@Iftimie
Iftimie / PC_Decoder_ROM.txt
Created February 21, 2026 14:39
PC_Decoder_ROM
$ 1 0.000005 10.20027730826997 50 5 43 5e-11
w 3376 432 3376 304 0
x 4053 530 4089 533 4 24 W3
x 4054 447 4090 450 4 24 W2
150 3952 544 4064 544 0 2 0 5
x 4055 360 4091 363 4 24 W1
150 3952 464 4064 464 0 2 0 5
150 3952 384 4064 384 0 2 0 5
150 3952 304 4064 304 0 2 5 5
x 4051 279 4087 282 4 24 W0