diff --git a/mar/ace/mode-mar.js b/mar/ace/mode-mar.js index a6fb5b1..c663f2b 100755 --- a/mar/ace/mode-mar.js +++ b/mar/ace/mode-mar.js @@ -52,7 +52,7 @@ define("ace/mode/mar_rules", ["require", "exports", "module", "ace/lib/oop", "ac }, { token: 'keyword.operator.assembly', - regex: '\\b(?:call|ret|jmp|jnz|jg|jl|jge|jle|hwi|jz|js|jns|jc|jnc|jo|jno)\\b', + regex: '\\b(?:call|ret|jmp|jnz|jg|jl|jge|jle|hwi|jz|js|jns|jc|jnc|jo|jno|ja|jna)\\b', caseInsensitive: true }, { diff --git a/mar/ace/mode-mar.min.js b/mar/ace/mode-mar.min.js index e7f6795..4e8cf2f 100644 --- a/mar/ace/mode-mar.min.js +++ b/mar/ace/mode-mar.min.js @@ -1,4 +1,4 @@ -define("ace/mode/mar_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,d,b){b=a("../lib/oop");a=a("./text_highlight_rules").TextHighlightRules;var c=function(){this.$rules={start:[{token:"keyword.function.assembly",regex:"\\b(?:mov|add|sub|and|or|test|cmp|shl|shr|mul|push|pop|div|xor|dw|nop|equ|neg|hwq|not|ror|rol|sal|sar|inc|dec|rcl|xchg|rcr|pushf|popf)\\b",caseInsensitive:!0},{token:"keyword.operator.assembly",regex:"\\b(?:call|ret|jmp|jnz|jg|jl|jge|jle|hwi|jz|js|jns|jc|jnc|jo|jno)\\b", +define("ace/mode/mar_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,d,b){b=a("../lib/oop");a=a("./text_highlight_rules").TextHighlightRules;var c=function(){this.$rules={start:[{token:"keyword.function.assembly",regex:"\\b(?:mov|add|sub|and|or|test|cmp|shl|shr|mul|push|pop|div|xor|dw|nop|equ|neg|hwq|not|ror|rol|sal|sar|inc|dec|rcl|xchg|rcr|pushf|popf)\\b",caseInsensitive:!0},{token:"keyword.operator.assembly",regex:"\\b(?:call|ret|jmp|jnz|jg|jl|jge|jle|hwi|jz|js|jns|jc|jnc|jo|jno|ja|jna)\\b", caseInsensitive:!0},{token:"variable.predefined.ahk",regex:"\\b(?:brk|dup)\\b",caseInsensitive:!0},{token:"variable.parameter.register.assembly",regex:"\\b(?:A|B|C|D|X|Y|bp|sp)\\b",caseInsensitive:!0},{token:"constant.character.decimal.assembly",regex:"\\b[0-9]+\\b"},{token:"constant.character.hexadecimal.assembly",regex:"\\b0x[A-F0-9]+\\b",caseInsensitive:!0},{token:"string.assembly",regex:/"([^\\"]|\\.)*"/},{token:"comment.assembly",regex:";.*$"},{token:"support.function.directive.assembly",regex:/^\.text|\.data/}, {token:"entity.name.function.assembly",regex:/\w*:/}]};this.normalizeRules()};c.metaData={fileTypes:["asm"],name:"Much Assembly Required",scopeName:"source.assembly"};b.inherits(c,a);d.MarHighlightRules=c}); define("ace/mode/mar","require exports module ace/lib/oop ace/mode/text ace/mode/mar_rules".split(" "),function(a,d,b){b=a("../lib/oop");var c=a("./text").Mode,e=a("./mar_rules").MarHighlightRules;a=function(){this.HighlightRules=e;this.$behaviour=this.$defaultBehaviour};b.inherits(a,c);a.prototype.lineCommentStart=";";a.prototype.$id="ace/mode/mar";d.Mode=a}); diff --git a/mar/editor.js b/mar/editor.js index dd7b2e1..dbb974c 100644 --- a/mar/editor.js +++ b/mar/editor.js @@ -261,7 +261,7 @@ function parseInstruction(line, result, currentLine) { if (!parseDWInstruction(line, result, currentLine)) { if (new RegExp('\\b(?:mov|add|sub|and|or|test|cmp|shl|shr|mul|push|pop|div|xor|hwi|hwq|nop|neg|' + - 'call|ret|jmp|jnz|jg|jl|jge|jle|int|jz|js|jns|brk|not|jc|jnc|ror|rol|sal|sar|jo|jno|inc|dec|rcl|xchg|rcr|pushf|popf)\\b').test(mnemonic.toLowerCase())) { + 'call|ret|jmp|jnz|jg|jl|jge|jle|int|jz|js|jns|brk|not|jc|jnc|ror|rol|sal|sar|jo|jno|inc|dec|rcl|xchg|rcr|pushf|popf|ja|jna)\\b').test(mnemonic.toLowerCase())) { if (line.indexOf(",") !== -1) { @@ -319,7 +319,7 @@ function parseInstruction(line, result, currentLine) { strO1 = line.substring(line.indexOf(mnemonic) + mnemonic.length).trim(); //Validate operand number - if (!new RegExp('\\b(?:push|mul|pop|div|neg|call|jnz|jg|jl|jge|jle|hwi|hwq|jz|js|jns|ret|jmp|not|jc|jnc|jo|jno|inc|dec)\\b').test(mnemonic.toLowerCase())) { + if (!new RegExp('\\b(?:push|mul|pop|div|neg|call|jnz|jg|jl|jge|jle|hwi|hwq|jz|js|jns|ret|jmp|not|jc|jnc|jo|jno|inc|dec|ja|jna)\\b').test(mnemonic.toLowerCase())) { result.annotations.push({ row: currentLine, column: 0, diff --git a/mar/editor.min.js b/mar/editor.min.js index b0b2a52..b983ae5 100644 --- a/mar/editor.min.js +++ b/mar/editor.min.js @@ -10,10 +10,10 @@ function parseDWInstruction(a,c,b){a=a.trim();if("dw"===a.substr(0,2).toLowerCas column:0,text:"Usage: DW IMM, IMM ...",type:"error"});break}}return!0}return!1} function getOperandType(a,c){a=a.trim();if(""===a)return OPERAND_INVALID;if(!isNaN(Number(a))&&Number(a)===Math.floor(Number(a))&&-1===a.indexOf("o")&&0!==a.indexOf("0e"))return OPERAND_IMM;if(/^(a|b|c|d|x|y|bp|sp)$/.test(a.toLowerCase()))return OPERAND_REG;for(b=0;b