
2-1
ML63326 User's Manual
Chapter 2 CPU and Memory Spaces
2
Chapter 2 CPU and Memory Spaces
2.1 Overview
The ML63326 is equipped with an Oki’s original CPU core nX-4/250.
The instruction set of the nX-4/250 core consists of 439 types of instructions.
The memory space consists of a 16-bit wide program memory space, a 4-bit wide data
memory space, and an 8-bit wide memory space for storing voice synthesis and character
data. Further, it is possible to add an 8-bit wide memory space for voice synthesis and for
storing character data. A stack for saving the program counter during a subroutine call or
interrupt (call stack) and a stack for saving registers during a PUSH instruction (register stack)
are provided separately from the memory space.
The program memory space is used for program data, ROM table data and melody note data.
In the data memory space, special function registers (SFRs) are located in BANK 0, the LCD
display register (DSPR) in BANK 1, and data RAM in BANKS 2 to 7.
2.2 Registers
The nX-4/250 core processes data mainly with the accumulator and register set.
The register set is a programming model consisting of the HL and XY registers that store data
memory addresses, the current bank register (CBR), the extra bank register (EBR), the RA
register that stores program memory addresses, registers that control program flow, and
registers that control flags and memory.
2.2.1 Accumulator (A)
The accumulator (A) is the central register for various arithmetic operations.
At system reset, the accumulator is initialized to "0". When an interrupt occurs, a "PUSH HL"
instruction can be used if necessary to save the accumulator on the register stack. The
accumulator can be restored with a "POP HL" instruction.
3
2
1
0
Accumulator
A
G
C
Z
Flag register
2.2.2 Flag Register
The flag register consists of 3 flags: the carry flag (C), the zero flag (Z) and the G flag (G).
When an interrupt occurs, a "PUSH HL" instruction can be used if necessary to save the flag
register on the register stack. The flag register can be restored with a "POP HL" instruction.
2.2.2.1 Carry Flag (C)
The carry flag (C) is a 1-bit flag that is loaded with a carry during addition or a borrow during
subtraction. At system reset, the carry flag is initialized to "0".
Summary of Contents for ML63326
Page 3: ......
Page 13: ......
Page 14: ...Chapter 1 Overview 1 ...
Page 15: ......
Page 37: ...1 22 ML63326 User s Manual Chapter 1 Overview ...
Page 38: ...Chapter 2 CPU and Memory Spaces 2 ...
Page 39: ......
Page 50: ...CPU Control Functions Chapter 3 3 ...
Page 51: ......
Page 57: ...3 6 ML63326 User s Manual Chapter 3 CPU Control Functions ...
Page 58: ...Interrupt INT326 Chapter 4 4 ...
Page 59: ......
Page 71: ...4 12 ML63326 User s Manual Chapter 4 Interrupt INT326 ...
Page 72: ...Clock Generator Circuit OSC Chapter 5 5 ...
Page 73: ......
Page 83: ...5 10 ML63326 User s Manual Chapter 5 Clock Generator Circuit OSC ...
Page 84: ...Time Base Counter TBC Chapter 6 6 ...
Page 85: ......
Page 90: ...Timers TIMER Chapter 7 7 ...
Page 91: ......
Page 115: ...7 24 ML63326 User s Manual Chapter 7 Timers TIMER ...
Page 116: ...Chapter 8 8 100 Hz Timer Counter 100HzTC ...
Page 117: ......
Page 121: ...8 4 ML63326 User s Manual Chapter 8 100 Hz Timer Counter 100HzTC ...
Page 122: ...Chapter 9 9 Watchdog Timer WDT ...
Page 123: ......
Page 128: ...Chapter 10 10 Ports INPUT OUTPUT I O PORT ...
Page 129: ......
Page 170: ...Chapter 11 11 External Memory Transfer Function EXTMEM ...
Page 171: ......
Page 179: ...11 8 ML63326 User s Manual Chapter 11 External Memory Transfer Function EXTMEM ...
Page 180: ...Chapter 12 12 Melody Driver MELODY63K ...
Page 181: ......
Page 195: ...12 14 ML63326 User s Manual Chapter 12 Melody Driver MELODY63K ...
Page 196: ...13 Chapter 13 Voice Synthesis ...
Page 197: ......
Page 228: ...14 Chapter 14 Shift Register SFT ...
Page 229: ......
Page 236: ...15 Chapter 15 LCD Driver LCD ...
Page 237: ......
Page 250: ...16 Chapter 16 Battery Low Detect Circuit BLD ...
Page 251: ......
Page 255: ...16 4 ML63326 User s Manual Chapter 16 Battery Low Detect Circuit BLD ...
Page 256: ...Chapter 17 17 Power Supply Circuit POWER ...
Page 257: ......
Page 260: ...Appendixes ...
Page 261: ......
Page 321: ...Appendix 60 ML63326 User s Manual Appendix G ...