[CrackMonkey] Fuck that weak Python shit - assembly is the language of the FUTURE!

David Huggins-Daines dhd at eradicator.org
Sun Apr 16 20:05:41 PDT 2000


#include <alpha/regdef.h>

	.section .rodata
$howdy:
	.ascii	"Hello GTK+ in asm world!\0"
$delete:
	.ascii	"clicked\0"
	.text
	.globl main
	.ent main
main:
	.frame fp,48,ra
	ldgp	gp,0(pv)
	lda	sp,-48(sp)
	stq	ra,0(sp)
	stq	fp,8(sp)
	mov	sp,fp
	stq	a0,16(fp)
	lda	a0,16(fp)
	stq	a1,24(fp)
	lda	a1,24(fp)
	jsr	ra,gtk_init
	ldgp	gp,0(ra)
	lda	a0,0	# GTK_WINDOW_TOPLEVEL
	jsr	ra,gtk_window_new
	ldgp	gp,0(ra)
	stq	v0,32(fp)
	lda	a0,$howdy
	jsr	ra,gtk_button_new_with_label
	ldgp	gp,0(ra)
	stq	v0,40(fp)
	mov	v0,a0
	lda	a1,$delete
	lda	a2,cb_exit
	lda	a3,0
	jsr	ra,gtk_signal_connect
	ldgp	gp,0(ra)
	ldq	a0,32(fp)
	ldq	a1,40(fp)
	jsr	ra,gtk_container_add
	ldgp	gp,0(ra)
	ldq	a0,32(fp)
	jsr	ra,gtk_widget_show
	ldgp	gp,0(ra)
	ldq	a0,40(fp)
	jsr	ra,gtk_widget_show
	ldgp	gp,0(ra)
	jsr	gtk_main
	mov	fp,sp
	ldq	ra,0(sp)
	ldq	fp,8(sp)
	lda	sp,48(sp)
	ret	(ra)
	.end	main

	.ent cb_exit
cb_exit:
	.frame fp,16,ra
	ldgp	gp,0(pv)
	lda	sp,-16(sp)
	stq	ra,0(sp)
	stq	fp,8(sp)
	mov	sp,fp
	jsr	ra,gtk_main_quit
	ldgp	gp,0(ra)
	lda	v0,0	# FALSE
	mov	fp,sp
	ldq	ra,0(sp)
	ldq	fp,8(sp)
	lda	sp,16(sp)
	ret	(ra)
	.end	cb_exit





More information about the Crackmonkey mailing list