Debian Codegraph @

travis/test/utf.asm

raw
1 %define u(x) __utf16__(x)
2 %define w(x) __utf32__(x)
3 %define ul(x) __utf16le__(x)
4 %define wl(x) __utf32le__(x)
5 %define ub(x) __utf16be__(x)
6 %define wb(x) __utf32be__(x)
7
8 db `Test \u306a\U0001abcd\n`
9 dw u(`Test \u306a\U0001abcd\n`)
10 dd w(`Test \u306a\U0001abcd\n`)
11
12 db `\u306a`
13 db `\xe3\x81\xaa`
14
15 dw __utf16__ "Hello, World!"
16
17 nop
18
19 mov ax,u(`a`)
20 mov bx,u(`\u306a`)
21 mov cx,u(`\xe3\x81\xaa`)
22 mov eax,u(`ab`)
23 mov ebx,u(`\U0001abcd`)
24 mov ecx,w(`\U0001abcd`)
25
26 db `Test \u306a\U0001abcd\n`
27 dw ul(`Test \u306a\U0001abcd\n`)
28 dd wl(`Test \u306a\U0001abcd\n`)
29
30 db `\u306a`
31 db `\xe3\x81\xaa`
32
33 dw __utf16le__ "Hello, World!"
34
35 nop
36
37 mov ax,ul(`a`)
38 mov bx,ul(`\u306a`)
39 mov cx,ul(`\xe3\x81\xaa`)
40 mov eax,ul(`ab`)
41 mov ebx,ul(`\U0001abcd`)
42 mov ecx,wl(`\U0001abcd`)
43
44 db `Test \u306a\U0001abcd\n`
45 dw ub(`Test \u306a\U0001abcd\n`)
46 dd wb(`Test \u306a\U0001abcd\n`)
47
48 db `\u306a`
49 db `\xe3\x81\xaa`
50
51 dw __utf16be__ "Hello, World!"
52
53 nop
54
55 mov ax,ub(`a`)
56 mov bx,ub(`\u306a`)
57 mov cx,ub(`\xe3\x81\xaa`)
58 mov eax,ub(`ab`)
59 mov ebx,ub(`\U0001abcd`)
60 mov ecx,wb(`\U0001abcd`)
61
62 %ifdef ERROR
63 dw __utf16__ 33
64 dw __utf16__, 46
65 dw __utf16__("Hello, World!",16)
66 dw __utf16__("Hello, World!",16
67 dw u(`\xff`)
68
69 dw __utf16le__ 33
70 dw __utf16le__, 46
71 dw __utf16le__("Hello, World!",16)
72 dw __utf16le__("Hello, World!",16
73 dw ul(`\xff`)
74
75 dw __utf16be__ 33
76 dw __utf16be__, 46
77 dw __utf16be__("Hello, World!",16)
78 dw __utf16be__("Hello, World!",16
79 dw ub(`\xff`)
80 %endif