Hyundai GMS800 Instruction Manual page 39

Gms800 series 8-bit single-chip microcomputers
Table of Contents

Advertisement

DAS
( Decimal adjust for subtraction )
Function
:
C
0
0
1
1
Description : After subtraction, convert the hex. data of accumulator to decimal data.

Flag
:
Mnemonic
DAS
Example
:
416
417
418
419 F870 A0
420 F871 C456
421 F873 2487
422 F875 CF
423 F876 E533
DBNE
( Decrement and branch if not equal )

Function
: ( M )
if (Z)
Description : Decrement the contents of memory by 1.
If the result is not zero, branch to specified address.

Flag
:
Mnemonic
DBNE dp,rel
DBNE Y,rel
Example
:
755 C3AC E44619
756 C3AF AC19FD
757 C3B2 6F
Before
H
A
~A
A
7
4
(hex)
(hex)
0
0 ~ 9
1
0 ~ 8
6 ~ F
0
7 ~ F
1
6 ~ F
6 ~ F
OP Code
CF
;***************************
; DECIMAL SUBTRACTION
;***************************
SETC
LDA
SBC
DAS
STA

( M )
1 ,

0 , then
( PC )
OP Code
AC
7B
LDM
DLYLP1:
DBNE
RET
After
~A
ADDED
3
0
0 ~ 9
00
FA ( = -06 )
0 ~ 9
A0 ( = -60 )
9A ( = -66 )
Bytes
Cycles
1
*
; set carry
#56H
; 56H -> A
#87H
; Acc. = 56H - 87H
; Acc= 69H
DA_CNT
( PC ) + rel
Bytes
Cycles
3
2
DLYDAT,#46H
; 250u sec delay (clock = 4MHz)
DLYDAT,DLYLP1
C
0
0
1
1
3
5/7
4/6
Instruction Set
35

Advertisement

Table of Contents
loading

Table of Contents