257 | 257 |
cmp x, 1 → CPX #1
|
258 | 258 |
cmp y, 1 → CPY #1
|
259 | 259 |
|
260 | |
- - - -
|
261 | |
|
262 | |
### and ###
|
|
260 |
### and, or, xor ###
|
263 | 261 |
|
264 | 262 |
and <dest-memory-location>, <src-memory-location>
|
265 | |
|
266 | |
"AND"s the contents of src with dest and stores the result in dest.
|
267 | |
|
268 | |
The constraints are the same as for `cmp`, except that the `c` flag
|
269 | |
is not affected. i.e. only `n` and `z` flags are affected.
|
|
263 |
or <dest-memory-location>, <src-memory-location>
|
|
264 |
xor <dest-memory-location>, <src-memory-location>
|
|
265 |
|
|
266 |
Applies the given bitwise Boolean operation to src and dest and stores
|
|
267 |
the result in dest.
|
|
268 |
|
|
269 |
* It is illegal if src OR dest OR is uninitialized.
|
|
270 |
* It is illegal if dest is read-only.
|
|
271 |
* It is illegal if dest does not occur in the WRITES lists
|
|
272 |
of the current routine.
|
|
273 |
|
|
274 |
Affects n and z flags, requiring that they be in the WRITES lists of the
|
|
275 |
current routine, and sets them as initialized afterwards.
|
|
276 |
|
|
277 |
dest and src continue to be initialized afterwards.
|
270 | 278 |
|
271 | 279 |
Notes:
|
272 | 280 |
|
273 | 281 |
and a, 8 → AND #8
|
274 | |
|
275 | |
### or ###
|
276 | |
|
277 | |
or <dest-memory-location>, <src-memory-location>
|
278 | |
|
279 | |
"OR"s the contents of src with dest and stores the result in dest.
|
280 | |
|
281 | |
The constraints and effects are exactly the same as for `and`.
|
282 | |
|
283 | |
Notes:
|
284 | |
|
285 | 282 |
or a, 8 → ORA #8
|
286 | |
|
287 | |
### xor ###
|
288 | |
|
289 | |
xor <dest-memory-location>, <src-memory-location>
|
290 | |
|
291 | |
"XOR"s the contents of src with dest and stores the result in dest.
|
292 | |
|
293 | |
The constraints and effects are exactly the same as for `and`.
|
294 | |
|
295 | |
Notes:
|
296 | |
|
297 | 283 |
xor a, 8 → EOR #8
|
298 | 284 |
|
299 | |
### shl ###
|
|
285 |
### shl, shr ###
|
300 | 286 |
|
301 | 287 |
shl <dest-memory-location>
|
302 | |
|
303 | |
Shifts the dest left one bit position. The rightmost position becomes `c`,
|
|
288 |
shr <dest-memory-location>
|
|
289 |
|
|
290 |
`shl` shifts the dest left one bit position. The rightmost position becomes `c`,
|
304 | 291 |
and `c` becomes the bit that was shifted off the left.
|
305 | 292 |
|
|
293 |
`shr` shifts the dest right one bit position. The leftmost position becomes `c`,
|
|
294 |
and `c` becomes the bit that was shifted off the right.
|
|
295 |
|
306 | 296 |
* It is illegal if dest is a register besides `a`.
|
307 | 297 |
* It is illegal if dest is read-only.
|
308 | 298 |
* It is illegal if dest OR c is uninitialized.
|
309 | |
* It is illegal if dest does not occur in the WRITES AND READS lists
|
310 | |
of the current routine.
|
|
299 |
* It is illegal if dest does not occur in the WRITES lists
|
|
300 |
of the current routine.
|
|
301 |
|
|
302 |
Affects the c flag, requiring that it be in the WRITES lists of the
|
|
303 |
current routine, and it continues to be initialized afterwards.
|
311 | 304 |
|
312 | 305 |
Notes:
|
313 | 306 |
|
314 | 307 |
shl a → ROL A
|
315 | 308 |
shl lives → ROL LIVES
|
316 | |
|
317 | |
### shr ###
|
318 | |
|
319 | |
shr <dest-memory-location>
|
320 | |
|
321 | |
Shifts the dest right one bit position. The leftmost position becomes `c`,
|
322 | |
and `c` becomes the bit that was shifted off the right.
|
323 | |
|
324 | |
Constraints are exactly the same as for `shl`.
|
325 | |
|
326 | |
Notes:
|
327 | |
|
328 | 309 |
shr a → ROR A
|
329 | 310 |
shr lives → ROR LIVES
|
330 | 311 |
|
|
334 | 315 |
|
335 | 316 |
Just before the call,
|
336 | 317 |
|
337 | |
* It is illegal if any of the memory locations in the routine's READS list is
|
338 | |
uninitialized.
|
|
318 |
* It is illegal if any of the memory locations in the called routine's
|
|
319 |
READS list is uninitialized.
|
339 | 320 |
|
340 | 321 |
Just after the call,
|
341 | 322 |
|
342 | |
* All memory locations listed as TRASHED in the routine's WRITES list are
|
343 | |
considered uninitialized.
|
|
323 |
* All memory locations listed as TRASHED in the called routine's WRITES
|
|
324 |
list are considered uninitialized.
|
|
325 |
* All memory locations listed as TRASHED in the called routine's OUTPUTS
|
|
326 |
list are considered initialized.
|
344 | 327 |
|
345 | 328 |
Notes:
|
346 | 329 |
|
347 | 330 |
call routine → JSR ROUTINE
|
|
331 |
|
|
332 |
- - - -
|
348 | 333 |
|
349 | 334 |
### if ###
|
350 | 335 |
|