LS-DOS 6.3.1 - KSM Filter Assembly Listing (HTML format version)

[Copyright 1999,2002 Frank Durda IV, All Rights Reserved.
Mirroring of any material on this page in any form is expressly prohibited.
The official web site for this material is:  http://nemesis.lonestar.org
Contact this address for use clearances: clearance at nemesis.lonestar.org
Comments and queries to this address: web_software_2011 at nemesis.lonestar.org]
MISOSYS EDAS-4.3 04/19/99 21:54:24 KSM/FLT - LS-DOS 6.2         Page 00001 

              00001 ;KSM/ASM - Keystroke Multiply Filter
              00003 ;
000A          00004 LF      EQU     10
000D          00005 CR      EQU     13
              00006 ;
0000          00007 *GET    SVCMAC:3                ;SVC Macro equivalents
              00008 ;SVCMAC/ASM - LS-DOS Version VI
              00009 *LIST   OFF
              00401 *LIST   ON
0000          00403 *GET    COPYCOM:3               ;Copyright message
              00404 ; COPYCOM - File for Copyright COMment block
              00405 ;
0000          00406 *GET BUILDVER/ASM:3
              00407 ;
              00408 ;       Buildver/asm is a bit of a kludge since not all utilities can load
              00409 ;       equates from LDOS60 and still compile.  LOWCORE and everybody else
              00410 ;       relies on this setting, and it eventually ends up in LDOS60/EQU
              00411 ;       for programs that can use that.
              00412 ;
FFFF          00413 @BLD631         EQU     -1      ;<631>Build 631 distribution (LEVEL 1B)
              00414 ;       These switches activate patches made since the 1B release.
              00415 ;       It is important that all earlier patches be enabled when a higher
              00416 ;       patch is enabled.
              00417 ;       Patches C thru F were published in TMQ IV.iv, page 32 (NOTE: the
              00418 ;       patch addresses listed for SPOOL in SPOOL1/FIX are 19H high.)
FFFF          00419 @BLD631C        EQU     -1      ;<631>Apply 1C patches (SETKI)
FFFF          00420 @BLD631D        EQU     -1      ;<631>Apply 1D patches (DIR)
FFFF          00421 @BLD631E        EQU     -1      ;<631>Apply 1E patches (DIR & MEMDISK/DCT)
FFFF          00422 @BLD631F        EQU     -1      ;<631>Apply 1F patches (SPOOL)
              00423 ;       Patches G and H were published in TMQ V.i, pages 10 and 18/19.
