MegaProcessor

Check-in [6aee36cd9f]
Login

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

Overview
Comment:Prettyfied the format of the List-file output.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6aee36cd9fa73363a0871a296c2b8ee5aefb5ecc
User & Date: jos 2015-08-14 11:29:36
Context
2015-08-14
14:16
Moved the generator-script dis_d8_db to 'tools', added functionality to skip printing the redundant instructions. check-in: 65f2d4419c user: jos tags: trunk
11:29
Prettyfied the format of the List-file output. check-in: 6aee36cd9f user: jos tags: trunk
10:43
Added ProgramCounter and Symbol table functionality. check-in: ff3e1a01ea user: jos tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to asm.lua.

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
    if( src ) then n=n1; retVal = retVal + 1; end
    return retVal, label, instr, dst, src;
end

function ProcessLine( l )
    local asm_instr;
    local n,f1,f2,f3,f4 = Fields(l);
    local b1, b2, b3, formBytes;
    local insLen;


    if( n == 0 ) then print(l); return; end

    asm_instr = Directive[ string.lower(f2 or f3) ];
    if( asm_instr ) then print( asm_instr() ); return; end
    
    asm_instr = CPU_instr[ string.upper(f2 or f3) ];
................................................................................
   
    if( asm_instr ) then
        insLen = asm_instr[1];
        if( type(insLen)== 'function' ) then insLen = insLen(f2,f3,f4) end;
        b1, b2, b3 = asm_instr[2](f2,f3,f4);
    end

    n, formBytes = fmtBytes(b1, b2, b3);

    Printf("%s : %s: %s\n", PC_get(), formBytes, l );
    PC_add(insLen);

end


-- Main line
--







|

<







 







<
<
|







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
    if( src ) then n=n1; retVal = retVal + 1; end
    return retVal, label, instr, dst, src;
end

function ProcessLine( l )
    local asm_instr;
    local n,f1,f2,f3,f4 = Fields(l);
    local b1, b2, b3;
    local insLen;


    if( n == 0 ) then print(l); return; end

    asm_instr = Directive[ string.lower(f2 or f3) ];
    if( asm_instr ) then print( asm_instr() ); return; end
    
    asm_instr = CPU_instr[ string.upper(f2 or f3) ];
................................................................................
   
    if( asm_instr ) then
        insLen = asm_instr[1];
        if( type(insLen)== 'function' ) then insLen = insLen(f2,f3,f4) end;
        b1, b2, b3 = asm_instr[2](f2,f3,f4);
    end



    Printf("%s : %s: %s\n", PC_get(), fmtBytes(b1,b2,b3), l );
    PC_add(insLen);

end


-- Main line
--

Changes to lib.lua.

60
61
62
63
64
65
66
67
68
69
        if( s ) then 
            result = result .. string.format("%02x ",s)
            cnt = cnt + 1;
        else
            result = result .. "   ";
        end--if
    end--for
    return cnt, result ;
end
-- EOF --







|


60
61
62
63
64
65
66
67
68
69
        if( s ) then 
            result = result .. string.format("%02x ",s)
            cnt = cnt + 1;
        else
            result = result .. "   ";
        end--if
    end--for
    return result ;
end
-- EOF --