Samsung KS57C2308 Manual page 29

Single-chip cmos microcontroller
Table of Contents

Advertisement

KS57C2308/P2308/C2316/P2316
+ +
PROGRAMMING TIP — Using the Carry Flag as a 1-Bit Accumulator
1. Set the carry flag to logic one:
SCF
LD
LD
ADC
2. Logical-AND bit 3 of address 3FH with P3.3 and output the result to P4.0:
LD
LDB
BAND
LDB
EA,#0C3H
HL,#0AAH
EA,HL
H,#3H
C,@H+0FH.3
C,P3.3
P4.0,C
; C
1
; EA
#0C3H
; HL
#0AAH
; EA
#0C3H + #0AAH + #1H, C
; Set the upper four bits of the address to the H register
value
; C
bit 3 of 3FH
; C
C AND P3.3
; Output result from carry flag to P4.0
ADDRESS SPACES
1
2-21

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

P2308C2316P2316Ks57p2308Ks57c2316Ks57p2316

Table of Contents