home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1994 September
/
1994-09a.d64
/
opcodes.a
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
3KB
|
89 lines
10 rem -- sorted opcodes --
15 dima(151),b$(151),c$(151):forx=1to151:reada(x),b$(x):next:goto285
20 data0,brk,1,"ora (15,x)",5,ora 15,6,asl 15,8,php,9,ora #15,10,asl
25 data13,ora 1500,14,asl 1500,16,bpl addr,17,"ora (15),y
30 [131]21,"ora 15,x",22,"asl 15,x",24,clc,25,"ora 1500,y",29,"ora 1500,x
35 data30,"asl 1500,x",32,jsr,33,"and (15,x)",36,bit 15,37,and 15
40 data38,rol 15,40,plp,41,and #15,42,rol,44,bit 1500,45,and 1500
45 data46,rol 1500,48,bmi addr,49,"and (15),y",53,"and 15,x
50 [131]54,"rol 15,x",56,sec,57,"and 1500,y",61,"and 1500,x",62,"rol 1500,x
55 data64,rti,65,"eor (15,x)",69,eor 15,70,lsr 15,72,pha
60 data73,eor #15,74,lsr,76,jmp 1500,77,eor 1500,78,lsr 1500
65 data80,bvc addr,81,"eor (15),y",85,"eor 15,x",86,"lsr 15,x",88,cli
70 data89,"eor 1500,y",93,"eor 1500,x",94,"lsr 1500,x",96,rts
75 data97,"adc (15,x)",101,adc 15,102,ror 15,104,pla,105,adc #15
80 data106,ror,108,jmp (1500),109,adc 1500,110,ror 1500,112,bvs addr
85 data113,"adc (15),y",117,"adc 15,x",118,"ror 15,x",120,sei,121,"adc 1500,y
90 [131]125,"adc 1500,x",126,"ror 1500,x
95 data129,"sta (15,x)",132,sty 15,133,sta 15,134,stx 15,136,dey
100 data138,txa,140,sty 1500,141,sta 1500,142,stx 1500,144,bcc addr
105 data145,"sta (15),y",148,"sty 15,x",149,"sta 15,x",150,"stx 15,y",152,tya
110 data153,"sta 1500,y",154,txs,157,"sta 1500,x",160,ldy #15
115 data161,"lda (15,x)",162,ldx #15,164,ldy 15,165,lda 15,166,ldx 15
120 data168,tay,169,lda #15,170,tax,172,ldy 1500,173,lda 1500
125 data174,ldx 1500,176,bcs addr,177,"lda (15),y
130 [131]180,"ldy 15,x",181,"lda 15,x",182,"ldx 15,y",184,clv,185,"lda 1500,y
135 data186,tsx,188,"ldy 1500,x",189,"lda 1500,x",190,"ldx 1500,y"
140 data 192,cpy #15,193,"cmp (15,x)",196,cpy 15,197,cmp 15
145 data 198,dec 15,200,iny,201,cmp #15,202,dex,204,cpy 1500
150 data205,cmp 1500,206,dec 1500,208,bne addr,209,"cmp (15),y"
155 data213,"cmp 15,x",214,"dec 15,x",216,cld,217,"cmp 1500,y"
160 data 221,"cmp 1500,x",222,"dec 1500,x",224,cpx #15
165 data225,"sbc (15,x)",228,cpx 15,229,sbc 15,230,inc 15,232,inx
170 data233,sbc #15,234,nop,236,cpx 1500,237,sbc 1500,238,inc 1500
175 data240,beq addr,241,"sbc (15),y",245,"sbc 15,x",246,"inc 15,x",248,sed
180 data249,"sbc 1500,y",253,"sbc 1500,x",254,"inc 1500,x"
215 p=128:z=a(x)
220 print#3," ";:fori=1to8
225 ifint(z/p)=1 then print#3,"1";:z=z-p:goto235
230 print#3,"0";
235 p=p/2:next
240 w=a(x)
245 he$="0123456789abcdef":sz=1:h$="$":form=szto0step-1
250 n%=w/16^m:w=w-n%*16^m:h$=h$+mid$(he$,n%+1,1):next
255 print#3," ";h$;
260 t$=str$(a(x))
270 print#3," ";a(x);:print#3,spc(7-len(t$));b$(x)
280 return
285 gosub400
290 forx=1to151:c$(x)=b$(x):nextx
295 n=151:m=n
300 m=int(m/2):ifm=0thengoto 335
305 j=1:k=n-m
310 i=j
315 l=i+m
320 ifc$(i)>c$(l) thenu$=c$(i):c$(i)=c$(l):c$(l)=u$:i=i-m:ifi>0then315
325 j=j+1:ifj>kthen300
330 goto310
335 open3,d,7:print#3,chr$(147):rem for nx1000c insert your own printer codes
340 fory=1to151
345 forx=1to151
350 ifc$(y)=b$(x)thengosub215
355 nextx:nexty:print#3:close3
360 goto 600
400 poke53281,6:poke53280,6:poke646,1
401 print"[147] do you want output sent to screen or printer? (s/p)"
402 get d$:if d$=""then402
405 if d$<>"p" and d$<>"s" then 402
407 if d$="s"then d=3
409 if d$="p"then d=4
410 if d=3 then430
415 print" make sure printer is online ";
416 print" then hit any key "
420 get a$:if a$=""then 420
430 print" stand by ....
450 [142]
600 [153]" press any key on"::[161]a$:[139] a$[178]""[167]600
601 [153]"load do you want to
605 print" 1) run opcodes (numerically)
610 [153]" 2) return to features menu
615 print" 3) quit
620 [133]" select a number";a
625 [139] a[177]3[167] 620
650 [145] a [137] 1000,2000,3000
750 [153]"loadwaitlistloadwait";[199](34);p$;[199](34);",8":[153]"run"
760 [151]631,13:[151]632,13:[151]198,2:[128]
1000 p$[178]"opcodes.n":[137]750
2000 p$[178]"menu.feature":[137]750
3000 [128]