diff --git a/Debugger.java b/Debugger.java index dd01c4e..2c3f56f 100755 --- a/Debugger.java +++ b/Debugger.java @@ -1,5 +1,5 @@ /* -Copyright (c) 2010 Achim Breidenbach +Copyright (c) 2010 Achim Breidenbach, Ed Spittles Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -20,1745 +20,185 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -public class Debugger { - - - public static String hex(int value, int stringLength) { - - String returnString = (String)(Integer.toHexString(value)).toUpperCase(); - return addLeadingZeros(returnString, stringLength); - } - - public static int hexStringToInt(String theHexString) { - - int result = 0; - - if(theHexString != null){ - - char c; - theHexString = theHexString.toUpperCase(); - - for(int i=0; i='0' && c<='9'){ - result = result << 4; - result += c - '0'; - } - - if(c>='A' && c<='F'){ - result = result << 4; - result += c - 'A' + 10; - } - - } - } - return result; - } - - - public static String binary(int value, int stringLength) { - - String returnString = Integer.toBinaryString(value); - return addLeadingZeros(returnString, stringLength); - } - - public static int binStringToInt(String theBinString) { - - int result = 0; - - if(theBinString != null){ - - char c; - - for(int i=0; i