100
0100
0101
0102
0103
0104
DM0200
DM0201
00
(1)
(3)
(5)
(7)
04
(2)
(4)
(6)
(8)
A$ =” (1)(2)(3)(4)(5)(6)(7)”
1 cycle
01015
01004
00115
01007
00302
01005
01006
Data transfer
P 1
Counter – 1
First cycle
Second cycle
PC write complete
Data length = 0
ASCII write complete
Data length
Data
Pointer
Counter
Indirect designation
6-4
Assembly Language Examples
Example 1: Classification of Characters
This program divides characters that are input from the keyboard into numeric
and character strings and then recombines them.
BASIC Program
100 DEF
USR0=&H2000
110 INPUT
A$
120
A$=USR0(A$)
130
PRINT A$
140
END
1, 2, 3...
1. Use MSET &H3000 to reserves an assembly language program area.
2. Key in MON to initiate assembly language monitor mode.
3. Key in CTRL+A <- Sets mini-assembler mode.
4. Key in the program sequentially from $2000.
5. Key in CTRL+B after the program has been input to return to BASIC mode.
The following memory areas are used as a program area, work area, and buffer
area:
Program Area
$2000 to $24FF
Program area
Work Area
$2500 to $2501
Stores buffer 1 (stores numerals) pointer
$2502 to $2503
Stores buffer 2 (stores characters) pointer
$2504 to $2505
Stores transfer source word
$2506 to $2507
Stores transfer destination word
Buffer Area
$25600 to $26FF
Numeral storage area
$2700 to $27FF
Character storage area
Assembly Language Examples
Section 6-4
Содержание C500-ASC04
Страница 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Страница 5: ...iv ...
Страница 7: ...vi ...