MacBook-Pro-de-Oscar.local 2025-5-12:12:19:32

This commit is contained in:
oskar 2025-05-12 12:19:32 +02:00
parent 681bcfe844
commit 63678c7e3a

View File

@ -0,0 +1,42 @@
---
aliases:
up:
tags:
- s/informatique
---
# Assembleur
## opérations de l'ALU
| Hex | Bin | ALU operation |
| --- | ---- | --------------------- |
| 0 | 0000 | A |
| 1 | 0001 | B |
| 2 | 0010 | A+B |
| 3 | 0011 | A-B |
| 4 | 0100 | A XOR B |
| 5 | 0101 | A AND B |
| 6 | 0110 | A+1 |
| 7 | 0111 | A-1 |
| 8 | 1000 | ¬A |
| 9 | 1001 | ¬B |
| A | 1010 | ¬(A+B) |
| B | 1011 | ¬(A-B) |
| C | 1100 | ¬(A XOR B) = A NXOR B |
| D | 1101 | ¬(A AND B) = A NAND B |
| E | 1110 | ¬(A+1) = -A-2 |
| F | 1111 | ¬(A-1) = -A |
## branches
- `100· ·· JMP to #A`
- `101· ·· JMP to #B`
- `110· ·· JMP to #RAM[A]`
- `111· ·· JMP to #addr`
- `1··· 0·00 JMP`
- `1··· 0·01 JMP if A=0`
- `1··· 0·10 JMP if A=B`
- `1··· 0·11 JMP if overflow`
- `1··· 1·00`
- `1··· 1·01 JMP if A≠0`
- `1··· 1·10 JMP if A≠B`
- `1··· 1·11 JMP if overflow`