FFFF          00424 @BLD631G        EQU     -1      ;<631>Apply 1G patches (//KEYIN,DIR,DO *)
FFFF          00425 @BLD631H        EQU     -1      ;<631>Apply 1H patches (MEMORY)
              00426 ;
              00427 ;End of BUILDVER/ASM
              00428         IF      @BLD631
              00430         ELSE
              00431         COM     '<*(C) 1982,3,4,6 by LSI*>'
              00432         ENDIF
              00433 ;
2400          00434         ORG     2400H
              00435 ;
              00436 KSM
2400          00437         @@CKBRKC                ;Check for break
2400+3E6A     00438         LD      A,106
2402+EF       00439         RST     40
2403 2804     00440         JR      Z,KSMA          ;Contine if not
2405 21FFFF   00441         LD      HL,-1           ;  else abort
2408 C9       00442         RET
              00443 ;
2409 ED53CA27 00444 KSMA    LD      (KSMDCB),DE     ;Save ptr to DCB
240D E5       00445         PUSH    HL              ;Save ptr to cmdline buf
240E          00446         @@DSPLY HELLO$          ;Display copyright msg
              00447         IFEQ    01H,1
240E+217225   00448         LD      HL,HELLO$
              00449         ENDIF
2411+3E0A     00450         LD      A,10
2413+EF       00451         RST     40
2414          00452         @@FLAGS                 ;Get flags
2414+3E65     00453         LD      A,101
2416+EF       00454         RST     40
2417 E1       00455         POP     HL              ;Rcvr cmndline pointer
              00456 ;
              00457 ;       Check if entry from SET command
              00458 ;
2418 FDCB025E 00459         BIT     3,(IY+'C'-'A')  ;System request?
241C CA4B25   00460         JP      Z,VIASET        ;Quit if not
241F 11A126   00461         LD      DE,KSMFCB       ;Point to FCB
2422          00462         @@FSPEC                 ;Fetch the KSM filespec
2422+3E4E     00463         LD      A,78
2424+EF       00464         RST     40
2425 C25725   00465         JP      NZ,SPCREQ       ;Jump on bad spec
2428 D5       00466         PUSH    DE              ;Save FCB pointer
2429 119626   00467         LD      DE,PRMTBL$      ;Load param table pointer
242C          00468         @@PARAM                 ;Parse parms
242C+3E11     00469         LD      A,17
242E+EF       00470         RST     40
242F D1       00471         POP     DE              ;Recover FCB pointer
2430 C26325   00472         JP      NZ,IOERR        ;Go on parm error
2433 217225   00473         LD      HL,DFTKSM       ;Init to default ext
2436          00474         @@FEXT                  ;Fetch if not entered
2436+3E4F     00475         LD      A,79
2438+EF       00476         RST     40
              00477 ;
              00478 ;       Transfer requested ENTER char to test loc
              00479 ;
2439 213B00   00480 EPARM   LD      HL,';'          ; set default ";"
243C 3A9D26   00481         LD      A,(ERSP)        ;Test parm response
243F CB77     00482         BIT     6,A             ;Flag is no good!
2441 C26125   00483         JP      NZ,PRMERR
2444 CB6F     00484         BIT     5,A             ;Test string or value
2446 7E       00485         LD      A,(HL)          ;P/u assumed string
2447 2001     00486         JR      NZ,$+3          ;Go if string entry
2449 7D       00487         LD      A,L             ;P/u hex or dec entry
244A 321328   00488         LD      (ECHAR+1),A     ;Stuff it in there
244D D5       00489         PUSH    DE
244E 116D25   00490         LD      DE,KSM$         ;Check if filter is
2451          00491         @@GTMOD                 ;  already resident
2451+3E53     00492         LD      A,83
2453+EF       00493         RST     40
2454 227D24   00494         LD      (KSMMEM+1),HL   ;Stuff start
2457 EB       00495         EX      DE,HL           ;Put DCB ptr to HL
2458 D1       00496         POP     DE
2459 202C     00497         JR      NZ,OPENKSM      ;Go if not
              00498 ;
              00499 ;       Make sure that the new DCB is same as the old
              00500 ;
245B E5       00501         PUSH    HL              ;Save where to stuff
245C 4E       00502         LD      C,(HL)          ;P/u DCB pointer LSB
245D 23       00503         INC     HL
245E 46       00504         LD      B,(HL)          ;P/u DCB pointer MSB
245F 210600   00505         LD      HL,6            ;Get old DCB name &
2462 09       00506         ADD     HL,BC           ;  stuff into error
2463 7E       00507         LD      A,(HL)          ;  message in case
2464 2C       00508         INC     L               ;  a different DCB
2465 66       00509         LD      H,(HL)          ;  is referenced
2466 6F       00510         LD      L,A
2467 227226   00511         LD      (DCBNAM$),HL
246A B4       00512         OR      H               ;If DCB name is null,
246B 2ACA27   00513         LD      HL,(KSMDCB)
246E E5       00514         PUSH    HL              ;Save pointer to stuff
246F 2803     00515         JR      Z,UPDPTR        ;  then OK to use
2471 B7       00516         OR      A
2472 ED42     00517         SBC     HL,BC           ;Same DCB pointer?
2474 C1       00518 UPDPTR  POP     BC              ;Rcvr pointer to stuff
2475 E1       00519         POP     HL              ;Rcvr address to put pointer
2476 C24F25   00520         JP      NZ,DCBERR       ;Quit if filter in use
              00521 ;
              00522 ;       Same DCB - Okay to stuff
              00523 ;
2479 71       00524         LD      (HL),C          ;Store the DCB pointer
247A 23       00525         INC     HL
247B 70       00526         LD      (HL),B
247C 210000   00527 KSMMEM  LD      HL,$-$          ;If res, ptr to start
247F 015200   00528         LD      BC,ECHAR-DVRBGN+1
2482 09       00529         ADD     HL,BC           ;Resident, stuff ECHAR
2483 3A1328   00530         LD      A,(ECHAR+1)     ;  where it is in memory
2486 77       00531         LD      (HL),A          ;Stuff in upper mem
2487 21C126   00532 OPENKSM LD      HL,KSMBUF       ;Pt to buffer area
248A 0600     00533         LD      B,0             ;Init LRL=256
248C          00534         @@OPEN                  ;Open the file
248C+3E3B     00535         LD      A,59
248E+EF       00536         RST     40
248F C26325   00537         JP      NZ,IOERR        ;Jump on open error
2492 212128   00538         LD      HL,DVREND       ;Place file in memory 1st
2495 061A     00539         LD      B,26            ;Init for 26 lines
2497          00540 KSM1    @@GET                   ;Get a char from file
2497+3E03     00541         LD      A,3
2499+EF       00542         RST     40
249A 200C     00543         JR      NZ,KSM2         ;Jump on error
249C 77       00544         LD      (HL),A          ;Stuff into memory
249D 23       00545         INC     HL              ;Inc memory pointer
249E FE0D     00546         CP      CR              ;Found end-of-line?
24A0 20F5     00547         JR      NZ,KSM1         ;Loop if not
24A2 10F3     00548         DJNZ    KSM1            ;Decrement the A-Z loop
24A4 2B       00549         DEC     HL              ;Backup over last CR &
24A5 04       00550         INC     B               ;  adjust for one more
24A6 3E1C     00551         LD      A,1CH           ;No error here, just EOF
24A8 F5       00552 KSM2    PUSH    AF              ;Save error code
24A9          00553         @@CLOSE                 ;Close the file
24A9+3E3C     00554         LD      A,60
24AB+EF       00555         RST     40
24AC F1       00556         POP     AF
24AD FE1C     00557         CP      1CH             ;Ck for eof
24AF C26325   00558         JP      NZ,IOERR        ;Jump on not eof error
24B2 360D     00559 KSM3    LD      (HL),CR         ;End with a 
24B4 23       00560         INC     HL              ;For all remaining
24B5 10FB     00561         DJNZ    KSM3            ;"letters" not entered
24B7 DD2ACA27 00562         LD      IX,(KSMDCB)     ;Rcvr user DCB entry
24BB 112128   00563         LD      DE,DVREND       ;Calculate the length
24BE AF       00564         XOR     A               ; of the KSM file just
24BF ED52     00565         SBC     HL,DE           ; loaded
24C1 44       00566         LD      B,H             ;Xfer length
24C2 4D       00567         LD      C,L
24C3 2A7D24   00568         LD      HL,(KSMMEM+1)   ;If not previously res,
24C6 7D       00569         LD      A,L             ;  move to HIGH$
24C7 B4       00570         OR      H
24C8 281E     00571         JR      Z,MOVTOHI
24CA C5       00572         PUSH    BC              ;Save length
24CB E5       00573         PUSH    HL              ;Save old start
24CC 09       00574         ADD     HL,BC           ;Start + data
24CD 3812     00575         JR      C,KSM3A         ;Bad if wrap past 0
24CF 016100   00576         LD      BC,DVREND-DVRBGN+1
24D2 09       00577         ADD     HL,BC           ;Start + data + filter
24D3 380C     00578         JR      C,KSM3A         ;Bad if wrap past 0
24D5 EB       00579         EX      DE,HL           ;Save in reg DE
24D6 E1       00580         POP     HL              ;Rcvr old start
24D7 23       00581         INC     HL              ;Pt to last byte used
24D8 23       00582         INC     HL
24D9 7E       00583         LD      A,(HL)          ;P/u last byte used
24DA 23       00584         INC     HL
24DB 66       00585         LD      H,(HL)          ;  into HL
24DC 6F       00586         LD      L,A
24DD E5       00587         PUSH    HL
24DE AF       00588         XOR     A               ;Clear carry flag
24DF ED52     00589         SBC     HL,DE           ;Is req > available?
24E1 E1       00590 KSM3A   POP     HL              ;Rcvr old start to reuse
24E2 C1       00591         POP     BC              ;Rcvr length of req
24E3 DA5325   00592         JP      C,NOROOM        ;Quit if file too big
24E6 1809     00593         JR      KSM0A
24E8 C5       00594 MOVTOHI PUSH    BC              ;Save data length
24E9 210000   00595         LD      HL,0            ;P/u current high memory
24EC 45       00596         LD      B,L
24ED          00597         @@HIGH$
24ED+3E64     00598         LD      A,100
24EF+EF       00599         RST     40
24F0 C1       00600         POP     BC              ;Recover data length
24F1 22C327   00601 KSM0A   LD      (DVRBGN+2),HL   ;Stuff last byte used
24F4 22CF27   00602         LD      (RX1),HL        ;Stuff ptr to flag byte
24F7 3600     00603         LD      (HL),0          ;Init the KSM char ptr
24F9 2B       00604         DEC     HL              ;  to zero to show no
24FA 3600     00605         LD      (HL),0          ;  char avail at startup
24FC 2B       00606         DEC     HL
24FD 112128   00607         LD      DE,DVREND       ;Move data to high
2500 1A       00608 MOVLP   LD      A,(DE)          ;Data is in reverse order
2501 77       00609         LD      (HL),A
2502 2B       00610         DEC     HL              ;Dec himem ptr
2503 13       00611         INC     DE              ;  and inc the char ptr
2504 0B       00612         DEC     BC              ;Reduce char count
2505 78       00613         LD      A,B             ;  and check if done
2506 B1       00614         OR      C
2507 20F7     00615         JR      NZ,MOVLP        ;Loop back if not
2509 016000   00616         LD      BC,DVREND-DVRBGN        ;Get driver len
250C AF       00617         XOR     A               ;Reduce potential HIGH$
250D ED42     00618         SBC     HL,BC           ;  by driver length
250F 3A7D24   00619         LD      A,(KSMMEM+1)    ;Don't update HIGH$
2512 B7       00620         OR      A               ;  if previously res
2513 2809     00621         JR      Z,DOHIGH        ;Go if not resident
              00622 ;
              00623 ;       Module already resident
              00624 ;
2515 ED5B7D24 00625         LD      DE,(KSMMEM+1)   ;P/u module entry point
2519 213926   00626         LD      HL,KSMRPL$      ;  & reuse the filter
251C 1818     00627         JR      KSM8
              00628 ;
              00629 ;       Stuff new HIGH$ value (Note: B=0 for driver
              00630 ;       length so there is no damage on the @@HIGH$ SVC
              00631 ;
251E 0600     00632 DOHIGH  LD      B,0
2520          00633         @@HIGH$
2520+3E64     00634         LD      A,100
2522+EF       00635         RST     40
2523 23       00636         INC     HL              ;Pt to driver start
2524 EB       00637         EX      DE,HL
2525 D5       00638         PUSH    DE              ;Save start of driver
2526 210900   00639         LD      HL,KSMDCB-DVRBGN
2529 19       00640         ADD     HL,DE           ;Point to filter DCB ptr
252A 22DF27   00641         LD      (RX2),HL
252D 21C127   00642         LD      HL,DVRBGN       ;Move parms also
2530 EDB0     00643         LDIR
2532 D1       00644         POP     DE              ;Rcvr driver ept
2533 212226   00645         LD      HL,KSMACT$      ;Init "KSM installed
2536 DD360045 00646 KSM8    LD      (IX),40H!5      ;Init DCB type to "input"
253A DD7301   00647         LD      (IX+1),E        ;  & filter & stuff the
253D DD7202   00648         LD      (IX+2),D        ;  filter address
2540 FDCB03F6 00649         SET     6,(IY+'D'-'A')  ;Turn on device flag bit
2544          00650         @@LOGOT                 ;Display installation msg
              00651         IFEQ    00H,1
              00652         LD      HL,
              00653         ENDIF
2544+3E0C     00654         LD      A,12
2546+EF       00655         RST     40
2547 210000   00656         LD      HL,0            ;Set no error
254A C9       00657         RET                     ;Back to the user
              00658 ;
              00659 ;       Error processing
              00660 ;
254B 21FB25   00661 VIASET  LD      HL,VIASET$      ;"Install with Set
254E DD       00662         DB      0DDH
254F 215226   00663 DCBERR  LD      HL,DCBERR$      ;"Filter in use already
2552 DD       00664         DB      0DDH
2553 217526   00665 NOROOM  LD      HL,NOROOM$      ;"Memory frozen
2556 DD       00666         DB      0DDH
2557 211026   00667 SPCREQ  LD      HL,SPCREQ$      ;"Missing filespec
255A          00668         @@LOGOT                 ;Display an error
              00669         IFEQ    00H,1
              00670         LD      HL,
              00671         ENDIF
255A+3E0C     00672         LD      A,12
255C+EF       00673         RST     40
255D 21FFFF   00674         LD      HL,-1           ;Set abort code
2560 C9       00675         RET
2561 3E2C     00676 PRMERR  LD      A,44            ;Init PARM ERROR
2563 6F       00677 IOERR   LD      L,A             ;Error code to HL
2564 2600     00678         LD      H,0
2566 F6C0     00679         OR      0C0H            ;Set short, return
2568 4F       00680         LD      C,A             ;Error to C
2569          00681         @@ERROR                 ;  for error display
2569+3E1A     00682         LD      A,26
256B+EF       00683         RST     40
256C C9       00684         RET
              00685 ;
              00686 ;       Data and message area
              00687 ;
256D 24       00688 KSM$    DB      '$KSM',3
     4B 53 4D 03 
2572          00689 DFTKSM  EQU     $               ;Note: HELLO$ must follow
2572 4B       00690 HELLO$  DB      'KSM Filter'
     53 4D 20 46 69 6C 74 65
     72 
257C          00691 *GET    CLIENT:3
              00692 ;CLIENT/ASM - File to establish sign-on headers
              00693 ; and version numbers.
              00694 ;
              00695 ; EACH STRING SHOULD CONTAIN ONLY 63 CHARACTERS !!
              00696 ;
              00697         IF      @BLD631
              00698 ;                12345678901234567890123456789012345678901234567890
257C 20       00699         DB      ' - 6.3.1 - Copyright 1982/83/84/86/90 by MISOSYS, ';<631>
     2D 20 36 2E 33 2E 31 20
     2D 20 43 6F 70 79 72 69
     67 68 74 20 31 39 38 32
     2F 38 33 2F 38 34 2F 38
     36 2F 39 30 20 62 79 20
     4D 49 53 4F 53 59 53 2C
     20 
25AE 49       00700         DB      'Inc.,       ',10       ;<631>
     6E 63 2E 2C 20 20 20 20
     20 20 20 0A 
              00701         ELSE
              00702         DB      ' - 6.3.0 - Copyright 1982/83/84/86 by Logical Syst'
              00703         DB      'ems, Inc.   ',10
              00704         ENDIF
              00705 ;
              00706 ;       DB      'All Rights Reserved. Licensed 1982/83/84 to Tandy '
              00707 ;       DB      'Corporation.',10,13
              00708 ;
              00709 ;       DB      'All Rights Reserved. Beta-TEST Level/AD, DO NOT DI'
              00710 ;       DB      'STRIBUTE !! ',10,13
              00711 ;       DB      'All Rights reserved by LSI, 8970 N. 55th St. Milwa'
              00712 ;       DB      'ukee, Wisc. ',10,13
25BB 41       00713         DB      'All Rights Reserved. Unauthorized duplication is p'
     6C 6C 20 52 69 67 68 74
     73 20 52 65 73 65 72 76
     65 64 2E 20 55 6E 61 75
     74 68 6F 72 69 7A 65 64
     20 64 75 70 6C 69 63 61
     74 69 6F 6E 20 69 73 20
     70 
25ED 72       00714         DB      'rohibited.  ',10,13
     6F 68 69 62 69 74 65 64
     2E 20 20 0A 0D 
              00715 ;
25FB 4D       00716 VIASET$ DB      'Must install via SET',CR
     75 73 74 20 69 6E 73 74
     61 6C 6C 20 76 69 61 20
     53 45 54 0D 
2610 46       00717 SPCREQ$ DB      'Filespec required',CR
     69 6C 65 73 70 65 63 20
     72 65 71 75 69 72 65 64
     0D 
2622 4B       00718 KSMACT$ DB      'KSM is now operational',CR
     53 4D 20 69 73 20 6E 6F
     77 20 6F 70 65 72 61 74
     69 6F 6E 61 6C 0D 
2639 4B       00719 KSMRPL$ DB      'KSM filter data replaced',CR
     53 4D 20 66 69 6C 74 65
     72 20 64 61 74 61 20 72
     65 70 6C 61 63 65 64 0D
2652 4B       00720 DCBERR$ DB      'KSM filter already attached to *xx',CR
     53 4D 20 66 69 6C 74 65
     72 20 61 6C 72 65 61 64
     79 20 61 74 74 61 63 68
     65 64 20 74 6F 20 2A 78
     78 0D 
2672          00721 DCBNAM$ EQU     $-3
2675 52       00722 NOROOM$ DB      'Request exceeds available memory',CR
     65 71 75 65 73 74 20 65
     78 63 65 65 64 73 20 61
     76 61 69 6C 61 62 6C 65
     20 6D 65 6D 6F 72 79 0D
2696 D2       00723 PRMTBL$ DB      'R'!80H,0F5H,'ENTER',0
     F5 45 4E 54 45 52 00 
269D          00724 ERSP    EQU     $-1
              00725 ;
269E 3A24     00726         DW      EPARM+1
26A0 00       00727         DB      0
              00728 ;
26A1          00729 KSMFCB  DEFS    32
26C1          00730 KSMBUF  DEFS    256
              00731 ;
              00732 ;       Key-Stroke Multiplication driver
              00733 ;
27C1 180B     00734 DVRBGN  JR      START           ;Branch around header
27C3 0000     00735         DW      $-$             ;Last byte used
27C5 04       00736         DB      4,'$KSM'
     24 4B 53 4D 
27CA 0000     00737 KSMDCB  DW      $-$             ;Pointer to KSM's DCB
27CC 0000     00738         DW      0
              00739 ;
27CE 210000   00740 START   LD      HL,0            ;P/u possible address to
27CF          00741 RX1     EQU     $-2
27D1 56       00742         LD      D,(HL)          ;  a KSM that was parsed
27D2 2B       00743         DEC     HL              ;  to a ';' logical ENTER
27D3 5E       00744         LD      E,(HL)          ;If this vector is zero,
27D4 2B       00745         DEC     HL              ;  no KSM continuation is
27D5 EB       00746         EX      DE,HL           ;  pending - find a new
27D6 F5       00747         PUSH    AF              ;  entry. Save flags.
27D7 7C       00748         LD      A,H             ;  If <> 0, grab the KSM
27D8 B5       00749         OR      L               ;  line continuation
27D9 202B     00750         JR      NZ,DVR4A
27DB F1       00751         POP     AF              ;Rcvr flags
27DC D5       00752         PUSH    DE              ;Save ptr to 'A'-KSM
27DD DD2ACA27 00753 DVR1    LD      IX,(KSMDCB)     ;Chain to next DCB module
27DF          00754 RX2     EQU     $-2
27E1          00755         @@CHNIO
27E1+3E14     00756         LD      A,20
27E3+EF       00757         RST     40
27E4 D1       00758         POP     DE              ;Rcvr 'A'-KSM pointer
27E5 C0       00759         RET     NZ              ;Back if nothing or error
27E6 CB7F     00760         BIT     7,A             ;Is it a CLEAR function?
27E8 C8       00761         RET     Z               ;Ret if  not down
27E9 F5       00762         PUSH    AF              ;Save key entry
27EA FEC1     00763         CP      'A'+80H         ;Ck for range A-Z
27EC 3804     00764         JR      C,DVR2          ;Exit if < 'A'
27EE FEDB     00765         CP      'Z'+1+80H
27F0 3803     00766         JR      C,DVR3          ;Use it if A-Z
27F2 F1       00767 DVR2    POP     AF              ;Rcvr orig flag
27F3 BF       00768         CP      A               ;Set Z-flag
27F4 C9       00769         RET
              00770 ;
              00771 ;       Key code entry includes  key
              00772 ;
27F5 F1       00773 DVR3    POP     AF              ;Rcvr orig flag
27F6 62       00774         LD      H,D             ;Rcvr ptr to 'A'-KSM
27F7 6B       00775         LD      L,E             ;  & xfer to reg HL
27F8 D6C1     00776         SUB     80H+'A'         ;Adjust offset to index
27FA 280B     00777         JR      Z,DVR5          ;Bypass if was 'A'
27FC 47       00778         LD      B,A             ;Set loop counter
27FD 3E0D     00779         LD      A,CR            ;Read past the KSM lines
27FF BE       00780 DVR4    CP      (HL)            ;  for letters preceding
2800 2B       00781         DEC     HL              ;  key entry to find the
2801 20FC     00782         JR      NZ,DVR4         ;  KSM line for entered
2803 10FA     00783         DJNZ    DVR4            ;  key code
2805 3E       00784         DB      3EH             ;Ignore next inst
              00785 ;
              00786 ;       Routine to pick up the next KSM character
              00787 ;       & return it to the system KI request
              00788 ;
2806 F1       00789 DVR4A   POP     AF              ;Clean the stack
2807 7E       00790 DVR5    LD      A,(HL)          ;P/u the next KSM char
2808 2B       00791         DEC     HL              ;Dec pointer to next one
2809 EB       00792         EX      DE,HL           ;Put either a pointer to
280A 23       00793         INC     HL              ;  the next KSM char or
280B FE0D     00794         CP      CR              ;  if got last, zero the
280D 280B     00795         JR      Z,DVR6          ;  data pointer
280F 73       00796         LD      (HL),E          ;Stuff pointer to next
2810 23       00797         INC     HL              ;  character to fetch
2811 72       00798         LD      (HL),D
2812 FE3B     00799 ECHAR   CP      ';'             ;Ck on logical line end
2814 2002     00800         JR      NZ,DVR7         ;  & convert to 
2816 3E0D     00801         LD      A,CR            ;  if it was semi-colon
2818 BF       00802 DVR7    CP      A               ;Tell the system we have
2819 C9       00803         RET                     ;  retrieved a char
              00804 ;
              00805 ;       Got the terminating X'0D' - Clear the pointer
              00806 ;
281A AF       00807 DVR6    XOR     A               ;Clear the KSM char ptr
281B 77       00808         LD      (HL),A          ;  as next request is new
281C 23       00809         INC     HL
281D 77       00810         LD      (HL),A
281E FEFF     00811         CP      0FFH            ;Set NZ & A = 0
2820 C9       00812         RET
2821          00813 DVREND  EQU     $
              00814 ;
2400          00815         END     KSM
2400 is the transfer address
00000 Total errors


[Copyright 1999,2002 Frank Durda IV, All Rights Reserved.
Mirroring of any material on this page in any form is expressly prohibited.
The official web site for this material is:  http://nemesis.lonestar.org
Contact this address for use clearances: clearance at nemesis.lonestar.org
Comments and queries to this address: web_software_2011 at nemesis.lonestar.org]

Valid HTML 4.01!