![]() |
![]() |
#1 |
Registered User
|
execute function from dos.library
hi !
I would like to use this function. if i'm not wrong, it can execute any prog. it's code is : (http://amigadev.elowar.com/read/ADCD.../node015E.html) Code:
success = Execute( commandString, input, output ) D0 D1 D2 D3 Code:
INPUTS commandString - pointer to a null-terminated string input - BCPL pointer to a file handle output - BCPL pointer to a file handle RESULTS success - BOOLEAN indicating whether Execute was successful in finding and starting the specified program. Note this is NOT the return code of the command(s). Code:
move.l exec,d1 move.l file1,d2 move.l file2,d3 exec: "my prog",0 file1 : 0 file2: 0 |
![]() |
![]() |
#2 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Like this:
Code:
include include/dos/dos_lib.i move.l #exec, d1 moveq #0, d2 moveq #0, d3 move.l dosbase, a6 jsr _LVOExecute(a6) |
![]() |
![]() |
#3 |
Registered User
|
already declared execute = -222 at the beginning..
was just missing : move.l dosbase,a6 ,all the rest was correct... Thank you ![]() |
![]() |
![]() |
#4 |
Registered User
|
uhmm another prob:
if exec: dc.l "myprog.exe",0 then only .exe is ran ![]() |
![]() |
![]() |
#5 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
You need to use dc.b to define strings, with dc.l it will truncate to a longword and only keep the last 4 bytes. But it's partly ASM-Pro's fault for not warning about these things. Use a proper assembler
![]() |
![]() |
![]() |
#6 |
Registered User
|
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Open-source dos.library | Don_Adan | Coders. System | 273 | 02 September 2020 00:42 |
dos.library Open() hangs | MrD | Coders. Asm / Hardware | 15 | 24 July 2012 19:55 |
Dos.library question. | Thorham | Coders. General | 2 | 11 January 2011 21:03 |
dos.library LockRecord() function fails | LamboJay | support.WinUAE | 12 | 24 September 2010 21:05 |
Accessing dos.library during boot time | Leffmann | Coders. General | 9 | 16 February 2009 19:26 |
|
|