MoveIt, move memory in assembly language (MOVEIT.BAS)

MoveIt, move memory in assembly language by Jerry White, 15

Description

MoveIt, move memory in assembly language by Jerry White, 15

From the Antic disk of Best of Antic Book — disk B.

From the Antic Software Archive at atarimagazines.com. The program remains the property of its author and publisher.

What is in this file

Atari BASIC program · 2.8 KB

Dialect
Atari BASIC
Lines
37
Variables
M, Z$, Z, SM, X, IT, K, ME, V, U, JW, C, J, S
BASIC listing (37 lines)
5 GOTO 35:REM MOVEIT UTILITY/DEMO BY JERRY WHITE 3/31/82 ANTIC MAGAZINE
15 REM THATS INCREDIBLE SUBROUTINE
20 FOR M=0 TO 255:Z$(19,19)=CHR$(M):Z=USR(ADR(Z$),SM,960):NEXT M:RETURN
30 REM SM=SCREEN MEMORY C=SPEAKER
35 GRAPHICS 0:POKE 82,0:DIM Z$(42):POKE 752,1:S=PEEK(560)+PEEK(561)*256+4:SM=PEEK(S)+PEEK(S+1)*256:C=53279
45 REM Z$=ASSEMBLER ROUTINE STRING (POSITION 19=CHARACTER TO MOVE)
50 REM Z=USRCADR(Z$),START ADR,HOW MANY)
60 FOR X=1 TO 42:READ IT:Z$(X,X)=CHR$(IT):NEXT X:POKE 82,0:? "←";:POKE 83,39:SOUND 0,0,0,0
65 Z$(19,19)=CHR$(128):Z=USR(ADR(Z$),SM,960):POKE 710,113:POSITION 39,0:? CHR$(160);
75 ? "    This DEMO demonstrates an assembler ":? "    MOVE routine called from BASIC.     "
80 ? "    Possible uses would be to move      ":? "    blanks or special characters to an  "
85 ? "    area of screen memory, or to clear  ":? "    RAM used for player missiles or     "
90 ? "    page flipping etc.                  "
95 ? "          SELECT OPTION NUMBER:         ":? "      (1) FAST WITH SOUND               ":GOSUB 230
100 ? "      (2) VERY FAST WITH SOUND          ":GOSUB 230:? "      (3) THAT'S INCREDIBLE (SILENT)    ":GOSUB 230
110 POKE 764,255:CLOSE #1:OPEN #1,4,0,"K:":GET #1,K:CLOSE #1
115 REM ACCEPT ONLY A 1 2 OR 3
120 IF K<49 OR K>51 THEN FOR ME=15 TO 0 STEP -0.5:SOUND 0,102,12,ME:NEXT ME:GOTO 110
130 REM I LOVE SOUND ROUTINES
135 FOR J=1 TO 7:POKE 710,J*16:FOR X=2 TO 0 STEP -1:FOR ME=14 TO 0 STEP -2:SOUND 0,X+J,2,ME:NEXT ME:NEXT J
145 REM EXECUTE SELECTED MOVEIT ROUTINE
150 IF K=51 THEN GOSUB 20:GOTO 175
155 IF K=50 THEN GOSUB 190:GOTO 175
160 GOSUB 210:GOTO 175
170 REM DING...ALL DONE...START OVER
175 FOR ME=15 TO 0 STEP -0.2:SOUND 0,0,2,ME:NEXT ME:RUN
185 REM VERY FAST SUBROUTINE WITH SOUND
190 FOR M=0 TO 255:Z$(19,19)=CHR$(M):POKE 53761,168:POKE 53763,168:POKE 53760,255-M:POKE 53768,13:POKE 712,M
195 POKE 53762,M:POKE 53762,M/8:POKE 53768,2:Z=USR(ADR(Z$),SM,960):POKE 53761,0:POKE 53763,0:NEXT M:RETURN
205 REM FAST SUBROUTINE WITH SOUND
210 FOR M=255 TO 0 STEP -1:Z$(19,19)=CHR$(M):POKE 53760,M:FOR V=175 TO 160 STEP -1:POKE 53761,V
215 POKE 53768,V-160:NEXT V:POKE 712,M:Z=USR(ADR(Z$),SM,960):NEXT M:RETURN
225 REM BLINK 6 BUZZ SUBROUTING
230 FOR JW=0 TO 8:POKE 755,1:POKE C,0:POKE C,8:NEXT JW:FOR JW=0 TO 8:POKE 755,2:NEXT JW:RETURN
240 REM DATA TO CREATE Z$ ASSEMBLER SUBROUTINE
250 DATA 104,104,133,204,104,133,203,104,133,206,104,133,205,166,206,160,0,169,0,145,203,136
260 DATA 208,251,230,204,202,48,6,208,244,164,205,208,240,198,204,160,0,145,203,96