![background image](http://html.mh-extra.com/html/hyundai/gms800/gms800_instruction-manual_2196205041.webp)
Instruction Set
37
DI
( Disable all interrupts )
Function
: I
“ 0 ”
Description : Inhibit interrupts by clearing interrupt master flag(I)
Flag
:
Mnemonic
OP Code
Bytes
Cycles
DI
60
1
3
Example
:
243 C000 60
RESET:
DI
;Disable All Interrupts
244 C001 1E
LDX
#0
245 C003 C400
RAM_CLR:
LDA
#0
;RAM Clear(!0000H->!00BFH)
246 C005 FB
STA
{X}+
247 C006 5EC0
CMPX
#0C0H
248 C008 70F9
BNE
RAM_CLR
DIV
( Divide )
Function
: YA / X
Q: A, R: Y
Description : Divide 16bit accumulator(YA) by the X-register.
The quotient is left in the accumulator and The remainder is left in the Y-register.
Flag
:
Mnemonic
OP Code
Bytes
Cycles
DIV
9B
1
12
Example
:
464 C1D9 1E0A
HDCON:
LDX
#10
; LOAD DIVISOR
465 C1DB 3E00
LDY
#0
; LOAD DIVIDEND HIGH
466 C1DD C50C
LDA
ECD
; LOAD DIVIDEND LOW(SECOND)
467 C1DF 9B
DIV
468 C1E0 E510
STA
SECH
; STORE QUOTIENT
469 C1E2 BF
TYA
470 C1E3 E50F
STA
SECL
; STORE REMAINDER