Description: Autogenerated patch header for a single-debian-patch file.
 The delta against upstream is either kept as a single patch, or maintained
 in some VCS, and exported as a single patch instead of more manageable
 atomic patches.
Forwarded: not-needed

---
--- basic256-2.0.99.10.orig/BASIC256.pro
+++ basic256-2.0.99.10/BASIC256.pro
@@ -14,7 +14,7 @@ TARGET							=	basic256
 DEPENDPATH						+=	.
 INCLUDEPATH						+=	.
 QMAKE_CXXFLAGS					+=	-g
-QMAKE_CXXFLAGS					+=	-std=c++11
+QMAKE_CXXFLAGS					+=	-std=c++17
 CONFIG							+=	 qt debug_and_release
 CONFIG							+=	 console
 OBJECTS_DIR						=	tmp/obj
@@ -27,6 +27,7 @@ QT								+=	sql
 QT								+=	widgets
 QT								+=	printsupport
 QT								+=	serialport
+QT								+=	multimedia
 
 RESOURCES						+=	resources/resource.qrc
 TRANSLATIONS					=	Translations/basic256_en.ts \
--- basic256-2.0.99.10.orig/BasicDock.cpp
+++ basic256-2.0.99.10/BasicDock.cpp
@@ -17,8 +17,8 @@
 
 #include <qglobal.h>
 
-#include <QtWidgets/QDockWidget>
-#include <QtWidgets/QAction>
+#include <QDockWidget>
+#include <QAction>
 #include <QCloseEvent>
 #include "BasicDock.h"
 
--- basic256-2.0.99.10.orig/BasicDock.h
+++ basic256-2.0.99.10/BasicDock.h
@@ -21,8 +21,8 @@
 
 #include <qglobal.h>
 
-#include <QtWidgets/QDockWidget>
-#include <QtWidgets/QAction>
+#include <QDockWidget>
+#include <QAction>
 #include <QCloseEvent>
 
 
--- basic256-2.0.99.10.orig/BasicDownloader.cpp
+++ basic256-2.0.99.10/BasicDownloader.cpp
@@ -39,7 +39,9 @@ void BasicDownloader::download(QUrl url)
     inprogress = true;
     QNetworkRequest request(url);
 //compile with older Ot (for Linux users)
-#if QT_VERSION >= 0x050600
+#if QT_VERSION >= 0x060000
+    request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::ManualRedirectPolicy);
+#elif QT_VERSION >= 0x050600
     request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
 #endif
     request.setHeader(QNetworkRequest::UserAgentHeader, "App/1.0");
