Author Topic: Converting Arithmetic Expressions to Assembly  (Read 10828 times)

jj2007

  • Member
  • *****
  • Posts: 10324
  • Assembler is fun ;-)
    • MasmBasic
Re: Converting Arithmetic Expressions to Assembly
« Reply #30 on: April 07, 2018, 05:07:04 AM »
Maybe you can modify mine (fork it) to produce MASM-compatible code?
Sounds intriguing but right now I have absolutely no spare time...

Quote
BTW, I can't find out, what do "m2m" and "fp4" mean exactly in MASM?

m2m is mem to mem:

m2m someint32, someotherint32 basically translates to

push someotherint32
pop someint32

FP4(123.456) creates a REAL4 in the .data section. You can use it, for example, as
fld FP10(1.234567890123456789)
fsub FP4(123.456)
fmul FP8(0.1234567890123456)

UniverseIsASimulation

  • Regular Member
  • *
  • Posts: 25
Re: Converting Arithmetic Expressions to Assembly
« Reply #31 on: May 01, 2018, 04:08:19 AM »
What do you think about the syntax highlighting for assembly I've just added to my web-app?

UniverseIsASimulation

  • Regular Member
  • *
  • Posts: 25
Re: Converting Arithmetic Expressions to Assembly
« Reply #32 on: November 13, 2018, 03:24:15 AM »
I've put some effort into designing the way the web-app looks. Do you like it? The layout works in IE6, IE9 and IE11, and all the non-Internet-Explorer browsers I've tested it in except Safari 5, but it breaks in IE7, IE8 and IE10.

UniverseIsASimulation

  • Regular Member
  • *
  • Posts: 25
Re: Converting Arithmetic Expressions to Assembly
« Reply #33 on: June 16, 2020, 01:52:52 AM »
000webhost has banned me for hate speech, so I moved my website to GitHub Pages. So, the ArithmeticExpressionCompiler is now available here. Now it supports GNU Assembler as well as FlatAssembler. And now it can not only be run in a browser or Duktape, but also in NodeJS, the NodeJS executable is available here. A relatively long example program it can compile is available here (it's the implementation of the linearithmic-time sorting algorithm I made).