Apple II Peeks, Pokes, and Calls

—————————————
Apple Peeks, Pokes, and Calls
—————————————

Thanks to: Jim Barrie of Aurora, CO

————–>> Pokes <<————–

POKE 32,X {$20} : SETS LEFT SIDE OF TEXT WINDOW. (0-39 NORMAL=0)

POKE 33,X {$21} : SETS WIDTH OF TEXT WINDOW (1-40 NORMAL=40)

POKE 34,X {$22} : SETS TOP OF TEXT WINDOW (0-23 NORMAL=0)

POKE 35,X {$23} : SETS BOTTOM OF TEXT WINDOW (0-23 NORMAL=23)

POKE 36,X {$24} : SETS CURSOR HORIZ. POSITION

POKE 37,X {$25} : SETS CURSOR VERT. POSITION

POKE 48,X {$30} : SETS COLOR FOR LORES GR

POKE 50,X {$32} : SETS MODE (63 FOR INVERSE, 127 FOR FLASH, 255 FOR NORMAL VIDEO MODE)

POKE 50,128 {$32} : TO MAKE LETTERS GOING TO VIDEO BLANKS

POKE 51,0 {$33} : DEFEAT ‘NOT DIRECT COMMAND’ SOMETIMES

POKE 72,0 {$39} : RESETS THE STATUS REGISTER

POKE 214,128 {$D6} : TURNS APPLESOFT INTO ‘RUN ONLY’ MODE. USED FOR PROTECTING SOME PROGRAMS

POKE 214,0 {$D6} : CANCELS THE APPLESOFT “RUN ONLY” MODE

POKE 216,0 {$D8} : RESETS THE APPLESSOFT ERROR FLAG. DISABLE “ONERR GOTO”

POKE 243,X {$F3} : WHERE X=1TO255 THIS POKE WILL USUALLY MAKE LISTINGS UN-READABLE, WITH THE EXCEPTIONS OF
X=64 OR 192. (X=63 IS ALL “?” IN LIST) TO FIX IT JUST POKE 243,0

POKE 1010,102:POKE 1011,213 : MAKES POKE 1012,112 {$3F2/3F3/3F4} RESET RUN

POKE1014,165 {$3F6} POKE1015,214 {$3F7} WILL MAKE & LIST

POKE 1014,10 {$3F6} POKE1015,165 {$3F7} WILL MAKE & CATALOG

POKE 43624,X {$AA68} : WHERE X=1 OR 2. WILL SET/CHANGE THE CURRENT DRIVE TO X. (SAME AS ADR -21912)

POKE 43626,X {$AA6A} : WHERE X=0 THRU 7. WILL SET/CHANGE THE CURRENT SLOT TO X. (SAME AS ADR -21910)

POKE 43698,X {$AAB2} : WHERE X=ASCII OF DOS CMND CHARACTER FOR EXAMPLE POKE 43698,64 WOULD MAKE @ THE DOS CMND CHAR NORMALLY IT IS A CTRL-D (SAME AS
ADR -21838)

POKE 44505,234 {$ADD9} : SHOWS UP DELETED FILES IN THE CATALOG

POKE 44506,234 {$ADDA} : NORMALIZE WITH 48 and 74 IN THE SAME LOCS (SAME AS -21031 & -21030)

POKE 47617,12 {$BA01} : SPEEDS DISK ACCESS (SAME AS ADR -17919)

POKE -21912,X {$AA68} : TO SELECT DISK DRIVE ON A 48K SYSTEM WITHOUT ACTUALLY EXECUTING A COMMAND

POKE -20940,96 {$AE34} : TO OMIT PAGE PAUSE FOR A CATALOG

POKE -16368,0 {$C010} : CLEAR KEYBOARD

POKE -16336,0 {$C030} : TOGGLE SPEAKER

POKE -16304,0 {$C050} : SETS COLOR GR MODE

POKE -16303,0 {$C051} : SETS TEXT MODE

POKE -16302,0 {$C052} : CLEARS MIXED GR MODE

