This file contains hidden or 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
// PS/2 keyboard decoder for Altera DE1 Kit | |
// decode 7 seg | |
module decode_seven_seg( | |
input [3:0] dec, | |
output [6:0] out); | |
reg [6:0] val; | |
initial val = 0; |
This file contains hidden or 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
// decode 7 seg on DE1 kit | |
module decode_seven_seg( | |
input clk, | |
input [3:0] dec, | |
output [6:0] out); | |
reg [6:0] val; | |
initial val = 0; | |
always @(posedge clk) begin | |
case (dec) |
This file contains hidden or 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
/* | |
Fake86: A portable, open-source 8086 PC emulator. | |
Copyright (C)2010-2013 Mike Chambers | |
This program is free software; you can redistribute it and/or | |
modify it under the terms of the GNU General Public License | |
as published by the Free Software Foundation; either version 2 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, |
This file contains hidden or 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
#include <stdint.h> | |
int main() { | |
const int32_t fx = 1048576; | |
int32_t z = 4 * fx; | |
int32_t j = -1; | |
for (int32_t i = 3; i < 4096; i += 2) { |
This file contains hidden or 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
// from http://blog.nothinguntoward.eu/?p=38 | |
#include <cstdio> | |
#include <cmath> | |
using namespace std; | |
int main() { | |
const int width = 80; |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
---- ---- ---- ---- | |
INS_CONST 0016 | |
---- ---- ---- ---- | |
INS_CONST 0101 | |
INS_CONST 0037 | |
INS_CONST 0008 | |
INS_CALL 0000 | |
INS_CALL 0000 | |
INS_POP 0001 | |
INS_CONST 0107 |
This file contains hidden or 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
#include <assert.h> | |
#include <list> | |
#include <set> | |
#include <string> | |
#include <unordered_map> | |
#include <vector> | |
// ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- | |
enum object_type_t { e_none, e_integer, e_string, e_boolean, e_array }; |
This file contains hidden or 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
#include <assert.h> | |
struct rtti_t { | |
template <typename type_t> | |
bool is_a() const { | |
return _tag == type_t::tag; | |
} | |
This file contains hidden or 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
import math | |
def _dct(octave, t): | |
return math.cos(math.pi * octave * t) | |
def _product(func, width, accum, octave): | |
''' compute the contribution of an octave ''' | |
p = 0.0 |
This file contains hidden or 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
static const int16_t bl_sqr_1024[] = { | |
0x063e, 0x1288, 0x1e3e, 0x2909, 0x32a0, 0x3ac3, 0x414d, 0x462e, | |
0x496a, 0x4b1c, 0x4b6b, 0x4a92, 0x48d7, 0x467f, 0x43d9, 0x4128, | |
0x3eaa, 0x3c8f, 0x3b00, 0x3a0f, 0x39c2, 0x3a10, 0x3ae4, 0x3c20, | |
0x3da1, 0x3f39, 0x40c8, 0x4228, 0x433c, 0x43f2, 0x443f, 0x4421, | |
0x43a6, 0x42da, 0x41d6, 0x40b4, 0x3f92, 0x3e88, 0x3db0, 0x3d16, | |
0x3cca, 0x3ccc, 0x3d1c, 0x3dab, 0x3e6a, 0x3f46, 0x402c, 0x4104, | |
0x41ba, 0x4240, 0x428d, 0x429a, 0x4269, 0x4200, 0x416b, 0x40bb, | |
0x3fff, 0x3f47, 0x3eaa, 0x3e2f, 0x3de3, 0x3dcb, 0x3de7, 0x3e36, | |
0x3eac, 0x3f3d, 0x3fde, 0x407b, 0x4108, 0x417b, 0x41c5, 0x41e6, |