White Flame wrote:
While writing an OS is fun in and of itself, serious thought should be given to what it will take to create decent applications for it.
Of course! This is barely one half of the road...
In the current state of things, with a rather inmature API, I haven't written a single application so far
but several things are already in the forge: first of all, a
musical score editor -- well, sort-of
it's best described as a programmable beeper (at PB7) allowing a sequence of musical notes to be typed in and played afterwards. Intended for use with the
LED Keypad, it should allow a somewhat more convenient interface if/when a "proper" keyboard and/or screen is available. Playing basics and internal storage format are already sorted out, even the
menu system is thought of; now I have to deploy the key-sequence detecting algorithm...
Quote:
Memory allocation, supporting banked or other types of expanded memory, and address independence are all fundamental tools you want to get right.
Certainly. While they aren't currently implemented, bankswitching support (already in a pretty mature design stage) will be included -- two 16 kiB windows selected thru 16-bit registers, up to
1 GiB addressing.
But with
a bit of support from the software, some address independence may be achieved: I plan to make the bankswitching routines (for "long" jumps and subroutine calls) specify banks in a
relative fashion, while the address
within the 16 K window might be absolute (say, $8000-$BFFF). Memory is cheap nowadays, thus a longer-than-16K program would select banks from
number 0,
no matter where (which bank) the OS placed the code. You have to think on 16K chunks, but
not that long ago the x86 architecture had to live thru 64K segments, right?
Another feature would be
sequential code auto bank switching: if the (fixed) ROM starts at $C000, the very first instructions on it (unreachable otherwise) would just switch to the next code bank and then jump to $8000, continuing program execution... this will work
as long as no opcode crosses a bank boundary, but that could be solved with no more than a couple of NOPs, even
automatically by the compiler/assembler -- anyway, I remember (late 80s) having to
manually place the directive $SEGMENT on TurboBasic programs
thus shouldn't be that much of an issue...
Quote:
There are also a lot of advantages to including some sort of bytecoded utility language
<snip>
And finally, it's obviously easier to write larger and more complex applications that use your OS APIs from a higher level language.
But when you're on
limited resources (like any 6502 system, at least compared to current architectures) there's the risk of performance penalty... Anyway,
FORTH is intended to be the preferred
highish-level language, because of swift performance and, mostly,
ease of implementation.
GARTHWILSON wrote:
Although you've already made a lot of progress, you might want to check out André Fachat's
GeckOS/A65 v.2.0Some time ago, when I was gathering information about the 6502 in order to complete my system's design, I ran into this site... I was
very encouraged by the fact that
I wasn't alone here, but also much impressed by
Fachat's system (both hard and soft) since it was a close match for my idea...
...
but I want to get my hands real dirty so I
need to make my own. Seriously, I haven't looked deeply into GeckOS, but (at least at first glance) it seems to be somewhat Commodore-centric... I have no experience with that brand (never had
any 6502 computer before, really!) so it feels somewhat strange to me
Even if I know that porting would be more difficult, I know for sure that I don't want
yet another UNIX-like thingy... but anyway, GeckOS (a stunning work, BTW) seems a great
source of inspiration, and for the future I don't rule out some
interoperability (like making a minimOS-compliant
lib6502 module)
Quote:
And, while still in assembly, the level of the language can be raised a lot with usually no penalty in memory or performance, by using
structure macros.
Well, that looks very nice, and certainly will be most useful when things get complicated... but after teaching my students about the virtues of structured programming and source code indentation, when I see a piece of paper written by me on assembly, with such
streamlined opcodes, I feel something like a
wicked relief But will definitely consider them.
In the meanwhile, I want to refine the basic I/O as much as possible, before entering into process and/or memory management, filesystems, etc. Let's hope all these come soon!