MegaProcessor

Check-in [2f9d29a723]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:First stab at disassembling instructions 0xd8..0xdf
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:2f9d29a723f60b97e993390668806acd0273c086
User & Date: jos 2015-07-06 22:39:03
Context
2015-07-09
15:02
First stab at a complete disassembler. check-in: ec4efbf308 user: jos tags: trunk
2015-07-06
22:39
First stab at disassembling instructions 0xd8..0xdf check-in: 2f9d29a723 user: jos tags: trunk
21:36
Separated the evaluation test of the first byte for instructions 0xd8..0xdf check-in: 1c63c2103d user: jos tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added dis_d8_db.lua.





















































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
#!/usr/bin/env lua

function printf( f, ... )
	print( string.format(f, ...) );
end

--
-- Disassembly function for instructions 0xd8..0xdf
-- which take one post-byte
--

local Mnemotic = {
[0] = "LSL RX, #0 .. #15",   -- 0x00..0x0f  :   
"LSL RX, #0 .. #15",   -- 0x00..0x0f  :   
"LSL RX, #-16 .. #-1", -- 0x10..0x1f  :   
"LSL RX, #-16 .. #-1", -- 0x10..0x1f  :   
"LSL RX, R0 .. R3",    -- 0x20..0x23  :   0x24..0x27  :   "-- redundant"
"LSL.WT RX, R0 .. R3",    -- 0x28..0x2b  :   0x2c..0x2f  :   "-- redundant"
"LSR RX, R0 .. R3",    -- 0x30..0x33  :   0x34..0x37  :   "-- redundant"
"LSR.WT RX, R0 .. R3",    -- 0x38..0x3b  :   0x3c..0x3f  :   "-- redundant"
"ASL RX, #0 .. #15",   -- 0x40..0x4f  :   
"ASL RX, #0 .. #15",   -- 0x40..0x4f  :   
"ASL RX, #-16 .. #-1", -- 0x50..0x5f  :   
"ASL RX, #-16 .. #-1", -- 0x50..0x5f  :   
"ASL RX, R0 .. R3",    -- 0x60..0x63  :   0x64..0x67  :   "-- redundant"
"ASL.WT, R0 .. R3",    -- 0x68..0x6b  :   0x6c..0x6f  :   "-- redundant"
"ASR RX, R0 .. R3",    -- 0x70..0x73  :	0x74..0x77  :   "-- redundant"
"ASR.WT RX, R0 .. R3",    -- 0x78..0x7b  :   0x7c..0x7f  :   "-- redundant"
"ROL RX, #0 .. #15",   -- 0x80..0x8f  :   
"ROL RX, #0 .. #15",   -- 0x80..0x8f  :   
"ROL RX, #-16 .. #-1", -- 0x90..0x9f  :   
"ROL RX, #-16 .. #-1", -- 0x90..0x9f  :   
"ROL RX, R0 .. R3",    -- 0xa0..0xa3  :   0xa4..0xa7  :   "-- redundant"
"ROL.WT RX, R0 .. R3",    -- 0xa8..0xab  :   0xac..0xaf  :   "-- redundant"
"ROR RX, R0 .. R3",    -- 0xb0..0xbb  :   0xb4..0xb7  :   "-- redundant"
"ROR.WT RX, R0 .. R3",    -- 0xb8..0xbb  :   0xbc..0xbf  :   "-- redundant"
"ROXL RX, #0 .. #15",   -- 0xc0..0xcf  :   
"ROXL RX, #0 .. #15",   -- 0xc0..0xcf  :   
"ROXL RX, #-16 .. #-1", -- 0xd0..0xdf  :   
"ROXL RX, #-16 .. #-1", -- 0xd0..0xdf  :   
"ROXL RX, R0 .. R3",    -- 0xe0..0xe3  :   0xe4..0xe7  :   "-- redundant"
"ROXL.WT RX, R0 .. R3",   -- 0xe8..0xeb  :    0xec..0xef  :   "-- redundant"
"ROXR RX, R0 .. R3",   -- 0xf0..0xf3  :	 0xf4..0xf7  :   "-- redundant"
"ROXR.WT RX, R0 .. R3"    -- 0xf8..0xfb  :    0xfc..0xff  :   "-- redundant"
}




a = arg[1];

if(  a == nil
  or a:len() ~= 2
  or a:match("%x%x") == nil) then
  print( "Please enter a 2 hexdigit number" );
else
end--if