News for hackers. Stuff that matters.
Re:How to program an NES game in C by evincarofautumn on Sunday August 13, 2017 @10:45PM (#15006313)
I’ve used crappy compilers where there’s essentially no optimisation, and moderately complex expressions produce absurd code, so if you want reasonable output, you end up writing the assembly you want in the notation of the higher-level language, like:

    /* a = (b * 2) + 1 */

    a = b;    /* mov a, b */
    a <<= 1;  /* shl a, 1 */
    a |= 1;   /* or a, 1 */
Re:How to program an NES game in C by pjmlp on Tuesday August 15, 2017 @09:35AM (#15018024)
TI used to have an Assembler that was exactly like that, don't recall for which processor though.