** initial program ** # make room for the program below hi-res page 1 # note this allows the program to live slightly on the text page ($708), which is why you see a flash of garbage as the program starts 0 LOMEM:1800 # this moves the program so it sits just below $2000 # the total program is 6190 bytes, so it will start at 2002 ($7D2) 1 HIMEM:8192 # this sets the Integer BASIC program start pointer to $1BA5, which is the actual start : POKE 202,165: POKE 203,27 # set LOMEM to $1800, clear variables, start actual program :LOMEM:6144:CLR : GOTO 0 # everything from here on appears to be garbage (it's the assembly-language routines) 8264 ,RUN LOMEM:**, IF , ^ ,RUN , ABS **, IF , ^ ,RUN ABS *-, IF ^ ;RUN ^ ,RUN *>=,=_ /*#2112HIMEM: IF [...more garbage...] ** actual main program ** 0 REM *** APPLE-VISION *** WRITTEN BY R.J. BISHOP # scrolling text source 20 DIM A$(51) 30 A$=" BOB BISHOP PRESENTS ... APPLE-VISION! " # clear screen, print intro message 40 CALL -936 50 VTAB 10: TAB 10: PRINT "*** APPLE-VISION ***" 55 VTAB 20: TAB 3: PRINT "COPYRIGHT 1978 APPLE COMPUTER, INC." # delay, clear screen 60 FOR K=1 TO 2500: NEXT K 70 CALL -936 # clear hi-res screen, enable hi-res display 80 CALL 2217: POKE -16297,0: POKE -16302,0: POKE -16304,0 # slowly draw lines, then add some text 90 GOSUB 460: GOSUB 370 # pause 100 FOR K=1 TO 1000: NEXT K # scroll the message in A$ on the screen, pausing after each char 110 FOR K=1 TO 45 120 VTAB 13: TAB 12 # this is essentially MID$(A$,K,K+6) 130 PRINT A$(K,K+6) 140 FOR J=1 TO 75: NEXT J 150 NEXT K # pause 160 FOR K=1 TO 1000: NEXT K # do animated sequence 170 CALL 2893 # short delay, then print we're done 180 FOR K=1 TO 500: NEXT K 190 VTAB 13: TAB 13: PRINT "THE" 200 TAB 15: PRINT "END" # delay, erase text, delay 210 FOR K=1 TO 1500: NEXT K 220 VTAB 13: TAB 13: PRINT " " 230 TAB 15: PRINT " " 240 FOR K=1 TO 4000: NEXT K # randomize dancer 250 GOSUB 540 # repeat, starting from the scrolling text 260 GOTO 110 270 END ### draw a vertical, horizontal, or diagonal line from A,B to C,D 280 DX=C-A:DY=D-B 290 DELTA= ABS (DX): IF ABS (DY)> ABS (DX) THEN DELTA= ABS (DY) 300 X=A:Y=B:INCX= SGN (DX):INCY= SGN (DY) 310 FOR L=1 TO DELTA+1 # plot a point at X,Y 320 POKE 16,X: POKE 17,Y 330 POKE 18,0: CALL 2048 340 POKE 18,1: CALL 2048 350 X=X+INCX:Y=Y+INCY 360 NEXT L: RETURN ### draw background text # configure character output to go to the HRCG at $B00 (2816) 370 POKE 54,0: POKE 55,11 # wall sign 380 VTAB 4 390 TAB 25: PRINT "HOME" 400 TAB 27: PRINT "SWEET" 410 TAB 30: PRINT "HOME" # TV controls 420 VTAB 11: TAB 21: PRINT "OO" 430 VTAB 15: TAB 21: PRINT "''" 440 VTAB 16: TAB 21: PRINT ".." 450 RETURN ### draw all lines ### # line definitions live from from $C00-CA3, as X0,Y0,X1,Y1 460 FOR LOC=3072 TO 3236 STEP 4 470 A= PEEK (LOC) 480 B= PEEK (LOC+1) 490 C= PEEK (LOC+2) 500 D= PEEK (LOC+3) # draw single line 510 GOSUB 280 520 NEXT LOC 530 RETURN ### randomize animation frames ### # start at $D03 (but get the animation frame from $D00?) 540 LOC=3331:ST= PEEK (LOC-3) # if the animation frame is 1 (blank), we've reached the end 550 IF PEEK (LOC)=1 THEN RETURN 560 TRY= RND (7) # ST is the animation frame number (1-8) # 2255 is $8CF, so this peeks a value at $8C8-8FF (all values there are 0 or 1) # if the value is zero we retry # the effect is to limit which frames can replace which other frames 570 IF PEEK (7*ST-14+TRY+2255)=0 THEN 560 # convert random 0-6 to 2-8, store it 580 ST=TRY+2: POKE LOC,ST # on to the next one (3 bytes each) 590 LOC=LOC+3: GOTO 550