Search Posts:

Bigger Apple II PEEK, POKE and CALL List

SHARE

Return to Threads

  Bigger Apple II PEEK, POKE and CALL List by Bill Degnan - 02/23/2022 09:32
For my own reference and maybe yours...
https://apple2.org.za/gs.../EDHEL/texts/pokes.html
AND
Elsewhere
--------------------------------------------------------
APPLE CALL, PEEK, POKE LIST CALL 144 SCAN THE INPUT BUFFER CALL 151 ENTER THE MONITOR NORM

APPLE CALL, PEEK, POKE LIST

------------------------------------------------------------------------------
CALL -144 SCAN THE INPUT BUFFER
CALL -151 ENTER THE MONITOR NORMALLY
CALL -155 ENTER THE MONITOR & SOUND BELL
CALL -167 ENTER MONITOR AND RESET
CALL -198 RING BELL (SIMULATE CONTROL G)
CALL -211 PRINT "ERR" AND RING BELL
CALL -259 READ FROM TAPE
CALL -310 WRITE TO TAPE
CALL -321 DISPLAYS A, S, Y, P, & S REGISTERS
CALL -380 SET NORMAL VIDEO MODE
CALL -384 SET INVERSE VIDEO MODE
CALL -415 DISASSEMBLE 20 INSTRUCTIONS
CALL -458 VERIFY (COMPARE & LIST DIFFERENCES)

CALL -468 MEMORY MOVE AFTER POKING 60,61 OLD START - 62,63 OLD END
64,65 NEW END - 66,67 NEW STAR

CALL -484 MOVE
CALL -517 DISPLAY CHARACTER & UPDATE SCREEN LOCATION
CALL -531 DISPLAY CHARACTER, MASK CONTROL CHAR., & SAVE 7 REG. & ACCU
CALL -550 DISPLAY HEX VALUE OF A-REGISTER (ACCUMULATOR)
CALL -656 RING BELL AND WAIT FOR A CARRIAGE RETURN

