Skip to content

Instantly share code, notes, and snippets.

View 9xbt's full-sized avatar

xrc2 9xbt

View GitHub Profile
@9xbt
9xbt / tree.S
Created August 17, 2024 19:49
Gets you tree'd. Replace tree.com with the compiled version of this on your friend's MS-DOS machine
section .text
org 0x100
mov dx, tree_str
mov ah, 0x09
int 0x21
mov ah, 0x4C
int 0x21
@9xbt
9xbt / i386-gcc-debian.sh
Last active August 17, 2024 19:48
Sets up an i386 gcc cross compiler, cross assembler, and cross linker, on Debian-like distros
sudo apt install build-essential bison flex libgmp3-dev libmpc-dev libmpfr-dev texinfo
export PREFIX="/usr/local/i386elfgcc"
export TARGET=i386-elf
export PATH="$PREFIX/bin:$PATH"
mkdir /tmp/src
cd /tmp/src
curl -O http://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.gz
tar xf binutils-2.42.tar.gz