Hi Ruud, >"Basic OS for the PC" is a project that started three years ago just as >a fun project because I was a bit fed up with the 6502 at that moment. >The idea was to make an OS that uses BASIC as base, just like the C64 >does, and it should be able to run on an 8088 machine with only one 360 >KB floppy, like the Commodore PC1. It still is an "in between" project >and therefore there is only a slow (but steady) progress. This somehow reminds me on TempleOS, which is a 32-bit or 64-bit operating system, all written by a single programmer. http://www.templeos.org/Wb/Doc/FAQ.html (This whole hobby also reminds me of http://www.searchquotes.com/search/Genius_And_Insanity,/ or something similar.) Now that virtual machines and also x86 emulators are common, it could be interesting to write own operating systems for x86. But I guess on this group we would want to concentrate on the simpler CPUs with no MMU or virtual memory, that is, at most 8086 or 80286. :) >Commodore BASIC uses tokens to save the original code in memory and on >disk. One of my idea was to skip the tokens. Because I can skip the >conversion then, it simplifies saving the program lines and listing >them again. The greatest disadvantage however is that I will loose time >when running the program. So I will stick to the tokenizing. (unless >somebody has a better idea) > >Another advantage of using tokens is that IMHO I should be able to run >Commodore PRGs without any conversion. Like Spiro, I would propose using a separate main-memory representation ("byte-code"). There could be multiple serializers and deserializers for different on-disk formats (plain text, Commodore tokenized), chosen by a parameter to LOAD or SAVE. I am not sure if the interpreter really needs to incorporate an editor. (So, maybe there should not be a SAVE command either, except maybe when used for copying LOADed files.) Speaking of cross-platform programming, did anyone else enjoy the CppCon 2016 talks on YouTube? There were many interesting lectures. I posted https://github.com/lefticus/x86-to-6502/issues/2 to reduce the C64 program file size of the toy Pong game presented in https://www.youtube.com/watch?v=zBkNBP00wJE On related news, I would like to help with https://github.com/beholdnec/llvm-m6502 to create a modern C/C++ compiler for the 6502, if only I had more spare time. I do not think that this is completely unreasonable, because there already is avr-gcc (targeting an 8-bit microcontroller family) and also https://github.com/avr-llvm/llvm/ in the works. Clang seems to be a little better at C++ and high-level code transformations and whole-program optimizations than GCC, which could benefit small platforms. Marko Message was sent through the cbm-hackers mailing listReceived on 2016-12-20 16:01:49
Archive generated by hypermail 2.2.0.