Jump to content

Photo

Editor support for writing assembly and BASIC

editor basic assembler

44 replies to this topic

#26 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 2,809 posts
  • Location:Eagan, MN, USA

Posted Fri Aug 14, 2015 6:56 AM

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?



#27 Asmusr OFFLINE  

Asmusr

    River Patroller

  • 2,467 posts
  • Location:Denmark

Posted Fri Aug 14, 2015 8:28 AM

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.



#28 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 2,809 posts
  • Location:Eagan, MN, USA

Posted Fri Aug 14, 2015 1:42 PM

 

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

 

What if I need to create a new project from scratch?



#29 Asmusr OFFLINE  

Asmusr

    River Patroller

  • 2,467 posts
  • Location:Denmark

Posted Fri Aug 14, 2015 2:00 PM

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.



#30 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 2,809 posts
  • Location:Eagan, MN, USA

Posted Fri Aug 14, 2015 2:32 PM

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?



#31 ralphb OFFLINE  

ralphb

    Dragonstomper

  • Topic Starter
  • 520 posts
  • Location:Germany

Posted Fri Aug 14, 2015 2:41 PM

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.



#32 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 2,809 posts
  • Location:Eagan, MN, USA

Posted Fri Aug 14, 2015 5:55 PM

 

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

 

Ah! Got it. Thanks :)



#33 RXB OFFLINE  

RXB

    River Patroller

  • 2,814 posts
  • Location:Vancouver, Washington, USA

Posted Fri Aug 14, 2015 9:09 PM

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?



#34 ralphb OFFLINE  

ralphb

    Dragonstomper

  • Topic Starter
  • 520 posts
  • Location:Germany

Posted Sat Aug 15, 2015 7:59 AM

Users Forth Hello,

 

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

 

Attached File  idea-forth.png   94.65KB   2 downloads

 

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.

 

Attached File  tforth.zip   55.05KB   7 downloads



#35 Willsy OFFLINE  

Willsy

    River Patroller

  • 3,024 posts
  • Location:Uzbekistan (no, really!)

Posted Sat Aug 15, 2015 9:03 AM

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!



#36 Willsy OFFLINE  

Willsy

    River Patroller

  • 3,024 posts
  • Location:Uzbekistan (no, really!)

Posted Sat Aug 15, 2015 9:09 AM

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



#37 ralphb OFFLINE  

ralphb

    Dragonstomper

  • Topic Starter
  • 520 posts
  • Location:Germany

Posted Sat Aug 15, 2015 9:48 AM

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.



#38 Asmusr OFFLINE  

Asmusr

    River Patroller

  • 2,467 posts
  • Location:Denmark

Posted Wed Aug 19, 2015 10:48 PM

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)

Attached Files



#39 ralphb OFFLINE  

ralphb

    Dragonstomper

  • Topic Starter
  • 520 posts
  • Location:Germany

Posted Thu Aug 20, 2015 11:23 AM

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.

 

Attached File  xdt99-idea-1.1.1.zip   187.42KB   7 downloads



#40 Asmusr OFFLINE  

Asmusr

    River Patroller

  • 2,467 posts
  • Location:Denmark

Posted Sat Sep 5, 2015 6:15 AM

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)

Attached Files



#41 ralphb OFFLINE  

ralphb

    Dragonstomper

  • Topic Starter
  • 520 posts
  • Location:Germany

Posted Sun Sep 6, 2015 12:51 PM

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.

 

Attached File  xdt99-idea.zip   188.87KB   6 downloads



#42 ralphb OFFLINE  

ralphb

    Dragonstomper

  • Topic Starter
  • 520 posts
  • Location:Germany

Posted Thu Sep 24, 2015 12:23 PM

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).



#43 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

  • 3,392 posts
  • Location:Silver Run, Maryland

Posted Thu Sep 24, 2015 4:45 PM

... 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



#44 Willsy OFFLINE  

Willsy

    River Patroller

  • 3,024 posts
  • Location:Uzbekistan (no, really!)

Posted Fri Sep 25, 2015 3:04 AM

Yep - anything to make Forth development more comfortable (it's not the easiest of languages to learn) is a good thang!



#45 acme OFFLINE  

acme

    Combat Commando

  • 5 posts
  • Location:Germany / Stuttgart

Posted Fri Aug 4, 2017 8:49 PM

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/...ti99/titech.htm.

A huge thanks to all who made this possible!






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users