This file contains 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
#!/usr/bin/env python3 | |
import sys | |
with open(sys.argv[1], 'r') as f: | |
contents = f.read() | |
contents += "\n\n" | |
i = 0 | |
final_str = "" | |
while i < len(contents) - 1: |
This file contains 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
.global _start | |
.section .data | |
message: .ascii "Hello, World!\n" | |
len = . - message | |
.section .text | |
_start: | |
movq $1, %rax # sys_write | |
movq $1, %rdi # stdout |
This file contains 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 "Vectors.h" | |
void IntVectorInit(IntVector* vec) { | |
// Initaliase the element count to zero, allocate 0 byes for the | |
// vector pointer, and mark deleted as false. | |
vec->element_count = 0; | |
vec->vector = malloc(0); | |
vec->deleted = false; | |
} |