Req: ASM/ VBasic Hybrid Question? 
Author Message
 Req: ASM/ VBasic Hybrid Question?


Quote:
>I have  written a V basic 3.0 program and execute my ASM  code as a
>.exe   Dos file using the V basic Shell function. Is their any way I
>can pass a single byte from the Dos environment back into my (Windows)
>main program that launched the Dos  .exe  file. I have passed the byte
>using a disk file, but their must be a more efficient method.

Hi CB!

Just wondering if VB30 can read the ERRORLEVEL? - IE: You could pass your
byte value back that way if so:

        Mov     AL, ReturnStatus
        Mov     AH, 04Ch
        Int     21h

Ep
Ed Parry - Southern California, USA

Unauthorized amphibians will be toad away.



Mon, 23 Aug 1999 03:00:00 GMT  
 Req: ASM/ VBasic Hybrid Question?


Quote:
>>I have  written a V basic 3.0 program and execute my ASM  code as a
>>.exe   Dos file using the V basic Shell function. Is their any way I
>>can pass a single byte from the Dos environment back into my (Windows)
>>main program that launched the Dos  .exe  file. I have passed the byte
>>using a disk file, but their must be a more efficient method.

EP replied:

Quote:
>Just wondering if VB30 can read the ERRORLEVEL? - IE: You could pass your
>byte value back that way if so:
>    Mov     AL, ReturnStatus
>    Mov     AH, 04Ch
>    Int     21h

Second idea if the above is no good:

I THINK you could pass a single byte via the CMOS if in a pinch if no other
method worked. I seem to recall that standard CMOS has a few bytes here n
there that are unused or 'reserved'. Not palyed with this idea, just a
thought.

Ep

Ed Parry - Southern California, USA

Unauthorized amphibians will be toad away.



Tue, 24 Aug 1999 03:00:00 GMT  
 Req: ASM/ VBasic Hybrid Question?

Quote:



>>>I have  written a V basic 3.0 program and execute my ASM  code as a
>>>.exe   Dos file using the V basic Shell function. Is their any way I
>>>can pass a single byte from the Dos environment back into my (Windows)
>>>main program that launched the Dos  .exe  file. I have passed the byte
>>>using a disk file, but their must be a more efficient method.

>EP replied:
>>Just wondering if VB30 can read the ERRORLEVEL? - IE: You could pass your
>>byte value back that way if so:
>>        Mov     AL, ReturnStatus
>>        Mov     AH, 04Ch
>>        Int     21h

>Second idea if the above is no good:

>I THINK you could pass a single byte via the CMOS if in a pinch if no other
>method worked. I seem to recall that standard CMOS has a few bytes here n
>there that are unused or 'reserved'. Not palyed with this idea, just a
>thought.

You're going to have to jump through Windows' hoops if you plan on getting
to the real CMOS, I think.  But if a VB app starts up a dos program, don't
they share the same virual machine environment?  Then they ought to be
sharing the same 04F0-04FF interapplication area, eh?  But it seems that
EP's idea is best if only one byte needs to be returned.

Chris



Tue, 24 Aug 1999 03:00:00 GMT  
 Req: ASM/ VBasic Hybrid Question?

You might try using a ram disk.



Tue, 24 Aug 1999 03:00:00 GMT  
 Req: ASM/ VBasic Hybrid Question?



Quote:


> >>I have  written a V basic 3.0 program and execute my ASM  code as a
> >>.exe   Dos file using the V basic Shell function. Is their any way I
> >>can pass a single byte from the Dos environment back into my (Windows)
> >>main program that launched the Dos  .exe  file. I have passed the byte
> >>using a disk file, but their must be a more efficient method.
> EP replied:
> >Just wondering if VB30 can read the ERRORLEVEL? - IE: You could pass your
> >byte value back that way if so:
> > Mov AL, ReturnStatus
> > Mov AH, 04Ch
> > Int 21h
> Second idea if the above is no good:
> I THINK you could pass a single byte via the CMOS if in a pinch if no other
> method worked. I seem to recall that standard CMOS has a few bytes here n
> there that are unused or 'reserved'. Not palyed with this idea, just a
> thought.

You could write a simple DOS mode device driver to which you send
information from real mode programs in DOS or Windows DOS boxes
(using file open/write/close) and retrieve it from Windows programs,
again by opening the device file (make it a character driver unless
you want to send lots of information back). This would need to  be
loaded from CONFIG.SYS but it's presence can be detected by the
Windows code and an appropriate warning issued it is absent.

Adrian.



Wed, 01 Sep 1999 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. REQ: asm faq 1/3

2. REQ: alt.lang.asm FAQ

3. REQ: ASM Code Samples to display .BMP files

4. REQ: ASM tutorial for newcomers!

5. Req: src asm prog for multiply

6. Req: Program to convert C include to ASM include

7. REQ: good editor for ASM

8. REQ: Info on interfacing with winsock in ASM

9. pydoc req thread; readline req NO thread

10. VBasic site.

11. VO X DELPHI X SQL WINDOWS X V.BASIC

12. VRML and C++/VBasic

 

 
Powered by phpBB® Forum Software