mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-12-12 22:38:54 +00:00
Fixes #50
This commit is contained in:
@@ -113,6 +113,18 @@ public class Operand {
|
||||
value = IMMEDIATE_VALUE;
|
||||
return true;
|
||||
} catch (NumberFormatException e) {
|
||||
|
||||
//Try Binary number (format 0bXXXX)
|
||||
if (text.startsWith("0b")) {
|
||||
try {
|
||||
data = Integer.parseInt(text.substring(2), 2);
|
||||
value = IMMEDIATE_VALUE;
|
||||
return true;
|
||||
} catch (NumberFormatException e2) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user