home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1994 September / 1994-09a.d64 / opcodes.a (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  89 lines

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