[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:50:22 FORMS/FLT - LS-DOS 6.2 Page 00001 00001 ;FORMS/ASM - Printer Formatting 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 BEGIN 2400 00437 @@CKBRKC ;Check for break 2400+3E6A 00438 LD A,106 2402+EF 00439 RST 40 2403 2804 00440 JR Z,BEGINA ;Continue if no Break 2405 21FFFF 00441 LD HL,-1 2408 C9 00442 RET ; else abort 00443 ; 2409 D5 00444 BEGINA PUSH DE ;Save DCB address 240A DDE1 00445 POP IX ; in index reg 240C ED534426 00446 LD (PFDCB),DE ; and in filter header 2410 00447 @@DSPLY HELLO$ ;Welcome the user 00448 IFEQ 01H,1 2410+211E25 00449 LD HL,HELLO$ 00450 ENDIF 2413+3E0A 00451 LD A,10 2415+EF 00452 RST 40 00453 ; 00454 ; Check if entry from SET command 00455 ; 2416 00456 @@FLAGS ;IY => flag table base 2416+3E65 00457 LD A,101 2418+EF 00458 RST 40 2419 FDCB025E 00459 BIT 3,(IY+'C'-'A') ;System request? 241D CAFE24 00460 JP Z,VIASET ;Quit if not 00461 ; 00462 ; Check if filter is already resident 00463 ; 2420 111A25 00464 LD DE,FF$ ;Check if filter is 2423 00465 @@GTMOD ; already resident 2423+3E53 00466 LD A,83 2425+EF 00467 RST 40 2426 EB 00468 EX DE,HL ;Put DCB ptr to HL 2427 201C 00469 JR NZ,NOTRES ;Go if not 00470 ; 00471 ; Make sure that the new DCB is same as the old 00472 ; 00473 IF @BLD631 2429 4E 00474 LD C,(HL) ;<631>P/u DCB pointer LSB 242A 23 00475 INC HL ;<631> 242B 46 00476 LD B,(HL) ;<631>P/u DCB pointer MSB 00477 ELSE 00478 LD BC,(PFDCB) ;Replace DCB pointer 00479 LD A,C ; with new one 00480 LD C,(HL) ;P/u DCB pointer LSB 00481 NOP 00482 INC HL 00483 LD A,B 00484 LD B,(HL) ;P/u DCB pointer MSB 00485 ENDIF 242C 210600 00486 LD HL,6 ;Get old DCB name & 242F 09 00487 ADD HL,BC ; stuff into error 2430 7E 00488 LD A,(HL) ; message in case 2431 2C 00489 INC L ; a different DCB 2432 66 00490 LD H,(HL) ; is referenced 2433 6F 00491 LD L,A 2434 22F425 00492 LD (DCBNAM$),HL ;Stuff message with spec 2437 B4 00493 OR H 2438 2876 00494 JR Z,ISRES 243A 2A4426 00495 LD HL,(PFDCB) ;P/u DCB existing DCB 243D B7 00496 OR A ; pointer 243E ED42 00497 SBC HL,BC ;Same DCB pointer? 2440 C20225 00498 JP NZ,DCBERR ;Can't install if diff 2443 186B 00499 JR ISRES 00500 ; 00501 ; Module is not resident 00502 ; 2445 114B49 00503 NOTRES LD DE,'IK' 2448 00504 @@GTDCB ;Locate low memory ptr 2448+3E52 00505 LD A,82 244A+EF 00506 RST 40 244B C21025 00507 JP NZ,IOERR ;Quit if not found 244E 2D 00508 DEC L 244F 56 00509 LD D,(HL) ;P/u pointer to 2450 2D 00510 DEC L ; start of free 2451 5E 00511 LD E,(HL) ; low core 2452 ED53A024 00512 LD (LCPTR+1),DE ;Save loc for later 2456 E5 00513 PUSH HL ;Save low core ptr 2457 210101 00514 LD HL,PFEND-PFFLT 245A 19 00515 ADD HL,DE ;Start + driver length 245B E5 00516 PUSH HL 245C 2B 00517 DEC HL ;Point to last byte 245D 22D624 00518 LD (SVEND+1),HL 2460 010013 00519 LD BC,1300H ;Max addr + 1 2463 AF 00520 XOR A 2464 ED42 00521 SBC HL,BC 2466 D1 00522 POP DE ;Rcvr new lc 2467 E1 00523 POP HL ;Rcvr low core ptr 2468 382F 00524 JR C,PUTLOW ;If room, put low 00525 ; 00526 ; Check if high memory available 00527 ; 246A 00528 @@FLAGS 246A+3E65 00529 LD A,101 246C+EF 00530 RST 40 246D FDCB0246 00531 BIT 0,(IY+'C'-'A') ;Memory frozen? 2471 C20625 00532 JP NZ,NOROOM ;"No memory... 2474 210000 00533 LD HL,0 ;Get HIGH$ 2477 45 00534 LD B,L 2478 00535 @@HIGH$ 2478+3E64 00536 LD A,100 247A+EF 00537 RST 40 247B 22D624 00538 LD (SVEND+1),HL ;Save for relocator 247E 5D 00539 LD E,L ;Xfer new last 247F 54 00540 LD D,H ; to reg DE 2480 AF 00541 XOR A ;Calc new start 2481 010101 00542 LD BC,PFEND-PFFLT ;BC = filter len 2484 ED42 00543 SBC HL,BC 2486 0600 00544 LD B,0 2488 00545 @@HIGH$ ;Set new HIGH$ 2488+3E64 00546 LD A,100 248A+EF 00547 RST 40 248B 23 00548 INC HL ;Point to new start 248C EB 00549 EX DE,HL 248D D5 00550 PUSH DE 248E CDCF24 00551 CALL RELO ;Relocate internal references 2491 D1 00552 POP DE 2492 3EFF 00553 LD A,0FFH 2494 32C124 00554 LD (HGHFLG),A ;Flag to notify user 2497 1809 00555 JR MOVMOD ; himem used 00556 ; 00557 ; Room in low core - move driver low 00558 ; 2499 73 00559 PUTLOW LD (HL),E ;Stuff low core ptr 249A 2C 00560 INC L ; with new low 249B 72 00561 LD (HL),D 249C CDCF24 00562 CALL RELO ;Relocate vectors 249F 110000 00563 LCPTR LD DE,$-$ ;Low core pointer 00564 ; 00565 ; Move module to memory 00566 ; 24A2 D5 00567 MOVMOD PUSH DE ;Save start 24A3 213C26 00568 LD HL,PFFLT 24A6 010101 00569 LD BC,PFEND-PFFLT ;Calc driver length 24A9 EDB0 00570 LDIR 24AB D1 00571 POP DE ;Pop filter start 24AC FDCB03EE 00572 SET 5,(IY+'D'-'A') ;Set PF in DFLAG$ 00573 ; 24B0 21F725 00574 ISRES LD HL,PFACT$ ;Init "FORMS installed 24B3 DD360047 00575 LD (IX),40H!7 ;Init DCB type to "C/P/G" 24B7 DD7301 00576 LD (IX+1),E ; & filter & stuff the 24BA DD7202 00577 LD (IX+2),D ; filter address 24BD 00578 @@LOGOT ;Display installation 00579 IFEQ 00H,1 00580 LD HL, 00581 ENDIF 24BD+3E0C 00582 LD A,12 24BF+EF 00583 RST 40 24C0 3E00 00584 LD A,$-$ 24C1 00585 HGHFLG EQU $-1 ;Flag filter went high 24C2 B7 00586 OR A ;Skip if not set 24C3 2806 00587 JR Z,NTHGH 24C5 211426 00588 LD HL,HMEM$ ; else show "Went in himem 24C8 00589 @@LOGOT 00590 IFEQ 00H,1 00591 LD HL, 00592 ENDIF 24C8+3E0C 00593 LD A,12 24CA+EF 00594 RST 40 24CB 210000 00595 NTHGH LD HL,0 ;No error 24CE C9 00596 RET ;Done, back to user 00597 ; 00598 ; Relocate internal references in driver 00599 ; 24CF DDE5 00600 RELO PUSH IX 24D1 DD213D27 00601 LD IX,RELTAB ;Point to relocation tbl 24D5 210000 00602 SVEND LD HL,$-$ ;Find distance to move 24D8 223E26 00603 LD (PFFLT+2),HL ;Set last byte used 24DB 113C27 00604 LD DE,PFEND-1 24DE B7 00605 OR A ;Clear carry flag 24DF ED52 00606 SBC HL,DE 24E1 44 00607 LD B,H ;Move to BC 24E2 4D 00608 LD C,L 24E3 3E0E 00609 LD A,TABLEN ;Get table length 24E5 DD6E00 00610 RLOOP LD L,(IX) ;Get address to change 24E8 DD6601 00611 LD H,(IX+1) 24EB 5E 00612 LD E,(HL) ;P/U address 24EC 23 00613 INC HL 24ED 56 00614 LD D,(HL) 24EE EB 00615 EX DE,HL ;Offset it 24EF 09 00616 ADD HL,BC 24F0 EB 00617 EX DE,HL 24F1 72 00618 LD (HL),D ;Put it back 24F2 2B 00619 DEC HL 24F3 73 00620 LD (HL),E 24F4 DD23 00621 INC IX 24F6 DD23 00622 INC IX 24F8 3D 00623 DEC A 24F9 20EA 00624 JR NZ,RLOOP ;Loop till done 24FB DDE1 00625 POP IX 24FD C9 00626 RET 00627 ; 00628 ; Error exits 00629 ; 24FE 21A925 00630 VIASET LD HL,VIASET$ ;"Install with Set 2501 DD 00631 DB 0DDH 2502 21D825 00632 DCBERR LD HL,DCBERR$ ;"Filter in use 2505 DD 00633 DB 0DDH 2506 21BE25 00634 NOROOM LD HL,NOROOM$ ;"Memory frozen 2509 00635 @@LOGOT ;Show the error 00636 IFEQ 00H,1 00637 LD HL, 00638 ENDIF 2509+3E0C 00639 LD A,12 250B+EF 00640 RST 40 250C 21FFFF 00641 LD HL,-1 ;Set abort code 250F C9 00642 RET 00643 ; 2510 6F 00644 IOERR LD L,A ;Error # to HL 2511 2600 00645 LD H,0 2513 F6C0 00646 OR 0C0H ;Abbrev, return 2515 4F 00647 LD C,A ;Error code to C 2516 00648 @@ERROR ; for error display 2516+3E1A 00649 LD A,26 2518+EF 00650 RST 40 2519 C9 00651 RET 00652 ; 00653 ; Messages & Data tables 00654 ; 251A 24 00655 FF$ DB '$FF',3 46 46 03 251E 46 00656 HELLO$ DB 'FORMS Filter' 4F 52 4D 53 20 46 69 6C 74 65 72 252A 00657 *GET CLIENT:3 00658 ;CLIENT/ASM - File to establish sign-on headers 00659 ; and version numbers. 00660 ; 00661 ; EACH STRING SHOULD CONTAIN ONLY 63 CHARACTERS !! 00662 ; 00663 IF @BLD631 00664 ; 12345678901234567890123456789012345678901234567890 252A 20 00665 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 255C 49 00666 DB 'Inc., ',10 ;<631> 6E 63 2E 2C 20 20 20 20 20 20 20 0A 00667 ELSE 00668 DB ' - 6.3.0 - Copyright 1982/83/84/86 by Logical Syst' 00669 DB 'ems, Inc. ',10 00670 ENDIF 00671 ; 00672 ; DB 'All Rights Reserved. Licensed 1982/83/84 to Tandy ' 00673 ; DB 'Corporation.',10,13 00674 ; 00675 ; DB 'All Rights Reserved. Beta-TEST Level/AD, DO NOT DI' 00676 ; DB 'STRIBUTE !! ',10,13 00677 ; DB 'All Rights reserved by LSI, 8970 N. 55th St. Milwa' 00678 ; DB 'ukee, Wisc. ',10,13 2569 41 00679 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 259B 72 00680 DB 'rohibited. ',10,13 6F 68 69 62 69 74 65 64 2E 20 20 0A 0D 00681 ; 25A9 4D 00682 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 25BE 4E 00683 NOROOM$ DB 'No memory space available',CR 6F 20 6D 65 6D 6F 72 79 20 73 70 61 63 65 20 61 76 61 69 6C 61 62 6C 65 0D 25D8 46 00684 DCBERR$ DB 'Filter already attached to *xx',CR 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 25F4 00685 DCBNAM$ EQU $-3 25F7 46 00686 PFACT$ DB 'Forms filter is now resident',CR 6F 72 6D 73 20 66 69 6C 74 65 72 20 69 73 20 6E 6F 77 20 72 65 73 69 64 65 6E 74 0D 2614 0A 00687 HMEM$ DB LF,'Note: filter installed in high memory.',CR 4E 6F 74 65 3A 20 66 69 6C 74 65 72 20 69 6E 73 74 61 6C 6C 65 64 20 69 6E 20 68 69 67 68 20 6D 65 6D 6F 72 79 2E 0D 00688 ; 00689 ; 00690 ; Printer Filter - PF 00691 ; Provides hard or soft form feed, line wraparound, 00692 ; automatic form feeds between pages, tabs, blank 00693 ; lines, 1 byte translation table, left margins, 00694 ; and set-top-of-form character. 00695 ; 00696 *MOD 0003 00697 PFBIT EQU 3 ;Position in DFLAG 0000 00698 SPLBIT EQU 0 ;Position in DFLAG 000A 00699 LF EQU 10 000D 00700 CR EQU 13 00701 ; 263C 1814 00702 PFFLT JR PFBGN ;Branch around header 263E 3C27 00703 DW PFEND-1 ;Last byte used 2640 03 00704 DB 3,'$FF' ;Name length/name 24 46 46 2644 0000 00705 PFDCB DW $-$ ;Link to DCB 2646 0000 00706 DW 0 00707 ; 00708 ; Filter data area 00709 ; 2648 00710 PFDATA$ EQU $ 0000 00711 PMAX EQU $-PFDATA$ 2648 42 00712 DB 66 ;Page size (max lines per page) 0001 00713 LCOUNT EQU $-PFDATA$ 2649 00 00714 DB 0 ;Line counter 0002 00715 LMAX EQU $-PFDATA$ 264A 42 00716 DB 66 ;Max lines to print 0003 00717 CCOUNT EQU $-PFDATA$ 264B 00 00718 DB 0 ;Chars per line printed 0004 00719 XL1 EQU $-PFDATA$ 264C 00 00720 DB 0 ;Translate from 0005 00721 XL2 EQU $-PFDATA$ 264D 00 00722 DB 0 ;Translate to 0006 00723 INDENT EQU $-PFDATA$ 264E 00 00724 DB 0 ;Indent after line wraparound 0007 00725 ADDLF EQU $-PFDATA$ 264F 04 00726 DB 4 ;Bit-0, LF after CR; bit-1=FF 00727 ;Bit-2, TAB expand (1) 0008 00728 CMAX EQU $-PFDATA$ 2650 00 00729 DB 0 ;Max CPL before wraparound 0009 00730 MARGIN EQU $-PFDATA$ 2651 00 00731 DB 0 ;Left hand margin 00732 ; 00733 ; Start of filter 00734 ; 2652 281A 00735 PFBGN JR Z,FFENTRY ;Go if @PUT 2654 11 00736 DB 011H ;Ignore next inst if not 2655 0602 00737 PFPUT LD B,2 ;Init for @PUT 2657 DDE5 00738 PUSH IX 2659 DD2A4426 00739 LD IX,(PFDCB) ;Grab the DCB vector 265B 00740 RX01 EQU $-2 265D 00741 @@CHNIO ; & chain to it 265D+3E14 00742 LD A,20 265F+EF 00743 RST 40 2660 DDE1 00744 POP IX 2662 C9 00745 RET 00746 ; 00747 ; Peform the tab function 00748 ; 2663 DD7E03 00749 DOTAB LD A,(IX+CCOUNT) ;How many spaces to 2666 E607 00750 AND 7 ; next tab stop? 2668 D608 00751 SUB 8 266A ED44 00752 NEG 266C 1867 00753 JR @INDENT ;Space over to it 00754 ; 00755 ; Filter code 00756 ; 266E DD214826 00757 FFENTRY LD IX,PFDATA$ ;Base register 2670 00758 RX02 EQU $-2 00759 ; 2672 DD7E04 00760 CKXLAT LD A,(IX+XL1) ;Get xlate in 2675 B9 00761 CP C ;Translate this char? 2676 2004 00762 JR NZ,CONT ;Go if not xlated char 2678 DD7E05 00763 LD A,(IX+XL2) ;Xlated to this 267B 4F 00764 LD C,A 267C 79 00765 CONT LD A,C ;P/u char to test 267D FE0C 00766 CP 0CH ;Form feed? 267F CA1427 00767 JP Z,DOTOF 2680 00768 RX14 EQU $-2 2682 FE06 00769 CP 6 ;SET TOF? 2684 CA3727 00770 JP Z,SETTOF 2685 00771 RX03 EQU $-2 2687 FE0D 00772 CP CR ;CR? 2689 287A 00773 JR Z,DOCRLF 268B FE0A 00774 CP LF ;LF? 268D 2876 00775 JR Z,DOCRLF 268F DD7E09 00776 LD A,(IX+MARGIN) ;Left margin to do? 2692 B7 00777 OR A 2693 280B 00778 JR Z,NOMARG ;Go if not 2695 DD3403 00779 INC (IX+CCOUNT) ;Check current char count 2698 DD3503 00780 DEC (IX+CCOUNT) ;If at newline, 269B C5 00781 PUSH BC 269C CCD526 00782 CALL Z,@INDENT ; need a margin now 269D 00783 RX13 EQU $-2 269F C1 00784 POP BC 26A0 79 00785 NOMARG LD A,C ;P/u character again 26A1 DDCB0756 00786 BIT 2,(IX+ADDLF) ;Expand tabs? 26A5 2804 00787 JR Z,CONTA 26A7 FE09 00788 CP 9 ;Tab? 26A9 28B8 00789 JR Z,DOTAB 26AB FE20 00790 CONTA CP 20H ;Other control code? 26AD 38A6 00791 JR C,PFPUT ;Pass on unchanged if so 00792 ; 00793 ; Got a character to output 00794 ; 26AF C5 00795 PUTCHAR PUSH BC ;Save character 26B0 CDB926 00796 CALL SETUP ;Setup for next char 26B1 00797 RX12 EQU $-2 26B3 C1 00798 POP BC 26B4 C0 00799 RET NZ ;Quit on error 26B5 CC5526 00800 CALL Z,PFPUT ;Now put the char 26B6 00801 RX04 EQU $-2 26B8 C9 00802 RET 00803 ; 00804 ; Do the end of line check 00805 ; 26B9 DD3403 00806 SETUP INC (IX+CCOUNT) ;Inc char counter 26BC DD7E08 00807 LD A,(IX+CMAX) ;Wraparound needed? 26BF A7 00808 AND A 26C0 C8 00809 RET Z ;Quit if feature is off 26C1 DDBE03 00810 CP (IX+CCOUNT) 26C4 3075 00811 JR NC,EXITZ ;Done if not needed 26C6 CD0527 00812 CALL DOCRLF ;Do carriage return 26C7 00813 RX05 EQU $-2 26C9 C0 00814 RET NZ 26CA DD3403 00815 INC (IX+CCOUNT) ;Adjust char counter 00816 ; 00817 ; Check on indent needed 00818 ; 26CD DD7E06 00819 LD A,(IX+INDENT) ;P/u indent 26D0 DD8609 00820 ADD A,(IX+MARGIN) ;Add in the MARGIN 26D3 B7 00821 OR A 26D4 C8 00822 RET Z ;Done if none 26D5 C5 00823 @INDENT PUSH BC ;In case of recursive 26D6 47 00824 LD B,A ; calls 26D7 0E20 00825 LD C,' ' ;Print spaces 26D9 C5 00826 SPACES PUSH BC ;Save counter 26DA AF 00827 XOR A 26DB CDAF26 00828 CALL PUTCHAR ;Put the character 26DC 00829 RX06 EQU $-2 26DE C1 00830 POP BC ;Recover counter 26DF 2002 00831 JR NZ,$+4 ;Exit on PUT error 26E1 10F6 00832 DJNZ SPACES 26E3 C1 00833 POP BC 26E4 C9 00834 RET 26E5 DDCB0746 00835 LINFEED BIT 0,(IX+ADDLF) 26E9 2808 00836 JR Z,DOWN1 ;Go if hardware auto-LF 26EB 0E0D 00837 LD C,CR ;Else do CR and LF 26ED CD5526 00838 CALL PFPUT 26EE 00839 RX11 EQU $-2 26F0 C0 00840 RET NZ 26F1 1808 00841 JR DOWNLF 26F3 DD7E03 00842 DOWN1 LD A,(IX+CCOUNT) 26F6 A7 00843 AND A ;Line empty? 26F7 0E0D 00844 LD C,CR ;Do CR if not 26F9 2002 00845 JR NZ,DOWNCR 26FB 0E0A 00846 DOWNLF LD C,LF ;Do LF if so 26FD CD5526 00847 DOWNCR CALL PFPUT 26FE 00848 RX07 EQU $-2 2700 DD360300 00849 LD (IX+CCOUNT),0 ;Starting new line 2704 C9 00850 RET 00851 ; 2705 CDE526 00852 DOCRLF CALL LINFEED ;CRLF & check if page end 2706 00853 RX08 EQU $-2 2708 C0 00854 RET NZ 00855 ; 2709 DD3401 00856 INC (IX+LCOUNT) 270C DD7E01 00857 LD A,(IX+LCOUNT) ;Time to do form feed? 270F DDBE02 00858 CP (IX+LMAX) 2712 3827 00859 JR C,EXITZ ;Return if not 00860 ; 2714 DD7E00 00861 DOTOF LD A,(IX+PMAX) ;How many lines to feed? 2717 DD9601 00862 SUB (IX+LCOUNT) 271A 281B 00863 JR Z,SETTOF ;Skip if zero 271C C5 00864 PUSH BC ;In case called by DOTAB 271D 47 00865 LD B,A 271E DDCB074E 00866 BIT 1,(IX+ADDLF) ;Hardware form feed? 2722 2807 00867 JR Z,SOFTFF ;Go if not 2724 0E0C 00868 LD C,0CH ; else load up TOF char 2726 CD5526 00869 CALL PFPUT ; and send it 2727 00870 RX09 EQU $-2 2729 180B 00871 JR FFEXIT 272B C5 00872 SOFTFF PUSH BC 272C CDE526 00873 CALL LINFEED ;Do LF's 272D 00874 RX10 EQU $-2 272F C1 00875 POP BC 2730 2802 00876 JR Z,CHRGONE ;This linefeed sent OK 2732 C1 00877 POP BC ; else clean stack 2733 C9 00878 RET ; and return error 2734 10F5 00879 CHRGONE DJNZ SOFTFF 2736 C1 00880 FFEXIT POP BC 00881 ; 00882 ; Set the top-of-form 00883 ; 2737 DD360100 00884 SETTOF LD (IX+LCOUNT),0 ;Reset line counter 273B BF 00885 EXITZ CP A 273C C9 00886 RET 00887 ; 273D 00888 PFEND EQU $ 00889 ; 273D 5B26 00890 RELTAB DW RX01,RX02,RX03,RX04,RX05,RX06,RX07,RX08 7026 8526 B626 C726 DC26 FE26 0627 274D 2727 00891 DW RX09,RX10,RX11,RX12,RX13,RX14 2D27 EE26 B126 9D26 8026 000E 00892 TABLEN EQU $-RELTAB/2 00893 ; 2400 00894 END BEGIN 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]