Jump to content

JesperGravgaard

New Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by JesperGravgaard

  1. Hi @fenrock, The (word) should not be needed, however since KickC is missing a fragment you have found a very nice work-around tricking it to use a fragment it already knows. If you add the following file to the /fragment/mos6502-common/ folder of KickC the code will compile and work without the (word) cast. The fragment in question handles the case word z1, z2, *c1; *z1=*c1+z2; where z1 and z2 are located on zeropage and c1 is a constant. https://gitlab.com/camelot/kickc/-/blob/master/src/main/fragment/mos6502-common/vwum1=_deref_pwuc1_plus_vwum2.asm The last compile-phase in KickcC generates ASM code based on small ASM fragment files matching simple C statements. It almost never fails on 8bit numbers - but is still learning to handle all combinations for 16bit numbers. By the way KickC can create the multiply by 40 code for you. So the following also works, and generates code that is very similar to your mul40(): word screenAddress1 = currentTop + (word)currentRow*40 + currentCol;
  2. Thank you for the LBL-format description! If you have sed you can convert the VS-file to the LBL-format using the following command: sed 's/al C\:/al 00/' helloxl.vs > helloxl.lbl I may have a look at offering the conversion directly in the C-compiler as a command-line option.
  3. You can achieve this by reserving the zero-pages you do not want the compiler to use. To start at 0x80 add the following pragma #pragma zp_reserve(0x00..0x7f)
  4. The choice to use screencodes as default charset encoding was made to align with the other platforms supported by the compiler (such as C64) and because the current KickC atari 8bit library focuses on the chipset of the atari and does not have any ROM wrappers. If you prefer ATASCII as the default charset you can achieve this pretty easily. Simply change the "encoding" setting in the /target/atarixl.tgt file in your KickC installation, or create a new platform target by making a copy of the tgt-file and changing the settings in that copy. After this you can compile to the platform you have configured using the -t xxx commandline option or the #pragma target(xxx) where xxx is the name of your tgt-file.
  5. The underlying assembler i KickAssembler. As @Wrathchild writes KickAssembler can produce a .vs symbol file for the VICE emulator if you pass it the –vicesymbols option. I don't know Altirra well enough to know the format it expects, but the VICE symbol file is in a pretty simple format that would be easy to modify using a script. I will be adding a command-line option to KickC that passes -vicesymbols on to KickAssembler (if you use -a to assemble or -e to assemble and run an emulator). In the meantime you can choose to call KickAssembler manually. As an interesting aside. The VICE symbols file primarily contains symbols (variables / labels in the code) but it can also contain breakpoints. If you want to place a breakpoint in your KickC-code that will be output into the VICE symbol file this is currently possible using kickasm {{ .break }}
  6. It seems I have missed handling the case when comparing two boolean constants! That is an oversight on my part. I have fixed them problem, and the fix will include it in the next release. https://gitlab.com/camelot/kickc/-/issues/527 In the meantime, if you want a pre-release version please let me know. Then I will help you get one. Thank you for reporting the problems you encounter!
  7. @Wrathchild You are right! There is a problem with macros where the body starts with a parenthesis in the current version - the compiler erronously believes you are trying to declare a macro with parameters. It has already been fixed and the fix will be in the next version. https://gitlab.com/camelot/kickc/-/issues/518 If you want a pre-release version please let me know. Then I will help you get one.
  8. @fenrock The default encoding on the ATARI XL platform is screencode_atari. I can see you already found the way to select the ATASCII encoding! #pragma encoding(atascii) As you saw in the linked issue there is a problem with the encoding of the newline right now, but it is already fixed and the fix will be in the next release. If you want a pre-release version please let me know. Then I will help you get one.
  9. Supporting the Lynx looks like it is very doable. The CPU is 65CS02 - almost identical to 65C02, which is already supported by the compiler. So at a glance it seems we only need to add a linker configuration and header-files for the chipset of the Lynx. I prefer to be able to test on real hardware myself - and I do not currently have an Atari Lynx. I will add builtin Lynx support it to my TODO-list and start looking for an affordable Lynx! In the meantime it is possible for you (or anyone else interested) to implement the platform support. The target platform file format used by KickC is a JSON file specifying important properties (such as CPU, charset encoding, file extension and emulator) a linker file (in KickAss segment format) and header-files / library implementation. All these files are readable and user-modifyable in the binary release (in the /target/ and the /include/ and /lib/ folders respectively.)
  10. Hi all, KickC is a C-compiler that creates optimized 6502 assembler. The newest release (version 0.8.3) adds direct support for developing for the Atari 8bit XL/XE platform. The compiler includes header-files and linker-files for the chipset of Atari 8bit XL/XE. It also includes a few example-programs that work in an emulator and on the real platform (tested using UNOcart A8 on 130XE and 800XL). You can get it here: https://gitlab.com/camelot/kickc PS. I am the author of KickC.
×
×
  • Create New...