Closed RuediWM closed 8 years ago
Ich werde mir das jetzt gleich ansehen.
Wir verwenden momentan Common.ERROR_MESSAGE als Meldung bei gescheitertem assemblieren. In diesem Attribut ist diese Ausgabe so nicht vorhanden. Woher kann die korrekte Fehlermeldung ausgelesen werden?
Wenn ich das im Code MainWindow.xaml.cs richtig verstehe:
private void HandleAssembleExecuted() {
processorVM.Stop();
string assemblerCode = string.Empty;
this.InvokeIfRequired(() => {
assemblerCode = asmCodeWindow.getText();
AssemblerParser asm = new AssemblerParser(processorVM, outputWindow);
// Assemble the code
Dann wird die Zeile mit dem fehlerhaften Code durch den Konstruktor AssemblerParser erzeugt und nicht durch meinen Java-Assembler. Dies ist zugegebenrmassen eine unschöne Trennung (Fehlerhafte Zeile durch C#, Fehlermeldung durch Java). Historisch erklärbar, dass ich den alten Assembler durch meinen ersetzen musste. Vorschlag: Trennung beibehalten und in eurem Code entsprechend Aufruf vornehmen Situation dokumentieren.
Eine Fehlermeldung besteht normalerweise aus zwei Zeilen und wird so vom Assembler ausgegeben. Diese zwei Zeilen sollen auch im Output-Fenster erscheinen. Beispiel: MOV [E7 ^ Line 1: Expected register or '['
Alle Beispiele für MOV etc.: MOV [E7 ^ Line 1: Expected register or '[' MOV AL, xy ^ Line 1: Expected hexadecimal number (range 00..FF), register or '[', got 'xy' MOV [ AL ^ Line 1: Expected ']' MOV [ xy ^ Line 1: Expected hexadecimal number (range 00..FF) or register, got 'xy' MOV [E7] , ^ Line 1: Expected register MOV AL,20 xy ^ Line 1: Expected a comment, got 'xy' MOV AL ^ Line 1: Expected comma MOV xy ^ Line 1: Expected register or '[', got 'xy' MOV AL,[20 ] xy ^ Line 1: Expected a comment, got 'xy' MOV ^ Line 1: Expected register or '[' MOV [ AL ] , xy ^ Line 1: Expected register, got 'xy' MOV [ E7]xy ^ Line 1: Expected comma, got 'xy' MOV AL , ^ Line 1: Expected hexadecimal number (range 00..FF), register or '[' MOV [ ^ Line 1: Expected hexadecimal number (range 00..FF) or register MOV AL,[BL ^ Line 1: Expected ']' MOV AL,[xy ^ Line 1: Expected hexadecimal number (range 00..FF) or register, got 'xy' MOV [ AL ] xy ^ Line 1: Expected comma, got 'xy' MOV [ AL ] , BL xy ^ Line 1: Expected a comment, got 'xy' MOV [ AL ] , ^ Line 1: Expected register MOV [ E7 ] ^ Line 1: Expected comma MOV [ E7 xy ^ Line 1: Expected register or '[', got 'xy' MOV AL,[BL] xy ^ Line 1: Expected a comment, got 'xy' MOV [E7] ,xy ^ Line 1: Expected register, got 'xy' MOV AL,[20 xy ^ Line 1: Expected ']', got 'xy' MOV AL xy ^ Line 1: Expected comma, got 'xy' MOV AL,[BL xy ^ Line 1: Expected ']', got 'xy' MOV AL,[20 ^ Line 1: Expected ']' MOV AL,[ ^ Line 1: Expected hexadecimal number (range 00..FF) or register MOV AL,BL xy ^ Line 1: Expected a comment, got 'xy' MOV [E7] ,BL xy ^ Line 1: Expected a comment, got 'xy' MOV [ AL ] ^ Line 1: Expected comma MOV [ AL xy ^ Line 1: Expected ']', got 'xy'