Hacker GitHub

← All repos

skx/math-compiler

View on GitHub ↗ ★ 68 Go

A simple intel/AMD64 assembly-language compiler for mathematical operations

15 mentions on Hacker News by 1 person: 2 stories, 13 comments · first 2019-02-01 · latest 2022-12-11

Mentions per year 15 mentions · busiest year 2019 (8)
20082026
  1. …trivial compilers like that are fun to work on, as reminders of the low-level facilities available. https://github.com/skx/math-compiler
    comment by stevekemp · 2022-12-11 · in How to think about compiling
  2. My favourite way to add numbers, in assembly, was this project: https://github.com/skx/math-compiler I had far too much fun writing it, even though it is completely pointless!
    comment by stevekemp · 2022-01-02 · in Assembly Nights
  3. …useful discussion. These days I've been revisiting things writing a couple of simple compilers: https://github.com/skx/math-compiler/ https://github.com/skx/bfcc/ The first was mostly written because I'd not done anything recently with…
    comment by stevekemp · 2020-07-25 · in Ask HN: How did you learn x86-64 assembly?
  4. …something very similar recently, also a single-pass, but with a trivial internal representation: https://github.com/skx/math-compiler The real difference between the compiler in the example, and mine, is that I handle floating-point…
    comment by stevekemp · 2020-05-23 · in One-pass Compiler
  5. …with BASIC: https://github.com/skx/gobasic But then you start thinking about assembly language: https://github.com/skx/math-compiler
  6. …do it for fun because it reminds me of simpler times and fewer abstractions. e.g. a recent project: https://github.com/skx/math-compiler (Of course these days with microcode, and complex processors, it's not really bare-metal anymore. Not…
    comment by stevekemp · 2020-03-25 · in Getting started with bare-metal assembly
  7. …was to write a "compiler" to convert reverse-polish mathematical expressions to assembly language: https://github.com/skx/math-compiler It's been a few years since I touched assembly, and even when I did I largely ignored the…
  8. …fun writing a simple compiler for a reverse-polish calculator, to generate AMD64 assembly language https://github.com/skx/math-compiler/ , wrote a simple BASIC intepreter https://github.com/skx/gobasic , and put together a couple of…
    comment by stevekemp · 2019-11-25 · in Writing An Interpreter In Go (2016)
  9. You can have fun writing simple programs too: https://github.com/skx/math-compiler/
  10. …ln, etc. How do you call those instructions in bash? Simple! You shell out to your math-compiler: https://github.com/skx/math-compiler/ That compiles your math down to assembly language, which has got to make sure they're super-fast,…
    comment by stevekemp · 2019-05-19 · in Understanding the fork system call in Unix
  11. …using integer multiplication, division, etc. Now I do it properly with floating-point instructions: http://github.com/skx/math-compiler/
    comment by stevekemp · 2019-04-07 · in x86 Assembly Guide (2018)
  12. I wrote a simple compiler for mathematical operations recently, https://github.com/skx/math-compiler/ and I have to say I really appreciated the ability to get the two halves of the result in one operation. I've just provisioned an ARM…
  13. I had fun recently generating Intel assembly for mathematical expressions: https://github.com/skx/math-compiler/ Mostly the project was to write something that compiled, from start to finish, but it was a nice refresher on assembly which…
    comment by stevekemp · 2019-03-01 · in NASM Tutorial (2018)