Updated DIV instruction description

Kevin Ramharak 2018-01-01 14:07:34 +01:00
parent c718a582aa
commit 7287863073

@ -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.