Skip to content

Instantly share code, notes, and snippets.

const std = @import("std");
const allocator = std.heap.page_allocator;
pub fn LinkedList(comptime T: type) type {
return struct {
const AllocatorError = std.mem.Allocator.Error;
const Self = @This();
data: T,
next: ?*Self = null,
@RaphGL
RaphGL / hello.s
Last active May 18, 2022 10:55
Hello World in x86 Assembly (AT&T)
# .data stores variables
.data
hello: .string "Hello world\n"
# .text stores the code
.text
.globl _start # makes _start the entry point of the program
_start:
# call write(fd, buf, size)
movl $4, %eax # write = 4