-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPowerPC_Examples.html
More file actions
575 lines (402 loc) · 70.9 KB
/
Copy pathPowerPC_Examples.html
File metadata and controls
575 lines (402 loc) · 70.9 KB
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
<!DOCTYPE html>
<html>
<head><!-- Primary Meta Tags -->
<title>PowerPC For Dummies - Code Examples - Wii Gecko Code Creation</title>
<meta content="PowerPC For Dummies - Code Examples - Wii Gecko Code Creation" name="title" />
<meta content="Examples for using PowerPC instructions to create gecko codes for Wii Games, simplified in a way that allows even the most braindead individuals (like myself) to understand. Written by Jimmy Kaz and Kiwi515" name="description" /><!-- Open Graph / Facebook -->
<meta content="website" property="og:type" />
<meta content="https://jimkatz.github.io/PowerPC_Examples.html" property="og:url" />
<meta content="PowerPC For Dummies - Code Examples - Wii Gecko Code Creation" property="og:title" />
<meta content="Examples for using PowerPC instructions to create gecko codes for Wii Games, simplified in a way that allows even the most braindead individuals (like myself) to understand. Written by Jimmy Kaz and Kiwi515" property="og:description" />
<meta content="" property="og:image" /><!-- Twitter -->
<meta content="summary_large_image" property="twitter:card" />
<meta content="https://jimkatz.github.io/PowerPC_Examples.html" property="twitter:url" />
<meta content="PowerPC For Dummies - Code Examples - Wii Gecko Code Creation" property="twitter:title" />
<meta content="Examples for using PowerPC instructions to create gecko codes for Wii Games, simplified in a way that allows even the most braindead individuals (like myself) to understand. Written by Jimmy Kaz and Kiwi515" property="twitter:description" />
<meta content="" property="twitter:image" />
<meta content="powerpc, wii powerpc, jimmy kaz, jimmykaz, jimmyKatz, Wii Modding, how to make gecko codes, PowerPC, rlwinm, powerpc rlwinm, Wii PowerPC tutorial, how to make cheat codes, how to make cheat codes wii, wii jimmy kaz, wii jimmykazakhstan" name="keywords" />
<meta content="index, follow" name="robots" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="English" name="language" />
<meta content="2 days" name="revisit-after" />
<meta content="Jimmy Kaz and Kiwi515" name="author" />
<meta content="JimmyKazakhstan, Jimmy Kaz, wii modding, wii jimmy kaz, jimmy kaz wii, jimmy kaz, wii modding tools, wii pmp editor, wii play tanks level editor, riivolution xml editor, wii gecko code creator, wii powerpc, wii sports mods, wii sports jimmy kaz, jimmy kaz wii sports, wii sports mods jimmy kaz, wii sports resort mods, wii sports resort storm island, wii jimmykazakhstan" name="keywords" />
<meta content="index, follow" name="robots" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="English" name="language" />
<meta content="2 days" name="revisit-after" />
<meta content="Jimmy Kaz" name="author" />
</head>
<body>
<table style="font-family: sans-serif;">
<tbody>
<tr>
<td id="navigation" style="vertical-align: top;">
<div class="row" style="color: rgb(34, 34, 34); padding: 0px; margin: 0px; width: 174px; font-size: 9pt; border: 1px solid rgb(208, 208, 208); background: rgb(255, 255, 255); clear: both;" title="ARCentral.net"><strong>RIP GECKOCODES.ORG</strong></div>
</td>
<td style="vertical-align: top;">
<div class="list" style="float: left; padding: 0px 0px 10px; display: inline; font-size: 10pt; margin: 20px 0px 10px 10px; border-width: 3px; border-style: solid; border-color: rgb(25, 176, 233); background: rgb(255, 255, 255); min-height: 125px;">
<div class="title" style="clear: both; width: 800px; text-align: center; padding: 7px 0px; margin: 0px 0px 10px; color: rgb(255, 255, 255); background: rgb(25, 176, 233); font-size: 14pt; font-weight: bold; overflow: hidden; height: 25px;">PowerPC For Dummies - Examples And Guides</div>
<table class="codetypes" style="width: 800px; margin: 0px; padding: 0px; border: 0px; border-collapse: collapse;">
<tbody>
<tr>
<td colspan="2" style="vertical-align: top; padding-right: 15px;">
<div class="ctsmall" style="margin: -5px 0px 5px 10px; padding: 0px; font-size: 8pt;"> </div>
<div class="ctsmall" style="margin: -5px 0px 5px 10px; padding: 0px;"><span style="font-size:24px;"><b>If any of this is wrong, or if you're still confused about something...</b></span></div>
<div class="ctsmall" style="margin: -5px 0px 5px 10px; padding: 0px;"><span style="font-size:24px;"><b>check the <a href="https://jimkatz.github.io/powerpc_for_dummies">main page,</a> or contact me on discord <span style="color:#FF0000;">"JimmyK#2848</span></b></span></div>
</td>
</tr>
<tr>
<td style="vertical-align: top; padding-right: 15px;">
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;">The Basics</div>
<p style="font-family: sans-serif; font-size: 13.3333px; background-color: rgb(255, 255, 255); text-align: center;"><br />
<strong><span style="font-size:24px;"><span style="font-family:tahoma,geneva,sans-serif;"><span style="color:#000000;">Let's start this guide off with some easy to assemble codes in Gecko Code format.</span><br />
<span style="font-size:8px;"><span style="color:#FFFFFF;">Guide by Jimmy Kaz</span></span></span></span></strong></p>
<hr />
<div class="ct bg1 b8" style="font-family: sans-serif; font-size: 13.3333px; margin: 0px 0px 30px 15px; padding: 0px; background: rgb(240, 240, 240); border: 1px solid rgb(208, 208, 208);">
<div class="title b3 c3 bg5" style="width: auto; padding: 0px 0px 0px 2px; margin: 0px; color: rgb(25, 176, 233); background: rgb(255, 255, 255); font-size: 11pt; font-weight: bolder; overflow: hidden; height: auto; border-width: 1px; border-color: rgb(25, 176, 233); border-style: none none solid;">Ram Write<a id="RamWrite" name="RamWrite"></a></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><b>04<span style="color:#FF0000;">XXXXXX YYYYYYYY</span></b>
<hr />
<p>This will force the game to replace the value at an address.</p>
<p>Replace the X values with the address you want to replace a value in.<br />
Replace the Y values with the value you want to put in said address</p>
<hr />
<p>Example</p>
<p><strong>04000004 00000001</strong></p>
<p>This will force the game to always make address 0x80000004 have the value of "0x1<span style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);">"</span></p>
</div>
</div>
<div class="ct bg1 b8" style="font-family: sans-serif; font-size: 13.3333px; margin: 0px 0px 30px 15px; padding: 0px; background: rgb(240, 240, 240); border: 1px solid rgb(208, 208, 208);">
<div class="title b3 c3 bg5" style="width: auto; padding: 0px 0px 0px 2px; margin: 0px; color: rgb(25, 176, 233); background: rgb(255, 255, 255); font-size: 11pt; font-weight: bolder; overflow: hidden; height: auto; border-width: 1px; border-color: rgb(25, 176, 233); border-style: none none solid;">Instruction Replace<a id="InstructionReplace" name="InstructionReplace"></a></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><strong>C2<span style="color:#FF0000;">XXXXXX</span> 00000001<br />
<span style="color:#FF0000;">YYYYYYYY</span> 00000000</strong>
<hr />
<p>This will replace an assembly instruction. For the sake of simplicity, I will not go into detail about the different types of instructions. Those are explained in further detail below.</p>
<p>The X values specify the address you want to execute the instruction at.<br />
The Y values specify the instruction that will be executed at said address.</p>
</div>
</div>
<hr />
<p style="text-align: center;"><strong style="font-family: sans-serif; text-align: center; background-color: rgb(255, 255, 255); font-size: 13.3333px;"><span style="font-size: 24px;"><span style="font-family: tahoma, geneva, sans-serif;"><span style="font-size: 48px;">Now for the assembly tutorials.</span></span></span></strong></p>
<hr />
<p> </p>
<div class="ct bg1 b8" style="font-family: sans-serif; font-size: 13.3333px; margin: 0px 0px 30px 15px; padding: 0px; background: rgb(240, 240, 240); border: 1px solid rgb(208, 208, 208);">
<div class="title b3 c3 bg5" style="width: auto; padding: 0px 0px 0px 2px; margin: 0px; color: rgb(25, 176, 233); background: rgb(255, 255, 255); font-size: 11pt; font-weight: bolder; overflow: hidden; height: auto; border-width: 1px; border-color: rgb(25, 176, 233); border-style: none none solid;">Load An Address into a Register<a id="LoadAddressIntoRegister" name="LoadAddressIntoRegister"></a></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><strong>lis r0, 0x8000<br />
ori r0, r0, 0xFFFF</strong>
<hr /><br style="font-size: 13.3333px;" />
This will load address <strong>0x8000FFFF</strong> into register 0<br style="font-size: 13.3333px;" />
<br style="font-size: 13.3333px;" />
<span style="font-size: 13.3333px;">You might be thinking "why not just use <strong>li</strong> for the bottom half of the register?"</span></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><strong>"li" </strong><span style="font-size: 13.3333px;">can only load values up to 0x7FFF into a register, whereas</span><strong> "ori"</strong><span style="font-size: 13.3333px;"> can load values up to 0xFFFF</span></div>
<div class="ctlinks" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border: 0px; margin: 8px 0px 0px; padding: 0px 0px 8px; text-align: right;"> </div>
</div>
<div class="ct bg1 b8" style="font-family: sans-serif; font-size: 13.3333px; margin: 0px 0px 30px 15px; padding: 0px; background: rgb(240, 240, 240); border: 1px solid rgb(208, 208, 208);">
<div class="title b3 c3 bg5" style="width: auto; padding: 0px 0px 0px 2px; margin: 0px; color: rgb(25, 176, 233); background: rgb(255, 255, 255); font-size: 11pt; font-weight: bolder; overflow: hidden; height: auto; border-width: 1px; border-color: rgb(25, 176, 233); border-style: none none solid;"><a id="ReplaceAddressValue" name="ReplaceAddressValue" style="background-size: 16px;">Replace A Value at an Address</a></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;">
<p><span style="font-size: 13.3333px;">This type of code requires 2 registers.</span></p>
<p><span style="color: rgb(255, 0, 0);"> # Assume that you want to replace the value at the address 0x8000FFFF<br />
# First, you need to load it into a register.<br />
# Let's load it into Register 0 as an example.</span></p>
<p><strong> lis r0, 0x8000<br />
ori r0, r0, 0xFFFF</strong></p>
<p><strong><span style="color: rgb(255, 0, 0); font-size: 13.3333px;"> # Register 0 now holds the address 0x8000FFFF</span></strong></p>
<p><span style="color: rgb(255, 0, 0); font-size: 13.3333px;"> # Next, you need to load the value you want to replace at the address you loaded into register 0</span></p>
<p><span style="color: rgb(255, 0, 0);"> # Assume that the value you want to replace at 0x8000FFFF is "0x5" </span></p>
<p><strong> li r1, 0x5</strong></p>
<p><strong><span style="color: rgb(255, 0, 0); font-size: 13.3333px;"> # Register 0 now holds the address 0x8000FFFF</span></strong></p>
<p><span style="color: rgb(255, 0, 0); font-size: 13.3333px;"> # Finally, you have to store the value into the address</span></p>
<p><strong style="font-size: 13.3333px; text-align: center;"><span style="color: rgb(255, 0, 0); font-size: 13.3333px;"> # This instruction below basically tells the code "Whatever value is in register 1 will be stored into the address held in register 0"</span></strong></p>
<p><strong> stw r1, 0x0(r0)</strong></p>
<hr />
<p>The value at address <strong>0x8000FFFF</strong> is now <strong>"0x5"</strong></p>
</div>
</div>
<div class="ct bg1 b8" style="font-family: sans-serif; font-size: 13.3333px; margin: 0px 0px 30px 15px; padding: 0px; background: rgb(240, 240, 240); border: 1px solid rgb(208, 208, 208);">
<div class="title b3 c3 bg5" style="width: auto; padding: 0px 0px 0px 2px; margin: 0px; color: rgb(25, 176, 233); background: rgb(255, 255, 255); font-size: 11pt; font-weight: bolder; overflow: hidden; height: auto; border-width: 1px; border-color: rgb(25, 176, 233); border-style: none none solid;">Specify an Operation in MEM2<a id="mem2" name="mem2"></a></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;">42000000 90000000
<hr /><br style="font-size: 13.3333px;" />
This sets the code base to 90XXXXXX</div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><b>A 04 ram write code type will now affect any address starting with 0x90</b></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><b>A 05 ram write type code will now effect any address starting with 0x91</b></div>
<div class="ctlinks" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border: 0px; margin: 8px 0px 0px; padding: 0px 0px 8px; text-align: right;"> </div>
</div>
<div class="ct bg1 b8" style="font-family: sans-serif; font-size: 13.3333px; margin: 0px 0px 30px 15px; padding: 0px; background: rgb(240, 240, 240); border: 1px solid rgb(208, 208, 208);">
<div class="title b3 c3 bg5" style="width: auto; padding: 0px 0px 0px 2px; margin: 0px; color: rgb(25, 176, 233); background: rgb(255, 255, 255); font-size: 11pt; font-weight: bolder; overflow: hidden; height: auto; border-width: 1px; border-color: rgb(25, 176, 233); border-style: none none solid;">Specify an Operation in MEM3<a id="mem3" name="mem3"></a></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;">42000000 92000000
<hr /><br style="font-size: 13.3333px;" />
This sets the code base to 92XXXXXX</div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><b>A 04 ram write code type will now affect any address starting with 0x92</b></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><b>A 05 ram write type code will now effect any address starting with 0x93</b></div>
<div class="ctlinks" style="background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border: 0px; margin: 8px 0px 0px; padding: 0px 0px 8px; text-align: right;"> </div>
</div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;">Branches</div>
<div class="ct bg1 b8" style="font-family: sans-serif; font-size: 13.3333px; margin: 0px 0px 30px 15px; padding: 0px; background: rgb(240, 240, 240); border: 1px solid rgb(208, 208, 208);">
<div class="title b3 c3 bg5" style="width: auto; padding: 0px 0px 0px 2px; margin: 0px; color: rgb(25, 176, 233); background: rgb(255, 255, 255); font-size: 11pt; font-weight: bolder; overflow: hidden; height: auto; border-width: 1px; border-color: rgb(25, 176, 233); border-style: none none solid;">Branch<a id="Branch" name="Branch"></a></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;">When your code reaches this instruction, it will jump to wherever you specify.
<p><span style="color:#000000;"><strong><span style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);">EXAMPLE:</span></strong></span></p>
<p><strong>li r0, 1<br />
b <span style="color:#0000FF;">function2</span></strong></p>
<p><strong><span style="color:#0000FF;">function2:</span><br />
li r0, 2</strong></p>
<p><span style="color: rgb(255, 0, 0); font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"># After the execution of the li instruction, the code will execute the "b" instruction, this will cause the code to jump to "function2" and start executing every instruction in that function</span></p>
<hr />
<p><span style="font-family: sans-serif; font-size: 13.3333px; text-align: right;"> </span><span style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);">This is equivalent to a "goto" statement.</span></p>
</div>
</div>
<div class="ct bg1 b8" style="font-family: sans-serif; font-size: 13.3333px; margin: 0px 0px 30px 15px; padding: 0px; background: rgb(240, 240, 240); border: 1px solid rgb(208, 208, 208);">
<div class="title b3 c3 bg5" style="width: auto; padding: 0px 0px 0px 2px; margin: 0px; color: rgb(25, 176, 233); background: rgb(255, 255, 255); font-size: 11pt; font-weight: bolder; overflow: hidden; height: auto; border-width: 1px; border-color: rgb(25, 176, 233); border-style: none none solid;">Branch And Link<a id="BranchAndLink" name="BranchAndLink"></a></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;">This is basically an instruction that tells your code to execute a specific function and then return to where it originally branched from.
<p>This instruction type requires the mflr and mtlr instruction types, I haven't been able to simplify the explanation for how those 2 instruction work yet.</p>
<p>Example will be added as soon as I can simplify this.</p>
</div>
</div>
<div class="ct bg1 b8" style="font-family: sans-serif; font-size: 13.3333px; margin: 0px 0px 30px 15px; padding: 0px; background: rgb(240, 240, 240); border: 1px solid rgb(208, 208, 208);">
<div class="title b3 c3 bg5" style="width: auto; padding: 0px 0px 0px 2px; margin: 0px; color: rgb(25, 176, 233); background: rgb(255, 255, 255); font-size: 11pt; font-weight: bolder; overflow: hidden; height: auto; border-width: 1px; border-color: rgb(25, 176, 233); border-style: none none solid;">Branch To Link Register<a id="BranchToLinkRegister" name="BranchToLinkRegister"></a></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;">This instruction causes your code to branch to whatever address is held in the <strong>Link Register.</strong></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;">Example will be added as soon as I can simplify the process.</div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
</div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;">Advanced Operations</div>
<div class="ct bg1 b8" style="font-family: sans-serif; font-size: 13.3333px; margin: 0px 0px 30px 15px; padding: 0px; background: rgb(240, 240, 240); border: 1px solid rgb(208, 208, 208);">
<div class="title b3 c3 bg5" style="width: auto; padding: 0px 0px 0px 2px; margin: 0px; color: rgb(25, 176, 233); background: rgb(255, 255, 255); font-size: 11pt; font-weight: bolder; overflow: hidden; height: auto; border-width: 1px; border-color: rgb(25, 176, 233); border-style: none none solid;">Specify the amount of times you want something to happen in a code<a id="MoveToCountRegister" name="MoveToCountRegister"></a></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;">There are 2 parts to this. Specifying the amount, and the code itself.</div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;">
<p><span style="color:#FF0000;"># The value of "X" in the li instruction is the amount of times your code will loop</span></p>
<p><strong>li r0, 4<br />
mtctr r0</strong></p>
<p><span style="color: rgb(255, 0, 0); font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"># Register 0 now countains the amount of times the code will loop, which in this case is "4"</span></p>
<p><span style="color: rgb(255, 0, 0); font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"># Now for the actual code.</span></p>
<p><strong><span style="color:#0000FF;">function:</span><br />
addi r1, r1, 0x1<br />
bdnz <span style="color:#0000FF;">function</span></strong></p>
<p><strong><span style="color:#000000;">b</span><span style="color:#0000FF;"> loop_has_stopped</span></strong></p>
<p> </p>
</div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><span style="color: rgb(255, 0, 0); font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"># The instruction </span><span style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><strong style="">"bdnz" </strong></span><span style="color: rgb(255, 0, 0); font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);">subtracts 1 from the Count Register (The value in Register 0) each time it's ran, when the value in the Count Register is 0, the loop stops.</span></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><span style="color:#FF0000;"># In this context, the code above will add "1" to the value in register 1, This will happen 4 times, After the 4th time, the count register will have the value "0" and the loop will stop. The code will then branch to the next function named</span><strong><span style="color:#0000FF;"> "<strong style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);">loop_has_stopped"</strong></span></strong></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
</div>
<div class="ct bg1 b8" style="font-family: sans-serif; font-size: 13.3333px; margin: 0px 0px 30px 15px; padding: 0px; background: rgb(240, 240, 240); border: 1px solid rgb(208, 208, 208);">
<div class="title b3 c3 bg5" style="width: auto; padding: 0px 0px 0px 2px; margin: 0px; color: rgb(25, 176, 233); background: rgb(255, 255, 255); font-size: 11pt; font-weight: bolder; overflow: hidden; height: auto; border-width: 1px; border-color: rgb(25, 176, 233); border-style: none none solid;">Load The CPU Clock into a Register<a id="TimeBaseLow" name="TimeBaseLow"></a></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><span style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);">This is a trick that most, if not all randomization codes use. I don't know if there is any other way to make one besides using a game's rng seed though.</span></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><span style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);">I'm mostly just listing the mftbl (Move From Time Base Low) instruction here because it isn't doccumented anywhere, at least to my knowledge.</span><br />
</div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><span style="font-family: monospace; font-size: 13.3333px; color: rgb(255, 0, 0); background-color: rgb(240, 240, 240);"># Let's move the CPU Clock into a register.</span></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><strong>mftbl r0</strong></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><span style="color:#FF0000;"># r0 now contains the CPU Clock</span></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"><span style="font-family: monospace; font-size: 13.3333px; color: rgb(255, 0, 0); background-color: rgb(240, 240, 240);"># That's all for the instruction. I can't give a randomization example just yet, it involves many different variables.</span><br />
</div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
</div>
<div class="ct bg1 b8" style="font-family: sans-serif; font-size: 13.3333px; margin: 0px 0px 30px 15px; padding: 0px; background: rgb(240, 240, 240); border: 1px solid rgb(208, 208, 208);">
<div class="title b3 c3 bg5" style="width: auto; padding: 0px 0px 0px 2px; margin: 0px; color: rgb(25, 176, 233); background: rgb(255, 255, 255); font-size: 11pt; font-weight: bolder; overflow: hidden; height: auto; border-width: 1px; border-color: rgb(25, 176, 233); border-style: none none solid;">Create a Stack Frame<a id="StackFrameMake" name="StackFrameMake"></a></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;">
<p>To put it simply, if you don't make one of these, the game you're making a code for will crash if you try and replace a value in Registers 0 - 4.</p>
<p>It's going to take a while for me to be able to simplfy the whole process of it.<br />
<br />
<strong>So for now, here is kiwi515's explanation of it</strong><br />
</p>
<p><span style="color: rgb(255, 0, 0); font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"># Update r1 (By subtracting 0x80, we now effectively "own" 0x80 bytes)</span><br />
<strong>stwu sp, -0x80 (sp)</strong><br />
<br />
<span style="color:#FF0000;"><span style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"># Backup r3 through r31 into this new area</span></span><br />
<strong>stmw r3, 0x8 (sp)</strong></p>
<p><strong><span style="color:#000000;"># Do whatever with the registers here</span></strong><br />
<br />
<span style="color: rgb(255, 0, 0); font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"># Restore the backups to r3 through r31</span><br />
<strong>lmw r3, 0x8 (sp)</strong><br />
<br />
<span style="color: rgb(255, 0, 0); font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"># Update r1 (By adding 0x80, we effectively "give back" the memory that we once owned)</span><br />
<strong>addi sp, sp, 0x80 </strong></p>
</div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
</div>
<div class="ct bg1 b8" style="font-family: sans-serif; font-size: 13.3333px; margin: 0px 0px 30px 15px; padding: 0px; background: rgb(240, 240, 240); border: 1px solid rgb(208, 208, 208);">
<div class="title b3 c3 bg5" style="width: auto; padding: 0px 0px 0px 2px; margin: 0px; color: rgb(25, 176, 233); background: rgb(255, 255, 255); font-size: 11pt; font-weight: bolder; overflow: hidden; height: auto; border-width: 1px; border-color: rgb(25, 176, 233); border-style: none none solid;">AND, OR, XOR<a id="ANDORXOR" name="ANDORXOR"></a></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;">
<p><strong><span style="font-size:20px;">Oh man, It was extremely hard trying to understand how these worked. I had to do a ton of testing.</span></strong></p>
<p><strong><span style="font-size:20px;">I'm 90% sure this is wrong, but these are the results I got while testing these instructions in dolphin. <br />
<br />
These instructions work in a very oddly specific way.</span></strong><br />
</p>
<p><span style="font-size:48px;"><span style="color:#DAA520;"><strong><span style="font-family:arial,helvetica,sans-serif;">AND</span></strong></span></span><br />
<span style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);">AND means "If both values are true (equal), the result is true".</span></p>
<p><span style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);">AND takes the values from Register B and C and compares them, the result of the operation is put in Register A</span></p>
<p><strong><span style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);">EXAMPLE:</span></strong></p>
<p><strong><span style="color:#FF0000;"><span style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"># Assume that Register 0 and Register 1 both hold the value "3"</span></span></strong></p>
<p><span style="color:#000000;"><strong><span style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);">and r2, r0, r1</span><br />
cmpwi r2, 3<br />
beq </strong></span><span style="color:#0000FF;"><strong>function2</strong></span></p>
<p><strong><span style="color:#FF0000;"># This code will compare the values of Registers 0 and 1 to see if they are both equal to 3, in this case they are, so the code jumps to</span></strong> <strong><span style="color:#0000FF;">"function2"</span></strong></p>
<ul>
<li>If both the values are the same, the resulting value is the same as the intial value<br />
</li>
<li>If one value is different than the other, the resulting value is<br />
<strong><span style="color:#FF0000;">0 (false)</span></strong></li>
</ul>
<p> </p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><span style="color:#0000FF;"><span style="font-size: 48px;"><strong><span style="font-family: arial, helvetica, sans-serif;">OR</span></strong></span></span><br />
<span style="font-size: 13.3333px;">OR means "If at least one value is true (equal), the result is true.</span></p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><span style="font-size: 13.3333px;">OR takes the values from Register B and C and compares them, the result of the operation is put in Register A</span></p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><strong>EXAMPLE:</strong></p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><strong><span style="color: rgb(255, 0, 0);"><span style="font-size: 13.3333px;"># Assume that Register 0 holds the value "2" and Register 1 holds the value "3"</span></span></strong></p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><strong><span style="font-size: 13.3333px;">or r2, r0, r1</span><br />
cmpwi r2, 3</strong><br />
<strong style="font-family: monospace; font-size: 13.3333px;">beq </strong><span style="font-family: monospace; font-size: 13.3333px; color: rgb(0, 0, 255);"><strong>function2</strong></span><br />
<strong style="font-family: monospace; font-size: 13.3333px;">cmpwi r2, 5</strong><br />
<strong>beq </strong><span style="color: rgb(0, 0, 255);"><strong>function2</strong></span></p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><span style="color: rgb(255, 0, 0);"><strong># You might be wondering why the resulting register is being checked for the value "5".</strong></span><br />
<br />
<span style="font-size:18px;"><span style="color:#000000;"><strong># If only one of the values is "true", the resulting value is made up of both values added together, which in this case would be "5"</strong></span></span><br />
<br />
<span style="color: rgb(255, 0, 0);"><strong># The code checks to see if either 1 value was "true" (if r2 = 0x5),<br />
or if both of them were (if r2 = 0x3). If one of those conditions are met, the code jumps to </strong></span><strong><span style="color: rgb(0, 0, 255);">"function2"</span></strong><br />
</p>
<ul style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);">
<li>If both the values are the same, the resulting value is the intial value<br />
</li>
<li>If 1 value is different, the resulting value is the sum of both values added together</li>
</ul>
<p> </p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><span style="font-family:verdana,geneva,sans-serif;"><span style="color:#000000;"><span style="font-size: 48px;"><strong>XOR</strong></span></span></span><br />
<span style="font-size: 13.3333px;">XOR means "Only one value can be true, otherwise the result is false".</span></p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><span style="font-size: 13.3333px;">XOR takes the values from Register B and C and compares them, the result of the operation is put in Register A</span></p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><strong>EXAMPLE:</strong></p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><strong style="font-family: monospace; font-size: 13.3333px;"><span style="color: rgb(255, 0, 0);"># Assume that Register 0 holds the value "2" and Register 1 holds the value "3"</span></strong></p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><strong><span style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);">xor r2, r0, r1</span><br />
cmpwi r2, 5<br />
beq </strong><span style="color: rgb(0, 0, 255);"><strong>function2</strong></span></p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><strong><span style="color:#FF0000;"># Assume that you want your code to jump to </span><span style="color:#0000FF;">"function2"</span><span style="color:#FF0000;"> if only 1 of the values in Register 0 and Register 1 is "true"</span></strong></p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><strong><span style="color:#FF0000;"><span style="font-size:18px;"># I can't think of a good way to explain this.....</span></span></strong><br />
<br />
<span style="font-size:22px;"><span style="color:#000000;"><strong># Basically, the xor instruction adds both values from both registers together if one of them is different from the other.</strong></span></span></p>
<hr />
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><br />
<span style="font-size:22px;"><span style="color:#000000;"><strong><span style="font-size:28px;"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:22px;"># Let's assume that in this context, you wanted to check to see if Register 0 or Register 1 held the value "2", as the code above shows.<br />
<br />
# Register 0 holds the value "2", and Register 1 holds the value "3"</span></span></span></strong></span></span></p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:28px;"><strong style="font-family: monospace; font-size: 22px; background-color: rgb(240, 240, 240);"># The resulting value is "5", and the operation result was "true"</strong></span></span></p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:28px;"><strong style="font-family: monospace; font-size: 22px; background-color: rgb(240, 240, 240);"># Do you know why the result was true?</strong></span></span><br />
<br />
<strong style="font-family: monospace; font-size: 22px; background-color: rgb(240, 240, 240);"><span style="font-size: 36px;"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:48px;">#Because "2" was one of the values that was needed to make the result value.</span></span></span></strong></p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"> </p>
<p style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);"><strong style="font-family: monospace; font-size: 22px; background-color: rgb(240, 240, 240);"><span style="font-size: 36px;"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:48px;">That's the best way I can possibly explain it.</span></span></span></strong></p>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
<ul style="font-family: monospace; font-size: 13.3333px; background-color: rgb(240, 240, 240);">
<li><span style="font-size:22px;">If both the values are the same, the resulting value is <strong><span style="color:#FF0000;">0 (false)</span></strong></span><br />
</li>
<li><span style="font-size:22px;">If 1 value is different, the resulting value is the sum of both values added together</span></li>
</ul>
<p> </p>
</div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;"> </div>
</div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
<div class="cttitle b4 c4" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;"> </div>
</td>
<td class="ctnav" style="vertical-align: top; padding: 0px 0px 0px 5px; width: 180px; margin: 0px; border: 0px; background: rgb(25, 176, 233);">
<div style="margin: 0px; padding: 0px 0px 0px 2px; border: 0px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(255, 255, 255); font-weight: bold;">The Basics</div>
<a href="https://jimkatz.github.io/PowerPC_Examples.html#RamWrite" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">Ram Write</a><a href="https://jimkatz.github.io/PowerPC_Examples#InstructionReplace" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">Instruction Replace</a>
<hr /><a href="https://jimkatz.github.io/PowerPC_Examples.html#LoadAddressIntoRegister" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">Load An Address into a Register</a><a href="https://jimkatz.github.io/PowerPC_Examples#ReplaceAddressValue" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">Replace a Value at an Address</a><a href="https://jimkatz.github.io/PowerPC_Examples#mem2" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">Specify an Operation in MEM2</a><a href="https://jimkatz.github.io/PowerPC_Examples#mem3" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">Specify an Operation in MEM3</a>
<div style="font-family: sans-serif; font-size: 13.3333px; margin: 0px; padding: 0px 0px 0px 2px; border: 0px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(255, 255, 255); font-weight: bold;">Branches</div>
<a href="https://jimkatz.github.io/PowerPC_Examples#Branch" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">Branch</a><a href="https://jimkatz.github.io/PowerPC_Examples#BranchAndLink" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">Branch And Link</a><a href="https://jimkatz.github.io/PowerPC_Examples#BranchToLinkRegister" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">Branch To Link Register</a>
<div style="font-family: sans-serif; font-size: 13.3333px; margin: 0px; padding: 0px 0px 0px 2px; border: 0px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(255, 255, 255); font-weight: bold;">Advanced Operations</div>
<a href="https://jimkatz.github.io/PowerPC_Examples#MoveToCountRegister" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">Specify the amount of times you<br />
want something to happen in<br />
a code</a><a href="https://jimkatz.github.io/PowerPC_Examples#TimeBaseLow" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">Load The CPU Clock into a <br />
Register</a><a href="https://jimkatz.github.io/PowerPC_Examples#StackFrameMake" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">Create a Stack Frame</a><a href="https://jimkatz.github.io/PowerPC_Examples#ANDORXOR" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">AND, OR, XOR</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a>
<div style="font-family: sans-serif; font-size: 13.3333px; margin: 0px; padding: 0px 0px 0px 2px; border: 0px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(255, 255, 255); font-weight: bold;">TBD</div>
<a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a>
<div style="font-family: sans-serif; font-size: 13.3333px; margin: 0px; padding: 0px 0px 0px 2px; border: 0px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(255, 255, 255); font-weight: bold;">TBD</div>
<a href="https://jimkatz.github.io/PowerPC_Examples#MoveToCountRegister" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io/PowerPC_Examples#TimeBaseLow" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io/PowerPC_Examples#StackFrameMake" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io/PowerPC_Examples#ANDORXOR" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a>
<div style="font-family: sans-serif; font-size: 13.3333px; margin: 0px; padding: 0px 0px 0px 2px; border: 0px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(255, 255, 255); font-weight: bold;">TBD</div>
<a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a><a href="https://jimkatz.github.io" style="font-family: sans-serif; font-size: 13.3333px; text-decoration-line: none; display: block; color: rgb(0, 0, 0); white-space: nowrap; margin: 0px 0px 0px 10px; padding: 0px 0px 0px 2px; border: 1px solid rgb(208, 208, 208); background: rgb(240, 240, 240);">TBD</a></td>
</tr>
<tr>
<td colspan="2" style="vertical-align: top; padding-right: 15px;">
<div class="cttitle" style="margin: 0px 0px 15px 15px; text-align: center; border-width: 0px 0px 2px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: solid; border-bottom-color: rgb(232, 125, 33); color: rgb(232, 125, 33); font-size: 12pt; font-weight: bolder;">Original Description - Hex</div>
<div class="ct" style="margin: 0px 0px 30px 15px; padding: 0px; background: rgb(240, 240, 240); border: 1px solid rgb(208, 208, 208);">
<div class="title" style="width: auto; padding: 0px 0px 0px 2px; margin: 0px; color: rgb(25, 176, 233); background: rgb(255, 255, 255); font-size: 11pt; font-weight: bolder; overflow: hidden; height: auto; border-width: 1px; border-color: rgb(25, 176, 233); border-style: none none solid;">Codetypes in depth<a name="CodetypeDetail" style="display: inline; color: rgb(0, 0, 204); white-space: nowrap; margin-left: 20px;"></a></div>
<div class="ctinfo" style="margin: 4px 0px 0px; padding: 0px 0px 0px 10px; border: 0px; font-family: monospace;">A hex digit actually represents 4 bits, and you need to look at the underlying bits to understand why the code types are defined the way they are. Normally, we refer to a 32 1018 -bit RAM write as an "04 code type", but this is actually a misnomer. It misleadingly implies that the 8 bits belonging to the two hex digits "04" are the code type, when the actual code type only has 7 bits! The 8th bit belongs to the address, which creates the "05" code type. People also think that the address is only comprised of 24 bits (the other 6 hex digits), when the address is actually 25 bits (the other 6 hex digits + the last bit of the second digit).<br />
<br />
A picture may help; Here's the binary breakdown of the first
<div class="info" style="display: inline; margin: 0px; padding: 0px; border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial; border-bottom-style: dotted; border-bottom-color: rgb(232, 125, 33);" title="32 bits, 8 hex digits">word</div>
of a code.<br />
<br />
Hex Digit |
<div style="display: inline; background: red;"> First </div>
|
<div style="display: inline; background: teal;"> Second </div>
|
<div style="display: inline; background: lightblue;"> Third </div>
|
<div style="display: inline; background: lightblue;"> Fourth ...</div>
<br />
Bit# |
<div style="display: inline; background: red;"> 0 1 2 </div>
|
<div style="display: inline; background: pink;"> 3 </div>
|
<div style="display: inline; background: teal;"> 4 5 6 </div>
|
<div style="display: inline; background: lightblue;"> 7 <span style="background-color:#FFFFFF;"> </span></div>
|
<div style="display: inline; background: lightblue;"> 8 9 10 11 </div>
|
<div style="display: inline; background: lightblue;"> 12 ...</div>
<br />
is |
<div style="display: inline; background: red;"> Code Type </div>
|
<div style="display: inline; background: pink;"> ba/po </div>
|
<div style="display: inline; background: teal;"> Code Sub Type </div>
|
<div style="display: inline; background: lightblue;"> address ..............................</div>
<br />
<br />
</div>
<div> </div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
<p> </p>
</body>
</html>