104
Assembly language program operation:
The numbers and characters are separated and stored in the number stor-
age buffer and the character storage buffer, respectively. Then numeric
strings and character strings are restored as the original character variables.
This program has no practical application; it is an example only.
Assembly Program
Saves registers
Sets first address of buffer 1 in pointer 1
Sets first address of buffer 2 in pointer 2
Number of characters to GET
Character variable first address GET
DOUNTIL (number of times equal to the number of characters)
Character GET
Character variable address p 1
IF ($30 min.)
THEN
IF (numeral less than $39)
THEN
Stores numeral in buffer 1
ENDIF
Stores character in buffer 2
Updates counter
ENDDO
Transfer from buffer 1 to a character variable
$2000 PSHA
PSHB
PSHX
LDD
#$2600
STD
$2500
LDD #$2700
STD
$2502
LDAB
0,X
LDX
1,X
STX
$2504
$2016 LDX $2504
LDAA
0,X
INX
STX $2504
CMPA #$30
BLT $2032
CMPA #$39
BHI
$2032
LDX $2500
STAA
0,X
INX
STX $2500
BRA $203B
$2032 LDX $2502
STAA
0,X
INX
STX $2502
$203B DECB
BNE $2016
LDD $2500
LDX #$2600
STX $2504
Assembly Language Example
Section 6-3
Содержание SYSMAC C200H-ASC02
Страница 1: ...Cat No W165 E1 04 ASCII Unit SYSMAC C200H ASC02 ...
Страница 2: ...C200H ASC02 ASCII Unit Operation Manual Revised September 2002 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 7: ...TABLE OF CONTENTS viii Glossary 159 Index 163 Revision History 165 ...
Страница 122: ...Appendix B Specifications 115 130 35 100 5 ...
Страница 167: ...Cat No W165 E1 04 Note Specifications subject to change without notice Printed in Japan Authorized Distributor ...
Страница 168: ...Cat No W165 E1 04 C200H ASC02 ASCII Unit OPERATION MANUAL ...