Adobe Scan Dec 06, 2023
Adobe Scan Dec 06, 2023
ec! en segicteu Ro an
ator
feample 1 Twr 9eambee preeater than
RI
Vawty thein
9
move
Aol Aeceqo/ qumbet
ADD A, RI
Cy=/
Megge
Nezt
mov , #'y' ; f Cy=/ , move
thvough P
meccoge y
; Aenc the
Neet : NOP ado gothi9
END
Ezomple 9 ’ feume that RA
to
valuee
43 = (se)
Loao pointe
Scl
; Loas eougtex
R2, 5
cIR
cle2r RY
A
acl the byte pontor
AEAIN ADD
A, RO RO
A don t accumwate
JNC
Net casy
: Keep
tnccement inter
Dor
RO
Neet :
een til R2
nepeat
3 E7
38 &D
79 7Y / E 8 0 =74, Cy=)
The cay
xeseut
be
39- bi num beee
6) Let the
014S38 CO H
RAm Locatrons -
them be ctone
arl Let
olato
adlet sek Data
FFH
coH
384
C7H
S3H
ssH
43
the
the
seeonof giter bok
RO of
banke
auiteseo
cleae
CLR the rumber
ep to R2
eoch qumbex
of bytes y
Dointe the lc eyte
404:R
0v Re , ## fint gembex
of
; R! point to the loo
numbee
byte ef econ
SET B Psl- 3 sciteh to bank 1
22
Ro of bonkseecult
porntee to the
Hetwtn to bonko
CLR PSw. 3
byte of the
oge
number ento 9
fiat
ef the
ADDC A,e RI to it
Aecono
eneee ment kD
INC RO
neeenent Rr
/NC RI
sutteh to bank12
SETB PLw-3
to Ro of bank 1
move la7
gov RO , A of bank
enorement R0
RO o
eetwen to ban k
CLR Pcw.g all fout
epeat untlf
R2, BACk ; been
DJNZ Aytee
atoref
of the ado tfon
The et ult
Qdof nees det
BE H
60H
61H
62H
634
the povile of to
alol: tion) ey<treretrnn
num becc
epetot
:/B7= 4 etono gcD
ngov 6, # tH bpran
ccerce -Cy
gUBB
/aubtrack
SUBg enstuetron
gU BB , Gawe
SUB pet ef
coi th binseoue). To mate
the
make ey =0 pox
Case UBB oith Cy =0 suttact
eomplemet methoof fo
o's
The
CLR
A, # 9F H
R3,# 23H
SUBB
sol
H = 3E
R3 3
ecmplemen)
(2'e
1tI toI
CE =0
Floge will be
Ac =
ey=/
SUBB
CLR C
SUBB , #63 4
Sol,
6E'
22
Cy=l
eomplime nt
, muttiptfeatroq. of niggeo qembore
multplicat0n
The Auppot byte-by- yte
yotox
toy eecdl
place I6 bet
the opurane
guttiplirateg ; oqe of peran/
lo by te -by hy te anol the
be en tegitey A
Aftes mulhpieatron, the
be egeitee 8 an
A anol epper byte
Atorceco en
Louer By te ef eeclt
<toneol 8:
mov B, # 6SH
65H = E99 ehese
SH *
A8
Qeimbee
of up9neol
diviole by 8
DIV AB
Numese ator =
deFcm enatoY = B
Suotient
Lemanalee =B
Nou
AB (emandes )
B= 0s
Compare Inetuetion
ANL
Aimitoy
oR instretion
xOR enethureon
leetrnahon , ADeree
kyrtox
teet P! to
ohethe
to P
&le Reao seno 994
value
the leave/ -
atayt
Aolutton. enput
tOFH make
port
; [Rs]
A,R3
XRL hau value
if
EX/T ; Tump
than
pther
&P eomplegert Aeeugulato
Ayntox CPL
gtimbue
Erample Ten Hex rite
enwarole. biggest 9umbee
cetThe
Loeatron4
gumber t the
the
bggut be caweq/
to
Lowwo fihally Ro the pointer
RO,#SDH data
Se lutren
#/0
RI
A,R0 gove
tnereonnent pbintee
END
Jemp anoeal!
instsueto
the
actron by
not
the
label
sefoeol to by AGAN
DÊNZ
eample 2 0 then
enment R2; ef
o/th eremer
deese
tnfeveFrog
t0
eill
feomple ite to loao/the seluny
the vallue eomplemert the
- telatoH
Q0cumelato 76
eqclesec
solutr any
700
negider) tor
capoer ty cf
ke count
to hol
retee Coop
the
R3 , #/0 coUnt
loop
the eFno
complement 9
A GAIA/, CPL
R2, AGAIN
DINK
DINZ R3 AEXT
the
to keep
thi
the
enctueton. ano
Corn theougi
be conl
efeeret on fcec
coferewe exe ceteal: hel en
NEX Count 70
R3 the
loaa/ R2
the cPU to Coop
state
the
loop becomec
untfl R3
continee
jinicheal.
O
ther
JZ(Jump
Jup
kyotox
LABEL
Syotor to LABEL
value of o to -/28
the oleeplaeme nt nc9ative
fee , veufy the gump
Euample Using the fotlo eing dt
frweral caleelatioF.
Mnemonre opearol
-opeode
Lioe
G000
mov RO
78 00
74
C3 NEXT
60 (03
/NC RO
top 6
AGAIN
NEXT: ADD
77
oo9) oVER
F8
moy RI,A
R9A
13
mov R3,A
FB
ADD A, R3
28 oVER :
bo13
SJMP HERE
FE HERE
END
|8
label
NEXT 03+06= 09 H
oVER
JNC
STmp HERE
Label dolseete
the
FE H= / H
the eey
/YH
HERE
cALL inetueto? >
thi S- byte cntwctrtn,
epcooe anol the
the
of the
tke fonet Ayyte the odrecc
thiwe ece to
tayget bytee
subroutiFe7hëxefre, LcALL zhe
Sebetrnce
Locateo agyohee
call
the goSI:
of the calleof
that affesc to ,
To make to eone bak
the
the the stock
the ocee C0H auto maically below 2cALe-
emmealiaely
enetuekrog
the back to
odosece ef coptro/ trontfe
If RET (netusn) xecuheol,
staek,sfoneo n
trea/ly
autornatreally
.
byte cnstxuetion , cohee ax
3
enctureon
betoen gcaLL
eoentee the sfaek
the
of RET
fnetron of Zhe
the
the taspet
The enly offoeqee
be oryhocr ohey mect be
d t e cC far CALL
Lohile the taget
Tnput/output pggromi
otput. 76
can be ceLeof for enput
and cectps
0f potO both input
the pnt
to
each pin muet be cognceteel eetenally
the foet that
/ckJ pull-lo ecictoK olue
PO an oen Vee
PO.0
Po"!
pO2
PO3
Po.
Po
oill
eogtntouley end out
value 0f sH ana AA H
to pot 0 the altegatO
P0,
jov
Po ,
gov
Symp BBEk
Pext O a ciput to make it on rput
po mut be progomn
(recrsfeee already cogeeted) . the
to all the
eo ky
Erample Gqet o kyte fom p0
pl
gake po og npu
al! 1s to it
teggle
4, #sH
gov p., A
SJmp BAek
Ceample
ngtv
make p!
to
olata fom
nev RY,A
Jiut
enput (o) output.
be
can
qeeol any pull-ep
pot 2 doe qot
Uke
ha pul?-p
ih alsce Qaly to port 2 alterqaieY
Eeorple sega
A
to caele
8ACK: gov
DELAY
9cALL
SJmp 8ACK
e Siogle B- inetwehont
Fuqetion
Iosteuetionc = )
Set the bit ( bèt
SETB bit
dee the
SETB set