POKE -16301,0 {$C053} : SETS MIXED GR MODE. (4 LINES OF TEXT)

POKE -16300,0 {$C054} : CLEAR PAGE 2

POKE -16299,0 {$C055} : SETS DISPLAY TO PAGE 2

POKE -16298,0 {$C056} : CLEAR HIRES GR MODE

POKE -16297,0 {$C057} : SETS HIRES GR MODE

POKE -16152,0 {$C0E8} : SLOT 6 MOTOR OFF

POKE -16151,0 {$C0E9} : TURNS ON SLOT 6,DISK MOTOR ONLY

POKE -16136,0 {$C0F8} : SLOT 7 MOTOR OFF

POKE -16135,0 {$C0F9} : TURNS ON SLOT 7,DISK MOTOR ONLY

————–>> Peeks <<————-

PEEK(74/$4A)+PEEK(75/$4B)*256 : CURRENT LOMEM

PEEK(76/$4C)+PEEK(77/$4D)*256 : CURRENT INTEGER HIMEM

RND(PEEK(78/$4E)+PEEK(79/$4F)*256) : PROVIDES ‘TRUE’ RANDOM NUMBER GENERATION IN APPLESOFT.

PEEK(115/$73)+PEEK(116/$74)*256 : CURRENT APPLESOFT HIMEM

PEEK(175/$AF)+PEEK(176/$B0)*256 : POINTER TO APPLESOFT PROG

PEEK(202/$CA)+PEEK(203/$CB)*256 : RETURNS MEMORY LOCATION OF 1ST LINE OF INTEGER PROGRAM

PEEK(218/$DA)+PEEK(219/$DB)*256 : APPLESOFT LINE NUMBER WHERE AN ERROR OCCURRED IF AN ONERR WAS TAKEN

PEEK(222/$DE) : RETURNS ERROR CODE WHICH IDENTIFYS THE ERROR WHICH CAUSED AN ONERR TO BE TAKEN

PEEK(36/$24) : READ CURSOR HORIZ. POSITION (VALUES 0-39)

PEEK(37/$25) : READ CURSOR VERT. POSITION (VALUES 0-23)

PEEK(-21902/$AA72)+PEEK(-21901/$AA73) *256 : TO FIND STARTING ADDRESS OF LAST BLOADED PROGRAM OR DATA

PEEK(43702/$AAB6) : RETURNS THE LANGUAGE THAT IS ACTIVE.(0=INT 64=FP 128=FP ON TAPE OR DISK) (SAME AS ADR
-21834)

PEEK(46064/$B3F0) : RETURNS THE NUMBER OF SECTORS ON DISK CURRENTLY BEING USED (16 = DOS 3.3 13 = DOS 3.2) (SAME AS ADR -19472)

PEEK(-18070/$B96A) : IF 150 IS RETURNED THEN YOU ARE USIGN DOS 3.3 THIS PEEK WORKS FOR BOTH APPLESOFT & INTEGER

PEEK(-16384/$C000) : READ KEYBOARD. IF VALUE IS >127 THEN A KEY WAS PRESSED. THIS PEEK SHOULD BE FOLLOWED BY A
POKE-16368,0

PEEK(-16352/$C020) : TOGGLES THE CASSETTE OUTPUT PORT

PEEK(-16336/$C030) : TOGGLE THE SPEAKER ONCE FOR EVERY TWO PEEKS

PEEK(-16287/$C061) : READ PDL(0) SWITCH. IF VALUE >127 = SWITCH ON

PEEK(-16286/$C062) : READ PDL(1) SWITCH. IF VALUE >127 = SWITCH ON

PEEK(-16285/$C063) : READ PDL(2) SWITCH. IF VALUE >127 = SWITCH ON

————–>> Calls <<————–

CALL 976 {$3D0} : RE-CONNECT DOS

CALL 1002 {$3EA} : TO RECONNECT DOS I/O HOOKS

