
 1000  *--------------------------------
 1010  * THIS ROUTINE ADDS AN XPLOT CAPABILITY
 1020  * TO APPLESOFT.  THE FLAG AT $301 (769)
 1030  * CONTROLS WHETHER HPLOT OR XPLOT IS
 1040  * FUNCTIONING.
 1050  *
 1060  *      POKE 769,0   ENABLES HPLOT
 1070  *      POKE 769,1   ENABLES XPLOT
 1080  *--------------------------------
 1090         .OR $300
 1100         .TF B.HXPLOT
 1110  NEW.HLIN LDA #0     TEST 'XPLOT' FLAG
 1120         BNE .2       YES 'XPLOT' MODE
 1130         LDA ($26),Y  PLOT NORMAL LINE
 1140         EOR $1C
 1150         AND $30
 1160  .1     JMP $F593    BACK INTO APPLESOFT LINE ROUTINE
 1170  .2     LDA #$7F     MASK COLOR SHIFT BIT
 1180         AND $30      OFF OF BIT MASK
 1190         AND ($26),Y  TEST SCREEN BIT
 1200         BNE .1       BIT IS SET!... SO CLEAR IT
 1210         LDA #$7F     BIT IS CLEAR!...SO SET IT
 1220         AND $30      BIT MASK WITHOUT COLOR SHIFT BIT
 1230         BPL .1       BRANCH ALWAYS
 1240  *--------------------------------
 1250  NEW.PLOT JSR $F411  CALL HPOSN ROUTINE
 1260         LDA $301     TEST 'XPLOT' FLAG
 1270         BNE .1       YES 'XPLOT' MODE
 1280         JMP $F45A    PLOT NORMAL
 1290  .1     LDA #$7F     XPLOT
 1300         AND $30      MASK COLOR SHIFT BIT OFF
 1310         AND ($26),Y  TEST SCREEN BIT
 1320         BNE .2       SCREEN BIT IS SET
 1330         LDA #$7F     ...CLEAR SO PREPARE TO
 1340         AND $30      SET SCREEN BIT
 1350  .2     JMP $F460    BACK INTO APPLESOFT XPLOT ROUTINE
 1360  *--------------------------------
 1370  *
 1380  * TO USE THE ABOVE FUNCTION YOU MUST HAVE A RAM CARD.
 1390  * APPLESOFT MUST BE IN THE RAM CARD.
 1400  * THEN YOU MUST DO THE FOLLOWING:
 1410  *
 1420  * 0. BLOAD B.XPLOT.FOR.FP     LOAD THE XPLOT ROUTINE
 1430  * 1. CALL-151  TO ENTER THE MONITOR
 1440  * 2. C081 C081   TO WRITE ENABLE THE CARD
 1450  * 3. GO TO STEP 5 IF YOU HAVE AN INTEGER BASIC MOTHER BOARD
 1460  * 4. D000<D000.FFFFM   PUT APPLESOFT INTO RAM CARD
 1470  * 5. F58D:4C 00 03   PATCH FOR LINE ROUTINE
 1480  * 6. F457:4C 1B 03   PATCH FOR POINT PLOT ROUTINE
 1490  * 7. C080            WRITE PROTECT THE RAM CARD
 1500  * 8. 3D3G            START APPLESOFT UP
 1510  *--------------------------------
 1520  * FOR LAZY SOULS HERE IS AN AUTOMATIC PATCH ROUTINE.
 1530  *--------------------------------
 1540  MON.COUT .EQ $FDED   MONITOR CHARACTER OUT ROUTINE
 1550         .OR $4000
 1560         .TF B.PATCH.XPLOT
 1570  START  LDY #0
 1580  .1     LDA MESG,Y
 1590         BEQ L.100
 1600         JSR MON.COUT PRINT MESSAGE
 1610         INY
 1620         BNE .1       BRANCH ALWAYS
 1630  MESG   .HS 8D84
 1640         .AS -/BLOAD B.XPLOT.FOR.FP/
 1650         .HS 8D00
 1660  L.100  LDA $C081    ROM READ
 1670         LDA $C081    RAM CARD WRITE
 1680         LDA $E000    CHECK MOTHERBOARD ROM
 1690         CMP #$20     IS IT INTEGER BASIC
 1700         BEQ L.200    YES SO MUST HAVE FP FROM SYSTEM MASTER
 1710         LDA #$D0     NO SO COPY FP FROM ROM TO RAM CARD
 1720         STA $1
 1730         LDA #0
 1740         STA $0
 1750  .1     LDY #0
 1760  .2     LDA ($0),Y
 1770         STA ($0),Y
 1780         INY
 1790         BNE .2
 1800         INC $1
 1810         BNE .1
 1820  L.200  LDA #$4C     SET PATCHES INTO RAM CARD APPLESOFT
 1830         STA $F58D
 1840         STA $F457
 1850         LDA #NEW.HLIN
 1860         STA $F58E
 1870         LDA /NEW.HLIN
 1880         STA $F58F
 1890         LDA #NEW.PLOT
 1900         STA $F458
 1910         LDA /NEW.PLOT
 1920         STA $F459
 1930         LDA $C080
 1940         JMP $3D3     START UP RAM CARD APPLESOFT

