-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathto_ui16.z80
66 lines (59 loc) · 1.1 KB
/
to_ui16.z80
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
to_ui16_LUT:
.db (+_-$-1)/2
.dw ui8_convert_to_ui16
.dw ui16_convert_to_ui16
.dw ui32_convert_to_ui16
.dw fixed88_convert_to_ui16
.dw fixed1616_convert_to_ui16
.dw var_convert_to_ui16
.dw true_convert_to_ui16
.dw false_convert_to_ui16
.dw tstr_ref_convert_to_ui16
.dw raw_convert_to_ui16
.dw str_convert_to_ui16
.dw str_ref_convert_to_ui16
.dw single_convert_to_ui16
.dw xfloat_convert_to_ui16
.dw err_syntax
.dw err_syntax
.dw char_convert_to_ui16
_:
fixed88_convert_to_ui16:
inc de
char_convert_to_ui16:
ui8_convert_to_ui16:
;DE points to the data
;return in DE
ld a,(de)
ld e,a
ld d,0
ret
fixed1616_convert_to_ui16:
inc de
inc de
ui32_convert_to_ui16:
ui16_convert_to_ui16:
ex de,hl
ld e,(hl)
inc hl
ld d,(hl)
ret
true_convert_to_ui16:
ld de,1
ret
false_convert_to_ui16:
ld de,0
ret
var_convert_to_ui16:
tstr_ref_convert_to_ui16:
raw_convert_to_ui16:
str_convert_to_ui16:
str_ref_convert_to_ui16:
single_convert_to_ui16:
jp err_syntax
xfloat_convert_to_ui16:
ex de,hl
call x_to_int16
ex de,hl
ret
#include "conversion/x_to_int16.z80"