Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
Memory Optimization (Christer Ericson, GDC 2003)
http://realtimecollisiondetection.net/pubs/GDC03_Ericson_Memory_Optimization.ppt
Cache coherency primer (Fabian Giesen)
https://fgiesen.wordpress.com/2014/07/07/cache-coherency/
Code Clinic 2015: How to Write Code the Compiler Can Actually Optimize (Mike Acton)
http://gdcvault.com/play/1021866/Code-Clinic-2015-How-to
/* | |
Packet sniffer using libpcap library | |
*/ | |
#include<pcap.h> | |
#include<stdio.h> | |
#include<stdlib.h> // for exit() | |
#include<string.h> //for memset | |
#include<sys/socket.h> | |
#include<arpa/inet.h> // for inet_ntoa() |
// Exemplo de geração de números aleatórios | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
/* | |
A função gerar_numero() retorna um número aleatório | |
que pertence ao intervalo [lim_inf, lim_sup] | |
// Credits: | |
// Omar Mohammad. Maadi, Cairo, Egypt. (Original in Assembly) | |
// Wagner Teixeira | |
// Fred Nora | |
//================================================================================== | |
// Start - testing update_mouse | |
//================================================================================== | |
#define MOUSE_LEFT_BTN 0x01 |
void | |
refresh_rectangle ( unsigned long x, | |
unsigned long y, | |
unsigned long width, | |
unsigned long height ) | |
{ | |
void *p = (void *) FRONTBUFFER_ADDRESS; | |
const void *q = (const void*) BACKBUFFER_ADDRESS; | |
//#TEST |
void *CreatePageDirectory (){ | |
int i; | |
unsigned long destAddressVA; //virtual. | |
//alocaremos uma página apenas, pois tem 4KB. | |
destAddressVA = (unsigned long) newPage (); | |
if ( destAddressVA == 0 ) |
unsigned long | |
virtual_to_physical( unsigned long virtual_address, | |
unsigned long dir_address ) | |
{ | |
unsigned long address; | |
unsigned long *dir = (unsigned long *) dir_address; | |
unsigned long tmp; |
// gist para a rotina de mouse. | |
// | |
// ************* C ********************* | |
// | |
//======================================================= | |
//++ Usadas pelo mouse. | |
// hardwarelib.inc |