Jump to content

pzembrod

Members
  • Content Count

    9
  • Joined

  • Last visited

  • Days Won

    1

pzembrod last won the day on November 16

pzembrod had the most liked content!

Community Reputation

6 Neutral
  1. Yes, that is possible. The usual way to compile an application with VolksForth is to compile the application code on top of the base Forth system, and then use SAVESYSTEM to store the compiled code together with the underlying Forth system into one file. There are a few hooks aka deferred words, pre-populated with noop, e.g. 'cold, that are called during system startup. They can be used to start an application on Forth startup. As for how BASIC in ROM bank 4 jumps into the KERNAL in ROM bank 0: This is implemented in https://github.com/commanderx16/x16-rom/tree/master/kernsup. I haven't fully grokked (yet) how the code works in detail, but it seems pretty clear that the essence is that the kernsup_*.s files assemble a jump list at the end of the BASIC or the MONITOR rom that mirrors the KERNAL jump list and implements it via cross-bank long jumps. I could imagine that replicating this mechanism at the end of an X16 Edit ROM could work. I wasn't suggesting to use the BASIC ROM; I may have caused a misunderstanding there.
  2. Ah, I see how the same might be achievable with the -bas flag. The difference is that -bas takes its input from a file whereas -keybuf takes its input from the command line. And my sample implementation works such that the additional keystrokes work with a BASIC program "typed" via -bas as well as with any program loaded via -prg. The added keystrokes are just appended after the RUN into the keyboard buffer, in the two appropriate places in the code. I'll try out how the integration into make files would look if I used the LOAD+RUN+<myinput> workaround in a file via the -bas flag that you suggest. I would consider it more of a workaround, though. One difference in the first place between -prg and LOAD would be (I guess) that -prg takes its input from the host file system whereas with LOAD the tested program would need to be in the mounted sdcard image - which is doable, of course.
  3. In my opinion, the "natural" text line break character of the C64 is defined by what the KERNAL does on print, and the KERNAL breaks lines on $0d. Also, the text editors that came with the assembler ASSI/M and with Kyan Pascal use CR as line terminator. So think, to keep C64 compatibility, which I guess is a clear goal for the X16, there is no way around supporting CR as line terminator as an option. I also think this fiddling with different dharsets and encodings is quite annoying, but if CBM is part of the game, that's how it is. As for the KERNAL API that X16 Edit uses, since that is all in the standard list of API calls, you could look at how X16 BASIC handles those. IIUC you can call those standard APIs with the BASIC ROM switched in, and they magically end up calling the KERNAL, so BASIC must have a nifty bank bridge that I would expect you could re-use.
  4. Ah! I stayed with the CBM standard CR for line breaks so far, given that I also stayed with PETSCII. How would you feel about using LF or CR depending on whether X16 Edit runs in PETSCII or ISO mode? Fully agree wrt Windows style CRLF, btw. I figured that this would be its realistic size range, hence my ROM suggestion as a ROM bank is 16k. The question, as I see it, would be whether your code is a) romable and b) could bank-switching call the KERNAL. X16 BASIC is doing this already, so there must be a reasonably established way to do it.
  5. Actually, I still have a lot to learn about the details of the X16 programming model. So, I don't think VolksForth is running in ISO mode, at least not by default, as far as I can tell. I do print a chr$($0e) during startup to switch to lower/uppercase, but $41 emit prints a lowercase a and $61 emit an uppercase A, as expected in PETSCII mode. In CBM Forth, comments are marked with the pound sign, chr$($5c), where backslash sits in ASCII. I hope this helps. FWIW, the X16 VolksForth is built with a target compiler running on C64 VolksForth in VICE, and the originally Linux ASCII sources are first converted to PETSCII before fed into VICE, so the X16 VolksForth should be PETSCII DNA through and through. But great that your hello program worked as expected, and I would expect your editor to work just nicely for Forth code without any modification since it supports PETSCII. I'll try it out myself locally and let you know how it works for me. One thing that would of course be great is if one could call your editor directly from Forth. Do you think there would be a way to place X16 Edit into a ROM bank and make it callable from other programs, e.g. Forth?
  6. Version 3.91

    14 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. 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  
  8. In case you are looking for something hosted on the X16 itself: Porting https://github.com/pzembrod/cc64 to the X16 is on my roadmap.
  9. I would like to propose a -keybuf flag, similar to the one in VICE, that injects further text into the keyboard buffer after loading and running a program with -prg/-bas and -run. Background/reason: I'm currently working on an X16 port of the C64/C16 flavour of VolksForth (https://github.com/forth-ev/VolksForth). I am using VICE and now x16emu in automated build and test scripts, where I need this flag to initiate a build or test procedure after loading and starting a FolksForth binary. See https://github.com/pzembrod/VolksForth/blob/x16-390/6502/C64/emulator/run-in-x16emu.sh#L41 and https://github.com/pzembrod/VolksForth/blob/x16-390/6502/C64/Makefile#L134 for how this is used. I have an implementation proposal of this flag in https://github.com/pzembrod/x16-emulator/blob/master/main.c and would be happy to send a pull request. Cheers Philip
×
×
  • Create New...

Important Information

Please review our Terms of Use