Code Monkey home page Code Monkey logo

sasm's Introduction

SASM (SimpleASM) - простая кроссплатформенная среда разработки для языков ассемблера NASM, MASM, GAS, FASM с подсветкой синтаксиса и отладчиком. В SASM Вы можете легко разрабатывать и выполнять программы, написанные на языках ассемблера NASM, MASM, GAS, FASM. Вводите код в форму и запускайте приложение. Программа работает "из коробки" и хорошо подойдет для начинающих изучать язык ассемблера.
Основана на Qt. Распространяется по свободной лицензии GNU GPL v3.0.

SASM (SimpleASM) - simple Open Source crossplatform IDE for NASM, MASM, GAS, FASM assembly languages.
SASM has syntax highlighting and debugger. The program works out of the box and is great for beginners to learn assembly language. SASM is translated into Russian, English, Turkish (thanks Ali Goren), Chinese (thanks Ahmed Zetao Yang), German (thanks Sebastian Fischer), Italian (thanks Carlo Dapor), Polish (thanks Krzysztof Rossa), Hebrew (thanks Elian Kamal), Spanish (thanks Mariano Cordoba).
Licensed under the GNU GPL v3.0. Based on the Qt.

===========================================================================
How to build and run SASM:
===========================================================================
You need:
On Windows:
For building:
    C++ compiler (e.g. gcc from MinGW)
    make (e.g. mingw32-make from MinGW)
    Qt 5
For running:
    Everything needed is included.

On Linux:
For building:
    build-essential
    qtbase5-dev
    qtbase5-dev-tools
    qt5-qmake
    qtchooser
For running:
    gcc-multilib (x64 OS) or gcc (x86 OS)
    gdb
    nasm

Download sources and unpack their.
Go to directory with their: "cd <path>"
Further print commands:
1) "qmake" (For installing in specific directory on Linux - print: "qmake PREFIX=<path>". By default SASM installs in "/usr/bin" and "usr/share")
2) "make" for Linux and "mingw32-make" for Windows.
3) For Linux: "make install" (command "sasm" will open SASM) or run "sasm" from folder right away or put "sasm" executable file to folder "Linux" (from this folder you can run the program).
   For Windows: Put "sasm.exe" executable file to folder "Windows". From this folder you can run the program. Also you can run program right away from compilation folder.
===========================================================================

Also you can download already compiled packages 
from site https://dman95.github.io/SASM/ or 
from OBS repository https://download.opensuse.org/repositories/home:/Dman95/

More help info in file help.html
Also SASM supports doxygen: run "doxygen configfile" to generate documentation. In this documentation you can also find a small developer guide which includes information about adding new assemblers and languages support.

Copyright © 2013 Dmitriy Manushin

sasm's People

Contributors

alglus avatar avevlad avatar catull avatar dman95 avatar hofmer13 avatar lberserq avatar megaxela avatar mek101 avatar sarxos avatar thomasthelen avatar ukrkyi avatar xppt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sasm's Issues

Can not compile current source

I pulled the current source, ran qmake, and make. Received the following:

