Skip to content

Instantly share code, notes, and snippets.

View Myvar's full-sized avatar

Emile Badenhorst Myvar

  • South Africa
View GitHub Profile
;
; Protected Mode BIOS Call Functionailty v2.0 - by Napalm
; -------------------------------------------------------
;
; This is code shows how its POSSIBLE to execute BIOS interrupts
; by switch out to real-mode and then back into protected mode.
;
; If you wish to use all or part of this code you must agree
; to the license at the following URL.
;
#define VBE_DISPI_IOPORT_INDEX 0x01CE
#define VBE_DISPI_IOPORT_DATA 0x01CF
#define VBE_DISPI_INDEX_ID 0x0
#define VBE_DISPI_INDEX_XRES 0x1
#define VBE_DISPI_INDEX_YRES 0x2
#define VBE_DISPI_INDEX_BPP 0x3
#define VBE_DISPI_INDEX_ENABLE 0x4
#define VBE_DISPI_INDEX_BANK 0x5
#define VBE_DISPI_INDEX_VIRT_WIDTH 0x6
#define VBE_DISPI_INDEX_VIRT_HEIGHT 0x7
using Cosmos.Core;
using Cosmos.IL2CPU.Plugs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CPUx86 = Cosmos.Assembler.x86;
namespace CosmosKernel1
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cosmos.Core.IOGroup
{
public class VBE : IOGroup
{
@Myvar
Myvar / .c
Last active August 29, 2015 14:25
/*
* Copyright 2005-2009, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*/
#include "vesa_private.h"
#include "vesa.h"
#include <string.h>
/*
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#include <KernelExport.h>
#include <vm/vm_types.h>
#include <arch/x86/bios.h>
public static class Screen
{
public static int ClearColor { get; set; } = 0x167F39;
public static sys.VBEScreen Vbe = new sys.VBEScreen();
private static int[] Buffer = new int[0];
@Myvar
Myvar / screeps.py
Created December 29, 2016 14:06 — forked from dzhu/screeps.py
description of the HTTP endpoints available from Screeps, and a Python wrapper to access them (requires requests library)
import json
from base64 import b64decode
from collections import OrderedDict
from cStringIO import StringIO
from gzip import GzipFile
import requests
## Python before 2.7.10 or so has somewhat broken SSL support that throws a warning; suppress it
var http = require('http');
var sockjs = require('sockjs-client');
var request = require('request');
var sock = new sockjs('https://screeps.com/socket');
var user_id = "";
var user_name = "";
var password = "";
var sleep = require('sleep');
sock.onopen = function() {
console.log('open');
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using Engine.Core;
using static Engine.Resources.Mesh;
namespace Engine.Resources