Welcome, Guest. Please login or register.

Author Topic: Running workbench programs from another program  (Read 3305 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Running workbench programs from another program
« on: May 29, 2006, 10:44:56 PM »
wbstart.library is the "industry standard" for lauching apps in wb way.

ToolManagerExt.lha (wbstart.library is included there)

stefanb_src.lha (includes full source code to wbstart.library, including dev information, also for assembler)

Example code:
Code: [Select]

        include "libraries/WBstart.i"

_LVOCloseLibrary        EQU     -414
_LVOOpenLibrary         EQU     -552
_LVOWBStartTagList      EQU     -36

Main:
        move.l  4.w,a6
        lea     .wbstartname(pc),a1
        moveq   #2,d0
        jsr     _LVOOpenLibrary(a6)
        tst.l   d0
        beq     .nowbstart
        move.l  d0,a6

        clr.l   -(sp) ; TAG_END
        pea     .wbprogname(pc)
        move.l  #WBStart_Name,-(sp)
        move.l  sp,a0
        jsr     _LVOWBStartTagList(a6)
        lea     3*4(sp),sp

        move.l  a6,a1
        move.l  4.w,a6
        jsr     _LVOCloseLibrary(a6)
.nowbstart:
        moveq   #0,d0
        rts

.wbstartname:
        dc.b    "wbstart.library",0

.wbprogname:
        dc.b    "SYS:Utilities/MultiView",0

Ahh, m68k asm, my old love. Nice to see I haven't lost the touch. ;-)
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Running workbench programs from another program
« Reply #1 on: May 29, 2006, 11:07:59 PM »
You'll need these files from the archive:
Code: [Select]

WBStart/dev/wbstart.doc
WBStart/dev/asm/Libraries/WBstart.I
WBStart/dev/asm/LVO/WBStart_Lib.I


Quote
Must find Linux app that extracts lha...

well, linux does have lha. :-)

Quote
EDIT: now i come to think of it, I might already have it in my includes folder.

I suggest you still grab the wbstart.doc, it's the documentation about the library.