/usr/lib64/qt4/bin/uic settings.ui -o ui_settings.h
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o main.o main.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o mainwindow.o mainwindow.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o tab.o tab.cpp
In file included from tab.h:52:0,
from tab.cpp:41:
codeeditor.h: In member function ‘virtual void CodeEditor::dropEvent(QDropEvent_)’:
codeeditor.h:102:42: error: invalid use of incomplete type ‘const class QUrl’
const QString &fileName = url.toLocalFile();
^
In file included from /usr/include/qt4/QtCore/qvariant.h:48:0,
from /usr/include/qt4/QtCore/qsettings.h:46,
from /usr/include/qt4/QtCore/QSettings:1,
from tab.h:46,
from tab.cpp:41:
/usr/include/qt4/QtCore/qmetatype.h:299:7: error: forward declaration of ‘const class QUrl’
class QUrl;
^
In file included from /usr/include/qt4/QtCore/qnamespace.h:45:0,
from /usr/include/qt4/QtCore/qobjectdefs.h:45,
from /usr/include/qt4/QtCore/qobject.h:47,
from /usr/include/qt4/QtGui/qlayout.h:45,
from /usr/include/qt4/QtGui/qboxlayout.h:45,
from /usr/include/qt4/QtGui/QVBoxLayout:1,
from tab.h:44,
from tab.cpp:41:
/usr/include/qt4/QtCore/qglobal.h: In instantiation of ‘class QTypeInfo’:
/usr/include/qt4/QtCore/qlist.h:113:62: required from ‘T& QList::Node::t() [with T = QUrl]’
/usr/include/qt4/QtCore/qlist.h:245:57: required from ‘const T& QList::const_iterator::operator_() const [with T = QUrl]’
codeeditor.h:100:9: required from here
/usr/include/qt4/QtCore/qglobal.h:2127:26: error: invalid application of ‘sizeof’ to incomplete type ‘QUrl’
isLarge = (sizeof(T)>sizeof(void_)),
^
In file included from /usr/include/qt4/QtCore/qobject.h:50:0,
from /usr/include/qt4/QtGui/qlayout.h:45,
from /usr/include/qt4/QtGui/qboxlayout.h:45,
from /usr/include/qt4/QtGui/QVBoxLayout:1,
from tab.h:44,
from tab.cpp:41:
/usr/include/qt4/QtCore/qlist.h: In instantiation of ‘void QList::node_destruct(QList::Node_, QList::Node_) [with T = QUrl]’:
/usr/include/qt4/QtCore/qlist.h:758:68: required from ‘void QList::free(QListData::Data_) [with T = QUrl]’
/usr/include/qt4/QtCore/qlist.h:732:15: required from ‘QList::~QList() [with T = QUrl]’
codeeditor.h:100:9: required from here
/usr/include/qt4/QtCore/qlist.h:431:31: warning: possible problem detected in invocation of delete operator: [-Wdelete-incomplete]
while(from != to) --to, delete reinterpret_cast<T*>(to->v);
^
/usr/include/qt4/QtCore/qlist.h:431:31: warning: invalid use of incomplete type ‘class QUrl’
In file included from /usr/include/qt4/QtCore/qvariant.h:48:0,
from /usr/include/qt4/QtCore/qsettings.h:46,
from /usr/include/qt4/QtCore/QSettings:1,
from tab.h:46,
from tab.cpp:41:
/usr/include/qt4/QtCore/qmetatype.h:299:7: warning: forward declaration of ‘class QUrl’
class QUrl;
^
In file included from /usr/include/qt4/QtCore/qobject.h:50:0,
from /usr/include/qt4/QtGui/qlayout.h:45,
from /usr/include/qt4/QtGui/qboxlayout.h:45,
from /usr/include/qt4/QtGui/QVBoxLayout:1,
from tab.h:44,
from tab.cpp:41:
/usr/include/qt4/QtCore/qlist.h:431:31: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined
while(from != to) --to, delete reinterpret_cast<T*>(to->v);
^
/usr/include/qt4/QtCore/qlist.h:433:32: error: invalid use of incomplete type ‘class QUrl’
while (from != to) --to, reinterpret_cast<T*>(to)->~T();
^
In file included from /usr/include/qt4/QtCore/qvariant.h:48:0,
from /usr/include/qt4/QtCore/qsettings.h:46,
from /usr/include/qt4/QtCore/QSettings:1,
from tab.h:46,
from tab.cpp:41:
/usr/include/qt4/QtCore/qmetatype.h:299:7: error: forward declaration of ‘class QUrl’
class QUrl;
^
In file included from /usr/include/qt4/QtCore/qobject.h:50:0,
from /usr/include/qt4/QtGui/qlayout.h:45,
from /usr/include/qt4/QtGui/qboxlayout.h:45,
from /usr/include/qt4/QtGui/QVBoxLayout:1,
from tab.h:44,
from tab.cpp:41:
/usr/include/qt4/QtCore/qlist.h: In instantiation of ‘void QList::node_copy(QList::Node_, QList::Node_, QList::Node_) [with T = QUrl]’:
/usr/include/qt4/QtCore/qlist.h:711:92: required from ‘void QList::detach_helper(int) [with T = QUrl]’
/usr/include/qt4/QtCore/qlist.h:725:27: required from ‘void QList::detach_helper() [with T = QUrl]’
/usr/include/qt4/QtCore/qlist.h:122:94: required from ‘QList::QList(const QList&) [with T = QUrl]’
/usr/include/qt4/QtCore/qglobal.h:2375:81: required from ‘QForeachContainer::QForeachContainer(const T&) [with T = QList]’
codeeditor.h:100:9: required from here
/usr/include/qt4/QtCore/qlist.h:399:28: error: invalid use of incomplete type ‘class QUrl’
current->v = new T(_reinterpret_cast<T*>(src->v));
^
In file included from /usr/include/qt4/QtCore/qvariant.h:48:0,
from /usr/include/qt4/QtCore/qsettings.h:46,
from /usr/include/qt4/QtCore/QSettings:1,
from tab.h:46,
from tab.cpp:41:
/usr/include/qt4/QtCore/qmetatype.h:299:7: error: forward declaration of ‘class QUrl’
class QUrl;
^
In file included from /usr/include/qt4/QtCore/qobject.h:50:0,
from /usr/include/qt4/QtGui/qlayout.h:45,
from /usr/include/qt4/QtGui/qboxlayout.h:45,
from /usr/include/qt4/QtGui/QVBoxLayout:1,
from tab.h:44,
from tab.cpp:41:
/usr/include/qt4/QtCore/qlist.h:405:17: warning: possible problem detected in invocation of delete operator: [-Wdelete-incomplete]
delete reinterpret_cast<T*>(current->v);
^
/usr/include/qt4/QtCore/qlist.h:405:17: warning: invalid use of incomplete type ‘class QUrl’
In file included from /usr/include/qt4/QtCore/qvariant.h:48:0,
from /usr/include/qt4/QtCore/qsettings.h:46,
from /usr/include/qt4/QtCore/QSettings:1,
from tab.h:46,
from tab.cpp:41:
/usr/include/qt4/QtCore/qmetatype.h:299:7: warning: forward declaration of ‘class QUrl’
class QUrl;
^
In file included from /usr/include/qt4/QtCore/qobject.h:50:0,
from /usr/include/qt4/QtGui/qlayout.h:45,
from /usr/include/qt4/QtGui/qboxlayout.h:45,
from /usr/include/qt4/QtGui/QVBoxLayout:1,
from tab.h:44,
from tab.cpp:41:
/usr/include/qt4/QtCore/qlist.h:405:17: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined
delete reinterpret_cast<T*>(current->v);
^
/usr/include/qt4/QtCore/qlist.h:412:17: error: invalid use of incomplete type ‘class QUrl’
new (current) T(reinterpret_cast<T>(src));
^
In file included from /usr/include/qt4/QtCore/qvariant.h:48:0,
from /usr/include/qt4/QtCore/qsettings.h:46,
from /usr/include/qt4/QtCore/QSettings:1,
from tab.h:46,
from tab.cpp:41:
/usr/include/qt4/QtCore/qmetatype.h:299:7: error: forward declaration of ‘class QUrl’
class QUrl;
^
In file included from /usr/include/qt4/QtCore/qobject.h:50:0,
from /usr/include/qt4/QtGui/qlayout.h:45,
from /usr/include/qt4/QtGui/qboxlayout.h:45,
from /usr/include/qt4/QtGui/QVBoxLayout:1,
from tab.h:44,
from tab.cpp:41:
/usr/include/qt4/QtCore/qlist.h:418:17: error: invalid use of incomplete type ‘class QUrl’
(reinterpret_cast<T*>(current))->~T();
^
In file included from /usr/include/qt4/QtCore/qvariant.h:48:0,
from /usr/include/qt4/QtCore/qsettings.h:46,
from /usr/include/qt4/QtCore/QSettings:1,
from tab.h:46,
from tab.cpp:41:
/usr/include/qt4/QtCore/qmetatype.h:299:7: error: forward declaration of ‘class QUrl’
class QUrl;
^
Makefile:494: recipe for target 'tab.o' failed
make: *** [tab.o] Error 1

