![background image](http://html.mh-extra.com/html/hyundai/gms800/gms800_instruction-manual_2196205061.webp)
Instruction Set
57
STYA
( Store YA - 16bit accumulator )
Function
: ( dp +1 ) ( dp )
YA
Description : Store the contents of 16bit accumulator(YA) to memory pair
Flag
:
Mnemonic
OP Code
Bytes
Cycles
STYA dp
DD
2
5
Example
:
405
;=============================
406
; 16-BIT DATA PROCESS
407
;=============================
408 F868 7D30
LDYA
30H
409 F86A 1D40
ADDW
40H
; M(31H)M(30H) + M(41H)M(40H)
410 F86C DD50
STYA
50H
; YA -> M(51H)M(50H)
SUBW
(Subtract word without Carry )
Function
: YA
( YA )
( dp+1 ) ( dp )
Description : Subtract the contents of memory pair from 16-bit accumulator(YA).
Flag
:
Mnemonic
OP Code
Bytes
Cycles
SUBW dp
3D
2
5
Example
:
430
DATA_WORD DS
2
431 C16C E4AA18
LDM
DATA_WORD,#0AAH
432 C16F E43F19
LDM
DA1,#03FH
433 C172 C47F
LDA
#7FH
434 C174 3EEA
LDY
#0EAH
435 C176 3D18
SUBW
DATA_WORD
436 C178 DD18
STYA
DATA_WORD