rej05b0371_r8cap| Application Note

rej05b0371_r8cap PDF

rej05b0371_r8cap| Application Note


APPLICATION NOTE

R8C/Tiny Series
General-purpose Program for Subtracting 32 Bits
1. Abstract

This program performs a 32-bit unsigned subtraction using registers. This program performs a 32-bit unsigned subtraction between memory locations.

2.

Introduction

This program performs a 32-bit unsigned subtraction using registers. Set the minuend in R2 and R0 and the subtrahend in R3 and R1 beginning with the upper half, respectively. The subtraction result is output to R2 and R0 beginning with the upper half and borrow information to the C flag, respectively. This program performs a 32-bit unsigned subtraction between memory locations. Set the least significant memory address of the minuend and that of the subtrahend in the address registers. The subtraction result is output to the minuend's memory location and borrow information to the C flag, respectively. C 0 1 Meaning With borrow Without borrow

(1) 32-bit subtraction (register) Subroutine name : SUBTRACT32 Interrupt during execution : Accepted Register/memory R0 Input Lower half of minuend ROM capacity : 5 bytes Number of stacks used : None Output Lower half of subtraction result R1 Lower half of subtrahend R2 Upper half of minuend Upper half of subtraction result R3 Upper half of subtrahend A0 A1 C flag Borrow information Unused Unused Does not change Does not change Usage condition

Usage precautions

The minuend is destroyed as a result of program execution.

REJ05B0371-0110Z/Rev.1.10

November 2005

Page 1 of 5


rej05b0371_r8cap Application Note renesas Download PDF

Add this permalink to your bookmarks for future download of rej05b0371_r8cap ApplicationNote

Permalink: http://application.emcelettronica.com/renesas/rej05b0371_r8cap

PDF rej05b0371_r8cap APPLICATION NOTE