This repository has been archived by the owner on Jul 12, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemail.malasm
198 lines (193 loc) · 4.4 KB
/
email.malasm
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
//
// Sample Malbolge Program displays my email address.
//
// author: Miklos Sagi, 20th May, 2015
//
// The very first thing to be done is to separate code and data 'segments'.
MOV C, [D] //this jumps to address 98 which is one byte in front of the 'new code
//segment' start
// The following operations up until address 98 could be misleading. They are not real
// operations just data used to reach the desired value in the A register.
ROTR [D]; MOV A, [D] // *
MOV C, [D] // i
NOP // o
NOP // o
EXIT // v
NOP // o
NOP // o
NOP // o
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
ROTR [D]; MOV A, [D] // *
NOP // o
EXIT // v
EXIT // v
NOP // o
NOP // o
IN A // /
NOP // o
MOV C, [D] // i
NOP // o
NOP // o
CRZ A, [D]; MOV A, [D] // p
ROTR [D]; MOV A, [D] // *
OUT A // <
NOP // o
CRZ A, [D]; MOV A, [D] // p
MOV C, [D] // i
ROTR [D]; MOV A, [D] // *
NOP // o
EXIT // v
MOV D, [D] // j
NOP // o
ROTR [D]; MOV A, [D] // *
MOV C, [D] // i
NOP // o
OUT A // <
MOV C, [D] // i
NOP // o
IN A // /
EXIT // v
NOP // o
OUT A // <
OUT A // <
NOP // o
NOP // o
NOP // o
NOP // o
EXIT // v
IN A // /
MOV C, [D] // i
NOP // o
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
NOP // o
NOP // o
NOP // o
MOV C, [D] // i
MOV D, [D] // j
EXIT // v
NOP // o
IN A // /
ROTR [D]; MOV A, [D] // *
NOP // o
MOV C, [D] //i
ROTR [D]; MOV A, [D] // *
MOV C, [D] // i
NOP // o
CRZ A, [D]; MOV A, [D] // p
EXIT // v
NOP // o
NOP // o
NOP // o
ROTR [D]; MOV A, [D] // *
ROTR [D]; MOV A, [D] // *
NOP // o
IN A // /
IN A // /
NOP // o
IN A // /
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
NOP // o
NOP // o padding: unused
NOP // o padding: unused
NOP // o padding: unused
NOP // o padding: unused
NOP // o padding: unused
NOP // o padding: unused
NOP // o padding: unused
NOP // o padding: unused
NOP // o padding: unused
NOP // o padding: unused
NOP // o padding: unused
NOP // o padding: unused
NOP // o padding: unused
NOP // o padding: unused
NOP // o padding: unused
//address 98, the very first jump operation lands here, encrypts this byte and
// moves on to the next op which is the
EXIT // v
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
OUT A // <
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
OUT A // <
NOP // o padding: this byte is unused: the desired byte is unreachable from this address
ROTR [D]; MOV A, [D] // *
ROTR [D]; MOV A, [D] // *
CRZ A, [D]; MOV A, [D] // p
OUT A // <
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
OUT A // <
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
OUT A // <
ROTR [D]; MOV A, [D] // *
CRZ A, [D]; MOV A, [D] // p
OUT A // <
ROTR [D]; MOV A, [D] // *
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
OUT A // <
ROTR [D]; MOV A, [D] // *
ROTR [D]; MOV A, [D] // *
CRZ A, [D]; MOV A, [D] // p
OUT A // <
ROTR [D]; MOV A, [D] // *
CRZ A, [D]; MOV A, [D] // p
OUT A // <
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
OUT A // <
ROTR [D]; MOV A, [D] // *
CRZ A, [D]; MOV A, [D] // p
OUT A // <
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
OUT A // <
ROTR [D]; MOV A, [D] // *
CRZ A, [D]; MOV A, [D] // p
OUT A // <
NOP // o padding: this byte is unused: the desired byte is unreachable from this address
NOP // o padding: this byte is unused: the desired byte is unreachable from this address
NOP // o padding: this byte is unused: the desired byte is unreachable from this address
ROTR [D]; MOV A, [D] // *
ROTR [D]; MOV A, [D] // *
CRZ A, [D]; MOV A, [D] // p
OUT A // <
ROTR [D]; MOV A, [D] // *
CRZ A, [D]; MOV A, [D] // p
OUT A // <
NOP // o padding: this byte is unused: the desired byte is unreachable from this address
NOP // o padding: this byte is unused: the desired byte is unreachable from this address
ROTR [D]; MOV A, [D] // *
ROTR [D]; MOV A, [D] // *
CRZ A, [D]; MOV A, [D] // p
OUT A // <
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
OUT A // <
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
OUT A // <
ROTR [D]; MOV A, [D] // *
CRZ A, [D]; MOV A, [D] // p
OUT A // <
NOP // o padding: this byte is unused: the desired byte is unreachable from this address
NOP // o padding: this byte is unused: the desired byte is unreachable from this address
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
OUT A // <
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
OUT A // <
ROTR [D]; MOV A, [D] // *
CRZ A, [D]; MOV A, [D] // p
CRZ A, [D]; MOV A, [D] // p
OUT A // <
EXIT