Subj : futil.asm redeux To : Jasen Betts From : Paul Williams Date : Fri Sep 20 2002 12:45 am Hi Jasen Betts, hope you are having a nice day PW>>What I'd like to do is to be able to hit R and PW>>have RING< placed into the xmit buffer which would then be sent PW>>out a comport where a program on another would see it and think it PW>>came from a modem on that box. (well not just ring but any other PW>>strings as well) JB>To do that you'll need to modify the keyboard watching code and the JB>buffer-stuffing code too. The watching code shouldn't be that much as per my other msg to Ben. The start of the code already defines for either/both shift keys as well as for the already existing lshift/ctrl combo. Do the same for the right and duplicate the response table. Then it's just watching for the correct shift bit and duplicating the buffer fill but using the fossil xmit instead of receive. But since I'm not at all familiar w/ fossil (int14) programming... Using * for my mods too.. ;> ; Keyboard shift key codes CTRL equ 004H ; Ctrl key is down SHIFTS equ 003H ; Any shift pressed LSHIFT equ 002H ; Left shift RSHIFT equ 001H ; Right shift ALT equ 008h ; Alt key pressed NUMLOCK equ 020H ; Numlock state ; BIOS ports, data area definitions SH_STATE equ 0417H ; Shift state byte KBD_PORT equ 060H ; Keyboard data port KBD_CTRL equ 061h ; Keyboard control port LSC equ (LSHIFT or CTRL) ; Shorthand for Ctrl-LShift *RSC equ (RSHIFT or CTRL) ; Shorthand for Ctrl-RShift KUSED equ 0FH ; Bits used in shift mask ; FOSSIL status bits PS_CARRIER equ 0080H ; Carrier signal from MSREG PS_RXCHARS equ 0100H ; Characters in input buffer 88 88 ; ; Hot keys table ; even KeyCodes label word 88 notkey <18H, LSC, 0100H, not 0080H, 00H, 01H, 01H, ok > ; csO 'OK' 88 *notkey <18H, RSC, 0100H, not 0080H, 00H, 01H, 01H, ok > ; csO 'OK' 88 That does make the table a lot larger, but would seem to be an easier way of doing it. It's not like this would be something loaded and left running on a full time basis, it's just for testing a setup to make sure that everything will (hopefully) work like it should when a real modem-modem connect takes place. JB>what's it for anyway? The best explanation would be in the docs in that msg to Ben. ;> JB> something like this maybe... most of my mods are marked with * JB> in AL,KBD_PORT ; Scan code of key pressed JB> mov AH,ES:[SH_STATE] ; Current shift state bits JB> and AH,KUSED ; Mask out unused bits JB> mov DI,offset KeyCodes ; Scan key codes table JB> mov CX,KEYS JB>@@: JB> cmp AX,CS:[DI] JB> je @Found1 JB> add DI,SZ_ka JB> loop @B JB> ; Key was not found JB>* xor AX, LSHIFT or RSHIFT ; swap shift bits.. Is that really needed though? By setting up RSC that would give the mov AH,ES:[SH_STATE] above something to look for and from there jump to the duplicated code that uses the xmit. JB>* mov DI,offset KeyCodes JB>* mov CX,KEYS JB>* @@: JB>* cmp AX,CS:[DI] JB>* je @Found2 JB>* add DI,SZ_ka JB>* loop @B And at this point I'm cross-eyed. %> It's been almost 15yrs since I did any serious amount of asm coding (or coding in general) so bare w/ me. JB>* ; HMM, dunno what goes here... the wedge seems to block all sending JB>* ; of characters. JB>* ; It's a tsr, gotta put something up when loading. ];> -=> Yours sincerely, Paul Williams <=- .... "Classic, classic tagline material." -- Amy --- Terminate 4.00/Pro * Origin: Texas math: .357 + .30x.30 + .44 = 0 (1:387/710) .