Debug memory overflows gdb.exe

When I debug in SAsM my assembler code and I debug a memory variable thats in this case array size 100000. It will increase gdb.exe memory every time a instuction runs. Eventually gdb.exe crashes.
When i debug in SASM and don't debug memory i don't have this issue.

Turkish Language Translate

Hi. Turkish translation for SASM.

See Blow:

TOP MENU

File:

File = Dosya
Open = Aç
Close File = Dosyayı Kapat

Save = Kaydet
Save As = Farklı Kaydet
Save .exe = Exe Olarak Kaydet

Exit = Çıkış

================

Edit:

Edit = Düzenle
Find and Replace = Bul ve Düzenle
    -- Find What = Aranacak Kelime
    -- Find Next = Sonrakini Bul
    -- Find All = Tamamını Bul
    -- Match Case = Büyük / Küçük Harf Duyarlı
    -- Replace With = Bununla Değiştir
    -- Replace = Değiştir
    -- Replace All = Tamamını Değiştir
    -- Close = Çıkış
Undo = Geri Al
Redo = İleri Al
Cut = Kes
Copy = Kopyala
Paste = Yapıştır
Delete = Sil
Select All = Hepsini Seç
Comment = Yorum
Remove Yorum = Yorumu Kaldır
Indent = Girinti
Remove Indent = Girintiyi Kaldır

