section 7 - Index of
section 7 - Index of section 7 - Index of
NORM Normalize Accumulator Iteration NORMOperation:If E. U • Z=1, then ASL 0 and Rn-1~Rnelse if E=1, then ASR 0 and Rn+ 1 ~Rnelse NOPwhere E denotes the logical complement of E, andwhere • denotes the logical AND operatorAssembler Syntax:NORM Rn,ODescription: Perform one normalization iteration on the specified destination operand 0,update the specified address register Rn based upon the results of that iteration, andstore the result back in the destination accumulator. This is a 56-bit operation. If theaccumulator extension is not in use, the accumulator is un normalized, and the accumulatoris not zero, the destination operand is arithmetically shifted one bit to the left, and thespecified address register is decremented by 1. If the accumulator extension register isin use, the destination operand is arithmetically shifted one bit to the right, and the specifiedaddress register is incremented by 1. If the accumulator is normalized or zero, aNOP is executed and the specified address register is not affected. Since the operationof the NORM instruction depends on the E, U, and Z condition code register bits, thesebits must correctly reflect the current state of the destination accumulator prior to executingthe NORM instruction. Note that the L and V bits in the condition code register will becleared unless they have been improperly set up prior to executing the NORM instruction.Example:REP #$2FNORM R3,A;maximum number of iterations needed;perform 1 normalization iterationBefore ExecutionA 1,-_$_0_0:0_0_00_00_:0_00_00_1_--,R31~ _____ $0_O_OO_~After ExecutionAI~ ____ $_00_:4_00_0_00_:0_00_oo_0_~R31~ ______ $_FF_D_2 __ ~Explanation of Example: Prior to execution, the 56-bit A accumulator contains thevalue $00:000000:000001, and the 16-bit R3 address register contains the value $0000.The repetition of the NORM R3,A instruction normalizes the value in the 56-bit accumulatorand stores the resulting number of shifts performed during that normalization pro-
NORM Normalize Accumulator Iteration NORMcess in the R3 address register. A negative value reflects the number of left shiftsperformed; a positive value reflects the number of right shifts performed during the normalizationprocess.Condition Codes:I LF I DM I T I" I 81 I 80 I 1115 14 13 12 11 10 9 8 7 6I 10 I 8 I L5 4 3 2 1 0E I U N ZCCRN -Z -V -Set if bit 55 of A or B result is setSet if A or B result equals zeroSet if bit 55 is changed as a result of a left shiftNote: The definitions of the E and U bits vary according to the scaling mode being used.Refer to Section A.5 CONDITION CODE COMPUTATION for complete details.Instruction Format:NORM Rn,DOpcode:23 16 1510 0 0 0 0 0 08 7 oo 0 1 d 1 0 1 1Instruction Fields:o d Rn R R RA 0 Rn n n nB 1where "nnn" = Rn numberTiming: 2 oscillator clock cyclesMemory: 1 program word
- Page 429 and 430: Y: Y Memory Data Move Y:S D DS,D d
- Page 431 and 432: Y: Y Memory Data Move Y:S D DS,D d
- Page 433 and 434: R:V Register and V Memory Data Move
- Page 435 and 436: R:V Register and Y Memory Data Move
- Page 437 and 438: R:V Register and Y Memory Data Move
- Page 439 and 440: L: Long Memory Data Move L:Example:
- Page 441 and 442: L: Long Memory Data Move L:Instruct
- Page 443 and 444: X: Y: xv Memory Data Move X: Y:Exam
- Page 445 and 446: X: Y: xv Memory Data Move X: Y:S1 D
- Page 447 and 448: MOVEC Move Control Register MOVECst
- Page 449 and 450: MOVEC Move Control Register MOVECCo
- Page 451 and 452: MOVECMove Control RegisterMOVECInst
- Page 453 and 454: MOVEC Move Control Register MOVECTi
- Page 455 and 456: MOVEM Move Program Memory MOVEMoper
- Page 457 and 458: MOVEM Move Program Memory MOVEMInst
- Page 459 and 460: MOVEMMove Program MemoryMOVEMInstru
- Page 461 and 462: MOVEP Move Peripheral Data MOVEPist
- Page 463 and 464: MOVEP Move Peripheral Data MOVEPCon
- Page 465 and 466: MOVEP Move Peripheral Data MOVEPIns
- Page 467 and 468: MOVEP Move Peripheral Data MOVEPIns
- Page 469 and 470: MPY Signed Multiply MPYExplanation
- Page 471 and 472: MPY Signed Multiply MPYInstruction
- Page 473 and 474: MPYR Signed Multiply and Round MPYR
- Page 475 and 476: MPYR Signed Multiply and Round MPYR
- Page 477 and 478: NEGNegate AccumulatorNEGInstruction
- Page 479: NOPNo OperationNOPInstruction Forma
- Page 483 and 484: NOTLogical ComplementNOTInstruction
- Page 485 and 486: ORLogical Inclusive ORORInstruction
- Page 487 and 488: ORI OR Immediate with Control Regis
- Page 489 and 490: REP Repeat Next Instruction REPRest
- Page 491 and 492: REPRepeat Next InstructionREPInstru
- Page 493 and 494: REPRepeat Next InstructionREPInstru
- Page 495 and 496: REP Repeat Next Instruction REPNote
- Page 497 and 498: RESETReset On-Chip Peripheral Devic
- Page 499 and 500: RND Round Accumulator RNDConvergent
- Page 501 and 502: RNDRound AccumulatorRNDInstruction
- Page 503 and 504: ROL Rotate Left ROLCondition Codes:
- Page 505 and 506: ROR Rotate Right RORCondition Codes
- Page 507 and 508: RTIReturn from InterruptRTIConditio
- Page 509 and 510: RTSReturn from SubroutineRTSInstruc
- Page 511 and 512: sec Subtract Long with Carry secExp
- Page 513 and 514: secSubtract Long with CarrysecInstr
- Page 515 and 516: STOPStop Instruction ProcessingSTOP
- Page 517 and 518: SUB Subtract SUBCondition Codes:S -
- Page 519 and 520: SUBL Shift Left and Subtract Accumu
- Page 521 and 522: SUBR Shift Right and Subtract Accum
- Page 523 and 524: SWISoftware InterruptSWICondition C
- Page 525 and 526: Tee Transfer Conditionally Teetion
- Page 527 and 528: Tee Transfer Conditionally TeeInstr
- Page 529 and 530: TFR Transfer Data ALU Register TFRC
NORM Normalize Accumulator Iteration NORMOperation:If E. U • Z=1, then ASL 0 and Rn-1~Rnelse if E=1, then ASR 0 and Rn+ 1 ~Rnelse NOPwhere E denotes the logical complement <strong>of</strong> E, andwhere • denotes the logical AND operatorAssembler Syntax:NORM Rn,ODescription: Perform one normalization iteration on the specified destination operand 0,update the specified address register Rn based upon the results <strong>of</strong> that iteration, andstore the result back in the destination accumulator. This is a 56-bit operation. If theaccumulator extension is not in use, the accumulator is un normalized, and the accumulatoris not zero, the destination operand is arithmetically shifted one bit to the left, and thespecified address register is decremented by 1. If the accumulator extension register isin use, the destination operand is arithmetically shifted one bit to the right, and the specifiedaddress register is incremented by 1. If the accumulator is normalized or zero, aNOP is executed and the specified address register is not affected. Since the operation<strong>of</strong> the NORM instruction depends on the E, U, and Z condition code register bits, thesebits must correctly reflect the current state <strong>of</strong> the destination accumulator prior to executingthe NORM instruction. Note that the L and V bits in the condition code register will becleared unless they have been improperly set up prior to executing the NORM instruction.Example:REP #$2FNORM R3,A;maximum number <strong>of</strong> iterations needed;perform 1 normalization iterationBefore ExecutionA 1,-_$_0_0:0_0_00_00_:0_00_00_1_--,R31~ _____ $0_O_OO_~After ExecutionAI~ ____ $_00_:4_00_0_00_:0_00_oo_0_~R31~ ______ $_FF_D_2 __ ~Explanation <strong>of</strong> Example: Prior to execution, the 56-bit A accumulator contains thevalue $00:000000:000001, and the 16-bit R3 address register contains the value $0000.The repetition <strong>of</strong> the NORM R3,A instruction normalizes the value in the 56-bit accumulatorand stores the resulting number <strong>of</strong> shifts performed during that normalization pro-