• Can LCC be targeted to a simple processor?

    From Donn Stewart@21:1/5 to All on Wed Aug 28 07:48:18 2019
    I made a simple 8-bit processor with TTL. It is a pure accumulator-memory machine, with 30 instructions. I have a good assembler. Is it possible to retarget LCC to this processor? How do I go about it?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From kavvadias@silexica.com@21:1/5 to All on Sat Feb 15 12:58:38 2020
    Conceptually simple as a machine can be, the "Mov" machine has an LCC backend: https://esolangs.org/wiki/Mov . The LCC machine description is here: https://github.com/xoreaxeaxeax/movfuscator/blob/master/movfuscator/mov.md

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From kavvadias@silexica.com@21:1/5 to kavv...@silexica.com on Sat Feb 15 13:35:40 2020
    On Saturday, 15 February 2020 21:58:39 UTC+1, kavv...@silexica.com wrote:
    Conceptually simple as a machine can be, the "Mov" machine has an LCC backend: https://esolangs.org/wiki/Mov . The LCC machine description is here: https://github.com/xoreaxeaxeax/movfuscator/blob/master/movfuscator/mov.md

    And of course the rest of the devil: https://github.com/xoreaxeaxeax/movfuscator/blob/master/movfuscator/movfuscator.c

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Donn Stewart@21:1/5 to All on Sat Feb 15 16:35:41 2020
    Thanks, I will check those pages.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bill rowe@21:1/5 to Donn Stewart on Wed May 13 06:28:14 2020
    On Wednesday, August 28, 2019 at 10:48:19 AM UTC-4, Donn Stewart wrote:
    I made a simple 8-bit processor with TTL. It is a pure accumulator-memory machine, with 30 instructions. I have a good assembler. Is it possible to retarget LCC to this processor? How do I go about it?

    For sure. It has been done a number of times. One example is mine at https://sites.google.com/site/lcc1802/ I learned a lot from one at http://www.fpgacpu.org/usenet/lcc.html

    The basic unit of a target is called a machine descriptor file - mine is xr18CX.md. The compiler front end understands C and converts it to an internal form. your md file contains rules that convert from the internal form to assembly language which you
    then process in a separate pass.

    It's not trivial, but it's quite do-able. Traditionally, you start by taking one of the existing .md files and changing all the assembly output to something you can handle, and go from there.

    I can maybe provide some help if you need it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)