LoginSignup
0
0

More than 1 year has passed since last update.

インタープリタを作る その25

Posted at

概要

インタープリタを作ってみた。
avrインタープリター書いてみた。
乱数rndを実現する。

サンプルコード

avr.ldi(16, 0xea)
avr.ldi(17, 0x05)
avr.ldi(18, 0x00)
avr.inc(18)
avr.mul(16, 17)
avr.mov(16, 0)
avr.inc(16)
avr.out(1, 16)
avr.mul(16, 17)
avr.mov(16, 0)
avr.cpi(18, 0xf9)
avr.brne(-9)


結果

147 92 253 182 199 112 241 138 123 4 101 222 175 24 89 178 99 172 205 6 151 192 193 218 75 84 53 46 127 104 41 2 51 252 157 86 103 16 145 42 27 164 5 126 79 184 249 82 3 76 109 166 55 96 97 122 235 244 213 206 31 8 201 162 211 156 61 246 7 176 49 202 187 68 165 30 239 88 153 242 163 236 13 70 215 0 1 26 139 148 117 110 191 168 105 66 115 60 221 150 167 80 209 106 91 228 69 190 143 248 57 146 67 140 173 230 119 160 161 186 43 52 21 14 95 72 9 226 19 220 125 54 71 240 113 10 251 132 229 94 47 152 217 50 227 44 77 134 23 64 65 90 203 212 181 174 255 232 169 130 179 124 29 214 231 144 17 170 155 36 133 254 207 56 121 210 131 204 237 38 183 224 225 250 107 116 85 78 159 136 73 34 83 28 189 118 135 48 177 74 59 196 37 158 111 216 25 114 35 108 141 198 87 128 129 154 11 20 245 238 63 40 233 194 243 188 93 22 39 208 81 234 219 100 

成果物

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0