$\require{cancel}$
section .text
_start
to be defined, at least in linux
_start
, needs to be exposed to the outside via the global
assembler directive.
[bennett]$ make regDemo2 nasm -f elf64 -g regDemo2.asm -o regDemo2.o ld -g regDemo2.o -o regDemo2 ld: warning: cannot find entry symbol _start; defaulting to 0000000000401000
segment
and global
are assembler directies
segment .data
segment .bss
push
instruction pushes a value onto the stack.
new
or malloc
grab memory.