Chip,
Yes, it's open source, You can find it here: https://github.com/Microsoft (vscode repository)
They have a TON of open source code/projects in there.
To get the extension installed and working you need to 'run' the vsix file as Seairth said above: you will find a p2asm-0.0.1.vsix, which is an extension package. To install, just type 'code p2asm-0.0.1.vsix' at the command line.
Looks a nice Editor / Environment.
I use notepad++, and one feature I use a lot is column editing mode, and I see Visual Studio Code has added that.
A quick read looks like it also can support debug, which could get interesting.
Maybe you could list the improvements needed to pnut, and the operations that then enables ?
Does this vscode IDE exist for things like C-Lang integration?
Seairth, I downloaded and am running Visual Studio Code. I also downloaded your setup from github, but what do I do with it to get VSC to recognize it? I dropped your p2asm folder into VSC's resourcesappextensions folder, in case it was supposed to recognize it (like Sublime Text does), but nothing seemed to happen.
This looks pretty good.
Just like Visual Studio, the trick is to figure out how to write custom extensions for syntax and direct programming.
One problem here is that people might expect the direct serial programming part to be cross platform, which might be hard...
About rewriting the assembler in Javascript... how would one do that? I'm thinking it would be one thing to code it, but another to make it conversant in the system. The latter part is more difficult for me to visualize.
Or something like that, I always have terrible trouble getting regexps to work.
Was that really a serious suggestion? I'd offer an alternate approach which would be to rewrite it in C or C++ and then use Emscripten to convert it to Javascript. In fact, it might be possible to do that with Pascal as well if you're more comfortable with that than C/C++. Heater will probably know if there is a LLVM implementation of Pascal floating around.About rewriting the assembler in Javascript... how would one do that? I'm thinking it would be one thing to code it, but another to make it conversant in the system? The latter part is more difficult for me to visualize.
About rewriting the assembler in Javascript... how would one do that? I'm thinking it would be one thing to code it, but another to make it
conversant in the system. The latter part is more difficult for me to visualize.
Is there an LLVM implementation of Pascal that would work with Emscripten around that Chip could use? I get the impression that might be more comfortable for him than C/C++.cgracey,About rewriting the assembler in Javascript... how would one do that? I'm thinking it would be one thing to code it, but another to make it
conversant in the system. The latter part is more difficult for me to visualize.
One could just write the guts of the compiler as a JS function. It would take the source code in as a string, or an array of strings, and return the binary and error messages etc.
Then that function can be used by anyone how they like.
Another approach would be to write the thing as a normal C or C++ command line program which reads source files and writes binary as usual. That can then be compiled into Javascript using Emsripten. Which can then be used in the browser, under node.js, in an IDE or whatever. Like we do for the Openspin compiler.
The advantage of having the assembler written in C/C++ is that it will run anywhere that has a C compiler but perhaps not a JS environment. It will have best performance as natively compiled C/C++ anyway.
Actually, why not just use Dave Hein's P2 assembler? I think he said that it was up to date except for the new smart pin instructions.
If it would be useful, I could probably revive p2load so it works with the latest images. I'll just need to get Chip's code for his second-stage loader.Actually, why not just use Dave Hein's P2 assembler? I think he said that it was up to date except for the new smart pin instructions.
This one?
@DaveHein, I don't suppose that's available on GitHub (or similar)...
Also, whether using dave's tool or pnut, is there a way to load a binary file from the command line?
Yeah, I knew the assembler was written in x86 assembly. I just thought that if Chip were going to write it over in a high-level language, he might prefer Pascal to C/C++. I guess the best approach would probably be to get you to create OpenSpin2! :-)David Betz,
If pnut still works the same as before, then only the 'wrapper' stuff is delphi (which is not really pascal, it's derived from it). The actual guts of the compiler is in x86 ASM (using TASM to assemble it into a lib that Delphi imports).
I think javascript might be too slow.
There was a time when you'd want it in assembly to be fast.
But, these days I'm not sure you'd notice if it were C++ instead of assembly...