home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1994 September
/
1994-09a.d64
/
opcodes.n
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
3KB
|
78 lines
10 rem -- opcodes --
15 dima(151),b$(151):forx=1to151:reada(x),b$(x):next:goto185
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"
185 gosub300
190 open3,d,7:print#3,chr$(147):rem for nx1000c insert your own printer codes
195 forx=1to151
200 gosub210
205 nextx:print#3:close3:goto 600
210 :
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
300 poke53281,6:poke53280,6:poke646,1
301 print"[147] do you want output sent to screen or printer? (s/p)"
302 get d$:if d$=""then302
305 if d$<>"p" and d$<>"s" then 302
307 if d$="s"then d=3
309 if d$="p"then d=4
310 if d=3 then350
315 print" make sure printer is online ";
316 print" then hit any key "
320 get a$:if a$=""then 320
350 return
600 print" press any key [145]"::geta$:if a$=""then600
601 print"[147] do you want to
605 [153]" 1) run opcodes (alphabetical)
610 print" 2) return to features menu
615 [153]" 3) quit
620 input" select a number";a
625 if a>3then print"[145][145]";:goto620
650 on a goto 1000,2000,3000
750 print"[147][146][155]load[146]";chr$(34);p$;chr$(34);",8":print"run"
760 poke631,13:poke632,13:poke198,2:end
1000 p$="opcodes.a":goto750
2000 p$="menu.feature":goto750
3000 end