Jump to content
IGNORED

Editor support for writing assembly and BASIC


ralphb

Recommended Posts

Sorry if my question seems basic, but I've never used IDEA before. I downloaded and installed it, then downloaded the xdt99 plugin and added it to the plugin list in IDEA via the configuration tool, and it shows up in the plugin list subsequently. When I want to start a new project, I am not getting an option for using the xdt99 module, only the usual Android, Groovy and such... Does the plugin need to be in a specific directory? What am I missing?

Link to comment
Share on other sites

Sorry if my question seems basic, but I've never used IDEA before. I downloaded and installed it, then downloaded the xdt99 plugin and added it to the plugin list in IDEA via the configuration tool, and it shows up in the plugin list subsequently. When I want to start a new project, I am not getting an option for using the xdt99 module, only the usual Android, Groovy and such... Does the plugin need to be in a specific directory? What am I missing?

 

If you just choose File/Open and then choose the directory with your source files, IDEA will set of a project for you.

Link to comment
Share on other sites

First time you open a directory it will create a project from scratch.

 

Edit: Do you mean if you don't have any source files? Then I guess you can just create an empty directory. The New menu item in IDEA does not have any TI options, so you have to create your own files.

Link to comment
Share on other sites

First time you open a directory it will create a project from scratch.

 

Edit: Do you mean if you don't have any source files? Then I guess you can just create an empty directory. The New menu item in IDEA does not have any TI options, so you have to create your own files.

 

Yes, I understand that part, but how will IDEA know I'm say creating a TI assembly language file and provide the syntax highlighting and such?

Link to comment
Share on other sites

Yes, I understand that part, but how will IDEA know I'm say creating a TI assembly language file and provide the syntax highlighting and such?

 

That's based on the extension of the filename, the defaults being ".a99" and ".b99". You can assign additional extensions in the settings menu.

Link to comment
Share on other sites

Did you know I created a Editor Assembly support installed into TI Basic so using GRAM support you can run it from another cartridge loaded?

 

Example having RXB Cart loaded in Cart slot and TI Basic Support package I created you can run TI Basic Assembly from TI Basic?

  • Like 1
Link to comment
Share on other sites

Users Forth Hello,

 

Here's my first shot at a TurboForth plugin, I present you twenty shades of bluish color:

 

post-35214-0-89976500-1439646985_thumb.png

 

Well, slightly less, as I've grouped all those word types into seven categories to save on colors. You can change colors in the Settings dialog.

 

Forth strings are very weird, in particular the .ABORT" word stands out negatively. I decided to make it a string literal instead of an Interpreter word followed by a string literal, or it would have tripled the size of the lexer.

 

You can try out the following:

  • Navigate to definition (word, var, value, const) by pressing F3
  • Find all usages (across files) by pressing Ctrl+G
  • Semantic rename (across files) by pressing Shift+Alt+R
  • Comment/uncomment selection by pressing Ctrl+/
  • Folding of comments and definitions by pressing Ctrl+NumPad+ and Ctrl+NumPad-

This list assumes the "Eclipse" keymap, which you have to select in the Settings dialog. For other maps you'll have to consult the Help for shortcuts.

 

tforth.zip

  • Like 2
Link to comment
Share on other sites

Wow this is awesome! I'll give this a try tonight in Windows. Any idea how to install IDEA for Linux (Ubuntu)? It's shown in the Software Manager but only the commercial version. I don't mind paying for software, but I want to check it out first!

Link to comment
Share on other sites

Question: Is the above extension for Emacs or IDEA? :dunce:

 

It's for IDEA 14, which you can download for Linux for free here. Open a shell, create a directory, and untar, for example:

$ mkdir -p /opt
$ cd /opt
$ tar xfz <download-path>/ideaIC-14.1.4.tar.gz

Then start with /opt/idea-<...>/bin/idea.sh, where you have to replace <...> by the name of the generated path. You can add this to your start menu as well, depending on your distribution.

 

Absolutely no need for the commercial version.

Link to comment
Share on other sites

The IDEA plugin is having trouble with the attached source for Tursi's VGM player. I'm getting the following exception in the event log. This is in IDEA 13.

null
java.lang.NullPointerException
	at net.endlos.xdt99.xas99.Xas99FoldingBuilder.getBlockRange(Xas99FoldingBuilder.java:60)
	at net.endlos.xdt99.xas99.Xas99FoldingBuilder.buildFoldRegions(Xas99FoldingBuilder.java:25)
	at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:83)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:205)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate.a(FoldingUpdate.java:118)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate.access$000(FoldingUpdate.java:52)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate$2.compute(FoldingUpdate.java:104)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate$2.compute(FoldingUpdate.java:99)
	at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.java:53)
	at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:199)
	at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:43)
	at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:77)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate.updateFoldRegions(FoldingUpdate.java:98)
	at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.a(CodeFoldingManagerImpl.java:303)
	at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.updateFoldRegionsAsync(CodeFoldingManagerImpl.java:295)
	at com.intellij.codeInsight.daemon.impl.CodeFoldingPass.doCollectInformation(CodeFoldingPass.java:46)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:62)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:380)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:371)
	at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:368)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:344)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask.exec(JobLauncherImpl.java:193)
	at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
	at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
	at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
	at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
	at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:109)

