1 / 10

ECT 464

ECT 464. Lecture 11 Math Instructions. Today’s Quote: The doors of opportunity are marked “Push” and “Pull.” The sluggard craves and gets nothing,        but the desires of the diligent are fully satisfied. Proverbs 13:4. Arithmetic Status Bits. S:0/0 Carry (C) sets if carry is generated

Download Presentation

ECT 464

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECT 464 Lecture 11 Math Instructions

  2. Today’s Quote: The doors of opportunity are marked “Push” and “Pull.” The sluggard craves and gets nothing,        but the desires of the diligent are fully satisfied. Proverbs 13:4

  3. Arithmetic Status Bits • S:0/0 Carry (C) sets if carry is generated • S:0/1 Overflow (V) set if overflow • S:0/2 Zero (Z) indicates a resulting zero • S:0/3 Sign (S) indicates a resulting negative value • S:5/0 Overflow Trap Bit – Will set major error if not unlatched before END, TND, or REF statement • S:13 Least Significant Word of MUL and DDV instructions. Contains remainder for DIV and DDV instructions and the first four BCD digits for the convert from BCD (FRD) and convert to BCD (TOD) instructions. • S:14 Least Significant Word of MUL and DDV instructions. Contains unrounded quotient for DIV and DDV instructions and the most significant digit for TOD and FRD instructions

  4. Add (ADD) • Adds source A to source B and stores the result in the destination. • Source A can be an address or a constant • Source B can be an address or a constant • Destination must be an address • Changes Carry, Overflow, Zero, and Sign bits

  5. Subtract (SUB) • Subtract source B from source A and stores the result in the destination. • Source A can be an address or a constant • Source B can be an address or a constant • Destination must be an address • Changes Carry, Overflow, Zero, and Sign bits

  6. Multiply (MUL) • Multiply source A by source B and stores the result in the destination. • Source A can be an address or a constant • Source B can be an address or a constant • Destination must be an address • Changes Carry, Overflow, Zero, and Sign bits • The result is also placed in S:14 and S:13 (Math Register)

  7. Divide (DIV) • Divides source A by source B and stores the rounded quotient in the destination. • Source A can be an address or a constant • Source B can be an address or a constant • Destination must be an address • Changes Carry, Overflow, Zero, and Sign bits • The unrounded quotient is placed in S:14 and the remainder is placed in S:13 (Math Register)

  8. Double Divide (DDV) • The 32 bit content of the math register is divided by the 16-bit source value and the rounded quotient is placed in the destination. • Source can be an address or a constant • Destination must be an address • Changes Carry, Overflow, Zero, and Sign bits • The unrounded quotient is placed in S:14 and the remainder is placed in S:13 (Math Register)

  9. Clear (CLR) • The destination is set to zero. • Destination must be an address • Changes Carry, Overflow, Zero, and Sign bits

  10. Square Root (SQR) • The square root of the absolute value of the source is calculated and the rounded result is placed in the destination. • Source must be an address • Destination must be an address • Changes Carry, Overflow, Zero, and Sign bits

More Related