Skip to content

Commit 9ab095b

Browse files
feat(QS数值): add functions for unsigned to signed
1 parent 464205d commit 9ab095b

3 files changed

Lines changed: 63 additions & 0 deletions

File tree

QS数值/QS数值.eproject

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"Name": "QS数值",
3+
"Version": "1.0.0.0",
4+
"ProjectType": "WindowsECom",
5+
"SourceSet": "src",
6+
"OutFile": "../_Build/QS数值.ec",
7+
"Dependencies": [
8+
{
9+
"Kind": "ELib",
10+
"Name": "系统核心支持库",
11+
"FileName": "krnln",
12+
"Guid": "d09f2340818511d396f6aaf844c7e325",
13+
"Version": "5.7"
14+
},
15+
{
16+
"Kind": "ECom",
17+
"Name": "QS欢迎",
18+
"Path": "../_IntermediateBuild/QS欢迎.ec",
19+
"ReExport": false
20+
}
21+
]
22+
}

QS数值/src/Entry.ecode

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.程序集 Entry
2+
3+
.子程序 _启动子程序, 整数型, , 请在本子程序中放置易模块初始化代码
4+
5+
_临时子程序 () ' 在初始化代码执行完毕后调用测试代码
6+
返回 (0) ' 可以根据您的需要返回任意数值
7+
.子程序 _临时子程序
8+
9+
' 本名称子程序用作测试程序用,仅在开发及调试环境中有效,编译发布程序前将被系统自动清空,请将所有用作测试的临时代码放在本子程序中。 ***注意不要修改本子程序的名称、参数及返回值类型。
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.程序集 UnsignedToSigned
2+
3+
.子程序 数值_自然字节到短整数, 短整数型, 公开
4+
.参数 v, 字节型
5+
6+
置入代码 ({49, 192, 139, 77, 8, 138, 1, 201, 194, 4, 0})
7+
' xor eax,eax
8+
' mov ecx,[ebp+8]
9+
' mov al,byte [ecx]
10+
' leave
11+
' retn 4
12+
返回 (0)
13+
.子程序 数值_自然短整数到整数, 整数型, 公开
14+
.参数 v, 短整数型
15+
16+
置入代码 ({49, 192, 139, 77, 8, 102, 139, 1, 201, 194, 4, 0})
17+
' xor eax,eax
18+
' mov ecx,[ebp+8]
19+
' mov ax,word [ecx]
20+
' leave
21+
' retn 4
22+
返回 (0)
23+
.子程序 数值_自然整数到长整数, 长整数型, 公开
24+
.参数 v, 整数型
25+
26+
置入代码 ({139, 77, 8, 49, 210, 139, 1, 201, 194, 4, 0})
27+
' mov ecx,[ebp+8]
28+
' xor edx,edx
29+
' mov eax,dword [ecx]
30+
' leave
31+
' retn 4
32+
返回 (0)

0 commit comments

Comments
 (0)