Skip to content

Commit d03af96

Browse files
committed
Segment support for NASM
1 parent ab29b81 commit d03af96

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nasm.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ quint64 NASM::getMainOffset(QFile &lst, QString entryLabel)
9797
void NASM::parseLstFile(QFile &lst, QVector<Assembler::LineNum> &lines, quint64 offset)
9898
{
9999
bool inTextSection = false;
100-
QRegExp sectionTextRegExp("SECTION\\s+\\.?(text|code)");
100+
QRegExp sectionTextRegExp("(SECTION|SEGMENT)\\s+\\.?(text|code)");
101101
sectionTextRegExp.setCaseSensitivity(Qt::CaseInsensitive);
102-
QRegExp sectionRegExp("SECTION");
102+
QRegExp sectionRegExp("(SECTION|SEGMENT)");
103103
sectionRegExp.setCaseSensitivity(Qt::CaseInsensitive);
104104

105105
QList<QPair<quint64, QString> > instrList;
@@ -439,7 +439,7 @@ void NASM::fillHighligherRules(QVector<Assembler::HighlightingRule> &highlightin
439439
//! System instructions and preprocessor commands
440440
rule.format = systemFormat;
441441
QStringList systemPatterns;
442-
systemPatterns << "\\btimes\\b" << "\\bsection\\b" << "\\.bss\\b" <<
442+
systemPatterns << "\\btimes\\b" << "\\bsection\\b" << "\\bsegment\\b" << "\\.bss\\b" <<
443443
"\\.text\\b" << "\\.data\\b" <<
444444
"\\bglobal\\b" << "\\.rodata\\b" <<
445445
"\\bextern\\b" <<

0 commit comments

Comments
 (0)