Skip to content

Commit 1c591ca

Browse files
committed
modified: asm/test.asm
new file: c/unicodetozh/1.c
1 parent 4b97fa8 commit 1c591ca

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

asm/test.asm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
global main
22

33
main:
4-
mov ebx, 1
5-
mov ecx, 2
6-
add ebx, ecx
4+
mov ebx, 1
5+
mov ecx, 2
6+
add ebx, ecx
77
8-
mov [a], ebx
9-
mov eax, [a]
10-
ret
8+
mov [a], ebx
9+
mov eax, [a]
10+
ret
1111

1212
section .data
1313
a dw 0

c/unicodetozh/1.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include <stdio.h>
2+
#include <stdlib.h>
3+
#include <locale.h>
4+
int main(void)
5+
{
6+
char str[12];
7+
wchar_t wstr[] = { 0x52B3, 0x788C, 0 };
8+
setlocale(LC_ALL, "");
9+
wcstombs(str, wstr, sizeof(str)/sizeof(char));
10+
printf("%s", str);
11+
return 0;
12+
}

0 commit comments

Comments
 (0)