Asmusr Posted April 5 Share Posted April 5 (edited) Thanks for looking into this. I think I would prefer option 2 or 3, but I'm not sure what the difference is. If 3 would mean that only macro calls had to be changed, that would be my preferred. Another thing with requs is that tmp0: requ 0 doesn't work with a colon after the label. And a question: is it possible to have separate name spaces within the same IDEA project, e.g. if I would like to be able to have identical labels for different game levels (assembled separately)? Edited April 7 by Asmusr 1 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 7 Share Posted April 7 Me again. How can you calculate the MSB and LSB of a label greater than >8000? I thought you could always use /256 and %256, but the second example below gives the wrong answer. I need this in order to generate low endian data. 0526 test1: 0527 equ >2090 0528 EA88 2090 byte test1/256,test1%256 0529 EA8A 2090 data test1 0530 test2: 0531 equ >a020 0532 EA8C A1E0 byte test2/256,test2%256 0533 EA8E A020 data test2 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 7 Share Posted April 7 (edited) 2 hours ago, Asmusr said: How can you calculate the MSB and LSB of a label greater than >8000? To answer my own question, it looks like this is working: byte (test2&>ff00)/256,test2&>00ff Edited April 7 by Asmusr Quote Link to comment Share on other sites More sharing options...
ralphb Posted April 7 Author Share Posted April 7 (edited) 5 hours ago, Asmusr said: To answer my own question, it looks like this is working: byte (test2&>ff00)/256,test2&>00ff Are you sure about that? I implemented signed multiplication and division, so that still shouldn't work. But I guess we need unsigned operations as well, and while I'm at it, shift operations as well. I hadn't added shift operators yet because >> conflicts with the hex prefix >. But I'll figure something out. EDIT: OK, that sentence made no sense before. Edited April 7 by ralphb Quote Link to comment Share on other sites More sharing options...
ralphb Posted April 7 Author Share Posted April 7 On 4/5/2023 at 6:59 PM, Asmusr said: Another thing with requs is that tmp0: requ 0 doesn't work with a colon after the label. And a question: is it possible to have separate name spaces within the same IDEA project, e.g. if I would like to be able to have identical labels for different game levels (assembled separately)? That's odd -- I'm getting a different value if the colon is present. I'll have to check this. I'll have to do some research if a Namespace-like feature is possible, as IDEA treats all files as one project. The duplicate label, unused label, etc. checks can be implemented per file, but I'm not sure about more basic things like code completion, go-to-definition and so on. I'll check this, too. 3 Quote Link to comment Share on other sites More sharing options...
ralphb Posted April 9 Author Share Posted April 9 I've pushed new versions of xas99 and xga99 with support for unsigned division // and %% and logical shift operators >> and <<. I also fixed the REQU bug. I'm still working on the IDEA macro issue, which might take some time. But in the meantime, I could create a plugin that favors labels over register aliases, if you prefer. 7 Quote Link to comment Share on other sites More sharing options...
GDMike Posted April 9 Share Posted April 9 (edited) You are always all over the fixes. Ty Edited April 9 by GDMike 1 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 10 Share Posted April 10 20 hours ago, ralphb said: I'm still working on the IDEA macro issue, which might take some time. But in the meantime, I could create a plugin that favors labels over register aliases, if you prefer. Thank you, but it's not that urgent. Quote Link to comment Share on other sites More sharing options...
ralphb Posted April 15 Author Share Posted April 15 (edited) I've just pushed a new IDEA plugin, which you can download here. Macro call arguments are now parsed correctly, which wasn't actually that difficult after I learned how it's done. The only downside of this change is that now even more code runs when editing a line. Let me know If IDEA becomes too sluggish. In addition to macro calls, I also fixed a bug that caused preprocessor commands without arguments to be shown as erroneous. Edited April 15 by ralphb 3 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 15 Share Posted April 15 2 hours ago, ralphb said: I've just pushed a new IDEA plugin, which you can download here. Macro call arguments are now parsed correctly, which wasn't actually that difficult after I learned how it's done. The only downside of this change is that now even more code runs when editing a line. Let me know If IDEA becomes too sluggish. In addition to macro calls, I also fixed a bug that caused preprocessor commands without arguments to be shown as erroneous. Very nice. The only thing now is that in .ifeq start_at_level,3 the comma is marked as an error. The CPU and memory usage in IDEA is a bit concerning. I don't know if it got worse with the last update, but the source code for Trap Door is using a lot of resources. You can try for yourself: https://github.com/Rasmus-M/trapdoor. This is probably difficult to do anything about, and so far my machine has been able to cope with it. Quote Link to comment Share on other sites More sharing options...
ralphb Posted April 16 Author Share Posted April 16 I've pushed a new plugin version that fixes the non-macro parsing. Later I'll have a look at your project, but I guess IDEA just really is a resource hog. When debugging my plugin, the sheer amount of code that is running outside the plugin is staggering. 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.