Shaos wrote:
It would be great to have some kind of OS here to load "applications" that will call some API (like read character from keyboard, print character to display, compare strings etc.) by specified addresses, defined as constants in some INC-files
That's sort of what I'm working towards, a standard set of includes that does the stuff you describe, where you simply include them in the assembly process (similar to how you include headers in C) to use them for your program.
Shaos wrote:
I have just checked Tunguska instruction set and I can't find operation "inversion". Should I use A(+)444 instead?
That would work. I personally prefer to use exclusive or with %111. Ternary exclusive or of two trytes A = <A1,A2,A3>; and B = <B1,B2,B3> is defined as <-A1*B1, -A2*B2, -A3*B3>, so exclusive or between A and <1,1,1> is <-A1, -A2, -A3>.
Shaos wrote:
Also I didn't understand sentence about PHA/PSH and PLA/PLL - should it be replaced in opcodes table?
That seems to be an error in the specifications, the table should read PSH and PLL; not PHA and PLA. I'll fix it with the next release.
Shaos wrote:
I found this project on FreshMeat:
http://freshmeat.net/projects/tunguska/
Does author have ideas to put it on SourceForge and use CVS? I personally can help with something useful for this project

Some features that are interesting for me:
1) ability to load additional binary to address 000 (using functional key for example);
2) command RUN that will call subprogram from address 000;
3) ability to save memory image to file (using functional key for example);
4) all standard functions should be called by predefined and never changed addresses;
5) loading and saving files from programs;
6) support for color raster graphics (at least 16 colors by pixel);
7) mouse support.
Sourceforge: I've considered it, but not gotten around to investigating it.
1,2,3,5: I've been planning to include some sort of permanent storage, sort of like what a diskette station would be to a regular computer. It would be possible to change the "diskette" on the fly. Once that's done, it should be possible to achieve the rest of what you describe with assembly code.
4: I've thought about that. I don't quite want to make them that static, but something like a standard "OS" with standard functionality is something I'm planning.
6: Maybe. If it is actually possible to do. Speed is a big issue with this. The latest version is a lot faster with redrawing since graphics has been migrated to a separate thread, but it's still sort of iffy whether this will be possible. Another big issue is size. Even an extremely low resolution, like 320x240 would eat more than 14% of the memory.
7: Planned. Maybe not in the next version, but shouldn't be that far off.