CALL 54915 {$D683} : CLEANS STACK. DOES AWAY WITH ‘OUT OF MEMORY’ ERROR WHEN YOU REALLY HAVE MEMORY LEFT. (SAME AS ADR -10621)

CALL 62450 {$F3F2} : CLEAR CURRENT HIRES SCREEN TO BLACK. (SAME AS -3086)

CALL 62454 {$F3F6} : CLEAR CURRENT HIRES SCREEN TO THE HCOLOR LAST HPLOTTED MUST BE PRECEDED BY A HPLOT
(SAME AS -3082)

CALL -23186 {$A56E} : TO CATALOG DISK

CALL -9477 {$DAFB} : OUTPUT A CARRIAGE RETURN

CALL -8117 {$E04B} : LIST INTEGER BASIC

CALL -7036 {$E484} : DO APPLESOFT GARBACE COLLECTION ROUTINE

CALL -6090 {$E836} : RUN INTEGER BASIC

CALL -3727 {$F171} : TURN ON INT BASIC TRACE

CALL -3722 {$F176} : TURN OFF INT BASIC TRACE

CALL -3318 {$F317} : EXEC INT BASIC “CON” CMD

CALL -3305 {$F317} : RESUME FROM APPLESOFT ONERR

CALL -2458 {$F666} : ENTER MINI ASSEMBLER

CALL -1998 {$F832} : CLEARS LO-RES SCREEN TO BLACK

CALL -1994 {$F836} : CLEAR TOP 20 LINES TO @ IF IN TEXT MODE. IF IN LORES CLEARS SCREEN TO BLACK

CALL -1953 {$F85f} : INCREMENT LO-RES COLOR BY THREE

CALL -1370 {$FAA6} : RE-BOOTS DISK SYSTEM

CALL -1184 {$FB60} : CLEAR SCREEN (HOME) AND PRINT APPLE }{

CALL -1052 {$FBE4} : BEEP APPLE SPEAKER FOR 1/10 SECOND

CALL -1036 {$FBF4} : MOVE CURSOR FORWARD (RIGHT) ONE SPACE

CALL -1008 {$FC10} : MOVE CURSOR BACKWARD (LEFT) ONE SPACE

CALL -998 {$FC1A} : MOVE CURSOR UP ONE LINE

CALL -958 {$FC42} : CLEAR SCREEN FROM CURSOR TO LOWER RIGHT CORNER OF THE SCREEN

CALL -936 {$FC59} : CLEAR SCREEN (HOME)

CALL -926 {$FC62} : SEND CARRAIGE RETURN AND LINEFEED TO SCREEN

CALL -922 {$FC66} : MOVE CURSOR DOWN ONE LINE WITHOUT CHANGING HORIZONTAL POSITION

CALL -912 {$FC70} : MOVE ALL TEXT IN WINDOW UP ONE LINE

CALL -868 {$FC9C} : CLEAR CURSOR TO END OF LINE

CALL -856 {$FCA8} : TIME DELAY. POKE 69,XX TO SET AMOUNT OF DELAY

CALL -756 {$FD0C} : WAIT FOR KEY PRESS

CALL -384 {$FE80} : SET INVERSE VIDEO MODE

CALL -380 {$FE84} : SET NORMAL VIDEO MODE

CALL -321 {$FEBF} : DISPLAY THE A,X,Y,P AND S REGISTERS.

CALL -211 {$FF2D} : PRINT ERR MESSAGE AND BEEP SPEAKER

CALL -198 {$FF3A} : BEEP SPEAKER

CALL -167 {$FF59} : ENTER MONITOR, AND SET TEXT MODE. FUNCTIONS THE SAME AS RESET

CALL -155 {$FF65} : ENTER MONITOR WITH BELL

CALL -151 {$FF69} : ENTER MONITOR WITHOUT BELL

CALL -144 {$FF70} : SCAN AND EXECUTE CONTENTS OF KEYBOARD BUFFER AT $200. NOTE: IF USING APPLESOFT DO NOT USE THIS CALL WITHIN A GOSUB

—————————————

Leave a Reply

Your email address will not be published. Required fields are marked *