Patent ID: 6907442

Claim:
A system for executing an object code converted from a source program having an integer division, said system comprising: a compiler having program code, which, for a source program including an integer division calculation q=int(a−b)(int( ) being a function which discards figures below decimal point in parentheses) for dividing integer a, which is expressed in N bits, by integer constant b, causes a computer to execute a first process for calculating mb=int(m÷b) (where m=2 N ), and a second process for generating an object code, which stores the mb in a first register, calculates qx=int(a×mb÷m), calculates rx=a−qx×b, set a quotient q to q=qx when rx<b, and set the quotient q to q=qx+1 when rx>=b; and a microprocessor having an arithmetic circuit, which comprises said first register, a multiplier, and an adder-subtractor, and which executes the object code generated by the compiler.