diff --git a/Instruction-Set.md b/Instruction-Set.md index bf75aee..625fd97 100644 --- a/Instruction-Set.md +++ b/Instruction-Set.md @@ -484,7 +484,9 @@ A = (result & 0x00ff) | `DIV source` | `0x18` | `source` : `mem` / `reg` / `imm` | `-` | `-` | `-` | `-` | `X` | #### Description -`DIV` performs unsigned division on `A` with `source` as divisor and stores the result into `A` and the remainder in `Y`. +`DIV` performs unsigned division on `Y:A` with `source` as divisor and stores the result into `A` and the remainder in `Y`. + +> NOTE: `DIV` operates on a 32 bit integer composed of `Y:A`. So multiple `DIV` instructions without setting Y to what you want will result into weird results Note that a division by 0 will set the (undocumented) error flag and the break flag. This will halt execution.