pxasme/README.md

675 B

pxasme

A single-pass x86_64 assembler that emits relocatable ELF64 objects.

Usage

pxasme -Src myapp.asm -Dest myapp.o
ld -s -o myapp myapp.o
./myapp

Status

  • Lexer
    • "Variables" in data/rodata (u8, u16, u32, u64, sz)
      • C-style addressing (bare or &)
    • Unified public/private, import/export syntax
    • State machine parser for opcode arguments
  • Parser
    • mov, ret, syscall, sections, variables
    • strlen($var) compile-time function
    • more isa ops
  • Code generation
    • Generate ELF64 binaries
      • Relocations
        • R_X86_64_32S (n.b. not PIC)
        • R_X86_64_64
    • Freestanding mode