Here's the source code to a new shell expansion I made for Doors CS. You can download it below as a file.

Can anybody tell me if I could optimize this some more? This is my first functional/released assembly program and I don't know if I've missed some optimizations. Thanks all and I hope you find this useful! The source is in the download.

Edit: I got some help from Zeda at optimizing my program as well as some from Kerm. @Roccolox helped me realize that I didn't need to check the arrow keys so now the mouse goes a lot faster because it skips the iterations when the arrow keys are pressed.

Download: https://www.cemetech.net/downloads/files/2029/x2117
I'm so proud that someone other than me created a Shell Expansion - by the way, the Cemetech download is at https://www.cemetech.net/downloads/files/2029 . May I also recommend you put the source code in the download and/or on Github?


Code:
   jr z,GrabKey
   jr HotRoutine
GrabKey:

Can be just jr nz,HotRoutine. The rest looks surprisingly optimized as-is.
KermMartian wrote:
I'm so proud that someone other than me created a Shell Expansion - by the way, the Cemetech download is at https://www.cemetech.net/downloads/files/2029 . May I also recommend you put the source code in the download and/or on Github?


Code:
   jr z,GrabKey
   jr HotRoutine
GrabKey:

[code] Can be just jr nz,HotRoutine. The rest looks surprisingly optimized as-is.


Oh cool thanks. I'll put it there instead. Would you update the download when I do it?
We generally accept downloads within 1 minute - 1 day, depending on how much real life is keeping us busy, but I'll check and accept it when I can.

Is this your first assembly project, or if not, what other ones have you released (and why are they not in the Archives)? If it's your first, I'm impressed.
KermMartian wrote:
We generally accept downloads within 1 minute - 1 day, depending on how much real life is keeping us busy, but I'll check and accept it when I can.

Is this your first assembly project, or if not, what other ones have you released (and why are they not in the Archives)? If it's your first, I'm impressed.


This is my first actually. I started with BASIC then went to Grammer 2, then I went to Axe, and out of all of that knowledge I've learned a lot of the principals behind assembly. I've done small tidbits of things in assembly before because I couldn't accomplish something in Grammer or Axe without it, but this would be considered my first. Razz I've re-uploaded the improved file.
I have gotten around to trying out HotkeySE and I think that it is a pretty amazing program! Well done NonstickAtom785.
One thing though, the program really slows down the cursor. Is there a way for the cursor to still move at normal speed?
RoccoLox Programs wrote:
I have gotten around to trying out HotkeySE and I think that it is a pretty amazing program! Well done NonstickAtom785.
One thing though, the program really slows down the cursor. Is there a way for the cursor to still move at normal speed?


Yah I would just have to add in jumps for anytime the arrow keys are pressed. It goes slow because of the DJNZ routine that checks the keys pressed for the keys in the jump table. I'll fix it and upload it tomorrow. (I also found an optimization to the current version that I can add). I'm going for minimal size.
Nice work; I like the idea!
I'm making a configuration program in AXE to add more features. When it's finished it will work kind've like how the TIBoyCE control options work. You will be able to change which keys do what in case you want a different hotkey selection. Any other ideas for features?
I have tried out the newest version of this program and the cursor moves WAY better. I really like this program!
RoccoLox Programs wrote:
I have tried out the newest version of this program and the cursor moves WAY better. I really like this program!


Okay thanks I'm glad that it works!

I was trying to make the buttons make sense when I was programming them. I'm making an extra configuration program that will change what key performs an action. I intentionally left out the delete action because I didn't want anybody or myself to accidentally delete something. But I'm going to modify it so that it won't be available until you run and configure that action to the specified key. What I need help with is getting the key name based off the key that is pressed. Any ideas as to what I should do in this scenario? (F.Y.I I'm using Axe but some native assembly code will help me a bunch too!)

I was thinking of making a zero terminated list of strings and using str-Get() to get the string based off of the key, but the only problem is how to set up the routine to do that since there are keys that cannot be used...(enter, on, graph, xton, stat, arrows, alpha, and shift)
To add to what you plan on adding... I think that it would be pretty useful to add a key that takes you to the program editor.
Also, is there a way to get the hotkeys to work with the [XTθn] and [STAT] buttons? They only work with the program that you select with cursor. (I hope that makes sense.)
RoccoLox Programs wrote:
To add to what you plan on adding... I think that it would be pretty useful to add a key that takes you to the program editor.
Also, is there a way to get the hotkeys to work with the [XTθn] and [STAT] buttons? They only work with the program that you select with cursor. (I hope that makes sense.)


Oh yah I know that's an issue. But I don't know how Kerm programmed that function. I would love it if it worked already... And there already is a button that takes you to the program editor. It's PRGM. Didn't read the documentation? Razz
NonstickAtom785 wrote:
Didn't read the documentation? Razz


Whoops! I think I accidently skipped that part. (All of my complaining... was all for nothing.) Laughing
I'm almost finished with the program I fixed my issue with the program now. It was silly as heck Razz.
NonstickAtom785 wrote:
I'm almost finished with the program I fixed my issue with the program now. It was silly as heck Razz.

That's awesome! I can't wait to try it out. I am starting to get really attached to this program; it's really useful.
RoccoLox Programs wrote:
NonstickAtom785 wrote:
I'm almost finished with the program I fixed my issue with the program now. It was silly as heck Razz.

That's awesome! I can't wait to try it out. I am starting to get really attached to this program; it's really useful.


That's great! I'm so happy that my first real assembly program was a hit for someone! (I wish Doors had SE's on all of it's counter parts for the colored versions.)

I'll try and have the program done by Moday(no guarantees, because of the sudden work load from all of my teachers). And plus I like to optimize and substitute AXE code with raw assembly code so it's not so big in size. If I get it really small I should be able to just put it inside of the SE. But I don't know how that might contradict with DoorsGUI. I've tried to print stuff in Doors before and it resulted in a crash. :/. So a stand alone program is much easier to handle. This way I could also just make Axe create the SE if it doesn't exist, with the defaults. Very Happy
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement