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

  1. 10 rem -- opcodes --
  2. 15 dima(151),b$(151):forx=1to151:reada(x),b$(x):next:goto185
  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. 185 gosub300
  37. 190 open3,d,7:print#3,chr$(147):rem for nx1000c insert your own printer codes
  38. 195 forx=1to151
  39. 200 gosub210
  40. 205 nextx:print#3:close3:goto 600
  41. 210 :
  42. 215 p=128:z=a(x)
  43. 220 print#3,"  ";:fori=1to8
  44. 225 ifint(z/p)=1 then print#3,"1";:z=z-p:goto235
  45. 230 print#3,"0";
  46. 235 p=p/2:next
  47. 240 w=a(x)
  48. 245 he$="0123456789abcdef":sz=1:h$="$":form=szto0step-1
  49. 250 n%=w/16^m:w=w-n%*16^m:h$=h$+mid$(he$,n%+1,1):next
  50. 255 print#3,"   ";h$;
  51. 260 t$=str$(a(x))
  52. 270 print#3,"   ";a(x);:print#3,spc(7-len(t$));b$(x)
  53. 280 return
  54. 300 poke53281,6:poke53280,6:poke646,1
  55. 301 print"[147] do you want output sent to screen or    printer? (s/p)"
  56. 302 get d$:if d$=""then302
  57. 305 if d$<>"p" and d$<>"s" then 302
  58. 307 if d$="s"then d=3
  59. 309 if d$="p"then d=4
  60. 310 if d=3 then350
  61. 315 print"      make sure printer is online       ";
  62. 316 print"           then hit any key             "
  63. 320 get a$:if a$=""then 320
  64. 350 return
  65. 600 print"           press any key            [145]"::geta$:if a$=""then600
  66. 601 print"[147] do you want to
  67. 605 [153]" 1) run opcodes (alphabetical)
  68. 610 print" 2) return to features menu
  69. 615 [153]" 3) quit
  70. 620 input" select a number";a
  71. 625 if a>3then print"[145][145]";:goto620
  72. 650 on a goto 1000,2000,3000
  73. 750 print"[147][146][155]load[146]";chr$(34);p$;chr$(34);",8":print"run"
  74. 760 poke631,13:poke632,13:poke198,2:end
  75. 1000 p$="opcodes.a":goto750
  76. 2000 p$="menu.feature":goto750
  77. 3000 end
  78.