================

Build:

Build = Derle
Build this = Bunu Derle
Build and Run = Derle ve Çalıştır
Run in new Window = Yeni Pencerede Çalıştır
Stop = Durdur

================

Debug:

Debug = Hata Ayıkla
Step Over = Adım Adım
Step Into = Adım Atlayarak
Toggle Breakpoint = Breakpoint Koy
Show Registers = Yazmaçları Göster
Show Memory = Belleği Göster
Continue = Devam Et
Stop = Durdur

================

Settings:

Settins = Ayarlar

  -- Common = Genel
      -- On Start = Başlangıçta
      -- Open Get Started Windows = Başlangıç Ekranını Getir
      -- Restore Previous Session = Son Oturumu Getir
      -- Language = Dil {English = İngilizce | Russian = Rusça}
      -- To apply the changes require a restart! = Değişikliklerin gerçekleştirilmesi için yeniden başlatma gereklidir
      -- Show All Registers in debug = Hata Ayıklarken Yazmaçların Tamamını Göster
        -- Yes = Evet
        -- No, Show Only General Purpose = Hayır, sadece genelde kullanılanları göster
      -- Insert debug string = Debug cümlesini ekle

      -- Code editor = Kod Editörü
        -- Font = Yazı Tipi
        -- Size = Boyut
        -- To apply the changes require a restart! = Değişikliklerin gerçekleştirilmesi için yeniden başlatma gereklidir
        -- Default code editor text = Varsayılan kod editörü metni
        -- Reset all(need a restart)... = Tamamını Sıfırla (Yeniden Başlatma Gerektirir)

    -- Colors = Renkler
        -- Common = Genel
        -- Background = Arkaplan
        -- Line Number Panel = Satır Numarası Paneli
        -- Line Number Panel = Satır Numarası Rengi
        -- Font = Yazı Tipi Rengi
        -- Current Line = Mevcut Satır
        -- To apply the changes require a restart! = Değişikliklerin gerçekleştirilmesi için yeniden başlatma gereklidir

        -- Syntax Highlighting = Söz Dizim Renklendirmesi
        -- Foreground = Ön Plan
        -- Background = Arkaplan
        -- Bold = Kalın
        -- Italic = Eğik
        -- Keywords = Anahtar Kelimeler
        -- Registers = Yazmaçlar
        -- Numbers = Sayılar
        -- Memory = Bellek
        -- Labels = Etiketler
        -- Comments = Yorumlar
        -- System = Sistem
        -- I/O Macto = G/Ç Makrosu
        -- Quotation = Cümleler


    -- Build = Derleme
        -- Mode = Derleme Modu
        -- Assembler = Çevirici
        -- Assembly Options = Çevirici Seçenekleri
        -- Linking Options = Bağlayıcı Seçenekleri
        -- Assembler Path = Çevirici Yolu
        -- Linker Path = Bağlayıcı Yolu
        -- Object file name = Obje Dosyası Adı
        -- Disable Linking = Bağlayıcı Devre Dışı Bırak

