Advanced Function Instruction
7-40
FUN 60 P
→ASC
ASCII CONVERSION
FUN 60 P
→ASC
S : Alphanumerics to be converted into ASCII code
D : Starting register storing ASCII results
WY WM WS TMR CTR HR OR SR ROR DR Alphanumeric
Range
Ope-
rand
WY0
∣
WY240
WM0
∣
WM1896
WS0
∣
WS984
T0
∣
T255
C0
∣
C255
R0
∣
R3839
R3904
∣
R3967
R3968
∣
R4167
R5000
∣
R8071
D0
∣
D4095
1~12
alphanumeric
S ○
D ○ ○ ○ ○ ○ ○ ○ ○* ○* ○
● When conversion control "EN" = 1 or "EN↑" ( P instruction) has a transition from 0 to 1, will convert
alphabets and numbers stored in S (S has a maximum of 12 alphanumeric character) into ASCII and store
it into registers starting from D. Each 2 alphanumeric characters occupy one 16-bit register.
● The application of this instruction, most often, stores alphanumeric information within a program, and waits
until certain conditions occur, then converts this alphanumeric information into ASCII and conveys it to
external display devices which can accept ASCII code.
X0
EN
S : ABCDEF
60P. ASC
D :
ERR
R0
z The instruction at left converts the 6 alphabets
-ABCDEF into ASCII then stores it into 3 successive
registers starting from R0.
S D
High Byte Low Byte
R0 42(B) 41(A)
R1 44(D) 43(C)
Alphabet
ABCDEF
X0=
Ö
R2 46(F) 45(E)