Skip to content

Instantly share code, notes, and snippets.

@charlesastaylor
charlesastaylor / -sna86.asm
Last active June 26, 2024 06:42
8086 assembly snake game!
; -------------------------------------------------------------------
; Sna86.
; An 8086 simulator snake!
; -------------------------------------------------------------------
;
; Assembly program intended to run in an 8086 simulator with functionaliy equal* to one made for homeworks
; up to Part 1 Episode 10 of the Peformance-Aware Programming Series (https://www.computerenhance.com/)
; by Casey Muratori. Demo - https://youtu.be/s_S4-QHeFMc.
;
; * mov, add, sub, cmp, je and jne was the target instructions. However I also added loop for convenience,
#!/usr/bin/env python3
"""
Converts between QD and FDS disk images
"""
import struct
def create_fds_header(side_count):
return b"FDS\x1A" + bytes([side_count & 0xFF]) + bytes(11)