SAM47 INSTRUCTION SET

KS57C2308/P2308/C2316/P2316

 

 

REF — Reference Instruction

REF(Continued)

Examples: 1. Instructions can be executed efficiently using REF, as shown in the following example:

 

ORG

0020H

 

 

 

AAA

LD

HL,#00H

 

 

 

BBB

LD

EA,#FFH

 

 

 

CCC

TCALL

SUB1

 

 

 

DDD

TJP

SUB2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ORG 0080H

 

 

 

 

 

REF

AAA

;

LD

HL,#00H

 

REF

BBB

;

LD

EA,#FFH

 

REF

CCC

;

CALL

SUB1

 

REF

DDD

;

JP

SUB2

2.The following example shows how the REF instruction is executed in relation to LD instructions that have a “redundancy effect”:

ORG

0020H

 

 

AAA LD

EA,#40H

 

 

 

 

 

 

 

 

 

 

 

ORG

0100H

 

 

LD

EA,#30H

 

 

REF

AAA

;

Not skipped

 

 

 

 

 

 

 

 

 

REF

AAA

 

 

LD

EA,#50H

;

Skipped

SRB

2

 

 

5-76

Page 150
Image 150
Samsung KS57C2308 manual BBB EA,#FFH CCC Tcall SUB1 DDD TJP SUB2, BBB EA,#FFH CCC Call SUB1 DDD SUB2, Aaa Ld