[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/11/99 22:02:34 PATCH - LS-DOS 6.2 Page 00001
00001 ;PATCH/ASM
00003 ;
0003 00004 ETX EQU 3
000A 00005 LF EQU 10
000D 00006 CR EQU 13
0040 00007 FLAG EQU 01000000B
0010 00008 ABB EQU 00010000B
00009 ;
0000 00010 *GET SVCMAC:3 ;SVC Macro equivalents
00011 ;SVCMAC/ASM - LS-DOS Version VI
00012 *LIST OFF
00404 *LIST ON
0000 00406 *GET COPYCOM:3 ;Copyright message
00407 ; COPYCOM - File for Copyright COMment block
00408 ;
0000 00409 *GET BUILDVER/ASM:3
00410 ;
00411 ; Buildver/asm is a bit of a kludge since not all utilities can load
00412 ; equates from LDOS60 and still compile. LOWCORE and everybody else
00413 ; relies on this setting, and it eventually ends up in LDOS60/EQU
00414 ; for programs that can use that.
00415 ;
FFFF 00416 @BLD631 EQU -1 ;<631>Build 631 distribution (LEVEL 1B)
00417 ; These switches activate patches made since the 1B release.
00418 ; It is important that all earlier patches be enabled when a higher
00419 ; patch is enabled.
00420 ; Patches C thru F were published in TMQ IV.iv, page 32 (NOTE: the
00421 ; patch addresses listed for SPOOL in SPOOL1/FIX are 19H high.)
FFFF 00422 @BLD631C EQU -1 ;<631>Apply 1C patches (SETKI)
FFFF 00423 @BLD631D EQU -1 ;<631>Apply 1D patches (DIR)
FFFF 00424 @BLD631E EQU -1 ;<631>Apply 1E patches (DIR & MEMDISK/DCT)
FFFF 00425 @BLD631F EQU -1 ;<631>Apply 1F patches (SPOOL)
00426 ; Patches G and H were published in TMQ V.i, pages 10 and 18/19.
FFFF 00427 @BLD631G EQU -1 ;<631>Apply 1G patches (//KEYIN,DIR,DO *)
FFFF 00428 @BLD631H EQU -1 ;<631>Apply 1H patches (MEMORY)
00429 ;
00430 ;End of BUILDVER/ASM
00431 IF @BLD631
00433 ELSE
00434 COM '<*(C) 1982,3,4,6 by LSI*>'
00435 ENDIF
00436 ;
2600 00437 ORG 2600H
00438 ;
00439 BEGIN
2600 00440 @@CKBRKC ;Check if Break hit
2600+3E6A 00441 LD A,106
2602+EF 00442 RST 40
2603 2804 00443 JR Z,BEGINA ;Continue if no break
2605 21FFFF 00444 LD HL,-1 ; else abort
2608 C9 00445 RET
00446 ;
00447 BEGINA
2609 ED73BF27 00448 LD (STACK),SP ;Save original stack
260D E5 00449 PUSH HL ;Save ptr to CMD buffer
260E 00450 @@FLAGS ;Set up IY
260E+3E65 00451 LD A,101
2610+EF 00452 RST 40
2611 21C02D 00453 LD HL,HELLO$
2614 CD1F2D 00454 CALL $DSPLY ;Display the signon msg
00455 ;
00456 ; Get /CMD file off command line
00457 ;
2617 E1 00458 POP HL ;P/u cmd line ptr
2618 117F2D 00459 LD DE,PGMDCB ;Set up for OPEN
261B 00460 @@FSPEC ;Fetch program filespec
261B+3E4E 00461 LD A,78
261D+EF 00462 RST 40
261E C2512D 00463 JP NZ,PGMREQ ;Quit if illegal name
2621 1A 00464 LD A,(DE)
2622 FE2A 00465 CP '*' ;Test for device spec
2624 CA512D 00466 JP Z,PGMREQ ;Abort if not a filespec
2627 E5 00467 PUSH HL ;Save posn on command line
2628 21792D 00468 LD HL,CMDEXT
262B 00469 @@FEXT ;Default ext to /CMD
262B+3E4F 00470 LD A,79
262D+EF 00471 RST 40
262E D5 00472 PUSH DE ;Save ptr to FCB
262F EB 00473 EX DE,HL ;Pt HL at current name
2630 113330 00474 LD DE,FNM$ ;Store the name away
2633 00475 @@FSPEC ; in case of a later error
2633+3E4E 00476 LD A,78
2635+EF 00477 RST 40
2636 D1 00478 POP DE ;Recover FCB
2637 210033 00479 LD HL,PGMBUF ;Buffer for /CMD file I/O
263A 0600 00480 LD B,0 ;Set lrl=256
263C CDEF2C 00481 CALL $OPEN ;Open the file to fix
00482 ;
00483 ; Get /FIX file (if any)
00484 ;
263F E1 00485 POP HL ;Get command line posn
2640 11A02D 00486 LD DE,FIXDCB ;FCB used for /FIX file
2643 00487 @@FSPEC ;See if a filespec is there
2643+3E4E 00488 LD A,78
2645+EF 00489 RST 40
2646 C27426 00490 JP NZ,CKLIN ;If error, ck for parms there
2649 E5 00491 PUSH HL ;Save command line posn
264A 217C2D 00492 LD HL,FIXEXT
264D 00493 @@FEXT ;Use default ext of /FIX
264D+3E4F 00494 LD A,79
264F+EF 00495 RST 40
2650 21A02D 00496 LD HL,FIXDCB ;Pt HL to start of fix filespec
2653 110930 00497 LD DE,NAMFIX$ ;Buffer to hold filename only
2656 0600 00498 LD B,0 ;Init char count to 0
00499 ;
00500 ; Save patch file name for X header
00501 ;
2658 7E 00502 FXNAM LD A,(HL) ;P/u a char of the filespec
2659 23 00503 INC HL
265A FE2F 00504 CP '/' ;Found the /FIX ext?
265C 2811 00505 JR Z,FXNAM2 ;Quit if so
265E FE3A 00506 CP ':' ;Colon yet?
2660 3808 00507 JR C,FXNAM1 ;If less, must be number
2662 FE41 00508 CP 'A' ;A-Z?
2664 3809 00509 JR C,FXNAM2 ;If less, done
2666 FE5B 00510 CP 'Z'+1 ;If not alpha, done
2668 3005 00511 JR NC,FXNAM2
266A 12 00512 FXNAM1 LD (DE),A ;Store the name char
266B 13 00513 INC DE ;Inc storage ptr
266C 04 00514 INC B ;Inc count of name chars
266D 18E9 00515 JR FXNAM ;Loop for more
266F 78 00516 FXNAM2 LD A,B ;Store the length of
2670 320830 00517 LD (NAMLEN$),A ; the /FIX patch file
2673 E1 00518 POP HL ;Recover command line posn
2674 7E 00519 CKLIN LD A,(HL) ;Test command line
2675 FE0D 00520 CP CR ; for end
2677 2845 00521 JR Z,RDFIX ;Go if found
2679 23 00522 INC HL
267A FE20 00523 CP 20H
267C 28F6 00524 JR Z,CKLIN ;Ignore spaces
267E FE28 00525 CP '(' ;Beginning of parm?
2680 C2492D 00526 JP NZ,PRMERR ;Anything else is a parm error
00527 ;
00528 ; Test for REMOVE or special Option parameters
00529 ; Ignore @@PARAM errors, as the parameters may actually
00530 ; be a command line patch.
00531 ;
2683 115730 00532 LD DE,PTBL$ ;Parameter table
2686 E5 00533 PUSH HL ;Save command line ptr
2687 2B 00534 DEC HL ;Back up to '('
2688 00535 @@PARAM
2688+3E11 00536 LD A,17
268A+EF 00537 RST 40
268B E1 00538 POP HL ;Restore cmd line ptr
268C 010000 00539 LD BC,$-$ ;"Remove" parm response
268D 00540 RPARM1 EQU $-2
268F 79 00541 LD A,C
2690 32472C 00542 LD (RPARM),A ;Set Remove parm
2693 01FFFF 00543 LD BC,-1 ;O parm - bypass need for
2694 00544 OPARM1 EQU $-2 ; Frr,nn line if OFF
2696 79 00545 LD A,C
2697 32412C 00546 LD (OPARM),A ;Set find flag
269A CABE26 00547 JP Z,RDFIX ;If @PARAM was good, there is
00548 ; no cmd line patch code
00549 ;
00550 ; Check for command line patch code (CLP)
00551 ;
269D 010034 00552 LD BC,FIXDATA ;Space allocated for /FIX data
26A0 7E 00553 CKLIN1 LD A,(HL) ;Get char from cmd line
26A1 FE0D 00554 CP CR
26A3 CAB526 00555 JP Z,CKLIN3 ;Show end of CLP
26A6 FE29 00556 CP ')'
26A8 280B 00557 JR Z,CKLIN3 ;End of CLP if so
26AA 23 00558 INC HL ;Bump buffer ptr
26AB FE3A 00559 CP ':' ;Separator between patches?
26AD 2002 00560 JR NZ,CKLIN2 ;If not, store char
26AF 3E0D 00561 LD A,CR ; else show end of this CLP
26B1 02 00562 CKLIN2 LD (BC),A ;Put byte into fix data buff
26B2 03 00563 INC BC ;Bump buff ptr
26B3 18EB 00564 JR CKLIN1 ;Loop til end of cmd line
00565 ;
26B5 3E0D 00566 CKLIN3 LD A,CR ;Put CR into
26B7 02 00567 LD (BC),A ; CLP buffer
26B8 03 00568 INC BC
26B9 3E03 00569 LD A,ETX ;End buffer with ETX
26BB 02 00570 LD (BC),A
26BC 1839 00571 JR DOFIX ;Start patching...
00572 ;
00573 ; P/u the fix info from the FIX file, rather than
00574 ; the command line.
00575 ;
26BE 3A0830 00576 RDFIX LD A,(NAMLEN$) ;P/u len of /FIX filename
26C1 B7 00577 OR A
26C2 CA512D 00578 JP Z,PGMREQ ;If none used, abort
26C5 FDCB12C6 00579 SET 0,(IY+'S'-'A') ;Set open inhibit bit
26C9 11A02D 00580 LD DE,FIXDCB ;Set up & open /FIX file
26CC 210031 00581 LD HL,FIXBUF
26CF 0600 00582 LD B,0
26D1 CDEF2C 00583 CALL $OPEN
26D4 210048 00584 LD HL,PGMDATA ;Pt HL to highest byte avail
26D7 2B 00585 DEC HL ; for fix data
26D8 010034 00586 LD BC,FIXDATA ;Start of /FIX data storage
26DB CD072D 00587 RDFIX1 CALL $GET1 ;Get a char fm /FIX file
26DE 200F 00588 JR NZ,RDFIX2 ;Jump on error
26E0 E67F 00589 AND 7FH ;Strip bit 7
26E2 2810 00590 JR Z,RDFIX3 ;Take 0 as EOF also
26E4 02 00591 LD (BC),A ;Save fix data char
26E5 03 00592 INC BC ;Advance buffer
26E6 E5 00593 PUSH HL ;Save HL tempy
26E7 ED42 00594 SBC HL,BC ;Room in fixdata buffer?
26E9 E1 00595 POP HL
26EA DA4D2D 00596 JP C,TOOBIG ;Abort if patch data too large
26ED 18EC 00597 JR RDFIX1 ; else loop til EOF
00598 ;
26EF FE1C 00599 RDFIX2 CP 1CH ;End of file?
26F1 C2322D 00600 JP NZ,IOERR ;Abort if not
26F4 3E03 00601 RDFIX3 LD A,ETX ;Mark the end of the fix data
26F6 02 00602 LD (BC),A
00603 ;
00604 ; Start patching the target file
00605 ;
26F7 210034 00606 DOFIX LD HL,FIXDATA ;Pt to start of fix data
00607 ;
26FA E5 00608 DOFIX1 PUSH HL
26FB 21882E 00609 LD HL,RDGINP$ ;"reading input...
26FE CD1F2D 00610 CALL $DSPLY
2701 E1 00611 POP HL
2702 226B2D 00612 LD (SETMSG+1),HL ;Used if error in line
2705 3E00 00613 LD A,$-$
2706 00614 PASS2 EQU $-1 ;Zero if 1st pass thru data
2707 B7 00615 OR A
2708 7E 00616 LD A,(HL) ;P/U a character
2709 CA142C 00617 JP Z,PASS1 ;Go if 1st pass
270C 7E 00618 LD A,(HL)
270D FE03 00619 CP ETX ;End of patch?
270F 285C 00620 JR Z,PCHDUN
2711 FE2E 00621 CP '.' ;Comment?
2713 CAC527 00622 JP Z,COMMENT
2716 CBAF 00623 RES 5,A ;Make upper case
2718 FE46 00624 CP 'F' ;FIND line?
271A CAC527 00625 JP Z,COMMENT ;Skip on 2nd pass or if O=N
271D FE44 00626 CP 'D' ;Start of D line?
271F CAD727 00627 JP Z,DVERB
2722 FE59 00628 CP 'Y' ;Yank previous patch?
2724 CA4228 00629 JP Z,YANK
2727 FE4C 00630 CP 'L' ;Library overlay?
2729 CA0029 00631 JP Z,LVERB
272C FE52 00632 CP 'R' ;Remove parm ?
272E CA3A28 00633 JP Z,REMOVE
2731 FE4F 00634 CP 'O' ;O parm ?
2733 CAD128 00635 JP Z,OVERB
2736 FE58 00636 CP 'X' ;Start of X line?
2738 C2612D 00637 JP NZ,PCHERR ;Error if none of above
00638 ;
00639 ; Verb = 'X' -> patch by hex load address
00640 ;
273B 117F2D 00641 LD DE,PGMDCB ;Rewind the program to 0
273E 010000 00642 LD BC,0 ;Use POSN so EOF
2741 CDF52C 00643 CALL $POSN ; is not changed
2744 CD4D29 00644 CALL POSFIL ;Posn to end of prgfile
00645 ;
2747 F5 00646 PUSH AF ;Save regs fm display routine
2748 E5 00647 PUSH HL
2749 D5 00648 PUSH DE
274A 21AD2E 00649 LD HL,INSPCH$ ;"installing patch...
274D CD1F2D 00650 CALL $DSPLY
2750 D1 00651 POP DE
2751 E1 00652 POP HL
2752 F1 00653 POP AF
00654 ;
2753 FE02 00655 CP 2 ;Be sure type byte = 2
2755 C2452D 00656 JP NZ,FILERR ;Load file format error
2758 3E01 00657 LD A,1 ;Tempy set LRL to 1
275A 32882D 00658 LD (PGMDCB+9),A ; & backspace the file
275D CDFB2C 00659 CALL $BKSP ; to overwrite old xfer addr
2760 AF 00660 XOR A ;Reset LRL to 256
2761 32882D 00661 LD (PGMDCB+9),A
00662 ;
00663 ; Install the X patch at the end of the prgfile
00664 ;
2764 CD8229 00665 CALL STUFNM ;Generate the patch
2767 7E 00666 LD A,(HL) ;HL => ending posn in fix data
2768 FE03 00667 CP ETX ;Did it go til the end?
276A C2612D 00668 JP NZ,PCHERR ;"Patch format error...
00669 ;
00670 ; Patch/operation complete - close the file
00671 ;
276D 3E0D 00672 PCHDUN LD A,CR ;Move cursor to next line
276F CD2B2D 00673 CALL $DSP
2772 117F2D 00674 LD DE,PGMDCB ;Close the program file
2775 00675 @@CLOSE
2775+3E3C 00676 LD A,60
2777+EF 00677 RST 40
2778 C2322D 00678 JP NZ,IOERR
277B 21EE2F 00679 LD HL,YANKMSG ;Set up in case Yank was done
277E 3A732D 00680 LD A,(YNKFLG) ;Was it a Yank?
2781 B7 00681 OR A
2782 2024 00682 JR NZ,EXLOG ;Yes, log out
2784 21962F 00683 LD HL,SUCCES$ ;"function completed.."
2787 00684 @@LOGOT
00685 IFEQ 00H,1
00686 LD HL,
00687 ENDIF
2787+3E0C 00688 LD A,12
2789+EF 00689 RST 40
278A 2A742D 00690 LD HL,(LINCNT) ;P/u # of D & X lines
278D 7C 00691 LD A,H
278E B5 00692 OR L ;Any?
278F 2814 00693 JR Z,NOCHG ;No D or X verbs
2791 E5 00694 PUSH HL ;Save line count
2792 110100 00695 LD DE,1 ;Exactly 1 line?
2795 ED52 00696 SBC HL,DE
2797 E1 00697 POP HL
2798 2005 00698 JR NZ,NTONE ;Go if more than 1
279A 3E20 00699 LD A,' ' ; else remove "s" from message
279C 32C12F 00700 LD (PLURAL),A
279F 11B12F 00701 NTONE LD DE,LINMSG$ ;Put line count into message
27A2 00702 @@HEXDEC ; as decimal ASCII
27A2+3E61 00703 LD A,97
27A4+EF 00704 RST 40
27A5 21B12F 00705 NOCHG LD HL,LINMSG$
27A8 00706 EXLOG @@LOGOT ;Show how many lines done
00707 IFEQ 00H,1
00708 LD HL,
00709 ENDIF
27A8+3E0C 00710 LD A,12
27AA+EF 00711 RST 40
00712 ;
27AB 210000 00713 LD HL,0 ;Init no error
27AE E5 00714 $QUIT PUSH HL
27AF 217F2D 00715 LD HL,PGMDCB
27B2 CB7E 00716 BIT 7,(HL) ;Was file left open?
27B4 EB 00717 EX DE,HL ;DE=>DCB possible close
27B5 C4D62C 00718 CALL NZ,FLOPN ;Warn user
27B8 3E0E 00719 LD A,14 ;Cursor on
27BA CD2B2D 00720 CALL $DSP
27BD E1 00721 POP HL
27BE 310000 00722 LD SP,$-$ ;P/u original stack
27BF 00723 STACK EQU $-2
27C1 00724 @@CKBRKC ;Clear break
27C1+3E6A 00725 LD A,106
27C3+EF 00726 RST 40
27C4 C9 00727 RET ;Done with the patching
00728 ;
00729 ; Verb = '.' => comment line
00730 ; HL = start of line in fix data
00731 ; Bypass all chars until a terminator is found
00732 ;
27C5 7E 00733 COMMENT LD A,(HL) ;Look for some terminator
27C6 FE03 00734 CP ETX ;End of the fix data?
27C8 CAFA26 00735 JP Z,DOFIX1 ;Back if so
27CB 23 00736 INC HL ; else bump buffer ptr
27CC FE3B 00737 CP ';' ;Logical EOL?
27CE 2804 00738 JR Z,EOL1 ;Back if so
27D0 FE0D 00739 CP CR ;Physical EOL?
27D2 20F1 00740 JR NZ,COMMENT ;Do next char if not
27D4 C3FA26 00741 EOL1 JP DOFIX1 ;Back to the caller
00742 ;
00743 ; Verb = 'D' -> disk record patch
00744 ;
27D7 CDCC2C 00745 DVERB CALL CNTLIN ;Bump line counter
27DA CDE327 00746 CALL DPOSN ;Posn prgfile to Drr,bb
27DD CD0A28 00747 CALL DLINE ;Put or check the patch line
00748 ; depending on which pass
27E0 C3FA26 00749 JP DOFIX1 ;Do next line
00750 ;
27E3 23 00751 DPOSN INC HL ;Bump fix data buffer ptr
27E4 CD922A 00752 CALL PRSFIX ;Get char or hex pair
27E7 0600 00753 LD B,0 ;Put disk record #
27E9 4F 00754 LD C,A ; into BC
27EA 7E 00755 LD A,(HL) ;If no comma, then
27EB FE2C 00756 CP ',' ; get 3rd & 4th digits
27ED 2804 00757 JR Z,DVERB1 ; in case user put in
27EF CD922A 00758 CALL PRSFIX ; a 4 byte record #
27F2 4F 00759 LD C,A
27F3 117F2D 00760 DVERB1 LD DE,PGMDCB ;Position file to record
27F6 CDF52C 00761 CALL $POSN
27F9 7E 00762 LD A,(HL) ;Check for ',' separator
27FA FE2C 00763 CP ',' ; between record and offset
27FC C2612D 00764 JP NZ,PCHERR ;Abort if not found
27FF 23 00765 INC HL ;Pt to offset bytes
2800 CD252D 00766 CALL $READ ;Read the sector
2803 CD922A 00767 CALL PRSFIX ;Make offset binary in A
2806 32842D 00768 LD (PGMDCB+5),A ;Set byte offset in FCB
2809 C9 00769 RET
00770 ;
00771 ; Dual purpose routine that checks a Drr,bb line
00772 ; or installs it into the program file
00773 ;
280A 7E 00774 DLINE LD A,(HL) ;Next byte in line must
280B FE3D 00775 CP '=' ; be '='
280D C2612D 00776 JP NZ,PCHERR ;Abort if missing
2810 23 00777 DVERB2 INC HL ;Pt to start of patch data
2811 CD962A 00778 DVERB3 CALL PRSFX1 ;Get patch byte as binary in A
2814 CDB82C 00779 CALL PUTORCHK ;Either write it or check it
2817 7E 00780 LD A,(HL) ;P/u next char
2818 FE0D 00781 CP CR ;Go on CR
281A 2811 00782 JR Z,DVERB4A
281C FE3B 00783 CP ';' ;End of logical line?
281E 280C 00784 JR Z,DVERB4
2820 FE22 00785 CP '"' ;Closing dbl-quote?
2822 2808 00786 JR Z,DVERB4
2824 3AAB2A 00787 LD A,(STRFLG+1) ;If in quote string,
2827 B7 00788 OR A ; do not bump HL past
2828 28E6 00789 JR Z,DVERB2 ; the non-existant space
282A 18E5 00790 JR DVERB3 ;No special, do next byte
00791 ;
282C 7E 00792 DVERB4 LD A,(HL) ;Ignore rest of line
282D 23 00793 DVERB4A INC HL
282E FE0D 00794 CP CR
2830 20FA 00795 JR NZ,DVERB4 ;Loop til physical EOL
2832 3A0627 00796 LD A,(PASS2) ;Patching or checking?
2835 B7 00797 OR A ;If patching, need to
2836 C4012D 00798 CALL NZ,$RWRIT ; re-write the sector
2839 C9 00799 RET ;Done w/line
00800 ;
00801 ; Verb = 'R' -> set flag to yank D patch
00802 ; This routine is needed to check the R parm
00803 ; when doing a CLP, in case the parm was entered
00804 ; after the fix data
00805 ;
283A 3EFF 00806 REMOVE LD A,-1 ;Set Reomve parm true and
283C 32472C 00807 LD (RPARM),A ; then ignore all until the
283F C3C527 00808 JP COMMENT ; next logical line
00809 ;
00810 ; Verb = 'Y' -> yanks patch with same name
00811 ;
2842 7E 00812 YANK LD A,(HL) ;Ignore all chars until
2843 23 00813 INC HL ; the physical EOL
2844 FE0D 00814 CP CR
2846 20FA 00815 JR NZ,YANK
00816 ;
2848 E5 00817 PUSH HL ;Save fix data posn
2849 21DC2E 00818 LD HL,YNKPCH$ ;"yanking patch...
284C CD1F2D 00819 CALL $DSPLY
284F 010000 00820 LD BC,0 ;Rewind the file
2852 117F2D 00821 LD DE,PGMDCB
2855 CDF52C 00822 CALL $POSN
2858 CD072D 00823 YANK1 CALL $GET1 ;Get a "type" byte
285B C2C628 00824 JP NZ,YANK9 ;If error, ck for EOF
285E FE07 00825 CP 7 ;Found a patch?
2860 281B 00826 JR Z,YANK4 ;If so, check name
2862 326A28 00827 LD (TYPCOD+1),A ;Stuff type for testing
2865 CD0B2D 00828 CALL $GET ;Get a block length
2868 47 00829 LD B,A ;Set loop counter
2869 3E00 00830 TYPCOD LD A,0 ;Test type
286B 3D 00831 DEC A ;Ck for type 1 (code block)
286C 2008 00832 JR NZ,YANK2 ;Length ok if not
00833 ;
00834 ; Adjust length for 255 & 256 byte code blocks
00835 ;
286E CD0B2D 00836 CALL $GET ;Read 1st two bytes
2871 05 00837 DEC B ; in case the block was
2872 CD0B2D 00838 CALL $GET ; 255+2 or 256+2
2875 05 00839 DEC B
2876 CD0B2D 00840 YANK2 CALL $GET ;Read rest of block
2879 10FB 00841 YANK3 DJNZ YANK2
287B 18DB 00842 JR YANK1
00843 ;
00844 ; Found patch code area, is this the one?
00845 ;
287D CD0B2D 00846 YANK4 CALL $GET ;Get name len fm file
2880 47 00847 LD B,A ;Save len in B
2881 3A0830 00848 LD A,(NAMLEN$) ;P/u fix file name length
2884 B8 00849 CP B ;If no match, not fix
2885 20EF 00850 JR NZ,YANK2 ; to Yank
2887 210930 00851 LD HL,NAMFIX$ ;Pt to yank file name
288A CD072D 00852 YANK5 CALL $GET1 ;Ck for match of yank
288D C27628 00853 JP NZ,YANK2 ; file name with prog
2890 BE 00854 CP (HL) ; patch name
2891 23 00855 INC HL
2892 20E5 00856 JR NZ,YANK3 ;Back if no match
2894 10F4 00857 DJNZ YANK5
00858 ;
00859 ; Found this fix patch - let's yank it
00860 ;
2896 CD0B2D 00861 YANK6 CALL $GET ;Get type code
2899 FE01 00862 CP 1 ;Ignore block if
289B C2BD28 00863 JP NZ,YANK8 ; type <> 1 (code block)
289E 3E01 00864 LD A,1 ;Set LRL=1 & backspace
28A0 32882D 00865 LD (PGMDCB+9),A ; to overwrite the type byte
28A3 CDFB2C 00866 CALL $BKSP
28A6 AF 00867 XOR A ;Set LRL back to 256
28A7 32882D 00868 LD (PGMDCB+9),A
28AA 3E10 00869 LD A,10H ;Change type=1 to =16
28AC CD112D 00870 CALL $PUT ; and write to prgfile
28AF CD012D 00871 CALL $RWRIT ;Force re-write
28B2 CD0B2D 00872 CALL $GET ;Get length byte
28B5 47 00873 LD B,A ; of patch code block
28B6 CD0B2D 00874 YANK7 CALL $GET
28B9 10FB 00875 DJNZ YANK7 ;Posn past the code block
28BB 18D9 00876 JR YANK6 ;Loop through patch blocks
00877 ;
28BD E1 00878 YANK8 POP HL ;Not type 1, done with yank
28BE 3EFF 00879 LD A,0FFH ;Set Yank flag for
28C0 32732D 00880 LD (YNKFLG),A ; exit message dsply
28C3 C36D27 00881 JP PCHDUN
00882 ;
28C6 FE1C 00883 YANK9 CP 1CH ;Got $GET error, was EOF?
28C8 C2322D 00884 JP NZ,IOERR ;Abort if not, else
28CB 21F72E 00885 LD HL,NOYANK$ ; "can't yank, not in file
28CE C3542D 00886 JP ERREXIT
00887 ;
00888 ; Verb = 'O' -> turn FIND on/off
00889 ; Check special O parameter, determine ON or OFF
00890 ;
28D1 23 00891 OVERB INC HL ;Move past O
28D2 7E 00892 LD A,(HL)
28D3 FE3D 00893 CP '=' ;Next char must be '='
28D5 201D 00894 JR NZ,WHATIS ; or is an error
28D7 23 00895 INC HL ;Bypass the '='
28D8 7E 00896 LD A,(HL)
28D9 FE0D 00897 CP CR ;Was it CR or ')'?
28DB 281B 00898 JR Z,OISOFF ;O= is OFF
28DD CBAF 00899 RES 5,A ;Make Upper case
28DF FE4E 00900 CP 'N'
28E1 2815 00901 JR Z,OISOFF ;O=N,NO etc.
28E3 FE59 00902 CP 'Y' ;Y=yes
28E5 2810 00903 JR Z,OISON
28E7 FE4F 00904 CP 'O'
28E9 2009 00905 JR NZ,WHATIS ;Not Y/N/ON/OFF!
28EB CDB32C 00906 CALL GETNXT ;Get nxt, already UC
28EE FE46 00907 CP 'F'
28F0 2806 00908 JR Z,OISOFF ;OFF
28F2 FE4E 00909 CP 'N'
28F4 C2612D 00910 WHATIS JP NZ,PCHERR ;Quit if no acceptable flag
00911 ;
28F7 3E 00912 OISON DB 3EH ;LD A,0AFH
28F8 AF 00913 OISOFF XOR A
28F9 32412C 00914 LD (OPARM),A ;Set parm on or off
28FC 2B 00915 DEC HL
28FD C3C527 00916 JP COMMENT ;Ignore rest til logical EOL
00917 ;
00918 ; Verb = 'L' -> indicate patch to library file
00919 ;
2900 23 00920 LVERB INC HL ;Bypass the 'L'
2901 CD922A 00921 CALL PRSFIX ;Get a hex digit pair
2904 4F 00922 LD C,A ;Stuff for later
2905 328F2B 00923 LD (OVRLY+1),A
2908 7E 00924 LD A,(HL) ;Ck for end of line
2909 23 00925 INC HL
290A FE0D 00926 CP CR
290C C2612D 00927 JP NZ,PCHERR ;Error if not
290F CDE92A 00928 CALL FISAM ;Get isam overlay ptrs
2912 F5 00929 PUSH AF ;Save byte offset
2913 3A802D 00930 LD A,(PGMDCB+1)
2916 CBBF 00931 RES 7,A ;Sector operations only
2918 32802D 00932 LD (PGMDCB+1),A
291B 117F2D 00933 LD DE,PGMDCB ;Position the file to
291E CDF52C 00934 CALL $POSN ;Overlay requested
2921 CD252D 00935 CALL $READ ;Read in the sector
2924 F1 00936 POP AF
2925 32842D 00937 LD (PGMDCB+5),A ;Stuff byte offset in FCB
2928 CD4D29 00938 CALL POSFIL ;Adv "positioning...
292B FE04 00939 CP 4 ;End of ISAM overlay?
292D C2452D 00940 JP NZ,FILERR ;If not, "load format er.
2930 3E01 00941 LD A,1 ;Set LRL=1
2932 32882D 00942 LD (PGMDCB+9),A
2935 CDFB2C 00943 CALL $BKSP ;Backspace over the 4
2938 AF 00944 XOR A ;Now set LRL back to 256
2939 32882D 00945 LD (PGMDCB+9),A
293C CD8229 00946 CALL STUFNM ;Do the patch
293F E5 00947 PUSH HL
2940 21C12E 00948 LD HL,BLDMAP$ ;"rebuilding library map.
2943 CD1F2D 00949 CALL $DSPLY
2946 CD3A2B 00950 CALL RPRMAP ;Rebuild the map
2949 E1 00951 POP HL
294A C3FA26 00952 JP DOFIX1 ;Loop
00953 ;
00954 ; Include the rest of Patch/Cmd
00955 ;
294D 00956 *GET PATCHA:3
00957 ;PATCHA/ASM - Continuation of Patch Program
00958 ;
00959 ; Routine to position to file's end
00960 ;
294D E5 00961 POSFIL PUSH HL ;Save fm display call
294E D5 00962 PUSH DE
294F 216F2E 00963 LD HL,POSLD$ ;"positioning ...
2952 CD1F2D 00964 CALL $DSPLY
2955 D1 00965 POP DE
2956 E1 00966 POP HL
00967 ;
2957 CD0B2D 00968 POSFIL1 CALL $GET ;Get a type byte
295A FE20 00969 CP 20H ;X'20' & up are illegal
295C D2452D 00970 JP NC,FILERR
295F FE02 00971 CP 2 ;Transfer address?
2961 C8 00972 RET Z
2962 FE03 00973 CP 3 ;Not really used in
2964 C8 00974 RET Z ; a file, yet...
2965 FE04 00975 CP 4 ;End of ISAM member?
2967 C8 00976 RET Z
2968 FE0A 00977 CP 0AH ;End of ISAM directory?
296A C8 00978 RET Z
296B 4F 00979 LD C,A ;Save type byte
296C CD0B2D 00980 CALL $GET ;Get block length
296F 47 00981 LD B,A ;Save it for countdown
2970 0D 00982 DEC C ;Was type = 1 ?
2971 2008 00983 JR NZ,POSFIL2 ;Jump if not
2973 CD0B2D 00984 CALL $GET ;Read off the load addr
2976 05 00985 DEC B ;Adjust length for each
2977 CD0B2D 00986 CALL $GET
297A 05 00987 DEC B
297B CD0B2D 00988 POSFIL2 CALL $GET ;Read the block
297E 10FB 00989 DJNZ POSFIL2
2980 18D5 00990 JR POSFIL1 ;Loop to next type code
00991 ;
00992 ; Routine to put the patch name header block into the
00993 ; prg data buffer and then position to the next X'' line
00994 ;
2982 E5 00995 STUFNM PUSH HL ;Save posn in fix data
2983 21992E 00996 LD HL,GENPCH$ ;"generating patch...
2986 CD1F2D 00997 CALL $DSPLY
2989 110048 00998 LD DE,PGMDATA
298C 210830 00999 LD HL,NAMLEN$ ;Pt to fix name field
298F 7E 01000 LD A,(HL)
2990 B7 01001 OR A
2991 280C 01002 JR Z,STUFNM2 ;Go if no name len
2993 3E07 01003 LD A,7 ;Set fix patch type
2995 12 01004 LD (DE),A
2996 13 01005 INC DE
2997 46 01006 LD B,(HL) ;Set header length
2998 04 01007 INC B ;Bump to write length
2999 7E 01008 STUFNM1 LD A,(HL) ;P/u name byte
299A 23 01009 INC HL
299B 12 01010 LD (DE),A ;Put in output buffer
299C 13 01011 INC DE
299D 10FA 01012 DJNZ STUFNM1 ;Loop for namelen
01013 ;
299F E1 01014 STUFNM2 POP HL ;Recover posn in fix data
29A0 226B2D 01015 STUFNM3 LD (SETMSG+1),HL ;Start of this line
29A3 7E 01016 LD A,(HL)
29A4 FE03 01017 CP ETX ;End of fix data?
29A6 CA2F2A 01018 JP Z,RIPPLE
29A9 23 01019 INC HL
29AA FE2E 01020 CP '.' ;Comment?
29AC 2809 01021 JR Z,STUFNM4
29AE CBAF 01022 RES 5,A ;In case lower case
29B0 FE58 01023 CP 'X' ;Start of code line?
29B2 2810 01024 JR Z,DOXVB ;Go if so
29B4 C3612D 01025 JP PCHERR ;"patch input format err
01026 ;
29B7 7E 01027 STUFNM4 LD A,(HL) ;In a comment, loop until
29B8 23 01028 INC HL ; end of line
29B9 FE03 01029 CP ETX ;End of patch code?
29BB CA612D 01030 JP Z,PCHERR ;Abort if so
29BE FE0D 01031 CP CR ;EOL?
29C0 20F5 01032 JR NZ,STUFNM4 ;Loop if not
29C2 18DC 01033 JR STUFNM3
01034 ;
01035 ; Do the 'X' verb patch
01036 ; HL => Fix data buffer
01037 ; DE => Program data buffer
01038 ;
29C4 CDCC2C 01039 DOXVB CALL CNTLIN ;Count installed lines
29C7 3E01 01040 LD A,1 ;Show type 1 (code block)
29C9 12 01041 LD (DE),A ;Put in output buffer
29CA 13 01042 INC DE
29CB D5 01043 PUSH DE ;Save ptr to length
29CC 13 01044 INC DE
29CD 7E 01045 LD A,(HL) ;Should be "'"
29CE 23 01046 INC HL ; around address (X'nnnn')
29CF FE27 01047 CP 27H
29D1 C2612D 01048 JP NZ,PCHERR ;Error if not
29D4 CD922A 01049 CALL PRSFIX ;P/u hex digit pair
29D7 47 01050 LD B,A ;Save hi-order address
29D8 CD922A 01051 CALL PRSFIX ;P/u hex digit pair
29DB 12 01052 LD (DE),A ;Stuff lo-order address
29DC 13 01053 INC DE
29DD 78 01054 LD A,B
29DE 12 01055 LD (DE),A ;Stuff hi-order address
29DF 13 01056 INC DE
29E0 7E 01057 LD A,(HL) ;Syntax requires "=" or
29E1 FE3D 01058 CP '=' ; "'" next
29E3 2806 01059 JR Z,DOXVB1
29E5 FE27 01060 CP 27H ;Bypass optional clsng '
29E7 C2612D 01061 JP NZ,PCHERR ;Error if not ',=
29EA 23 01062 INC HL
29EB 23 01063 DOXVB1 INC HL ;Bypass the '='
29EC 0602 01064 LD B,2 ;Len of bytes already stuffed
29EE 7E 01065 DOXVB2 LD A,(HL) ;Get char of fix data
29EF FE22 01066 CP '"' ;ASCII string?
29F1 281F 01067 JR Z,DOXVB5 ;Go process if so
29F3 7E 01068 DOXVB3 LD A,(HL) ;P/u line byte
29F4 23 01069 INC HL
29F5 FE3B 01070 CP ';' ;Logical end?
29F7 2811 01071 JR Z,DOXVB4 ;Ignore trailing
29F9 FE0D 01072 CP CR ;End of line?
29FB 282C 01073 JR Z,DOXVB6
29FD FE20 01074 CP 20H
29FF 28ED 01075 JR Z,DOXVB2 ;Ignore spaces
2A01 2B 01076 DEC HL ;Back up, its a byte
2A02 CD962A 01077 CALL PRSFX1 ;Get the hex digit pair
2A05 12 01078 LD (DE),A ;Stuff into code buffer
2A06 13 01079 INC DE
2A07 04 01080 INC B ;Bump block length
2A08 18E9 01081 JR DOXVB3
01082 ;
01083 ; Bypass until end of line
01084 ;
2A0A 7E 01085 DOXVB4 LD A,(HL) ;P/u the character
2A0B 23 01086 INC HL
2A0C FE0D 01087 CP CR ;End of line?
2A0E 20FA 01088 JR NZ,DOXVB4
2A10 1817 01089 JR DOXVB6
01090 ;
01091 ; Fix has double quote string
01092 ;
2A12 23 01093 DOXVB5 INC HL
2A13 7E 01094 LD A,(HL) ;Get next char
2A14 FE03 01095 CP ETX ;End of fix data?
2A16 CA612D 01096 JP Z,PCHERR ;Can't end w/o some EOL
2A19 23 01097 INC HL
2A1A FE0D 01098 CP CR ;End of line?
2A1C CA292A 01099 JP Z,DOXVB6 ;Valid end
2A1F FE22 01100 CP '"' ;Closing quote?
2A21 28D0 01101 JR Z,DOXVB3 ;Go for more
2A23 2B 01102 DEC HL
2A24 12 01103 LD (DE),A ;Stuff the char
2A25 13 01104 INC DE
2A26 04 01105 INC B ;Bump counter
2A27 18E9 01106 JR DOXVB5 ;Loop until end or "
01107 ;
01108 ; Found valid end - update length
01109 ;
2A29 E3 01110 DOXVB6 EX (SP),HL ;Grab length pointer
2A2A 70 01111 LD (HL),B ;Stuff the length
2A2B E1 01112 POP HL
2A2C C3A029 01113 JP STUFNM3 ;Go for more lines
01114 ;
01115 ; Got to the end of the fix input
01116 ;
2A2F E5 01117 RIPPLE PUSH HL
2A30 EB 01118 EX DE,HL ;Last patch byte to HL
2A31 110048 01119 LD DE,PGMDATA ;Pt to patch code buffer
2A34 AF 01120 XOR A
2A35 ED52 01121 SBC HL,DE ;Calc length of fixup
2A37 22C62B 01122 LD (RPRMAP9+1),HL ;Stuff for later
2A3A 21AD2E 01123 LD HL,INSPCH$ ;"installing patch
2A3D CD1F2D 01124 CALL $DSPLY
2A40 217F2D 01125 LD HL,PGMDCB ;Move prog into fix
2A43 11A02D 01126 LD DE,FIXDCB ; file control block
2A46 012000 01127 LD BC,32 ; for output use
2A49 EDB0 01128 LDIR
2A4B 210032 01129 LD HL,LIBBUF ;Set the i/o buffer
2A4E 22A32D 01130 LD (FIXDCB+3),HL
2A51 11A02D 01131 LD DE,FIXDCB ;Reread the last program
2A54 01132 @@RREAD ; sector
2A54+3E45 01133 LD A,69
2A56+EF 01134 RST 40
2A57 C2322D 01135 JP NZ,IOERR ;Quit on read error
01136 ;
01137 ; Now ripple the file down while stuffing bytes
01138 ;
2A5A 210048 01139 LD HL,PGMDATA ;Beginning of "fixed" code
2A5D 11A02D 01140 RIPPL1 LD DE,FIXDCB ;Get prog byte
2A60 CD072D 01141 CALL $GET1
2A63 C27A2A 01142 JP NZ,RIPPL2
2A66 E5 01143 PUSH HL ;Save buffer ptr & byte
2A67 F5 01144 PUSH AF
2A68 117F2D 01145 LD DE,PGMDCB ;Use the output fcb
2A6B 7E 01146 LD A,(HL) ;P/u byte from fixbuf
2A6C CD112D 01147 CALL $PUT ;Put to disk
2A6F ED4BC62B 01148 LD BC,(RPRMAP9+1) ;Pt to patch length
2A73 09 01149 ADD HL,BC ;Pt past patch code
2A74 F1 01150 POP AF ;Recover prog byte
2A75 77 01151 LD (HL),A ; & stuff after fix code
2A76 E1 01152 POP HL ;Rcvr buf ptr
2A77 23 01153 INC HL ;Bump & loop
2A78 18E3 01154 JR RIPPL1
01155 ;
2A7A FE1C 01156 RIPPL2 CP 1CH ;Got to end of file?
2A7C C2452D 01157 JP NZ,FILERR ;Quit on any other error
2A7F 117F2D 01158 LD DE,PGMDCB
2A82 ED4BC62B 01159 LD BC,(RPRMAP9+1) ;Get length of patch
2A86 7E 01160 RIPPL3 LD A,(HL) ;Put rest of program
2A87 23 01161 INC HL ; (ie the bytes = to
2A88 CD112D 01162 CALL $PUT ; length of patch code)
2A8B 0B 01163 DEC BC ;Do until len left = 0
2A8C 78 01164 LD A,B
2A8D B1 01165 OR C
2A8E 20F6 01166 JR NZ,RIPPL3
2A90 E1 01167 POP HL
2A91 C9 01168 RET
01169 ;
01170 ; Routine to read & convert fix code values
01171 ;
2A92 AF 01172 PRSFIX XOR A ;Entry to clear
2A93 32AB2A 01173 LD (STRFLG+1),A ; STRING check
2A96 7E 01174 PRSFX1 LD A,(HL) ;P/u patch char
2A97 FE03 01175 CP ETX ;End of text?
2A99 CA612D 01176 JP Z,PCHERR ;Error if so
2A9C FE22 01177 CP '"' ;String?
2A9E 200A 01178 JR NZ,STRFLG
2AA0 32AB2A 01179 LD (STRFLG+1),A ;Stuff string indicator
2AA3 23 01180 INC HL
2AA4 7E 01181 LD A,(HL) ;P/u char
2AA5 FE03 01182 CP ETX ;End again?
2AA7 CA612D 01183 JP Z,PCHERR
2AAA 3E00 01184 STRFLG LD A,0 ;Test string flag
2AAC B7 01185 OR A
2AAD 7E 01186 LD A,(HL) ;P/u char again
2AAE 23 01187 INC HL ;Bump pointer
2AAF C0 01188 RET NZ ;Ret if '"' was prev char
2AB0 CDD72A 01189 CALL CVTBIN ;Co nvert hex digit to bin
2AB3 4F 01190 LD C,A ;Save value
2AB4 7E 01191 LD A,(HL) ;P/u next digit
2AB5 23 01192 INC HL
2AB6 FE03 01193 CP ETX ;Backup pointer and ret
2AB8 CA612D 01194 JP Z,PCHERR ; if next char is not hex
2ABB FE30 01195 CP '0' ; else pack it into regC
2ABD 3815 01196 JR C,PRSFX3 ; & place in reg A
2ABF FE3A 01197 CP '9'+1
2AC1 3804 01198 JR C,PRSFX2
2AC3 FE41 01199 CP 'A'
2AC5 380D 01200 JR C,PRSFX3
2AC7 CB01 01201 PRSFX2 RLC C ;Assume digit, move
2AC9 CB01 01202 RLC C ; over a nybble
2ACB CB01 01203 RLC C
2ACD CB01 01204 RLC C
2ACF CDD72A 01205 CALL CVTBIN ;Get hex digit
2AD2 B1 01206 OR C ;Merge hi-order nybble
2AD3 C9 01207 RET
2AD4 79 01208 PRSFX3 LD A,C ;Non-hex char,
2AD5 2B 01209 DEC HL ; rcvr & exit
2AD6 C9 01210 RET
01211 ;
01212 ; Routine to convert hex digit to binary
01213 ;
2AD7 D630 01214 CVTBIN SUB 30H ;1st adjustment to binary
2AD9 DA5D2D 01215 JP C,NONHEX ;Quit if too low
2ADC FE0A 01216 CP 10 ;0-9 range?
2ADE D8 01217 RET C ;Back if so
2ADF CBAF 01218 RES 5,A ;In case lower case
2AE1 D607 01219 SUB 7
2AE3 FE10 01220 CP 16 ;Less than F+1?
2AE5 D8 01221 RET C ;Ok if so
2AE6 C35D2D 01222 JP NONHEX ; else abort
01223 ;
01224 ; Routine to find ISAM member pointer in map table
01225 ;
2AE9 117F2D 01226 FISAM LD DE,PGMDCB
2AEC CD072D 01227 FISAM1 CALL $GET1 ;Get a type byte
2AEF 2808 01228 JR Z,FISAM1A ;Go on no error
2AF1 FE1C 01229 CP 1CH ;EOF?
2AF3 CA412D 01230 JP Z,LIBERR ;Invalid library format
2AF6 C3322D 01231 JP IOERR ; else I/O error
2AF9 FE08 01232 FISAM1A CP 8 ;Start of map table?
2AFB 2820 01233 JR Z,FISAM3
2AFD FE0A 01234 CP 0AH ;End of map table?
2AFF CA3D2D 01235 JP Z,NOVRLY ;Should not be end
2B02 C5 01236 PUSH BC
2B03 4F 01237 LD C,A ;Save TYPE
2B04 CD0B2D 01238 CALL $GET ;Get block length
2B07 47 01239 LD B,A ;Set counter & read
2B08 0D 01240 DEC C
2B09 2008 01241 JR NZ,FISAM1B ;Go if not load record
2B0B CD0B2D 01242 CALL $GET ; else read 1st two
2B0E 05 01243 DEC B ; bytes & then fall thru
2B0F CD0B2D 01244 CALL $GET ; in case len=01 or 02
2B12 05 01245 DEC B
2B13 78 01246 FISAM1B LD A,B
2B14 C1 01247 POP BC
2B15 47 01248 LD B,A
2B16 CD0B2D 01249 FISAM2 CALL $GET ;Through the block
2B19 10FB 01250 DJNZ FISAM2
2B1B 18CF 01251 JR FISAM1 ;Go back for more
01252 ;
01253 ; Found a map field
01254 ;
2B1D CD0B2D 01255 FISAM3 CALL $GET ;Get field length
2B20 47 01256 LD B,A ;Set counter
2B21 CD0B2D 01257 CALL $GET ;Get overlay #
2B24 05 01258 DEC B ;Reduce count
2B25 B9 01259 CP C ;Is this the one?
2B26 20EE 01260 JR NZ,FISAM2 ;Loop to next field
2B28 CD0B2D 01261 CALL $GET ;Get lo-order traadr
2B2B CD0B2D 01262 CALL $GET ;Get hi-order transfer
2B2E CD0B2D 01263 CALL $GET ;Get lo-order NRN
2B31 4F 01264 LD C,A ;Save in C
2B32 CD0B2D 01265 CALL $GET ;Get hi-order NRN
2B35 47 01266 LD B,A ;Save in B
2B36 CD0B2D 01267 CALL $GET ;Get byte offset
2B39 C9 01268 RET
01269 ;
01270 ; Routine to repair the library map
01271 ;
2B3A 117F2D 01272 RPRMAP LD DE,PGMDCB ;Rewind the file
2B3D 010000 01273 LD BC,0
2B40 CDF52C 01274 CALL $POSN
2B43 210048 01275 LD HL,PGMDATA ;Pt to buffer area
2B46 CD0B2D 01276 RPRMAP1 CALL $GET ;Read the map into buf
2B49 FE0A 01277 CP 0AH ;End of table?
2B4B 2821 01278 JR Z,RPRMAP3
2B4D 77 01279 LD (HL),A ;Save type code
2B4E CD0B2D 01280 CALL $GET ;Get length
2B51 47 01281 LD B,A ;Set counter
2B52 7E 01282 LD A,(HL) ;Reget the TYPE
2B53 23 01283 INC HL ;Bump where to stuf len
2B54 3D 01284 DEC A ;Is this a load record?
2B55 70 01285 LD (HL),B ;Put length in too
2B56 23 01286 INC HL
2B57 200C 01287 JR NZ,RPRMAP2 ;Go if other type
2B59 CD0B2D 01288 CALL $GET ; else get two extra
2B5C 05 01289 DEC B ; & adjust length in
2B5D 77 01290 LD (HL),A ; case len = 01 or 02
2B5E 23 01291 INC HL
2B5F CD0B2D 01292 CALL $GET
2B62 05 01293 DEC B
2B63 23 01294 INC HL
2B64 77 01295 LD (HL),A
2B65 CD0B2D 01296 RPRMAP2 CALL $GET ;Save member # & rest of
2B68 77 01297 LD (HL),A ; data entries
2B69 23 01298 INC HL
2B6A 10F9 01299 DJNZ RPRMAP2
2B6C 18D8 01300 JR RPRMAP1
01301 ;
01302 ; Found end of table
01303 ;
2B6E 77 01304 RPRMAP3 LD (HL),A ;Show map end
2B6F 210048 01305 LD HL,PGMDATA ;Pt to beginning
2B72 7E 01306 RPRMAP4 LD A,(HL) ;P/u type code
2B73 23 01307 INC HL
2B74 46 01308 LD B,(HL) ;P/u length
2B75 23 01309 INC HL
2B76 FE08 01310 CP 8 ;Map is type 8
2B78 2811 01311 JR Z,RPRMAP6
2B7A FE0A 01312 CP 0AH ;End of map?
2B7C CA3D2D 01313 JP Z,NOVRLY ;Should not have gotten
2B7F 3D 01314 DEC A
2B80 2004 01315 JR NZ,RPRMAP5
2B82 23 01316 INC HL ;You should know what
2B83 05 01317 DEC B ; this is for by now
2B84 23 01318 INC HL
2B85 05 01319 DEC B
2B86 23 01320 RPRMAP5 INC HL ;Bypass this field
2B87 10FD 01321 DJNZ RPRMAP5
2B89 18E7 01322 JR RPRMAP4
01323 ;
01324 ; Found a type 8, check if ISAM # matches
01325 ;
2B8B 7E 01326 RPRMAP6 LD A,(HL) ;P/u member #
2B8C 23 01327 INC HL
2B8D 05 01328 DEC B ;Count down
2B8E FE00 01329 OVRLY CP 0 ;Compare to patched one
2B90 20F4 01330 JR NZ,RPRMAP5 ;Keep reading until found
2B92 23 01331 INC HL ;Bypass transfer address
2B93 23 01332 INC HL
2B94 5E 01333 LD E,(HL) ;P/u the position lo
2B95 23 01334 INC HL
2B96 56 01335 LD D,(HL) ; & the pos hi
2B97 23 01336 INC HL
2B98 4E 01337 LD C,(HL) ; & the byte offset
2B99 78 01338 LD A,B ;Calc ptr to next field
2B9A D604 01339 SUB 4
2B9C 47 01340 LD B,A
2B9D 23 01341 INC HL
2B9E 10FD 01342 DJNZ $-1 ;Loop to next field
2BA0 7E 01343 RPRMAP7 LD A,(HL) ;End of table?
2BA1 FE0A 01344 CP 0AH ;If end, write the
2BA3 2836 01345 JR Z,RWRMAP ; map back to disk
2BA5 23 01346 INC HL ;Pt to field length
2BA6 46 01347 LD B,(HL)
2BA7 23 01348 INC HL ;Pt to member #
2BA8 23 01349 INC HL ;Transfer Low
2BA9 23 01350 INC HL ;Transfer High
2BAA 23 01351 INC HL ;NRN Low
2BAB 78 01352 LD A,B ;Adjust count for
2BAC D604 01353 SUB 4 ; 4 INC HLs
2BAE 47 01354 LD B,A
2BAF 7E 01355 LD A,(HL) ;If position is the same
2BB0 23 01356 INC HL ; as that of patched
2BB1 BB 01357 CP E ; one, its posn has not
2BB2 200F 01358 JR NZ,RPRMAP8 ; changed, so don't
2BB4 7E 01359 LD A,(HL) ; change it
2BB5 23 01360 INC HL
2BB6 05 01361 DEC B
2BB7 BA 01362 CP D ;Cp the hi order
2BB8 200B 01363 JR NZ,RPRMAP9
2BBA 7E 01364 LD A,(HL)
2BBB B9 01365 CP C ; and the offset
2BBC 2007 01366 JR NZ,RPRMAP9
2BBE 23 01367 LPFLD INC HL
2BBF 10FD 01368 DJNZ $-1 ;Loop to end of field
2BC1 18DD 01369 JR RPRMAP7
01370 ;
01371 ; Add the patch length to each position vector
01372 ;
2BC3 23 01373 RPRMAP8 INC HL ;Bump to offset byte
2BC4 05 01374 DEC B
2BC5 110000 01375 RPRMAP9 LD DE,0 ;P/u patch length
2BC8 7E 01376 LD A,(HL) ;P/u offset & add
2BC9 83 01377 ADD A,E ;Lo-order patch length
2BCA 77 01378 LD (HL),A
2BCB 2B 01379 DEC HL ;Pt to NRN
2BCC 2B 01380 DEC HL
2BCD 7E 01381 LD A,(HL) ;P/u NRN lo-order
2BCE 8A 01382 ADC A,D ;Add to it
2BCF 77 01383 LD (HL),A
2BD0 23 01384 INC HL ;Pt to pos hi order
2BD1 7E 01385 LD A,(HL) ;P/u the hi
2BD2 CE00 01386 ADC A,0 ;Add in any carry
2BD4 77 01387 LD (HL),A
2BD5 23 01388 INC HL ;Pt to next map field
2BD6 110000 01389 LD DE,0
2BD9 18E3 01390 JR LPFLD ;Loop
01391 ;
01392 ; Routine to re-write the library map table
01393 ;
2BDB 117F2D 01394 RWRMAP LD DE,PGMDCB ;Rewind the program file
2DE 010000 01395 LD BC,0
2BE1 CDF52C 01396 CALL $POSN
2BE4 210048 01397 LD HL,PGMDATA ;Pt to mapbuf start
2BE7 7E 01398 RWRMAP1 LD A,(HL) ;Ret when we get to
2BE8 FE0A 01399 CP 0AH ; the map end type
2BEA C8 01400 RET Z
2BEB 4F 01401 LD C,A ;Save the type
2BEC 23 01402 INC HL
2BED CD112D 01403 CALL $PUT ;Put the type
2BF0 7E 01404 LD A,(HL) ;P/u length
2BF1 23 01405 INC HL
2BF2 47 01406 LD B,A ;Save as counter
2BF3 CD112D 01407 CALL $PUT ;Put out the length
2BF6 0D 01408 DEC C ;Again, by now...
2BF7 200C 01409 JR NZ,RWRMAP2
2BF9 7E 01410 LD A,(HL)
2BFA 23 01411 INC HL
2BFB CD112D 01412 CALL $PUT
2BFE 05 01413 DEC B
2BFF 7E 01414 LD A,(HL)
2C00 23 01415 INC HL
2C01 CD112D 01416 CALL $PUT
2C04 05 01417 DEC B
2C05 7E 01418 RWRMAP2 LD A,(HL) ;Put block of code
2C06 23 01419 INC HL
2C07 CD112D 01420 CALL $PUT
2C0A 10F9 01421 DJNZ RWRMAP2
2C0C 18D9 01422 JR RWRMAP1 ;Loop for more
01423 ;
01424 ; This routine enters at PASS1. It does the first pass
01425 ; thru the fix data, and checks for parms as well
01426 ; as checking the Drr,bb and Frr,bb matches.
01427 ;
2C0E 320627 01428 SPASS2 LD (PASS2),A ;Flag pass 2
2C11 C3F726 01429 JP DOFIX ;Start over
01430 ;
2C14 FE2E 01431 PASS1 CP '.' ;Comment line?
2C16 2825 01432 JR Z,OK
2C18 FE03 01433 CP ETX ;End of fix data?
2C1A 28F2 01434 JR Z,SPASS2 ;End of pass1
2C1C CBAF 01435 RES 5,A ;Make Upper case
2C1E FE44 01436 CP 'D' ;D line patch?
2C20 281E 01437 JR Z,FCHK
2C22 FE52 01438 CP 'R' ;Remove parm?
2C24 CA3A28 01439 JP Z,REMOVE
2C27 FE4F 01440 CP 'O' ;Special O parm?
2C29 CAD128 01441 JP Z,OVERB
2C2C FE46 01442 CP 'F' ;Find line data?
2C2E 280D 01443 JR Z,OK
2C30 FE59 01444 CP 'Y' ;Yank parm?
2C32 2809 01445 JR Z,OK
2C34 FE4C 01446 CP 'L' ;Library ISAM number?
2C36 2805 01447 JR Z,OK
2C38 FE58 01448 CP 'X' ;X line patch?
2C3A C2612D 01449 JP NZ,PCHERR ;If not one of these, abort
2C3D C3C527 01450 OK JP COMMENT
01451 ;
01452 ; Check the Drr,bb (if Remove) or Frr,bb line
01453 ;
2C40 3EFF 01454 FCHK LD A,0FFH ;If O parm = OFF, then
2C41 01455 OPARM EQU $-1 ; don't do the check
2C42 B7 01456 OR A
2C43 CAC527 01457 JP Z,COMMENT ;Skip check if O=OFF
2C46 3E00 01458 LD A,$-$ ;Remove parm used?
2C47 01459 RPARM EQU $-1
2C48 B7 01460 OR A
2C49 C2862C 01461 JP NZ,YANKD ;Reverse D & F lines if so
2C4C 22772D 01462 LD (DL),HL ;Save D pointer
2C4F CDA02C 01463 CALL SKPLN ;Move to F line
2C52 CD582C 01464 CALL DOCHK ;Cp F line bytes w/file
2C55 C3FA26 01465 JP DOFIX1
01466 ;
01467 ;
01468 ; Checks Drr,bb and Frr,bb addresses for a match
01469 ; Checks Frr,bb against program file if patching, or
01470 ; Drr,bb if removing
01471 ;
2C58 226B2D 01472 DOCHK LD (SETMSG+1),HL ;Set line error msg
2C5B E5 01473 PUSH HL ;Save posn
2C5C ED5B772D 01474 LD DE,(DL) ;Get D or F line
2C60 0603 01475 LD B,3 ;Init check count
2C62 23 01476 CP3 INC HL
2C63 13 01477 INC DE
2C64 1A 01478 LD A,(DE)
2C65 BE 01479 CP (HL)
2C66 C2C62C 01480 JP NZ,FERROR ;'FIND' error
2C69 10F7 01481 DJNZ CP3 ;Check first 3 bytes
01482 ;
2C6B 0603 01483 LD B,3 ;Assume was 2 digit rec #
2C6D 3E2C 01484 LD A,',' ;Comma?
2C6F BE 01485 CP (HL)
2C70 2802 01486 JR Z,CP5 ;Yes, continue
2C72 0605 01487 LD B,5 ;Adjust, assume 4 dig rec #
2C74 23 01488 CP5 INC HL ;Check rest of 'rr,bb' string
2C75 13 01489 INC DE
2C76 1A 01490 LD A,(DE)
2C77 BE 01491 CP (HL)
2C78 C2C62C 01492 JP NZ,FERROR ;'FIND' error
2C7B 10F7 01493 DJNZ CP5
01494 ;
2C7D E3 01495 EX (SP),HL ;Pointer to '=' in fix line
2C7E CDE327 01496 CALL DPOSN ;Posn file
2C81 E1 01497 POP HL
2C82 CD0A28 01498 CALL DLINE ;Check line for match
2C85 C9 01499 RET
01500 ;
01501 ; Remove used. Check Drr,bb lines instead of Frr,bb lines
01502 ;
2C86 E5 01503 YANKD PUSH HL ;Save D line pointer
2C87 CDA02C 01504 CALL SKPLN ;Move to F line
2C8A 22772D 01505 LD (DL),HL ;Save pointer
2C8D E1 01506 POP HL ;=>D line
2C8E E5 01507 PUSH HL ;Save D line again
2C8F CD582C 01508 CALL DOCHK ;Test D line
2C92 E1 01509 POP HL ;=>'D'
2C93 362E 01510 LD (HL),'.' ;Make comment for pass2
2C95 2A772D 01511 LD HL,(DL)
2C98 3644 01512 LD (HL),'D' ;Make 'F' line into D line
2C9A CDA02C 01513 CALL SKPLN ;=>next line
2C9D C3FA26 01514 JP DOFIX1
01515 ;
01516 ; Skip past the current line, posn to start of next
01517 ;
2CA0 CDA92C 01518 SKPLN CALL SKPLN1 ;Move past current line
2CA3 7E 01519 LD A,(HL) ;Check 1st char next line
2CA4 FE2E 01520 CP '.' ;Is it comment?
2CA6 28F8 01521 JR Z,SKPLN ;Then skip it too
2CA8 C9 01522 RET
01523 ;
2CA9 7E 01524 SKPLN1 LD A,(HL) ;P/u line char
2CAA 23 01525 INC HL
2CAB FE0D 01526 CP CR ;Physical EOL?
2CAD C8 01527 RET Z
2CAE FE3B 01528 CP ';' ;Logical EOL?
2CB0 C8 01529 RET Z
2CB1 18F6 01530 JR SKPLN1 ;Loop until EOL
01531 ;
01532 ; Get the next char, convert to UC
01533 ;
2CB3 7E 01534 GETNXT LD A,(HL) ;P/u the char
2CB4 23 01535 INC HL ;Bump the buffer ptr
2CB5 CBAF 01536 RES 5,A ;Convert to upper
2CB7 C9 01537 RET
01538 ;
01539 ; Either write a char or check for a match
01540 ;
2CB8 4F 01541 PUTORCHK LD C,A ;Char in question
2CB9 3A0627 01542 LD A,(PASS2) ;Write pass?
2CBC B7 01543 OR A
2CBD 79 01544 LD A,C ;Char back in A
2CBE C2112D 01545 JP NZ,$PUT ;Writing patch..
2CC1 CD0B2D 01546 CALL $GET ;Get next char fm file
2CC4 B9 01547 CP C ;Match w/patch?
2CC5 C8 01548 RET Z ;OK if match
2CC6 211130 01549 FERROR LD HL,LOCERR$ ;Init "Find mismatch
2CC9 C3642D 01550 JP ERRDSP ;Dsply and quit
01551 ;
01552 ; Count patch lines
01553 ;
2CCC E5 01554 CNTLIN PUSH HL
2CCD 2A742D 01555 LD HL,(LINCNT) ;Get current count,
2CD0 23 01556 INC HL ; += 1
2CD1 22742D 01557 LD (LINCNT),HL ; and put it back
2CD4 E1 01558 POP HL
2CD5 C9 01559 RET
01560 ;
01561 ; After an error, show file not closed if needed
01562 ;
2CD6 3A762D 01563 FLOPN LD A,(WRFLAG) ;Did we modify file?
2CD9 B7 01564 OR A
2CDA 2007 01565 JR NZ,MESS ;Yes, don't close it
2CDC 01566 @@CLOSE ;No changes
2CDC+3E3C 01567 LD A,60
2CDE+EF 01568 RST 40
2CDF C2322D 01569 JP NZ,IOERR
2CE2 C9 01570 RET
2CE3 212430 01571 MESS LD HL,WARN1$ ;File is modified but
2CE6 CD1F2D 01572 CALL $DSPLY ;PATCH did not complete
2CE9 214B30 01573 LD HL,WARN2$ ; "oops...
2CEC C31F2D 01574 JP $DSPLY ;Then return to caller
01575 ;
2CEF 01576 $OPEN @@OPEN
2CEF+3E3B 01577 LD A,59
2CF1+EF 01578 RST 40
2CF2 203E 01579 JR NZ,IOERR
2CF4 C9 01580 RET
2CF5 01581 $POSN @@POSN
2CF5+3E42 01582 LD A,66
2CF7+EF 01583 RST 40
2CF8 2038 01584 JR NZ,IOERR
2CFA C9 01585 RET
2CFB 01586 $BKSP @@BKSP
2CFB+3E3D 01587 LD A,61
2CFD+EF 01588 RST 40
2CFE 2032 01589 JR NZ,IOERR
2D00 C9 01590 RET
2D01 01591 $RWRIT @@RWRIT
2D01+3E46 01592 LD A,70
2D03+EF 01593 RST 40
2D04 202C 01594 JR NZ,IOERR
2D06 C9 01595 RET
2D07 01596 $GET1 @@GET ;Use this one if prog might get EOF
2D07+3E03 01597 LD A,3
2D09+EF 01598 RST 40
2D0A C9 01599 RET
2D0B 01600 $GET @@GET ;This one if EOF is also error
2D0B+3E03 01601 LD A,3
2D0D+EF 01602 RST 40
2D0E 2022 01603 JR NZ,IOERR
2D10 C9 01604 RET
2D11 C5 01605 $PUT PUSH BC
2D12 4F 01606 LD C,A
2D13 3EFF 01607 LD A,0FFH ;Flag..
2D15 32762D 01608 LD (WRFLAG),A ;That file is modified
2D18 01609 @@PUT
2D18+3E04 01610 LD A,4
2D1A+EF 01611 RST 40
2D1B C1 01612 POP BC
2D1C 2014 01613 JR NZ,IOERR
2D1E C9 01614 RET
2D1F 01615 $DSPLY @@DSPLY
01616 IFEQ 00H,1
01617 LD HL,
01618 ENDIF
2D1F+3E0A 01619 LD A,10
2D21+EF 01620 RST 40
2D22 200E 01621 JR NZ,IOERR
2D24 C9 01622 RET
2D25 01623 $READ @@READ
2D25+3E43 01624 LD A,67
2D27+EF 01625 RST 40
2D28 2008 01626 JR NZ,IOERR
2D2A C9 01627 RET
2D2B C5 01628 $DSP PUSH BC
2D2C 4F 01629 LD C,A
2D2D 01630 @@DSP
2D2D+3E02 01631 LD A,2
2D2F+EF 01632 RST 40
2D30 C1 01633 POP BC
2D31 C8 01634 RET Z ;If OK else fall error
01635 ;
01636 ; Error handling
01637 ;
2D32 6F 01638 IOERR LD L,A ;HL also gets error #
2D33 2600 01639 LD H,0
2D35 F6C0 01640 OR 0C0H ;Abbrev, return
2D37 4F 01641 LD C,A
2D38 01642 @@ERROR ;Display the error
2D38+3E1A 01643 LD A,26
2D3A+EF 01644 RST 40
2D3B 181D 01645 JR QUIT1
01646 ;
01647 ; Internal error routine
01648 ;
2D3D 211B2F 01649 NOVRLY LD HL,NOVRLY$ ;"Library not found
2D40 DD 01650 DB 0DDH
2D41 21352F 01651 LIBERR LD HL,LIBERR$ ;"Invalid library
2D44 DD 01652 DB 0DDH
2D45 21652F 01653 FILERR LD HL,FILERR$ ;"Not load file format
2D48 DD 01654 DB 0DDH
2D49 215F2E 01655 PRMERR LD HL,PRMERR$ ;"Parm error
2D4C DD 01656 DB 0DDH
2D4D 21CE2F 01657 TOOBIG LD HL,TOOBIG$ ;"Fix file too big
2D50 DD 01658 DB 0DDH
2D51 21442E 01659 PGMREQ LD HL,PGMREQ$ ;"Patch what file?
2D54 01660 ERREXIT @@LOGOT ;Display the error
01661 IFEQ 00H,1
01662 LD HL,
01663 ENDIF
2D54+3E0C 01664 LD A,12
2D56+EF 01665 RST 40
2D57 21FFFF 01666 LD HL,-1 ;Set abort code
2D5A C3AE27 01667 QUIT1 JP $QUIT
01668 ;
2D5D 217C2F 01669 NONHEX LD HL,NONHEX$ ;"Non hex digit
2D60 DD 01670 DB 0DDH
2D61 214C2F 01671 PCHERR LD HL,PCHERR$ ;"Patch format error
2D64 E5 01672 ERRDSP PUSH HL
2D65 3E0D 01673 LD A,CR ;Move the cursor down
2D67 CD2B2D 01674 CALL $DSP
2D6A 210000 01675 SETMSG LD HL,0
2D6D 01676 @@LOGOT
01677 IFEQ 00H,1
01678 LD HL,
01679 ENDIF
2D6D+3E0C 01680 LD A,12
2D6F+EF 01681 RST 40
2D70 E1 01682 POP HL
2D71 18E1 01683 JR ERREXIT
01684 ;
2D73 00 01685 YNKFLG DB 0 ;Was function YANK?
2D74 0000 01686 LINCNT DW 0 ;Count lines installed
2D76 00 01687 WRFLAG DB 0 ;Did pgm write to file?
2D77 0000 01688 DL DW 0 ;Save pointer to line
2D79 43 01689 CMDEXT DB 'CMD'
4D 44
2D7C 46 01690 FIXEXT DB 'FIX'
49 58
2D7F 00 01691 PGMDCB DB 0
2D80 01692 DS 32
2DA0 01693 FIXDCB DS 32
2DC0 50 01694 HELLO$ DB 'PATCH'
41 54 43 48
2DC5 01695 *GET CLIENT:3
01696 ;CLIENT/ASM - File to establish sign-on headers
01697 ; and version numbers.
01698 ;
01699 ; EACH STRING SHOULD CONTAIN ONLY 63 CHARACTERS !!
01700 ;
01701 IF @BLD631
01702 ; 12345678901234567890123456789012345678901234567890
2DC5 20 01703 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
2DF7 49 01704 DB 'Inc., ',10 ;<631>
6E 63 2E 2C 20 20 20 20
20 20 20 0A
01705 ELSE
01706 DB ' - 6.3.0 - Copyright 1982/83/84/86 by Logical Syst'
01707 DB 'ems, Inc. ',10
01708 ENDIF
01709 ;
01710 ; DB 'All Rights Reserved. Licensed 1982/83/84 to Tandy '
01711 ; DB 'Corporation.',10,13
01712 ;
01713 ; DB 'All Rights Reserved. Beta-TEST Level/AD, DO NOT DI'
01714 ; DB 'STRIBUTE !! ',10,13
01715 ; DB 'All Rights reserved by LSI, 8970 N. 55th St. Milwa'
01716 ; DB 'ukee, Wisc. ',10,13
2E04 41 01717 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
2E36 72 01718 DB 'rohibited. ',10,13
6F 68 69 62 69 74 65 64
2E 20 20 0A 0D
2E44 50 01719 PGMREQ$ DB 'PROGRAM file name required',CR
52 4F 47 52 41 4D 20 66
69 6C 65 20 6E 61 6D 65
20 72 65 71 75 69 72 65
64 0D
2E5F 50 01720 PRMERR$ DB 'Parameter error',CR
61 72 61 6D 65 74 65 72
20 65 72 72 6F 72 0D
2E6F 1D 01721 POSLD$ DB 29,'Positioning load file',30,32,3
50 6F 73 69 74 69 6F 6E
69 6E 67 20 6C 6F 61 64
20 66 69 6C 65 1E 20 03
2E88 1D 01722 RDGINP$ DB 29,'Reading input',30,32,3
52 65 61 64 69 6E 67 20
69 6E 70 75 74 1E 20 03
2E99 1D 01723 GENPCH$ DB 29,'Generating patch',30,32,3
47 65 6E 65 72 61 74 69
6E 67 20 70 61 74 63 68
1E 20 03
2EAD 1D 01724 INSPCH$ DB 29,'Installing patch',30,32,3
49 6E 73 74 61 6C 6C 69
6E 67 20 70 61 74 63 68
1E 20 03
2EC1 1D 01725 BLDMAP$ DB 29,'Re-building library map',30,32,3
52 65 2D 62 75 69 6C 64
69 6E 67 20 6C 69 62 72
61 72 79 20 6D 61 70 1E
20 03
2EDC 1D 01726 YNKPCH$ DB 29,'Yanking patch from file',30,32,3
59 61 6E 6B 69 6E 67 20
70 61 74 63 68 20 66 72
6F 6D 20 66 69 6C 65 1E
20 03
2EF7 0A 01727 NOYANK$ DB LF,'Can''t yank, '
43 61 6E 27 74 20 79 61
6E 6B 2C 20
2F04 70 01728 DB 'patch not in load file',CR
61 74 63 68 20 6E 6F 74
20 69 6E 20 6C 6F 61 64
20 66 69 6C 65 0D
2F1B 4C 01729 NOVRLY$ DB 'Library overlay not found',CR
69 62 72 61 72 79 20 6F
76 65 72 6C 61 79 20 6E
6F 74 20 66 6F 75 6E 64
0D
2F35 49 01730 LIBERR$ DB 'Invalid library format',CR
6E 76 61 6C 69 64 20 6C
69 62 72 61 72 79 20 66
6F 72 6D 61 74 0D
2F4C 50 01731 PCHERR$ DB 'Patch input format error',CR
61 74 63 68 20 69 6E 70
75 74 20 66 6F 72 6D 61
74 20 65 72 72 6F 72 0D
2F65 4C 01732 FILERR$ DB 'Load file format error',CR
6F 61 64 20 66 69 6C 65
20 66 6F 72 6D 61 74 20
65 72 72 6F 72 0D
2F7C 4E 01733 NONHEX$ DB 'Non-hex digit encountered',CR
6F 6E 2D 68 65 78 20 64
69 67 69 74 20 65 6E 63
6F 75 6E 74 65 72 65 64
0D
2F96 0A 01734 SUCCES$ DB LF,'Patch function completed.',CR
50 61 74 63 68 20 66 75
6E 63 74 69 6F 6E 20 63
6F 6D 70 6C 65 74 65 64
2E 0D
2FB1 20 01735 LINMSG$ DB ' No patch line'
20 20 4E 6F 20 70 61 74
63 68 20 6C 69 6E 65
2FC1 73 01736 PLURAL DB 's installed.',CR
20 69 6E 73 74 61 6C 6C
65 64 2E 0D
2FCE 46 01737 TOOBIG$ DB 'Fix file too big - partition it',CR
69 78 20 66 69 6C 65 20
74 6F 6F 20 62 69 67 20
2D 20 70 61 72 74 69 74
69 6F 6E 20 69 74 0D
2FEE 50 01738 YANKMSG DB 'Patch successfully yanked',CR
61 74 63 68 20 73 75 63
63 65 73 73 66 75 6C 6C
79 20 79 61 6E 6B 65 64
0D
3008 03 01739 NAMLEN$ DB 3 ;Length of fix file name
3009 43 01740 NAMFIX$ DB 'CLP ' ;Fix file name
4C 50 20 20 20 20 20
3011 46 01741 LOCERR$ DB 'FIND line mismatch',CR
49 4E 44 20 6C 69 6E 65
20 6D 69 73 6D 61 74 63
68 0D
3024 57 01742 WARN1$ DB 'WARNING - File '
41 52 4E 49 4E 47 20 2D
20 46 69 6C 65 20
3033 20 01743 FNM$ DB ' '
20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20
20 20 20 20 20 20 20
304B 20 01744 WARN2$ DB ' Not Closed',CR
4E 6F 74 20 43 6C 6F 73
65 64 0D
01745 ;
3057 80 01746 PTBL$ DB 80H
3058 56 01747 DB FLAG!ABB!6
3059 52 01748 DB 'REMOVE',0
45 4D 4F 56 45 00
3060 8D26 01749 DW RPARM1
3062 41 01750 DB FLAG!1
3063 4F 01751 DB 'O',0
00
3065 9426 01752 DW OPARM1
3067 00 01753 NOP
01754 ;
3100 01755 ORG $<-8+1<+8
3100 01756 FIXBUF DS 256 ;I/O buffer for /FIX
3200 01757 LIBBUF DS 256 ;I/O buffer for ISAM
3300 01758 PGMBUF DS 256 ;I/O buffer for PGM
3400 01759 FIXDATA DS 1400H ;5k alloted for fix data
4800 01760 PGMDATA EQU $ ;Takes the rest of core
01761 ;
2600 01762 END BEGIN
2600 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]