
 1000         .OR $F00
 1010         .TF B.US.DIRECTIVE
 1020  *---------------------------------
 1030  WBUF   .EQ $0200
 1040  DLIM   .EQ $DA
 1050  HIBIT  .EQ $04
 1060  *---------------------------------
 1070  *  THE FOLLOWING VALUES ARE FOR VERSION 4.0
 1080  *  OF S-C ASSEMBLER II (DISK)
 1090  *---------------------------------
 1100  GNNB   .EQ $1283    GET NEXT NON-BLANK CHAR
 1110  GNC    .EQ $128B    GET NEXT CHAR
 1120  CMNT   .EQ $188E    FINISH THE LINE
 1130  ERBA   .EQ $1932    ERROR: BAD ADDRESS
 1140  EMIT   .EQ $19FA    EMIT A BYTE OF OBJECT CODE
 1150  *---------------------------------
 1160  ACTIVATE.US
 1170         LDA #DIR.US  STORE ADDRESS IN .US VECTOR
 1180         STA $100D    INSIDE S-C ASSEMBLER II VER
 1190         LDA /DIR.US  DISK VERSION 4.0
 1200         STA $100E
 1210         RTS
 1220  *---------------------------------
 1230  DIR.US
 1240         LDY #0       START WITH HI-BIT EQUAL TO ZERO
 1250  .1     STY HIBIT    SET HI-BIT ZERO OR ONE
 1260         JSR GNNB     GET NEXT NON-BLANK AFTER OPCODE
 1270         BCS ERBA2    END OF LINE IS BAD NEWS
 1280         LDY #$80     IN CASE WE NEED HI-BIT OF ONE
 1290         CMP #$2D     CHECK FOR MINUS SIGN
 1300         BEQ .1       YES, WE NEED HI-BIT OF ONE
 1310         STA DLIM     NOT MINUS, MUST BE DELIMITER
 1320         JSR GNC      GET NEXT CHARACTER
 1330         BCS ERBA2    END OF LINE IS BAD NEWS
 1340         CMP DLIM     SEE IF DELIMITER ALREADY
 1350         BEQ .4       YES, NO STRING IN BETWEEN
 1360  .2     JSR GNC      GET NEXT CHARACTER
 1370         BCS ERBA2    END OF LINE IS BAD NEWS
 1380         CMP DLIM     SEE IF DELIMITER YET
 1390         BEQ .3       YES, FINISH UP AND RETURN
 1400         LDA WBUF-2,Y NO, GET PREVIOUS CHAR
 1410         ORA HIBIT    MERGE WITH SELECTED HI-BIT
 1420         JSR EMIT     EMIT THE OBJECT CODE BYTE
 1430         JMP .2       GO FOR ANOTHER ONE
 1440  *---------------------------------
 1450  .3     LDA WBUF-2,Y GET PREVIOUS CHAR
 1460         ORA HIBIT    MERGE WITH SELECTED HI-BIT
 1470         EOR #$80     TOGGLE HI-BIT SINCE LAST CHAR
 1480         JSR EMIT     EMIT THE OBJECT CODE BYTE
 1490  .4     JMP CMNT     FINISH PROCESSING THE LINE
 1500  *---------------------------------
 1510  ERBA2  JMP ERBA     BAD ADDRESS ERROR

