Assembly Language Examples - Omron C500-ASC04 Operation Manual

Ascii unit
Table of Contents

Advertisement

Assembly Language Examples

1 cycle
01015
01004
00115
First cycle
Data transfer
Pointer + 1
PC write complete
Counter – 1
01007
00302
01005
01006
6-4
Assembly Language Examples
Example 1: Classification of Characters
BASIC Program
1, 2, 3...
100
Second cycle
Data length = 0
ASCII write complete
This program divides characters that are input from the keyboard into numeric
and character strings and then recombines them.
100
DEF USR0=&H2000
110
INPUT A$
120
A$=USR0(A$)
130
PRINT A$
140
END
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
Work Area
$2500 to $2501
$2502 to $2503
$2504 to $2505
$2506 to $2507
Buffer Area
$25600 to $26FF
$2700 to $27FF
A$ =" (1)(2)(3)(4)(5)(6)(7)"
0100
00
0101
(1)
0102
(3)
0103
(5)
0104
(7)
Pointer
DM0200
DM0201
Counter
Program area
Stores buffer 1 (stores numerals) pointer
Stores buffer 2 (stores characters) pointer
Stores transfer source word
Stores transfer destination word
Numeral storage area
Character storage area
Section 6-4
Data length
04
(2)
(4)
Data
(6)
(8)

Advertisement

Table of Contents
loading

Table of Contents