Do some stuff
This commit is contained in:
@@ -12,19 +12,19 @@
|
||||
|
||||
### **MOV_IMM_RN**
|
||||
|
||||
`MOV R1, 0x10` - Move immediate value `0x10` to register `R1`
|
||||
`MOV 0x10, R1` - Move immediate value `0x10` to register `R1`
|
||||
|
||||
### **MOV_RN_RM**
|
||||
|
||||
`MOV R2, R1` - Move value from `R1` to `R2`
|
||||
`MOV R1, R2` - Move value from `R1` to `R2`
|
||||
|
||||
### **MOV_RN_ADDR**
|
||||
|
||||
`MOV R3, [0x2000]` - Load value from memory address `0x2000` into `R3`
|
||||
`MOV [0x2000], R3` - Load value from memory address `0x2000` into `R3`
|
||||
|
||||
### **MOV_ADDR_RN**
|
||||
|
||||
`MOV [0x2000], R1` - Store `R1` value to memory address `0x2000`
|
||||
`MOV R1, [0x2000]` - Store `R1` value to memory address `0x2000`
|
||||
|
||||
### **SWAP**
|
||||
|
||||
@@ -198,53 +198,14 @@
|
||||
|
||||
`BITS [0x2000], 3` - Set bit `3` in memory at address `0x2000`
|
||||
|
||||
- Reads a memory address as an argument.
|
||||
- Reads a bit index from the next byte.
|
||||
- Ensures the bit index is between `0-7`.
|
||||
- Sets the specified bit in the memory address.
|
||||
- Increments the program counter.
|
||||
|
||||
### **BITC_ADDR**
|
||||
|
||||
`BITC [0x2000], 5` - Clear bit `5` in memory at address `0x2000`
|
||||
|
||||
- Reads a memory address as an argument.
|
||||
- Reads a bit index from the next byte.
|
||||
- Ensures the bit index is between `0-7`.
|
||||
- Clears the specified bit in the memory address.
|
||||
- Increments the program counter.
|
||||
|
||||
### **BITS_RN**
|
||||
|
||||
`BITS R1, 2` - Set bit `2` in register `R1`
|
||||
|
||||
- Reads a register number.
|
||||
- Reads a bit index from the next byte.
|
||||
- Ensures the register is valid (`0 - REG_COUNT - 1`).
|
||||
- Ensures the bit index is between `0-7`.
|
||||
- Sets the specified bit in the register.
|
||||
- Increments the program counter.
|
||||
|
||||
### **BITC_RN**
|
||||
|
||||
`BITC R2, 6` - Clear bit `6` in register `R2`
|
||||
|
||||
- Reads a register number.
|
||||
- Reads a bit index from the next byte.
|
||||
- Ensures the register is valid (`0 - REG_COUNT - 1`).
|
||||
- Ensures the bit index is between `0-7`.
|
||||
- Clears the specified bit in the register.
|
||||
- Increments the program counter.
|
||||
|
||||
### **BITS (Special Instruction)**
|
||||
|
||||
- This mnemonic decides between `BITS_RN` and `BITS_ADDR` based on the operand.
|
||||
- If the operand is a register, `BITS_RN` is used.
|
||||
- If the operand is a memory address, `BITS_ADDR` is used.
|
||||
|
||||
### **BITC (Special Instruction)**
|
||||
|
||||
- This mnemonic decides between `BITC_RN` and `BITC_ADDR` based on the operand.
|
||||
- If the operand is a register, `BITC_RN` is used.
|
||||
- If the operand is a memory address, `BITC_ADDR` is used.
|
||||
|
||||
`BITC R2, 6` - Clear bit `6` in register `R2`
|
Reference in New Issue
Block a user