Author Topic: Assembler languages for Linux  (Read 25500 times)

Magnum

  • Member
  • *****
  • Posts: 2399
Re: Assembler languages for Linux
« Reply #15 on: February 18, 2016, 04:07:41 PM »
I tried Sol Asm, but the examples were only programs that output text.

I am still looking for Linux programs that produce GUI programs. :-)

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

anta40

  • Member
  • ***
  • Posts: 315
Re: Assembler languages for Linux
« Reply #16 on: February 18, 2016, 05:26:35 PM »
I am still looking for Linux programs that produce GUI programs. :-)

You might want to try these examples...

GoneFishing

  • Member
  • *****
  • Posts: 1072
  • Gone fishing
Re: Assembler languages for Linux
« Reply #17 on: February 18, 2016, 08:08:08 PM »
Here are those examples translated to JWASM
NOTE: samples were linked against  GTK 2. 24

GTK source code comes with nice set of examples.
« Last Edit: February 21, 2016, 10:52:56 PM by GoneFishing »

jcfuller

  • Member
  • **
  • Posts: 195
Re: Assembler languages for Linux
« Reply #18 on: February 18, 2016, 09:25:27 PM »
GoneFishing,
Thanks for the gtk examples.
First attempt on Ubuntu MATE:
  The gtk_button example seg faults on closing.
To correct it I replaced the DeleteEvent with the one from gtk_combo.

I have not done much else but it appears the examples need a little tweaking ?

James

GoneFishing

  • Member
  • *****
  • Posts: 1072
  • Gone fishing
Re: Assembler languages for Linux
« Reply #19 on: February 18, 2016, 09:32:49 PM »
Hi James,
gtk_button example ( and all the rest ) works fine here on Ubuntu 14.04
Tweak it as you like as I don't know why it doesn't work on your machine ( if you know it, please tell me )

[EDIT] Well, looks like I commented out
Quote
;  sub rsp,16
Thanks for noticing  :t

[EDIT] fixed version attached
« Last Edit: February 21, 2016, 10:53:09 PM by GoneFishing »

shankle

  • Member
  • ****
  • Posts: 868
Re: Assembler languages for Linux
« Reply #20 on: February 18, 2016, 11:33:08 PM »
For what it's worth I settled on NASM.
From the little I know so far, it seems that it is a function (macro) driven 
assembler. For ex: to put a point on the screen you call the gotoxy function.
There must be hundreds of these macros. I would guess 1 for each
corresponding windows api. Lord what a year this will be :dazzled:
Good Bye Microsoft!

jcfuller

  • Member
  • **
  • Posts: 195
Re: Assembler languages for Linux
« Reply #21 on: February 19, 2016, 12:00:31 AM »
No go.
Still a seg fault when window closes with gtk_button when run from terminal.
Ubuntu MATE 15.10
All gtk dev files from the repository.

James

GoneFishing

  • Member
  • *****
  • Posts: 1072
  • Gone fishing
Re: Assembler languages for Linux
« Reply #22 on: February 19, 2016, 12:05:07 AM »
Hmm,  it must be something wrong with stack ..
Does it show message "closing application..." ?
Did you try to re-compile it from source code ?
What's about other examples?

Maybe version thing . I used GTK 2.24
Your distro seems using  GTK 3.4

Magnum

  • Member
  • *****
  • Posts: 2399
Re: Assembler languages for Linux
« Reply #23 on: February 19, 2016, 12:18:00 AM »
Thanks anta40
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

GoneFishing

  • Member
  • *****
  • Posts: 1072
  • Gone fishing
Re: Assembler languages for Linux
« Reply #24 on: February 19, 2016, 12:55:06 AM »
...
  The gtk_button example seg faults on closing.
To correct it I replaced the DeleteEvent with the one from gtk_combo.
...
Oh, after visiting dentist I was a little bit nervous and didn't notice that in gtk_combo :
Quote
sub rsp,8
applied it now to gtk-button
attach updated, fingers crossed
I'm surprised how tolerant my os is - it's eagerly satisfied with  all 3 variants:
Quote
; sub rsp, 16
 sub rsp, 16
 sub rsp,8

P.S.: Personally I prefer LTS  (Long Time Support) Ubuntu distros  - they have *.04 in version number
« Last Edit: February 21, 2016, 10:53:25 PM by GoneFishing »

jcfuller

  • Member
  • **
  • Posts: 195
Re: Assembler languages for Linux
« Reply #25 on: February 19, 2016, 04:25:43 AM »

gtk_handlebox and gtk_checkmenu seg fault on execution

window.asm will not compile
HJWasm v2.13, Jan 30 2016, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
window.asm : Error A2168: General Failure

All others ok

GTK+ version: 2.24.28

James

GoneFishing

  • Member
  • *****
  • Posts: 1072
  • Gone fishing
Re: Assembler languages for Linux
« Reply #26 on: February 19, 2016, 04:46:30 AM »
Thanks James
I get this warning from GTK running gtk_handlebox and gtk_checkmenu:
Quote
(gtk_handlebox:2003): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'detailed_signal != NULL' failed
Do you get SEGFAULT or this warning?
I used JWASM 2.11 when I  translated these examples more than year ago  ... so am using  it now 

[EDIT] Tomorrow I'll upload special versions of gtk_handlebox and gtk_checkmenu examples with checkpoints after each call . It'll save our time and  show where exactly the crash happens
« Last Edit: February 19, 2016, 05:57:51 AM by GoneFishing »

jcfuller

  • Member
  • **
  • Posts: 195
Re: Assembler languages for Linux
« Reply #27 on: February 19, 2016, 05:19:01 AM »
No warning on compile. Seg fault on running.

James

GoneFishing

  • Member
  • *****
  • Posts: 1072
  • Gone fishing
Re: Assembler languages for Linux
« Reply #28 on: February 19, 2016, 05:20:00 AM »
Ok, thanks
PLease, re-read my previous msg - it was updated

jcfuller

  • Member
  • **
  • Posts: 195
Re: Assembler languages for Linux
« Reply #29 on: February 19, 2016, 10:01:50 PM »
Just a FYI.
  I have no experience with 64bit assembler.
I did a little Linux 32bit jwasm testing with gtk eons ago :)
I want to get at least a basic understanding of the 64bit implementation.
My interest is sparked because I am working on a new cross platform Basic -> c/c++ translator with Glib/Gtk as the base.
I have run into many inconsistencies with the Gtk2/3 platforms on both Linux and Windows.
I have spent many hours with the assorted documentation scattered around the internet, but my old brain ......

You might want to revise your demos to not use depreciated gtk functions.
It took zetcode (http://zetcode.com/gui/gtk2/) until this past July to update their offerings.

Looking forward to more info.

Am I correct there is not a working INVOKE for 64bit (Windows or Linux)?

James