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
; ================================================== | |
; hello.asm | |
; | |
; $ nasm -f elf64 hello.asm -l hello.lst -o hello.o | |
; $ ld -s -o hello hello.o | |
; ================================================== | |
bits 64 | |
section .text |
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
/********************************* | |
jpegtest.c | |
$ gcc jpegtest.c -std=c11 -ljpeg | |
*********************************/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <jpeglib.h> |
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
// **************************************** | |
// timer_kern_module.c | |
// based on: https://windhole.booth.pm/items/1169009 | |
// **************************************** | |
#include <linux/module.h> | |
#include <linux/debugfs.h> | |
MODULE_LICENSE("GPL v2"); | |
MODULE_AUTHOR("John Doe"); |
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 <stdio.h> | |
#include <stdlib.h> | |
// free and set NULL | |
// need to specify address of pointer of allocated memory block | |
void free_with_null(void **ptr) | |
{ | |
free(*ptr); | |
*ptr = NULL; | |
} |