This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
httplist = [] | |
for i in range(511): | |
httplist.append("Web Server Returned an Unknown Error") | |
httplist[100] = "Continue" | |
httplist[101] = "Switching Protocols" | |
httplist[102] = "Processing" | |
httplist[103] = "Early Hints" | |
httplist[200] = "OK" | |
httplist[201] = "Created" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Killaship | |
2022 | |
November 13th, ~10:30 PM EST | |
This took like an hour or two to make, WITH a tutorial and previous experience! | |
A VM following the specifications of the 'mac' architecture, as outlined in this blog: | |
https://felix.engineer/blogs/virtual-machine-in-c/ | |
I was pretty tired while writing this, so the code might suck. | |
Hell, I typed & instead of % twice and was wondering for minutes about it! | |
I started work on this at ~ 9:15, I recorded the progress. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright Killaship (C) 2022 | |
// Informally, this is under the MIT licence, where basically you can do whatever, just give me credit. | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define PROG_SIZE 30000 | |
unsigned char dcells[30000]; | |
unsigned char program[PROG_SIZE]; | |
int data = 0; | |
int instr = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; https://github.com/appusajeev/os-dev-16/blob/master/reg.asm | |
; This code is a slightly modified version of the above. | |
; This code dumps the registers in a single boot sector. | |
; Compile and run with the 2 following commands: | |
; nasm -f bin dump.asm -o dump | |
; qemu-system-i386 -fda dump | |
; You can also do it without -fda if you hate floppy disks for some reason. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*This is just some code to copy-paste, to make exception handler coding easier. By: me, Killaship. | |
Probably going to be obsolete by the time I make a function to semi-automate the IDTentry-making.*/ | |
div0_address = (unsigned long)div0_handler; | |
IDT[0x00].offset_lowerbits = div0_address & 0xffff; | |
IDT[0x00].selector = KERNEL_CODE_SEGMENT_OFFSET; | |
IDT[0x00].zero = 0; | |
IDT[0x00].type_attr = INTERRUPT_GATE; | |
IDT[0x00].offset_higherbits = (div0_address & 0xffff0000) >> 16; |