By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,570 Members | 1,234 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,570 IT Pros & Developers. It's quick & easy.

Proper invoking .COM file

100+
P: 539
A86 code (Assembly)

jmp main

main:
mov ah,0h ;Service 0, Captures the input and stores it to register al...
int 16h ; Interrupt 16 BIOS...

mov ah,2h ;Service 2
mov dl,al ;Copy register al to register dl
int 21h ;interrupt 21, prints the character
jmp exit ;goto exit
;end main

exit:
mov ah,0h ;equivalent getch in C
int 16H ;
int 20H ;equivalent System.exit(0) in java


the code above is a A86 code that waits for an input from the user
and prints what the user entered...

the .COM file is the generated file after compiling the code, like executable file in windows....A DOS program....

I've tried to invoke the .COM file using

Asumming the .COM filename is INPUT.COM
Runtime.getRuntime().exec("cmd /C start INPUT.COM");

It invokes the .COM file, but the expected flow doesn't prints what the user entered... Until terminated...

When i just double clicked the .COM file, im satisfied with the flow....

What is the proper invoking of this .COM file?

Any reply will be appreciated...

Sukatoa...
Feb 21 '08 #1
Share this Question
Share on Google+
1 Reply


100+
P: 539
If you were to implement this,

How would you invoke the .COM file from java?

Any reply would be appreciated

Help needing,
Sukatoa
Feb 25 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.