|
Wow, that's a blast from the past! Forgot you could write code like that.
Problem might be in the line (although, I might be grasping at straws):
lea bp, string;<br />
You might try:
push cs<br />
pop es<br />
mov bp, string<br />
My memory fails me.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Thanks for trying; now it tells me that the operand types do not match, in the following line :
mov bp, string
I made the mistake of donating my old assembly books, or this would be done already. If you have any info on int 10h, AH=0Ah that you can dig up for me, I'd appreciate it very much. TASM / old MASM info is hard to come by these days. Searches for TASM, MASM, and bootcode bring up either info on Tacticle Air and Missles, MASM32, Hutch, and bits about Izcelion.
Also another question? I do hope you know something of Operating System boot sequence. At what point will I be able to use C/C++ code to make controls, such as radio buttons, check boxes, progress bars, and Edit Boxes, etc.?
When will I be able to use TRUE 3D controls, instead of those that resemble the 16-bit ones of the old Win 3.1?
I am guessing that as soon as I enter Protected Mode, after
loading the kernel and activating gate A20, I should be ok. What do you think? I'll explain my ideas later, if you would like to know about them ... Please contact me if you do, and thanks again ...
My e-mail is webmaster@digitalmythologywebdesigns.com
-digitalmythology -dm
webmaster@digitalmythologywebdesigns.com
http://www.digitalmythologywebdesigns.com
|
|
|
|
|
I guess asm compilers have gotten smart - used to be they did what you told them to, with no backtalk, even if it wasn't right.
I had to dust off about 2 inches of muck from my "Peter Norton's Guide to the IBM PC", to even find int 10h, function ah=0ah! That's where the code came from, but obviously didn't work for you.
Sorry, I know nothing about operating system boot sequences, or at what point you can start using the built in controls.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I am no expert, but as he wants ES:BP to be the address of the string, why not do
mov bp, seg string
mov es, bp
mov bp, offset string
This is how the sample code in my old (circa 1986) DOS book does it.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Yeah, I think LEA loads the effective address of DS:BP, not ES:BP, so your code is probably the money ball. (Still dusting off the cobwebs...)
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
That's one way to do it TASM.
--
Touch eyeballs to screen for cheap laser surgery
|
|
|
|
|
Jörgen Sigvardsson wrote: TASM
The book I got the code from was targeted at the Microsoft Macro Assembler (MASM) not the Borland Turbo Assembler (TASM).
(Not that it makes any difference in this case)
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Hi all:
I know for MSI installation package you can choose to install in default mode(Without UI)
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
and also register a callback
MsiSetExternalUI (MSIProgressHandler, /*all the installation msg you interested in*/...
to get MSI installation progress message with some info.
But now I have an exe installation package, and I've tried this package with '/q' command line, It did installed in background without any UI, but how can I get installation progress info like I did in MSI in this scenario?
|
|
|
|
|
Ask a problem,About CEdit control
i write code.....
<<<<<<<<<static dll="">>>>>>>>
****************CmEdit.h**********
class AFX_NOVTABLE CmEdit : public CEdit
{
public:
__declspec(dllexport) CString CmGetDlgItem(int nID);
};
***************CmEdit.Cpp**********
CString CmEdit::CmGetDlgItem(int nID)
{
CString Str;
GetDlgItem(nID)->GetWindowTextW(Str);
return Str;
}
<<<<<<<<<<<<static exe="">>>>>>>>>>>>>
#pragma comment(lib,"Dll.lib")
#include "CmEdit.h"
void SocialSecurityData::OnBnClickedOk()
{
CmEdit d;
CString r=d.CmGetDlgItem(IDC_EDIT1);
MessageBox(r);
}
Start Debugging.....
Error...............
Why????
thank
|
|
|
|
|
What error message do you get, also why are you using GetWindowTextW directly
To all the virgins in the world thanks for Nothing.
|
|
|
|
|
You seem to be doing something simple the tough way by handcoding. Can you tell me what you are wanting to accomplish and I can tell you do that effectively using vc++ IDE.
Vipin - Microsoft MVP
http://www.explorewindows.com
|
|
|
|
|
Vipin Aravind wrote: Vipin - Microsoft MVP
Are you an MVP?
Money is the root of all evil. For more information, send $10 to me.
|
|
|
|
|
Wheres error?which line?We cant guess error in your code.
|
|
|
|
|
i wanted to draw 2 circles that intersects with each other using either microsoft C++ or Matlab.. but i guess using C++ is better. then i expect to sumhow figure out the intersect points. thats all. hoped to get the source code ASAP..
txe
|
|
|
|
|
I don't think it works like that dude.
Not many people are going to write your application for you.
look through the MSDN library at "Device Context" or "CDC". there are lots of drawing functions in the class members including Ellipse()
i have a 3d line intersection calculation in my code but i doubt i would work for circles.
|
|
|
|
|
|
txE wrote: thx anyway..
is your problem is not sorted out!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
Hi,
How can I execute command prompt commands using c++?
For example, I want my code to get the dir list of the current directory.
In the command prompt I would use: dir > dir.txt
How can I do that in c++? (without writing the code that enums the files).
Thanks,
David.
|
|
|
|
|
|
<br />
int GetDirectoryContents(CString sPath,CArray<CString,CString> &store,CString ext="*");<br />
int CFileSystem::GetDirectoryContents(CString sPath,CArray<CString,CString> &store,CString ext) {<br />
HANDLE hFind;
WIN32_FIND_DATA FindFileData;<br />
CString t_filenames;<br />
int total_files=0;<br />
<br />
TCHAR DirPath[MAX_PATH];<br />
TCHAR FileName[MAX_PATH];<br />
<br />
_tcscpy(DirPath,sPath);<br />
_tcscat(DirPath,"\\");
_tcscat(DirPath,ext);
<br />
hFind = FindFirstFile(DirPath,&FindFileData);<br />
if(hFind == INVALID_HANDLE_VALUE) return FALSE;<br />
else {<br />
<br />
_tcscpy(FileName,FindFileData.cFileName);<br />
t_filenames.Format("%s",FileName);<br />
store.Add(t_filenames);<br />
++total_files;<br />
}<br />
<br />
while(FindNextFile(hFind,&FindFileData)) {<br />
if( _tcscmp(FindFileData.cFileName,"." ) && <br />
_tcscmp(FindFileData.cFileName,".." ) ) {<br />
_tcscpy(FileName,FindFileData.cFileName);<br />
t_filenames.Format("%s",FileName);<br />
store.Add(t_filenames);<br />
++total_files;<br />
<br />
}<br />
}<br />
FindClose(hFind);
return(total_files-1);<br />
}<br />
|
|
|
|
|
|
ShellExecute doesn't let me do anything I can in command prompt.
For example, I want to get the dir list of the current diretory, how would I do that using ShellExecute?
|
|
|
|
|
Hi,
I'm trying to write a program which copies itself to a different location.
I tried to open the file passed through the arguments (to get my own name), that worked.
Next, I used CreateFile and ReadFile/WriteFile to copy to file.
It worked when I ran it in the Visual Studio enviorment, but failed when I ran in standalone.
Then I tried using CopyFile, and it gave the same results.
I know I can probably use ReadProcessMemory to make it work, but I prefer a cleaner solution.
Any Ideas?
David.
|
|
|
|
|
Have you tried the obvious - in standalone get it to print the location it thinks the executable is in and make sure that is correct. Also make sure it is an absolute path.
Elaine
|
|
|
|