1 REM ***GREYPIC-- VER 2.1 3/1/83***

1000 HOME

1010 GOTO 2000

1020 REM ***KEYBOARDCOMMAND PROCESSOR***

1100 CALL GE

1110 IF NOT PEEK (772) GOTO 1100

1120 X$ = CHR$ ( PEEK (773) - 128)

1130 IF X$ = "<" OR X$ = "," THEN ND = 1: GOSUB 3000: GOTO 1100

1140 IF X$ = ">" OR X$ = "." THEN ND = 2: GOSUB 3000: GOTO 1100

1150 IF X$ = "^" OR X$ = "N" THEN CALL RO: GOTO 1100

1160 IF X$ = "C" THEN HGR : GOTO 1100

1170 IF X$ > "0" AND X$ < "4" THEN RS = ( VAL (X$) - 1) * 40: POKE 777,RS: GOTO 1100

1180 IF X$ = "E" THEN POKE 49235,0: HTAB 1: VTAB 23: CALL 64668: PRINT "OLD SOAKTIME: "; PEEK (769) + ( PEEK (770) * 256);: INPUT " NEW: ";SO:S1 = INT (SO / 256): POKE 770,S1: POKE 769,SO - (S1 * 256): POKE 49234,0: GOTO 1100

1190 IF X$ = "H" THEN HI = SO: GOTO 1100

1200 IF X$ = "L" THEN LO = SO: GOTO 1100

1205 IF X$ = "D" THEN POKE 49235,0: HTAB 1: VTAB 23: CALL 64668: INPUT "SAVE PICTURE AS? ";F$: POKE 49234,0: IF F$ < > "" THEN PRINT D$;"BSAVE ";F$;",A$2000,L$2000"

1206 IF X$ = "G" THEN POKE 49235,0: HTAB 1: VTAB 23: CALL 64668: INPUT "SHOW WHICH PIC? ";F$: POKE 49234,0: IF F$ < > "" THEN PRINT D$;"BLOAD ";F$: GET X$

1210 IF X$ = "S" THEN POKE 49235,0: HTAB 1: VTAB 23: CALL 64668: INPUT "SAVE AS? ";F$: POKE 49234,0: IF F$ < > "" THEN GOTO 1240

1220 IF X$ = "R" THEN POKE 49235,0: HTAB 1: VTAB 23: CALL 64668: INPUT "RECALL & PRINT FILE: ";F$: POKE 49234,0: IF F$ < > "" THEN PRINT D$;"BLOAD ";F$: CALL HG

1223 IF X$ = " " THEN GET X$:I = FRE (0): GOTO 1100

1224 IF X$ = "B" THEN POKE 49235,0: HTAB 1: VTAB 23: CALL 64668: INPUT "LOW: ";LO: HTAB 1: VTAB 23: CALL 64668: INPUT "HIGH: ";HI: POKE 49234,0: GOTO 1100

1225 IF X$ = "Q" THEN CALL HD: HOME : TEXT : END

1230 IF X$ < > "P" GOTO 1100

1240 CALL CG:ST = (HI - LO) / 7

1245 X1 = SO

1250 FOR I = 0 TO 7

1260 SO = LO + (ST * I)

1270 S1 = INT (SO / 256): POKE 770,S1: POKE 769,SO - (S1 * 256)

1280 CALL BI

1290 CALL AG

1300 NEXT

1310 IF X$ = "P" THEN CALL HG

1312 IF X$ = "S" THEN PRINT D$;"BSAVE ";F$;",A$6000,L$2000"

1315 SO = X1

1317 S1 = INT (SO / 256): POKE 770,S1: POKE 769,SO - (S1 * 256)

1320 GOTO 1100

2000 REM ***INITIALIZATION***

2010 PRINT CHR$ (4);"BLOAD GREYASM"

2020 LET D$ = CHR$ (4)

2030 LET BE = 65338

2040 LET GE = 32768

2050 LET RO = GE + 3

2060 LET BI = GE + 6

2070 LET CG = GE + 9

2080 LET AG = GE + 12

2090 LET HG = GE + 15

2093 LET HS = GE + 18

2095 LET HD = GE + 21

2100 PRINT "SLOT? ";: GET SL: IF SL < 1 OR SL > 7 THEN CALL BE: GOTO 2100

2110 POKE 771,SL * 16

2130 POKE 777,RS: POKE 778,RM

2140 POKE 769,44: POKE 770,1:SO = 300

2145 PRINT

2150 PRINT "USING PRINTER(Y/N)? ";: GET X$

2160 IF X$ < > "Y" THEN HG = 65368:HS = HG:HD = HG

2220 CALL HS: REM HIRESPRINT INIT

2230 GOTO 1100

3000 REM ***EXPOSUREADJUST ROUTINE***

3010 IF ND < > D OR (RD AND U(D) > 2) THEN RD = 1:U(ND) = INT (U(D) / 2): GOTO 3030

3020 RD = 0:U(D) = U(D) * 2

3030 D = ND

3040 IF D = 2 AND (SO + U(2) > 8000) THEN U(2) = 8000 - SO: GOTO 3060

3050 IF D = 1 AND SO < U(1) THEN U(1) = SO

3060 IF D = 2 THEN SO = SO + U(2)

3070 IF D = 1 THEN SO = SO - U(1)

3080 IF U(D) < 1 THEN U(D) = 1

3090 IF SO < 1 THEN SO = 1

3100 IF SO > 8000 THEN SO = 8000

3110 S1 = INT (SO / 256): POKE 770,S1

3120 POKE 769,SO - (S1 * 256)

3130 RETURN

4000 REM ***VARIABLE DEFINITIONS ***

4010 REM *BE - BELL SUBROUTINE

4020 REM *GE - GETARRAY (MICRONEYE FRAMEGRABBER ROUTINE)

4030 REM *RO - ROLLUP SCREEN BY 1/3RD

4040 REM *BI - BITMAP (8BIT MODE) FRAMEGRABBER TO $4000

4050 REM *CG - CLEARGREY ZEROES OUT GREYSCALE TALLY TABLE IN $6000-$7FFF

4060 REM *AG - ADDGREY INCREMENTS TALLY TABLE FOR CORRESPONDING BITMAP BIT

4070 REM *HG - PRINT IMAGE ON EPSON BASED ON TALLY TABLE

4080 REM *HS - INITIALIZE EPSON FOR GRAPHICS

4090 REM *HD - RESET EPSON FOR TEXT

4100 REM ********************************

4110 REM *SL - SLOT NUMBER

4120 REM *LO - LOWEST EXPOSURE SETTING

4130 REM *HI - HIGHEST EXPOSURE SETTING

4140 REM *ST - STEPSIZE FOR EXPOSURE INCREMENT

4150 REM *X$ - KEY HIT ON KEYBOARD

4160 REM *SO - SOAKTIME (EXPOSURE TIME)

4170 REM ********************************

9000 REM *************************

9010 REM *PEEK AND POKE DEFINITIONS

9020 REM *************************

9040 REM * 769 -- SOAKTIME (LSB)

9050 REM * 770 -- SOAKTIME (MSB)

9060 REM * 771 -- MICRONEYE SLOT * 16

9070 REM * 772 -- 1 = KEY HIT DURING SCAN

9080 REM * 773 -- ASCII VALUE OF KEY HIT

9120 REM * 777 -- SCREEN SEGMENT SELECTOR

9130 REM * 0 = TOP THIRD OF SCREEN

9140 REM * 40 = MIDDLE THIRD OF SCREEN

9150 REM * 80 = BOTTOM THIRD OF SCREEN

9170 REM *****************************