The Creative Apple
From the originals
13 scansMachine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.
These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.
PDF page 12
***APPLE-SKETCH***
PRINT "80 JUST 5 LOMEM : 16384 10 HOME : YTAB 10 : HTAS 7 : PRINT "*** APPLE-SKETCH ***" : .PRINT 20 HTAB 13: PRINT "B'I' OAYID MILLER" 30 Y TA8 19: HTAB 11 : PRINT "HIT AN'I' KEV TO BEGIN" 40 IF PEEK < - 16384) < = 127 THEN 40 50 POKE - 16368,0: GOSUB 1000 90 ONERR GOTO 4000 100 HOME : HGR : OLDCLR = 3 : HCOLOR• 3 : SCRNCLR = 0 : PNT = 1 :ER = 0 :SML • 1 : MED = 0 : LRG = 0 :DS = CHRS <4> 105 Y TAB 21 : GOSUB 650 110 IF PEEK ( - 16384) > 127 THEN GOSUB 300 120 X = PDL (1) * 1.21 + 2 : IF X > 277 THEN X = 277 130 Y = PDL C0> + 2 : IF Y > 157 THEN Y = 157 140 IF PNT THEN HPLOT X, Y: HCOLOR= SCNRCLR : HPLOT X. Y: HCOLOR= OLDCLR: GOTO 110 150 IF MED AND ER= 0 THEN HPLOT X,Y : HPLOT X - 1,Y - 1 TO X + 1,Y - 1 TO X + 1,Y + 1 TO X - 1,Y + 1 TO X - 1, Y - 1 : GOTO 110 160 IF LRG AND ER= 0 THEN HPLOT X,Y: HPLOT X - 1,y - 1 TO X + 1,y - 1 TO X + 1,Y + 1 TO X - 1,Y + 1 TO X - 1,Y - 1 : HPLOT X - 2,Y - 2 TO X + 2 ,y - 2 TO X + 2.'I' + 2 TO X - 2,Y + 2 TO X - 2,Y - 2 : GOTO 110 170 IF ER AND SCNRCLR = 0 THEN OLDCLR = 3 189 IF ER AND SCRNCLR < > 0 THEN OLDCLR = 0 190 IF ER THEN HCOLOR= OLDCLR : HPLOT X, Y: HPLOT X - 1. Y - 1 TO X + 1. Y - 1 TO X + 1,Y + 1 TO X - 1,Y + 1 TO X - 1,y - 1 : HCOLOR= SCRNCLR: HPLOT X,Y : HPLOT X - LY - 1 TO X + 1,y - 1TOX+1,Y +~TO X - 1,Y + 1 TO X - 1,Y - 1 : GOTO 110 200 HPLOT X,Y : GOTO 110 299 REM *** COMMAND SUBROUTINE 300 GET AS : POKE - 16368,0 305 IF AS= CHRS <23) THEN HCOLOR= SCRNCLR: HPLOT 0,0: CALL 62454: HCOLOR= OLDCLR : RETURN 310 IF AS= "W" THEN HOME : YTAB 21 : PRINT "COLOR=WHITE" : OLDCLR = 3: HCOLOR= 3 :PNT = 0 :ER = 0 : GOSUB 3000 : RETURN 315 IF AS= CHRS <2> THEN HOME : YTAB 21: PRINT "COLOR=BLUE" : OLDCLR • 6 : HCOLOR= 6 : PNT = 0 :ER = 0 : GOSUB 3000: R ETURN 320 IF AS= "G" THEN HOME : YTAB 21 : PRINT "COLOR=GREEN" : OLDCLR = 1: HCOLOR= 1 :PNT = 0 :ER = 0: GOSUB 3000 : RETURN 325 IF AS= "E" THEN HOME : YTAB 21 : PRINT "ERASE MODE" : PNT = 0:ER = 1 : RETURN 330 IF AS = "Y" THEN HOME : YTAB 21 : PRINT "COLOR=YIOLET" :OLDCLR = 2 : H COLOR= 2 :PNT = 0 : ER = 0: GOSUB 3000 : RETURN 335 IF AS= "0" THEN HOME : YTAB 21 : PRINT "COLOR=ORANOE" :OLDCLR = 5 : HCOLOR= 5 :PNT '= 0 : ER = 0: GOSUB 3000 : RE TURN 340 IF AS= "B" THEN HOME : YTAB 21 : PRINT "COLOR=BLACK" :OLDCLR = 0: HCOLOR= 0 :PNT = 0 : ER = 0 : GOSUB 3000 : RET URN 345 IF AS = CHRS <12) THEN HOME : YTAB 21 : GOSUB 600 : RETURN 350 IF AS = "S" THEN HOME : YTAB 21 : GOSUB 900 : RETURN 355 IF AS = "P" THEN HOME : Y TAB 21 : GOSUB 650 : RETURN 360 IF AS = CHRS (8) THEN OOSUB 1000 : OOSUB 650 : RETURN 365 fF AS = CRRS < 19) TRE1'I ROME . VTAB 21 : o-osog- 50~ . M:WRN 370 IF AS = "L" THEN GOSUB 2000 : RETURN 375 IF AS = "X" THEN GOSUB 800 380 IF AS = CHRS (5) THEN GOSUB 700 385 RETURN 500 REM *** SAYE PICTURE 510 PRINT "READY TO SAYE PICTURE "; : INVERSE : PRINT "RETURN"; : 140RMAL : PRINT " TO EXIT" : INPUT "PICTURE NAME ? "; PICTURES 515 IF PICTURES = "" THEN GOSUB 650 : RETURN 520 PRINT DS; "BSAYE "; PICTURES; ", AS2000, LS2000" 530 PRINT PICTURES;" SAYED. • : FOR I = 1 TO 3000: NEX T I : GOSUB 650 : RETURN 600 REM *** LOAD PICTURE 610 PRINT "READY TO LOAD PICTURE ";: INVERSE : PRINT "RETURN"; : llORMAL : PRINT" TO EXIT": INPUT "PICT URE NAME? "; PICTURES 615 IF PICTURES = "" THEN GOSUB 650 : RETURN 620 PRINT DS; "BLOAD ";PICTURES; ", AS2000" 630 PRINT PICTURES;" LOADED. " : FOR I =:!.TO 3000 : NEX T I : GOSUB 650 : RETURN 649 REM *** SET POINT MODE COLOR 650 IF SCNRCLR = 0 THEN OLDCLR = 3 : GOTO 660 655 OLDCLR = 0 660 HCOLOR= OLDCLR: PNT = 1 : HOME : YTAB 21 : PRINT "POINT MODE" : GOSUB 300 0 : RETURN 669 REM *** CTRL-E EXIT PROGRAM? 700 HOME : YTAB 21 : PRINT "REALLY EXIT THE PROGRAM CY/N) ? "; 705 GET AS 710 IF AS = "Y" THEN TEXT : HOME : GOTO 4100 720 IF AS = "N" THEN GOSUB 650: RETURN 730 GOTO 705 799 REM *** CHANGE BACKGROUND COLOR 800 HOME : YTAB 21 : PRINT "BLACK-0 GREEN-1 YIOLET-2 WHITE-3" : PRINT "ORANGE-5 BLUE-6 ";: INVERSE : PRINT "RETURN"; : NORMAL : PRINT " TO EXIT" 810 PRINT "NEW BACKGROUND COLOR # "; 815 GET ZS : IF ZS = CHRS <13) THEN 840 820 IF RSC CZS> < 48 OR RSC <ZS ) > 54 OR ZS = "4" THEN 815 830 SCRNCLR = VAL <ZS> : HCOLOR= SCRNCLR: HPLOT 0,0: CALL 62454 : HCOLOR= 0 LDCLR pen size and goes to subroutine 650, which handles point mode and pen size display. An incorrect response causes line 905 to get another character. Lines 1000-1210 display the command page. Line 1000 puts the screen back into the text mode and clears it; after the commands are printed, line 1200 waits for a key to be pressed. Then 1210 clears the keyboard strobe and uses POKE- 16304,0 to restore the high resolution graphics screen without clearing it to black (which is what another HGR command would do). Lines 2000-2470 handle the line draw- ing, displaying the X and Y coordinates for each point and HPLOTing the lines. Lines 2060 and 2070 read the paddles for point #.1, and 2190 and 2200 read them for point #2. Lines 3000-3030 check for the current pen size and display it beneath the lower right of the graphics screen. Finally, lines 4000-4070 handle any DOS errors that might occur when load- ing or saving picutres. Line 4010 sets A to the Apple error code for the trapped It takes a lot of practice to draw easily with the paddles. error, which is stored in decimal location 222; it also sets B equal to the line that the error occurred on. Then it clears the text screen and tabs down to the top of the text window, ready to print a message based on the error. The lines after handle: 1. Attempts to load a picture not on disk (DOS "file not found" error). 2. Attempts to save on a write protected disk, such as the DOS master or one with a write protect tab covered. 3. An 1/0 error, usually encountered when the disk drive door is left open. 4. Attemts to save on a filled disk, or with too little space left to hold the picture. 5. Attempts to save under a file name on disk that is locked. 6. The use of an illegal file name, usually beginning with a number or a control character. 7. Attempts to load a Basic or text file as a picture (believe me, that just won't work!) 8. Control-C: returns the text mode and ends. As far as I can see, those are the only errors that would normally occur when running the program; all other input is handled by GET and thrown out if inappropriate. If all else fails, line 4060 tells you what error occurred and where before stopping the program. Before 13
Reading notes: OCR fragments and misread characters throughout the BASIC listing, such as 'YTAB' for VTAB and 'OLDCLR = 3' variants Line 365 and several other program lines are heavily garbled and of uncertain reading Reading order of the trailing explanatory prose and listing fragments is uncertain
- Printed product names
- APPLE-SKETCH
- Languages
- English · BASIC