Jump to content

Search the Community

Showing results for tags 'compiler'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Commander X16 Forums
    • Introductions
    • X16 Discussion Lounge
    • X16 Help & Support Lounge
    • Off-topic Lounge

Categories

  • Official Software
  • Official Docs
  • Community Downloads
    • Games
    • Productivity Apps
    • Graphics Apps
    • Audio Apps
    • Demos
    • Networking Apps
    • Dev Tools
    • Tutorial Apps
    • Misc Apps

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 8 results

  1. Just wanted to drive by and toss this out there: https://llvm-mos.org/wiki/Welcome https://github.com/llvm-mos I've been poking around on the beginnings of a game, something I wish I'd known enough to be able to do 35 years ago... I was using KickC, which is very cool, but I was running into too many issues and starting to spend more time on workarounds than on programming. Then, yesterday, I found out that there's an actively developed and complete 6502 backend for LLVM, which means you can do pretty much anything the LLVM frontends can do and then spit it out to your 6502. Library support may be challenging, of course. As of today, only the C64 (and Atari 800) has linker target files, but I've played with them (they're compatible with GCC ld linker scripts) and it shouldn't be too hard to create new ones for other targets. If you follow that link, you'll see that they've built programs for VIC-20, Apple IIe, C64, and even built a simple Rust program onto an Atari 800. Creating target files for the X16 shouldn't be particularly difficult. That having been said, don't expect any of the IO (printf, gets, files) to magically work out of the box today. This is in _ACTIVE_ development, and their focus is currently on C64. The backend 6502 codegen passes all LLVM unit tests (a few thousand), and that was announced in a post from just a few days ago. But if you're willing to just hammer the hardware with your own routines, well, it's pretty slick. I haven't gotten around to X16 programming yet, but I wanted to attach a screenshot of what I've been working on as compiled by LLVM-MOS's clang compiler for the C64. I've been building the project to cross compile for the PET, VIC-20, C64, and C128 with different graphics on each, so I should probably just add an X16 target
  2. cc64 X16 View File cc64 is a small-C compiler, written in Forth, targeting the 6502 CPU. It's hosted on the C64, on the C16 with 64k RAM, and now on the X16. Runtime targets are available for all 3 platforms, on each host, allowing cross-compilation. The code lives at https://github.com/pzembrod/cc64. It's licensed under the 2-clause BSD license: https://github.com/pzembrod/cc64/blob/master/COPYING See https://github.com/pzembrod/cc64/blob/master/Usage.md for usage. See https://github.com/pzembrod/cc64/blob/master/C-lang-subset.md for details about the supported subset of C. Released under the 3 clause BSD license. Submitter pzembrod Submitted 01/19/21 Category Dev Tools  
  3. Version 0.9

    269 downloads

    cc64 is a small-C compiler, written in Forth, targeting the 6502 CPU. It's hosted on the C64, on the C16 with 64k RAM, and now on the X16. Runtime targets are available for all 3 platforms, on each host, allowing cross-compilation. The code lives at https://github.com/pzembrod/cc64. It's licensed under the 2-clause BSD license: https://github.com/pzembrod/cc64/blob/master/COPYING See https://github.com/pzembrod/cc64/blob/master/Usage.md for usage. See https://github.com/pzembrod/cc64/blob/master/C-lang-subset.md for details about the supported subset of C. Released under the 3 clause BSD license.
  4. KickC is a C-compiler for 6502-based platforms creating optimized and readable assembler code. The newest version 0.8.5 adds support for developing for the Commander X16 platform. The compiler includes header-files and linker-files for the chipset of Commander X16. Also included is veralib.h and a conio.h implementation contributed by @svenvandevelde. It also includes some example-programs that work in the emulator (and hopefully on the real platform). Below you can see a bit of the included sprites.c example program. You can get it here: https://gitlab.com/camelot/kickc/-/releases PS. I am the author of KickC.
  5. VolksForth X16 View File VolksForth Readme VolksForth is a 16bit Forth System produced by the German Forth Gesellschaft e.V. The main repository lives here: https://github.com/forth-ev/VolksForth Major development of this system was done between 1985 until 1989. The VolksForth Project was revived in 2005 with the goal to produce a managable Forthsystem for computer systems with restricted system resources. Some modern Forth Systems were influenced by or were derived from VolksForth (GNU-Forth, bigForth). The current Version of VolksForth is 3.81. Version 3.9.x will be interim versions on the way to sync all VolksForth targets and move towards compliance with the 2012 Forth standard. Version 3.8.x is based on the Forth 83 standard, Version 4.00 will be based on the current 2012 Standard (https://forth-standard.org). At this time VolksForth is available for this Systems: VolksForth MS-DOS (Intel x86 architecture i8086/i186/i286/i386/i486 etc) VolksForth 6502 (Commodore 64, Commodore Plus 4, Commander X16, Apple 1, Apple ][, Atari XL/XE) VolksForth Z80 (CP/M, Schneider CPC) VolksForth 68000 (Atari ST, Amiga with EmuTOS) Copyright The VolksForth Sources are made available under the terms of the BSD Lizenz - http://www.opensource.org/licenses/bsd-license.php The Handbook is Copyright (c) 1985 - 2020 Forth Gesellschaft e.V. ( Klaus Schleisiek, Ulrich Hoffmann, Bernd Pennemann, Georg Rehfeld, Dietrich Weineck, Carsten Strotmann). (most of the Information is still in german. We are planning to provide future versions with englisch documentation) Have fun with VolksForth the VolksForth Team Submitter pzembrod Submitted 11/14/20 Category Dev Tools  
  6. Version 3.9.3

    81 downloads

    VolksForth Readme VolksForth is a 16bit Forth System produced by the German Forth Gesellschaft e.V. The main repository lives here: https://github.com/forth-ev/VolksForth Major development of this system was done between 1985 until 1989. The VolksForth Project was revived in 2005 with the goal to produce a managable Forthsystem for computer systems with restricted system resources. Some modern Forth Systems were influenced by or were derived from VolksForth (GNU-Forth, bigForth). The current Version of VolksForth is 3.81. Version 3.9.x will be interim versions on the way to sync all VolksForth targets and move towards compliance with the 2012 Forth standard. Version 3.8.x is based on the Forth 83 standard, Version 4.00 will be based on the current 2012 Standard (https://forth-standard.org). At this time VolksForth is available for this Systems: VolksForth MS-DOS (Intel x86 architecture i8086/i186/i286/i386/i486 etc) VolksForth 6502 (Commodore 64, Commodore Plus 4, Commander X16, Apple 1, Apple ][, Atari XL/XE) VolksForth Z80 (CP/M, Schneider CPC) VolksForth 68000 (Atari ST, Amiga with EmuTOS) Copyright The VolksForth Sources are made available under the terms of the BSD Lizenz - http://www.opensource.org/licenses/bsd-license.php The Handbook is Copyright (c) 1985 - 2020 Forth Gesellschaft e.V. ( Klaus Schleisiek, Ulrich Hoffmann, Bernd Pennemann, Georg Rehfeld, Dietrich Weineck, Carsten Strotmann). (most of the Information is still in german. We are planning to provide future versions with englisch documentation) Have fun with VolksForth the VolksForth Team
  7. Has anyone developed anything for the X16 in C? I notice there are demos in BASIC and Assembler. Is anyone else interested in developing for the X16 in C?
  8. So after piecing together the memory map of the Commander X16 and getting the emulator working I set out to make the necessary changes in my programming language Prog8 compiler to support a second target machine architecture beside the C64. Prog8 is a free programming language that is written on a modern computer and is then cross-compiled into a machine code binary for 6502 8-bit machine targets such as the Commodore-64 and/or the Commander X16. Prog8 documentation: https://prog8.readthedocs.io Prog8 project and source code website: https://github.com/irmen/prog8 you can download the compiler from there as well, it is free and open-source (GPL license) Some micro-benchmarks (not by me) to compare it to other languages and compilers such as cc65 can be seen here. If you would like to help this project, the easiest thing to contribute perhaps is making a syntax-highlighting file for your favorite text editor! Here is a github issue tracking this effort What does Prog8 provide? big reduction of source code length over raw assembly modularity, symbol scoping, subroutines various data types other than just bytes (16-bit words, floats, strings) automatic variable allocations, automatic string and array variables and string sharing subroutines with parameters and return values variables are allocated statically various high-level optimizations small program boilerplate/compilersupport overhead programs can be run multiple times without reloading because of automatic variable (re)initializations. floating point operations (requires the C64 Basic ROM routines for this) Strings can contain excaped characters but also many symbols directly if they have a petscii equivalent, such as “♠♥♣♦π▚●○╳”. Characters like ^, _, \, {, } and | are also accepted and converted to the closest petscii equivalents. 'when' statement to provide a concise jump table alternative to if/elseif chains many built-in functions such as sin, cos, rnd, abs, min, max, sqrt, msb, rol, ror, swap, sort and reverse various powerful library modules for I/O, number conversion, graphics and other things structs to group together sets of variables and manipulate them at once convenience abstractions for low level aspects such as ZeroPage handling, program startup, explicit memory addresses fast execution speed due to compilation to native assembly code inline assembly allows you to have full control when every cycle or byte matters supports the sixteen 'virtual' 16-bit registers R0 .. R15 Rapid edit-compile-run-debug cycle: use a modern PC to do the work on, use nice editors and enjoy quick compilation times can automatically load and run the program in the emulator after successful compilation Two supported compiler targets (contributions to improve these or to add support for other machines are welcome!): "c64": Commodore-64 (6510 CPU = almost a 6502) "cx16": Commander X16 (65c02 CPU) If you only use standard kernel and prog8 library routines, it is possible to compile the exact same program for both machines (just change the compiler target flag)! Here is one of the simpler programs that I made in Prog8 for the Cx16, it renders the well-known Mandelbrot fractal (using floating point calculations): For those interested this is the source code of the above program: %import textio %import floats %zeropage basicsafe main { const uword width = 60 const uword height = 50 const ubyte max_iter = 16 sub start() { txt.print("calculating mandelbrot fractal...\n\n") ubyte pixelx ubyte pixely for pixely in 0 to height-1 { float yy = (pixely as float)/0.40/height - 1.3 for pixelx in 0 to width-1 { float xx = (pixelx as float)/0.32/width - 2.2 float xsquared = 0.0 float ysquared = 0.0 float x = 0.0 float y = 0.0 ubyte iter = 0 while iter<max_iter and xsquared+ysquared<4.0 { y = x*y*2.0 + yy x = xsquared - ysquared + xx xsquared = x*x ysquared = y*y iter++ } txt.color2(1, max_iter-iter) txt.chrout(' ') } txt.chrout('\n') } } }
×
×
  • Create New...

Important Information

Please review our Terms of Use