================

Help:       

Help = Yardım
About = Hakkında

About Text:

About Form Title 
    -- About SASM = SASM Hakkında

    SASM(SimpleASM) 3.5.1 - NASM, MASM, GAS ve FASM Assembler dilleri için geliştirilmiş basit, açık kaynak kodlu bir IDE'dir

    GNU GPL v3.0 Lisansı Altında Qt kullanılarak geliştirilmiştir.
    Copyright [copyright symbol] 2013 Dmitriy Manushin
    Geliştirme ve Fikir - Dmitriy Manushin
    İkon ve Tavsiyeler = Alick Gaybullaev

    Öneri ve hata mesajlarını yollayabileceğiniz e-mail adresi: [email protected]

    Daha fazla bilgiye http://dman95.github.io/SASM/ adresinden ulaşabilirsiniz.

    Bağış:

    PayPal - [email protected]
    WMZ - Z282016332582
    WMR - R33167403467


================

FRONT

First Run

    -- Welcome to the SASM! = SASM'e Hoşgeldiniz
    -- Create new project = Yeni Proje Oluştur
    -- Open Project = Proje Aç
    -- Restore last session = Önceki Oturumu Kurtar

Right Column

    -- Input = Girdi
    -- Output = Çıktı


Bottom Build String

  -- Build Started... = Derleme Başlıyor
  -- Built Successfully = Derleme Başarılı
  -- Warning! Errors have occurred in the build = Uyarı! Bu Derleme Şu Hataları İçeriyor
  -- Debugging started... = Hata Ayıklama İşlemi Başlatılıyor
  -- Debugging finished = Hata Ayıklama İşlemi Tamamlandı
  -- The Program is executing... = Program çalıştırılıyor
  -- The program finished normally. Execution time: {time} = Program normal bir şekilde sonlandı. Çalışma zamanı {time}


Bottom and Right Column [Right Click Menu]

  -- Copy = Kopyala
  -- Select All = Hepsini Seç
  -- Clear = Temizle

watching values of variables for programs written in MASM

First, thank you for this great software. I am trying to use your IDE for teaching Assembly language using MASM (because i am using Irvine's book).

The only problem i am facing is how to watch a variable. When adding a variable name under "variable or expression", I receive "wrong variable or address". However, it works perfectly when debugging under NASM.

I am using MASM32 and tried to add /Zi option but no luck. Is there a quick solution? Thank you again

Link external library (like visual studio does)?

I really like the way SASM looks, works and see big potential for SASM.
I have a two questions.
First for the MASM assembler it is says MASM32 for assembler and linker path. Is the assembler using the authentic Microsoft Macro Assembler or is it using the open source one (Open Watcom Assembler)?
If it is not using the Microsoft Macro Assembler can you make an update which will use that assembler and linker?

Secondly, I would like to use the external library that comes with my textbook Assembly Language for x86 Processors (7th Edition). The libray that I am using comes from here http://kipirvine.com/asm/examples/index.htm
"Example programs and link library source code for the Seventh Edition, using Visual Studio 2012 or 2013"
I believe the library is meant to specifically work with visual studio. Is there a way that it could be linked with SASM?

Thank you for your time
And keep up the great work with SASM :)

Debug failed: "An error has occurred in the debugger. Please check the names of the sections."

Hello,

I try the following small sample:

$ cat eatsyscall.asm 
SECTION .data
EatMsg: db "Eat at Joe's!",10
EatLen: equ $-EatMsg

