Description
TabFunctions, or TabFunc for short, is the first truly useful SE to be created with the brand-new Shell Expansion system I finished yesterday. Simply pressing [F1] and [F2] acts as the equivalent of [TAB] and [SHIFT][TAB] on a computer keyboard. The regular arrows, clicking, and keyboard shortcuts remain fully functional, so the TabFunc simply layers an extra bit of useability on top of the interface for those who don't feel like navigating manually with the mouse. Screenshot and source code below for those interested in learning about making SEs.

Screenshot


Source Code

Code:
.nolist            ;defines, includes, and equates
#DEFINE equ .equ
#DEFINE EQU .equ
#DEFINE end .end
#IFDEF TI83
#include "doorscs.inc"      ;token interpretation
SEOffset   equ   $8265
#ENDIF
#IFDEF TI83P
#include "doorscs.inc"      ;token interpretation
SEOffset   equ   $86ec
#ENDIF
.list
   .org 0
   .db $BB,$6D
   .db $AB
#IFDEF TI83P
   .db $C9
#ENDIF
SEStart:
   .db $31
   .db $87
   .db $50
   .dw 0                  ;.dw SELoad-SEStart
   .dw SEMouse-SEStart
   .dw 0

SEMouse:
   ld a,(ix+1)
   or a
   jr nz,ycoord
   ld a,(ix)
   or a
   jr z,incpos
   bcall(_getcsc)
   cp $34
   jr z,incpos
   cp $35
   jr z,decpos
   ld d,0
   ret
ycoord:
   add a,2+4+96
   ld d,a
   xor a
   ld (ix+1),a
   ret
incpos:
   ld a,(ix)
   cp 19
   jr nz,inc2
   xor a
inc2:
   inc a
seta:
   ld (ix),a
   dec a
   add a,a
   ld e,a
   ld d,0
   ld hl,Vectortable-semouse+seoffset
   add hl,de
   inc hl
   ld a,(hl)
   ld (ix+1),a
   dec hl
   ld a,(hl)
   add a,6
   ld d,a
   ret
decpos:
   ld a,(ix)
   cp 1
   jr nz,dec2
   ld a,20
dec2:
   dec a
   jr seta
leftclick:
   ld d,1
   ret
rightclick:
   ld d,2
   ret
VectorTable:
   .db 13,11
   .db 42,11
   .db 70,11
   .db 13,39
   .db 42,39
   .db 70,39
   .db 92,3
   .db 92,52
   .db 8,59
   .db 21,59
   .db 92,59
   .db 4,51
   .db 10,51
   .db 15,51
   .db 20,51
   .db 26,51
   .db 33,51
   .db 39,51
   .db 46,51
.end
END
awesome work dude!!! post this on revsoft
Would you consider posting it? Or should I?
Oh, and does the source code make sense? I should mention a few new things about SEs:

New mem pointer
Each SE is allocated two bytes of RAM for mode storage. IT can be found at (ix) and (ix+1) when the SE is loaded.

New dModes
0 = nothing
1 = leftclick
2 = rightclick
3 = up
4 = down
5 = left
6 = down
7-102 = set X-ccord to d-7
103-166 = set Y-coord to d-103
I suggest you post it,

also can the dModes be accessed from a normal program?
Nope, only SEs have the power to access dModes, because they operate at the same time as the kernel itself. When normal programs are executing, the DCS kernel has handed full execution power over to them.
does the tab key work in GUI programs?
Ah, I see your point. No, it would be too much of a hassle to make SEs continue to work and not crash within the GUIMouse routine since pointers would be moving willy-nilly around.
Can SE's be archived or do they have to stay in RAM?
They can certainly be archived, but Doors CS will ignore archived SEs. In essence, you can disable SEs by archiving and reenable them by unarchiving them.
KermMartian wrote:
They can certainly be archived, but Doors CS will ignore archived SEs. In essence, you can disable SEs by archiving and reenable them by unarchiving them.


Why don't you make that an SE selection menu so that you can enable/disable in DCS and then let DCS take care of the unarchiving? (That could be part of the "loading" routine when it starts up, copying all "activated" SEs to RAM) It would then make sense to have the option to have DCS archive (or delete the RAM copy) before running a program (and subsequently re-copying) - make it an option so that it can be enabled for a large program that needs the space, and disabled for faster program launghing when the extra RAM isn't needed

Surely that isn't TOO much work? Smile
Hmm, I suppose I could replace that unused "Link" menu with a "Modules" menu; that's doable. Thanks, Kllrnohj, I just may follow through on that.
YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS YOU ARE THE MAN Kerm!!!!!
jpez wrote:
YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS YOU ARE THE MAN Kerm!!!!!


I was expecting that at some point Wink
jpez wrote:
YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS YOU ARE THE MAN Kerm!!!!!
/me rofls at JPez's enthusiastic response.

Glad this makes you so happy. I hope it's that important extra bit of pizzaz that convinces people to switch to DCS.
Indeedy-do, Kermo McThermo.
So, anyone have some more SE requests for me? I'm going to be upgrading my calc with an internal TICI hub today and then writing a PS/2 SE soon, so that's on the agenda.
would a keyboard SE be too far off?
I wouldn't be opposed to writing a usb-mouse se.
netham45 wrote:
would a keyboard SE be too far off?
Certainly not if I get the PS/2 mouse SE working. And elfprince13, that would be cool. You'd have to figure out how to get usb8x from within SEs,
hmm, I think its possible but I dont think it would have much point if it didn't work with the GUIMouse routine....
  
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 3
» All times are UTC - 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