1 .
title Test of TLCS
-90 assembler
2 ; see http://www.bitsavers.org/components/toshiba/_dataBook/1988_Toshiba_TLCS-48_90_8_Bit_Microcontroller.pdf
4 offset = 0x11 ;arbitrary constants
10 ;***********************************************************
11 ; 4T (just loads for initialization)
18 ;***********************************************************
39 ;***********************************************************
54 ;***********************************************************
56 ld
sp, #stack
; 3E A0 FF
62 xor a
, b
; F8 65 ; as 4T
65 ;***********************************************************
67 ld de
, (sp) ; E6 49 ; as 6T
69 ld c
, (stack
) ; E7 A0 29
70 add a
, (stack
) ; 60 A0 ; as 4T
71 rrc
(sp) ; E6 A1 ; as 6T
75 ;***********************************************************
78 ld
offset(sp), e
; F6 11 23
79 ld d
, offset(sp) ; F2 11 2A ; as 8T
80 add a
, offset(sp) ; F2 11 60 ; as 8T
81 ;rr (stack) ; E7 A0 A3
82 res
5, (sp) ; E6 B5 ; as 6T
84 ;***********************************************************
86 and (stack
), #n
; EF A0 6C 20 ; as 6T
87 inc 1(sp) ; F2 01 87 ; as 8T
88 cp
1(sp), #n
; F6 01 6F 20 ; as 10T
90 ;***********************************************************
92 or 1(sp), #n
; F6 01 6E 20 ; as 10T
94 ;***********************************************************
96 mul hl
, #
3 ; 12 03 ; as 4T
98 ;***********************************************************
100 div hl
, b
; F8 13 ; as 4T
102 ;***********************************************************
104 mul hl
, (stack
) ; E7 A0 12 ; as 6T
105 ;mul hl, (stack8) ; E7 A0 12
107 ;***********************************************************
109 div hl
, offset(sp) ; F2 11 13 ; as 8T
111 ;***********************************************************
114 ld hl
, #stack
+ 2 ; 3A A2 FF
116 ;***********************************************************
118 ;div hl, (hl+a) ; EF 13
120 ;***********************************************************
123 and c
, #
0 ; F9 6C 00 ; as 4T (not 6T)
125 ld bc
, #fun2
; 38r85r00
128 call NZ
, fun1
; EBr83r00 DE
129 call Z
, fun1
; EBr83r00 D6