SECTION .bss
SECTION .text

global _start

_start:
    nop
    mov eax, 4
    mov ebx, 1
    mov ecx, EatMsg
    mov edx, EatLen
    int 80H
    mov eax, 1
    mov ebx, 0
    int 80H

It can be built successfully. But if I click the 'Debug' button and try to debug on it, the sasm says:

[22:55:55] Debugging started...
An error has occurred in the debugger. Please check the names of the sections.
[22:55:55] Debugging finished.

Any thing I missed? Please advise.

Thanks,
Flos

Any interest in OS X builds?

I've been looking around for an ASM environment but I think I'll end up just using vim still. I could build and provide releases for this project on OS X however (assuming it actually does build and function on OS X).

english language

The program is in russian language. With english language this program would be perfect (and usable :D)

More register views

Great IDE with pnly one thing I miss. Can You please add possibility to view not only 32 bit registers but alsou others. (example: not only EAX, but also AL, AH, AX) When I do DIV the result is stored in AL and modulo is in AH.

Use Qt's parent-child relationship

I see you write code like this:

class MyWidget : public QWidget
{
    Q_OBJECT
public:
    MyWidget(QWidget *parent = 0) : QWidget(parent)
    {
        layout = new QVBoxLayout;
        label = new QLabel("Hello");
        layout->addWidget(label);
        setLayout(layout);
    }

    ~MyWidget()
    {
        delete layout;
        delete label;
    }

private:
    QVBoxLayout *layout;
    QLabel *label;
};

There is nothing particularly wrong with it, but there is more Qt-ish way of writing it.

In Qt, QObject and everything that derives from it (QWidget, QLabel, even your own class, etc), can take ownership of other QObjects through so called parent-child relationship, which is usually specified in the constructor or as a call to QObject::setParent.

For example, that's how you could reduce the code above if you would use this parent-child relation:

class MyWidget : public QWidget
{
    Q_OBJECT

public:
    MyWidget(QWidget *parent = 0) : QWidget(parent)
    {
        QVBoxLayout *layout = new QVBoxLayout(this);
        QLabel *label = new QLabel("Hello", this);
        layout->addWidget(label);
    }
};

Note that we removed the destructor.
Here layout is told to be a child of MyWidget by passing this as parent argument to to QVBoxLayout's constructor QVBoxLayout::QVBoxLayout(QWidget * parent ). This means that when MyWidget is destroyed, it will also delete layout. The same is true for label.

Also, if you don't access layout and label variables from anywhere outside the constructor, you don't even have to make them class members.

Moreover, you don't need to call setLayout(layout), because by passing this to QVBoxLayout's constructor you already are specifying that layout is the layout of MyWidget.
From documentation for void QWidget::setLayout ( QLayout * layout ):

An alternative to calling this function is to pass this widget to the layout's constructor.

Here is a doc explaining parent-child relationship a bit more.

Infinite loop bug

function Tab::saveCodeToFile doesn't check that subdirectories in path variable really exist.

Different program output when debugged and not debugged, also timing dependent.

Hello!
My system: Windows 7 x64
Assembler: NASM 64, as it came with SASM
This is my program: http://pastebin.com/9BK9hKkm

This is after stepping through the program: (as expected)
screen1

EDIT: (removed my messy description / replaced with demonstation on a GIF)
bugreport

When I step into the program, and then click Continue while execution is inside the loop, it doesn't output the second part of the output (as with Run).
When I break just before PRINT_HEX or PRINT_STRING then Continue, it works as it should.

Welp, assembly is easy. Learning assembly in these circumstances is hard.

RWX on binaries

Out of curiosity is there a reason why the bins are not compiled with -z noexecstack when they are compiled with -fstack-protector-strong -fPIE.

Is it possible to get the pro file updated to add -z noexecstack, I have worked on updating the SASM.pro file with:

QMAKE_CXXFLAGS += -z noexecstack
QMAKE_CFLAGS += -z noexecstack