@@ -57,7 +59,7 @@ void BasicDownloader::fileDownloaded(QNe
     //qDebug() << "BasicDownloader fileDownloaded() attr:" << netreply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toString() << "err:" << netreply->error();
     if(netreply->error() != QNetworkReply::NoError) {
         error->q(ERROR_DOWNLOAD, netreply->errorString());
-    }else if(netreply->attribute(QNetworkRequest::HttpStatusCodeAttribute) >= 300) {
+    }else if(netreply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() >= 300) {
         error->q(ERROR_DOWNLOAD, netreply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toString());
     }else{
         m_data = netreply->readAll();
--- basic256-2.0.99.10.orig/BasicEdit.cpp
+++ basic256-2.0.99.10/BasicEdit.cpp
@@ -25,11 +25,11 @@
 #include <QPainter>
 #include <QResizeEvent>
 #include <QPaintEvent>
-#include <QtWidgets/QMessageBox>
-#include <QtWidgets/QStatusBar>
-#include <QtPrintSupport/QPrinter>
-#include <QtPrintSupport/QPrintDialog>
-#include <QtWidgets/QFontDialog>
+#include <QMessageBox>
+#include <QStatusBar>
+#include <QPrinter>
+#include <QPrintDialog>
+#include <QFontDialog>
 
 #include "MainWindow.h"
 #include "BasicEdit.h"
@@ -40,8 +40,8 @@
 extern int guiState;
 
 BasicEdit::BasicEdit(const QString & defaulttitle) {
-	currentLine = 1;
-	runState = RUNSTATESTOP;
+    currentLine = 1;
+    runState = RUNSTATESTOP;
     rightClickBlockNumber = -1;
     breakPoints = new QList<int>;
     title = defaulttitle;
@@ -85,36 +85,36 @@ BasicEdit::~BasicEdit() {
         breakPoints = NULL;
     }
     if (lineNumberArea) {
-		delete lineNumberArea;
-		lineNumberArea = NULL;
-	}
+        delete lineNumberArea;
+        lineNumberArea = NULL;
+    }
 }
 
 void BasicEdit::setFont(QFont f) {
-	// set the font and the tab stop at EDITOR_TAB_WIDTH spaces
-	QPlainTextEdit::setFont(f);
-	QFontMetrics metrics(f);
-	setTabStopWidth(metrics.width(" ")*EDITOR_TAB_WIDTH);
+    // set the font and the tab stop at EDITOR_TAB_WIDTH spaces
+    QPlainTextEdit::setFont(f);
+    QFontMetrics metrics(f);
+    setTabStopDistance(metrics.boundingRect(" ").width()*EDITOR_TAB_WIDTH);
     updateLineNumberAreaWidth(blockCount());
 }
 
 
 void
 BasicEdit::cursorMove() {
-	QTextCursor t(textCursor());
-	emit(changeStatusBar(tr("Line: ") + QString::number(t.blockNumber()+1)
-		+ tr(" Character: ") + QString::number(t.positionInBlock())));
+    QTextCursor t(textCursor());
+    emit(changeStatusBar(tr("Line: ") + QString::number(t.blockNumber()+1)
+        + tr(" Character: ") + QString::number(t.positionInBlock())));
 }
 
 void
 BasicEdit::seekLine(int newLine) {
     // go to a line number and set
-	// the text cursor
-	//
-	// code should be proximal in that it should be closest to look at the curent
+    // the text cursor
+    //
+    // code should be proximal in that it should be closest to look at the curent
     // position than to go and search the entire program from the top
     QTextCursor t = textCursor();
-    int line = t.blockNumber()+1;	// current line number for the block
+    int line = t.blockNumber()+1;    // current line number for the block
     // go back or forward to the line from the current position
     if (line<newLine) {
         // advance forward
@@ -127,28 +127,28 @@ BasicEdit::seekLine(int newLine) {
             line--;
         }
     }
-	setTextCursor(t);
+    setTextCursor(t);
 }
 
 void BasicEdit::slotWhitespace(bool checked) {
-	// toggle the display of whitespace characters
-	// http://www.qtcentre.org/threads/27245-Printing-white-spaces-in-QPlainTextEdit-the-QtCreator-way
-	QTextOption option = document()->defaultTextOption();
-	if (checked) {
-		option.setFlags(option.flags() | QTextOption::ShowTabsAndSpaces);
-	} else {
-		option.setFlags(option.flags() & ~QTextOption::ShowTabsAndSpaces);
-	}
-	option.setFlags(option.flags() | QTextOption::AddSpaceForLineAndParagraphSeparators);
-	document()->setDefaultTextOption(option);
+    // toggle the display of whitespace characters
+    // http://www.qtcentre.org/threads/27245-Printing-white-spaces-in-QPlainTextEdit-the-QtCreator-way
+    QTextOption option = document()->defaultTextOption();
+    if (checked) {
+        option.setFlags(option.flags() | QTextOption::ShowTabsAndSpaces);
+    } else {
+        option.setFlags(option.flags() & ~QTextOption::ShowTabsAndSpaces);
+    }
+    option.setFlags(option.flags() | QTextOption::AddSpaceForLineAndParagraphSeparators);
+    document()->setDefaultTextOption(option);
 }
 
 void BasicEdit::slotWrap(bool checked) {
-	if (checked) {
-		setLineWrapMode(QPlainTextEdit::WidgetWidth);
-	} else {
-		setLineWrapMode(QPlainTextEdit::NoWrap);
-	}
+    if (checked) {
+        setLineWrapMode(QPlainTextEdit::WidgetWidth);
+    } else {
+        setLineWrapMode(QPlainTextEdit::NoWrap);
+    }
 }
 
 void
@@ -160,61 +160,63 @@ BasicEdit::goToLine(int newLine) {
 
 void
 BasicEdit::keyPressEvent(QKeyEvent *e) {
-	e->accept();
+    e->accept();
     //Autoindent new line as previous one
-	if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter){
-		QPlainTextEdit::keyPressEvent(e);
-		QTextCursor cur = textCursor();
-		cur.movePosition(QTextCursor::PreviousBlock);
-		cur.movePosition(QTextCursor::StartOfBlock);
-		cur.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
-		QString str = cur.selectedText();
-		QRegExp rx("^([\\t ]+)");
-		if(str.indexOf(rx) >= 0)
-			textCursor().insertText(rx.cap(1));
-	}else if(e->key() == Qt::Key_Tab && e->modifiers() == Qt::NoModifier){
-		if(!indentSelection())
-			QPlainTextEdit::keyPressEvent(e);
-	}else if((e->key() == Qt::Key_Tab && e->modifiers() & Qt::ShiftModifier) || e->key() == Qt::Key_Backtab){
-		unindentSelection();
-	}else{
-		QPlainTextEdit::keyPressEvent(e);
-	}
+    if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter){
+        QPlainTextEdit::keyPressEvent(e);
+        QTextCursor cur = textCursor();
+        cur.movePosition(QTextCursor::PreviousBlock);
+        cur.movePosition(QTextCursor::StartOfBlock);
+        cur.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
+        QString str = cur.selectedText();
+        QRegularExpression rx("^([\\t ]+)");
+        QRegularExpressionMatch rxm = rx.match(str);
+        if(rxm.hasMatch())
+            textCursor().insertText(rxm.captured(1));
+    }else if(e->key() == Qt::Key_Tab && e->modifiers() == Qt::NoModifier){
+        if(!indentSelection())
+            QPlainTextEdit::keyPressEvent(e);
+    }else if((e->key() == Qt::Key_Tab && e->modifiers() & Qt::ShiftModifier) || e->key() == Qt::Key_Backtab){
+        unindentSelection();
+    }else{
+        QPlainTextEdit::keyPressEvent(e);
+    }
 }
 
 
 void BasicEdit::saveFile(bool overwrite) {
-	// BE SURE TO SET filename PROPERTY FIRST
-	// or set it to '' to prompt for a new file name
-	if (filename == "") {
+    // BE SURE TO SET filename PROPERTY FIRST
+    // or set it to '' to prompt for a new file name
+    if (filename == "") {
         emit(setCurrentEditorTab(this)); //activate editor window
         filename = QFileDialog::getSaveFileName(this, tr("Save file as"), title+".kbs", tr("BASIC-256 File ") + "(*.kbs);;" + tr("Any File ")  + "(*.*)");
-	}
+    }
 
-	if (filename != "") {
-		QRegExp rx("\\.[^\\/]*$");
-		if (rx.indexIn(filename) == -1) {
-			filename += ".kbs";
-		}
-		QFile f(filename);
-		bool dooverwrite = true;
-		if (!overwrite && f.exists()) {
-			dooverwrite = ( QMessageBox::Yes == QMessageBox::warning(this, tr("Save File"),
-				tr("The file ") + filename + tr(" already exists.")+ "\n" +tr("Do you want to overwrite?"),
-				QMessageBox::Yes | QMessageBox::No,
-				QMessageBox::No));
-		}
-		if (dooverwrite) {
-			f.open(QIODevice::WriteOnly | QIODevice::Truncate);
-			f.write(this->document()->toPlainText().toUtf8());
-			f.close();
-			QFileInfo fi(f);
+    if (filename != "") {
+        QRegularExpression rx("\\.[^\\/]*$");
+        QRegularExpressionMatch rxm = rx.match(filename);
+        if (!rxm.hasMatch()) {
+            filename += ".kbs";
+        }
+        QFile f(filename);
+        bool dooverwrite = true;
+        if (!overwrite && f.exists()) {
+            dooverwrite = ( QMessageBox::Yes == QMessageBox::warning(this, tr("Save File"),
+                tr("The file ") + filename + tr(" already exists.")+ "\n" +tr("Do you want to overwrite?"),
+                QMessageBox::Yes | QMessageBox::No,
+                QMessageBox::No));
+        }
+        if (dooverwrite) {
+            f.open(QIODevice::WriteOnly | QIODevice::Truncate);
+            f.write(this->document()->toPlainText().toUtf8());
+            f.close();
+            QFileInfo fi(f);
             document()->setModified(false);
             setTitle(fi.fileName());
-			QDir::setCurrent(fi.absolutePath());
+            QDir::setCurrent(fi.absolutePath());
             emit(addFileToRecentList(filename));
-		}
-	}
+        }
+    }
 }
 
 void BasicEdit::saveAllStep(int s) {
@@ -276,139 +278,139 @@ void BasicEdit::slotPrint() {
 
 
 void BasicEdit::beautifyProgram() {
-	QString program;
-	QStringList lines;
-	int indent = 0;
-	bool indentThisLine = true;
-	bool increaseIndent = false;
-	bool decreaseIndent = false;
-	bool increaseIndentDouble = false;
-	bool decreaseIndentDouble = false;
-	QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
-	program = this->document()->toPlainText();
-	lines = program.split(QRegExp("\\n"));
-	for (int i = 0; i < lines.size(); i++) {
-		QString line = lines.at(i);
-		line = line.trimmed();
+    QString program;
+    QStringList lines;
+    int indent = 0;
+    bool indentThisLine = true;
+    bool increaseIndent = false;
+    bool decreaseIndent = false;
+    bool increaseIndentDouble = false;
+    bool decreaseIndentDouble = false;
+    QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+    program = this->document()->toPlainText();
+    lines = program.split(QRegularExpression("\\n"));
+    for (int i = 0; i < lines.size(); i++) {
+        QString line = lines.at(i);
+        line = line.trimmed();
         if(line.isEmpty()){
             // label - empty line no indent
             indentThisLine = false;
-        } else if (line.contains(QRegExp("^\\S+[:]"))) {
-			// label - one line no indent
-			indentThisLine = false;
-		} else if (line.contains(QRegExp("^(for)|(foreach)\\s", Qt::CaseInsensitive))) {
-			// for - indent next (block of code)
-			increaseIndent = true;
-		} else if (line.contains(QRegExp("^next(\\s)", Qt::CaseInsensitive))) {
-			// next var - come out of block - reduce indent
-			decreaseIndent = true;
-		} else if (line.contains(QRegExp("^next$", Qt::CaseInsensitive))) {
-			// next - come out of block - reduce indent
-			decreaseIndent = true;
-		} else if (line.contains(QRegExp("^if\\s.+\\sthen\\s*((#|(rem\\s)).*)?$", Qt::CaseInsensitive))) {
-			// if/then (NOTHING FOLLOWING) - indent next (block of code)
-			increaseIndent = true;
-		} else if (line.contains(QRegExp("^else\\s*((#|(rem\\s)).*)?$", Qt::CaseInsensitive))) {
-			// else - come out of block and start new block
-			decreaseIndent = true;
-			increaseIndent = true;
-		} else if (line.contains(QRegExp("^end\\s*if\\s*((#|(rem\\s)).*)?$", Qt::CaseInsensitive))) {
-			// end if - come out of block - reduce indent
-			decreaseIndent = true;
-		} else if (line.contains(QRegExp("^while\\s", Qt::CaseInsensitive))) {
-			// while - indent next (block of code)
-			increaseIndent = true;
-		} else if (line.contains(QRegExp("^end\\s*while\\s*((#|(rem\\s)).*)?$", Qt::CaseInsensitive))) {
-			// endwhile - come out of block
-			decreaseIndent = true;
-		} else if (line.contains(QRegExp("^function\\s", Qt::CaseInsensitive))) {
-			// function - indent next (block of code)
-			increaseIndent = true;
-		} else if (line.contains(QRegExp("^end\\s*function\\s*((#|(rem\\s)).*)?$", Qt::CaseInsensitive))) {
-			// endfunction - come out of block
-			decreaseIndent = true;
-		} else if (line.contains(QRegExp("^subroutine\\s", Qt::CaseInsensitive))) {
-			// function - indent next (block of code)
-			increaseIndent = true;
-		} else if (line.contains(QRegExp("^end\\s*subroutine\\s*((#|(rem\\s)).*)?$", Qt::CaseInsensitive))) {
-			// endfunction - come out of block
-			decreaseIndent = true;
-		} else if (line.contains(QRegExp("^do\\s*((#|(rem\\s)).*)?$", Qt::CaseInsensitive))) {
-			// do - indent next (block of code)
-			increaseIndent = true;
-		} else if (line.contains(QRegExp("^until\\s", Qt::CaseInsensitive))) {
-			// until - come out of block
-			decreaseIndent = true;
-		} else if (line.contains(QRegExp("^try\\s*((#|(rem\\s)).*)?$", Qt::CaseInsensitive))) {
-			// try indent next (block of code)
-			increaseIndent = true;
-		} else if (line.contains(QRegExp("^catch\\s*((#|(rem\\s)).*)?$", Qt::CaseInsensitive))) {
-			// catch - come out of block and start new block
-			decreaseIndent = true;
-			increaseIndent = true;
-		} else if (line.contains(QRegExp("^end\\s*try\\s*((#|(rem\\s)).*)?$", Qt::CaseInsensitive))) {
-			// end try - come out of block - reduce indent
-			decreaseIndent = true;
-		} else if (line.contains(QRegExp("^begin\\s*case\\s*((#|(rem\\s)).*)?$", Qt::CaseInsensitive))) {
-			// begin case double indent next (block of code)
-			increaseIndentDouble = true;
-		} else if (line.contains(QRegExp("^end\\s*case\\s*((#|(rem\\s)).*)?$", Qt::CaseInsensitive))) {
-			// end case double reduce
-			decreaseIndentDouble = true;
-		} else if (line.contains(QRegExp("^case\\s.+\\s*((#|(rem\\s)).*)?$", Qt::CaseInsensitive))) {
-			// case expression - indent one line
-			decreaseIndent = true;
-			increaseIndent = true;
-		}
-		//
-		if (decreaseIndent) {
-			indent--;
-			if (indent<0) indent=0;
-			decreaseIndent = false;
-		}
-		if (decreaseIndentDouble) {
-			indent-=2;
-			if (indent<0) indent=0;
-			decreaseIndentDouble = false;
-		}
-		if (indentThisLine) {
-			line = QString(indent, QChar('\t')) + line;
-		} else {
-			indentThisLine = true;
-		}
-		if (increaseIndent) {
-			indent++;
-			increaseIndent = false;
-		}
-		if (increaseIndentDouble) {
-			indent+=2;
-			increaseIndentDouble = false;
-		}
-		//
-		lines.replace(i, line);
-	}
+        } else if (line.contains(QRegularExpression("^\\S+[:]"))) {
+            // label - one line no indent
+            indentThisLine = false;
+        } else if (line.contains(QRegularExpression("^(for)|(foreach)\\s", QRegularExpression::CaseInsensitiveOption))) {
+            // for - indent next (block of code)
+            increaseIndent = true;
+        } else if (line.contains(QRegularExpression("^next(\\s)", QRegularExpression::CaseInsensitiveOption))) {
+            // next var - come out of block - reduce indent
+            decreaseIndent = true;
+        } else if (line.contains(QRegularExpression("^next$", QRegularExpression::CaseInsensitiveOption))) {
+            // next - come out of block - reduce indent
+            decreaseIndent = true;
+        } else if (line.contains(QRegularExpression("^if\\s.+\\sthen\\s*((#|(rem\\s)).*)?$", QRegularExpression::CaseInsensitiveOption))) {
+            // if/then (NOTHING FOLLOWING) - indent next (block of code)
+            increaseIndent = true;
+        } else if (line.contains(QRegularExpression("^else\\s*((#|(rem\\s)).*)?$", QRegularExpression::CaseInsensitiveOption))) {
+            // else - come out of block and start new block
+            decreaseIndent = true;
+            increaseIndent = true;
+        } else if (line.contains(QRegularExpression("^end\\s*if\\s*((#|(rem\\s)).*)?$", QRegularExpression::CaseInsensitiveOption))) {
+            // end if - come out of block - reduce indent
+            decreaseIndent = true;
+        } else if (line.contains(QRegularExpression("^while\\s",  QRegularExpression::CaseInsensitiveOption))) {
+            // while - indent next (block of code)
+            increaseIndent = true;
+        } else if (line.contains(QRegularExpression("^end\\s*while\\s*((#|(rem\\s)).*)?$",  QRegularExpression::CaseInsensitiveOption))) {
+            // endwhile - come out of block
+            decreaseIndent = true;
+        } else if (line.contains(QRegularExpression("^function\\s",  QRegularExpression::CaseInsensitiveOption))) {
+            // function - indent next (block of code)
+            increaseIndent = true;
+        } else if (line.contains(QRegularExpression("^end\\s*function\\s*((#|(rem\\s)).*)?$",  QRegularExpression::CaseInsensitiveOption))) {
+            // endfunction - come out of block
+            decreaseIndent = true;
+        } else if (line.contains(QRegularExpression("^subroutine\\s",  QRegularExpression::CaseInsensitiveOption))) {
+            // function - indent next (block of code)
+            increaseIndent = true;
+        } else if (line.contains(QRegularExpression("^end\\s*subroutine\\s*((#|(rem\\s)).*)?$",  QRegularExpression::CaseInsensitiveOption))) {
+            // endfunction - come out of block
+            decreaseIndent = true;
+        } else if (line.contains(QRegularExpression("^do\\s*((#|(rem\\s)).*)?$",  QRegularExpression::CaseInsensitiveOption))) {
+            // do - indent next (block of code)
+            increaseIndent = true;
+        } else if (line.contains(QRegularExpression("^until\\s",  QRegularExpression::CaseInsensitiveOption))) {
+            // until - come out of block
+            decreaseIndent = true;
+        } else if (line.contains(QRegularExpression("^try\\s*((#|(rem\\s)).*)?$",  QRegularExpression::CaseInsensitiveOption))) {
+            // try indent next (block of code)
+            increaseIndent = true;
+        } else if (line.contains(QRegularExpression("^catch\\s*((#|(rem\\s)).*)?$",  QRegularExpression::CaseInsensitiveOption))) {
+            // catch - come out of block and start new block
+            decreaseIndent = true;
+            increaseIndent = true;
+        } else if (line.contains(QRegularExpression("^end\\s*try\\s*((#|(rem\\s)).*)?$",  QRegularExpression::CaseInsensitiveOption))) {
+            // end try - come out of block - reduce indent
+            decreaseIndent = true;
+        } else if (line.contains(QRegularExpression("^begin\\s*case\\s*((#|(rem\\s)).*)?$",  QRegularExpression::CaseInsensitiveOption))) {
+            // begin case double indent next (block of code)
+            increaseIndentDouble = true;
+        } else if (line.contains(QRegularExpression("^end\\s*case\\s*((#|(rem\\s)).*)?$",  QRegularExpression::CaseInsensitiveOption))) {
+            // end case double reduce
+            decreaseIndentDouble = true;
+        } else if (line.contains(QRegularExpression("^case\\s.+\\s*((#|(rem\\s)).*)?$",  QRegularExpression::CaseInsensitiveOption))) {
+            // case expression - indent one line
+            decreaseIndent = true;
+            increaseIndent = true;
+        }
+        //
+        if (decreaseIndent) {
+            indent--;
+            if (indent<0) indent=0;
+            decreaseIndent = false;
+        }
+        if (decreaseIndentDouble) {
+            indent-=2;
+            if (indent<0) indent=0;
+            decreaseIndentDouble = false;
+        }
+        if (indentThisLine) {
+            line = QString(indent, QChar('\t')) + line;
+        } else {
+            indentThisLine = true;
+        }
+        if (increaseIndent) {
+            indent++;
+            increaseIndent = false;
+        }
+        if (increaseIndentDouble) {
+            indent+=2;
+            increaseIndentDouble = false;
+        }
+        //
+        lines.replace(i, line);
+    }
     //this->setPlainText(lines.join("\n"));
     QTextCursor cursor = this->textCursor();
     cursor.select(QTextCursor::Document);
     cursor.insertText(lines.join("\n"));
-	QApplication::restoreOverrideCursor();
+    QApplication::restoreOverrideCursor();
 }
 
 void BasicEdit::findString(QString s, bool reverse, bool casesens, bool words)
 {
-	if(s.length()==0) return;
-	QTextDocument::FindFlags flag;
-	if (reverse) flag |= QTextDocument::FindBackward;
-	if (casesens) flag |= QTextDocument::FindCaseSensitively;
-	if (words) flag |= QTextDocument::FindWholeWords;
+    if(s.length()==0) return;
+    QTextDocument::FindFlags flag;
+    if (reverse) flag |= QTextDocument::FindBackward;
+    if (casesens) flag |= QTextDocument::FindCaseSensitively;
+    if (words) flag |= QTextDocument::FindWholeWords;
 
-	QTextCursor cursor = this->textCursor();
-	// here we save the cursor position and the verticalScrollBar value
+    QTextCursor cursor = this->textCursor();
+    // here we save the cursor position and the verticalScrollBar value
     QTextCursor cursorSaved = cursor;
     int scroll = verticalScrollBar()->value();
 
     if (!find(s, flag))
-	{
+    {
         //nothing is found | jump to start/end
         setUpdatesEnabled(false);
         cursor.movePosition(reverse?QTextCursor::End:QTextCursor::Start);
@@ -417,7 +419,7 @@ void BasicEdit::findString(QString s, bo
         if (!find(s, flag))
         {
             // word not found : we set the cursor back to its initial position and restore verticalScrollBar value
-			setTextCursor(cursorSaved);
+            setTextCursor(cursorSaved);
             verticalScrollBar()->setValue(scroll);
             setUpdatesEnabled(true);
             QMessageBox::information(this, tr("Find"),
@@ -439,54 +441,54 @@ void BasicEdit::findString(QString s, bo
 }
 
 void BasicEdit::replaceString(QString from, QString to, bool reverse, bool casesens, bool words, bool doall) {
-	if(from.length()==0) return;
+    if(from.length()==0) return;
 
-	// Replace one time.
-	if(!doall){
-		//Replace if text is selected - use the cursor from the last find not the copy
+    // Replace one time.
+    if(!doall){
+        //Replace if text is selected - use the cursor from the last find not the copy
         QTextCursor cursor = this->textCursor();
         if (from.compare(cursor.selectedText(),(casesens ? Qt::CaseSensitive : Qt::CaseInsensitive))==0){
-			cursor.insertText(to);
-		}
+            cursor.insertText(to);
+        }
 
-		//Make a search
+        //Make a search
         findString(from, reverse, casesens, words);
 
     //Replace all
     }else{
-		QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
-		setUpdatesEnabled(false);
-		QTextCursor cursorSaved = textCursor();
-		int scroll = verticalScrollBar()->value();
-		QTextCursor cursor = textCursor();
-		cursor.beginEditBlock();
-		int n = 0;
-		cursor.movePosition(QTextCursor::Start);
-		setTextCursor(cursor);
-		QTextDocument::FindFlags flag;
-		if (casesens) flag |= QTextDocument::FindCaseSensitively;
-		if (words) flag |= QTextDocument::FindWholeWords;
-		while (find(from, flag)){
-			if (textCursor().hasSelection()){
-				textCursor().insertText(to);
-				n++;
-			}
-		}
-		cursor.endEditBlock();
-		setUpdatesEnabled(true);
-		QApplication::restoreOverrideCursor();
-		// set the cursor back to its initial position and restore verticalScrollBar value
-		setTextCursor(cursorSaved);
-		verticalScrollBar()->setValue(scroll);
-		if(n==0)
-			QMessageBox::information(this, tr("Replace"),
-				tr("String not found."),
-				QMessageBox::Ok, QMessageBox::Ok);
-		else
-			QMessageBox::information(this, tr("Replace"),
-				tr("Replace completed.") + "\n" + QString::number(n) + " " + tr("occurrence(s) were replaced."),
-				QMessageBox::Ok, QMessageBox::Ok);
-	}
+        QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+        setUpdatesEnabled(false);
+        QTextCursor cursorSaved = textCursor();
+        int scroll = verticalScrollBar()->value();
+        QTextCursor cursor = textCursor();
+        cursor.beginEditBlock();
+        int n = 0;
+        cursor.movePosition(QTextCursor::Start);
+        setTextCursor(cursor);
+        QTextDocument::FindFlags flag;
+        if (casesens) flag |= QTextDocument::FindCaseSensitively;
+        if (words) flag |= QTextDocument::FindWholeWords;
+        while (find(from, flag)){
+            if (textCursor().hasSelection()){
+                textCursor().insertText(to);
+                n++;
+            }
+        }
+        cursor.endEditBlock();
+        setUpdatesEnabled(true);
+        QApplication::restoreOverrideCursor();
+        // set the cursor back to its initial position and restore verticalScrollBar value
+        setTextCursor(cursorSaved);
+        verticalScrollBar()->setValue(scroll);
+        if(n==0)
+            QMessageBox::information(this, tr("Replace"),
+                tr("String not found."),
+                QMessageBox::Ok, QMessageBox::Ok);
+        else
+            QMessageBox::information(this, tr("Replace"),
+                tr("Replace completed.") + "\n" + QString::number(n) + " " + tr("occurrence(s) were replaced."),
+                QMessageBox::Ok, QMessageBox::Ok);
+    }
 }
 
 QString BasicEdit::getCurrentWord() {
@@ -496,8 +498,8 @@ QString BasicEdit::getCurrentWord() {
     QTextCursor t(textCursor());
     QTextBlock b(t.block());
     w = b.text();
-    w = w.left(w.indexOf(QRegExp("[^a-zA-Z0-9]"),t.positionInBlock()));
-    w = w.mid(w.lastIndexOf(QRegExp("[^a-zA-Z0-9]"))+1);
+    w = w.left(w.indexOf(QRegularExpression("[^a-zA-Z0-9]"),t.positionInBlock()));
+    w = w.mid(w.lastIndexOf(QRegularExpression("[^a-zA-Z0-9]"))+1);
     return w;
 }
 
@@ -508,7 +510,7 @@ int BasicEdit::lineNumberAreaWidth() {
         max /= 10;
         ++digits;
     }
-    int space = 10 + fontMetrics().width(QLatin1Char('9')) * digits;
+    int space = 10 + fontMetrics().boundingRect(QLatin1Char('9')).width() * digits;
     return space;
 }
 
@@ -569,7 +571,7 @@ void BasicEdit::highlightCurrentLine() {
 
 
     //mark brackets if we are editing
-	if (runState==RUNSTATESTOP && !isReadOnly()) {
+    if (runState==RUNSTATESTOP && !isReadOnly()) {
         QTextCursor cur = textCursor();
         int pos = cur.position();
         cur.movePosition(QTextCursor::EndOfBlock, QTextCursor::MoveAnchor);
@@ -747,7 +749,7 @@ void BasicEdit::lineNumberAreaPaintEvent
                     painter.setPen(Qt::red);
                     int w = lineNumberArea->width();
                     int bh = blockBoundingRect(block).height();
-                    int fh = fontMetrics().height();
+                    int fh = fontMetrics().boundingRect(" ").height();
                     painter.drawEllipse((w-(fh-6))/2, top+(bh-(fh-6))/2, fh-6, fh-6);
             }
             // draw text
@@ -756,7 +758,7 @@ void BasicEdit::lineNumberAreaPaintEvent
             } else {
                 painter.setPen(Qt::black);
             }
-            painter.drawText(0, top, lineNumberArea->width()-5, fontMetrics().height(), Qt::AlignRight, number);
+            painter.drawText(0, top, lineNumberArea->width()-5, fontMetrics().boundingRect(" ").height(), Qt::AlignRight, number);
         }
 
         block = block.next();
@@ -779,14 +781,14 @@ void BasicEdit::lineNumberAreaMouseClick
     if (runState == RUNSTATERUN)
         return;
     // based on mouse click - set the breakpoint in the map/block and highlight the line
-	int line;
-	QTextBlock block = firstVisibleBlock();
+    int line;
+    QTextBlock block = firstVisibleBlock();
     int bottom = (int) blockBoundingGeometry(block).translated(contentOffset()).top(); //bottom from previous block
     line = block.blockNumber();
-	// line 0 ... (n-1) of what was clicked
-	while(block.isValid()) {
-		bottom += blockBoundingRect(block).height();
-		if (event->y() < bottom) {
+    // line 0 ... (n-1) of what was clicked
+    while(block.isValid()) {
+        bottom += blockBoundingRect(block).height();
+        if (event->localPos().y()  < bottom) {
             if(event->button() == Qt::LeftButton){
                 //keep breakPoints list update for debug running mode
                 if(block.userState()==STATEBREAKPOINT){
@@ -811,9 +813,9 @@ void BasicEdit::lineNumberAreaMouseClick
             }
             return;
         }
-		block = block.next();
-		line++;
-	}
+        block = block.next();
+        line++;
+    }
     QMenu contextMenu(this);
     contextMenu.addAction ( tr("Clear all breakpoints") , this , SLOT (clearBreakPoints()) );
     contextMenu.exec (event->globalPos());
@@ -884,72 +886,72 @@ void BasicEdit::updateBreakPointsList()
 
 
 int BasicEdit::indentSelection() {
-	QTextCursor cur = textCursor();
-	if(!cur.hasSelection())
-			return false;
-	int a = cur.anchor();
-	int p = cur.position();
-	int start = (a<=p?a:p);
-	int end = (a>p?a:p);
-
-	cur.beginEditBlock();
-	cur.setPosition(end);
-	int eblock = cur.block().blockNumber();
-	cur.setPosition(start);
-	int sblock = cur.block().blockNumber();
-
-	for(int i = sblock; i <= eblock; i++)
-	{
-		cur.movePosition(QTextCursor::StartOfBlock, QTextCursor::MoveAnchor);
-		cur.insertText("\t");
-		cur.movePosition(QTextCursor::NextBlock, QTextCursor::MoveAnchor);
-	}
-	cur.endEditBlock();
+    QTextCursor cur = textCursor();
+    if(!cur.hasSelection())
+            return false;
+    int a = cur.anchor();
+    int p = cur.position();
+    int start = (a<=p?a:p);
+    int end = (a>p?a:p);
+
+    cur.beginEditBlock();
+    cur.setPosition(end);
+    int eblock = cur.block().blockNumber();
+    cur.setPosition(start);
+    int sblock = cur.block().blockNumber();
+
+    for(int i = sblock; i <= eblock; i++)
+    {
+        cur.movePosition(QTextCursor::StartOfBlock, QTextCursor::MoveAnchor);
+        cur.insertText("\t");
+        cur.movePosition(QTextCursor::NextBlock, QTextCursor::MoveAnchor);
+    }
+    cur.endEditBlock();
 return true;
 }
 
 
 void BasicEdit::unindentSelection() {
-	QTextCursor cur = textCursor();
-	int a = cur.anchor();
-	int p = cur.position();
-	int start = (a<=p?a:p);
-	int end = (a>p?a:p);
-
-	cur.beginEditBlock();
-	cur.setPosition(end);
-	int eblock = cur.block().blockNumber();
-	cur.setPosition(start);
-	int sblock = cur.block().blockNumber();
-	QString s;
-
-	for(int i = sblock; i <= eblock; i++)
-	{
-		cur.movePosition(QTextCursor::EndOfBlock, QTextCursor::MoveAnchor);
-		cur.movePosition(QTextCursor::StartOfBlock, QTextCursor::KeepAnchor);
-		s = cur.selectedText();
-		if(!s.isEmpty()){
-			if(s.startsWith("    ") || s.startsWith("   \t")){
-				cur.movePosition(QTextCursor::StartOfBlock, QTextCursor::MoveAnchor);
-				cur.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, 4);
-				cur.removeSelectedText();
-			}else if(s.startsWith("   ") || s.startsWith("  \t")){
-				cur.movePosition(QTextCursor::StartOfBlock, QTextCursor::MoveAnchor);
-				cur.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, 3);
-				cur.removeSelectedText();
-			}else if(s.startsWith("  ") || s.startsWith(" \t")){
-				cur.movePosition(QTextCursor::StartOfBlock, QTextCursor::MoveAnchor);
-				cur.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, 2);
-				cur.removeSelectedText();
-			}else if(s.startsWith(" ") || s.startsWith("\t")){
-				cur.movePosition(QTextCursor::StartOfBlock, QTextCursor::MoveAnchor);
-				cur.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, 1);
-				cur.removeSelectedText();
-			}
-		}
-		cur.movePosition(QTextCursor::NextBlock, QTextCursor::MoveAnchor);
-	}
-	cur.endEditBlock();
+    QTextCursor cur = textCursor();
+    int a = cur.anchor();
+    int p = cur.position();
+    int start = (a<=p?a:p);
+    int end = (a>p?a:p);
+
+    cur.beginEditBlock();
+    cur.setPosition(end);
+    int eblock = cur.block().blockNumber();
+    cur.setPosition(start);
+    int sblock = cur.block().blockNumber();
+    QString s;
+
+    for(int i = sblock; i <= eblock; i++)
+    {
+        cur.movePosition(QTextCursor::EndOfBlock, QTextCursor::MoveAnchor);
+        cur.movePosition(QTextCursor::StartOfBlock, QTextCursor::KeepAnchor);
+        s = cur.selectedText();
+        if(!s.isEmpty()){
+            if(s.startsWith("    ") || s.startsWith("   \t")){
+                cur.movePosition(QTextCursor::StartOfBlock, QTextCursor::MoveAnchor);
+                cur.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, 4);
+                cur.removeSelectedText();
+            }else if(s.startsWith("   ") || s.startsWith("  \t")){
+                cur.movePosition(QTextCursor::StartOfBlock, QTextCursor::MoveAnchor);
+                cur.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, 3);
+                cur.removeSelectedText();
+            }else if(s.startsWith("  ") || s.startsWith(" \t")){
+                cur.movePosition(QTextCursor::StartOfBlock, QTextCursor::MoveAnchor);
+                cur.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, 2);
+                cur.removeSelectedText();
+            }else if(s.startsWith(" ") || s.startsWith("\t")){
+                cur.movePosition(QTextCursor::StartOfBlock, QTextCursor::MoveAnchor);
+                cur.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, 1);
+                cur.removeSelectedText();
+            }
+        }
+        cur.movePosition(QTextCursor::NextBlock, QTextCursor::MoveAnchor);
+    }
+    cur.endEditBlock();
 }
 
 void BasicEdit::setTitle(QString newTitle){
--- basic256-2.0.99.10.orig/BasicGraph.cpp
+++ basic256-2.0.99.10/BasicGraph.cpp
@@ -21,15 +21,14 @@
 
 #include <QClipboard>
 #include <QMutex>
-#include <QtPrintSupport/QPrintDialog>
-#include <QtPrintSupport/QPrinter>
-#include <QtWidgets/QAction>
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QMessageBox>
-#include <QtWidgets/QScrollArea>
-#include <QtWidgets/QToolBar>
+#include <QPrintDialog>
+#include <QPrinter>
+#include <QAction>
+#include <QApplication>
+#include <QMessageBox>
+#include <QScrollArea>
+#include <QToolBar>
 #include <QDockWidget>
-#include <QDesktopWidget>
 
 #include "BasicWidget.h"
 #include "BasicGraph.h"
@@ -185,7 +184,7 @@ void BasicGraph::resizeWindowToFitConten
                 dock->setMaximumSize(QWIDGETSIZE_MAX ,QWIDGETSIZE_MAX );
 
                 // make graph window visible in screen range (ignoring taskbar area)
-                QRect screen (QApplication::desktop()->availableGeometry(this));
+                QRect screen (this->geometry());
                 QPoint win_position = dock->pos();
                 QSize win_size = dock->size();
                 int w = win_size.width()+win_position.x();
@@ -285,7 +284,7 @@ void BasicGraph::mouseReleaseEvent(QMous
 }
 
 void BasicGraph::mousePressEvent(QMouseEvent *e) {
-    if (e->x() >= 0 && e->x() < gwidth && e->y() >= 0 && e->y() < gheight) {
+    if (e->localPos().x() >= 0 && e->localPos().x() < gwidth && e->localPos().y() >= 0 && e->localPos().y() < gheight) {
         QPoint p = gtransforminverted.map(e->pos());
         clickX = mouseX = p.x();
         clickY = mouseY = p.y();
@@ -402,9 +401,9 @@ void BasicGraph::updateScreenImage(){
 }
 
 void BasicGraph::mouseDoubleClickEvent(QMouseEvent * e){
-    if (e->x() >= 0 && e->x() < gwidth && e->y() >= 0 && e->y() < gheight) {
-        clickX = mouseX = e->x();
-        clickY = mouseY = e->y();
+    if (e->localPos().x() >= 0 && e->localPos().x() < gwidth && e->localPos().y() >= 0 && e->localPos().y() < gheight) {
+        clickX = mouseX = e->localPos().x();
+        clickY = mouseY = e->localPos().y();
         clickB = e->button() | MOUSEBUTTON_DOUBLECLICK; //set doubleclick flag
         mouseB = e->buttons();
     }
--- basic256-2.0.99.10.orig/BasicKeyboard.cpp
+++ basic256-2.0.99.10/BasicKeyboard.cpp
@@ -87,7 +87,7 @@ void BasicKeyboard::reset(){
     // releasing keys outside and to be detectes=d as pressed
     lastKey = 0;
     lastText = QString();
-    lastModifiers = 0;
+    lastModifiers = Qt::NoModifier;
     pressedKeysMap.clear();
 }
 
--- basic256-2.0.99.10.orig/BasicOutput.cpp
+++ basic256-2.0.99.10/BasicOutput.cpp
@@ -22,13 +22,14 @@
 #include <QMutex>
 #include <QClipboard>
 #include <QMimeData>
+#include <QRegularExpression>
 
-#include <QtWidgets/QAction>
-#include <QtWidgets/QToolBar>
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QMessageBox>
-#include <QtPrintSupport/QPrintDialog>
-#include <QtPrintSupport/QPrinter>
+#include <QAction>
+#include <QToolBar>
+#include <QApplication>
+#include <QMessageBox>
+#include <QPrintDialog>
+#include <QPrinter>
 
 #include "Settings.h"
 #include "BasicOutput.h"
@@ -40,12 +41,12 @@ extern BasicKeyboard *basicKeyboard;
 BasicOutput::BasicOutput( ) : QTextEdit () {
     inputText.clear();
     setReadOnly(true);
-	setInputMethodHints(Qt::ImhNoPredictiveText);
-	setFocusPolicy(Qt::StrongFocus);
-	setAcceptRichText(false);
-	setUndoRedoEnabled(false);
-	gettingInput = false;
-	saveLastPosition();
+    setInputMethodHints(Qt::ImhNoPredictiveText);
+    setFocusPolicy(Qt::StrongFocus);
+    setAcceptRichText(false);
+    setUndoRedoEnabled(false);
+    gettingInput = false;
+    saveLastPosition();
 
 }
 
@@ -54,20 +55,20 @@ BasicOutput::~BasicOutput( ) {
 }
 
 void BasicOutput::getInput() {
-	// move cursor to the end of the existing text and start input
-	inputText.clear();
-	gettingInput = true;
-	setFocus();
-	emit(mainWindowsVisible(2,true));
-	restoreLastPosition();
-	inputPosition = lastPosition;
-	setReadOnly(false);
-	updatePasteButton();
+    // move cursor to the end of the existing text and start input
+    inputText.clear();
+    gettingInput = true;
+    setFocus();
+    emit(mainWindowsVisible(2,true));
+    restoreLastPosition();
+    inputPosition = lastPosition;
+    setReadOnly(false);
+    updatePasteButton();
 }
 
 void BasicOutput::stopInput() {
-	gettingInput = false;
-	setReadOnly(true);
+    gettingInput = false;
+    setReadOnly(true);
     updatePasteButton();
 }
 
@@ -78,7 +79,7 @@ void BasicOutput::keyPressEvent(QKeyEven
         mymutex->lock();
         basicKeyboard->keyPressed(e);
         QTextEdit::keyPressEvent(e);
-		mymutex->unlock();
+        mymutex->unlock();
     } else {
         if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) {
             saveLastPosition();
@@ -96,9 +97,10 @@ void BasicOutput::keyPressEvent(QKeyEven
        } else if (e->key() == Qt::Key_Backspace) {
             QTextCursor t(textCursor());
             t.movePosition(QTextCursor::PreviousCharacter);
-            if (t.position() >= inputPosition)
+            if (t.position() >= inputPosition) {
                 QTextEdit::keyPressEvent(e);
-                saveLastPosition();
+            }
+            saveLastPosition();
         } else {
             QTextEdit::keyPressEvent(e);
         }
@@ -107,13 +109,13 @@ void BasicOutput::keyPressEvent(QKeyEven
 
 
 void BasicOutput::keyReleaseEvent(QKeyEvent *e) {
-	e->accept();
-	if (!gettingInput) {
+    e->accept();
+    if (!gettingInput) {
         mymutex->lock();
         basicKeyboard->keyReleased(e);
         QTextEdit::keyReleaseEvent(e);
-		mymutex->unlock();
-	}
+        mymutex->unlock();
+    }
 }
 
 void BasicOutput::focusOutEvent(QFocusEvent* ){
@@ -122,11 +124,11 @@ void BasicOutput::focusOutEvent(QFocusEv
 }
 
 bool BasicOutput::initActions(QMenu * vMenu, QToolBar * vToolBar) {
-	if ((NULL == vMenu) || (NULL == vToolBar)) {
-		return false;
-	}
+    if ((NULL == vMenu) || (NULL == vToolBar)) {
+        return false;
+    }
 
-	vToolBar->setObjectName("outtoolbar");
+    vToolBar->setObjectName("outtoolbar");
 
 
     copyAct = vMenu->addAction(QObject::tr("Copy"));
@@ -143,22 +145,22 @@ bool BasicOutput::initActions(QMenu * vM
     clearAct = vMenu->addAction(QObject::tr("Clear"));
     clearAct->setEnabled(false);
 
-	vToolBar->addAction(copyAct);
-	vToolBar->addAction(pasteAct);
+    vToolBar->addAction(copyAct);
+    vToolBar->addAction(pasteAct);
     vToolBar->addAction(printAct);
     vToolBar->addAction(clearAct);
 
-	QObject::connect(copyAct, SIGNAL(triggered()), this, SLOT(copy()));
-	QObject::connect(pasteAct, SIGNAL(triggered()), this, SLOT(paste()));
-	QObject::connect(printAct, SIGNAL(triggered()), this, SLOT(slotPrint()));
+    QObject::connect(copyAct, SIGNAL(triggered()), this, SLOT(copy()));
+    QObject::connect(pasteAct, SIGNAL(triggered()), this, SLOT(paste()));
+    QObject::connect(printAct, SIGNAL(triggered()), this, SLOT(slotPrint()));
     QObject::connect(this, SIGNAL(copyAvailable(bool)), copyAct, SLOT(setEnabled(bool)));
     QObject::connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(updatePasteButton()));
     QObject::connect(clearAct, SIGNAL(triggered()), this, SLOT(slotClear()));
 
-	m_usesToolBar = true;
-	m_usesMenu = true;
+    m_usesToolBar = true;
+    m_usesMenu = true;
 
-	return true;
+    return true;
 }
 
 void BasicOutput::slotPrint() {
@@ -171,7 +173,7 @@ void BasicOutput::slotPrint() {
     dialog->setWindowTitle(QObject::tr("Print Text Output"));
 
     if (dialog->exec() == QDialog::Accepted) {
-        if ((printer.printerState() != QPrinter::Error) && (printer.printerState() != QPrinter::Aborted))	{
+        if ((printer.printerState() != QPrinter::Error) && (printer.printerState() != QPrinter::Aborted))    {
             document->print(&printer);
         } else {
             QMessageBox::warning(this, QObject::tr("Print Error"), QObject::tr("Unable to carry out printing.\nPlease check your printer settings."));
@@ -181,42 +183,42 @@ void BasicOutput::slotPrint() {
 }
 
 void BasicOutput::paintEvent(QPaintEvent* event) {
-	// paint a visible cursor at the text cursor
-	QTextEdit::paintEvent(event);
-	QRect cursor = cursorRect();
-	cursor.setWidth(2);
-	QPainter p(viewport());
-	p.fillRect(cursor, Qt::SolidPattern);
+    // paint a visible cursor at the text cursor
+    QTextEdit::paintEvent(event);
+    QRect cursor = cursorRect();
+    cursor.setWidth(2);
+    QPainter p(viewport());
+    p.fillRect(cursor, Qt::SolidPattern);
 }
 
 // Ensure that drag and drop is allowed only in permitted area when BASIC-256 wait for input
 void BasicOutput::dragEnterEvent(QDragEnterEvent *e){
-	if (e->mimeData()->hasFormat("text/plain") && gettingInput && !isReadOnly()  )
-		e->acceptProposedAction();
+    if (e->mimeData()->hasFormat("text/plain") && gettingInput && !isReadOnly()  )
+        e->acceptProposedAction();
 }
 
 void BasicOutput::dragMoveEvent (QDragMoveEvent *event){
-	QTextCursor t = cursorForPosition(event->pos());
-	if (t.position() >= inputPosition){
-		event->acceptProposedAction();
-		QDragMoveEvent move(event->pos(),event->dropAction(), event->mimeData(), event->mouseButtons(),
-			event->keyboardModifiers(), event->type());
-		QTextEdit::dragMoveEvent(&move); // Call the parent function (show cursor and keep selection)
-	} else {
-		event->ignore();
-	}
+    QTextCursor t = cursorForPosition(event->pos());
+    if (t.position() >= inputPosition){
+        event->acceptProposedAction();
+        QDragMoveEvent move(event->pos(), event->dropAction(), event->mimeData(), event->mouseButtons(),
+            event->keyboardModifiers(), event->type());
+        QTextEdit::dragMoveEvent(&move); // Call the parent function (show cursor and keep selection)
+    } else {
+        event->ignore();
+    }
 }
 
 
 //Ensure that drang and drop operation or paste operation will add only first line of the copied text.
 void BasicOutput::insertFromMimeData(const QMimeData* source)
 {
-	if (source->hasText()) {
-		QString s = source->text();
-		QStringList l = s.split(QRegExp("[\r\n]"),QString::SkipEmptyParts);
-		textCursor().insertText(l.at(0));
-		setFocus();
-	}
+    if (source->hasText()) {
+        QString s = source->text();
+        QStringList l = s.split(QRegularExpression("[\\r\\n]"), Qt::SkipEmptyParts);
+        textCursor().insertText(l.at(0));
+        setFocus();
+    }
 }
 
 void BasicOutput::updatePasteButton(){
@@ -230,119 +232,119 @@ void BasicOutput::slotClear(){
 }
 
 void BasicOutput::slotWrap(bool checked) {
-	if (checked) {
-		setLineWrapMode(QTextEdit::WidgetWidth);
-	} else {
-		setLineWrapMode(QTextEdit::NoWrap);
-	}
+    if (checked) {
+        setLineWrapMode(QTextEdit::WidgetWidth);
+    } else {
+        setLineWrapMode(QTextEdit::NoWrap);
+    }
 }
 
 void BasicOutput::outputText(QString text) {
-	outputText(text, Qt::black);
+    outputText(text, Qt::black);
 }
 
 void BasicOutput::outputText(QString text, QColor color) {
-	this->setTextColor(color); //back to black color
-	restoreLastPosition();
-	this->insertPlainText(text);
-	this->ensureCursorVisible();
-	saveLastPosition();
+    this->setTextColor(color); //back to black color
+    restoreLastPosition();
+    this->insertPlainText(text);
+    this->ensureCursorVisible();
+    saveLastPosition();
 }
 
 int BasicOutput::getCurrentPosition() {
-		QTextCursor t(textCursor());
-		return t.position();
+        QTextCursor t(textCursor());
+        return t.position();
 }
 
 void BasicOutput::saveLastPosition() {
-	lastPosition = getCurrentPosition();
+    lastPosition = getCurrentPosition();
 }
 
 void BasicOutput::restoreLastPosition() {
-	moveToPosition(lastPosition);
+    moveToPosition(lastPosition);
 }
 
 void BasicOutput::moveToPosition(int pos) {
-	// move to an absolute character number (position) in the document
-	QTextCursor t(textCursor());
-	t.movePosition(QTextCursor::Start, QTextCursor::MoveAnchor);
-	t.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, pos);
-	setTextCursor(t);
+    // move to an absolute character number (position) in the document
+    QTextCursor t(textCursor());
+    t.movePosition(QTextCursor::Start, QTextCursor::MoveAnchor);
+    t.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, pos);
+    setTextCursor(t);
 }
 
 void BasicOutput::outputTextAt(int col, int row, QString s) {
-	//fprintf(stderr, "moveToPosition = col %i row %i\n", col, row);
+    //fprintf(stderr, "moveToPosition = col %i row %i\n", col, row);
 
-	QTextCursor t(textCursor());
-	t.movePosition(QTextCursor::Start, QTextCursor::MoveAnchor);
+    QTextCursor t(textCursor());
+    t.movePosition(QTextCursor::Start, QTextCursor::MoveAnchor);
 
-	//fprintf(stderr, "moveToPosition start=%i\n", t.position());
+    //fprintf(stderr, "moveToPosition start=%i\n", t.position());
 
-	// move to the begining of the sprecified line or append lines
-	int lines = toPlainText().count("\n");
-	//fprintf(stderr, "moveToPosition lines=%i\n", lines);
-	if (row>lines) {
-		// go to end and append
-		for (; lines < row; lines++) {
-			t.movePosition(QTextCursor::End, QTextCursor::MoveAnchor);
-			this->setTextCursor(t);
-			insertPlainText("\n");
-			//fprintf(stderr, "moveToPosition add line\n", lines);
-		}
-	} else {
-		// go down to the row
-		for (int i=0; i < row; i++) {
-			t.movePosition(QTextCursor::Down, QTextCursor::MoveAnchor);
-			//fprintf(stderr, "moveToPosition down line\n", lines);
-		}
-		this->setTextCursor(t);
-	}
-	//fprintf(stderr, "moveToPosition after position=%i\n", t.position());
-
-	// move to the specified character on the current line or append
-	t.movePosition(QTextCursor::StartOfLine, QTextCursor::MoveAnchor);
-	int lineStart = t.position();
-	t.movePosition(QTextCursor::EndOfLine, QTextCursor::MoveAnchor);
-	int lineEnd = t.position();
-	//fprintf(stderr, "moveToPosition = ls %i le %i\n", lineStart, lineEnd);
-
-
-	if (col <= lineEnd-lineStart) {
-		// line is long enough to start - replace mode
-		t.movePosition(QTextCursor::StartOfLine, QTextCursor::MoveAnchor);
-		t.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, col);
-		this->setTextCursor(t);
-		
-		// replace text at cursor
-		int startText = t.position();
-		t.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, s.length());
-		int endLength = t.position();
-		t.movePosition(QTextCursor::Start, QTextCursor::MoveAnchor);
-		t.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, startText);
-		t.movePosition(QTextCursor::EndOfLine, QTextCursor::MoveAnchor);
-		int endLine = t.position();
-
-		int replaceLen= (endLine<endLength?endLine:endLength) - startText;
-		//fprintf(stderr, "moveToPosition = replace s %i len %i line %i replaceLen %i\n", startText, endLength, endLine, replaceLen);
-		
-		t.movePosition(QTextCursor::Start, QTextCursor::MoveAnchor);
-		t.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, startText);
-		t.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor, replaceLen);
-		this->setTextCursor(t);
-		this->insertPlainText(s);
-		
-	} else {
-		// line is not long enough - insert spaces and insert
-		t.movePosition(QTextCursor::EndOfLine, QTextCursor::MoveAnchor);
-		this->setTextCursor(t);
-		for (int i=lineEnd-lineStart; i<col; i++) {
-			insertPlainText(" ");
-		}
-		this->insertPlainText(s);
-	}
+    // move to the begining of the sprecified line or append lines
+    int lines = toPlainText().count("\n");
+    //fprintf(stderr, "moveToPosition lines=%i\n", lines);
+    if (row>lines) {
+        // go to end and append
+        for (; lines < row; lines++) {
+            t.movePosition(QTextCursor::End, QTextCursor::MoveAnchor);
+            this->setTextCursor(t);
+            insertPlainText("\n");
+            //fprintf(stderr, "moveToPosition add line\n", lines);
+        }
+    } else {
+        // go down to the row
+        for (int i=0; i < row; i++) {
+            t.movePosition(QTextCursor::Down, QTextCursor::MoveAnchor);
+            //fprintf(stderr, "moveToPosition down line\n", lines);
+        }
+        this->setTextCursor(t);
+    }
+    //fprintf(stderr, "moveToPosition after position=%i\n", t.position());
+
+    // move to the specified character on the current line or append
+    t.movePosition(QTextCursor::StartOfLine, QTextCursor::MoveAnchor);
+    int lineStart = t.position();
+    t.movePosition(QTextCursor::EndOfLine, QTextCursor::MoveAnchor);
+    int lineEnd = t.position();
+    //fprintf(stderr, "moveToPosition = ls %i le %i\n", lineStart, lineEnd);
+
+
+    if (col <= lineEnd-lineStart) {
+        // line is long enough to start - replace mode
+        t.movePosition(QTextCursor::StartOfLine, QTextCursor::MoveAnchor);
+        t.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, col);
+        this->setTextCursor(t);
+        
+        // replace text at cursor
+        int startText = t.position();
+        t.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, s.length());
+        int endLength = t.position();
+        t.movePosition(QTextCursor::Start, QTextCursor::MoveAnchor);
+        t.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, startText);
+        t.movePosition(QTextCursor::EndOfLine, QTextCursor::MoveAnchor);
+        int endLine = t.position();
+
+        int replaceLen= (endLine<endLength?endLine:endLength) - startText;
+        //fprintf(stderr, "moveToPosition = replace s %i len %i line %i replaceLen %i\n", startText, endLength, endLine, replaceLen);
+        
+        t.movePosition(QTextCursor::Start, QTextCursor::MoveAnchor);
+        t.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, startText);
+        t.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor, replaceLen);
+        this->setTextCursor(t);
+        this->insertPlainText(s);
+        
+    } else {
+        // line is not long enough - insert spaces and insert
+        t.movePosition(QTextCursor::EndOfLine, QTextCursor::MoveAnchor);
+        this->setTextCursor(t);
+        for (int i=lineEnd-lineStart; i<col; i++) {
+            insertPlainText(" ");
+        }
+        this->insertPlainText(s);
+    }
 
-	saveLastPosition();	
-	//fprintf(stderr, "moveToPosition = -----------------------------------\n");
+    saveLastPosition();    
+    //fprintf(stderr, "moveToPosition = -----------------------------------\n");
 
 }
 
--- basic256-2.0.99.10.orig/COMPILING.txt
+++ basic256-2.0.99.10/COMPILING.txt
@@ -17,7 +17,7 @@ Dependencies:
 
 
 ###########################################################
-WINDOWS (QT5.15)
+WINDOWS (QT 6.7.0)
 ###########################################################
 
 Dependencies:
@@ -25,7 +25,8 @@ Dependencies:
 	** Available from: http://qt.io - use the online installer
 	** BE SURE to choose the mingw compiler from tools it will be the correct version
 		for the QT binary support files
-	** add paths C:\Qt\5.15\mingw81_32\bin;C:\Qt\Tools\mingw810_32\bin; to your system environment variable
+	** add paths C:\Qt\5.15\mingw1120_64\bin;C:\Qt\Tools\mingw1120_64\bin; to your system environment variable
+	** copy mingw32-make.exe to make.exe in folder C:\Qt\Tools\mingw1120_64\bin
 
 * MSYS developer tools and libraries
 	** Available from:
--- /dev/null
+++ basic256-2.0.99.10/COMPILING_Ubuntu_24_04.md
@@ -0,0 +1,15 @@
+# Compiling basic256 - Ubuntu 24.04 LTS
+
+## 2024-10-31 j.m.reneau
+
+sudo apt install subversion
+
+svn checkout --username=YOURUSER svn+ssh://renejm@svn.code.sf.net/p/kidbasic/code/trunk basic256
+
+sudo apt install bison flex qt5-qmake qtbase5-dev libqt5serialport5-dev libqt5texttospeech5-dev qtmultimedia5-dev
+
+qmake BASIC256.pro -config debug
+
+make
+
+./basic256
\ No newline at end of file
--- /dev/null
+++ basic256-2.0.99.10/COMPILING_WIN11_QT6.md
@@ -0,0 +1,33 @@
+# Windows 11 - QT6
+## 2024-11-02
+
+## Installing
+
+Download the QT online installer from qt.io
+
+Perform a custom install and install:
+* QT > QT 6.8.0 including all additional libraries
+* QT > Developer and Designer Tools > LLVM-MinGW 17.xxx
+* QT > Developer and Designer Tools > MinGW 13.xx
+* QT > Developer and Designer Tools > CMake 3.xx
+
+Install flex and bison from 
+https://sourceforge.net/projects/winflexbison/files/latest/download
+* in the folder c:\qt\Tools\win_flex_bison 
+* rename win_flex.exe to flex.exe
+* rename win_bison.exe to bison.exe
+
+In the folder C:\Qt\Tools\mingw1310_64\bin
+* rename mingw32_make.exe to make.exe
+
+Make sure that the following have been added to your path system environment variable:
+* C:\Qt\6.8.0\mingw_64\bin
+* C:\Qt\Tools\mingw1310_64\bin
+* C:\Qt\Tools\win_flex_bison
+
+## Compiling - Debug
+
+From cmd in the basic256 folder:
+* qmake basic256.pro -config debug
+* make
+
--- basic256-2.0.99.10.orig/CONTRIBUTORS
+++ basic256-2.0.99.10/CONTRIBUTORS
@@ -1,4 +1,4 @@
-
+With much thanks.
 
 Developers
 -----------
--- basic256-2.0.99.10.orig/CompileErrors.h
+++ basic256-2.0.99.10/CompileErrors.h
@@ -62,7 +62,8 @@
 #define COMPERR_INCLUDENOTALONE         45
 #define COMPERR_INCLUDENOFILE           46
 #define COMPERR_ONERRORCALL             47
-#define COMPERR_NUMBERTOOLARGE          48
+#define COMPERR_INTEGERTOOLARGE         48
+#define COMPERR_FLOATTOOLARGE           49
 
 
 
--- basic256-2.0.99.10.orig/Convert.cpp
+++ basic256-2.0.99.10/Convert.cpp
@@ -16,8 +16,9 @@ Convert::Convert(QLocale *applocale) {
 
 	// build international safe regular expression for numbers
 	locale = applocale;
-	replaceDecimalPoint = replaceDecimalPoint && locale->decimalPoint()!='.'; //use locale decimal point only if !="."
-	decimalPoint = (replaceDecimalPoint?locale->decimalPoint():'.');
+	replaceDecimalPoint = replaceDecimalPoint && locale->decimalPoint()!="."; //use locale decimal point only if !="."
+	decimalPoint = locale->decimalPoint();
+    if (!replaceDecimalPoint) decimalPoint = ".";
 	isnumericexpression = QString("^[-+]?[0-9]*") + decimalPoint + QString("?[0-9]+([eE][-+]?[0-9]+)?$");
 	musicalnote.setPattern("^(do|re|mi|fa|sol|la|si|c|d|e|f|g|a|b|h|ni|pa|vu|ga|di|ke|zo)([-]?[0-9]+)?(#{1,2}|b{1,2})?$");
 	musicalnote.setPatternOptions(QRegularExpression::CaseInsensitiveOption);
@@ -80,6 +81,15 @@ int Convert::getInt(DataElement *d) {
 	return (int) l;
 }
 
+unsigned int Convert::getUInt(DataElement *d) {
+	long l=getLong(d);
+	if (l<0||l>UINT_MAX) {
+		e = ERROR_UNSIGNEDINTEGERRANGE;
+		l = 0;
+	}
+	return (unsigned int) l;
+}
+
 long Convert::getLong(DataElement *d) {
 	long i=0;
 	if (d) {
@@ -211,7 +221,7 @@ QString Convert::getString(DataElement *
 				//check if adding of ".0" will exceed the number of digits to print numbers
 				if(((int)xp)==ddigits-1 && floattail){
 					s.setNum(d->floatval,'e',ddigits - 1);
-					s.replace(QRegExp(QStringLiteral("0+e")), QStringLiteral("e"));
+					s.replace(QRegularExpression(QStringLiteral("0+e")), QStringLiteral("e"));
 					s.replace(QStringLiteral(".e"), QStringLiteral(".0e"));
 					if(replaceDecimalPoint){
 						s.replace('.', decimalPoint);
--- basic256-2.0.99.10.orig/Convert.h
+++ basic256-2.0.99.10/Convert.h
@@ -35,6 +35,7 @@ class Convert
 		bool isNumeric(DataElement*);
 
 		int getInt(DataElement*);
+		unsigned int getUInt(DataElement*);
 		long getLong(DataElement*);
 		double getFloat(DataElement*);
 		QString getString(DataElement*);
@@ -65,7 +66,7 @@ class Convert
 		int decimaldigits;	// display n decinal digits 12 default - 8 to 15 valid
 		bool floattail;		// display floats with a tail of ".0" if whole numbers
 		bool replaceDecimalPoint; // user can chose if INPUT and PRINT should use localized decimal point
-		QChar decimalPoint;
+		QString decimalPoint;
 		
 		static int e;		// error number thrown - will be 0 if no error
 
--- basic256-2.0.99.10.orig/DataElement.cpp
+++ basic256-2.0.99.10/DataElement.cpp
@@ -25,6 +25,15 @@ DataElement::DataElement(QString s) {
 }
 
 DataElement::DataElement(int i) {
+	// 32 bit integer stored on stack as a 64 bit long
+	init();
+    type = T_INT;
+    intval = i;
+}
+
+
+DataElement::DataElement(unsigned int i) {
+	// 32 bit integer stored on stack as a 64 bit long
 	init();
     type = T_INT;
     intval = i;
--- basic256-2.0.99.10.orig/DataElement.h
+++ basic256-2.0.99.10/DataElement.h
@@ -56,6 +56,7 @@ class DataElement
 		DataElement(QString);
 		DataElement(double);
 		DataElement(long);
+		DataElement(unsigned int);
 		DataElement(int);
 		DataElement(DataElement *);
 		
--- basic256-2.0.99.10.orig/EditSyntaxHighlighter.cpp
+++ basic256-2.0.99.10/EditSyntaxHighlighter.cpp
@@ -35,15 +35,17 @@ void EditSyntaxHighlighter::highlightBlo
 	VecHighlightRules::iterator sItEnd = m_standardRules.end();
 	while (sIt != sItEnd) {
 		rule = (*sIt);
-		QRegExp expression(rule.pattern);
-		int index = text.indexOf(expression);
+		QRegularExpression rx(rule.pattern);
+        QRegularExpressionMatch rxm = rx.match(text,0);
+		int index = rxm.capturedStart();
 		while (index >= 0) {
-			int length = expression.matchedLength();
+			int length = rxm.capturedLength();
 			if (format(index).foreground().color() != m_quoteFmt.foreground().color()) {
 				// dont set the color if we are in quotes
 				setFormat(index, length, rule.format);
 			}  
-			index = text.indexOf(expression, index + length);
+            rxm = rx.match(text,index + length);
+            index = rxm.capturedStart();
 		}
 		++sIt;
 	}
@@ -374,7 +376,7 @@ void EditSyntaxHighlighter::initKeywords
             ;
 	for (QStringList::iterator it = keywordPatterns.begin(); it != keywordPatterns.end(); ++it) {
 		HighlightRule *rule = new HighlightRule;
-		rule->pattern = QRegExp("\\b" + *it + "\\b", Qt::CaseInsensitive);
+		rule->pattern = QRegularExpression("\\b" + *it + "\\b", QRegularExpression::CaseInsensitiveOption);
 		rule->format  = m_keywordFmt;
 		m_standardRules.append(*rule);
 	}
@@ -553,7 +555,7 @@ void EditSyntaxHighlighter::initConstant
 			;
 	for (QStringList::iterator it = constantPatterns.begin(); it != constantPatterns.end(); ++it ) {
 		HighlightRule *rule = new HighlightRule;
-		rule->pattern = QRegExp("\\b" + *it + "\\b", Qt::CaseInsensitive);
+		rule->pattern = QRegularExpression("\\b" + *it + "\\b", QRegularExpression::CaseInsensitiveOption);
 		rule->format  = m_constantFmt;
 		m_standardRules.append(*rule);
 	}
@@ -563,7 +565,7 @@ void EditSyntaxHighlighter::initQuotes()
 	m_quoteFmt.setForeground(Qt::magenta);
 
 	HighlightRule *rule = new HighlightRule;
-	rule->pattern = QRegExp("(\"[^\"]*\")|(\'[^\']*\')");
+	rule->pattern = QRegularExpression("(\"[^\"]*\")|(\'[^\']*\')");
 	rule->format = m_quoteFmt;
 	m_standardRules.append(*rule);
 }
@@ -572,7 +574,7 @@ void EditSyntaxHighlighter::initLabels()
 	m_labelFmt.setForeground(Qt::blue);
 
 	HighlightRule *rule = new HighlightRule;
-	rule->pattern = QRegExp("(?:^\\s*)([a-z0-9]+):", Qt::CaseInsensitive);
+	rule->pattern = QRegularExpression("(?:^\\s*)([a-z0-9]+):", QRegularExpression::CaseInsensitiveOption);
 	rule->format = m_labelFmt;
 	m_standardRules.append(*rule);
 }
@@ -581,7 +583,7 @@ void EditSyntaxHighlighter::initNumbers(
 	m_numberFmt.setForeground(Qt::darkMagenta);
 
 	HighlightRule *rule = new HighlightRule;
-	rule->pattern = QRegExp("(\\b([0-9]*\\.?[0-9]+(e[-+]?[0-9]+)?)\\b)|(\\b0x[0-9a-f]+\\b)|(\\b0b[0-1]+\\b)|(\\b0o[0-7]+\\b)", Qt::CaseInsensitive);
+	rule->pattern = QRegularExpression("(\\b([0-9]*\\.?[0-9]+(e[-+]?[0-9]+)?)\\b)|(\\b0x[0-9a-f]+\\b)|(\\b0b[0-1]+\\b)|(\\b0o[0-7]+\\b)", QRegularExpression::CaseInsensitiveOption);
 	rule->format = m_numberFmt;
 	m_standardRules.append(*rule);
 }
@@ -592,7 +594,7 @@ void EditSyntaxHighlighter::initComments
 
 	HighlightRule *rule;
 	rule = new HighlightRule;
-	rule->pattern = QRegExp("(\\bREM\\b.*$)|(#.*$)", Qt::CaseInsensitive);
+	rule->pattern = QRegularExpression("(\\bREM\\b.*$)|(#.*$)", QRegularExpression::CaseInsensitiveOption);
 	rule->format = m_commentFmt;
 	m_standardRules.append(*rule);
 }
--- basic256-2.0.99.10.orig/EditSyntaxHighlighter.h
+++ basic256-2.0.99.10/EditSyntaxHighlighter.h
@@ -19,6 +19,7 @@
 
 #include <QSyntaxHighlighter>
 #include <QTextCharFormat>
+#include <QRegularExpression>
 
 class QTextDocument;
 
@@ -35,7 +36,7 @@ protected:
 private:
     struct HighlightRule
     {
-      QRegExp pattern;
+      QRegularExpression pattern;
       QTextCharFormat format;
     };
     
--- basic256-2.0.99.10.orig/Error.cpp
+++ basic256-2.0.99.10/Error.cpp
@@ -94,6 +94,10 @@ void Error::q(int errornumber, int varia
         if (typeconverror==SETTINGSERRORNONE) return;
         if (typeconverror==SETTINGSERRORWARN) errornumber = WARNING_INTEGERRANGE;
     }
+    if (errornumber==ERROR_UNSIGNEDINTEGERRANGE) {
+        if (typeconverror==SETTINGSERRORNONE) return;
+        if (typeconverror==SETTINGSERRORWARN) errornumber = WARNING_UNSIGNEDINTEGERRANGE;
+    }
     if (errornumber==ERROR_STRING2NOTE) {
         if (typeconverror==SETTINGSERRORNONE) return;
         if (typeconverror==SETTINGSERRORWARN) errornumber = WARNING_STRING2NOTE;
@@ -355,6 +359,9 @@ QString Error::getErrorMessage(char **sy
 		case ERROR_INTEGERRANGE:
 			errormessage = tr("Number exceeds integer range (") + QString::number(INT_MIN) + tr(" to ") + QString::number(INT_MAX) + tr(")");
 			break;
+		case ERROR_UNSIGNEDINTEGERRANGE:
+			errormessage = tr("Number exceeds unsigned integer range (") + QString::number(0) + tr(" to ") + QString::number(UINT_MAX) + tr(")");
+			break;
 		case ERROR_UNSERIALIZEFORMAT:
 			errormessage = tr("Unable to UnSerialize string");
 			break;
@@ -507,6 +514,9 @@ QString Error::getErrorMessage(char **sy
 		case WARNING_INTEGERRANGE:
 			errormessage = tr("Number exceeds integer range (") + QString::number(INT_MIN) + tr(" to ") + QString::number(INT_MAX) + tr("), zero used");
 			break;
+		case WARNING_UNSIGNEDINTEGERRANGE:
+			errormessage = tr("Number exceeds unsigned integer range (") + QString::number(0) + tr(" to ") + QString::number(UINT_MAX) + tr("), zero used");
+			break;
 		case WARNING_SOUNDNOTSEEKABLE:
 			errormessage = tr("Media file is not seekable");
 			break;
--- basic256-2.0.99.10.orig/ErrorCodes.h
+++ basic256-2.0.99.10/ErrorCodes.h
@@ -130,6 +130,7 @@
 #define ERROR_MAPKEY					126
 #define ERROR_RMDIR						127
 #define ERROR_MKDIR						128
+#define ERROR_UNSIGNEDINTEGERRANGE      129
 
 
 
@@ -151,6 +152,7 @@
 #define WARNING_VARNOTASSIGNED 			WARNING_START + ERROR_VARNOTASSIGNED
 #define WARNING_LONGRANGE 				WARNING_START + ERROR_LONGRANGE
 #define WARNING_INTEGERRANGE 			WARNING_START + ERROR_INTEGERRANGE
+#define WARNING_UNSIGNEDINTEGERRANGE 	WARNING_START + ERROR_UNSIGNEDINTEGERRANGE
 #define WARNING_SOUNDNOTSEEKABLE		WARNING_START + ERROR_SOUNDNOTSEEKABLE
 #define WARNING_SOUNDLENGTH     		WARNING_START + ERROR_SOUNDLENGTH
 #define WARNING_WAVOBSOLETE             WARNING_START + ERROR_WAVOBSOLETE
--- basic256-2.0.99.10.orig/Interpreter.cpp
+++ basic256-2.0.99.10/Interpreter.cpp
@@ -394,6 +394,7 @@ QString Interpreter::opname(int op) {
 	case OP_PUSHFLOAT : return QString("OP_PUSHFLOAT");
 	case OP_PUSHINT : return QString("OP_PUSHINT");
 	case OP_PUSHLABEL : return QString("OP_PUSHLABEL");
+	case OP_PUSHLONG : return QString("OP_PUSHLONG");
 	case OP_PUSHSTRING : return QString("OP_PUSHSTRING");
 	case OP_PUTSLICE : return QString("OP_PUTSLICE");
 	case OP_RADIANS : return QString("OP_RADIANS");
@@ -676,7 +677,7 @@ int Interpreter::compileProgram(char *co
 		// because in debugMode it already call goToLine(1) at start
 		for(int i=0; i<numparsewarnings; i++) {
 		QString msg = tr("COMPILE WARNING");
-		if (parsewarningtablelexingfilenumber!=0) {
+		if (parsewarningtablelexingfilenumber[i]!=0) {
 			msg += tr(" in included file '") + QString(include_filenames[parsewarningtablelexingfilenumber[i]]) + QStringLiteral("'");
 		} else if(gotowarning){
 			emit(goToLine(parsewarningtablelinenumber[i]));
@@ -837,10 +838,13 @@ int Interpreter::compileProgram(char *co
 			case COMPERR_ONERRORCALL:
 				msg += tr("Cannot pass arguments to a SUBROUTINE used by ONERROR statement");
 				break;
-			case COMPERR_NUMBERTOOLARGE:
-				msg += tr("Number too large");
+			case COMPERR_INTEGERTOOLARGE:
+				msg += tr("Integer number too large");
 				break;
-
+			case COMPERR_FLOATTOOLARGE:
+				msg += tr("Floating point number too large");
+				break;
+				
 			default:
 				if(column==0) {
 					msg += tr("Syntax error around beginning line");
@@ -1441,15 +1445,16 @@ Interpreter::execByteCode() {
 	fprintf(stderr,"%08x %s ",(unsigned int) (op-wordCode), opname(*op).toUtf8().data());
 	if(optype(*op)==OPTYPE_INT) {
 		if ((*op)==OP_CURRLINE) {
-			int includeFileNumber = (long) *(op+1) >> 24;
-			int currentLine = (long) *(op+1) & 0xffffff;
-			fprintf(stderr, "%d %d", includeFileNumber, currentLine);
+			int includeFileNumber = (unsigned int) *(op+1) >> 24;
+			int currentLine = (unsigned int) *(op+1) & 0xffffff;
+			fprintf(stderr, "%u u", includeFileNumber, currentLine);
 		} else {
-			fprintf(stderr, "%ld", (long) *(op+1));
+			fprintf(stderr, "%d", (int) *(op+1));
 		}
 	}
 	if(optype(*op)==OPTYPE_FLOAT) fprintf(stderr, "%f", (float) *(op+1));
 	if(optype(*op)==OPTYPE_STRING) fprintf(stderr, "'%s'", (char *) (op+1));
+	if(optype(*op)==OPTYPE_LONG) fprintf(stderr, "'%ld'", (long) *(op+1));
 	if(optype(*op)==OPTYPE_LABEL){
 		int v = *(op+1);
 		fprintf(stderr, "lbl %s", ((v>=0&&v<numsyms)?symtable[v]:"__unknown__") );
@@ -2107,6 +2112,24 @@ fprintf(stderr,"in foreach map %d\n", d-
 		}
 		break;
 
+		case OPTYPE_LONG: {
+			//
+			// OPCODES with an long integer following in the wordCcode go in this switch
+			// double d is the number extracted from the wordCode
+			//
+			long *l = (long *) op;
+			op += bytesToFullWords(sizeof(long));
+			switch(opcode) {
+
+				case OP_PUSHLONG: {
+					stack->pushLong(*l);
+				}
+				break;
+
+			}
+		}
+		break;
+		
 		case OPTYPE_STRING: {
 			//
 			// OPCODES with a string in the wordCcode go in this switch
@@ -2917,35 +2940,36 @@ fprintf(stderr,"in foreach map %d\n", d-
 
 				case OP_MIDX: {
 				// regex section string (MID regeX)
-				//		 midx (expr, qtemp, start)
-				// start - start position. String indices begin at 1. If negative start is given,
+				//		 midx (expr, tempqstr, start)
+				// start - start position. String indices begin at 1. If negative start is given
 				//		 then position is starting from the end of the string,
 				//		 where -1 is the last character position, -2 the second character from the end... and so on
 
 					int start = stack->popInt();
-					QRegExp expr = QRegExp(stack->popQString());
-					expr.setMinimal(regexMinimal);
-					QString qtemp = stack->popQString();
+					QRegularExpression expr = QRegularExpression(stack->popQString(),
+                        regexMinimal?QRegularExpression::InvertedGreedinessOption:QRegularExpression::NoPatternOption);
+					QString tempqstr = stack->popQString();
 
 					if(start == 0) {
 						error->q(ERROR_STRSTART);
 						stack->pushQString(QString(""));
 					} else {
-						int pos;
-						if (start==1) {
-							pos = expr.indexIn(qtemp);
-						} else if (start>1){
-							pos = expr.indexIn(qtemp.mid(start-1));
-						}else{
-							pos = expr.indexIn(qtemp.mid(qtemp.length()+start));
+						// recalculate start to be zero based
+						if(start == 0) {
+							error->q(ERROR_STRSTART);
+                        } else if (start>0){
+							start = start - 1;
+						} else {
+							start = tempqstr.length()+start;
+                            if (start<0) start = 0;
 						}
-
-						if (pos==-1) {
+                        //
+                        QRegularExpressionMatch match = expr.match(tempqstr, start);
+                        if (match.hasMatch()) {
+                            stack->pushQString(match.captured(1));
+                        } else {                
 							// did not find it - return ""
 							stack->pushQString(QString(""));
-						} else {
-							QStringList stuff = expr.capturedTexts();
-							stack->pushQString(stuff[0]);
 						}
 					}
 				}
@@ -3067,22 +3091,29 @@ fprintf(stderr,"in foreach map %d\n", d-
 						//		 then position is starting from the end of the string,
 						//		 where -1 is the last character position, -2 the second character from the end... and so on
 						int start = stack->popInt();
-						QRegExp expr = QRegExp(stack->popQString());
-						expr.setMinimal(regexMinimal);
-						QString qtemp = stack->popQString();
+						QRegularExpression expr = QRegularExpression(stack->popQString(),
+                            regexMinimal?QRegularExpression::InvertedGreedinessOption:QRegularExpression::NoPatternOption);
+						QString tempqstr = stack->popQString();
 
-						int pos=0;
+						// recalculate start to be zero based
 						if(start == 0) {
 							error->q(ERROR_STRSTART);
-						} else if (start>0){
-							pos = expr.indexIn(qtemp,start-1)+1;
-						}else{
-							int p = qtemp.length()+start;
-							if(p<0)
-								p=0;
-							pos = expr.indexIn(qtemp, p)+1;
+                        } else if (start>0){
+							start = start - 1;
+						} else {
+							start = tempqstr.length()+start;
+                            if (start<0) start = 0;
 						}
-						stack->pushInt(pos);
+                        //
+
+						int pos=0; // not found
+
+                        QRegularExpressionMatch match = expr.match(tempqstr, start);
+                        if (match.hasMatch()) {
+                            pos = match.capturedStart() + 1;
+						}
+                        
+                        stack->pushInt(pos);
 					}
 					break;
 
@@ -4050,7 +4081,7 @@ fprintf(stderr,"in foreach map %d\n", d-
 						error->q(ERROR_RGB);
 						stack->pushLong(0);
 					} else {
-						stack->pushInt( (int) QColor(rval,gval,bval,aval).rgba());
+						stack->pushUInt( (unsigned int) QColor(rval,gval,bval,aval).rgba());
 					}
 				}
 				break;
@@ -4060,16 +4091,16 @@ fprintf(stderr,"in foreach map %d\n", d-
 					int x = stack->popInt();
 					if(drawingOnScreen || drawto.isEmpty()){
 						QRgb rgb = graphwin->image->pixel(x,y);
-						stack->pushInt((int) rgb);
+						stack->pushUInt((unsigned int) rgb);
 					}else{
 						QRgb rgb = images[drawto]->pixel(x,y);
-						stack->pushInt((int) rgb);
+						stack->pushUInt((unsigned int) rgb);
 					}
 				}
 				break;
 
 				case OP_GETCOLOR: {
-					stack->pushInt((int) drawingpen.color().rgba());
+					stack->pushUInt((unsigned int) drawingpen.color().rgba());
 				}
 				break;
 
@@ -4108,7 +4139,7 @@ fprintf(stderr,"in foreach map %d\n", d-
 						int tw, th;
 						for(th=0; th<h; th++) {
 							for(tw=0; tw<w; tw++) {
-								DataElement* temp = new DataElement((int) r[counter]);
+								DataElement* temp = new DataElement((unsigned int) r[counter]);
 								d->arraySetData(tw,th,temp);
 								delete temp;
 								counter++;
@@ -4138,7 +4169,7 @@ fprintf(stderr,"in foreach map %d\n", d-
 						int counter = 0;
 						for (th=0;th<h;th++) {
 							for (tw=0; tw<w; tw++) {
-							r[counter++] = (QRgb) convert->getInt(d->arrayGetData(tw,th));			// DONT RELEASE
+							r[counter++] = (QRgb) convert->getUInt(d->arrayGetData(tw,th));			// DONT RELEASE
 							}
 						}
 						//update painter only if needed (faster)
@@ -4604,25 +4635,24 @@ fprintf(stderr,"in foreach map %d\n", d-
 				break;
 
 				case OP_CLG: {
-					int clearcolor = stack->popInt();
-					QColor c = QColor::fromRgba((QRgb) clearcolor);
-
+					QColor c = stack->popQColor();
+					
 					if (drawingOnScreen){
 						graphwin->image->fill(c);
 						if (!fastgraphics) waitForGraphics();
 					}else if(printing){
-						if(printdocument->pageRect()==printdocument->paperRect()){
+						if(printdocument->pageRect(QPrinter::DevicePixel)==printdocument->paperRect(QPrinter::DevicePixel)){
 							//printer is in full page mode already
-							painter->fillRect(printdocument->paperRect(),c);
+							painter->fillRect(printdocument->paperRect(QPrinter::DevicePixel),c);
 						}else{
 							//a good solution is to end painter and begin after setFullPage(true)
 							//this will reset origins for painter to top-left of the page
 							//but swiching back setFullPage(false) and starting again painter (begin) to page
 							//clear the page entirely.
-							QRect r = printdocument->pageRect();
+							QRectF r = printdocument->pageRect(QPrinter::DevicePixel);
 							printdocument->setFullPage(true);
 							painter->translate(-r.left(),-r.top());
-							painter->fillRect(printdocument->paperRect(),c);
+							painter->fillRect(printdocument->paperRect(QPrinter::DevicePixel),c);
 							printdocument->setFullPage(false);
 							painter->translate(r.topLeft());
 						}
@@ -5933,6 +5963,8 @@ fprintf(stderr,"in foreach map %d\n", d-
 					}
 # else
 						error->q(ERROR_NOTIMPLEMENTED);
+                        (void) data;
+                        (void) port;
 #endif
 				}
 				break;
@@ -5961,6 +5993,7 @@ fprintf(stderr,"in foreach map %d\n", d-
 					}
 #else
 						error->q(ERROR_NOTIMPLEMENTED);
+                        (void) port;
 #endif
 					stack->pushInt(data);
 				}
@@ -6122,8 +6155,8 @@ fprintf(stderr,"in foreach map %d\n", d-
 					// regex replace function
 
 					QString qto = stack->popQString();
-					QRegExp expr = QRegExp(stack->popQString());
-					expr.setMinimal(regexMinimal);
+					QRegularExpression expr = QRegularExpression(stack->popQString(),
+                        regexMinimal?QRegularExpression::InvertedGreedinessOption:QRegularExpression::NoPatternOption);
 					QString qhaystack = stack->popQString();
 
 					stack->pushQString(qhaystack.replace(expr, qto));
@@ -6146,8 +6179,8 @@ fprintf(stderr,"in foreach map %d\n", d-
 				case OP_COUNTX: {
 					// regex count function
 
-					QRegExp expr = QRegExp(stack->popQString());
-					expr.setMinimal(regexMinimal);
+					QRegularExpression expr = QRegularExpression(stack->popQString(),
+                        regexMinimal?QRegularExpression::InvertedGreedinessOption:QRegularExpression::NoPatternOption);
 					QString qhaystack = stack->popQString();
 
 					stack->pushInt((int) (qhaystack.count(expr)));
@@ -6421,7 +6454,7 @@ fprintf(stderr,"in foreach map %d\n", d-
 				break;
 
 				case OP_GETBRUSHCOLOR: {
-					stack->pushInt((int) drawingbrush.color().rgba());
+					stack->pushUInt((unsigned int) drawingbrush.color().rgba());
 				}
 				break;
 
@@ -6522,8 +6555,8 @@ fprintf(stderr,"in foreach map %d\n", d-
 							if(printdocument->isValid()){
 								printdocument->setCreator(QString(SETTINGSAPP));
 								printdocument->setDocName(editwin->title);
-								printdocument->setPaperSize((QPrinter::PaperSize) settingsPrinterPaper);
-								printdocument->setOrientation((QPrinter::Orientation) settingsPrinterOrient);
+								printdocument->setPageSize(QPageSize((QPageSize::PageSizeId ) settingsPrinterPaper));
+								printdocument->setPageOrientation((QPageLayout::Orientation) settingsPrinterOrient);
 								if (!setPainterTo(printdocument)) {
 									error->q(ERROR_PRINTEROPEN);
 									setGraph(drawto); //if drawing on printer fails, then fall back to graph area
@@ -6628,6 +6661,10 @@ fprintf(stderr,"in foreach map %d\n", d-
 										emit(outputReady(QString("%1 %2 \"%3\"\n").arg(offset,8,16,QChar('0')).arg(opname(currentop),-20).arg((char*) o)));
 										int len = bytesToFullWords(strlen((char*) o) + 1);
 										o += len;
+									} else if (optype(currentop) == OPTYPE_LONG) {
+										// op has a single long integer arg
+										emit(outputReady(QString("%1 %2 %3\n").arg(offset,8,16,QChar('0')).arg(opname(currentop),-20).arg((long) *o)));
+										o += bytesToFullWords(sizeof(long));
 									}
 									waitCond->wait(mymutex);
 									mymutex->unlock();
@@ -6890,17 +6927,17 @@ fprintf(stderr,"in foreach map %d\n", d-
 
 					QStringList list;
 					if(opcode==OP_EXPLODE) {
-						list = qhaystack.split(qneedle, QString::KeepEmptyParts , casesens);
+						list = qhaystack.split(qneedle, Qt::KeepEmptyParts , casesens);
 					} else {
-						QRegExp expr = QRegExp(qneedle);
-						expr.setMinimal(regexMinimal);
-						if (expr.captureCount()>0) {
+						QRegularExpression expr = QRegularExpression(qneedle,
+                            regexMinimal?QRegularExpression::InvertedGreedinessOption:QRegularExpression::NoPatternOption);
+ 						if (expr.captureCount()>0) {
 							// if we have captures in our regex then return them
-							expr.indexIn(qhaystack);
-							list = expr.capturedTexts();
+                            QRegularExpressionMatch match = expr.match(qhaystack);
+							list = match.capturedTexts();
 						} else {
 							// if it is a simple regex without captures then split
-							list = qhaystack.split(expr, QString::KeepEmptyParts);
+							list = qhaystack.split(expr, Qt::KeepEmptyParts);
 						}
 					}
 					
@@ -7016,13 +7053,13 @@ fprintf(stderr,"in foreach map %d\n", d-
 
 
 				case OP_IMAGENEW: {
-					int c = stack->popInt();
+					QColor c = stack->popQColor();
 					int h = stack->popInt();
 					int w = stack->popInt();
 					lastImageId++;
 					QString id = QString("image:") + QString::number(lastImageId);
 					images[id] = new QImage(w, h, QImage::Format_ARGB32);
-					images[id]->fill(QColor::fromRgba((QRgb) c));
+					images[id]->fill(c);
 					stack->pushQString(id);
 				}
 				break;
--- basic256-2.0.99.10.orig/Interpreter.h
+++ basic256-2.0.99.10/Interpreter.h
@@ -43,13 +43,13 @@
 #include <QProcess>
 
 
-#include <QtPrintSupport/QPrinter>
-#include <QtPrintSupport/QPrinterInfo>
+#include <QPrinter>
+#include <QPrinterInfo>
 
-#include <QtSql/QSqlDatabase>
-#include <QtSql/QSqlQuery>
-#include <QtSql/QSqlRecord>
-#include <QtSql/QSqlError>
+#include <QSqlDatabase>
+#include <QSqlQuery>
+#include <QSqlRecord>
+#include <QSqlError>
 
 #ifndef ANDROID
     // includes for all ports EXCEPT android
@@ -292,10 +292,10 @@ class Interpreter : public QThread
 		int netsockfd[NUMSOCKETS];
 
 		DIR *directorypointer;		// used by DIR function
-		QTime runtimer;				// used by MSEC function
+		QElapsedTimer runtimer;				// used by MSEC function
 		//SoundSystem *sound;
 		int includeFileNumber;
-		bool regexMinimal;			// flag to tell QRegExp to be greedy (false) or minimal (true)
+		bool regexMinimal;			// flag to tell QRegularExpression to be greedy (false) or minimal (true)
 
 		bool printing;
 		QPrinter *printdocument;
--- basic256-2.0.99.10.orig/LEX/basicParse.l
+++ basic256-2.0.99.10/LEX/basicParse.l
@@ -92,7 +92,7 @@ void unputcolon();
 %x INCLUDE
 %x INCLUDE_FILE
 
-constinteger ([0-9]{1,9}|1[0-9]{9}|2(0[0-9]{8}|1([0-3][0-9]{7}|4([0-6][0-9]{6}|7([0-3][0-9]{5}|4([0-7][0-9]{4}|8([0-2][0-9]{3}|3([0-5][0-9]{2}|6([0-3][0-9]|4[0-7])))))))))
+constinteger [0-9]+
 constdecimal [0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?
 constbinary 0[bB][01]+
 consthex 0[xX][0-9a-fA-F]+
@@ -595,8 +595,17 @@ zfill [Zz][Ff][Ii][Ll][Ll]
 
 {constfalse}				{ count(); return B256BOOLFALSE; }
 {consttrue}					{ count(); return B256BOOLTRUE; }
-{constinteger}				{ count(); yylval.number = atoi(yytext); return B256INTEGER; }
-{constdecimal}				{ count(); yylval.floatnum = atof(yytext); return B256FLOAT; }
+{constinteger}				{
+								count();
+								yylval.longnum = atol(yytext);
+								//printf("constinteger %s %li\n", yytext, yylval.longnum);
+								return B256INTEGER;
+							}
+{constdecimal}				{
+								count();
+								yylval.floatnum = atof(yytext);
+								return B256FLOAT;
+							}
 {constbinary}				{
 								count();
 								yylval.string = strdup(yytext + 2);
@@ -1244,7 +1253,7 @@ mod							{ count(); return B256MOD; }
 	while (*c != ':') c++;
 	*c = 0x0;
 	//
-	yylval.number = getSymbol(temp); // get existing or create new
+	yylval.intnum = getSymbol(temp); // get existing or create new
 	free(temp);
 	//
 	return B256LABEL;
@@ -1252,7 +1261,7 @@ mod							{ count(); return B256MOD; }
 	
 {variable} {
 	count();
-	yylval.number = getSymbol(yytext);
+	yylval.intnum = getSymbol(yytext);
 	return B256VARIABLE;
 }
 
--- basic256-2.0.99.10.orig/LEX/basicParse.y
+++ basic256-2.0.99.10/LEX/basicParse.y
@@ -141,30 +141,37 @@
                 return((size + sizeof(int) - 1) / sizeof(int));
 	}
 
+    void addInt(int data) {
+        checkWordMem(1);
+        wordCode[wordOffset] = data;
+        wordOffset++;
+    }
+    
 	void addOp(int op) {
-		checkWordMem(1);
-		wordCode[wordOffset] = op;
-                wordOffset++;
+		addInt(op);
 		//printf("line=%i addOp op=%i\n",linenumber, op);
 	}
 
-        void addData(int data) {
-                checkWordMem(1);
-                wordCode[wordOffset] = data;
-                wordOffset++;
-        }
-
-	void addIntOp(int op, int data) {
+	void addIntOp(int op, long data) {
 		addOp(op);
-                addData(data);
+        addInt(data);
 	}
 
-	void addIntIntOp(int op, int data, int data2) {
+	void addIntIntOp(int op, long data, long data2) {
 		addOp(op);
-		addData(data);
-		addData(data2);
+		addInt(data);
+		addInt(data2);
 	}
 
+	void addLongOp(int op, long data) {
+		addOp(op);
+		unsigned int wlen = bytesToFullWords(sizeof(long));
+		checkWordMem(wlen);
+		long *temp = (long *) (wordCode + wordOffset);
+		*temp = data;
+		wordOffset += wlen;
+	}
+	
 	void addFloatOp(int op, double data) {
 		addOp(op);
 		unsigned int wlen = bytesToFullWords(sizeof(double));
@@ -860,20 +867,21 @@
 %token B256YELLOW
 %token B256ZFILL
 
-%union anytype {
-	int number;
+%union {
+	int intnum;
+	long longnum;
 	double floatnum;
 	char *string;
 }
 
-%token <number> B256INTEGER
+%token <longnum> B256INTEGER
 %token <floatnum> B256FLOAT
 %token <string> B256STRING
 %token <string> B256HEXCONST
 %token <string> B256BINCONST
 %token <string> B256OCTCONST
-%token <number> B256VARIABLE
-%token <number> B256LABEL
+%token <intnum> B256VARIABLE
+%token <intnum> B256LABEL
 
 
 %right ','
@@ -976,7 +984,7 @@ array_indexing:
 	'[' expr ',' expr ']'
 	| '[' expr ']' '[' expr ']'
 	| '[' expr ']' {
-		addIntOp(OP_PUSHINT, 0);
+		addLongOp(OP_PUSHLONG, 0);
 		addOp(OP_STACKSWAP);
 	}
 	;
@@ -1034,8 +1042,8 @@ functionvariables:
 // a mustached list of mustached lists (2 dimensional array)
 listoflists:
 	'{' listinlist '}'{
-		addIntOp(OP_PUSHINT, numberoflists);		// number of lists (y dim)
-		addIntOp(OP_PUSHINT, listlenmax);			// maximum number of expressions (x dim)
+		addLongOp(OP_PUSHLONG, numberoflists);		// number of lists (y dim)
+		addLongOp(OP_PUSHLONG, listlenmax);			// maximum number of expressions (x dim)
 #ifdef DEBUG
 	fprintf(stderr, "listlenmax %d\n", listlenmax);
 #endif
@@ -1046,7 +1054,7 @@ listoflists:
 // child of list of lists representing a single row of values
 listinlist:
 	listitems {
-		addIntOp(OP_PUSHINT, listlen);
+		addLongOp(OP_PUSHLONG, listlen);
 		if (listlen>listlenmax) listlenmax=listlen;
 		listlen = 0;
 		numberoflists = 1;
@@ -1059,7 +1067,7 @@ listinlist:
 // a one dimensional array
 listofitems:
 	'{' listitems '}' {
-		addIntOp(OP_PUSHINT, listlen);
+		addLongOp(OP_PUSHLONG, listlen);
 		if (listlen>listlenmax) listlenmax=listlen;
 		listlen = 0;
 	}
@@ -1075,7 +1083,7 @@ listitems:
 // a one dimensional array
 listofmapitems:
 	'{' mapitems '}' {
-		addIntOp(OP_PUSHINT, listlen);
+		addLongOp(OP_PUSHLONG, listlen);
 		if (listlen>listlenmax) listlenmax=listlen;
 		listlen = 0;
 		numberoflists = 0;
@@ -1217,13 +1225,13 @@ expr_multi:
 expr_function:
 	variable '(' callexprlist ')' {
 		// function call with arguments
-		addIntOp(OP_PUSHINT, listlen); //push number of arguments passed to compare with FUNCTION definition
+		addLongOp(OP_PUSHLONG, listlen); //push number of arguments passed to compare with FUNCTION definition
 		addIntOp(OP_CALLFUNCTION, varnumber[--nvarnumber]);
 		addIntOp(OP_CURRLINE, filenumber * 0x1000000 + linenumber);
 	}
 	| variable '(' ')' {
 		// function call without arguments
-		addIntOp(OP_PUSHINT, 0); //push number of arguments passed to compare with FUNCTION definition
+		addLongOp(OP_PUSHLONG, 0); //push number of arguments passed to compare with FUNCTION definition
 		addIntOp(OP_CALLFUNCTION, varnumber[--nvarnumber]);
 		addIntOp(OP_CURRLINE, filenumber * 0x1000000 + linenumber);
 	}
@@ -1236,46 +1244,46 @@ expr_function:
    ### Constants                           ###
    ########################################### */
 expr_constants:
-	B256BLACK args_none { addIntOp(OP_PUSHINT, 0xff000000); }
-	| B256BLUE args_none { addIntOp(OP_PUSHINT, 0xff0000ff); }
-	| B256BOOLFALSE args_none { addIntOp(OP_PUSHINT, 0); }
-	| B256BOOLTRUE args_none { addIntOp(OP_PUSHINT, 1); }
-	| B256CLEAR args_none { addIntOp(OP_PUSHINT, 0x00); }
-	| B256CYAN args_none { addIntOp(OP_PUSHINT, 0xff00ffff); }
-	| B256DARKBLUE args_none { addIntOp(OP_PUSHINT, 0xff000080); }
-	| B256DARKCYAN args_none { addIntOp(OP_PUSHINT, 0xff008080); }
-	| B256DARKGREEN args_none { addIntOp(OP_PUSHINT, 0xff008000); }
-	| B256DARKGREY args_none { addIntOp(OP_PUSHINT, 0xff808080); }
-	| B256DARKORANGE args_none { addIntOp(OP_PUSHINT, 0xffb03d00); }
-	| B256DARKPURPLE args_none { addIntOp(OP_PUSHINT, 0xff800080); }
-	| B256DARKRED args_none { addIntOp(OP_PUSHINT, 0xff800000); }
-	| B256DARKYELLOW args_none { addIntOp(OP_PUSHINT, 0xff808000); }
-	| B256GREEN args_none { addIntOp(OP_PUSHINT, 0xff00ff00); }
-	| B256GREY args_none { addIntOp(OP_PUSHINT, 0xffa4a4a4); }
-	| B256MOUSEBUTTON_CENTER args_none { addIntOp(OP_PUSHINT, MOUSEBUTTON_CENTER); }
-	| B256MOUSEBUTTON_DOUBLECLICK args_none { addIntOp(OP_PUSHINT, MOUSEBUTTON_DOUBLECLICK); }
-	| B256MOUSEBUTTON_LEFT args_none { addIntOp(OP_PUSHINT, MOUSEBUTTON_LEFT); }
-	| B256MOUSEBUTTON_NONE args_none { addIntOp(OP_PUSHINT, MOUSEBUTTON_NONE); }
-	| B256MOUSEBUTTON_RIGHT args_none { addIntOp(OP_PUSHINT, MOUSEBUTTON_RIGHT); }
-	| B256ORANGE args_none { addIntOp(OP_PUSHINT, 0xffff6600); }
-	| B256OSTYPE_ANDROID args_none { addIntOp(OP_PUSHINT, OSTYPE_ANDROID); }
-	| B256OSTYPE_LINUX args_none { addIntOp(OP_PUSHINT, OSTYPE_LINUX); }
-	| B256OSTYPE_MACINTOSH args_none { addIntOp(OP_PUSHINT, OSTYPE_MACINTOSH); }
-	| B256OSTYPE_WINDOWS args_none { addIntOp(OP_PUSHINT, OSTYPE_WINDOWS); }
-	| B256PURPLE args_none { addIntOp(OP_PUSHINT, 0xffff00ff); }
-	| B256RED args_none { addIntOp(OP_PUSHINT, 0xffff0000); }
-	| B256SLICE_ALL args_none { addIntOp(OP_PUSHINT, SLICE_ALL); }
-	| B256SLICE_PAINT args_none { addIntOp(OP_PUSHINT, SLICE_PAINT); }
-	| B256SLICE_SPRITE args_none { addIntOp(OP_PUSHINT, SLICE_SPRITE); }
-	| B256TYPE_ARRAY args_none { addIntOp(OP_PUSHINT, T_ARRAY); }
-	| B256TYPE_FLOAT args_none { addIntOp(OP_PUSHINT, T_FLOAT); }
-	| B256TYPE_INT args_none { addIntOp(OP_PUSHINT, T_INT); }
-	| B256TYPE_MAP args_none { addIntOp(OP_PUSHINT, T_MAP); }
-	| B256TYPE_REF args_none { addIntOp(OP_PUSHINT, T_REF); }
-	| B256TYPE_STRING args_none { addIntOp(OP_PUSHINT, T_STRING); }
-	| B256TYPE_UNASSIGNED args_none { addIntOp(OP_PUSHINT, T_UNASSIGNED); }
-	| B256WHITE args_none { addIntOp(OP_PUSHINT, 0xffffffff); }
-	| B256YELLOW args_none { addIntOp(OP_PUSHINT, 0xffffff00); }
+	B256BLACK args_none { addLongOp(OP_PUSHLONG, 0xff000000L); }
+	| B256BLUE args_none { addLongOp(OP_PUSHLONG, 0xff0000ffL); }
+	| B256BOOLFALSE args_none { addLongOp(OP_PUSHLONG, 0); }
+	| B256BOOLTRUE args_none { addLongOp(OP_PUSHLONG, 1); }
+	| B256CLEAR args_none { addLongOp(OP_PUSHLONG, 0x00); }
+	| B256CYAN args_none { addLongOp(OP_PUSHLONG, 0xff00ffffL); }
+	| B256DARKBLUE args_none { addLongOp(OP_PUSHLONG, 0xff000080L); }
+	| B256DARKCYAN args_none { addLongOp(OP_PUSHLONG, 0xff008080L); }
+	| B256DARKGREEN args_none { addLongOp(OP_PUSHLONG, 0xff008000L); }
+	| B256DARKGREY args_none { addLongOp(OP_PUSHLONG, 0xff808080L); }
+	| B256DARKORANGE args_none { addLongOp(OP_PUSHLONG, 0xffb03d00L); }
+	| B256DARKPURPLE args_none { addLongOp(OP_PUSHLONG, 0xff800080L); }
+	| B256DARKRED args_none { addLongOp(OP_PUSHLONG, 0xff800000L); }
+	| B256DARKYELLOW args_none { addLongOp(OP_PUSHLONG, 0xff808000L); }
+	| B256GREEN args_none { addLongOp(OP_PUSHLONG, 0xff00ff00L); }
+	| B256GREY args_none { addLongOp(OP_PUSHLONG, 0xffa4a4a4L); }
+	| B256MOUSEBUTTON_CENTER args_none { addLongOp(OP_PUSHLONG, MOUSEBUTTON_CENTER); }
+	| B256MOUSEBUTTON_DOUBLECLICK args_none { addLongOp(OP_PUSHLONG, MOUSEBUTTON_DOUBLECLICK); }
+	| B256MOUSEBUTTON_LEFT args_none { addLongOp(OP_PUSHLONG, MOUSEBUTTON_LEFT); }
+	| B256MOUSEBUTTON_NONE args_none { addLongOp(OP_PUSHLONG, MOUSEBUTTON_NONE); }
+	| B256MOUSEBUTTON_RIGHT args_none { addLongOp(OP_PUSHLONG, MOUSEBUTTON_RIGHT); }
+	| B256ORANGE args_none { addLongOp(OP_PUSHLONG, 0xffff6600L); }
+	| B256OSTYPE_ANDROID args_none { addLongOp(OP_PUSHLONG, OSTYPE_ANDROID); }
+	| B256OSTYPE_LINUX args_none { addLongOp(OP_PUSHLONG, OSTYPE_LINUX); }
+	| B256OSTYPE_MACINTOSH args_none { addLongOp(OP_PUSHLONG, OSTYPE_MACINTOSH); }
+	| B256OSTYPE_WINDOWS args_none { addLongOp(OP_PUSHLONG, OSTYPE_WINDOWS); }
+	| B256PURPLE args_none { addLongOp(OP_PUSHLONG, 0xffff00ffL); }
+	| B256RED args_none { addLongOp(OP_PUSHLONG, 0xffff0000L); }
+	| B256SLICE_ALL args_none { addLongOp(OP_PUSHLONG, SLICE_ALL); }
+	| B256SLICE_PAINT args_none { addLongOp(OP_PUSHLONG, SLICE_PAINT); }
+	| B256SLICE_SPRITE args_none { addLongOp(OP_PUSHLONG, SLICE_SPRITE); }
+	| B256TYPE_ARRAY args_none { addLongOp(OP_PUSHLONG, T_ARRAY); }
+	| B256TYPE_FLOAT args_none { addLongOp(OP_PUSHLONG, T_FLOAT); }
+	| B256TYPE_INT args_none { addLongOp(OP_PUSHLONG, T_INT); }
+	| B256TYPE_MAP args_none { addLongOp(OP_PUSHLONG, T_MAP); }
+	| B256TYPE_REF args_none { addLongOp(OP_PUSHLONG, T_REF); }
+	| B256TYPE_STRING args_none { addLongOp(OP_PUSHLONG, T_STRING); }
+	| B256TYPE_UNASSIGNED args_none { addLongOp(OP_PUSHLONG, T_UNASSIGNED); }
+	| B256WHITE args_none { addLongOp(OP_PUSHLONG, 0xffffffffL); }
+	| B256YELLOW args_none { addLongOp(OP_PUSHLONG, 0xffffff00L); }
 	
 	
 	
@@ -1284,385 +1292,385 @@ expr_constants:
    ########################################### */
 expr_errors:
 	B256ERROR_ARGUMENTCOUNT args_none {
-		addIntOp(OP_PUSHINT, ERROR_ARGUMENTCOUNT);
+		addLongOp(OP_PUSHLONG, ERROR_ARGUMENTCOUNT);
 	}
 	| B256ERROR_ARRAYELEMENT args_none {
-		addIntOp(OP_PUSHINT, ERROR_ARRAYELEMENT);
+		addLongOp(OP_PUSHLONG, ERROR_ARRAYELEMENT);
 	}
 	| B256ERROR_ARRAYEVEN args_none {
-		addIntOp(OP_PUSHINT, ERROR_ARRAYEVEN);
+		addLongOp(OP_PUSHLONG, ERROR_ARRAYEVEN);
 	}
 	| B256ERROR_ARRAYEXPR args_none {
-		addIntOp(OP_PUSHINT, ERROR_ARRAYEXPR);
+		addLongOp(OP_PUSHLONG, ERROR_ARRAYEXPR);
 	}
 	| B256ERROR_ARRAYINDEX args_none {
-		addIntOp(OP_PUSHINT, ERROR_ARRAYINDEX);
+		addLongOp(OP_PUSHLONG, ERROR_ARRAYINDEX);
 	}
 	| B256ERROR_ARRAYINDEXMISSING args_none {
-		addIntOp(OP_PUSHINT, ERROR_ARRAYINDEXMISSING);
+		addLongOp(OP_PUSHLONG, ERROR_ARRAYINDEXMISSING);
 	}
 	| B256ERROR_ARRAYLENGTH2D args_none {
-		addIntOp(OP_PUSHINT, ERROR_ARRAYLENGTH2D);
+		addLongOp(OP_PUSHLONG, ERROR_ARRAYLENGTH2D);
 	}
 	| B256ERROR_ARRAYNITEMS args_none {
-		addIntOp(OP_PUSHINT, ERROR_ARRAYNITEMS);
+		addLongOp(OP_PUSHLONG, ERROR_ARRAYNITEMS);
 	}
 	| B256ERROR_ARRAYSIZELARGE args_none {
-		addIntOp(OP_PUSHINT, ERROR_ARRAYSIZELARGE);
+		addLongOp(OP_PUSHLONG, ERROR_ARRAYSIZELARGE);
 	}
 	| B256ERROR_ARRAYSIZESMALL args_none {
-		addIntOp(OP_PUSHINT, ERROR_ARRAYSIZESMALL);
+		addLongOp(OP_PUSHLONG, ERROR_ARRAYSIZESMALL);
 	}
 	| B256ERROR_ASINACOSRANGE args_none {
-		addIntOp(OP_PUSHINT, ERROR_ASINACOSRANGE);
+		addLongOp(OP_PUSHLONG, ERROR_ASINACOSRANGE);
 	}
 	| B256ERROR_BOOLEANCONV args_none {
-		addIntOp(OP_PUSHINT, ERROR_BOOLEANCONV);
+		addLongOp(OP_PUSHLONG, ERROR_BOOLEANCONV);
 	}
 	| B256ERROR_DBCOLNO args_none {
-		addIntOp(OP_PUSHINT, ERROR_DBCOLNO);
+		addLongOp(OP_PUSHLONG, ERROR_DBCOLNO);
 	}
 	| B256ERROR_DBCONNNUMBER args_none {
-		addIntOp(OP_PUSHINT, ERROR_DBCONNNUMBER);
+		addLongOp(OP_PUSHLONG, ERROR_DBCONNNUMBER);
 	}
 	| B256ERROR_DBNOTOPEN args_none {
-		addIntOp(OP_PUSHINT, ERROR_DBNOTOPEN);
+		addLongOp(OP_PUSHLONG, ERROR_DBNOTOPEN);
 	}
 	| B256ERROR_DBNOTSET args_none {
-		addIntOp(OP_PUSHINT, ERROR_DBNOTSET);
+		addLongOp(OP_PUSHLONG, ERROR_DBNOTSET);
 	}
 	| B256ERROR_DBNOTSETROW args_none {
-		addIntOp(OP_PUSHINT, ERROR_DBNOTSETROW);
+		addLongOp(OP_PUSHLONG, ERROR_DBNOTSETROW);
 	}
 	| B256ERROR_DBOPEN args_none {
-		addIntOp(OP_PUSHINT, ERROR_DBOPEN);
+		addLongOp(OP_PUSHLONG, ERROR_DBOPEN);
 	}
 	| B256ERROR_DBQUERY args_none {
-		addIntOp(OP_PUSHINT, ERROR_DBQUERY);
+		addLongOp(OP_PUSHLONG, ERROR_DBQUERY);
 	}
 	| B256ERROR_DBSETNUMBER args_none {
-		addIntOp(OP_PUSHINT, ERROR_DBSETNUMBER);
+		addLongOp(OP_PUSHLONG, ERROR_DBSETNUMBER);
 	}
 	| B256ERROR_DIVZERO args_none {
-		addIntOp(OP_PUSHINT, ERROR_DIVZERO);
+		addLongOp(OP_PUSHLONG, ERROR_DIVZERO);
 	}
 	| B256ERROR_DOWNLOAD args_none {
-		addIntOp(OP_PUSHINT, ERROR_DOWNLOAD);
+		addLongOp(OP_PUSHLONG, ERROR_DOWNLOAD);
 	}
 	| B256ERROR_ENVELOPEMAX args_none {
-		addIntOp(OP_PUSHINT, ERROR_ENVELOPEMAX);
+		addLongOp(OP_PUSHLONG, ERROR_ENVELOPEMAX);
 	}
 	| B256ERROR_ENVELOPEODD args_none {
-		addIntOp(OP_PUSHINT, ERROR_ENVELOPEODD);
+		addLongOp(OP_PUSHLONG, ERROR_ENVELOPEODD);
 	}
 	| B256ERROR_EXPECTEDARRAY args_none {
-		addIntOp(OP_PUSHINT, ERROR_EXPECTEDARRAY);
+		addLongOp(OP_PUSHLONG, ERROR_EXPECTEDARRAY);
 	}
 	| B256ERROR_EXPECTEDSOUND args_none {
-		addIntOp(OP_PUSHINT, ERROR_EXPECTEDSOUND);
+		addLongOp(OP_PUSHLONG, ERROR_EXPECTEDSOUND);
 	}
 	| B256ERROR_FILENOTOPEN args_none {
-		addIntOp(OP_PUSHINT, ERROR_FILENOTOPEN);
+		addLongOp(OP_PUSHLONG, ERROR_FILENOTOPEN);
 	}
 	| B256ERROR_FILENUMBER args_none {
-		addIntOp(OP_PUSHINT, ERROR_FILENUMBER);
+		addLongOp(OP_PUSHLONG, ERROR_FILENUMBER);
 	}
 	| B256ERROR_FILEOPEN args_none {
-		addIntOp(OP_PUSHINT, ERROR_FILEOPEN);
+		addLongOp(OP_PUSHLONG, ERROR_FILEOPEN);
 	}
 	| B256ERROR_FILEOPERATION args_none {
-		addIntOp(OP_PUSHINT, ERROR_FILEOPERATION);
+		addLongOp(OP_PUSHLONG, ERROR_FILEOPERATION);
 	}
 	| B256ERROR_FILERESET args_none {
-		addIntOp(OP_PUSHINT, ERROR_FILERESET);
+		addLongOp(OP_PUSHLONG, ERROR_FILERESET);
 	}
 	| B256ERROR_FILEWRITE args_none {
-		addIntOp(OP_PUSHINT, ERROR_FILEWRITE);
+		addLongOp(OP_PUSHLONG, ERROR_FILEWRITE);
 	}
 	| B256ERROR_FOLDER args_none {
-		addIntOp(OP_PUSHINT, ERROR_FOLDER);
+		addLongOp(OP_PUSHLONG, ERROR_FOLDER);
 	}
 	| B256ERROR_FREEDB args_none {
-		addIntOp(OP_PUSHINT, ERROR_FREEDB);
+		addLongOp(OP_PUSHLONG, ERROR_FREEDB);
 	}
 	| B256ERROR_FREEDBSET args_none {
-		addIntOp(OP_PUSHINT, ERROR_FREEDBSET);
+		addLongOp(OP_PUSHLONG, ERROR_FREEDBSET);
 	}
 	| B256ERROR_FREEFILE args_none {
-		addIntOp(OP_PUSHINT, ERROR_FREEFILE);
+		addLongOp(OP_PUSHLONG, ERROR_FREEFILE);
 	}
 	| B256ERROR_FREENET args_none {
-		addIntOp(OP_PUSHINT, ERROR_FREENET);
+		addLongOp(OP_PUSHLONG, ERROR_FREENET);
 	}
 	| B256ERROR_HARMONICLIST args_none {
-		addIntOp(OP_PUSHINT, ERROR_HARMONICLIST);
+		addLongOp(OP_PUSHLONG, ERROR_HARMONICLIST);
 	}
 	| B256ERROR_HARMONICNUMBER args_none {
-		addIntOp(OP_PUSHINT, ERROR_HARMONICNUMBER);
+		addLongOp(OP_PUSHLONG, ERROR_HARMONICNUMBER);
 	}
 	| B256ERROR_IMAGEFILE args_none {
-		addIntOp(OP_PUSHINT, ERROR_IMAGEFILE);
+		addLongOp(OP_PUSHLONG, ERROR_IMAGEFILE);
 	}
 	| B256ERROR_IMAGERESOURCE args_none {
-		addIntOp(OP_PUSHINT, ERROR_IMAGERESOURCE);
+		addLongOp(OP_PUSHLONG, ERROR_IMAGERESOURCE);
 	}
 	| B256ERROR_IMAGESAVETYPE args_none {
-		addIntOp(OP_PUSHINT, ERROR_IMAGESAVETYPE);
+		addLongOp(OP_PUSHLONG, ERROR_IMAGESAVETYPE);
 	}
 	| B256ERROR_IMAGESCALE args_none {
-		addIntOp(OP_PUSHINT, ERROR_IMAGESCALE);
+		addLongOp(OP_PUSHLONG, ERROR_IMAGESCALE);
 	}
 	| B256ERROR_INFINITY args_none {
-		addIntOp(OP_PUSHINT, ERROR_INFINITY);
+		addLongOp(OP_PUSHLONG, ERROR_INFINITY);
 	}
 	| B256ERROR_INTEGERRANGE args_none {
-		addIntOp(OP_PUSHINT, ERROR_INTEGERRANGE);
+		addLongOp(OP_PUSHLONG, ERROR_INTEGERRANGE);
 	}
 	| B256ERROR_INVALIDKEYNAME args_none {
-		addIntOp(OP_PUSHINT, ERROR_INVALIDKEYNAME);
+		addLongOp(OP_PUSHLONG, ERROR_INVALIDKEYNAME);
 	}
 	| B256ERROR_INVALIDPROGNAME args_none {
-		addIntOp(OP_PUSHINT, ERROR_INVALIDPROGNAME);
+		addLongOp(OP_PUSHLONG, ERROR_INVALIDPROGNAME);
 	}
 	| B256ERROR_INVALIDRESOURCE args_none {
-		addIntOp(OP_PUSHINT, ERROR_INVALIDRESOURCE);
+		addLongOp(OP_PUSHLONG, ERROR_INVALIDRESOURCE);
 	}
 	| B256ERROR_LOGRANGE args_none {
-		addIntOp(OP_PUSHINT, ERROR_LOGRANGE);
+		addLongOp(OP_PUSHLONG, ERROR_LOGRANGE);
 	}
 	| B256ERROR_LONGRANGE args_none {
-		addIntOp(OP_PUSHINT, ERROR_LONGRANGE);
+		addLongOp(OP_PUSHLONG, ERROR_LONGRANGE);
 	}
 	| B256ERROR_MAXRECURSE args_none {
-		addIntOp(OP_PUSHINT, ERROR_MAXRECURSE);
+		addLongOp(OP_PUSHLONG, ERROR_MAXRECURSE);
 	}
 	| B256ERROR_NETACCEPT args_none {
-		addIntOp(OP_PUSHINT, ERROR_NETACCEPT);
+		addLongOp(OP_PUSHLONG, ERROR_NETACCEPT);
 	}
 	| B256ERROR_NETBIND args_none {
-		addIntOp(OP_PUSHINT, ERROR_NETBIND);
+		addLongOp(OP_PUSHLONG, ERROR_NETBIND);
 	}
 	| B256ERROR_NETCONN args_none {
-		addIntOp(OP_PUSHINT, ERROR_NETCONN);
+		addLongOp(OP_PUSHLONG, ERROR_NETCONN);
 	}
 	| B256ERROR_NETHOST args_none {
-		addIntOp(OP_PUSHINT, ERROR_NETHOST);
+		addLongOp(OP_PUSHLONG, ERROR_NETHOST);
 	}
 	| B256ERROR_NETNONE args_none {
-		addIntOp(OP_PUSHINT, ERROR_NETNONE);
+		addLongOp(OP_PUSHLONG, ERROR_NETNONE);
 	}
 	| B256ERROR_NETREAD args_none {
-		addIntOp(OP_PUSHINT, ERROR_NETREAD);
+		addLongOp(OP_PUSHLONG, ERROR_NETREAD);
 	}
 	| B256ERROR_NETSOCK args_none {
-		addIntOp(OP_PUSHINT, ERROR_NETSOCK);
+		addLongOp(OP_PUSHLONG, ERROR_NETSOCK);
 	}
 	| B256ERROR_NETSOCKNUMBER args_none {
-		addIntOp(OP_PUSHINT, ERROR_NETSOCKNUMBER);
+		addLongOp(OP_PUSHLONG, ERROR_NETSOCKNUMBER);
 	}
 	| B256ERROR_NETSOCKOPT args_none {
-		addIntOp(OP_PUSHINT, ERROR_NETSOCKOPT);
+		addLongOp(OP_PUSHLONG, ERROR_NETSOCKOPT);
 	}
 	| B256ERROR_NETWRITE args_none {
-		addIntOp(OP_PUSHINT, ERROR_NETWRITE);
+		addLongOp(OP_PUSHLONG, ERROR_NETWRITE);
 	}
 	| B256ERROR_NEXTNOFOR args_none {
-		addIntOp(OP_PUSHINT, ERROR_NEXTNOFOR);
+		addLongOp(OP_PUSHLONG, ERROR_NEXTNOFOR);
 	}
 	| B256ERROR_NONE args_none {
-		addIntOp(OP_PUSHINT, ERROR_NONE);
+		addLongOp(OP_PUSHLONG, ERROR_NONE);
 	}
 	| B256ERROR_NOSUCHFUNCTION args_none {
-		addIntOp(OP_PUSHINT, ERROR_NOSUCHFUNCTION);
+		addLongOp(OP_PUSHLONG, ERROR_NOSUCHFUNCTION);
 	}
 	| B256ERROR_NOSUCHLABEL args_none {
-		addIntOp(OP_PUSHINT, ERROR_NOSUCHLABEL);
+		addLongOp(OP_PUSHLONG, ERROR_NOSUCHLABEL);
 	}
 	| B256ERROR_NOSUCHSUBROUTINE args_none {
-		addIntOp(OP_PUSHINT, ERROR_NOSUCHSUBROUTINE);
+		addLongOp(OP_PUSHLONG, ERROR_NOSUCHSUBROUTINE);
 	}
 	| B256ERROR_NOTARRAY args_none {
-		addIntOp(OP_PUSHINT, ERROR_NOTARRAY);
+		addLongOp(OP_PUSHLONG, ERROR_NOTARRAY);
 	}
 	| B256ERROR_NOTIMPLEMENTED args_none {
-		addIntOp(OP_PUSHINT, ERROR_NOTIMPLEMENTED);
+		addLongOp(OP_PUSHLONG, ERROR_NOTIMPLEMENTED);
 	}
 	| B256ERROR_NUMBERCONV args_none {
-		addIntOp(OP_PUSHINT, ERROR_NUMBERCONV);
+		addLongOp(OP_PUSHLONG, ERROR_NUMBERCONV);
 	}
 	| B256ERROR_NUMBEREXPR args_none {
-		addIntOp(OP_PUSHINT, ERROR_NUMBEREXPR);
+		addLongOp(OP_PUSHLONG, ERROR_NUMBEREXPR);
 	}
 	| B256ERROR_ONEDIMENSIONAL args_none {
-		addIntOp(OP_PUSHINT, ERROR_ONEDIMENSIONAL);
+		addLongOp(OP_PUSHLONG, ERROR_ONEDIMENSIONAL);
 	}
 	| B256ERROR_ONERRORSUB args_none {
-		addIntOp(OP_PUSHINT, ERROR_ONERRORSUB);
+		addLongOp(OP_PUSHLONG, ERROR_ONERRORSUB);
 	}
 	| B256ERROR_PENWIDTH args_none {
-		addIntOp(OP_PUSHINT, ERROR_PENWIDTH);
+		addLongOp(OP_PUSHLONG, ERROR_PENWIDTH);
 	}
 	| B256ERROR_PERMISSION args_none {
-		addIntOp(OP_PUSHINT, ERROR_PERMISSION);
+		addLongOp(OP_PUSHLONG, ERROR_PERMISSION);
 	}
 	| B256ERROR_POLYPOINTS args_none {
-		addIntOp(OP_PUSHINT, ERROR_POLYPOINTS);
+		addLongOp(OP_PUSHLONG, ERROR_POLYPOINTS);
 	}
 	| B256ERROR_PRINTERNOTOFF args_none {
-		addIntOp(OP_PUSHINT, ERROR_PRINTERNOTOFF);
+		addLongOp(OP_PUSHLONG, ERROR_PRINTERNOTOFF);
 	}
 	| B256ERROR_PRINTERNOTON args_none {
-		addIntOp(OP_PUSHINT, ERROR_PRINTERNOTON);
+		addLongOp(OP_PUSHLONG, ERROR_PRINTERNOTON);
 	}
 	| B256ERROR_PRINTEROPEN args_none {
-		addIntOp(OP_PUSHINT, ERROR_PRINTEROPEN);
+		addLongOp(OP_PUSHLONG, ERROR_PRINTEROPEN);
 	}
 	| B256ERROR_RADIX args_none {
-		addIntOp(OP_PUSHINT, ERROR_RADIX);
+		addLongOp(OP_PUSHLONG, ERROR_RADIX);
 	}
 	| B256ERROR_RADIXSTRING args_none {
-		addIntOp(OP_PUSHINT, ERROR_RADIXSTRING);
+		addLongOp(OP_PUSHLONG, ERROR_RADIXSTRING);
 	}
 	| B256ERROR_REFNOTASSIGNED args_none {
-		addIntOp(OP_PUSHINT, ERROR_REFNOTASSIGNED);
+		addLongOp(OP_PUSHLONG, ERROR_REFNOTASSIGNED);
 	}
 	| B256ERROR_RGB args_none {
-		addIntOp(OP_PUSHINT, ERROR_RGB);
+		addLongOp(OP_PUSHLONG, ERROR_RGB);
 	}
 	| B256ERROR_SERIALPARAMETER args_none {
-		addIntOp(OP_PUSHINT, ERROR_SERIALPARAMETER);
+		addLongOp(OP_PUSHLONG, ERROR_SERIALPARAMETER);
 	}
 	| B256ERROR_SETTINGMAXKEYS args_none {
-		addIntOp(OP_PUSHINT, ERROR_SETTINGMAXKEYS);
+		addLongOp(OP_PUSHLONG, ERROR_SETTINGMAXKEYS);
 	}
 	| B256ERROR_SETTINGMAXLEN args_none {
-		addIntOp(OP_PUSHINT, ERROR_SETTINGMAXLEN);
+		addLongOp(OP_PUSHLONG, ERROR_SETTINGMAXLEN);
 	}
 	| B256ERROR_SETTINGSGETACCESS args_none {
-		addIntOp(OP_PUSHINT, ERROR_SETTINGSGETACCESS);
+		addLongOp(OP_PUSHLONG, ERROR_SETTINGSGETACCESS);
 	}
 	| B256ERROR_SETTINGSSETACCESS args_none {
-		addIntOp(OP_PUSHINT, ERROR_SETTINGSSETACCESS);
+		addLongOp(OP_PUSHLONG, ERROR_SETTINGSSETACCESS);
 	}
 	| B256ERROR_SLICESIZE args_none {
-		addIntOp(OP_PUSHINT, ERROR_SLICESIZE);
+		addLongOp(OP_PUSHLONG, ERROR_SLICESIZE);
 	}
 	| B256ERROR_SOUNDERROR args_none {
-		addIntOp(OP_PUSHINT, ERROR_SOUNDERROR);
+		addLongOp(OP_PUSHLONG, ERROR_SOUNDERROR);
 	}
 	| B256ERROR_SOUNDFILE args_none {
-		addIntOp(OP_PUSHINT, ERROR_SOUNDFILE);
+		addLongOp(OP_PUSHLONG, ERROR_SOUNDFILE);
 	}
 	| B256ERROR_SOUNDFILEFORMAT args_none {
-		addIntOp(OP_PUSHINT, ERROR_SOUNDFILEFORMAT);
+		addLongOp(OP_PUSHLONG, ERROR_SOUNDFILEFORMAT);
 	}
 	| B256ERROR_SOUNDLENGTH args_none {
-		addIntOp(OP_PUSHINT, ERROR_SOUNDLENGTH);
+		addLongOp(OP_PUSHLONG, ERROR_SOUNDLENGTH);
 	}
 	| B256ERROR_SOUNDNOTSEEKABLE args_none {
-		addIntOp(OP_PUSHINT, ERROR_SOUNDNOTSEEKABLE);
+		addLongOp(OP_PUSHLONG, ERROR_SOUNDNOTSEEKABLE);
 	}
 	| B256ERROR_SOUNDRESOURCE args_none {
-		addIntOp(OP_PUSHINT, ERROR_SOUNDRESOURCE);
+		addLongOp(OP_PUSHLONG, ERROR_SOUNDRESOURCE);
 	}
 	| B256ERROR_SPRITENA args_none {
-		addIntOp(OP_PUSHINT, ERROR_SPRITENA);
+		addLongOp(OP_PUSHLONG, ERROR_SPRITENA);
 	}
 	| B256ERROR_SPRITENUMBER args_none {
-		addIntOp(OP_PUSHINT, ERROR_SPRITENUMBER);
+		addLongOp(OP_PUSHLONG, ERROR_SPRITENUMBER);
 	}
 	| B256ERROR_SPRITESLICE args_none {
-		addIntOp(OP_PUSHINT, ERROR_SPRITESLICE);
+		addLongOp(OP_PUSHLONG, ERROR_SPRITESLICE);
 	}
 	| B256ERROR_SQRRANGE args_none {
-		addIntOp(OP_PUSHINT, ERROR_SQRRANGE);
+		addLongOp(OP_PUSHLONG, ERROR_SQRRANGE);
 	}
 	| B256ERROR_STACKUNDERFLOW args_none {
-		addIntOp(OP_PUSHINT, ERROR_STACKUNDERFLOW);
+		addLongOp(OP_PUSHLONG, ERROR_STACKUNDERFLOW);
 	}
 	| B256ERROR_STRING2NOTE args_none {
-		addIntOp(OP_PUSHINT, ERROR_STRING2NOTE);
+		addLongOp(OP_PUSHLONG, ERROR_STRING2NOTE);
 	}
 	| B256ERROR_STRINGCONV args_none {
-		addIntOp(OP_PUSHINT, ERROR_STRINGCONV);
+		addLongOp(OP_PUSHLONG, ERROR_STRINGCONV);
 	}
 	| B256ERROR_STRINGEXPR args_none {
-		addIntOp(OP_PUSHINT, ERROR_STRINGEXPR);
+		addLongOp(OP_PUSHLONG, ERROR_STRINGEXPR);
 	}
 	| B256ERROR_STRINGMAXLEN args_none {
-		addIntOp(OP_PUSHINT, ERROR_STRINGMAXLEN);
+		addLongOp(OP_PUSHLONG, ERROR_STRINGMAXLEN);
 	}
 	| B256ERROR_STRSTART args_none {
-		addIntOp(OP_PUSHINT, ERROR_STRSTART);
+		addLongOp(OP_PUSHLONG, ERROR_STRSTART);
 	}
 	| B256ERROR_TOOMANYSOUNDS args_none {
-		addIntOp(OP_PUSHINT, ERROR_TOOMANYSOUNDS);
+		addLongOp(OP_PUSHLONG, ERROR_TOOMANYSOUNDS);
 	}
 	| B256ERROR_UNEXPECTEDRETURN args_none {
-		addIntOp(OP_PUSHINT, ERROR_UNEXPECTEDRETURN);
+		addLongOp(OP_PUSHLONG, ERROR_UNEXPECTEDRETURN);
 	}
 	| B256ERROR_UNSERIALIZEFORMAT args_none {
-		addIntOp(OP_PUSHINT, ERROR_UNSERIALIZEFORMAT);
+		addLongOp(OP_PUSHLONG, ERROR_UNSERIALIZEFORMAT);
 	}
 	| B256ERROR_VARCIRCULAR args_none {
-		addIntOp(OP_PUSHINT, ERROR_VARCIRCULAR);
+		addLongOp(OP_PUSHLONG, ERROR_VARCIRCULAR);
 	}
 	| B256ERROR_VARNOTASSIGNED args_none {
-		addIntOp(OP_PUSHINT, ERROR_VARNOTASSIGNED);
+		addLongOp(OP_PUSHLONG, ERROR_VARNOTASSIGNED);
 	}
 	| B256ERROR_VARNULL args_none {
-		addIntOp(OP_PUSHINT, ERROR_VARNULL);
+		addLongOp(OP_PUSHLONG, ERROR_VARNULL);
 	}
 	| B256ERROR_WAVEFORMLOGICAL args_none {
-		addIntOp(OP_PUSHINT, ERROR_WAVEFORMLOGICAL);
+		addLongOp(OP_PUSHLONG, ERROR_WAVEFORMLOGICAL);
 	}
 	| B256ERROR_WAVOBSOLETE args_none {
-		addIntOp(OP_PUSHINT, ERROR_WAVOBSOLETE);
+		addLongOp(OP_PUSHLONG, ERROR_WAVOBSOLETE);
 	}
 	| B256WARNING_ARRAYELEMENT args_none {
-		addIntOp(OP_PUSHINT, WARNING_ARRAYELEMENT);
+		addLongOp(OP_PUSHLONG, WARNING_ARRAYELEMENT);
 	}
 	| B256WARNING_BOOLEANCONV args_none {
-		addIntOp(OP_PUSHINT, WARNING_BOOLEANCONV);
+		addLongOp(OP_PUSHLONG, WARNING_BOOLEANCONV);
 	}
 	| B256WARNING_INTEGERRANGE args_none {
-		addIntOp(OP_PUSHINT, WARNING_INTEGERRANGE);
+		addLongOp(OP_PUSHLONG, WARNING_INTEGERRANGE);
 	}
 	| B256WARNING_LONGRANGE args_none {
-		addIntOp(OP_PUSHINT, WARNING_LONGRANGE);
+		addLongOp(OP_PUSHLONG, WARNING_LONGRANGE);
 	}
 	| B256WARNING_NUMBERCONV args_none {
-		addIntOp(OP_PUSHINT, WARNING_NUMBERCONV);
+		addLongOp(OP_PUSHLONG, WARNING_NUMBERCONV);
 	}
 	| B256WARNING_REFNOTASSIGNED args_none {
-		addIntOp(OP_PUSHINT, WARNING_REFNOTASSIGNED);
+		addLongOp(OP_PUSHLONG, WARNING_REFNOTASSIGNED);
 	}
 	| B256WARNING_SOUNDERROR args_none {
-		addIntOp(OP_PUSHINT, WARNING_SOUNDERROR);
+		addLongOp(OP_PUSHLONG, WARNING_SOUNDERROR);
 	}
 	| B256WARNING_SOUNDFILEFORMAT args_none {
-		addIntOp(OP_PUSHINT, WARNING_SOUNDFILEFORMAT);
+		addLongOp(OP_PUSHLONG, WARNING_SOUNDFILEFORMAT);
 	}
 	| B256WARNING_SOUNDLENGTH args_none {
-		addIntOp(OP_PUSHINT, WARNING_SOUNDLENGTH);
+		addLongOp(OP_PUSHLONG, WARNING_SOUNDLENGTH);
 	}
 	| B256WARNING_SOUNDNOTSEEKABLE args_none {
-		addIntOp(OP_PUSHINT, WARNING_SOUNDNOTSEEKABLE);
+		addLongOp(OP_PUSHLONG, WARNING_SOUNDNOTSEEKABLE);
 	}
 	| B256WARNING_START args_none {
-		addIntOp(OP_PUSHINT, WARNING_START);
+		addLongOp(OP_PUSHLONG, WARNING_START);
 	}
 	| B256WARNING_STRING2NOTE args_none {
-		addIntOp(OP_PUSHINT, WARNING_STRING2NOTE);
+		addLongOp(OP_PUSHLONG, WARNING_STRING2NOTE);
 	}
 	| B256WARNING_STRINGCONV args_none {
-		addIntOp(OP_PUSHINT, WARNING_STRINGCONV);
+		addLongOp(OP_PUSHLONG, WARNING_STRINGCONV);
 	}
 	| B256WARNING_VARNOTASSIGNED args_none {
-		addIntOp(OP_PUSHINT, WARNING_VARNOTASSIGNED);
+		addLongOp(OP_PUSHLONG, WARNING_VARNOTASSIGNED);
 	}
 	| B256WARNING_WAVOBSOLETE args_none {
-		addIntOp(OP_PUSHINT, WARNING_WAVOBSOLETE);
+		addLongOp(OP_PUSHLONG, WARNING_WAVOBSOLETE);
 	}
 	;
 
@@ -1671,19 +1679,23 @@ expr_errors:
    ### numeric expressions                 ###
    ########################################### */
 expr_numeric:
-	B256INTEGER { addIntOp(OP_PUSHINT, $1); }
+	B256INTEGER {
+		addLongOp(OP_PUSHLONG, $1);
+		//printf("add op_pushlong %li\n", $1);
+	}
+	
 	| B256FLOAT   {
 		if(isfinite($1)){
 			addFloatOp(OP_PUSHFLOAT, $1);
 		}else{
-			errorcode = COMPERR_NUMBERTOOLARGE;
+			errorcode = COMPERR_FLOATTOOLARGE;
 			return -1;
 		}
 	}
 
 	| '+' B256INTEGER %prec B256UNARY {
 		 // accept/eat unary plus only for numbers
-		 addIntOp(OP_PUSHINT, $2);
+		 addLongOp(OP_PUSHLONG, $2);
 	}
 
 	| '+' B256FLOAT %prec B256UNARY {
@@ -1691,7 +1703,7 @@ expr_numeric:
 		if(isfinite($2)){
 			addFloatOp(OP_PUSHFLOAT, $2);
 		}else{
-			errorcode = COMPERR_NUMBERTOOLARGE;
+			errorcode = COMPERR_FLOATTOOLARGE;
 			return -1;
 		}
 	}			
@@ -1710,7 +1722,7 @@ expr_numeric:
 	}
 	| expr '%' %prec B256UNARY {
 		/* expression% is actually a percentage */
-		addIntOp(OP_PUSHINT, 100);
+		addLongOp(OP_PUSHLONG, 100);
 		addOp(OP_DIV);
 	}
 	| expr B256INTDIV expr {
@@ -1749,7 +1761,7 @@ expr_numeric:
 		addIntOp(OP_ARR_GET, v);		// get current value
 		addOp(OP_STACKDUP);				// duplicate (1 to save and 1 to increment)
 		addOp(OP_STACKSAVE);			// save original
-		addIntOp(OP_PUSHINT,1);			// add 1
+		addLongOp(OP_PUSHLONG,1);			// add 1
 		addOp(OP_ADD);
 		addIntOp(OP_ARR_SET, v);		// assign new value
 		addOp(OP_STACKUNSAVE);			// put original value on the stack
@@ -1761,7 +1773,7 @@ expr_numeric:
 		addIntOp(OP_ARR_GET, v);		// get current value
 		addOp(OP_STACKDUP);				// duplicate (1 to save and 1 to increment)
 		addOp(OP_STACKSAVE);			// save original
-		addIntOp(OP_PUSHINT,-1);		// subtract 1
+		addLongOp(OP_PUSHLONG,-1);		// subtract 1
 		addOp(OP_ADD);
 		addIntOp(OP_ARR_SET, v);		// assign new value
 		addOp(OP_STACKUNSAVE);			// put original value on the stack
@@ -1771,7 +1783,7 @@ expr_numeric:
 		int v = varnumber[--nvarnumber];
 		addOp(OP_STACKDUP2);			// save indexes
 		addIntOp(OP_ARR_GET, v);		// get current value
-		addIntOp(OP_PUSHINT,1);			// add 1
+		addLongOp(OP_PUSHLONG,1);			// add 1
 		addOp(OP_ADD);
 		addOp(OP_STACKDUP);				// duplicate (1 to set 1 to stack)
 		addOp(OP_STACKSAVE);			// save 1 to stack
@@ -1783,7 +1795,7 @@ expr_numeric:
 		int v = varnumber[--nvarnumber];
 		addOp(OP_STACKDUP2);			// save indexes
 		addIntOp(OP_ARR_GET, v);		// get current value
-		addIntOp(OP_PUSHINT,-1);		// subtract 1
+		addLongOp(OP_PUSHLONG,-1);		// subtract 1
 		addOp(OP_ADD);
 		addOp(OP_STACKDUP);				// duplicate (1 to set 1 to stack)
 		addOp(OP_STACKSAVE);			// save 1 to stack
@@ -1793,27 +1805,27 @@ expr_numeric:
 	| variable B256ADD1 {
 		addIntOp(OP_VAR_GET,varnumber[--nvarnumber]);
 		addIntOp(OP_VAR_GET,varnumber[nvarnumber]);
-		addIntOp(OP_PUSHINT,1);
+		addLongOp(OP_PUSHLONG,1);
 		addOp(OP_ADD);
 		addIntOp(OP_VAR_SET,varnumber[nvarnumber]);
 	}
 	| variable B256SUB1 {
 		addIntOp(OP_VAR_GET,varnumber[--nvarnumber]);
 		addIntOp(OP_VAR_GET,varnumber[nvarnumber]);
-		addIntOp(OP_PUSHINT,-1);
+		addLongOp(OP_PUSHLONG,-1);
 		addOp(OP_ADD);
 		addIntOp(OP_VAR_SET,varnumber[nvarnumber]);
 	}
 	| B256ADD1 variable {
 		addIntOp(OP_VAR_GET,varnumber[--nvarnumber]);
-		addIntOp(OP_PUSHINT,1);
+		addLongOp(OP_PUSHLONG,1);
 		addOp(OP_ADD);
 		addIntOp(OP_VAR_SET,varnumber[nvarnumber]);
 		addIntOp(OP_VAR_GET,varnumber[nvarnumber]);
 	}
 	| B256SUB1 variable {
 		addIntOp(OP_VAR_GET,varnumber[--nvarnumber]);
-		addIntOp(OP_PUSHINT,-1);
+		addLongOp(OP_PUSHLONG,-1);
 		addOp(OP_ADD);
 		addIntOp(OP_VAR_SET,varnumber[nvarnumber]);
 		addIntOp(OP_VAR_GET,varnumber[nvarnumber]);
@@ -1823,17 +1835,17 @@ expr_numeric:
 	| B256LENGTH '(' expr ')' { addOp(OP_LENGTH); }
 	| B256ASC '(' expr ')' { addOp(OP_ASC); }
 	| B256INSTR '(' expr ',' expr ')' {
-		addIntOp(OP_PUSHINT, 1);	// start
-		addIntOp(OP_PUSHINT, 0);	// case sens flag
+		addLongOp(OP_PUSHLONG, 1);	// start
+		addLongOp(OP_PUSHLONG, 0);	// case sens flag
 		addOp(OP_INSTR);
 	}
 	| B256INSTR '(' expr ',' expr ',' expr ')' {
-		addIntOp(OP_PUSHINT, 0);	// case sens flag
+		addLongOp(OP_PUSHLONG, 0);	// case sens flag
 		addOp(OP_INSTR);
 	 }
 	| B256INSTR '(' expr ',' expr ',' expr ',' expr')' { addOp(OP_INSTR); }
 	| B256INSTRX '(' expr ',' expr ')' {
-		addIntOp(OP_PUSHINT, 1);	//start
+		addLongOp(OP_PUSHLONG, 1);	//start
 		addOp(OP_INSTRX);
 	}
 	| B256INSTRX '(' expr ',' expr ',' expr ')' { addOp(OP_INSTRX); }
@@ -1855,7 +1867,7 @@ expr_numeric:
 	| B256RAND args_none { addOp(OP_RAND); }
 				| B256PI args_none { addFloatOp(OP_PUSHFLOAT, 3.14159265358979323846); }
 	| B256BOOLEOF args_none {
-		addIntOp(OP_PUSHINT, 0);
+		addLongOp(OP_PUSHLONG, 0);
 		addOp(OP_EOF);
 	}
 	| B256BOOLEOF '(' expr ')' { addOp(OP_EOF); }
@@ -1869,17 +1881,17 @@ expr_numeric:
 	| B256GRAPHWIDTH args_none { addOp(OP_GRAPHWIDTH); }
 	| B256GRAPHHEIGHT args_none { addOp(OP_GRAPHHEIGHT); }
 	| B256SIZE args_none {
-		addIntOp(OP_PUSHINT, 0);
+		addLongOp(OP_PUSHLONG, 0);
 		addOp(OP_SIZE);
 	}
 	| B256SIZE '(' expr ')' { addOp(OP_SIZE); }
 	| B256KEYPRESSED args_none {
-		addIntOp(OP_PUSHINT, 0x00);
+		addLongOp(OP_PUSHLONG, 0x00);
 		addOp(OP_KEYPRESSED);
 	}
 	| B256KEYPRESSED '(' expr ')' { addOp(OP_KEYPRESSED); }
 	| B256KEY args_none     {
-		addIntOp(OP_PUSHINT, 0x00);
+		addLongOp(OP_PUSHLONG, 0x00);
 		addOp(OP_KEY);
 	}
 	| B256KEY '(' expr ')'     {
@@ -1893,7 +1905,7 @@ expr_numeric:
 	| B256CLICKB args_none { addOp(OP_CLICKB); }
 	| B256PIXEL '(' expr ',' expr ')' { addOp(OP_PIXEL); }
 	| B256RGB '(' expr ',' expr ',' expr ')' {
-		addIntOp(OP_PUSHINT,255);	// a
+		addLongOp(OP_PUSHLONG,255);	// a
 		addOp(OP_RGB);
 	}
 	| B256RGB '(' expr ',' expr ',' expr ',' expr ')' {
@@ -1903,7 +1915,7 @@ expr_numeric:
 	| B256GETBRUSHCOLOR args_none { addOp(OP_GETBRUSHCOLOR); }
 	| B256GETPENWIDTH args_none { addOp(OP_GETPENWIDTH); }
 	| B256SPRITECOLLIDE '(' expr ',' expr ',' expr ')' { addOp(OP_SPRITECOLLIDE); }
-	| B256SPRITECOLLIDE '(' expr ',' expr ')' { addIntOp(OP_PUSHINT, 0); addOp(OP_SPRITECOLLIDE); }
+	| B256SPRITECOLLIDE '(' expr ',' expr ')' { addLongOp(OP_PUSHLONG, 0); addOp(OP_SPRITECOLLIDE); }
 	| B256SPRITEX '(' expr ')' { addOp(OP_SPRITEX); }
 	| B256SPRITEY '(' expr ')' { addOp(OP_SPRITEY); }
 	| B256SPRITEH '(' expr ')' { addOp(OP_SPRITEH); }
@@ -1913,60 +1925,60 @@ expr_numeric:
 	| B256SPRITES '(' expr ')' { addOp(OP_SPRITES); }
 	| B256SPRITEO '(' expr ')' { addOp(OP_SPRITEO); }
 	| B256DBROW args_none {
-		addIntOp(OP_PUSHINT,0);	// default db number
-		addIntOp(OP_PUSHINT,0);	// default dbset number
+		addLongOp(OP_PUSHLONG,0);	// default db number
+		addLongOp(OP_PUSHLONG,0);	// default dbset number
 		addOp(OP_DBROW);
 	}
 	| B256DBROW '(' expr ')' {
-		addIntOp(OP_PUSHINT,0);	// default dbset number
+		addLongOp(OP_PUSHLONG,0);	// default dbset number
 		addOp(OP_DBROW);
 	}
 	| B256DBROW '(' expr ',' expr')' {
 		addOp(OP_DBROW);
 	}
 	| B256DBINT '(' expr ')' {
-		addIntOp(OP_PUSHINT,0);	// default db number
+		addLongOp(OP_PUSHLONG,0);	// default db number
 		addOp(OP_STACKSWAP);
-		addIntOp(OP_PUSHINT,0);	// default dbset number
+		addLongOp(OP_PUSHLONG,0);	// default dbset number
 		addOp(OP_STACKSWAP);
 		addOp(OP_DBINT); }
 	| B256DBINT '(' expr ',' expr ')' {
-		addIntOp(OP_PUSHINT,0);	// default dbset number
+		addLongOp(OP_PUSHLONG,0);	// default dbset number
 		addOp(OP_STACKSWAP);
 		addOp(OP_DBINT); }
 	| B256DBINT '(' expr ',' expr ',' expr ')' {
 		addOp(OP_DBINT); }
 	| B256DBFLOAT '(' expr ')' {
-		addIntOp(OP_PUSHINT,0);	// default db number
+		addLongOp(OP_PUSHLONG,0);	// default db number
 		addOp(OP_STACKSWAP);
-		addIntOp(OP_PUSHINT,0);	// default dbset number
+		addLongOp(OP_PUSHLONG,0);	// default dbset number
 		addOp(OP_STACKSWAP);
 		addOp(OP_DBFLOAT); }
 	| B256DBFLOAT '(' expr ',' expr ')' {
-		addIntOp(OP_PUSHINT,0);	// default dbset number
+		addLongOp(OP_PUSHLONG,0);	// default dbset number
 		addOp(OP_STACKSWAP);
 		addOp(OP_DBFLOAT); }
 	| B256DBFLOAT '(' expr ',' expr ',' expr ')' {
 		addOp(OP_DBFLOAT); }
 	| B256DBNULL '(' expr ')' {
-		addIntOp(OP_PUSHINT,0);	// default db number
+		addLongOp(OP_PUSHLONG,0);	// default db number
 		addOp(OP_STACKSWAP);
-		addIntOp(OP_PUSHINT,0);	// default dbset number
+		addLongOp(OP_PUSHLONG,0);	// default dbset number
 		addOp(OP_STACKSWAP);
 		addOp(OP_DBNULL); }
 	| B256DBNULL '(' expr ',' expr ')' {
-		addIntOp(OP_PUSHINT,0);	// default dbset number
+		addLongOp(OP_PUSHLONG,0);	// default dbset number
 		addOp(OP_STACKSWAP);
 		addOp(OP_DBNULL); }
 	| B256DBNULL '(' expr ',' expr ',' expr ')' {
 		addOp(OP_DBNULL); }
 	| B256LASTERROR args_none { addOp(OP_LASTERROR); }
 	| B256LASTERRORLINE args_none { addOp(OP_LASTERRORLINE); }
-	| B256NETDATA args_none { addIntOp(OP_PUSHINT, 0); addOp(OP_NETDATA); }
+	| B256NETDATA args_none { addLongOp(OP_PUSHLONG, 0); addOp(OP_NETDATA); }
 	| B256NETDATA '(' expr ')' { addOp(OP_NETDATA); }
 	| B256PORTIN '(' expr ')' { addOp(OP_PORTIN); }
 	| B256COUNT '(' expr ',' expr ')' {
-		addIntOp(OP_PUSHINT, 0); // case sens flag
+		addLongOp(OP_PUSHLONG, 0); // case sens flag
 		addOp(OP_COUNT);
 	 }
 	| B256COUNT '(' expr ',' expr ',' expr ')' { addOp(OP_COUNT); }
@@ -1977,67 +1989,67 @@ expr_numeric:
 	| B256TEXTWIDTH '(' expr ',' expr ')' { addOp(OP_TEXTBOXWIDTH); }
 	| B256TEXTHEIGHT args_none { addOp(OP_TEXTHEIGHT); }
 	| B256TEXTHEIGHT '(' expr ',' expr ')' { addOp(OP_TEXTBOXHEIGHT); }
-	| B256READBYTE args_none { addIntOp(OP_PUSHINT, 0); addOp(OP_READBYTE); }
+	| B256READBYTE args_none { addLongOp(OP_PUSHLONG, 0); addOp(OP_READBYTE); }
 	| B256READBYTE '(' expr ')' { addOp(OP_READBYTE); }
 	| B256FREEDB args_none { addOp(OP_FREEDB); }
 	| B256FREEDBSET args_none {
-		addIntOp(OP_PUSHINT,0);	// default db number
+		addLongOp(OP_PUSHLONG,0);	// default db number
 		addOp(OP_FREEDBSET);
 	}
 	| B256FREEDBSET '(' expr ')' { addOp(OP_FREEDBSET); }
 	| B256FREEFILE args_none { addOp(OP_FREEFILE); }
 	| B256FREENET args_none { addOp(OP_FREENET); }
-	| B256VERSION args_none { addIntOp(OP_PUSHINT, VERSIONSIGNATURE); }
+	| B256VERSION args_none { addLongOp(OP_PUSHLONG, VERSIONSIGNATURE); }
 	| B256CONFIRM '(' expr ')' {
-		addIntOp(OP_PUSHINT,-1);	// no default
+		addLongOp(OP_PUSHLONG,-1);	// no default
 		addOp(OP_CONFIRM);
 	}
 	| B256CONFIRM '(' expr ',' expr ')' {
 		addOp(OP_CONFIRM);
 	}
 	| B256FROMBINARY '(' expr ')' {
-		addIntOp(OP_PUSHINT,2);	// radix
+		addLongOp(OP_PUSHLONG,2);	// radix
 		addOp(OP_FROMRADIX);
 	}
 	| B256FROMHEX '(' expr ')' {
-		addIntOp(OP_PUSHINT,16);	// radix
+		addLongOp(OP_PUSHLONG,16);	// radix
 		addOp(OP_FROMRADIX);
 	}
 	| B256FROMOCTAL '(' expr ')' {
-		addIntOp(OP_PUSHINT,8);	// radix
+		addLongOp(OP_PUSHLONG,8);	// radix
 		addOp(OP_FROMRADIX);
 	}
 	| B256FROMRADIX '(' expr ',' expr ')' {
 		addOp(OP_FROMRADIX);
 	}
 	| B256BINCONST {
-		addIntOp(OP_PUSHINT,strtoul($1, NULL, 2));
+		addLongOp(OP_PUSHLONG,strtoul($1, NULL, 2));
 		if(errno==ERANGE){
-			errorcode = COMPERR_NUMBERTOOLARGE;
+			errorcode = COMPERR_INTEGERTOOLARGE;
 			return -1;
 		}
 		//addStringOp(OP_PUSHSTRING, $1);
-		//addIntOp(OP_PUSHINT,2);	// radix
+		//addLongOp(OP_PUSHLONG,2);	// radix
 		//addOp(OP_FROMRADIX);
 	}
 	| B256HEXCONST {
-		addIntOp(OP_PUSHINT,strtoul($1, NULL, 16));
+		addLongOp(OP_PUSHLONG,strtoul($1, NULL, 16));
 		if(errno==ERANGE){
-			errorcode = COMPERR_NUMBERTOOLARGE;
+			errorcode = COMPERR_INTEGERTOOLARGE;
 			return -1;
 		}
 		//addStringOp(OP_PUSHSTRING, $1);
-		//addIntOp(OP_PUSHINT,16);	// radix
+		//addLongOp(OP_PUSHLONG,16);	// radix
 		//addOp(OP_FROMRADIX);
 	}
 	| B256OCTCONST {
-		addIntOp(OP_PUSHINT,strtoul($1, NULL, 8));
+		addLongOp(OP_PUSHLONG,strtoul($1, NULL, 8));
 		if(errno==ERANGE){
-			errorcode = COMPERR_NUMBERTOOLARGE;
+			errorcode = COMPERR_INTEGERTOOLARGE;
 			return -1;
 		}
 		//addStringOp(OP_PUSHSTRING, $1);
-		//addIntOp(OP_PUSHINT,8);	// radix
+		//addLongOp(OP_PUSHLONG,8);	// radix
 		//addOp(OP_FROMRADIX);
 	}
 	| B256WAVLENGTH args_none { addOp(OP_WAVLENGTH); }
@@ -2052,8 +2064,8 @@ expr_numeric:
 		addOp(OP_SOUNDPLAYER);
 	}
 	| B256SOUNDPLAYER '(' args_ee ')' {
-		addIntOp(OP_PUSHINT, 2);	// 2 columns
-		addIntOp(OP_PUSHINT, 1);	// 1 row
+		addLongOp(OP_PUSHLONG, 2);	// 2 columns
+		addLongOp(OP_PUSHLONG, 1);	// 1 row
 		addOp(OP_LIST2ARRAY);
 		addOp(OP_SOUNDPLAYER);
 	}
@@ -2064,21 +2076,21 @@ expr_numeric:
 		addOp(OP_SOUNDPOSITION);
 	}
 	| B256SOUNDPOSITION args_none {
-		addIntOp(OP_PUSHINT, -1);
+		addLongOp(OP_PUSHLONG, -1);
 		addOp(OP_SOUNDPOSITION);
 	}
 	| B256SOUNDSTATE '(' expr ')' {
 		addOp(OP_SOUNDSTATE);
 	}
 	| B256SOUNDSTATE args_none {
-		addIntOp(OP_PUSHINT, -1);
+		addLongOp(OP_PUSHLONG, -1);
 		addOp(OP_SOUNDSTATE);
 	}
 	| B256SOUNDLENGTH '(' expr ')' {
 		addOp(OP_SOUNDLENGTH);
 	}
 	| B256SOUNDLENGTH args_none {
-		addIntOp(OP_PUSHINT, -1);
+		addLongOp(OP_PUSHLONG, -1);
 		addOp(OP_SOUNDLENGTH);
 	}
 	| B256SOUNDSAMPLERATE args_none {
@@ -2094,7 +2106,7 @@ expr_numeric:
 		addOp(OP_IMAGEPIXEL);
 	}
 	| B256ROUND '(' expr ')' {
-		addIntOp(OP_PUSHINT,0);		// default decimal places
+		addLongOp(OP_PUSHLONG,0);		// default decimal places
 		addOp(OP_ROUND);
 	}
 	| B256ROUND '(' args_ee ')' {
@@ -2129,30 +2141,30 @@ expr_string:
 	| B256UPPER '(' expr ')' { addOp(OP_UPPER); }
 	| B256LOWER '(' expr ')' { addOp(OP_LOWER); }
 	| B256MID '(' expr ',' expr ',' expr ')' { addOp(OP_MID); }
-	| B256MIDX '(' expr ',' expr ')' { addIntOp(OP_PUSHINT, 1); addOp(OP_MIDX); }
+	| B256MIDX '(' expr ',' expr ')' { addLongOp(OP_PUSHLONG, 1); addOp(OP_MIDX); }
 	| B256MIDX '(' expr ',' expr ',' expr ')' { addOp(OP_MIDX); }
 	| B256LEFT '(' expr ',' expr ')' { addOp(OP_LEFT); }
 	| B256RIGHT '(' expr ',' expr ')' { addOp(OP_RIGHT); }
-	| B256READ args_none { addIntOp(OP_PUSHINT, 0); addOp(OP_READ); }
+	| B256READ args_none { addLongOp(OP_PUSHLONG, 0); addOp(OP_READ); }
 	| B256READ '(' expr ')' { addOp(OP_READ); }
-	| B256READLINE args_none { addIntOp(OP_PUSHINT, 0); addOp(OP_READLINE); }
+	| B256READLINE args_none { addLongOp(OP_PUSHLONG, 0); addOp(OP_READLINE); }
 	| B256READLINE '(' expr ')' { addOp(OP_READLINE); }
 	| B256CURRENTDIR args_none { addOp(OP_CURRENTDIR); }
 	| B256DBSTRING '(' expr ')' {
-		addIntOp(OP_PUSHINT,0);	// default db number
+		addLongOp(OP_PUSHLONG,0);	// default db number
 		addOp(OP_STACKSWAP);
-		addIntOp(OP_PUSHINT,0);	// default dbset number
+		addLongOp(OP_PUSHLONG,0);	// default dbset number
 		addOp(OP_STACKSWAP);
 		addOp(OP_DBSTRING); }
 	| B256DBSTRING '(' expr ',' expr ')' {
-		addIntOp(OP_PUSHINT,0);	// default dbset number
+		addLongOp(OP_PUSHLONG,0);	// default dbset number
 		addOp(OP_STACKSWAP);
 		addOp(OP_DBSTRING); }
 	| B256DBSTRING '(' expr ',' expr ',' expr ')' {
 		addOp(OP_DBSTRING); }
 	| B256LASTERRORMESSAGE args_none { addOp(OP_LASTERRORMESSAGE); }
 	| B256LASTERROREXTRA args_none { addOp(OP_LASTERROREXTRA); }
-	| B256NETREAD  args_none { addIntOp(OP_PUSHINT, 0); addOp(OP_NETREAD); }
+	| B256NETREAD  args_none { addLongOp(OP_PUSHLONG, 0); addOp(OP_NETREAD); }
 	| B256NETREAD '(' expr ')' { addOp(OP_NETREAD); }
 	| B256NETADDRESS args_none { addOp(OP_NETADDRESS); }
 	| B256MD5 '(' expr ')' { addOp(OP_MD5); }
@@ -2162,7 +2174,7 @@ expr_string:
 	| B256DIR '(' expr ')' { addOp(OP_DIR); }
 	| B256DIR args_none { addStringOp(OP_PUSHSTRING, ""); addOp(OP_DIR); }
 	| B256REPLACE '(' expr ',' expr ',' expr ')' {
-		addIntOp(OP_PUSHINT, 0);	// case sens flag
+		addLongOp(OP_PUSHLONG, 0);	// case sens flag
 		addOp(OP_REPLACE);
 	}
 	| B256REPLACE '(' expr ',' expr ',' expr ',' expr ')' { addOp(OP_REPLACE); }
@@ -2188,15 +2200,15 @@ expr_string:
 	| B256PROMPT '(' expr ',' expr ')' {
 		addOp(OP_PROMPT); }
 	| B256TOBINARY '(' expr ')' {
-		addIntOp(OP_PUSHINT,2);	// radix
+		addLongOp(OP_PUSHLONG,2);	// radix
 		addOp(OP_TORADIX);
 	}
 	| B256TOHEX '(' expr ')' {
-		addIntOp(OP_PUSHINT,16);	// radix
+		addLongOp(OP_PUSHLONG,16);	// radix
 		addOp(OP_TORADIX);
 	}
 	| B256TOOCTAL '(' expr ')' {
-		addIntOp(OP_PUSHINT,8);	// radix
+		addLongOp(OP_PUSHLONG,8);	// radix
 		addOp(OP_TORADIX);
 	}
 	| B256TORADIX '(' expr ',' expr ')' {
@@ -2216,8 +2228,8 @@ expr_string:
 		addOp(OP_SOUNDLOAD);
 	}
 	| B256SOUNDLOAD '(' args_ee ')' {
-		addIntOp(OP_PUSHINT, 2);	// 2 columns
-		addIntOp(OP_PUSHINT, 1);	// 1 row
+		addLongOp(OP_PUSHLONG, 2);	// 2 columns
+		addLongOp(OP_PUSHLONG, 1);	// 1 row
 		addOp(OP_LIST2ARRAY);
 		addOp(OP_SOUNDLOAD);
 	}
@@ -2228,26 +2240,26 @@ expr_string:
 		addOp(OP_IMAGENEW);
 	}
 	| B256IMAGENEW '(' expr ',' expr ')' {
-		addIntOp(OP_PUSHINT, 0x00);
+		addLongOp(OP_PUSHLONG, 0x00);
 		addOp(OP_IMAGENEW);
 	}
 	| B256IMAGELOAD '(' expr ')' {
 		addOp(OP_IMAGELOAD);
 	}
 	| B256IMAGECOPY '(' expr ',' expr ',' expr ',' expr ',' expr ')' {
-		addIntOp(OP_PUSHINT, 5); //number of arguments
+		addLongOp(OP_PUSHLONG, 5); //number of arguments
 		addOp(OP_IMAGECOPY);
 	}
 	| B256IMAGECOPY '(' expr ',' expr ',' expr ',' expr ')' {
-		addIntOp(OP_PUSHINT, 4); //number of arguments
+		addLongOp(OP_PUSHLONG, 4); //number of arguments
 		addOp(OP_IMAGECOPY);
 	}
 	| B256IMAGECOPY '(' expr ')' {
-		addIntOp(OP_PUSHINT, 1); //number of arguments
+		addLongOp(OP_PUSHLONG, 1); //number of arguments
 		addOp(OP_IMAGECOPY);
 	}
 	| B256IMAGECOPY args_none {
-		addIntOp(OP_PUSHINT, 0); //number of arguments
+		addLongOp(OP_PUSHLONG, 0); //number of arguments
 		addOp(OP_IMAGECOPY);
 	}
 	| B256LJUST '(' args_ee ')' {
@@ -2299,7 +2311,7 @@ expr_dataelement:
 	}
 	
 	| B256EXPLODE args_ee {
-		addIntOp(OP_PUSHINT, 0);	// case sensitive flag
+		addLongOp(OP_PUSHLONG, 0);	// case sensitive flag
 		addOp(OP_EXPLODE);
 	}
 	| B256EXPLODE args_eee {
@@ -2310,7 +2322,7 @@ expr_dataelement:
 	}
 
 	| B256GETSLICE args_eeee {
-		addIntOp(OP_PUSHINT, SLICE_ALL);	// get everything
+		addLongOp(OP_PUSHLONG, SLICE_ALL);	// get everything
 		addOp(OP_GETSLICE);
 	}
 	| B256GETSLICE args_eeeee {
@@ -2819,20 +2831,20 @@ dimstmt: 	B256DIM array_element {
 			| B256DIM array_element B256FILL expr {
 				addOp(OP_STACKTOPTO2);
 				addIntOp(OP_DIM, varnumber[--nvarnumber]);
-				addIntOp(OP_PUSHINT, 1);		// fill all elements
+				addLongOp(OP_PUSHLONG, 1);		// fill all elements
 				addIntOp(OP_ARRAYFILL, varnumber[nvarnumber]);
 			}
 			| B256DIM variable_a expr {
-				addIntOp(OP_PUSHINT, 1);
+				addLongOp(OP_PUSHLONG, 1);
 				addOp(OP_STACKSWAP);
 				addIntOp(OP_DIM, varnumber[--nvarnumber]);
 			}
 			| B256DIM variable_a expr B256FILL expr {
 				addOp(OP_STACKSWAP);
-				addIntOp(OP_PUSHINT, 1);
+				addLongOp(OP_PUSHLONG, 1);
 				addOp(OP_STACKSWAP);
 				addIntOp(OP_DIM, varnumber[--nvarnumber]);
-				addIntOp(OP_PUSHINT, 1);		// fill all elements
+				addLongOp(OP_PUSHLONG, 1);		// fill all elements
 				addIntOp(OP_ARRAYFILL, varnumber[nvarnumber]);
 			}
 			| B256DIM variable_a args_ee {
@@ -2841,14 +2853,14 @@ dimstmt: 	B256DIM array_element {
 			| B256DIM variable_a args_ee B256FILL expr {
 				addOp(OP_STACKTOPTO2);
 				addIntOp(OP_DIM, varnumber[--nvarnumber]);
-				addIntOp(OP_PUSHINT, 1);		// fill all elements
+				addLongOp(OP_PUSHLONG, 1);		// fill all elements
 				addIntOp(OP_ARRAYFILL, varnumber[nvarnumber]);
 			}
 			| B256DIM variable_a '=' expr {
 				addIntOp(OP_VAR_SET, varnumber[--nvarnumber]);
 			}
 			| B256DIM variable_a B256FILL expr {
-				addIntOp(OP_PUSHINT, 1);
+				addLongOp(OP_PUSHLONG, 1);
 				addIntOp(OP_ARRAYFILL, varnumber[--nvarnumber]);
 			}
 			;
@@ -2859,20 +2871,20 @@ redimstmt:	B256REDIM array_element {
 			| B256REDIM array_element B256FILL expr {
 				addOp(OP_STACKTOPTO2);
 				addIntOp(OP_REDIM, varnumber[--nvarnumber]);
-				addIntOp(OP_PUSHINT, 0);		// just fill unassigned
+				addLongOp(OP_PUSHLONG, 0);		// just fill unassigned
 				addIntOp(OP_ARRAYFILL, varnumber[nvarnumber]);
 			}
 			| B256REDIM variable_a expr {
-				addIntOp(OP_PUSHINT, 1);
+				addLongOp(OP_PUSHLONG, 1);
 				addOp(OP_STACKSWAP);
 				addIntOp(OP_REDIM, varnumber[--nvarnumber]);
 			}
 			| B256REDIM variable_a expr B256FILL expr {
 				addOp(OP_STACKSWAP);
-				addIntOp(OP_PUSHINT, 1);
+				addLongOp(OP_PUSHLONG, 1);
 				addOp(OP_STACKSWAP);
 				addIntOp(OP_REDIM, varnumber[--nvarnumber]);
-				addIntOp(OP_PUSHINT, 0);		// just fill unassigned
+				addLongOp(OP_PUSHLONG, 0);		// just fill unassigned
 				addIntOp(OP_ARRAYFILL, varnumber[nvarnumber]);
 			}
 			| B256REDIM variable_a args_ee {
@@ -2881,7 +2893,7 @@ redimstmt:	B256REDIM array_element {
 			| B256REDIM variable_a args_ee B256FILL expr {
 				addOp(OP_STACKTOPTO2);
 				addIntOp(OP_REDIM, varnumber[--nvarnumber]);
-				addIntOp(OP_PUSHINT, 0);		// just fill unassigned
+				addLongOp(OP_PUSHLONG, 0);		// just fill unassigned
 				addIntOp(OP_ARRAYFILL, varnumber[nvarnumber]);
 			}
 			;
@@ -2902,11 +2914,11 @@ clearstmt:	B256CLS args_none {
 			}
 			| B256CLG args_none {
 				// push the color clear if there are no arguments
-				addIntOp(OP_PUSHINT, 0x00);
-				//addIntOp(OP_PUSHINT, 0x00);
-				//addIntOp(OP_PUSHINT, 0x00);
-				//addIntOp(OP_PUSHINT, 0x00);
-				//addIntOp(OP_PUSHINT, 0x00);
+				addLongOp(OP_PUSHLONG, 0x00);
+				//addLongOp(OP_PUSHLONG, 0x00);
+				//addLongOp(OP_PUSHLONG, 0x00);
+				//addLongOp(OP_PUSHLONG, 0x00);
+				//addLongOp(OP_PUSHLONG, 0x00);
 				//addOp(OP_RGB);
 				addOp(OP_CLG);
 			}
@@ -2952,7 +2964,7 @@ arrayelementassign:
 				int v = varnumber[--nvarnumber];
 				addOp(OP_STACKDUP2);			// save indexes
 				addIntOp(OP_ARR_GET, v);		// get current value
-				addIntOp(OP_PUSHINT,1);			// add 1
+				addLongOp(OP_PUSHLONG,1);			// add 1
 				addOp(OP_ADD);
 				addIntOp(OP_ARR_SET, v);		// assign new value
 			}
@@ -2961,7 +2973,7 @@ arrayelementassign:
 				int v = varnumber[--nvarnumber];
 				addOp(OP_STACKDUP2);			// save indexes
 				addIntOp(OP_ARR_GET, v);		// get current value
-				addIntOp(OP_PUSHINT,-1);		// subtract 1
+				addLongOp(OP_PUSHLONG,-1);		// subtract 1
 				addOp(OP_ADD);
 				addIntOp(OP_ARR_SET, v);		// assign new value
 			}
@@ -3034,7 +3046,7 @@ arrayelementassign:
 /* assign an entire array in one statement */
 arrayassign:
 			variable_a B256FILL expr {
-				addIntOp(OP_PUSHINT, 1);		// fill all elements
+				addLongOp(OP_PUSHLONG, 1);		// fill all elements
 				addIntOp(OP_ARRAYFILL, varnumber[--nvarnumber]);
 			}
 			;
@@ -3046,13 +3058,13 @@ assign:
 			}
 			| variable B256ADD1 {
 				addIntOp(OP_VAR_GET,varnumber[--nvarnumber]);
-				addIntOp(OP_PUSHINT,1);
+				addLongOp(OP_PUSHLONG,1);
 				addOp(OP_ADD);
 				addIntOp(OP_VAR_SET,varnumber[nvarnumber]);
 			}
 			| variable B256SUB1 {
 				addIntOp(OP_VAR_GET,varnumber[--nvarnumber]);
-				addIntOp(OP_PUSHINT,-1);
+				addLongOp(OP_PUSHLONG,-1);
 				addOp(OP_ADD);
 				addIntOp(OP_VAR_SET,varnumber[nvarnumber]);
 			}
@@ -3101,7 +3113,7 @@ forstmt: 	B256FOR variable '=' expr B256
 				int var =  varnumber[--nvarnumber];
 				newIf(linenumber, IFTABLETYPEFOR, var);
 				// push default step 1 and exit address
-				addIntOp(OP_PUSHINT, 1); //step
+				addLongOp(OP_PUSHLONG, 1); //step
 				addIntOp(OP_PUSHLABEL, getInternalSymbol(iftableid[numifs-1],INTERNALSYMBOLEXIT));
 				addIntOp(OP_FOR, var);
 			}
@@ -3200,12 +3212,12 @@ gosubstmt:	B256GOSUB variable {
 			;
 
 callstmt:	B256CALL variable '(' ')' {
-				addIntOp(OP_PUSHINT, 0); //push number of arguments passed to compare with SUBROUTINE definition
+				addLongOp(OP_PUSHLONG, 0); //push number of arguments passed to compare with SUBROUTINE definition
 				addIntOp(OP_CALLSUBROUTINE, varnumber[--nvarnumber]);
 				addIntOp(OP_CURRLINE, filenumber * 0x1000000 + linenumber);
 			}
 			| B256CALL variable '(' callexprlist ')' {
-					addIntOp(OP_PUSHINT, listlen); //push number of arguments passed to compare with SUBROUTINE definition
+					addLongOp(OP_PUSHLONG, listlen); //push number of arguments passed to compare with SUBROUTINE definition
 					addIntOp(OP_CALLSUBROUTINE, varnumber[--nvarnumber]);
 					addIntOp(OP_CURRLINE, filenumber * 0x1000000 + linenumber);
 			}
@@ -3268,7 +3280,7 @@ colorstmt:	B256SETCOLOR expr {
 				addOp(OP_SETCOLOR);
 			}
 			| B256SETCOLOR args_eee {
-				addIntOp(OP_PUSHINT, 255);
+				addLongOp(OP_PUSHLONG, 255);
 				addOp(OP_RGB);
 				addOp(OP_STACKDUP);
 				addOp(OP_SETCOLOR);
@@ -3277,9 +3289,9 @@ colorstmt:	B256SETCOLOR expr {
 			;
 
 soundstmt:	B256SOUND args_ee {
-				addIntOp(OP_PUSHINT, 2);	// 2 columns (this)
-				addIntOp(OP_PUSHINT, 1);	// 1 row
-				addIntOp(OP_PUSHINT, 2);	// 2 columns (max)
+				addLongOp(OP_PUSHLONG, 2);	// 2 columns (this)
+				addLongOp(OP_PUSHLONG, 1);	// 1 row
+				addLongOp(OP_PUSHLONG, 2);	// 2 columns (max)
 				addOp(OP_LIST2ARRAY);
 				addOp(OP_SOUND);
 			}
@@ -3289,12 +3301,12 @@ soundstmt:	B256SOUND args_ee {
 			;
 
 soundplaystmt:	B256SOUNDPLAY args_none {
-		addIntOp(OP_PUSHINT, -1);
+		addLongOp(OP_PUSHLONG, -1);
 		addOp(OP_SOUNDPLAY);
 	}
 	| B256SOUNDPLAY args_ee {
-		addIntOp(OP_PUSHINT, 2);	// 2 columns
-		addIntOp(OP_PUSHINT, 1);	// 1 row
+		addLongOp(OP_PUSHLONG, 2);	// 2 columns
+		addLongOp(OP_PUSHLONG, 1);	// 1 row
 		addOp(OP_LIST2ARRAY);
 		addOp(OP_SOUNDPLAY);
 	}
@@ -3310,7 +3322,7 @@ soundpausestmt:  B256SOUNDPAUSE expr {
 		addOp(OP_SOUNDPAUSE);
 	}
 	| B256SOUNDPAUSE args_none {
-		addIntOp(OP_PUSHINT, -1);
+		addLongOp(OP_PUSHLONG, -1);
 		addOp(OP_SOUNDPAUSE);
 	}
 	;
@@ -3319,7 +3331,7 @@ soundplayeroffstmt:  B256SOUNDPLAYEROFF
 		addOp(OP_SOUNDPLAYEROFF);
 	}
 	| B256SOUNDPLAYEROFF args_none {
-		addIntOp(OP_PUSHINT, -1);
+		addLongOp(OP_PUSHLONG, -1);
 		addOp(OP_SOUNDPLAYEROFF);
 	}
 	;
@@ -3328,7 +3340,7 @@ soundstopstmt:  B256SOUNDSTOP expr {
 		addOp(OP_SOUNDSTOP);
 	}
 	| B256SOUNDSTOP args_none {
-		addIntOp(OP_PUSHINT, -1);
+		addLongOp(OP_PUSHLONG, -1);
 		addOp(OP_SOUNDSTOP);
 	}
 	;
@@ -3338,14 +3350,14 @@ soundwaitstmt:
 		addOp(OP_SOUNDWAIT);
 	}
 	| B256SOUNDWAIT args_none {
-		addIntOp(OP_PUSHINT, -1);
+		addLongOp(OP_PUSHLONG, -1);
 		addOp(OP_SOUNDWAIT);
 	}
 	;
 
 soundwaveformstmt:  
 	B256SOUNDWAVEFORM expr {
-		addIntOp(OP_PUSHINT,0);
+		addLongOp(OP_PUSHLONG,0);
 		addOp(OP_SOUNDWAVEFORM);
 	}
 	| B256SOUNDWAVEFORM args_ee {
@@ -3387,7 +3399,7 @@ soundfadestmt:  B256SOUNDFADE args_eeee
 	| B256SOUNDFADE args_eee {
 		addOp(OP_STACKTOPTO2);
 		addOp(OP_STACKTOPTO2);
-		addIntOp(OP_PUSHINT, -1);
+		addLongOp(OP_PUSHLONG, -1);
 		addOp(OP_STACKSWAP);
 		addOp(OP_STACKSWAP2);
 		addOp(OP_SOUNDFADE);
@@ -3398,7 +3410,7 @@ soundseekstmt:  B256SOUNDSEEK args_ee {
 		addOp(OP_SOUNDSEEK);
 	}
 	| B256SOUNDSEEK expr {
-		addIntOp(OP_PUSHINT, -1);
+		addLongOp(OP_PUSHLONG, -1);
 		addOp(OP_STACKSWAP);
 		addOp(OP_SOUNDSEEK);
 	}
@@ -3408,7 +3420,7 @@ soundvolumestmt:  B256SOUNDVOLUME args_e
 		addOp(OP_SOUNDVOLUME);
 	}
 	| B256SOUNDVOLUME expr {
-		addIntOp(OP_PUSHINT, -1);
+		addLongOp(OP_PUSHLONG, -1);
 		addOp(OP_STACKSWAP);
 		addOp(OP_SOUNDVOLUME);
 	}
@@ -3418,7 +3430,7 @@ soundloopstmt:  B256SOUNDLOOP args_ee {
 		addOp(OP_SOUNDLOOP);
 	}
 	| B256SOUNDLOOP expr {
-		addIntOp(OP_PUSHINT, -1);
+		addLongOp(OP_PUSHLONG, -1);
 		addOp(OP_STACKSWAP);
 		addOp(OP_SOUNDLOOP);
 	}
@@ -3449,33 +3461,33 @@ ellipsestmt:
 
 arcstmt:
 	B256ARC args_eeeee {
-		addIntOp(OP_PUSHINT, 5); // with bounding circle
+		addLongOp(OP_PUSHLONG, 5); // with bounding circle
 		addOp(OP_ARC);
 	}
 	| B256ARC args_eeeeee {
-		addIntOp(OP_PUSHINT, 6); // with bounding rectangle
+		addLongOp(OP_PUSHLONG, 6); // with bounding rectangle
 		addOp(OP_ARC);
 	}
 	;
 
 chordstmt:
 	B256CHORD args_eeeee {
-		addIntOp(OP_PUSHINT, 5); // with bounding circle
+		addLongOp(OP_PUSHLONG, 5); // with bounding circle
 		addOp(OP_CHORD);
 	}
 	| B256CHORD args_eeeeee {
-		addIntOp(OP_PUSHINT, 6); // with bounding rectangle
+		addLongOp(OP_PUSHLONG, 6); // with bounding rectangle
 		addOp(OP_CHORD);
 	}
 	;
 
 piestmt:
 	B256PIE args_eeeee {
-		addIntOp(OP_PUSHINT, 5); // with bounding circle
+		addLongOp(OP_PUSHLONG, 5); // with bounding circle
 		addOp(OP_PIE);
 	}
 	| B256PIE args_eeeeee {
-		addIntOp(OP_PUSHINT, 6); // with bounding rectangle
+		addLongOp(OP_PUSHLONG, 6); // with bounding rectangle
 		addOp(OP_PIE);
 	}
 	;
@@ -3498,7 +3510,7 @@ textstmt:
 		addOp(OP_TEXT);
 	}
 	| B256TEXT args_eeeee {
-		addIntOp(OP_PUSHINT, 0); // flags
+		addLongOp(OP_PUSHLONG, 0); // flags
 		addOp(OP_TEXTBOX);
 	}
 	| B256TEXT args_eeeeee {
@@ -3511,18 +3523,18 @@ fontstmt:
 		addOp(OP_FONT);
 	}
 	| B256FONT args_eee {
-		addIntOp(OP_PUSHINT, 0); // font is not italic
+		addLongOp(OP_PUSHLONG, 0); // font is not italic
 		addOp(OP_FONT);
 	}
 	| B256FONT args_ee {
-		addIntOp(OP_PUSHINT, -1); // default weight
-		addIntOp(OP_PUSHINT, 0); // font is not italic
+		addLongOp(OP_PUSHLONG, -1); // default weight
+		addLongOp(OP_PUSHLONG, 0); // font is not italic
 		addOp(OP_FONT);
 	}
 	| B256FONT expr {
-		addIntOp(OP_PUSHINT, -1); // default size
-		addIntOp(OP_PUSHINT, -1); // default weight
-		addIntOp(OP_PUSHINT, 0); // font is not italic
+		addLongOp(OP_PUSHLONG, -1); // default size
+		addLongOp(OP_PUSHLONG, -1); // default weight
+		addLongOp(OP_PUSHLONG, 0); // font is not italic
 		addOp(OP_FONT);
 	}
 	;
@@ -3568,53 +3580,53 @@ stampstmt: 	B256STAMP args_eeeee {
 			;
 
 openstmt:	B256OPEN expr  {
-				addIntOp(OP_PUSHINT, 0); // file number zero
+				addLongOp(OP_PUSHLONG, 0); // file number zero
 				addOp(OP_STACKSWAP);
-				addIntOp(OP_PUSHINT, 0); // not binary
+				addLongOp(OP_PUSHLONG, 0); // not binary
 				addOp(OP_OPEN);
 			}
 			| B256OPEN args_ee {
-				addIntOp(OP_PUSHINT, 0); // not binary
+				addLongOp(OP_PUSHLONG, 0); // not binary
 				addOp(OP_OPEN);
 			}
 			| B256OPENB expr  {
-				addIntOp(OP_PUSHINT, 0); // file number zero
+				addLongOp(OP_PUSHLONG, 0); // file number zero
 				addOp(OP_STACKSWAP);
-				addIntOp(OP_PUSHINT, 1); // binary
+				addLongOp(OP_PUSHLONG, 1); // binary
 				addOp(OP_OPEN);
 			}
 			| B256OPENB args_ee {
-				addIntOp(OP_PUSHINT, 1); // binary
+				addLongOp(OP_PUSHLONG, 1); // binary
 				addOp(OP_OPEN);
 			}
 			| B256OPENSERIAL args_ee {
-				addIntOp(OP_PUSHINT, 9600); // baud
-				addIntOp(OP_PUSHINT, 8); // data bits
-				addIntOp(OP_PUSHINT, 1); // stop bits
-				addIntOp(OP_PUSHINT, 0); // parity
-				addIntOp(OP_PUSHINT, 0); // flow
+				addLongOp(OP_PUSHLONG, 9600); // baud
+				addLongOp(OP_PUSHLONG, 8); // data bits
+				addLongOp(OP_PUSHLONG, 1); // stop bits
+				addLongOp(OP_PUSHLONG, 0); // parity
+				addLongOp(OP_PUSHLONG, 0); // flow
 				addOp(OP_OPENSERIAL);
 			}
 			| B256OPENSERIAL args_eee {
-				addIntOp(OP_PUSHINT, 8); // data bits
-				addIntOp(OP_PUSHINT, 1); // stop bits
-				addIntOp(OP_PUSHINT, 0); // parity
-				addIntOp(OP_PUSHINT, 0); // flow
+				addLongOp(OP_PUSHLONG, 8); // data bits
+				addLongOp(OP_PUSHLONG, 1); // stop bits
+				addLongOp(OP_PUSHLONG, 0); // parity
+				addLongOp(OP_PUSHLONG, 0); // flow
 				addOp(OP_OPENSERIAL);
 			}
 			| B256OPENSERIAL args_eeee {
-				addIntOp(OP_PUSHINT, 1); // stop bits
-				addIntOp(OP_PUSHINT, 0); // parity
-				addIntOp(OP_PUSHINT, 0); // flow
+				addLongOp(OP_PUSHLONG, 1); // stop bits
+				addLongOp(OP_PUSHLONG, 0); // parity
+				addLongOp(OP_PUSHLONG, 0); // flow
 				addOp(OP_OPENSERIAL);
 			}
 			| B256OPENSERIAL args_eeeee {
-				addIntOp(OP_PUSHINT, 0); // parity
-				addIntOp(OP_PUSHINT, 0); // flow
+				addLongOp(OP_PUSHLONG, 0); // parity
+				addLongOp(OP_PUSHLONG, 0); // flow
 				addOp(OP_OPENSERIAL);
 			}
 			| B256OPENSERIAL args_eeeeee {
-				addIntOp(OP_PUSHINT, 0); // flow
+				addLongOp(OP_PUSHLONG, 0); // flow
 				addOp(OP_OPENSERIAL);
 			}
 			| B256OPENSERIAL args_eeeeeee {
@@ -3623,7 +3635,7 @@ openstmt:	B256OPEN expr  {
 			;
 
 writestmt:	B256WRITE expr {
-				addIntOp(OP_PUSHINT, 0);  // file number zero
+				addLongOp(OP_PUSHLONG, 0);  // file number zero
 				addOp(OP_STACKSWAP);
 				addOp(OP_WRITE);
 			}
@@ -3634,7 +3646,7 @@ writestmt:	B256WRITE expr {
 
 writelinestmt:
 			B256WRITELINE expr {
-				addIntOp(OP_PUSHINT, 0);
+				addLongOp(OP_PUSHLONG, 0);
 				addOp(OP_STACKSWAP);
 				addOp(OP_WRITELINE);
 			}
@@ -3645,7 +3657,7 @@ writelinestmt:
 
 writebytestmt:
 			B256WRITEBYTE expr {
-				addIntOp(OP_PUSHINT, 0);
+				addLongOp(OP_PUSHLONG, 0);
 				addOp(OP_STACKSWAP);
 				addOp(OP_WRITEBYTE);
 			}
@@ -3655,7 +3667,7 @@ writebytestmt:
 			;
 
 closestmt:	B256CLOSE args_none {
-				addIntOp(OP_PUSHINT, 0);
+				addLongOp(OP_PUSHLONG, 0);
 				addOp(OP_CLOSE);
 			}
 			| B256CLOSE expr {
@@ -3664,7 +3676,7 @@ closestmt:	B256CLOSE args_none {
 			;
 
 resetstmt:	B256RESET args_none {
-				addIntOp(OP_PUSHINT, 0);
+				addLongOp(OP_PUSHLONG, 0);
 				addOp(OP_RESET);
 			}
 			| B256RESET expr {
@@ -3678,7 +3690,7 @@ seedstmt:	B256SEED expr {
 			;
 			
 seekstmt:	B256SEEK expr {
-				addIntOp(OP_PUSHINT, 0);
+				addLongOp(OP_PUSHLONG, 0);
 				addOp(OP_STACKSWAP);
 				addOp(OP_SEEK);
 			}
@@ -3688,94 +3700,94 @@ seekstmt:	B256SEEK expr {
 			;
 
 inputstmt:	B256INPUT args_ev {
-				addIntOp(OP_PUSHINT,T_UNASSIGNED);
+				addLongOp(OP_PUSHLONG,T_UNASSIGNED);
 				addOp(OP_INPUT);
 				addIntOp(OP_VAR_SET, varnumber[--nvarnumber]);
 			}
 			| B256INPUT variable  {
 				addStringOp(OP_PUSHSTRING, "");
-				addIntOp(OP_PUSHINT,T_UNASSIGNED);
+				addLongOp(OP_PUSHLONG,T_UNASSIGNED);
 				addOp(OP_INPUT);
 				addIntOp(OP_VAR_SET, varnumber[--nvarnumber]);
 			}
 			| B256INPUT args_ea {
 				addOp(OP_STACKTOPTO2); addOp(OP_STACKTOPTO2);		// bring prompt to top
-				addIntOp(OP_PUSHINT,T_UNASSIGNED);
+				addLongOp(OP_PUSHLONG,T_UNASSIGNED);
 				addOp(OP_INPUT);
 				addIntOp(OP_ARR_SET, varnumber[--nvarnumber]);
 			}
 			| B256INPUT array_element {
 				addStringOp(OP_PUSHSTRING, "");
-				addIntOp(OP_PUSHINT,T_UNASSIGNED);
+				addLongOp(OP_PUSHLONG,T_UNASSIGNED);
 				addOp(OP_INPUT);
 				addIntOp(OP_ARR_SET, varnumber[--nvarnumber]);
 			}
 			| B256INPUTSTRING args_ev {
-				addIntOp(OP_PUSHINT,T_STRING);
+				addLongOp(OP_PUSHLONG,T_STRING);
 				addOp(OP_INPUT);
 				addIntOp(OP_VAR_SET, varnumber[--nvarnumber]);
 			}
 			| B256INPUTSTRING variable  {
 				addStringOp(OP_PUSHSTRING, "");
-				addIntOp(OP_PUSHINT,T_STRING);
+				addLongOp(OP_PUSHLONG,T_STRING);
 				addOp(OP_INPUT);
 				addIntOp(OP_VAR_SET, varnumber[--nvarnumber]);
 			}
 			| B256INPUTSTRING args_ea {
 				addOp(OP_STACKTOPTO2); addOp(OP_STACKTOPTO2);		// bring prompt to top
-				addIntOp(OP_PUSHINT,T_STRING);
+				addLongOp(OP_PUSHLONG,T_STRING);
 				addOp(OP_INPUT);
 				addIntOp(OP_ARR_SET, varnumber[--nvarnumber]);
 			}
 			| B256INPUTSTRING array_element {
 				addStringOp(OP_PUSHSTRING, "");
-				addIntOp(OP_PUSHINT,T_STRING);
+				addLongOp(OP_PUSHLONG,T_STRING);
 				addOp(OP_INPUT);
 				addIntOp(OP_ARR_SET, varnumber[--nvarnumber]);
 			}
 			| B256INPUTINT args_ev {
-				addIntOp(OP_PUSHINT,T_INT);
+				addLongOp(OP_PUSHLONG,T_INT);
 				addOp(OP_INPUT);
 				addIntOp(OP_VAR_SET, varnumber[--nvarnumber]);
 			}
 			| B256INPUTINT variable  {
 				addStringOp(OP_PUSHSTRING, "");
-				addIntOp(OP_PUSHINT,T_INT);
+				addLongOp(OP_PUSHLONG,T_INT);
 				addOp(OP_INPUT);
 				addIntOp(OP_VAR_SET, varnumber[--nvarnumber]);
 			}
 			| B256INPUTINT args_ea {
 				addOp(OP_STACKTOPTO2); addOp(OP_STACKTOPTO2);		// bring prompt to top
-				addIntOp(OP_PUSHINT,T_INT);
+				addLongOp(OP_PUSHLONG,T_INT);
 				addOp(OP_INPUT);
 				addIntOp(OP_ARR_SET, varnumber[--nvarnumber]);
 			}
 			| B256INPUTINT array_element {
 				addStringOp(OP_PUSHSTRING, "");
-				addIntOp(OP_PUSHINT,T_INT);
+				addLongOp(OP_PUSHLONG,T_INT);
 				addOp(OP_INPUT);
 				addIntOp(OP_ARR_SET, varnumber[--nvarnumber]);
 			}
 			| B256INPUTFLOAT args_ev {
-				addIntOp(OP_PUSHINT,T_FLOAT);
+				addLongOp(OP_PUSHLONG,T_FLOAT);
 				addOp(OP_INPUT);
 				addIntOp(OP_VAR_SET, varnumber[--nvarnumber]);
 			}
 			| B256INPUTFLOAT variable  {
 				addStringOp(OP_PUSHSTRING, "");
-				addIntOp(OP_PUSHINT,T_FLOAT);
+				addLongOp(OP_PUSHLONG,T_FLOAT);
 				addOp(OP_INPUT);
 				addIntOp(OP_VAR_SET, varnumber[--nvarnumber]);
 			}
 			| B256INPUTFLOAT args_ea {
 				addOp(OP_STACKTOPTO2); addOp(OP_STACKTOPTO2);		// bring prompt to top
-				addIntOp(OP_PUSHINT,T_FLOAT);
+				addLongOp(OP_PUSHLONG,T_FLOAT);
 				addOp(OP_INPUT);
 				addIntOp(OP_ARR_SET, varnumber[--nvarnumber]);
 			}
 			| B256INPUTFLOAT array_element {
 				addStringOp(OP_PUSHSTRING, "");
-				addIntOp(OP_PUSHINT,T_FLOAT);
+				addLongOp(OP_PUSHLONG,T_FLOAT);
 				addOp(OP_INPUT);
 				addIntOp(OP_ARR_SET, varnumber[--nvarnumber]);
 			}
@@ -3783,43 +3795,43 @@ inputstmt:	B256INPUT args_ev {
 
 printstmt:
 			B256PRINT args_none {
-				addIntOp(OP_PUSHINT, 0); //push number of arguments passed
-				addIntOp(OP_PUSHINT, 1); // need NL
+				addLongOp(OP_PUSHLONG, 0); //push number of arguments passed
+				addLongOp(OP_PUSHLONG, 1); // need NL
 				addOp(OP_PRINT);
 			}
 			| B256PRINT expr B256SEMICOLON {
-				addIntOp(OP_PUSHINT, 1); //push number of arguments passed
-				addIntOp(OP_PUSHINT, 0); // suppress NL
+				addLongOp(OP_PUSHLONG, 1); //push number of arguments passed
+				addLongOp(OP_PUSHLONG, 0); // suppress NL
 				addOp(OP_PRINT);
 			}
 			| B256PRINT listitems {
-				addIntOp(OP_PUSHINT, listlen); //push number of arguments passed
-				addIntOp(OP_PUSHINT, 1); // need NL
+				addLongOp(OP_PUSHLONG, listlen); //push number of arguments passed
+				addLongOp(OP_PUSHLONG, 1); // need NL
 				addOp(OP_PRINT);
 			}
 			| B256PRINT '(' listitems ')' {
-				addIntOp(OP_PUSHINT, listlen); //push number of arguments passed
-				addIntOp(OP_PUSHINT, 1); // need NL
+				addLongOp(OP_PUSHLONG, listlen); //push number of arguments passed
+				addLongOp(OP_PUSHLONG, 1); // need NL
 				addOp(OP_PRINT);
 			}
 			| '?' args_none {
-				addIntOp(OP_PUSHINT, 0); //push number of arguments passed
-				addIntOp(OP_PUSHINT, 1); // need NL
+				addLongOp(OP_PUSHLONG, 0); //push number of arguments passed
+				addLongOp(OP_PUSHLONG, 1); // need NL
 				addOp(OP_PRINT);
 			}
 			| '?' expr B256SEMICOLON {
-				addIntOp(OP_PUSHINT, 1); //push number of arguments passed
-				addIntOp(OP_PUSHINT, 0); // suppress NL
+				addLongOp(OP_PUSHLONG, 1); //push number of arguments passed
+				addLongOp(OP_PUSHLONG, 0); // suppress NL
 				addOp(OP_PRINT);
 			}
 			| '?' listitems {
-				addIntOp(OP_PUSHINT, listlen); //push number of arguments passed
-				addIntOp(OP_PUSHINT, 1); // need NL
+				addLongOp(OP_PUSHLONG, listlen); //push number of arguments passed
+				addLongOp(OP_PUSHLONG, 1); // need NL
 				addOp(OP_PRINT);
 			}
 			| '?' '(' listitems ')' {
-				addIntOp(OP_PUSHINT, listlen); //push number of arguments passed
-				addIntOp(OP_PUSHINT, 1); // need NL
+				addLongOp(OP_PUSHLONG, listlen); //push number of arguments passed
+				addLongOp(OP_PUSHLONG, 1); // need NL
 				addOp(OP_PRINT);
 			}			;
 
@@ -3876,15 +3888,15 @@ putslicestmt:
 imgloadstmt:
 			B256IMGLOAD args_eee
 			{
-				addIntOp(OP_PUSHINT, 1); // scale
+				addLongOp(OP_PUSHLONG, 1); // scale
 				addOp(OP_STACKSWAP);
-				addIntOp(OP_PUSHINT, 0); // rotate
+				addLongOp(OP_PUSHLONG, 0); // rotate
 				addOp(OP_STACKSWAP);
 				addOp(OP_IMGLOAD);
 			}
 			| B256IMGLOAD args_eeee
 			{
-				addIntOp(OP_PUSHINT, 0); // rotate
+				addLongOp(OP_PUSHLONG, 0); // rotate
 				addOp(OP_STACKSWAP);
 				addOp(OP_IMGLOAD);
 			}
@@ -3920,7 +3932,7 @@ spritepolystmt:
 			
 spritetextstmt:
 			B256SPRITETEXT args_ee {
-				addIntOp(OP_PUSHINT, 0x00);	// clear
+				addLongOp(OP_PUSHLONG, 0x00);	// clear
 				addOp(OP_SPRITETEXT);
 			}
 			| B256SPRITETEXT args_eee {
@@ -3931,22 +3943,22 @@ spritetextstmt:
 spriteplacestmt:
 			B256SPRITEPLACE args_eee
 			{
-				addIntOp(OP_PUSHINT,3);	// nr of arguments
+				addLongOp(OP_PUSHLONG,3);	// nr of arguments
 				addOp(OP_SPRITEPLACE);
 			}
 			| B256SPRITEPLACE args_eeee
 			{
-				addIntOp(OP_PUSHINT,4);	// nr of arguments
+				addLongOp(OP_PUSHLONG,4);	// nr of arguments
 				addOp(OP_SPRITEPLACE);
 			}
 			| B256SPRITEPLACE args_eeeee
 			{
-				addIntOp(OP_PUSHINT,5);	// nr of arguments
+				addLongOp(OP_PUSHLONG,5);	// nr of arguments
 				addOp(OP_SPRITEPLACE);
 			}
 			| B256SPRITEPLACE args_eeeeee
 			{
-					addIntOp(OP_PUSHINT,6);	// nr of arguments
+					addLongOp(OP_PUSHLONG,6);	// nr of arguments
 					addOp(OP_SPRITEPLACE);
 			}
 			;
@@ -3954,19 +3966,19 @@ spriteplacestmt:
 spritemovestmt:
 			B256SPRITEMOVE args_eee
 			{
-				addIntOp(OP_PUSHINT,3);	// nr of arguments
+				addLongOp(OP_PUSHLONG,3);	// nr of arguments
 				addOp(OP_SPRITEMOVE);
 			}
 			| B256SPRITEMOVE args_eeee  {
-				addIntOp(OP_PUSHINT,4);	// nr of arguments
+				addLongOp(OP_PUSHLONG,4);	// nr of arguments
 				addOp(OP_SPRITEMOVE);
 			}
 			| B256SPRITEMOVE args_eeeee {
-				addIntOp(OP_PUSHINT,5);	// nr of arguments
+				addLongOp(OP_PUSHLONG,5);	// nr of arguments
 				addOp(OP_SPRITEMOVE);
 			}
 			| B256SPRITEMOVE args_eeeeee {
-					addIntOp(OP_PUSHINT,6);	// nr of arguments
+					addLongOp(OP_PUSHLONG,6);	// nr of arguments
 					addOp(OP_SPRITEMOVE);
 			}
 			;
@@ -3997,7 +4009,7 @@ changedirstmt:
 
 dbopenstmt:
 			B256DBOPEN expr {
-				addIntOp(OP_PUSHINT,0);	// default db number
+				addLongOp(OP_PUSHLONG,0);	// default db number
 				addOp(OP_STACKSWAP);
 				addOp(OP_DBOPEN);
 			}
@@ -4008,7 +4020,7 @@ dbopenstmt:
 
 dbclosestmt:
 			B256DBCLOSE args_none {
-				addIntOp(OP_PUSHINT,0);	// default db number
+				addLongOp(OP_PUSHLONG,0);	// default db number
 				addOp(OP_DBCLOSE);
 			}
 			| B256DBCLOSE expr {
@@ -4018,7 +4030,7 @@ dbclosestmt:
 
 dbexecutestmt:
 			B256DBEXECUTE expr {
-				addIntOp(OP_PUSHINT,0);	// default db number
+				addLongOp(OP_PUSHLONG,0);	// default db number
 				addOp(OP_STACKSWAP);
 				addOp(OP_DBEXECUTE);
 			}
@@ -4029,14 +4041,14 @@ dbexecutestmt:
 
 dbopensetstmt:
 			B256DBOPENSET expr {
-				addIntOp(OP_PUSHINT,0);	// default db number
+				addLongOp(OP_PUSHLONG,0);	// default db number
 				addOp(OP_STACKSWAP);
-				addIntOp(OP_PUSHINT,0);	// default dbset number
+				addLongOp(OP_PUSHLONG,0);	// default dbset number
 				addOp(OP_STACKSWAP);
 				addOp(OP_DBOPENSET);
 			}
 			| B256DBOPENSET args_ee {
-				addIntOp(OP_PUSHINT,0);	// default dbset number
+				addLongOp(OP_PUSHLONG,0);	// default dbset number
 				addOp(OP_STACKSWAP);
 				addOp(OP_DBOPENSET);
 			}
@@ -4047,12 +4059,12 @@ dbopensetstmt:
 
 dbclosesetstmt:
 			B256DBCLOSESET args_none {
-				addIntOp(OP_PUSHINT,0);	// default db number
-				addIntOp(OP_PUSHINT,0);	// default dbset number
+				addLongOp(OP_PUSHLONG,0);	// default db number
+				addLongOp(OP_PUSHLONG,0);	// default dbset number
 				addOp(OP_DBCLOSESET);
 			}
 			| B256DBCLOSESET expr {
-				addIntOp(OP_PUSHINT,0);	// default dbset number
+				addLongOp(OP_PUSHLONG,0);	// default dbset number
 				addOp(OP_DBCLOSESET);
 			}
 			| B256DBCLOSESET args_ee {
@@ -4062,7 +4074,7 @@ dbclosesetstmt:
 
 netlistenstmt:
 			B256NETLISTEN expr {
-				addIntOp(OP_PUSHINT, 0);
+				addLongOp(OP_PUSHLONG, 0);
 				addOp(OP_STACKSWAP);
 				addOp(OP_NETLISTEN);
 			}
@@ -4073,7 +4085,7 @@ netlistenstmt:
 
 netconnectstmt:
 			B256NETCONNECT args_ee {
-				addIntOp(OP_PUSHINT, 0);
+				addLongOp(OP_PUSHLONG, 0);
 				addOp(OP_STACKTOPTO2);
 				addOp(OP_NETCONNECT);
 			}
@@ -4084,7 +4096,7 @@ netconnectstmt:
 
 netwritestmt:
 			B256NETWRITE expr {
-				addIntOp(OP_PUSHINT, 0);
+				addLongOp(OP_PUSHLONG, 0);
 				addOp(OP_STACKSWAP);
 				addOp(OP_NETWRITE);
 			}
@@ -4095,7 +4107,7 @@ netwritestmt:
 
 netclosestmt:
 			B256NETCLOSE args_none {
-				addIntOp(OP_PUSHINT, 0);
+				addLongOp(OP_PUSHLONG, 0);
 				addOp(OP_NETCLOSE);
 			}
 			| B256NETCLOSE expr {
@@ -4362,7 +4374,7 @@ functionstmt:
 				}
 				//
 				// initialize return variable
-				addIntOp(OP_PUSHINT, 0);
+				addLongOp(OP_PUSHLONG, 0);
 				addIntOp(OP_VAR_SET, functionDefSymbol);
 				//
 				numargs=0;	// clear the list for next function
@@ -4490,22 +4502,22 @@ imagecropstmt:
 
 imageautocropstmt:
 	B256IMAGEAUTOCROP expr {
-		addIntOp(OP_PUSHINT,1);	// nr of arguments
+		addLongOp(OP_PUSHLONG,1);	// nr of arguments
 		addOp(OP_IMAGEAUTOCROP);
 	}
 	| B256IMAGEAUTOCROP args_ee {
-		addIntOp(OP_PUSHINT,2);	// nr of arguments
+		addLongOp(OP_PUSHLONG,2);	// nr of arguments
 		addOp(OP_IMAGEAUTOCROP);
 	}
 	;
 
 imageresizestmt:
 	B256IMAGERESIZE args_eee {
-		addIntOp(OP_PUSHINT,3);	// nr of arguments
+		addLongOp(OP_PUSHLONG,3);	// nr of arguments
 		addOp(OP_IMAGERESIZE);
 	}
 	| B256IMAGERESIZE args_ee {
-		addIntOp(OP_PUSHINT,2);	// nr of arguments
+		addLongOp(OP_PUSHLONG,2);	// nr of arguments
 		addOp(OP_IMAGERESIZE);
 	}
 	;
@@ -4522,19 +4534,19 @@ imagesetpixelstmt:
 
 imagedrawstmt:
 	B256IMAGEDRAW args_eeeeee {
-		addIntOp(OP_PUSHINT,6);	// nr of arguments
+		addLongOp(OP_PUSHLONG,6);	// nr of arguments
 		addOp(OP_IMAGEDRAW);
 	}
 	| B256IMAGEDRAW args_eeeee {
-		addIntOp(OP_PUSHINT,5);	// nr of arguments
+		addLongOp(OP_PUSHLONG,5);	// nr of arguments
 		addOp(OP_IMAGEDRAW);
 	}
 	| B256IMAGEDRAW args_eeee {
-		addIntOp(OP_PUSHINT,4);	// nr of arguments
+		addLongOp(OP_PUSHLONG,4);	// nr of arguments
 		addOp(OP_IMAGEDRAW);
 	}
 	| B256IMAGEDRAW args_eee {
-		addIntOp(OP_PUSHINT,3);	// nr of arguments
+		addLongOp(OP_PUSHLONG,3);	// nr of arguments
 		addOp(OP_IMAGEDRAW);
 	}
 	;
@@ -4542,19 +4554,19 @@ imagedrawstmt:
 imagecenteredstmt:
 	B256IMAGECENTERED args_eeeeee
 	{
-		addIntOp(OP_PUSHINT,6);	// nr of arguments
+		addLongOp(OP_PUSHLONG,6);	// nr of arguments
 		addOp(OP_IMAGECENTERED);
 	}
 	| B256IMAGECENTERED args_eeeee  {
-		addIntOp(OP_PUSHINT,5);	// nr of arguments
+		addLongOp(OP_PUSHLONG,5);	// nr of arguments
 		addOp(OP_IMAGECENTERED);
 	}
 	| B256IMAGECENTERED args_eeee {
-		addIntOp(OP_PUSHINT,4);	// nr of arguments
+		addLongOp(OP_PUSHLONG,4);	// nr of arguments
 		addOp(OP_IMAGECENTERED);
 	}
 	| B256IMAGECENTERED args_eee {
-		addIntOp(OP_PUSHINT,3);	// nr of arguments
+		addLongOp(OP_PUSHLONG,3);	// nr of arguments
 		addOp(OP_IMAGECENTERED);
 	}
 	;
@@ -4564,7 +4576,7 @@ imagetransformedstmt:
 		addOp(OP_IMAGETRANSFORMED);
 	}
 	| B256IMAGETRANSFORMED args_eeeeeeeee {
-		addIntOp(OP_PUSHINT,1); // opacity
+		addLongOp(OP_PUSHLONG,1); // opacity
 		addOp(OP_IMAGETRANSFORMED);
 	}
 	;
@@ -4581,7 +4593,7 @@ imageflipstmt:
 		addOp(OP_IMAGEFLIP);
 	}
 	| B256IMAGEFLIP args_ee {
-		addIntOp(OP_PUSHINT,0);
+		addLongOp(OP_PUSHLONG,0);
 		addOp(OP_IMAGEFLIP);
 	}
 	;
--- basic256-2.0.99.10.orig/Main.cpp
+++ basic256-2.0.99.10/Main.cpp
@@ -162,7 +162,7 @@ int main(int argc, char *argv[]) {
 #endif
     qapp.installTranslator(&kbTranslator);
 
-    MainWindow mainwin(0, 0, localecode, guimode);
+    MainWindow mainwin(0, Qt::Widget, localecode, guimode);
     mainwin.setObjectName( "mainwin" );
     mainwin.statusBar()->showMessage(QObject::tr("Ready."));
     mainwin.show();
--- basic256-2.0.99.10.orig/MainWindow.cpp
+++ basic256-2.0.99.10/MainWindow.cpp
@@ -26,14 +26,13 @@
 #include <QWaitCondition>
 #include <QDesktopServices> 
  
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QGridLayout>
-#include <QtWidgets/QMenuBar>
-#include <QtWidgets/QStatusBar>
-#include <QtWidgets/QDialog>
-#include <QtWidgets/QLabel>
-#include <QtWidgets/QShortcut>
-#include <QtWidgets/QDesktopWidget>
+#include <QApplication>
+#include <QGridLayout>
+#include <QMenuBar>
+#include <QStatusBar>
+#include <QDialog>
+#include <QLabel>
+#include <QShortcut>
 
 #include "MainWindow.h"
 #include "Settings.h"
@@ -77,8 +76,8 @@ MainWindow::MainWindow(QWidget * parent,
 
 
     // create the global mymutexes and waits
-    mymutex = new QMutex(QMutex::NonRecursive);
-    mydebugmutex = new QMutex(QMutex::NonRecursive);
+    mymutex = new QMutex();
+    mydebugmutex = new QMutex();
     waitCond = new QWaitCondition();
     waitDebugCond = new QWaitCondition();
 
@@ -166,7 +165,7 @@ MainWindow::MainWindow(QWidget * parent,
     for(int i=0;i<SETTINGSGROUPHISTN;i++){
         recentfiles_act[i] = filemenu_recentfiles->addAction(basicIcons->openIcon, QObject::tr(""));
         if(i<10)
-            recentfiles_act[i]->setShortcut(Qt::Key_0 + ((i+1)%SETTINGSGROUPHISTN) + Qt::CTRL);
+            recentfiles_act[i]->setShortcut(Qt::Key_0 | Qt::CTRL | ((i+1)%SETTINGSGROUPHISTN));
     }
     filemenu_recentfiles->addSeparator();
     recentfiles_empty_act = filemenu_recentfiles->addAction(basicIcons->clearIcon, QObject::tr("&Clear list"));
@@ -256,35 +255,35 @@ MainWindow::MainWindow(QWidget * parent,
     graphwin->slotGridLines(SETTINGSGRAPHGRIDLINESDEFAUT);
 
     // Graphics Zoom
-    double z = graphwin->getZoom();
-    viewmenu_zoom = viewmenu->addMenu(basicIcons->zoomInIcon, QObject::tr("Graphics Window &Zoom"));
-    viewmenu_zoom_group = new QActionGroup(this);
-    viewmenu_zoom_group->setExclusive(true);
-    viewmenu_zoom_1_4 = viewmenu_zoom_group->addAction(QObject::tr("1:4 (quarter)"));
-    viewmenu_zoom_1_4->setCheckable(true);
-    viewmenu_zoom_1_4->setChecked(z==0.25);
-    viewmenu_zoom_1_4->setData(0.25);
-    viewmenu_zoom_1_2 = viewmenu_zoom_group->addAction(QObject::tr("1:2 (half)"));
-    viewmenu_zoom_1_2->setCheckable(true);
-    viewmenu_zoom_1_2->setChecked(z==0.5);
-    viewmenu_zoom_1_2->setData(0.5);
-    viewmenu_zoom_1_1 = viewmenu_zoom_group->addAction(QObject::tr("1:1 (original)"));
-    viewmenu_zoom_1_1->setCheckable(true);
-    viewmenu_zoom_1_1->setChecked(z==1.0);
-    viewmenu_zoom_1_1->setData(1.0);
-    viewmenu_zoom_2_1 = viewmenu_zoom_group->addAction(QObject::tr("2:1 (double)"));
-    viewmenu_zoom_2_1->setCheckable(true);
-    viewmenu_zoom_2_1->setChecked(z==2.0);
-    viewmenu_zoom_2_1->setData(2.0);
-    viewmenu_zoom_3_1 = viewmenu_zoom_group->addAction(QObject::tr("3:1 (triple)"));
-    viewmenu_zoom_3_1->setCheckable(true);
-    viewmenu_zoom_3_1->setChecked(z==3.0);
-    viewmenu_zoom_3_1->setData(3.0);
-    viewmenu_zoom_4_1 = viewmenu_zoom_group->addAction(QObject::tr("4:1 (quadruple)"));
-    viewmenu_zoom_4_1->setCheckable(true);
-    viewmenu_zoom_4_1->setChecked(z==4.0);
-    viewmenu_zoom_4_1->setData(4.0);
-    viewmenu_zoom->addActions(viewmenu_zoom_group->actions());
+    //double z = graphwin->getZoom();
+    //viewmenu_zoom = viewmenu->addMenu(basicIcons->zoomInIcon, QObject::tr("Graphics Window &Zoom"));
+    //viewmenu_zoom_group = new QActionGroup(this);
+    //viewmenu_zoom_group->setExclusive(true);
+    //viewmenu_zoom_1_4 = viewmenu_zoom_group->addAction(QObject::tr("1:4 (quarter)"));
+    //viewmenu_zoom_1_4->setCheckable(true);
+    //viewmenu_zoom_1_4->setChecked(z==0.25);
+    //viewmenu_zoom_1_4->setData(0.25);
+    //viewmenu_zoom_1_2 = viewmenu_zoom_group->addAction(QObject::tr("1:2 (half)"));
+    //viewmenu_zoom_1_2->setCheckable(true);
+    //viewmenu_zoom_1_2->setChecked(z==0.5);
+    //viewmenu_zoom_1_2->setData(0.5);
+    //viewmenu_zoom_1_1 = viewmenu_zoom_group->addAction(QObject::tr("1:1 (original)"));
+    //viewmenu_zoom_1_1->setCheckable(true);
+    //viewmenu_zoom_1_1->setChecked(z==1.0);
+    //viewmenu_zoom_1_1->setData(1.0);
+    //viewmenu_zoom_2_1 = viewmenu_zoom_group->addAction(QObject::tr("2:1 (double)"));
+    //viewmenu_zoom_2_1->setCheckable(true);
+    //viewmenu_zoom_2_1->setChecked(z==2.0);
+    //viewmenu_zoom_2_1->setData(2.0);
+    //viewmenu_zoom_3_1 = viewmenu_zoom_group->addAction(QObject::tr("3:1 (triple)"));
+    //viewmenu_zoom_3_1->setCheckable(true);
+    //viewmenu_zoom_3_1->setChecked(z==3.0);
+    //viewmenu_zoom_3_1->setData(3.0);
+    //viewmenu_zoom_4_1 = viewmenu_zoom_group->addAction(QObject::tr("4:1 (quadruple)"));
+    //viewmenu_zoom_4_1->setCheckable(true);
+    //viewmenu_zoom_4_1->setChecked(z==4.0);
+    //viewmenu_zoom_4_1->setData(4.0);
+    //viewmenu_zoom->addActions(viewmenu_zoom_group->actions());
 
 
 
@@ -317,15 +316,15 @@ MainWindow::MainWindow(QWidget * parent,
     runact->setShortcut(Qt::Key_F5);
     editmenu->addSeparator();
     debugact = runmenu->addAction(basicIcons->debugIcon, QObject::tr("&Debug"));
-    debugact->setShortcut(Qt::Key_F5 + Qt::CTRL);
+    debugact->setShortcut(Qt::Key_F5 | Qt::CTRL);
     stepact = runmenu->addAction(basicIcons->stepIcon, QObject::tr("S&tep"));
     stepact->setShortcut(Qt::Key_F11);
     stepact->setEnabled(false);
     bpact = runmenu->addAction(basicIcons->breakIcon, QObject::tr("Run &to"));
-    bpact->setShortcut(Qt::Key_F11 + Qt::CTRL);
+    bpact->setShortcut(Qt::Key_F11 | Qt::CTRL);
     bpact->setEnabled(false);
     stopact = runmenu->addAction(basicIcons->stopIcon, QObject::tr("&Stop"));
-    stopact->setShortcut(Qt::Key_F5 + Qt::SHIFT);
+    stopact->setShortcut(Qt::Key_F5 | Qt::SHIFT);
     stopact->setEnabled(false);
     runmenu->addSeparator();
     clearbreakpointsact = runmenu->addAction(basicIcons->clearIcon, QObject::tr("&Clear all breakpoints"));
@@ -423,7 +422,7 @@ MainWindow::MainWindow(QWidget * parent,
 	QObject::connect(outwin_toolbar_visible_act, SIGNAL(toggled(bool)), outwin_widget, SLOT(slotShowToolBar(const bool)));
 
 	QObject::connect(varwin_visible_act, SIGNAL(triggered(bool)), varwin_dock, SLOT(setVisible(bool)));
-    QObject::connect(viewmenu_zoom_group, SIGNAL(triggered(QAction*)), this, SLOT(zoomGroupActionEvent(QAction*)));
+    //QObject::connect(viewmenu_zoom_group, SIGNAL(triggered(QAction*)), this, SLOT(zoomGroupActionEvent(QAction*)));
 
 
 
@@ -592,7 +591,8 @@ void MainWindow::about() {
 #endif	// WIN32PORTABLE
 
 	message += QObject::tr("version ") + "<b>" + VERSION + "</b>" + QObject::tr(" - built with QT ") + "<b>" + QT_VERSION_STR + "</b>" +
-            "<br>" + QObject::tr("Locale Name: ") + "<b>" + locale->name() + "</b> "+ QObject::tr("Decimal Point: ") + "<b>'" + (usefloatlocale?locale->decimalPoint():'.') + "'</b>" +
+            "<br>" + QObject::tr("Locale Name: ") + "<b>" + locale->name() + "</b> "+
+             QObject::tr("Decimal Point: ") + "<b>'" + (usefloatlocale?locale->decimalPoint():QChar('.')) + "'</b>" +
             "<p>" + QObject::tr("Copyright &copy; 2006-2020, The BASIC-256 Team") + "</p>" +
 			"<p>" + QObject::tr("Please visit our web site at <a href=\"http://www.basic256.org\">http://www.basic256.org</a> for tutorials and documentation.") + "</p>" +
 			"<p>" + QObject::tr("Please see the CONTRIBUTORS file for a list of developers and translators for this project.")  + "</p>" +
@@ -832,11 +832,11 @@ void MainWindow::sourceforgeReplyFinishe
         filename = jsonObject["platform_releases"].toObject()["mac"].toObject()["filename"].toString();
         url = jsonObject["platform_releases"].toObject()["mac"].toObject()["url"].toString();
 #endif
-        QRegExp rx("\\d+\\.\\d+\\.\\d+\\.\\d+");
-        rx.indexIn(filename);
-        QString siteversion = rx.cap(0);
-        rx.indexIn(VERSION);
-        QString thisversion = rx.cap(0);
+        QRegularExpression rx("\\d+\\.\\d+\\.\\d+\\.\\d+");
+        QRegularExpressionMatch match = rx.match(filename);
+        QString siteversion = match.captured(0);
+        match = rx.match(VERSION);
+        QString thisversion = match.captured(0);
         if(siteversion=="" || thisversion==""){
             //Unknown error
             if(!autoCheckForUpdate)QMessageBox::warning(this, tr("Check for an update"), tr("Unknown error."),QMessageBox::Ok, QMessageBox::Ok);
@@ -1183,93 +1183,93 @@ void MainWindow::loadProgram() {
 
 bool MainWindow::loadFile(QString s) {
     s = s.trimmed();
-    if (s != NULL) {
-        bool doload = true;
-            if (QFile::exists(s)) {
-                QFile f(s);
-                if (f.open(QIODevice::ReadOnly)) {
-                    QFileInfo fi(f);
-                    QString filename = fi.absoluteFilePath();
-
-                    //check if file is already open
-                    for(int i=0; i<editwintabs->count(); i++){
-                        BasicEdit* e = (BasicEdit*)editwintabs->widget(i);
-                        if(e && e->filename==filename){
-                            f.close();
-                            editwintabs->setCurrentIndex(i);
-                            return true;
-                        }
+    if (s.length()) {
+    bool doload = true;
+        if (QFile::exists(s)) {
+            QFile f(s);
+            if (f.open(QIODevice::ReadOnly)) {
+                QFileInfo fi(f);
+                QString filename = fi.absoluteFilePath();
+
+                //check if file is already open
+                for(int i=0; i<editwintabs->count(); i++){
+                    BasicEdit* e = (BasicEdit*)editwintabs->widget(i);
+                    if(e && e->filename==filename){
+                        f.close();
+                        editwintabs->setCurrentIndex(i);
+                        return true;
                     }
+                }
 
-                    QMimeDatabase db;
-                    QMimeType mime = db.mimeTypeForFile(fi);
-                    // Get user confirmation for non-text files
-                    //Remember that empty ".kbs" files are detected as non-text files
-                    if (!(mime.inherits("text/plain") && !(fi.fileName().endsWith(".kbs",Qt::CaseInsensitive) && fi.size()==0))) {
-                        doload = ( QMessageBox::Yes == QMessageBox::warning(this, QObject::tr("Load File"),
-                            QObject::tr("It does not seem to be a text file.")+ "\n" + QObject::tr("Load it anyway?"),
-                            QMessageBox::Yes | QMessageBox::No,
-                            QMessageBox::No));
-                    }else if (!fi.fileName().endsWith(".kbs",Qt::CaseInsensitive)) {
-                        doload = ( QMessageBox::Yes == QMessageBox::warning(this, QObject::tr("Load File"),
-                            QObject::tr("You're about to load a file that does not end with the .kbs extension.")+ "\n" + QObject::tr("Load it anyway?"),
-                            QMessageBox::Yes | QMessageBox::No,
-                            QMessageBox::No));
-                    }
-                    if (doload) {
-                        //replace empty document created by default (if exists)
-                        bool replaceEmptyDoc = false;
-                        BasicEdit *neweditor;
-                        if(untitledNumber==2){
-                            BasicEdit *e = (BasicEdit*)editwintabs->currentWidget();
-                            if(e){
-                                if(e->filename.isEmpty() && !e->document()->isModified()){
-                                    neweditor=e;
-                                    replaceEmptyDoc=true;
-                                }
+                QMimeDatabase db;
+                QMimeType mime = db.mimeTypeForFile(fi);
+                // Get user confirmation for non-text files
+                //Remember that empty ".kbs" files are detected as non-text files
+                if (!(mime.inherits("text/plain") && !(fi.fileName().endsWith(".kbs",Qt::CaseInsensitive) && fi.size()==0))) {
+                    doload = ( QMessageBox::Yes == QMessageBox::warning(this, QObject::tr("Load File"),
+                        QObject::tr("It does not seem to be a text file.")+ "\n" + QObject::tr("Load it anyway?"),
+                        QMessageBox::Yes | QMessageBox::No,
+                        QMessageBox::No));
+                }else if (!fi.fileName().endsWith(".kbs",Qt::CaseInsensitive)) {
+                    doload = ( QMessageBox::Yes == QMessageBox::warning(this, QObject::tr("Load File"),
+                        QObject::tr("You're about to load a file that does not end with the .kbs extension.")+ "\n" + QObject::tr("Load it anyway?"),
+                        QMessageBox::Yes | QMessageBox::No,
+                        QMessageBox::No));
+                }
+                if (doload) {
+                    //replace empty document created by default (if exists)
+                    bool replaceEmptyDoc = false;
+                    BasicEdit *neweditor;
+                    if(untitledNumber==2){
+                        BasicEdit *e = (BasicEdit*)editwintabs->currentWidget();
+                        if(e){
+                            if(e->filename.isEmpty() && !e->document()->isModified()){
+                                neweditor=e;
+                                replaceEmptyDoc=true;
                             }
                         }
-                        if(!replaceEmptyDoc) neweditor = newEditor(fi.fileName());
-                        editwin = neweditor;
-                        neweditor->filename = filename;
-                        neweditor->path = fi.absolutePath();
-                        neweditor->title=fi.fileName();
-
-                        updateStatusBar(QObject::tr("Loading file..."));
-                        QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
-                        QByteArray ba = f.readAll();
-                        f.close();
-                        neweditor->setPlainText(QString::fromUtf8(ba.data()));
-                        neweditor->document()->setModified(false);
-                        setWindowTitle(fi.fileName());
-                        addFileToRecentList(s);
-                        QApplication::restoreOverrideCursor();
-                        updateStatusBar(QObject::tr("Ready."));
-                        if(fileSystemWatcher) fileSystemWatcher->addPath(filename);
-
-                        //add tab and make it active
-                        if(!replaceEmptyDoc){
-                            int i = editwintabs->addTab(neweditor, neweditor->title);
-                            editwintabs->setTabIcon(i, basicIcons->documentIcon);
-                            editwintabs->setCurrentIndex(i);
-                        }else{
-                            neweditor->updateTitle();
-                        }
-                        return true;
                     }
+                    if(!replaceEmptyDoc) neweditor = newEditor(fi.fileName());
+                    editwin = neweditor;
+                    neweditor->filename = filename;
+                    neweditor->path = fi.absolutePath();
+                    neweditor->title=fi.fileName();
+
+                    updateStatusBar(QObject::tr("Loading file..."));
+                    QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+                    QByteArray ba = f.readAll();
                     f.close();
-                } else {
-                    QMessageBox::warning(this, QObject::tr("Load File"),
-                        QObject::tr("Unable to open program file")+" \""+s+"\".\n"+QObject::tr("File permissions problem or file open by another process."),
-                        QMessageBox::Ok, QMessageBox::Ok);
+                    neweditor->setPlainText(QString::fromUtf8(ba.data()));
+                    neweditor->document()->setModified(false);
+                    setWindowTitle(fi.fileName());
+                    addFileToRecentList(s);
+                    QApplication::restoreOverrideCursor();
+                    updateStatusBar(QObject::tr("Ready."));
+                    if(fileSystemWatcher) fileSystemWatcher->addPath(filename);
+
+                    //add tab and make it active
+                    if(!replaceEmptyDoc){
+                        int i = editwintabs->addTab(neweditor, neweditor->title);
+                        editwintabs->setTabIcon(i, basicIcons->documentIcon);
+                        editwintabs->setCurrentIndex(i);
+                    }else{
+                        neweditor->updateTitle();
+                    }
+                    return true;
                 }
+                f.close();
             } else {
                 QMessageBox::warning(this, QObject::tr("Load File"),
-                    QObject::tr("Program file does not exist.")+" \""+s+QObject::tr("\"."),
+                    QObject::tr("Unable to open program file")+" \""+s+"\".\n"+QObject::tr("File permissions problem or file open by another process."),
                     QMessageBox::Ok, QMessageBox::Ok);
             }
+        } else {
+            QMessageBox::warning(this, QObject::tr("Load File"),
+                QObject::tr("Program file does not exist.")+" \""+s+QObject::tr("\"."),
+                QMessageBox::Ok, QMessageBox::Ok);
         }
-return false;
+    }
+    return false;
 }
 
 void MainWindow::updateWindowMenu(){
--- basic256-2.0.99.10.orig/MainWindow.h
+++ basic256-2.0.99.10/MainWindow.h
@@ -29,16 +29,14 @@
 #include <QJsonObject>
 #include <QJsonArray>
 
-
-
-#include <QtWidgets/QMainWindow>
-#include <QtWidgets/QGridLayout>
-#include <QtWidgets/QAction>
-#include <QtWidgets/QMessageBox>
-#include <QtWidgets/QShortcut>
-#include <QtWidgets/QScrollArea>
-#include <QtWidgets/QFontDialog>
-#include <QtWidgets/QFileDialog>
+#include <QMainWindow>
+#include <QGridLayout>
+#include <QAction>
+#include <QMessageBox>
+#include <QShortcut>
+#include <QScrollArea>
+#include <QFontDialog>
+#include <QFileDialog>
 #include <QClipboard>
 #include <QFileSystemWatcher>
 
--- basic256-2.0.99.10.orig/PreferencesWin.cpp
+++ basic256-2.0.99.10/PreferencesWin.cpp
@@ -416,36 +416,36 @@ PreferencesWin::PreferencesWin (QWidget
 		paperlabel = new QLabel(tr("Paper:"),this);
 		printertablayout->addWidget(paperlabel,r,1,1,1);
 		papercombo = new QComboBox(this);
-		papercombo->addItem(tr("A0 (841 x 1189 mm)"),	QPrinter::A0);
-		papercombo->addItem(tr("A1 (594 x 841 mm)"), QPrinter::A1);
-		papercombo->addItem(tr("A2 (420 x 594 mm)"), QPrinter::A2);
-		papercombo->addItem(tr("A3 (297 x 420 mm)"), QPrinter::A3);
-		papercombo->addItem(tr("A4 (210 x 297 mm, 8.26 x 11.69 inches)"), QPrinter::A4);
-		papercombo->addItem(tr("A5 (148 x 210 mm)"), QPrinter::A5);
-		papercombo->addItem(tr("A6 (105 x 148 mm)"), QPrinter::A6);
-		papercombo->addItem(tr("A7 (74 x 105 mm)"), QPrinter::A7);
-		papercombo->addItem(tr("A9 (52 x 74 mm)"), QPrinter::A8);
-		papercombo->addItem(tr("A9 (37 x 52 mm)"), QPrinter::A9);
-		papercombo->addItem(tr("B0 (1000 x 1414 mm)"), QPrinter::B0);
-		papercombo->addItem(tr("B1 (707 x 1000 mm)"), QPrinter::B1);
-		papercombo->addItem(tr("B2 (500 x 707 mm)"), QPrinter::B2);
-		papercombo->addItem(tr("B3 (353 x 500 mm)"), QPrinter::B3);
-		papercombo->addItem(tr("B4 (250 x 353 mm)"), QPrinter::B4);
-		papercombo->addItem(tr("B5 (176 x 250 mm, 6.93 x 9.84 inches)"), QPrinter::B5);
-		papercombo->addItem(tr("B6 (125 x 176 mm)"), QPrinter::B6);
-		papercombo->addItem(tr("B7 (88 x 125 mm)"), QPrinter::B7);
-		papercombo->addItem(tr("B8 (62 x 88 mm)"), QPrinter::B8);
-		papercombo->addItem(tr("B9 (33 x 62 mm)"), QPrinter::B9);
-		papercombo->addItem(tr("B10 (31 x 44 mm)"), QPrinter::B10);
-		papercombo->addItem(tr("#5 Envelope (163 x 229 mm)"), QPrinter::C5E);
-		papercombo->addItem(tr("#10 Envelope (105 x 241 mm)"), QPrinter::Comm10E);
-		papercombo->addItem(tr("DLE (110 x 220 mm)"), QPrinter::DLE);
-		papercombo->addItem(tr("Executive (7.5 x 10 inches, 190.5 x 254 mm)"), QPrinter::Executive);
-		papercombo->addItem(tr("Folio (210 x 330 mm)"), QPrinter::Folio);
-		papercombo->addItem(tr("Ledger (431.8 x 279.4 mm)"), QPrinter::Ledger);
-		papercombo->addItem(tr("Legal (8.5 x 14 inches, 215.9 x 355.6 mm)"), QPrinter::Legal);
-		papercombo->addItem(tr("Letter (8.5 x 11 inches, 215.9 x 279.4 mm)"), QPrinter::Letter);
-		papercombo->addItem(tr("Tabloid (279.4 x 431.8 mm)"), QPrinter::Tabloid);
+		papercombo->addItem(tr("A0 (841 x 1189 mm)"),	QPageSize::A0);
+		papercombo->addItem(tr("A1 (594 x 841 mm)"), QPageSize::A1);
+		papercombo->addItem(tr("A2 (420 x 594 mm)"), QPageSize::A2);
+		papercombo->addItem(tr("A3 (297 x 420 mm)"), QPageSize::A3);
+		papercombo->addItem(tr("A4 (210 x 297 mm, 8.26 x 11.69 inches)"), QPageSize::A4);
+		papercombo->addItem(tr("A5 (148 x 210 mm)"), QPageSize::A5);
+		papercombo->addItem(tr("A6 (105 x 148 mm)"), QPageSize::A6);
+		papercombo->addItem(tr("A7 (74 x 105 mm)"), QPageSize::A7);
+		papercombo->addItem(tr("A9 (52 x 74 mm)"), QPageSize::A8);
+		papercombo->addItem(tr("A9 (37 x 52 mm)"), QPageSize::A9);
+		papercombo->addItem(tr("B0 (1000 x 1414 mm)"), QPageSize::B0);
+		papercombo->addItem(tr("B1 (707 x 1000 mm)"), QPageSize::B1);
+		papercombo->addItem(tr("B2 (500 x 707 mm)"), QPageSize::B2);
+		papercombo->addItem(tr("B3 (353 x 500 mm)"), QPageSize::B3);
+		papercombo->addItem(tr("B4 (250 x 353 mm)"), QPageSize::B4);
+		papercombo->addItem(tr("B5 (176 x 250 mm, 6.93 x 9.84 inches)"), QPageSize::B5);
+		papercombo->addItem(tr("B6 (125 x 176 mm)"), QPageSize::B6);
+		papercombo->addItem(tr("B7 (88 x 125 mm)"), QPageSize::B7);
+		papercombo->addItem(tr("B8 (62 x 88 mm)"), QPageSize::B8);
+		papercombo->addItem(tr("B9 (33 x 62 mm)"), QPageSize::B9);
+		papercombo->addItem(tr("B10 (31 x 44 mm)"), QPageSize::B10);
+		papercombo->addItem(tr("#5 Envelope (163 x 229 mm)"), QPageSize::C5E);
+		papercombo->addItem(tr("#10 Envelope (105 x 241 mm)"), QPageSize::Comm10E);
+		papercombo->addItem(tr("DLE (110 x 220 mm)"), QPageSize::DLE);
+		papercombo->addItem(tr("Executive (7.5 x 10 inches, 190.5 x 254 mm)"), QPageSize::Executive);
+		papercombo->addItem(tr("Folio (210 x 330 mm)"), QPageSize::Folio);
+		papercombo->addItem(tr("Ledger (431.8 x 279.4 mm)"), QPageSize::Ledger);
+		papercombo->addItem(tr("Legal (8.5 x 14 inches, 215.9 x 355.6 mm)"), QPageSize::Legal);
+		papercombo->addItem(tr("Letter (8.5 x 11 inches, 215.9 x 279.4 mm)"), QPageSize::Letter);
+		papercombo->addItem(tr("Tabloid (279.4 x 431.8 mm)"), QPageSize::Tabloid);
 		// set setting and select
 		setpaper = settings.value(SETTINGSPRINTERPAPER, SETTINGSPRINTERPAPERDEFAULT).toInt();
 		int index = papercombo->findData(setpaper);
@@ -490,8 +490,8 @@ PreferencesWin::PreferencesWin (QWidget
 		orientbox->addWidget(orientlandscape);
 		orientgroup->setLayout(orientbox);
 		printertablayout->addWidget(orientgroup,r,2,1,2);
-		orientportrait->setChecked(settings.value(SETTINGSPRINTERORIENT, SETTINGSPRINTERORIENTDEFAULT)==QPrinter::Portrait);
-		orientlandscape->setChecked(settings.value(SETTINGSPRINTERORIENT, SETTINGSPRINTERORIENTDEFAULT)==QPrinter::Landscape);
+		orientportrait->setChecked(settings.value(SETTINGSPRINTERORIENT, SETTINGSPRINTERORIENTDEFAULT)==QPageLayout::Portrait);
+		orientlandscape->setChecked(settings.value(SETTINGSPRINTERORIENT, SETTINGSPRINTERORIENTDEFAULT)==QPageLayout::Landscape);
 	}
 
 
@@ -610,8 +610,8 @@ void PreferencesWin::clickSaveButton() {
 		if (resolutionhigh->isChecked()) settings.setValue(SETTINGSPRINTERRESOLUTION, QPrinter::HighResolution);
 		if (resolutionscreen->isChecked()) settings.setValue(SETTINGSPRINTERRESOLUTION, QPrinter::ScreenResolution);
 		//
-		if (orientportrait->isChecked()) settings.setValue(SETTINGSPRINTERORIENT, QPrinter::Portrait);
-		if (orientlandscape->isChecked()) settings.setValue(SETTINGSPRINTERORIENT, QPrinter::Landscape);
+		if (orientportrait->isChecked()) settings.setValue(SETTINGSPRINTERORIENT, QPageLayout::Portrait);
+		if (orientlandscape->isChecked()) settings.setValue(SETTINGSPRINTERORIENT, QPageLayout::Landscape);
 
 
 		// *******************************************************************************************
@@ -702,7 +702,7 @@ SettingsBrowser::SettingsBrowser (QWidge
 		settings.beginGroup(app);
 		QStringList keys = settings.childKeys();
 		QTreeWidgetItem *item = new QTreeWidgetItem(treeWidgetSettings, (QStringList() << app << QString::number(keys.count())) );
-		item->setFlags(item->flags() | Qt::ItemIsTristate | Qt::ItemIsUserCheckable);
+		item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
 		item->setCheckState(0, Qt::Unchecked);
 		item->setIcon(0,iconProvider.icon(QFileIconProvider::Folder));
 		for (int k = 0; k < keys.size(); k++){
--- basic256-2.0.99.10.orig/PreferencesWin.h
+++ basic256-2.0.99.10/PreferencesWin.h
@@ -16,22 +16,22 @@
  **/
 
 #include <QObject>
-#include <QtWidgets/QMessageBox>
-#include <QtWidgets/QWidget>
-#include <QtWidgets/QDialog>
-#include <QtWidgets/QGridLayout>
-#include <QtWidgets/QHBoxLayout>
-#include <QtWidgets/QToolBar>
-#include <QtWidgets/QLabel>
-#include <QtWidgets/QLineEdit>
-#include <QtWidgets/QCheckBox>
-#include <QtWidgets/QComboBox>
-#include <QtWidgets/QPushButton>
-#include <QtWidgets/QAction>
-#include <QtWidgets/QTabWidget>
-#include <QtWidgets/QGroupBox>
-#include <QtWidgets/QRadioButton>
-#include <QtWidgets/QSlider>
+#include <QMessageBox>
+#include <QWidget>
+#include <QDialog>
+#include <QGridLayout>
+#include <QHBoxLayout>
+#include <QToolBar>
+#include <QLabel>
+#include <QLineEdit>
+#include <QCheckBox>
+#include <QComboBox>
+#include <QPushButton>
+#include <QAction>
+#include <QTabWidget>
+#include <QGroupBox>
+#include <QRadioButton>
+#include <QSlider>
 #include <QToolTip>
 #include <QFileIconProvider>
 #include <QTreeWidget>
--- basic256-2.0.99.10.orig/ReplaceWin.h
+++ basic256-2.0.99.10/ReplaceWin.h
@@ -15,12 +15,12 @@
  **  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  **/
 
-#include <QtWidgets/QDialog>
-#include <QtWidgets/QGridLayout>
-#include <QtWidgets/QLabel>
-#include <QtWidgets/QLineEdit>
-#include <QtWidgets/QCheckBox>
-#include <QtWidgets/QAction>
+#include <QDialog>
+#include <QGridLayout>
+#include <QLabel>
+#include <QLineEdit>
+#include <QCheckBox>
+#include <QAction>
 #include <QComboBox>
 
 #include "BasicEdit.h"
--- basic256-2.0.99.10.orig/RunController.h
+++ basic256-2.0.99.10/RunController.h
@@ -21,11 +21,11 @@
 
 #include <qglobal.h>
 
-#include <QtWidgets/QTextEdit>
-#include <QtWidgets/QPushButton>
-#include <QtWidgets/QStatusBar>
-#include <QtTextToSpeech/QTextToSpeech>
-#include <QtTextToSpeech/QVoice>
+#include <QTextEdit>
+#include <QPushButton>
+#include <QStatusBar>
+#include <QTextToSpeech>
+#include <QVoice>
 #include <QThread>
 #include <QLocale>
 
--- basic256-2.0.99.10.orig/Sound.h
+++ basic256-2.0.99.10/Sound.h
@@ -25,6 +25,7 @@
 #include <QTimer>
 #include <QMediaPlayer>
 #include <QAudioOutput>
+#include <QAudioFormat>
 #include <QBuffer>
 #include <QEventLoop>
 #include <QFileInfo>
--- basic256-2.0.99.10.orig/Stack.cpp
+++ basic256-2.0.99.10/Stack.cpp
@@ -93,6 +93,11 @@ void Stack::pushInt(int i) {
 	stackdata[stackpointer++] = new DataElement((long)i);
 }
 
+void Stack::pushUInt(unsigned int i) {
+	if (stackpointer >= stacksize)  stackGrow();
+	stackdata[stackpointer++] = new DataElement((long)i);
+}
+
 void Stack::pushBool(bool i) {
 	if (stackpointer >= stacksize)  stackGrow();
 	stackdata[stackpointer++] = new DataElement(i?1L:0L);
@@ -150,6 +155,16 @@ int Stack::popBool() {
 	return b;
 }
 
+unsigned int Stack::popUInt() {
+	if (stackpointer==0) {
+		e = ERROR_STACKUNDERFLOW;
+		return 0;
+	}
+	unsigned int i = convert->getUInt(stackdata[--stackpointer]);
+	delete stackdata[stackpointer];
+	return i;
+}
+
 int Stack::popInt() {
 	if (stackpointer==0) {
 		e = ERROR_STACKUNDERFLOW;
@@ -159,7 +174,6 @@ int Stack::popInt() {
 	delete stackdata[stackpointer];
 	return i;
 }
-
 long Stack::popLong() {
 	if (stackpointer==0) {
 		e = ERROR_STACKUNDERFLOW;
@@ -209,7 +223,7 @@ QColor Stack::popQColor() {
 			return Qt::transparent;
 		}
 	} else {
-		return QColor::fromRgba((QRgb) popInt());
+		return QColor::fromRgba((QRgb) popUInt());
 	}
 }
 
--- basic256-2.0.99.10.orig/Stack.h
+++ basic256-2.0.99.10/Stack.h
@@ -34,6 +34,7 @@ class Stack
 		void pushBool(bool);
 		void pushQString(QString);
 		void pushInt(int);
+		void pushUInt(unsigned int);
 		void pushLong(long);
 		void pushRef(int, int);
 		void pushDouble(double);
@@ -47,6 +48,7 @@ class Stack
 		int peekType(int);
 		DataElement *popDE();
 		int popInt();
+		unsigned int popUInt();
 		int popBool();
 		QColor popQColor();
 		long popLong();
--- basic256-2.0.99.10.orig/VariableWin.h
+++ basic256-2.0.99.10/VariableWin.h
@@ -64,8 +64,8 @@ private:
     bool operator<(const QTreeWidgetItem &other)const {
         const int column = treeWidget()->sortColumn();
         if(column==COLUMNTYPE)
-            return data(column,Qt::EditRole) < other.data(column,Qt::EditRole);
-        return data(column,Qt::UserRole + 1) < other.data(column,Qt::UserRole + 1);
+            return data(column,Qt::EditRole).toString() < other.data(column,Qt::EditRole).toString();
+        return data(column,Qt::UserRole + 1).toString() < other.data(column,Qt::UserRole + 1).toString();
     }
 };
 
--- basic256-2.0.99.10.orig/Version.h
+++ basic256-2.0.99.10/Version.h
@@ -19,8 +19,8 @@
 #ifndef __VERSION
 #define __VERSION
 
-#define VERSION "2.0.99.10 (2024-04-03)"
-#define VERSIONSIGNATURE  2009910
-#define VERSIONPRODUCT 2,0,99,10
+#define VERSION "2.0.99.12 (2024-11-03)"
+#define VERSIONSIGNATURE  2009912
+#define VERSIONPRODUCT 2,0,99,12
 
 #endif
--- basic256-2.0.99.10.orig/WordCodes.h
+++ basic256-2.0.99.10/WordCodes.h
@@ -26,6 +26,7 @@
 #define OPTYPE_LABEL			0x04000000		// label number (int) - converted to address at runtime
 #define OPTYPE_VARIABLE			0x05000000		// variable number (int)
 #define OPTYPE_VAR_VAR			0x06000000		// two variable numbers (int*2)
+#define OPTYPE_LONG 			0x07000000		// a trailing LONG
 #define	OPTYPE_MASK				0xff000000		// and mask to strip optype out of opcode
 
 
@@ -373,6 +374,7 @@
 
 #define OP_PUSHSTRING 			OPTYPE_STRING + 0x000000
 
+#define OP_PUSHLONG 			OPTYPE_LONG + 0x000000
 
 
 
