查看: 735|回复: 1
|
C#写的Win32编译器
[复制链接]
|
|
本帖最后由 褐眼睛 于 1-6-2021 06:50 PM 编辑
看到吗?个人设计的程序语言:
支持生成3072字节的EXE.(如图所示)
更多源码例子:
- LET b= 20
- b /= 2
- MSGBOX b
- b +=30
- b -=1
- MSGBOX b
- LET c=40
- c*= 22
- MSGBOX c
复制代码 以上代码会被我的编译器转换成x86机器指令码:
- 0: A1 04 10 40 00 MOV EAX,DS:0X401004
- 5: 31 D2 XOR EDX,EDX
- 7: BB 02 00 00 00 MOV EBX,0X2
- C: F7 FB IDIV EBX
- E: A3 04 10 40 00 MOV DS:0X401004,EAX
- 13: A1 04 10 40 00 MOV EAX,DS:0X401004
- 18: 50 PUSH EAX
- 19: 68 00 10 40 00 PUSH 0X401000
- 1E: 68 00 20 40 00 PUSH 0X402000
- 23: FF 15 88 30 40 00 CALL DWORD PTR DS:0X403088
- 29: C6 05 02 20 40 00 00 MOV BYTE PTR DS:0X402002,0X0
- 30: 6A 40 PUSH 0X40
- 32: 68 0C 10 40 00 PUSH 0X40100C
- 37: 68 00 20 40 00 PUSH 0X402000
- 3C: 6A 00 PUSH 0X0
- 3E: FF 15 84 30 40 00 CALL DWORD PTR DS:0X403084
- 44: A1 04 10 40 00 MOV EAX,DS:0X401004
- 49: 05 1E 00 00 00 ADD EAX,0X1E
- 4E: A3 04 10 40 00 MOV DS:0X401004,EAX
- 53: A1 04 10 40 00 MOV EAX,DS:0X401004
- 58: 2D 01 00 00 00 SUB EAX,0X1
- 5D: A3 04 10 40 00 MOV DS:0X401004,EAX
- 62: A1 04 10 40 00 MOV EAX,DS:0X401004
- 67: 50 PUSH EAX
- 68: 68 00 10 40 00 PUSH 0X401000
- 6D: 68 00 20 40 00 PUSH 0X402000
- 72: FF 15 88 30 40 00 CALL DWORD PTR DS:0X403088
- 78: C6 05 02 20 40 00 00 MOV BYTE PTR DS:0X402002,0X0
- 7F: 6A 40 PUSH 0X40
- 81: 68 38 10 40 00 PUSH 0X401038
- 86: 68 00 20 40 00 PUSH 0X402000
- 8B: 6A 00 PUSH 0X0
- 8D: FF 15 84 30 40 00 CALL DWORD PTR DS:0X403084
- 93: A1 08 10 40 00 MOV EAX,DS:0X401008
- 98: 69 C0 16 00 00 00 IMUL EAX,0X16
- 9E: A3 08 10 40 00 MOV DS:0X401008,EAX
- A3: A1 08 10 40 00 MOV EAX,DS:0X401008
- A8: 50 PUSH EAX
- A9: 68 00 10 40 00 PUSH 0X401000
- AE: 68 00 20 40 00 PUSH 0X402000
- B3: FF 15 88 30 40 00 CALL DWORD PTR DS:0X403088
- B9: C6 05 03 20 40 00 00 MOV BYTE PTR DS:0X402003,0X0
- C0: 6A 40 PUSH 0X40
- C2: 68 64 10 40 00 PUSH 0X401064
- C7: 68 00 20 40 00 PUSH 0X402000
- CC: 6A 00 PUSH 0X0
- CE: FF 15 84 30 40 00 CALL DWORD PTR DS:0X403084
- D4: 50 PUSH EAX
- D5: FF 15 60 30 40 00 CALL DWORD PTR DS:0X403060
复制代码 欢迎访问:http://sambalcompiler.org/
|
|
|
|
|
|
|
|
楼主 |
发表于 26-6-2021 11:00 PM
|
显示全部楼层
|
|
|
|
|
|
| |
本周最热论坛帖子
|