
 1000  *---------------------------------
 1010  *      HI-RES SCRN FUNCTION
 1020  *
 1030  *      & HSCRN( A=X,Y )
 1040  *      X,Y DEFINES THE SPOT
 1050  *      A RECEIVES 0 OR 1
 1060  *---------------------------------
 1070         .OR $300
 1080         .TF B.HIRES SCRN
 1090  *---------------------------------
 1100  AMPERSAND.VECTOR    .EQ $3F5
 1110  *---------------------------------
 1120  CHRGET              .EQ $00B1
 1130  CHRGOT              .EQ $00B7
 1140  SYNCHR              .EQ $DEC0
 1150  SYNTAX.ERROR        .EQ $DEC9
 1160  PTRGET              .EQ $DFE3
 1170  SNGFLT              .EQ $E301
 1180  HPOSN               .EQ $F411
 1190  HFNS                .EQ $F6B9
 1200  *---------------------------------
 1210  VALUE.TYPE          .EQ $11
 1220  HPNTR               .EQ $26
 1230  HMASK               .EQ $30
 1240  FORMULA.PNTR        .EQ $85
 1250  *---------------------------------
 1260  TOKEN.EQUALS        .EQ $D0
 1270  TOKEN.SCRN          .EQ $D7
 1280  *---------------------------------
 1290  *      SETUP AMPERSAND VECTOR
 1300  *---------------------------------
 1310  SETUP  LDA #$4C     JMP OPCODE
 1320         STA AMPERSAND.VECTOR
 1330         LDA #HSCRN
 1340         STA AMPERSAND.VECTOR+1
 1350         LDA /HSCRN
 1360         STA AMPERSAND.VECTOR+2
 1370         RTS
 1380  *---------------------------------
 1390  *      HSCRN FUNCTION
 1400  *---------------------------------
 1410  HSCRN  LDA #'H      TEST FOR "HSCRN("
 1420         JSR SYNCHR        FIRST LETTER "H"
 1430         LDA #TOKEN.SCRN   AND THEN TOKEN "SCRN("
 1440         JSR SYNCHR
 1450         JSR PTRGET   SCAN THE VARIABLE NAME
 1460         STA FORMULA.PNTR  SAVE ITS POINTER ADDRESS
 1470         STY FORMULA.PNTR+1
 1480         LDA #TOKEN.EQUALS CHECK FOR "="
 1490         JSR SYNCHR
 1500         LDA VALUE.TYPE+1  SAVE VARIABLE TYPE ON STACK
 1510         PHA
 1520         LDA VALUE.TYPE
 1530         PHA
 1540         JSR HFNS     SCAN "X,Y" EXPRESSIONS
 1550         JSR HPOSN    SET UP BASE, Y-REG, AND MASK
 1560         JSR CHRGOT   CHECK FOR FINAL ")"
 1570         CMP #')
 1580         BNE .2       SYNTAX ERROR IF NOT THERE!
 1590         JSR CHRGET   POSITION FOR NEXT STATEMENT
 1600         LDA HMASK    ISOLATE SPOT AT X,Y
 1610         AND (HPNTR),Y
 1620         BEQ .1       SPOT IS OFF, RETURN ZERO
 1630         LDA #1       SPOT IS ON, RETURN 1
 1640  .1     TAY
 1650         JSR SNGFLT   CONVERT BYTE TO REAL VALUE
 1660         JMP $DA5B    STORE IN VARIABLE, AND KEEP GOING!
 1665  *---------------------------------
 1670  .2     JMP SYNTAX.ERROR