CALL -657 GET LINE OF INPUT, NO PROMPT, NO L/F, & WAIT(COMMA,COLON OK
CALL -662 GET LINE OF INPUT, WITH PROMPT, NO L/F, & WAIT
CALL -665 GET LINE OF INPUT, WITH PROMPT, LINE FEED, & WAIT
THE ABOVE 3 CALLS (-657, -662, -665) REFER TO THE INPUT BUFFER FROM 512-767

CALL -715 GET CHARACTER
CALL -756 WAIT FOR KEY PRESS
CALL -856 TIME DELAY (POKE 69,XX TO SET TIME OF DELAY)
CALL -868 CLEARS CURSOR LINE FROM CURSOR TO END OF LINE
CALL -912 SCROLLS TEXT UP 1 LINE
CALL -922 LINE FEED
CALL -936 CLEAR SCREEN (HOME)
CALL -958 CLEAR SCREEN FROM CURSOR TO BOTTOM OF SCREEN
CALL -998 MOVES CURSOR UP 1 LINE
CALL -1008 MOVES CURSOR BACKWARD 1 SPACE
CALL -1024 DISPLAY CHARACTER ONLY
CALL -1036 MOVES CURSOR FORWARD 1 SPACE
CALL -1063 SEND BELL TO CURRENT OUTPUT DEVICE
CALL -1216 TEXT & GRAPHICS MODE
CALL -1233 MOVE CURSOR TO BOTTOM OF SCREEN
CALL -1321 CONTROL E
CALL -1717 MOVES CURSOR DOWN 5 LINES
CALL -1840 DISASSEMBLE 1 INSTRUCTION
CALL -1953 CHANGE COLOR BY +3
CALL -1994 CLEAR LO-RES SCREEN (TOP 40 LINES)
CALL -1998 CLEAR GRAPHIC SCREEN (LO-RES)
CALL -2007 VERTICAL LINE
CALL -2023 HORIZONTAL LINE
CALL -2458 ENTER MINI ASSEMBLER
CALL -3100 TURNS ON HIRES PAGE 1, WITHOUT CLEARING IT
CALL -3776 SAVE INTEGER
CALL -3973 LOAD INTEGER
CALL -6090 RUN INTEGER
CALL -8117 LIST INTEGER
CALL -8189 ENTER BASIC & CONTINUE
CALL -8192 ENTER BASIC AND RESET (INTEGER BASIC KILL)
CALL -16303 TEXT MODE
CALL -16304 GRAPHICS MODE
CALL -16336 TOGGLE SPEAKER
CALL 42350 CATALOGS DISK
CALL 54915 CLEANS STACK, CLEARS THE "OUT OF MEMORY" ERROR
CALL 64166 INITIATES A COLD START (BOOT OF THE DISK)
CALL 64246 BRAND NEW-YOU FIGURE IT OUT

CALL 64367 SCANS MEMORY LOC 1010 & 1011 & POKES VALUE INTO LOCATIONS
1012 THAT IS EQUAL TO (PEEK(1011)-165)

------------------------------------------------------------------------------
PEEK 33 WIDTH OF TEXT WINDOW (1-40)
PEEK 34 TOP EDGE OF TEXT WINDOW (0-22)
PEEK 35 BOTTOM OF TEXT WINDOW (1-24)
PEEK 36 HORIZONTAL CURSOR POSITION (0-39)
PEEK 37 VERTICAL CURSOR POSITION (0-23)
PEEK 43 BOOT SLOT X 16 (AFTER BOOT)
PEEK 44 END POINT OF LAST HLIN, VLIN, OR PLOT
PEEK 48 LO-RES COLOR VALUE X 17

PEEK 50 TEXT OUTPUT FORMAT: 63=INVERSE 255=NORMAL
127=FLASH ( WITH PEEK 243 SET TO 64)

PEEK 51 PROMPT CHARACTER
PEEK 74,75 LOMEM ADDRESS (INT)
PEEK 76,77 HIMEM ADDRESS (INT)
PEEK 103,104 FP PROGRAM STARTING ADDRESS
PEEK 104 IF 8 IS RETURNED, THEN FP IS IN ROM
PEEK 105,106 FP VARIABLE SPACE STARTING ADDRESS
PEEK 107,108 FP ARRAY STARTING ADDRESS
PEEK 109,110 FP END OF NUMERIC STORAGE ADDRESS
PEEK 111,112 FP STRING STORAGE STARTING ADDRESS
PEEK 115,116 FP HIMEM ADDRESS
PEEK 117,118 FP LINE NUMBER BEING EXECUTED
PEEK 119,120 FP LINE WHERE PROGRAM STOPPED
PEEK 121,122 FP LINE BEING EXECUTED ADDRESS
PEEK 123,124 LINE WHERE DATA BEING READ
PEEK 125,126 DATA LOCATION ADDRESS
PEEK 127,128 INPUT OR DATA ADDRESS
PEEK 129,130 FP LAST USED VARIABLE NAME
PEEK 131,132 FP LAST USED VARIABLE ADDRESS
PEEK 175,176 FP END OF PROGRAM ADDRESS
PEEK 202,203 INT PROGRAM STARTING ADDRESS
PEEK 204,205 INT END OF VARIABLE STORAGE
PEEK 214 FP RUN FLAG (AUTO-RUN IF >127)
PEEK 216 ONERR FLAG (>127 IF ONERR IS ACTIVE)
PEEK 218,219 LINE WHERE ONERR OCCURED
PEEK 222 ONERR ERROR CODE
PEEK 224,225 X-COORDINATE OF LAST HPLOT
PEEK 226 Y-COORDINATE OF LAST HPLOT
PEEK 228 HCOLOR VALUE 0=0 85=2 128=4 213=6
42=1 127=3 170=5 255=7
PEEK 230 HI-RES PLOTING PAGE (32=PAGE 1 64=PAGE 2 96=PAGE 3)
PEEK 231 SCALE VALUE
PEEK 232,233 SHAPE TABLE STARTING ADDRESS
PEEK 234 HI-RES COLLISION COUNTER
PEEK 241 256 MINUS SPEED VALUE
PEEK 243 FLASH MASK (64=FLASH WHEN PEEK 50 SET TO 127)
PEEK 249 ROT VLAUE
PEEK 976-978 DOS RE-ENTRY VECTOR
PEEK 1010-1012 RESET VECTOR
PEEK 1013-1015 AMPERSAND (&) VECTOR
PEEK 1016-1018 CONTROL-Y VECTOR
PEEK 43140-43271 DOS COMMAND TABLE
PEEK 43378-43582 DOS ERROR MESSAGE TABLE
PEEK 43607 MAXFILES VALUE
PEEK 43616,46617 LENGTH OF LAST BLOAD
PEEK 43624 DRIVE NUMBER
PEEK 43626 SLOT NUMBER
PEEK 43634,43635 STARTING ADDRESS OF LAST BLOAD
PEEK 43697 MAXFILES DEFAULT VALUE
PEEK 43698 DOS COMMAND CHARACTER
PEEK 43702 BASIC FLAG (0=INT 64=FP ROM 128=FP RAM)
PEEK 44033 CATALOG TRACK NUMBER (17 IS STANDARD)
PEEK 44567 NUMBER OF CHARACTERS MINUS 1 IN CATALOG FILE NAMES
PEEK 44611 NUMBER OF DIGITS MINUS 1 IN SECTOR AND VOLUME NUMBERS
PEEK 45991-45998 FILE-TYPE CODE TABLE
PEEK 45999-46010 DISK VOLUME HEADING
PEEK 46017 DISK VOLUME NUMBER
PEEK 46064 NUMBER OF SECTORS (13=DOS 3.2 16=DOS 3.3)
PEEK 49152 READ KEYBOARD (IF >127 THEN KEY HAS BEEN PRESSED
PEEK 49200 TOGGLE SPEAKER (CLICK)
PEEK 49248 CASSETTE INPUT (>127=BINARY 1, 127 IF BUTTON PRESSED)
PEEK 49250 PADDLE 1 BUTTON (>127 IF BUTTON PRESSGD)
PEEK 49251 PADDLE 2 BUTTON (>127 IF BUTTON PRESSED)
PEEK 49252 READ GAME PADDLE 0 (0-255)
PEEK 49253 READ GAME PADDLE 1 (0-255)
PEEK 49254 READ GAME PADDLE 2 (0-255)
PEEK 49255 READ GAME PADDLE 3 (0-255)
PEEK 49408 READ SLOT 1
PEEK 49664 READ SLOT 2
PEEK 49920 READ SLOT 3
PEEK 50176 READ SLOT 4
PEEK 50432 READ SLOT 5
PEEK 50688 READ SLOT 6 (162=DISK CONROLLOR CARD)
PEEK 50944 READ SLOT 7

PEEK 64899 INDICATES WHICH COMPUTER YOU'RE USING
223=APPLE II OR II+, 234=FRANKLIN ACE OR ?, 255=APPLE IIE

POKE 33,33 SCRUNCH LISTING AND REMOVE SPACES IN QUOTE STATEMENTS
POKE 36,X USE AS PRINTER TAB (X=TAB - 1)
POKE 50,128 MAKES ALL OUTPUT TO THE SCREEN INVISIBLE
POKE 50,RANDOM SCRAMBLES OUTPUT TO SCREEN
POKE 51,0 DEFEATS "NOT DIRECT COMMAND", SOMETIMES DOESN'T WORK
POKE 82,128 MAKE CASETTE PROGRAM AUTO-RUN WHEN LOADED
POKE 214,255 SETS RUN FLAG IN FP & ANY KEY STROKES WILL RUN DISK PROGRA
POKE 216,0 CANCEL ONERR FLAG

POKE 1010,3 SETS THE RESET VECTOR TO INITIATE
POKE 1011,150 A COLD START (BOOT)

POKE 1010,102 MAKE
POKE 1011,213 RESET
POKE 1012,112 RUN

POKE 1014,165 SETS THE AMPERSAND (&) VECTOR
POKE 1015,214 TO LIST YOUR PROGRAM

POKE 1014,110 SETS THE AMPERSAND (&) VECTOR
POKE 1015,165 TO CATALOG A DISK

POKE 1912+SLOT,1 ON APPLE PARALLEL CARD (WITH P1-02 PROM) WILL ENABLE L/F'S
POKE 1912+SLOT,0 ON APPLE PARALLEL CARD (WITH P1-02 PROM) WILL ENABLE L/F'S

POKE 2049,1 THIS WILL CAUSE THE FIRST LINE OF PROGRAM TO LIST REPEATEDLY
POKE 40514,20 ALLOWS TEXT FILE GREETING PROGRAM
POKE 40514,52 ALLOWS BINARY FILE GREETING PROGRAM

POKE 40993,24 THIS ALLOWS
POKE 40994,234 DISK COMMANDS IN
POKE 40995,234 THE DIRECT MODE

POKE 42319,96 DISABLES THE INIT COMMAND

POKE 42768,234 CANCEL ALL
POKE 42769,234 DOS ERROR
POKE 42770,234 MESSAGES
POKE 43624,X SELECTS DISK DRIVE WITHOUT EXECUTING A COMMAND (48K SYSTEM)

POKE 43699,0 TURNS AN EXEC FILE OFF BUT LEAVES IT OPEN UNTIL A FP, CLOSE
POKE 43699,1 TURNS AN EXEC FILE BACK ON. INIT, OR MAXFILES IS ISSUE

POKE 44452,24 ALLOWS 20 FILE NAMES (2 EXTRA)
POKE 44605,23 BEFORE CATALOG PAUSE

POKE 44505,234 REVEALS DELETED FILE
POKE 44506,234 NAMES IN CATALG

POKE 44513,67 CATALOG WILL RETURN ONLY LOCKED FILES
POKE 44513,2 RETURN CATALOG TO NORMAL
POKE 44578,234 CANCEL CARRIAGE
POKE 44579,234 RETURNS AFTER CATALOG
POKE 44580,234 FILE NAMES

POKE 44596,234 CANCEL
POKE 44597,234 CATALOG-STOP
POKE 44598,234 WHEN SCREEN IS FULL

POKE 44599,234 STOP CATALOG AT EACH FILE
POKE 44600,234 NAME AND WAIT FOR A KEYPRESS

POKE 46922,96 THIS ALLOWS DISK
POKE 46923,234 INITIALATION
POKE 46924,234 WITHOUT PUTTING
POKE 44723,4 DOS ON THE DISK

POKE 49107,234 PREVENT LANGUAGE
POKE 49108,234 CARD FROM LOADING
POKE 49109,234 DURING RE-BOOT

POKE 49168,0 CLEAR KEYBOARD
POKE 49232,0 DISPLAY GRAPHICS
POKE 49233,0 DISPLAY TEXT
POKE 49234,0 DISPLAY FULL GRAPHICS
POKE 49235,0 DISPLAY TEXT/GRAPHICS
POKE 49236,0 DISPLAY GRAPHICS PAGE 1
POKE 49237,0 DISPLAY GRAPHICS PAGE 2
POKE 49238,0 DISPLAY LORES
POKE 49239,0 DISPLAY HIRES
------------------------------------------------------------------------------

48K MEMORY MAP

DECIMAL HEX USAGE
------------------------------------------------------------------------------
0-255 $0-$FF ZERO-PAGE SYSTEM STORAGE
256-511 $100-$1FF SYSTEM STACK
512-767 $200-$2FF KEYBOARD CHARACTER BUFFER
768-975 $300-$3CF OFTEN AVAILABLE AS FREE SPACE FOR USER PROGRAMS
976-1023 $3D0-3FF SYSTEM VECTORS
1024-2047 $400-$7FF TEXT AND LO-RES GRAPHICS PAGE 1
2048-LOMEM $800-LOMEM PROGRAM STORAGE
2048-3071 $800-$BFF TEXT AND LO-RES GRAPHICS PAGE 2 OR FREE SPACE
3072-8191 $C00-$1FFF FREE SPACE UNLESS RAM APPLESOFT IS IN USE
8192-16383 $2000-$3FFF HI-RES PAGE 1 OR FREE SPACE
16384-24575 $4000-$5FFF HI-RES PAGE 2 OR FREE SPACE
24576-38999 $6000-$95FF FREE SPACE AND STRING STORAGE
38400-49151 $9600-$BFFF DOS
49152-53247 $C000-$CFFF I/O HARDWARE (RESERVED)
53248-57343 $D000-$DFFF APPLESOFT IN LANGUAGE CARD OR ROM
57344-63487 $E000-$F7FF APPLESOFT OR INTEGER BASIC IN LANGUAGE CARD OR ROM
63488-65535 $F800-$FFFF SYSTEM MONITOR


PEEK: TO EXAMINE ANY MEMORY LOCATION L, PRINT PEEK (L), WHERE L IS A DECIMAL
NUMBER 0-65535. TO PEEK AT A TWO-BYTE NUMBER AT CONSEQUTIVE LOCATIONS L AND
L+1, PRINT PEEK (L) + PEEK (L+1) * 256

POKE: TO ASSIGN A VALUE X (0-255) TO LOCATION L; POKE L,X. TO POKE A TWO-BYT
NUMBER (NECESSARY IF X>255), POKE L,X-INT(X/256)*256, AND POKE L+1,INT(X/256).

CALL: TO EXECUTE A MACHINE LANGUAGE SUB ROUTINE AT LOCATION L, CALL L.


JUST FOR FUN TRY THIS: POKE 33,90. THEN TRY LISTING YOUR PROGRAM. OR TRY:
0,99 OR POKE 50,250 OR POKE 50,127. USE RESET TO RETURN TO NORMAL.

FOR TRUE RANDOM NUMBER GENERATION TRY THIS:X= RND(PEEK(78)+PEEK(79)*256)

TO LOCATE THE STARTING ADDRESS OF THE LAST BLOADED FILE USE: PEEK(-21902)+PEEK
(-21901)*256 (RESULT IS IN HEX)

TO DETERMINE THE LENGTH OF THE LAST BLOADED FILE USE: PEEK(-21920)+PEEK(-21919
*256 (RESULT IS IN HEX)

TO DETERMINE THE LINE NUMBER THAT CAUSED AN ERROR TO OCCUR, SET X TO: PEEK(218
+PEEK(219)*256

------------------------------------------------------------------------------

E-Mail Fredric L. Rice / The Skeptic Tank

Share
Follow
edited Oct 20, 2011 at 12:17

The Big PEEKs, POKEs, and CALLs List
Compiled by Edhel Iaur, Esq.
You've probably seen a lot of these before, but you may still find a useful P,P, or C that is new to you (assuming it works! : ) ). Some are for ProDOS, some are for DOS 3.3, and some are for Applesoft BASIC in general. A lot of the DOS 3.3 stuff came from Bert Kersey's DOSTalk Scrapbook. As usual, I claim no responsibility for any damage, etc. these may do. Some of the info may be less than 100% accurate; I haven't updated this in a long while. Without further ado, here's my really big PEEKs, POKEs, and CALLs and stuff list.
A little more ado:As always, feel free to email/post to me questions about this stuff.
MEMORY ADDRESSES

$06-$09 = Free
$18-$1F = Free
$4E-$4F = Constantly randomly changing numbers
$CE-$CF = Free
$EB-$EF = Free
$F9-$FF = Free
$C9-$CD = Random numbers?
$100-$95FF = Free
$300-$3FF = Free
$9600-$BFFF = DOS 3.3
$9600-$BEFF = BASIC.SYSTEM
$9D5E = Routine called after RESTART is pressed
$A963 = Two-byte value that is the max. value allowed w/the L parameter
$AA57 = Current MAXFILES setting
$AAB1 = Default MAXFILES setting
$BE43 EXEC file active (status)
$BE44 Input file active (status)
$BE45 Output file active (status)
$BE46 Prefix active (status)
$BE47 Directory file being accessed (status)
$BE48 End of directory data reached (status)
$BE49 Index to free string space (in K) (data)
$BE4A Character count for WRITE's temporary buffer (data)
$BE4B Current character count during keyboard entry (data)
$BE4C ASCII code of last character sent to output (used in error detection)
$BE4D Number of open files (doesn't include EXECs) (data)
$BE4E EXEC file is being closed (status)
$BE4F DIR file is being read (status)
$BE58-59 The last used A parameter
$BE5A-5C The last used B parameter
$BE5D-5E The last used E parameter
$BE5F-60 The last used L parameter
$BE61 The last used S parameter
$BE62 The last used D parameter
$BE63-64 The last used F parameter
$BE65-66 The last used R parameter
$BE67 The last used V parameter
$BE68-69 The last used @ parameter
$BE6A The last used T parameter
$BE6B The last used number after PR# or IN#
$BF00-$BFFF = ProDOS's global page
$C000-$FFFF = ROM
$D000-$F7FF = Applesoft BASIC
$E000-$F7FF = Integer BASIC
$F800-$FFFF = Hex. Language

976 = Warmstart entry
43140-43379 = DOS 3.3 commands
43380-43581 = DOS 3.3 error messages
45991-45994 = DOS 3.3 file-type codes
46010-45999 = Disk volume header (backwards)
48640 = Warmstart entry to BASIC.SYSTEM
53456-54116 = Applesoft commands and error messages


PEEKS, POKES, AND CALLS

Poke 32,X Set left margin of text window
Poke 33,X Set width of text window
Poke 34,X Set top margin of text window
Poke 35,X Set bottom margin of text window
Peek (36) Horizontal cursor position
Peek (37) Vertical cursor position
POKE PEEK(40)+PEEK(41)*x+PEEK(36),32 Makes cursor either not flash or be
invisible, depending on whether x is 156 or 256
Poke 50,63 INVERSE
Poke 50,127 FLASH
Poke 50,128 Listings and CATALOGs invisible
Poke 50,255 NORMAL
Poke 82,128 Cassette program will automatically RUN when loaded
Peek 103 & 104 - (Two-byte number) LOMEM value
POKE 109,PEEK(107):POKE 110,PEEK(108) Deletes all arrays. Lets you
reDIMention any or all arrays
Peek 115 & 116 - (Two-byte number) HIMEM value
POKE 214,128 or 255 Makes disk program RUN when any command is issued
X = PEEK (218) + PEEK (219) * 256 -- X equals line where error occured
Peek 232 & 233 Two-byte value of address of shape table
Peek (241) 256-SPEED
Call -380 NORMAL
Call -384 INVERSE
Call -875 Clears entire text line
Call -912 Scrolls up one line
Call -958 Clears the bottom of the text screen
X=PEEK(978) Determines where DOS is - if less than 157 then DOS is below
normal location - computer has less than 48K memory; if 157
then DOS is at its normal 48K location; if 190 then DOS is
ProDOS, not DOS 3.3; if greater than 190 then DOS is in the
language card. Another source says this PEEK can show memory
size if used as: PRINT (PEEK(978)+35)/4;"K"
POKE 1011,224 Makes RESET reboot
POKE 1010,102:POKE 1011,213:POKE 1012,112 Makes RESET RUN. Also unhooks DOS.
Use CALL 1002 at beginning of program to rehook it.
POKE 1013,76:POKE 1014,26:POKE 1015,252 Makes "&" move cursor up one line
Peek (2040)-192 Current active slot
POKE 40286,252:POKE 40287,164 Makes RESET RUN
Call 42340 Locks up disk to prevent writing on it. CAUTION: BACK UP DISK
BEFORE USING
Poke 44467,234:Poke 44468,234:Poke 44469,234 Causes DOS 3.3 to forget to show
you the disk catalog header the next time you catalog a disk
Poke 44480,234:Poke 44481,234:Poke 44482,234 Causes DOS 3.3 to forget to show
you the disk volume number the next time you catalog a disk
POKE 44452,22:POKE 44605,21 Controls number of files displayed in CATALOG;
The first POKE is always 1 greater than the second one
POKE 44505,234:POKE 44506,234 Reveals DELETEd files in your CATALOG
POKE 44509,76:POKE 44510,19:POKE 44511,174 Omits file type and file length in
CATALOG
POKE 44545,169:POKE 44546,x:POKE 44547,234 Shows all files in CATALOG to be x
sectors long
POKE 45620,234:POKE 45621,234 Keeps repeating first file in CATALOG
Poke 49237,0 View hi-res page 2
Poke 49236,0 View hi-res page 1
Poke 43602,0 Sets a flag so that you can then, immediately following this
POKE, send a DOS command without going to the next line
Poke 44725,144:Poke 48894,36:Poke 46063,36 The next time you format a DOS 3.3
disk, it may have 36 (not 35) tracks
Peek(43702) What language DOS thinks is running; if it equals 0 then it's
Integer BASIC; if it's 64, then it's Applesoft; if it's 128, then it's
cassette Applesoft
Poke 43698,ASC(A$)+128 Changes the CONTROL-D DOS activator to the character
in A$
Poke 45994,ASC(A$)+128 Makes the B-type files show up as the one character
type of file in A$
Poke 45993,ASC(A$)+128 Makes the A-type files show up as the one character
type of file in A$
Poke 45992,ASC(A$)+128 Makes the I-type files show up as the one character
type of file in A$
Poke 45991,ASC(A$)+128 Makes the T-type files show up as the one character
type of file in A$
Poke 44508,ASC(A$)+128 Changes the unlocked character (no *) to the one
character in A$
Poke 44515,ASC(A$)+128 Changes the locked character (*) to the one
character in A$
Poke 45994,ASC(A$)+128 Makes the B-type files show up as the one character
type of file in A$
Poke 42344,76 Causes DOS 3.3 to forget to save a hello program when
formatting a disk
Poke 44793,11 Makes DOS 3.3 forget to replicate itself when formatting a disk
Poke 44723,4 Makes DOS 3.3 mark tracks 1 and 2 as free when formatting a disk
Poke 44578,234:Poke 44579,234:Poke 44580,234:Poke 44567,12 Makes next catalog
appear in 2 columns
Poke 43364,255 Allows you to save a binary file 65535 bytes long
Poke 43273,65 Changes DOS 3.3's INIT syntax so that no filename is required
after the INIT command
X=PEEK(46725) Determines DOS version - if X=165 then DOS 3.3.0; if 186 then
DOS 3.3e; if 182 then DOS 3.3f; if 206 then ProntoDOS
Poke 43139,0 Locks up the computer; RESET has little effect
Poke 40514,X If X=6, then DOS 3.3 will RUN the HELLO file; if X=52 then DOS
3.3 will BRUN it; if X=20 then DOS 3.3 will EXEC it
IF PEEK (48705)=0 then TRACE is off
IF PEEK (48706)=0 then no program is running
IF PEEK(-1101)=6 then the computer in use is a //c or //e
Peek 47095 = Last slot used
Peek 47096 = Last drive used
IF PEEK (49249) AND PEEK (49250) > 127 THEN PRINT "NO PADDLES IN"
IF PEEK(-16384)>127 then a key has been pressed (POKE -16368,0 resets this)
X = PEEK (-16336) Clicks the speaker
IF PEEK (-16284) > 127 then joystick button 3 has been pressed
IF PEEK (-16285) > 127 then joystick button 2 has been pressed
IF PEEK (-16286) > 127 then joystick button 1 has been pressed
IF PEEK (-16287) > 127 then joystick button 0 has been pressed
Poke -16289,1 Puts .3 volts (1.6 MA) out pin 12 of internal joystick socket
(Output 3 on at 0.3 volts)
Poke -16290,1 Puts 3.5 volts out pin 12 of internal joystick socket
(Output 3 on at 3.5 volts)
Poke -16291,1 Puts .3 volts (1.6 MA) out pin 13 of internal joystick socket
(Output 2 on at 0.3 volts)
Poke -16292,1 Puts 3.5 volts out pin 13 of internal joystick socket
(Output 2 on at 3.5 volts)
Poke -16293,1 Puts .3 volts (1.6 MA) out pin 14 of internal joystick socket
(Output 1 on at 0.3 volts)
Poke -16294,1 Puts 3.5 volts out pin 14 of internal joystick socket
(Output 1 on at 3.5 volts)
Poke -16295,0 Puts .3 volts (1.6 MA) out pin 15 of internal joystick socket
(Output 0 on at 0.3 volts)
Poke -16296,1 Puts 3.5 volts out pin 15 of internal joystick socket
(Output 0 on at 3.5 volts)
Poke -16297,0 Hi-res
Poke -16298,0 Lo-res
Poke -16299,0 Switch from high-res page 1 to page 2
Poke -16300,0 Switch from high-res page 2 to page 1
Poke -16301,0 Allows graphics and 4 lines of text
Poke -16302,0 Full screen graphics - no text
Poke -16303,0 Shows text screen
Poke -16304,0 Shows graphics screen
X=PEEK (-16352) Toggles cassette output once - creates a "click" on a
cassette tape
Poke -16427,234:Poke -16428,234:Poke -16429,234 If a disk is initalized after
theses POKEs have been POKEd, it won't erase the language card
Call 62454 Turns hi-res screen to last color HPLOTted
FC58 Clear screen
FB40 Lo-res graphics mode
F800 PLOT (Accumulator,Y register)
F819 HLIN (Y register,contents of $2C) AT (Y register)
F828 VLIN (Accumulator,contents of $2D) AT (Y register)
FB2F Clears Hi-res screen, Lo-res screen, and accumulator
FD35 Wait for keypress
FDED Return contents of accumulator as 1 character


CONTROL CHARACTERS & SCHTICK

ESC @ = HOME
ESC F Clears stuff from under cursor
CTRL-S Pauses & unpauses program that is listing
ESC A = Move cursor right one column
ESC B = Move cursor left one column
ESC C = Move cursor down one line
ESC D = Move cursor up one line
CTRL-E RETURN = While in hex mode, shows contents of all registers


SPEED TIPS

-Frequently GOTOed & GOSUBed lines should be early in program
-Use NEXT instead of NEXT X
-Use variables instead of actual numbers


MISCELLANEOUS

PR#{8-255}=???
?=PRINT--Lists as PRINT
Joystick=150K Ohms
If PRINT PDL(N) When N=236-239, =POKE -16540+N,0
& = Jump to $3F5
X=FRE(0) = Clean string memory
Reserved words take up one byte
In hex, 0G = CALL 0
60 in hex (96 In decimal)= return to Applesoft
X=FRE(0) = X=Number of BASIC bytes free (If negitive, add 65536)
Syntax for DEF FN:
10 DEF FN A(W)=2*W+W
20 PRINT FN A(23)
RUN
Computer will return:
69
If 43+ errors are going to be handled by ONERR GOSUB or ONERR GOTO, use this
subroutine in your program:
10 POKE 768,104:POKE 769,168:POKE 770,104:POKE 771,166:POKE 772,223
20 POKE 773,154:POKE 774,72:POKE 775,152:POKE 776,72:POKE 777,96
30 CALL 768
If your shape table starts at 1DFC, enter (in hex):
E8:FC 1D
Max. line #=63999
Each line can have 239 characters
136=token for GR
186=token for PRINT
A input routine that accepts commas and colons:
10 PRINT "-YOUR QUESTION HERE-";
20 CALL-657:A$="":FOR X=512 TO 767:P=PEEK(X):IF P<>141 THEN
A$=A$+CHR$(P):NEXT X
(A$ now equals the response)
Move hi-res page 2 to 1:
10 REM S.H. LAM TECHNIQUE
20 C$="2000<4000.6000M":GOSUB 100:END
100 C$=C$+" N D9C6G":REM SPACE BEFORE AND AFTER N
110 FOR I=1 TO LEN(C$):POKE 511+I,ASC(MID$(C$,I,1))+128:NEXT
120 POKE 72,0:CALL-144:RETURN
The proper syntax for reading a 2-byte number:
Q=PEEK(B)+PEEK(B+1)*256
Q now equals the new value and B should have been previously set to the
starting address of the 2-byte number
The proper syntax for storing a 2-byte number:
POKE B+1,Q/256:POKE B,Q-(PEEK(B+1)*256)
Q should have been previously set to the value to be POKEd in and B should
have been previously set to the starting address of where the value is to
be stored
FOR A=46010 TO 45999 STEP -1:PRINT CHR$(PEEK(A));:NEXT
Shows you the current DOS 3.3 disk catalog header
To stop a DOS 3.3 catalog after it waits for your keypress, enter (in hex):
BCDF:20 0C FD C9 83 D0 03 4C 7F B3 60
PRINT PEEK(54)+256*PEEK(55) Returns the address of the current output routine
PRINT PEEK(56)+256*PEEK(57) Returns the address of the current output routine
if DOS is active, then you use:
PRINT PEEK(43603)+256*PEEK(43604) Returns the address of the current output
routine
PRINT PEEK(43605)+256*PEEK(43606) Returns the address of the current output
routine
To determine what to POKE into 40192 to move the DOS buffers to put your
machine language routine there, use the following formula:
DB=40192-(L+38)
You would then POKE 40192,DB and CALL 42964 to make DOS rebuild the DOS
buffers, and then load your machine language routine into DB+38.

DOS 3.3 buffer table:

DOS Buffer #| Data Buffer | Filename Field
------------+--------------+----------------
3 |38400-38655 | 38957-38986
2 |38995-39250 | 39552-39581
1 |39590-39845 | 40147-40176


A FOR/NEXT loop being used for a rest (when playing music) should be:
FOR R=1 TO RV:NEXT R with RV being equal to 500 for a whole rest.

10 D$=CHR$(4)
20 PRINT D$;"PREFIX"
30 INPUT PF$
40 PRINT "THE CURRENT PREFIX IS: ";PF$

To redirect information from slot 1 to a machine language routine at $300,
type PR#1,A$300

To redirect information from slot 1 to slot 4, type PR#1,A$C400

To stop writing to a text file after an OPEN and a WRITE or READ command have
been sent, print CHR$(4)

$Cs0C often contains the card signature for the card in slot "s".
The x sometimes shows the brand.

0x not assigned
1x printer
2x X-Y input device
3x serial/parallel input/output card
4x modem
5x sound/speech card
6x clock
7x mass storage device
8x 80 column display card
9x network/bus interface
Ax special purpose
Bx reserved


_The Error Numbers_

0 NEXT without FOR
1 Language not available
2 Range error
3 No device connected
4 Volume write-protected
5 End of data
6 Path/file not found
7 Incorrect volume number
8 I/O error
9 Disk full
10 File locked
11 DOS-related syntax error
12 No buffers available
13 File type mismatch
14 Program too large
15 Illegal direct command
16 Applesoft syntax error
17 Directory full
18 File not open
19 Duplicate file name
20 File busy
21 File(s) still open
22 RETURN without GOSUB
42 Out of Data error
53 Illegal quantity error
56 RESET was pressed
69 Overflow error
77 Out of memory
90 Undefined statement error
107 Bad subscript error
120 Redimensioned array
133 Divide by zero
163 Type mismatch error
176 String too long error
191 Formula too complex
224 Undefined function error
254 Extra ignored
255 =Break=


Reply

Resources:


Buy a Commodore Computer Poster

Popular Topics and FAQs


  • Commodore B Series Tips and Tricks
  • Aerocomp TRS 80 M 1 Expansion Unit DDC
  • Items Wanted
  • Lobo Max 80
  • Zenith Z-19-CN
  • Prototype PET 2001 photo
  • Using Toggle Switches to Analyze Memory
  • Commodore Disk Archive Project
  • PET 2001 Prototype at Gametronics 1977
  • Jim Butterfield Photo
  • IMSAI 8080 With Processor Tech. Cutter
  • Secrecy is the keystone of all tyranny
  • Cromemco System Three
  • Northstar Horizon - Boot Problem
  • Computer History and Restoration Links
  • Commodore BX-256-80 - 8088 Co-processor
  • S-100 board testing with Z-80 ICE
  • Donner 3500 - an early portable computer
  • Digital (DEC) PDP 11/05 NC Assembly
  • Univac 1219 rescue
  • IMSAI 1.4 BASIC vs. MITS 8K BASIC
  • Fido BBS listing node list 6-13-1986
  • PDP 8e
  • MITS 88-2 SIO (2SIO) for BASIC
  • Visual Technology Inc Model 1050
  • Amiga 2500 Restoration
  • The Evolution Of IBM Computers
  • Replacement teletype print hammer head
  • Archiving and Copying Software 101
  • Computers Built 1940 - 1950
  • CBM B-520 (a.k.a B256-80 or B500 256)
  • RCA COSMAC Microkit
  • Commodore 64K C-116 Mods
  • MITS 8800b Turnmon 9600 baud
  • Catweasel, 8in and 5 1/4
  • Raspberry Pi as Gateway to Internet
  • Digital PDP11 late 1969 early 1970
  • PDP 11/40 72 inch cabinet model
  • PDP 11/40 Industrial 11 model
  • Digitial MicroVAX 3100 30 System
  • Digital VAX 4000-200
  • Commodore 64 / 1541 DRIVEKNOCK
  • Booting the System Using RL02 drive
  • PACS: Reflections by Kathleen Mauchly
  • Tele-Graphic Computer Systems Inc.
  • Commodore B Series SID Jukebox?
  • Installing Core into PDP 11/40
  • Setting Up OpenVMS 7.1 DNS CLERK
  • Felt-Tarrant Comptometer Model J
  • NextStation Color
  • Digital Rainbow (PC100-B2)
  • 1970 Compusad Compulogical Tutor
  • Archiving Papertapes Using DSI NC 2400
  • 1976 P.C.C. Features the MAI JOLT 6502
  • 1961 Beckman DEXTIR Computer
  • UNIVAC 1 and UNIVAC File Computer 1
  • Past Issues:


    Indigo 2s

    This image was selected at random from the archive. Click image for more photos and files from this set.