s3c2410a Samsung Semiconductor, Inc., s3c2410a Datasheet - Page 187

no-image

s3c2410a

Manufacturer Part Number
s3c2410a
Description
16/32-bit Risc Arm Microprocessor
Manufacturer
Samsung Semiconductor, Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
s3c2410a-20
Manufacturer:
SAMSUNG
Quantity:
15 995
Part Number:
s3c2410a-20
Quantity:
1 238
Part Number:
s3c2410a-20
Manufacturer:
SUNMNG
Quantity:
2 000
Company:
Part Number:
s3c2410a-20
Quantity:
130
Part Number:
s3c2410a-20-Y080
Manufacturer:
SAMSUNG
Quantity:
2 890
Part Number:
s3c2410a-20-Y0R0
Manufacturer:
SAMSUNG
Quantity:
523
Part Number:
s3c2410a20-Y080
Manufacturer:
SAMSUNG/三星
Quantity:
20 000
Company:
Part Number:
s3c2410a20-YO80
Quantity:
12 000
Company:
Part Number:
s3c2410a20-YO8N
Quantity:
1 619
S3C2410A
GENERAL PURPOSE SIGNED DIVIDE
This example shows a general purpose signed divide and remainder routine in both Thumb and ARM code.
Thumb code
;signed_divide
;Get abs value of R0 into R3
;SUB always sets flag so go & report division by 0 if necessary
;Get abs value of R1 by xoring with 0xFFFFFFFF and adding 1 if negative
;Save signs (0 or -1 in R0 & R2) for later use in determining ; sign of quotient & remainder.
;Justification, shift 1 bit at a time until divisor (R0 value) ; is just <= than dividend (R1 value). To do this shift dividend
; right by 1 and stop as soon as shifted value becomes >.
just_l
0
div_l
0
0
ASR
EOR
SUB
BEQ
ASR
EOR
SUB
PUSH
LSR
MOV
B
LSL
CMP
BLS
MOV
B
LSR
CMP
BCC
SUB
ADC
CMP
BNE
R2, R0, #31
R0, R2
R3, R0, R2
divide_by_zero
R0, R1, #31
R1, R0
R1, R0
R0, R1, #1
R2, R3
%FT0
R2, #1
R2, R0
just_l
R0, #0
%FT0
R2, #1
R1, R2
%FT0
R1, R2
R0, R0
R2, R3
div_l
{R0, R2}
; Signed divide of R1 by R0: returns quotient in R0,
; remainder in R1
; Get 0 or -1 in R2 depending on sign of R0
; EOR with -1 (0 FFFFFFFF) if negative
; and ADD 1 (SUB -1) to get abs value
; Get 0 or -1 in R3 depending on sign of R1
; EOR with -1 (0 FFFFFFFF) if negative
; and ADD 1 (SUB -1) to get abs value
; Set accumulator to 0
; Branch into division loop
; Test subtract
; If successful do a real subtract
; Shift result and add 1 if subtract succeeded
; Terminate when R2 == R3 (ie we have just
; tested subtracting the 'ones' value).
THUMB INSTRUCTION SET
4-41

Related parts for s3c2410a