IPB

Welcome Guest ( Log In | Register )

> Sidebar
Navigation
Recent edits
RSS Syndicate by Jaysmith2000
  Dec 29 2012, 08:24 PM
Robinsons Requi... by Jaysmith2000
  Dec 29 2012, 08:22 PM
Towers 2 Walk t... by Jaysmith2000
  Dec 29 2012, 08:21 PM
Atari Jaguar Ti... by Kevincal
  Dec 17 2011, 09:43 AM
Videos Of All J... by Kevincal
  Dec 10 2011, 12:12 PM
Stats
Our members have created a total of 150 articles in 13 categories.

A total of 264 edits have been made and our articles have been viewed 24,691 times
> DIV , instruction description
Options V
21

DIV Rn,Rn

Unsigned Divide

instruction decode:

opcode srreg dstreg
010101 sssss ddddd

DIV source,dest

So if the source register was r7 and the dest register was r9
the bit pattern is

010101 00111 01001
DIV r7, r9

r9 = r9 / r7

(Shaggy...LET R9 = R9 / R7 )


We divide the destination by the source and store the result in the
destination register. This only works on positive numbers. There is
a special hardware register in the RISC chip that controls the
division.This means you can do 32 bit division or 16.16 bit division.
The remander is store in another special hardware register in the
RISC and is 32 bits wide.

Flags
ZNC - unaffected

The divide unit does not affect the flags. They remain in the same
state they were BEFORE the DIV was executed.

Register Usage


Cycle 1: Source register read & Destination register read
Cycle 18: Destination register write


There are 1024 variations of the DIV instruction.

Last update: Jun 6 2006, 04:18 AM by Gorf    Created: Nov 22 2008, 07:42 AM by Gorf    Edits: 1    Views: 99
Print article  Download MSWord version  Download txt version

RSS Lo-Fi Version Time is now: 19th June 2013 - 05:20 PM