But it does not seem to follow it very well, and if I try to export my CFLAGS and build it still does not take the extra flag.

Thoughts?

includes

My source like this .586
.model flat, stdcall
option casemap:none
include include/windows.inc
include include/kernel32.inc
include include/masm32.inc ... and more

all this includes are from masm32/include/
And now see errors like "cannot open file include/*.inc". My source has been copied into Temp/SASM/... But there is no folders "lib" and "include" in it. I think it is no so good.

Watcom

How hard would it be to add support for the Open Watcom assembler?

8-bit and 16-bit registers

I want to ask how I could see partial registers - that is 16-bit AX, BX, CX, DX and 8-bit AL, AH, BL, BH, ... etc. Thanks :)

Debug is not working in Ubuntu 12.04 64bit

Can't start debugging on this code:

%include 'io.inc'

section .bss
n resb 1
section .rodata

section .data

section .txt
global CMAIN
CMAIN:
GET_UDEC 4, [n]
mov ebx, 0
.for1:
cmp ebx, dword[n]
jae .for1break

GET_UDEC 4, eax
call div3
cmp eax, 0
jne .if1else
PRINT_STRING `YES\n`
jmp .if1break

.if1else:
PRINT_STRING NO\n
.if1break:

inc ebx
jmp .for1

.for1break:
mov eax, 0
ret

div3:
push ebp
mov ebp, esp

mov ecx, 3
mov edx, 0
div ecx
mov eax, edx ;if delitsa, then eax == 0

mov esp, ebp
pop ebp
ret

additional files

I can't include any additional files, probably it's because project is compiled somewhere else, not in the directory

Pressing F7 too quickly after "Ctrl+D" leads to not working debug mode.

Example:
"[13:11:12] Отладка началась...
Внутри макроса или вне программы.
0x00402005 in main ()
Внутри макроса или вне программы.
Внутри макроса или вне программы.
Внутри макроса или вне программы."

Feature request: Show the description of an exception

Currently SASM doesn't show the exception message.
For example, I write such code:

format ELF

section '.text' executable
public _main
_main:
    mov ebp, esp; for correct debugging
    ;write your code here
    mov edx, 0
    mov eax, 100
    mov ecx, 0
    div ecx
    xor eax, eax
    ret

Then press "Debug" and "Continue". As expected, the debugger stops at the div ecx instruction because of "Integer division by zero" exception (as OllyDbg describes it), but SASM just stops and doesn't show any message. This isn't critical for this particular case, but a message with the description of an exception could be useful in more complicated situations.

Windows 8.1, SASM 3.1.2, assemble with the Fasm shipped with SASM

UPD. Just tested with NASM - it doesn't show the exception message neither.

error in debugging

There's a bug in debugger.cpp, you're searching for string"start address ", but in my (localized) system it outputs "початкова адреса", so program couldn't find start address and start debugging

Tabs do not function like tabs

Tabs should add space until the next indent level. For example having a and then pressing <tab> should add 3 spaces, not 4.

SASM Windows won't build

Hello, I looked through the issues and didn't see this one, opened or closed. I am using the latest Windows binary for SASM and cannot build any of my NASM code. I get an undefined reference to WinMain16:

[21:07:09] Build started...
[21:07:09] Warning! Errors have occurred in the build:
c:/program files (x86)/sasm/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libmingw32.a(main.o): In function main': C:\MinGW\msys\1.0\src\mingwrt/../mingw/main.c:73: undefined reference toWinMain@16'

In the configuration (default, just installed it) The 3 settings are:

assembly options: -g -f win32 $SOURCE$ -l $LSTOUTPUT$ -o $PROGRAM.OBJ$
linking options: $PROGRAM.OBJ$ $MACRO.OBJ$ -g -o $PROGRAM$ -m32
nasm path: C:/Program Files (x86)/SASM/NASM/nasm.exe
linker path: C:/Program Files (x86)/SASM/MinGW/bin/gcc.exe

