Skip to content

Instantly share code, notes, and snippets.

View parastuffs's full-sized avatar
🐦

Quentin Delhaye parastuffs

🐦
  • ECAM
  • Brussels
View GitHub Profile
@parastuffs
parastuffs / gist:8922523
Last active August 29, 2015 13:56
ELECH473 - Lab 1 - Write a program which adds the unsigned content of reg1 and reg2 and writes the result in reg3 and the carry bit in reg4.
nop
//R1 : op 1
//R2 : op 2
//R3 : mask, then final result
//R4 : report flag
//R5 : temp 1, used fo R1 NAND R3, loop verification, temporary serious science, final temp to check flag status
//R6 : temp 2, temp 0xFFFF for serious science
//R7 : temp 3 - loop and 0xFFFF
movi 1,0xEFFF //We want to store a 16-bits word. "addi" is not enough.
movi 2,0xEFFF
@parastuffs
parastuffs / checkCRC.pl
Created February 15, 2014 21:39
Check crc32
#!/usr/bin/env perl
use strict;
use warnings;
#use diagnostics;
use String::CRC32;
open(FD1, "ls |");
my @files = <FD1>;
foreach my $f (@files) {
$f =~ s/\n//;
@parastuffs
parastuffs / gist:9327934
Last active August 29, 2015 13:56
ELECH473 - Labo 5 - Weird baby black & white
#include "StdAfx.h"
#include "stdio.h"
#include "time.h"
#include <stdlib.h>
void ex1();
void ex2();
void blackWhiteASMAligned(unsigned char* pixels, int lSize, int t, unsigned char* output, unsigned char* threshold) {
int ii=lSize/16; // Set the counter
@parastuffs
parastuffs / gist:9551564
Last active August 29, 2015 13:57
Lulz
#include "StdAfx.h"
#include "stdio.h"
#include "time.h"
#include <stdlib.h>
void blackWhiteASM(char* pixels, int lSize, int t, char* output) {
int ii=lSize/16; // Set the counter
unsigned char *threshold = (unsigned char*) malloc(sizeof(unsigned char)*16);
int i;
@parastuffs
parastuffs / gist:9551969
Created March 14, 2014 16:59
ELECH473 - SIMD _ movapd surprisingly working
#include "StdAfx.h"
#include "stdio.h"
#include "time.h"
#include <stdlib.h>
void blackWhiteASM(char* pixels, int lSize, int t, char* output) {
int ii=lSize/16; // Set the counter
unsigned char *threshold = (unsigned char*) malloc(sizeof(unsigned char)*16);
int i;
@parastuffs
parastuffs / gist:9556542
Created March 14, 2014 20:48
ELECH473 - SIMD - Evaluating the alignement performance
#include "StdAfx.h"
#include "stdio.h"
#include "time.h"
#include <stdlib.h>
void blackWhiteASMAligned(char* pixels, int lSize, int t, char* output, unsigned char* threshold) {
int ii=lSize/16; // Set the counter
_asm {
mov esi , pixels; // datain ptr of the line in register
mov ecx , ii; // counter
@parastuffs
parastuffs / gist:9687925
Created March 21, 2014 14:50
INFOF410 - Real Time Linux Task 3
// ---------------------------------------------------------------------
// exemple-threads-temps-reel.c
// Adapté d'un ficher d'exemple du livre "Solutions Temps-Reel sous Linux"
// (C) 2012 - Christophe BLAESS
// http://christophe.blaess.fr
// ---------------------------------------------------------------------
#include <pthread.h>
#include <sched.h>
#include <stdio.h>
@parastuffs
parastuffs / Im_totally_gay.pl
Last active August 29, 2015 14:03
Merge taht
#!/usr/bin/env perl
#Add the mkvtoolnix install directory to your system's PATH.
use strict;
use warnings;
my (@videos);
my $baseName;
# Where you want the muxed videos to end up in.
my $outDir = "output";
@parastuffs
parastuffs / chapterMyASS.pl
Last active August 29, 2015 14:05
Get an .ass script as argument, extract the chapters and write them in a .txt file.
#!/usr/bin/env perl
use strict;
use warnings;
#use diagnostics;
my ($chapters_file, $subtitles_file, $style);
my $STYLE = "Chapitre";
sub display_help {
my $s = "Usage: $0 [options]\nOptions:\n";
@parastuffs
parastuffs / Psycho-Pass_lexique
Last active August 29, 2015 14:07
Psycho-Pass lexique
oo Noms des personnages :
Lieutenant (et non inspecteur)
Kôgami Shinya
Tsunemori Akane
Ginoza Nobuchika
Masaoka Tomomi
Kagari Shûsei
Kunizuka Yayoi
Karanomori Shion