💾 Archived View for gemini.spam.works › mirrors › textfiles › apple › peeks.pokes.3.1 captured on 2022-04-28 at 19:14:05.
⬅️ Previous capture (2020-10-31)
-=-=-=-=-=-=-
+=========================================================================+ !VER:2.1 (^)+=- PEEKS, POKES & CALLS -=+(^) (c) May. 1984! +=========================================================================+ !Writen by: \ for the APPLE ][+ & ][e W/DOS 3.3 & 48k! ! -===THE=ENFORCER]>>>)} ! ! / The World of Cryton: [414] 246-3965 ! +-------------------------------------------------------------------------+ SCROLLING WINDOW POKE 32,L......Sets LEFT SIDE of the Scrolling Window {L=0 to 39} POKE 33,W......Sets WIDTH of the Scrolling Window {W=0 to 40-L} POKE 34,T......Sets TOP of the Scrolling Window {T=0 to 23} POKE 35,B......Sets BOTTOM of the Scrolling Window {B=0 to 23;B>T} TEXT & CURSOR POSITION POKE 36,CH.....Sets HORIZONTAL cursor position +1 {CH=0 to 39} POKE 37,CV.....Sets VERTICAL cursor position +1 {CV=0 to 23} CALL -1036.....MONITOR S/R to MOVE CURSOR RIGHT CALL -1008.....MONITOR S/R to MOVE CURSOR LEFT CALL -998......MONITOR S/R to MOVE CURSOR UP CALL -990......MONITOR S/R PERFORM a VERTICAL TAB to ROW in ACCUMULATOR CALL -980......MONITOR S/R PREFORM ESCAPE FUNCTION CALL -958......CLEAR from CURSOR to END of PAGE {ESC-F} CALL -936......MONITOR S/R HOME & CLEAR SCREEN {Destroys ACCUMULATOR & Y-REG} CALL -926......MONITOR S/R PERFORM a CARRIAGE RETURN CALL -922......MONITOR S/R PERFORM a LINE FEED CALL -912......MONITOR S/R SCOLL UP 1 LINE {Destroys ACCUMULATOR & Y-REG} CALL -868......MONITOR S/R CLEAR to END of LINE CALL -868......CLEAR from CURSOR to END of LINE {ESC-E} CALL -384......set INVERSE mode CALL -380......set NORMAL mode CHARACTER DISPLAY POKE 50,255....White on Black {Normal} POKE 50,63.....Black on White {Inverse} POKE 50,127....Blinking {Flash} SCREEN FORMAT GRAPHICS POKE -16304,0..Set Graphics display mode POKE -16303,0..Set TEXT display mode PEEK(-16358)...READ TEXT switch {If > 127 then it is "ON"} POKE -16302,0..Set FULL-SCREEN Graphics display mode POKE -16301,0..Set MIXED-SCREEN Graphics display mode PEEK(-16357)...READ MIXED switch {If > 127 then it is "ON"} POKE -16300,0..Turn page 2 HI-RES off {set page 1} POKE -16299,0..Set display to HI-RES Graphics page 2 PEEK(-16356)...READ PAGE2 switch {If > 127 then it is "ON"} POKE -16298,0..Turn HI-RES display mode off POKE -16297,0..Set HI-RES Graphics display mode PEEK(-16355)...READ HI-RES switch {If > 127 then it is "ON"} CALL 62450.....CLEAR current HI-RES screen to BLACK CALL 62454.....CLEAR current HI-RES screen to HCOLOR of last dot ploted KEYBOARD PEEK (-16384)..READ keyboard. If > 127 then a key was pressed. Always clear keyboard strobe before reading it. POKE -16368,0..CLEARS the keyboard STROBE. CALL -657......GET a LINE of input with NO PROMPT or LINE FEED, and wait. CALL -662......GET a LINE of input with PROMPT, NO LINE FEED, and wait. CALL -665......GET a LINE of input with PROMPT, LINE FEED, and wait. *NOTE: INPUT CHARACTERS are found in the INPUT BUFFER {Loc 512-767 $200-$2FF} CALL -756......WAIT for KEY PRESS. SOUND X=PEEK(-16336).TOGGLES the SPEAKER {1 click} POKE -16336,0..TOGGLES the SPEAKER {1 click (longer then PEEK)} CASSETE X=PEEK(-16352).TOGGLES CASSETTE OUTPUT once {1 click on cassette recording). CALL -310......WRITE to TAPE CALL -259......READ from TAPE GAME PADDLES PEEK(-16287)...READ PDL(0) push BUTTON switch {If > 127 then switch is "ON"} PEEK(-16286)...READ PDL(1) push BUTTON switch {If > 127 then switch is "ON"} PEEK(-16285)...READ PDL(2) BUTTON (SHIFT KEY) {If > 127 then switch is "ON"} POKE -16296,1..CLEAR GAME I/O AN-0 OUTPUT {OFF-3.5V HIGH} POKE -16295,0..SET GAME I/O AN-0 OUTPUT {ON-.3V LOW} POKE -16294,1..CLEAR GAME I/O AN-1 OUTPUT {OFF-3.5V HIGH} POKE -16293,0..SET GAME I/O AN-1 OUTPUT {ON-.3V LOW} POKE -16292,1..CLEAR GAME I/O AN-2 OUTPUT {OFF-3.5V HIGH} POKE -16291,0..SET GAME I/O AN-2 OUTPUT {ON-.3V LOW} POKE -16290,1..CLEAR GAME I/O AN-3 OUTPUT {OFF-3.5V HIGH} POKE -16289,0..SET GAME I/O AN-3 OUTPUT {ON-.3V LOW} CALL -1250.....MONITOR S/R to READ PADDLE - X-Reg contains PDL # (0-3). LO-RES GRAPHICS CALL -2048.....PLOT a POINT {AC:Y-COORD Y:X-COORD} CALL -2023.....DRAW a HORIZONTAL LINE. CALL -2008.....DRAW a VERTICAL LINE. CALL -1998.....CLEAR LO-RES SCREEN 1 and set GRAPHICS mode. CALL -1994.....CLEAR top 20 lines of LOW-RES Graphics CALL -1977.....CALCULATE Graphics base ADDRESS. CALL -1953.....INCREMENT COLOR by 2 CALL -1948.....ADJUST COLOR BYTE for both havles EQUAL. CALL -1935.....MONITOR S/R to get SCREEN COLOR {AC:Y-COORD Y:X-COORD} COLORS 0= Black 4= Dark Green 8= Brown 12= Green 1= Magenta 5= Grey 9= Orange 13= Yellow 2= Dark Blue 6= Medium Blue 10= Grey 14= Aqua 3= Light Purple 7= Light Blue 11= Pink 15= White HI-RES GRAPHICS POKE 800,H.....Set HORIZONTAL COORDINATE. H=MODULUS 256 POKE 801,H/256.H= 0 (left) to 279 (right) * Note: Both POKE 800 & 801 are required. POKE 802,V.....Sets VERTICAL COORDINATE. {V= 0 (top) to 159 (bottom)} POKE 804,S.....STARTING ADDRESS of SHAPE TABLE. S=MODULUS 256 POKE 805,S/256.Both 804 & 805 are required. POKE 28,C......COLOR of SHAPE POKE 812,x.....Sets COLOR for HI-RES CALL -3805 PG..DRAWS predefind SHAPE. CALL -3761.....PLOTS a POINT on the screen CALL -3086.....Clear HI-RES screen to Black CALL -3082.....Clear HI-RES screen to recent HCOLOR CALL -2613.....HI-RES coordinates to ZERO page. CALL -1438.....Pseudo-Reset CALL -11780 M.."FIND" or POSITION CALL -11272 S.."FIND" or BACKGROUND (HCOLOR 1 set for black background) CALL -11471....HI-RES Graphics BACKGROUND (PAMAM=COLOR) CALL -11462....HI-RES DRAW1(X0;Y0;COLOR) CALL -11335....HI-RES SHLOAD POKE 249,R.....Sets ROTATION of SHAPE {R=1 to 64; 0=Normal; 16=90' Clockwize} PEEK (243).....FLASH MASK PEEK (241).....SPEED (256 - current speed) PEEK (234).....COLLISION COUNTER for shapes PEEK (232-233).SHAPE TABLE starting address POKE 231,S.....Sets SCALE of SHAPE PEEK (230).....HI-RES PLOTING page. (32=Page 1, 64=Page 2, 96=Page 3) PEEK (224-226).HI-RES GR X&Y Cordinates POKE 228,x.....HI-RES GR COLOR BYTE (x can be 0-255) HI-RES COLORS 0= Black1 {Gr/Vl} 1= Green 2= Violet 3= White1 {Gr/Vl} 4= Black2 {Or/Bl} 5= Orange 6= Blue 7= White2 {Or/Bl} OTHER USEFULL CALLS {Add +65536 to get pos. POKE's} CALL 54915.....CLEARS STACK. Does away with the false "OUT OF MEMORY" error. CALL 1002......Reconnect DOS CALL -8192.....RESET INTERGER BASIC. KILLS VARIABLES and CLEARS CALL -8117.....LIST INTERGER PROGRAM CALL -6739.....NEW CALL -6729.....PLOTS a POINT on the screen CALL -6090.....RUN INTERGER PROGRAM {SAVES VARIABLES} CALL -4116.....RUN INTERGER PROGRAM {KILLS VARIABLES} CALL -3973.....LOAD INTERGER PROGRAM from TAPE CALL -3776.....SAVE INTERGER PROGRAM to TAPE CALL -3774.....SAVE CALL -3318.....CONTINUE CALL -2458.....TURN ON MINI-ASSEMBLER CALL -2423.....SWEET-16 INTERPRETER entry CALL -1906.....MONITOR S/R DISASSEMBLER entry CALL -1728.....MONITOR S/R-PRINT contents of X & Y {REG 9 as 4 HEX digits} CALL -1716.....MONITOR S/R PRINT X BLANKS {X REG contains # to PRINT} CALL -1402.....MONITOR S/R-IRQ HANDLER CALL -1390.....MONITOR S/R-BREAK HANDLER CALL -1370.....RE-BOOTS DISK SYSTEM CALL -1321.....MONITOR S/R to display USER REGISTERS CALL -1233.....MONITOR S/R SREEN INIT CALL -1223.....MONITOR S/R set SCREEN to TEXT mode {Destroys ACCUMULATER} CALL -1216.....MONITOR S/R set GRAPHICS mode {GR} {Destroys ACCUMULATER} CALL CALL -1205.....MONITOR S/R set NORMAL WINDOW CALL -1184.....Prints the 'Apple ][' at the top of your screen. CALL -1181.....MONITOR S/R MULTIPLY ROUTINE CALL -1148.....MONITOR S/R DIVIDE ROUTINE CALL -1087.....MONITOR S/R CALCULATE TEXT BASE ADDRESS CALL -1052.....MONITOR S/R SOUND BELL CALL -1027.....MONITOR S/R OUTPUT A-REG as ASCII on TEXT SCREEN 1 CALL -856......MONITOR S/R WAIT LOOP CALL -756......GET KEY from KEYBOARD {Destroys A & Y-REG} WAIT for KEY PRESS. CALL -741......MONITOR S/R KEYIN ROUTINE CALL -715......READ KEY & PERFORM ESCAPE FUNCTION if necessary. CALL -678......Wait for RETURN CALL -676......Bell; Wait or RETURN CALL -670......PREFORM LINE CANCEL CALL -665......PREFORM CARRIAGE RETURN & GET LINE of TEXT. CALL -662......GET LINE of TEXT from KEYBOARD {X RETND with # of CHARACTERS} CALL -657......INPUT; Accepts commas & collons. EX:PRINT "NAME (LAST, FIRST):";:CALL-657:A$="":FOR X= 512 TO 767 IF PEEK (X) < > 141 THEN A$= A$ + CHR$ (PEEK (X) -128) : NEXT CALL -626......PRINT CARRIAGE RETURN {Destroys ACCUMULATOR & Y-REG} CALL -622......PRINT A1H,A1L. Example: 10 POKE 60,A1H 20 POKE 61,A1L 30END ...Then RUN, CALL -622 CALL -550......PRINT CONTENTS of ACCUMULATOR. As 2 HEX DIGETS. CALL -541......PRINT a HEX digit CALL -531......OUTPUT CHARACTER IN ACCUMULATOR. {Destroys A & Y-REG COUNT} CALL -528......GET MONITOR CHARACTER OUTPUT CALL -468......PERFORM MEMORY MOVE A1-A2 TO A4. Example: 10 POKE 60,LOB 20 POKE 61,HOB 30 POKE 62,LOE 40 POKE 63,HIE 50 POKE 66,LOD 60 POKE 67,HID ...Then RUN, CALL -468