Is there a library that includes `WinMain@16' that I need to include in my assembler options? Sorry if this is a dumb question, I am new to NASM in Windows (usually do it with vim/ld/nasm).

Thank you and great project btw! :)

Support '\' path convention

OS: Windows 7 x64
Configuration: MASM (6.15)

I'm trying to get SASM setup for use with masm 615 for one of my classes. For now, I'm using these options:

  • Assembler Options: /nologo /Sn /Sa /c /Fo$PROGRAM.OBJ$ $SOURCE$d
  • Linker Options: `/NOLOGO "$PROGRAM.OBJ$","$PROGRAM$",,,,

However, when passing $PROGRAM$ and $PROGRAM.OBJ$ as arguments to the assembler or linker, it seems to pass the paths with / instead of \ (Ex: c:/path/to/my/program.asm instead of c:\path\to\my\program.asm). That version of masm that I'm trying to use seems to confuse that with option flags:

[17:29:36] Warning! Errors have occurred in the build:
LINK : warning L4017: /Users : unrecognized option name; option ignored
LINK : warning L4017: /nathan : unrecognized option name; option ignored
LINK : warning L4017: /AppData : unrecognized option name; option ignored
LINK : warning L4017: /Local : unrecognized option name; option ignored
LINK : warning L4017: /Temp : unrecognized option name; option ignored
LINK : warning L4017: /SASM : unrecognized option name; option ignored
LINK : warning L4017: /program.o : unrecognized option name; option ignored
LINK : warning L4017: /Users : unrecognized option name; option ignored
LINK : warning L4017: /nathan : unrecognized option name; option ignored
LINK : warning L4017: /AppData : unrecognized option name; option ignored
LINK : warning L4017: /Local : unrecognized option name; option ignored
LINK : warning L4017: /Temp : unrecognized option name; option ignored
LINK : warning L4017: /SASM : unrecognized option name; option ignored
LINK : warning L4017: /SASMprog.exe : unrecognized option name; option ignored
LINK : fatal error L1093: C:.obj : object file not found

I have tried quoting the path in both single and double quotes, and it seems to only like \ instead of /.

Please provide an option (at least for masm) to format the path that the variable is replaced with to use \ instead of /..

Переход на Qt5

Здравствуйте. Так как Qt4 уже EOL, было бы логично перейти на Qt5, и, возможно, перейти на QML. Я с радостью мог бы вам помочь.

AT&T syntax in SASM

Does SASM support switching from intel to AT&T(aka gas) syntax because I sort of like AT&T syntax but I can't find a an assembler and or ASM IDE that would support AT&T syntax on Windows.

Syntax Highlighting

I found a small caveat regarding the syntax highlighting. It appears that SASM recognizes the yWord keyword however, fails to recognize the m in front. I tested this with other keywords and similar results occur.
This occurs in NASM and MASM - the other assemblers seem to be unaffected although I may not be using correct keywords.

SyntaxHighlightingBug

If you have any ideas on how to fix this let me know and I'll get on it.

Assembling.

You expect that you have right for wirighting in folder, where SASM located. It isnt necessary. You can assembling file in /tmp (or %TEMP% in windows). With this bug all packages are broken(, because in my packeges SASM installed in /opt/

Assembling may fail.

Assembling may fail,if you run SASM with absolute path in non-SASM directory(like /opt/SASM/SASM, when your at ~), because you run nasm in current directory, but you need run nasm in directory, where SASM was installed.

Holding F7 in debug mode causes some garbage output

For example,
"[13:12:06] Отладка началась...
Внутри макроса или вне программы.
Внутри макроса или вне программы.
0x004013c2 in main.sasmMacroE_0 ()
0x004013c7 in main.for1 ()
16 строка
0x004013d3 in main.for1 ()
(gdb) 0x004013d8 in main.for(gdb) 0x0040140c in main.sasmMacroE_1 ()
20 строка
0x00401414 in main.sasmMacroE_1 ()
(gdb) 0x0040145b in main.if1else ()
Внутри макроса или вне программы.
0x0040149d in main.sasmMacroE_3 ()
0x0040149e in main.sasmMacroE_3 ()"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.