Skip to content

Instantly share code, notes, and snippets.

View duckinator's full-sized avatar

Ellen Marie Dash duckinator

View GitHub Profile
void HalIrqHandler(struct regs *r)
{
printf("Irqs triggered so far: %i; Current IRQ: Irq %i...", foo, (r->int_no-32));
foo++;
/* This is a blank function pointer */
void (*handler)(struct regs *r);
/* Find out if we have a custom handler to run for this
* IRQ, and then finally, run it */
handler = irq_routines[r->int_no - 32];
<duckinator> Is there any reason OSes tend to map the kernel at >3GB in memory?
<geist> duckinator: are you asking why do they map it up high, or specifically why 3gb?
<duckinator> geist: whichever is easier to answer
<geist> or why do they map the kernel at all?
<geist> a bunch of seperate questions, actually
<duckinator> why it's high - why not have it low and put everything else above it?
<geist> you can do that too. BeOS did
<duckinator> so it's just an odd little tradition?
<geist> some architectures require it
<geist> some dont require any mapping of the kernel at all
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
char *bin2dec(char *str)
{
char *ret = malloc(sizeof(int)*20);
char *tmp = malloc(sizeof(int));
int dec = 0;
[Arch Linux: /]# lspci
00:00.0 Host bridge: ATI Technologies Inc Radeon Xpress 200 Host Bridge (rev 01)
00:02.0 PCI bridge: ATI Technologies Inc RS480 PCI-X Root Port
00:11.0 IDE interface: ATI Technologies Inc 437A Serial ATA Controller (rev 80)
00:12.0 IDE interface: ATI Technologies Inc 4379 Serial ATA Controller (rev 80)
00:13.0 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller (rev 80)
00:13.1 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller (rev 80)
00:13.2 USB Controller: ATI Technologies Inc IXP SB400 USB2 Host Controller (rev 80)
00:14.0 SMBus: ATI Technologies Inc IXP SB400 SMBus Controller (rev 81)
00:14.1 IDE Interface: ATI Technologies Inc Standard Dual Channel PCI IDE Controller (rev 80)
org 7C00h
global Print ; allow everything to access Print
jmp Start ; skip the data
MTest: db "This is a test string! "
EMTest:
MTest2: db "This is another test string! "
EMTest2:
AMD Phenom II X4 Quad-Core Processor 955 Black Edition Boxed
MSI - Micro Star International NF750-G55 nForce 750a Socket AM3 Motherboard
Corsair Memory CMPSU-400CX 400 Watt ATX 12V Power Supply
Western Digital Caviar SE16 500GB 7,200RPM SATA 3.0Gb/s Hard Drive
Corsair Memory XMS 4GB DDR2-800MHz (PC-6400) CL5 Memory Kit (Two 2GB Memory Modules)
Antec Three Hundred ATX Case
Samsung 22x DVD±RW Burner with Dual/Double Layer Support OEM
XION 120mm Case Fan x3
XION 140mm Black Case Fan
#!/usr/bin/env ruby
require 'shell'
def err(s)
puts s
exit 1
end
shell = Shell.new
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
syntax('+') { |scope,cells|
total = 0
cells.each { |c| total += c.text_value.to_i }
total
}
<li class="first horizontalItem3" ><a href="http://bes.staffordschools.net" TARGET='_blank' >Kate Waller Barrett</a></li>
<li class="horizontalItem3" ><a href="http://mbes.staffordschools.net" TARGET='_blank' >Margaret Brent</a></li>
<li class="horizontalItem3" ><a href="http://abes.staffordschools.net" TARGET='_blank' >Anthony Burns </a></li>
<li class="horizontalItem3" ><a href="http://ces.staffordschools.net" TARGET='_blank' >Conway</a></li>
<li class="horizontalItem3" ><a href="http://fes.staffordschools.net" TARGET='_blank' >Falmouth</a></li>
<li class="horizontalItem3" ><a href="http://ffes.staffordschools.net" TARGET='_blank' >Ferry Farm</a></li>
<li class="horizontalItem3" ><a href="http://ges.staffordschools.net" TARGET='_blank' >Garrisonville</a></li>
<li class="horizontalItem3" ><a href="http://gves.staffordschools.net" TARGET='_blank' >Grafton Village </a></li>
<li class="horizontalItem3" ><a href="http://hoes.staffordschools.net" TARGET='_blank' >Hampton Oaks</a></li>
<li class="horizont