tiplayer.a99

Link to comment
Share on other sites

The IDEA plugin is having trouble with the attached source for Tursi's VGM player.

 

Thanks for the report! The issue was the closing comment in the assembly source; I've fixed my handling now now. I also added highlighting support for anonymous labels, which I'm about to introduce to xas99.

 

Note, BTW, that in most languages comment blocks may be folded, whereas I decided to fold the blocks between comments. My rationale was that assembly doesn't really have identifiable submodules or functions that could be folded, but often enough line comments would introduce blocks of related code. Hope that makes sense.

 

xdt99-idea-1.1.1.zip

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

I'm still having problems with a few files. I think it has to do with comments. This file (fixed-top.a99) was generated by Magellan.

Error while indexing D:\Google Drive\Bouncy\source\fixed-top.a99
To reindex this file IDEA has to be restarted: net.endlos.xdt99.xas99.Xas99Lexer: Error: could not match input
java.lang.Error: net.endlos.xdt99.xas99.Xas99Lexer: Error: could not match input
	at net.endlos.xdt99.xas99.Xas99Lexer.zzScanError(Xas99Lexer.java:555)
	at net.endlos.xdt99.xas99.Xas99Lexer.advance(Xas99Lexer.java:860)
	at com.intellij.lexer.FlexAdapter.locateToken(FlexAdapter.java:95)
	at com.intellij.lexer.FlexAdapter.getTokenType(FlexAdapter.java:58)
	at com.intellij.lang.cacheBuilder.DefaultWordsScanner.processWords(DefaultWordsScanner.java:74)
	at com.intellij.psi.impl.cache.impl.id.IdTableBuilding$WordsScannerFileTypeIdIndexerAdapter.map(IdTableBuilding.java:139)
	at com.intellij.psi.impl.cache.impl.id.IdTableBuilding$WordsScannerFileTypeIdIndexerAdapter.map(IdTableBuilding.java:126)
	at com.intellij.psi.impl.cache.impl.id.IdIndex$4.map(IdIndex.java:81)
	at com.intellij.psi.impl.cache.impl.id.IdIndex$4.map(IdIndex.java:75)
	at com.intellij.util.indexing.MapReduceIndex.update(MapReduceIndex.java:215)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1827)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1754)
	at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1717)
	at com.intellij.util.indexing.UnindexedFilesUpdater.processFile(UnindexedFilesUpdater.java:73)
	at com.intellij.openapi.project.CacheUpdateSession.processFile(CacheUpdateSession.java:103)
	at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable$1.run(CacheUpdateRunner.java:231)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:911)
	at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable$2.run(CacheUpdateRunner.java:241)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
	at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
	at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.run(CacheUpdateRunner.java:236)
	at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:724)
	at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)

fixed-top.a99

Link to comment
Share on other sites

I'm still having problems with a few files. I think it has to do with comments. This file (fixed-top.a99) was generated by Magellan.

 

It's the WordsScanner that is supposed to handle usages in comments and string literals. I just don't know what it dislikes ... Could still be the grammar, as you're expected to lex everything, even in the case of errors -- and premature EOF is a very ugly error that is hard to handle. But that's just a guess right now.

In any case, I disabled the WordsScanner for now, which shouldn't do too much harm, as it wasn't working properly anyway.

xdt99-idea.zip

Link to comment
Share on other sites

  • 3 weeks later...

Both Emacs mode and IDEA plugin have been updated and integrated into xdt99, so further updates will be published via that other thread.

 

I still have the experimental Forth support lying around here. As I'm not a Forth programmer myself I would need some guidance on what it would require to make the Forth plugin useful -- assuming that there is real interest (I guess Notepad++ already does some syntax coloring).

Link to comment
Share on other sites

... I still have the experimental Forth support lying around here. As I'm not a Forth programmer myself I would need some guidance on what it would require to make the Forth plugin useful -- assuming that there is real interest (I guess Notepad++ already does some syntax coloring).

 

Surely! I would be happy to help and I am sure @Willsy would, as well. There may be others, too.

 

...lee

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

I've added some editor support to the xdt99 tools that assist developers with writing assembly and (Extended) BASIC programs. Right now this includes an extension for the GNU Emacs editor and a plugin for the IntelliJ IDEA IDE. Both editors are available for free and run on Linux, OS X, and Windows.

....

This all is awesome. And IntelliJ IDEA has a built-in support for vim! Just great. Did't do much of coding though, since I'm still studying this: http://www.unige.ch/medecine/nouspikel/ti99/titech.htm.

A huge thanks to all who made this possible!

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...